Commit 8abf4c9b authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.5.3' into MVP1.5.3

parents cf2067b9 98cc04bd
...@@ -130,4 +130,13 @@ public class TConfigSalary extends BaseEntity implements Serializable { ...@@ -130,4 +130,13 @@ public class TConfigSalary extends BaseEntity implements Serializable {
@ExcelProperty(value="发放方式(0:现金;1:转账)") @ExcelProperty(value="发放方式(0:现金;1:转账)")
private Integer grantType; private Integer grantType;
/**
* 收入月份
*/
@NotNull(message = "收入月份不能为空")
@ExcelAttribute(name = "收入月份", isNotEmpty = true,errorInfo = "收入月份不能为空" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value="收入月份")
private Integer incomeMonth;
} }
...@@ -445,6 +445,13 @@ public class TSalaryStandard extends BaseEntity { ...@@ -445,6 +445,13 @@ public class TSalaryStandard extends BaseEntity {
@Schema(description = "是否差额单") @Schema(description = "是否差额单")
private String isDiff; private String isDiff;
/**
* 收入月份
* 2023-4-7 09:31:39 hgw新增
*/
@Schema(description = "收入月份")
private String incomeMonth;
/** /**
* 工资月份-起 * 工资月份-起
*/ */
......
...@@ -225,11 +225,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -225,11 +225,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// return R.ok(saList) // return R.ok(saList)
//薪资导入 //薪资导入
if (CommonConstants.ZERO_STRING.equals(salaryType)) { if (CommonConstants.ZERO_STRING.equals(salaryType)) {
return this.saveAndSubmit(saList, vo, dept); return this.saveAndSubmit(configSalary, saList, vo, dept);
} }
//劳务费和稿酬导入 //劳务费和稿酬导入
if (CommonConstants.THREE_STRING.equals(salaryType) || CommonConstants.FOUR_STRING.equals(salaryType)) { if (CommonConstants.THREE_STRING.equals(salaryType) || CommonConstants.FOUR_STRING.equals(salaryType)) {
return this.saveLaborSubmit(saList, dept, salaryType, orderId); return this.saveLaborSubmit(configSalary, saList, dept, salaryType, orderId);
} }
} else { } else {
return R.failed("导入数据不可为空"); return R.failed("导入数据不可为空");
...@@ -253,8 +253,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -253,8 +253,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/9/26 9:44 * @Date: 2019/9/26 9:44
* @return: com.yifu.cloud.v1.hrms.api.entity.TSalaryStandard * @return: com.yifu.cloud.v1.hrms.api.entity.TSalaryStandard
**/ **/
public R<TSalaryStandard> saveNewTSalary(TSalaryAccountVo sav, TSettleDomainSelectVo dept, YifuUser user public R<TSalaryStandard> saveNewTSalary(TConfigSalary configSalary, TSalaryAccountVo sav, TSettleDomainSelectVo dept
, LocalDateTime nowTime, String invoiceTitle) { , YifuUser user, LocalDateTime nowTime, String invoiceTitle) {
TSalaryStandard s = null; TSalaryStandard s = null;
if (sav != null) { if (sav != null) {
if (null == user || null == user.getId()) { if (null == user || null == user.getId()) {
...@@ -293,6 +293,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -293,6 +293,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//s.setSettlementAmount() //s.setSettlementAmount()
s.setStatus(SalaryConstants.AUDIT_STATUS[0]); s.setStatus(SalaryConstants.AUDIT_STATUS[0]);
s.setBpoFlag(dept.getBpoFlag()); s.setBpoFlag(dept.getBpoFlag());
if (configSalary != null && Common.isNotNull(configSalary.getIncomeMonth())) {
s.setIncomeMonth(DateUtil.addMonth(configSalary.getIncomeMonth()));
} else {
s.setIncomeMonth(sav.getSalaryMonth());
}
} }
return new R<>(s); return new R<>(s);
} }
...@@ -304,7 +309,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -304,7 +309,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/9/20 17:05 * @Date: 2019/9/20 17:05
* @return: com.yifu.cloud.v1.common.core.util.R * @return: com.yifu.cloud.v1.common.core.util.R
**/ **/
private R saveAndSubmit(List<TSalaryAccountVo> savList, SalaryUploadParamVo vo, TSettleDomainSelectVo dept) { private R saveAndSubmit(TConfigSalary configSalary, List<TSalaryAccountVo> savList, SalaryUploadParamVo vo, TSettleDomainSelectVo dept) {
if (Common.isNotNull(savList) && !savList.isEmpty()) { if (Common.isNotNull(savList) && !savList.isEmpty()) {
String orderId = vo.getOrderId(); String orderId = vo.getOrderId();
// 代发户 // 代发户
...@@ -324,7 +329,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -324,7 +329,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
LocalDateTime nowTime = LocalDateTime.now(); LocalDateTime nowTime = LocalDateTime.now();
TSalaryStandard salary; TSalaryStandard salary;
//工资主表 //工资主表
R<TSalaryStandard> sr = this.saveNewTSalary(salaryAccountVo, dept, user, nowTime, invoiceTitle); //工资主表 R<TSalaryStandard> sr = this.saveNewTSalary(configSalary, salaryAccountVo, dept, user, nowTime, invoiceTitle); //工资主表
if (sr == null || sr.getCode() == CommonConstants.FAIL) { if (sr == null || sr.getCode() == CommonConstants.FAIL) {
return sr; return sr;
} else { } else {
...@@ -1428,7 +1433,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1428,7 +1433,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2022/8/16 * @Date: 2022/8/16
* @return: com.yifu.cloud.v1.common.core.util.R * @return: com.yifu.cloud.v1.common.core.util.R
**/ **/
public R saveLaborSubmit(List<TSalaryAccountVo> savList, TSettleDomainSelectVo dept, String salaryType, String orderId) { public R saveLaborSubmit(TConfigSalary configSalary, List<TSalaryAccountVo> savList, TSettleDomainSelectVo dept, String salaryType, String orderId) {
if (Common.isNotNull(savList) && !savList.isEmpty()) { if (Common.isNotNull(savList) && !savList.isEmpty()) {
TSalaryAccountVo salaryAccountVo = savList.get(0); TSalaryAccountVo salaryAccountVo = savList.get(0);
List<TSalaryAccountItem> saiList = null; //报账明细List List<TSalaryAccountItem> saiList = null; //报账明细List
...@@ -1437,7 +1442,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1437,7 +1442,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
LocalDateTime nowTime = LocalDateTime.now(); LocalDateTime nowTime = LocalDateTime.now();
//工资主表 //工资主表
String invoiceTitle = dept.getBusinessSubjectName(); String invoiceTitle = dept.getBusinessSubjectName();
R<TSalaryStandard> sr = this.saveNewTSalary(salaryAccountVo, dept, user, nowTime, invoiceTitle); R<TSalaryStandard> sr = this.saveNewTSalary(configSalary, salaryAccountVo, dept, user, nowTime, invoiceTitle);
if (sr == null || sr.getCode() == CommonConstants.FAIL) { if (sr == null || sr.getCode() == CommonConstants.FAIL) {
return sr; return sr;
......
...@@ -118,7 +118,7 @@ public class DoJointSalaryAsyncTask { ...@@ -118,7 +118,7 @@ public class DoJointSalaryAsyncTask {
private R<String> getIncomeDetailMap(TSalaryStandard tSalaryStandard, TSettleDomainSelectVo dept, List<String> idCardList, Map<String, Integer> detailMap) { private R<String> getIncomeDetailMap(TSalaryStandard tSalaryStandard, TSettleDomainSelectVo dept, List<String> idCardList, Map<String, Integer> detailMap) {
TIncomeDetail detail = new TIncomeDetail(); TIncomeDetail detail = new TIncomeDetail();
detail.setApplyNo(tSalaryStandard.getApplyNo()); detail.setApplyNo(tSalaryStandard.getApplyNo());
detail.setPayMonth(tSalaryStandard.getSalaryMonth()); detail.setPayMonth(tSalaryStandard.getIncomeMonth());
detail.setIdCardList(idCardList); detail.setIdCardList(idCardList);
detail.setDeptId(dept.getId()); detail.setDeptId(dept.getId());
R<TIncomeDetailReturnVo> detailR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId() R<TIncomeDetailReturnVo> detailR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
...@@ -175,14 +175,14 @@ public class DoJointSalaryAsyncTask { ...@@ -175,14 +175,14 @@ public class DoJointSalaryAsyncTask {
if (Common.isEmpty(value) || value == 0) { if (Common.isEmpty(value) || value == 0) {
detail = new TIncomeDetail(); detail = new TIncomeDetail();
detail.setRedisKey(redisKey); detail.setRedisKey(redisKey);
detail.setPayMonth(account.getSalaryMonth()); detail.setPayMonth(tSalaryStandard.getIncomeMonth());
detail.setDeptId(account.getDeptId()); detail.setDeptId(account.getDeptId());
detail.setDeptName(account.getDeptName()); detail.setDeptName(account.getDeptName());
detail.setDeptNo(account.getDeptNo()); detail.setDeptNo(account.getDeptNo());
detail.setUnitId(tSalaryStandard.getUnitId()); detail.setUnitId(tSalaryStandard.getUnitId());
detail.setUnitName(tSalaryStandard.getUnitName()); detail.setUnitName(tSalaryStandard.getUnitName());
detail.setUnitNo(tSalaryStandard.getUnitNo()); detail.setUnitNo(tSalaryStandard.getUnitNo());
detail.setCreateMonth(account.getSalaryMonth()); detail.setCreateMonth(tSalaryStandard.getSettlementMonth());
detail.setEmpIdcard(account.getEmpIdcard()); detail.setEmpIdcard(account.getEmpIdcard());
detail.setEmpName(account.getEmpName()); detail.setEmpName(account.getEmpName());
detail.setFeeMode(dept.getManagementType()); detail.setFeeMode(dept.getManagementType());
......
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
<result property="incomeEndTime" column="INCOME_END_TIME"/> <result property="incomeEndTime" column="INCOME_END_TIME"/>
<result property="issueStatus" column="ISSUE_STATUS"/> <result property="issueStatus" column="ISSUE_STATUS"/>
<result property="isDiff" column="IS_DIFF"/> <result property="isDiff" column="IS_DIFF"/>
<result property="incomeMonth" column="INCOME_MONTH"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -137,7 +138,8 @@ ...@@ -137,7 +138,8 @@
a.INCOME_START_TIME, a.INCOME_START_TIME,
a.INCOME_END_TIME, a.INCOME_END_TIME,
a.ISSUE_STATUS, a.ISSUE_STATUS,
a.IS_DIFF a.IS_DIFF,
a.INCOME_MONTH
</sql> </sql>
<sql id="tSalaryStandard_where"> <sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null"> <if test="tSalaryStandard != null">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment