Browse Source

方法模板

dev_shibei_match
sunyuchao 4 years ago
parent
commit
e7c347d1f3
  1. 29
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/AgencyBaseInfoFormDTO.java
  2. 29
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/GridBaseInfoFormDTO.java
  3. 29
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/StaffBaseInfoFormDTO.java
  4. 60
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DataReportingController.java
  5. 35
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/DataReportingService.java
  6. 60
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java

29
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/AgencyBaseInfoFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.org;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @dscription 插叙客户网格基础信息--接口入参
* @author sun
*/
@Data
public class AgencyBaseInfoFormDTO implements Serializable {
private static final long serialVersionUID = -3634745091993094743L;
/**
* 客户Id
*/
@NotBlank(message = "事件标识不能为空", groups = {Agency.class})
private String customerId = "";
/**
* 组织Id
*/
private List<String> agencyIdList;
public interface Agency extends CustomerClientShowGroup {}
}

29
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/GridBaseInfoFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.org;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @dscription 插叙客户网格基础信息--接口入参
* @author sun
*/
@Data
public class GridBaseInfoFormDTO implements Serializable {
private static final long serialVersionUID = -3634745091993094743L;
/**
* 客户Id
*/
@NotBlank(message = "事件标识不能为空", groups = {Grid.class})
private String customerId = "";
/**
* 网格Id
*/
private List<String> GridIdList;
public interface Grid extends CustomerClientShowGroup {}
}

29
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/StaffBaseInfoFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.user;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @dscription 插叙客户网格人员基础信息--接口入参
* @author sun
*/
@Data
public class StaffBaseInfoFormDTO implements Serializable {
private static final long serialVersionUID = -3634745091993094743L;
/**
* 客户Id
*/
@NotBlank(message = "事件标识不能为空", groups = {Staff.class})
private String customerId = "";
/**
* 人员Id
*/
private List<String> staffIdList;
public interface Staff extends CustomerClientShowGroup {}
}

60
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DataReportingController.java

@ -0,0 +1,60 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.org.AgencyBaseInfoFormDTO;
import com.epmet.dto.org.GridBaseInfoFormDTO;
import com.epmet.dto.user.StaffBaseInfoFormDTO;
import com.epmet.service.DataReportingService;
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;
import java.util.List;
/**
* @dscription 省网格化平台数据上报--数据查询
* @author sun
*/
@RequestMapping("datareporting")
@RestController
public class DataReportingController {
@Autowired
private DataReportingService dataReportingService;
/**
* @Author sun
* @Description 批量查询客户组织基础信息
**/
@PostMapping("agencybaseinfo")
public Result<List<CustomerAgencyDTO>> getAgencyBaseInfo(@RequestBody(required = false) AgencyBaseInfoFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AgencyBaseInfoFormDTO.Agency.class);
return new Result<List<CustomerAgencyDTO>>().ok(dataReportingService.getAgencyBaseInfo(formDTO));
}
/**
* @Author sun
* @Description 批量查询客户网格基础信息
**/
@PostMapping("gridbaseinfo")
public Result<List<CustomerGridDTO>> getGridBaseInfo(@RequestBody(required = false) GridBaseInfoFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GridBaseInfoFormDTO.Grid.class);
return new Result<List<CustomerGridDTO>>().ok(dataReportingService.getGridBaseInfo(formDTO));
}
/**
* @Author sun
* @Description 批量查询客户网格人员基础信息
**/
@PostMapping("staffbaseinfo")
public Result<List<CustomerStaffDTO>> getStaffBaseInfo(@RequestBody(required = false) StaffBaseInfoFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, StaffBaseInfoFormDTO.Staff.class);
return new Result<List<CustomerStaffDTO>>().ok(dataReportingService.getStaffBaseInfo(formDTO));
}
}

35
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/DataReportingService.java

@ -0,0 +1,35 @@
package com.epmet.service;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.org.AgencyBaseInfoFormDTO;
import com.epmet.dto.org.GridBaseInfoFormDTO;
import com.epmet.dto.user.StaffBaseInfoFormDTO;
import java.util.List;
/**
* @dscription 省网格化平台数据上报--数据查询
* @author sun
*/
public interface DataReportingService {
/**
* @Author sun
* @Description 批量查询客户组织基础信息
**/
List<CustomerAgencyDTO> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO);
/**
* @Author sun
* @Description 批量查询客户网格基础信息
**/
List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO);
/**
* @Author sun
* @Description 批量查询客户网格人员基础信息
**/
List<CustomerStaffDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO);
}

60
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java

@ -0,0 +1,60 @@
package com.epmet.service.impl;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.org.AgencyBaseInfoFormDTO;
import com.epmet.dto.org.GridBaseInfoFormDTO;
import com.epmet.dto.user.StaffBaseInfoFormDTO;
import com.epmet.service.DataReportingService;
import com.epmet.service.org.CustomerAgencyService;
import com.epmet.service.org.CustomerGridService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @dscription 省网格化平台数据上报--数据查询
* @author sun
*/
@Slf4j
@Service
public class DataReportingServiceImpl implements DataReportingService {
@Autowired
private CustomerAgencyService customerAgencyService;
@Autowired
private CustomerGridService customerGridService;
/**
* @Author sun
* @Description 批量查询客户组织基础信息
**/
@Override
public List<CustomerAgencyDTO> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO) {
//批量查询客户组织信息
return null;
}
/**
* @Author sun
* @Description 批量查询客户网格基础信息
**/
@Override
public List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO) {
//批量查询客户网格信息
return null;
}
/**
* @Author sun
* @Description 批量查询客户网格人员基础信息
**/
@Override
public List<CustomerStaffDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) {
//批量查询客户网格人员信息
return null;
}
}
Loading…
Cancel
Save