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
c64a51d9
Commit
c64a51d9
authored
Jan 13, 2021
by
lzxry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ip发送日导入判断
parent
d233581e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
18 deletions
+34
-18
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+34
-18
No files found.
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
c64a51d9
...
...
@@ -2704,9 +2704,11 @@ public class ContractServiceImpl implements ContractService {
}
else
if
(
"one_time"
.
equals
(
sheetTitle
)){
if
(
dataSTR
.
equals
(
"否"
)){
s_data
[
w
]
=
false
;
filter
.
put
(
"validStartDate"
,
formatter
.
formatCellValue
(
row_data
.
getCell
(
14
)).
trim
());
}
else
{
s_data
[
w
]
=
true
;
}
filter
.
put
(
"one_time"
,
dataSTR
);
}
else
{
//主账号不为空,按照之前逻辑不变
s_data
[
w
]
=
dataSTR
;
...
...
@@ -2764,30 +2766,44 @@ public class ContractServiceImpl implements ContractService {
String
start_date
=
filter
.
get
(
"start_date"
);
String
end_date
=
filter
.
get
(
"end_date"
);
String
rowIndex
=
filter
.
get
(
"rowIndex"
);
Map
<
String
,
Object
>
adiAccount
=
checkAccount
(
email
,
platform
);
if
(
adiAccount
!=
null
){
Object
result
=
adiAccount
.
get
(
"result"
);
if
(
result
.
equals
(
1
)){
Object
validStartDate
=
adiAccount
.
get
(
"validStartDate"
);
if
(
validStartDate
==
null
||
StringUtils
.
isEmpty
(
validStartDate
)
||
validStartDate
.
equals
(
"null"
)){
return
ResultModel
.
ERROR
(
"第"
+
rowIndex
+
"行主账号【"
+
email
+
"】未进行IP发送"
);
if
(
filter
.
get
(
"one_time"
).
equals
(
"否"
)){
String
validStartDateStr
=
filter
.
get
(
"validStartDate"
);
if
(!
StringUtils
.
isEmpty
(
validStartDateStr
)){
DateTime
dateTime
=
new
DateTime
(
validStartDateStr
);
DateTime
startDate
=
new
DateTime
(
start_date
);
DateTime
endDate
=
new
DateTime
(
end_date
);
int
contractAllDay
=
Days
.
daysBetween
(
startDate
,
endDate
).
getDays
();
//合同总天数
filter
.
put
(
"valid_start_date"
,
dateTime
.
toString
(
"yyyy-MM-dd"
));
filter
.
put
(
"valid_end_date"
,
dateTime
.
plusDays
(
contractAllDay
).
toString
(
"yyyy-MM-dd"
));
}
else
{
return
ResultModel
.
ERROR
(
"第"
+
rowIndex
+
"行主账号【"
+
email
+
"】未填写IP发送"
);
}
}
else
{
Map
<
String
,
Object
>
adiAccount
=
checkAccount
(
email
,
platform
);
if
(
adiAccount
!=
null
){
Object
result
=
adiAccount
.
get
(
"result"
);
if
(
result
.
equals
(
1
)){
Object
validStartDate
=
adiAccount
.
get
(
"validStartDate"
);
if
(
validStartDate
==
null
||
StringUtils
.
isEmpty
(
validStartDate
)
||
validStartDate
.
equals
(
"null"
)){
return
ResultModel
.
ERROR
(
"第"
+
rowIndex
+
"行主账号【"
+
email
+
"】未进行IP发送"
);
}
else
{
String
validStartDateStr
=
validStartDate
.
toString
().
split
(
" "
)[
0
];
DateTime
dateTime
=
new
DateTime
(
validStartDateStr
);
DateTime
startDate
=
new
DateTime
(
start_date
);
DateTime
endDate
=
new
DateTime
(
end_date
);
int
contractAllDay
=
Days
.
daysBetween
(
startDate
,
endDate
).
getDays
();
//合同总天数
filter
.
put
(
"valid_start_date"
,
dateTime
.
toString
(
"yyyy-MM-dd"
));
filter
.
put
(
"valid_end_date"
,
dateTime
.
plusDays
(
contractAllDay
).
toString
(
"yyyy-MM-dd"
));
}
}
else
{
String
validStartDateStr
=
validStartDate
.
toString
().
split
(
" "
)[
0
];
DateTime
dateTime
=
new
DateTime
(
validStartDateStr
);
DateTime
startDate
=
new
DateTime
(
start_date
);
DateTime
endDate
=
new
DateTime
(
end_date
);
int
contractAllDay
=
Days
.
daysBetween
(
startDate
,
endDate
).
getDays
();
//合同总天数
filter
.
put
(
"valid_start_date"
,
dateTime
.
toString
(
"yyyy-MM-dd"
));
filter
.
put
(
"valid_end_date"
,
dateTime
.
plusDays
(
contractAllDay
).
toString
(
"yyyy-MM-dd"
));
return
ResultModel
.
ERROR
(
"第"
+
rowIndex
+
"行主账号【"
+
email
+
"】不存在"
);
}
}
else
{
return
ResultModel
.
ERROR
(
"第"
+
rowIndex
+
"行
主账号【"
+
email
+
"】不存在
"
);
return
ResultModel
.
ERROR
(
"第"
+
rowIndex
+
"行
ADI主账号校验URL失效
"
);
}
}
else
{
return
ResultModel
.
ERROR
(
"第"
+
rowIndex
+
"行ADI主账号校验URL失效"
);
}
}
if
(!
accountsEmail
.
isEmpty
())
{
...
...
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