Commit 63953ddd authored by zhenbin wang's avatar zhenbin wang

feature-wzb:bug修复

parent 10ff5f86
...@@ -115,6 +115,7 @@ public class TEmployeeContractInfo extends BaseEntity { ...@@ -115,6 +115,7 @@ public class TEmployeeContractInfo extends BaseEntity {
@ExcelAttribute(name = "合同到期时间", needExport = true) @ExcelAttribute(name = "合同到期时间", needExport = true)
@Schema(description = "合同到期时间", name = "contractEnd") @Schema(description = "合同到期时间", name = "contractEnd")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00") @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; private Date contractEnd;
/** /**
* 项目名称 * 项目名称
......
...@@ -296,10 +296,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -296,10 +296,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 初始化 // 初始化
tEmployeeContractInfo.setUpdateBy(user.getId()); tEmployeeContractInfo.setUpdateBy(user.getId());
tEmployeeContractInfo.setUpdateTime(LocalDateTime.now()); tEmployeeContractInfo.setUpdateTime(LocalDateTime.now());
if (CommonConstants.TWO_STRING.equals(tEmployeeContractInfo.getContractType())
|| CommonConstants.ZERO_STRING.equals(tEmployeeContractInfo.getContractType())) {
tEmployeeContractInfo.setContractEnd(null);
}
//是否归档:否 //是否归档:否
tEmployeeContractInfo.setIsFile(CommonConstants.ONE_STRING); tEmployeeContractInfo.setIsFile(CommonConstants.ONE_STRING);
//是否在用:否 //是否在用:否
...@@ -342,6 +339,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -342,6 +339,10 @@ 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); return this.saveContractAndAtta(tEmployeeContractInfo, user);
} catch (Exception e) { } catch (Exception e) {
log.error("员工合同保存异常:" + e.getMessage()); log.error("员工合同保存异常:" + e.getMessage());
...@@ -449,6 +450,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -449,6 +450,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (Common.isNotNull(tEmployeeContractInfo.getAttaList())) { if (Common.isNotNull(tEmployeeContractInfo.getAttaList())) {
tEmployeeContractInfo.setIsFile(CommonConstants.ZERO_STRING); 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() if (null != tEmployeeContractInfo.getSettleDomain()
&& (Common.isEmpty(tEmployeeContractInfo.getSubjectUnit()) && (Common.isEmpty(tEmployeeContractInfo.getSubjectUnit())
|| Common.isEmpty(tEmployeeContractInfo.getSubjectDepart()))) { || Common.isEmpty(tEmployeeContractInfo.getSubjectDepart()))) {
...@@ -472,7 +477,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -472,7 +477,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 标准合同、劳动派遣合同、其他。————社保公积金都派减,自动审核通过 // 标准合同、劳动派遣合同、其他。————社保公积金都派减,自动审核通过
this.judgeAuditStatus(tEmployeeContractInfo, user); this.judgeAuditStatus(tEmployeeContractInfo, user);
if (Common.isEmpty(tEmployeeContractInfo.getId())) { if (Common.isEmpty(tEmployeeContractInfo.getId())) {
// 针对编码再做一次重复性校验 // 针对编码再做一次重复性校验
String isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo()); String isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo());
...@@ -485,12 +489,14 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -485,12 +489,14 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
this.updateFileMainId(tEmployeeContractInfo); this.updateFileMainId(tEmployeeContractInfo);
} }
} else { } else {
baseMapper.updateById(tEmployeeContractInfo); baseMapper.updateById(tEmployeeContractInfo);
} }
// 不是待提交,记录审核记录 // 不是待提交,记录审核记录
this.setAuditInfo(tEmployeeContractInfo); this.setAuditInfo(tEmployeeContractInfo);
// 更新档案合同状态 // 更新档案合同状态
if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.TWO_INT) { if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.TWO_INT) {
this.updateEmployeeContractStatus(tEmployeeContractInfo); this.updateEmployeeContractStatus(tEmployeeContractInfo);
} }
...@@ -1138,7 +1144,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1138,7 +1144,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
} }
if (!EmployeeConstants.SITUATION_SEVEN.equals(insert.getSituation()) && !EmployeeConstants.SITUATION_SIX.equals(insert.getSituation())) { if (!EmployeeConstants.SITUATION_SEVEN.equals(insert.getSituation()) && !EmployeeConstants.SITUATION_SIX.equals(insert.getSituation())) {
if (CommonConstants.TWO_STRING.equals(insert.getContractType()) || CommonConstants.ZERO_STRING.equals(insert.getContractType())) { if (CommonConstants.CONTRACT_TYPE_TWO.equals(insert.getContractType()) || CommonConstants.CONTRACT_TYPE_ZERO.equals(insert.getContractType())) {
TEmployeeContractInfo contractInfo = this.getOne(Wrappers.<TEmployeeContractInfo>query().lambda() TEmployeeContractInfo contractInfo = this.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, insert.getEmpIdcard()) .eq(TEmployeeContractInfo::getEmpIdcard, insert.getEmpIdcard())
.eq(TEmployeeContractInfo::getContractStart, insert.getContractStart()) .eq(TEmployeeContractInfo::getContractStart, insert.getContractStart())
......
...@@ -579,4 +579,8 @@ public interface CommonConstants { ...@@ -579,4 +579,8 @@ public interface CommonConstants {
String START = "启用"; String START = "启用";
String STOP = "停用"; String STOP = "停用";
String CONTRACT_TYPE_TWO="无固定期限";
String CONTRACT_TYPE_ZERO="已完成一定工作任务为期限";
} }
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