Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
fangxinjiang
yifu-mvp
Commits
a6a2a0d5
Commit
a6a2a0d5
authored
Aug 18, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
劳务费导入修改
parent
348de57c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
7 deletions
+43
-7
TSalaryAccountMapper.java
...loud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
+9
-0
TSalaryAccountService.java
...ud/plus/v1/yifu/salary/service/TSalaryAccountService.java
+8
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+10
-6
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+5
-0
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+4
-1
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+7
-0
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
View file @
a6a2a0d5
...
...
@@ -77,4 +77,13 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
@Param
(
"month2"
)
String
month2
,
@Param
(
"month3"
)
String
month3
);
/**
* @param settleId
* @Description: 薪资类型互斥校验 获取本年度身份证号列表
* @Author: huyc
* @Date: 2022/8/18
* @return:
**/
List
<
String
>
getAccountYearCheckList
(
@Param
(
"settleId"
)
String
settleId
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccountService.java
View file @
a6a2a0d5
...
...
@@ -76,4 +76,12 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
**/
List
<
THaveSalaryNosocial
>
getLastMonthTHaveSalaryNosocial
(
String
month
);
/**
* @param settleId
* @Description: 薪资类型互斥校验 获取本年度身份证号列表
* @Author: huyc
* @Date: 2022/8/18
* @return:
**/
List
<
String
>
getAccountYearCheckMap
(
String
settleId
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
a6a2a0d5
...
...
@@ -168,7 +168,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
Map
<
String
,
Integer
>
checkMap
=
tSalaryAccountService
.
getAccountCheckMap
(
dept
.
getId
(),
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()));
util1
.
getJsonStringToList
(
user
,
jsonString
,
dept
,
configSalary
,
salaryConfigMap
,
isMustMap
,
empIdCardMap
,
empNameMap
,
isDuplicateName
,
salaryType
,
invoiceTitle
,
employeeService
,
checkMap
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
,
salaryType
,
null
,
invoiceTitle
,
employeeService
,
checkMap
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
List
<
TSalaryAccountVo
>
saList
=
util1
.
getEntityList
();
if
((
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
()))
{
...
...
@@ -220,14 +220,19 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 自有员工所在结算主体Map
Map
<
String
,
Integer
>
ownEmployeeMap
=
tOwnDeptService
.
getOwnEmpMap
();
// 2.6.6:校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
// 薪资类型互斥校验Map格式:本年度#身份证号_报表类型
List
<
String
>
checkListY
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
configSalary
))
{
checkListY
=
tSalaryAccountService
.
getAccountYearCheckMap
(
dept
.
getId
());
}
// 校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
Map
<
String
,
Integer
>
checkMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
configSalary
))
{
checkMap
=
tSalaryAccountService
.
getAccountCheckMap
(
dept
.
getId
(),
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()));
}
util1
.
getJsonStringToList
(
user
,
jsonString
,
dept
,
!
Common
.
isNotNull
(
configSalary
)
?
null
:
configSalary
,
salaryConfigMap
,
isMustMap
,
empIdCardMap
,
empNameMap
,
isDuplicateName
,
salaryType
,
null
,
employeeService
,
checkMap
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
salaryConfigMap
,
isMustMap
,
empIdCardMap
,
empNameMap
,
isDuplicateName
,
salaryType
,
checkListY
,
null
,
employeeService
,
checkMap
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
List
<
TSalaryAccountVo
>
saList
=
util1
.
getEntityList
();
if
((
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
()))
{
...
...
@@ -1730,7 +1735,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
BigDecimal
salaryTax
=
BigDecimalUtils
.
safeSubtract
(
nowTaxY
,
BigDecimalUtils
.
safeAdd
(
nowTaxT
,
sumTax
));
a
.
setSalaryTax
(
salaryTax
);
a
.
setRelaySalaryUnit
(
relaySalary
);
a
.
setSalaryTaxUnit
(
nowTaxT
);
a
.
setActualSalary
(
BigDecimalUtils
.
safeSubtract
(
actualSalarySumNow
,
salaryTax
));
}
else
{
...
...
@@ -1739,10 +1743,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
nowTaxY
=
BigDecimalUtils
.
safeSubtract
(
nowTaxY
,
sumTax
).
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
}
relaySalary
=
BigDecimalUtils
.
safeAdd
(
actualSalarySumNow
,
nowTaxY
).
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
a
.
setRelaySalaryUnit
(
relaySalary
);
a
.
setSalaryTaxUnit
(
nowTaxY
);
a
.
setActualSalary
(
actualSalarySumNow
);
}
a
.
setRelaySalaryUnit
(
relaySalary
);
// 本次个人应发合计
TSalaryAccountItem
sai
=
new
TSalaryAccountItem
();
sai
.
setCnName
(
SalaryConstants
.
RELAY_SALARY
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
a6a2a0d5
...
...
@@ -195,4 +195,9 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
DateUtil
.
getYearAndMonth
(
month
,
CommonConstants
.
ONE_INT
),
DateUtil
.
getYearAndMonth
(
month
,
CommonConstants
.
TWO_INT
));
}
@Override
public
List
<
String
>
getAccountYearCheckMap
(
String
settleId
)
{
return
baseMapper
.
getAccountYearCheckList
(
settleId
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
a6a2a0d5
...
...
@@ -65,7 +65,7 @@ public class SalaryAccountUtil implements Serializable {
public
void
getJsonStringToList
(
YifuUser
user
,
String
jsonStr
,
TSettleDomainSelectVo
dept
,
TConfigSalary
configSalary
,
Map
<
String
,
TSalaryConfigStandard
>
salaryConfigMap
,
Map
<
String
,
Boolean
>
isMustMap
,
Map
<
String
,
TSalaryEmployee
>
empIdCardMap
,
Map
<
String
,
TSalaryEmployee
>
empNameMap
,
boolean
isDuplicateName
,
String
salaryType
,
String
invoiceTitle
,
TSalaryEmployeeService
tSalaryEmployeeService
,
String
salaryType
,
List
<
String
>
checkListY
,
String
invoiceTitle
,
TSalaryEmployeeService
tSalaryEmployeeService
,
Map
<
String
,
Integer
>
checkMap
,
Map
<
String
,
Integer
>
ownEmployeeMap
,
Map
<
String
,
Integer
>
ownDeptMap
,
TSalaryAccountService
tSalaryAccountService
)
{
List
<
TSalaryAccountVo
>
tList
=
new
ArrayList
<>();
...
...
@@ -305,6 +305,9 @@ public class SalaryAccountUtil implements Serializable {
entity
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
}
}
if
(
Common
.
isNotNull
(
checkListY
)
&&
checkListY
.
contains
(
entity
.
getEmpIdcard
()))
{
entity
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
}
if
(
null
==
error
)
{
if
(
Common
.
isNotNull
(
entity
.
getSalaryStyle
()))
{
salaryStyle
=
entity
.
getSalaryStyle
();
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
a6a2a0d5
...
...
@@ -313,4 +313,11 @@
and a.social = 0
GROUP BY a.EMP_IDCARD HAVING count(1) = 3
</select>
<!-- 薪资类型互斥校验 获取本年度身份证号列表 -->
<select
id=
"getAccountYearCheckList"
resultType=
"java.lang.String"
>
select a.EMP_IDCARD
from t_salary_account a
where a.DELETE_FLAG = 0 and a.DEPT_ID = #{settleId} and a.FORM_TYPE = '0' and a.SALARY_MONTH like concat(DATE_FORMAT(NOW(), '%Y'), '%')
</select>
</mapper>
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