Commit 9db30670 by qwmqiuwenmin

fix

parent e80a2dba
......@@ -23,6 +23,8 @@ import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.dto.StoreGroupDTO;
import com.gic.enterprise.api.service.StoreGroupService;
import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.HaobanResponse;
......@@ -77,6 +79,8 @@ public class StaffApiServiceImpl implements StaffApiService {
private com.gic.enterprise.api.service.DepartmentService gicDepartmentService;
@Autowired
private StoreService storeService;
@Autowired
private StoreGroupService storeGroupService;
@Override
public StaffDTO selectById(String staffId) {
......@@ -339,16 +343,25 @@ public class StaffApiServiceImpl implements StaffApiService {
String enterpriseId = "";
if(department.getIsStore() == 0){
com.gic.enterprise.api.dto.DepartmentDTO dto = gicDepartmentService.getDeptment(department.getRelatedId());
enterpriseId = dto.getEnterpriseId();
if(dto == null){
StoreGroupDTO group = storeGroupService.getStoreGroupById(department.getRelatedId());
if(group != null){
enterpriseId = group.getEnterpriseId();
}
}else{
enterpriseId = dto.getEnterpriseId();
}
}else{
StoreDTO store = storeService.getStore(department.getRelatedId());
enterpriseId = store.getEnterpriseId();
}
ClerkDTO clerkDTO= clerkService.getClerkByCodeNoStatus(enterpriseId,related.getClerkCode());
logger.info("【员工修改】clerkDTO={}",JSON.toJSONString(clerkDTO));
clerkDTO.setClerkName(staffDTO.getStaffName());
clerkDTO.setPhoneNumber(staffDTO.getPhoneNumber());
clerkService.updateClerk(clerkDTO);
if(clerkDTO != null){
logger.info("【员工修改】clerkDTO={}",JSON.toJSONString(clerkDTO));
clerkDTO.setClerkName(staffDTO.getStaffName());
clerkDTO.setPhoneNumber(staffDTO.getPhoneNumber());
clerkService.updateClerk(clerkDTO);
}
}
}
......
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