Commit abd5964e authored by fangxinjiang's avatar fangxinjiang

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

parents b86731a9 dc32d486
......@@ -115,7 +115,6 @@ public class TEmployeeContractInfo extends BaseEntity {
@ExcelAttribute(name = "合同到期时间", needExport = true)
@Schema(description = "合同到期时间", name = "contractEnd")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
@TableField(value = "contract_end", updateStrategy = FieldStrategy.IGNORED)
private Date contractEnd;
/**
* 项目名称
......
......@@ -109,4 +109,6 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
void updateContractChange(@Param("idCard")String empIdcard, @Param("deptNo")String deptNo, @Param("oldDeptNo")String odlDeptNo);
String getContractByEmpIdCardAndDeptId(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
void updateContractEnd( @Param("tEmployeeContractInfo")TEmployeeContractInfo tEmployeeContractInfo);
}
......@@ -339,10 +339,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
if (CommonConstants.TWO_STRING.equals(tEmployeeContractInfo.getContractType())
|| CommonConstants.ZERO_STRING.equals(tEmployeeContractInfo.getContractType())) {
tEmployeeContractInfo.setContractEnd(null);
}
return this.saveContractAndAtta(tEmployeeContractInfo, user);
} catch (Exception e) {
log.error("员工合同保存异常:" + e.getMessage());
......@@ -450,10 +447,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (Common.isNotNull(tEmployeeContractInfo.getAttaList())) {
tEmployeeContractInfo.setIsFile(CommonConstants.ZERO_STRING);
}
if (CommonConstants.TWO_STRING.equals(tEmployeeContractInfo.getContractType())
|| CommonConstants.ZERO_STRING.equals(tEmployeeContractInfo.getContractType())) {
tEmployeeContractInfo.setContractEnd(null);
}
if (null != tEmployeeContractInfo.getSettleDomain()
&& (Common.isEmpty(tEmployeeContractInfo.getSubjectUnit())
|| Common.isEmpty(tEmployeeContractInfo.getSubjectDepart()))) {
......@@ -489,8 +482,13 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
this.updateFileMainId(tEmployeeContractInfo);
}
} else {
baseMapper.updateById(tEmployeeContractInfo);
if (CommonConstants.TWO_STRING.equals(tEmployeeContractInfo.getContractType())
|| CommonConstants.ZERO_STRING.equals(tEmployeeContractInfo.getContractType())) {
tEmployeeContractInfo.setContractEnd(null);
baseMapper.updateContractEnd(tEmployeeContractInfo);
}
}
// 不是待提交,记录审核记录
this.setAuditInfo(tEmployeeContractInfo);
......@@ -500,6 +498,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.TWO_INT) {
this.updateEmployeeContractStatus(tEmployeeContractInfo);
}
if (CommonConstants.TWO_STRING.equals(tEmployeeContractInfo.getContractType())
|| CommonConstants.ZERO_STRING.equals(tEmployeeContractInfo.getContractType())) {
tEmployeeContractInfo.setContractEnd(null);
baseMapper.updateContractEnd(tEmployeeContractInfo);
}
return R.ok(null, CommonConstants.SAVE_SUCCESS);
}
......
......@@ -806,6 +806,11 @@
where a.EMP_IDCARD = #{idCard} and a.DEPT_NO = #{oldDeptNo} and b.DEPART_NO= #{deptNo} and b.DELETE_FLAG='0';
</update>
<update id="updateContractEnd">
update t_employee_contract_info a
set a.CONTRACT_END=#{tEmployeeContractInfo.contractEnd}
where a.ID=#{tEmployeeContractInfo.id}
</update>
<select id="getContractByEmpIdCardAndDeptId" resultType="java.lang.String">
select
e.CONTRACT_START
......
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