Commit e052cc84 authored by hongguangwu's avatar hongguangwu

合同优化-归档

parent ab1ac225
......@@ -316,6 +316,27 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
baseMapper.insert(tEmployeeContractInfo);
if (Common.isNotNull(tEmployeeContractInfo.getAttaList()) && Common.isNotNull(tEmployeeContractInfo.getId())) {
this.updateFileMainId(tEmployeeContractInfo);
}
} else {
baseMapper.updateById(tEmployeeContractInfo);
}
// 不是待提交,记录审核记录
this.setAuditInfo(tEmployeeContractInfo);
// 更新档案合同状态
this.updateEmployeeContractStatus(tEmployeeContractInfo.getEmpId());
return R.ok(null, CommonConstants.SAVE_SUCCESS);
}
/**
* @param tEmployeeContractInfo
* @Description: 更新附件的合同id
* @Author: hgw
* @Date: 2022/7/20 10:07
* @return: void
**/
private void updateFileMainId(TEmployeeContractInfo tEmployeeContractInfo) {
List<String> attaList = tEmployeeContractInfo.getAttaList();
if (null != attaList && !attaList.isEmpty()) {
TAttaInfo contractAtta;
......@@ -328,16 +349,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
}
} else {
baseMapper.updateById(tEmployeeContractInfo);
}
// 不是待提交,记录审核记录
this.setAuditInfo(tEmployeeContractInfo);
// 更新档案合同状态
this.updateEmployeeContractStatus(tEmployeeContractInfo.getEmpId());
return R.ok(null, CommonConstants.SAVE_SUCCESS);
}
/**
* @param tEmployeeContractInfo
......@@ -498,6 +509,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
//档案柜存在就自动归档
if (Common.isNotNull(tEmployeeContractInfo.getAttaList())) {
this.updateFileMainId(tEmployeeContractInfo);
this.setFileInfo(tEmployeeContractInfo.getId(), "添加附件");
tEmployeeContractInfo.setIsFile(CommonConstants.ZERO_STRING);
} else {
......
......@@ -16,6 +16,7 @@
package com.yifu.cloud.plus.v1.yifu.common.core.constant;
import java.math.BigDecimal;
import java.util.List;
import java.util.Set;
......@@ -130,6 +131,8 @@ public interface CommonConstants {
* number 0
*/
int ZERO_INT = 0;
int ONE_INT = 1;
int TWO_INT = 2;
/**
* number 1
......@@ -359,4 +362,11 @@ public interface CommonConstants {
public static final int SIXTEEN_INT = 16;
public static final String FIFTEEN = "15";
public static final String NINETEEN = "19";
//百分之一 1/100
public static final BigDecimal ONE_OF_PERCENT = new BigDecimal("0.01");
// 1/2
public static final BigDecimal HALF_OF_ONE = new BigDecimal("0.5");
public static final BigDecimal TWO_BIG = new BigDecimal("2");
}
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