Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
reyun
manager
Commits
6dcdfbdc
Commit
6dcdfbdc
authored
7 years ago
by
manxiaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同
parent
700e54a9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
7 deletions
+8
-7
workspace.xml
.idea/workspace.xml
+0
-0
ContractController.java
src/main/java/common/controller/ContractController.java
+3
-2
ContractRepository.java
src/main/java/common/repository/ContractRepository.java
+2
-2
ContractService.java
src/main/java/common/service/ContractService.java
+1
-1
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+2
-2
No files found.
.idea/workspace.xml
View file @
6dcdfbdc
This diff is collapsed.
Click to expand it.
src/main/java/common/controller/ContractController.java
View file @
6dcdfbdc
...
...
@@ -25,8 +25,9 @@ public class ContractController {
@RequestMapping
(
value
=
"find"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
findAll
(
@CurrentAccount
User
loginAccount
,
@RequestParam
String
startDate
,
@RequestParam
String
endDate
)
{
return
ResultModel
.
OK
(
service
.
findAll
(
startDate
,
endDate
));
public
ResultModel
findAll
(
@CurrentAccount
User
loginAccount
,
@PathVariable
String
platform
,
@RequestParam
String
startDate
,
@RequestParam
String
endDate
)
{
return
ResultModel
.
OK
(
service
.
findAll
(
startDate
,
endDate
,
platform
));
}
@RequestMapping
(
value
=
"findone"
,
method
=
RequestMethod
.
GET
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/common/repository/ContractRepository.java
View file @
6dcdfbdc
...
...
@@ -18,8 +18,8 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query
(
value
=
"select count(*) from contract where email = ?1"
,
nativeQuery
=
true
)
BigInteger
countNumByEmail
(
String
email
);
@Query
(
value
=
"select * from contract where ds >= ?1 and ds <= ?2 order by ds desc"
,
nativeQuery
=
true
)
List
<
Contract
>
findByDs
(
String
startDate
,
String
endDate
);
@Query
(
value
=
"select * from contract where ds >= ?1 and ds <= ?2
and platfrom = ?3
order by ds desc"
,
nativeQuery
=
true
)
List
<
Contract
>
findByDs
(
String
startDate
,
String
endDate
,
String
platfrom
);
@Query
(
value
=
"select * from contract where contract_code = ?1"
,
nativeQuery
=
true
)
Contract
findByCode
(
String
contract_code
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/common/service/ContractService.java
View file @
6dcdfbdc
...
...
@@ -27,7 +27,7 @@ public interface ContractService {
Contract
update
(
User
loginUser
,
Contract
resource
);
List
<
Contract
>
findAll
(
String
startDate
,
String
endDate
);
List
<
Contract
>
findAll
(
String
startDate
,
String
endDate
,
String
platfrom
);
Contract
findOne
(
String
code
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
6dcdfbdc
...
...
@@ -167,7 +167,7 @@ public class ContractServiceImpl implements ContractService{
}
@Override
public
List
<
Contract
>
findAll
(
String
startDate
,
String
endDate
)
{
public
List
<
Contract
>
findAll
(
String
startDate
,
String
endDate
,
String
platfrom
)
{
List
<
Contract
>
result
=
new
ArrayList
<>();
List
<
User
>
sales
=
userRepository
.
findAll
();
Map
<
Long
,
String
>
saleMap
=
new
HashMap
<>();
...
...
@@ -183,7 +183,7 @@ public class ContractServiceImpl implements ContractService{
typeMap
.
put
(
s
.
getId
(),
s
.
getPackageName
());
}
}
List
<
Contract
>
contractList
=
contractRepository
.
findByDs
(
startDate
,
endDate
);
List
<
Contract
>
contractList
=
contractRepository
.
findByDs
(
startDate
,
endDate
,
platfrom
);
if
(
ValidateUtil
.
isValid
(
contractList
)){
for
(
Contract
c
:
contractList
){
c
.
setSaleName
(
saleMap
.
containsKey
(
c
.
getSale
())
?
saleMap
.
get
(
c
.
getSale
())
:
""
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment