21 changed files with 398 additions and 19 deletions
@ -0,0 +1,34 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Auther zxc |
||||
|
* @Create 2020-04-23 10:38 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class StaffGridListDTO { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 用户id |
||||
|
*/ |
||||
|
private String staffId; |
||||
|
|
||||
|
/** |
||||
|
* 用户姓名 |
||||
|
*/ |
||||
|
private String staffName; |
||||
|
|
||||
|
/** |
||||
|
* 用户头像 |
||||
|
*/ |
||||
|
private String staffHeadPhoto; |
||||
|
|
||||
|
/** |
||||
|
* 角色名称 |
||||
|
*/ |
||||
|
private String roleName; |
||||
|
|
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.epmet.dto.StaffGridListDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Auther zxc |
||||
|
* @Create 2020-04-23 10:28 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GridDetailResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -1L; |
||||
|
|
||||
|
/** |
||||
|
* 网格id |
||||
|
*/ |
||||
|
private String grid; |
||||
|
|
||||
|
/** |
||||
|
* 网格名称 |
||||
|
*/ |
||||
|
private String gridName; |
||||
|
|
||||
|
/** |
||||
|
* 中心位置经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 中心位置维度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 所属地区码(所属组织地区码) |
||||
|
*/ |
||||
|
private String areaCode; |
||||
|
|
||||
|
/** |
||||
|
* 管辖区域 |
||||
|
*/ |
||||
|
private String manageDistrict; |
||||
|
|
||||
|
/** |
||||
|
* 当前网格总人数 |
||||
|
*/ |
||||
|
private Integer totalUser; |
||||
|
|
||||
|
/** |
||||
|
* 所属组织机构ID(customer_agencys.id) |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 所有上级组织ID |
||||
|
*/ |
||||
|
private String pIds; |
||||
|
|
||||
|
/** |
||||
|
* 网格用户信息集合 |
||||
|
*/ |
||||
|
private List<StaffGridListDTO> staffGridList; |
||||
|
|
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.form.CustomerGridFormDTO; |
||||
|
import com.epmet.dto.result.GridDetailResultDTO; |
||||
|
import com.epmet.service.CustomerGridService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @Auther zxc |
||||
|
* @Create 2020-04-23 9:50 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("grid") |
||||
|
public class GridController { |
||||
|
|
||||
|
@Autowired |
||||
|
private CustomerGridService customerGridService; |
||||
|
|
||||
|
@PostMapping("griddetail") |
||||
|
public Result<GridDetailResultDTO> griddetail(@RequestBody CustomerGridFormDTO customerGridFormDTO){ |
||||
|
Result<GridDetailResultDTO> griddetail = customerGridService.griddetail(customerGridFormDTO); |
||||
|
return griddetail; |
||||
|
} |
||||
|
|
||||
|
/*@PostMapping("addgrid") |
||||
|
|
||||
|
@PostMapping("editgrid") |
||||
|
|
||||
|
@PostMapping("deletegrid")*/ |
||||
|
|
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.epmet.feign.fallback; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.ServiceConstant; |
||||
|
import com.epmet.commons.tools.utils.ModuleUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.CustomerStaffGridDTO; |
||||
|
import com.epmet.dto.StaffGridListDTO; |
||||
|
import com.epmet.feign.EpmetUserFeignClient; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Auther zxc |
||||
|
* @Create 2020-04-23 14:10 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class EpmetUserFeignClientFallBack implements EpmetUserFeignClient { |
||||
|
@Override |
||||
|
public Result<List<StaffGridListDTO>> getStaffGridList(List<CustomerStaffGridDTO> customerStaffGridDTOS) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffGridList", customerStaffGridDTOS); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue