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
0d630b36
Commit
0d630b36
authored
Aug 02, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
零时薪资单3
parent
8f07e369
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
60 deletions
+66
-60
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
+66
-60
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
View file @
0d630b36
...
...
@@ -387,7 +387,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
// 查询历史才需要执行
resultList
=
this
.
historyEG
(
requestVO
);
}
else
{
// 查询全部,把
N22
和历史集合合并到一起
// 查询全部,把
本年
和历史集合合并到一起
resultList
=
this
.
queryAll
(
requestVO
);
}
...
...
@@ -403,7 +403,6 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
private
List
<
PayScaleInfo
>
queryNew
(
PayScaleQueryRequestVO
requestVO
)
throws
Exception
{
// 1.先查本地新基本法的薪资
// List<AgAclSalary> newSalaryList = agAclSalaryMapper.queryListByPractitionerId(requestVO.getPractitionerId());
List
<
AgAclLifePractitionerSalary
>
list
=
practitionerSalaryMapper
.
queryListByPractitionerIdAndIsbasic
(
requestVO
.
getPractitionerId
(),
1
);
List
<
PayScaleInfo
>
salaryList
=
this
.
translateAgAclLifePractitionerSalaryToPayScaleInfo
(
list
);
...
...
@@ -420,8 +419,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
}
for
(
PayScaleInfo
infoN22
:
listN22
)
{
year
=
infoN22
.
getYears
()
==
null
?
"
0
"
:
infoN22
.
getYears
();
month
=
infoN22
.
getMonth
()
==
null
?
"
0
"
:
infoN22
.
getMonth
();
year
=
infoN22
.
getYears
()
==
null
?
""
:
infoN22
.
getYears
();
month
=
infoN22
.
getMonth
()
==
null
?
""
:
infoN22
.
getMonth
();
yearMonth
=
this
.
getYearMonth
(
year
,
month
);
infoN22
.
setMonDtlPeriod
(
yearMonth
);
if
(!
map
.
containsKey
(
yearMonth
))
{
...
...
@@ -769,73 +768,80 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
@Override
public
QuerySalaryDetailResponseVO
querySalaryDetail
(
QuerySalaryDetailRequestVO
requestVO
)
{
QuerySalaryDetailResponseVO
responseVO
=
new
QuerySalaryDetailResponseVO
();
//
N22
//
isBasic为0时查询N22,为1时查询本地数据库表
if
(
"0"
.
equals
(
requestVO
.
getIsBasic
()))
{
// 1.检查请求参数
if
(
StringUtils
.
isBlank
(
requestVO
.
getYears
())||
StringUtils
.
isBlank
(
requestVO
.
getMonth
()))
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
"查询年月不能为空"
));
return
responseVO
;
}
// 2.查询佣金和税的接口
SalaryDetailsSearchRequestBody
salaryDetailsSearchRequestBody
=
new
SalaryDetailsSearchRequestBody
();
this
.
handleDateParams
(
salaryDetailsSearchRequestBody
,
requestVO
);
salaryDetailsSearchRequestBody
.
setLoginName
(
requestVO
.
getAgent_id
());
salaryDetailsSearchRequestBody
.
setSearchType
(
"1"
);
salaryDetailsSearchRequestBody
.
setPaid_Status
(
"3"
);
salaryDetailsSearchRequestBody
.
setCheckStatus
(
"1"
);
this
.
querySalaryDetailFromN22
(
requestVO
,
responseVO
);
}
else
{
this
.
querySalaryDetail
(
requestVO
,
responseVO
);
}
SalaryDetailsSearchResponseVO
salaryDetailsSearchResponseVO
=
n22SalaryService
.
salaryDetailsSearch
(
salaryDetailsSearchRequestBody
);
return
responseVO
;
}
// 3.组装前端数据
if
(
"查询成功"
.
equals
(
salaryDetailsSearchResponseVO
.
getResponseHead
().
getMessage
()))
{
private
void
querySalaryDetail
(
QuerySalaryDetailRequestVO
requestVO
,
QuerySalaryDetailResponseVO
responseVO
)
{
Long
practitionerId
=
requestVO
.
getPractitionerId
();
if
(
null
!=
practitionerId
)
{
String
years
=
requestVO
.
getYears
();
String
month
=
requestVO
.
getMonth
();
String
payoutYearmonth
=
""
;
if
(
month
.
length
()
==
2
)
{
payoutYearmonth
=
years
+
"-"
+
month
;
}
else
if
(
month
.
length
()
==
1
)
{
payoutYearmonth
=
years
+
"-0"
+
month
;
}
SalaryDetailsSearchResponseBody
salaryDetails
=
salaryDetailsSearchResponseVO
.
getResponseBody
();
this
.
createQuerySalaryDetailResponseVO
(
responseVO
,
salaryDetails
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
AgAclSalary
agAclSalary
=
new
AgAclSalary
();
agAclSalary
.
setPractitionerId
(
practitionerId
);
agAclSalary
.
setYearMonth
(
payoutYearmonth
);
List
<
AgAclSalary
>
newSalaryList
=
agAclSalaryMapper
.
queryByRecord
(
agAclSalary
);
}
else
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"820001"
)));
BigDecimal
abc
=
BigDecimal
.
ZERO
;
for
(
AgAclSalary
item
:
newSalaryList
)
{
abc
=
abc
.
add
(
item
.
getAmount
());
}
responseVO
.
setAbc
(
abc
.
toString
());
// list
List
<
SalaryDetail
>
list
=
new
ArrayList
<>();
for
(
AgAclSalary
item
:
newSalaryList
)
{
SalaryDetail
target
=
new
SalaryDetail
();
target
.
setSalaryName
(
item
.
getSalaryName
());
target
.
setCommission
(
item
.
getAmount
().
doubleValue
());
target
.
setSalaryType
(
item
.
getSalaryType
());
list
.
add
(
target
);
}
responseVO
.
setList
(
list
);
}
else
{
Long
practitionerId
=
requestVO
.
getPractitionerId
();
if
(
null
!=
practitionerId
)
{
String
years
=
requestVO
.
getYears
();
String
month
=
requestVO
.
getMonth
();
String
payoutYearmonth
=
""
;
if
(
month
.
length
()
==
2
)
{
payoutYearmonth
=
years
+
"-"
+
month
;
}
else
if
(
month
.
length
()
==
1
)
{
payoutYearmonth
=
years
+
"-0"
+
month
;
}
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"820001"
)));
}
}
AgAclSalary
agAclSalary
=
new
AgAclSalary
();
agAclSalary
.
setPractitionerId
(
practitionerId
);
agAclSalary
.
setYearMonth
(
payoutYearmonth
);
List
<
AgAclSalary
>
newSalaryList
=
agAclSalaryMapper
.
queryByRecord
(
agAclSalary
);
private
void
querySalaryDetailFromN22
(
QuerySalaryDetailRequestVO
requestVO
,
QuerySalaryDetailResponseVO
responseVO
)
{
// 1.检查请求参数
if
(
StringUtils
.
isBlank
(
requestVO
.
getYears
())||
StringUtils
.
isBlank
(
requestVO
.
getMonth
()))
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
"查询年月不能为空"
));
}
// 2.查询佣金和税的接口
SalaryDetailsSearchRequestBody
salaryDetailsSearchRequestBody
=
new
SalaryDetailsSearchRequestBody
();
this
.
handleDateParams
(
salaryDetailsSearchRequestBody
,
requestVO
);
salaryDetailsSearchRequestBody
.
setLoginName
(
requestVO
.
getAgent_id
());
salaryDetailsSearchRequestBody
.
setSearchType
(
"1"
);
salaryDetailsSearchRequestBody
.
setPaid_Status
(
"3"
);
salaryDetailsSearchRequestBody
.
setCheckStatus
(
"1"
);
BigDecimal
abc
=
BigDecimal
.
ZERO
;
for
(
AgAclSalary
item
:
newSalaryList
)
{
abc
=
abc
.
add
(
item
.
getAmount
());
}
responseVO
.
setAbc
(
abc
.
toString
());
// list
List
<
SalaryDetail
>
list
=
new
ArrayList
<>();
for
(
AgAclSalary
item
:
newSalaryList
)
{
SalaryDetail
target
=
new
SalaryDetail
();
target
.
setSalaryName
(
item
.
getSalaryName
());
target
.
setCommission
(
item
.
getAmount
().
doubleValue
());
target
.
setSalaryType
(
item
.
getSalaryType
());
list
.
add
(
target
);
}
responseVO
.
setList
(
list
);
SalaryDetailsSearchResponseVO
salaryDetailsSearchResponseVO
=
n22SalaryService
.
salaryDetailsSearch
(
salaryDetailsSearchRequestBody
);
}
else
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"820001"
)));
}
}
// 3.组装前端数据
if
(
"查询成功"
.
equals
(
salaryDetailsSearchResponseVO
.
getResponseHead
().
getMessage
()))
{
return
responseVO
;
SalaryDetailsSearchResponseBody
salaryDetails
=
salaryDetailsSearchResponseVO
.
getResponseBody
();
this
.
createQuerySalaryDetailResponseVO
(
responseVO
,
salaryDetails
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
}
else
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"820001"
)));
}
}
private
void
handleDateParams
(
SalaryDetailsSearchRequestBody
salaryDetailsSearchRequestBody
,
QuerySalaryDetailRequestVO
requestVO
)
{
...
...
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