Commit b2cab12b authored by hongguangwu's avatar hongguangwu

MVP1.5.3-收入月份

parent f1258d6b
......@@ -130,4 +130,13 @@ public class TConfigSalary extends BaseEntity implements Serializable {
@ExcelProperty(value="发放方式(0:现金;1:转账)")
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 {
@Schema(description = "是否差额单")
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,
// return R.ok(saList)
//薪资导入
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)) {
return this.saveLaborSubmit(saList, dept, salaryType, orderId);
return this.saveLaborSubmit(configSalary, saList, dept, salaryType, orderId);
}
} else {
return R.failed("导入数据不可为空");
......@@ -253,8 +253,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/9/26 9:44
* @return: com.yifu.cloud.v1.hrms.api.entity.TSalaryStandard
**/
public R<TSalaryStandard> saveNewTSalary(TSalaryAccountVo sav, TSettleDomainSelectVo dept, YifuUser user
, LocalDateTime nowTime, String invoiceTitle) {
public R<TSalaryStandard> saveNewTSalary(TConfigSalary configSalary, TSalaryAccountVo sav, TSettleDomainSelectVo dept
, YifuUser user, LocalDateTime nowTime, String invoiceTitle) {
TSalaryStandard s = null;
if (sav != null) {
if (null == user || null == user.getId()) {
......@@ -293,6 +293,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//s.setSettlementAmount()
s.setStatus(SalaryConstants.AUDIT_STATUS[0]);
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);
}
......@@ -304,7 +309,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/9/20 17:05
* @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()) {
String orderId = vo.getOrderId();
// 代发户
......@@ -324,7 +329,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
LocalDateTime nowTime = LocalDateTime.now();
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) {
return sr;
} else {
......@@ -1428,7 +1433,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2022/8/16
* @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()) {
TSalaryAccountVo salaryAccountVo = savList.get(0);
List<TSalaryAccountItem> saiList = null; //报账明细List
......@@ -1437,7 +1442,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
LocalDateTime nowTime = LocalDateTime.now();
//工资主表
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) {
return sr;
......
......@@ -118,7 +118,7 @@ public class DoJointSalaryAsyncTask {
private R<String> getIncomeDetailMap(TSalaryStandard tSalaryStandard, TSettleDomainSelectVo dept, List<String> idCardList, Map<String, Integer> detailMap) {
TIncomeDetail detail = new TIncomeDetail();
detail.setApplyNo(tSalaryStandard.getApplyNo());
detail.setPayMonth(tSalaryStandard.getSalaryMonth());
detail.setPayMonth(tSalaryStandard.getIncomeMonth());
detail.setIdCardList(idCardList);
detail.setDeptId(dept.getId());
R<TIncomeDetailReturnVo> detailR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
......@@ -175,14 +175,14 @@ public class DoJointSalaryAsyncTask {
if (Common.isEmpty(value) || value == 0) {
detail = new TIncomeDetail();
detail.setRedisKey(redisKey);
detail.setPayMonth(account.getSalaryMonth());
detail.setPayMonth(tSalaryStandard.getIncomeMonth());
detail.setDeptId(account.getDeptId());
detail.setDeptName(account.getDeptName());
detail.setDeptNo(account.getDeptNo());
detail.setUnitId(tSalaryStandard.getUnitId());
detail.setUnitName(tSalaryStandard.getUnitName());
detail.setUnitNo(tSalaryStandard.getUnitNo());
detail.setCreateMonth(account.getSalaryMonth());
detail.setCreateMonth(tSalaryStandard.getSettlementMonth());
detail.setEmpIdcard(account.getEmpIdcard());
detail.setEmpName(account.getEmpName());
detail.setFeeMode(dept.getManagementType());
......
......@@ -80,6 +80,7 @@
<result property="incomeEndTime" column="INCOME_END_TIME"/>
<result property="issueStatus" column="ISSUE_STATUS"/>
<result property="isDiff" column="IS_DIFF"/>
<result property="incomeMonth" column="INCOME_MONTH"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -137,7 +138,8 @@
a.INCOME_START_TIME,
a.INCOME_END_TIME,
a.ISSUE_STATUS,
a.IS_DIFF
a.IS_DIFF,
a.INCOME_MONTH
</sql>
<sql id="tSalaryStandard_where">
<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