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
52feaec1
Commit
52feaec1
authored
Aug 12, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
继续优化薪资导入
parent
ebcfc25b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
139 additions
and
43 deletions
+139
-43
SalaryConstants.java
.../cloud/plus/v1/yifu/salary/constants/SalaryConstants.java
+3
-3
TSalaryStandard.java
...ifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
+3
-3
TSalaryStandardController.java
.../v1/yifu/salary/controller/TSalaryStandardController.java
+2
-2
TSalaryStandardSetController.java
.../yifu/salary/controller/TSalaryStandardSetController.java
+4
-4
TSalaryStandardService.java
...d/plus/v1/yifu/salary/service/TSalaryStandardService.java
+9
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+3
-17
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+107
-6
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+3
-0
SalaryCommonUtil.java
...yifu/cloud/plus/v1/yifu/salary/util/SalaryCommonUtil.java
+5
-8
No files found.
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/constants/SalaryConstants.java
View file @
52feaec1
...
@@ -27,13 +27,13 @@ public class SalaryConstants {
...
@@ -27,13 +27,13 @@ public class SalaryConstants {
public
static
final
int
idCardLength
=
18
;
public
static
final
int
idCardLength
=
18
;
public
static
final
String
NON_TAX
=
"非扣税项"
;
public
static
final
String
NON_TAX
=
"非扣税项"
;
/*
/*
* @Description: 0待提交1待审核
3
待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印
* @Description: 0待提交1待审核
2已审核待推送 3已推送
待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印
* @Author: hgw
* @Author: hgw
* @Date: 2019/10/10 14:55
* @Date: 2019/10/10 14:55
* @return:
* @return:
**/
**/
public
static
final
Integer
[]
AUDIT_STATUS
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
public
static
final
Integer
[]
AUDIT_STATUS
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
};
public
static
final
String
[]
AUDIT_STATUS_STRING
=
{
"待提交"
,
"待审核"
,
"
-"
,
"待发放"
,
"已发放"
,
"审核不通过"
,
"确认不通过"
,
"财务退回"
,
"结算单调整待审核"
,
"结算单调整待打印
"
};
public
static
final
String
[]
AUDIT_STATUS_STRING
=
{
"待提交"
,
"待审核"
,
"
已审核待推送"
,
"已推送待发放"
,
"已发放"
,
"审核不通过"
,
"确认不通过"
,
"财务退回"
,
"结算单调整待审核"
,
"结算单调整待打印"
,
"推送失败
"
};
//发放失败-认领状态 0待认领1待出账2已发放3再次失败待认领
//发放失败-认领状态 0待认领1待出账2已发放3再次失败待认领
public
static
final
Integer
[]
LOST_STATUS
=
{
0
,
1
,
2
,
3
};
public
static
final
Integer
[]
LOST_STATUS
=
{
0
,
1
,
2
,
3
};
//申请垫付流程状态( 0:未申请 1已申请 2申请不通过 3申请已通过)
//申请垫付流程状态( 0:未申请 1已申请 2申请不通过 3申请已通过)
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
View file @
52feaec1
...
@@ -135,9 +135,9 @@ public class TSalaryStandard extends BaseEntity {
...
@@ -135,9 +135,9 @@ public class TSalaryStandard extends BaseEntity {
/**
/**
* 状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)
* 状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)
*/
*/
@ExcelAttribute
(
name
=
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)"
,
isNotEmpty
=
true
,
errorInfo
=
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空"
)
@ExcelAttribute
(
name
=
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印
10 推送失败
)"
,
isNotEmpty
=
true
,
errorInfo
=
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空"
)
@NotBlank
(
message
=
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空"
)
@NotBlank
(
message
=
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印
10 推送失败
)不能为空"
)
@ExcelProperty
(
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)"
)
@ExcelProperty
(
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印
10 推送失败
)"
)
private
Integer
status
;
private
Integer
status
;
/**
/**
* 提交时间
* 提交时间
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryStandardController.java
View file @
52feaec1
...
@@ -97,8 +97,8 @@ public class TSalaryStandardController {
...
@@ -97,8 +97,8 @@ public class TSalaryStandardController {
@SysLog
(
"通过id删除标准薪酬工资表"
)
@SysLog
(
"通过id删除标准薪酬工资表"
)
@DeleteMapping
(
"/{id}"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tsalarystandard_del')"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tsalarystandard_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
public
R
<
String
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tSalaryStandardService
.
removeById
(
id
)
);
return
tSalaryStandardService
.
deleteSalaryById
(
id
);
}
}
/**
/**
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryStandardSetController.java
View file @
52feaec1
...
@@ -64,9 +64,9 @@ public class TSalaryStandardSetController {
...
@@ -64,9 +64,9 @@ public class TSalaryStandardSetController {
* @param tSalaryStandardSet
* @param tSalaryStandardSet
* @return R
* @return R
*/
*/
@Operation
(
description
=
"新增或修改(
wxhr:
tsalarystandardset_add)"
)
@Operation
(
description
=
"新增或修改(tsalarystandardset_add)"
)
@PostMapping
(
"/saveOrUptateSet"
)
@PostMapping
(
"/saveOrUptateSet"
)
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tsalarystandardset_add')"
)
@PreAuthorize
(
"@pms.hasPermission('tsalarystandardset_add')"
)
public
R
<
TSalaryStandardSet
>
saveOrUptateSet
(
@RequestBody
TSalaryStandardSet
tSalaryStandardSet
)
{
public
R
<
TSalaryStandardSet
>
saveOrUptateSet
(
@RequestBody
TSalaryStandardSet
tSalaryStandardSet
)
{
return
tSalaryStandardSetService
.
saveOrUpdateSet
(
tSalaryStandardSet
);
return
tSalaryStandardSetService
.
saveOrUpdateSet
(
tSalaryStandardSet
);
}
}
...
@@ -77,10 +77,10 @@ public class TSalaryStandardSetController {
...
@@ -77,10 +77,10 @@ public class TSalaryStandardSetController {
* @param id
* @param id
* @return R
* @return R
*/
*/
@Operation
(
description
=
"删除(
wxhr:
tsalarystandardset_del)"
)
@Operation
(
description
=
"删除(tsalarystandardset_del)"
)
@SysLog
(
"删除薪资工资条配置主表"
)
@SysLog
(
"删除薪资工资条配置主表"
)
@DeleteMapping
(
"/{id}"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tsalarystandardset_del')"
)
@PreAuthorize
(
"@pms.hasPermission('tsalarystandardset_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
tSalaryStandardSetDetailService
.
remove
(
Wrappers
.<
TSalaryStandardSetDetail
>
query
().
lambda
().
eq
(
TSalaryStandardSetDetail:
:
getSetId
,
id
));
tSalaryStandardSetDetailService
.
remove
(
Wrappers
.<
TSalaryStandardSetDetail
>
query
().
lambda
().
eq
(
TSalaryStandardSetDetail:
:
getSetId
,
id
));
return
new
R
<>(
tSalaryStandardSetService
.
removeById
(
id
));
return
new
R
<>(
tSalaryStandardSetService
.
removeById
(
id
));
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryStandardService.java
View file @
52feaec1
...
@@ -65,4 +65,13 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
...
@@ -65,4 +65,13 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
* @return
* @return
*/
*/
R
salaryStandardAudit
(
String
auditFlag
,
String
AuditRemark
,
String
id
);
R
salaryStandardAudit
(
String
auditFlag
,
String
AuditRemark
,
String
id
);
/**
* @Description: 删除工资表
* @Author: hgw
* @Date: 2022/8/12 16:01
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
deleteSalaryById
(
String
id
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
52feaec1
...
@@ -12,7 +12,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
...
@@ -12,7 +12,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.*
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants
;
...
@@ -237,7 +238,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -237,7 +238,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
Common
.
isNotNull
(
user
.
getDeptName
()))
{
if
(
Common
.
isNotNull
(
user
.
getDeptName
()))
{
s
.
setBelongDeptCode
(
user
.
getDeptName
());
s
.
setBelongDeptCode
(
user
.
getDeptName
());
}
else
{
}
else
{
s
.
setBelongDeptCode
(
"未获取到员工的
departCod
e"
);
s
.
setBelongDeptCode
(
"未获取到员工的
DeptNam
e"
);
}
}
s
.
setCreateTime
(
nowTime
);
s
.
setCreateTime
(
nowTime
);
s
.
setDeleteFlag
(
SalaryConstants
.
NOT_DELETE
);
s
.
setDeleteFlag
(
SalaryConstants
.
NOT_DELETE
);
...
@@ -486,8 +487,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -486,8 +487,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
else
{
}
else
{
deptSet
=
deptSetR
.
getData
();
deptSet
=
deptSetR
.
getData
();
}
}
Map
<
String
,
String
>
bankNameMap
=
new
HashMap
<>();
String
bankName
,
bankNameAll
=
""
;
int
size
=
savList
.
size
();
int
size
=
savList
.
size
();
TSalaryAccountItem
annousSai
;
TSalaryAccountItem
annousSai
;
// 自有员工人数
// 自有员工人数
...
@@ -529,16 +528,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -529,16 +528,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
annousSai
=
null
;
annousSai
=
null
;
try
{
try
{
SalaryAccountUtil
.
reflectionAttr
(
savList
.
get
(
i
),
a
);
SalaryAccountUtil
.
reflectionAttr
(
savList
.
get
(
i
),
a
);
if
(
SalaryConstants
.
SALARY_STYLE_BANK
.
equals
(
a
.
getSalaryStyle
())
&&
Common
.
isNotNull
(
a
.
getBankName
()))
{
bankName
=
a
.
getBankName
();
if
(
bankName
.
contains
(
"行"
))
{
bankName
=
bankName
.
substring
(
0
,
bankName
.
indexOf
(
"行"
))
+
"行"
;
}
if
(
Common
.
isEmpty
(
bankNameMap
.
get
(
bankName
)))
{
bankNameMap
.
put
(
bankName
,
"1"
);
bankNameAll
+=
bankName
+
";"
;
}
}
checkYearFinalStyle
=
a
.
getAnnualBonusType
();
checkYearFinalStyle
=
a
.
getAnnualBonusType
();
if
(
Common
.
isNotNull
(
a
.
getTaxMonth
()))
{
if
(
Common
.
isNotNull
(
a
.
getTaxMonth
()))
{
maxYearMonth
=
DateUtil
.
getMaxYearMonth
(
a
.
getTaxMonth
());
maxYearMonth
=
DateUtil
.
getMaxYearMonth
(
a
.
getTaxMonth
());
...
@@ -770,9 +759,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -770,9 +759,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
salary
.
setOwnNums
(
ownNum
);
salary
.
setOwnNums
(
ownNum
);
salary
.
setOwnMoney
(
ownMoney
);
salary
.
setOwnMoney
(
ownMoney
);
/*if (Common.isNotNull(bankNameAll) && bankNameAll.length() > 1000) {
return R.failed("请检查档案的开户行与卡号是否反了,封面的开户行已超长!");
}*/
TSalaryDetailVo
salaryDetailVo
=
new
TSalaryDetailVo
();
TSalaryDetailVo
salaryDetailVo
=
new
TSalaryDetailVo
();
salaryDetailVo
.
setSalaryAccountList
(
aList
);
salaryDetailVo
.
setSalaryAccountList
(
aList
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
52feaec1
...
@@ -24,6 +24,7 @@ import com.alibaba.excel.read.listener.ReadListener;
...
@@ -24,6 +24,7 @@ import com.alibaba.excel.read.listener.ReadListener;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
@@ -31,11 +32,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...
@@ -31,11 +32,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.
entity.TApprovalRecord
;
import
com.yifu.cloud.plus.v1.yifu.salary.
constants.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.
TSalaryStandard
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.
*
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.*
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo
;
...
@@ -47,9 +47,10 @@ import javax.servlet.ServletOutputStream;
...
@@ -47,9 +47,10 @@ import javax.servlet.ServletOutputStream;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.
util.ArrayList
;
import
java.
time.LocalDateTime
;
import
java.util.
List
;
import
java.util.
*
;
/**
/**
* 标准薪酬工资表
* 标准薪酬工资表
...
@@ -64,6 +65,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -64,6 +65,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Autowired
@Autowired
private
TApprovalRecordService
approvalRecordService
;
private
TApprovalRecordService
approvalRecordService
;
@Autowired
private
TSalaryAccountService
salaryAccountService
;
@Autowired
private
MSalaryEstimateService
mSalaryEstimateService
;
@Autowired
private
MSalaryPaymentResService
salaryPaymentResService
;
/**
/**
* 标准薪酬工资表简单分页查询
* 标准薪酬工资表简单分页查询
*
*
...
@@ -265,4 +275,95 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -265,4 +275,95 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
return
R
.
ok
();
return
R
.
ok
();
}
}
@Override
public
R
<
String
>
deleteSalaryById
(
String
id
)
{
if
(
id
!=
null
)
{
TSalaryStandard
sf
=
this
.
getById
(
id
);
if
(
sf
!=
null
&&
Common
.
isNotNull
(
sf
.
getId
()))
{
if
(
sf
.
getStatus
()
!=
null
&&
!
SalaryConstants
.
AUDIT_STATUS
[
0
].
equals
(
sf
.
getStatus
())
&&
!
SalaryConstants
.
AUDIT_STATUS
[
5
].
equals
(
sf
.
getStatus
())
&&
!
SalaryConstants
.
AUDIT_STATUS
[
7
].
equals
(
sf
.
getStatus
()))
{
return
R
.
failed
(
"状态为:【"
+
SalaryConstants
.
AUDIT_STATUS_STRING
[
sf
.
getStatus
()]
+
"】,不可删除"
);
}
}
else
{
return
R
.
failed
(
"删除失败:未找到工资表!"
);
}
String
deptId
=
sf
.
getDeptId
();
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
"删除工资表失败-获取登录人信息为空"
);
}
//查询结算单:T_SETTLEMENTH_FORM
if
(
sf
.
getType
()
==
null
||
sf
.
getType
()
!=
CommonConstants
.
ONE_INT
)
{
//4:删除报账
TSalaryAccount
querySalaryAccountEntity
=
new
TSalaryAccount
();
querySalaryAccountEntity
.
setSalaryFormId
(
id
);
QueryWrapper
<
TSalaryAccount
>
querySalaryAccountWrapper
=
new
QueryWrapper
<>();
querySalaryAccountWrapper
.
setEntity
(
querySalaryAccountEntity
);
List
<
TSalaryAccount
>
salaryAccountList
=
salaryAccountService
.
list
(
querySalaryAccountWrapper
);
if
(
salaryAccountList
!=
null
&&
salaryAccountList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
for
(
TSalaryAccount
entity
:
salaryAccountList
)
{
entity
.
setDeleteFlag
(
SalaryConstants
.
DELETED
);
}
salaryAccountService
.
updateBatchById
(
salaryAccountList
);
//5:更新预估库结算标识为0
MSalaryEstimate
salaryEstimate
=
new
MSalaryEstimate
();
salaryEstimate
.
setSalaryId
(
id
);
salaryEstimate
.
setIsSocial
(
SalaryConstants
.
IS_SOCIAL_ZERO
);
QueryWrapper
<
MSalaryEstimate
>
salaryEstimateQueryWrapper
=
new
QueryWrapper
<>();
salaryEstimateQueryWrapper
.
setEntity
(
salaryEstimate
);
//社保
List
<
MSalaryEstimate
>
socialList
=
mSalaryEstimateService
.
list
(
salaryEstimateQueryWrapper
);
salaryEstimate
.
setIsSocial
(
SalaryConstants
.
IS_FUND_ONE
);
salaryEstimateQueryWrapper
.
setEntity
(
salaryEstimate
);
//公积金
List
<
MSalaryEstimate
>
fundList
=
mSalaryEstimateService
.
list
(
salaryEstimateQueryWrapper
);
if
((
socialList
!=
null
&&
!
socialList
.
isEmpty
())
||
(
fundList
!=
null
&&
!
fundList
.
isEmpty
()))
{
MSalaryPaymentRes
res
;
Map
<
String
,
MSalaryPaymentRes
>
saveResMap
=
new
HashMap
<>();
if
(
socialList
!=
null
&&
!
socialList
.
isEmpty
())
{
for
(
MSalaryEstimate
est
:
socialList
)
{
res
=
saveResMap
.
get
(
est
.
getEstimateId
());
if
(
res
==
null
)
{
res
=
new
MSalaryPaymentRes
();
res
.
setId
(
est
.
getEstimateId
());
res
.
setDeptId
(
deptId
);
}
res
.
setSalarySocialFlag
(
CommonConstants
.
ZERO_STRING
);
saveResMap
.
put
(
est
.
getEstimateId
(),
res
);
}
}
if
(
fundList
!=
null
&&
!
fundList
.
isEmpty
())
{
for
(
MSalaryEstimate
est
:
fundList
)
{
res
=
saveResMap
.
get
(
est
.
getEstimateId
());
if
(
res
==
null
)
{
res
=
new
MSalaryPaymentRes
();
res
.
setId
(
est
.
getEstimateId
());
res
.
setDeptId
(
deptId
);
}
res
.
setSalaryFundFlag
(
CommonConstants
.
ZERO_STRING
);
saveResMap
.
put
(
est
.
getEstimateId
(),
res
);
}
}
// 开始更新res
if
(!
saveResMap
.
isEmpty
())
{
Iterator
<
MSalaryPaymentRes
>
iter
=
saveResMap
.
values
().
iterator
();
while
(
iter
.
hasNext
())
{
res
=
iter
.
next
();
salaryPaymentResService
.
saveOrUpdate
(
res
);
}
}
}
}
}
//6:删除工资表
sf
.
setDeleteFlag
(
SalaryConstants
.
DELETED
);
this
.
updateById
(
sf
);
return
R
.
ok
(
"级联删除工资表成功"
);
}
return
R
.
failed
(
"id 不可为空"
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
52feaec1
...
@@ -291,6 +291,9 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -291,6 +291,9 @@ public class SalaryAccountUtil implements Serializable {
continue
;
continue
;
}
}
}
}
if
(
new
BigDecimal
(
"3500"
).
equals
(
relaySalary
)
||
new
BigDecimal
(
"5000"
).
equals
(
relaySalary
))
{
entity
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
}
}
}
if
(
null
==
error
)
{
if
(
null
==
error
)
{
if
(
Common
.
isNotNull
(
entity
.
getSalaryStyle
()))
{
if
(
Common
.
isNotNull
(
entity
.
getSalaryStyle
()))
{
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryCommonUtil.java
View file @
52feaec1
...
@@ -478,7 +478,7 @@ public class SalaryCommonUtil implements Serializable {
...
@@ -478,7 +478,7 @@ public class SalaryCommonUtil implements Serializable {
**/
**/
public
static
void
setConfigSalary
(
TConfigSalary
configSalary
,
TSalaryAccountVo
entity
)
{
public
static
void
setConfigSalary
(
TConfigSalary
configSalary
,
TSalaryAccountVo
entity
)
{
if
(
configSalary
!=
null
&&
configSalary
.
getId
()
!=
null
)
{
if
(
configSalary
!=
null
&&
configSalary
.
getId
()
!=
null
)
{
entity
.
setSalary
Date
(
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()));
entity
.
setSalary
Month
(
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()));
entity
.
setSettlementMonth
(
DateUtil
.
addMonth
(
configSalary
.
getSettleMonth
()));
entity
.
setSettlementMonth
(
DateUtil
.
addMonth
(
configSalary
.
getSettleMonth
()));
entity
.
setDeduSocialMonth
(
DateUtil
.
addMonth
(
configSalary
.
getSocialMonth
()));
entity
.
setDeduSocialMonth
(
DateUtil
.
addMonth
(
configSalary
.
getSocialMonth
()));
entity
.
setDeduProvidentMonth
(
DateUtil
.
addMonth
(
configSalary
.
getFundMonth
()));
entity
.
setDeduProvidentMonth
(
DateUtil
.
addMonth
(
configSalary
.
getFundMonth
()));
...
@@ -499,9 +499,6 @@ public class SalaryCommonUtil implements Serializable {
...
@@ -499,9 +499,6 @@ public class SalaryCommonUtil implements Serializable {
* @return: void
* @return: void
**/
**/
public
static
void
setAccountBaseInfo
(
String
salaryType
,
TSettleDomainSelectVo
dept
,
TSalaryAccountVo
entity
,
boolean
salaryGiveTimeFlag
)
{
public
static
void
setAccountBaseInfo
(
String
salaryType
,
TSettleDomainSelectVo
dept
,
TSalaryAccountVo
entity
,
boolean
salaryGiveTimeFlag
)
{
if
(
Common
.
isEmpty
(
entity
.
getSalaryTaxFlag
()))
{
entity
.
setSalaryTaxFlag
(
CommonConstants
.
ONE_STRING
);
//默认扣税
}
entity
.
setDistributionFlag
(
CommonConstants
.
ZERO_STRING
);
entity
.
setDistributionFlag
(
CommonConstants
.
ZERO_STRING
);
if
(
Common
.
isEmpty
(
entity
.
getSalaryGiveTime
()))
{
if
(
Common
.
isEmpty
(
entity
.
getSalaryGiveTime
()))
{
if
(
salaryGiveTimeFlag
)
{
if
(
salaryGiveTimeFlag
)
{
...
@@ -511,10 +508,10 @@ public class SalaryCommonUtil implements Serializable {
...
@@ -511,10 +508,10 @@ public class SalaryCommonUtil implements Serializable {
}
}
}
}
entity
.
setDeleteFlag
(
SalaryConstants
.
NOT_DELETE
);
entity
.
setDeleteFlag
(
SalaryConstants
.
NOT_DELETE
);
entity
.
set
SettleDepar
tId
(
dept
.
getId
());
entity
.
set
Dep
tId
(
dept
.
getId
());
entity
.
set
SettleDepar
tNo
(
dept
.
getDepartNo
());
entity
.
set
Dep
tNo
(
dept
.
getDepartNo
());
entity
.
set
SettleDepar
tName
(
dept
.
getDepartName
());
entity
.
set
Dep
tName
(
dept
.
getDepartName
());
entity
.
set
Salary
Type
(
salaryType
);
entity
.
set
Form
Type
(
salaryType
);
}
}
/**
/**
...
...
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