Commit 3410b5d5 authored by suhuiguang's avatar suhuiguang

1.统计服务合并,tcm的总览

parent bf35debb
package com.yeejoin.amos.boot.module.tcm.api.mapper;
package com.yeejoin.amos.boot.module.statistics.api.mapper;
import com.yeejoin.amos.boot.module.tcm.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -14,16 +14,16 @@ import java.util.Map;
* @date 2024-07-09
*/
@Mapper
public interface ScreenMapper {
public interface ZLStatisticsMapper {
List<Map<String, Object>> getCompanyInfo(@Param("screenDto") ScreenDto screenDto);
List<Map<String, Object>> getCompanyInfo(@Param("screenDto") DPFilterParamDto screenDto);
List<Map<String, Object>> testOrg(@Param("screenDto") ScreenDto screenDto);
List<Map<String, Object>> testOrg(@Param("screenDto") DPFilterParamDto screenDto);
List<Map<String, String>> userCount(@Param("screenDto") ScreenDto screenDto);
List<Map<String, String>> userCount(@Param("screenDto") DPFilterParamDto screenDto);
List<Map<String, Object>> supervisorCount(@Param("screenDto") ScreenDto screenDto);
List<Map<String, Object>> supervisorCount(@Param("screenDto") DPFilterParamDto screenDto);
String getOrgCodeByCompanyCode(@Param("cityCode") String cityCode);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace="com.yeejoin.amos.boot.module.tcm.api.mapper.ScreenMapper">
namespace="com.yeejoin.amos.boot.module.statistics.api.mapper.ZLStatisticsMapper">
<select id="getCompanyInfo" resultType="java.util.Map">
SELECT bi.equip_category as equipCategory,bi.unit_type as unitType
......
package com.yeejoin.amos.boot.module.tcm.biz.controller.statistics.dp;
package com.yeejoin.amos.boot.module.statistcs.biz.controller;
import com.yeejoin.amos.boot.module.tcm.api.dto.ScreenDto;
import com.yeejoin.amos.boot.module.tcm.api.service.statistics.IScreenService;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.ZLDPStatisticsServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -13,10 +13,10 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* 大屏控制层
*
......@@ -24,43 +24,49 @@ import java.util.Map;
* @date 2024-07-09
*/
@RestController
@Api(tags = "大屏企业统计")
@Api(tags = "大屏-总览统计API")
@RequestMapping(value = "/statistics")
public class ScreenController {
@Resource
private IScreenService screenService;
public class ZLDPStatisticsController {
private ZLDPStatisticsServiceImpl statisticsService;
public ZLDPStatisticsController(ZLDPStatisticsServiceImpl statisticsService) {
this.statisticsService = statisticsService;
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/companyInfo")
@ApiOperation(httpMethod = "POST", value = "大屏企业统计", notes = "大屏企业统计")
public ResponseModel<List<Map<String,Object>>> companyInfo(@RequestBody ScreenDto screenDto){
return ResponseHelper.buildResponse(screenService.companyInfo(screenDto));
public ResponseModel<List<Map<String, Object>>> companyInfo(@RequestBody DPFilterParamDto screenDto) {
return ResponseHelper.buildResponse(statisticsService.companyInfo(screenDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/testOrg")
@ApiOperation(httpMethod = "POST", value = "大屏检测机构统计", notes = "大屏检测机构统计")
public ResponseModel<List<Map<String,Object>>> testOrg(@RequestBody ScreenDto screenDto){
return ResponseHelper.buildResponse(screenService.testOrg(screenDto));
public ResponseModel<List<Map<String, Object>>> testOrg(@RequestBody DPFilterParamDto screenDto) {
return ResponseHelper.buildResponse(statisticsService.testOrg(screenDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/userCount")
@ApiOperation(httpMethod = "POST", value = "大屏人员统计", notes = "大屏人员统计")
public ResponseModel<Map<String,Object>> userCount(@RequestBody ScreenDto screenDto){
return ResponseHelper.buildResponse(screenService.userCount(screenDto));
public ResponseModel<Map<String, Object>> userCount(@RequestBody DPFilterParamDto screenDto) {
return ResponseHelper.buildResponse(statisticsService.userCount(screenDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/supervisorCount")
@ApiOperation(httpMethod = "POST", value = "大屏行业主管部门统计", notes = "大屏行业主管部门统计")
public ResponseModel<Map<String,Object>> supervisorCount(@RequestBody ScreenDto screenDto){
return ResponseHelper.buildResponse(screenService.supervisorCount(screenDto));
public ResponseModel<Map<String, Object>> supervisorCount(@RequestBody DPFilterParamDto screenDto) {
return ResponseHelper.buildResponse(statisticsService.supervisorCount(screenDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/equipmentInformCount")
@ApiOperation(httpMethod = "POST", value = "大屏设备使用场所统计", notes = "大屏设备使用场所统计")
public ResponseModel<List<Map<String,Object>>> equipmentInformCount(@RequestBody ScreenDto screenDto){
return ResponseHelper.buildResponse(screenService.equipmentInformCount(screenDto));
public ResponseModel<List<Map<String, Object>>> equipmentInformCount(@RequestBody DPFilterParamDto screenDto) {
return ResponseHelper.buildResponse(statisticsService.equipmentInformCount(screenDto));
}
}
package com.yeejoin.amos.boot.module.tcm.api.dto;
import lombok.Data;
@Data
public class ScreenDto {
/**
* 城市编码
*/
String cityCode;
}
package com.yeejoin.amos.boot.module.tcm.api.service.statistics;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tcm.api.dto.*;
import com.yeejoin.amos.boot.module.tcm.api.enums.DispatchPaperEnums;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map;
/**
* 大屏接口类
*
* @author maxy
* @date 2024-07-09
*/
@Service
public interface IScreenService {
List<Map<String,Object>> companyInfo(ScreenDto screenDto);
List<Map<String,Object>> testOrg(ScreenDto screenDto);
Map<String,Object> userCount(ScreenDto screenDto);
Map<String,Object> supervisorCount(ScreenDto screenDto);
List<Map<String,Object>> equipmentInformCount(ScreenDto screenDto);
}
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