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
8f07e369
Commit
8f07e369
authored
Jul 30, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
零时薪资单2
parent
7f607ba8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
175 additions
and
35 deletions
+175
-35
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
+80
-29
yd-api/src/main/java/com/yd/api/practitioner/vo/n22/QuerySalaryDetailRequestVO.java
+4
-0
yd-api/src/main/java/com/yd/api/practitioner/vo/n22/SalaryDetail.java
+2
-0
yd-api/src/main/java/com/yd/dal/entity/practitioner/payscale/AgAclLifePractitionerSalary.java
+11
-0
yd-api/src/main/java/com/yd/dal/mapper/practitioner/AgAclLifePractitionerSalaryMapper.java
+4
-0
yd-api/src/main/java/com/yd/dal/mapper/salary/AgAclSalaryMapper.java
+3
-0
yd-api/src/main/resources/mapper/practitioner/AgAclLifePractitionerSalaryMapper.xml
+15
-6
yd-api/src/main/resources/mapper/salary/AgAclSalaryMapper.xml
+56
-0
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
View file @
8f07e369
...
...
@@ -403,8 +403,9 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
private
List
<
PayScaleInfo
>
queryNew
(
PayScaleQueryRequestVO
requestVO
)
throws
Exception
{
// 1.先查本地新基本法的薪资
List
<
AgAclSalary
>
newSalaryList
=
agAclSalaryMapper
.
queryListByPractitionerId
(
requestVO
.
getPractitionerId
());
List
<
PayScaleInfo
>
salaryList
=
this
.
translateAgAclSalaryToPayScaleInfo
(
newSalaryList
);
// List<AgAclSalary> newSalaryList = agAclSalaryMapper.queryListByPractitionerId(requestVO.getPractitionerId());
List
<
AgAclLifePractitionerSalary
>
list
=
practitionerSalaryMapper
.
queryListByPractitionerIdAndIsbasic
(
requestVO
.
getPractitionerId
(),
1
);
List
<
PayScaleInfo
>
salaryList
=
this
.
translateAgAclLifePractitionerSalaryToPayScaleInfo
(
list
);
// 2.再查N22
List
<
PayScaleInfo
>
listN22
=
this
.
queryPayScaleListFromN22
(
requestVO
);
...
...
@@ -434,20 +435,30 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
return
resultList
;
}
private
List
<
PayScaleInfo
>
translateAgAcl
SalaryToPayScaleInfo
(
List
<
AgAcl
Salary
>
newSalaryList
)
{
private
List
<
PayScaleInfo
>
translateAgAcl
LifePractitionerSalaryToPayScaleInfo
(
List
<
AgAclLifePractitioner
Salary
>
newSalaryList
)
{
List
<
PayScaleInfo
>
resultList
=
new
ArrayList
<>();
PayScaleInfo
payScaleInfo
;
for
(
AgAcl
Salary
item
:
newSalaryList
)
{
String
time
;
for
(
AgAcl
LifePractitionerSalary
salary
:
newSalaryList
)
{
payScaleInfo
=
new
PayScaleInfo
();
payScaleInfo
.
setMonShId
(
item
.
getId
());
payScaleInfo
.
setIsBasic
(
1
);
payScaleInfo
.
setMonDtlPeriod
(
item
.
getYearMonth
());
payScaleInfo
.
setMonDtlAmount
(
item
.
getAmount
().
doubleValue
());
payScaleInfo
.
setMonDtlRAmount
(
item
.
getAfterTaxAmount
().
doubleValue
());
payScaleInfo
.
setMonShId
(
salary
.
getId
());
payScaleInfo
.
setMonDtlPeriod
(
salary
.
getYearMonth
());
payScaleInfo
.
setMonDtlAmount
(
salary
.
getPayableAmount
().
doubleValue
());
payScaleInfo
.
setMonDtlRAmount
(
salary
.
getNetAmount
().
doubleValue
());
if
(
"1"
.
equals
(
salary
.
getIsBasic
()))
{
payScaleInfo
.
setIsBasic
(
1
);
}
resultList
.
add
(
payScaleInfo
);
}
for
(
PayScaleInfo
info
:
resultList
)
{
if
(
StringUtils
.
isNotBlank
(
info
.
getMonDtlPeriod
()))
{
time
=
info
.
getMonDtlPeriod
();
info
.
setYears
(
time
.
substring
(
0
,
4
));
info
.
setMonth
(
time
.
substring
(
4
));
}
}
return
resultList
;
}
...
...
@@ -758,30 +769,70 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
@Override
public
QuerySalaryDetailResponseVO
querySalaryDetail
(
QuerySalaryDetailRequestVO
requestVO
)
{
QuerySalaryDetailResponseVO
responseVO
=
new
QuerySalaryDetailResponseVO
();
// 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"
);
// N22
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"
);
SalaryDetailsSearchResponseVO
salaryDetailsSearchResponseVO
=
n22SalaryService
.
salaryDetailsSearch
(
salaryDetailsSearchRequestBody
);
SalaryDetailsSearchResponseVO
salaryDetailsSearchResponseVO
=
n22SalaryService
.
salaryDetailsSearch
(
salaryDetailsSearchRequestBody
);
// 3.组装前端数据
if
(
"查询成功"
.
equals
(
salaryDetailsSearchResponseVO
.
getResponseHead
().
getMessage
()))
{
// 3.组装前端数据
if
(
"查询成功"
.
equals
(
salaryDetailsSearchResponseVO
.
getResponseHead
().
getMessage
()))
{
SalaryDetailsSearchResponseBody
salaryDetails
=
salaryDetailsSearchResponseVO
.
getResponseBody
();
this
.
createQuerySalaryDetailResponseVO
(
responseVO
,
salaryDetails
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
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"
)));
}
}
else
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"820001"
)));
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
;
}
AgAclSalary
agAclSalary
=
new
AgAclSalary
();
agAclSalary
.
setPractitionerId
(
practitionerId
);
agAclSalary
.
setYearMonth
(
payoutYearmonth
);
List
<
AgAclSalary
>
newSalaryList
=
agAclSalaryMapper
.
queryByRecord
(
agAclSalary
);
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
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"820001"
)));
}
}
return
responseVO
;
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/n22/QuerySalaryDetailRequestVO.java
View file @
8f07e369
...
...
@@ -10,4 +10,8 @@ public class QuerySalaryDetailRequestVO {
private
String
month
;
private
String
agent_id
;
private
Long
practitionerId
;
private
String
isBasic
;
}
yd-api/src/main/java/com/yd/api/practitioner/vo/n22/SalaryDetail.java
View file @
8f07e369
...
...
@@ -16,4 +16,6 @@ public class SalaryDetail {
private
Double
personal_tax
;
private
Double
after_tax_comis
;
//税后应发
private
Integer
salaryType
;
}
yd-api/src/main/java/com/yd/dal/entity/practitioner/payscale/AgAclLifePractitionerSalary.java
View file @
8f07e369
...
...
@@ -48,6 +48,8 @@ public class AgAclLifePractitionerSalary implements Serializable {
*/
private
String
pdfOssPath
;
private
Integer
isBasic
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
...
...
@@ -169,4 +171,12 @@ public class AgAclLifePractitionerSalary implements Serializable {
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
public
Integer
getIsBasic
()
{
return
isBasic
;
}
public
void
setIsBasic
(
Integer
isBasic
)
{
this
.
isBasic
=
isBasic
;
}
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/practitioner/AgAclLifePractitionerSalaryMapper.java
View file @
8f07e369
package
com
.
yd
.
dal
.
mapper
.
practitioner
;
import
com.yd.dal.entity.practitioner.payscale.AgAclLifePractitionerSalary
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -18,4 +19,6 @@ public interface AgAclLifePractitionerSalaryMapper {
int
updateByPrimaryKey
(
AgAclLifePractitionerSalary
record
);
List
<
AgAclLifePractitionerSalary
>
queryListByPractitionerId
(
Long
practitionerId
);
List
<
AgAclLifePractitionerSalary
>
queryListByPractitionerIdAndIsbasic
(
@Param
(
"practitionerId"
)
Long
practitionerId
,
@Param
(
"isBasic"
)
Integer
isBasic
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/salary/AgAclSalaryMapper.java
View file @
8f07e369
...
...
@@ -18,4 +18,6 @@ public interface AgAclSalaryMapper {
int
updateByPrimaryKey
(
AgAclSalary
record
);
List
<
AgAclSalary
>
queryListByPractitionerId
(
Long
practitionerId
);
List
<
AgAclSalary
>
queryByRecord
(
AgAclSalary
record
);
}
\ No newline at end of file
yd-api/src/main/resources/mapper/practitioner/AgAclLifePractitionerSalaryMapper.xml
View file @
8f07e369
...
...
@@ -10,10 +10,11 @@
<result
column=
"taxout_amount"
jdbcType=
"DECIMAL"
property=
"taxoutAmount"
/>
<result
column=
"net_amount"
jdbcType=
"DECIMAL"
property=
"netAmount"
/>
<result
column=
"pdf_oss_path"
jdbcType=
"VARCHAR"
property=
"pdfOssPath"
/>
<result
column=
"is_basic"
jdbcType=
"BIGINT"
property=
"isBasic"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, practitioner_id, practitioner_code, `year_month`, payable_amount, taxout_amount,
net_amount, pdf_oss_path
net_amount, pdf_oss_path
, is_basic
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -121,9 +122,16 @@
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"queryListByPractitionerId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_life_practitioner_salary
where practitioner_id = #{practitionerId,jdbcType=BIGINT}
</select>
<select
id=
"queryListByPractitionerId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_life_practitioner_salary
where practitioner_id = #{practitionerId,jdbcType=BIGINT}
</select>
<select
id=
"queryListByPractitionerIdAndIsbasic"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_life_practitioner_salary
where practitioner_id = #{practitionerId,jdbcType=BIGINT}
and is_basic = #{isBasic,jdbcType=BIGINT}
</select>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/salary/AgAclSalaryMapper.xml
View file @
8f07e369
...
...
@@ -233,4 +233,59 @@
select * from ag_acl_salary
where practitioner_id = #{practitionerId,jdbcType=BIGINT}
</select>
<select
id=
"queryByRecord"
parameterType=
"com.yd.dal.entity.salary.AgAclSalary"
resultMap=
"BaseResultMap"
>
select * from ag_acl_salary
where
<trim
suffixOverrides=
","
>
<if
test=
"practitionerId != null"
>
practitioner_id = #{practitionerId,jdbcType=BIGINT},
</if>
<if
test=
"practitionerCode != null"
>
practitioner_code = #{practitionerCode,jdbcType=VARCHAR},
</if>
<if
test=
"yearMonth != null"
>
`year_month` = #{yearMonth,jdbcType=VARCHAR},
</if>
<if
test=
"salaryType != null"
>
salary_type = #{salaryType,jdbcType=INTEGER},
</if>
<if
test=
"salaryCode != null"
>
salary_code = #{salaryCode,jdbcType=VARCHAR},
</if>
<if
test=
"salaryName != null"
>
salary_name = #{salaryName,jdbcType=VARCHAR},
</if>
<if
test=
"amount != null"
>
amount = #{amount,jdbcType=DECIMAL},
</if>
<if
test=
"tax != null"
>
tax = #{tax,jdbcType=DECIMAL},
</if>
<if
test=
"afterTaxAmount != null"
>
after_tax_amount = #{afterTaxAmount,jdbcType=DECIMAL},
</if>
<if
test=
"lifePractitionerSalaryId != null"
>
life_practitioner_salary_id = #{lifePractitionerSalaryId,jdbcType=BIGINT},
</if>
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"createdAt != null"
>
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</select>
</mapper>
\ No newline at end of file
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