Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	hzims-service/message/src/main/resources/db/1.0.0.sql
zhongwei
haungxing 9 months ago
parent
commit
bd4ade0f0c
  1. 37
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmHandleConstant.java
  2. 30
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/show/vo/HandleQueryVo.java
  3. 2
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/early/entity/BusinessEarlyEntity.java
  4. 4
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/early/feign/BusinessEarlyClientFallback.java
  5. 4
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/early/feign/IBusinessEarlyClient.java
  6. 4
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/early/vo/BusinessEarlyVo.java
  7. 15
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/interruption/constants/InterruptionConstants.java
  8. 48
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/interruption/entity/InterruptionEntity.java
  9. 34
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/interruption/vo/InterruptionDetailVo.java
  10. 27
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/interruption/vo/InterruptionParamVo.java
  11. 19
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/interruption/vo/InterruptionStationVo.java
  12. 25
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/interruption/vo/InterruptionVo.java
  13. 9
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/constants/AlertDefectConfigConstant.java
  14. 41
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/AbnormalAlarmEntity.java
  15. 20
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/AlertDefectConfigEntity.java
  16. 50
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/HistoryAbnormalAlarmEntity.java
  17. 66
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/HistoryLevelAlarmEntity.java
  18. 44
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmDataVo.java
  19. 48
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmMergeVo.java
  20. 30
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmParamVo.java
  21. 31
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmReustVo.java
  22. 36
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlertVo.java
  23. 30
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/HandleQueryVo.java
  24. 42
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/HistoryAlarmVo.java
  25. 29
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/SoeParamVo.java
  26. 31
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/SoeReustVo.java
  27. 6
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java
  28. 423
      hzims-service/assets/src/main/resources/db/1.0.0.sql
  29. 15
      hzims-service/assets/src/main/resources/dict/dict.sql
  30. 5
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/controller/AlarmHandleController.java
  31. 7
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/controller/BusinessEarlyController.java
  32. 3
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/feign/BusinessEarlyClient.java
  33. 2
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/mapper/BusinessEarlyMapper.java
  34. 5
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/service/BusinessEarlyService.java
  35. 4
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/service/impl/BusinessEarlyServiceImpl.java
  36. 58
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/controller/InterruptionController.java
  37. 15
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/mapper/InterruptionMapper.java
  38. 11
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/mapper/InterruptionMapper.xml
  39. 24
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/service/InterruptionService.java
  40. 208
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/service/impl/InterruptionServiceImpl.java
  41. 222
      hzims-service/hzims-alarm/src/main/resources/db/1.0.0.sql
  42. 31
      hzims-service/hzims-alarm/src/main/resources/dict/dict.sql
  43. 73
      hzims-service/hzims-basic/src/main/resources/db/1.0.0.sql
  44. 0
      hzims-service/hzims-basic/src/main/resources/dict/dict.sql
  45. 226
      hzims-service/hzims-middle/src/main/resources/db/1.0.0.sql
  46. 56
      hzims-service/hzims-middle/src/main/resources/db/1.0.1.sql
  47. 1
      hzims-service/hzims-middle/src/main/resources/db/1.0.2.sql
  48. 0
      hzims-service/hzims-middle/src/main/resources/dict/dict.sql
  49. 12
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/alarm/InterruptionAlrmMapper.java
  50. 12
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/AlarmScheduledTask.java
  51. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/AlarmQueryService.java
  52. 12
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/InterruptionAlarmService.java
  53. 23
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmQueryServiceImpl.java
  54. 120
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/InterruptionAlarmServiceImpl.java
  55. 452
      hzims-service/message/src/main/resources/db/1.0.0.sql
  56. 28
      hzims-service/message/src/main/resources/dict/dict.sql
  57. 618
      hzims-service/safeproduct/src/main/resources/db/1.0.0.sql
  58. 12
      hzims-service/safeproduct/src/main/resources/db/1.0.1.sql
  59. 588
      hzims-service/safeproduct/src/main/resources/db/1.0.2.sql
  60. 36
      hzims-service/safeproduct/src/main/resources/dict/dict.sql
  61. 796
      hzims-service/ticket/src/main/resources/db/1.0.0.sql
  62. 173
      hzims-service/ticket/src/main/resources/db/2.0.0.sql
  63. 5
      hzims-service/ticket/src/main/resources/db/2.0.1.sql
  64. 0
      hzims-service/ticket/src/main/resources/dict/dict.sql
  65. 65
      hzims-service/weather/src/main/resources/db/1.0.0.sql
  66. 0
      hzims-service/weather/src/main/resources/dict/dict.sql

37
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmHandleConstant.java

@ -7,57 +7,20 @@ import java.util.List;
* @author YSJ
*/
public interface AlarmHandleConstant {
List<String> INTERRUPT_LIST = Arrays.asList("13","14");
List<String> TYPE_LIST = Arrays.asList("3","2","5","10","13","14");
List<Long> LONG_TYPE_LIST = Arrays.asList(3L,2L,5L,10L,13L,14L);
List<String> SEND_MESSSAGE_TYPE_LIST = Arrays.asList("3","13","14");
String LEVEL_TYPE_LIST = "3,2,5,10,13,14";
String SYSTEM_TYPE_LIST = "3,2,5,13,14";
/**通讯恢复*/
String ABNORMAL_STATUS = "1";
/**故障**/
String FAULT = "3";
/**预警**/
Long EARLY_WARNING = 20L;
String WEBSOCKET_FAULT = "3";
String[] TYPE_NAMES = {"默认", "系统", "告警"
, "故障", "用户操作", "遥测越限", "遥信变位", "注册信息", "信息提示", "设备巡检", "遥控操作", "遥测越限恢复","未定义","通讯中断","数据异常"};
/**误报 、延后、缺陷 、检修、处理*/
List<Long> HANDLE_WAY = Arrays.asList(1L,2L,3L,4L,5L);
List<Long> HANDLE = Arrays.asList(3L,4L,5L);
/**
* 2-告警,3-故障,5-遥测越限,13-通讯异常,14-数据异常
*/
List<Integer> SOE_TYPE_LIST = Arrays.asList(2,3,5,13,14);
/**
* 告警等级: 0 - 1级告警 1-二级告警
*/
List<String> LEVEL_LIST = Arrays.asList("0","1");
/**
* 告警类型: HZ3000告警
*/
Integer SYSTEM_ALARM = 0;
/**
* 告警类型: 智能告警
*/
Integer INTELLIGENCE_ALARM = 1;
/**
* 告警类型: 视频告警
*/
Integer VIDEO_ALARM = 4;

30
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/show/vo/HandleQueryVo.java

@ -0,0 +1,30 @@
package com.hnac.hzims.operational.alert.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author ysj
* @date 2023/03/17 10:02:33
* @version 4.0.0
*/
@Data
public class HandleQueryVo {
@ApiModelProperty("处理人")
private String stationCode;
@ApiModelProperty("处理人")
private Long handleUser;
@ApiModelProperty("开始时间")
private Date startTime;
@ApiModelProperty("结束时间")
private Date endTime;
@ApiModelProperty("处理类型:1-延后 2-误报 3-缺陷 4-检修")
private Long handleWay;
}

2
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/entity/BusinessEarlyEntity.java → hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/early/entity/BusinessEarlyEntity.java

@ -1,4 +1,4 @@
package com.hnac.hzims.business.entity;
package com.hnac.hzims.business.early.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;

4
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/feign/BusinessEarlyClientFallback.java → hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/early/feign/BusinessEarlyClientFallback.java

@ -1,6 +1,6 @@
package com.hnac.hzims.business.feign;
package com.hnac.hzims.business.early.feign;
import com.hnac.hzims.business.entity.BusinessEarlyEntity;
import com.hnac.hzims.business.early.entity.BusinessEarlyEntity;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Component;

4
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/feign/IBusinessEarlyClient.java → hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/early/feign/IBusinessEarlyClient.java

@ -1,7 +1,7 @@
package com.hnac.hzims.business.feign;
package com.hnac.hzims.business.early.feign;
import com.hnac.hzims.alarm.config.constants.AlarmConstants;
import com.hnac.hzims.business.entity.BusinessEarlyEntity;
import com.hnac.hzims.business.early.entity.BusinessEarlyEntity;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

4
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/vo/BusinessEarlyVo.java → hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/early/vo/BusinessEarlyVo.java

@ -1,6 +1,6 @@
package com.hnac.hzims.business.vo;
package com.hnac.hzims.business.early.vo;
import com.hnac.hzims.business.entity.BusinessEarlyEntity;
import com.hnac.hzims.business.early.entity.BusinessEarlyEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

15
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/interruption/constants/InterruptionConstants.java

@ -0,0 +1,15 @@
package com.hnac.hzims.business.interruption.constants;
import java.util.Arrays;
import java.util.List;
/**
* @author ysj
*/
public interface InterruptionConstants {
List<String> INTERRUPTION_TYPE = Arrays.asList("13","14");
/**通讯恢复*/
String ABNORMAL_STATUS = "1";
}

48
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/interruption/entity/InterruptionEntity.java

@ -0,0 +1,48 @@
package com.hnac.hzims.business.interruption.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.util.Date;
/**
* @author ysj
*/
@Data
@TableName("hzims_interruption_alarm")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "数据中断告警", description = "数据中断告警对象")
public class InterruptionEntity extends TenantEntity {
@ApiModelProperty("ID")
private Long id;
@ApiModelProperty("站点编码")
private String stationId;
@ApiModelProperty("站点名称")
private String stationName;
@ApiModelProperty("告警编码")
private Long alarmId;
@ApiModelProperty("检查点")
private String realId;
@ApiModelProperty("告警开始时间")
private Date alarmTime;
@ApiModelProperty("告警类型")
private String type;
@ApiModelProperty("状态")
private Integer status;
@ApiModelProperty("告警原因")
private String soeExplain;
}

34
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/interruption/vo/InterruptionDetailVo.java

@ -0,0 +1,34 @@
package com.hnac.hzims.business.interruption.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @author ysj
*/
@Data
@ApiModel(value = "数据中断统计", description = "数据中断统计对象")
public class InterruptionDetailVo {
@ApiModelProperty("站点编码")
private String stationId;
@ApiModelProperty("站点名称")
private String stationName;
@ApiModelProperty("中断类型")
private String type;
@ApiModelProperty("中断时长")
private Double duration;
@ApiModelProperty("开始时间")
private Date start;
@ApiModelProperty("结束时间")
private Date end;
}

27
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/interruption/vo/InterruptionParamVo.java

@ -0,0 +1,27 @@
package com.hnac.hzims.business.interruption.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author ysj
*/
@Data
@ApiModel(value = "数据中断参数对象", description = "数据中断参数对象")
public class InterruptionParamVo {
@ApiModelProperty("开始时间")
private String startTime;
@ApiModelProperty("结束时间")
private String endTime;
@ApiModelProperty("中断类型")
private List<String> type;
@ApiModelProperty("站点编码")
private String stationId;
}

19
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/interruption/vo/InterruptionStationVo.java

@ -0,0 +1,19 @@
package com.hnac.hzims.business.interruption.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author ysj
*/
@Data
@ApiModel(value = "数据中断站点", description = "数据中断站点")
public class InterruptionStationVo {
@ApiModelProperty("站点编码")
private String stationId;
@ApiModelProperty("站点名称")
private String stationName;
}

25
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/interruption/vo/InterruptionVo.java

@ -0,0 +1,25 @@
package com.hnac.hzims.business.interruption.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author ysj
*/
@Data
@ApiModel(value = "数据中断统计", description = "数据中断统计对象")
public class InterruptionVo {
@ApiModelProperty("站点编码")
private String stationId;
@ApiModelProperty("站点名称")
private String stationName;
@ApiModelProperty("中断次数")
private Integer count;
@ApiModelProperty("中断时长")
private Double duration;
}

9
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/constants/AlertDefectConfigConstant.java

@ -1,9 +0,0 @@
package com.hnac.hzims.operational.alert.constants;
/**
* @author YSJ
*/
public interface AlertDefectConfigConstant {
String ALERT_SOURCE_CODE = "XTGJ";
}

41
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/AbnormalAlarmEntity.java

@ -1,41 +0,0 @@
package com.hnac.hzims.operational.alert.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import java.util.Date;
@Data
@TableName("hzims_abnormal_alarm")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "数据中断告警对象")
public class AbnormalAlarmEntity extends BaseEntity {
@ApiModelProperty("站点编码")
private String stationId;
@ApiModelProperty("站点名称")
private String stationName;
@ApiModelProperty("检查点")
private String realId;
@ApiModelProperty("告警开始时间")
private Date startTime;
@ApiModelProperty("告警结束时间")
private Date endTime;
@ApiModelProperty("告警类型")
private String type;
@ApiModelProperty("状态")
private Integer status;
@ApiModelProperty("告警原因")
private String soeExplain;
}

20
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/AlertDefectConfigEntity.java

@ -1,20 +0,0 @@
package com.hnac.hzims.operational.alert.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author : YSJ
*/
@Data
public class AlertDefectConfigEntity {
@ApiModelProperty("主键ID")
private Integer id;
@ApiModelProperty("告警类型")
private Integer alertType;
@ApiModelProperty("是否开启缺陷保存 : 0-关闭 1 - 开启")
private Integer isOpen;
}

50
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/HistoryAbnormalAlarmEntity.java

@ -1,50 +0,0 @@
package com.hnac.hzims.operational.alert.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import java.util.Date;
/**
* @author ysj
*/
@Data
@TableName("hzims_history_abnormal_alarm")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "数据中断告警对象")
public class HistoryAbnormalAlarmEntity extends BaseEntity {
@ApiModelProperty("ID")
private Long id;
@ApiModelProperty("站点编码")
private String stationId;
@ApiModelProperty("站点名称")
private String stationName;
@ApiModelProperty("告警编码")
private Long alarmId;
@ApiModelProperty("检查点")
private String realId;
@ApiModelProperty("告警开始时间")
private Date startTime;
@ApiModelProperty("告警结束时间")
private Date endTime;
@ApiModelProperty("告警类型")
private String type;
@ApiModelProperty("状态")
private Integer status;
@ApiModelProperty("告警原因")
private String soeExplain;
}

66
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/HistoryLevelAlarmEntity.java

@ -1,66 +0,0 @@
package com.hnac.hzims.operational.alert.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import java.util.Date;
/**
* @author ysj
*/
@Data
@TableName("hzims_history_level_alarm")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "数据中断告警对象")
public class HistoryLevelAlarmEntity extends BaseEntity {
@ApiModelProperty("ID")
private Long id;
@ApiModelProperty("站点编码")
private String stationId;
@ApiModelProperty("站点名称")
private String stationName;
@ApiModelProperty("设备编码")
private String deviceCode;
@ApiModelProperty("设备名称")
private String deviceName;
@ApiModelProperty("告警等级")
private String alarmLevel;
@ApiModelProperty("告警编码")
private String alarmId;
@ApiModelProperty("检查点")
private String realId;
@ApiModelProperty("告警开始时间")
private Date alarmTime;
@ApiModelProperty("告警类型")
private String type;
@ApiModelProperty("状态")
private Integer status;
@ApiModelProperty("告警原因")
private String soeExplain;
@ApiModelProperty(value = "告警所属类型:0-系统告警 1-智能告警")
@TableField(exist=false)
private Integer alarmType;
@ApiModelProperty(value = "告警是否处理")
@TableField(exist=false)
private Boolean isHandle;
}

44
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmDataVo.java

@ -1,44 +0,0 @@
package com.hnac.hzims.operational.alert.vo;
import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author ysj
* @date 2023/03/23 14:06:27
* @version 4.0.0
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class AlarmDataVo extends SoeData {
@ApiModelProperty(value = "数量")
private Integer count;
@ApiModelProperty(value = "站点编号")
private String stationCode;
@ApiModelProperty(value = "站点名称")
private String stationName;
@ApiModelProperty(value = "内容")
private String content;
@ApiModelProperty(value = "是否绑定")
private Boolean isBinding;
@ApiModelProperty(value = "站点类型: 2-待运维 1-云服务")
private String serveType;
@ApiModelProperty(value = "告警类型")
private String type;
@ApiModelProperty(value = "告警所属类型:0-系统告警 1-智能告警")
private Integer alarmType;
@ApiModelProperty(value = "告警是否处理")
private Boolean isHandle;
}

48
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmMergeVo.java

@ -1,48 +0,0 @@
package com.hnac.hzims.operational.alert.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @author ysj
* @date 2023/03/17 10:02:33
* @version 4.0.0
*/
@Data
public class AlarmMergeVo{
@ApiModelProperty("站点编号")
private String stationCode;
@ApiModelProperty("站点名称")
private String stationName;
@ApiModelProperty("检测点位")
private String realId;
@ApiModelProperty("告警编号")
private String alarmCode;
@ApiModelProperty("告警等级")
private String level;
@ApiModelProperty("告警类型")
private String type;
@ApiModelProperty("类型:0-系统告警、2-智能告警")
private Integer alarmType;
@ApiModelProperty("告警内容")
private String content;
@ApiModelProperty("告警时间")
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
@JsonFormat(pattern = DateUtil.PATTERN_DATE)
private Date date;
}

30
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmParamVo.java

@ -1,30 +0,0 @@
package com.hnac.hzims.operational.alert.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author ysj
* @date 2023/03/23 13:34:37
* @version 4.0.0
*/
@Data
public class AlarmParamVo {
@ApiModelProperty(value = "查询开始时间:yyyy-MM-dd HH:mm:ss")
private String date;
@ApiModelProperty(value = "默认,系统,告警,故障,用户操作,遥测越限,遥信变位,注册信息,信息提示,设备巡检,遥控操作,遥测越限恢复,未定义,通讯中断,数据异常")
private String type;
@ApiModelProperty(value = "当前页码")
private Integer current;
@ApiModelProperty(value = "每页条目")
private Integer size;
@ApiModelProperty(value = "站点编码")
private String code;
}

31
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmReustVo.java

@ -1,31 +0,0 @@
package com.hnac.hzims.operational.alert.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.util.List;
/**
* @author ysj
* @date 2023/03/23 13:34:37
* @version 4.0.0
*/
@Data
public class AlarmReustVo {
@ApiModelProperty(value = "最新的时间")
private String date;
@ApiModelProperty(value = "告警数据")
private List<AlarmDataVo> soeList;
@ApiModelProperty(value = "数量统计")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Integer count;
@ApiModelProperty(value = "总条数")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Long total;
}

36
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlertVo.java

@ -1,36 +0,0 @@
package com.hnac.hzims.operational.alert.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 告警对象
*/
@Data
public class AlertVo {
@ApiModelProperty("主键Id")
private String id;
@ApiModelProperty("告警类型")
private String soeType;
@ApiModelProperty("告警状态")
private String soeStatus;
@ApiModelProperty("站点")
private String station;
@ApiModelProperty("事件未定义(通道:2 模块:1 点号:2006)")
private String soeExplain;
@ApiModelProperty("告警报警类型")
private String soeAlarmType;
@ApiModelProperty("监测点位")
private String realid;
@ApiModelProperty("时间")
private String ts;
}

30
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/HandleQueryVo.java

@ -1,30 +0,0 @@
package com.hnac.hzims.operational.alert.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author ysj
* @date 2023/03/17 10:02:33
* @version 4.0.0
*/
@Data
public class HandleQueryVo {
@ApiModelProperty("处理人")
private String stationCode;
@ApiModelProperty("处理人")
private Long handleUser;
@ApiModelProperty("开始时间")
private Date startTime;
@ApiModelProperty("结束时间")
private Date endTime;
@ApiModelProperty("处理类型:1-延后 2-误报 3-缺陷 4-检修")
private Long handleWay;
}

42
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/HistoryAlarmVo.java

@ -1,42 +0,0 @@
package com.hnac.hzims.operational.alert.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.base.BaseEntity;
import java.util.Date;
import java.util.List;
@Data
public class HistoryAlarmVo extends BaseEntity {
@ApiModelProperty("ID")
private Long id;
@ApiModelProperty("站点编码")
private String stationId;
@ApiModelProperty("站点名称")
private String stationName;
@ApiModelProperty("告警编码")
private Long alarmId;
@ApiModelProperty("检查点")
private String realId;
@ApiModelProperty("告警开始时间")
private Date startTime;
@ApiModelProperty("告警结束时间")
private Date endTime;
@ApiModelProperty("告警类型")
private List<String> type;
@ApiModelProperty("状态")
private Integer status;
@ApiModelProperty("告警原因")
private String soeExplain;
}

29
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/SoeParamVo.java

@ -1,29 +0,0 @@
package com.hnac.hzims.operational.alert.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author ysj
* @date 2023/03/23 13:34:37
* @version 4.0.0
*/
@Data
public class SoeParamVo {
@ApiModelProperty(value = "站点编码")
private String code;
@ApiModelProperty(value = "查询开始时间:yyyy-MM-dd HH:mm:ss")
private String date;
@ApiModelProperty(value = "2-告警,3-故障,5-遥测越限,13-通讯异常,14-数据异常")
private Integer type;
@ApiModelProperty(value = "当前页码")
private Integer current;
@ApiModelProperty(value = "每页条目")
private Integer size;
}

31
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/SoeReustVo.java

@ -1,31 +0,0 @@
package com.hnac.hzims.operational.alert.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.util.List;
/**
* @author ysj
* @date 2023/03/23 13:34:37
* @version 4.0.0
*/
@Data
public class SoeReustVo {
@ApiModelProperty(value = "最新的时间")
private String date;
@ApiModelProperty(value = "告警数据")
private List<AlarmDataVo> soeList;
@ApiModelProperty(value = "数量统计")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Integer count;
@ApiModelProperty(value = "总条数")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Long total;
}

6
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java

