| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- package cn.com.goldenwater.dcproj.controller.homepage;
- import cn.com.goldenwater.core.web.BaseController;
- import cn.com.goldenwater.core.web.BaseResponse;
- import cn.com.goldenwater.dcproj.dto.*;
- import cn.com.goldenwater.dcproj.model.BisInspPblm;
- import cn.com.goldenwater.dcproj.model.DuchaObj;
- import cn.com.goldenwater.dcproj.model.ObjPerson;
- import cn.com.goldenwater.dcproj.param.IndexParam;
- import cn.com.goldenwater.dcproj.param.IndexParamPage;
- import cn.com.goldenwater.dcproj.param.IndexPblmParam;
- import cn.com.goldenwater.dcproj.service.OlBisInspOrgService;
- import cn.com.goldenwater.dcproj.service.PcIndexService;
- import com.github.pagehelper.PageInfo;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import org.apache.commons.lang3.StringUtils;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.time.LocalDate;
- import java.time.format.DateTimeFormatter;
- import java.util.List;
- import java.util.Map;
- @Api(value = "PC后台首页", tags = "PC后台首页接口")
- @RestController
- @RequestMapping("/pc/index")
- public class PcIndexController extends BaseController {
- @Autowired
- private PcIndexService pcIndexService;
- @Autowired
- private OlBisInspOrgService inspOrgService;
- @ApiOperation(value = "统计当前时间,日,周,月累计新增问题")
- @RequestMapping(value = "/timeCount", method = RequestMethod.GET)
- public BaseResponse<Map<String, String>> timeCount() {
- Map<String, String> params = pcIndexService.timeCount(getCurrentOrgId());
- return buildSuccessResponse(params);
- }
- @ApiOperation(value = "根据开始时间,结束时间,所选机构返回督查对象所排除的督查组")
- @RequestMapping(value = "/countGroup", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> countGroup(@RequestBody IndexParam indexParam) {
- indexParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- indexParam.setOrgId(getCurrentOrgId());
- List<DcTypeDto> typeDtoList = pcIndexService.countGroup(indexParam);
- return buildSuccessResponse(typeDtoList);
- }
- @ApiOperation(value = "根据开始时间,结束时间,所选机构返回督查对象所排除的督查人员数量")
- @RequestMapping(value = "/countPerson", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> countPerson(@RequestBody IndexParam indexParam) {
- indexParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- List<DcTypeDto> typeDtoList = pcIndexService.countPerson(indexParam);
- return buildSuccessResponse(typeDtoList);
- }
- @ApiOperation(value = "根据开始时间,结束时间,所选机构返回全部类型督查对象个数(已督查)")
- @RequestMapping(value = "/countDucha", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> countDucha(@RequestBody IndexParam indexParam) {
- indexParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- List<DcTypeDto> typeDtoList = pcIndexService.countDucha(indexParam);
- return buildSuccessResponse(typeDtoList);
- }
- @ApiOperation(value = "根据开始时间,结束时间,所选机构返回全部类别督查对象,发现问题统计")
- @RequestMapping(value = "/countPblmByType", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> countPblmByType(@RequestBody IndexParam indexParam) {
- indexParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- List<DcTypeDto> typeDtoList = pcIndexService.countPblmByType(indexParam);
- return buildSuccessResponse(typeDtoList);
- }
- @ApiOperation(value = "返回不同机构,不同督查对象类型计划全部督查个数,按机构对象类型分,type=org为机构统计,type=pType为按对象类型统计")
- @RequestMapping(value = "/countPlanByOrgOrType/{type}", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> countPlanByOrgOrType(@PathVariable String type) {
- List<DcTypeDto> typeDtoList = pcIndexService.countPlanByOrgOrType(type, getCurrentOrgId());
- return buildSuccessResponse(typeDtoList);
- }
- @ApiOperation(value = "根据开始日期结束日期,所选机构,对象类型,返回督查对象个数统计")
- @RequestMapping(value = "/countPlan", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> countPlan(@RequestBody IndexParam indexParam) {
- indexParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- List<DcTypeDto> typeDtoList = pcIndexService.countPlan(indexParam);
- return buildSuccessResponse(typeDtoList);
- }
- @ApiOperation(value = "根据开始日期结束日期,所选机构,对象类型,按行政省统计督查对象个数")
- @RequestMapping(value = "/countPlanByPro", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> countPlanByPro(@RequestBody IndexParam indexParam) {
- indexParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- List<DcTypeDto> typeDtoList = pcIndexService.countPlanByPro(indexParam);
- return buildSuccessResponse(typeDtoList);
- }
- @ApiOperation(value = "根据开始日期结束日期,所选机构,对象类型,返回督查问题个数统计")
- @RequestMapping(value = "/countPblm", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> countPblm(@RequestBody IndexParam indexParam) {
- indexParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- List<DcTypeDto> typeDtoList = pcIndexService.countPblm(indexParam);
- return buildSuccessResponse(typeDtoList);
- }
- @ApiOperation(value = "根据开始日期结束日期,所选机构,对象类型,按照行政省返回督查组统计")
- @RequestMapping(value = "/countGroupByPro", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> countGroupByPro(@RequestBody IndexParam indexParam) {
- indexParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- List<DcTypeDto> typeDtoList = pcIndexService.countGroupByPro(indexParam);
- return buildSuccessResponse(typeDtoList);
- }
- @ApiOperation(value = "根据开始日期结束日期,所选机构,对象类型,按照行政省返回督查人员统计")
- @RequestMapping(value = "/countPersonByPro", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> countPersonByPro(@RequestBody IndexParam indexParam) {
- indexParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- List<DcTypeDto> typeDtoList = pcIndexService.countPersonByPro(indexParam);
- return buildSuccessResponse(typeDtoList);
- }
- @ApiOperation(value = "根据开始日期结束日期,所选机构,对象类型,返回督查问题个数统计(按照严重程度,行政省统计)")
- @RequestMapping(value = "/countPblmByPro", method = RequestMethod.POST)
- public BaseResponse<List<DcPblmDto>> countPblmByPro(@RequestBody IndexParam indexParam) {
- indexParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- List<DcPblmDto> typeDtoList = pcIndexService.countPblmByPro(indexParam);
- return buildSuccessResponse(typeDtoList);
- }
- @ApiOperation(value = "获取在线人数和所在组")
- @RequestMapping(value = "/countPersOnline", method = RequestMethod.POST)
- public BaseResponse<PersOnlineDto> countPersOnline(@RequestBody IndexParam indexParam) {
- indexParam.setOrgId(getCurrentOrgId());
- PersOnlineDto pers = pcIndexService.countPersOnline(indexParam);
- return buildSuccessResponse(pers);
- }
- @ApiOperation(value = "按照当前时间,统计问题数量")
- @RequestMapping(value = "/countPblmByTime", method = RequestMethod.POST)
- public BaseResponse<List<CountTime>> countPblmByTime(@RequestBody IndexPblmParam indexPblmParam) {
- indexPblmParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- if (StringUtils.isEmpty(indexPblmParam.getSttm())) {
- if (StringUtils.isEmpty(indexPblmParam.getEttm())) {
- LocalDate dttm = LocalDate.now();
- DateTimeFormatter dtfDay = DateTimeFormatter.ofPattern("yyyy-MM-dd");
- indexPblmParam.setEttm(dttm.format(dtfDay));
- }
- } else {
- if (StringUtils.isEmpty(indexPblmParam.getEttm())) {
- indexPblmParam.setEttm(indexPblmParam.getSttm());
- indexPblmParam.setSttm("");
- }
- }
- List<CountTime> list = pcIndexService.countPblmByTime(indexPblmParam);
- return buildSuccessResponse(list);
- }
- @ApiOperation(value = "按照行政区划督查类型下督查组数量")
- @RequestMapping(value = "/findGroupByAdCode", method = RequestMethod.POST)
- public BaseResponse<PageInfo<ObjGroup>> findGroupByAdCode(@RequestBody IndexParamPage indexParamPage) {
- indexParamPage.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- return buildSuccessResponse(pcIndexService.countGroupByAdCode(indexParamPage));
- }
- @ApiOperation(value = "按照行政区划督查类型下督查人员数量")
- @RequestMapping(value = "/findPerByAdCode", method = RequestMethod.POST)
- public BaseResponse<PageInfo<ObjPerson>> findPerByAdCode(@RequestBody IndexParamPage indexParamPage) {
- indexParamPage.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- return buildSuccessResponse(pcIndexService.findPerByAdCode(indexParamPage));
- }
- @ApiOperation(value = "按照行政区划督查类型下督查对象数量")
- @RequestMapping(value = "/findObjByAdCode", method = RequestMethod.POST)
- public BaseResponse<PageInfo<DuchaObj>> findObjByAdCode(@RequestBody IndexParamPage indexParamPage) {
- indexParamPage.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- return buildSuccessResponse(pcIndexService.findObjByAdCode(indexParamPage));
- }
- @ApiOperation(value = "按照行政区划督查类型下督查对象数量")
- @RequestMapping(value = "/findPblmByAdCode", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> findPblmByAdCode(@RequestBody IndexParamPage indexParamPage) {
- indexParamPage.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- return buildSuccessResponse(pcIndexService.findPblmByAdCode(indexParamPage));
- }
- @ApiOperation(value = "按照行政区划督查类型下督查组数量")
- @RequestMapping(value = "/findGroupCountByAdCode", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> findGroupCountByAdCode(@RequestBody IndexParamPage indexParamPage) {
- indexParamPage.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- return buildSuccessResponse(pcIndexService.findGroupCountByAdCode(indexParamPage));
- }
- @ApiOperation(value = "按照行政区划督查类型下督查人员数量")
- @RequestMapping(value = "/findPerCountByAdCode", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> findPerCountByAdCode(@RequestBody IndexParamPage indexParamPage) {
- indexParamPage.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- return buildSuccessResponse(pcIndexService.findPerCountByAdCode(indexParamPage));
- }
- @ApiOperation(value = "按照行政区划督查类型下督查对象数量")
- @RequestMapping(value = "/findObjCountByAdCode", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> findObjCountByAdCode(@RequestBody IndexParamPage indexParamPage) {
- indexParamPage.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- return buildSuccessResponse(pcIndexService.findObjCountByAdCode(indexParamPage));
- }
- @ApiOperation(value = "按照行政区划督查类型下督查对象数量")
- @RequestMapping(value = "/findPblmCountByAdCode", method = RequestMethod.POST)
- public BaseResponse<List<DcTypeDto>> findPblmCountByAdCode(@RequestBody IndexParamPage indexParamPage) {
- indexParamPage.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- return buildSuccessResponse(pcIndexService.findPblmCountByAdCode(indexParamPage));
- }
- }
|