Commit 2c9f40c7 by 墨竹

fix:查询区经列表修改

parent a22bdb27
...@@ -1040,7 +1040,7 @@ public class ClerkController extends WebBaseController { ...@@ -1040,7 +1040,7 @@ public class ClerkController extends WebBaseController {
* @return * @return
*/ */
@RequestMapping("clerk-manage-list") @RequestMapping("clerk-manage-list")
public RestResponse<List<BindClerkVO>> clerkManageList(String enterpriseId) { public RestResponse clerkManageList(String enterpriseId) {
List<ClerkDTO> list = clerkService.listClerkEnableHaoban(Collections.singletonList(enterpriseId), null); List<ClerkDTO> list = clerkService.listClerkEnableHaoban(Collections.singletonList(enterpriseId), null);
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
return RestResponse.failure(Convert.toStr(HaoBanErrCode.ERR_10016.getCode()), HaoBanErrCode.ERR_10016.getMsg()); return RestResponse.failure(Convert.toStr(HaoBanErrCode.ERR_10016.getCode()), HaoBanErrCode.ERR_10016.getMsg());
...@@ -1049,6 +1049,7 @@ public class ClerkController extends WebBaseController { ...@@ -1049,6 +1049,7 @@ public class ClerkController extends WebBaseController {
List<StaffClerkRelationDTO> bindRelationList = staffClerkRelationApiService.listBindCode(enterpriseId, clerkCodeList); List<StaffClerkRelationDTO> bindRelationList = staffClerkRelationApiService.listBindCode(enterpriseId, clerkCodeList);
Map<String, StaffClerkRelationDTO> bindCodeMap = bindRelationList.stream().collect(Collectors.toMap(StaffClerkRelationDTO::getClerkCode, s -> s)); Map<String, StaffClerkRelationDTO> bindCodeMap = bindRelationList.stream().collect(Collectors.toMap(StaffClerkRelationDTO::getClerkCode, s -> s));
List<BindClerkVO> bindList = new ArrayList<>(); List<BindClerkVO> bindList = new ArrayList<>();
List<BindClerkVO> unBindList = new ArrayList<>();
for (ClerkDTO dto : list) { for (ClerkDTO dto : list) {
BindClerkVO vo = EntityUtil.changeEntityByJSON(BindClerkVO.class, dto); BindClerkVO vo = EntityUtil.changeEntityByJSON(BindClerkVO.class, dto);
if (bindCodeMap.containsKey(dto.getClerkCode())) { if (bindCodeMap.containsKey(dto.getClerkCode())) {
...@@ -1059,9 +1060,14 @@ public class ClerkController extends WebBaseController { ...@@ -1059,9 +1060,14 @@ public class ClerkController extends WebBaseController {
vo.setPhoneNumber(dto.getPhoneNumber()); vo.setPhoneNumber(dto.getPhoneNumber());
vo.setStaffName(staffDTO == null ? "" : staffDTO.getStaffName()); vo.setStaffName(staffDTO == null ? "" : staffDTO.getStaffName());
bindList.add(vo); bindList.add(vo);
} else {
unBindList.add(vo);
} }
} }
return RestResponse.successResult(bindList); Map<String, Object> map = new HashMap<>();
map.put("bindList", bindList);
map.put("unBindList", unBindList);
return RestResponse.successResult(map);
} }
/** /**
......
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