@ -64,9 +64,6 @@ public interface MainConstants {
// 运行月报告
String RUM_MONTH_REPORT = "runMonthReport";
// 站点数据统计
String STATION_DATA_COUNT = "stationDataCount";
// 集中监控数据处理
String CENTRALIZED_MONITORING = "centralizedMonitoring";
@ -82,9 +79,6 @@ public interface MainConstants {
// 站点实时数据
String REAL_TIME_DATA = "realTimeData";
// 通讯中断数据处理
String ALARM_DATA_HANDLE = "alarmDataHandle";
// 光伏站-机组指标数据
String LOAD_PHOTOVOLTAIC_TARGET = "loadPhotovoltaicTarget";

423
hzims-service/assets/src/main/resources/db/1.0.0.sql

@ -0,0 +1,423 @@
DROP TABLE IF EXISTS `BLADE_MODULE_VERSION`;
CREATE TABLE `BLADE_MODULE_VERSION` (
`MODULE_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`VERSION` VARCHAR(8) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`HISTORY` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
PRIMARY KEY (`MODULE_NAME`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_OPER_ACCESS_BASE_MATERIAL
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_OPER_ACCESS_BASE_MATERIAL`;
CREATE TABLE `HZIMS_OPER_ACCESS_BASE_MATERIAL` (
`ID` BIGINT(20) NOT NULL,
`NAME` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '名称',
`TYPE_CODE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '类型',
`MODEL` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '规格型号',
`UNIT` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '单位',
`PRICE` DECIMAL(11, 3) NULL DEFAULT NULL COMMENT '参考价',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '材料基础表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_ALLOCATION
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_ALLOCATION`;
CREATE TABLE `WT_SP_ALLOCATION` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '单据号',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '流程状态(1:待审批;3:审批通过;4:审批不通过)',
`RPOC_INS_ID` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作流实例ID',
`IN_WAREHOUSE_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '入库仓库',
`OUT_WAREHOUSE_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '出库仓库',
`REMARKS` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '物资调拨表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_BASIC
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_BASIC`;
CREATE TABLE `WT_SP_BASIC` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`MANAGEMENT_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '分类ID',
`NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '名称',
`CODE` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '编码',
`SPECIFICATIONS` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '规格',
`BRAND` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '品牌',
`UNIT` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '单位',
`WEIGHT` DECIMAL(10, 2) NULL DEFAULT NULL COMMENT '重量',
`PRICE` DECIMAL(10, 2) NULL DEFAULT NULL COMMENT '单价',
`UPPER_LIMIT` INT(10) NULL DEFAULT NULL COMMENT '库存上限',
`LOWER_LIMIT` INT(10) NULL DEFAULT NULL COMMENT '库存下限',
`IS_WASTE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '是否回收废品',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '业务状态',
`PARAMETER` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '主要参数',
`REMARKS` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
`CODE_NUMBER` BIGINT(20) NULL DEFAULT NULL COMMENT '序列号',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '物资台账表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_MANAGEMENT
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_MANAGEMENT`;
CREATE TABLE `WT_SP_MANAGEMENT` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '分类名称',
`PARENT_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '所属父级',
`ANCESTORS` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '祖级节点',
`GRADE` INT(11) NULL DEFAULT NULL COMMENT '节点等级',
`CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '分类编码',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '业务状态',
`TYPE` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '备品备件:1,工具:2',
`REMARKS` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
`CODE_NUMBER` BIGINT(20) NULL DEFAULT NULL COMMENT '序列号',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_PROVIDER
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_PROVIDER`;
CREATE TABLE `WT_SP_PROVIDER` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`ORGANIZATION_ID` BIGINT(20) UNSIGNED NULL DEFAULT 0 COMMENT '机构ID',
`ORGANIZATION_CODE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '机构编码',
`SCOPE_OF_SUPPLY` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '供货范围',
`SUPPLY_CYCLE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '供货周期',
`NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '名称',
`LOGOGRAM` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '名称缩写',
`SALESMAN` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '业务联系人',
`LEGAL_PERSON` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '法人代表',
`PHONE` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '电话',
`MOBILE_PHONE` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '手机',
`WEBSITE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '网址',
`ADDRESS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '地址',
`QUALIFIED_FLAG` INT(11) NULL DEFAULT 1 COMMENT '是否合格(0:否,1:是)',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(2) NULL DEFAULT NULL COMMENT '业务状态',
`REMARK` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`IS_DELETED` INT(2) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '供应商表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_RECEIVE
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_RECEIVE`;
CREATE TABLE `WT_SP_RECEIVE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '单据号',
`TICKET_CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工单ID',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '流程状态(1:待审批;3:审批通过;4:审批不通过)',
`RPOC_INS_ID` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作流实例ID',
`STORAGE_ROOM` BIGINT(20) NULL DEFAULT NULL COMMENT '仓库库房',
`REMARKS` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工具领用表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_RECEIVES
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_RECEIVES`;
CREATE TABLE `WT_SP_RECEIVES` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '单据号',
`TICKET_CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工单ID',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '流程状态(1:待审批;3:审批通过;4:审批不通过)',
`RPOC_INS_ID` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作流实例ID',
`STORAGE_ROOM` BIGINT(20) NULL DEFAULT NULL COMMENT '仓库库房',
`REMARKS` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
`VECEIVE_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '工具领用单ID',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_RECORD
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_RECORD`;
CREATE TABLE `WT_SP_RECORD` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`BUSINESS_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '业务表ID',
`AMOUNT` INT(11) NULL DEFAULT NULL COMMENT '数量AMOUNT',
`PRICE` DECIMAL(10, 2) NULL DEFAULT NULL COMMENT '价格',
`SP_BASIC_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '备品备件ID',
`WAREHOUSE_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '所属仓库',
`TYPE` INT(11) NULL DEFAULT NULL COMMENT '类型1:入库,2:出库,3:调拨,4:领用',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(2) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` INT(2) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_REVERT
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_REVERT`;
CREATE TABLE `WT_SP_REVERT` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '单据号',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '流程状态',
`RPOC_INS_ID` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作流实例ID',
`STORAGE_ROOM` BIGINT(20) NULL DEFAULT NULL COMMENT '仓库库房',
`AMOUNT` INT(11) NULL DEFAULT NULL COMMENT '数量',
`SP_BASIC_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '对应备件ID',
`NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '备品备件名称',
`REMARKS` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`CURRENT_OPERATOR` BIGINT(20) NULL DEFAULT NULL COMMENT '当前处理人',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_TICKET_RELATION
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_TICKET_RELATION`;
CREATE TABLE `WT_SP_TICKET_RELATION` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`ORDER_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '出库单ID',
`AMOUNT` INT(11) NULL DEFAULT NULL COMMENT '数量',
`TICKET` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工单号',
`REMARKS` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`SP_BASIC_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '备件ID',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(2) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` INT(2) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_TOOL_BASIC
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_TOOL_BASIC`;
CREATE TABLE `WT_SP_TOOL_BASIC` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`SP_BASIC_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '对应备件ID',
`QUALITY_GUARANTEE_PERIOD` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '保质期',
`PRODUCTION_PERIOD` DATETIME NULL DEFAULT NULL COMMENT '生产日期',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '领用时间',
`CREATE_USER` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '领用人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`ATACHMENT_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '类型(文件类型)',
`QUANTITY_RECEIVED` BIGINT(20) NULL DEFAULT NULL COMMENT '领用数量',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
`WAREHOUSE_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '所属仓库',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工具台账表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_TOTAL
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_TOTAL`;
CREATE TABLE `WT_SP_TOTAL` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`SP_BASIC_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '对应备件ID',
`MIN_STOCK` BIGINT(20) NULL DEFAULT NULL COMMENT '最低储备量',
`MAX_STOCK` BIGINT(20) NULL DEFAULT NULL COMMENT '最高储备量',
`STOCK` BIGINT(20) NULL DEFAULT NULL COMMENT '库存',
`IN_PRICE` DECIMAL(12, 2) NULL DEFAULT NULL COMMENT '最新入库单价',
`OUT_PRICE` DECIMAL(12, 2) NULL DEFAULT NULL COMMENT '最新出库单价',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '业务状态',
`OUT_STOCK` BIGINT(20) NULL DEFAULT NULL COMMENT '出库暂存',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
`WARNING_STOCK` BIGINT(20) NULL DEFAULT NULL COMMENT '警戒百分比',
`WAREHOUSE_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '所属仓库ID',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '库存清单表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_TYPE_DICTIONARIES
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_TYPE_DICTIONARIES`;
CREATE TABLE `WT_SP_TYPE_DICTIONARIES` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '分类名称',
`CODE` VARCHAR(10) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '编码',
`P_CODE` VARCHAR(10) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '上级编码',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_WAREHOUSE
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_WAREHOUSE`;
CREATE TABLE `WT_SP_WAREHOUSE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`ADDRESS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '地址',
`CODE` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '编码',
`NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '名称',
`MANAGER` BIGINT(20) NULL DEFAULT NULL COMMENT '负责人',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '业务状态',
`STOCK` BIGINT(20) NULL DEFAULT NULL COMMENT '当前存量',
`MAX_STOCK` BIGINT(20) NULL DEFAULT NULL COMMENT '库存上限',
`MIN_STOCK` BIGINT(20) NULL DEFAULT NULL COMMENT '库存下限',
`WARNING_STOCK` BIGINT(20) NULL DEFAULT NULL COMMENT '警戒百分比',
`REMARK` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
`AFFILIATED_UNIT` BIGINT(20) NULL DEFAULT NULL COMMENT '所属单位',
`AFFILIATED_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '所属单位名称',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '物资仓库表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_WAREHOUSE_IN
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_WAREHOUSE_IN`;
CREATE TABLE `WT_SP_WAREHOUSE_IN` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '单据号',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`TYPE` BIGINT(20) NULL DEFAULT NULL COMMENT '入库类型',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '业务状态(1:待审批;3:审批通过;4:审批不通过)',
`RPOC_INS_ID` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作流实例ID',
`STORAGE_ROOM` BIGINT(20) NULL DEFAULT NULL COMMENT '仓库库房',
`CURRENT_OPERATOR` BIGINT(20) NULL DEFAULT NULL COMMENT '当前处理人',
`REMARKS` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '物资入库表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_WAREHOUSE_IN_RECORD
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_WAREHOUSE_IN_RECORD`;
CREATE TABLE `WT_SP_WAREHOUSE_IN_RECORD` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '出入库编号',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '业务状态',
`TITLE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '标题',
`STORAGE_ROOM` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '仓库库房',
`TYPE` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '类型,用枚举来判断是工具还是备品备件',
`OPERATION` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '操作:用枚举来判断是出库还是入库',
`AMOUNT` INT(11) NULL DEFAULT NULL COMMENT '数量',
`SP_BASIC_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '备品备件ID',
`NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '备品备件名称',
`REMARKS` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR WT_SP_WAREHOUSE_OUT
-- ----------------------------
DROP TABLE IF EXISTS `WT_SP_WAREHOUSE_OUT`;
CREATE TABLE `WT_SP_WAREHOUSE_OUT` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
`CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '单据号',
`HANDLER` BIGINT(20) NULL DEFAULT NULL COMMENT '执行人',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` INT(11) NULL DEFAULT NULL COMMENT '流程状态(1:待审批;3:审批通过;4:审批不通过)',
`RPOC_INS_ID` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作流实例ID',
`STORAGE_ROOM` BIGINT(20) NULL DEFAULT NULL COMMENT '仓库库房',
`REMARKS` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`IS_DELETED` INT(11) NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
`TYPE` BIGINT(20) NULL DEFAULT NULL COMMENT '出库类型',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '物资出库表' ROW_FORMAT = DYNAMIC;

15
hzims-service/assets/src/main/resources/dict/dict.sql

@ -0,0 +1,15 @@
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1295327354863779842, 1491667746929336322, 'spare_unit', 'he', '', 6, NULL, 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1295327384890802177, 1491667746929336322, 'spare_unit', 'mi', '', 7, NULL, 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1295327411105202177, 1491667746929336322, 'spare_unit', 'bao', '', 8, NULL, 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1295327488766935042, 1491667746929336322, 'spare_unit', 'gen', '', 9, NULL, 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1295327534904279042, 1491667746929336322, 'spare_unit', 'juan', '', 10, NULL, 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1295327827754778625, 1491667746929336322, 'spare_unit', 'tong', '', 11, NULL, 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1295327862240346113, 1491667746929336322, 'spare_unit', 'sheng', '', 12, NULL, 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1295327890199576578, 1491667746929336322, 'spare_unit', 'ping', '', 13, NULL, 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1295327951272837121, 1491667746929336322, 'spare_unit', 'dai', '', 14, NULL, 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1491667746929336322, 0, 'spare_unit', '-1', '资产计量单位', 116, '', 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1491668162450644994, 1491667746929336322, 'spare_unit', 'tai', '', 1, '', 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1491668227474939906, 1491667746929336322, 'spare_unit', 'tao', '', 2, '', 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1491668337244069890, 1491667746929336322, 'spare_unit', 'ge', '', 3, '', 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1491668374690816002, 1491667746929336322, 'spare_unit', 'jian', '', 4, '', 0, 0, 0, -1, 'hzims-assets');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1491668413811089410, 1491667746929336322, 'spare_unit', 'liang', '', 5, '', 0, 0, 0, -1, 'hzims-assets');

5
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/controller/AlarmHandleController.java

@ -3,12 +3,11 @@ package com.hnac.hzims.alarm.show.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.alarm.show.service.AlarmHandleService;
import com.hnac.hzims.alarm.config.vo.AlarmHandleVo;
import com.hnac.hzims.alarm.show.service.AlarmHandleService;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.alert.vo.HandleQueryVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
@ -55,7 +54,7 @@ public class AlarmHandleController extends BladeController {
@OperationAnnotation(moduleName = "分页查询告警处理记录", title = "查询告警处理记录", operatorType = OperatorType.MOBILE, businessType =
BusinessType.GENCODE,
action = "分页")
public R<IPage<AlarmHandleVo>> list(HandleQueryVo param, Query query) {
public R<IPage<AlarmHandleVo>> list(com.hnac.hzims.operational.alert.vo.HandleQueryVo param, Query query) {
IPage<AlarmHandleVo> pages = service.pageCondition(query, param);
return R.data(pages);
}

7
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/controller/BusinessEarlyController.java

@ -4,12 +4,7 @@ package com.hnac.hzims.business.early.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.business.early.service.BusinessEarlyService;
import com.hnac.hzims.business.entity.BusinessEarlyEntity;
import com.hnac.hzims.business.vo.BusinessEarlyVo;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.access.vo.ConstructionVo;
import com.hnac.hzims.business.early.vo.BusinessEarlyVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;

3
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/feign/BusinessEarlyClient.java

@ -1,8 +1,7 @@
package com.hnac.hzims.business.early.feign;
import com.hnac.hzims.business.early.service.BusinessEarlyService;
import com.hnac.hzims.business.entity.BusinessEarlyEntity;
import com.hnac.hzims.business.feign.IBusinessEarlyClient;
import com.hnac.hzims.business.early.entity.BusinessEarlyEntity;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;

2
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/mapper/BusinessEarlyMapper.java

@ -1,7 +1,7 @@
package com.hnac.hzims.business.early.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.business.entity.BusinessEarlyEntity;
import com.hnac.hzims.business.early.entity.BusinessEarlyEntity;
/**
* @author ysj

5
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/service/BusinessEarlyService.java

@ -1,9 +1,8 @@
package com.hnac.hzims.business.early.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.business.entity.BusinessEarlyEntity;
import com.hnac.hzims.business.vo.BusinessEarlyVo;
import com.hnac.hzims.operational.access.vo.ConstructionVo;
import com.hnac.hzims.business.early.entity.BusinessEarlyEntity;
import com.hnac.hzims.business.early.vo.BusinessEarlyVo;
import org.springblade.core.mp.base.BaseService;
/**

4
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/service/impl/BusinessEarlyServiceImpl.java

@ -3,8 +3,8 @@ package com.hnac.hzims.business.early.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.business.early.mapper.BusinessEarlyMapper;
import com.hnac.hzims.business.early.service.BusinessEarlyService;
import com.hnac.hzims.business.entity.BusinessEarlyEntity;
import com.hnac.hzims.business.vo.BusinessEarlyVo;
import com.hnac.hzims.business.early.entity.BusinessEarlyEntity;
import com.hnac.hzims.business.early.vo.BusinessEarlyVo;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;

58
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/controller/InterruptionController.java

@ -0,0 +1,58 @@
package com.hnac.hzims.business.interruption.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.business.interruption.service.InterruptionService;
import com.hnac.hzims.business.interruption.vo.InterruptionDetailVo;
import com.hnac.hzims.business.interruption.vo.InterruptionParamVo;
import com.hnac.hzims.business.interruption.vo.InterruptionStationVo;
import com.hnac.hzims.business.interruption.vo.InterruptionVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
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.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author ysj
*/
@Api(tags = {"数据中断告警"})
@RestController
@AllArgsConstructor
@RequestMapping("/interruption")
public class InterruptionController extends BladeController {
private final InterruptionService interruptionService;
@GetMapping("/interruptionStations")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "分页查询")
public R<List<InterruptionStationVo>> interruptionStations() {
return R.data(interruptionService.interruptionStations());
}
@GetMapping("/page")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页查询")
public R<IPage<InterruptionVo>> list(InterruptionParamVo param, Query query) {
return R.data(interruptionService.pageCondition(Condition.getPage(query), param));
}
@GetMapping("/detail")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页查询")
public R<IPage<InterruptionDetailVo>> detail(InterruptionParamVo param, Query query) {
return R.data(interruptionService.pageConditionDetail(Condition.getPage(query), param));
}
}

15
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/mapper/InterruptionMapper.java

@ -0,0 +1,15 @@
package com.hnac.hzims.business.interruption.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.business.interruption.entity.InterruptionEntity;
import com.hnac.hzims.business.interruption.vo.InterruptionStationVo;
import java.util.List;
/**
* @author ysj
*/
public interface InterruptionMapper extends BaseMapper<InterruptionEntity> {
List<InterruptionStationVo> interruptionStations();
}

11
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/mapper/InterruptionMapper.xml

@ -0,0 +1,11 @@
<?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.business.interruption.mapper.InterruptionMapper">
<select id="interruptionStations" resultType="com.hnac.hzims.business.interruption.vo.InterruptionStationVo">
SELECT STATION_ID,STATION_NAME
FROM HZIMS_INTERRUPTION_ALARM
GROUP BY STATION_ID,STATION_NAME
</select>
</mapper>

24
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/service/InterruptionService.java

@ -0,0 +1,24 @@
package com.hnac.hzims.business.interruption.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.business.interruption.entity.InterruptionEntity;
import com.hnac.hzims.business.interruption.vo.InterruptionDetailVo;
import com.hnac.hzims.business.interruption.vo.InterruptionParamVo;
import com.hnac.hzims.business.interruption.vo.InterruptionStationVo;
import com.hnac.hzims.business.interruption.vo.InterruptionVo;
import com.hnac.hzims.operational.station.entity.StationEntity;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* @author ysj
*/
public interface InterruptionService extends BaseService<InterruptionEntity> {
List<InterruptionStationVo> interruptionStations();
IPage<InterruptionVo> pageCondition(IPage<InterruptionVo> page, InterruptionParamVo param);
IPage<InterruptionDetailVo> pageConditionDetail(IPage<InterruptionDetailVo> page, InterruptionParamVo param);
}

208
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/service/impl/InterruptionServiceImpl.java

@ -0,0 +1,208 @@
package com.hnac.hzims.business.interruption.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.business.interruption.entity.InterruptionEntity;
import com.hnac.hzims.business.interruption.mapper.InterruptionMapper;
import com.hnac.hzims.business.interruption.service.InterruptionService;
import com.hnac.hzims.business.interruption.vo.InterruptionDetailVo;
import com.hnac.hzims.business.interruption.vo.InterruptionParamVo;
import com.hnac.hzims.business.interruption.vo.InterruptionStationVo;
import com.hnac.hzims.business.interruption.vo.InterruptionVo;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author ysj
*/
@AllArgsConstructor
@Service
@Slf4j
public class InterruptionServiceImpl extends BaseServiceImpl<InterruptionMapper, InterruptionEntity> implements InterruptionService {
/**
* 数据中断站点查询
* @return
*/
@Override
public List<InterruptionStationVo> interruptionStations() {
return this.baseMapper.interruptionStations();
}
/**
* 数据中断统计
* @param page
* @param param
* @return
*/
@Override
public IPage<InterruptionVo> pageCondition(IPage<InterruptionVo> page, InterruptionParamVo param) {
QueryWrapper<InterruptionEntity> queryWrapper = new QueryWrapper();
queryWrapper.lambda().in(InterruptionEntity::getType,param.getType());
queryWrapper.lambda().ge(InterruptionEntity::getCreateTime,param.getStartTime());
queryWrapper.lambda().le(InterruptionEntity::getCreateTime,param.getEndTime());
queryWrapper.lambda().orderByAsc(InterruptionEntity::getAlarmTime);
if(!StringUtil.isEmpty(param.getStationId())){
queryWrapper.lambda().in(InterruptionEntity::getStationId,Func.toLongList(",",param.getStationId()));
}
List<InterruptionEntity> interruptions = this.list(queryWrapper);
if(CollectionUtil.isEmpty(interruptions)){
return page;
}
// 根据站点分组
Map<String,List<InterruptionEntity>> map = interruptions.stream().collect(Collectors.groupingBy(InterruptionEntity::getStationId));
List<InterruptionVo> list = map.entrySet().stream().map(entry -> {
InterruptionVo interruption = new InterruptionVo();
interruption.setStationId(entry.getKey());
interruption.setStationName(entry.getValue().get(0).getStationName());
interruption.setCount((int) entry.getValue().stream().filter(o-> o.getStatus().equals(0)).count());
long time = innterruptionTime(entry.getValue().stream().sorted(Comparator.comparing(InterruptionEntity::getAlarmTime)).collect(Collectors.toList()), DateUtil.parse(param.getStartTime(),DateUtil.PATTERN_DATETIME),DateUtil.parse(param.getEndTime(),DateUtil.PATTERN_DATETIME));
interruption.setDuration(BigDecimal.valueOf(time / (1000 * 60 * 60.00)).setScale(2, RoundingMode.HALF_UP).doubleValue());
return interruption;
}).collect(Collectors.toList());
page.setTotal(map.size());
page.setRecords(list.stream().sorted(Comparator.comparing(InterruptionVo::getStationId)).skip((page.getCurrent() - 1) * page.getSize()).limit(page.getSize()).collect(Collectors.toList()));
return page;
}
/**
* 获取中断时长
* @param interruptions
* @param startDate
* @param endDate
* @return
*/
private long innterruptionTime(List<InterruptionEntity> interruptions, Date startDate, Date endDate) {
if(interruptions.size() == 1){
// 一直中断
if(interruptions.get(0).getStatus() == 0){
return endDate.getTime() - interruptions.get(0).getAlarmTime().getTime();
}
// 一直恢复
return 0;
}
long time=0;
// 遍历累计中断时长
for(int i = 0; i< interruptions.size() ; i++){
// 记录为恢复状态 就计算到下次关机的时间差
if(interruptions.get(i).getStatus() == 1){
continue;
}
Date endTime,startTime = interruptions.get(i).getAlarmTime();
// 遍历至最后一条数据,累计至当前时间
if(i == interruptions.size() - 1){
endTime = endDate;
}else {
endTime = interruptions.get(i+1).getAlarmTime();
}
time += endTime.getTime() - startTime.getTime();
}
return time;
}
/**
* 站点数据中断统计详情
* @param page
* @return
*/
@Override
public IPage<InterruptionDetailVo> pageConditionDetail(IPage<InterruptionDetailVo> page, InterruptionParamVo param) {
// 获取中断告警数据
QueryWrapper<InterruptionEntity> queryWrapper = new QueryWrapper();
queryWrapper.lambda().in(InterruptionEntity::getType,param.getType());
queryWrapper.lambda().ge(InterruptionEntity::getCreateTime,param.getStartTime());
queryWrapper.lambda().le(InterruptionEntity::getCreateTime,param.getEndTime());
queryWrapper.lambda().orderByAsc(InterruptionEntity::getAlarmTime);
if(!StringUtil.isEmpty(param.getStationId())){
queryWrapper.lambda().eq(InterruptionEntity::getStationId,param.getStationId());
}
List<InterruptionEntity> interruptions = this.list(queryWrapper);
if(CollectionUtil.isEmpty(interruptions)){
new ArrayList<>();
}
// 数据整理
List<InterruptionDetailVo> details = this.collation(interruptions,param.getStartTime(),param.getEndTime());
page.setTotal(details.size());
page.setRecords(details.stream().sorted(Comparator.comparing(InterruptionDetailVo::getStart)).skip((page.getCurrent() - 1) * page.getSize()).limit(page.getSize()).collect(Collectors.toList()));
return page;
}
/**
* 告警数据整理
* @param interruptions
* @return
*/
private List<InterruptionDetailVo> collation(List<InterruptionEntity> interruptions,String startTime,String endTime) {
List<InterruptionEntity> collations = new ArrayList<>();
// 遍历数据
for(int i = 0; i< interruptions.size() ; i++){
// 第一个数据保存下来
if(i == 0){
collations.add(interruptions.get(i));
continue;
}
// 遍历数据状态
Integer status = interruptions.get(i).getStatus();
// 上一条数据状态
Integer up_status = interruptions.get(i-1).getStatus();
if(status.equals(up_status)){
continue;
}
collations.add(interruptions.get(i));
}
// 返回数据集合
List<InterruptionDetailVo> details = new ArrayList<>();
int j = 0;
if(1 == collations.get(0).getStatus()){
j = 1;
for(;j < collations.size() ;j++){
if(j % 2 == 1){
InterruptionDetailVo detail = new InterruptionDetailVo();
detail.setType(collations.get(j).getType());
detail.setStationId(collations.get(j).getStationId());
detail.setStationName(collations.get(j).getStationName());
detail.setStart(collations.get(j).getAlarmTime());
if( j + 1 == collations.size()){
detail.setEnd(DateUtil.parse(endTime,DateUtil.PATTERN_DATETIME));
}else{
detail.setEnd(collations.get(j + 1).getAlarmTime());
}
long time = detail.getEnd().getTime() - detail.getStart().getTime();
detail.setDuration(BigDecimal.valueOf(time / (1000 * 60 * 60.00)).setScale(2, RoundingMode.HALF_UP).doubleValue());
details.add(detail);
}
}
}else{
for(;j < collations.size() ;j++){
if(j % 2 == 0){
InterruptionDetailVo detail = new InterruptionDetailVo();
detail.setType(collations.get(j).getType());
detail.setStationId(collations.get(j).getStationId());
detail.setStationName(collations.get(j).getStationName());
detail.setStart(collations.get(j).getAlarmTime());
if( j + 1 == collations.size()){
detail.setEnd(DateUtil.parse(endTime,DateUtil.PATTERN_DATETIME));
}else{
detail.setEnd(collations.get(j + 1).getAlarmTime());
}
long time = detail.getEnd().getTime() - detail.getStart().getTime();
detail.setDuration(BigDecimal.valueOf(time / (1000 * 60 * 60.00)).setScale(2, RoundingMode.HALF_UP).doubleValue());
details.add(detail);
}
}
}
return details;
}
}

222
hzims-service/hzims-alarm/src/main/resources/db/1.0.0.sql

@ -0,0 +1,222 @@
DROP TABLE IF EXISTS `BLADE_MODULE_VERSION`;
CREATE TABLE `BLADE_MODULE_VERSION` (
`MODULE_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`VERSION` VARCHAR(8) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`HISTORY` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
PRIMARY KEY (`MODULE_NAME`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_ALARM
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_ALARM`;
CREATE TABLE `HZIMS_ALARM` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`STATION_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '站点编码',
`STATION_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点名称',
`DEVICE_CODE` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备编码',
`DEVICE_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备名称',
`ALARM_ID` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警ID',
`ALARM_SOURCE` TINYINT(4) NULL DEFAULT NULL COMMENT '告警类型 :0- HZ3000告警 1 -等级告警 2 -条件告警 3-FDP智能预警',
`ALARM_TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '告警子类',
`ALARM_SIGNAGE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警属性标识',
`ALARM_CONTEXT` VARCHAR(1024) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警内容',
`ALARM_STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '告警状态',
`ALARM_LEVEL` TINYINT(4) NULL DEFAULT NULL COMMENT '告警等级',
`ALARM_VALUE` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警动作数值',
`ALARM_COUNT` TINYINT(10) NULL DEFAULT NULL COMMENT '告警数量',
`ALARM_TIME` DATETIME NULL DEFAULT NULL COMMENT '告警时间',
`REAL_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '监测点',
`IS_RIGHT_TABULATION` TINYINT(4) NULL DEFAULT NULL COMMENT '是否集中监控右侧列表展示 : 0-展示 1-不展示',
`IS_SHOW_ALERT` TINYINT(4) NULL DEFAULT NULL COMMENT '是否集中监控弹窗展示 : 0-展示 1-不展示',
`IS_SMALL_BELL` TINYINT(4) NULL DEFAULT NULL COMMENT '是否集中监控铃铛展示 : 0-展示 1-不展示',
`IS_MASK` TINYINT(4) NULL DEFAULT NULL COMMENT '是否集中监控遮罩展示 : 0-展示 1-不展示',
`IS_BROADCAST` TINYINT(4) NULL DEFAULT NULL COMMENT '是否语音播报 : 0-播报 1-不播报',
`IS_PLATFORM_MESSAGE` TINYINT(4) NULL DEFAULT NULL COMMENT '是否进行平台消息推送 : 0-推送 1-不推送',
`IS_SHORT_MESSAGE` TINYINT(4) NULL DEFAULT NULL COMMENT '是否短信推送 :0-推送 1-不推送',
`IS_WX_MESSAGE` TINYINT(4) NULL DEFAULT NULL COMMENT '是否微信公众号消息推送 :0-推送 1-不推送',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门ID',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_ALARM_CONFIG
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_ALARM_CONFIG`;
CREATE TABLE `HZIMS_ALARM_CONFIG` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`STATION_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点编码',
`STATION_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点名称',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门ID',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态(0 待值班 1 值班中 2 已完成)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_ALARM_CONFIG_DETAIL
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_ALARM_CONFIG_DETAIL`;
CREATE TABLE `HZIMS_ALARM_CONFIG_DETAIL` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`STRATEGY_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '告警配置ID',
`ALARM_TYPE` BIGINT(4) NULL DEFAULT NULL COMMENT '告警类型',
`ALARM_CHILED_TYPE` BIGINT(4) NULL DEFAULT NULL COMMENT '告警子类',
`ALARM_CONTEXT` VARCHAR(2048) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警内容',
`ALARM_POINT` VARCHAR(2048) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警监测点',
`IS_RIGHT_TABULATION` TINYINT(4) NULL DEFAULT NULL COMMENT '是否集中监控右侧列表展示 : 0-展示 1-不展示',
`IS_SHOW_ALERT` TINYINT(4) NULL DEFAULT NULL COMMENT '是否集中监控弹窗展示 : 0-展示 1-不展示',
`IS_SMALL_BELL` TINYINT(4) NULL DEFAULT NULL COMMENT '是否集中监控铃铛展示 : 0-展示 1-不展示',
`IS_MASK` TINYINT(4) NULL DEFAULT NULL COMMENT '是否集中监控遮罩展示 : 0-展示 1-不展示',
`IS_BROADCAST` TINYINT(4) NULL DEFAULT NULL COMMENT '是否语音播报 : 0-播报 1-不播报',
`IS_PLATFORM_MESSAGE` TINYINT(4) NULL DEFAULT NULL COMMENT '是否进行平台消息推送 : 0-推送 1-不推送',
`IS_SHORT_MESSAGE` TINYINT(4) NULL DEFAULT NULL COMMENT '是否短信推送 :0-推送 1-不推送',
`IS_WX_MESSAGE` TINYINT(4) NULL DEFAULT NULL COMMENT '是否微信公众号消息推送 :0-推送 1-不推送',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门ID',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态(0 待值班 1 值班中 2 已完成)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_ALARM_HANDLE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_ALARM_HANDLE`;
CREATE TABLE `HZIMS_ALARM_HANDLE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`ALARM_ID` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警主键ID',
`STATION_CODE` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点编号',
`ALARM_TYPE` SMALLINT(6) NULL DEFAULT NULL COMMENT '告警类型',
`ALARM_TIME` DATETIME NULL DEFAULT NULL COMMENT '告警时间',
`ALARM_CONTENT` VARCHAR(1024) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警内容',
`TYPE` TINYINT(1) NULL DEFAULT NULL COMMENT '类型:0-系统告警 1-智能告警',
`HANDLE_WAY` SMALLINT(6) NULL DEFAULT NULL COMMENT '处理方式',
`DETAIL_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '处理详情ID',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL COMMENT '是否删除',
`STATUS` TINYINT(4) NOT NULL COMMENT '状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_ALARM_HANDLE_DETAIL
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_ALARM_HANDLE_DETAIL`;
CREATE TABLE `HZIMS_ALARM_HANDLE_DETAIL` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`HANDLE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '通知处理人',
`PHENOMENON_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '现象ID',
`ACCESS_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '检修ID',
`DELAY_TIME` DATETIME NULL DEFAULT NULL COMMENT '延后时间',
`DELAY_CAUSE` VARCHAR(1024) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '延后原因',
`FALSE_ALARM_DESC` VARCHAR(1024) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '误报描述',
`FILE_PATH` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '附件路径',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL COMMENT '是否删除',
`STATUS` TINYINT(4) NOT NULL COMMENT '状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_ALARM_HISTORY
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_ALARM_HISTORY`;
CREATE TABLE `HZIMS_ALARM_HISTORY` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`STATION_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '站点编码',
`STATION_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点名称',
`DEVICE_CODE` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备编码',
`DEVICE_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备名称',
`ALARM_ID` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警ID',
`ALARM_SOURCE` TINYINT(4) NULL DEFAULT NULL COMMENT '告警类型 :0- HZ3000告警 1 -等级告警 2 -条件告警 3-FDP智能预警',
`ALARM_TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '告警子类',
`ALARM_SIGNAGE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警属性标识',
`ALARM_CONTEXT` VARCHAR(1024) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警内容',
`ALARM_STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '告警状态',
`ALARM_LEVEL` TINYINT(4) NULL DEFAULT NULL COMMENT '告警等级',
`ALARM_VALUE` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警动作数值',
`ALARM_COUNT` TINYINT(10) NULL DEFAULT NULL COMMENT '告警数量',
`ALARM_TIME` DATETIME NULL DEFAULT NULL COMMENT '告警时间',
`REAL_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '监测点',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门ID',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态(0 待值班 1 值班中 2 已完成)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_BUSINESS_EARLY
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_BUSINESS_EARLY`;
CREATE TABLE `HZIMS_BUSINESS_EARLY` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TASK_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '任务ID',
`BUSINESS_TYPE` TINYINT(1) NULL DEFAULT NULL COMMENT '业务类型 :0 - 固定资产 1 - 日常维护 2 - 安全工器- 具 3 - 巡检 4 - 检修 5 - 缺陷 6 - 值班',
`CONTENT` VARCHAR(1024) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '预警内容',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门ID',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_INTERRUPTION_ALARM
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_INTERRUPTION_ALARM`;
CREATE TABLE `HZIMS_INTERRUPTION_ALARM` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`STATION_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点ID',
`STATION_NAME` VARCHAR(168) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点名称',
`ALARM_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '告警编号',
`REAL_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警点位',
`ALARM_TIME` DATETIME NULL DEFAULT NULL COMMENT '告警时间',
`TYPE` VARCHAR(16) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警类型 13-连接中断 14-数据异常',
`SOE_EXPLAIN` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警原因',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`STATUS` BIGINT(1) NULL DEFAULT NULL COMMENT '状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NOT NULL COMMENT '是否删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;

31
hzims-service/hzims-alarm/src/main/resources/dict/dict.sql

@ -0,0 +1,31 @@
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1434847945152356354, 0, 'alarm_source', '-1', '告警来源', 0, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1434847945152356361, 1434847945152356354, 'alarm_source', '0', 'HZ3000告警', 1, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1434847945152356362, 1434847945152356354, 'alarm_source', '1', '等级告警', 2, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1434847945152356363, 1434847945152356354, 'alarm_source', '2', '条件告警', 3, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1434847945152356364, 1434847945152356354, 'alarm_source', '3', 'FDP智能预警', 1, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1434847945152356365, 1434847945152356354, 'alarm_source', '4', '视频预警', 2, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1434847945152356366, 1434847945152356354, 'alarm_source', '5', '开关机告警', 3, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1451741563297222651, 0, 'level_alarm', '-1', '等级告警', 0, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1451741563297222652, 1451741563297222651, 'level_alarm', '21', '一级告警', 0, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1451741563297222653, 1451741563297222651, 'level_alarm', '22', '二级告警', 0, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1451741563297222654, 1451741563297222651, 'level_alarm', '23', '三级告警', 0, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597001, 0, 'alarm_type', '-1', '告警类型', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597002, 1597833496933597001, 'alarm_type', '2', '告警', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597003, 1597833496933597001, 'alarm_type', '3', '故障', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597004, 1597833496933597001, 'alarm_type', '5', '遥测越限', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597005, 1597833496933597001, 'alarm_type', '13', '通讯中断', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597006, 1597833496933597001, 'alarm_type', '14', '数据异常', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597007, 1597833496933597001, 'alarm_type', '21', '一级告警', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597008, 1597833496933597001, 'alarm_type', '22', '二级告警', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597009, 1597833496933597001, 'alarm_type', '23', '三级告警', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597010, 1597833496933597001, 'alarm_type', '30', '智能预警', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597011, 1597833496933597001, 'alarm_type', '40', '条件告警', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597012, 1597833496933597001, 'alarm_type', '50', '视频告警', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597013, 1597833496933597001, 'alarm_type', '60', '开机告警', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1597833496933597014, 1597833496933597001, 'alarm_type', '61', '关机告警', 0, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160922111, 0, 'HZ3000_alarm', '-1', 'HZ3000告警', 0, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160922112, 1658763247160922111, 'HZ3000_alarm', '2', '告警', 0, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160922113, 1658763247160922111, 'HZ3000_alarm', '3', '故障', 0, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160922114, 1658763247160922111, 'HZ3000_alarm', '5', '遥测越限', 0, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160922115, 1658763247160922111, 'HZ3000_alarm', '13', '通讯中断', 0, '', 0, 0, 1, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160922116, 1658763247160922111, 'HZ3000_alarm', '14', '数据异常', 0, '', 0, 0, 1, -1, 'hzims-alarm');

73
hzims-service/hzims-basic/src/main/resources/db/1.0.0.sql

@ -0,0 +1,73 @@
DROP TABLE IF EXISTS `BLADE_MODULE_VERSION`;
CREATE TABLE `BLADE_MODULE_VERSION` (
`MODULE_NAME` VARCHAR(64) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NOT NULL,
`VERSION` VARCHAR(8) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NOT NULL,
`HISTORY` VARCHAR(300) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL,
PRIMARY KEY (`MODULE_NAME`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_CERTIFICATET
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_CERTIFICATET`;
CREATE TABLE `HZIMS_CERTIFICATET` (
`ID` BIGINT(20) NOT NULL,
`PERSON_ID` BIGINT(20) NOT NULL COMMENT '用户管理表ID',
`TYPE` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '证件类型',
`DEAD_TIME` DATETIME NOT NULL COMMENT '到期时间',
`PIC` VARCHAR(5000) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '证书图片',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '流程状态(1:待审批;3:审批通过;4:审批不通过)',
`IS_DELETED` TINYINT(4) UNSIGNED NULL DEFAULT NULL COMMENT '是否已删除(0:否,1:是)',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
PRIMARY KEY (`ID`) USING BTREE,
INDEX `INDEX_PERSON_ID`(`PERSON_ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_CERTIFICATET_NOTICE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_CERTIFICATET_NOTICE`;
CREATE TABLE `HZIMS_CERTIFICATET_NOTICE` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`SEND_TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '通知类型 1=短信 2=系统通知',
`SAFE_TIME` INT(11) NOT NULL COMMENT '提前几天通知',
`NOTICE_USERS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '通知用户',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1742361446949122051 CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_PERSON_MANAGEMET
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_PERSON_MANAGEMET`;
CREATE TABLE `HZIMS_PERSON_MANAGEMET` (
`ID` BIGINT(20) NOT NULL,
`USER_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '用户ID',
`NAME` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '用户姓名',
`UNIT_NAME` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '单位名称',
`SEX` TINYINT(4) NULL DEFAULT NULL COMMENT '性别(男0,女1)',
`JOB` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '职位',
`ACADEMIC_TITLE` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '职称',
`PHONE` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '联系电话',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`STATUS` TINYINT(11) NULL DEFAULT NULL COMMENT '流程状态(1:待审批;3:审批通过;4:审批不通过)',
`IS_DELETED` TINYINT(4) UNSIGNED NULL DEFAULT 0 COMMENT '是否已删除(0:否,1:是)',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC;

0
hzims-service/hzims-basic/src/main/resources/dict/dict.sql

226
hzims-service/hzims-middle/src/main/resources/db/1.0.0.sql

@ -1,80 +1,148 @@
SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE `hzims-middle`.`hzims_process_type` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`sequence` int(11) NOT NULL COMMENT '序号',
`deployment_id` varchar(160) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前环节流程key',
`deployment_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前流程名称',
`segment` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '一个流程图的名称',
`create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(4) NULL DEFAULT 0 COMMENT '逻辑删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '工作流审批类型' ROW_FORMAT = Dynamic;
ALTER TABLE `hzims-middle`.`hzims_statistics` ADD COLUMN `sort` int(11) NULL DEFAULT NULL COMMENT '排序' AFTER `update_time`;
ALTER TABLE `hzims-middle`.`hzims_statistics` MODIFY COLUMN `module_name_num` int(11) NULL DEFAULT 0 COMMENT '功能模块统计' AFTER `module_name`;
ALTER TABLE `hzims-middle`.`hzims_statistics` MODIFY COLUMN `date_calculated` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '统计日期' AFTER `module_name_num`;
ALTER TABLE `hzims-middle`.`hzims_statistics` DROP COLUMN `title`;
ALTER TABLE `hzims-middle`.`hzims_statistics` DROP COLUMN `title_num`;
ALTER TABLE `hzims-middle`.`hzims_statistics` DROP COLUMN `path`;
ALTER TABLE `hzims-middle`.`hzims_statistics` DROP COLUMN `path_num`;
ALTER TABLE `hzims-middle`.`hzims_sys_log` ENGINE = MyISAM;
ALTER TABLE `hzims-middle`.`hzims_sys_log` ADD INDEX `hzims_sys_log_operation_time_index`(`operation_time`) USING BTREE;
ALTER TABLE `hzims-middle`.`hzims_sys_log` ADD INDEX `hzims_sys_log_module_name_index`(`module_name`) USING BTREE;
ALTER TABLE `hzims-middle`.`hzims_sys_log` ADD INDEX `hzims_sys_log_title_index`(`title`) USING BTREE;
CREATE TABLE `hzims-middle`.`hzims_workflow_operation_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`take_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前任务ID',
`take_name` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前任务名称',
`process_definition_key` char(160) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前环节流程ID',
`process_instance_key` char(160) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '实例key',
`next_step_operator` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下一环节处理人',
`variables` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '表单',
`user_id` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户Id',
`handleType` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT ' 根据handleType区分是用户还是候选组角色 标识 0是用户 1是角色',
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '是否逻辑删除,0 可用,1. 不可用',
`is_operation_log` tinyint(1) NULL DEFAULT 0 COMMENT '1 正常日志 0 错误日志',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '工作流操作日志' ROW_FORMAT = Dynamic;
CREATE TABLE `hzims-middle`.`log_options_module_name` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`module_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '功能模块',
`sort` int(11) NULL DEFAULT NULL COMMENT '排序',
`create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(4) NULL DEFAULT 0 COMMENT '逻辑删除 (0 可用 1 删除)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE `hzims-middle`.`process_dict` (
`dict_code` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '票据编码',
`dict_sort` int(4) NULL DEFAULT 0 COMMENT '票据排序',
`dict_key` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '票据字典码',
`dict_value` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '票据流程标识',
`dict_label` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '票据标签',
`dict_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '票据类型',
`is_default` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '是否默认(Y是 N否)',
`status` tinyint(1) NULL DEFAULT 0 COMMENT '状态(0正常 1停用)',
`create_dept` bigint(20) NULL DEFAULT NULL COMMENT '所属机构',
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '票据备注',
PRIMARY KEY (`dict_code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '工作流字典表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS=1;
-- ----------------------------
-- TABLE STRUCTURE FOR BLADE_MODULE_VERSION
-- ----------------------------
DROP TABLE IF EXISTS `BLADE_MODULE_VERSION`;
CREATE TABLE `BLADE_MODULE_VERSION` (
`MODULE_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`VERSION` VARCHAR(8) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`HISTORY` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
PRIMARY KEY (`MODULE_NAME`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_PROCESS_TYPE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_PROCESS_TYPE`;
CREATE TABLE `HZIMS_PROCESS_TYPE` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`SEQUENCE` INT(11) NOT NULL COMMENT '序号',
`DEPLOYMENT_ID` VARCHAR(160) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前环节流程KEY',
`DEPLOYMENT_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前流程名称',
`SEGMENT` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '一个流程图的名称',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT 0 COMMENT '逻辑删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作流审批类型' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_STATISTICS
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_STATISTICS`;
CREATE TABLE `HZIMS_STATISTICS` (
`ID` BIGINT(20) NOT NULL COMMENT '编号',
`MODULE_NAME` VARCHAR(150) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '功能模块',
`MODULE_NAME_NUM` INT(11) NULL DEFAULT 0 COMMENT '功能模块统计',
`DATE_CALCULATED` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '统计日期',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`SORT` INT(11) NULL DEFAULT NULL COMMENT '排序',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '操作日志统计数据' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SYS_LOG
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SYS_LOG`;
CREATE TABLE `HZIMS_SYS_LOG` (
`ID` BIGINT(20) NOT NULL COMMENT '操作日志编号',
`TENANT_ID` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`SERVER_IP` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '服务器IP',
`SERVER_HOST` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '服务器地址',
`SERVER_NAME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '服务名称',
`ENV` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '环境',
`OPERATION_USER_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '操作人ID',
`OPERATION_USER_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '操作人名称',
`PATH` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '请求路径 (操作地址)',
`USER_AGENT` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '用户代理',
`METHOD` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '操作方式',
`METHOD_CLASS` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '方法类',
`METHOD_NAME` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '方法名',
`COST_TIME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '方法执行时间 消耗时间 毫秒',
`PARAMETER` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '方法入参',
`MODULE_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '功能模块',
`TITLE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '操作方法',
`ACTION` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '方法描述',
`OPERATOR_TYPE` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '系统类型',
`BUSINESS_TYPE` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '操作人类别',
`JSON_RESULT` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '返回结果',
`LOCAL_IP` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '请求的IP',
`ERROR_MSG` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '错误消息',
`OPERATION_TIME` DATETIME NULL DEFAULT NULL COMMENT '操作时间',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '操作状态(0 正常 1 异常)',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT 0 COMMENT '逻辑删除 (0 可用 1 删除)',
PRIMARY KEY (`ID`) USING BTREE,
INDEX `HZIMS_SYS_LOG_OPERATION_TIME_INDEX`(`OPERATION_TIME`) USING BTREE,
INDEX `HZIMS_SYS_LOG_MODULE_NAME_INDEX`(`MODULE_NAME`) USING BTREE,
INDEX `HZIMS_SYS_LOG_TITLE_INDEX`(`TITLE`) USING BTREE
) ENGINE = MYISAM CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WORKFLOW_OPERATION_LOG
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_WORKFLOW_OPERATION_LOG`;
CREATE TABLE `HZIMS_WORKFLOW_OPERATION_LOG` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`TAKE_ID` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前任务ID',
`TAKE_NAME` VARCHAR(150) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前任务名称',
`PROCESS_DEFINITION_KEY` CHAR(160) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前环节流程ID',
`PROCESS_INSTANCE_KEY` CHAR(160) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '实例KEY',
`NEXT_STEP_OPERATOR` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '下一环节处理人',
`VARIABLES` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '表单',
`USER_ID` VARCHAR(5000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '用户ID',
`HANDLETYPE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT ' 根据HANDLETYPE区分是用户还是候选组角色 标识 0是用户 1是角色',
`CREATE_TIME` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(1) NULL DEFAULT 0 COMMENT '是否逻辑删除,0 可用,1. 不可用',
`IS_OPERATION_LOG` TINYINT(1) NULL DEFAULT 0 COMMENT '1 正常日志 0 错误日志',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 13245 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作流操作日志' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR LOG_OPTIONS_MODULE_NAME
-- ----------------------------
DROP TABLE IF EXISTS `LOG_OPTIONS_MODULE_NAME`;
CREATE TABLE `LOG_OPTIONS_MODULE_NAME` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`MODULE_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '功能模块',
`SORT` INT(11) NULL DEFAULT NULL COMMENT '排序',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT 0 COMMENT '逻辑删除 (0 可用 1 删除)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 67 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR PROCESS_DICT
-- ----------------------------
DROP TABLE IF EXISTS `PROCESS_DICT`;
CREATE TABLE `PROCESS_DICT` (
`DICT_CODE` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '票据编码',
`DICT_SORT` INT(4) NULL DEFAULT 0 COMMENT '票据排序',
`DICT_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '票据字典码',
`DICT_VALUE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '票据流程标识',
`DICT_LABEL` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '票据标签',
`DICT_TYPE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '票据类型',
`IS_DEFAULT` CHAR(1) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT 'N' COMMENT '是否默认(Y是 N否)',
`STATUS` TINYINT(1) NULL DEFAULT 0 COMMENT '状态(0正常 1停用)',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '所属机构',
`CREATE_TIME` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`REMARK` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '票据备注',
PRIMARY KEY (`DICT_CODE`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 10 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作流字典表' ROW_FORMAT = DYNAMIC;
-- 初始化流程配置記錄
INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (1, 0, 'NETWORKING', 'WORKTICKETFLOW', '工作票', '两票管理', 'Y', 0, NULL, '2023-06-05 09:43:47', '2023-06-12 10:04:30', '第一种工作票 第二种工作票');
INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (2, 0, 'MOREACTIONBANKDIRECT', 'STANDARDTICKETFLOW', '操作票', '两票管理', 'Y', 0, NULL, '2023-06-06 14:15:39', '2023-06-06 14:15:52', '操作票');
INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (3, 0, 'MACHINERY', 'WORKTICKETFLOWMACHINERY', '机械工作票', '两票管理', 'Y', 0, NULL, '2023-06-12 10:04:56', '2023-06-12 10:07:52', '水力机械工作票');
INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (4, 0, 'MAINTENANCE', 'MAINTENANCE_TEST', '日常维护流程', '日常维护', 'Y', 0, NULL, '2023-06-14 15:06:39', '2023-06-14 15:06:41', '日常维护');
INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (5, 0, 'DEFECTCHECK', 'DEFECTCHECK', '消缺流程', '', 'Y', 0, NULL, '2023-06-16 17:01:01', '2023-06-26 11:36:54', '消缺流程');
INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (6, 6, 'OVERHAUL_PLAN', 'OVERHAUL_PLAN', '检修计划V4', '检修计划', 'Y', 0, NULL, '2023-06-16 17:01:01', '2023-06-16 17:04:01', '检修计划流程');
INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (7, 7, 'OVERHAUL_TASK', 'OVERHAUL_TASK', '检修任务V4', '检修任务', 'Y', 0, NULL, '2023-06-16 17:01:01', '2023-06-16 17:04:01', '检修任务流程');
INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (8, 8, 'DUTY_REC', 'DUTY_REC', '交接班V4', '交接班', 'Y', 0, NULL, '2023-07-25 18:35:01', '2023-07-25 18:35:01', '交接班流程');
INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (9, 9, 'WORK_TASK', 'WORK_TASK', '工作任务单V4', '工作任务单', 'Y', 0, NULL, '2023-07-25 18:35:01', '2024-01-09 14:48:18', '工作任务单流程');
INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (10, 10, 'OFFLINEWORKTICKET', 'OFFLINEWORKTICKET', '线下工作票', '线下工作票', 'Y', 0, NULL, '2023-12-28 16:35:10', '2023-12-28 16:35:14', '线下工作票流程');

56
hzims-service/hzims-middle/src/main/resources/db/1.0.1.sql

@ -1,56 +0,0 @@
alter table hzims_workflow_operation_log add is_operation_log tinyint(1) comment '1 正常日志 0 错误日志';
alter table hzims_statistics add sort int comment '排序';
create table log_options_module_name
(
id bigint primary key auto_increment,
module_name varchar(50) null comment '功能模块',
sort int comment '排序',
create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
is_deleted tinyint default 0 null comment '逻辑删除 (0 可用 1 删除)'
);
insert into log_options_module_name(module_name, sort)
values ('集中监控', 1),
('综合调度', 2),
('视频集中监控', 3),
('实时监控', 4),
('视频监控', 5),
('演示大屏', 6),
('生态监控', 7),
('数据分析', 9),
('数据查询', 10),
('通讯告警统计', 11),
('气象监测', 12),
('我的事务', 13),
('值班管理', 14),
('缺陷管理', 15),
('两票管理', 16),
('巡检管理', 17),
('日常维护', 18),
('检修管理', 19),
('数据填报', 20),
('安全管理', 21),
('设备管理', 22),
('资产管理', 23),
('智能诊断', 24),
('生产月报', 25),
('告警配置', 26),
('电站安全标准', 27),
('站点管理', 28),
('实时画面', 29),
('资源配置', 30),
('消息管理', 31),
('移动端配置', 32),
('水电站设置', 33),
('告警配置', 34);
INSERT INTO dev_hzims_middle.process_dict (dict_code, dict_sort, dict_key, dict_value, dict_label, dict_type, is_default, status, create_dept, create_time, update_time, remark) VALUES (1, 0, 'networking', 'workTicketFlow', '工作票', '两票管理', 'Y', 0, null, '2023-06-05 09:43:47.0', '2023-06-12 10:04:30.0', '第一种工作票 第二种工作票');
INSERT INTO dev_hzims_middle.process_dict (dict_code, dict_sort, dict_key, dict_value, dict_label, dict_type, is_default, status, create_dept, create_time, update_time, remark) VALUES (2, 0, 'moreActionBankDirect', 'standardTicketFlow', '操作票', '两票管理', 'Y', 0, null, '2023-06-06 14:15:39.0', '2023-06-06 14:15:52.0', '操作票');
INSERT INTO dev_hzims_middle.process_dict (dict_code, dict_sort, dict_key, dict_value, dict_label, dict_type, is_default, status, create_dept, create_time, update_time, remark) VALUES (3, 0, 'machinery', 'workTicketFlowmachinery', '机械工作票', '两票管理', 'Y', 0, null, '2023-06-12 10:04:56.0', '2023-06-12 10:07:52.0', '水力机械工作票');
INSERT INTO dev_hzims_middle.process_dict (dict_code, dict_sort, dict_key, dict_value, dict_label, dict_type, is_default, status, create_dept, create_time, update_time, remark) VALUES (4, 0, 'maintenance', 'maintenance_test', '日常维护流程', '日常维护', 'Y', 0, null, '2023-06-14 15:06:39.0', '2023-06-14 15:06:41.0', '日常维护');
INSERT INTO dev_hzims_middle.process_dict (dict_code, dict_sort, dict_key, dict_value, dict_label, dict_type, is_default, status, create_dept, create_time, update_time, remark) VALUES (5, 0, 'defectCheck', 'defectCheck', '消缺流程', '', 'Y', 0, null, '2023-06-16 17:01:01.0', '2023-06-26 11:36:54.0', '消缺流程');
INSERT INTO dev_hzims_middle.process_dict (dict_code, dict_sort, dict_key, dict_value, dict_label, dict_type, is_default, status, create_dept, create_time, update_time, remark) VALUES (6, 6, 'overhaul_plan', 'overhaul_plan', '检修计划v4', '检修计划', 'Y', 0, null, '2023-06-16 17:01:01.0', '2023-06-16 17:04:01.0', '检修计划流程');
INSERT INTO dev_hzims_middle.process_dict (dict_code, dict_sort, dict_key, dict_value, dict_label, dict_type, is_default, status, create_dept, create_time, update_time, remark) VALUES (7, 7, 'overhaul_task', 'overhaul_task', '检修任务v4', '检修任务', 'Y', 0, null, '2023-06-16 17:01:01.0', '2023-06-16 17:04:01.0', '检修任务流程');
INSERT INTO dev_hzims_middle.process_dict (dict_code, dict_sort, dict_key, dict_value, dict_label, dict_type, is_default, status, create_dept, create_time, update_time, remark) VALUES (8, 8, 'duty_rec', 'duty_rec', '交接班v4', '交接班', 'Y', 0, null, '2023-07-25 18:35:01.0', '2023-07-25 18:35:01.0', '交接班流程');

1
hzims-service/hzims-middle/src/main/resources/db/1.0.2.sql

@ -1 +0,0 @@
INSERT INTO `process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (9, 9, 'offlineWorkTicket', 'offlineWorkTicket', '线下工作票', '线下工作票', 'Y', 0, NULL, '2023-12-28 16:35:10', '2023-12-28 16:35:14', '线下工作票流程');

0
hzims-service/hzims-middle/src/main/resources/dict/dict.sql

12
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/alarm/InterruptionAlrmMapper.java

@ -0,0 +1,12 @@
package com.hnac.hzims.scheduled.mapper.alarm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.business.interruption.entity.InterruptionEntity;
/**
* @author ysj
*/
public interface InterruptionAlrmMapper extends BaseMapper<InterruptionEntity> {
}

12
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/AlarmScheduledTask.java

@ -1,6 +1,7 @@
package com.hnac.hzims.scheduled.scheduled;
import com.hnac.hzims.scheduled.service.alarm.AlarmQueryService;
import com.hnac.hzims.scheduled.service.alarm.InterruptionAlarmService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
@ -25,7 +26,10 @@ import static com.hnac.hzims.operational.main.constant.MainConstants.START_STOP_
public class AlarmScheduledTask {
@Autowired
private AlarmQueryService service;
private AlarmQueryService alarmQueryService;
@Autowired
private InterruptionAlarmService interruptionService;
/**
* 开停机告警
@ -37,17 +41,17 @@ public class AlarmScheduledTask {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
service.startStopAlarm(param);
alarmQueryService.startStopAlarm(param);
return new ReturnT<>("SUCCESS");
}
@XxlJob(INTERRUPT_ALARM)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> interruptAlarm(String param) {
public ReturnT<String> interruption(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
service.interruptAlarm(param);
interruptionService.interruption(param);
return new ReturnT<>("SUCCESS");
}
}

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/AlarmQueryService.java

@ -10,12 +10,10 @@ import java.util.List;
*/
public interface AlarmQueryService extends BaseService<AlarmEntity> {
// 开停机告警
void startStopAlarm(String param);
List<String> bells(List<String> codes);
List<String> aborts(List<String> codes);
void interruptAlarm(String param);
}

12
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/InterruptionAlarmService.java

@ -0,0 +1,12 @@
package com.hnac.hzims.scheduled.service.alarm;
import com.hnac.hzims.business.interruption.entity.InterruptionEntity;
import org.springblade.core.mp.base.BaseService;
/**
* @author ysj
*/
public interface InterruptionAlarmService extends BaseService<InterruptionEntity> {
void interruption(String param);
}

23
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmQueryServiceImpl.java

@ -5,22 +5,28 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.alarm.config.constants.AlarmConstants;
import com.hnac.hzims.alarm.config.entity.AlarmEntity;
import com.hnac.hzims.business.interruption.constants.InterruptionConstants;
import com.hnac.hzims.business.interruption.entity.InterruptionEntity;
import com.hnac.hzims.operational.alert.entity.HistoryAbnormalAlarmEntity;
import com.hnac.hzims.operational.main.constant.HomePageConstant;
import com.hnac.hzims.operational.main.vo.HydropowerUnitRealVo;
import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.scheduled.mapper.alarm.AlarmQueryMapper;
import com.hnac.hzims.scheduled.service.alarm.AlarmQueryService;
import com.hnac.hzims.scheduled.service.operation.station.StationService;
import com.hnac.hzinfo.datasearch.soe.ISoeClient;
import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryConditionByStation;
import com.hnac.hzinfo.sdk.core.response.HzPage;
import com.hnac.hzinfo.sdk.core.response.Result;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.core.tool.utils.*;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
@ -188,13 +194,4 @@ public class AlarmQueryServiceImpl extends BaseServiceImpl<AlarmQueryMapper, Ala
return "";
}).filter(StringUtil::isBlank).distinct().collect(Collectors.toList());
}
/**
* 数据中断告警
* @param param
*/
@Override
public void interruptAlarm(String param) {
}
}

120
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/InterruptionAlarmServiceImpl.java

@ -0,0 +1,120 @@
package com.hnac.hzims.scheduled.service.alarm.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.business.interruption.constants.InterruptionConstants;
import com.hnac.hzims.business.interruption.entity.InterruptionEntity;
import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.scheduled.mapper.alarm.InterruptionAlrmMapper;
import com.hnac.hzims.scheduled.service.alarm.InterruptionAlarmService;
import com.hnac.hzims.scheduled.service.operation.station.StationService;
import com.hnac.hzinfo.datasearch.soe.ISoeClient;
import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryConditionByStation;
import com.hnac.hzinfo.sdk.core.response.HzPage;
import com.hnac.hzinfo.sdk.core.response.Result;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.Calendar;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author ysj
*/
@AllArgsConstructor
@Service
@Slf4j
@DS("alarm")
public class InterruptionAlarmServiceImpl extends BaseServiceImpl<InterruptionAlrmMapper, InterruptionEntity> implements InterruptionAlarmService {
private final StationService stationService;
private final ISoeClient soeClient;
/**
* 数据中断告警
* @param param
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void interruption(String param) {
// 查询接入站点
List<StationEntity> stations = stationService.list(Wrappers.<StationEntity>lambdaQuery()
.eq(StationEntity::getDataOrigin,"0")
);
if(CollectionUtil.isEmpty(stations)){
return;
}
// 查询告警数据: 间隔10分钟
SoeQueryConditionByStation query = new SoeQueryConditionByStation();
query.setTypes(InterruptionConstants.INTERRUPTION_TYPE);
query.setStationIds(stations.stream().map(StationEntity::getCode).collect(Collectors.toList()));
Calendar calendar = Calendar.getInstance();
query.setEndTime(LocalDateTime.parse(DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATETIME),DateUtil.DATETIME_FORMATTER));
calendar.add(Calendar.MINUTE,-10);
query.setBeginTime(LocalDateTime.parse(DateUtil.format(calendar.getTime() , DateUtil.PATTERN_DATETIME),DateUtil.DATETIME_FORMATTER));
query.setNeedPage(false);
query.setPage(1);
query.setLimit(1000);
Result<HzPage<SoeData>> result = soeClient.getByStationsAndTime(query);
// 未查询到告警信息
if(!result.isSuccess() || ObjectUtil.isEmpty(result.getData()) || CollectionUtil.isEmpty(result.getData().getRecords())) {
return;
}
// 中断告警数据
List<SoeData> soes = result.getData().getRecords();
// 查询当天数据中断告警记录
List<InterruptionEntity> saves = this.saveInterruptions(stations.stream().map(StationEntity::getCode).collect(Collectors.toList()));
// 批量保存中断告警数据
this.saveBatch(soes.stream().filter(o-> CollectionUtil.isEmpty(saves) || !saves.stream().map(InterruptionEntity::getAlarmId).collect(Collectors.toList()).contains(o.getId())).map(soe->{
InterruptionEntity entity = new InterruptionEntity();
List<StationEntity> soeStations = stations.stream().filter(o->o.getCode().equals(soe.getStation())).collect(Collectors.toList());
if(!CollectionUtil.isEmpty(soeStations)){
entity.setStationId(soeStations.get(0).getCode());
entity.setStationName(soeStations.get(0).getName());
entity.setCreateDept(soeStations.get(0).getRefDept());
entity.setTenantId(soeStations.get(0).getTenantId());
}
entity.setAlarmId(soe.getId());
entity.setRealId(soe.getRealId());
entity.setSoeExplain(soe.getSoeExplain());
entity.setType(soe.getSoeType());
entity.setAlarmTime(soe.getTs());
entity.setStatus(0);
// 通讯中断恢复
if(InterruptionConstants.ABNORMAL_STATUS.equals(soe.getSoeAlarmType())){
entity.setStatus(1);
}
return entity;
}).collect(Collectors.toList()));
}
/**
* 查询当天数据中断告警记录
* @param stations
* @return
*/
private List<InterruptionEntity> saveInterruptions(List<String> stations) {
Calendar calendar = Calendar.getInstance();
String start = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME);
calendar.add(Calendar.HOUR_OF_DAY, -calendar.get(Calendar.HOUR_OF_DAY));
calendar.add(Calendar.MINUTE, -calendar.get(Calendar.MINUTE));
calendar.add(Calendar.SECOND, -calendar.get(Calendar.SECOND));
String end = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME);
return this.list(Wrappers.<InterruptionEntity>lambdaQuery()
.in(InterruptionEntity::getStationId,stations)
.ge(InterruptionEntity::getCreateTime,start)
.le(InterruptionEntity::getCreateTime,end)
);
}
}

452
hzims-service/message/src/main/resources/db/1.0.0.sql

@ -1,11 +1,401 @@
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- TABLE STRUCTURE FOR BLADE_MODULE_VERSION
-- ----------------------------
DROP TABLE IF EXISTS `BLADE_MODULE_VERSION`;
CREATE TABLE `BLADE_MODULE_VERSION` (
`MODULE_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`VERSION` VARCHAR(8) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`HISTORY` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
PRIMARY KEY (`MODULE_NAME`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZ_MSG_PUSH_RECORD
-- ----------------------------
DROP TABLE IF EXISTS `HZ_MSG_PUSH_RECORD`;
CREATE TABLE `HZ_MSG_PUSH_RECORD` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`BUSINESS_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '业务模块',
`BUSINESS_CLASSIFY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '业务关键字',
`SUBJECT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '主题',
`TAGS` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL DEFAULT '' COMMENT '标签集合,多个标签用逗号隔开',
`CONTENT` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
`SUCCESS` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否推送成功',
`PARAMETERS` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '请求参数',
`RESPONSE` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL DEFAULT '' COMMENT '响应内容',
`ERROR_LOG` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '错误日志',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态 1=成功 2=报错 3=接口返回异常',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `IDX_IS_DELETED_STATUS`(`STATUS`, `IS_DELETED`) USING BTREE,
INDEX `IDX_TAGS`(`TAGS`) USING BTREE,
INDEX `IDX_IS_ALL`(`SUCCESS`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '消息推送日志' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZ_MSG_PUSH_RECORD_COPY1
-- ----------------------------
DROP TABLE IF EXISTS `HZ_MSG_PUSH_RECORD_COPY1`;
CREATE TABLE `HZ_MSG_PUSH_RECORD_COPY1` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`TAGS` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL DEFAULT '' COMMENT '标签集合,多个标签用逗号隔开',
`IS_ALL` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否推送所有 0=否 1=是',
`REQ_BODY` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '请求参数',
`RESP_BODY` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL DEFAULT '' COMMENT '响应内容',
`ERROR_LOG` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '错误日志',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态 1=成功 2=报错 3=接口返回异常',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `IDX_IS_DELETED_STATUS`(`STATUS`, `IS_DELETED`) USING BTREE,
INDEX `IDX_TAGS`(`TAGS`) USING BTREE,
INDEX `IDX_IS_ALL`(`IS_ALL`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 2412442561386623978 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '消息推送日志' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZ_MSG_SMS_RECORD
-- ----------------------------
DROP TABLE IF EXISTS `HZ_MSG_SMS_RECORD`;
CREATE TABLE `HZ_MSG_SMS_RECORD` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`BUSINESS_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '业务模块',
`BUSINESS_CLASSIFY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '业务关键字',
`SUBJECT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '主题',
`CONTENT` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '内容',
`SMS_CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '平台资源模块提供的CODE',
`PHONES` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '手机号码',
`PARAMETERS` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '请求参数',
`RESPONSE` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL DEFAULT '' COMMENT '响应内容',
`SUCCESS` TINYINT(4) NULL DEFAULT NULL COMMENT '是否推送成功',
`ERROR_LOG` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '错误日志',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态 1=成功 2=失败 3=校验未通过',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `IDX_IS_DELETED_STATUS`(`STATUS`, `IS_DELETED`) USING BTREE,
INDEX `IDX_SMS_CODE`(`SMS_CODE`) USING BTREE,
INDEX `IDX_PHONE`(`PHONES`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '短信推送日志' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZ_MSG_SMS_RECORD_COPY1
-- ----------------------------
DROP TABLE IF EXISTS `HZ_MSG_SMS_RECORD_COPY1`;
CREATE TABLE `HZ_MSG_SMS_RECORD_COPY1` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`SMS_CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '平台资源模块提供的CODE',
`PHONES` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '手机号码',
`REQ_BODY` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '请求参数',
`RESP_BODY` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL DEFAULT '' COMMENT '响应内容',
`ERROR_LOG` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '错误日志',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态 1=成功 2=失败 3=校验未通过',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `IDX_IS_DELETED_STATUS`(`STATUS`, `IS_DELETED`) USING BTREE,
INDEX `IDX_SMS_CODE`(`SMS_CODE`) USING BTREE,
INDEX `IDX_PHONE`(`PHONES`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1471810757107675139 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '短信推送日志' ROW_FORMAT = DYNAMIC;
ALTER TABLE `hzims_message`.`hzims_app_log` MODIFY COLUMN `TYPE` tinyint(4) NULL DEFAULT NULL COMMENT '消息类型' AFTER `BUSINESS_CLASSIFY`;
ALTER TABLE `hzims_message`.`hzims_mail_config` ADD COLUMN `DURATION` mediumint(9) NULL DEFAULT NULL COMMENT '多长时间内的推送' AFTER `IS_DELETED`;
-- ----------------------------
-- TABLE STRUCTURE FOR HZ_MSG_WS_RECORD_COPY1
-- ----------------------------
DROP TABLE IF EXISTS `HZ_MSG_WS_RECORD_COPY1`;
CREATE TABLE `HZ_MSG_WS_RECORD_COPY1` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`USER_ID` BIGINT(20) NOT NULL COMMENT '推送目标账户ID',
`CLASSIFY` VARCHAR(30) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务分类',
`REQ_BODY` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '请求参数',
`ERROR_LOG` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '错误日志',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态 1=成功 2=报错 3=未读 4=已读',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL,
`TITLE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '标题',
PRIMARY KEY (`ID`) USING BTREE,
INDEX `IDX_USER_ID`(`USER_ID`) USING BTREE,
INDEX `IDX_IS_DELETED_STATUS`(`IS_DELETED`, `STATUS`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1531903445261381634 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = 'WEBSOCKET消息推送日志' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZ_MSG_WS_RECORD_HISTORY
-- ----------------------------
DROP TABLE IF EXISTS `HZ_MSG_WS_RECORD_HISTORY`;
CREATE TABLE `HZ_MSG_WS_RECORD_HISTORY` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`USER_ID` BIGINT(20) NOT NULL COMMENT '推送目标账户ID',
`CLASSIFY` VARCHAR(30) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务分类',
`REQ_BODY` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '请求参数',
`ERROR_LOG` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '错误日志',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态 1=成功 2=报错 3=未读 4=已读',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL,
`TITLE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '标题',
PRIMARY KEY (`ID`) USING BTREE,
INDEX `IDX_USER_ID`(`USER_ID`) USING BTREE,
INDEX `IDX_IS_DELETED_STATUS`(`IS_DELETED`, `STATUS`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = 'WEBSOCKET消息推送日志' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_APP_LOG
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_APP_LOG`;
CREATE TABLE `HZIMS_APP_LOG` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`BUSINESS_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务关键字',
`BUSINESS_CLASSIFY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务分类。系统通知:SYSTEM,事务消息:BUSINESS,日常提醒:DAILYREMIND,巡检消息:INSPECT',
`TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '消息类型',
`SUBJECT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '主题',
`CONTENT` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '内容',
`PUSHER` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '推送人',
`PARAMS` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '消息推送请求参数',
`ERROR_LOG` TINYTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '错误日志',
`RESULT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '推送结果',
`IS_SUCCESS` TINYINT(4) NULL DEFAULT NULL COMMENT '是否推送成功',
`IS_ALL` TINYINT(4) NULL DEFAULT NULL COMMENT '是否推送全平台',
`PLATFORM_TYPE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '推送类型',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除 0-正常 1-删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1632275505505910787 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_MAIL_CONFIG
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_MAIL_CONFIG`;
CREATE TABLE `HZIMS_MAIL_CONFIG` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`BUSINESS_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务关键字',
`BUSINESS_CLASSIFY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务分类。系统通知:SYSTEM,事务消息:BUSINESS,日常提醒:DAILYREMIND,巡检消息:INSPECT',
`TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '消息类型',
`SUBJECT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '主题',
`CONTENT` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '内容',
`PUSHERS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '推送人',
`MAILS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '发送邮箱账号',
`IS_HTML` TINYINT(4) NULL DEFAULT NULL COMMENT '是否为HTML模板推送',
`TEMPLATE_URL` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT 'HTML模板路径',
`TEMPLATE_FILE_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT 'HTML模板文件名',
`JSON_OBJECT` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT 'HTML模板填充数据对象JSON字符串',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除 0-正常 1-删除',
`DURATION` MEDIUMINT(9) NULL DEFAULT NULL COMMENT '多长时间内的推送',
`TIME_UNIT` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '时间单位',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1659153459628224515 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_MAIL_LOG
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_MAIL_LOG`;
CREATE TABLE `HZIMS_MAIL_LOG` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`BUSINESS_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务关键字',
`BUSINESS_CLASSIFY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务分类。系统通知:SYSTEM,事务消息:BUSINESS,日常提醒:DAILYREMIND,巡检消息:INSPECT',
`TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '消息类型',
`SUBJECT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '主题',
`CONTENT` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '内容',
`PUSHER` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '推送人',
`PARAMS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '消息推送请求参数',
`ERROR_LOG` TINYTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '错误日志',
`RESULT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '推送结果',
`IS_SUCCESS` TINYINT(4) NULL DEFAULT NULL COMMENT '是否推送成功',
`EMAIL` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '推送邮箱',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除 0-正常 1-删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_MESSAGE_PUSH_RECORD
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_MESSAGE_PUSH_RECORD`;
CREATE TABLE `HZIMS_MESSAGE_PUSH_RECORD` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`TASK_ID` BIGINT(20) NOT NULL COMMENT '消息类型',
`TEMPLATE_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '消息模板ID',
`PUSHER` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '推送人',
`PUSHER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '推送人名称',
`CONTENT` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '内容',
`PLAN_TIME` DATETIME NULL DEFAULT NULL COMMENT '计划推送时间',
`PUSH_TIME` DATETIME NULL DEFAULT NULL COMMENT '实际推送时间',
`TYPE` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '消息类型',
`BUSINESS_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务关键字',
`BUSINESS_CLASSIFY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务分类。系统通知:SYSTEM,事务消息:BUSINESS,日常提醒:DAILYREMIND,巡检消息:INSPECT',
`SUBJECT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '主题',
`CONCENTRATED_DURATION` MEDIUMINT(9) NULL DEFAULT NULL COMMENT '集中推送时长',
`CONCENTRATED_TIME_UNIT` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '集中推送单位',
`ADVANCE_DURATION` MEDIUMINT(9) NULL DEFAULT NULL COMMENT '提前推送时长',
`ADVANCE_TIME_UNIT` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '提前推送单位',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`STATUS` TINYINT(4) NULL DEFAULT 0 COMMENT '业务状态(0 未推送,1 推送成功,2 推送失败,3 已确认)',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除 0-正常 1-删除',
`RESPOND_TIME` DATETIME NULL DEFAULT NULL COMMENT '响应时间',
`RESPOND_REMARK` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '响应说明',
`RESOURCE_CODE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '资源编码',
`ACCOUNT` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '推送账号:手机号,邮箱',
`DEPT_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '机构ID',
`DEPT_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '机构ID',
`MESSAGE_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '消息ID',
`PUSH_TYPE` VARCHAR(2) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '推送类型,0:即时推送,1:计划推送',
`SMS_PARAM` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '阿里云短信模板参数',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1759475661027692546 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '消息推送记录' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_MESSAGE_TEMPLATE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_MESSAGE_TEMPLATE`;
CREATE TABLE `HZIMS_MESSAGE_TEMPLATE` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '消息类型',
`TYPE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '主键ID',
`BUSINESS_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务关键字',
`BUSINESS_CLASSIFY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务分类。系统通知:SYSTEM,事务消息:BUSINESS,日常提醒:DAILYREMIND,巡检消息:INSPECT',
`SUBJECT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '主题',
`CONCENTRATED_DURATION` MEDIUMINT(9) NULL DEFAULT NULL COMMENT '集中推送时长',
`CONCENTRATED_TIME_UNIT` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '集中推送单位',
`ADVANCE_DURATION` MEDIUMINT(9) NULL DEFAULT NULL COMMENT '提前推送时长',
`ADVANCE_TIME_UNIT` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '提前推送单位',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除 0-正常 1-删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1654674468043325442 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '消息推送模板' ROW_FORMAT = DYNAMIC;
ALTER TABLE `hzims_message`.`hzims_mail_config` ADD COLUMN `TIME_UNIT` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '时间单位' AFTER `DURATION`;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_MSG_MAIL_RECORD
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_MSG_MAIL_RECORD`;
CREATE TABLE `HZIMS_MSG_MAIL_RECORD` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`BUSINESS_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL DEFAULT '' COMMENT '业务关键字',
`BUSINESS_CLASSIFY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL DEFAULT '' COMMENT '业务分类',
`SUBJECT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '主题',
`CONTENT` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '内容',
`TO_ACCOUNTS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '发送邮箱,按逗号分隔',
`SUCCESS` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否发送成功',
`PARAMETERS` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '发送参数',
`RESPONSE` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '响应内容',
`ERROR_LOG` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '错误日志',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态 1=成功 2=报错 3=接口返回异常',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '邮件发送记录' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_PUSH_CONFIG
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_PUSH_CONFIG`;
CREATE TABLE `HZIMS_PUSH_CONFIG` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`BUSINESS_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务关键字',
`BUSINESS_CLASSIFY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务分类。系统通知:SYSTEM,事务消息:BUSINESS,日常提醒:DAILYREMIND,巡检消息:INSPECT',
`TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '消息类型',
`SUBJECT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '主题',
`CONTENT` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '内容',
`PUSHERS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '推送人',
`IS_ALL` TINYINT(4) NULL DEFAULT NULL COMMENT '是否推送全平台',
`PLATFORM_TYPE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '推送类型',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除 0-正常 1-删除',
`DURATION` MEDIUMINT(9) NULL DEFAULT NULL COMMENT '多长时间内的推送',
`TIME_UNIT` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '时间单位',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1563050030925991939 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_PUSH_MESSAGE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_PUSH_MESSAGE`;
CREATE TABLE `HZIMS_PUSH_MESSAGE` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`MESSAGE_TYPE` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '消息类型',
`BUSINESS_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务KEY值',
`MESSAGE_CONTENT` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '消息推送内容体',
`IS_PUSH` TINYINT(4) NULL DEFAULT 0 COMMENT '是否推送',
`IS_SUCCESS` TINYINT(4) NULL DEFAULT NULL COMMENT '是否推送',
`PUSH_TIME` DATETIME NULL DEFAULT NULL COMMENT '推送时间',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除 0-正常 1-删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
CREATE TABLE `hzims_message`.`hzims_message_push_record` (
`ID` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`TASK_ID` bigint(20) NOT NULL COMMENT '消息类型',
@ -64,6 +454,34 @@ CREATE TABLE `hzims_message`.`hzims_message_template` (
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '消息推送模板' ROW_FORMAT = Dynamic;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SMS_LOG
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SMS_LOG`;
CREATE TABLE `HZIMS_SMS_LOG` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`BUSINESS_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务关键字',
`BUSINESS_CLASSIFY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务分类。系统通知:SYSTEM,事务消息:BUSINESS,日常提醒:DAILYREMIND,巡检消息:INSPECT',
`TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '消息类型',
`SUBJECT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '主题',
`CONTENT` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '内容',
`PUSHER` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '推送人',
`PARAMS` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '消息推送请求参数',
`ERROR_LOG` TINYTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '错误日志',
`RESULT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '推送结果',
`IS_SUCCESS` TINYINT(4) NULL DEFAULT NULL COMMENT '是否推送成功',
`PHONES` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '接受短信的手机号',
`PARAMS_JSON` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '短信模板参数',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除 0-正常 1-删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1612776146498326531 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
ALTER TABLE `hzims_message`.`hzims_push_config` MODIFY COLUMN `TIME_UNIT` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '时间单位' AFTER `DURATION`;
CREATE TABLE `hzims_message`.`hzims_push_message` (
@ -91,6 +509,28 @@ ALTER TABLE `hzims_message`.`hzims_sms_config` MODIFY COLUMN `TIME_UNIT` varchar
ALTER TABLE `hzims_message`.`hzims_ws_config` ADD COLUMN `DURATION` mediumint(9) NULL DEFAULT NULL COMMENT '多长时间内的推送' AFTER `IS_DELETED`;
ALTER TABLE `hzims_message`.`hzims_ws_config` ADD COLUMN `TIME_UNIT` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '时间单位' AFTER `DURATION`;
SET FOREIGN_KEY_CHECKS=1;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WS_CONFIG
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_WS_CONFIG`;
CREATE TABLE `HZIMS_WS_CONFIG` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`BUSINESS_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务关键字',
`BUSINESS_CLASSIFY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '业务分类。系统通知:SYSTEM,事务消息:BUSINESS,日常提醒:DAILYREMIND,巡检消息:INSPECT',
`TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '消息类型',
`SUBJECT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '主题',
`CONTENT` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '内容',
`PUSHERS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '推送人',
`IS_ALL` TINYINT(4) NULL DEFAULT NULL COMMENT '是否推送在线用户;1:推送在线用户,0:指定用户推送',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除 0-正常 1-删除',
`DURATION` MEDIUMINT(9) NULL DEFAULT NULL COMMENT '多长时间内的推送',
`TIME_UNIT` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '时间单位',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1533986977405845507 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;

28
hzims-service/message/src/main/resources/dict/dict.sql

@ -0,0 +1,28 @@
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1412293116405358593, 0, 'MESSAGECLASSIFY', '-1', '消息业务分类', 200, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1532279291869634562, 0, 'BUSINESSCLASSIFY', '-1', '业务分类', 101, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1532279476934909953, 1532279291869634562, 'BUSINESSCLASSIFY', 'SYSTEM', '系统通知', 1, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1532281503811346433, 1532279291869634562, 'BUSINESSCLASSIFY', 'BUSINESS', '事务消息', 2, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1532281763979829249, 1532279291869634562, 'BUSINESSCLASSIFY', 'DAILYREMIND', '日常提醒', 3, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1532281877184094210, 1532279291869634562, 'BUSINESSCLASSIFY', 'INSPECT', '巡检消息', 4, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1592363904612401154, 0, 'TIMEUNIT', '-1', '消息推送时间单位', 3, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1592364310415507458, 1592363904612401154, 'TIMEUNIT', 'YEAR', '', 1, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1592364366254276609, 1592363904612401154, 'TIMEUNIT', 'MONTH', '', 2, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1592364421291933697, 1592363904612401154, 'TIMEUNIT', 'DAY', '', 3, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1592364497384996866, 1592363904612401154, 'TIMEUNIT', 'HOUR', '', 4, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1592364546408022017, 1592363904612401154, 'TIMEUNIT', 'MINUTER', '', 5, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1592364625483235329, 1592363904612401154, 'TIMEUNIT', 'SECOND', '', 6, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1643863738239016961, 0, 'MESSAGETYPE', '-1', '消息类型', 4, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1643864073741393922, 1643863738239016961, 'MESSAGETYPE', 'APPPUSH', 'APP推送', 1, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1643864127436873730, 1643863738239016961, 'MESSAGETYPE', 'SMSPUSH', '短信推送', 2, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1643864182193512450, 1643863738239016961, 'MESSAGETYPE', 'WEBSOCKETPUSH', 'WEB推送', 3, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1643864236228730881, 1643863738239016961, 'MESSAGETYPE', 'MAILPUSH', '邮件推送', 4, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1644519305194332162, 0, 'MESSAGESTATUS', '-1', '消息状态', 118, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1644519463822909442, 1644519305194332162, 'MESSAGESTATUS', '0', '未推送', 1, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1644519505505902594, 1644519305194332162, 'MESSAGESTATUS', '1', '推送成功', 2, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1644519587701678081, 1644519305194332162, 'MESSAGESTATUS', '2', '推送失败', 3, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1644519736347811841, 1644519305194332162, 'MESSAGESTATUS', '3', '已确认', 4, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1646311806007861249, 1532279291869634562, 'BUSINESSCLASSIFY', 'WARNING', '告警消息', 5, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1646696048818679809, 1532279291869634562, 'BUSINESSCLASSIFY', 'DUTY', '值班消息', 6, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1646696133489094658, 1532279291869634562, 'BUSINESSCLASSIFY', 'SAFE', '安全消息', 7, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1646697275589685249, 1532279291869634562, 'BUSINESSCLASSIFY', 'ACCESS', '检修消息', 8, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1687006487674667010, 1412293116405358593, 'MESSAGECLASSIFY', 'ASSETS', '资产管理', 9, '', 0, 0, 0, -1, 'HZIMS-MESSAGE');

618
hzims-service/safeproduct/src/main/resources/db/1.0.0.sql

@ -1,37 +1,581 @@
create table target_management
(
id bigint primary key auto_increment comment '编号',
name varchar(50) not null comment '名称',
score varchar(50) comment '分值',
parent_id bigint comment '父级Id',
level int comment '等级',
create_time datetime default current_timestamp comment '创建时间',
update_time datetime default current_timestamp on update current_timestamp comment '更新时间',
is_deleted tinyint(1) default 0 comment '逻辑删除'
) comment '指标管理';
create table indicator_management
(
id bigint primary key auto_increment comment '编号',
product_name varchar(5000) not null comment '项目名称',
standard_score varchar(50) comment '标准分值',
evaluation_method varchar(50) comment '评审方法及评分标准',
target_management_id bigint comment '指标管理id',
create_time datetime default current_timestamp comment '创建时间',
update_time datetime default current_timestamp on update current_timestamp comment '更新时间',
is_deleted tinyint(1) default 0 comment '逻辑删除'
) comment '指标项管理';
create table rating_scale
(
id bigint primary key auto_increment comment '编号',
indicator_management_id bigint comment '指标项管理id',
goal varchar(50) comment '得分',
review_description varchar(5000) comment '评审描述',
create_time datetime default current_timestamp comment '创建时间',
update_time datetime default current_timestamp on update current_timestamp comment '更新时间',
is_deleted tinyint(1) default 0 comment '逻辑删除'
) comment '平分表';
-- ----------------------------
-- TABLE STRUCTURE FOR BLADE_MODULE_VERSION
-- ----------------------------
DROP TABLE IF EXISTS `BLADE_MODULE_VERSION`;
CREATE TABLE `BLADE_MODULE_VERSION` (
`MODULE_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`VERSION` VARCHAR(8) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`HISTORY` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
PRIMARY KEY (`MODULE_NAME`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR DOCUMENT_MANAGEMENT
-- ----------------------------
DROP TABLE IF EXISTS `DOCUMENT_MANAGEMENT`;
CREATE TABLE `DOCUMENT_MANAGEMENT` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`DOCUMENT_NAME` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '文档名称',
`DOCUMENT_URL` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '文档路径',
`CREATOR_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人ID',
`CREATOR_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '创建人名称',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT 0 COMMENT '逻辑删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '文档管理' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZ_IMS_MON_ALARM_INFO
-- ----------------------------
DROP TABLE IF EXISTS `HZ_IMS_MON_ALARM_INFO`;
CREATE TABLE `HZ_IMS_MON_ALARM_INFO` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CAMERA_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '告警摄像头ID',
`ALARM_POS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警位置',
`MONITOR_ITEM` BIGINT(20) NULL DEFAULT NULL COMMENT '检测项目(字典表ID)字典类型:MINITOR_ITEM',
`ALARM_CONTENT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警内容',
`ALARM_TIME` DATETIME NOT NULL COMMENT '告警时间',
`PIC_LINK` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警图片路径',
`PIC_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警图片NAME',
`PIC_ORIGINAL_NAME` VARCHAR(127) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警图片ORIGINALNAME',
`ACCEPT_USER_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '告警接收人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL COMMENT '是否删除',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '视频监控告警信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZ_IMS_MON_CAMERA_INFO
-- ----------------------------
DROP TABLE IF EXISTS `HZ_IMS_MON_CAMERA_INFO`;
CREATE TABLE `HZ_IMS_MON_CAMERA_INFO` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`NAME` VARCHAR(127) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '摄像头名称',
`ADDRESS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '摄像头地址',
`SPAN_TIME` DECIMAL(11, 3) NOT NULL COMMENT '配置拍照间隔时间',
`RESOLUTION` VARCHAR(32) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL DEFAULT '_X_' COMMENT '像素值(_X_代表使用原始值,640X480代表强制缩放到640X480)',
`IP` VARCHAR(32) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '摄像头IP',
`PORT` INT(11) NOT NULL COMMENT '摄像头端口',
`USER` VARCHAR(32) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '摄像头账号',
`PASSWORD` VARCHAR(32) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '摄像头账号密码',
`MONITOR_ITEMS` VARCHAR(2048) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警检测项目(字典表IDS, 通过 ^ 隔开),字典类型:MINITOR_ITEM',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL COMMENT '是否删除',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门',
`ADDRESS_TYPE` BIGINT(20) NULL DEFAULT NULL COMMENT '视频流地址类型',
`LIVESOURCEADDRESS` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '视频流地址',
`POINT_CODE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '监测点编号',
`LAST_REQUESTTIME` DATETIME NULL DEFAULT NULL COMMENT '最后请求时间',
`POINT_ID` BIGINT(20) NULL DEFAULT -1 COMMENT '检测点ID',
`IS_CONTROL` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否云台控制',
`IS_HIKVIDEO` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否平台接入',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '视频监控告警摄像头信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_ACCIDENT
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_ACCIDENT`;
CREATE TABLE `HZIMS_ACCIDENT` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '事故名称',
`TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '事故分类(事件、一般事故、重大及以上事故))',
`TYPE_NAME` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '事故分类名称',
`HANDLER` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '处理人员',
`HANDLER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '处理人员名称',
`OCCUR_TIME` DATETIME NULL DEFAULT NULL COMMENT '发生时间',
`OCCUR_PLACE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '发生地点',
`REASON` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '发生原因',
`DESCRIPTION` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '描述',
`DEAL_SUGGESTION` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '处理建议',
`RECTIFICATION` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '整改措施',
`REPORT_URL` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '处理报告地址',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
`FILE_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '处理报告源文件名',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_REVIEW
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_REVIEW`;
CREATE TABLE `HZIMS_REVIEW` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`STATION_CODE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '站点ID',
`SCORE` DOUBLE(6, 2) NULL DEFAULT NULL COMMENT '分数',
`SUBMITTER` BIGINT(20) NULL DEFAULT NULL COMMENT '提交人',
`SUBMIT_TIME` DATETIME NULL DEFAULT NULL COMMENT '提交时间',
`REVIEWER` BIGINT(20) NULL DEFAULT NULL COMMENT '评审人',
`REVIEW_TIME` DATETIME NULL DEFAULT NULL COMMENT '评审时间',
`FILE_NAME` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '附件文件名称',
`FILE_URL` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '附件文件URL',
`STATUS` TINYINT(4) NULL DEFAULT 0 COMMENT '状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_REVIEW_STANDARD
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_REVIEW_STANDARD`;
CREATE TABLE `HZIMS_REVIEW_STANDARD` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`REVIEW_ID` BIGINT(20) NOT NULL COMMENT '评审ID',
`STANDARD_ID` TINYINT(4) NOT NULL COMMENT '标准ID',
`STANDARD_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '标准名称',
`SCORE` SMALLINT(6) NULL DEFAULT NULL COMMENT '分数',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_CHECK_COMPANY
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_CHECK_COMPANY`;
CREATE TABLE `HZIMS_SAFE_CHECK_COMPANY` (
`ID` BIGINT(20) NOT NULL,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`START_TIME` DATETIME NULL DEFAULT NULL COMMENT '开始时间',
`END_TIME` DATETIME NULL DEFAULT NULL COMMENT '结束时间',
`PROBLEM` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '检查问题补充',
`ORG_ID` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '检查机构',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '公司检查' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_CHECK_ITEM
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_CHECK_ITEM`;
CREATE TABLE `HZIMS_SAFE_CHECK_ITEM` (
`ID` BIGINT(20) NOT NULL,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`PARENT_ITEM` BIGINT(20) NULL DEFAULT NULL COMMENT '父级检查项',
`ITEM` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '检查项',
`TOTAL_SCORE` DOUBLE(5, 1) NULL DEFAULT NULL COMMENT '总分',
`SORT` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '排序',
`FIXED` TINYINT(4) NULL DEFAULT NULL COMMENT '是否为固定检查项',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态(启用/停用)',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '检查项管理' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_CHECK_ITEM_INSTANCE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_CHECK_ITEM_INSTANCE`;
CREATE TABLE `HZIMS_SAFE_CHECK_ITEM_INSTANCE` (
`ID` BIGINT(20) NOT NULL,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`OID` BIGINT(20) NULL DEFAULT NULL COMMENT '原始ID,用于维持父子结构',
`PARENT_ITEM` BIGINT(20) NULL DEFAULT NULL COMMENT '父级检查项',
`ITEM` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '检查项',
`TOTAL_SCORE` DOUBLE(5, 1) NULL DEFAULT NULL COMMENT '总分',
`SORT` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '排序',
`SYSTEM_SITUATION` VARCHAR(800) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '系统检查情况',
`SITUATION` VARCHAR(800) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '检查情况',
`SCORE` DOUBLE(5, 1) NULL DEFAULT NULL COMMENT '评分',
`CHECK_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '检查ID',
`ORG_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '机构ID',
`FIXED` TINYINT(4) NULL DEFAULT NULL COMMENT '是否为固定检查项',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '检查项实例' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_CHECK_MONTH
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_CHECK_MONTH`;
CREATE TABLE `HZIMS_SAFE_CHECK_MONTH` (
`ID` BIGINT(20) NOT NULL,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`MONTH` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '自查月份',
`SCORE` DOUBLE(5, 1) NULL DEFAULT NULL COMMENT '得分',
`SUGGEST` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '核查建议',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '月度检查' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_CHECK_NOTICE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_CHECK_NOTICE`;
CREATE TABLE `HZIMS_SAFE_CHECK_NOTICE` (
`ID` BIGINT(20) NOT NULL,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`YEAR` INT(11) NULL DEFAULT NULL COMMENT '年度',
`QUARTER` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '检查季度',
`STATION` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '检查厂站',
`START_DATE` DATE NULL DEFAULT NULL COMMENT '开始日期',
`END_DATE` DATE NULL DEFAULT NULL COMMENT '结束日期',
`CHECKER` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '检查人员',
`CONTENT` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '通知内容',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '季度检查通知' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_CHECK_QUARTER
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_CHECK_QUARTER`;
CREATE TABLE `HZIMS_SAFE_CHECK_QUARTER` (
`ID` BIGINT(20) NOT NULL,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`YEAR` INT(11) NULL DEFAULT NULL COMMENT '年度',
`QUARTER` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '自查季度',
`SCORE` DOUBLE(5, 1) NULL DEFAULT NULL COMMENT '得分',
`SUGGEST` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '核查建议',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '季度检查' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_DANGER_SOURCE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_DANGER_SOURCE`;
CREATE TABLE `HZIMS_SAFE_DANGER_SOURCE` (
`ID` BIGINT(20) NOT NULL,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`TYPE` TINYINT(4) NOT NULL COMMENT '危险源类型 1=作业活动 2=设备',
`EQ_ID` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '设备ID',
`APPLY_TYPE` VARCHAR(4) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '应用类型',
`NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '危险源名称',
`DANGER_ELE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '危险因素',
`CAUSE` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '可能导致的事故',
`MEASURES` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '措施',
`LEVEL` TINYINT(4) NOT NULL COMMENT '风险等级 10=稍有危险 20=一般危险 30=显著危险 40=高度危险',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '危险源' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_DANGER_SOURCE_LEVEL_RECORD
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_DANGER_SOURCE_LEVEL_RECORD`;
CREATE TABLE `HZIMS_SAFE_DANGER_SOURCE_LEVEL_RECORD` (
`SOURCE_ID` BIGINT(20) NOT NULL COMMENT '危险源ID',
`ORGI_LEVEL` TINYINT(4) NOT NULL COMMENT '原等级',
`NEW_LEVEL` TINYINT(4) NOT NULL COMMENT '新等级',
`TYPE` TINYINT(4) NOT NULL COMMENT '评级类型 0=降级 1=升级',
`FLOW_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '工作流ID',
`REMARK` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`UPDATE_TIME` DATETIME NOT NULL COMMENT '变更时间',
PRIMARY KEY (`SOURCE_ID`) USING BTREE,
INDEX `IDX_SOURCE_ID`(`SOURCE_ID`) USING BTREE,
INDEX `IDX_FLOW_ID`(`FLOW_ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '危险源评级记录' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_DANGER_SOURCE_POSITION
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_DANGER_SOURCE_POSITION`;
CREATE TABLE `HZIMS_SAFE_DANGER_SOURCE_POSITION` (
`SOURCE_ID` BIGINT(20) NOT NULL COMMENT '危险源ID',
`PADDING_TOP` DOUBLE(11, 2) NULL DEFAULT NULL COMMENT '平面图顶部距离',
`PADDING_LEFT` DOUBLE(11, 2) NULL DEFAULT NULL COMMENT '平面图左边距',
`LGTD` DOUBLE(11, 2) NULL DEFAULT NULL COMMENT '经度',
`LTTD` DOUBLE(11, 2) NULL DEFAULT NULL COMMENT '纬度',
INDEX `IDX_SOURCE_ID`(`SOURCE_ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '危险源位置' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_EMERGENCY_PLAN
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_EMERGENCY_PLAN`;
CREATE TABLE `HZIMS_SAFE_EMERGENCY_PLAN` (
`ID` BIGINT(20) NOT NULL,
`TYPE_ID` BIGINT(20) NOT NULL COMMENT '应急预案类型ID',
`FILE_PATH` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '文件路径',
`FILE_NAME` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '文件名称',
`FILE_STATUS` TINYINT(255) NOT NULL DEFAULT 1 COMMENT '状态 1=待审审核 2=审核中 3=审核不通过 4=审核通过',
`FLOW_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作流ID',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `IDX_TYPE_ID`(`TYPE_ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '应急预案文件' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_EMERGENCY_PLAN_TYPE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_EMERGENCY_PLAN_TYPE`;
CREATE TABLE `HZIMS_SAFE_EMERGENCY_PLAN_TYPE` (
`ID` BIGINT(20) NOT NULL,
`NAME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '类型名称',
`PARENT_ID` BIGINT(20) NOT NULL DEFAULT -1 COMMENT '父类型ID',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `IDX_PARENT_ID`(`PARENT_ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '标准体系文件类型' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_EQUIPMENT_TRIAL
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_EQUIPMENT_TRIAL`;
CREATE TABLE `HZIMS_SAFE_EQUIPMENT_TRIAL` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`FILE_PATH` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '文件路径',
`FILE_NAME` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '文件名称',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除 0-正常 1-删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1646106200556736514 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_SAFETY_TOOL
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_SAFETY_TOOL`;
CREATE TABLE `HZIMS_SAFE_SAFETY_TOOL` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`TYPE_ID` BIGINT(20) NOT NULL,
`TOOL_CODE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '工器具编号',
`TOOL_NAME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '工器具名称',
`SAFE_TIME` INT(11) NOT NULL COMMENT '有效期限(单位:天)',
`LAST_CHECK_TIME` DATETIME NULL DEFAULT NULL COMMENT '最后检查时间',
`NEXT_CHECK_TIME` DATETIME NULL DEFAULT NULL COMMENT '下一次检查时间',
`CUR_STS` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '所属机构',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
`NOTICE_USERS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '通知用户',
`SEND_TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '通知类型 1=短信 2=APP',
`MESSAGE_TEMPLATE_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '消息模板ID',
PRIMARY KEY (`ID`) USING BTREE,
INDEX `IDX_TYPE_ID`(`TYPE_ID`) USING BTREE,
INDEX `IDX_TOOL_CODE`(`TOOL_CODE`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1731660338455171075 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '安全工器具' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_SAFETY_TOOL_RECHECK
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_SAFETY_TOOL_RECHECK`;
CREATE TABLE `HZIMS_SAFE_SAFETY_TOOL_RECHECK` (
`TOOL_ID` BIGINT(20) NOT NULL COMMENT '工器具ID',
`CHECK_USER_ID` BIGINT(20) NOT NULL COMMENT '复核人ID',
`CHECK_USER_NAME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '复核人名称',
`CHECK_TIME` DATETIME NOT NULL COMMENT '复核时间',
`REMARK` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
INDEX `IDX_CHECK_USER_ID`(`CHECK_USER_ID`) USING BTREE,
INDEX `IDX_TOOL_ID`(`TOOL_ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '安全工器具复合记录' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_SAFETY_TOOL_TYPE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_SAFETY_TOOL_TYPE`;
CREATE TABLE `HZIMS_SAFE_SAFETY_TOOL_TYPE` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`TENANT_ID` BIGINT(12) NOT NULL,
`TYPE_NAME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '类型名称',
`SEND_TYPE` TINYINT(4) NOT NULL COMMENT '通知类型 1=短信 2=微信 3=APP',
`SEND_DAY` INT(11) NOT NULL DEFAULT 0 COMMENT '提前通知天数',
`SEND_TIME` DATE NULL DEFAULT NULL COMMENT '通知时间',
`STATUS` TINYINT(4) NOT NULL DEFAULT 1 COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1731657447786991618 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '安全工器具类型' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_SAFETY_TOOL_TYPE_USER
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_SAFETY_TOOL_TYPE_USER`;
CREATE TABLE `HZIMS_SAFE_SAFETY_TOOL_TYPE_USER` (
`TYPE_ID` BIGINT(20) NOT NULL COMMENT '安全工器具类型ID',
`USER_ID` BIGINT(20) NOT NULL COMMENT '账户ID',
INDEX `IDX_TYPE_ID`(`TYPE_ID`) USING BTREE,
INDEX `IDX_USER_ID`(`USER_ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '通知人员关联表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_SYSTEM_FILE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_SYSTEM_FILE`;
CREATE TABLE `HZIMS_SAFE_SYSTEM_FILE` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`FILE_TYPE_ID` BIGINT(20) NOT NULL COMMENT '文件类型ID',
`FILE_PATH` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '文件路径',
`FILE_NAME` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '文件名称',
`FILE_STATUS` TINYINT(255) NOT NULL DEFAULT 1 COMMENT '状态 1=待审审核 2=审核中 3=审核不通过 4=审核通过',
`FLOW_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作流ID',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `IDX_F_TYPE_ID`(`FILE_TYPE_ID`) USING BTREE,
INDEX `IDX_FLOW_ID`(`FLOW_ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1658649408931115010 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '体系文件关系表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SAFE_SYSTEM_FILE_TYPE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_SAFE_SYSTEM_FILE_TYPE`;
CREATE TABLE `HZIMS_SAFE_SYSTEM_FILE_TYPE` (
`ID` BIGINT(20) NOT NULL DEFAULT -1,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`NAME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '文件类型名称',
`PARENT_ID` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '父类型ID',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `IDX_PARENT_TYPE`(`PARENT_ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '标准体系文件类型' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR INDICATOR_MANAGEMENT
-- ----------------------------
DROP TABLE IF EXISTS `INDICATOR_MANAGEMENT`;
CREATE TABLE `INDICATOR_MANAGEMENT` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`PRODUCT_NAME` VARCHAR(5000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '项目名称',
`STANDARD_SCORE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '标准分值',
`EVALUATION_METHOD` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '评审方法及评分标准',
`TARGET_MANAGEMENT_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '指标管理ID',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(1) NULL DEFAULT 0 COMMENT '逻辑删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '指标项管理' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR RATING_SCALE
-- ----------------------------
DROP TABLE IF EXISTS `RATING_SCALE`;
CREATE TABLE `RATING_SCALE` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`INDICATOR_MANAGEMENT_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '指标项管理ID',
`GOAL` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '得分',
`REVIEW_DESCRIPTION` VARCHAR(5000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '评审描述',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(1) NULL DEFAULT 0 COMMENT '逻辑删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '平分表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR TARGET_MANAGEMENT
-- ----------------------------
DROP TABLE IF EXISTS `TARGET_MANAGEMENT`;
CREATE TABLE `TARGET_MANAGEMENT` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '名称',
`SCORE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '分值',
`PARENT_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '父级ID',
`LEVEL` INT(11) NULL DEFAULT NULL COMMENT '等级',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(1) NULL DEFAULT 0 COMMENT '逻辑删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '指标管理' ROW_FORMAT = DYNAMIC;

12
hzims-service/safeproduct/src/main/resources/db/1.0.1.sql

@ -1,12 +0,0 @@
create table document_management
(
id bigint primary key auto_increment,
document_name varchar(100) comment '文档名称',
document_url varchar(300) comment '文档路径',
creator_id bigint comment '创建人Id',
creator_name varchar(50) comment '创建人名称',
create_time datetime default current_timestamp comment '创建时间',
update_time datetime default current_timestamp on update current_timestamp comment '更新时间',
is_deleted tinyint default 0 comment '逻辑删除'
) comment '文档管理';

588
hzims-service/safeproduct/src/main/resources/db/1.0.2.sql

@ -1,588 +0,0 @@
alter table `hzims_safe_safety_tool` add column `advance_notice_days` tinyint(4) default 0 comment '安全工器具提前通知天数';
CREATE TABLE `hzims_rehearsal_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`subject` varchar(50) NOT NULL COMMENT '演练科目',
`scheduled_start_time` date NOT NULL COMMENT '演练计划开始时间',
`scheduled_end_time` date NOT NULL COMMENT '演练计划结束时间',
`location` varchar(255) NOT NULL COMMENT '演练地点',
`commander` varchar(10) NOT NULL COMMENT '总指挥',
`rehearsal_method` varchar(20) DEFAULT '' COMMENT '演练方式',
`rehearsal_status` varchar(20) NOT NULL DEFAULT 'WAITING' COMMENT '演练状态',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='演练计划表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_rehearsal_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`rehearsal_plan_id` bigint(20) NOT NULL COMMENT '演练计划id',
`code` varchar(50) NOT NULL COMMENT '编号',
`people_num` int(10) NOT NULL DEFAULT '0' COMMENT '参演人数',
`people_name` varchar(5000) DEFAULT '' COMMENT '参演人员',
`actual_start_time` datetime NOT NULL COMMENT '演练实际开始时间',
`actual_end_time` datetime NOT NULL COMMENT '演练实际结束时间',
`record` varchar(250) NOT NULL DEFAULT '' COMMENT '演练记录',
`comment` varchar(250) NOT NULL DEFAULT '' COMMENT '演练评价',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '演练图片',
`file_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '演练附件',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='演练记录表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_train_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`scheduled_start_time` date NOT NULL COMMENT '计划培训开始时间',
`scheduled_end_time` date NOT NULL COMMENT '计划培训结束时间',
`lesson` varchar(255) NOT NULL COMMENT '培训课程',
`location` varchar(255) NOT NULL COMMENT '培训地点',
`train_method` varchar(20) DEFAULT '' COMMENT '培训方式',
`teacher` varchar(20) NOT NULL DEFAULT '' COMMENT '培训讲师',
`train_status` varchar(20) NOT NULL DEFAULT 'WAITING' COMMENT '培训状态',
`is_test` int(2) NOT NULL DEFAULT '0' COMMENT '关联考试:0-否,1-是',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='培训计划表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_train_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`train_plan_id` bigint(20) DEFAULT NULL COMMENT '培训计划id',
`train_record_name` varchar(50) NOT NULL DEFAULT '' COMMENT '培训记录名称',
`code` varchar(50) NOT NULL COMMENT '编号',
`people_name` varchar(5000) DEFAULT '' COMMENT '培训学员',
`content` mediumtext COMMENT '培训内容',
`actual_start_time` datetime DEFAULT NULL COMMENT '实际培训开始时间',
`actual_end_time` datetime DEFAULT NULL COMMENT '实际培训结束时间',
`command` varchar(250) DEFAULT NULL COMMENT '培训评价',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '培训图片',
`file_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '培训附件',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='培训记录表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_test` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`train_plan_id` bigint(20) DEFAULT NULL COMMENT '培训计划id',
`train_record_id` bigint(20) DEFAULT NULL COMMENT '培训记录id',
`test_name` varchar(50) NOT NULL DEFAULT '' COMMENT '考试记录名称',
`code` varchar(50) NOT NULL COMMENT '编号',
`unit` varchar(50) NOT NULL COMMENT '单位',
`test_start_time` datetime NOT NULL COMMENT '考试开始时间',
`test_end_time` datetime NOT NULL COMMENT '考试结束时间',
`location` varchar(255) NOT NULL COMMENT '考试地点',
`subject` varchar(50) NOT NULL COMMENT '考试科目',
`proctor` varchar(20) NOT NULL COMMENT '监考人',
`people_name` varchar(1000) DEFAULT '' COMMENT '参考人员',
`test_method` varchar(50) NOT NULL COMMENT '考试方式',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '考试图片',
`file_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '考试附件',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='考试记录表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_test_score` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`test_id` bigint(20) DEFAULT NULL COMMENT '考试记录id',
`name` varchar(50) NOT NULL COMMENT '姓名',
`score` int(10) DEFAULT NULL COMMENT '成绩',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='考试成绩表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_conference_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`theme` varchar(50) NOT NULL COMMENT '会议主题',
`scheduled_start_time` date NOT NULL COMMENT '会议计划开始时间',
`scheduled_end_time` date NOT NULL COMMENT '会议计划结束时间',
`location` varchar(255) NOT NULL COMMENT '会议地点',
`host` varchar(10) NOT NULL COMMENT '主持人',
`conference_method` varchar(20) DEFAULT '' COMMENT '会议方式',
`conference_status` varchar(20) NOT NULL DEFAULT 'WAITING' COMMENT '会议状态',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='会议计划表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_conference_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`conference_plan_id` bigint(20) NOT NULL COMMENT '会议计划id',
`code` varchar(50) NOT NULL COMMENT '编号',
`people_name` varchar(5000) DEFAULT '' COMMENT '参会人员',
`actual_start_time` datetime DEFAULT NULL COMMENT '会议实际开始时间',
`actual_end_time` datetime DEFAULT NULL COMMENT '会议实际结束时间',
`recorder` varchar(20) DEFAULT '' COMMENT '记录人',
`content` mediumtext COMMENT '会议内容',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '会议图片',
`file_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '会议附件',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='会议记录表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_hygiene_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`name` varchar(50) NOT NULL COMMENT '名称',
`standard_score` int(10) NOT NULL DEFAULT '100' COMMENT '标准总分值',
`scheduled_start_time` date NOT NULL COMMENT '计划开始时间',
`scheduled_end_time` date NOT NULL COMMENT '计划结束时间',
`hygiene_plan_status` varchar(50) NOT NULL DEFAULT 'WAITING' COMMENT '自查计划状态',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='卫生自查计划表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_hygiene_zone` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`hygiene_plan_id` bigint(20) NOT NULL COMMENT '卫生自查计划id',
`zone` varchar(50) NOT NULL COMMENT '责任区',
`principal` varchar(20) NOT NULL COMMENT '责任人',
`check_item` mediumtext NOT NULL COMMENT '检查项',
`check_item_score` varchar(255) NOT NULL COMMENT '检查项分值',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='卫生自查区域表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_hygiene_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`hygiene_plan_id` bigint(20) NOT NULL COMMENT '卫生自查计划id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`code` varchar(50) NOT NULL COMMENT '编号',
`actual_start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '实际开始时间',
`actual_end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '实际结束时间',
`check_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '检查时间',
`check_user` varchar(20) NOT NULL DEFAULT '' COMMENT '检查人',
`hygiene_zone_ids` varchar(1000) NOT NULL COMMENT '卫生自查区域id',
`check_result` mediumtext NOT NULL COMMENT '检查结果',
`comprehensive_score` varchar(500) NOT NULL COMMENT '综合评分',
`week_num` int(10) NOT NULL COMMENT '周数',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '检查图片',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='卫生自查记录表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_car` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`car_brand` varchar(50) NOT NULL COMMENT '品牌',
`car_type` varchar(50) NOT NULL COMMENT '型号',
`plate_number` varchar(50) NOT NULL COMMENT '车牌号',
`registration_time` date NOT NULL COMMENT '上牌时间',
`insurance_pay_last_time` date DEFAULT NULL COMMENT '上期缴车保时间',
`insurance_pay_next_time` date DEFAULT NULL COMMENT '下期缴车保时间',
`insurance_status` varchar(50) NOT NULL DEFAULT 'UNINSURED' COMMENT '保险状态',
`last_annual_inspection_time` date DEFAULT NULL COMMENT '上期年检时间',
`next_annual_inspection_time` date DEFAULT NULL COMMENT '下期年检时间',
`annual_inspection_status` varchar(50) NOT NULL DEFAULT 'UNFINISHED' COMMENT '年检状态',
`maintenance_last_time` date DEFAULT NULL COMMENT '上期保养时间',
`maintenance_next_time` date DEFAULT NULL COMMENT '下期保养时间',
`maintenance_mileage` decimal(10, 2) DEFAULT NULL COMMENT '保养里程',
`maintenance_status` varchar(50) NOT NULL DEFAULT 'UNMAINTAINED' COMMENT '保养状态',
`manager_id` bigint(20) DEFAULT NULL COMMENT '车辆管理人id',
`manager` varchar(50) NOT NULL COMMENT '车辆管理人',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '车辆图片',
`file_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '车辆附件',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='车辆台账表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_car_maintenance` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_id` bigint(20) NOT NULL COMMENT '车辆id',
`code` varchar(50) NOT NULL COMMENT '编号',
`maintenance_type` varchar(50) NOT NULL COMMENT '维保类型',
`content` mediumtext NOT NULL COMMENT '维保内容',
`start_time` date NOT NULL COMMENT '维保开始时间',
`end_time` date NOT NULL COMMENT '维保结束时间',
`location` varchar(255) NOT NULL COMMENT '维保地点',
`cost` bigint(20) NOT NULL COMMENT '维保费用',
`maintainer` varchar(20) NOT NULL COMMENT '维保人',
`manager_advice` varchar(500) DEFAULT NULL COMMENT '车辆管理人意见',
`maintenance_status` varchar(50) DEFAULT NULL COMMENT '维保状态',
`confirmation_time` datetime DEFAULT NULL COMMENT '确认时间',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '维保图片',
`file_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '维保附件',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='车辆维保记录表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_car_used_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_id` bigint(20) NOT NULL COMMENT '车辆id',
`code` varchar(50) NOT NULL COMMENT '编号',
`unit` varchar(50) NOT NULL COMMENT '用车单位',
`used_location` varchar(255) NOT NULL COMMENT '使用地点',
`user` varchar(20) NOT NULL COMMENT '使用人',
`remark` mediumtext COMMENT '使用详情',
`start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '使用时间',
`end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '收车时间',
`start_miles` decimal(10, 2) NOT NULL COMMENT '出车公里数',
`end_miles` decimal(10, 2) NOT NULL COMMENT '收车公里数',
`miles` decimal(10, 2) NOT NULL COMMENT '行驶公里数',
`used_status` varchar(50) DEFAULT NULL COMMENT '用车状态',
`confirmation_time` datetime DEFAULT NULL COMMENT '确认时间',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '里程图片',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用车记录表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_car_check_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_id` bigint(20) NOT NULL COMMENT '车辆id',
`code` varchar(50) NOT NULL COMMENT '编号',
`checker` varchar(50) NOT NULL COMMENT '检查人',
`check_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '检查时间',
`conclusion` mediumtext NOT NULL COMMENT '检查结论',
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '填报备注',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='车检记录表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_car_check_item` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_check_record_id` bigint(20) NOT NULL COMMENT '车检记录id',
`check_item` varchar(500) NOT NULL COMMENT '检查项目',
`check_content` mediumtext NOT NULL COMMENT '检查内容',
`check_result` mediumtext NOT NULL COMMENT '检查结果',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='车检项表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_car_annual_inspection` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_id` bigint(20) NOT NULL COMMENT '车辆id',
`code` varchar(50) NOT NULL COMMENT '编号',
`annual_inspection_time` date NOT NULL COMMENT '年检时间',
`next_annual_inspection_time` date NOT NULL COMMENT '下次年检时间',
`location` varchar(255) NOT NULL DEFAULT '' COMMENT '年检地点',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '年检图片',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='车辆年检记录表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_car_insurance` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_id` bigint(20) NOT NULL COMMENT '车辆id',
`code` varchar(50) NOT NULL COMMENT '编号',
`insurance_time` date NOT NULL COMMENT '车保时间',
`next_insurance_time` date NOT NULL COMMENT '下次车保时间',
`location` varchar(255) NOT NULL DEFAULT '' COMMENT '车保地点',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '车保图片',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='车保记录表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_device` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`name` varchar(50) NOT NULL COMMENT '设备名称',
`type` varchar(50) NOT NULL DEFAULT '' COMMENT '规格型号',
`code` varchar(50) NOT NULL COMMENT '编码',
`quality_certificate_no` varchar(255) NOT NULL DEFAULT '' COMMENT '产品合格证号',
`production_time` date DEFAULT NULL COMMENT '生产日期',
`used_time` date DEFAULT NULL COMMENT '使用日期',
`used_location` varchar(255) NOT NULL DEFAULT '' COMMENT '使用地点',
`inspection_period` int(10) DEFAULT NULL COMMENT '检验周期',
`inspection_current_time` date DEFAULT NULL COMMENT '本次检验日期',
`inspection_next_time` date DEFAULT NULL COMMENT '下次检验日期',
`inspection_last_time` date DEFAULT NULL COMMENT '上次检验日期',
`manager_id` bigint(20) DEFAULT NULL COMMENT '设备管理人id',
`manager` varchar(50) NOT NULL DEFAULT '' COMMENT '设备管理人',
`device_status` varchar(20) NOT NULL DEFAULT 'EXPIRED' COMMENT '设备状态',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='特种设备表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_device_inspection` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`device_id` bigint(20) NOT NULL COMMENT '设备id',
`inspection_time` date NOT NULL COMMENT '设备检验时间',
`last_inspection_time` date NOT NULL COMMENT '上次检验时间',
`next_inspection_time` date NOT NULL COMMENT '下次检验时间',
`location` varchar(255) NOT NULL DEFAULT '' COMMENT '设备检验地点',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '设备检验图片',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='特种设备表' ROW_FORMAT=Dynamic;
CREATE TABLE `hzims_hazard_library` (
`ID` bigint(20) NOT NULL,
`STATION_TYPE` TINYINT(4) NOT NULL COMMENT '站点类型',
`STATION_TYPE_NAME` varchar(25) NOT NULL COMMENT '站点类型名称',
`NAME` varchar(255) NOT NULL COMMENT '危险源名称',
`POSITION` varchar(255) COMMENT '所在部位',
`DANGER_ELE` varchar(255) NOT NULL COMMENT '危险因素',
`CAUSE` text NOT NULL COMMENT '可能导致的事故',
`MEASURES` text COMMENT '措施',
`LEVEL` tinyint(4) NOT NULL COMMENT '风险等级',
`TYPE` tinyint(4) NOT NULL COMMENT '危险源类型',
`STATUS` tinyint(4) DEFAULT NULL COMMENT '业务状态',
`TENANT_ID` varchar(12) NOT NULL COMMENT '租户ID',
`CREATE_DEPT` bigint(20) DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` bigint(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATE_USER` bigint(20) DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` datetime DEFAULT NULL COMMENT '修改时间',
`IS_DELETED` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='危险源库';
alter table `hzims_safe_danger_source` add column `ref_dept` bigint(20) NOT NULL comment '所属机构';
alter table `hzims_safe_danger_source` add column `ref_dept_name` varchar(100) comment '所属机构名称';
alter table `hzims_safe_danger_source` add column `library_id` bigint(20) comment '危险源库ID';
alter table `hzims_safe_danger_source` add column `em_code` varchar(50) comment '设备编号';
alter table `hzims_safe_danger_source` add column `em_name` varchar(100) comment '设备名称';
-- 风险隐患排查字典
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1528555588564525057, 0, 'reviewStandard', '-1', '评审标准', 6, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1528555683292880897, 1528555588564525057, 'reviewStandard', '1', '目标职责', 1, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1528555739014209537, 1528555588564525057, 'reviewStandard', '2', '制度化管理', 2, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1528555790390239233, 1528555588564525057, 'reviewStandard', '3', '教育培训', 3, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1528555914126401538, 1528555588564525057, 'reviewStandard', '4', '现场管理', 4, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1528555992996093953, 1528555588564525057, 'reviewStandard', '5', '安全风险管控及隐患排查治理', 5, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1528556127964602370, 1528555588564525057, 'reviewStandard', '6', '应急管理', 6, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1528556183560101890, 1528555588564525057, 'reviewStandard', '7', '事故管理', 7, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1528556264795381761, 1528555588564525057, 'reviewStandard', '8', '持续改进', 8, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1531454728936071170, 0, 'standardStatus', '-1', '电站安全标准状态', 7, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1531454996817879042, 1531454728936071170, 'standardStatus', '0', '草稿', 1, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1531455057266188290, 1531454728936071170, 'standardStatus', '1', '已提交', 2, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1531455122147876865, 1531454728936071170, 'standardStatus', '2', '已评审', 3, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1531455234970460161, 1531454728936071170, 'standardStatus', '3', '不通过', 4, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1531958665853087745, 0, 'accidentType', '-1', '事故类型', 20, '事故管理-事故类型', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1531958809264730113, 1531958665853087745, 'accidentType', '1', '一般质量事故', 1, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1531958998432034818, 1531958665853087745, 'accidentType', '2', '较大质量事故', 2, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1531959051192184833, 1531958665853087745, 'accidentType', '3', '重大质量事故', 3, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1531959109291683842, 1531958665853087745, 'accidentType', '4', '特大质量事故', 4, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1704015701951483906, 0, 'hd_check_type', '-1', '隐患排查类型', 13, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1704016050250682369, 1704015701951483906, 'hd_check_type', '1', '专项隐患排查', 1, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1704016775433261057, 0, 'hd_check_cycle', '-1', '隐患排查周期', 14, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1704016894522134529, 1704016775433261057, 'hd_check_cycle', '1', '每天一次', 1, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1704016959059890177, 1704016775433261057, 'hd_check_cycle', '2', '每周一次', 2, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1704017012960890882, 1704016775433261057, 'hd_check_cycle', '3', '每月一次', 3, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1704017591875506177, 0, 'hd_plan_type', '-1', '隐患计划类型', 15, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1704017674230665217, 1704017591875506177, 'hd_plan_type', '1', '定时计划', 1, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1704017745496084482, 1704017591875506177, 'hd_plan_type', '2', '临时计划', 2, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1711657244147339266, 1704016775433261057, 'hd_check_cycle', '4', '每季度一次', 4, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1711657301072433154, 1704016775433261057, 'hd_check_cycle', '5', '每年一次', 5, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1810401848933404697, 0, 'inner_danger_level', '-1', '隐患等级', 4, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1810401848933404895, 0, 'rectifier_type', '-1', '整改类型', 4, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1811421133117767366, 1810401848933404895, 'rectifier_type', '3', '限期整改', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1811421133117767733, 1810401848933404895, 'rectifier_type', '2', '停产停业整改', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1811421133117767756, 1810401848933404895, 'rectifier_type', '1', '立即整改', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1811421133117767760, 1810401848933404697, 'inner_danger_level', '3', '较大风险', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1811421133117767777, 1810401848933404697, 'inner_danger_level', '4', '重大风险', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1811421133117767798, 1810401848933404697, 'inner_danger_level', '1', '低风险', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1811421133117767799, 1810401848933404697, 'inner_danger_level', '2', '一般风险', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129281301524482, 0, 'riskLevel', '-1', '风险等级', 2, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129396317728770, 1468129281301524482, 'riskLevel', '10', '稍有危险', 1, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129468874993665, 1468129281301524482, 'riskLevel', '20', '一般危险', 2, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129620985622530, 1468129281301524482, 'riskLevel', '30', '显著危险', 3, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129679554883585, 1468129281301524482, 'riskLevel', '40', '高度危险', 4, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1630129576354127811, 0, 'evaluate_method', '-1', '评价方法', 3, NULL, 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1630129576354127822, 1630129576354127811, 'evaluate_method', '1', 'LS', 2, NULL, 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1630129576354127823, 1630129576354127811, 'evaluate_method', '2', 'LEC', 4, NULL, 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701401848933404697, 0, 'hazard_level', '-1', '风险等级', 1, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414151353540610, 0, 'hidden_danger_projects_type', '-1', '风险隐患项目类别', 0, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414510251745282, 1701414151353540610, 'hidden_danger_projects_type', '01', '构(建)筑物类', 1, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414641034338305, 1701414151353540610, 'hidden_danger_projects_type', '02', '金属结构类', 2, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414730322681858, 1701414151353540610, 'hidden_danger_projects_type', '03', '设备设施类', 3, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414848933404673, 1701414151353540610, 'hidden_danger_projects_type', '04', '作业活动类', 4, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414913311776770, 1701414151353540610, 'hidden_danger_projects_type', '05', '管理类', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414974804467714, 1701414151353540610, 'hidden_danger_projects_type', '06', '环境类', 6, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1702421133117767760, 1701401848933404697, 'hazard_level', '1', '低风险', 2, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1703421133117767777, 1701401848933404697, 'hazard_level', '2', '一般风险', 3, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1704421133117767798, 1701401848933404697, 'hazard_level', '3', '较大风险', 4, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1705421133117767799, 1701401848933404697, 'hazard_level', '4', '重大风险', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1810401848933404671, 0, 'hazard_type', '-1', '项目类别', 0, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1810414848933404673, 0, 'hazard_station_type', '-1', '站点分类', 0, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1811421133117767702, 1810401848933404671, 'hazard_type', '1', '构筑物类', 1, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297148044677143, 1810401848933404671, 'hazard_type', '2', '金属结构类', 2, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297688044677144, 1810401848933404671, 'hazard_type', '3', '设备设施类', 3, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297688044677145, 1810401848933404671, 'hazard_type', '4', '作业活动类', 4, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297688044677146, 1810401848933404671, 'hazard_type', '5', '管理类', 5, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297688044677147, 1810401848933404671, 'hazard_type', '6', '环境类', 6, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812414874722367716, 1810414848933404673, 'hazard_station_type', '3', '水电站', 3, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812414974824267715, 1810414848933404673, 'hazard_station_type', '2', '闸门', 1, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812414974824467714, 1810414848933404673, 'hazard_station_type', '1', '水库', 2, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129281301524482, 0, 'riskLevel', '-1', '风险等级', 2, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129396317728770, 1468129281301524482, 'riskLevel', '10', '稍有危险', 1, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129468874993665, 1468129281301524482, 'riskLevel', '20', '一般危险', 2, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129620985622530, 1468129281301524482, 'riskLevel', '30', '显著危险', 3, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129679554883585, 1468129281301524482, 'riskLevel', '40', '高度危险', 4, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1630129576354127811, 0, 'evaluate_method', '-1', '评价方法', 3, NULL, 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1630129576354127822, 1630129576354127811, 'evaluate_method', '1', 'LS', 2, NULL, 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1630129576354127823, 1630129576354127811, 'evaluate_method', '2', 'LEC', 4, NULL, 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701401848933404697, 0, 'hazard_level', '-1', '风险等级', 1, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414151353540610, 0, 'hidden_danger_projects_type', '-1', '风险隐患项目类别', 0, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414510251745282, 1701414151353540610, 'hidden_danger_projects_type', '01', '构(建)筑物类', 1, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414641034338305, 1701414151353540610, 'hidden_danger_projects_type', '02', '金属结构类', 2, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414730322681858, 1701414151353540610, 'hidden_danger_projects_type', '03', '设备设施类', 3, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414848933404673, 1701414151353540610, 'hidden_danger_projects_type', '04', '作业活动类', 4, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414913311776770, 1701414151353540610, 'hidden_danger_projects_type', '05', '管理类', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414974804467714, 1701414151353540610, 'hidden_danger_projects_type', '06', '环境类', 6, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1702421133117767760, 1701401848933404697, 'hazard_level', '1', '低风险', 2, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1703421133117767777, 1701401848933404697, 'hazard_level', '2', '一般风险', 3, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1704421133117767798, 1701401848933404697, 'hazard_level', '3', '较大风险', 4, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1705421133117767799, 1701401848933404697, 'hazard_level', '4', '重大风险', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1810401848933404671, 0, 'hazard_type', '-1', '项目类别', 0, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1810414848933404673, 0, 'hazard_station_type', '-1', '站点分类', 0, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1811421133117767702, 1810401848933404671, 'hazard_type', '1', '构筑物类', 1, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297148044677143, 1810401848933404671, 'hazard_type', '2', '金属结构类', 2, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297688044677144, 1810401848933404671, 'hazard_type', '3', '设备设施类', 3, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297688044677145, 1810401848933404671, 'hazard_type', '4', '作业活动类', 4, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297688044677146, 1810401848933404671, 'hazard_type', '5', '管理类', 5, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297688044677147, 1810401848933404671, 'hazard_type', '6', '环境类', 6, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812414874722367716, 1810414848933404673, 'hazard_station_type', '3', '水电站', 3, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812414974824267715, 1810414848933404673, 'hazard_station_type', '2', '闸门', 1, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812414974824467714, 1810414848933404673, 'hazard_station_type', '1', '水库', 2, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129281301524482, 0, 'riskLevel', '-1', '风险等级', 2, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129396317728770, 1468129281301524482, 'riskLevel', '10', '稍有危险', 1, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129468874993665, 1468129281301524482, 'riskLevel', '20', '一般危险', 2, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129620985622530, 1468129281301524482, 'riskLevel', '30', '显著危险', 3, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1468129679554883585, 1468129281301524482, 'riskLevel', '40', '高度危险', 4, '', 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1630129576354127811, 0, 'evaluate_method', '-1', '评价方法', 3, NULL, 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1630129576354127822, 1630129576354127811, 'evaluate_method', '1', 'LS', 2, NULL, 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1630129576354127823, 1630129576354127811, 'evaluate_method', '2', 'LEC', 4, NULL, 0, 0, 0, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701401848933404697, 0, 'hazard_level', '-1', '风险等级', 1, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414151353540610, 0, 'hidden_danger_projects_type', '-1', '风险隐患项目类别', 0, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414510251745282, 1701414151353540610, 'hidden_danger_projects_type', '01', '构(建)筑物类', 1, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414641034338305, 1701414151353540610, 'hidden_danger_projects_type', '02', '金属结构类', 2, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414730322681858, 1701414151353540610, 'hidden_danger_projects_type', '03', '设备设施类', 3, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414848933404673, 1701414151353540610, 'hidden_danger_projects_type', '04', '作业活动类', 4, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414913311776770, 1701414151353540610, 'hidden_danger_projects_type', '05', '管理类', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1701414974804467714, 1701414151353540610, 'hidden_danger_projects_type', '06', '环境类', 6, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1702421133117767760, 1701401848933404697, 'hazard_level', '1', '低风险', 2, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1703421133117767777, 1701401848933404697, 'hazard_level', '2', '一般风险', 3, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1704421133117767798, 1701401848933404697, 'hazard_level', '3', '较大风险', 4, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1705421133117767799, 1701401848933404697, 'hazard_level', '4', '重大风险', 5, '', 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1810401848933404671, 0, 'hazard_type', '-1', '项目类别', 0, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1810414848933404673, 0, 'hazard_station_type', '-1', '站点分类', 0, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1811421133117767702, 1810401848933404671, 'hazard_type', '1', '构筑物类', 1, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297148044677143, 1810401848933404671, 'hazard_type', '2', '金属结构类', 2, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297688044677144, 1810401848933404671, 'hazard_type', '3', '设备设施类', 3, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297688044677145, 1810401848933404671, 'hazard_type', '4', '作业活动类', 4, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297688044677146, 1810401848933404671, 'hazard_type', '5', '管理类', 5, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812297688044677147, 1810401848933404671, 'hazard_type', '6', '环境类', 6, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812414874722367716, 1810414848933404673, 'hazard_station_type', '3', '水电站', 3, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812414974824267715, 1810414848933404673, 'hazard_station_type', '2', '闸门', 1, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1812414974824467714, 1810414848933404673, 'hazard_station_type', '1', '水库', 2, NULL, 0, 0, 1, -1, 'hzims_safeproduct');
alter table `hzims_inner_danger_info` add COLUMN `task_id` VARCHAR(100) comment '平台任务Id';

36
hzims-service/safeproduct/src/main/resources/dict/dict.sql

@ -0,0 +1,36 @@
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1397731100361748481, 0, 'SAFE_DANGER_SOURCE_APPLY_TYPE', '-1', '应用类型', 1, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1397731499755958273, 1397731100361748481, 'SAFE_DANGER_SOURCE_APPLY_TYPE', '1', '运维现场查勘', 1, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1397731552054734850, 1397731100361748481, 'SAFE_DANGER_SOURCE_APPLY_TYPE', '2', '配网运维', 2, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1397731618819665922, 1397731100361748481, 'SAFE_DANGER_SOURCE_APPLY_TYPE', '3', '泵站、电站运维', 3, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1468125768777445378, 0, 'DANGERTYPE', '-1', '危险源类型', 1, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1468125963120521217, 1468125768777445378, 'DANGERTYPE', '1', '作业活动', 1, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1468126007856967682, 1468125768777445378, 'DANGERTYPE', '2', '设备', 2, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1468129281301524482, 0, 'RISKLEVEL', '-1', '风险等级', 2, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1468129396317728770, 1468129281301524482, 'RISKLEVEL', '10', '稍有危险', 1, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1468129468874993665, 1468129281301524482, 'RISKLEVEL', '20', '一般危险', 2, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1468129620985622530, 1468129281301524482, 'RISKLEVEL', '30', '显著危险', 3, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1468129679554883585, 1468129281301524482, 'RISKLEVEL', '40', '高度危险', 4, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1470582052311236609, 0, 'SYSTEMFILESTATUS', '-1', '体系文件审批状态', 4, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1470582268645048321, 1470582052311236609, 'SYSTEMFILESTATUS', '0', '待提交审批', 1, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1470582327952506882, 1470582052311236609, 'SYSTEMFILESTATUS', '1', '待审批', 2, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1470582451025969154, 1470582052311236609, 'SYSTEMFILESTATUS', '2', '已审批', 3, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1470582602578755586, 1470582052311236609, 'SYSTEMFILESTATUS', '3', '驳回', 4, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1528555588564525057, 0, 'REVIEWSTANDARD', '-1', '评审标准', 6, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1528555683292880897, 1528555588564525057, 'REVIEWSTANDARD', '1', '目标职责', 1, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1528555739014209537, 1528555588564525057, 'REVIEWSTANDARD', '2', '制度化管理', 2, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1528555790390239233, 1528555588564525057, 'REVIEWSTANDARD', '3', '教育培训', 3, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1528555914126401538, 1528555588564525057, 'REVIEWSTANDARD', '4', '现场管理', 4, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1528555992996093953, 1528555588564525057, 'REVIEWSTANDARD', '5', '安全风险管控及隐患排查治理', 5, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1528556127964602370, 1528555588564525057, 'REVIEWSTANDARD', '6', '应急管理', 6, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1528556183560101890, 1528555588564525057, 'REVIEWSTANDARD', '7', '事故管理', 7, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1528556264795381761, 1528555588564525057, 'REVIEWSTANDARD', '8', '持续改进', 8, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1531454728936071170, 0, 'STANDARDSTATUS', '-1', '电站安全标准状态', 7, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1531454996817879042, 1531454728936071170, 'STANDARDSTATUS', '0', '草稿', 1, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1531455057266188290, 1531454728936071170, 'STANDARDSTATUS', '1', '已提交', 2, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1531455122147876865, 1531454728936071170, 'STANDARDSTATUS', '2', '已评审', 3, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1531455234970460161, 1531454728936071170, 'STANDARDSTATUS', '3', '不通过', 4, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1531958665853087745, 0, 'ACCIDENTTYPE', '-1', '事故类型', 20, '事故管理-事故类型', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1531958809264730113, 1531958665853087745, 'ACCIDENTTYPE', '1', '一般质量事故', 1, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1531958998432034818, 1531958665853087745, 'ACCIDENTTYPE', '2', '较大质量事故', 2, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1531959051192184833, 1531958665853087745, 'ACCIDENTTYPE', '3', '重大质量事故', 3, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');
INSERT INTO `BLADEX`.`BLADE_DICT` (`ID`, `PARENT_ID`, `CODE`, `DICT_KEY`, `DICT_VALUE`, `SORT`, `REMARK`, `IS_SEALED`, `IS_DELETED`, `DICT_TYPE`, `APP_ID`, `APP_CODE`) VALUES (1531959109291683842, 1531958665853087745, 'ACCIDENTTYPE', '4', '特大质量事故', 4, '', 0, 0, 0, -1, 'HZIMS_SAFEPRODUCT');

796
hzims-service/ticket/src/main/resources/db/1.0.0.sql

@ -1,180 +1,618 @@
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- TABLE STRUCTURE FOR BLADE_MODULE_VERSION
-- ----------------------------
DROP TABLE IF EXISTS `BLADE_MODULE_VERSION`;
CREATE TABLE `BLADE_MODULE_VERSION` (
`MODULE_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`VERSION` VARCHAR(8) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`HISTORY` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
PRIMARY KEY (`MODULE_NAME`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_REPAIR
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_REPAIR`;
CREATE TABLE `HZIMS_REPAIR` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`EM_CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备CODE',
`NUMBER` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '编号',
`COMPANY` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '单位',
`HANDLE_STATUS` TINYINT(4) NULL DEFAULT 0 COMMENT '处理状态',
`CHARGE` BIGINT(20) NULL DEFAULT NULL COMMENT '应急抢修负责人',
`REPAIR_TEAM` BIGINT(20) NULL DEFAULT NULL COMMENT '应急抢修班组',
`REPAIR_PERSONNEL` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '应急抢修人员',
`REPAIR_TASK` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '应急抢修任务描述',
`ORIGINATOR` BIGINT(20) NULL DEFAULT NULL COMMENT '应急抢修发起人',
`SAFETY_MEASURES` VARCHAR(2080) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '安全措施',
`POINTS_ATTENTION` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '抢修地点保留带电部分或注意事项',
`RESERVE_MEASURES` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '现场设备状况及保留安全措施',
`LICENSOR` BIGINT(20) NULL DEFAULT NULL COMMENT '许可人',
`LICENSOR_TIME` DATETIME NULL DEFAULT NULL COMMENT '许可时间',
`LICENSOR_MEASURES` VARCHAR(2080) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '许可建议安全措施',
`LICENSOR_MEMO` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '抢修完成许可描述',
`LICENSOR_COMPLETE_TIME` DATETIME NULL DEFAULT NULL COMMENT '抢修完成许可时间',
`IMPLEMENT_HOURS` VARCHAR(1024) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '抢修工时',
`IMPLEMENT_START_TIME` DATETIME NULL DEFAULT NULL COMMENT '抢修开始时间',
`IMPLEMENT_END_TIME` DATETIME NULL DEFAULT NULL COMMENT '抢修结束时间',
`IMPLEMENT_DESC` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '抢修描述',
`PROCESS_INSTANCE_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '流程实例ID',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` TINYINT(4) NOT NULL COMMENT '是否删除',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态 ',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_STANDARD_TICKET_INFO
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_STANDARD_TICKET_INFO`;
CREATE TABLE `HZIMS_STANDARD_TICKET_INFO` (
`ID` BIGINT(20) NOT NULL,
`COMPANY` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '单位',
`PROCESS_INSTANCE_ID` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作流ID',
`CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '编码',
`ISSUE_ORDER_PERSON` BIGINT(20) NOT NULL COMMENT '发令人',
`ACCESS_ORDER_PERSON` BIGINT(20) NOT NULL COMMENT '受令人',
`ISSUE_ORDER_TIME` DATETIME NULL DEFAULT NULL COMMENT '发令时间',
`START_TIME` DATETIME NULL DEFAULT NULL,
`END_TIME` DATETIME NULL DEFAULT NULL,
`TITLE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '操作任务',
`TASK_TYPE` VARCHAR(4) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '任务来源类型',
`TASK_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '任务来源ID',
`TASK_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '任务名称',
`REMARK` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '备注',
`OPERATOR` BIGINT(20) NULL DEFAULT NULL COMMENT '操作人',
`OPERATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '操作时间',
`GUARDIAN` BIGINT(20) NULL DEFAULT NULL COMMENT '监护人',
`GUARDIANSHIP_TIME` DATETIME NULL DEFAULT NULL COMMENT '监护人确认时间',
`PRINCIPAL` BIGINT(20) NULL DEFAULT NULL COMMENT '值班负责人',
`PRINCIPAL_TIME` DATETIME NULL DEFAULT NULL COMMENT '值班负责人确认时间',
`IS_EVALUATE` TINYINT(4) NULL DEFAULT 0 COMMENT '是否评价',
`STATUS` TINYINT(4) NULL DEFAULT NULL,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL,
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NOT NULL,
`CREATE_TIME` DATETIME NOT NULL,
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL,
`UPDATE_TIME` DATETIME NULL DEFAULT NULL,
`TICKET_TYPE` VARCHAR(4) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '票据类型',
`SIGNAGE` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点标识-两票编码',
`SIGNAGE_CODE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '编号(原站点ID)',
`FLOW_USER_ID` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '用户ID',
`FLOW_TASK_ID` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前任务ID',
`FLOW_TASK_NAME` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前任务名称',
`NEXT_STEP_OPERATOR` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '下一个审批人',
`FLOW_STATUS` INT(11) NULL DEFAULT NULL COMMENT '流程状态',
`FLOW_DESCRIPTION` VARCHAR(6000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '流程描述',
`PROJECT_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '项目名称',
`CLASS_GROUP_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '班组',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_STANDARD_TICKET_MEASURE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_STANDARD_TICKET_MEASURE`;
CREATE TABLE `HZIMS_STANDARD_TICKET_MEASURE` (
`ID` BIGINT(20) NOT NULL,
`TICKET_ID` BIGINT(20) NOT NULL COMMENT '标准票ID',
`MEASURE_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '安全措施ID',
`MEASURE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '安全措施',
`EXECUTOR` BIGINT(20) NULL DEFAULT NULL COMMENT '执行人ID',
`EXECUTE_TIME` DATETIME NULL DEFAULT NULL COMMENT '执行时间',
`EXECUTE_IMG_URL` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '执行图片',
`REMARK` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '执行备注',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '1(执行)0(不执行)',
`CREATE_DEPT` BIGINT(20) NOT NULL,
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NOT NULL,
`CREATE_TIME` DATETIME NOT NULL,
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL,
`UPDATE_TIME` DATETIME NULL DEFAULT NULL,
`SORT` TINYINT(4) NULL DEFAULT NULL COMMENT '排序',
`MATTER_GROUP` BIGINT(20) NULL DEFAULT NULL COMMENT '模板',
`OPERATION_TIME` DATETIME NULL DEFAULT NULL COMMENT '操作时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_TICKET_COUNT
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_TICKET_COUNT`;
CREATE TABLE `HZIMS_TICKET_COUNT` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`DATE_TIME` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '日期',
`DEPT_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '站点ID',
`DEPT_NAME` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点名称',
`TICKET_TYPE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '票据类型',
`TICKET_NUMBER` INT(11) NULL DEFAULT NULL COMMENT '开票数量',
`TICKET_COMPLETE_NUM` INT(11) NULL DEFAULT NULL COMMENT '完成数量',
`TICKET_DELAY_NUM` INT(11) NULL DEFAULT NULL COMMENT '延期数量',
`TICKET_PROPORTION_NUM` INT(11) NULL DEFAULT NULL COMMENT '合格数量',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(1) NULL DEFAULT 0 COMMENT '逻辑删除',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_DEPT` VARCHAR(30) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '创建部门',
`STATUS` TINYINT(4) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL,
`INVALIDATED_TICKET_NUM` INT(11) NULL DEFAULT NULL COMMENT '废票数量',
`WRONG_TICKET_NUM` INT(11) NULL DEFAULT NULL COMMENT '错票数量',
`PERCENT_PASS_TICKET` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '合格率',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1753594674490228738 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '两票统计分析' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_TICKET_INFO_DANGER
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_TICKET_INFO_DANGER`;
CREATE TABLE `HZIMS_TICKET_INFO_DANGER` (
`ID` BIGINT(20) NULL DEFAULT NULL COMMENT '编号',
`TICKET_ID` BIGINT(20) NULL DEFAULT NULL,
`DANGEROUS_POINT` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '危险点',
`MAINTENANCE` TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '安全措施',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT 0 COMMENT '逻辑删除'
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_TICKET_INFO_EVALUATE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_TICKET_INFO_EVALUATE`;
CREATE TABLE `HZIMS_TICKET_INFO_EVALUATE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TICKET_ID` BIGINT(20) NOT NULL COMMENT '票据ID',
`EVALUATE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '评价内容',
`STATUS` TINYINT(4) NULL DEFAULT 1,
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建机构',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '两票统计' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_TICKET_INFO_STATISTIC
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_TICKET_INFO_STATISTIC`;
CREATE TABLE `HZIMS_TICKET_INFO_STATISTIC` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`DATE_TIME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '日期',
`TICKET_INFO_TYPE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '票据类型',
`TICKET_INFO_NUMBER` INT(11) NULL DEFAULT NULL COMMENT '开票数量',
`TICKET_INFO_COMPLETENUM` INT(11) NULL DEFAULT NULL COMMENT '本月完成开票数',
`TICKET_INFO_START_NUM` INT(11) NULL DEFAULT NULL COMMENT '本月未完成开票数',
`TICKET_INFO_DELAY_NUM` INT(11) NULL DEFAULT NULL COMMENT '本月延期开票数',
`TICKET_INFO_PROPORTION` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '本月票据合格率',
`STATUS` TINYINT(4) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建机构',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '两票统计' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_TICKET_MATTER_GROUP
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_TICKET_MATTER_GROUP`;
CREATE TABLE `HZIMS_TICKET_MATTER_GROUP` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TICKET_TYPE` VARCHAR(4) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '票据类型',
`NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '名称',
`STATUS` TINYINT(4) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建机构',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '两票操作事项分组' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_TICKET_WORK_CONTENT
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_TICKET_WORK_CONTENT`;
CREATE TABLE `HZIMS_TICKET_WORK_CONTENT` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`TICKET_ID` BIGINT(20) NOT NULL COMMENT '票据ID',
`ADDRESS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作地点或地段',
`CONTENT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作内容',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL,
`UPDATE_TIME` DATETIME NULL DEFAULT NULL,
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建部门',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '第二种工作票工作任务' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_TICKET_WORK_CONTENT_TEMPLATE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_TICKET_WORK_CONTENT_TEMPLATE`;
CREATE TABLE `HZIMS_TICKET_WORK_CONTENT_TEMPLATE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`TEMPLATE_ID` BIGINT(20) NOT NULL COMMENT '票据ID',
`ADDRESS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作地点或地段',
`CONTENT` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作内容',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL,
`UPDATE_TIME` DATETIME NULL DEFAULT NULL,
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建部门',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '第二种工作票工作任务' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_TWO_TICKET_MATTER_LIBRARY
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_TWO_TICKET_MATTER_LIBRARY`;
CREATE TABLE `HZIMS_TWO_TICKET_MATTER_LIBRARY` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TYPE` VARCHAR(4) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '操作事项类型',
`MATTER_GROUP` BIGINT(50) NULL DEFAULT NULL COMMENT '操作事项分组',
`SAFETY_MEASURE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '操作事项',
`STATUS` TINYINT(4) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建机构',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`SORT` TINYINT(4) NULL DEFAULT NULL COMMENT '排序',
`MATTER_GROUP_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '分组名称',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '两票操作事项库' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WORK_TICKET_DELAY
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_WORK_TICKET_DELAY`;
CREATE TABLE `HZIMS_WORK_TICKET_DELAY` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TICKET_ID` BIGINT(20) NOT NULL COMMENT '工作票ID',
`FLOW_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '工作票流程ID',
`INITIAL_TIME` DATETIME NULL DEFAULT NULL COMMENT '原时间',
`CHANGE_TIME` DATETIME NOT NULL COMMENT '变更时间',
`LICENSOR` BIGINT(20) NULL DEFAULT NULL COMMENT '延期许可人',
`LICENSE_TIME` DATETIME NULL DEFAULT NULL COMMENT '延期许可人确认时间',
`PRINCIPAL_TIME` DATETIME NULL DEFAULT NULL,
`REMARK` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '延期说明',
`STATUS` TINYINT(4) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建机构',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作票延期' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WORK_TICKET_FINISH
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_WORK_TICKET_FINISH`;
CREATE TABLE `HZIMS_WORK_TICKET_FINISH` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`TICKET_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '工作票编号',
`TEMP_GROUND_NUM` INT(11) NULL DEFAULT NULL COMMENT '临时接地线',
`TEMP_DISMANTLE_NUM` INT(11) NULL DEFAULT NULL COMMENT '临时拆除几组',
`GROUND_NUM` INT(11) NULL DEFAULT NULL COMMENT '接地线几组',
`DISMANTLE_NUM` INT(11) NULL DEFAULT NULL COMMENT '拆除几组',
`RETAIN_NUM` INT(11) NULL DEFAULT NULL COMMENT '保留几组',
`CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`PRINCIPAL` BIGINT(20) NULL DEFAULT NULL COMMENT '负责人名称',
`LICENSOR` BIGINT(20) NULL DEFAULT NULL COMMENT '许可人',
`LICENSOR_END_TIME` DATETIME NULL DEFAULT NULL COMMENT '工作票终结时间',
`PRINCIPAL_END_TIME` DATETIME NULL DEFAULT NULL COMMENT '负责人工作结束时间',
`CONTENT` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '备注',
`TELL_CONTENT` VARCHAR(5000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '交底内容',
`WORK_END_TIME` DATETIME NULL DEFAULT NULL COMMENT '结束时间',
`BRAKE_NUMBER` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '刀闸编号',
`GUARDIAN` BIGINT(20) NULL DEFAULT NULL COMMENT '监护人',
`GUARDIAN_PLACE` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '监护人地址',
`OTHER_ITEMS` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '其他事项',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 6246 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作结束' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WORK_TICKET_FLOW
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_WORK_TICKET_FLOW`;
CREATE TABLE `HZIMS_WORK_TICKET_FLOW` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TICKET_ID` BIGINT(20) NOT NULL COMMENT '工作票ID',
`FLOW_CODE` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '流程CODE',
`EXECUTOR` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前流程执行人',
`EXECUTE_TIME` DATETIME NULL DEFAULT NULL COMMENT '执行时间',
`SIGN_IMG_PATH` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '签名路径',
`GROUND_WIRE_CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '接地线编号',
`GROUND_WIRE_COUNT` INT(11) NULL DEFAULT NULL COMMENT '接地线数量',
`GROUND_SWITCH_COUNT` INT(11) NULL DEFAULT NULL COMMENT '接地刀闸数量',
`REMARK` TINYTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '备注',
`STATUS` TINYINT(4) NULL DEFAULT NULL,
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建机构',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`PROC_TASK_ID` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作流流程任务ID',
`FIRST_VALUE` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '各流程填入值',
`SECOND_VALUE` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '各流程填入值',
`THIRD_VALUE` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '各流程填入值',
`FOURTH_VALUE` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '各流程填入值',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作票流程处理信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WORK_TICKET_INFO
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_WORK_TICKET_INFO`;
CREATE TABLE `HZIMS_WORK_TICKET_INFO` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`EM_CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备名称',
`EM_NAME` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备名称',
`PROCESS_INSTANCE_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作流ID',
`TYPE` VARCHAR(2) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '工作票类型',
`COMPANY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '单位',
`CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '编号',
`TASK_TYPE` VARCHAR(2) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '关联业务类型',
`TASK_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '关联业务ID',
`TASK_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '关联业务名称',
`CLASS_GROUP` BIGINT(20) NULL DEFAULT NULL COMMENT '班组',
`CLASS_GROUP_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '班组名称',
`CLASS_GROUP_MEMBERS` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '班组成员',
`CLASS_GROUP_MEMBERS_MANUAL` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '班组成员手填',
`CLASS_GROUP_MEMBERS_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '班组成员名称',
`ADDRESS_EQU_NAME` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作地点及设备名称',
`WORK_CONTENT` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作任务及内容',
`PLAN_START_TIME` DATETIME NULL DEFAULT NULL COMMENT '计划开始时间',
`PLAN_END_TIME` DATETIME NULL DEFAULT NULL COMMENT '计划结束时间',
`SIGNER` BIGINT(20) NULL DEFAULT NULL COMMENT '签发人',
`SIGNER_DATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '签发人签发时间',
`PRINCIPAL` BIGINT(20) NULL DEFAULT NULL COMMENT '负责人',
`PRINCIPAL_MANUAL` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '负责人手填',
`PRINCIPAL_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '负责人名称',
`LICENSOR` BIGINT(20) NULL DEFAULT NULL COMMENT '许可人',
`LICENSE_TIME` DATETIME NULL DEFAULT NULL COMMENT '许可时间',
`FLOW_CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '流程进行CODE',
`LICENSE_END_TIME` DATETIME NULL DEFAULT NULL COMMENT '许可人确认工作结束时间',
`IS_EVALUATE` TINYINT(4) NULL DEFAULT 0 COMMENT '是否评价',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '1:未完成 2:执行中 3:已完成',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL,
`UPDATE_TIME` DATETIME NULL DEFAULT NULL,
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建部门',
`CONFIRM_IMG_URLS` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作负责人确认工作完成上传图片地址',
`CONFIRM_IMG_FILENAMES` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作负责人确认工作完成上传图片名称',
`SORT` TINYINT(4) NULL DEFAULT NULL COMMENT '排序',
`CONFIRM_WORK_TIME` DATETIME NULL DEFAULT NULL COMMENT '工作负责人确认工作完成时间',
`PATTERN` VARCHAR(2) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '类型(1:值班人员添加2:许可人添加)',
`WATCH_PRINCIPAL` BIGINT(20) NULL DEFAULT NULL COMMENT '值班负责人',
`WATCH_PRINCIPAL_END_TIME` DATETIME NULL DEFAULT NULL COMMENT '批准工作结束时间',
`POWER` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT ' 工作条件( 停电或不停电)',
`FLOW_STATUS` INT(11) NULL DEFAULT NULL COMMENT '流程状态',
`FLOW_DESCRIPTION` VARCHAR(6000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '流程描述',
`FOLLOWER_NUM` INT(11) NULL DEFAULT 1 COMMENT '附页第几张',
`SIGNAGE` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点标识-两票编码',
`SIGNAGE_CODE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '编号(原站点ID)',
`TICKET_TEMPLATE` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '票据模板',
`MAKE_DATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '开票时间',
`TOTAL_PERSON` INT(11) NULL DEFAULT NULL COMMENT '共几人',
`CONFIRM_DATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '负责人确认安全措施时间',
`ISSUER_REVIEW_DATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '签发审核时间',
`SIGN_FLAG` TINYINT(1) NULL DEFAULT NULL COMMENT '签发人签发是否通过',
`RECIEVE_FLAG` TINYINT(1) NULL DEFAULT NULL COMMENT '运行人员是否通过',
`INPUT` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT 'INPUT= 延期 INPUT=转移 INPUT 通过',
`NEXT_STEP_OPERATOR` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '下一个审批人',
`STEP_OPERATOR` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前审批人',
`FLOW_USER_ID` VARCHAR(5000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '用户ID',
`FLOW_TASK_ID` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前任务ID',
`FLOW_TASK_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前任务名称',
`PROJECT_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '项目名称',
`JOB_RECEIVER` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作接收人',
`JOB_RECEIVER_TIME` DATETIME NULL DEFAULT NULL COMMENT '工作接收人时间',
`IS_SAFETY` TINYINT(1) NULL DEFAULT 0 COMMENT '安全隔离措施附页 (TRUE,展示附件,FALSE,不展示附件)',
`IS_HAZARD` TINYINT(1) NULL DEFAULT 0 COMMENT '危险点分析与预控措施票 (TRUE,展示附件,FALSE,不展示附件)',
`IS_RAILWAY` TINYINT(1) NULL DEFAULT 0 COMMENT '动火工作票 (TRUE,展示附件,FALSE,不展示附件)',
`IS_LIMITED` TINYINT(1) NULL DEFAULT 0 COMMENT ' 有限空间监测记录单(TRUE,展示附件,FALSE,不展示附件)',
`IS_START` TINYINT(1) NULL DEFAULT 0 COMMENT '每日开工和收工时间附页',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作票' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WORK_TICKET_MEASURE_TEMPLATE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_WORK_TICKET_MEASURE_TEMPLATE`;
CREATE TABLE `HZIMS_WORK_TICKET_MEASURE_TEMPLATE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TEMPLATE_ID` BIGINT(20) NOT NULL COMMENT '工作票模板(检修计划)ID',
`MEASURE_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '安全措施ID',
`MATTER_GROUP` BIGINT(20) NULL DEFAULT NULL COMMENT '分组',
`MEASURE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '安全措施',
`TYPE` VARCHAR(4) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '类型(1:值班人员添加2:签发人添加3:许可人添加)',
`STATUS` TINYINT(20) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建机构',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`SORT` TINYINT(4) NULL DEFAULT NULL COMMENT '排序',
`IS_EXECUTE` TINYINT(1) NULL DEFAULT NULL COMMENT '执行状态 (1 执行,0 不执行 )',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '检修计划工作票安全措施模板列表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WORK_TICKET_MEMBERS_CHANGE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_WORK_TICKET_MEMBERS_CHANGE`;
CREATE TABLE `HZIMS_WORK_TICKET_MEMBERS_CHANGE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TICKET_ID` BIGINT(20) NOT NULL COMMENT '工作票ID',
`FLOW_CODE` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '发生流程',
`INITIAL_MEMBERS` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '原成员',
`CHANGE_MEMBERS` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '变更成员',
`STATUS` TINYINT(4) NULL DEFAULT NULL,
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建机构',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作班组成员变更' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WORK_TICKET_OPERATE_TIME
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_WORK_TICKET_OPERATE_TIME`;
CREATE TABLE `HZIMS_WORK_TICKET_OPERATE_TIME` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TICKET_ID` BIGINT(20) NOT NULL COMMENT '工作票ID',
`START_TIME` DATETIME NULL DEFAULT NULL COMMENT '开始时间',
`START_PRINCIPAL` BIGINT(20) NULL DEFAULT NULL COMMENT '开始负责人',
`START_LICENSOR` BIGINT(20) NULL DEFAULT NULL COMMENT '开始许可人',
`END_TIME` DATETIME NULL DEFAULT NULL COMMENT '结束时间',
`END_PRINCIPAL` BIGINT(20) NULL DEFAULT NULL COMMENT '结束负责人',
`END_LICENSOR` BIGINT(20) NULL DEFAULT NULL COMMENT '结束许可人',
`STATUS` TINYINT(4) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建部门',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作票工作时间' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WORK_TICKET_PRINCIPAL_CHANGE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_WORK_TICKET_PRINCIPAL_CHANGE`;
CREATE TABLE `HZIMS_WORK_TICKET_PRINCIPAL_CHANGE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TICKET_ID` BIGINT(20) NOT NULL COMMENT '工作票ID',
`FLOW_CODE` BIGINT(255) NOT NULL COMMENT '发生流程',
`INITIAL_PRINCIPAL` BIGINT(20) NOT NULL COMMENT '原负责人',
`CHANGE_PRINCIPAL` BIGINT(20) NOT NULL COMMENT '变更负责人',
`STATUS` TINYINT(4) NULL DEFAULT NULL,
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建机构',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID',
`PRINCIPAL_CHANGE_TIME` DATETIME NULL DEFAULT NULL COMMENT '变动时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作票负责人变更' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WORK_TICKET_SAFETY_MEASURE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_WORK_TICKET_SAFETY_MEASURE`;
CREATE TABLE `HZIMS_WORK_TICKET_SAFETY_MEASURE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键ID',
`TICKET_ID` BIGINT(20) NOT NULL COMMENT '工作票ID',
`MEASURE_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '安全措施ID',
`MATTER_GROUP` BIGINT(20) NULL DEFAULT NULL COMMENT '分组',
`MEASURE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '安全措施',
`TYPE` VARCHAR(4) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '类型(1:值班人员添加2:签发人添加3:许可人添加)',
`EXECUTOR` BIGINT(20) NULL DEFAULT NULL COMMENT '执行人',
`EXECUTE_TIME` DATETIME NULL DEFAULT NULL COMMENT '执行时间',
`EXECUTE_REMARK` TINYTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '执行情况',
`EXECUTE_IMG_URL` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '拍照上传图片URL',
`STATUS` TINYINT(20) NULL DEFAULT NULL,
`COMPLETER` BIGINT(20) NULL DEFAULT NULL COMMENT '内容执行人',
`COMPLETE_TIME` DATETIME NULL DEFAULT NULL COMMENT '内容完成时间',
`COMPLETE_IMG_URL` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '完成内容上传图片地址',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建机构',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`SORT` TINYINT(4) NULL DEFAULT NULL COMMENT '排序',
`PATTERN` VARCHAR(2) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '1' COMMENT '类型(1:值班人员添加2:许可人添加)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作票安全措施列表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WORK_TICKET_TEMPLATE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_WORK_TICKET_TEMPLATE`;
CREATE TABLE `HZIMS_WORK_TICKET_TEMPLATE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`EM_CODE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备名称',
`EM_NAME` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备名称',
`TYPE` VARCHAR(2) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '工作票类型',
`COMPANY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '单位',
`TASK_TYPE` VARCHAR(2) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '关联业务类型',
`TASK_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '关联业务ID',
`TASK_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '关联业务名称',
`CLASS_GROUP` BIGINT(20) NULL DEFAULT NULL COMMENT '班组',
`CLASS_GROUP_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '班组名称',
`CLASS_GROUP_MEMBERS` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '班组成员',
`CLASS_GROUP_MEMBERS_MANUAL` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '班组成员手填',
`ADDRESS_EQU_NAME` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作地点及设备名称',
`WORK_CONTENT` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作任务及内容',
`PLAN_START_TIME` DATETIME NULL DEFAULT NULL COMMENT '计划开始时间',
`PLAN_END_TIME` DATETIME NULL DEFAULT NULL COMMENT '计划结束时间',
`SIGNER` BIGINT(20) NULL DEFAULT NULL COMMENT '签发人',
`PRINCIPAL` BIGINT(20) NULL DEFAULT NULL COMMENT '负责人',
`PRINCIPAL_MANUAL` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '负责人手填',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '1:未完成 2:执行中 3:已完成',
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL,
`UPDATE_TIME` DATETIME NULL DEFAULT NULL,
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NOT NULL COMMENT '创建部门',
`PLAN_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '计划ID',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作票模板' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- VIEW STRUCTURE FOR V_HZIMS_TICKET_INFO
-- ----------------------------
DROP VIEW IF EXISTS `V_HZIMS_TICKET_INFO`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `V_HZIMS_TICKET_INFO` AS SELECT `HZIMS_TICKET_INFO`.`ID` AS `ID`,`HZIMS_TICKET_INFO`.`PROCESS_INSTANCE_ID` AS `PROCESS_INSTANCE_ID`,`HZIMS_TICKET_INFO`.`TYPE` AS `TYPE`,`HZIMS_TICKET_INFO`.`COMPANY` AS `COMPANY`,`HZIMS_TICKET_INFO`.`CODE` AS `CODE`,`HZIMS_TICKET_INFO`.`TASK_TYPE` AS `TASK_TYPE`,`HZIMS_TICKET_INFO`.`TASK_ID` AS `TASK_ID`,`HZIMS_TICKET_INFO`.`TASK_NAME` AS `TASK_NAME`,`HZIMS_TICKET_INFO`.`PLAN_START_TIME` AS `PLAN_START_TIME`,`HZIMS_TICKET_INFO`.`PLAN_END_TIME` AS `PLAN_END_TIME`,`HZIMS_TICKET_INFO`.`STATUS` AS `STATUS`,`HZIMS_TICKET_INFO`.`TENANT_ID` AS `TENANT_ID`,`HZIMS_TICKET_INFO`.`CREATE_USER` AS `CREATE_USER`,`HZIMS_TICKET_INFO`.`CREATE_TIME` AS `CREATE_TIME`,`HZIMS_TICKET_INFO`.`UPDATE_USER` AS `UPDATE_USER`,`HZIMS_TICKET_INFO`.`UPDATE_TIME` AS `UPDATE_TIME`,`HZIMS_TICKET_INFO`.`IS_DELETED` AS `IS_DELETED`,`HZIMS_TICKET_INFO`.`CREATE_DEPT` AS `CREATE_DEPT`,`HZIMS_TICKET_INFO`.`FLOW_DESCRIPTION` AS `FLOW_DESCRIPTION` FROM (SELECT `HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`ID` AS `ID`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`PROCESS_INSTANCE_ID` AS `PROCESS_INSTANCE_ID`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TYPE` AS `TYPE`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`COMPANY` AS `COMPANY`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`CODE` AS `CODE`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TASK_TYPE` AS `TASK_TYPE`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TASK_ID` AS `TASK_ID`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TASK_NAME` AS `TASK_NAME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`PLAN_START_TIME` AS `PLAN_START_TIME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`PLAN_END_TIME` AS `PLAN_END_TIME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`STATUS` AS `STATUS`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TENANT_ID` AS `TENANT_ID`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`CREATE_USER` AS `CREATE_USER`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`CREATE_TIME` AS `CREATE_TIME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`UPDATE_USER` AS `UPDATE_USER`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`UPDATE_TIME` AS `UPDATE_TIME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`IS_DELETED` AS `IS_DELETED`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`CREATE_DEPT` AS `CREATE_DEPT`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`FLOW_DESCRIPTION` AS `FLOW_DESCRIPTION` FROM `HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO` UNION ALL SELECT `HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`ID` AS `ID`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`PROCESS_INSTANCE_ID` AS `PROCESS_INSTANCE_ID`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TICKET_TYPE` AS `TYPE`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`COMPANY` AS `COMPANY`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`CODE` AS `CODE`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TASK_TYPE` AS `TASK_TYPE`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TASK_ID` AS `TASK_ID`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TASK_NAME` AS `TASK_NAME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`START_TIME` AS `PLAN_START_TIME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`END_TIME` AS `PLAN_END_TIME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`STATUS` AS `STATUS`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TENANT_ID` AS `TENANT_ID`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`CREATE_USER` AS `CREATE_USER`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`CREATE_TIME` AS `CREATE_TIME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`UPDATE_USER` AS `UPDATE_USER`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`UPDATE_TIME` AS `UPDATE_TIME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`IS_DELETED` AS `IS_DELETED`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`CREATE_DEPT` AS `CREATE_DEPT`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`FLOW_DESCRIPTION` AS `FLOW_DESCRIPTION` FROM `HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`) `HZIMS_TICKET_INFO` WHERE (`HZIMS_TICKET_INFO`.`IS_DELETED` = 0);
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `signage` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点标识-两票编码' AFTER `ticket_type`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `signage_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编号(原站点ID)' AFTER `signage`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `flow_user_id` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户Id' AFTER `signage_code`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `flow_task_id` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前任务Id' AFTER `flow_user_id`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `flow_task_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前任务名称' AFTER `flow_task_id`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `next_step_operator` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下一个审批人' AFTER `flow_task_name`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `flow_status` int(11) NULL DEFAULT NULL COMMENT '流程状态' AFTER `next_step_operator`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `flow_description` varchar(6000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程描述' AFTER `flow_status`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `project_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目名称' AFTER `flow_description`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `class_group_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '班组' AFTER `project_name`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_measure` ADD COLUMN `operation_time` datetime(0) NULL DEFAULT NULL COMMENT '操作时间' AFTER `matter_group`;
CREATE TABLE `hzims-ticket`.`hzims_ticket_info_danger` (
`id` bigint(20) NULL DEFAULT NULL COMMENT '编号',
`ticket_id` bigint(20) NULL DEFAULT NULL,
`dangerous_point` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '危险点',
`maintenance` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '安全措施',
`create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(4) NULL DEFAULT 0 COMMENT '逻辑删除'
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE `hzims-ticket`.`hzims_work_ticket_finish` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`ticket_id` bigint(20) NULL DEFAULT NULL COMMENT '工作票编号',
`temp_ground_num` int(11) NULL DEFAULT NULL COMMENT '临时接地线',
`temp_dismantle_num` int(11) NULL DEFAULT NULL COMMENT '临时拆除几组',
`ground_num` int(11) NULL DEFAULT NULL COMMENT '接地线几组',
`dismantle_num` int(11) NULL DEFAULT NULL COMMENT '拆除几组',
`retain_num` int(11) NULL DEFAULT NULL COMMENT '保留几组',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`principal` bigint(20) NULL DEFAULT NULL COMMENT '负责人名称',
`licensor` bigint(20) NULL DEFAULT NULL COMMENT '许可人',
`licensor_end_time` datetime(0) NULL DEFAULT NULL COMMENT '工作票终结时间',
`principal_end_time` datetime(0) NULL DEFAULT NULL COMMENT '负责人工作结束时间',
`content` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`tell_content` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '交底内容',
`work_end_time` datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
`brake_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '刀闸编号',
`guardian` bigint(20) NULL DEFAULT NULL COMMENT '监护人',
`guardian_place` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '监护人地址',
`other_items` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '其他事项',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '工作结束' ROW_FORMAT = Dynamic;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `power` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT ' 工作条件( 停电或不停电)' AFTER `watch_principal_end_time`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `flow_user_id` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户Id' AFTER `step_operator`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `project_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目名称' AFTER `flow_task_name`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `job_receiver` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作接收人' AFTER `project_name`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `job_receiver_time` datetime(0) NULL DEFAULT NULL COMMENT '工作接收人时间' AFTER `job_receiver`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_safety` tinyint(1) NULL DEFAULT 0 COMMENT '安全隔离措施附页 (true,展示附件,false,不展示附件)' AFTER `job_receiver_time`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_hazard` tinyint(1) NULL DEFAULT 0 COMMENT '危险点分析与预控措施票 (true,展示附件,false,不展示附件)' AFTER `is_safety`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_railway` tinyint(1) NULL DEFAULT 0 COMMENT '动火工作票 (true,展示附件,false,不展示附件)' AFTER `is_hazard`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_limited` tinyint(1) NULL DEFAULT 0 COMMENT ' 有限空间监测记录单(true,展示附件,false,不展示附件)' AFTER `is_railway`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_start` tinyint(1) NULL DEFAULT 0 COMMENT '每日开工和收工时间附页' AFTER `is_limited`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` MODIFY COLUMN `flow_description` varchar(6000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程描述' AFTER `flow_status`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` MODIFY COLUMN `follower_num` int(11) NULL DEFAULT 1 COMMENT '附页第几张' AFTER `flow_description`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` MODIFY COLUMN `next_step_operator` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下一个审批人' AFTER `input`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` MODIFY COLUMN `step_operator` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前审批人' AFTER `next_step_operator`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` DROP COLUMN `is_power`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` DROP COLUMN `start_date_time`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` DROP COLUMN `end_date_time`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` DROP COLUMN `content`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` DROP COLUMN `work_ticket_end_time`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` DROP COLUMN `tell_content`;
CREATE TABLE `hzims-ticket`.`hzims_work_ticket_info_copy1` (
`id` bigint(20) NOT NULL COMMENT '主键',
`em_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
`em_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
`process_instance_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作流ID',
`type` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工作票类型',
`company` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '单位',
`code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号',
`task_type` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联业务类型',
`task_id` bigint(20) NULL DEFAULT NULL COMMENT '关联业务ID',
`task_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联业务名称',
`class_group` bigint(20) NULL DEFAULT NULL COMMENT '班组',
`class_group_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '班组名称',
`class_group_members` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '班组成员',
`class_group_members_manual` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '班组成员手填',
`address_equ_name` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作地点及设备名称',
`work_content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作任务及内容',
`plan_start_time` datetime(0) NULL DEFAULT NULL COMMENT '计划开始时间',
`plan_end_time` datetime(0) NULL DEFAULT NULL COMMENT '计划结束时间',
`signer` bigint(20) NULL DEFAULT NULL COMMENT '签发人',
`principal` bigint(20) NULL DEFAULT NULL COMMENT '负责人',
`principal_manual` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人手填',
`licensor` bigint(20) NULL DEFAULT NULL COMMENT '许可人',
`license_time` datetime(0) NULL DEFAULT NULL COMMENT '许可时间',
`flow_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程进行code',
`license_end_time` datetime(0) NULL DEFAULT NULL COMMENT '许可人确认工作结束时间',
`is_evaluate` tinyint(4) NULL DEFAULT 0 COMMENT '是否评价',
`status` tinyint(4) NULL DEFAULT NULL COMMENT '1:未完成 2:执行中 3:已完成',
`tenant_id` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户ID',
`create_user` bigint(20) NOT NULL COMMENT '创建人',
`create_time` datetime(0) NOT NULL COMMENT '创建时间',
`update_user` bigint(20) NULL DEFAULT NULL,
`update_time` datetime(0) NULL DEFAULT NULL,
`is_deleted` tinyint(4) NULL DEFAULT NULL,
`create_dept` bigint(20) NOT NULL COMMENT '创建部门',
`confirm_img_urls` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作负责人确认工作完成上传图片地址',
`confirm_img_filenames` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作负责人确认工作完成上传图片名称',
`sort` tinyint(4) NULL DEFAULT NULL COMMENT '排序',
`confirm_work_time` datetime(0) NULL DEFAULT NULL COMMENT '工作负责人确认工作完成时间',
`pattern` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型(1:值班人员添加2:许可人添加)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '工作票' ROW_FORMAT = Dynamic;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_safety_measure` MODIFY COLUMN `type` varchar(4) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型(1:值班人员添加2:签发人添加3:许可人添加)' AFTER `measure`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_safety_measure` MODIFY COLUMN `execute_img_url` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '拍照上传图片url' AFTER `execute_remark`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_safety_measure` MODIFY COLUMN `completer` bigint(20) NULL DEFAULT NULL COMMENT '内容执行人' AFTER `status`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_safety_measure` MODIFY COLUMN `complete_img_url` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '完成内容上传图片地址' AFTER `complete_time`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_safety_measure` MODIFY COLUMN `pattern` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '类型(1:值班人员添加2:许可人添加)' AFTER `sort`;
CREATE TABLE `hzims-ticket`.`hzims_work_ticket_safety_measure_copy1` (
`id` bigint(20) NOT NULL COMMENT '主键ID',
`ticket_id` bigint(20) NOT NULL COMMENT '工作票ID',
`measure_id` bigint(20) NULL DEFAULT NULL COMMENT '安全措施ID',
`matter_group` bigint(20) NULL DEFAULT NULL COMMENT '分组',
`measure` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '安全措施',
`type` varchar(4) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型(1:值班人员添加2:签发人添加3:许可人添加)',
`executor` bigint(20) NULL DEFAULT NULL COMMENT '执行人',
`execute_time` datetime(0) NULL DEFAULT NULL COMMENT '执行时间',
`execute_remark` tinytext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '执行情况',
`execute_img_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '拍照上传图片url',
`status` tinyint(20) NULL DEFAULT NULL,
`completer` bigint(20) NULL DEFAULT NULL COMMENT '内容执行人',
`complete_time` datetime(0) NULL DEFAULT NULL COMMENT '内容完成时间',
`complete_img_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '完成内容上传图片地址',
`create_user` bigint(20) NOT NULL COMMENT '创建人',
`create_time` datetime(0) NOT NULL COMMENT '创建时间',
`update_user` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`is_deleted` tinyint(4) NULL DEFAULT NULL,
`create_dept` bigint(20) NOT NULL COMMENT '创建机构',
`tenant_id` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户id',
`sort` tinyint(4) NULL DEFAULT NULL COMMENT '排序',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '工作票安全措施列表' ROW_FORMAT = Dynamic;
DROP TABLE `hzims-ticket`.`hzims_workflow_operation_log`;
SET FOREIGN_KEY_CHECKS=1;

173
hzims-service/ticket/src/main/resources/db/2.0.0.sql

@ -1,173 +0,0 @@
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `signage` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点标识-两票编码' AFTER `ticket_type`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `signage_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编号(原站点ID)' AFTER `signage`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `flow_user_id` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户Id' AFTER `signage_code`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `flow_task_id` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前任务Id' AFTER `flow_user_id`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `flow_task_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前任务名称' AFTER `flow_task_id`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `next_step_operator` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下一个审批人' AFTER `flow_task_name`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `flow_status` int(11) NULL DEFAULT NULL COMMENT '流程状态' AFTER `next_step_operator`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `flow_description` varchar(6000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程描述' AFTER `flow_status`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `project_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目名称' AFTER `flow_description`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `class_group_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '班组' AFTER `project_name`;
ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_measure` ADD COLUMN `operation_time` datetime(0) NULL DEFAULT NULL COMMENT '操作时间' AFTER `matter_group`;
CREATE TABLE `hzims-ticket`.`hzims_ticket_info_danger` (
`id` bigint(20) NULL DEFAULT NULL COMMENT '编号',
`ticket_id` bigint(20) NULL DEFAULT NULL,
`dangerous_point` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '危险点',
`maintenance` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '安全措施',
`create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(4) NULL DEFAULT 0 COMMENT '逻辑删除'
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE `hzims-ticket`.`hzims_work_ticket_finish` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`ticket_id` bigint(20) NULL DEFAULT NULL COMMENT '工作票编号',
`temp_ground_num` int(11) NULL DEFAULT NULL COMMENT '临时接地线',
`temp_dismantle_num` int(11) NULL DEFAULT NULL COMMENT '临时拆除几组',
`ground_num` int(11) NULL DEFAULT NULL COMMENT '接地线几组',
`dismantle_num` int(11) NULL DEFAULT NULL COMMENT '拆除几组',
`retain_num` int(11) NULL DEFAULT NULL COMMENT '保留几组',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`principal` bigint(20) NULL DEFAULT NULL COMMENT '负责人名称',
`licensor` bigint(20) NULL DEFAULT NULL COMMENT '许可人',
`licensor_end_time` datetime(0) NULL DEFAULT NULL COMMENT '工作票终结时间',
`principal_end_time` datetime(0) NULL DEFAULT NULL COMMENT '负责人工作结束时间',
`content` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`tell_content` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '交底内容',
`work_end_time` datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
`brake_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '刀闸编号',
`guardian` bigint(20) NULL DEFAULT NULL COMMENT '监护人',
`guardian_place` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '监护人地址',
`other_items` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '其他事项',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '工作结束' ROW_FORMAT = Dynamic;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `power` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT ' 工作条件( 停电或不停电)' AFTER `watch_principal_end_time`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `flow_user_id` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户Id' AFTER `step_operator`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `project_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目名称' AFTER `flow_task_name`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `job_receiver` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作接收人' AFTER `project_name`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `job_receiver_time` datetime(0) NULL DEFAULT NULL COMMENT '工作接收人时间' AFTER `job_receiver`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_safety` tinyint(1) NULL DEFAULT 0 COMMENT '安全隔离措施附页 (true,展示附件,false,不展示附件)' AFTER `job_receiver_time`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_hazard` tinyint(1) NULL DEFAULT 0 COMMENT '危险点分析与预控措施票 (true,展示附件,false,不展示附件)' AFTER `is_safety`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_railway` tinyint(1) NULL DEFAULT 0 COMMENT '动火工作票 (true,展示附件,false,不展示附件)' AFTER `is_hazard`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_limited` tinyint(1) NULL DEFAULT 0 COMMENT ' 有限空间监测记录单(true,展示附件,false,不展示附件)' AFTER `is_railway`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_start` tinyint(1) NULL DEFAULT 0 COMMENT '每日开工和收工时间附页' AFTER `is_limited`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` MODIFY COLUMN `flow_description` varchar(6000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程描述' AFTER `flow_status`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` MODIFY COLUMN `follower_num` int(11) NULL DEFAULT 1 COMMENT '附页第几张' AFTER `flow_description`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` MODIFY COLUMN `next_step_operator` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下一个审批人' AFTER `input`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` MODIFY COLUMN `step_operator` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前审批人' AFTER `next_step_operator`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` DROP COLUMN `is_power`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` DROP COLUMN `start_date_time`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` DROP COLUMN `end_date_time`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` DROP COLUMN `content`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` DROP COLUMN `work_ticket_end_time`;
ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` DROP COLUMN `tell_content`;
SET FOREIGN_KEY_CHECKS=1;
-- auto-generated definition
-- auto-generated definition
create table hzims_ticket_count
(
id bigint auto_increment comment '主键ID'
primary key,
date_time varchar(20) null comment '日期',
dept_id bigint null comment '站点Id',
dept_name varchar(100) null comment '站点名称',
ticket_type varchar(255) null comment '票据类型',
ticket_number int null comment '开票数量',
ticket_complete_num int null comment '完成数量',
ticket_delay_num int null comment '延期数量',
ticket_proportion_num int null comment '合格数量',
create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
is_deleted tinyint(1) default 0 null comment '逻辑删除',
tenant_id varchar(12) null comment '租户ID',
create_dept varchar(30) null comment '创建部门',
status tinyint null,
create_user bigint not null comment '创建人',
update_user bigint null,
invalidated_ticket_num int null comment '废票数量',
wrong_ticket_num int null comment '错票数量',
percent_pass_ticket varchar(50) null comment '合格率'
)
comment '两票统计分析' row_format = DYNAMIC;
insert into hzims_work_ticket_finish(ticket_id, ground_num, brake_number)
select ticket_id, ground_switch_count,ground_wire_code
from hzims_work_ticket_flow;
alter table hzims_ticket_count add invalidated_ticket_num int null comment '废票数量';
# 工作票更新
update hzims_work_ticket_info set flow_task_name = '签发' where status = 1;
update hzims_work_ticket_info set flow_task_name = '收到工作票' where status = 2;
update hzims_work_ticket_info set flow_task_name = '许可人许可' where status = 3;
update hzims_work_ticket_info set flow_task_name = '确认条件具备' where status = 4;
update hzims_work_ticket_info set flow_task_name = '工作负责人确认工作' where status = 5;
update hzims_work_ticket_info set flow_task_name = '许可人确认工作结束' where status = 6;
update hzims_work_ticket_info set flow_task_name = '工作票终结' where status = 7;
update hzims_work_ticket_info set flow_task_name = '许可人延期确认' where status = 9;
update hzims_work_ticket_info set flow_task_name = '负责人延期确认' where status = 10;
update hzims_work_ticket_info set flow_task_name = '作废' where status = 11;
update hzims_work_ticket_info set flow_task_name = '逾期' where status = 12;
# 操作票更新
update hzims_standard_ticket_info set flow_task_name = '待监护人确认' where status = 1;
update hzims_standard_ticket_info set flow_task_name = '待值班负责人确认' where status = 2;
update hzims_standard_ticket_info set flow_task_name = '结束' where status = 3;
update hzims_standard_ticket_info set flow_task_name = '终止' where status = 4;
alter table hzims_ticket_count add wrong_ticket_num int null comment '错票数量';
alter table hzims_ticket_count add percent_pass_ticket varchar(50) null comment '合格率';
-- 两票开票视图
create or replace view v_hzims_ticket_info as
select hzims_ticket_info.* from
(select `id`, `process_instance_id`, `type`, `company`, `code`, `task_type`, `task_id`, `task_name`, `plan_start_time`,
`plan_end_time`, `status`,`tenant_id`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`,
`create_dept`,`flow_description`
from hzims_work_ticket_info
union all
select `id`, `process_instance_id`, `ticket_type` type, `company`, `code`, `task_type`, `task_id`, `task_name`,
`start_time` plan_start_time, `end_time` plan_end_time, `status`,`tenant_id`, `create_user`, `create_time`,
`update_user`, `update_time`, `is_deleted`, `create_dept`,`flow_description`
from hzims_standard_ticket_info
) hzims_ticket_info where hzims_ticket_info.IS_DELETED = 0;

5
hzims-service/ticket/src/main/resources/db/2.0.1.sql

@ -1,5 +0,0 @@
alter table `hzims_work_ticket_finish` add column `end_principal_name` varchar(50) comment '工作终结负责人';
alter table `hzims_work_ticket_finish` add column `end_licensor_name` varchar(50) comment '工作终结许可人';
alter table `hzims_work_ticket_finish` add column `finish_licensor_name` varchar(50) comment '工作票终结许可人';
alter table `hzims_work_ticket_info` add column `is_offline` tinyint(2) default 0 comment '是否线下 : 1-线下,0-线上';

0
hzims-service/ticket/src/main/resources/dict/dict.sql

65
hzims-service/weather/src/main/resources/db/1.0.0.sql

@ -0,0 +1,65 @@
-- ----------------------------
-- TABLE STRUCTURE FOR BLADE_MODULE_VERSION
-- ----------------------------
DROP TABLE IF EXISTS `BLADE_MODULE_VERSION`;
CREATE TABLE `BLADE_MODULE_VERSION` (
`MODULE_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`VERSION` VARCHAR(8) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`HISTORY` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
PRIMARY KEY (`MODULE_NAME`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_HE_WEATHER_DAILY
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_HE_WEATHER_DAILY`;
CREATE TABLE `HZIMS_HE_WEATHER_DAILY` (
`ID` BIGINT(20) NOT NULL,
`STATION_CODE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '站点编码',
`DEPT_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '机构ID',
`FX_DATE` DATE NULL DEFAULT NULL COMMENT '预报日期',
`SUNRISE` TIME NULL DEFAULT NULL COMMENT '日出时间',
`SUNSET` TIME NULL DEFAULT NULL COMMENT '日落时间',
`MOONRISE` TIME NULL DEFAULT NULL COMMENT '月升时间',
`MOONSET` TIME NULL DEFAULT NULL COMMENT '月落时间',
`MOON_PHASE` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '月相名称; 满月',
`MOON_PHASE_ICON` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '月月相图标',
`TEMP_MAX` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报当天最高温度; 4',
`TEMP_MIN` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报当天最低温度; -5',
`ICON_DAY` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报白天天气状况的图标代码,图标可通过天气状况和图标下载; 100',
`TEXT_DAY` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报白天天气状况文字描述,包括阴晴雨雪等天气状态的描述; 晴',
`ICON_NIGHT` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报夜间天气状况的图标代码,图标可通过天气状况和图标下载; 100',
`TEXT_NIGHT` VARCHAR(10) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报晚间天气状况文字描述,包括阴晴雨雪等天气状态的描述; 晴',
`WIND360_DAY` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报白天风向360角度; 305',
`WIND_DIR_DAY` VARCHAR(10) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报白天风向; 西北',
`WIND_SCALE_DAY` VARCHAR(10) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报白天风力等级; 3-4',
`WIND_SPEED_DAY` VARCHAR(10) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报白天风速,公里/小时; 15',
`WIND360_NIGHT` VARCHAR(10) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报夜间风向360角度; 305',
`WIND_DIR_NIGHT` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报夜间当天风向; 西北',
`WIND_SCALE_NIGHT` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报夜间风力等级; 3-4',
`WIND_SPEED_NIGHT` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报夜间风速,公里/小时; 15',
`HUMIDITY` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报当天相对湿度,百分比数值; 40',
`PRECIP` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报当天降水量,默认单位:毫米; 1.2',
`PRESSURE` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报当天大气压强,默认单位:百帕; 1020',
`VIS` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报当天能见度,默认单位:公里; 10',
`CLOUD` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报当天云量,百分比数值; 23',
`UV_INDEX` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '预报当天紫外线强度指数; 3',
`STATUS` TINYINT(4) NULL DEFAULT NULL,
`TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL,
`IS_DELETED` TINYINT(4) NULL DEFAULT NULL,
`CREATE_USER` BIGINT(20) NOT NULL,
`CREATE_TIME` DATETIME NOT NULL,
`UPDATE_USER` BIGINT(20) NULL DEFAULT NULL,
`UPDATE_TIME` DATETIME NULL DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- VIEW STRUCTURE FOR V_HZIMS_STATION
-- ----------------------------
DROP VIEW IF EXISTS `V_HZIMS_STATION`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `V_HZIMS_STATION` AS SELECT `HZIMS_OPERATION`.`HZIMS_STATION`.`ID` AS `ID`,`HZIMS_OPERATION`.`HZIMS_STATION`.`REF_DOMAIN` AS `REF_DOMAIN`,`HZIMS_OPERATION`.`HZIMS_STATION`.`REF_BASIN` AS `REF_BASIN`,`HZIMS_OPERATION`.`HZIMS_STATION`.`REF_AREA` AS `REF_AREA`,`HZIMS_OPERATION`.`HZIMS_STATION`.`AREA_CODE` AS `AREA_CODE`,`HZIMS_OPERATION`.`HZIMS_STATION`.`REF_DEPT` AS `REF_DEPT`,`HZIMS_OPERATION`.`HZIMS_STATION`.`CODE` AS `CODE`,`HZIMS_OPERATION`.`HZIMS_STATION`.`NAME` AS `NAME`,`HZIMS_OPERATION`.`HZIMS_STATION`.`SERVE_TYPE` AS `SERVE_TYPE`,`HZIMS_OPERATION`.`HZIMS_STATION`.`COMMISSION_TIME` AS `COMMISSION_TIME`,`HZIMS_OPERATION`.`HZIMS_STATION`.`PIC` AS `PIC`,`HZIMS_OPERATION`.`HZIMS_STATION`.`TYPE` AS `TYPE`,`HZIMS_OPERATION`.`HZIMS_STATION`.`WATER_LEVEL_MAX` AS `WATER_LEVEL_MAX`,`HZIMS_OPERATION`.`HZIMS_STATION`.`LIMIT_WATER_LEVEL` AS `LIMIT_WATER_LEVEL`,`HZIMS_OPERATION`.`HZIMS_STATION`.`LGTD` AS `LGTD`,`HZIMS_OPERATION`.`HZIMS_STATION`.`LTTD` AS `LTTD`,`HZIMS_OPERATION`.`HZIMS_STATION`.`ENABLE_CONTROL` AS `ENABLE_CONTROL`,`HZIMS_OPERATION`.`HZIMS_STATION`.`REMARK` AS `REMARK`,`HZIMS_OPERATION`.`HZIMS_STATION`.`CONTACT` AS `CONTACT`,`HZIMS_OPERATION`.`HZIMS_STATION`.`ADDRESS` AS `ADDRESS`,`HZIMS_OPERATION`.`HZIMS_STATION`.`COMPANY` AS `COMPANY`,`HZIMS_OPERATION`.`HZIMS_STATION`.`CONTACTOR` AS `CONTACTOR`,`HZIMS_OPERATION`.`HZIMS_STATION`.`TENANT_ID` AS `TENANT_ID`,`HZIMS_OPERATION`.`HZIMS_STATION`.`CREATE_TIME` AS `CREATE_TIME`,`HZIMS_OPERATION`.`HZIMS_STATION`.`UPDATE_TIME` AS `UPDATE_TIME`,`HZIMS_OPERATION`.`HZIMS_STATION`.`CREATE_USER` AS `CREATE_USER`,`HZIMS_OPERATION`.`HZIMS_STATION`.`UPDATE_USER` AS `UPDATE_USER`,`HZIMS_OPERATION`.`HZIMS_STATION`.`IS_DELETED` AS `IS_DELETED`,`HZIMS_OPERATION`.`HZIMS_STATION`.`STATUS` AS `STATUS`,`HZIMS_OPERATION`.`HZIMS_STATION`.`CREATE_DEPT` AS `CREATE_DEPT` FROM `HZIMS_OPERATION`.`HZIMS_STATION`;
SET FOREIGN_KEY_CHECKS = 1;

0
hzims-service/weather/src/main/resources/dict/dict.sql

Loading…
Cancel
Save