Commit f191f456 by qwmqiuwenmin

fix

parent 43e56a6e
......@@ -552,12 +552,19 @@ public class StaffApiServiceImpl implements StaffApiService {
}
//修改
}else{
staff.setStaffName(staffName);
List<StaffDepartmentRelatedDTO> relatedList = this.listStaffDepartmentByStaffId(staffId);
String departmentIds = departmentId;
Map<String,StaffDepartmentRelatedDTO> map = com.gic.commons.util.CollectionUtil.toMap(relatedList, "departmentId");
String departmentIds = "";
if(map.get(departmentId) == null){
departmentIds = departmentId;
}
for (StaffDepartmentRelatedDTO staffDepartmentRelatedDTO : relatedList) {
departmentIds += "," + staffDepartmentRelatedDTO.getDepartmentId();
}
Map<String,StaffDepartmentRelatedDTO> map = com.gic.commons.util.CollectionUtil.toMap(relatedList, "departmentId");
if(departmentIds.startsWith(",")){
departmentIds = departmentIds.substring(1,departmentIds.length());
}
if(map.get(departmentId) == null){
this.staffEdit(staff, departmentIds);
}
......@@ -567,6 +574,7 @@ public class StaffApiServiceImpl implements StaffApiService {
staffRelated.setClerkCode(code);
staffDepartmentRelatedMapper.updateByPrimaryKey(EntityUtil.changeEntityByJSON(TabHaobanStaffDepartmentRelated.class, staffRelated));
}
this.staffEdit(staff, departmentIds);
}
}
......
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