Compare commits

..

8 Commits

  1. 48
      hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/IrrBDGate.java
  2. 14
      hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/IrrBDGateRefData.java
  3. 64
      hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/StRsrBsin.java
  4. 62
      hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/StRsrHych.java
  5. 1
      hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/util/ConvertUtil.java
  6. 38
      hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/vo/StRsrBsinVo.java
  7. 10
      hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IEmInfoClient.java
  8. 10
      hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IEmInfoClientBack.java
  9. 7
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/ImsDutyMainEntity.java
  10. 3
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/ImsDutyRecEntity.java
  11. 24
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ExchangeGroupLeader.java
  12. 42
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ImsSchedulingNewVo.java
  13. 52
      hzims-service-api/message-alarm-api/src/main/java/com/hnac/hzims/message_alarm/entity/PlanFlowResultInfo.java
  14. 12
      hzims-service-api/message-alarm-api/src/main/java/com/hnac/hzims/message_alarm/entity/PlanResultInfo.java
  15. 3
      hzims-service-api/message-alarm-api/src/main/java/com/hnac/hzims/message_alarm/enums/MessageTypeEnum.java
  16. 3
      hzims-service-api/message-alarm-api/src/main/java/com/hnac/hzims/message_alarm/enums/TemplateTypeEnum.java
  17. 3
      hzims-service-api/message-alarm-api/src/main/java/com/hnac/hzims/message_alarm/vo/MessageWaterDispatchVo.java
  18. 12
      hzims-service-api/message-alarm-api/src/main/java/com/hnac/hzims/message_alarm/vo/ReportVo.java
  19. 1
      hzims-service-api/pom.xml
  20. 5
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/feign/IDangerSourceClient.java
  21. 5
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/feign/IDangerSourceClientFallBack.java
  22. 31
      hzims-service-api/suichang-api/pom.xml
  23. 10
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/entity/Demo.java
  24. 29
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/feign/ISuichangClient.java
  25. 138
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/util/DateUtil.java
  26. 39
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/util/MemoryPagination.java
  27. 43
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorCountVo.java
  28. 29
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorReq.java
  29. 54
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorVo.java
  30. 80
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/EcologicalFlowVo.java
  31. 37
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowDataReq.java
  32. 60
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportDayVo.java
  33. 33
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportDetailVo.java
  34. 49
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportVo.java
  35. 26
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/FlowWarnQueryDTO.java
  36. 45
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/FlowWarnVo.java
  37. 33
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ImageReq.java
  38. 28
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ImageVo.java
  39. 22
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/MissingImagesRes.java
  40. 46
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorExportDTO.java
  41. 27
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorRes.java
  42. 27
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorSingleInfoReq.java
  43. 25
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorSingleInfoVo.java
  44. 47
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorVo.java
  45. 21
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationQueryReq.java
  46. 25
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationTreeRes.java
  47. 70
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationTypeVo.java
  48. 45
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationVo.java
  49. 40
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataDetailVo.java
  50. 29
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataReq.java
  51. 37
      hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataVo.java
  52. 6
      hzims-service-api/weather-api/README.md
  53. 21
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpBasicServiceImpl.java
  54. 6
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/BaseInfoApplication.java
  55. 165
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/GateInfoController.java
  56. 165
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/StRsrBsinController.java
  57. 28
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/StZvarlBController.java
  58. 2
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/feign/BaseInfoClient.java
  59. 16
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBDGateMapper.java
  60. 49
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBDGateMapper.xml
  61. 14
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBDGateRefDataMapper.java
  62. 78
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBDGateRefDataMapper.xml
  63. 15
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StRsrBsinMapper.java
  64. 29
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StRsrBsinMapper.xml
  65. 7
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StRsrHychMapper.java
  66. 4
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StZvarlBMapper.java
  67. 25
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/IGateInfoService.java
  68. 11
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/IStRsrBsinService.java
  69. 10
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/IStRsrHychService.java
  70. 3
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/StZvarlBService.java
  71. 75
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/GateInfoServiceImpl.java
  72. 1
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/PreviewInfoServiceImpl.java
  73. 3
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/ReservoirDataServiceImpl.java
  74. 19
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/StRsrBsinServiceImpl.java
  75. 23
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/StRsrHychServiceImpl.java
  76. 6
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/StZvarlBServiceImpl.java
  77. 32
      hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/wrapper/StRsrBsinWrapper.java
  78. 34
      hzims-service/base-info/src/main/resources/application-dev.yml
  79. 52
      hzims-service/base-info/src/main/resources/application-prod.yml
  80. 8
      hzims-service/base-info/src/main/resources/application.yml
  81. 2
      hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/DamSafetyDataServiceImpl.java
  82. 4
      hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/BaseInfoController.java
  83. 1
      hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/PlanTaskController.java
  84. 2
      hzims-service/digital-twin-display/src/main/resources/application-dev.yml
  85. 194
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmOreanizationController.java
  86. 25
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/EmInfoClient.java
  87. 4
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/EmOreanizationClient.java
  88. 21
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmOreanizationMapper.java
  89. 47
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmOreanizationMapper.xml
  90. 10
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/em_attach.sql
  91. 10
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/em_info.sql
  92. 10
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/em_model.sql
  93. 10
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/em_model_param.sql
  94. 10
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/em_oreanization.sql
  95. 10
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/em_param.sql
  96. 32
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/IEmOreanizationService.java
  97. 162
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmOreanizationServiceImpl.java
  98. BIN
      hzims-service/inspect/lib/blade-starter-oss-minio-2.7.3.RELEASE.jar
  99. 10
      hzims-service/inspect/pom.xml
  100. 3
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/IObjectDangerService.java
  101. Some files were not shown because too many files have changed in this diff Show More

48
hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/IrrBDGate.java

@ -1,48 +0,0 @@
package com.hnac.hzims.baseinfo.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springblade.core.mp.base.BaseEntity;
@Data
@TableName("irrbdgate")
public class IrrBDGate extends BaseEntity {
private String strobeCode;
private String stcd;
private String watergateCode;
private String producingArea;
private String factory;
private String strobeType;
private String strobeMaterial;
private Double height;
private Double width;
private Double thickness;
private String motivity;
private String type;
private Short velocity;
private String areaCode;
private String lrcd;
private String szhldm;
private Float dongj;
private Float beiw;
private Float discharge;
}

14
hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/IrrBDGateRefData.java

@ -1,14 +0,0 @@
package com.hnac.hzims.baseinfo.entity;
import lombok.Data;
@Data
public class IrrBDGateRefData {
private String strobeCode;
private String refstcd;
private String refqpoint;
private String refzpoint;
}

64
hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/StRsrBsin.java

@ -1,64 +0,0 @@
package com.hnac.hzims.baseinfo.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.base.BaseEntity;
import java.util.Date;
/**
* 水库信息表
*/
@Data
@TableName("st_rsr_bsin")
public class StRsrBsin extends BaseEntity {
@ApiModelProperty("水库代码")
private String rscd;
@ApiModelProperty("水库名称")
private String rtunm;
@ApiModelProperty("主管部门")
private String cmdp;
@ApiModelProperty("主管部门联系电话")
private String cmdptel;
@ApiModelProperty("河流名称")
private String rvcd;
@ApiModelProperty("水系名称")
private String hnnm;
@ApiModelProperty("流域名称")
private String ctcd;
@ApiModelProperty("东经")
private Double eslg;
@ApiModelProperty("北纬")
private Double nrlt;
@ApiModelProperty("站址")
private String stlc;
@ApiModelProperty("行政区划码")
private String addvcd;
@ApiModelProperty("基面名称")
private String dtmnm;
@ApiModelProperty("基面高程")
private Double dtmel;
@ApiModelProperty("基面修正值")
private Double dtpr;
@ApiModelProperty("报汛等级")
private String frgrd;
@ApiModelProperty("集水面积")
private Double drna;
@ApiModelProperty("拼音码")
private String phcd;
@ApiModelProperty("启用标志")
private String usfl;
@ApiModelProperty("备注")
private String comments;
@ApiModelProperty("建成时间")
private Date buildTime;
@ApiModelProperty("最大坝高")
private Double maxdmhg;
@ApiModelProperty("坝型")
private String dmtp;
@ApiModelProperty("库区GIS范围")
private String gisRange;
@ApiModelProperty("水库功能(可多选)")
private String rsfn;
}

62
hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/StRsrHych.java

@ -1,62 +0,0 @@
package com.hnac.hzims.baseinfo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 水库防洪信息
*/
@Data
@TableName("st_rsr_hych")
public class StRsrHych implements Serializable {
@ApiModelProperty("水库代码")
@TableId(type = IdType.INPUT)
private String rscd;
@ApiModelProperty("水库类型")
private String rsvrtp;
@ApiModelProperty("坝顶高程")
private Double damel;
@ApiModelProperty("控制流域面积")
private Double cnctar;
@ApiModelProperty("校核洪水位")
private Double chfl;
@ApiModelProperty("设计洪水位")
private Double dsfl;
@ApiModelProperty("正常高水位")
private Double normz;
@ApiModelProperty("死水位")
private Double ddwz;
@ApiModelProperty("汛限水位")
private Double mjfl;
@ApiModelProperty("兴利水位")
private Double actz;
@ApiModelProperty("总库容")
private Double ttcp;
@ApiModelProperty("防洪库容")
private Double fldcp;
@ApiModelProperty("兴利库容")
private Double actcp;
@ApiModelProperty("死库容")
private Double ddcp;
@ApiModelProperty("历史最高库水位")
private Double hhrz;
@ApiModelProperty("历史最大蓄水量")
private Double hmxw;
@ApiModelProperty("历史最高库水位(蓄水量)时间")
private Date maxleveltime;
@ApiModelProperty("低水位告警值")
private Double laz;
@ApiModelProperty("启动预报流量标准")
private Double sfq;
@ApiModelProperty("时间戳")
private Date moditime;
@ApiModelProperty("更新时间")
private Date dtuptm;
}

1
hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/util/ConvertUtil.java

