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
Jan 23, 2018
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 {
...
@@ -25,8 +25,9 @@ public class ContractController {
@RequestMapping
(
value
=
"find"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"find"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
ResultModel
findAll
(
@CurrentAccount
User
loginAccount
,
@RequestParam
String
startDate
,
@RequestParam
String
endDate
)
{
public
ResultModel
findAll
(
@CurrentAccount
User
loginAccount
,
@PathVariable
String
platform
,
return
ResultModel
.
OK
(
service
.
findAll
(
startDate
,
endDate
));
@RequestParam
String
startDate
,
@RequestParam
String
endDate
)
{
return
ResultModel
.
OK
(
service
.
findAll
(
startDate
,
endDate
,
platform
));
}
}
@RequestMapping
(
value
=
"findone"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"findone"
,
method
=
RequestMethod
.
GET
)
...
...
src/main/java/common/repository/ContractRepository.java
View file @
6dcdfbdc
...
@@ -18,8 +18,8 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
...
@@ -18,8 +18,8 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query
(
value
=
"select count(*) from contract where email = ?1"
,
nativeQuery
=
true
)
@Query
(
value
=
"select count(*) from contract where email = ?1"
,
nativeQuery
=
true
)
BigInteger
countNumByEmail
(
String
email
);
BigInteger
countNumByEmail
(
String
email
);
@Query
(
value
=
"select * from contract where ds >= ?1 and ds <= ?2 order by ds desc"
,
nativeQuery
=
true
)
@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
);
List
<
Contract
>
findByDs
(
String
startDate
,
String
endDate
,
String
platfrom
);
@Query
(
value
=
"select * from contract where contract_code = ?1"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from contract where contract_code = ?1"
,
nativeQuery
=
true
)
Contract
findByCode
(
String
contract_code
);
Contract
findByCode
(
String
contract_code
);
...
...
src/main/java/common/service/ContractService.java
View file @
6dcdfbdc
...
@@ -27,7 +27,7 @@ public interface ContractService {
...
@@ -27,7 +27,7 @@ public interface ContractService {
Contract
update
(
User
loginUser
,
Contract
resource
);
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
);
Contract
findOne
(
String
code
);
...
...
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
6dcdfbdc
...
@@ -167,7 +167,7 @@ public class ContractServiceImpl implements ContractService{
...
@@ -167,7 +167,7 @@ public class ContractServiceImpl implements ContractService{
}
}
@Override
@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
<
Contract
>
result
=
new
ArrayList
<>();
List
<
User
>
sales
=
userRepository
.
findAll
();
List
<
User
>
sales
=
userRepository
.
findAll
();
Map
<
Long
,
String
>
saleMap
=
new
HashMap
<>();
Map
<
Long
,
String
>
saleMap
=
new
HashMap
<>();
...
@@ -183,7 +183,7 @@ public class ContractServiceImpl implements ContractService{
...
@@ -183,7 +183,7 @@ public class ContractServiceImpl implements ContractService{
typeMap
.
put
(
s
.
getId
(),
s
.
getPackageName
());
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
)){
if
(
ValidateUtil
.
isValid
(
contractList
)){
for
(
Contract
c
:
contractList
){
for
(
Contract
c
:
contractList
){
c
.
setSaleName
(
saleMap
.
containsKey
(
c
.
getSale
())
?
saleMap
.
get
(
c
.
getSale
())
:
""
);
c
.
setSaleName
(
saleMap
.
containsKey
(
c
.
getSale
())
?
saleMap
.
get
(
c
.
getSale
())
:
""
);
...
...
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