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

气瓶 / 区域统计(无)

下钻代码提交
parent 9a4e3a47
...@@ -176,4 +176,18 @@ public class DPFilterParamForDetailDto { ...@@ -176,4 +176,18 @@ public class DPFilterParamForDetailDto {
* 是否对接 0:未对接,1:已对接 * 是否对接 0:未对接,1:已对接
*/ */
private String isDock; private String isDock;
/**
* 检验状态0临期1超期
*/
private String inspectionStatus;
/**
* 监管码状态0已赋码1未赋码
*/
private String supervisionCodeStatus;
/**
* 下次检验日期
*/
private String nextInspectionDate;
} }
package com.yeejoin.amos.boot.module.statistcs.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.EquipmentBizServiceImpl;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.EquipmentStaticsServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map;
/**
* @author Administrator
*/
@RestController
@RequestMapping(value = "/dp/equipment")
@Api(tags = "大屏-设备统计")
public class EquipmentStatisticsController {
@Autowired
private EquipmentStaticsServiceImpl equipmentStaticsService;
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "设备常规下钻图表", notes = "设备常规下钻图表")
@PostMapping(value = "/normalChart")
public ResponseModel<Map<String, Object>> normalChart(@Validated @RequestBody DPFilterParamForDetailDto dpFilterParamForDetailDto, BindingResult result) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
throw new BadRequest(fieldErrors.get(0).getDefaultMessage());
}
return ResponseHelper.buildResponse(equipmentStaticsService.normalChart(dpFilterParamForDetailDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "设备常规下钻列表", notes = "设备常规下钻列表")
@PostMapping(value = "/normalPage")
public ResponseModel<Page<Map<String, Object>>> normalPage(@Validated @RequestBody DPFilterParamForDetailDto dpFilterParamDto, BindingResult result,
@RequestParam(value = "current", defaultValue = "1") Integer current,
@RequestParam(value = "size", defaultValue = "20") Integer size) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
throw new BadRequest(fieldErrors.get(0).getDefaultMessage());
}
return ResponseHelper.buildResponse(equipmentStaticsService.normalPage(current,size,dpFilterParamDto));
}
}
...@@ -189,7 +189,7 @@ public class JYJCDPStatisticsController { ...@@ -189,7 +189,7 @@ public class JYJCDPStatisticsController {
return ResponseHelper.buildResponse(statisticsService.inspectionTimelinessTopXXChart(dpFilterParamForDetailDto)); return ResponseHelper.buildResponse(statisticsService.inspectionTimelinessTopXXChart(dpFilterParamForDetailDto));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "大屏-检验检测-按机构进行检验时效统计Top10排名下钻图表", notes = "大屏-检验检测-按机构进行检验时效统计Top10排名下钻图表") @ApiOperation(httpMethod = "POST", value = "大屏-检验检测-按机构进行检验时效统计Top10排名下钻列表", notes = "大屏-检验检测-按机构进行检验时效统计Top10排名下钻列表")
@PostMapping(value = "/timeliness/topPage") @PostMapping(value = "/timeliness/topPage")
public ResponseModel<Page<Map<String, Object>>> inspectionTimelinessTopXXPage(@Validated @RequestBody DPFilterParamForDetailDto dpFilterParamForDetailDto, BindingResult result, public ResponseModel<Page<Map<String, Object>>> inspectionTimelinessTopXXPage(@Validated @RequestBody DPFilterParamForDetailDto dpFilterParamForDetailDto, BindingResult result,
@RequestParam(value = "current", defaultValue = "1") Integer current, @RequestParam(value = "current", defaultValue = "1") Integer current,
......
...@@ -134,6 +134,14 @@ ...@@ -134,6 +134,14 @@
AVG ( TIMESTAMPDIFF ( SECOND, tdt.arrive_time, tdt.save_time ) ) AS avgTime, AVG ( TIMESTAMPDIFF ( SECOND, tdt.arrive_time, tdt.save_time ) ) AS avgTime,
COALESCE(u."userCount",0) as userCount, COALESCE(u."userCount",0) as userCount,
COALESCE(e."equipCount",0) as equipCount, COALESCE(e."equipCount",0) as equipCount,
tbei.use_unit_code AS useUnitCode,
tbei.unit_type AS unitType,
tbei.use_unit AS useUnit,
concat ( tbei.province, tbei.city, tbei.district ) AS region,
tbei.address AS address,
tbei.legal_person AS legalPerson,
tbei.use_unit_certificate AS useUnitCertificate,
tbei.supervise_org_name AS superviseOrgName,
l.expiry_date l.expiry_date
FROM FROM
tz_dispatch_task tdt tz_dispatch_task tdt
......
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