Commit 5cb705e2 authored by hongguangwu's avatar hongguangwu

审核、归档

parent 418be75f
......@@ -50,10 +50,10 @@ public class TEmployeeContractAudit extends BaseEntity {
private String remark;
/**
* 审核状态:2 审核通过;3审核不通过
* 审核状态:审核通过;审核不通过
*/
@Schema(description = "审核状态:2 审核通过;3审核不通过(0:待提交;1:待审核;)")
private Integer auditStatus;
@Schema(description = "审核状态:审核通过;审核不通过")
private String auditStatus;
/**
* 合同ID
......@@ -67,5 +67,8 @@ public class TEmployeeContractAudit extends BaseEntity {
@Schema(description = "类型:1合同")
private Integer linkType;
@Schema(description = "节点名称")
private String rootName;
}
......@@ -354,14 +354,40 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (Common.isNotNull(tEmployeeContractInfo.getAuditStatus())
&& CommonConstants.ZERO_INT != tEmployeeContractInfo.getAuditStatus()) {
TEmployeeContractAudit audit = new TEmployeeContractAudit();
audit.setAuditStatus(tEmployeeContractInfo.getAuditStatus());
if (CommonConstants.ONE_INT == tEmployeeContractInfo.getAuditStatus()) {
audit.setRootName("提交申请");
}
if (CommonConstants.dingleDigitIntArray[2] == tEmployeeContractInfo.getAuditStatus()) {
audit.setRootName("合同审核");
audit.setAuditStatus("审核通过");
audit.setRemark(tEmployeeContractInfo.getAuditRemark());
}
if (CommonConstants.dingleDigitIntArray[3] == tEmployeeContractInfo.getAuditStatus()) {
audit.setRootName("合同审核");
audit.setAuditStatus("审核不通过");
audit.setRemark(tEmployeeContractInfo.getAuditRemark());
}
audit.setLinkId(tEmployeeContractInfo.getId());
audit.setLinkType(CommonConstants.ONE_INT);
audit.setRemark(tEmployeeContractInfo.getAuditRemark());
tEmployeeContractAuditService.save(audit);
}
}
/**
* @Description: 合同归档记录
* @Author: hgw
* @Date: 2022/7/7 10:28
* @return: void
**/
private void setFileInfo(String id, String remark) {
TEmployeeContractAudit audit = new TEmployeeContractAudit();
audit.setRootName("合同归档");
audit.setLinkId(id);
audit.setLinkType(CommonConstants.ONE_INT);
audit.setRemark(remark);
tEmployeeContractAuditService.save(audit);
}
private void updateEmployeeContractStatus(String empId) {
//查看未作废合同数
TEmployeeInfo employeeInfo = tEmployeeInfoService.getById(empId);
......@@ -469,13 +495,15 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
return R.failed("合同编号、档案柜号必填!");
}
if (tEmployeeContractInfo.getContractNo().length() > 50
|| tEmployeeContractInfo.getContractNo().length() > 50) {
|| tEmployeeContractInfo.getFileCabinetNo().length() > 50) {
return R.failed("合同编号、档案柜号不可超过50字!");
}
//档案柜存在就自动归档
if (Common.isNotNull(tEmployeeContractInfo.getAttaList())) {
this.setFileInfo(tEmployeeContractInfo.getId(), "添加附件");
tEmployeeContractInfo.setIsFile(CommonConstants.ZERO_STRING);
} else {
this.setFileInfo(tEmployeeContractInfo.getId(), "清空附件");
tEmployeeContractInfo.setIsFile(CommonConstants.ONE_STRING);
}
this.updateById(tEmployeeContractInfo);
......
......@@ -34,5 +34,6 @@
<result property="auditStatus" column="AUDIT_STATUS"/>
<result property="linkId" column="LINK_ID"/>
<result property="linkType" column="LINK_TYPE"/>
<result property="rootName" column="ROOT_NAME"/>
</resultMap>
</mapper>
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