bug修复
This commit is contained in:
parent
e2d0ad14a9
commit
8fc11a9ab4
@ -267,14 +267,20 @@ public class HighFormworkSupportService {
|
||||
|
||||
//测点1类型
|
||||
String noType = no.substring(no.length() - 1);
|
||||
if (noType.equals("L")) {
|
||||
currentData.setAngleYAxis(dataMap.get(HighFormworkSupport.GZ_DS1));
|
||||
}
|
||||
if (noType.equals("F")) {
|
||||
currentData.setPressure(String.valueOf(Double.parseDouble(dataMap.get(HighFormworkSupport.GZ_DS1)) / 1000));
|
||||
currentData.setPoleAxialForce(String.valueOf(Double.parseDouble(dataMap.get(HighFormworkSupport.GZ_DS1)) / 1000));
|
||||
}
|
||||
if (noType.equals("H")) {
|
||||
currentData.setHorizontalDisplacement(dataMap.get(HighFormworkSupport.GZ_DS1));
|
||||
}
|
||||
if (noType.equals("V")) {
|
||||
currentData.setSubside(dataMap.get(HighFormworkSupport.GZ_DS1));
|
||||
currentData.setFormworkSettlement(dataMap.get(HighFormworkSupport.GZ_DS1));
|
||||
}
|
||||
if (noType.equals("L")) {
|
||||
currentData.setPoleTilt(dataMap.get(HighFormworkSupport.GZ_DS1));
|
||||
}
|
||||
if (noType.equals("D")) {
|
||||
currentData.setFoundationSettlement(dataMap.get(HighFormworkSupport.GZ_DS1));
|
||||
}
|
||||
|
||||
//测点2类型
|
||||
@ -392,6 +398,51 @@ public class HighFormworkSupportService {
|
||||
//预警
|
||||
insertHighFormworkAlarmData(point, subside, 5, 2);
|
||||
}
|
||||
} else if (type == 7) {
|
||||
Double subside = StringUtils.isNotBlank(currentData.getPoleAxialForce()) ? Double.valueOf(currentData.getPoleAxialForce()) : null;
|
||||
if (subside != null && alarmValue != null && alarmValue < subside) {
|
||||
//报警
|
||||
insertHighFormworkAlarmData(point, subside, 7, 1);
|
||||
} else if (subside != null && warningValue != null && warningValue < subside) {
|
||||
//预警
|
||||
insertHighFormworkAlarmData(point, subside, 7, 2);
|
||||
}
|
||||
} else if (type == 8) {
|
||||
Double subside = StringUtils.isNotBlank(currentData.getHorizontalDisplacement()) ? Double.valueOf(currentData.getHorizontalDisplacement()) : null;
|
||||
if (subside != null && alarmValue != null && alarmValue < subside) {
|
||||
//报警
|
||||
insertHighFormworkAlarmData(point, subside, 8, 1);
|
||||
} else if (subside != null && warningValue != null && warningValue < subside) {
|
||||
//预警
|
||||
insertHighFormworkAlarmData(point, subside, 8, 2);
|
||||
}
|
||||
} else if (type == 9) {
|
||||
Double subside = StringUtils.isNotBlank(currentData.getFormworkSettlement()) ? Double.valueOf(currentData.getFormworkSettlement()) : null;
|
||||
if (subside != null && alarmValue != null && alarmValue < subside) {
|
||||
//报警
|
||||
insertHighFormworkAlarmData(point, subside, 9, 1);
|
||||
} else if (subside != null && warningValue != null && warningValue < subside) {
|
||||
//预警
|
||||
insertHighFormworkAlarmData(point, subside, 9, 2);
|
||||
}
|
||||
} else if (type == 10) {
|
||||
Double subside = StringUtils.isNotBlank(currentData.getPoleTilt()) ? Double.valueOf(currentData.getPoleTilt()) : null;
|
||||
if (subside != null && alarmValue != null && alarmValue < subside) {
|
||||
//报警
|
||||
insertHighFormworkAlarmData(point, subside, 10, 1);
|
||||
} else if (subside != null && warningValue != null && warningValue < subside) {
|
||||
//预警
|
||||
insertHighFormworkAlarmData(point, subside, 10, 2);
|
||||
}
|
||||
} else if (type == 11) {
|
||||
Double subside = StringUtils.isNotBlank(currentData.getFoundationSettlement()) ? Double.valueOf(currentData.getFoundationSettlement()) : null;
|
||||
if (subside != null && alarmValue != null && alarmValue < subside) {
|
||||
//报警
|
||||
insertHighFormworkAlarmData(point, subside, 11, 1);
|
||||
} else if (subside != null && warningValue != null && warningValue < subside) {
|
||||
//预警
|
||||
insertHighFormworkAlarmData(point, subside, 11, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,111 +0,0 @@
|
||||
package com.zhgd.xmgl.modules.highformwork.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.HighFormworkDeviceCurrentData;
|
||||
import com.zhgd.xmgl.modules.highformwork.service.IHighFormworkDeviceCurrentDataService;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 高支模-测量点设备实时数据
|
||||
* @author: pds
|
||||
* @date: 2021-06-18
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/highFormworkDeviceCurrentData")
|
||||
@Slf4j
|
||||
@Api(tags = "高支模-测量点设备实时数据")
|
||||
public class HighFormworkDeviceCurrentDataController {
|
||||
@Autowired
|
||||
private IHighFormworkDeviceCurrentDataService highFormworkDeviceCurrentDataService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @param highFormworkDeviceCurrentData
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页列表查询高支模-测量点设备实时数据信息", notes = "分页列表查询高支模-测量点设备实时数据信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<HighFormworkDeviceCurrentData>> queryPageList(HighFormworkDeviceCurrentData highFormworkDeviceCurrentData,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Result<IPage<HighFormworkDeviceCurrentData>> result = new Result<IPage<HighFormworkDeviceCurrentData>>();
|
||||
QueryWrapper<HighFormworkDeviceCurrentData> queryWrapper = QueryGenerator.initQueryWrapper(highFormworkDeviceCurrentData, req.getParameterMap());
|
||||
Page<HighFormworkDeviceCurrentData> page = new Page<HighFormworkDeviceCurrentData>(pageNo, pageSize);
|
||||
IPage<HighFormworkDeviceCurrentData> pageList = highFormworkDeviceCurrentDataService.page(page, queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(pageList);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param highFormworkDeviceCurrentData
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加高支模-测量点设备实时数据信息", notes = "添加高支模-测量点设备实时数据信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<HighFormworkDeviceCurrentData> add(@RequestBody HighFormworkDeviceCurrentData highFormworkDeviceCurrentData) {
|
||||
highFormworkDeviceCurrentDataService.saveDeviceCurrentData(highFormworkDeviceCurrentData);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param taskProgressMaterialRel
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑高支模-测量点设备实时数据", notes = "编辑高支模-测量点设备实时数据", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<HighFormworkDeviceCurrentData> edit(@RequestBody HighFormworkDeviceCurrentData taskProgressMaterialRel) {
|
||||
highFormworkDeviceCurrentDataService.updateById(taskProgressMaterialRel);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除高支模-测量点设备实时数据", notes = "删除高支模-测量点设备实时数据", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "高支模-测量点设备实时数据id", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<HighFormworkDeviceCurrentData> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<HighFormworkDeviceCurrentData> result = new Result<>();
|
||||
HighFormworkDeviceCurrentData taskProgressMaterialRel = highFormworkDeviceCurrentDataService.getById(id);
|
||||
if (taskProgressMaterialRel == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = highFormworkDeviceCurrentDataService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@ -139,4 +139,6 @@ public class HighFormworkMeasureCurrentDataController {
|
||||
public Result<List<DataPerHourForTheLastDayVo>> getDataPerHourForTheLastDay(@RequestParam Map<String, Object> map) {
|
||||
return Result.success(highFormworkMeasureCurrentDataService.getDataPerHourForTheLastDay(map));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.HighFormworkMeasurePoint;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.vo.CountHighFormworkMeasurePointVo;
|
||||
import com.zhgd.xmgl.modules.highformwork.service.IHighFormworkMeasurePointService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@ -15,7 +16,9 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -115,5 +118,21 @@ public class HighFormworkMeasurePointController {
|
||||
return Result.success(highFormworkMeasurePointService.selectMeasurePointInfo(map));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "统计烟感报警数据", notes = "统计烟感报警数据", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/countHighFormworkMeasurePoint")
|
||||
public Result<CountHighFormworkMeasurePointVo> countHighFormworkMeasurePoint(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||
return Result.success(highFormworkMeasurePointService.countHighFormworkMeasurePoint(paramMap));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "高支模监测动态", notes = "高支模监测动态", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/countMonitorDynamic")
|
||||
public Result<List<HighFormworkMeasurePoint>> countMonitorDynamic(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||
return Result.success(highFormworkMeasurePointService.countMonitorDynamic(paramMap));
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,10 +32,10 @@ public class HighFormworkAlarmData implements Serializable {
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Long id;
|
||||
/**
|
||||
* 类型 ,1电量(%),2 X轴(°),3 Y轴(°),4压力(kN),5沉降(mm)
|
||||
* 类型 ,1电量(%),2 X轴(°),3 Y轴(°),4压力(kN),5沉降(mm),7.立杆轴力8.水平位移9.模板沉降10.立杆倾斜11.地基沉降
|
||||
*/
|
||||
@Excel(name = "类型 ,1电量(%),2 X轴(°),3 Y轴(°),4压力(kN),5沉降(mm)", width = 15)
|
||||
@ApiModelProperty(value = "类型 ,1电量(%),2 X轴(°),3 Y轴(°),4压力(kN),5沉降(mm)")
|
||||
@Excel(name = "类型 ,1电量(%),2 X轴(°),3 Y轴(°),4压力(kN),5沉降(mm),7.立杆轴力8.水平位移9.模板沉降10.立杆倾斜11.地基沉降", width = 15)
|
||||
@ApiModelProperty(value = "类型 ,1电量(%),2 X轴(°),3 Y轴(°),4压力(kN),5沉降(mm),7.立杆轴力8.水平位移9.模板沉降10.立杆倾斜11.地基沉降")
|
||||
private java.lang.Integer type;
|
||||
/**
|
||||
* 监测点ID
|
||||
|
||||
@ -24,7 +24,7 @@ import java.util.Date;
|
||||
@ApiModel(value="HighFormworkMeasureCurrentData实体类",description="HighFormworkMeasureCurrentData")
|
||||
public class HighFormworkMeasureCurrentData implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value="id")
|
||||
@ -53,18 +53,35 @@ public class HighFormworkMeasureCurrentData implements Serializable {
|
||||
private java.lang.String angleXAxis ;
|
||||
/**Y轴倾角(°)*/
|
||||
@Excel(name = "Y轴倾角(°)", width = 15)
|
||||
@ApiModelProperty(value="Y轴倾角(°)")
|
||||
private java.lang.String angleYAxis ;
|
||||
/**压力(kN)*/
|
||||
@ApiModelProperty(value = "Y轴倾角(°)")
|
||||
private java.lang.String angleYAxis;
|
||||
/**
|
||||
* 压力(kN)
|
||||
*/
|
||||
@Excel(name = "压力(kN)", width = 15)
|
||||
@ApiModelProperty(value="压力(kN)")
|
||||
private java.lang.String pressure ;
|
||||
/**沉降(mm)*/
|
||||
@ApiModelProperty(value = "压力(kN)")
|
||||
private java.lang.String pressure;
|
||||
/**
|
||||
* 沉降(mm)
|
||||
*/
|
||||
@Excel(name = "沉降(mm)", width = 15)
|
||||
@ApiModelProperty(value="沉降(mm)")
|
||||
private java.lang.String subside ;
|
||||
/**报警状态,1正常,2预警,3报警*/
|
||||
@ApiModelProperty(value = "沉降(mm)")
|
||||
private java.lang.String subside;
|
||||
@ApiModelProperty(value = "立杆轴力")
|
||||
private java.lang.String poleAxialForce;
|
||||
@ApiModelProperty(value = "水平位移")
|
||||
private java.lang.String horizontalDisplacement;
|
||||
@ApiModelProperty(value = "模板沉降")
|
||||
private java.lang.String formworkSettlement;
|
||||
@ApiModelProperty(value = "立杆倾斜")
|
||||
private java.lang.String poleTilt;
|
||||
@ApiModelProperty(value = "地基沉降")
|
||||
private java.lang.String foundationSettlement;
|
||||
/**
|
||||
* 报警状态,1正常,2预警,3报警
|
||||
*/
|
||||
@Excel(name = "报警状态,1正常,2预警,3报警", width = 15)
|
||||
@ApiModelProperty(value="报警状态,1正常,2预警,3报警,4离线")
|
||||
private java.lang.Integer alarmState ;
|
||||
@ApiModelProperty(value = "报警状态,1正常,2预警,3报警,4离线")
|
||||
private java.lang.Integer alarmState;
|
||||
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ import java.util.List;
|
||||
@ApiModel(value="HighFormworkMeasurePoint实体类",description="HighFormworkMeasurePoint")
|
||||
public class HighFormworkMeasurePoint implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value="id")
|
||||
@ -70,4 +70,14 @@ public class HighFormworkMeasurePoint implements Serializable {
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "高支模-测量设备")
|
||||
private List<HighFormworkMeasureDevice> deviceList;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "监测时长(秒)")
|
||||
private Integer monitorDurationTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "监测时长")
|
||||
private String monitorDuration;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -22,26 +22,33 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
@ApiModel(value="HighFormworkMeasurePointThreshold实体类",description="HighFormworkMeasurePointThreshold")
|
||||
public class HighFormworkMeasurePointThreshold implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value="id")
|
||||
private java.lang.Long id ;
|
||||
/**监测点ID*/
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Long id;
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@Excel(name = "监测点ID", width = 15)
|
||||
@ApiModelProperty(value="监测点ID")
|
||||
|
||||
private java.lang.Long measurePointId ;
|
||||
/**类型 ,1电量(%),2 X轴(°),3 Y轴(°),4压力(kN),5沉降(mm)*/
|
||||
@Excel(name = "类型 ,1电量(%),2 X轴(°),3 Y轴(°),4压力(kN),5沉降(mm)", width = 15)
|
||||
@ApiModelProperty(value="类型 ,1电量(%),2 X轴(°),3 Y轴(°),4压力(kN),5沉降(mm)")
|
||||
private java.lang.Integer type ;
|
||||
/**预警值*/
|
||||
@ApiModelProperty(value = "监测点ID")
|
||||
|
||||
private java.lang.Long measurePointId;
|
||||
@Excel(name = "类型 ,1电量(%),2 X轴(°),3 Y轴(°),4压力(kN),5沉降(mm),7.立杆轴力8.水平位移9.模板沉降10.立杆倾斜11.地基沉降", width = 15)
|
||||
@ApiModelProperty(value = "类型 ,1电量(%),2 X轴(°),3 Y轴(°),4压力(kN),5沉降(mm),7.立杆轴力8.水平位移9.模板沉降10.立杆倾斜11.地基沉降")
|
||||
private java.lang.Integer type;
|
||||
/**
|
||||
* 预警值
|
||||
*/
|
||||
@Excel(name = "预警值", width = 15)
|
||||
@ApiModelProperty(value="预警值")
|
||||
private java.lang.String warningValue ;
|
||||
/**报警值*/
|
||||
@ApiModelProperty(value = "预警值")
|
||||
private java.lang.String warningValue;
|
||||
/**
|
||||
* 报警值
|
||||
*/
|
||||
@Excel(name = "报警值", width = 15)
|
||||
@ApiModelProperty(value="报警值")
|
||||
private java.lang.String alarmValue ;
|
||||
@ApiModelProperty(value = "报警值")
|
||||
private java.lang.String alarmValue;
|
||||
}
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package com.zhgd.xmgl.modules.highformwork.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CountHighFormworkMeasurePointVo {
|
||||
@ApiModelProperty(value = "总监测点位数")
|
||||
private String totalPointNum;
|
||||
@ApiModelProperty(value = "报警点位数")
|
||||
private String alarmPointNum;
|
||||
@ApiModelProperty(value = "监测中点位数")
|
||||
private String monitoringPointNum;
|
||||
}
|
||||
@ -15,4 +15,12 @@ public class DataPerHourForTheLastDayVo {
|
||||
private String pressure;
|
||||
@ApiModelProperty(value = "沉降(mm)值")
|
||||
private String subside;
|
||||
|
||||
/*
|
||||
立杆轴力
|
||||
水平位移
|
||||
模板沉降
|
||||
立杆倾斜
|
||||
地基沉降
|
||||
*/
|
||||
}
|
||||
|
||||
@ -5,9 +5,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.HighFormworkMeasurePoint;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.HighFormworkMeasurePointQo;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.vo.CountHighFormworkMeasurePointVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -31,4 +33,8 @@ public interface HighFormworkMeasurePointMapper extends BaseMapper<HighFormworkM
|
||||
List<HighFormworkMeasurePoint> queryHighFormworkMeasureDeviceByDeviceSn(HighFormworkMeasurePointQo qo);
|
||||
|
||||
HighFormworkMeasurePoint queryhighFormworkMeasurePointWithDevice(HighFormworkMeasurePointQo qo);
|
||||
|
||||
CountHighFormworkMeasurePointVo countHighFormworkMeasurePoint(HashMap<String, Object> paramMap);
|
||||
|
||||
List<HighFormworkMeasurePoint> countMonitorDynamic(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -55,4 +55,23 @@
|
||||
WHERE hfmp.measure_point_number =#{measurePointNumber}
|
||||
and hfmp.acquisition_instrument_number = #{acquisitionInstrumentNumber}
|
||||
</select>
|
||||
|
||||
<select id="countHighFormworkMeasurePoint"
|
||||
resultType="com.zhgd.xmgl.modules.highformwork.entity.vo.CountHighFormworkMeasurePointVo">
|
||||
select count(distinct hfmp.id) totalPointNum,
|
||||
count(distinct hfad.measure_point_id) alarmPointNum,
|
||||
count(distinct hfmcd.measure_point_number) currentPointNum
|
||||
from high_formwork_measure_point hfmp
|
||||
left join high_formwork_alarm_data hfad on hfmp.id = hfad.measure_point_id
|
||||
left join high_formwork_measure_current_data hfmcd on hfmcd.measure_point_number = hfmp.measure_point_number
|
||||
where hfmp.project_sn=#{projectSn}
|
||||
</select>
|
||||
|
||||
<select id="countMonitorDynamic" resultType="com.zhgd.xmgl.modules.highformwork.entity.HighFormworkMeasurePoint">
|
||||
select hfmp.*,ifnull(timestampdiff(second ,min(hfad.create_time),max(hfad.create_time)),0) monitorDurationTime
|
||||
from high_formwork_measure_point hfmp
|
||||
left join high_formwork_alarm_data hfad on hfmp.id = hfad.measure_point_id
|
||||
where hfmp.project_sn=#{projectSn}
|
||||
group by hfmp.measure_point_number
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.HighFormworkMeasurePoint;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.vo.CountHighFormworkMeasurePointVo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -27,4 +29,8 @@ public interface IHighFormworkMeasurePointService extends IService<HighFormworkM
|
||||
HighFormworkMeasurePoint selectMeasurePointInfo(Map<String, Object> map);
|
||||
|
||||
List<EntityMap> selectPointList(Map<String, Object> map);
|
||||
|
||||
CountHighFormworkMeasurePointVo countHighFormworkMeasurePoint(HashMap<String, Object> paramMap);
|
||||
|
||||
List<HighFormworkMeasurePoint> countMonitorDynamic(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -7,10 +7,12 @@ import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.HighFormworkMeasurePoint;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.HighFormworkMeasurePointThreshold;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.vo.CountHighFormworkMeasurePointVo;
|
||||
import com.zhgd.xmgl.modules.highformwork.mapper.HighFormworkMeasurePointMapper;
|
||||
import com.zhgd.xmgl.modules.highformwork.mapper.HighFormworkMeasurePointThresholdMapper;
|
||||
import com.zhgd.xmgl.modules.highformwork.service.IHighFormworkMeasurePointService;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import com.zhgd.xmgl.util.TimeUtil;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -19,6 +21,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -101,7 +104,7 @@ public class HighFormworkMeasurePointServiceImpl extends ServiceImpl<HighFormwor
|
||||
if(measurePoint!=null){
|
||||
QueryWrapper<HighFormworkMeasurePointThreshold> queryWrapper=new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(HighFormworkMeasurePointThreshold::getMeasurePointId,MapUtils.getString(map,"id"));
|
||||
List<HighFormworkMeasurePointThreshold> list=highFormworkMeasurePointThresholdMapper.selectList(queryWrapper);
|
||||
List<HighFormworkMeasurePointThreshold> list = highFormworkMeasurePointThresholdMapper.selectList(queryWrapper);
|
||||
measurePoint.setThresholdList(list);
|
||||
}
|
||||
return measurePoint;
|
||||
@ -111,4 +114,18 @@ public class HighFormworkMeasurePointServiceImpl extends ServiceImpl<HighFormwor
|
||||
public List<EntityMap> selectPointList(Map<String, Object> map) {
|
||||
return highFormworkMeasurePointMapper.selectPointList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CountHighFormworkMeasurePointVo countHighFormworkMeasurePoint(HashMap<String, Object> paramMap) {
|
||||
return baseMapper.countHighFormworkMeasurePoint(paramMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HighFormworkMeasurePoint> countMonitorDynamic(HashMap<String, Object> paramMap) {
|
||||
List<HighFormworkMeasurePoint> list = baseMapper.countMonitorDynamic(paramMap);
|
||||
for (HighFormworkMeasurePoint point : list) {
|
||||
point.setMonitorDuration(TimeUtil.toHourMinSecond(point.getMonitorDurationTime()));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -114,14 +115,16 @@ public class MaterialDetailsController {
|
||||
/**
|
||||
* 每个类别所有消耗量列表
|
||||
*
|
||||
* @param projectSn 项目sn
|
||||
* @return 每个类别所有消耗量列表
|
||||
*/
|
||||
@GetMapping(value = "/sumConsumeList")
|
||||
@ApiOperation(value = "每个类别所有消耗量列表")
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String")
|
||||
public Result<List<MaterialDetails>> sumConsumeList(String projectSn) {
|
||||
return Result.success(materialDetailsService.sumConsumeList(projectSn));
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "type", value = "1创建时间正序", paramType = "query", required = false, dataType = "Integer"),
|
||||
})
|
||||
public Result<List<MaterialDetails>> sumConsumeList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(materialDetailsService.sumConsumeList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -6,6 +6,7 @@ import com.zhgd.xmgl.modules.material.entity.dto.MaterialDetailsMonthDTO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -56,10 +57,9 @@ public interface MaterialDetailsMapper extends BaseMapper<MaterialDetails> {
|
||||
/**
|
||||
* 每个类别所有消耗量列表
|
||||
*
|
||||
* @param projectSn 项目sn
|
||||
* @return 每个类别所有消耗量列表
|
||||
*/
|
||||
List<MaterialDetails> sumConsumeList(@Param("projectSn") String projectSn);
|
||||
List<MaterialDetails> sumConsumeList(HashMap<String, Object> paramMap);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -60,8 +60,15 @@
|
||||
left join zjsj_material_details zmd on zmt.id = zmd.type_id
|
||||
where zmt.project_sn = #{projectSn}
|
||||
group by zmt.id
|
||||
ORDER BY
|
||||
consume_value DESC
|
||||
<choose>
|
||||
<when test="type == '1'.toString()">
|
||||
ORDER BY zmt.create_time
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY
|
||||
consume_value DESC
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="passConsumeRatio" resultType="com.zhgd.xmgl.modules.material.entity.dto.MaterialDetailsMonthDTO">
|
||||
|
||||
@ -8,6 +8,7 @@ import com.zhgd.xmgl.modules.material.entity.qo.MaterialDetailsQO;
|
||||
import com.zhgd.xmgl.modules.material.entity.vo.MaterialTypeRatioVO;
|
||||
import com.zhgd.xmgl.modules.material.entity.vo.PassConsumeRatioVO;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -44,7 +45,7 @@ public interface MaterialDetailsService extends IService<MaterialDetails> {
|
||||
* @param projectSn 项目sn
|
||||
* @return 每个类别所有消耗量列表
|
||||
*/
|
||||
List<MaterialDetails> sumConsumeList(String projectSn);
|
||||
List<MaterialDetails> sumConsumeList(HashMap<String, Object> paramMap);
|
||||
|
||||
/**
|
||||
* 根据类别id和年月进行材料统计
|
||||
|
||||
@ -21,6 +21,7 @@ import com.zhgd.xmgl.util.mysql.MysqlDataUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@ -91,8 +92,8 @@ public class MaterialDetailsServiceImpl extends ServiceImpl<MaterialDetailsMappe
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MaterialDetails> sumConsumeList(String projectSn) {
|
||||
return materialDetailsMapper.sumConsumeList(projectSn);
|
||||
public List<MaterialDetails> sumConsumeList(HashMap<String, Object> paramMap) {
|
||||
return materialDetailsMapper.sumConsumeList(paramMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -112,4 +113,4 @@ public class MaterialDetailsServiceImpl extends ServiceImpl<MaterialDetailsMappe
|
||||
// 通过stream流构建对应列表
|
||||
return monthVoMap.entrySet().stream().map(entity -> entity.getValue().setMonth(Integer.valueOf(entity.getKey()))).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user