Browse Source

网格员数据上报

master
sunyuchao 3 years ago
parent
commit
9111106395
  1. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  2. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  3. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java
  5. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java
  6. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml
  7. 4
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java

@ -696,7 +696,7 @@ public interface GovOrgOpenFeignClient {
@PostMapping("/gov/org/coverage/dictinit/{customerId}") @PostMapping("/gov/org/coverage/dictinit/{customerId}")
Result dictInit(@PathVariable(value = "customerId") String customerId); Result dictInit(@PathVariable(value = "customerId") String customerId);
@PostMapping("/gov/org/customerstaffgrid/gridstaff") @PostMapping("/gov/org/customerstaffgrid/gridstafflist")
Result<List<CustomerGridStaffListResultDTO>> gridStaff(CustomerGridStaffListFormDTO dto); Result<List<CustomerGridStaffListResultDTO>> gridStaff(CustomerGridStaffListFormDTO dto);
} }

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java

@ -447,7 +447,7 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
@Override @Override
public Result<List<CustomerGridStaffListResultDTO>> gridStaff(CustomerGridStaffListFormDTO dto) { public Result<List<CustomerGridStaffListResultDTO>> gridStaff(CustomerGridStaffListFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "gridStaff", dto); return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "gridStaffList", dto);
} }
} }

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java

@ -161,8 +161,8 @@ public class CustomerStaffGridController {
* @Author sun * @Author sun
* @Description 网格下工作人员列表 * @Description 网格下工作人员列表
**/ **/
@PostMapping(value = "gridstaff") @PostMapping("gridstafflist")
public Result<List<CustomerGridStaffListResultDTO>> gridStaff(@RequestBody CustomerGridStaffListFormDTO formDTO) { public Result<List<CustomerGridStaffListResultDTO>> gridStaffList(@RequestBody CustomerGridStaffListFormDTO formDTO) {
return new Result<List<CustomerGridStaffListResultDTO>>().ok(customerStaffGridService.gridStaff(formDTO)); return new Result<List<CustomerGridStaffListResultDTO>>().ok(customerStaffGridService.gridStaffList(formDTO));
} }
} }

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java

@ -144,5 +144,5 @@ public interface CustomerStaffGridService extends BaseService<CustomerStaffGridE
*/ */
List<String> getAllStaffByGridId(String gridId); List<String> getAllStaffByGridId(String gridId);
List<CustomerGridStaffListResultDTO> gridStaff(CustomerGridStaffListFormDTO formDTO); List<CustomerGridStaffListResultDTO> gridStaffList(CustomerGridStaffListFormDTO formDTO);
} }

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java

@ -206,7 +206,8 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl<CustomerStaffG
} }
@Override @Override
public List<CustomerGridStaffListResultDTO> gridStaff(CustomerGridStaffListFormDTO formDTO) { public List<CustomerGridStaffListResultDTO> gridStaffList(CustomerGridStaffListFormDTO formDTO) {
//查询客户下未被禁用的工作人员基本信息
return baseDao.getGridStaffByCustomerId(formDTO.getCustomerId()); return baseDao.getGridStaffByCustomerId(formDTO.getCustomerId());
} }

2
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml

@ -205,7 +205,7 @@
a.user_id gridUserId a.user_id gridUserId
FROM FROM
customer_staff_grid a customer_staff_grid a
INNER JOIN customer_grid b ON a.grid_id = b.id AND b.del_flag = '0' INNER JOIN customer_grid b ON a.grid_id = b.id AND b.del_flag = '0' AND b.`code` is not null
WHERE WHERE
a.del_flag = '0' a.del_flag = '0'
AND a.customer_id = #{customerId} AND a.customer_id = #{customerId}

4
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java

@ -44,7 +44,7 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl<GridstaffIn
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void gridStaffInfo(GridStaffInfoFormDTO formDTO) { public void gridStaffInfo(GridStaffInfoFormDTO formDTO) {
//1.查询客户网格下工作人员 //1.查询客户网格下工作人员【存在网格code的网格下的工作人员】
CustomerGridStaffListFormDTO org = new CustomerGridStaffListFormDTO(); CustomerGridStaffListFormDTO org = new CustomerGridStaffListFormDTO();
org.setCustomerId(formDTO.getCustomerId()); org.setCustomerId(formDTO.getCustomerId());
Result<List<CustomerGridStaffListResultDTO>> orgList = govOrgOpenFeignClient.gridStaff(org); Result<List<CustomerGridStaffListResultDTO>> orgList = govOrgOpenFeignClient.gridStaff(org);
@ -53,7 +53,7 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl<GridstaffIn
} }
log.info(String.format("网格员数据同步,查询到网格下工作人员记录共%s条", orgList.getData().size())); log.info(String.format("网格员数据同步,查询到网格下工作人员记录共%s条", orgList.getData().size()));
//2.查询客户工作人员基础信息 //2.查询客户工作人员基础信息【客户下未被禁用的有效工作人员信息】
GridStaffUploadtFormDTO user = new GridStaffUploadtFormDTO(); GridStaffUploadtFormDTO user = new GridStaffUploadtFormDTO();
user.setCustomerId(formDTO.getCustomerId()); user.setCustomerId(formDTO.getCustomerId());
Result<List<GridStaffUploadResultDTO>> userList = epmetUserOpenFeignClient.customerStaff(user); Result<List<GridStaffUploadResultDTO>> userList = epmetUserOpenFeignClient.customerStaff(user);

Loading…
Cancel
Save