@ -8,6 +8,7 @@ public class ConvertUtil {
static {
convertMap.put("ph","PH");
convertMap.put("has","高锰酸盐指数");
convertMap.put("dox","溶解氧");
convertMap.put("cu","铜");
convertMap.put("zn","锌");
convertMap.put("se","硒");

38
hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/vo/StRsrBsinVo.java

@ -1,38 +0,0 @@
package com.hnac.hzims.baseinfo.vo;
import com.hnac.hzims.baseinfo.entity.StRsrBsin;
public class StRsrBsinVo extends StRsrBsin {
//行政区划名称
private String addvcdnm;
/*** 水位*/
private String waterLevel;
/*** 库容*/
private String capacity;
public String getAddvcdnm() {
return addvcdnm;
}
public void setAddvcdnm(String addvcdnm) {
this.addvcdnm = addvcdnm;
}
public String getWaterLevel() {
return waterLevel;
}
public void setWaterLevel(String waterLevel) {
this.waterLevel = waterLevel;
}
public String getCapacity() {
return capacity;
}
public void setCapacity(String capacity) {
this.capacity = capacity;
}
}

10
hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IEmInfoClient.java

@ -87,7 +87,7 @@ public interface IEmInfoClient {
String GET_STRUCT_TREE_BY_STATION = API_PREFIX + "/getStructTreeByStation";
String DEVICE_BY_TYPE = API_PREFIX + "/deviceByTyep";
String DEVICE_BY_TYPE = API_PREFIX + "/deviceByType";
@PostMapping(DETAIL)
EmInfoEntity getByCode(@RequestParam("code") String id);
@ -101,6 +101,14 @@ public interface IEmInfoClient {
@GetMapping(LIST_BY_DEPT_ID)
List<EmInfoEntity> list();
String listByRefOreanization = API_PREFIX + "/listByRefOreanization";
@GetMapping(listByRefOreanization)
R<List<EmInfoEntity>> listByRefOreanization(Long refOreanization);
String getByEquipmentId = API_PREFIX + "/getByEquipmentId";
@GetMapping(getByEquipmentId)
EmInfoVO getByEquipmentId(Long id);
/**
* 根据机构ID获取设备Code
*

10
hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IEmInfoClientBack.java

@ -36,6 +36,16 @@ public class IEmInfoClientBack implements IEmInfoClient {
}
@Override
public R<List<EmInfoEntity>> listByRefOreanization(Long refOreanization) {
return null;
}
@Override
public EmInfoVO getByEquipmentId(Long id) {
return null;
}
@Override
public R<List<String>> getEmCodeByDeptId(Long deptId) {
return R.data(new ArrayList<>());
}

7
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/ImsDutyMainEntity.java

@ -37,7 +37,9 @@ public class ImsDutyMainEntity extends TenantEntity {
@ApiModelProperty(value = "值班组id")
private Long dutyGroupId;
@TableField(exist = false)
@ApiModelProperty(value = "值班组名称")
private String dutyGroupName;
/**
* 值班人IDS, ID之间用^隔开
*/
@ -72,4 +74,7 @@ public class ImsDutyMainEntity extends TenantEntity {
@ApiModelProperty(value = "备注")
private String remark;
@TableField(exist = false)
private Long manageId;//值班长id
}

3
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/ImsDutyRecEntity.java

@ -102,5 +102,6 @@ public class ImsDutyRecEntity extends TenantEntity {
@QueryField(condition = SqlCondition.LIKE)
private String dealChain;
@ApiModelProperty(value = "补充说明")
private String content;
}

24
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ExchangeGroupLeader.java

@ -0,0 +1,24 @@
package com.hnac.hzims.operational.duty.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
public class ExchangeGroupLeader implements Serializable {
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
@JsonFormat(pattern = DateUtil.PATTERN_DATE)
private Date fromDate;
private Long fromClassId;
private Long fromDeptId;
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
@JsonFormat(pattern = DateUtil.PATTERN_DATE)
private Date toDate;
private Long toClassId;
private Long toDeptId;
}

42
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ImsSchedulingNewVo.java

@ -0,0 +1,42 @@
package com.hnac.hzims.operational.duty.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
@Data
public class ImsSchedulingNewVo implements Serializable {
@ApiModelProperty(value = "班组ID 通过^隔开",required = true)
private String groupIds;
// @ApiModelProperty(value = "班组名称 通过^隔开",required = true)
// private String groupNames;
@ApiModelProperty(value = "班次ID 通过^隔开",required = true)
private String classIds;
@ApiModelProperty(value = "班次名称 通过^隔开",required = true)
private String classNames;
@ApiModelProperty(value = "开始时间",required = true)
private String startDate;
@ApiModelProperty(value = "结束时间",required = true)
private String endDate;
private Long deptId;//机构id
@ApiModelProperty("人员类型: 1、班组 2 、人员")
private Integer personType;
//人员组
List<Map<String,String>> personIds; //人员用 managerId 值长id personIds 人员ids 多个^隔开(不包含值长id)
@ApiModelProperty("班次类型ID")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Long dutyClassTypeId;
}

52
hzims-service-api/message-alarm-api/src/main/java/com/hnac/hzims/message_alarm/entity/PlanFlowResultInfo.java

@ -0,0 +1,52 @@
package com.hnac.hzims.message_alarm.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
@TableName("plan_flow_result_info")
public class PlanFlowResultInfo {
/**
* id
*/
@TableId(
value = "id",
type = IdType.ASSIGN_ID
)
private Long id;
/**
* 方案id
*/
@TableField("plan_id")
private Long planId;
/**
* 水库编码
*/
@TableField("stcd")
private String stcd;
/**
* 时间
*/
@TableField("time")
private LocalDateTime time;
/**
* 反推入库
*/
@TableField("reverse_flow")
private BigDecimal reverseFlow;
/**
* 模拟流量
*/
@TableField("simulated_flow")
private BigDecimal simulatedFlow;
}

12
hzims-service-api/message-alarm-api/src/main/java/com/hnac/hzims/message_alarm/entity/PlanResultInfo.java

@ -3,11 +3,14 @@ package com.hnac.hzims.message_alarm.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
@TableName("plan_result_info")
public class PlanResultInfo {
/**
* id
@ -40,29 +43,30 @@ public class PlanResultInfo {
* 降雨量
*/
@TableField("rain_fall")
private Double rainFall;
private BigDecimal rainFall;
/**
* 来流量
*/
@TableField("income_fall")
private Double incomeFall;
private BigDecimal incomeFall;
/**
* 水位
*/
@TableField("water_level")
private Double waterLevel;
private BigDecimal waterLevel;
/**
* 发电流量
*/
@TableField("power_flow")
private Double powerFlow;
private BigDecimal powerFlow;
/**
* 机组负荷
*/
@TableField("unit_load")
private Float unitLoad;
}

3
hzims-service-api/message-alarm-api/src/main/java/com/hnac/hzims/message_alarm/enums/MessageTypeEnum.java

@ -2,8 +2,7 @@ package com.hnac.hzims.message_alarm.enums;
//消息类型
public enum MessageTypeEnum {
NOTIFY("notify","通知消息"),
ALARM("alarm","告警消息"),
FLOW_WARN("flowWarn","流量告警消息");
ALARM("alarm","告警消息");
String code;
String name;

3
hzims-service-api/message-alarm-api/src/main/java/com/hnac/hzims/message_alarm/enums/TemplateTypeEnum.java

@ -4,8 +4,7 @@ public enum TemplateTypeEnum {
REPORT("report","通知消息"),
NOTIFY("notify","通知消息"),
SOE("soe","设备soe"),
ALARM("alarm","告警消息"),
FLOW_WARN("flowWarn","生态流量告警消息");
ALARM("alarm","告警消息");
String code;
String name;

3
hzims-service-api/message-alarm-api/src/main/java/com/hnac/hzims/message_alarm/vo/MessageWaterDispatchVo.java

@ -3,6 +3,7 @@ package com.hnac.hzims.message_alarm.vo;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
@ -19,7 +20,7 @@ public class MessageWaterDispatchVo {
* 来水流量5天就需要有121个
*/
@JSONField(name = "q_in")
List<Double> qIn;
List<BigDecimal> qIn;
/**
* 水位库容曲线
*/

12
hzims-service-api/message-alarm-api/src/main/java/com/hnac/hzims/message_alarm/vo/ReportVo.java

@ -18,4 +18,16 @@ public class ReportVo {
private String actualLoad; //实际负荷
private String forecasLoad; //预测负荷
private List<String> setLoad; //机组负荷
/**
* 反推入库
*/
private String reverseFlow;
/**
* 模拟流量
*/
private String simulatedFlow;
/**
* 径流深
*/
// private String runoffDepth;
}

1
hzims-service-api/pom.xml

@ -33,7 +33,6 @@
<module>water-quality-api</module>
<module>water-rain-api</module>
<module>message-alarm-api</module>
<module>suichang-api</module>
</modules>
<dependencies>

5
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/feign/IDangerSourceClient.java

@ -18,6 +18,7 @@ import java.util.List;
public interface IDangerSourceClient {
String API_PREFIX = "/feign/dangerSource";
String DETAILS = API_PREFIX + "/details";
String LIST = API_PREFIX + "/list";
String LIST_BY_TENANT_ID = API_PREFIX + "/listByTenantId";
String GET_SAFE_CREATE_TABLE = API_PREFIX + "/getSafeCreateTable";
@ -29,6 +30,9 @@ public interface IDangerSourceClient {
@GetMapping(DETAILS)
List<DangerSourceEntity> details(@RequestParam("ids") String[] ids);
@GetMapping(LIST)
List<DangerSourceEntity> list();
/**
* 根据条件查询危险源
*
@ -37,6 +41,7 @@ public interface IDangerSourceClient {
@GetMapping(LIST_BY_TENANT_ID)
List<SourceVO> listByTenantId(@RequestParam("tenantId") String tenantId);
@PostMapping(GET_SAFE_CREATE_TABLE)
List<CreateTableVO> getSafeCreateTable(@RequestParam("list") List<String> tableNames);
}

5
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/feign/IDangerSourceClientFallBack.java

@ -20,6 +20,11 @@ public class IDangerSourceClientFallBack implements IDangerSourceClient {
}
@Override
public List<DangerSourceEntity> list() {
return null;
}
@Override
public List<SourceVO> listByTenantId(String tenantId) {
log.error("远程调用失败,接口:" + LIST_BY_TENANT_ID);
return new ArrayList<>();

31
hzims-service-api/suichang-api/pom.xml

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.hnac.hzims</groupId>
<artifactId>hzims-service-api</artifactId>
<version>4.0.0-SNAPSHOT</version>
</parent>
<artifactId>suichang-api</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.0.5</version>
</dependency>
</dependencies>
</project>

10
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/entity/Demo.java

@ -1,10 +0,0 @@
package com.hnac.hzims.suichang.entity;
/**
* @Author: liangfan
* @Date: 2024-03-08 15:06
* @Description:
*/
public class Demo {
}

29
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/feign/ISuichangClient.java

@ -1,29 +0,0 @@
package com.hnac.hzims.suichang.feign;
import com.hnac.hzims.suichang.vo.StationQueryReq;
import com.hnac.hzims.suichang.vo.StationVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@FeignClient(
value = "suichang"
)
public interface ISuichangClient {
String API_PREFIX = "/suichangClient";
String GET_STATION_BY_REQ = API_PREFIX + "/getStationListByReq";
String GET_DATA = API_PREFIX + "/getData";
@GetMapping(GET_STATION_BY_REQ)
List<StationVo> getStationListByReq(StationQueryReq req);
@GetMapping(GET_DATA)
List<Map<String, Object>> getData(String stcd, Integer accessRules, Integer saveTimeType, Integer timeInterval,
LocalDateTime startTime, LocalDateTime endTime);
}

138
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/util/DateUtil.java

@ -1,138 +0,0 @@
package com.hnac.hzims.suichang.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Month;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class DateUtil {
public static Map<String, Date> getStartEnd(String yearMonth) {
Map<String, Date> data = new HashMap<>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
Date begin = sdf.parse(yearMonth + "-01 00:00:00");
// 最大天数
Date endSt = sdf.parse(yearMonth + "-" + getMaxDayByYearMonth(begin) + " 23:59:59");
data.put("start", begin);
data.put("end", endSt);
} catch (ParseException e) {
e.printStackTrace();
}
return data;
}
public static int getMaxDayByYearMonth(Date start) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(start);
return calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
}
public static LocalDateTime getStartOfLastQuarter(LocalDateTime dateTime) {
int currentMonth = dateTime.getMonthValue();
int currentYear = dateTime.getYear();
// 计算上个季度的开始月份
int startMonthOfLastQuarter = (currentMonth - 1) / 3 * 3 + 1;
if (startMonthOfLastQuarter > currentMonth) {
// 如果当前月份在上个季度之后,则回到上一年的相应季度
startMonthOfLastQuarter -= 3;
currentYear--;
}
// 获取上个季度的开始时间(该季度的第一个月的第一天午夜)
return LocalDateTime.of(currentYear, startMonthOfLastQuarter, 1, 0, 0);
}
public static LocalDateTime getEndOfLastQuarter(LocalDateTime dateTime) {
LocalDateTime startOfLastQuarter = getStartOfLastQuarter(dateTime);
// 获取上个季度的结束时间(该季度的最后一个月的最后一天午夜)
int endMonthOfLastQuarter = startOfLastQuarter.getMonthValue() + 2;
int endYearOfLastQuarter = startOfLastQuarter.getYear();
if (endMonthOfLastQuarter > 12) {
// 如果结束月份超过12,则回到下一年的相应月份
endMonthOfLastQuarter -= 12;
endYearOfLastQuarter++;
}
return LocalDateTime.of(endYearOfLastQuarter, endMonthOfLastQuarter, 1, 0, 0);
}
public static LocalDateTime getStartOfHalfYear(LocalDateTime dateTime) {
int month = dateTime.getMonthValue();
int year = dateTime.getYear();
if (month <= 6) {
// 如果是上半年,则获取去年下半年的开始时间(7月1日)
year--;
return LocalDateTime.of(year, Month.JULY, 1, 0, 0);
} else {
return LocalDateTime.of(year, Month.JANUARY, 1, 0, 0);
}
}
public static LocalDateTime getEndOfHalfYear(LocalDateTime dateTime) {
int month = dateTime.getMonthValue();
int year = dateTime.getYear();
if (month <= 6) {
// 如果是上半年,则获取去年下半年的结束时间(1月1日)
return LocalDateTime.of(year, Month.JANUARY, 1, 0, 0, 0);
} else {
return LocalDateTime.of(year, Month.JULY, 1, 0, 0, 0);
}
}
public static long getHoursPassedToday() {
// 获取当前时间
LocalTime currentTime = LocalTime.now();
// 获取今天的开始时间(午夜0点)
LocalTime midnight = LocalTime.MIDNIGHT;
// 计算时间差,单位为小时
return ChronoUnit.HOURS.between(midnight, currentTime);
}
public static LocalDateTime getEndTime(String time) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
java.time.LocalDate timeDate = java.time.LocalDate.parse(time, formatter);
LocalDateTime resultTime = LocalDateTime.of(timeDate, LocalTime.MIDNIGHT);
// 比较两个时间的大小
LocalDateTime now = LocalDateTime.now().withHour(0).withMinute(0).withSecond(0).withNano(0);
if (now.compareTo(resultTime) > 0) {
resultTime = LocalDateTime.of(timeDate, LocalTime.MAX);
} else {
resultTime = LocalDateTime.now().withMinute(0).withSecond(0).withNano(0);
}
return resultTime;
}
public static LocalDateTime getEndTimeByDay(String time) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
java.time.LocalDate timeDate = java.time.LocalDate.parse(time, formatter);
return LocalDateTime.of(timeDate, LocalTime.MIDNIGHT).plusDays(1);
}
public static LocalDateTime getStartTime(String time) {
// 创建一个 DateTimeFormatter 对象来解析日期字符串
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
java.time.LocalDate startDate = java.time.LocalDate.parse(time, formatter);
// 结合 LocalDate 和 LocalTime 创建 LocalDateTime 对象
LocalDateTime startTime = LocalDateTime.of(startDate, LocalTime.MIDNIGHT);
return startTime;
}
public static String getStringTime(LocalDateTime time) {
// 创建一个 DateTimeFormatter 对象,用于定义你想要的格式
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
// 使用 formatter 将 LocalDateTime 转换为 String
return time.format(formatter);
}
}

39
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/util/MemoryPagination.java

@ -1,39 +0,0 @@
package com.hnac.hzims.suichang.util;
import org.springframework.util.CollectionUtils;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author tanghaihao
* @date 2023年07月12日 17:15
*/
public class MemoryPagination {
/**
* 内存分页
*
* @param records 待分页的数据
* @param pageNum 当前页码
* @param pageSize 每页显示的条数
* @return 分页之后的数据
*/
public static <T> List<T> pagination(List<T> records, int pageNum, int pageSize) {
if (CollectionUtils.isEmpty(records)) {
return Collections.emptyList();
}
int totalCount = records.size() ;
int remainder = totalCount % pageSize;
int pageCount = (remainder > 0) ? totalCount / pageSize + 1 : totalCount / pageSize;
if (remainder == 0) {
return records.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
} else {
if (pageNum == pageCount) {
return records.stream().skip((pageNum - 1) * pageSize).limit(totalCount).collect(Collectors.toList());
} else {
return records.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
}
}
}
}

43
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorCountVo.java

@ -1,43 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class AvgMonitorCountVo {
/**
* 电站名称
*/
private String name;
/**
* 核定下限流量
*/
private BigDecimal flowValue;
/**
* 考核天数
*/
private Long count;
/**
* 合格天数
*/
private Integer passCount;
/**
* 合格率
*/
private String passPre;
private List<RealMonitorSingleInfoVo> infos;
}

29
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorReq.java

@ -1,29 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import org.springblade.core.mp.support.Query;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class AvgMonitorReq extends Query {
/**
* 电站名称
*/
private String name;
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
}

54
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/AvgMonitorVo.java

@ -1,54 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import java.math.BigDecimal;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class AvgMonitorVo {
/**
* 电站名称
*/
private String name;
/**
* 核定下限流量
*/
private BigDecimal flowValue;
/**
* 日均流量
*/
private String avgFlow;
/**
* 实时流量
*/
private String realFlow;
/**
* 现在的时间
*/
private String dateNow;
/**
* 经度(东经)
*/
private BigDecimal lgtd;
/**
* 纬度(北纬)
*/
private BigDecimal lttd;
/**
* 类型 1无节制电站 2流量计电站
*/
private String stationType;
/**
* 上报率
*/
private String passPre;
}

80
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/EcologicalFlowVo.java

@ -1,80 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class EcologicalFlowVo {
/**
* 电站数
*/
private Integer allStationListSize;
/**
* 无节制电站
*/
private Integer noLimitStationListSize;
/**
* 流量计电站
*/
private Integer flowStationListSize;
/**
* 昨日达标率
*/
private String yesterdayFinishPer;
/**
* 昨日达标数量
*/
private Integer yesterdayFinishCount;
/**
* 上月达标数量
*/
private Integer monthFinishCount;
/**
* 上月达标率
*/
private String monthFinishPer;
/**
* 周达标率
*/
private String weekFinishPer;
/**
* 季达标率
*/
private String quarterFinishPer;
/**
* 半年达标率
*/
private String halfYearFinishPer;
/**
* 年达标率
*/
private String yearFinishPer;
/**
* 今天上报率
*/
private String reportTodayPre;
/**
* 今天预警数
*/
private Integer warnTodayCount;
/**
* 昨天上报率
*/
private String reportYesTerdayPre;
/**
* 昨天预警数
*/
private Integer warnYesTerdayCount;
}

37
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowDataReq.java

@ -1,37 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import org.springblade.core.mp.support.Query;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class ExamStationFlowDataReq extends Query {
/**
* 电站名称
*/
private String name;
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
/**
* 1 无节制电站 2 流量计电站
*/
private String stationType;
/**
* 是否达标
*/
private String isPass;
}

60
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportDayVo.java

@ -1,60 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* @Author: liangfan
* @Date: 2024-03-15 18:33
* @Description:
*/
@Data
public class ExamStationFlowReportDayVo {
/**
* 电站名称
*/
private String name;
/**
* 所属区域
*/
private String areaName;
/**
* 状态
*/
private String status;
/**
* 日泄放比
*/
private String dayOutFlowPre;
/**
* 核定流量
*/
private BigDecimal flowValue;
/**
* 前日日均流量
*/
private BigDecimal yesTerDayAvgFlowValue;
/**
* 瞬时流量
*/
private BigDecimal realFlowValue;
/**
* 今日平均流量
*/
private BigDecimal toDayAvgFlowValue;
/**
* 实际下泄流量
*/
private BigDecimal realOutFlow;
/**
* 核定下泄流量
*/
private BigDecimal outFlow;
}

33
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportDetailVo.java

@ -1,33 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import java.math.BigDecimal;
/**
* @Author: liangfan
* @Date: 2024-03-15 18:41
* @Description:
*/
@Data
public class ExamStationFlowReportDetailVo {
/**
* 核定流量
*/
private BigDecimal ecologicalFlowValue;
/**
* 日均流量
*/
private BigDecimal flowValue;
/**
* 时间
*/
private String tm;
/**
* 是否合格
*/
private String isPass;
}

49
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ExamStationFlowReportVo.java

@ -1,49 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* @Author: liangfan
* @Date: 2024-03-15 18:33
* @Description:
*/
@Data
public class ExamStationFlowReportVo {
/**
* 电站名称
*/
private String name;
/**
* 所属区域
*/
private String areaName;
/**
* 核定下限流量
*/
private BigDecimal flowValue;
/**
* 考核天数
*/
private Long count;
/**
* 合格天数
*/
private Integer passCount;
/**
* 合格率
*/
private String passPre;
/**
* 是否合格
*/
private String isPass;
private List<ExamStationFlowReportDetailVo> infos;
}

26
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/FlowWarnQueryDTO.java

@ -1,26 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
/**
* @Author: liangfan
* @Date: 2024-03-20 17:23
* @Description:
*/
@Data
public class FlowWarnQueryDTO {
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
/**
* 站点id
*/
private String objectCode;
}

45
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/FlowWarnVo.java

@ -1,45 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
/**
* @Author: liangfan
* @Date: 2024-03-19 10:00
* @Description:
*/
@Data
public class FlowWarnVo {
/**
* 站点名称
*/
String name;
/**
* 消息内容
*/
String content;
/**
* 发送时间
*/
String sendTime;
/**
* 发送人id
*/
String receiveUserId;
/**
* 发送人姓名
*/
String receiveUserName;
/**
* 业务对象来源(数据平台水库等)
*/
String objectSource;
/**
* 业务对象编码
*/
String objectCode;
String alarmLevel;
}

33
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ImageReq.java

@ -1,33 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
/**
* @Author: liangfan
* @Date: 2024-03-21 19:04
* @Description:
*/
@Data
public class ImageReq {
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
/**
* 站点名称
*/
private String name;
/**
* 设备编码
*/
private String deviceCode;
/**
* 正常 异常
*/
private String status;
}

28
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/ImageVo.java

@ -1,28 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
/**
* @Author: liangfan
* @Date: 2024-03-21 19:04
* @Description:
*/
@Data
public class ImageVo {
private Long id;
private String stcd;
private String time;
private String data;
private String manualpath;
private String name;
private String status;
}

22
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/MissingImagesRes.java

@ -1,22 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
/**
* @Author: liangfan
* @Date: 2024-03-21 19:33
* @Description:
*/
@Data
public class MissingImagesRes {
String deviceCode;
String name;
String area;
String month;
String monthMissingPre;
}

46
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorExportDTO.java

@ -1,46 +0,0 @@
package com.hnac.hzims.suichang.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class RealMonitorExportDTO {
/**
* 电站名称
*/
@ExcelProperty(value = "电站名称", index = 0)
private String name;
/**
* 核定下限流量
*/
@ExcelProperty(value = "核定流量(m³/s)", index = 1)
private BigDecimal flowValue;
/**
* 监测流量
*/
@ExcelProperty(value = "监测流量(m³/s)", index = 2)
private String realFlow;
/**
* 上报个数
*/
@ExcelProperty(value = "上报数(个)", index = 3)
private Integer reportCount;
/**
* 时间
*/
@ExcelProperty(value = "时间", index = 4)
private String dateNow;
}

27
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorRes.java

@ -1,27 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class RealMonitorRes {
/**
* 电站名称
*/
private List<RealMonitorVo> realMonitorVos;
/**
* 应上报条数
*/
private Long reportCount;
}

27
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorSingleInfoReq.java

@ -1,27 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import org.springblade.core.mp.support.Query;
/**
* @Author: liangfan
* @Date: 2024-03-14 09:56
* @Description:
*/
@Data
public class RealMonitorSingleInfoReq extends Query {
/**
* 设备编号
*/
private String deviceCode;
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
}

25
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorSingleInfoVo.java

@ -1,25 +0,0 @@
package com.hnac.hzims.suichang.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
/**
* @Author: liangfan
* @Date: 2024-03-14 09:56
* @Description:
*/
@Data
public class RealMonitorSingleInfoVo {
/**
* 实时值
*/
@ExcelProperty(value = "流量值", index = 0)
private String value;
/**
* 时间
*/
@ExcelProperty(value = "监测时间", index = 1)
private String tm;
}

47
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/RealMonitorVo.java

@ -1,47 +0,0 @@
package com.hnac.hzims.suichang.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class RealMonitorVo {
/**
* 设备编号
*/
private String deviceCode;
/**
* 电站名称
*/
private String name;
/**
* 核定下限流量
*/
private BigDecimal flowValue;
/**
* 监测流量
*/
private String realFlow;
/**
* 上报个数
*/
private Integer reportCount;
/**
* 时间
*/
private String dateNow;
private String areaName;
}

21
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationQueryReq.java

@ -1,21 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class StationQueryReq {
/**
* 电站名称
*/
private String name;
private String stationType;
}

25
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationTreeRes.java

@ -1,25 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import java.util.List;
/**
* @Author: liangfan
* @Date: 2024-03-25 17:21
* @Description:
*/
@Data
public class StationTreeRes {
StationVo stationVo;
/**
* 数量
*/
int count;
/**
* 视频点位list
*/
List<StationTypeVo> child;
}

70
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationTypeVo.java

@ -1,70 +0,0 @@
package com.hnac.hzims.suichang.vo;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.support.QueryField;
/**
* @Author: liangfan
* @Date: 2024-03-25 17:11
* @Description:
*/
@Data
public class StationTypeVo {
@ApiModelProperty("主键ID")
private Long id;
@ApiModelProperty("视频源配置名称")
private String name;
@ApiModelProperty("站点ID")
private String stationId;
@ApiModelProperty("机构ID")
private Long deptId;
@ApiModelProperty("是否平台接入")
private Integer isHikvideo;
@ApiModelProperty("类型")
private String type;
@ApiModelProperty("视频类型;暂只包括清污机类型")
private String videoType;
@ApiModelProperty("数据源地址")
private String liveSourceAddress;
@ApiModelProperty("视频源编码")
private String pointCode;
@ApiModelProperty("代理API网关nginx服务器ip端口")
private String videoHost;
@ApiModelProperty("秘钥appkey")
private String appKey;
@ApiModelProperty("秘钥appSecret")
private String appSecret;
@ApiModelProperty("排序")
private Integer sort;
@ApiModelProperty("站點排序")
private Integer stationSort;
@ApiModelProperty("萤石云地址")
private String ysyUrl;
@ApiModelProperty("视频归属类型 1代表防汛安全,2代表运行安全,3生态流量监视")
private Integer videoOwerType;
@ApiModelProperty("拼音")
private String pingyin;
}

45
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StationVo.java

@ -1,45 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import java.math.BigDecimal;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class StationVo {
/**
* 名称
*/
private String name;
/**
* 设备编号
*/
private String deviceCode;
/**
* 核定流量
*/
private BigDecimal flowValue;
/**
* 电站类型 1 无节制电站 2流量计电站
*/
private String stationType;
/**
* 经度(东经)
*/
private BigDecimal lgtd;
/**
* 纬度(北纬)
*/
private BigDecimal lttd;
}

40
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataDetailVo.java

@ -1,40 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import java.math.BigDecimal;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class StatisticsFlowDataDetailVo {
/**
* 电站名称
*/
private String name;
/**
* 核定流量
*/
private String flowValue;
/**
* 考核天数
*/
private Integer examDays;
/**
* 合格天数
*/
private Integer examPassDays = 0;
/**
* 合格率
*/
private String examPassDayPre = "0.00%";
}

29
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataReq.java

@ -1,29 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import org.springblade.core.mp.support.Query;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class StatisticsFlowDataReq extends Query {
/**
* 电站名称
*/
private String name;
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
}

37
hzims-service-api/suichang-api/src/main/java/com/hnac/hzims/suichang/vo/StatisticsFlowDataVo.java

@ -1,37 +0,0 @@
package com.hnac.hzims.suichang.vo;
import lombok.Data;
import java.util.List;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/31 9:37
*/
@Data
public class StatisticsFlowDataVo {
/**
* 区域名称
*/
private String areaName;
/**
* 考核电站个数
*/
private Integer examCount;
/**
* 达标电站个数
*/
private Integer passCount;
/**
* 达标率
*/
private String passPre;
/**
* 报表数据
*/
private List<StatisticsFlowDataDetailVo> detail;
}

6
hzims-service-api/weather-api/README.md

@ -1,6 +0,0 @@
# 工程简介
# 延伸阅读

21
hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpBasicServiceImpl.java

@ -32,7 +32,6 @@ import com.hnac.hzims.spare.utils.ExcelToolListener;
import com.hnac.hzims.spare.utils.SheetWriteStyleHandler;
import com.hnac.hzims.spare.vo.WtSpBasicVO;
import com.hnac.hzims.ticket.allTicket.fegin.ITicketInfoAllClient;
import com.hnac.hzims.ticket.allTicket.vo.TicketInfoStatisticVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
@ -177,12 +176,20 @@ public class WtSpBasicServiceImpl extends BaseServiceImpl<WtSpBasicMapper, WtSpB
if (Func.isNotEmpty(spBasicEntity.getName()) && "工具".equals(spBasicEntity.getName())) {
// if(Func.isNotEmpty(spBasicEntity.getName())){
List<WtSpManagementEntity> list = managementService.list(Wrappers.<WtSpManagementEntity>query().lambda().
eq(WtSpManagementEntity::getName, spBasicEntity.getName()));
if (list.size() == 0) {
eq(WtSpManagementEntity::getName, spBasicEntity.getName())
.eq(WtSpManagementEntity::getId,spBasicEntity.getManagementId()));
List<Long> longList = new ArrayList<>();
if (list==null && list.size() == 0) {
if(spBasicEntity.getManagementId() != null) {
longList.add(spBasicEntity.getManagementId());
queryWrapper.lambda().in(WtSpBasicEntity::getManagementId, longList);
}else{
return null;
}
}else{
List<WtSpManagementEntity> result = managementService.list(Wrappers.<WtSpManagementEntity>query().lambda().like(WtSpManagementEntity::getAncestors, list.get(0).getId()));
List<Long> longList = new ArrayList<>();
if (result.size() > 0) {
for (int i = 0; i < result.size(); i++) {
longList.add(result.get(i).getId());
@ -195,7 +202,9 @@ public class WtSpBasicServiceImpl extends BaseServiceImpl<WtSpBasicMapper, WtSpB
} else {
return voPages;
}
spBasicEntity.setName(null);
}
// spBasicEntity.setName(null);
}
//调拨单新增特殊处理
if (Func.isNotEmpty(sign)) {
@ -247,7 +256,7 @@ public class WtSpBasicServiceImpl extends BaseServiceImpl<WtSpBasicMapper, WtSpB
}
BeanUtils.copyProperties(basicEntity, basicVO);
List<TicketInfoStatisticVO> ticketVOS = ticketInfoAllClient.getTicketStatistic("2022-02");
// List<TicketInfoStatisticVO> ticketVOS = ticketInfoAllClient.getTicketStatistic("2022-02");
// R<Dept> deptR = sysClient.getDept(basicEntity.getWaterPlantId());
// if(Func.isNotEmpty(deptR.getData())){

6
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/BaseInfoApplication.java

@ -18,12 +18,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
public class BaseInfoApplication extends SpringBootServletInitializer {
public final static String APP_NAME = "base-info";
// static {
// System.setProperty("spring.cloud.nacos.discovery.server-addr", "http://43.139.178.151:8848");
// System.setProperty("spring.cloud.nacos.config.server-addr", "http://43.139.178.151:8848");
// System.setProperty("spring.cloud.nacos.username", "nacos");
// System.setProperty("spring.cloud.nacos.password", "nacos");
// }
public static void main(String[] args) {
BladeApplication.run(APP_NAME, BaseInfoApplication.class, args);

165
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/GateInfoController.java

@ -1,165 +0,0 @@
package com.hnac.hzims.baseinfo.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.baseinfo.entity.IrrBDGate;
import com.hnac.hzims.baseinfo.entity.IrrBDGateRefData;
import com.hnac.hzims.baseinfo.service.IGateInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@RestController
@RequestMapping("/reservoirBaseInfo/gateInfo")
@AllArgsConstructor
@Api(value = "闸门信息", tags = "闸门信息接口")
public class GateInfoController {
private final IGateInfoService gateInfoService;
@RequestMapping(value = "save", method = {RequestMethod.POST})
@ResponseBody
@ApiOperation("添加闸门")
public R addGate(@RequestBody IrrBDGate irrBDGate) {
String deptId = AuthUtil.getDeptId();
IrrBDGate tmp = new IrrBDGate();
tmp.setStrobeCode(irrBDGate.getStrobeCode());
tmp.setStcd(irrBDGate.getStcd());
List<IrrBDGate> page = gateInfoService.list(tmp);
if (page != null && !page.isEmpty()) {
return R.fail(500, "存在重复的闸门代码为:" + irrBDGate.getStrobeCode() + "的数据");
}
return R.data(gateInfoService.addGate(irrBDGate));
}
@RequestMapping(value = "remove", method = {RequestMethod.POST})
@ResponseBody
@ApiOperation("删除闸门")
public R deleteGate(@ApiParam(value = "闸门id") @RequestParam Long id) {
boolean i = gateInfoService.removeById(id);
if (i) {
return R.data(true, "删除成功");
}
return R.fail(500, "不存在此记录");
}
@RequestMapping(value = "updateGate", method = {RequestMethod.POST})
@ResponseBody
@ApiOperation("修改闸门")
public R updateGate(@RequestBody IrrBDGate irrBDGate) {
irrBDGate.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
int i = gateInfoService.updateGate(irrBDGate);
if (i>0) {
return R.data(true, "修改成功");
}
return R.fail(500, "修改失败");
}
@RequestMapping(value = "pageList", method = {RequestMethod.GET})
@ResponseBody
@ApiOperation("查询闸门")
public R pageList(@ModelAttribute IrrBDGate irrBDGate, HttpServletRequest request, Query query) {
String deptId=request.getHeader("dept-id");
if(StringUtil.isEmpty(deptId)) {
deptId =AuthUtil.getDeptId();
}
if(StringUtil.isNotBlank(deptId)) {
irrBDGate.setCreateDept(Long.valueOf(deptId));
}
IPage<IrrBDGate> page = gateInfoService.selectGate(irrBDGate, Condition.getPage(query));
return R.data(page, "查询成功");
}
@RequestMapping(value = "list", method = {RequestMethod.GET})
@ResponseBody
@ApiOperation("查询闸门")
public R list(@ModelAttribute IrrBDGate irrBDGate) {
irrBDGate.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
List<IrrBDGate> list = gateInfoService.list(irrBDGate);
return R.data(list, "查询成功");
}
/**
* 修改闸门配置
*
* @return
*/
@RequestMapping(value = "saveRef", method = {RequestMethod.POST})
@ResponseBody
@ApiOperation("修改闸门配置")
public R saveRef(@RequestBody IrrBDGateRefData irrBDGateRef) {
int i = gateInfoService.addGateRef(irrBDGateRef);
if (i > 0) {
return R.data(true, "修改成功");
}
return R.fail(500, "修改失败");
}
/**
* 删除闸门配置
*
* @return
*/
@RequestMapping(value = "removeRef", method = {RequestMethod.POST})
@ResponseBody
@ApiOperation("删除闸门配置")
public R deleteGateRef(@ApiParam(value = "闸门编码") @RequestParam String gateCode) {
int i = gateInfoService.deleteGateRef(gateCode);
if (i > 0) {
return R.data(true, "删除成功");
}
return R.fail(500, "删除失败");
}
/**
* 修改闸门配置
*
* @return
*/
@RequestMapping(value = "updateRef", method = {RequestMethod.POST})
@ResponseBody
@ApiOperation("修改闸门配置")
public R updateGateRef(@RequestBody IrrBDGateRefData irrBDGateRef) {
int i = gateInfoService.updateGateRef(irrBDGateRef);
if (i > 0) {
return R.data(true, "修改成功");
}
return R.fail(500, "修改失败");
}
/**
* 查询闸门配置
*
* @return
*/
@RequestMapping(value = "detailRef", method = {RequestMethod.GET})
@ResponseBody
@ApiOperation("查询闸门配置")
public R listRef(@ApiParam(value = "闸门编码") @RequestParam String gateCode) {
IrrBDGateRefData res = gateInfoService.detailRef(gateCode);
return R.data(res, "查询成功");
}
}

165
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/StRsrBsinController.java

@ -1,165 +0,0 @@
package com.hnac.hzims.baseinfo.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.baseinfo.entity.StRsrBsin;
import com.hnac.hzims.baseinfo.entity.StRsrHych;
import com.hnac.hzims.baseinfo.service.IStRsrBsinService;
import com.hnac.hzims.baseinfo.service.IStRsrHychService;
import com.hnac.hzims.baseinfo.vo.StRsrBsinVo;
import com.hnac.hzims.baseinfo.wrapper.StRsrBsinWrapper;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
import org.springblade.common.cache.CacheNames;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/reservoir/stRsrBsin")
@AllArgsConstructor
@Api(value = "水库信息", tags = "水库信息接口")
public class StRsrBsinController extends BladeController implements CacheNames {
private final IStRsrBsinService stRsrBsinService;
private final IStRsrHychService stRsrHychService;
/**
* 分页
*/
@GetMapping("/pageList")
@ApiImplicitParams({
@ApiImplicitParam(name = "rscd", value = "水库代码", paramType = "query", dataType = "string"),
@ApiImplicitParam(name = "rtunm", value = "水库名称", paramType = "query", dataType = "string")
})
@ApiOperationSupport(order = 1)
@ApiOperation(value = "分页", notes = "传入stRsrBsin")
public R<IPage<StRsrBsinVo>> pageList(@ApiIgnore @RequestParam Map<String, Object> param, Query query, HttpServletRequest request) {
LambdaQueryWrapper<StRsrBsin> wrapper=new LambdaQueryWrapper();
if(param.get("rscd")!=null) {
wrapper.like(StRsrBsin::getRscd,param.get("rscd"));
}
if(param.get("rtunm")!=null) {
wrapper.like(StRsrBsin::getRtunm,param.get("rtunm"));
}
String deptId=request.getHeader("dept-id");
if(StringUtil.isEmpty(deptId)) {
deptId =AuthUtil.getDeptId();
}
if(StringUtil.isNotBlank(deptId)) {
wrapper.like(StRsrBsin::getCreateDept,deptId);
}
IPage<StRsrBsin> pages = stRsrBsinService.page(Condition.getPage(query), wrapper);
return R.data(StRsrBsinWrapper.build().pageVO(pages));
}
/**
* 列表
*/
@GetMapping("/list")
@ApiImplicitParams({
@ApiImplicitParam(name = "rscd", value = "水库代码", paramType = "query", dataType = "string"),
@ApiImplicitParam(name = "rtunm", value = "水库名称", paramType = "query", dataType = "string")
})
@ApiOperationSupport(order = 2)
@ApiOperation(value = "列表", notes = "传入stRsrBsin")
public R<List<StRsrBsinVo>> list(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletRequest request) {
LambdaQueryWrapper<StRsrBsin> wrapper=new LambdaQueryWrapper();
if(param.get("rscd")!=null) {
wrapper.like(StRsrBsin::getRscd,param.get("rscd"));
}
if(param.get("rtunm")!=null) {
wrapper.like(StRsrBsin::getRtunm,param.get("rtunm"));
}
String deptId = request.getHeader("dept-id");
if (StringUtil.isEmpty(deptId)) {
deptId = AuthUtil.getDeptId();
}
if (StringUtil.isNotBlank(deptId)) {
wrapper.like(StRsrBsin::getCreateDept, deptId);
}
List<StRsrBsin> list = stRsrBsinService.list(wrapper);
return R.data(StRsrBsinWrapper.build().listVO(list));
}
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "详情", notes = "传入stRsrBsin")
public R<Map<String,Object>> detail(StRsrBsin stRsrBsin) {
Map<String,Object> data=new HashMap<>();
StRsrBsin detail = stRsrBsinService.getOne(Condition.getQueryWrapper(stRsrBsin));
data.put("stRsrBsin", StRsrBsinWrapper.build().entityVO(detail));
//防洪信息
StRsrHych param=new StRsrHych();
param.setRscd(stRsrBsin.getRscd());
StRsrHych stRsrHych=stRsrHychService.getOne(Condition.getQueryWrapper(param));
data.put("stRsrHych",stRsrHych);
return R.data(data);
}
/**
* 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入stRsrBsin")
public R save(@RequestBody StRsrBsin stRsrBsin) {
if(stRsrBsin==null){
return R.fail("水库信息不能为空");
}
LambdaQueryWrapper<StRsrBsin> wrapper=new LambdaQueryWrapper();
wrapper.eq(StRsrBsin::getRscd,stRsrBsin.getRscd());
List<StRsrBsin> list =stRsrBsinService.list(wrapper);
if(list!=null && !list.isEmpty()){
return R.fail("水库编码已存在");
}
wrapper=new LambdaQueryWrapper();
wrapper.eq(StRsrBsin::getRtunm,stRsrBsin.getRtunm());
list =stRsrBsinService.list(wrapper);
if(list!=null && !list.isEmpty()){
return R.fail("水库名称已存在");
}
return R.status(stRsrBsinService.save(stRsrBsin));
}
/**
* 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入stRsrBsin")
public R update(@RequestBody StRsrBsin stRsrBsin) {
return R.status(stRsrBsinService.updateById(stRsrBsin));
}
@PostMapping("/remove")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "逻辑删除", notes = "ids")
public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
boolean temp = stRsrBsinService.deleteLogic(Func.toLongList(ids));
return R.status(temp);
}
}

28
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/StZvarlBController.java

@ -1,21 +1,18 @@
package com.hnac.hzims.baseinfo.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.baseinfo.entity.StZvarlB;
import com.hnac.hzims.baseinfo.service.StZvarlBService;
import com.hnac.hzims.common.utils.Condition;
import io.swagger.annotations.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
@RestController
@Api(description = "库(湖)容曲线控制器")
@ -25,25 +22,6 @@ public class StZvarlBController {
@Autowired
private StZvarlBService stZvarlBService;
/**
* 列表
*/
@GetMapping("/list")
@ApiImplicitParams({
@ApiImplicitParam(name = "rscd", value = "库(湖)编码", paramType = "query", dataType = "string")
})
@ApiOperationSupport(order = 2)
@ApiOperation(value = "列表", notes = "传入stZvarlB")
public R<List<StZvarlB>> list(@ApiIgnore @RequestParam Map<String, Object> param) {
LambdaQueryWrapper<StZvarlB> wrapper = new LambdaQueryWrapper();
if (param.get("stcd") != null) {
wrapper.like(StZvarlB::getStcd, param.get("stcd"));
}
wrapper.orderByAsc(StZvarlB::getPtno);
List<StZvarlB> list = stZvarlBService.list(wrapper);
return R.data(list);
}
@ApiOperation(notes = "获取库(湖)容曲线列表数据接口", value = "获取库(湖)容曲线列表数据接口")
@RequestMapping(value = "bindStZvarlBs", method = RequestMethod.GET)

2
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/feign/BaseInfoClient.java

@ -72,11 +72,13 @@ public class BaseInfoClient implements IBaseInfoClient {
return R.data(stZvarlBService.getStZvarlBs(stcd));
}
@Override
public void savePreviewInfo(PreviewInfo previewInfo) {
log.info("===previewInfo==={}", previewInfo);
previewInfoService.save(previewInfo);
}
@Override
public R<List<Map<String,String>>> getHistoryDataBySignage(String stcd, Date start, Date end, String type, String col){
return R.data(reservoirDataService.getHistoryDataBySignage(stcd,start,end,type,col));
}

16
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBDGateMapper.java

@ -1,16 +0,0 @@
package com.hnac.hzims.baseinfo.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.baseinfo.entity.IrrBDGate;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface IrrBDGateMapper extends BaseMapper<IrrBDGate> {
IPage<IrrBDGate> selectByExample(@Param("example") IrrBDGate example, IPage<IrrBDGate> page);
List<IrrBDGate> selectByExample(@Param("example") IrrBDGate example);
}

49
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBDGateMapper.xml

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.baseinfo.mapper.IrrBDGateMapper">
<resultMap id="BaseResultMap" type="com.hnac.hzims.baseinfo.entity.IrrBDGate" >
<id column="ID" property="id" jdbcType="BIGINT" />
<result column="STROBE_CODE" property="strobeCode" jdbcType="VARCHAR" />
<result column="WATERGATE_CODE" property="watergateCode" jdbcType="CHAR" />
<result column="PRODUCING_AREA" property="producingArea" jdbcType="VARCHAR" />
<result column="FACTORY" property="factory" jdbcType="VARCHAR" />
<result column="STROBE_TYPE" property="strobeType" jdbcType="CHAR" />
<result column="STROBE_MATERIAL" property="strobeMaterial" jdbcType="CHAR" />
<result column="HEIGHT" property="height" jdbcType="DECIMAL" />
<result column="WIDTH" property="width" jdbcType="DECIMAL" />
<result column="THICKNESS" property="thickness" jdbcType="DECIMAL" />
<result column="MOTIVITY" property="motivity" jdbcType="CHAR" />
<result column="TYPE" property="type" jdbcType="CHAR" />
<result column="VELOCITY" property="velocity" jdbcType="DECIMAL" />
<result column="AREA_CODE" property="areaCode" jdbcType="VARCHAR" />
<result column="LRCD" property="lrcd" jdbcType="VARCHAR" />
<result column="SZHLDM" property="szhldm" jdbcType="VARCHAR" />
<result column="DONGJ" property="dongj" jdbcType="REAL" />
<result column="BEIW" property="beiw" jdbcType="REAL" />
<result column="DISCHARGE" property="discharge" jdbcType="REAL" />
<result column="STCD" property="stcd" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
ID,STROBE_CODE, WATERGATE_CODE, PRODUCING_AREA, FACTORY, STROBE_TYPE, STROBE_MATERIAL,
HEIGHT, WIDTH, THICKNESS, MOTIVITY, TYPE, VELOCITY, AREA_CODE, LRCD, SZHLDM, DONGJ,
BEIW, DISCHARGE,STCD
</sql>
<select id="selectByExample" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/>
from irrbdgate
where is_deleted = 0
<if test="example.createDept!=null">
and CREATE_DEPT like concat(#{example.createDept},'%')
</if>
<if test="example.strobeCode!=null">
and STROBE_CODE = #{example.strobeCode}
</if>
<if test="example.stcd!=null">
and STCD = #{example.stcd}
</if>
</select>
</mapper>

14
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBDGateRefDataMapper.java

@ -1,14 +0,0 @@
package com.hnac.hzims.baseinfo.mapper;
import com.hnac.hzims.baseinfo.entity.IrrBDGateRefData;
public interface IrrBDGateRefDataMapper {
int insertSelective(IrrBDGateRefData record);
int updateByPrimaryKeySelective(IrrBDGateRefData record);
IrrBDGateRefData selectByPrimaryKey(String strobeCode);
int deleteByPrimaryKey(String strobeCode);
}

78
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBDGateRefDataMapper.xml

@ -1,78 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.baseinfo.mapper.IrrBDGateRefDataMapper">
<resultMap id="BaseResultMap" type="com.hnac.hzims.baseinfo.entity.IrrBDGateRefData" >
<id column="STROBE_CODE" property="strobeCode" jdbcType="CHAR" />
<result column="REFSTCD" property="refstcd" jdbcType="CHAR" />
<result column="REFQPOINT" property="refqpoint" jdbcType="VARCHAR" />
<result column="REFZPOINT" property="refzpoint" jdbcType="CHAR" />
</resultMap>
<sql id="Base_Column_List" >
STROBE_CODE, REFSTCD, REFQPOINT, REFZPOINT
</sql>
<insert id="insertSelective" parameterType="com.hnac.hzims.baseinfo.entity.IrrBDGateRefData" >
insert into irrbdgate_refdata
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="strobeCode != null" >
STROBE_CODE,
</if>
<if test="refstcd != null" >
REFSTCD,
</if>
<if test="refqpoint != null" >
REFQPOINT,
</if>
<if test="refzpoint != null" >
REFZPOINT,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="strobeCode != null" >
#{strobeCode,jdbcType=CHAR},
</if>
<if test="refstcd != null" >
#{refstcd,jdbcType=CHAR},
</if>
<if test="refqpoint != null" >
#{refqpoint,jdbcType=VARCHAR},
</if>
<if test="refzpoint != null" >
#{refzpoint,jdbcType=CHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.hnac.hzims.baseinfo.entity.IrrBDGateRefData" >
update irrbdgate_refdata
<set >
<if test="refstcd != null" >
REFSTCD = #{refstcd,jdbcType=CHAR},
</if>
<if test="refqpoint != null" >
REFQPOINT = #{refqpoint,jdbcType=VARCHAR},
</if>
<if test="refzpoint != null" >
REFZPOINT = #{refzpoint,jdbcType=CHAR},
</if>
</set>
where STROBE_CODE = #{strobeCode,jdbcType=CHAR}
</update>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from irrbdgate_refdata
where STROBE_CODE = #{strobeCode,jdbcType=CHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from irrbdgate_refdata
where STROBE_CODE = #{strobeCode,jdbcType=CHAR}
</delete>
</mapper>

15
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StRsrBsinMapper.java

@ -1,15 +0,0 @@
package com.hnac.hzims.baseinfo.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.baseinfo.entity.StRsrBsin;
import org.apache.ibatis.annotations.Param;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
import java.util.Map;
public interface StRsrBsinMapper extends UserDataScopeBaseMapper<StRsrBsin> {
IPage<Map<String,Object>> selectByParam(IPage page, @Param("param") Map<String,Object> param);
List<Map<String,Object>> selectByParam(@Param("param") Map<String,Object> param);
}

29
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StRsrBsinMapper.xml

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.baseinfo.mapper.StRsrBsinMapper">
<select id="selectByParam" resultType="java.util.HashMap">
select bsin.id,bsin.rscd,hych.rsvrtp,bsin.RTUNM,bsin.ESLG,bsin.NRLT,
bsin.GIS_RANGE as gisRange,bsin.rvcd,bsin.stlc,hych.mjfl from st_rsr_bsin bsin
left join st_rsr_hych hych on bsin.rscd=hych.RSCD
WHERE bsin.IS_DELETED = 0
<if test=" param.deptId!=null and param.deptId!='' ">
and bsin.CREATE_DEPT like concat(#{param.deptId},'%')
</if>
<if test=" param.rtunm!=null and param.rtunm!='' ">
and bsin.RTUNM like concat('%',#{param.rtunm},'%')
</if>
<if test=" param.dmtp!=null and param.dmtp!='' ">
and bsin.DMTP=#{param.dmtp}
</if>
<if test=" param.rsfn!=null and param.rsfn!='' ">
and bsin.RSFN=#{param.rsfn}
</if>
<if test=" param.rsvrtp!=null">
and hych.RSVRTP=#{param.rsvrtp}
</if>
<if test=" param.areaCode!=null">
and bsin.ADDVCD like concat(#{param.areaCode},'%')
</if>
</select>
</mapper>

7
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StRsrHychMapper.java

@ -1,7 +0,0 @@
package com.hnac.hzims.baseinfo.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.baseinfo.entity.StRsrHych;
public interface StRsrHychMapper extends BaseMapper<StRsrHych> {
}

4
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StZvarlBMapper.java

@ -1,14 +1,12 @@
package com.hnac.hzims.baseinfo.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.baseinfo.entity.StZvarlB;
import com.hnac.hzims.baseinfo.entity.StZvarlBExample;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface StZvarlBMapper extends BaseMapper<StZvarlB> {
public interface StZvarlBMapper {
int deleteByPrimaryKey(Integer id);
int insert(StZvarlB record);

25
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/IGateInfoService.java

@ -1,25 +0,0 @@
package com.hnac.hzims.baseinfo.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.baseinfo.entity.IrrBDGate;
import com.hnac.hzims.baseinfo.entity.IrrBDGateRefData;
import java.util.List;
public interface IGateInfoService extends IService<IrrBDGate> {
boolean addGate(IrrBDGate irrBDGate);
int updateGate(IrrBDGate irrBDGate);
IPage<IrrBDGate> selectGate(IrrBDGate irrBDGate, IPage<IrrBDGate> page);
int addGateRef(IrrBDGateRefData irrBDGateRefdata);
int deleteGateRef(String gateCode);
int updateGateRef(IrrBDGateRefData irrBDGateRefdata);
IrrBDGateRefData detailRef(String gateCode);
List<IrrBDGate> list(IrrBDGate irrBDGate);
}

11
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/IStRsrBsinService.java

@ -1,11 +0,0 @@
package com.hnac.hzims.baseinfo.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.baseinfo.entity.StRsrBsin;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
import java.util.Map;
public interface IStRsrBsinService extends BaseService<StRsrBsin> {
}

10
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/IStRsrHychService.java

@ -1,10 +0,0 @@
package com.hnac.hzims.baseinfo.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hnac.hzims.baseinfo.entity.StRsrHych;
public interface IStRsrHychService {
StRsrHych getOne(QueryWrapper<StRsrHych> wrapper);
}

3
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/StZvarlBService.java

@ -1,6 +1,5 @@
package com.hnac.hzims.baseinfo.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.baseinfo.entity.StZvarlB;
import org.springblade.core.tool.api.R;
@ -11,8 +10,6 @@ import java.util.List;
public interface StZvarlBService {
List<StZvarlB> list(LambdaQueryWrapper<StZvarlB> wrapper);
IPage<StZvarlB> bindStZvarlBs(String stcd, IPage<StZvarlB> page);
R addOrEditStZvarlB(StZvarlB stZvarlB);

75
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/GateInfoServiceImpl.java

@ -1,75 +0,0 @@
package com.hnac.hzims.baseinfo.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.baseinfo.entity.IrrBDGate;
import com.hnac.hzims.baseinfo.entity.IrrBDGateRefData;
import com.hnac.hzims.baseinfo.mapper.IrrBDGateMapper;
import com.hnac.hzims.baseinfo.mapper.IrrBDGateRefDataMapper;
import com.hnac.hzims.baseinfo.service.IGateInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class GateInfoServiceImpl extends ServiceImpl<IrrBDGateMapper, IrrBDGate> implements IGateInfoService {
@Autowired
IrrBDGateMapper irrBDGateMapper;
@Autowired
IrrBDGateRefDataMapper irrBDGateRefDataMapper;
@Override
public boolean addGate(IrrBDGate irrBDGate) {
return this.save(irrBDGate);
}
@Override
public int updateGate(IrrBDGate irrBDGate) {
//编辑时如果站点更换清除之前数据配置
IrrBDGate judgeGate = this.getById(irrBDGate.getId());
this.updateById(irrBDGate);
if (!irrBDGate.getCreateDept().equals(judgeGate.getCreateDept())) {
irrBDGateRefDataMapper.deleteByPrimaryKey(irrBDGate.getStrobeCode());
}
return 1;
}
@Override
public IPage<IrrBDGate> selectGate(IrrBDGate irrBDGate, IPage<IrrBDGate> page) {
IPage<IrrBDGate> irrBDGates = irrBDGateMapper.selectByExample(irrBDGate, page);
return irrBDGates;
}
@Override
public int addGateRef(IrrBDGateRefData irrBDGateRefdata) {
int i = irrBDGateRefDataMapper.insertSelective(irrBDGateRefdata);
return i;
}
@Override
public int deleteGateRef(String gateCode) {
int i = irrBDGateRefDataMapper.deleteByPrimaryKey(gateCode);
return i;
}
@Override
public int updateGateRef(IrrBDGateRefData irrBDGateRefdata) {
int i = irrBDGateRefDataMapper.updateByPrimaryKeySelective(irrBDGateRefdata);
return i;
}
@Override
public IrrBDGateRefData detailRef(String gateCode) {
IrrBDGateRefData res = irrBDGateRefDataMapper.selectByPrimaryKey(gateCode);
return res;
}
@Override
public List<IrrBDGate> list(IrrBDGate irrBDGate) {
List<IrrBDGate> irrBDGates = irrBDGateMapper.selectByExample(irrBDGate);
return irrBDGates;
}
}

1
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/PreviewInfoServiceImpl.java

@ -37,6 +37,7 @@ public class PreviewInfoServiceImpl extends ServiceImpl<PreviewInfoMapper, Previ
queryWrapper.eq(StringUtils.isNotBlank(stcd), "a.stcd", stcd);
queryWrapper.ge(StringUtils.isNotBlank(createTimeS), "a.create_time", createTimeS);
queryWrapper.le(StringUtils.isNotBlank(createTimeE), "a.create_time", createTimeE);
queryWrapper.orderByDesc("a.create_time");
IPage<PreviewInfo> previewInfosPage = previewInfoMapper.queryList(pageParam,queryWrapper);
List<PreviewInfo> previewInfos = previewInfosPage.getRecords();
if (CollectionUtils.isNotEmpty(previewInfos)) {

3
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/ReservoirDataServiceImpl.java

@ -73,6 +73,9 @@ public class ReservoirDataServiceImpl implements IReservoirDataService {
}
po.setSignages(signages);
Result<List<FieldsData>> result=realDataSearchClient.getRealDataByDeviceCode(po);
if(result==null || !result.isSuccess()){
return null;
}
return result.getData();
}

19
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/StRsrBsinServiceImpl.java

@ -1,19 +0,0 @@
package com.hnac.hzims.baseinfo.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.baseinfo.entity.StRsrBsin;
import com.hnac.hzims.baseinfo.mapper.StRsrBsinMapper;
import com.hnac.hzims.baseinfo.service.IStRsrBsinService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class StRsrBsinServiceImpl extends BaseServiceImpl<StRsrBsinMapper, StRsrBsin> implements IStRsrBsinService {
}

23
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/StRsrHychServiceImpl.java

@ -1,23 +0,0 @@
package com.hnac.hzims.baseinfo.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hnac.hzims.baseinfo.entity.StRsrHych;
import com.hnac.hzims.baseinfo.mapper.StRsrHychMapper;
import com.hnac.hzims.baseinfo.service.IStRsrHychService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class StRsrHychServiceImpl implements IStRsrHychService {
@Resource
StRsrHychMapper stRsrHychMapper;
@Override
public StRsrHych getOne(QueryWrapper<StRsrHych> wrapper) {
return stRsrHychMapper.selectOne(wrapper);
}
}

6
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/StZvarlBServiceImpl.java

@ -1,9 +1,7 @@
package com.hnac.hzims.baseinfo.service.impl;
import com.alibaba.druid.util.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.baseinfo.entity.StZvarlB;
import com.hnac.hzims.baseinfo.mapper.StZvarlBMapper;
import com.hnac.hzims.baseinfo.service.StZvarlBService;
@ -23,10 +21,6 @@ public class StZvarlBServiceImpl implements StZvarlBService {
@Override
public List<StZvarlB> list(LambdaQueryWrapper<StZvarlB> wrapper) {
return stZvarlBMapper.selectList(wrapper);
}
@Override
public IPage<StZvarlB> bindStZvarlBs(String stcd, IPage<StZvarlB> page) {
IPage<StZvarlB> records = stZvarlBMapper.selectByStcd(stcd, page);
return records;

32
hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/wrapper/StRsrBsinWrapper.java

@ -1,32 +0,0 @@
package com.hnac.hzims.baseinfo.wrapper;
import com.hnac.hzims.baseinfo.entity.StRsrBsin;
import com.hnac.hzims.baseinfo.vo.StRsrBsinVo;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.system.cache.RegionCache;
import org.springblade.system.entity.Region;
import java.util.Objects;
public class StRsrBsinWrapper extends BaseEntityWrapper<StRsrBsin, StRsrBsinVo> {
public StRsrBsinWrapper() {
}
public static StRsrBsinWrapper build() {
return new StRsrBsinWrapper();
}
@Override
public StRsrBsinVo entityVO(StRsrBsin entity) {
if(entity == null){
return null;
}
StRsrBsinVo stRsrBsinVo = Objects.requireNonNull(BeanUtil.copy(entity, StRsrBsinVo.class));
Region region=RegionCache.getByCode(entity.getAddvcd());
if(region!=null) {
stRsrBsinVo.setAddvcdnm(region.getName());
}
return stRsrBsinVo;
}
}

34
hzims-service/base-info/src/main/resources/application-dev.yml

@ -1,30 +1,4 @@
##服务器端口
#server:
# port: 8200
#
##数据源配置
##spring:
## datasource:
## url: ${blade.datasource.dev.url}
## username: ${blade.datasource.dev.username}
## password: ${blade.datasource.dev.password}
#
#spring:
# #排除DruidDataSourceAutoConfigure
# autoconfigure:
# exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
# datasource:
# dynamic:
# #设置默认的数据源或者数据源组,默认值即为master
# primary: master
# datasource:
# master:
# url: jdbc:mysql://127.0.0.1:3306/equipment?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
# username: root
# password: 123456
# slave:
# url: jdbc:mysql://127.0.0.1:3306/equipment?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
# username: root
# password: 123456
#demo:
# name: aaa
#服务器端口
server:
port: 8203

52
hzims-service/base-info/src/main/resources/application-prod.yml

@ -1,28 +1,28 @@
##服务器端口
#server:
# port: 8200
#
##数据源配置
##spring:
## datasource:
## url: ${blade.datasource.prod.url}
## username: ${blade.datasource.prod.username}
## password: ${blade.datasource.prod.password}
#
#服务器端口
server:
port: 8200
#数据源配置
#spring:
# #排除DruidDataSourceAutoConfigure
# autoconfigure:
# exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
# datasource:
# dynamic:
# #设置默认的数据源或者数据源组,默认值即为master
# primary: master
# datasource:
# master:
# url: ${blade.datasource.demo.master.url}
# username: ${blade.datasource.demo.master.username}
# password: ${blade.datasource.demo.master.password}
# slave:
# url: ${blade.datasource.demo.slave.url}
# username: ${blade.datasource.demo.slave.username}
# password: ${blade.datasource.demo.slave.password}
# url: ${blade.datasource.prod.url}
# username: ${blade.datasource.prod.username}
# password: ${blade.datasource.prod.password}
spring:
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
dynamic:
#设置默认的数据源或者数据源组,默认值即为master
primary: master
datasource:
master:
url: ${blade.datasource.demo.master.url}
username: ${blade.datasource.demo.master.username}
password: ${blade.datasource.demo.master.password}
slave:
url: ${blade.datasource.demo.slave.url}
username: ${blade.datasource.demo.slave.username}
password: ${blade.datasource.demo.slave.password}

8
hzims-service/base-info/src/main/resources/application.yml

@ -1,11 +1,3 @@
spring:
profiles:
active: dev
# datasource:
# url: jdbc:mysql://175.6.40.67:50311/blade_huoshan_business?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
# username: root
# password: 123
# driver-class-name: com.mysql.jdbc.Driver
#mybatis-plus配置
mybatis-plus:
mapper-locations: classpath:com/hnac/hzims/**/mapper/*Mapper.xml

2
hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/DamSafetyDataServiceImpl.java

@ -812,7 +812,7 @@ public class DamSafetyDataServiceImpl implements IDamSafetyDataService {
AnalyseCodeByAnalyseDataPO analyse = this.analyseParam(device,hydrograph.getAccessRules(),signages.stream().map(AnalyzeInstanceFieldVO::getSignage).collect(Collectors.toList()), hydrograph.getBeginTime(),hydrograph.getEndTime(),hydrograph.getDateType());
// 调用降维接口
Result<List<AnalyzeDataConditionVO>> result = analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(analyse);
if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){
if(result ==null || !result.isSuccess() || CollectionUtil.isEmpty(result.getData())){
continue;
}
// 结构数据转换

4
hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/BaseInfoController.java

@ -5,10 +5,6 @@ import com.hnac.hzims.baseinfo.util.CommonUtil;
import com.hnac.hzims.equipment.entity.EmOreanizationEntity;
import com.hnac.hzims.equipment.entity.EmTreeNode;
import com.hnac.hzims.equipment.vo.EmInfoVO;
import com.hnac.hzims.hzimsweather.response.weather.HeWeatherWeatherDailyResponse;
import com.hnac.hzims.hzimsweather.response.weather.HeWeatherWeatherNowResponse;
import com.hnac.hzims.hzimsweather.vo.RainFallCountByMonthVo;
import com.hnac.hzims.message_alarm.entity.MessageReceiveStatusInfo;
import com.hnac.hzims.twindisplay.service.IDigitalBaseInfoService;
import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData;
import io.swagger.annotations.*;

1
hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/PlanTaskController.java

@ -9,7 +9,6 @@ import com.hnac.hzinfo.inspect.task.feign.ITaskClient;
import com.hnac.hzinfo.inspect.task.vo.TaskListQuery;
import com.hnac.hzinfo.inspect.task.vo.TaskVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

2
hzims-service/digital-twin-display/src/main/resources/application-dev.yml

@ -1,6 +1,6 @@
#服务器端口
server:
port: 8200
port: 8206
#数据源配置
#spring:

194
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmOreanizationController.java

@ -1,194 +0,0 @@
package com.hnac.hzims.equipment.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.equipment.entity.EmInfoEntity;
import com.hnac.hzims.equipment.entity.EmTreeNode;
import com.hnac.hzims.equipment.service.IEmInfoService;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.apache.commons.lang3.StringUtils;
import org.springblade.core.boot.ctrl.BladeController;
import com.hnac.hzims.common.constant.CommonConstant;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.node.ForestNodeMerger;
import org.springblade.core.tool.node.INode;
import org.springblade.core.tool.node.TreeNode;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import springfox.documentation.annotations.ApiIgnore;
import com.hnac.hzims.equipment.entity.EmOreanizationEntity;
import com.hnac.hzims.equipment.vo.EmOreanizationVO;
import com.hnac.hzims.equipment.wrapper.EmOreanizationWrapper;
import com.hnac.hzims.equipment.service.IEmOreanizationService;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* 设备组织控制器
*
* @author moze
*/
@RestController
@AllArgsConstructor
@RequestMapping("/em/oreanization")
@Api(value = "设备组织结构", tags = "设备组织结构")
public class EmOreanizationController extends BladeController {
private final IEmOreanizationService em_oreanizationService;
private final IEmInfoService emInfoService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入ID")
public R<EmOreanizationEntity> detail(@ApiParam(value = "主键", required = true) @RequestParam String id) {
EmOreanizationEntity detail = em_oreanizationService.getById(Func.toLong(id));
return R.data(detail);
}
/**
* 加载当前站点设备的组织结构
*/
/*@GetMapping("/initLoad")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "初始化加载", notes = "加载当前站点设备的组织结构")
public R<List<TreeNode>> init() {
return R.data(em_oreanizationService.initLoad(AuthUtil.getTenantId()));
}*/
@ApiOperation("获取目录树形结构")
@GetMapping("/initLoad")
public R<List<EmTreeNode>> getStructTree() {
return em_oreanizationService.groupTree();
}
/**
* 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "新增", notes = "传入em_oreanization")
public R save(@Valid @RequestBody EmOreanizationEntity em_oreanization) {
if (StringUtil.isNotBlank(em_oreanization.getPid() + "")) {
List<EmOreanizationEntity> emOreanizationEntities = em_oreanizationService.list(new QueryWrapper<EmOreanizationEntity>() {{
//eq("PID", em_oreanization.getPid());
eq("NAME", em_oreanization.getName());
}});
if (CollectionUtil.isNotEmpty(emOreanizationEntities)) {
return R.fail("名称已存在!");
}
}
em_oreanization.setSort(em_oreanizationService.sort(em_oreanization.getPid()));
return R.status(em_oreanizationService.save(em_oreanization));
}
/**
* 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "修改", notes = "传入em_oreanization")
public R update(@Valid @RequestBody EmOreanizationEntity em_oreanization) {
List<EmOreanizationEntity> list = em_oreanizationService.list(new QueryWrapper<EmOreanizationEntity>() {{
eq("ID", em_oreanization.getId());
eq("NAME", em_oreanization.getName());
}});
if (CollectionUtil.isEmpty(list)) {
List<EmOreanizationEntity> emOreanizationEntities = em_oreanizationService.list(new QueryWrapper<EmOreanizationEntity>() {{
eq("PID", em_oreanization.getPid());
eq("NAME", em_oreanization.getName());
}});
if (CollectionUtil.isNotEmpty(emOreanizationEntities)) {
return R.fail("同级名称已存在!");
}
}
return R.status(em_oreanizationService.updateOrg(em_oreanization));
}
/**
* 备用-新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "新增或修改", notes = "传入em_oreanization")
public R submit(@Valid @RequestBody EmOreanizationEntity em_oreanization) {
if (StringUtil.isNotBlank(em_oreanization.getPid() + "")) {
List<EmOreanizationEntity> emOreanizationEntities = em_oreanizationService.list(new QueryWrapper<EmOreanizationEntity>() {{
eq("NAME", em_oreanization.getName());
eq("PID", em_oreanization.getPid());
}});
if (CollectionUtil.isNotEmpty(emOreanizationEntities)) {
return R.fail("同级名称已存在!");
}
}
return R.status(em_oreanizationService.saveOrUpdate(em_oreanization));
}
/**
* 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
String[] split = ids.split(",");
for (String id : split) {
List<EmOreanizationEntity> isThere = em_oreanizationService.list(new QueryWrapper<EmOreanizationEntity>() {{
eq("PID", id);
}});
if (CollectionUtil.isNotEmpty(isThere)) {
return R.fail("请先删除子组织");
}
List<EmInfoEntity> refOreanization = emInfoService.list(new QueryWrapper<EmInfoEntity>() {{
eq("REF_OREANIZATION", id);
}});
if (CollectionUtil.isNotEmpty(refOreanization)) {
return R.fail("请先删除设备信息");
}
}
return R.status(em_oreanizationService.deleteLogic(Func.toLongList(ids)));
}
/**
* 下移
*/
@PostMapping("/down")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "下移", notes = "传入ID")
public R down(@ApiParam(value = "主键", required = true) @RequestParam String id1, @ApiParam(value = "主键", required = true) @RequestParam String id2) {
return R.status(em_oreanizationService.translocation(Func.toLong(id1), Func.toLong(id2)));
}
/**
* 上移
*/
@PostMapping("/up")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "上移", notes = "传入ID")
public R up(@ApiParam(value = "主键", required = true) @RequestParam String id1, @ApiParam(value = "主键", required = true) @RequestParam String id2) {
return R.status(em_oreanizationService.translocation(Func.toLong(id1), Func.toLong(id2)));
}
}

25
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/EmInfoClient.java

@ -67,6 +67,31 @@ public class EmInfoClient implements IEmInfoClient {
return service.list();
}
@Override
public R<List<EmInfoEntity>> listByRefOreanization(Long refOreanization) {
return R.data(service.list(new LambdaQueryWrapper<EmInfoEntity>() {{
eq(EmInfoEntity::getRefOreanization, refOreanization);
}}));
}
@Override
public EmInfoVO getByEquipmentId(Long id) {
EmInfoVO vo=new EmInfoVO();
vo.setInfo(service.getById(id));
LambdaQueryWrapper<EmInfoEntity> wrapper=new LambdaQueryWrapper<>();
wrapper.eq(EmInfoEntity::getGpid,id);
List<EmInfoEntity> child=service.list(wrapper);
vo.setChildren(child);
LambdaQueryWrapper<EmAttachEntity> wrapper1=new LambdaQueryWrapper<>();
wrapper1.eq(EmAttachEntity::getEmId,id);
vo.setAttachs(attachService.list(wrapper1));
LambdaQueryWrapper<EmParamEntity> wrapper2=new LambdaQueryWrapper<>();
wrapper2.eq(EmParamEntity::getInfoId,id);
vo.setParams(paramService.list(wrapper2));
return vo;
}
@GetMapping(value = GET_EM_CODE_BY_DEPT_ID)
@Override
public R<List<String>> getEmCodeByDeptId(Long deptId) {

4
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/EmOreanizationClient.java

@ -2,7 +2,7 @@ package com.hnac.hzims.equipment.feign;
import com.hnac.hzims.equipment.entity.EmOreanizationEntity;
import com.hnac.hzims.equipment.entity.EmTreeNode;
import com.hnac.hzims.equipment.service.IEmOreanizationService;
import com.hnac.hzims.equipment.service.IEmOrganizationService;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -26,7 +26,7 @@ import java.util.List;
@Slf4j
public class EmOreanizationClient implements IEmOreanizationClient {
private final IEmOreanizationService em_oreanizationService;
private final IEmOrganizationService em_oreanizationService;
@Override
@GetMapping(INIT_LOAD)

21
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmOreanizationMapper.java

@ -1,21 +0,0 @@
package com.hnac.hzims.equipment.mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import com.hnac.hzims.equipment.entity.EmOreanizationEntity;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import org.springblade.core.tool.node.TreeNode;
import java.util.List;
/**
* Mapper 接口
*
* @author Chill
*/
public interface EmOreanizationMapper extends UserDataScopeBaseMapper<EmOreanizationEntity> {
@UserDataAuth
List<TreeNode> selectTreeList(String tenantId);
int selectMaxSort(Long pid);
}

47
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmOreanizationMapper.xml

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.equipment.mapper.EmOreanizationMapper">
<!-- 通用查询映射结果 -->
<resultMap id="em_oreanizationResultMap" type="com.hnac.hzims.equipment.entity.EmOreanizationEntity">
<result column="ID" property="id"/>
<result column="PID" property="pid"/>
<result column="STATUS" property="status"/>
<result column="NAME" property="name"/>
<result column="TYPE_CODE" property="typeCode"/>
<result column="SORT" property="sort"/>
<result column="REMARK" property="remark"/>
<result column="TENANT_ID" property="tenantId"/>
<result column="CREATE_TIME" property="createTime"/>
<result column="UPDATE_TIME" property="updateTime"/>
<result column="CREATE_USER" property="createUser"/>
<result column="UPDATE_USER" property="updateUser"/>
<result column="IS_DELETED" property="isDeleted"/>
<result column="CREATE_DEPT" property="createDept"/>
</resultMap>
<select id="selectTreeList" resultType="org.springblade.core.tool.node.TreeNode" parameterType="string">
SELECT
ID AS 'key',
PID AS parentId,
NAME AS title,
ID AS 'value',
Id,
CREATE_USER,
CREATE_DEPT
FROM
HZIMS_EM_OREANIZATION
WHERE IS_DELETED=0
and TENANT_ID = #{tenantId}
ORDER BY
PID,
SORT
</select>
<select id="selectMaxSort" resultType="integer">
SELECT IFNULL(MAX(SORT),0)
FROM HZIMS_EM_OREANIZATION
WHERE PID=#{pid}
</select>
</mapper>

10
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/em_attach.sql

@ -1,10 +0,0 @@
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563307857514502', 0, 'equipment', 'em_attach', 'menu', '/equipment/em_attach', NULL, 1, 1, 0, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563307857514503', '1369563307857514502', 'em_attach_add', '新增', 'add', '/equipment/em_attach/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563307857514504', '1369563307857514502', 'em_attach_edit', '修改', 'edit', '/equipment/em_attach/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563307857514505', '1369563307857514502', 'em_attach_delete', '删除', 'delete', '/api/equipment/em_attach/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563307857514506', '1369563307857514502', 'em_attach_view', '查看', 'view', '/equipment/em_attach/view', 'file-text', 4, 2, 2, 1, NULL, 0);

10
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/em_info.sql

@ -1,10 +0,0 @@
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563306376925191', 0, 'equipment', 'em_info', 'menu', '/equipment/em_info', NULL, 1, 1, 0, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563306376925192', '1369563306376925191', 'em_info_add', '新增', 'add', '/equipment/em_info/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563306376925193', '1369563306376925191', 'em_info_edit', '修改', 'edit', '/equipment/em_info/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563306376925194', '1369563306376925191', 'em_info_delete', '删除', 'delete', '/api/equipment/em_info/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563306376925195', '1369563306376925191', 'em_info_view', '查看', 'view', '/equipment/em_info/view', 'file-text', 4, 2, 2, 1, NULL, 0);

10
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/em_model.sql

@ -1,10 +0,0 @@
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369816257129451526', 0, 'equipment', 'em_model', 'menu', '/equipment/em_model', NULL, 1, 1, 0, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369816257129451527', '1369816257129451526', 'em_model_add', '新增', 'add', '/equipment/em_model/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369816257129451528', '1369816257129451526', 'em_model_edit', '修改', 'edit', '/equipment/em_model/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369816257129451529', '1369816257129451526', 'em_model_delete', '删除', 'delete', '/api/equipment/em_model/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369816257129451530', '1369816257129451526', 'em_model_view', '查看', 'view', '/equipment/em_model/view', 'file-text', 4, 2, 2, 1, NULL, 0);

10
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/em_model_param.sql

@ -1,10 +0,0 @@
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563308268556289', 0, 'equipment', 'em_model_param', 'menu', '/equipment/em_model_param', NULL, 1, 1, 0, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563308268556290', '1369563308268556289', 'em_model_param_add', '新增', 'add', '/equipment/em_model_param/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563308268556291', '1369563308268556289', 'em_model_param_edit', '修改', 'edit', '/equipment/em_model_param/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563308268556292', '1369563308268556289', 'em_model_param_delete', '删除', 'delete', '/api/equipment/em_model_param/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563308268556293', '1369563308268556289', 'em_model_param_view', '查看', 'view', '/equipment/em_model_param/view', 'file-text', 4, 2, 2, 1, NULL, 0);

10
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/em_oreanization.sql

@ -1,10 +0,0 @@
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563305466761217', 0, 'equipment', 'em_oreanization', 'menu', '/equipment/em_oreanization', NULL, 1, 1, 0, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563305466761218', '1369563305466761217', 'em_oreanization_add', '新增', 'add', '/equipment/em_oreanization/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563305466761219', '1369563305466761217', 'em_oreanization_edit', '修改', 'edit', '/equipment/em_oreanization/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563305466761220', '1369563305466761217', 'em_oreanization_delete', '删除', 'delete', '/api/equipment/em_oreanization/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563305466761221', '1369563305466761217', 'em_oreanization_view', '查看', 'view', '/equipment/em_oreanization/view', 'file-text', 4, 2, 2, 1, NULL, 0);

10
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/em_param.sql

@ -1,10 +0,0 @@
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563306804744193', 0, 'equipment', 'em_param', 'menu', '/equipment/em_param', NULL, 1, 1, 0, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563306804744194', '1369563306804744193', 'em_param_add', '新增', 'add', '/equipment/em_param/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563306804744195', '1369563306804744193', 'em_param_edit', '修改', 'edit', '/equipment/em_param/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563306804744196', '1369563306804744193', 'em_param_delete', '删除', 'delete', '/api/equipment/em_param/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1369563306804744197', '1369563306804744193', 'em_param_view', '查看', 'view', '/equipment/em_param/view', 'file-text', 4, 2, 2, 1, NULL, 0);

32
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/IEmOreanizationService.java

@ -1,32 +0,0 @@
package com.hnac.hzims.equipment.service;
import com.hnac.hzims.equipment.entity.EmTreeNode;
import com.hnac.hzims.equipment.vo.EmOreanizationVO;
import org.springblade.core.mp.base.BaseService;
import com.hnac.hzims.equipment.entity.EmOreanizationEntity;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.node.INode;
import org.springblade.core.tool.node.TreeNode;
import javax.validation.Valid;
import java.util.List;
/**
* 服务类
*
* @author moze
*/
public interface IEmOreanizationService extends BaseService<EmOreanizationEntity> {
List<TreeNode> initLoad(String tenantId);
boolean translocation(long id1, long id2);
boolean updateOrg(@Valid EmOreanizationEntity em_oreanization);
boolean saveOrg(@Valid EmOreanizationEntity em_oreanization);
R<List<EmTreeNode>> groupTree();
Integer sort(Long id);
}

162
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmOreanizationServiceImpl.java

@ -1,162 +0,0 @@
package com.hnac.hzims.equipment.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hnac.hzims.equipment.entity.EmTreeNode;
import org.springblade.core.mp.base.BaseServiceImpl;
import com.hnac.hzims.equipment.entity.EmOreanizationEntity;
import com.hnac.hzims.equipment.mapper.EmOreanizationMapper;
import com.hnac.hzims.equipment.service.IEmOreanizationService;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.node.ForestNodeMerger;
import org.springblade.core.tool.node.TreeNode;
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* 服务实现类
*
* @author Chill
*/
@Service
public class EmOreanizationServiceImpl extends BaseServiceImpl<EmOreanizationMapper, EmOreanizationEntity> implements IEmOreanizationService {
@Autowired
private EmOreanizationMapper oreanizationMapper;
@Override
public List<TreeNode> initLoad(String tenantId) {
List<TreeNode> treeList = oreanizationMapper.selectTreeList(tenantId);
return ForestNodeMerger.merge(treeList);
}
@Override
public boolean translocation(long id1, long id2) {
EmOreanizationEntity org1 = this.getById(id1);
EmOreanizationEntity org2 = this.getById(id2);
boolean flag = false;
if(Func.isNotEmpty(org1) && Func.isNotEmpty(org2)){
Integer sort = org1.getSort();
org1.setSort(org2.getSort());
org2.setSort(sort);
List<EmOreanizationEntity> rows = new ArrayList<EmOreanizationEntity>();
rows.add(org1);
rows.add(org2);
flag = this.updateBatchById(rows);
}else {
flag = false;
}
return flag;
}
@Override
public boolean updateOrg(@Valid EmOreanizationEntity em_oreanization) {
EmOreanizationEntity temp = this.getById(em_oreanization.getId());
// 处理序号问题
if(Func.isNotEmpty(temp)
&& temp.getPid() != null
&& em_oreanization.getPid() != null
&& temp.getPid().longValue() != em_oreanization.getPid().longValue()){
int maxSort = oreanizationMapper.selectMaxSort(em_oreanization.getPid()) + 1;
em_oreanization.setSort(maxSort);
return this.updateById(em_oreanization);
}else {
return this.updateById(em_oreanization);
}
}
@Override
public boolean saveOrg(EmOreanizationEntity em_oreanization) {
int maxSort = oreanizationMapper.selectMaxSort(em_oreanization.getPid()) + 1;
em_oreanization.setSort(maxSort);
int cnt = oreanizationMapper.insert(em_oreanization);
return cnt > 0;
}
@Override
public R<List<EmTreeNode>> groupTree() {
QueryWrapper<EmOreanizationEntity> queryWrapper = new QueryWrapper<EmOreanizationEntity>() {{
eq("PID",0);
}};
queryWrapper.orderByAsc("PID","SORT");
//数据库里所有pid为空的为根节点组织
List<EmOreanizationEntity> structs = oreanizationMapper.selectList(queryWrapper);
//查询所有数据 ListAll
QueryWrapper<EmOreanizationEntity> queryWrapper2 = new QueryWrapper<EmOreanizationEntity>() {{
}};
queryWrapper2.orderByAsc("PID","SORT");
List<EmOreanizationEntity> resultList = oreanizationMapper.selectList(queryWrapper2);
//把组织信息换成节点
List<EmTreeNode> rootNodes = new ArrayList<>();
for (EmOreanizationEntity struct : structs) {
EmTreeNode treeNode = new EmTreeNode();
treeNode.setId(struct.getId());
treeNode.setParentId(struct.getPid());
treeNode.setTitle(struct.getName());
treeNode.setLevel(1);
rootNodes.add(groupToNode(treeNode));
}
//生成树
List<EmTreeNode> nodeList = createGroupAndStationTree(resultList, rootNodes);
return R.data(nodeList);
}
@Override
public Integer sort(Long id) {
return oreanizationMapper.selectMaxSort(id) + 1;
}
private EmTreeNode groupToNode(EmTreeNode treeNode) {
if (Objects.isNull(treeNode)) {
return null;
}
return treeNode;
}
public List<EmTreeNode> createGroupAndStationTree(List<EmOreanizationEntity> resultList, List<EmTreeNode> rootNodes) {
if (rootNodes == null || rootNodes.size() < 1) {
return null;
}
//遍历根节点
for (EmTreeNode rootNode : rootNodes) {
//找到子节点
List<EmTreeNode> childNodes = listGroupNodeByPid(resultList,rootNode.getId()+"",rootNode.getLevel());
//如果没有数据了,就跳出循环
if (childNodes == null || childNodes.size() == 0) {
continue;
}
//遍历子节点
rootNode.setChildren(createGroupAndStationTree(resultList, childNodes));
}
return rootNodes;
}
public List<EmTreeNode> listGroupNodeByPid(List<EmOreanizationEntity> resultList, String id,Integer level){
List<EmTreeNode> childNodes = new ArrayList<>();
level = level+1;
for (EmOreanizationEntity struct : resultList) {
EmTreeNode treeNode = new EmTreeNode();
if(id.equals(struct.getPid()+"")){
treeNode.setId(struct.getId());
treeNode.setParentId(struct.getPid());
treeNode.setTitle(struct.getName());
treeNode.setLevel(level);
childNodes.add(treeNode);
}
}
return childNodes;
}
}

BIN
hzims-service/inspect/lib/blade-starter-oss-minio-2.7.3.RELEASE.jar

Binary file not shown.

10
hzims-service/inspect/pom.xml

@ -122,6 +122,8 @@
<groupId>org.springblade</groupId>
<artifactId>blade-starter-oss-minio</artifactId>
<version>2.7.3.RELEASE</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/blade-starter-oss-minio-2.7.3.RELEASE.jar</systemPath>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
@ -241,6 +243,14 @@
<!-- <artifactId>maven-antrun-plugin</artifactId>-->
<!-- </plugin>-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!--设置为true,以便把本地的system的jar也包括进来-->
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>

3
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/IObjectDangerService.java

@ -5,6 +5,7 @@ import org.springblade.core.mp.base.BaseService;
import com.hnac.hzinfo.inspect.obj.entity.ObjectDangerEntity;
import java.util.List;
import java.util.Map;
/**
@ -21,4 +22,6 @@ public interface IObjectDangerService extends BaseService<ObjectDangerEntity> {
*/
List<DangerSourceEntity> getDangerDetailByObjectId(Long objectId);
Map<Long,List<DangerSourceEntity>> getDangerDetail(List<Long> objectIds);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save