Commit ea24ef09 authored by 刘凡's avatar 刘凡

*)修改月度困人救援统计

parent 6970779e
...@@ -74,7 +74,11 @@ public class AlertUseUnitStatistics extends BaseEntity { ...@@ -74,7 +74,11 @@ public class AlertUseUnitStatistics extends BaseEntity {
*/ */
@TableField("equip_num") @TableField("equip_num")
private Integer equipNum; private Integer equipNum;
/**
* 使用单位统一信用代码
*/
@TableField("use_unit_code")
private String useUnitCode;
/** /**
* 使用单位 * 使用单位
*/ */
......
package com.yeejoin.amos.boot.module.statistics.api.dto; package com.yeejoin.amos.boot.module.statistics.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -47,6 +48,9 @@ public class AlertUseUnitStatisticsDto extends BaseDto { ...@@ -47,6 +48,9 @@ public class AlertUseUnitStatisticsDto extends BaseDto {
@ApiModelProperty(value = "电梯总量") @ApiModelProperty(value = "电梯总量")
private Integer equipNum; private Integer equipNum;
@ApiModelProperty(value = "使用单位统一信用代码")
private String useUnitCode;
@ApiModelProperty(value = "使用单位") @ApiModelProperty(value = "使用单位")
private String useUnit; private String useUnit;
......
...@@ -107,7 +107,7 @@ public class YJDPStatisticsController { ...@@ -107,7 +107,7 @@ public class YJDPStatisticsController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "大屏-应急-月度困人故障高发使用单位", notes = "大屏-应急-月度困人故障高发使用单位") @ApiOperation(httpMethod = "POST", value = "大屏-应急-月度困人故障高发使用单位(默认上月度)", notes = "大屏-应急-月度困人故障高发使用单位")
@PostMapping(value = "/trappedUserHighCompanyCount") @PostMapping(value = "/trappedUserHighCompanyCount")
public ResponseModel<List<AlertUseUnitStatisticsDto>> trappedUserHighCompanyCount(@Validated @RequestBody DPFilterParamDto dpFilterParamDto, BindingResult result) throws Exception { public ResponseModel<List<AlertUseUnitStatisticsDto>> trappedUserHighCompanyCount(@Validated @RequestBody DPFilterParamDto dpFilterParamDto, BindingResult result) throws Exception {
List<FieldError> fieldErrors = result.getFieldErrors(); List<FieldError> fieldErrors = result.getFieldErrors();
......
...@@ -248,7 +248,7 @@ public class YJDPStatisticsServiceImpl { ...@@ -248,7 +248,7 @@ public class YJDPStatisticsServiceImpl {
} }
public JSONObject trappedUserCount(DPFilterParamDto dpFilterParamDto) throws Exception { public JSONObject trappedUserCount(DPFilterParamDto dpFilterParamDto) throws Exception {
String date = DateUtil.formatDate(new Date(), "yyyy-MM"); String date = DateUtil.formatDate(DateTimeUtil.addMonths(new Date(), -1), "yyyy-MM");
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode());
LambdaQueryWrapper<AlertRescueStatistics> lambda = new QueryWrapper<AlertRescueStatistics>().lambda(); LambdaQueryWrapper<AlertRescueStatistics> lambda = new QueryWrapper<AlertRescueStatistics>().lambda();
lambda.likeLeft(AlertRescueStatistics::getSupervisoryUnitOrgCode, orgCode); lambda.likeLeft(AlertRescueStatistics::getSupervisoryUnitOrgCode, orgCode);
...@@ -269,12 +269,13 @@ public class YJDPStatisticsServiceImpl { ...@@ -269,12 +269,13 @@ public class YJDPStatisticsServiceImpl {
} }
public List<AlertUseUnitStatisticsDto> trappedUserHighCompanyCount(DPFilterParamDto dpFilterParamDto) throws Exception { public List<AlertUseUnitStatisticsDto> trappedUserHighCompanyCount(DPFilterParamDto dpFilterParamDto) throws Exception {
String date = DateUtil.formatDate(new Date(), "yyyy-MM"); String date = DateUtil.formatDate(DateTimeUtil.addMonths(new Date(), -1), "yyyy-MM");
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto); String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto);
LambdaQueryWrapper<AlertUseUnitStatistics> lambda = new QueryWrapper<AlertUseUnitStatistics>().lambda(); LambdaQueryWrapper<AlertUseUnitStatistics> lambda = new QueryWrapper<AlertUseUnitStatistics>().lambda();
lambda.likeLeft(AlertUseUnitStatistics::getSupervisoryUnitOrgCode, orgCode); lambda.likeLeft(AlertUseUnitStatistics::getSupervisoryUnitOrgCode, orgCode);
lambda.eq(AlertUseUnitStatistics::getStatisticsDate, date); lambda.eq(AlertUseUnitStatistics::getStatisticsDate, date);
lambda.isNotNull(AlertUseUnitStatistics::getUseUnitCode);
List<AlertUseUnitStatistics> alertUseUnitStatistics = alertUseUnitStatisticsMapper.selectList(lambda); List<AlertUseUnitStatistics> alertUseUnitStatistics = alertUseUnitStatisticsMapper.selectList(lambda);
return Bean.toModels(alertUseUnitStatistics, AlertUseUnitStatisticsDto.class); return Bean.toModels(alertUseUnitStatistics, AlertUseUnitStatisticsDto.class);
} }
......
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