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
50e94d09
Commit
50e94d09
authored
Nov 12, 2020
by
liushaowei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
7432a1b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
10 deletions
+31
-10
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+31
-10
No files found.
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
50e94d09
...
...
@@ -500,7 +500,7 @@ public class ContractServiceImpl implements ContractService {
}
//补充协议
if
(
"2"
.
equals
(
resource
.
getContractType
())){
if
(
"2"
.
equals
(
resource
.
getContractType
())
&&
"tkio"
.
equals
(
resource
.
getPlatform
())
){
//关联合同不能为空
if
(
null
==
resource
.
getRelationContract
()
||
""
.
equals
(
resource
.
getRelationContract
())||
-
1L
==
resource
.
getRelationContract
()){
Contract
contractExist
=
new
Contract
();
...
...
@@ -846,6 +846,25 @@ public class ContractServiceImpl implements ContractService {
Contract
contract
=
contractRepository
.
findOne
(
resource
.
getId
());
//补充协议
if
(
"2"
.
equals
(
contract
.
getContractType
())
&&
"tkio"
.
equals
(
contract
.
getPlatform
())){
//关联合同不能为空
if
(
null
==
contract
.
getRelationContract
()
||
""
.
equals
(
contract
.
getRelationContract
())||
-
1L
==
contract
.
getRelationContract
()){
Contract
contractExist
=
new
Contract
();
contractExist
.
setId
(-
100L
);
contractExist
.
setErroMessage
(
"关联合同为必填项"
);
return
contractExist
;
}
//补充协议开始日期不能晚于原始合同的结束日期
Contract
relationContract
=
contractRepository
.
findOne
(
contract
.
getRelationContract
());
if
(
relationContract
.
getEndDate
().
compareTo
(
contract
.
getStartDate
())<
0
){
Contract
contractExist
=
new
Contract
();
contractExist
.
setId
(-
100L
);
contractExist
.
setErroMessage
(
"补充协议开始日期不能晚于原始合同的结束日期"
);
return
contractExist
;
}
}
if
(
resource
.
getContractCode
()
!=
null
&&
!
resource
.
getContractCode
().
equals
(
contract
.
getContractCode
()))
{
Contract
contractExist
=
contractRepository
.
findByCode
(
resource
.
getContractCode
().
trim
());
if
(
contractExist
!=
null
)
{
...
...
@@ -1487,15 +1506,17 @@ public class ContractServiceImpl implements ContractService {
}
//对结果二次加工
List
<
Long
>
relationContracts
=
contractRepository
.
findRelationContractBySideAgre
();
//查询被补充协议关联的合同
for
(
Contract
contract:
result
){
if
(
null
==
contract
.
getContractType
()
||
!
"2"
.
equals
(
contract
.
getContractType
())){
//非补充协议
if
(
relationContracts
.
contains
(
BigInteger
.
valueOf
(
contract
.
getId
()))){
contract
.
setOperate
(
false
);
//如果合同 被补充协议关联
}
}
else
{
if
(
contract
.
getRelationContract
()!=
null
&&
contract
.
getRelationContract
()>
0
){
//补充协议
contract
.
setOperate
(
false
);
//如果补充协议被关联
if
(
"tkio"
.
equals
(
platform
)){
List
<
Long
>
relationContracts
=
contractRepository
.
findRelationContractBySideAgre
();
//查询被补充协议关联的合同
for
(
Contract
contract:
result
){
if
(
null
==
contract
.
getContractType
()
||
!
"2"
.
equals
(
contract
.
getContractType
())){
//非补充协议
if
(
relationContracts
.
contains
(
BigInteger
.
valueOf
(
contract
.
getId
()))){
contract
.
setOperate
(
false
);
//如果合同 被补充协议关联
}
}
else
{
if
(
contract
.
getRelationContract
()!=
null
&&
contract
.
getRelationContract
()>
0
){
//补充协议
contract
.
setOperate
(
false
);
//如果补充协议被关联
}
}
}
}
...
...
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