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
7b54c073
Commit
7b54c073
authored
Jan 27, 2021
by
lzxry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CAS晚录判断
parent
586a98c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
20 deletions
+34
-20
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+34
-20
No files found.
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
7b54c073
...
@@ -626,6 +626,8 @@ public class ContractServiceImpl implements ContractService {
...
@@ -626,6 +626,8 @@ public class ContractServiceImpl implements ContractService {
if
(
shareIncomeService
.
checkLateContract
(
dateTime
,
if
(
shareIncomeService
.
checkLateContract
(
dateTime
,
new
DateTime
(
new
DateTime
().
toString
(
"yyyy-MM-dd"
))))
{
new
DateTime
(
new
DateTime
().
toString
(
"yyyy-MM-dd"
))))
{
resource
.
setStatus
(
ContractStatusEnum
.
LATE
.
getKey
());
resource
.
setStatus
(
ContractStatusEnum
.
LATE
.
getKey
());
}
else
{
resource
.
setStatus
(
ContractStatusEnum
.
NFORMAL
.
getKey
());
}
}
Long
relationContract
=
resource
.
getRelationContract
();
Long
relationContract
=
resource
.
getRelationContract
();
Contract
one
=
contractRepository
.
findOne
(
relationContract
);
Contract
one
=
contractRepository
.
findOne
(
relationContract
);
...
@@ -670,6 +672,12 @@ public class ContractServiceImpl implements ContractService {
...
@@ -670,6 +672,12 @@ public class ContractServiceImpl implements ContractService {
String
validEndDateStr
=
sendTime
.
plusDays
(
contractAllDay
).
toString
(
"yyyy-MM-dd"
);
String
validEndDateStr
=
sendTime
.
plusDays
(
contractAllDay
).
toString
(
"yyyy-MM-dd"
);
resource
.
setValidStartDate
(
validStartDateStr
);
resource
.
setValidStartDate
(
validStartDateStr
);
resource
.
setValidEndDate
(
validEndDateStr
);
resource
.
setValidEndDate
(
validEndDateStr
);
if
(
shareIncomeService
.
checkLateContract
(
new
DateTime
(
validStartDateStr
),
new
DateTime
(
new
DateTime
().
toString
(
"yyyy-MM-dd"
))))
{
resource
.
setStatus
(
ContractStatusEnum
.
LATE
.
getKey
());
}
else
{
resource
.
setStatus
(
ContractStatusEnum
.
NFORMAL
.
getKey
());
}
}
}
}
}
...
@@ -928,26 +936,6 @@ public class ContractServiceImpl implements ContractService {
...
@@ -928,26 +936,6 @@ public class ContractServiceImpl implements ContractService {
contractExist
.
setErroMessage
(
"补充协议开始日期不能晚于原始合同的结束日期"
);
contractExist
.
setErroMessage
(
"补充协议开始日期不能晚于原始合同的结束日期"
);
return
contractExist
;
return
contractExist
;
}
}
}
else
if
(
"cas"
.
equals
(
resource
.
getPlatform
())){
PackageBase
one
=
packageBaseRepository
.
findOne
(
resource
.
getPriceLevel
());
ADIUser
adiUser
=
adiAccountService
.
findOne
(
resource
.
getEmail
(),
one
.
getPackageName
());
if
(
adiUser
==
null
||
StringUtils
.
isEmpty
(
adiUser
.
getSendTime
())){
resource
.
setShareSign
(
0
);
}
else
{
resource
.
setShareSign
(
1
);
DateTime
sendTime
=
new
DateTime
(
DateUtil
.
parseDate
(
DateUtil
.
C_TIME_PATTON_DEFAULT
,
adiUser
.
getSendTime
()));
DateTime
startDate
=
new
DateTime
(
resource
.
getStartDate
());
if
(
sendTime
.
isBefore
(
startDate
)){
sendTime
=
startDate
;
}
DateTime
endDate
=
new
DateTime
(
resource
.
getEndDate
());
String
validStartDateStr
=
sendTime
.
toString
(
DateUtil
.
C_DATE_PATTON_DEFAULT
);
int
contractAllDay
=
Days
.
daysBetween
(
startDate
,
endDate
).
getDays
();
//合同总天数-1 ,用于计算结束日期
String
validEndDateStr
=
sendTime
.
plusDays
(
contractAllDay
).
toString
(
"yyyy-MM-dd"
);
resource
.
setValidStartDate
(
validStartDateStr
);
resource
.
setValidEndDate
(
validEndDateStr
);
}
}
}
if
(
resource
.
getContractCode
()
!=
null
&&
!
resource
.
getContractCode
().
equals
(
contract
.
getContractCode
()))
{
if
(
resource
.
getContractCode
()
!=
null
&&
!
resource
.
getContractCode
().
equals
(
contract
.
getContractCode
()))
{
...
@@ -1068,6 +1056,32 @@ public class ContractServiceImpl implements ContractService {
...
@@ -1068,6 +1056,32 @@ public class ContractServiceImpl implements ContractService {
}
}
contractRepository
.
save
(
bindContract
);
contractRepository
.
save
(
bindContract
);
}
}
}
else
if
(
"cas"
.
equals
(
resource
.
getPlatform
())){
PackageBase
one
=
packageBaseRepository
.
findOne
(
resource
.
getPriceLevel
());
ADIUser
adiUser
=
adiAccountService
.
findOne
(
resource
.
getEmail
(),
one
.
getPackageName
());
if
(
adiUser
==
null
||
StringUtils
.
isEmpty
(
adiUser
.
getSendTime
())){
resource
.
setShareSign
(
0
);
}
else
{
resource
.
setShareSign
(
1
);
DateTime
sendTime
=
new
DateTime
(
DateUtil
.
parseDate
(
DateUtil
.
C_TIME_PATTON_DEFAULT
,
adiUser
.
getSendTime
()));
DateTime
startDate
=
new
DateTime
(
resource
.
getStartDate
());
if
(
sendTime
.
isBefore
(
startDate
)){
sendTime
=
startDate
;
}
DateTime
endDate
=
new
DateTime
(
resource
.
getEndDate
());
String
validStartDateStr
=
sendTime
.
toString
(
DateUtil
.
C_DATE_PATTON_DEFAULT
);
int
contractAllDay
=
Days
.
daysBetween
(
startDate
,
endDate
).
getDays
();
//合同总天数-1 ,用于计算结束日期
String
validEndDateStr
=
sendTime
.
plusDays
(
contractAllDay
).
toString
(
"yyyy-MM-dd"
);
resource
.
setValidStartDate
(
validStartDateStr
);
resource
.
setValidEndDate
(
validEndDateStr
);
if
(
shareIncomeService
.
checkLateContract
(
new
DateTime
(
validStartDateStr
),
new
DateTime
(
new
DateTime
().
toString
(
"yyyy-MM-dd"
))))
{
resource
.
setStatus
(
ContractStatusEnum
.
LATE
.
getKey
());
}
else
{
resource
.
setStatus
(
ContractStatusEnum
.
NFORMAL
.
getKey
());
}
}
}
}
return
contractRepository
.
save
(
resource
);
return
contractRepository
.
save
(
resource
);
...
...
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