bug修复
This commit is contained in:
parent
3e9c95d20c
commit
dbf56d5f25
@ -388,4 +388,39 @@ public class ParamEnum {
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 紧急程度,1一般,2严重,3紧要
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||
public enum QualityInspectionRecordUrgentLevelEnum implements BaseEnum {
|
||||
GENERAL(1, "一般"),
|
||||
SERIOUS(2, "严重"),
|
||||
CRITICAL(3, "紧要"),
|
||||
;
|
||||
|
||||
QualityInspectionRecordUrgentLevelEnum(Integer value, String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
private Integer value;
|
||||
private String desc;
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
package com.zhgd.xmgl.modules.quality.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||
import com.zhgd.xmgl.modules.gt.entity.GtMaterialDevice;
|
||||
import com.zhgd.xmgl.base.entity.vo.SectorVo;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendVo;
|
||||
import com.zhgd.xmgl.modules.quality.entity.QualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.quality.entity.dto.DepartmentRectifiedRankDto;
|
||||
import com.zhgd.xmgl.modules.quality.entity.vo.*;
|
||||
@ -19,18 +16,12 @@ import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -81,7 +72,6 @@ public class QualityInspectionRecordController {
|
||||
return Result.success(qualityInspectionRecordService.selectQualityInspectionRecordPage(map));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取项目已整改、未整改、总数数量
|
||||
*
|
||||
@ -249,7 +239,7 @@ public class QualityInspectionRecordController {
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/selectQualityStatistics")
|
||||
public Result<Map<String, Object>> selectQualityStatistics(@RequestBody Map<String, Object> map) {
|
||||
public Result<SelectQualityStatisticsVo> selectQualityStatistics(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(qualityInspectionRecordService.selectQualityStatistics(map));
|
||||
}
|
||||
|
||||
@ -278,4 +268,36 @@ public class QualityInspectionRecordController {
|
||||
public Result<List<DepartmentRectifiedRankVo>> getDepartmentRectifiedRank(@Validated DepartmentRectifiedRankDto rectifiedRank) {
|
||||
return qualityInspectionRecordService.getDepartmentRectifiedRank(rectifiedRank);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "责任单位分析(统计分包单位)", notes = "责任单位分析(统计分包单位)", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/countQualityInspectionRecordEnterprise")
|
||||
public Result<List<TrendVo>> countQualityInspectionRecordEnterprise(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||
return Result.success(qualityInspectionRecordService.countQualityInspectionRecordEnterprise(paramMap));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "隐患等级分析(统计紧急程度)", notes = "隐患等级分析(统计紧急程度)", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "type", value = "1近7天;2近30天;3自定义", paramType = "body", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "createTime_begin", value = "开始时间", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "createTime_end", value = "结束时间", paramType = "body", required = false, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/countQualityInspectionRecordUrgentLevel")
|
||||
public Result<SectorVo> countQualityInspectionRecordUrgentLevel(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||
return Result.success(qualityInspectionRecordService.countQualityInspectionRecordUrgentLevel(paramMap));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "责任区城分析", notes = "责任区城分析", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/countQualityInspectionRecordRegion")
|
||||
public Result<List<TrendVo>> countQualityInspectionRecordRegion(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||
return Result.success(qualityInspectionRecordService.countQualityInspectionRecordRegion(paramMap));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -8,18 +8,21 @@ public class QualityInspectionRecordTotalVo {
|
||||
|
||||
private Integer verificationNum;
|
||||
private Double rectificationRatio;
|
||||
@ApiModelProperty("已闭合")
|
||||
@ApiModelProperty("合格(已闭合)")
|
||||
private Integer closeNum;
|
||||
private Integer reviewNum;
|
||||
private Integer investigateNum;
|
||||
@ApiModelProperty("超期未关闭")
|
||||
private Integer overdueNotCloseNum;
|
||||
@ApiModelProperty("未整改数")
|
||||
private Integer rectificationNum;
|
||||
private Integer ybUrgentLevelNum;
|
||||
private Integer yzUrgentLevelNum;
|
||||
@ApiModelProperty("总数")
|
||||
private String totalNum;
|
||||
private Double completeRatio;
|
||||
@ApiModelProperty("已整改数")
|
||||
private Integer alreadyRectificationNum;
|
||||
private Integer jyUrgentLevelNum;
|
||||
private Integer overdueRectificationNum;
|
||||
@ApiModelProperty("未闭合")
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package com.zhgd.xmgl.modules.quality.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class SelectQualityStatisticsVo {
|
||||
@ApiModelProperty("统计")
|
||||
private QualityInspectionRecordTotalVo total;
|
||||
private List<Map<String, Object>> monthList;
|
||||
}
|
||||
@ -3,12 +3,15 @@ package com.zhgd.xmgl.modules.quality.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.base.entity.vo.SectorOneVo;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendVo;
|
||||
import com.zhgd.xmgl.modules.quality.entity.QualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.quality.entity.dto.DepartmentRectifiedRankDto;
|
||||
import com.zhgd.xmgl.modules.quality.entity.vo.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -44,4 +47,10 @@ public interface QualityInspectionRecordMapper extends BaseMapper<QualityInspect
|
||||
AllAndThisWeekDataVO getQualityAcceptanceAndRectificationNumThisWeek(String projectSn);
|
||||
|
||||
List<DepartmentRectifiedRankVo> getDepartmentRectifiedRank(DepartmentRectifiedRankDto rectifiedRank);
|
||||
|
||||
List<TrendVo> countQualityInspectionRecordEnterprise(HashMap<String, Object> paramMap);
|
||||
|
||||
List<SectorOneVo> countQualityInspectionRecordUrgentLevel(HashMap<String, Object> paramMap);
|
||||
|
||||
List<TrendVo> countQualityInspectionRecordRegion(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -167,6 +167,7 @@
|
||||
WHEN a.status = 2 AND now() > a.change_limit_time THEN 1
|
||||
ELSE 0 END)), 0) overdueRectificationNum,
|
||||
IFNULL(SUM((CASE WHEN a.status = 2 THEN 1 ELSE 0 END)), 0) rectificationNum,
|
||||
IFNULL(SUM((CASE WHEN a.status != 2 THEN 1 ELSE 0 END)), 0) alreadyRectificationNum,
|
||||
IFNULL(SUM((CASE WHEN a.status = 3 THEN 1 ELSE 0 END)), 0) reviewNum,
|
||||
IFNULL(SUM((CASE WHEN a.status = 4 THEN 1 ELSE 0 END)), 0) verificationNum,
|
||||
IFNULL(SUM((CASE WHEN a.urgent_level = 1 THEN 1 ELSE 0 END)), 0) ybUrgentLevelNum,
|
||||
@ -426,13 +427,49 @@
|
||||
resultType="com.zhgd.xmgl.modules.quality.entity.vo.DepartmentRectifiedRankVo"
|
||||
parameterType="com.zhgd.xmgl.modules.quality.entity.dto.DepartmentRectifiedRankDto">
|
||||
SELECT di.department_name,
|
||||
count(qir.id) AS rectified_number
|
||||
count(qir.id) AS rectified_number
|
||||
FROM department_info di
|
||||
LEFT JOIN worker_info wi ON wi.department_id = di.id
|
||||
LEFT JOIN system_user su ON su.worker_id = wi.id
|
||||
LEFT JOIN quality_inspection_record qir ON qir.change_id = su.user_id
|
||||
LEFT JOIN worker_info wi ON wi.department_id = di.id
|
||||
LEFT JOIN system_user su ON su.worker_id = wi.id
|
||||
LEFT JOIN quality_inspection_record qir ON qir.change_id = su.user_id
|
||||
WHERE di.project_sn = #{projectSn}
|
||||
GROUP BY di.id
|
||||
order by rectified_number DESC
|
||||
</select>
|
||||
|
||||
<select id="countQualityInspectionRecordEnterprise" resultType="com.zhgd.xmgl.base.entity.vo.TrendVo">
|
||||
select ei.enterprise_name x, ifnull(sum(if(qir.id is not null, 1, 0)), 0) y
|
||||
from enterprise_info ei
|
||||
LEFT JOIN project_enterprise pe ON pe.enterprise_id=ei.id
|
||||
Left join quality_inspection_record qir on ei.enterprise_sn = qir.enterprise_sn
|
||||
where 1 = 1
|
||||
and pe.project_sn = #{projectSn}
|
||||
GROUP BY ei.id
|
||||
order by y desc
|
||||
</select>
|
||||
|
||||
<select id="countQualityInspectionRecordUrgentLevel" resultType="com.zhgd.xmgl.base.entity.vo.SectorOneVo">
|
||||
select urgent_level enumType,count(*) count from quality_inspection_record
|
||||
where 1=1 and project_sn=#{projectSn}
|
||||
<if test="type == '1'.toString()">
|
||||
and create_time >= date_sub(CURRENT_DATE,interval 0 day)
|
||||
</if>
|
||||
<if test="type == '2'.toString()">
|
||||
and create_time >= date_sub(CURRENT_DATE,interval 29 day)
|
||||
</if>
|
||||
<if test="type == '3'.toString()">
|
||||
and create_time >= #{createTime_begin}
|
||||
and create_time <![CDATA[<=]]> if(LENGTH(#{createTime_end}) = 10, CONCAT(DATE_FORMAT(#{createTime_end},
|
||||
'%Y-%m-%d'), ' 23:59:59'), #{createTime_end})
|
||||
</if>
|
||||
group by urgent_level
|
||||
</select>
|
||||
|
||||
<select id="countQualityInspectionRecordRegion" resultType="com.zhgd.xmgl.base.entity.vo.TrendVo">
|
||||
select qr.region_name x,ifnull(sum(if(qir.id is not null,1,0)),0) y from quality_region qr
|
||||
left join quality_inspection_record qir on qr.id = qir.region_id
|
||||
where 1=1 and qr.project_sn=#{projectSn}
|
||||
group by qr.id
|
||||
order by y desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -3,11 +3,14 @@ package com.zhgd.xmgl.modules.quality.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.base.entity.vo.SectorVo;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendVo;
|
||||
import com.zhgd.xmgl.modules.quality.entity.QualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.quality.entity.dto.DepartmentRectifiedRankDto;
|
||||
import com.zhgd.xmgl.modules.quality.entity.vo.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -23,7 +26,7 @@ public interface IQualityInspectionRecordService extends IService<QualityInspect
|
||||
|
||||
RecordVo selectQualityInspectionRecordPage(Map<String, Object> map);
|
||||
|
||||
Map<String, Object> selectQualityStatistics(Map<String, Object> map);
|
||||
SelectQualityStatisticsVo selectQualityStatistics(Map<String, Object> map);
|
||||
|
||||
Map<String, Object> selectDangerTypeQualityCount(Map<String, Object> map);
|
||||
|
||||
@ -46,4 +49,10 @@ public interface IQualityInspectionRecordService extends IService<QualityInspect
|
||||
List<QualityInspectionRecord> limitListBySubdivision(String projectSn, Long subsectionId, Long subentryId, Integer size);
|
||||
|
||||
Result<List<DepartmentRectifiedRankVo>> getDepartmentRectifiedRank(DepartmentRectifiedRankDto rectifiedRank);
|
||||
|
||||
List<TrendVo> countQualityInspectionRecordEnterprise(HashMap<String, Object> paramMap);
|
||||
|
||||
SectorVo countQualityInspectionRecordUrgentLevel(HashMap<String, Object> paramMap);
|
||||
|
||||
List<TrendVo> countQualityInspectionRecordRegion(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -12,7 +12,11 @@ import com.gexin.fastjson.JSON;
|
||||
import com.gexin.fastjson.TypeReference;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.base.entity.vo.SectorOneVo;
|
||||
import com.zhgd.xmgl.base.entity.vo.SectorVo;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendVo;
|
||||
import com.zhgd.xmgl.call.SanjiangDataCall;
|
||||
import com.zhgd.xmgl.enums.ParamEnum;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
|
||||
import com.zhgd.xmgl.modules.quality.entity.QualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.quality.entity.QualityRectifyRecord;
|
||||
@ -23,7 +27,6 @@ import com.zhgd.xmgl.modules.quality.mapper.QualityInspectionRecordMapper;
|
||||
import com.zhgd.xmgl.modules.quality.mapper.QualityRectifyRecordMapper;
|
||||
import com.zhgd.xmgl.modules.quality.mapper.QualityRegionMapper;
|
||||
import com.zhgd.xmgl.modules.quality.service.IQualityInspectionRecordService;
|
||||
import com.zhgd.xmgl.util.DateUtils;
|
||||
import com.zhgd.xmgl.util.JxlExcelUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
@ -110,7 +113,8 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl<QualityInspe
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectQualityStatistics(Map<String, Object> map) {
|
||||
public SelectQualityStatisticsVo selectQualityStatistics(Map<String, Object> map) {
|
||||
SelectQualityStatisticsVo selectQualityStatisticsVo = new SelectQualityStatisticsVo();
|
||||
/*
|
||||
xmgl/qualityInspectionRecord/selectQualityStatistics
|
||||
totalNum: '',问题总数
|
||||
@ -118,6 +122,7 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl<QualityInspe
|
||||
ybUrgentLevelNum: '',一般问题
|
||||
yzUrgentLevelNum: ''严重问题
|
||||
*/
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
map.put("recordType", "1");
|
||||
QualityInspectionRecordTotalVo total = qualityInspectionRecordMapper.selectQualityInspectionRecordPageTotal(map);
|
||||
@ -143,9 +148,9 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl<QualityInspe
|
||||
list.add(result);
|
||||
}
|
||||
}
|
||||
data.put("total", total);
|
||||
data.put("monthList", monthList);
|
||||
return data;
|
||||
selectQualityStatisticsVo.setTotal(total);
|
||||
selectQualityStatisticsVo.setMonthList(monthList);
|
||||
return selectQualityStatisticsVo;
|
||||
}
|
||||
|
||||
private void setDifferYesterday(Map<String, Object> map, QualityInspectionRecordTotalVo total) {
|
||||
@ -308,6 +313,22 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl<QualityInspe
|
||||
return Result.success(voList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TrendVo> countQualityInspectionRecordEnterprise(HashMap<String, Object> paramMap) {
|
||||
return baseMapper.countQualityInspectionRecordEnterprise(paramMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SectorVo countQualityInspectionRecordUrgentLevel(HashMap<String, Object> paramMap) {
|
||||
List<SectorOneVo> list = baseMapper.countQualityInspectionRecordUrgentLevel(paramMap);
|
||||
return SectorVo.getSectorVoByEnum(list, ParamEnum.QualityInspectionRecordUrgentLevelEnum.values());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TrendVo> countQualityInspectionRecordRegion(HashMap<String, Object> paramMap) {
|
||||
return baseMapper.countQualityInspectionRecordRegion(paramMap);
|
||||
}
|
||||
|
||||
private void setWeekRatioData(AllAndWeekDataVO allAndWeekDataVO) {
|
||||
long weekClose = allAndWeekDataVO.getWeekClose();
|
||||
long weekNoClose = allAndWeekDataVO.getWeekNoClose();
|
||||
|
||||
@ -145,10 +145,21 @@ public class SmartBeamFieldMaintainDataController {
|
||||
@ApiOperation(value = "查询智慧梁场-智能养护数据平均温度和湿度信息", notes = "查询智慧梁场-智能养护数据平均温度和湿度信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "makeBeamPedestalSn", value = "制梁台座编号", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "type", value = "类型:1今日", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/getAvgData")
|
||||
public Result<SmartBeamFieldMaintainData> getAvgData(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(smartBeamFieldMaintainDataService.getAvgData(paramMap));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询统计智慧梁场-智能养护数据的制梁台座编号列表", notes = "查询统计智慧梁场-智能养护数据的制梁台座编号列表", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/getCountMakeBeamPedestalSnList")
|
||||
public Result<List<SmartBeamFieldMaintainData>> getCountMakeBeamPedestalSnList(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||
return Result.success(smartBeamFieldMaintainDataService.getCountMakeBeamPedestalSnList(paramMap));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -19,4 +19,6 @@ public interface SmartBeamFieldMaintainDataMapper extends BaseMapper<SmartBeamFi
|
||||
List<HashMap<String, Object>> countCustomData(HashMap<String, Object> paramMap);
|
||||
|
||||
SmartBeamFieldMaintainData getAvgData(HashMap<String, Object> paramMap);
|
||||
|
||||
List<SmartBeamFieldMaintainData> getCountMakeBeamPedestalSnList(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -16,6 +16,9 @@
|
||||
select round(ifnull(avg(temperature),0),2) temperature, round(ifnull(avg(humidity),0),2) humidity
|
||||
from smart_beam_field_maintain_data
|
||||
where 1=1
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
and project_sn = #{projectSn}
|
||||
</if>
|
||||
<if test="makeBeamPedestalSn != null and makeBeamPedestalSn != ''">
|
||||
and make_beam_pedestal_sn = #{make_beam_pedestal_sn}
|
||||
</if>
|
||||
@ -23,4 +26,11 @@
|
||||
and create_date >= concat(date_format(create_date, '%Y-%m-%d'),' 00:00:00')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getCountMakeBeamPedestalSnList"
|
||||
resultType="com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldMaintainData">
|
||||
select * from smart_beam_field_maintain_data
|
||||
where project_sn=#{projectSn}
|
||||
group by make_beam_pedestal_sn
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -27,4 +27,6 @@ public interface ISmartBeamFieldMaintainDataService extends IService<SmartBeamFi
|
||||
SmartBeamFieldMaintainData getAvgData(HashMap<String, Object> paramMap);
|
||||
|
||||
FlexibleBigScreenVo countCustomData(HashMap<String, Object> paramMap);
|
||||
|
||||
List<SmartBeamFieldMaintainData> getCountMakeBeamPedestalSnList(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ public class SmartBeamFieldMaintainDataServiceImpl extends ServiceImpl<SmartBeam
|
||||
private QueryWrapper<SmartBeamFieldMaintainData> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
String alias = "";
|
||||
QueryWrapper<SmartBeamFieldMaintainData> queryWrapper = QueryGenerator.initPageQueryWrapper(SmartBeamFieldMaintainData.class, paramMap, alias);
|
||||
queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(SmartBeamFieldMaintainData::getId));
|
||||
queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(SmartBeamFieldMaintainData::getCreateDate));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
@ -98,4 +98,9 @@ public class SmartBeamFieldMaintainDataServiceImpl extends ServiceImpl<SmartBeam
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SmartBeamFieldMaintainData> getCountMakeBeamPedestalSnList(HashMap<String, Object> paramMap) {
|
||||
return baseMapper.getCountMakeBeamPedestalSnList(paramMap);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user