Commit dae132cc by qwmqiuwenmin

fix

parent ef0d3c52
......@@ -607,6 +607,12 @@ public class StaffApiServiceImpl implements StaffApiService {
if(hr.getErrorCode() == 1){
StaffDepartmentRelatedDTO staffRelated = this.getDepartmentIdAndStaffId(departmentId, hr.getResult().toString());
StaffDepartmentRelatedDTO isCodeExist = this.getDepartmentIdAndCode(departmentId,code);
//如果这个code已经绑定了 先解绑
if(isCodeExist != null){
isCodeExist.setClerkCode(null);
staffDepartmentRelatedMapper.updateByPrimaryKey(EntityUtil.changeEntityByJSON(TabHaobanStaffDepartmentRelated.class, isCodeExist));
}
//绑定
if(staffRelated != null && isCodeExist == null){
staffRelated.setClerkCode(code);
staffDepartmentRelatedMapper.updateByPrimaryKey(EntityUtil.changeEntityByJSON(TabHaobanStaffDepartmentRelated.class, staffRelated));
......
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