Commit cc42e328 authored by fangxinjiang's avatar fangxinjiang

项目划转同步修改合同

parent f4ed2a28
......@@ -397,4 +397,7 @@ public class TEmployeeProject extends BaseEntity {
@TableField(exist = false)
private String odlDeptId;
@TableField(exist = false)
private String oldDeptNo;
}
......@@ -105,4 +105,6 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
, @Param("settleDomainIds") List<String> settleDomainIds, @Param("alertMonth")Integer alertMonth);
List<EmpContractBusinessPageVo> getOtherContractBusinessInfo(@Param("empId")String empId, @Param("contractId")String contractId);
void updateContractChange(@Param("idCard")String empIdcard, @Param("deptNo")String deptNo, @Param("oldDeptNo")String odlDeptNo);
}
......@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService;
......@@ -64,6 +65,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
private final TEmployeeLogServiceImpl tEmployeeLogService;
private final TEmployeeContractInfoMapper contractInfoMapper;
@Autowired
private final SocialDaprUtils socialDaprUtils;
......@@ -117,6 +120,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", updateTEmployeeProject.getId(), tEmployeeProjectOld, updateTEmployeeProject);
updateTEmployeeProject.setOdlDeptId(tEmployeeProjectOld.getDeptId());
updateTEmployeeProject.setOldDeptNo(tEmpChangeInfo.getDeptNo());
tEmployeeProjectService.updateById(updateTEmployeeProject);
tEmpChangeInfo.setProId(updateTEmployeeProject.getId());
......@@ -141,6 +145,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateSocialFoundVo.setFlag(CommonConstants.ONE_STRING);
socialDaprUtils.updateSocialAndFoundInfo(updateSocialFoundVo);
}
// 合同同步划转---只划转在用合同 fxj 2023-03-06
contractInfoMapper.updateContractChange(updateTEmployeeProject.getEmpIdcard(),updateTEmployeeProject.getDeptNo(),updateTEmployeeProject.getOldDeptNo());
}
//保存档案划转记录
......@@ -235,6 +241,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", updateTEmployeePro.getId(), tEmployeeProjectOld, updateTEmployeePro);
updateTEmployeePro.setOdlDeptId(tEmployeeProjectOld.getDeptId());
updateTEmployeePro.setOldDeptNo(tEmployeeProjectOld.getDeptNo());
updateList.add(updateTEmployeePro);
}
} else {
......@@ -272,6 +279,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateSocialFoundVo.setFlag(CommonConstants.ONE_STRING);
socialDaprUtils.updateSocialAndFoundInfo(updateSocialFoundVo);
}
// 合同同步划转---只划转在用合同 fxj 2023-03-06
contractInfoMapper.updateContractChange(tEmployeeProject.getEmpIdcard(),tEmployeeProject.getDeptNo(),tEmployeeProject.getOldDeptNo());
}
}
return R.ok();
......
......@@ -779,5 +779,10 @@
</if>
ORDER BY a.CREATE_TIME DESC
</select>
<!-- 根据员工ID更新合同在用状态 -->
<update id="updateContractChange">
update t_employee_contract_info a,t_settle_domain b
set a.DEPT_NO=b.DEPART_NO,a.SETTLE_DOMAIN=b.id,a.UNIT_NO=b.CUSTOMER_NO,a.CUSTOMER_ID=b.CUSTOMER_ID
where a.EMP_IDCARD = #{idCard} and a.DEPT_NO = #{oldDeptNo} and a.IN_USE='0' and b.DEPART_NO= #{deptNo} and b.DELETE_FLAG='0';
</update>
</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