diff --git a/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/constant/DataParam.java b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/constant/DataParam.java index b077826..7336590 100644 --- a/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/constant/DataParam.java +++ b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/constant/DataParam.java @@ -23,4 +23,23 @@ public interface DataParam { //便携式设备默认统计方式 String portableDevStatisticalMethods = "min"; + + //DecimalFormat格式化 + String DecimalFormatStr = "#0.0000"; + + //DecimalFormat格式化 + String startTime = " 00:00:00"; + + String endTime = " 23:59:59"; + + String timeFormat = "yyyy-MM-dd HH:mm:ss"; + + String portableDev = "便携式设备"; + + String governmentDev = "治理设备"; + + String EvtParamPhase = "Evt_Param_Phase"; + + String evtData = "evt_data"; + } diff --git a/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/enums/LineBaseEnum.java b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/enums/LineBaseEnum.java index ca45fae..7e21bbb 100644 --- a/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/enums/LineBaseEnum.java +++ b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/enums/LineBaseEnum.java @@ -19,6 +19,10 @@ public enum LineBaseEnum { DEVICE_LEVEL(2, "设备"), LINE_LEVEL(3, "监测点"), INVALID_LEVEL(-1, "非法拓扑等级"), + NOWLRECORD_FAIL(-1,"方案ID不存在"), + EXISTWLRECORD_FAIL(-1,"方案名称已存在"), + DEVID_FAIL(-1,"devId有误"), + NOTYPE_FAIL(-1,"devId有误"), ; private final Integer code; diff --git a/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/param/WlRecordPageParam.java b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/param/WlRecordPageParam.java index 9082ba0..5b1d1e1 100644 --- a/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/param/WlRecordPageParam.java +++ b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/param/WlRecordPageParam.java @@ -4,9 +4,6 @@ import com.njcn.web.pojo.param.BaseParam; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.NoArgsConstructor; -import javax.validation.constraints.NotNull; -import java.util.ArrayList; -import java.util.List; @Data @NoArgsConstructor @@ -18,16 +15,10 @@ public class WlRecordPageParam extends BaseParam { @ApiModelProperty(value="是否匹配测试项ID") private Integer isTrueFlag; - @ApiModelProperty(value="添加设备时左侧的监测点ID") - private List treeIds = new ArrayList<>(); + @ApiModelProperty(value="设备ID(后端自己用)") + private String devId; - @ApiModelProperty(value="添加测试项的时候顺便添加基础数据列表要排除临时已经添加的基础设备数据") - private List isBandIds = new ArrayList<>(); - - @ApiModelProperty(value="添加设备时左侧的设备ID") - private List pIds = new ArrayList<>(); - - @ApiModelProperty(value="关键字多个匹配") - private String searchText; + @ApiModelProperty(value="监测点ID(后端自己用)") + private String lineId; } diff --git a/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/vo/RecordAllDevTreeVo.java b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/vo/RecordAllDevTreeVo.java index ff4a6fa..766bb8d 100644 --- a/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/vo/RecordAllDevTreeVo.java +++ b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/vo/RecordAllDevTreeVo.java @@ -35,5 +35,22 @@ public class RecordAllDevTreeVo { @ApiModelProperty("设备ID") private String pid; + @ApiModelProperty("线路") + private List children; + + } + + @Data + public static class RecordAllTimeTreeVo { + + @ApiModelProperty("数据ID") + private String id; + + @ApiModelProperty("数据名称(开始时间-结束时间)") + private String name; + + @ApiModelProperty("监测点ID") + private String pid; + } } diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/scheme/WlRecordController.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/scheme/WlRecordController.java index 04697c3..ae75686 100644 --- a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/scheme/WlRecordController.java +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/scheme/WlRecordController.java @@ -112,11 +112,11 @@ public class WlRecordController extends BaseController { } /** - * 设备列表 + * 设备列表树 */ @OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.QUERY) @PostMapping("/queryPage") - @ApiOperation("设备列表") + @ApiOperation("设备列表树") public HttpResult queryPage(@Validated @RequestBody WlRecordPageParam wlRecordPageParam) { String methodDescribe = getMethodDescribe("queryPage"); LogUtil.njcnDebug(log, "{}", methodDescribe); @@ -138,19 +138,6 @@ public class WlRecordController extends BaseController { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); } - /** - * 删除测试项中的设备基础数据 - */ - @OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.DELETE) - @DeleteMapping("/deleteDataRecord") - @ApiOperation("删除测试项中的设备基础数据") - public HttpResult deleteDataRecord(@RequestBody @Validated WlRecordParam.UpdateRecord record) { - String methodDescribe = getMethodDescribe("deleteDataRecord"); - LogUtil.njcnDebug(log, "{},测试项及基础数据ID为:{}", methodDescribe, record); - wlRecordService.deleteDataRecord(record); - return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); - } - /** * 添加测试项中的设备基础数据 */ diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/WlRecordMapper.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/WlRecordMapper.java index 69fedd3..24129f3 100644 --- a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/WlRecordMapper.java +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/WlRecordMapper.java @@ -1,12 +1,10 @@ package com.njcn.csdevice.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.njcn.csdevice.param.WlRecordPageParam; import com.njcn.csdevice.pojo.po.WlRecord; import com.njcn.csdevice.pojo.vo.CsLedgerVO; import com.njcn.csdevice.pojo.vo.RecordAllDevTreeVo; -import com.njcn.csdevice.pojo.vo.RecordPageVo; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -20,11 +18,6 @@ import java.util.List; */ public interface WlRecordMapper extends BaseMapper { - /** - * 查询测试项下绑定的设备列表 - */ - Page queryPage(Page returnpage,@Param("wlRecordPageParam") WlRecordPageParam wlRecordPageParam); - /** * 添加测试项中的设备基础数据 */ @@ -43,8 +36,9 @@ public interface WlRecordMapper extends BaseMapper { /** * 组装测试项表的tree */ - List getRecordAll(); - List getRecordAllLine(@Param("devId") String devId); + List getRecordAll(@Param("wlRecordPageParam")WlRecordPageParam wlRecordPageParam); + List getRecordAllLine(@Param("wlRecordPageParam")WlRecordPageParam wlRecordPageParam); + List getRecordAllTime(@Param("wlRecordPageParam")WlRecordPageParam wlRecordPageParam); /** * 根据测试项ID或方案ID获取其下关联的所有设备基础数据信息 diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/WlRecordMapper.xml b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/WlRecordMapper.xml index 483b463..053315a 100644 --- a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/WlRecordMapper.xml +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/WlRecordMapper.xml @@ -2,64 +2,6 @@ - - insert into wl_record_test_data select #{testRecordId},#{dataRecordId} from dual @@ -78,26 +20,57 @@ - - + + + +