Commit efb7ae12 authored by huyuchen's avatar huyuchen

huyc 项目档案代码提交

parent e1d46a44
...@@ -32,9 +32,9 @@ import lombok.EqualsAndHashCode; ...@@ -32,9 +32,9 @@ import lombok.EqualsAndHashCode;
*/ */
@Data @Data
@TableName("fdd_contract_template_file") @TableName("fdd_contract_template_file")
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode()
@Schema(description = "法大大员工合同模板文件表") @Schema(description = "法大大员工合同模板文件表")
public class FddContractTemplateFile extends BaseEntity { public class FddContractTemplateFile {
/** /**
* 主键 * 主键
......
...@@ -173,6 +173,19 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -173,6 +173,19 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
public R updateProject(TEmployeeProject tEmployeeProject) { public R updateProject(TEmployeeProject tEmployeeProject) {
TEmployeeProject compareProject = this.getById(tEmployeeProject.getId()); TEmployeeProject compareProject = this.getById(tEmployeeProject.getId());
boolean flag = this.updateById(tEmployeeProject); boolean flag = this.updateById(tEmployeeProject);
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, tEmployeeProject.getEmpIdcard())
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(tEmployeeInfo)) {
TEmployeeInfo tEmployeeInfoCompare = tEmployeeInfoMapper.selectById(tEmployeeInfo.getId());
if (CommonConstants.ZERO_STRING.equals(tEmployeeInfo.getEmpNatrue())) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (CommonConstants.ONE_STRING.equals(tEmployeeInfo.getEmpNatrue()) && !CommonConstants.ZERO_STRING.equals(tEmployeeInfo.getEmpNatrue())) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
}
tEmployeeInfoMapper.updateById(tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], tEmployeeInfoCompare.getId(), "", tEmployeeInfoCompare, tEmployeeInfo);
}
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1],"",tEmployeeProject.getId(),compareProject,tEmployeeProject); tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1],"",tEmployeeProject.getId(),compareProject,tEmployeeProject);
return R.ok(flag); return R.ok(flag);
} }
...@@ -215,27 +228,28 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -215,27 +228,28 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Override @Override
public R deleteEmpPro(TEmployeeProject tEmployeeProject) { public R deleteEmpPro(TEmployeeProject tEmployeeProject) {
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId()); Long count = this.count(Wrappers.<TEmployeeProject>query().lambda()
TEmployeeProject tEmployeeProjectOld = this.getById(tEmployeeProject.getId()); .eq(TEmployeeProject::getId,tEmployeeProject.getId())
if (Common.isNotNull(tEmployeeProject)) { .eq(TEmployeeProject::getInsuranceStatus,CommonConstants.dingleDigitIntArray[0])
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId()); .eq(TEmployeeProject::getSocialStatus,CommonConstants.dingleDigitIntArray[0])
if (tEmployeeProject.getIsLeaveEmployee()== CommonConstants.dingleDigitIntArray[1]) { .eq(TEmployeeProject::getFundStatus,CommonConstants.dingleDigitIntArray[0]));
Long count = this.count(Wrappers.<TEmployeeProject>query().lambda() if (count == CommonConstants.ONE_INT) {
.eq(TEmployeeProject::getEmpId,tEmployeeProject.getEmpId()) TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId());
.eq(TEmployeeProject::getProjectStatus,CommonConstants.dingleDigitIntArray[0])); TEmployeeProject tEmployeeProjectOld = this.getById(tEmployeeProject.getId());
if (count.compareTo(CommonConstants.DEPT_TREE_ROOT_ID) >0) { if (Common.isNotNull(tEmployeeProject)) {
return R.failed("人员在该项目下存在进行中/未完结的服务"); TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId());
if (tEmployeeProject.getIsLeaveEmployee() == CommonConstants.dingleDigitIntArray[1]) {
tEmployeeInfo.setFileStatus(CommonConstants.dingleDigitIntArray[1]);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
} }
tEmployeeInfo.setFileStatus(CommonConstants.dingleDigitIntArray[1]); tEmployeeProject.setProjectStatus(CommonConstants.dingleDigitIntArray[1]);
tEmployeeInfoMapper.updateById(tEmployeeInfo); this.updateById(tEmployeeProject);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(), "", tEmployeeProjectOld, tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProject.getId(), tEmployeeInfoOld, tEmployeeProject);
return R.ok();
} }
tEmployeeProject.setProjectStatus(CommonConstants.dingleDigitIntArray[1]);
this.updateById(tEmployeeProject);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],tEmployeeInfo.getId(),"",tEmployeeProjectOld,tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1],"",tEmployeeProject.getId(),tEmployeeInfoOld,tEmployeeProject);
return R.ok();
} }
return R.failed("传参为空!"); return R.failed("人员在该项目下存在进行中/未完结的服务");
} }
@Override @Override
......
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