Commit fbb4abc5 by qwmqiuwenmin

fix

parent 987438fe
......@@ -696,10 +696,12 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}else{
String staffId = staff.getStaffId();
logger.info("【员工修改】staff={}",JSON.toJSONString(staff));
//删除
if(status == 0){
StaffDepartmentRelatedDTO staffRelated = this.getDepartmentIdAndStaffId(departmentId, staffId);
if(staffRelated != null){
staffRelated.setUpdateTime(new Date());
staffRelated.setClerkCode(null);
staffDepartmentRelatedMapper.updateByPrimaryKey(EntityUtil.changeEntityByJSON(TabHaobanStaffDepartmentRelated.class, staffRelated));
}
......@@ -729,11 +731,13 @@ public class StaffApiServiceImpl implements StaffApiService {
StaffDepartmentRelatedDTO isCodeExist = this.getDepartmentIdAndCode(departmentId,code);
//如果这个人已经绑定了 先解绑
if(isCodeExist != null){
staffRelated.setUpdateTime(new Date());
isCodeExist.setClerkCode(null);
staffDepartmentRelatedMapper.updateByPrimaryKey(EntityUtil.changeEntityByJSON(TabHaobanStaffDepartmentRelated.class, isCodeExist));
}
//如果这个人是未绑定的 则绑定clerk
if(staffRelated != null){
staffRelated.setUpdateTime(new Date());
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