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
e8cae298
Commit
e8cae298
authored
Aug 03, 2020
by
kangxiaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改合同编号生成规则
parent
de0b315c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
ContractRepository.java
src/main/java/common/repository/ContractRepository.java
+2
-2
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+1
-1
ShareIncomeServiceImpl.java
...main/java/common/service/impl/ShareIncomeServiceImpl.java
+5
-5
No files found.
src/main/java/common/repository/ContractRepository.java
View file @
e8cae298
...
@@ -71,8 +71,8 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
...
@@ -71,8 +71,8 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
List
<
Contract
>
contractCodePlatformNot
(
List
<
String
>
plats
,
List
<
Long
>
ids
);
List
<
Contract
>
contractCodePlatformNot
(
List
<
String
>
plats
,
List
<
Long
>
ids
);
@Query
(
value
=
"select contract_code from contract where my_body_code = ?1 order by code_num desc limit 1"
,
nativeQuery
=
true
)
@Query
(
value
=
"select contract_code from contract where my_body_code = ?1
and product=?2
order by code_num desc limit 1"
,
nativeQuery
=
true
)
String
findLastCode
(
String
code
);
String
findLastCode
(
String
code
,
String
platform
);
@Query
(
value
=
"select * from contract where id = ?1 union all select * from contract where id = ?2"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from contract where id = ?1 union all select * from contract where id = ?2"
,
nativeQuery
=
true
)
...
...
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
e8cae298
...
@@ -332,7 +332,7 @@ public class ContractServiceImpl implements ContractService {
...
@@ -332,7 +332,7 @@ public class ContractServiceImpl implements ContractService {
// return code + "-" + platform.toUpperCase() + "-" + DateUtil.getDays2(0) + "-" + lastCode;
// return code + "-" + platform.toUpperCase() + "-" + DateUtil.getDays2(0) + "-" + lastCode;
String
codeName
=
contractRepository
.
findLastCode
(
code
);
String
codeName
=
contractRepository
.
findLastCode
(
code
,
platform
);
if
(
"fake"
.
equals
(
platform
))
{
if
(
"fake"
.
equals
(
platform
))
{
platform
=
"FZBWS"
;
platform
=
"FZBWS"
;
}
}
...
...
src/main/java/common/service/impl/ShareIncomeServiceImpl.java
View file @
e8cae298
...
@@ -97,13 +97,13 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
...
@@ -97,13 +97,13 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
DateTime
end
=
new
DateTime
(
endDate
);
DateTime
end
=
new
DateTime
(
endDate
);
long
start_
=
System
.
currentTimeMillis
();
long
start_
=
System
.
currentTimeMillis
();
/*
for (Contract contract : contracts) {
//
for (Contract contract : contracts) {
this.shareIncome4Contract(contract, start, end);
//
this.shareIncome4Contract(contract, start, end);
contract.setMyBodyName(bodiesNameMap.get(contract.getMyBodyCode()));
//
contract.setMyBodyName(bodiesNameMap.get(contract.getMyBodyCode()));
}*/
// }
try
(
Stream
<
Contract
>
streamContract
=
contracts
.
parallelStream
())
{
try
(
Stream
<
Contract
>
streamContract
=
contracts
.
parallelStream
())
{
streamContract
.
forEach
(
v
->
{
streamContract
.
forEach
Ordered
(
v
->
{
this
.
shareIncome4Contract
(
v
,
start
,
end
);
this
.
shareIncome4Contract
(
v
,
start
,
end
);
v
.
setMyBodyName
(
bodiesNameMap
.
get
(
v
.
getMyBodyCode
()));
v
.
setMyBodyName
(
bodiesNameMap
.
get
(
v
.
getMyBodyCode
()));
});
});
...
...
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