Commit db2d8b09 authored by 麻笑宇's avatar 麻笑宇

大屏新增气瓶安全问题列表查询接口

parent bc8873c8
......@@ -63,4 +63,6 @@ public interface AQZSDPStatisticsMapper {
Map<String, Object> getInspectionResultRate(@Param(value = "orgCode") String orgCode, @Param(value = "appId") String appId);
List<Map<String, Object>> selectByOrg(String orgCode);
List<Map<String, Object>> cylinderIssueMonthList(@Param("orgCode") String orgCode, @Param("time") String time);
}
......@@ -119,6 +119,23 @@
governing_body_org_code LIKE concat ( #{orgCode}, '%' )
AND DATE_FORMAT ( problem_time, '%Y-%m' ) = #{time}
</select>
<select id="cylinderIssueMonthList" resultType="java.util.Map">
SELECT
T.sequence_nbr AS sequenceNbr,
T.source_type AS sourceType,
T.problem_type AS problemType,
T.problem_time AS problemTime,
T.principal_unit AS principalUnit
FROM
tzs_safety_problem_tracing T
LEFT JOIN idx_biz_jg_register_info A ON A.RECORD = T.source_id
WHERE
T.governing_body_org_code LIKE concat ( #{orgCode}, '%' )
AND DATE_FORMAT ( T.problem_time, '%Y-%m' ) = #{time}
AND A.EQU_CATEGORY = '2300'
</select>
<select id="issueProblemLevelCount" resultType="java.util.Map">
SELECT
COUNT
......
......@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.CylinderDPStatisticsServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.util.ObjectUtils;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
import org.springframework.validation.annotation.Validated;
......@@ -88,4 +89,15 @@ public class CylinderDPStatisticsController extends BaseController {
return ResponseHelper.buildResponse(dpStatisticsService.fillingTimesAndQuantity(reginCode));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "大屏气瓶问题列表")
@PostMapping(value = "/cylinderIssueMonthList")
public ResponseModel<List<Map<String, Object>>> cylinderIssueMonthList(@RequestBody Map<String, Object> map) {
Object regionCode = map.get("cityCode");
if (ObjectUtils.isEmpty(regionCode)) {
regionCode = "610000";
}
return ResponseHelper.buildResponse(dpStatisticsService.cylinderIssueMonthList(regionCode.toString()));
}
}
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.module.common.api.dto.CylinderFillingRecordStatisticsDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.statistics.api.mapper.AQZSDPStatisticsMapper;
import com.yeejoin.amos.boot.module.statistics.api.mapper.CylinderStatisticsMapper;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
......@@ -59,18 +60,21 @@ public class CylinderDPStatisticsServiceImpl {
private CylinderInfoMapper cylinderInfoMapper;
private AQZSDPStatisticsMapper statisticsMapper;
/**
* 气瓶图列换算单位上限
*/
private final static Long CYLINDER_LEGEND_UPPER_LIMIT = 100000L;
public CylinderDPStatisticsServiceImpl(StCommonServiceImpl stCommonService, RestHighLevelClient restHighLevelClient, TzBaseEnterpriseInfoMapper baseEnterpriseInfoMapper, CylinderAreaDataMapper cylinderAreaDataMapper, CylinderStatisticsMapper cylinderStatisticsMapper, CylinderInfoMapper cylinderInfoMapper) {
public CylinderDPStatisticsServiceImpl(StCommonServiceImpl stCommonService, RestHighLevelClient restHighLevelClient, TzBaseEnterpriseInfoMapper baseEnterpriseInfoMapper, CylinderAreaDataMapper cylinderAreaDataMapper, CylinderStatisticsMapper cylinderStatisticsMapper, CylinderInfoMapper cylinderInfoMapper,AQZSDPStatisticsMapper statisticsMapper) {
this.stCommonService = stCommonService;
this.restHighLevelClient = restHighLevelClient;
this.baseEnterpriseInfoMapper = baseEnterpriseInfoMapper;
this.cylinderAreaDataMapper = cylinderAreaDataMapper;
this.cylinderStatisticsMapper = cylinderStatisticsMapper;
this.cylinderInfoMapper = cylinderInfoMapper;
this.statisticsMapper = statisticsMapper;
}
......@@ -398,4 +402,10 @@ public class CylinderDPStatisticsServiceImpl {
}
public List<Map<String, Object>> cylinderIssueMonthList(String regionCode) {
String orgCode = stCommonService.getAndSetOrgCode(regionCode);
String time = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM"));
List<Map<String, Object>> list = statisticsMapper.cylinderIssueMonthList(orgCode, time);
return list;
}
}
\ No newline at end of file
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