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
2815ba7e
Commit
2815ba7e
authored
Aug 23, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
特殊金额
parent
c3260b74
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
5 deletions
+37
-5
TSalaryAccountMapper.java
...loud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
+1
-0
TSalaryAccountService.java
...ud/plus/v1/yifu/salary/service/TSalaryAccountService.java
+3
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+4
-2
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+12
-0
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+7
-3
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+10
-0
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
View file @
2815ba7e
...
@@ -55,6 +55,7 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
...
@@ -55,6 +55,7 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
* @return: java.util.List<java.lang.String>
* @return: java.util.List<java.lang.String>
**/
**/
List
<
AccountCheckVo
>
getAccountCheckList
(
@Param
(
"settleId"
)
String
settleId
,
@Param
(
"settleMonth"
)
String
settleMonth
);
List
<
AccountCheckVo
>
getAccountCheckList
(
@Param
(
"settleId"
)
String
settleId
,
@Param
(
"settleMonth"
)
String
settleMonth
);
List
<
AccountCheckVo
>
getAccountSpecialList
(
@Param
(
"invoiceTitle"
)
String
invoiceTitle
,
@Param
(
"unitId"
)
String
unitId
,
@Param
(
"salaryMonth"
)
String
salaryMonth
);
List
<
AccountCheckVo
>
getAccountCheckListLabor
(
@Param
(
"settleId"
)
String
settleId
,
@Param
(
"settleMonth"
)
String
settleMonth
);
List
<
AccountCheckVo
>
getAccountCheckListLabor
(
@Param
(
"settleId"
)
String
settleId
,
@Param
(
"settleMonth"
)
String
settleMonth
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccountService.java
View file @
2815ba7e
...
@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
...
@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -57,6 +58,8 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
...
@@ -57,6 +58,8 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
**/
**/
Map
<
String
,
Integer
>
getAccountCheckMap
(
String
settleId
,
String
settleMonth
,
String
salaryType
);
Map
<
String
,
Integer
>
getAccountCheckMap
(
String
settleId
,
String
settleMonth
,
String
salaryType
);
Map
<
String
,
BigDecimal
>
getAccountSpecialMap
(
String
invoiceTitle
,
String
unitId
,
String
salaryMonth
);
/**
/**
* @param empIdCard
* @param empIdCard
* @param nowYear
* @param nowYear
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
2815ba7e
...
@@ -126,7 +126,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -126,7 +126,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
return
R
.
failed
(
"获取登录用户信息失败!"
);
return
R
.
failed
(
"获取登录用户信息失败!"
);
}
}
TConfigSalary
configSalary
=
new
TConfigSalary
()
;
TConfigSalary
configSalary
;
if
(
Common
.
isNotNull
(
configId
))
{
if
(
Common
.
isNotNull
(
configId
))
{
// 薪资配置-结算月、社保月等信息
// 薪资配置-结算月、社保月等信息
...
@@ -168,6 +168,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -168,6 +168,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 2.6.6:校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
// 2.6.6:校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
Map
<
String
,
Integer
>
checkMap
=
tSalaryAccountService
.
getAccountCheckMap
(
dept
.
getId
(),
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()),
salaryType
);
Map
<
String
,
Integer
>
checkMap
=
tSalaryAccountService
.
getAccountCheckMap
(
dept
.
getId
(),
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()),
salaryType
);
Map
<
String
,
BigDecimal
>
specialMap
=
tSalaryAccountService
.
getAccountSpecialMap
(
invoiceTitle
,
dept
.
getCustomerId
(),
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()));
List
<
String
>
checkListY
=
new
ArrayList
<>();
List
<
String
>
checkListY
=
new
ArrayList
<>();
// 劳务费和稿酬 薪资类型互斥校验Map格式:本年度#身份证号
// 劳务费和稿酬 薪资类型互斥校验Map格式:本年度#身份证号
if
(
CommonConstants
.
THREE_STRING
.
equals
(
salaryType
)
||
CommonConstants
.
FOUR_STRING
.
equals
(
salaryType
))
{
if
(
CommonConstants
.
THREE_STRING
.
equals
(
salaryType
)
||
CommonConstants
.
FOUR_STRING
.
equals
(
salaryType
))
{
...
@@ -178,7 +180,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -178,7 +180,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
util1
.
getJsonStringToList
(
user
,
jsonString
,
dept
,
configSalary
,
salaryConfigMap
,
isMustMap
,
util1
.
getJsonStringToList
(
user
,
jsonString
,
dept
,
configSalary
,
salaryConfigMap
,
isMustMap
,
empIdCardMap
,
empNameMap
,
isDuplicateName
,
salaryType
,
checkListY
,
invoiceTitle
,
empIdCardMap
,
empNameMap
,
isDuplicateName
,
salaryType
,
checkListY
,
invoiceTitle
,
employeeService
,
checkMap
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
employeeService
,
checkMap
,
specialMap
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
List
<
TSalaryAccountVo
>
saList
=
util1
.
getEntityList
();
List
<
TSalaryAccountVo
>
saList
=
util1
.
getEntityList
();
if
((
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
()))
{
if
((
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
()))
{
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
2815ba7e
...
@@ -174,6 +174,18 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
...
@@ -174,6 +174,18 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
return
map
;
return
map
;
}
}
@Override
public
Map
<
String
,
BigDecimal
>
getAccountSpecialMap
(
String
invoiceTitle
,
String
unitId
,
String
salaryMonth
)
{
List
<
AccountCheckVo
>
list
=
baseMapper
.
getAccountSpecialList
(
invoiceTitle
,
unitId
,
salaryMonth
);
Map
<
String
,
BigDecimal
>
map
=
new
HashMap
<>();
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
for
(
AccountCheckVo
str
:
list
)
{
map
.
put
(
str
.
getTitle
(),
str
.
getRelaySalary
());
}
}
return
map
;
}
/**
/**
* @param empIdCard
* @param empIdCard
* @param nowYear
* @param nowYear
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
2815ba7e
...
@@ -66,7 +66,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -66,7 +66,7 @@ public class SalaryAccountUtil implements Serializable {
,
TConfigSalary
configSalary
,
Map
<
String
,
TSalaryConfigStandard
>
salaryConfigMap
,
Map
<
String
,
Boolean
>
isMustMap
,
TConfigSalary
configSalary
,
Map
<
String
,
TSalaryConfigStandard
>
salaryConfigMap
,
Map
<
String
,
Boolean
>
isMustMap
,
Map
<
String
,
TSalaryEmployee
>
empIdCardMap
,
Map
<
String
,
TSalaryEmployee
>
empNameMap
,
boolean
isDuplicateName
,
Map
<
String
,
TSalaryEmployee
>
empIdCardMap
,
Map
<
String
,
TSalaryEmployee
>
empNameMap
,
boolean
isDuplicateName
,
String
salaryType
,
List
<
String
>
checkListY
,
String
invoiceTitle
,
TSalaryEmployeeService
tSalaryEmployeeService
,
String
salaryType
,
List
<
String
>
checkListY
,
String
invoiceTitle
,
TSalaryEmployeeService
tSalaryEmployeeService
,
Map
<
String
,
Integer
>
checkMap
,
Map
<
String
,
Integer
>
ownEmployeeMap
,
Map
<
String
,
Integer
>
checkMap
,
Map
<
String
,
BigDecimal
>
specialMap
,
Map
<
String
,
Integer
>
ownEmployeeMap
,
Map
<
String
,
Integer
>
ownDeptMap
,
TSalaryAccountService
tSalaryAccountService
)
{
,
Map
<
String
,
Integer
>
ownDeptMap
,
TSalaryAccountService
tSalaryAccountService
)
{
List
<
TSalaryAccountVo
>
tList
=
new
ArrayList
<>();
List
<
TSalaryAccountVo
>
tList
=
new
ArrayList
<>();
List
<
HashMap
>
list
=
JSONObject
.
parseArray
(
jsonStr
,
HashMap
.
class
);
List
<
HashMap
>
list
=
JSONObject
.
parseArray
(
jsonStr
,
HashMap
.
class
);
...
@@ -111,6 +111,9 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -111,6 +111,9 @@ public class SalaryAccountUtil implements Serializable {
String
empName
;
String
empName
;
String
salaryStyle
;
//工资发放方式(0现金/1银行)/2线下
String
salaryStyle
;
//工资发放方式(0现金/1银行)/2线下
BigDecimal
relaySalary
;
//应发工资
BigDecimal
relaySalary
;
//应发工资
BigDecimal
relaySalarySum
;
//应发工资合计,算3500与5000使用的
BigDecimal
money3500
=
new
BigDecimal
(
"3500"
);
//特殊金额3500
BigDecimal
money5000
=
new
BigDecimal
(
"5000"
);
//特殊金额5000
BigDecimal
actualSalarySum
;
//实发工资
BigDecimal
actualSalarySum
;
//实发工资
// 当前年月
// 当前年月
String
nowMonth
=
DateUtil
.
addMonth
(
CommonConstants
.
ZERO_INT
);
String
nowMonth
=
DateUtil
.
addMonth
(
CommonConstants
.
ZERO_INT
);
...
@@ -329,8 +332,9 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -329,8 +332,9 @@ public class SalaryAccountUtil implements Serializable {
+
CommonConstants
.
DOWN_LINE_STRING
+
salaryType
+
CommonConstants
.
DOWN_LINE_STRING
+
relaySalary
)
!=
null
)
{
+
CommonConstants
.
DOWN_LINE_STRING
+
salaryType
+
CommonConstants
.
DOWN_LINE_STRING
+
relaySalary
)
!=
null
)
{
entity
.
setIsRepeat
(
CommonConstants
.
ONE_INT
);
entity
.
setIsRepeat
(
CommonConstants
.
ONE_INT
);
}
}
if
(
new
BigDecimal
(
"3500"
).
compareTo
(
relaySalary
)
==
CommonConstants
.
ZERO_INT
relaySalarySum
=
BigDecimalUtils
.
safeAdd
(
relaySalary
,
specialMap
.
get
(
entity
.
getEmpIdcard
()));
||
new
BigDecimal
(
"5000"
).
compareTo
(
relaySalary
)
==
CommonConstants
.
ZERO_INT
)
{
if
(
money3500
.
compareTo
(
relaySalarySum
)
==
CommonConstants
.
ZERO_INT
||
money5000
.
compareTo
(
relaySalarySum
)
==
CommonConstants
.
ZERO_INT
)
{
entity
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
entity
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
}
}
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
2815ba7e
...
@@ -261,6 +261,16 @@
...
@@ -261,6 +261,16 @@
where a.DELETE_FLAG = 0 and a.DEPT_ID = #{settleId} and a.SALARY_MONTH = #{settleMonth}
where a.DELETE_FLAG = 0 and a.DEPT_ID = #{settleId} and a.SALARY_MONTH = #{settleMonth}
</select>
</select>
<!-- 获取校验的报账明细 ### 格式:身份证号_工资月份_报表类型_应发金额 -->
<select
id=
"getAccountSpecialList"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo"
>
select
a.EMP_IDCARD title,ifnull(relaySalary.SALARY_MONEY,0) relaySalary
from t_salary_account a
t_salary_standard s on a.SALARY_FORM_ID = s.id
left join t_salary_account_item relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary'
where a.DELETE_FLAG = 0 and s.UNIT_ID = #{unitId} and a.SALARY_MONTH = #{salaryMonth}
</select>
<!-- 获取校验的报账明细 ### 格式:身份证号_工资月份_报表类型_应发金额 -->
<!-- 获取校验的报账明细 ### 格式:身份证号_工资月份_报表类型_应发金额 -->
<select
id=
"getAccountCheckListLabor"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo"
>
<select
id=
"getAccountCheckListLabor"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo"
>
select
select
...
...
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