Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
93fb6ef6
Commit
93fb6ef6
authored
May 28, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
薪资单-N22接口查询时间协同
parent
2e707a2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
18 deletions
+44
-18
yd-api/src/main/java/com/yd/api/practitioner/PractitionerController.java
+0
-1
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
+44
-17
No files found.
yd-api/src/main/java/com/yd/api/practitioner/PractitionerController.java
View file @
93fb6ef6
...
...
@@ -480,7 +480,6 @@ public class PractitionerController {
/**
* 薪资单明细保单列表查询接口
* 此接口根据/querySalaryDetail接口返回报文中的年份和月份查询,查询时需要将月份往后推2个月
*
* @param requestVO 请求信息
* @return PolicyInfoQueryResponseVO
...
...
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
View file @
93fb6ef6
...
...
@@ -460,19 +460,20 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
loginName
=
list
.
get
(
0
).
getLoginName
();
years
=
String
.
valueOf
(
list
.
get
(
0
).
getYear
());
month
=
String
.
valueOf
(
list
.
get
(
0
).
getMonth
());
}
PayScaleInfo
payScaleInfo
=
new
PayScaleInfo
();
payScaleInfo
.
setMonDtlAmount
(
monDtlAmount
);
payScaleInfo
.
setMonDtlItem
(
"实发薪水"
);
payScaleInfo
.
setMonDtlRAmount
(
monDtlRAmount
);
payScaleInfo
.
setDrpTitleCode
(
list
.
get
(
0
).
getGrade
());
payScaleInfo
.
setMonDtlPeriod
(
key
);
payScaleInfo
.
setLoginName
(
loginName
);
payScaleInfo
.
setYears
(
years
);
payScaleInfo
.
setMonth
(
month
);
PayScaleInfo
payScaleInfo
=
new
PayScaleInfo
();
payScaleInfo
.
setMonDtlAmount
(
monDtlAmount
);
payScaleInfo
.
setMonDtlItem
(
"实发薪水"
);
payScaleInfo
.
setMonDtlRAmount
(
monDtlRAmount
);
payScaleInfo
.
setDrpTitleCode
(
list
.
get
(
0
).
getGrade
());
payScaleInfo
.
setMonDtlPeriod
(
key
);
payScaleInfo
.
setLoginName
(
loginName
);
// 处理时间,作为接口/searchStaffSalaryDetails的查询入参
this
.
handleYearsAndMonth
(
years
,
month
,
payScaleInfo
);
resultList
.
add
(
payScaleInfo
);
}
resultList
.
add
(
payScaleInfo
);
}
resultList
.
sort
(
Comparator
.
comparing
(
PayScaleInfo
::
getMonDtlPeriod
).
reversed
());
...
...
@@ -480,6 +481,22 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
return
resultList
;
}
private
void
handleYearsAndMonth
(
String
years
,
String
month
,
PayScaleInfo
payScaleInfo
)
{
Integer
mon
=
Integer
.
valueOf
(
month
);
Integer
year
=
Integer
.
valueOf
(
years
);
if
(
mon
==
11
)
{
year
=
year
+
1
;
mon
=
1
;
}
else
if
(
mon
==
12
)
{
year
=
year
+
1
;
mon
=
2
;
}
else
{
mon
=
mon
+
2
;
}
payScaleInfo
.
setYears
(
String
.
valueOf
(
year
));
payScaleInfo
.
setMonth
(
String
.
valueOf
(
mon
));
}
private
String
calculateDate
(
String
dateStr
)
{
Date
date
=
CommonUtil
.
stringParseDate
(
dateStr
,
"yyyy-MM-dd"
);
...
...
@@ -707,14 +724,24 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
}
private
void
handleDateParams
(
SalaryDetailsSearchRequestBody
salaryDetailsSearchRequestBody
,
QuerySalaryDetailRequestVO
requestVO
)
{
String
years
=
requestVO
.
getYears
();
String
month
=
requestVO
.
getMonth
();
int
year
=
Integer
.
valueOf
(
requestVO
.
getYears
());
int
mon
=
Integer
.
valueOf
(
requestVO
.
getMonth
());
if
(
mon
==
1
)
{
year
=
year
-
1
;
mon
=
11
;
}
else
if
(
mon
==
2
)
{
year
=
year
-
1
;
mon
=
12
;
}
else
{
mon
=
mon
-
2
;
}
String
curDate
=
""
;
if
(
mon
th
.
length
()
==
2
)
{
curDate
=
year
s
+
"-"
+
month
+
"-01"
;
if
(
mon
>
10
)
{
curDate
=
year
+
"-"
+
mon
+
"-01"
;
}
else
if
(
month
.
length
()
==
1
)
{
curDate
=
year
s
+
"-0"
+
month
+
"-01"
;
}
else
{
curDate
=
year
+
"-0"
+
mon
+
"-01"
;
}
salaryDetailsSearchRequestBody
.
setStartDate
(
curDate
);
salaryDetailsSearchRequestBody
.
setEndDate
(
curDate
);
...
...
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