149 changed files with 12821 additions and 7 deletions
@ -0,0 +1,402 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.constants; |
||||||
|
|
||||||
|
import lombok.Getter; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author: py |
||||||
|
*/ |
||||||
|
public class DutyConstants { |
||||||
|
|
||||||
|
public static Long PREVIOUS_TEAM = 0L; |
||||||
|
|
||||||
|
// 下一班组
|
||||||
|
public static Long NEXT_TEAM = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 交接班类型 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
public enum DutyRecTypeEnum { |
||||||
|
/** |
||||||
|
* 交班 |
||||||
|
*/ |
||||||
|
HAND_REC(1, "交班"), |
||||||
|
/** |
||||||
|
* 接班 |
||||||
|
*/ |
||||||
|
CARRY_REC(2, "接班"); |
||||||
|
|
||||||
|
private final int val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
DutyRecTypeEnum(int val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 交接班类型 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
public enum MessageRecTypeEnum { |
||||||
|
/** |
||||||
|
* 提前 15 分钟 提醒交班 |
||||||
|
*/ |
||||||
|
HAND_REC_MESSAGE(15, "提前交班提醒"), |
||||||
|
/** |
||||||
|
* 接班巡视时间 |
||||||
|
*/ |
||||||
|
CARRY_REC_MESSAGE(30, "接班巡视时间"), |
||||||
|
|
||||||
|
DELAYED_HAND_REC_MESSAGE(1, "延时交班提醒"), |
||||||
|
//最迟延迟交班提醒
|
||||||
|
DELAYED_HAND_REC_MESSAGE_LAST(15, "延时交班提醒"); |
||||||
|
private final int val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
MessageRecTypeEnum(int val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 消息业务分类 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
public enum MessageClassifyEnum { |
||||||
|
/** |
||||||
|
* 系统通知 |
||||||
|
*/ |
||||||
|
MESSAGE_SYSTEM("system", "系统通知"), |
||||||
|
/** |
||||||
|
* 事务消息 |
||||||
|
*/ |
||||||
|
MESSAGE_CLASSIFY("business", "事务消息"), |
||||||
|
/** |
||||||
|
* 日常提醒 |
||||||
|
*/ |
||||||
|
MESSAGE_REMINDSY("dailyRemind", "日常提醒"), |
||||||
|
/** |
||||||
|
* 巡检消息 |
||||||
|
*/ |
||||||
|
MESSAGE_INSPECT("inspect", "巡检消息"), |
||||||
|
/** |
||||||
|
* 无 |
||||||
|
*/ |
||||||
|
MESSAGE_CNONE("none", "无"); |
||||||
|
|
||||||
|
private final String val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
MessageClassifyEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 交接班类型 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
public enum RecTypeEnum { |
||||||
|
/** |
||||||
|
* 交班提醒 |
||||||
|
*/ |
||||||
|
HAND_REMIND(1, "交班提醒"), |
||||||
|
/** |
||||||
|
* 交班延迟 |
||||||
|
*/ |
||||||
|
HAND_DELAY(2, "交班延迟-提醒接班人"), |
||||||
|
/** |
||||||
|
* 提醒交班人交班 |
||||||
|
*/ |
||||||
|
REMIND_HAND_PERSON(3, "提醒交班人交班"); |
||||||
|
|
||||||
|
private final int val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
RecTypeEnum(int val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 工作流状态 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
public enum ProcessStatusEnum { |
||||||
|
/** |
||||||
|
* 默认 |
||||||
|
*/ |
||||||
|
DEFAULT_PROCESS_STATUS(0, "默认"), |
||||||
|
/** |
||||||
|
* 交班延迟 |
||||||
|
*/ |
||||||
|
BACKLOG_PROCESS_STATUS(1, "待办"), |
||||||
|
/** |
||||||
|
* 提醒交班人交班 |
||||||
|
*/ |
||||||
|
COMPLETED_PROCESS_STATUS(2, "已完成"); |
||||||
|
private final int val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
ProcessStatusEnum(int val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 数据类型 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
public enum UserDataScopeTypeEnum { |
||||||
|
/** |
||||||
|
* 只看自己 |
||||||
|
*/ |
||||||
|
SELT_VISIBLE("0", "只看自己"), |
||||||
|
/** |
||||||
|
* 所属机构 |
||||||
|
*/ |
||||||
|
EMPLOYER_VISIBLE("1", "所属机构"), |
||||||
|
/** |
||||||
|
* 所属机构及下属机构 |
||||||
|
*/ |
||||||
|
EMPLOYER_SUBORDINATE_BODY("2", "所属机构及下属机构"), |
||||||
|
/** |
||||||
|
* 所在机构可见 |
||||||
|
*/ |
||||||
|
AFFILIATE("3", "附属机构"), |
||||||
|
/** |
||||||
|
* 所在机构及子级可见 |
||||||
|
*/ |
||||||
|
AFFILIATE_SUBORDINATE_BODY("4", "附属机构及下属"), |
||||||
|
/** |
||||||
|
* 全部可见 |
||||||
|
*/ |
||||||
|
SELT_SUBORDINATE_BODY("5", "个人及下属机构"); |
||||||
|
private final String val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
UserDataScopeTypeEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 站点类型 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
public enum StationTypeEnum { |
||||||
|
/** |
||||||
|
* 水电站 |
||||||
|
*/ |
||||||
|
HYDROPOWER_STATION("1", "水电站"), |
||||||
|
/** |
||||||
|
* 风电 |
||||||
|
*/ |
||||||
|
WIND_POWER_STATION("2", "风电"), |
||||||
|
/** |
||||||
|
* 光伏 |
||||||
|
*/ |
||||||
|
PHOTOVOLTAIC_STATION("3", "光伏"), |
||||||
|
/** |
||||||
|
* 泵站 |
||||||
|
*/ |
||||||
|
PUMP_STATION_STATION("4", "泵站"), |
||||||
|
/** |
||||||
|
* 水厂 |
||||||
|
*/ |
||||||
|
WATER_WORKS_STATION("5", "水厂"), |
||||||
|
/** |
||||||
|
* 闸门 |
||||||
|
*/ |
||||||
|
GATE_STATION("6", "闸门"); |
||||||
|
private final String val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
StationTypeEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 所属行业 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
public enum TradeEnum { |
||||||
|
/** |
||||||
|
* 水电站 |
||||||
|
*/ |
||||||
|
POWER_INDUSTRY("1", "电力行业"), |
||||||
|
/** |
||||||
|
* 风电 |
||||||
|
*/ |
||||||
|
WATER_AFFAIRS_INDUSTRY("2", "水务行业"); |
||||||
|
private final String val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
TradeEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 站点类型 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
public enum StationQuantityEnum { |
||||||
|
/** |
||||||
|
* 水电站 |
||||||
|
*/ |
||||||
|
ONE("1", "一"), |
||||||
|
/** |
||||||
|
* 风电 |
||||||
|
*/ |
||||||
|
TOW("2", "二"), |
||||||
|
/** |
||||||
|
* 光伏 |
||||||
|
*/ |
||||||
|
MORE("3", "多"), |
||||||
|
/** |
||||||
|
* 泵站 |
||||||
|
*/ |
||||||
|
WHOLE("4", "整"); |
||||||
|
private final String val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
StationQuantityEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 行业类型 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
public enum InDustryEnum { |
||||||
|
/** |
||||||
|
* 系统 |
||||||
|
*/ |
||||||
|
SYSTEM("1", "系统"), |
||||||
|
/** |
||||||
|
* 行业 |
||||||
|
*/ |
||||||
|
INDUSTRY("2", "行业"), |
||||||
|
/** |
||||||
|
* 多种站点类型 |
||||||
|
*/ |
||||||
|
MORE_STATION_TYPE("3", "多种站点类型"), |
||||||
|
/** |
||||||
|
* 单个站点类型 |
||||||
|
*/ |
||||||
|
SINGLE_STATION_TYPE("4", "单个站点类型"); |
||||||
|
private final String val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
InDustryEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 首页分类 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
public enum FirstPageTypeEnum { |
||||||
|
/** |
||||||
|
* 系统 |
||||||
|
*/ |
||||||
|
SYSTEM("1", "系统数据总览"), |
||||||
|
/** |
||||||
|
* 行业 |
||||||
|
*/ |
||||||
|
INDUSTRY("2", "行业数据总览"), |
||||||
|
STATION("3", "站点数据总览"), |
||||||
|
TOW("4", "两站数据总览"), |
||||||
|
ONE("5", "单站数据总览"); |
||||||
|
private final String val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
FirstPageTypeEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 行业站点类型 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
public enum BusinessStationTypeEnum { |
||||||
|
/** |
||||||
|
* 行业 |
||||||
|
*/ |
||||||
|
BUSINESS("1", "行业"), |
||||||
|
/** |
||||||
|
* 多种行业分类 |
||||||
|
*/ |
||||||
|
MULTPLE_SITE_CATEGORIES("2", "多种行业分类"), |
||||||
|
/** |
||||||
|
* 单个站点分类 |
||||||
|
*/ |
||||||
|
SINGLE_STATION_TYPE("3", "单个站点分类"); |
||||||
|
private final String val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
BusinessStationTypeEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
@Getter |
||||||
|
public enum DutyLogLevel { |
||||||
|
/** |
||||||
|
* 水电站 |
||||||
|
*/ |
||||||
|
importLevel("1", "重要"), |
||||||
|
/** |
||||||
|
* 风电 |
||||||
|
*/ |
||||||
|
generalLevel("2", "一般"), |
||||||
|
ordinaryLevel("3", "普通"); |
||||||
|
/** |
||||||
|
* 泵站 |
||||||
|
*/ |
||||||
|
private final String val; |
||||||
|
@Getter |
||||||
|
private final String name; |
||||||
|
|
||||||
|
DutyLogLevel(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,372 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.constants; |
||||||
|
|
||||||
|
import lombok.Getter; |
||||||
|
|
||||||
|
public class OperationalConstants { |
||||||
|
/** |
||||||
|
* 交接班类型 |
||||||
|
*/ |
||||||
|
public enum DutyRecTypeEnum { |
||||||
|
/** |
||||||
|
* 交班 |
||||||
|
*/ |
||||||
|
HAND_REC(1, "交班"), |
||||||
|
/** |
||||||
|
* 接班 |
||||||
|
*/ |
||||||
|
CARRY_REC(2, "接班"); |
||||||
|
|
||||||
|
@Getter |
||||||
|
private int val; |
||||||
|
@Getter |
||||||
|
private String name; |
||||||
|
|
||||||
|
private DutyRecTypeEnum(int val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 交接班类型 |
||||||
|
*/ |
||||||
|
public enum MessageRecTypeEnum { |
||||||
|
/** |
||||||
|
* 提前 15 分钟 提醒交班 |
||||||
|
*/ |
||||||
|
HAND_REC_MESSAGE(15, "提前交班提醒"), |
||||||
|
/** |
||||||
|
* 接班巡视时间 |
||||||
|
*/ |
||||||
|
CARRY_REC_MESSAGE(30, "接班巡视时间"), |
||||||
|
|
||||||
|
DELAYED_HAND_REC_MESSAGE(1, "延时交班提醒"), |
||||||
|
//最迟延迟交班提醒
|
||||||
|
DELAYED_HAND_REC_MESSAGE_LAST(15, "延时交班提醒"); |
||||||
|
@Getter |
||||||
|
private int val; |
||||||
|
@Getter |
||||||
|
private String name; |
||||||
|
|
||||||
|
private MessageRecTypeEnum(int val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 消息业务分类 |
||||||
|
*/ |
||||||
|
public enum MessageClassifyEnum { |
||||||
|
/** |
||||||
|
* 系统通知 |
||||||
|
*/ |
||||||
|
MESSAGE_SYSTEM("system", "系统通知"), |
||||||
|
/** |
||||||
|
* 事务消息 |
||||||
|
*/ |
||||||
|
MESSAGE_CLASSIFY("business", "事务消息"), |
||||||
|
/** |
||||||
|
* 日常提醒 |
||||||
|
*/ |
||||||
|
MESSAGE_REMINDSY("remindsy", "日常提醒"), |
||||||
|
/** |
||||||
|
* 巡检消息 |
||||||
|
*/ |
||||||
|
MESSAGE_INSPECT("inspect", "巡检消息"), |
||||||
|
/** |
||||||
|
* 无 |
||||||
|
*/ |
||||||
|
MESSAGE_CNONE("none", "无"); |
||||||
|
|
||||||
|
@Getter |
||||||
|
private String val; |
||||||
|
@Getter |
||||||
|
private String name; |
||||||
|
|
||||||
|
private MessageClassifyEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 交接班类型 |
||||||
|
*/ |
||||||
|
public enum RecTypeEnum { |
||||||
|
/** |
||||||
|
* 交班提醒 |
||||||
|
*/ |
||||||
|
HAND_REMIND(1, "交班提醒"), |
||||||
|
/** |
||||||
|
* 交班延迟 |
||||||
|
*/ |
||||||
|
HAND_DELAY(2, "交班延迟-提醒接班人"), |
||||||
|
/** |
||||||
|
* 提醒交班人交班 |
||||||
|
*/ |
||||||
|
REMIND_HAND_PERSON(3, "提醒交班人交班"); |
||||||
|
|
||||||
|
@Getter |
||||||
|
private int val; |
||||||
|
@Getter |
||||||
|
private String name; |
||||||
|
|
||||||
|
private RecTypeEnum(int val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 工作流状态 |
||||||
|
*/ |
||||||
|
public enum ProcessStatusEnum { |
||||||
|
/** |
||||||
|
* 默认 |
||||||
|
*/ |
||||||
|
DEFAULT_PROCESS_STATUS(0, "默认"), |
||||||
|
/** |
||||||
|
* 交班延迟 |
||||||
|
*/ |
||||||
|
BACKLOG_PROCESS_STATUS(1, "待办"), |
||||||
|
/** |
||||||
|
* 提醒交班人交班 |
||||||
|
*/ |
||||||
|
COMPLETED_PROCESS_STATUS(2, "已完成"); |
||||||
|
@Getter |
||||||
|
private int val; |
||||||
|
@Getter |
||||||
|
private String name; |
||||||
|
|
||||||
|
private ProcessStatusEnum(int val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 数据类型 |
||||||
|
*/ |
||||||
|
public enum UserDataScopeTypeEnum { |
||||||
|
/** |
||||||
|
* 只看自己 |
||||||
|
*/ |
||||||
|
SELT_VISIBLE("0", "只看自己"), |
||||||
|
/** |
||||||
|
* 所属机构 |
||||||
|
*/ |
||||||
|
EMPLOYER_VISIBLE("1", "所属机构"), |
||||||
|
/** |
||||||
|
* 所属机构及下属机构 |
||||||
|
*/ |
||||||
|
EMPLOYER_SUBORDINATE_BODY("2", "所属机构及下属机构"), |
||||||
|
/** |
||||||
|
* 所在机构可见 |
||||||
|
*/ |
||||||
|
AFFILIATE("3", "附属机构"), |
||||||
|
/** |
||||||
|
* 所在机构及子级可见 |
||||||
|
*/ |
||||||
|
AFFILIATE_SUBORDINATE_BODY("4", "附属机构及下属"), |
||||||
|
/** |
||||||
|
* 全部可见 |
||||||
|
*/ |
||||||
|
SELT_SUBORDINATE_BODY("5", "个人及下属机构"); |
||||||
|
@Getter |
||||||
|
private String val; |
||||||
|
@Getter |
||||||
|
private String name; |
||||||
|
|
||||||
|
private UserDataScopeTypeEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 站点类型 |
||||||
|
*/ |
||||||
|
public enum StationTypeEnum { |
||||||
|
/** |
||||||
|
* 水电站 |
||||||
|
*/ |
||||||
|
HYDROPOWER_STATION("1", "水电站"), |
||||||
|
/** |
||||||
|
* 风电 |
||||||
|
*/ |
||||||
|
WIND_POWER_STATION("2", "风电"), |
||||||
|
/** |
||||||
|
* 光伏 |
||||||
|
*/ |
||||||
|
PHOTOVOLTAIC_STATION("3", "光伏"), |
||||||
|
/** |
||||||
|
* 泵站 |
||||||
|
*/ |
||||||
|
PUMP_STATION_STATION("4", "泵站"), |
||||||
|
/** |
||||||
|
* 水厂 |
||||||
|
*/ |
||||||
|
WATER_WORKS_STATION("5", "水厂"), |
||||||
|
/** |
||||||
|
* 闸门 |
||||||
|
*/ |
||||||
|
GATE_STATION("6", "闸门"); |
||||||
|
@Getter |
||||||
|
private String val; |
||||||
|
@Getter |
||||||
|
private String name; |
||||||
|
|
||||||
|
private StationTypeEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 所属行业 |
||||||
|
*/ |
||||||
|
public enum TradeEnum { |
||||||
|
/** |
||||||
|
* 水电站 |
||||||
|
*/ |
||||||
|
POWER_INDUSTRY("1", "电力行业"), |
||||||
|
/** |
||||||
|
* 风电 |
||||||
|
*/ |
||||||
|
WATER_AFFAIRS_INDUSTRY("2", "水务行业"); |
||||||
|
@Getter |
||||||
|
private String val; |
||||||
|
@Getter |
||||||
|
private String name; |
||||||
|
|
||||||
|
private TradeEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 站点类型 |
||||||
|
*/ |
||||||
|
public enum StationQuantityEnum { |
||||||
|
/** |
||||||
|
* 水电站 |
||||||
|
*/ |
||||||
|
ONE("1", "一"), |
||||||
|
/** |
||||||
|
* 风电 |
||||||
|
*/ |
||||||
|
TOW("2", "二"), |
||||||
|
/** |
||||||
|
* 光伏 |
||||||
|
*/ |
||||||
|
MORE("3", "多"), |
||||||
|
/** |
||||||
|
* 泵站 |
||||||
|
*/ |
||||||
|
WHOLE("4", "整"); |
||||||
|
@Getter |
||||||
|
private String val; |
||||||
|
@Getter |
||||||
|
private String name; |
||||||
|
|
||||||
|
private StationQuantityEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 行业类型 |
||||||
|
*/ |
||||||
|
public enum InDustryEnum { |
||||||
|
/** |
||||||
|
* 系统 |
||||||
|
*/ |
||||||
|
SYSTEM("1", "系统"), |
||||||
|
/** |
||||||
|
* 行业 |
||||||
|
*/ |
||||||
|
INDUSTRY("2", "行业"), |
||||||
|
/** |
||||||
|
* 多种站点类型 |
||||||
|
*/ |
||||||
|
MORE_STATION_TYPE("3", "多种站点类型"), |
||||||
|
/** |
||||||
|
* 单个站点类型 |
||||||
|
*/ |
||||||
|
SINGLE_STATION_TYPE("4", "单个站点类型"); |
||||||
|
@Getter |
||||||
|
private String val; |
||||||
|
@Getter |
||||||
|
private String name; |
||||||
|
|
||||||
|
private InDustryEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 首页分类 |
||||||
|
*/ |
||||||
|
public enum FirstPageTypeEnum { |
||||||
|
/** |
||||||
|
* 系统 |
||||||
|
*/ |
||||||
|
SYSTEM("1", "系统数据总览"), |
||||||
|
/** |
||||||
|
* 行业 |
||||||
|
*/ |
||||||
|
INDUSTRY("2", "行业数据总览"), |
||||||
|
STATION("3", "站点数据总览"), |
||||||
|
TOW("4", "两站数据总览"), |
||||||
|
ONE("5", "单站数据总览"); |
||||||
|
@Getter |
||||||
|
private String val; |
||||||
|
@Getter |
||||||
|
private String name; |
||||||
|
|
||||||
|
private FirstPageTypeEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 行业站点类型 |
||||||
|
*/ |
||||||
|
public enum BusinessStationTypeEnum { |
||||||
|
/** |
||||||
|
* 行业 |
||||||
|
*/ |
||||||
|
BUSINESS("1", "行业"), |
||||||
|
/** |
||||||
|
* 多种行业分类 |
||||||
|
*/ |
||||||
|
MULTPLE_SITE_CATEGORIES("2", "多种行业分类"), |
||||||
|
/** |
||||||
|
* 单个站点分类 |
||||||
|
*/ |
||||||
|
SINGLE_STATION_TYPE("3", "单个站点分类"); |
||||||
|
@Getter |
||||||
|
private String val; |
||||||
|
@Getter |
||||||
|
private String name; |
||||||
|
|
||||||
|
private BusinessStationTypeEnum(String val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,37 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.dto; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
|
||||||
|
|
||||||
|
@Data |
||||||
|
public class ChangeShiftsReqDTO implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
@DateTimeFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@JsonFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@ApiModelProperty("查询开始时间") |
||||||
|
private String startTime; |
||||||
|
|
||||||
|
|
||||||
|
@DateTimeFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@JsonFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@ApiModelProperty("查询结束时间") |
||||||
|
private String endTime; |
||||||
|
|
||||||
|
@ApiModelProperty("创建部门") |
||||||
|
private Long createDept; |
||||||
|
} |
||||||
@ -0,0 +1,19 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.dto; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
|
||||||
|
|
||||||
|
@Data |
||||||
|
public class ChangeShiftsRspDTO implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "交接班次数") |
||||||
|
private int shiftsCount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "交接班正常率") |
||||||
|
private double shiftsRate; |
||||||
|
} |
||||||
@ -0,0 +1,20 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.dto; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyChangeEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型DTO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class ImsDutyChangeDTO extends ImsDutyChangeEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 510101758136L; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,18 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.dto; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyClassEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型DTO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class ImsDutyClassDTO extends ImsDutyClassEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,18 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.dto; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyClassTypeEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型DTO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class ImsDutyClassTypeDTO extends ImsDutyClassTypeEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,17 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.dto; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型DTO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class ImsDutyGroupDTO extends ImsDutyGroupEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
} |
||||||
@ -0,0 +1,18 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.dto; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupPEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型DTO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class ImsDutyGroupPDTO extends ImsDutyGroupPEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,18 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.dto; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型DTO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class ImsDutyMainDTO extends ImsDutyMainEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,44 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.dto; |
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyRecEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsSchedulingVo; |
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型DTO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class ImsDutyRecDTO extends ImsDutyRecEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "巡检路线数据") |
||||||
|
@NotNull |
||||||
|
private String routeData; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "巡检路线ID字段") |
||||||
|
@NotNull |
||||||
|
private Long routeId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "路线名称") |
||||||
|
@NotNull |
||||||
|
private String routeName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "交班对象值班信息") |
||||||
|
private ImsSchedulingVo headDutyMainVo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 接班对象值班信息 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "接班对象值班信息") |
||||||
|
private ImsSchedulingVo carryDutyMainVo; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,73 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill; |
||||||
|
import com.baomidou.mybatisplus.annotation.SqlCondition; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
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 org.springblade.core.mp.support.QueryField; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author ty |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_analyse_example") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "AnalyseExample对象", description = "分析实例配置类") |
||||||
|
public class AnalyseExample extends BaseEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 4259568798118459986L; |
||||||
|
/** |
||||||
|
* 配置ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "配置ID") |
||||||
|
private Long id; |
||||||
|
/** |
||||||
|
* 站点ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "站点ID") |
||||||
|
private Long siteId; |
||||||
|
/** |
||||||
|
* 站点名称 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "站点名称") |
||||||
|
private String siteName; |
||||||
|
/** |
||||||
|
* 设备ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "设备ID") |
||||||
|
private String equipmentId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备名称 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "设备名称") |
||||||
|
private String equipmentName; |
||||||
|
/** |
||||||
|
* 分析实例ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "分析实例ID") |
||||||
|
private String deviceCode; |
||||||
|
/** |
||||||
|
* 分析实例名称 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "分析实例名称") |
||||||
|
private String analyseName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 属性ID |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "属性ID") |
||||||
|
private String propertyIds; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
} |
||||||
@ -0,0 +1,71 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.sql.Time; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 班组发电量 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lx |
||||||
|
* @since 2022-02-24 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = false) |
||||||
|
@Accessors(chain = true) |
||||||
|
@TableName("hzims_duty_group_generating_capacity") |
||||||
|
@ApiModel(value = "DutyGroupGeneratingCapacityEntity对象", description = "班组发电量") |
||||||
|
public class DutyGroupGeneratingCapacityEntity extends BaseEntity implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "站点ID") |
||||||
|
@TableField("DUTY_DEPT") |
||||||
|
private Long dutyDept; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "年月") |
||||||
|
@TableField("DATE_TIME") |
||||||
|
private String dateTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组ID") |
||||||
|
@TableField("GROUP_ID") |
||||||
|
private Long groupId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "设备Code") |
||||||
|
@TableField("EM_CODE") |
||||||
|
private String emCode; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "开始时间") |
||||||
|
@TableField("START_TIME") |
||||||
|
private Time startTime; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "开始时间") |
||||||
|
@TableField("END_TIME") |
||||||
|
private Time endTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "发电量") |
||||||
|
@TableField("GENERATING_CAPACITY") |
||||||
|
private float generatingCapacity; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
} |
||||||
@ -0,0 +1,102 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_change") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyChange对象", description = "调班") |
||||||
|
public class ImsDutyChangeEntity extends BaseEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 510101758137L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 班次ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "班次ID") |
||||||
|
private Long classId; |
||||||
|
/** |
||||||
|
* 调班申请人 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "调班申请人") |
||||||
|
private Long applyPersonId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 申请人值班日期 |
||||||
|
*/ |
||||||
|
@DateTimeFormat( |
||||||
|
pattern = "yyyy-MM-dd" |
||||||
|
) |
||||||
|
@JsonFormat( |
||||||
|
pattern = "yyyy-MM-dd" |
||||||
|
) |
||||||
|
@ApiModelProperty(value = "申请人值班日期") |
||||||
|
private Date applyDate; |
||||||
|
/** |
||||||
|
* 申请人值班ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "申请人值班ID") |
||||||
|
private Long applyDutyId; |
||||||
|
/** |
||||||
|
* 调班人 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "调班人") |
||||||
|
private Long acceptPersonId; |
||||||
|
/** |
||||||
|
* 调班人值班日期 |
||||||
|
*/ |
||||||
|
@DateTimeFormat( |
||||||
|
pattern = "yyyy-MM-dd" |
||||||
|
) |
||||||
|
@JsonFormat( |
||||||
|
pattern = "yyyy-MM-dd" |
||||||
|
) |
||||||
|
@ApiModelProperty(value = "调班人值班日期") |
||||||
|
private Date acceptDate; |
||||||
|
/** |
||||||
|
* 调班人值班ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "调班人值班ID") |
||||||
|
private Long acceptDutyId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 流程定义Key |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "流程定义Key") |
||||||
|
private String processDefinitionKey; |
||||||
|
/** |
||||||
|
* 流程实例id |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "流程实例id") |
||||||
|
private String processInstanceId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 审批主管 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "审批主管") |
||||||
|
private Long manager; |
||||||
|
|
||||||
|
/** |
||||||
|
* 调班原因 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "调班原因") |
||||||
|
private String reason; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
} |
||||||
@ -0,0 +1,59 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.SqlCondition; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springblade.core.mp.support.QueryField; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.sql.Time; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_class") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyClass对象", description = "班次对象") |
||||||
|
public class ImsDutyClassEntity extends BaseEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = -4931752208756882575L; |
||||||
|
/** |
||||||
|
* 班次类型ID |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.EQUAL) |
||||||
|
@ApiModelProperty(value = "班次类型ID") |
||||||
|
private Long classTypeId; |
||||||
|
/** |
||||||
|
* 班次名称 |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
/** |
||||||
|
* 开始时间 |
||||||
|
*/ |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "开始时间") |
||||||
|
private Time startTime; |
||||||
|
/** |
||||||
|
* 结束时间 |
||||||
|
*/ |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "结束时间 ") |
||||||
|
private Time endTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
} |
||||||
@ -0,0 +1,39 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.SqlCondition; |
||||||
|
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 org.springblade.core.mp.support.QueryField; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_class_type") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyClassType对象", description = "班次类型对象") |
||||||
|
public class ImsDutyClassTypeEntity extends BaseEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = -7651345964875923367L; |
||||||
|
/** |
||||||
|
* 部门ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "部门ID") |
||||||
|
private Long deptId; |
||||||
|
/** |
||||||
|
* 班次类型名称 |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "班次类型名称") |
||||||
|
private String classTypeName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
} |
||||||
@ -0,0 +1,108 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.SqlCondition; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springblade.core.mp.support.QueryField; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author ty |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_emergency") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyEmergency对象", description = "突发事件登记") |
||||||
|
public class ImsDutyEmergencyEntity extends BaseEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 4259568798118459986L; |
||||||
|
/** |
||||||
|
* 值班日期 |
||||||
|
*/ |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@ApiModelProperty(value = "值班日期") |
||||||
|
private Date dutyTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 班次 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "班次") |
||||||
|
private Long dutyClass; |
||||||
|
|
||||||
|
/** |
||||||
|
* 班次 |
||||||
|
*/ |
||||||
|
@TableField(exist=false) |
||||||
|
@ApiModelProperty(value = "班次") |
||||||
|
private String dutyClassName; |
||||||
|
/** |
||||||
|
* 登记人 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "登记人") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long registrant; |
||||||
|
/** |
||||||
|
* 登记人姓名 |
||||||
|
*/ |
||||||
|
@TableField(exist=false) |
||||||
|
@ApiModelProperty(value = "登记人") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private String registrantName; |
||||||
|
/** |
||||||
|
* 值班长 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班长") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long chargePerson; |
||||||
|
/** |
||||||
|
* 值班长 |
||||||
|
*/ |
||||||
|
@TableField(exist=false) |
||||||
|
@ApiModelProperty(value = "值班长") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private String chargePersonName; |
||||||
|
/** |
||||||
|
* 登记时间 |
||||||
|
*/ |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@ApiModelProperty(value = "登记时间") |
||||||
|
private Date registerTime; |
||||||
|
/** |
||||||
|
* 事件主题 |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "事件主题") |
||||||
|
private String eventTitle; |
||||||
|
/** |
||||||
|
* 事件内容 |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "事件内容") |
||||||
|
private String eventInfo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 事件方式 |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "事件方式") |
||||||
|
private String eventType; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
} |
||||||
@ -0,0 +1,45 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.SqlCondition; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springblade.core.mp.support.QueryField; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_group") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyGroup对象", description = "值班小组对象") |
||||||
|
public class ImsDutyGroupEntity extends BaseEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 3903980057558810987L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 班组名称 |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "班组名称") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 负责人ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "负责人ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long managerId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,52 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_group_p") |
||||||
|
@ApiModel(value = "ImsDutyGroupP对象", description = "值班小组成员关联对象") |
||||||
|
public class ImsDutyGroupPEntity implements Serializable{ |
||||||
|
|
||||||
|
private static final long serialVersionUID = -2877981299088576156L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 主键ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "主键ID") |
||||||
|
private Long id; |
||||||
|
/** |
||||||
|
* 租户ID |
||||||
|
*/ |
||||||
|
private String tenantId; |
||||||
|
/** |
||||||
|
* 班组ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "班组ID") |
||||||
|
private Long groupId; |
||||||
|
/** |
||||||
|
* 值班人员ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班人员ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long personId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建部门 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "创建部门") |
||||||
|
private String createDept; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,106 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.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.io.Serializable; |
||||||
|
|
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_log") |
||||||
|
@ApiModel(value = "ImsDutyLog对象", description = "值班日志") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class ImsDutyLogEntity extends BaseEntity implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = -2877981299088576156L; |
||||||
|
/** |
||||||
|
* 值班ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班ID") |
||||||
|
private Long dutyId; |
||||||
|
/** |
||||||
|
* 日期 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "日期") |
||||||
|
private String time; |
||||||
|
/** |
||||||
|
* 值班时间 |
||||||
|
*/ |
||||||
|
private String dutyTime; |
||||||
|
/** |
||||||
|
* 班类 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "班类") |
||||||
|
private String classType; |
||||||
|
/** |
||||||
|
* 已执行操作票 |
||||||
|
*/ |
||||||
|
private String operationFinish="0"; |
||||||
|
/** |
||||||
|
* 未执行操作票 |
||||||
|
*/ |
||||||
|
private String operationUnFinish="0"; |
||||||
|
/** |
||||||
|
* 作废操作票 |
||||||
|
*/ |
||||||
|
private String operationCancel="0"; |
||||||
|
/** |
||||||
|
* 执行中工作票 |
||||||
|
*/ |
||||||
|
private String workDoing="0"; |
||||||
|
/** |
||||||
|
* 未执行工作票 |
||||||
|
*/ |
||||||
|
private String workUnFinish="0"; |
||||||
|
/** |
||||||
|
* 终结工作票 |
||||||
|
*/ |
||||||
|
private String workFinish="0"; |
||||||
|
/** |
||||||
|
* 作废工作票 |
||||||
|
*/ |
||||||
|
private String workCancel="0"; |
||||||
|
/** |
||||||
|
* 交班值班长 |
||||||
|
*/ |
||||||
|
private String handMaster; |
||||||
|
/** |
||||||
|
* 交班值班员 |
||||||
|
*/ |
||||||
|
private String handNumber; |
||||||
|
/** |
||||||
|
* 交班时间 |
||||||
|
*/ |
||||||
|
private String handTime; |
||||||
|
/** |
||||||
|
* 接班值班长 |
||||||
|
*/ |
||||||
|
private String carryMaster; |
||||||
|
/** |
||||||
|
* 接班值班员 |
||||||
|
*/ |
||||||
|
private String carryNumber; |
||||||
|
/** |
||||||
|
* 接班时间 |
||||||
|
*/ |
||||||
|
private String carryTime; |
||||||
|
/** |
||||||
|
* 交接班会照片 |
||||||
|
*/ |
||||||
|
private String dutyPic; |
||||||
|
/** |
||||||
|
* 值班情况 |
||||||
|
*/ |
||||||
|
private String dutyStatus; |
||||||
|
/** |
||||||
|
* 上级通知及注意事项 |
||||||
|
*/ |
||||||
|
private String notice; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
} |
||||||
|
|
||||||
@ -0,0 +1,77 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_main") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyMain对象", description = "值班-班组信息") |
||||||
|
public class ImsDutyMainEntity extends BaseEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = -1913292438493450113L; |
||||||
|
/** |
||||||
|
* 主键ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "排班计划id") |
||||||
|
private Long id; |
||||||
|
/** |
||||||
|
* 值班组id |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班组id") |
||||||
|
private Long dutyGroupId; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 值班人IDS, ID之间用^隔开 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班人IDS, ID之间用^隔开") |
||||||
|
private String dutyPersonIds; |
||||||
|
/** |
||||||
|
* 值班日期 |
||||||
|
*/ |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@ApiModelProperty(value = "值班日期") |
||||||
|
private Date dutyDate; |
||||||
|
/** |
||||||
|
* 班次ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "班次ID") |
||||||
|
private Long classId; |
||||||
|
/** |
||||||
|
* 班次名称 |
||||||
|
*/ |
||||||
|
@TableField(exist=false) |
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
/** |
||||||
|
* 上一班值班ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "上一班值班ID") |
||||||
|
private Long preDutyId; |
||||||
|
/** |
||||||
|
* 备注 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "备注") |
||||||
|
private String remark; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
} |
||||||
@ -0,0 +1,77 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author TY |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_main_person") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyMainPerson对象", description = "值班-人员信息") |
||||||
|
public class ImsDutyMainPersonEntity extends BaseEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = -1913292438493450113L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 值班组id |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班组id") |
||||||
|
private Long dutyGroupId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 值班人ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班人ID") |
||||||
|
private Long dutyPerson; |
||||||
|
/** |
||||||
|
* 值班负责人ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班负责人ID") |
||||||
|
private Long dutyChargePerson; |
||||||
|
/** |
||||||
|
* 值班日期 |
||||||
|
*/ |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@ApiModelProperty(value = "值班日期") |
||||||
|
private Date dutyDate; |
||||||
|
|
||||||
|
/** |
||||||
|
* 班次ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "班次ID") |
||||||
|
private Long classId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 值班班组名称 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班班组名称") |
||||||
|
private String dutyGroupName; |
||||||
|
/** |
||||||
|
* 值班-班组ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班-班组ID") |
||||||
|
private Long dutyMainId; |
||||||
|
/** |
||||||
|
* 备注 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "备注") |
||||||
|
private String remark; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
} |
||||||
@ -0,0 +1,33 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.entity; |
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author tanghaihao |
||||||
|
* @date 2023年06月09日 10:56 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class ImsDutyMainReportExcel { |
||||||
|
@ExcelProperty(value = "排班日期", index = 0) |
||||||
|
@ColumnWidth(value = 20) |
||||||
|
@ApiModelProperty(value = "排班日期") |
||||||
|
private String dutyDate; |
||||||
|
|
||||||
|
@ExcelProperty(value = "班次", index = 1) |
||||||
|
@ColumnWidth(value = 30) |
||||||
|
@ApiModelProperty(value = "班次") |
||||||
|
private String className; |
||||||
|
|
||||||
|
@ExcelProperty(value = "班组长", index = 2) |
||||||
|
@ColumnWidth(value = 20) |
||||||
|
@ApiModelProperty(value = "班组长") |
||||||
|
private String managerName; |
||||||
|
|
||||||
|
@ExcelProperty(value = "组员", index = 3) |
||||||
|
@ColumnWidth(value = 100) |
||||||
|
@ApiModelProperty(value = "组员") |
||||||
|
private String personNames; |
||||||
|
} |
||||||
@ -0,0 +1,39 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.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; |
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_main_template") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyMainTemplate对象", description = "排班模版") |
||||||
|
public class ImsDutyMainTemplateEntity extends BaseEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 4259568798118459986L; |
||||||
|
|
||||||
|
@ApiModelProperty("排班模版名称") |
||||||
|
private String templateName; |
||||||
|
@ApiModelProperty("班组值班周期id") |
||||||
|
private String dutyOrderIds; |
||||||
|
@ApiModelProperty("班组ID") |
||||||
|
private String dutyArrIds; |
||||||
|
@ApiModelProperty("值班周期的天数") |
||||||
|
private Integer dutyNum; |
||||||
|
@ApiModelProperty("班次类型ID") |
||||||
|
private Long dutyClassTypeId; |
||||||
|
@ApiModelProperty("灵活排班人员IDs") |
||||||
|
private String flexible; |
||||||
|
@ApiModelProperty("排班类型")//1:班组,2:灵活排班
|
||||||
|
private Integer type; |
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
} |
||||||
@ -0,0 +1,112 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.SqlCondition; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springblade.core.mp.support.QueryField; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_rec") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyRec对象", description = "交接班记录对象") |
||||||
|
public class ImsDutyRecEntity extends BaseEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 4259568798118459986L; |
||||||
|
/** |
||||||
|
* 值班ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班ID") |
||||||
|
private Long dutyId; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 交班时间 |
||||||
|
*/ |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@ApiModelProperty(value = "交班时间") |
||||||
|
private Date execTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 接班时间 |
||||||
|
*/ |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@ApiModelProperty(value = "接班时间") |
||||||
|
private Date acceptTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 交班情况 |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "交班情况") |
||||||
|
private String dutyInfo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 遗留问题 |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "遗留问题") |
||||||
|
private String leftProblem; |
||||||
|
|
||||||
|
/** |
||||||
|
* 接班情况 |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "接班情况") |
||||||
|
private String acceptInfo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 交接班流程实例ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "交接班流程实例ID") |
||||||
|
private String processInstanceId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 巡检任务ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "巡检任务ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long inspectTaskId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 二维码内容 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "二维码内容") |
||||||
|
private String qrCodeContent; |
||||||
|
|
||||||
|
/** |
||||||
|
* 二维码内容 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "延时状态 0 、未延时 1、延时") |
||||||
|
private Integer delayStatus; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当前处理环节") |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
private String dealChain; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "值班日志") |
||||||
|
@TableField(exist=false) |
||||||
|
private ImsDutyLogEntity imsDutyLogEntity; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
} |
||||||
@ -0,0 +1,36 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.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; |
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("hz_ims_duty_rec_qr_record") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyRecQRRecord对象", description = "交接班扫码记录对象") |
||||||
|
public class ImsDutyRecQRRecordEntity extends BaseEntity { |
||||||
|
private static final long serialVersionUID = 4259568798118459986L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 值班ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班ID") |
||||||
|
private Long dutyId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 人员ID |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "人员ID") |
||||||
|
private Long personId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户ID") |
||||||
|
private String tenantId; |
||||||
|
} |
||||||
@ -0,0 +1,48 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.enums; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author: py |
||||||
|
* 交接班状态值 |
||||||
|
*/ |
||||||
|
public enum DutyMainStatus { |
||||||
|
UMSUBMIT(0,"待值班"),EXEC(1,"值班中"),ACCEPT(2,"已完成"),NOWORK(3,"未值班"); |
||||||
|
private Integer val; |
||||||
|
private String name; |
||||||
|
|
||||||
|
DutyMainStatus(Integer val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
|
||||||
|
public Integer getVal() { |
||||||
|
return val; |
||||||
|
} |
||||||
|
|
||||||
|
public void setVal(Integer val) { |
||||||
|
this.val = val; |
||||||
|
} |
||||||
|
|
||||||
|
public String getName() { |
||||||
|
return name; |
||||||
|
} |
||||||
|
|
||||||
|
public void setName(String name) { |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据值获取枚举 |
||||||
|
* @param value |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static DutyMainStatus getDutyStatus(Integer value){ |
||||||
|
for (DutyMainStatus status: DutyMainStatus.values()) { |
||||||
|
if(status.getVal().equals(value)){ |
||||||
|
return status; |
||||||
|
} |
||||||
|
} |
||||||
|
return UMSUBMIT; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,48 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.enums; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author: py |
||||||
|
* 交接班状态值 |
||||||
|
*/ |
||||||
|
public enum DutyRecStatus { |
||||||
|
UMSUBMIT(1,"未提交"),EXEC(2,"流程处理中"),ACCEPT(3,"已完成"),ANOMALY(4,"异常交接班"); |
||||||
|
private Integer val; |
||||||
|
private String name; |
||||||
|
|
||||||
|
DutyRecStatus(Integer val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
|
||||||
|
public Integer getVal() { |
||||||
|
return val; |
||||||
|
} |
||||||
|
|
||||||
|
public void setVal(Integer val) { |
||||||
|
this.val = val; |
||||||
|
} |
||||||
|
|
||||||
|
public String getName() { |
||||||
|
return name; |
||||||
|
} |
||||||
|
|
||||||
|
public void setName(String name) { |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据值获取枚举 |
||||||
|
* @param value |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static DutyRecStatus getDutyStatus(Integer value){ |
||||||
|
for (DutyRecStatus status: DutyRecStatus.values()) { |
||||||
|
if(status.getVal().equals(value)){ |
||||||
|
return status; |
||||||
|
} |
||||||
|
} |
||||||
|
return UMSUBMIT; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,48 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.enums; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author: py |
||||||
|
* 调班状态值 |
||||||
|
*/ |
||||||
|
public enum DutyStatus { |
||||||
|
UMSUBMIT(1,"未提交"),CHANGE(2,"调班人审批"),BEIN(3,"主管审批"),FINISH(4,"已完成"),NOTPASS(5,"驳回"),CLOSED(6,"已关闭"); |
||||||
|
private Integer val; |
||||||
|
private String name; |
||||||
|
|
||||||
|
DutyStatus(Integer val, String name) { |
||||||
|
this.val = val; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
|
||||||
|
public Integer getVal() { |
||||||
|
return val; |
||||||
|
} |
||||||
|
|
||||||
|
public void setVal(Integer val) { |
||||||
|
this.val = val; |
||||||
|
} |
||||||
|
|
||||||
|
public String getName() { |
||||||
|
return name; |
||||||
|
} |
||||||
|
|
||||||
|
public void setName(String name) { |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据值获取枚举 |
||||||
|
* @param value |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static DutyStatus getDutyStatus(Integer value){ |
||||||
|
for (DutyStatus status:DutyStatus.values()) { |
||||||
|
if(status.getVal().equals(value)){ |
||||||
|
return status; |
||||||
|
} |
||||||
|
} |
||||||
|
return UMSUBMIT; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,30 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.enums; |
||||||
|
/** |
||||||
|
* 交接班状态 |
||||||
|
*/ |
||||||
|
public enum JoinStatus { |
||||||
|
DUTY_WAIT(0, "待值班"), DUTY_ING(1, "值班中"),DUTY_FINISH(2, "已完成"); |
||||||
|
private int status; |
||||||
|
private String name; |
||||||
|
|
||||||
|
public int getStatus() { |
||||||
|
return status; |
||||||
|
} |
||||||
|
|
||||||
|
public void setStatus(int status) { |
||||||
|
this.status = status; |
||||||
|
} |
||||||
|
|
||||||
|
public String getName() { |
||||||
|
return name; |
||||||
|
} |
||||||
|
|
||||||
|
public void setName(String name) { |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
|
||||||
|
JoinStatus(int status, String name){ |
||||||
|
this.status = status; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,30 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.enums; |
||||||
|
|
||||||
|
/** |
||||||
|
* 交接班类型 |
||||||
|
*/ |
||||||
|
public enum JoinType { |
||||||
|
OVER(1, "交班待提交"), START(2, "接班待确认"),FINISH(3,"已完成"),REJECT(4,"已驳回"),; |
||||||
|
private int type; |
||||||
|
private String name; |
||||||
|
|
||||||
|
public int getType() { |
||||||
|
return type; |
||||||
|
} |
||||||
|
|
||||||
|
public void setType(int type) { |
||||||
|
this.type = type; |
||||||
|
} |
||||||
|
|
||||||
|
public String getName() { |
||||||
|
return name; |
||||||
|
} |
||||||
|
|
||||||
|
public void setName(String name) { |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
JoinType(int type, String name) { |
||||||
|
this.type = type; |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,60 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.feign; |
||||||
|
|
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.*; |
||||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@FeignClient( |
||||||
|
value = "hzwp-opt" |
||||||
|
) |
||||||
|
public interface IDutyClient { |
||||||
|
String API_PREFIX = "/feign/dutyClient"; |
||||||
|
String engineerDuty = API_PREFIX + "/engineerDuty"; |
||||||
|
String ENGINEER_RELATIONSHIP_TEAM = API_PREFIX + "/relationshipTeam"; |
||||||
|
String ENGINEER_HANDOVER = API_PREFIX + "/handover"; |
||||||
|
|
||||||
|
@GetMapping(engineerDuty) |
||||||
|
EngineerDutyVo engineerDuty(@RequestParam("deptId") Long deptId); |
||||||
|
|
||||||
|
/** |
||||||
|
* 工程运行-上一班组、下一班组 |
||||||
|
* |
||||||
|
* @param dutyId |
||||||
|
* @param isQueryFlag |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@GetMapping(ENGINEER_RELATIONSHIP_TEAM) |
||||||
|
RelationshipTeamVo relationshipTeam(@RequestParam("dutyId") Long dutyId, @RequestParam("isQueryFlag") Long isQueryFlag); |
||||||
|
|
||||||
|
/** |
||||||
|
* 工程运行-交班记录 |
||||||
|
* |
||||||
|
* @param dutyId |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@GetMapping(ENGINEER_HANDOVER) |
||||||
|
ImsDutyRecVO handover(@RequestParam("dutyId") Long dutyId); |
||||||
|
|
||||||
|
/** |
||||||
|
* 交班记录列表 |
||||||
|
* |
||||||
|
* @param startTime 开始时间 |
||||||
|
* @param endTime 结束时间 |
||||||
|
* @return 列表 |
||||||
|
*/ |
||||||
|
@GetMapping(API_PREFIX + "/dutyRecordList") |
||||||
|
List<DutyShiftRecord> dutyRecordList(@RequestParam(value = "startTime", required = false) String startTime, @RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "limit", required = false) Integer limit); |
||||||
|
|
||||||
|
/** |
||||||
|
* 交班记录列表 |
||||||
|
* |
||||||
|
* @param startTime 开始时间 |
||||||
|
* @param endTime 结束时间 |
||||||
|
* @return 列表 |
||||||
|
*/ |
||||||
|
@GetMapping(API_PREFIX + "/dutyLogList") |
||||||
|
List<DutyLog> dutyLogList(@RequestParam(value = "startTime", required = false) String startTime, @RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "limit", required = false) Integer limit); |
||||||
|
} |
||||||
@ -0,0 +1,442 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.utils; |
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
|
||||||
|
import java.text.DateFormat; |
||||||
|
import java.text.ParseException; |
||||||
|
import java.text.SimpleDateFormat; |
||||||
|
import java.time.LocalDate; |
||||||
|
import java.time.Period; |
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.Calendar; |
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Slf4j |
||||||
|
public class DateUtils { |
||||||
|
|
||||||
|
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
||||||
|
private static final Calendar startDate = Calendar.getInstance(); |
||||||
|
private static final Calendar endDate = Calendar.getInstance(); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 获取两日期之间相差的秒数 |
||||||
|
* |
||||||
|
* @param before |
||||||
|
* @param after |
||||||
|
* @return long |
||||||
|
* 2018-11-06 11:37 |
||||||
|
*/ |
||||||
|
public static long getSecondOfTwoDate(Date before, Date after) { |
||||||
|
long beforeTime = before.getTime(); |
||||||
|
long afterTime = after.getTime(); |
||||||
|
return (afterTime - beforeTime) / (1000); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 相差分钟 |
||||||
|
* |
||||||
|
* @param time |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static Long getDifferMinute(String time) { |
||||||
|
try { |
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
||||||
|
long currentTime = System.currentTimeMillis(); |
||||||
|
//从对象中拿到时间
|
||||||
|
long createTime = df.parse(df.format(strDate(time, false))).getTime(); |
||||||
|
long diff = (currentTime - createTime) / 1000 / 60L; |
||||||
|
return diff; |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 相差时数 |
||||||
|
* |
||||||
|
* @param endDate |
||||||
|
* @param nowDate |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static Long getDifferTime(Date endDate, Date nowDate) { |
||||||
|
long nd = 1000 * 24 * 60 * 60L; |
||||||
|
long nh = 1000 * 60 * 60L; |
||||||
|
// 获得两个时间的毫秒时间差异
|
||||||
|
long diff = endDate.getTime() - nowDate.getTime(); |
||||||
|
// 计算差多少小时
|
||||||
|
long hour = diff % nd / nh; |
||||||
|
return hour; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 相差天数 |
||||||
|
* |
||||||
|
* @param endDate |
||||||
|
* @param nowDate |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static Long getDifferSky(Date endDate, Date nowDate) { |
||||||
|
long nd = 1000 * 24 * 60 * 60L; |
||||||
|
// 获得两个时间的毫秒时间差异
|
||||||
|
long diff = endDate.getTime() - nowDate.getTime(); |
||||||
|
// 计算差多少天
|
||||||
|
long day = diff / nd; |
||||||
|
return day; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 相差月数 |
||||||
|
* |
||||||
|
* @param start |
||||||
|
* @param end |
||||||
|
* @return |
||||||
|
* @throws ParseException |
||||||
|
*/ |
||||||
|
public static int getDifferMonth(String start, String end) throws ParseException { |
||||||
|
startDate.setTime(sdf.parse(start)); |
||||||
|
endDate.setTime(sdf.parse(end)); |
||||||
|
int result = yearsBetween(start, end) * 12 + endDate.get(Calendar.MONTH) - startDate.get(Calendar.MONTH); |
||||||
|
return result == 0 ? 1 : Math.abs(result); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public static int yearsBetween(String start, String end) throws ParseException { |
||||||
|
startDate.setTime(sdf.parse(start)); |
||||||
|
endDate.setTime(sdf.parse(end)); |
||||||
|
return (endDate.get(Calendar.YEAR) - startDate.get(Calendar.YEAR)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 相差年数 |
||||||
|
* |
||||||
|
* @param fromDate |
||||||
|
* @param toDate |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static int getDifferYear(String fromDate, String toDate) { |
||||||
|
Period period = Period.between(LocalDate.parse(fromDate), LocalDate.parse(toDate)); |
||||||
|
return period.getYears(); |
||||||
|
} |
||||||
|
|
||||||
|
public static Date strDate(String time, Boolean isBoolean) throws Exception { |
||||||
|
Date parse = null; |
||||||
|
if (isBoolean) { |
||||||
|
parse = new SimpleDateFormat("yyyy-MM-dd").parse(time); |
||||||
|
return parse; |
||||||
|
} |
||||||
|
parse = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(time); |
||||||
|
return parse; |
||||||
|
} |
||||||
|
|
||||||
|
public static String dateStr(Date date, Boolean isBoolean) { |
||||||
|
if (isBoolean) { |
||||||
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
||||||
|
String dateString = format.format(date); |
||||||
|
return dateString; |
||||||
|
} |
||||||
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
||||||
|
String dateString = format.format(date); |
||||||
|
return dateString; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 年 |
||||||
|
*/ |
||||||
|
public static String yearDate(Date date, int i, String pattern) {//减多少年
|
||||||
|
String reStr = ""; |
||||||
|
try { |
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(pattern); |
||||||
|
Calendar rightNow = Calendar.getInstance(); |
||||||
|
rightNow.setTime(date); |
||||||
|
rightNow.add(Calendar.YEAR, i); |
||||||
|
Date dt1 = rightNow.getTime(); |
||||||
|
reStr = sdf.format(dt1); |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return reStr; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 月 |
||||||
|
*/ |
||||||
|
public static String monthDate(Date date, int i, String pattern) {//加或减多少月
|
||||||
|
String reStr = ""; |
||||||
|
try { |
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(pattern); |
||||||
|
Calendar rightNow = Calendar.getInstance(); |
||||||
|
rightNow.setTime(date); |
||||||
|
rightNow.add(Calendar.MONTH, i); |
||||||
|
Date dt1 = rightNow.getTime(); |
||||||
|
reStr = sdf.format(dt1); |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return reStr; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 天 |
||||||
|
*/ |
||||||
|
public static String dayDate(Date date, int i, String pattern) {//天
|
||||||
|
String reStr = ""; |
||||||
|
try { |
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(pattern); |
||||||
|
Calendar rightNow = Calendar.getInstance(); |
||||||
|
rightNow.setTime(date); |
||||||
|
rightNow.add(Calendar.DAY_OF_MONTH, i); |
||||||
|
Date dt1 = rightNow.getTime(); |
||||||
|
reStr = sdf.format(dt1); |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return reStr; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* @param date 日期 |
||||||
|
* @param i 天数 |
||||||
|
* @param bool true 加天数 false 减天数 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static String dayStringDate(String date, int i, boolean bool) {//天
|
||||||
|
String reStr = ""; |
||||||
|
try { |
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(DateUtil.PATTERN_DATE);//"yyyy-MM-dd"
|
||||||
|
Calendar rightNow = Calendar.getInstance(); |
||||||
|
rightNow.setTime(sdf.parse(date)); |
||||||
|
if (bool) { |
||||||
|
rightNow.add(Calendar.DAY_OF_MONTH, i); |
||||||
|
} else { |
||||||
|
rightNow.add(Calendar.DAY_OF_MONTH, -i); |
||||||
|
} |
||||||
|
Date dt1 = rightNow.getTime(); |
||||||
|
reStr = sdf.format(dt1); |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return reStr; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 小时 |
||||||
|
*/ |
||||||
|
public static String hrDate(Date date, int i, String pattern) {//减多少小时
|
||||||
|
String reStr = ""; |
||||||
|
try { |
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(pattern); |
||||||
|
Calendar rightNow = Calendar.getInstance(); |
||||||
|
rightNow.setTime(date); |
||||||
|
rightNow.add(Calendar.HOUR, i); |
||||||
|
Date dt1 = rightNow.getTime(); |
||||||
|
reStr = sdf.format(dt1); |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return reStr; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 分钟 |
||||||
|
*/ |
||||||
|
public static String minutlDate(Date date, int i, String pattern) {//减多少分钟
|
||||||
|
String reStr = ""; |
||||||
|
try { |
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(pattern); |
||||||
|
Calendar rightNow = Calendar.getInstance(); |
||||||
|
rightNow.setTime(date); |
||||||
|
rightNow.add(Calendar.MINUTE, i); |
||||||
|
Date dt1 = rightNow.getTime(); |
||||||
|
reStr = sdf.format(dt1); |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return reStr; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 秒 |
||||||
|
*/ |
||||||
|
public static String secDate(Date date, int i, String pattern) {//减多少秒
|
||||||
|
String reStr = ""; |
||||||
|
try { |
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(pattern); |
||||||
|
Calendar rightNow = Calendar.getInstance(); |
||||||
|
rightNow.setTime(date); |
||||||
|
rightNow.add(Calendar.SECOND, i); |
||||||
|
Date dt1 = rightNow.getTime(); |
||||||
|
reStr = sdf.format(dt1); |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return reStr; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 获取某个月的天数 |
||||||
|
* |
||||||
|
* @param date |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static int getDaysOfMonth(Date date) { |
||||||
|
Calendar calendar = Calendar.getInstance(); |
||||||
|
calendar.setTime(date); |
||||||
|
return calendar.getActualMaximum(Calendar.DAY_OF_MONTH); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
//秒转换(*小时*分*秒)
|
||||||
|
public static String secondConvert(int second) { |
||||||
|
if (second == 0) { |
||||||
|
return "0"; |
||||||
|
} |
||||||
|
int h = 0, d = 0, s = 0; |
||||||
|
int temp = second % 3600; |
||||||
|
if (second > 3600) { |
||||||
|
h = second / 3600; |
||||||
|
if (temp != 0) { |
||||||
|
if (temp > 60) { |
||||||
|
d = temp / 60; |
||||||
|
if (temp % 60 != 0) { |
||||||
|
s = temp % 60; |
||||||
|
} |
||||||
|
} else { |
||||||
|
s = temp; |
||||||
|
} |
||||||
|
} |
||||||
|
} else { |
||||||
|
d = second / 60; |
||||||
|
if (second % 60 != 0) { |
||||||
|
s = second % 60; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
return h + "小时" + d + "分" + s + "秒"; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 获取两个日期之间的所有日期 |
||||||
|
* |
||||||
|
* @param startYear |
||||||
|
* @param startMonth |
||||||
|
* @param startDay |
||||||
|
* @param endYear |
||||||
|
* @param endMonth |
||||||
|
* @param endDay |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static List<String> getTwoPeriodsAll(int startYear, int startMonth, int startDay, int endYear, int endMonth, int endDay) { |
||||||
|
List<String> list = new ArrayList<>(); |
||||||
|
Calendar start = Calendar.getInstance(); |
||||||
|
start.set(startYear, startMonth - 1, startDay); |
||||||
|
Long startTIme = start.getTimeInMillis(); |
||||||
|
Calendar end = Calendar.getInstance(); |
||||||
|
end.set(endYear, endMonth - 1, endDay); |
||||||
|
Long endTime = end.getTimeInMillis(); |
||||||
|
|
||||||
|
Long oneDay = 1000 * 60 * 60 * 24L; |
||||||
|
|
||||||
|
Long time = startTIme; |
||||||
|
while (time <= endTime) { |
||||||
|
Date d = new Date(time); |
||||||
|
DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); |
||||||
|
list.add(df.format(d)); |
||||||
|
time += oneDay; |
||||||
|
} |
||||||
|
return list; |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public static int getDaysOfMonthWithNow(Date date) { |
||||||
|
Calendar calendar = Calendar.getInstance(); |
||||||
|
SimpleDateFormat fmt = new SimpleDateFormat("yyyyMM"); |
||||||
|
if (fmt.format(date).equals(fmt.format(new Date()))) { |
||||||
|
return calendar.get(Calendar.DAY_OF_MONTH); |
||||||
|
} |
||||||
|
calendar.setTime(date); |
||||||
|
return calendar.getActualMaximum(Calendar.DAY_OF_MONTH); |
||||||
|
} |
||||||
|
|
||||||
|
private static final long nd = 1000 * 24 * 60 * 60L; |
||||||
|
private static final long nh = 1000 * 60 * 60L; |
||||||
|
private static final long nm = 1000 * 60L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 计算两个时间段时间差,精确到秒 |
||||||
|
* |
||||||
|
* @param startTime 2019-04-10 17:16:11 |
||||||
|
* @param endTime 2019-04-10 17:28:17 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static String computationTime(Date startTime, Date endTime) { |
||||||
|
try { |
||||||
|
log.info("开始时间->{}, 结束时间->{}", DateUtil.format(startTime, DateUtil.PATTERN_DATETIME), DateUtil.format(endTime, DateUtil.PATTERN_DATETIME)); |
||||||
|
long diff = endTime.getTime() - startTime.getTime(); |
||||||
|
long day = diff / nd; |
||||||
|
long hour = diff % nd / nh; |
||||||
|
long min = diff % nd % nh / nm; |
||||||
|
long sec = diff % nd % nh % nm / 1000L; |
||||||
|
String str = day + "天" + hour + "小时" + min + "分钟" + sec + "秒"; |
||||||
|
return str; |
||||||
|
} catch (Exception e) { |
||||||
|
log.info("计算两个时间段时间差出错了, {}", e); |
||||||
|
return null; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
//获取最近一年的月份
|
||||||
|
public static List<String> getThisYearMonths() { |
||||||
|
//建一个容器
|
||||||
|
List<String> months = new ArrayList<>(); |
||||||
|
//获取日历对象
|
||||||
|
Calendar calendar = Calendar.getInstance(); |
||||||
|
//调整到12个月以前
|
||||||
|
calendar.add(Calendar.MONTH, -12); |
||||||
|
//循环12次获取12个月份
|
||||||
|
for (int i = 0; i < 12; i++) { |
||||||
|
//日历对象转为Date对象
|
||||||
|
Date date = calendar.getTime(); |
||||||
|
//将date转为字符串
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM"); |
||||||
|
String dateStr = sdf.format(date); |
||||||
|
//向list集合中添加
|
||||||
|
months.add(dateStr); |
||||||
|
//每次月份+1
|
||||||
|
calendar.add(Calendar.MONTH, 1); |
||||||
|
} |
||||||
|
return months; |
||||||
|
} |
||||||
|
|
||||||
|
//获取当前一年的月份
|
||||||
|
public static List<String> getYearMonths(String year) { |
||||||
|
//建一个容器
|
||||||
|
List<String> months = new ArrayList<>(); |
||||||
|
//获取日历对象
|
||||||
|
Calendar calendar = Calendar.getInstance(); |
||||||
|
//调整到12个月以前
|
||||||
|
calendar.add(Calendar.MONTH, -12); |
||||||
|
//循环12次获取12个月份
|
||||||
|
for (int i = 1; i <= 12; i++) { |
||||||
|
if (i < 10) { |
||||||
|
months.add(year + "-0" + i); |
||||||
|
} else { |
||||||
|
months.add(year + "-" + i); |
||||||
|
} |
||||||
|
} |
||||||
|
return months; |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,22 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.utils; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 基础VO,用于tree结构 |
||||||
|
* |
||||||
|
* @author xiashandong |
||||||
|
* @created 2020/9/9 17:30 |
||||||
|
**/ |
||||||
|
public interface Tree<T extends Tree> { |
||||||
|
|
||||||
|
List<T> getChildren(); |
||||||
|
|
||||||
|
void setChildren(List<T> children); |
||||||
|
|
||||||
|
Long getId(); |
||||||
|
|
||||||
|
Long getParentId(); |
||||||
|
|
||||||
|
String getName(); |
||||||
|
} |
||||||
@ -0,0 +1,229 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
@ApiModel(value = "区域值班信息对象") |
||||||
|
public class AreaDutyVo { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "机构Id") |
||||||
|
private Long departId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "机构名称") |
||||||
|
private String departName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "任务总数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer taskCount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "完成任务数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer finishTaskCount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "发电量") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private double generatingCapacity; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "上班偷偷上网量") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private double onlineCapacity; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组名称") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人名称") |
||||||
|
private String managerName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人手机号") |
||||||
|
private String managerPhone; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "上一班组对象") |
||||||
|
private NextDutyInfoVo upDutyInfoVo; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "下一班组对象") |
||||||
|
private NextDutyInfoVo nextDutyInfoVo; |
||||||
|
|
||||||
|
/**<!==========厂站运行==========>**/ |
||||||
|
@ApiModelProperty(value = "站点总数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer stationSum; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "站点运行数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer stationRun; |
||||||
|
|
||||||
|
/**<!==========当班双票==========>**/ |
||||||
|
@ApiModelProperty(value = "工作票张数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer workTicketCount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作票张数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer operationTicketCount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "移交票张数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer handoverTicketCount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "结束票张数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer closeTicketCount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "作废票张数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer voidTicketCount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "延期票张数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer deferredTicketCount; |
||||||
|
|
||||||
|
|
||||||
|
/**<!==========当班运行==========>**/ |
||||||
|
@ApiModelProperty(value = "巡检总数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer inspectionSum; |
||||||
|
@ApiModelProperty(value = "普通巡检任务数量") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private int normalTaskSum; |
||||||
|
@ApiModelProperty(value = "机器人巡检任务") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private int robotTaskSum; |
||||||
|
@ApiModelProperty(value = "视频巡检任务") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private int videoTaskSum; |
||||||
|
@ApiModelProperty(value = "巡检任务Id,按逗号分隔") |
||||||
|
private String inspectTaskIds; |
||||||
|
|
||||||
|
@ApiModelProperty(value="检修任务数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer overhaulCount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "巡检完成数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer inspectionFinish; |
||||||
|
|
||||||
|
@ApiModelProperty(value="巡检任务完成率") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Double inspectionFinishRate; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "消缺总数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer shortagesSum; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "现象Ids") |
||||||
|
private String phenomenonIds; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "消缺数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer shortages; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "消缺率") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Double shortagesRate; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "定期工作总数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer workRegularlySum; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "定期工作任务总数") |
||||||
|
private String mainTaskIds; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "定期工作数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer workRegularly; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "定期工作完成率") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Double workRegularlyRate; |
||||||
|
|
||||||
|
|
||||||
|
/**<!==========当月任务执行情况==========>**/ |
||||||
|
@ApiModelProperty(value = "当月日常维护总数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer maintainSumMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月日常维护完成数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer maintainFinishSumMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月日常维护完成率") |
||||||
|
private String maintainRateMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月消缺总数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer shortagesSumMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月消缺数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer shortagesMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月消缺完成率") |
||||||
|
private String shortagesRateMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月巡检总数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private int inspectionSumMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月巡检数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private int inspectionMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月巡检完成率") |
||||||
|
private String inspectionRateMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月检修总数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer overhaulSumMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月检修完成数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer overhaulFinishSumMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月检修完成率") |
||||||
|
private String overhaulRateMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月操作票总数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer operateSumMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月操作票合格数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer operateQualifySumMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月操作票合格率") |
||||||
|
private String operateRateMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月工作票总数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer workSumMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月工作票合格数") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer workQualifySumMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月工作票合格率") |
||||||
|
private String workRateMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序字段") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Integer sort; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当班开始时间") |
||||||
|
private String startTimeDuty; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当班结束时间") |
||||||
|
private String endTimeDuty; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月开始时间") |
||||||
|
private String endTimeMoth; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当月结束时间") |
||||||
|
private String startTimeMoth; |
||||||
|
} |
||||||
@ -0,0 +1,23 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class AuditVo { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "人员ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long personId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "人员名称") |
||||||
|
private String personName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "手机号") |
||||||
|
private String phone; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "人员头像") |
||||||
|
private String personAvatar; |
||||||
|
} |
||||||
@ -0,0 +1,41 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainEntity; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Data |
||||||
|
@ApiModel(value = "调班对象", description = "调班填写的相关信息") |
||||||
|
public class ChangeDutyMainVo extends ImsDutyMainEntity { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "人员ID") |
||||||
|
private List<String> personId; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@ApiModelProperty(value = "调班开始日期") |
||||||
|
private Date changeStartDate; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@ApiModelProperty(value = "调班开始日期") |
||||||
|
private Date changeEndtDate; |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
@ApiModelProperty(value = "班次ID") |
||||||
|
private Long classId; |
||||||
|
/** |
||||||
|
* 调班类型 |
||||||
|
* 1为调入,2为调出 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "调班类型") |
||||||
|
private Integer type;//1为调入,2为调出
|
||||||
|
} |
||||||
@ -0,0 +1,29 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.hzinfo_inspect.duty.utils.Tree; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Data |
||||||
|
@ApiModel(value = "机构-值班班次类型-班次树",description = "机构-值班班次类型-班次树") |
||||||
|
public class DutyClassTypeTree implements Tree<DutyClassTypeTree> { |
||||||
|
@ApiModelProperty("树ID") |
||||||
|
private Long id; |
||||||
|
|
||||||
|
@ApiModelProperty("父节点树ID") |
||||||
|
@JsonIgnore |
||||||
|
private Long parentId; |
||||||
|
|
||||||
|
@ApiModelProperty("节点名称") |
||||||
|
private String name; |
||||||
|
|
||||||
|
@ApiModelProperty("子节点") |
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY) |
||||||
|
private List<DutyClassTypeTree> children; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,22 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class DutyGroupMemberVo { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组Id") |
||||||
|
private String groupId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组名称") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "机构Id") |
||||||
|
private Long createDept; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组成员对象") |
||||||
|
private List<DutyMemberVO> member; |
||||||
|
} |
||||||
@ -0,0 +1,68 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.sql.Time; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* 当前值班信息 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class DutyInfoVo extends BaseEntity { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组Id") |
||||||
|
private Long groupId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "上一班组Id") |
||||||
|
private Long preDutyId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组名称") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人ID") |
||||||
|
private String managerId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人名称") |
||||||
|
private String managerName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人手机号") |
||||||
|
private String managerPhone; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "发电量") |
||||||
|
private double generatingCapacity; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "上班偷偷上网量") |
||||||
|
private double onlineCapacity; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "开始时间") |
||||||
|
@TableField("START_TIME") |
||||||
|
private Time startTime; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "开始时间") |
||||||
|
@TableField("END_TIME") |
||||||
|
private Time endTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "日期") |
||||||
|
@TableField("DATE_TIME") |
||||||
|
private Date dateTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "上一班组对象") |
||||||
|
private NextDutyInfoVo upDutyInfoVo; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "下一班组对象") |
||||||
|
private NextDutyInfoVo nextDutyInfoVo; |
||||||
|
} |
||||||
@ -0,0 +1,25 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class DutyLog { |
||||||
|
private Long dutyId; |
||||||
|
|
||||||
|
private Long logPersonId; |
||||||
|
|
||||||
|
private String logPersonName; |
||||||
|
|
||||||
|
private String status; |
||||||
|
|
||||||
|
private String content; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
private Date logTime; |
||||||
|
} |
||||||
@ -0,0 +1,69 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainEntity; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.sql.Time; |
||||||
|
import java.time.LocalDateTime; |
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 当前值班信息 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class DutyMainInfoVo extends ImsDutyMainEntity { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组名称") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "上一班值班ID") |
||||||
|
private Long preDutyId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人ID") |
||||||
|
private String managerId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人名称") |
||||||
|
private String managerName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人手机号") |
||||||
|
private String managerPhone; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班员集合") |
||||||
|
private List<AuditVo> auditList; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "发电量") |
||||||
|
private double generatingCapacity; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "开始时间") |
||||||
|
private Time startTime; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "结束时间") |
||||||
|
private Time endTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "日期") |
||||||
|
@TableField("DATE_TIME") |
||||||
|
private Date dateTime; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@ApiModelProperty(value = "当班开始时间") |
||||||
|
private LocalDateTime startDate; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@ApiModelProperty(value = "当班结束时间") |
||||||
|
private LocalDateTime endDate; |
||||||
|
} |
||||||
@ -0,0 +1,18 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class DutyMemberVO { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组人员Id") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long personId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组人员名称") |
||||||
|
private String personName; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,24 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class DutyPersonalReportVO implements Serializable { |
||||||
|
private static final long serialVersionUID = -4173567845695989296L; |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
@ApiModelProperty("值班天数") |
||||||
|
private Integer dutyDayNum; |
||||||
|
|
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
@ApiModelProperty("值班次数") |
||||||
|
private Integer dutyNum; |
||||||
|
|
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
@ApiModelProperty("值班日期") |
||||||
|
private String dutyDate; |
||||||
|
} |
||||||
@ -0,0 +1,21 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author ysj |
||||||
|
* @describe 值班记录 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class DutyRecordVo { |
||||||
|
|
||||||
|
@ApiModelProperty("值班记录时间") |
||||||
|
private String time; |
||||||
|
|
||||||
|
@ApiModelProperty("值班记录内容") |
||||||
|
private String content; |
||||||
|
|
||||||
|
@ApiModelProperty("漫游地址") |
||||||
|
private String link; |
||||||
|
} |
||||||
@ -0,0 +1,40 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainEntity; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class DutyReportVO implements Serializable { |
||||||
|
private static final long serialVersionUID = 3273581622730234931L; |
||||||
|
|
||||||
|
private Integer index; |
||||||
|
|
||||||
|
@ApiModelProperty("班次名称") |
||||||
|
private String classGroupName; |
||||||
|
|
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
@ApiModelProperty("值班次数") |
||||||
|
private Integer dutyNum; |
||||||
|
|
||||||
|
@ApiModelProperty("值班时长") |
||||||
|
private Double dutyDuration; |
||||||
|
|
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
@ApiModelProperty("发现问题数量") |
||||||
|
private Integer findProblemNum; |
||||||
|
|
||||||
|
@ApiModelProperty("延迟交接班") |
||||||
|
private String delayChangeShifts; |
||||||
|
|
||||||
|
@ApiModelProperty("异常交接班") |
||||||
|
private String exceptionChangeShifts; |
||||||
|
|
||||||
|
@ApiModelProperty("班组值班List") |
||||||
|
private List<ImsDutyMainEntity> imsDutyMainEntityList; |
||||||
|
} |
||||||
@ -0,0 +1,36 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyRecEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.enums.DutyRecStatus; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class DutyShiftRecord { |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
private Date changeTime; |
||||||
|
|
||||||
|
private Long onPersonId; |
||||||
|
|
||||||
|
private String onPersonName; |
||||||
|
|
||||||
|
private Long offPersonId; |
||||||
|
|
||||||
|
private String offPersonName; |
||||||
|
|
||||||
|
private String condition; |
||||||
|
|
||||||
|
public static DutyShiftRecord of(ImsDutyRecEntity entity) { |
||||||
|
DutyShiftRecord dutyShiftRecord = new DutyShiftRecord(); |
||||||
|
dutyShiftRecord.setChangeTime(entity.getExecTime()); |
||||||
|
DutyRecStatus status = DutyRecStatus.getDutyStatus(entity.getStatus()); |
||||||
|
dutyShiftRecord.setCondition(status.getName()); |
||||||
|
return dutyShiftRecord; |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,32 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class DutyTaskVo { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "日常维护总数") |
||||||
|
private Integer maintainSum; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "日常维护完成数量") |
||||||
|
private Integer maintainFinish; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "消缺总数") |
||||||
|
private Integer shortagesSum; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "消缺数量") |
||||||
|
private Integer shortages; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "检修数量") |
||||||
|
private Integer overhaul; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "检修完成数量") |
||||||
|
private Integer overhaulFinish; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "巡检数量") |
||||||
|
private Integer inspect; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "巡检完成数量") |
||||||
|
private Integer inspectFinish; |
||||||
|
} |
||||||
@ -0,0 +1,69 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.sql.Time; |
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author ysj |
||||||
|
* @deprecate 当前值班信息 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class EngineerDutyVo { |
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "值班主键") |
||||||
|
private Long dutyId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组主键") |
||||||
|
private Long groupId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组名称") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次Id") |
||||||
|
private Long classId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人ID") |
||||||
|
private Long managerId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人头像") |
||||||
|
private String managerAvatar; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人名称") |
||||||
|
private String managerName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人手机号") |
||||||
|
private String managerPhone; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "开始时间") |
||||||
|
private Time startTime; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "结束时间") |
||||||
|
private Time endTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "日期") |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
private Date dateTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组成员") |
||||||
|
private List<AuditVo> members; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "值班记录") |
||||||
|
private List<DutyRecordVo> dutyRecord; |
||||||
|
} |
||||||
|
|
||||||
@ -0,0 +1,24 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class ExchangeGroupLeader implements Serializable { |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
private Date fromDate; |
||||||
|
private Long fromClassId; |
||||||
|
private Long fromDeptId; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
private Date toDate; |
||||||
|
private Long toClassId; |
||||||
|
private Long toDeptId; |
||||||
|
} |
||||||
@ -0,0 +1,28 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class FlexibleSchedulingVo { |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 值班组长ID |
||||||
|
*/ |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
@ApiModelProperty("值班组长ID") |
||||||
|
private String chargeId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 人员IDs |
||||||
|
*/ |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
@ApiModelProperty("人员ID") |
||||||
|
private List<String> personIds; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,18 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* 首页值班信息 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class HomePageDutyMainInfoVo { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "值班对象信息") |
||||||
|
DutyMainInfoVo headInfo; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "接班对象信息") |
||||||
|
DutyMainInfoVo corryInfo; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,30 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyChangeEntity; |
||||||
|
|
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyChangeVO对象", description = "调班") |
||||||
|
public class ImsDutyChangeTowVo extends ImsDutyChangeEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 510101758138L; |
||||||
|
|
||||||
|
@ApiModelProperty("申请人班次名称") |
||||||
|
private String applyClassName; |
||||||
|
@ApiModelProperty("调班人班次名称") |
||||||
|
private String acceptClassName; |
||||||
|
@ApiModelProperty("申请人班组名称") |
||||||
|
private String applyGroupName; |
||||||
|
@ApiModelProperty("调班人班组名称") |
||||||
|
private String acceptGroupName; |
||||||
|
@ApiModelProperty("申请人班次类型") |
||||||
|
private String applyClassTypeName; |
||||||
|
@ApiModelProperty("调班人班次类型") |
||||||
|
private String acceptClassTypeName; |
||||||
|
@ApiModelProperty("调班主管名称") |
||||||
|
private String managerName; |
||||||
|
} |
||||||
@ -0,0 +1,71 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyChangeEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型VO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyChangeVO对象", description = "调班") |
||||||
|
public class ImsDutyChangeVO extends ImsDutyChangeEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 510101758138L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 申请人名称 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "申请人名称") |
||||||
|
private String applyPersonName; |
||||||
|
/** |
||||||
|
* 调班人名称 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "调班人名称") |
||||||
|
private String acceptPersonName; |
||||||
|
/** |
||||||
|
* 审核人名称 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "审核人名称") |
||||||
|
private String managerName; |
||||||
|
/** |
||||||
|
* 创建人名称 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "创建人名称") |
||||||
|
private String createUserName; |
||||||
|
/** |
||||||
|
* 更新人名称 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "更新人名称") |
||||||
|
private String updateUserName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 状态名称 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "状态名称") |
||||||
|
private String statusName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 班次名称 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 调班对象值班信息 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "调班对象值班信息") |
||||||
|
private ImsSchedulingVo acceptDutyMainVo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 申请对象值班信息 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "申请对象值班信息") |
||||||
|
private ImsSchedulingVo applyDutyMainVo; |
||||||
|
} |
||||||
@ -0,0 +1,20 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyClassEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型VO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class ImsDutyClassVO extends ImsDutyClassEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
private String classTypeIds; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,86 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.SqlCondition; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springblade.core.mp.support.QueryField; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 实体类 |
||||||
|
* |
||||||
|
* @author ty |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class ImsDutyEmergencyVo extends BaseEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 4259568798118459986L; |
||||||
|
/** |
||||||
|
* 值班开始日期 |
||||||
|
*/ |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@ApiModelProperty(value = "值班开始日期") |
||||||
|
private Date dutyStartTime; |
||||||
|
/** |
||||||
|
* 值班结束日期 |
||||||
|
*/ |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@ApiModelProperty(value = "值班结束日期") |
||||||
|
private Date dutyEndTime; |
||||||
|
/** |
||||||
|
* 班次 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "班次") |
||||||
|
private List<Long> dutyClass; |
||||||
|
/** |
||||||
|
* 登记人 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "登记人") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private List<Long> registrant; |
||||||
|
/** |
||||||
|
* 值班长 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "值班长") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private List<Long> chargePerson; |
||||||
|
/** |
||||||
|
* 登记时间 |
||||||
|
*/ |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME) |
||||||
|
@ApiModelProperty(value = "登记时间") |
||||||
|
private Date registerTime; |
||||||
|
/** |
||||||
|
* 事件主题 |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "事件主题") |
||||||
|
private String eventTitle; |
||||||
|
/** |
||||||
|
* 事件内容 |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "事件内容") |
||||||
|
private String eventInfo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 事件方式 |
||||||
|
*/ |
||||||
|
@QueryField(condition = SqlCondition.LIKE) |
||||||
|
@ApiModelProperty(value = "事件方式") |
||||||
|
private String eventType; |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,34 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainEntity; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.sql.Time; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class ImsDutyGroupGenerationVo extends ImsDutyMainEntity { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组名称") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次类型名称") |
||||||
|
private String classTypeName; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "值班开始时间") |
||||||
|
private Time startTime; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "值班结束时间") |
||||||
|
private Time endTime; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,32 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiParam; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupPEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型VO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class ImsDutyGroupPVO extends ImsDutyGroupPEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 人员名称 |
||||||
|
*/ |
||||||
|
@ApiParam(value = "人员名称") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 标识 true 为负责人 |
||||||
|
*/ |
||||||
|
@ApiParam(value = "标识") |
||||||
|
private boolean signage; |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,24 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupEntity; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型VO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyGroupVO对象", description = "值班小组对象") |
||||||
|
public class ImsDutyGroupPersonVO extends ImsDutyGroupEntity { |
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -5209355293631668430L; |
||||||
|
|
||||||
|
List<ImsDutyGroupPVO> imsDutyGroupPEntityList; |
||||||
|
} |
||||||
@ -0,0 +1,48 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupEntity; |
||||||
|
import org.springframework.beans.BeanUtils; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型VO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@ApiModel(value = "ImsDutyGroupVO对象", description = "值班小组对象") |
||||||
|
public class ImsDutyGroupVO extends ImsDutyGroupEntity { |
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -5209355293631668430L; |
||||||
|
|
||||||
|
/** |
||||||
|
* personId 通过^隔开 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "personId 通过^隔开") |
||||||
|
private String personId; |
||||||
|
|
||||||
|
/** |
||||||
|
* personName 通过^隔开 |
||||||
|
*/ |
||||||
|
private String personName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 班组人数 |
||||||
|
*/ |
||||||
|
private Integer repairPersonnelSum; |
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否更新排班 true 是 false 否") |
||||||
|
private Boolean updateDuty; |
||||||
|
|
||||||
|
public ImsDutyGroupEntity toEntity() { |
||||||
|
ImsDutyGroupEntity entity = new ImsDutyGroupEntity(); |
||||||
|
BeanUtils.copyProperties(this, entity); |
||||||
|
return entity; |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,80 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class ImsDutyMainMergeVo { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "值班ID") |
||||||
|
private Long dutyId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long classId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long groupId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组名称") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "联系人手机号") |
||||||
|
private String phone; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态") |
||||||
|
private int status; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long managerId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "下一班值班ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long descDutyId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "下一班班次ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long descClassId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "下一班班组ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long descGroupId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "下一班班次名称") |
||||||
|
private String descClassName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "下一班班组名称") |
||||||
|
private String descGroupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "下一班联系人手机号") |
||||||
|
private String descPhone; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "下一班负责人ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long descManagerId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "上一班值班ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long preDutyId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "机构ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long deptId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "站点名称") |
||||||
|
private String stationName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "当前班组负责人") |
||||||
|
private String userName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "下一班班组负责人") |
||||||
|
private String descUserName; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,22 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型VO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class ImsDutyMainVO extends ImsDutyMainEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
private String userId; |
||||||
|
|
||||||
|
private String userName; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,10 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class ImsDutyRecQRRecordExtendVo { |
||||||
|
|
||||||
|
private String dutyId; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,26 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyRecQRRecordEntity; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class ImsDutyRecQRRecordVo extends ImsDutyRecQRRecordEntity { |
||||||
|
@ApiModelProperty(value = "班组ID") |
||||||
|
private Long groupId; |
||||||
|
@ApiModelProperty(value = "值班日期") |
||||||
|
private String dutyDate; |
||||||
|
@ApiModelProperty(value = "班次ID") |
||||||
|
private Long classId; |
||||||
|
@ApiModelProperty(value = "开始时间") |
||||||
|
private String startTime; |
||||||
|
@ApiModelProperty(value = "结束时间") |
||||||
|
private String endTime; |
||||||
|
@ApiModelProperty(value = "班组名称") |
||||||
|
private String groupName; |
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
@ApiModelProperty(value = "用户名称") |
||||||
|
private String userName; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,17 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyRecEntity; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class ImsDutyRecTestVo extends ImsDutyRecEntity { |
||||||
|
|
||||||
|
private String dutyDate; |
||||||
|
|
||||||
|
private String startTime; |
||||||
|
|
||||||
|
private String endTime; |
||||||
|
|
||||||
|
private Long managerId; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,48 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyLogEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyRecEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模型VO |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class ImsDutyRecVO extends ImsDutyRecEntity { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "交班申请人") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long personId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 交班对象值班信息 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "交班对象值班信息") |
||||||
|
private ImsSchedulingVo headDutyMainVo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 接班对象值班信息 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "接班对象值班信息") |
||||||
|
private ImsSchedulingVo carryDutyMainVo; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "接班开始时间 yyyy-MM-dd") |
||||||
|
private String startDate; |
||||||
|
@ApiModelProperty(value = "接班结束时间 yyyy-MM-dd") |
||||||
|
private String endDate; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "站点名称") |
||||||
|
private String stationName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "值班日志") |
||||||
|
private ImsDutyLogEntity imsDutyLogEntity; |
||||||
|
} |
||||||
@ -0,0 +1,19 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyRecEntity; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class ImsRecVo extends ImsDutyRecEntity { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组名称") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "值班日期") |
||||||
|
private String date; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,85 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainEntity; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class ImsSchedulingVo extends ImsDutyMainEntity { |
||||||
|
private String name; |
||||||
|
|
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long classId; |
||||||
|
|
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long groupId; |
||||||
|
|
||||||
|
//private String className;
|
||||||
|
|
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组ID 通过^隔开",required = true) |
||||||
|
private String groupIds; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组名称 通过^隔开",required = true) |
||||||
|
private String groupNames; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次ID 通过^隔开",required = true) |
||||||
|
private String classIds; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次名称 通过^隔开",required = true) |
||||||
|
private String classNames; |
||||||
|
/* |
||||||
|
@ApiModelProperty(value = "年份") |
||||||
|
private int year; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "月份") |
||||||
|
private int month;*/ |
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否排版",required = true) |
||||||
|
private boolean compose; |
||||||
|
@ApiModelProperty(value = "开始时间",required = true) |
||||||
|
private String startDate; |
||||||
|
@ApiModelProperty(value = "结束时间",required = true) |
||||||
|
private String endDate; |
||||||
|
@ApiModelProperty(value = "值班开始时间") |
||||||
|
private String startTime; |
||||||
|
@ApiModelProperty(value = "值班结束时间") |
||||||
|
private String endTime; |
||||||
|
|
||||||
|
@ApiModelProperty("班次类型名称") |
||||||
|
private String classTypeName; |
||||||
|
@ApiModelProperty("班组负责人") |
||||||
|
private Long managerId; |
||||||
|
@ApiModelProperty("班组负责人名称") |
||||||
|
private String managerName; |
||||||
|
@ApiModelProperty("用户名称") |
||||||
|
private String userName; |
||||||
|
|
||||||
|
@ApiModelProperty("班组值班周期id") |
||||||
|
private Map<String, String[]> dutyOrderIds; |
||||||
|
@ApiModelProperty("班组ID") |
||||||
|
private String[] dutyArrIds; |
||||||
|
@ApiModelProperty("值班周期的天数") |
||||||
|
private int dutyNum; |
||||||
|
@ApiModelProperty("排班模版名称") |
||||||
|
private String templateName; |
||||||
|
@ApiModelProperty("排班类型: 1、轮询 2 、周期") |
||||||
|
private Integer schedulingType; |
||||||
|
@ApiModelProperty("人员类型: 1、班组 2 、人员") |
||||||
|
private Integer personType; |
||||||
|
@ApiModelProperty("是否保存为模版,true 是,false 否") |
||||||
|
private Boolean template; |
||||||
|
@ApiModelProperty("班次类型ID") |
||||||
|
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||||
|
private Long dutyClassTypeId; |
||||||
|
@ApiModelProperty("灵活人员排班-轮询") |
||||||
|
private Map<String, List<String>> rosters; |
||||||
|
@ApiModelProperty("灵活人员排班-周期") |
||||||
|
private Map<String, List<FlexibleSchedulingVo>> flexible; |
||||||
|
} |
||||||
@ -0,0 +1,47 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.sql.Time; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* 下一值班对象 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class NextDutyInfoVo{ |
||||||
|
|
||||||
|
@ApiModelProperty(value = "发电量") |
||||||
|
private double generatingCapacity; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "上班偷偷上网量") |
||||||
|
private double onlineCapacity; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组名称") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人名称") |
||||||
|
private String managerName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人手机号") |
||||||
|
private String managerPhone; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "任务总数") |
||||||
|
private Integer taskCount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "完成任务数") |
||||||
|
private Integer finishTaskCount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "开始时间") |
||||||
|
private Time startTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "开始时间") |
||||||
|
private Time endTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "日期") |
||||||
|
private Date dateTime; |
||||||
|
} |
||||||
@ -0,0 +1,68 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.sql.Time; |
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author ysj |
||||||
|
* @deprecate 上一班组、下一班组信息 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class RelationshipTeamVo { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "值班主键") |
||||||
|
private Long dutyId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "日期") |
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_DATE) |
||||||
|
private Date dutyDate; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "开始时间") |
||||||
|
private Time startTime; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@JsonFormat(pattern = DateUtil.PATTERN_TIME) |
||||||
|
@ApiModelProperty(value = "开始时间") |
||||||
|
private Time endTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次Id") |
||||||
|
private Long classId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班次名称") |
||||||
|
private String className; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组主键") |
||||||
|
private Long groupId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组名称") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人ID") |
||||||
|
private String managerId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人名称") |
||||||
|
private String managerName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人头像") |
||||||
|
private String managerAvatar; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人手机号") |
||||||
|
private String managerPhone; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "班组成员") |
||||||
|
private List<AuditVo> members; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "值班记录") |
||||||
|
private List<DutyRecordVo> dutyRecord; |
||||||
|
} |
||||||
|
|
||||||
@ -0,0 +1,154 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.controller; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import io.swagger.annotations.ApiParam; |
||||||
|
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.springblade.core.tool.utils.Func; |
||||||
|
import org.springblade.flow.core.entity.BladeFlow; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyChangeEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyChangeService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyMainService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsDutyChangeTowVo; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsDutyChangeVO; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsSchedulingVo; |
||||||
|
import org.springblade.hzinfo_inspect.duty.wrapper.ImsDutyChangeWrapper; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
|
||||||
|
import javax.validation.Valid; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 控制器 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/dutyChange") |
||||||
|
@Api(value = "调班管理", tags = "调班管理") |
||||||
|
public class ImsDutyChangeController extends BladeController { |
||||||
|
|
||||||
|
private final IImsDutyChangeService imsDutyService; |
||||||
|
|
||||||
|
private final IImsDutyMainService imsDutyMainService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@ApiOperation(value = "详情", notes = "传入dutyChange") |
||||||
|
public R<ImsDutyChangeVO> detail(ImsDutyChangeEntity changeEntity) { |
||||||
|
ImsDutyChangeEntity detail = imsDutyService.getOne(Condition.getQueryWrapper(changeEntity)); |
||||||
|
ImsDutyChangeVO vo = ImsDutyChangeWrapper.build().entityVO(detail); |
||||||
|
imsDutyService.setUserNmae(vo); |
||||||
|
ImsSchedulingVo imsSchedulingVo1 = imsDutyMainService.getByIdOneV2(detail.getAcceptDutyId()); |
||||||
|
vo.setAcceptDutyMainVo(imsSchedulingVo1); |
||||||
|
ImsSchedulingVo imsSchedulingVo = imsDutyMainService.getByIdOneV2(detail.getApplyDutyId()); |
||||||
|
vo.setApplyDutyMainVo(imsSchedulingVo); |
||||||
|
return R.data(vo); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail/test") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@ApiOperation(value = "详情示例", notes = "传入dutyChange") |
||||||
|
public R<ImsDutyChangeVO> detailTest(ImsDutyChangeEntity changeEntity) { |
||||||
|
return R.data(imsDutyService.getDetailTest(changeEntity)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 详情 |
||||||
|
* |
||||||
|
* @param businessId 主键 |
||||||
|
*/ |
||||||
|
@GetMapping("/detailById") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@ApiOperation(value = "详情", notes = "传入 主键Id") |
||||||
|
public R<ImsDutyChangeVO> detail(Long businessId) { |
||||||
|
ImsDutyChangeVO detail = ImsDutyChangeWrapper.build().entityVO(imsDutyService.getById(businessId)); |
||||||
|
return R.data(detail); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 分页 代码自定义代号 |
||||||
|
*/ |
||||||
|
@GetMapping("/list") |
||||||
|
@ApiOperationSupport(order = 2) |
||||||
|
@ApiOperation(value = "分页", notes = "传入dutyChange") |
||||||
|
public R<IPage<ImsDutyChangeVO>> list(ImsDutyChangeEntity changeEntity, Query query) { |
||||||
|
IPage<ImsDutyChangeEntity> pages = imsDutyService.page(Condition.getPage(query), Condition.getQueryWrapper(changeEntity)); |
||||||
|
IPage<ImsDutyChangeVO> vos = ImsDutyChangeWrapper.build().pageVO(pages); |
||||||
|
return R.data(vos); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/save") |
||||||
|
@ApiOperationSupport(order = 4) |
||||||
|
@ApiOperation(value = "新增", notes = "传入dutyChange") |
||||||
|
public R save(@Valid @RequestBody ImsDutyChangeEntity changeEntity) { |
||||||
|
return R.status(imsDutyService.save(changeEntity)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/update") |
||||||
|
@ApiOperationSupport(order = 5) |
||||||
|
@ApiOperation(value = "修改", notes = "传入dutyChange") |
||||||
|
public R update(@Valid @RequestBody ImsDutyChangeEntity changeEntity) { |
||||||
|
return R.status(imsDutyService.updateById(changeEntity)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增或修改 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/submit") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@ApiOperation(value = "新增或修改,然后提交,开始工作流程", notes = "传入dutyChange") |
||||||
|
public R submit(@Valid @RequestBody ImsDutyChangeEntity changeEntity) { |
||||||
|
return R.status(imsDutyService.submit(changeEntity)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 删除 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 7) |
||||||
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||||
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return R.status(imsDutyService.deleteLogic(Func.toLongList(ids))); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增或修改 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/complete-task") |
||||||
|
@ApiOperationSupport(order = 8) |
||||||
|
@ApiOperation(value = "处理工作流程", notes = "传入flow") |
||||||
|
public R submit(@Valid @RequestBody BladeFlow flow,@RequestBody ImsDutyChangeEntity changeEntity) { |
||||||
|
return R.status(imsDutyService.completeTask(flow,changeEntity)); |
||||||
|
} |
||||||
|
|
||||||
|
@PostMapping("/getList") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@ApiOperation(value = "查询调班记录", notes = "") |
||||||
|
public R<IPage<ImsDutyChangeTowVo>> getList(Query query){ |
||||||
|
return R.data(imsDutyService.getList(Condition.getPage(query))); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,139 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.controller; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import io.swagger.annotations.ApiParam; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.core.tool.utils.CollectionUtil; |
||||||
|
import org.springblade.core.tool.utils.Func; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyClassEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyClassService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.DutyClassTypeTree; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
|
||||||
|
import javax.validation.Valid; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 控制器 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/imsDutyClass") |
||||||
|
@Api(value = "班次controller", tags = "班次相关操作(班次设置)") |
||||||
|
public class ImsDutyClassController { |
||||||
|
|
||||||
|
private final IImsDutyClassService imsDutyClassService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@ApiOperation(value = "详情", notes = "传入imsDutyClass") |
||||||
|
public R<ImsDutyClassEntity> detail(ImsDutyClassEntity imsDutyClass) { |
||||||
|
ImsDutyClassEntity detail = imsDutyClassService.getOne(Condition.getQueryWrapper(imsDutyClass)); |
||||||
|
return R.data(detail); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 分页 代码自定义代号 |
||||||
|
*/ |
||||||
|
@GetMapping("/list") |
||||||
|
@ApiOperationSupport(order = 2) |
||||||
|
@ApiOperation(value = "分页", notes = "传入imsDutyClass") |
||||||
|
public R<IPage<ImsDutyClassEntity>> list(ImsDutyClassEntity imsDutyClass, Query query) { |
||||||
|
LambdaQueryWrapper<ImsDutyClassEntity> queryWrapper = Condition.getQueryWrapper(new ImsDutyClassEntity(),imsDutyClass); |
||||||
|
if(null != imsDutyClass.getCreateDept()){ |
||||||
|
queryWrapper.eq(ImsDutyClassEntity::getCreateDept,imsDutyClass.getCreateDept()); |
||||||
|
} |
||||||
|
queryWrapper.orderByDesc(ImsDutyClassEntity::getCreateTime); |
||||||
|
IPage<ImsDutyClassEntity> pages = imsDutyClassService.page(Condition.getPage(query), queryWrapper); |
||||||
|
return R.data(pages); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询所有班次列表(不分页) |
||||||
|
*/ |
||||||
|
@GetMapping("/getlist") |
||||||
|
@ApiOperationSupport(order = 2) |
||||||
|
@ApiOperation(value = "列表(不分页)", notes = "传入imsDutyClass") |
||||||
|
public R<List<ImsDutyClassEntity>> getlist(ImsDutyClassEntity imsDutyClass) { |
||||||
|
List<ImsDutyClassEntity> list = imsDutyClassService.getList(imsDutyClass); |
||||||
|
return R.data(list); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增或修改 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/submit") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@ApiOperation(value = "新增或修改", notes = "传入imsDutyClass") |
||||||
|
public R submit(@Valid @RequestBody ImsDutyClassEntity imsDutyClass) { |
||||||
|
return imsDutyClassService.saveOrUpdateImsDutyClass(imsDutyClass); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 7) |
||||||
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||||
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return R.status(imsDutyClassService.removeByIds(Func.toLongList(ids))); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 新增或修改 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/saveBatch") |
||||||
|
@ApiOperationSupport(order = 8) |
||||||
|
@ApiOperation(value = "批量新增", notes = "imsDutyClassEntities") |
||||||
|
public R saveBatch(@Valid @RequestBody List<ImsDutyClassEntity> imsDutyClassEntities) { |
||||||
|
//imsDutyClassService.determineThe(imsDutyClassEntities);
|
||||||
|
return R.status(imsDutyClassService.saveBatch(imsDutyClassEntities)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增或修改 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/updateBatch") |
||||||
|
@ApiOperationSupport(order = 8) |
||||||
|
@ApiOperation(value = "批量修改", notes = "imsDutyClassEntities") |
||||||
|
public R updateBatch(@Valid @RequestBody List<ImsDutyClassEntity> imsDutyClassEntities) { |
||||||
|
//imsDutyClassService.determineThe(imsDutyClassEntities);
|
||||||
|
if(CollectionUtil.isEmpty(imsDutyClassEntities)){ |
||||||
|
return R.fail("无数据"); |
||||||
|
} |
||||||
|
return imsDutyClassService.save(imsDutyClassEntities); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 类型删除 代码自定义代号 |
||||||
|
*/ |
||||||
|
@GetMapping("/typeRemove") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@ApiOperation(value = "根据班次类型 逻辑删除", notes = "传入ids") |
||||||
|
public R typeRemove(@ApiParam(value = "传班次类型Id", required = true) @RequestParam Long classTypeId) { |
||||||
|
return imsDutyClassService.typeRemove(classTypeId); |
||||||
|
} |
||||||
|
|
||||||
|
@GetMapping("/getDutyClassTree") |
||||||
|
@ApiOperationSupport(order = 10) |
||||||
|
@ApiOperation(value = "获取机构-班次类型-班次树") |
||||||
|
public R<List<DutyClassTypeTree>> getDutyClassTree(@RequestParam(required = false) @ApiParam(value = "机构id") Long deptId) { |
||||||
|
return R.data(imsDutyClassService.getDutyClassTree(deptId)); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,108 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.controller; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import io.swagger.annotations.ApiParam; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.core.tool.utils.Func; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyClassTypeEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyClassTypeService; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
|
||||||
|
import javax.validation.Valid; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 控制器 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/imsDutyClassType") |
||||||
|
@Api(value = "班次类型controller", tags = "班次类型相关操作") |
||||||
|
public class ImsDutyClassTypeController { |
||||||
|
|
||||||
|
private final IImsDutyClassTypeService imsDutyClassTypeService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@ApiOperation(value = "详情", notes = "传入imsDutyClassType") |
||||||
|
public R<ImsDutyClassTypeEntity> detail(ImsDutyClassTypeEntity imsDutyClassType) { |
||||||
|
ImsDutyClassTypeEntity detail = imsDutyClassTypeService.getOne(Condition.getQueryWrapper(imsDutyClassType)); |
||||||
|
return R.data(detail); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 分页 代码自定义代号 |
||||||
|
*/ |
||||||
|
@GetMapping("/list") |
||||||
|
@ApiOperationSupport(order = 2) |
||||||
|
@ApiOperation(value = "分页", notes = "传入imsDutyClassType") |
||||||
|
public R<IPage<ImsDutyClassTypeEntity>> list(ImsDutyClassTypeEntity imsDutyClassType, Query query) { |
||||||
|
LambdaQueryWrapper<ImsDutyClassTypeEntity> queryWrapper = Condition.getQueryWrapper(new ImsDutyClassTypeEntity(), imsDutyClassType); |
||||||
|
if (null != imsDutyClassType.getCreateDept()) { |
||||||
|
queryWrapper.eq(ImsDutyClassTypeEntity::getCreateDept, imsDutyClassType.getCreateDept()); |
||||||
|
} |
||||||
|
queryWrapper.orderByDesc(ImsDutyClassTypeEntity::getCreateTime); |
||||||
|
IPage<ImsDutyClassTypeEntity> pages = imsDutyClassTypeService.page(Condition.getPage(query), queryWrapper); |
||||||
|
return R.data(pages); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 获取所有班次类型 代码自定义代号 |
||||||
|
*/ |
||||||
|
@GetMapping("/listClassType") |
||||||
|
@ApiOperationSupport(order = 3) |
||||||
|
@ApiOperation(value = "获取所有班次类型") |
||||||
|
public R<List<ImsDutyClassTypeEntity>> listClassType(@RequestParam(value = "createDept", required = false) Long createDept) { |
||||||
|
List<ImsDutyClassTypeEntity> list = imsDutyClassTypeService.list(new LambdaQueryWrapper<ImsDutyClassTypeEntity>() {{ |
||||||
|
if (null != createDept) { |
||||||
|
eq(ImsDutyClassTypeEntity::getCreateDept, createDept); |
||||||
|
} |
||||||
|
}}); |
||||||
|
return R.data(list); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增或修改 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/submit") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@ApiOperation(value = "新增或修改", notes = "传入imsDutyClassType") |
||||||
|
public R submit(@Valid @RequestBody ImsDutyClassTypeEntity imsDutyClassType) { |
||||||
|
return imsDutyClassTypeService.saveOrUpdateImsDutyClassType(imsDutyClassType); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 7) |
||||||
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||||
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return imsDutyClassTypeService.doDeleteLogic(Func.toLongList(ids)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 获取不存在班次中的班次类型 |
||||||
|
*/ |
||||||
|
@GetMapping("/classTypeList") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@ApiOperation(value = "获取不存在班次中的班次类型", notes = "传入ids") |
||||||
|
public R<List<ImsDutyClassTypeEntity>> classTypeList(@ApiParam(value = "机构ID", required = true) @RequestParam Long createDept, @ApiParam(value = "班次类型ID", required = true) @RequestParam(required = false) Long classTypeId) { |
||||||
|
return R.data(imsDutyClassTypeService.getClassTypeList(createDept, classTypeId)); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,181 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.controller; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import io.swagger.annotations.ApiParam; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.core.tool.utils.CollectionUtil; |
||||||
|
import org.springblade.core.tool.utils.Func; |
||||||
|
import org.springblade.core.tool.utils.StringUtil; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyGroupService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.DutyGroupMemberVo; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsDutyGroupPVO; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsDutyGroupPersonVO; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsDutyGroupVO; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
|
||||||
|
import javax.validation.Valid; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 控制器 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/imsDutyGroup") |
||||||
|
@Api(value = "值班小组controller", tags = "值班小组相关操作(班组设置+人员分组)") |
||||||
|
public class ImsDutyGroupController { |
||||||
|
|
||||||
|
private final IImsDutyGroupService imsDutyGroupService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 班组详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@ApiOperation(value = "班组详情", notes = "传入imsDutyGroup") |
||||||
|
public R<ImsDutyGroupEntity> detail(ImsDutyGroupEntity imsDutyGroup) { |
||||||
|
ImsDutyGroupEntity detail = imsDutyGroupService.getOne(Condition.getQueryWrapper(imsDutyGroup)); |
||||||
|
return R.data(detail); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 分页 代码自定义代号 |
||||||
|
*/ |
||||||
|
@GetMapping("/list") |
||||||
|
@ApiOperationSupport(order = 2) |
||||||
|
@ApiOperation(value = "分页", notes = "传入imsDutyGroup") |
||||||
|
public R<IPage<ImsDutyGroupVO>> list(ImsDutyGroupEntity imsDutyGroup, Query query) { |
||||||
|
return imsDutyGroupService.list(imsDutyGroup, query); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/save") |
||||||
|
@ApiOperationSupport(order = 3) |
||||||
|
@ApiOperation(value = "新增班组", notes = "传入imsDutyGroup") |
||||||
|
public R<Boolean> save(@Valid @RequestBody ImsDutyGroupEntity imsDutyGroup) { |
||||||
|
List<ImsDutyGroupEntity> groupEntity = imsDutyGroupService.list(new LambdaQueryWrapper<ImsDutyGroupEntity>() {{ |
||||||
|
eq(ImsDutyGroupEntity::getGroupName, imsDutyGroup.getGroupName()); |
||||||
|
eq(ImsDutyGroupEntity::getCreateDept, imsDutyGroup.getCreateDept()); |
||||||
|
}}); |
||||||
|
if (CollectionUtil.isNotEmpty(groupEntity)) { |
||||||
|
return R.fail("班组名称已存在"); |
||||||
|
} |
||||||
|
return R.status(imsDutyGroupService.save(imsDutyGroup)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改班组 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/update") |
||||||
|
@ApiOperationSupport(order = 4) |
||||||
|
@ApiOperation(value = "修改班组", notes = "传入imsDutyGroup") |
||||||
|
public R<Boolean> update(@Valid @RequestBody ImsDutyGroupVO imsDutyGroup) { |
||||||
|
List<ImsDutyGroupEntity> groupEntity = imsDutyGroupService.list(new LambdaQueryWrapper<ImsDutyGroupEntity>() {{ |
||||||
|
eq(ImsDutyGroupEntity::getGroupName, imsDutyGroup.getGroupName()); |
||||||
|
ne(ImsDutyGroupEntity::getId, imsDutyGroup.getId()); |
||||||
|
eq(ImsDutyGroupEntity::getCreateDept, imsDutyGroup.getCreateDept()); |
||||||
|
}}); |
||||||
|
if (CollectionUtil.isNotEmpty(groupEntity)) { |
||||||
|
return R.fail("班组名称已存在"); |
||||||
|
} |
||||||
|
if (StringUtil.isNoneBlank(imsDutyGroup.getPersonId())) { |
||||||
|
return imsDutyGroupService.update(imsDutyGroup.toEntity(), imsDutyGroup.getPersonId()); |
||||||
|
} |
||||||
|
return R.status(imsDutyGroupService.updateById(imsDutyGroup)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 删除班组 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 5) |
||||||
|
@ApiOperation(value = "逻辑删除班组", notes = "传入ids") |
||||||
|
public R<Boolean> remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return imsDutyGroupService.doDeleteLogic(ids); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增人员分组 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/insert") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@ApiOperation(value = "新增人员分组", notes = "传入imsDutyGroup") |
||||||
|
public R<Boolean> insert(@Valid @RequestBody ImsDutyGroupVO imsDutyGroup) { |
||||||
|
return imsDutyGroupService.insert(imsDutyGroup); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 设置负责人 |
||||||
|
*/ |
||||||
|
@PostMapping("/manager") |
||||||
|
@ApiOperationSupport(order = 7) |
||||||
|
@ApiOperation(value = "设置班组长", notes = "传入imsDutyGroup") |
||||||
|
public R<Boolean> manager(@Valid @RequestBody ImsDutyGroupEntity imsDutyGroup) { |
||||||
|
return R.status(imsDutyGroupService.updateById(imsDutyGroup)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 删除人员 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove/person") |
||||||
|
@ApiOperationSupport(order = 8) |
||||||
|
@ApiOperation(value = "批量逻辑删除班组人员", notes = "传入ids") |
||||||
|
public R<Boolean> removePerson(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, boolean updateDuty) { |
||||||
|
return imsDutyGroupService.doDeleteBatchGroupP(Func.toLongList(ids), updateDuty); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 人员分组查询 |
||||||
|
*/ |
||||||
|
@PostMapping("/personGroupAll") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@ApiOperation(value = "人员分组查询", notes = "传入imsDutyGroup") |
||||||
|
public R<List<ImsDutyGroupPersonVO>> personGroupAll(@RequestParam(required = false) Long createDept) { |
||||||
|
return imsDutyGroupService.getPersonGroupAll(createDept); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 根据班组id查询人员 |
||||||
|
*/ |
||||||
|
@PostMapping("/person") |
||||||
|
@ApiOperationSupport(order = 10) |
||||||
|
@ApiOperation(value = "根据班组id查询人员", notes = "传groupId") |
||||||
|
public R<List<ImsDutyGroupPVO>> person(@ApiParam(value = "班组Id", required = true) @RequestParam Long groupid) { |
||||||
|
return imsDutyGroupService.getGroupIdByPerson(groupid); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询所有班组 负责人 is not null |
||||||
|
*/ |
||||||
|
@GetMapping("/list-manager") |
||||||
|
@ApiOperationSupport(order = 11) |
||||||
|
@ApiOperation(value = "查询所有班组(已有负责人的班组)", notes = "传入imsDutyGroup") |
||||||
|
public R<List<ImsDutyGroupEntity>> list(@ApiParam("机构ID") Long createDept) { |
||||||
|
return imsDutyGroupService.getListManager(createDept); |
||||||
|
} |
||||||
|
|
||||||
|
@GetMapping("/groupMember") |
||||||
|
@ApiOperationSupport(order = 12) |
||||||
|
@ApiOperation(value = "查询班组成员", notes = "传入imsDutyGroup") |
||||||
|
public R<List<DutyGroupMemberVo>> groupMember(@RequestParam(value = "deptId", required = false) Long deptId) { |
||||||
|
return R.data(imsDutyGroupService.groupMember(deptId)); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,243 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.controller; |
||||||
|
|
||||||
|
import com.alibaba.excel.EasyExcel; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import io.swagger.annotations.ApiParam; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springblade.core.secure.utils.AuthUtil; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.core.tool.utils.Func; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainReportExcel; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyMainService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.utils.ExcelMergeHandler; |
||||||
|
import org.springblade.hzinfo_inspect.duty.utils.ExcelTool; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ChangeDutyMainVo; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ExchangeGroupLeader; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.HomePageDutyMainInfoVo; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsSchedulingVo; |
||||||
|
import org.springblade.system.feign.ISysClient; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse; |
||||||
|
import javax.validation.Valid; |
||||||
|
import java.io.IOException; |
||||||
|
import java.net.URLEncoder; |
||||||
|
import java.nio.charset.StandardCharsets; |
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 值班信息 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/imsDutyMain") |
||||||
|
@Api(value = "值班信息主表相关操作", tags = "值班信息主表相关操作") |
||||||
|
public class ImsDutyMainController { |
||||||
|
|
||||||
|
private final IImsDutyMainService imsDutyMainService; |
||||||
|
|
||||||
|
private final ISysClient sysClient; |
||||||
|
|
||||||
|
/** |
||||||
|
* 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@ApiOperation(value = "详情", notes = "传入imsDutyMainEntity") |
||||||
|
public R<ImsDutyMainEntity> detail(ImsDutyMainEntity imsDutyMain) { |
||||||
|
ImsDutyMainEntity detail = imsDutyMainService.getOne(Condition.getQueryWrapper(imsDutyMain)); |
||||||
|
return R.data(detail); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 分页 代码自定义代号 |
||||||
|
*/ |
||||||
|
@GetMapping("/list") |
||||||
|
@ApiOperationSupport(order = 2) |
||||||
|
@ApiOperation(value = "分页", notes = "传入imsDutyMain") |
||||||
|
public R<IPage<ImsDutyMainEntity>> list(ImsDutyMainEntity imsDutyMain, Query query) { |
||||||
|
IPage<ImsDutyMainEntity> pages = imsDutyMainService.page(Condition.getPage(query), Condition.getQueryWrapper(imsDutyMain)); |
||||||
|
return R.data(pages); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 根据时间查询所有值班信息列表(不分页) |
||||||
|
*/ |
||||||
|
@GetMapping("/getList") |
||||||
|
@ApiOperationSupport(order = 3) |
||||||
|
@ApiOperation(value = "列表(不分页)", notes = "传入imsDutyMain") |
||||||
|
public R getList(@ApiParam(value = "值班时间") @Valid @RequestParam("dutyDate") String dutyDate, @ApiParam(value = "申请人ID") Long personId) { |
||||||
|
return imsDutyMainService.getByDateListAll(dutyDate, personId); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 新增或修改 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/submit") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@ApiOperation(value = "新增或修改", notes = "传入imsDutyMain") |
||||||
|
public R submit(@Valid @RequestBody ImsDutyMainEntity imsDutyMain) { |
||||||
|
return imsDutyMainService.saveOrUpdateImsDutyMain(imsDutyMain); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 删除 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 7) |
||||||
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||||
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return imsDutyMainService.deleteV2(Func.toLongList(ids)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 排班管理 |
||||||
|
*/ |
||||||
|
@PostMapping("/scheduling") |
||||||
|
@ApiOperationSupport(order = 8) |
||||||
|
@ApiOperation(value = "排班管理", notes = "") |
||||||
|
public R scheduling(@Valid @RequestBody ImsSchedulingVo imsSchedulingVo) { |
||||||
|
if (null == imsSchedulingVo.getCreateDept()) { |
||||||
|
imsSchedulingVo.setCreateDept(Long.valueOf(AuthUtil.getDeptId())); |
||||||
|
} |
||||||
|
return imsDutyMainService.getSchedulingV2(imsSchedulingVo); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 查询排班 |
||||||
|
*/ |
||||||
|
@PostMapping("/scheduling/list") |
||||||
|
@ApiOperationSupport(order = 8) |
||||||
|
@ApiOperation(value = "查询排班", notes = "传年份和月份 year month") |
||||||
|
public R schedulingList(@Valid @ApiParam(value = "年份", required = true) @RequestParam int year, |
||||||
|
@ApiParam(value = "月份", required = true) @RequestParam int month, |
||||||
|
@ApiParam(value = "机构Id", required = true) Long deptId) { |
||||||
|
if (null == deptId) { |
||||||
|
deptId = Long.valueOf(AuthUtil.getDeptId()); |
||||||
|
} |
||||||
|
return imsDutyMainService.getSchedulingListV2(year, month, deptId); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据值班id查询值班人员 |
||||||
|
*/ |
||||||
|
@PostMapping("/person") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@ApiOperation(value = "根据值班id查询人员", notes = "传id") |
||||||
|
public R person(@ApiParam(value = "值班Id", required = true) @RequestParam Long id) { |
||||||
|
return imsDutyMainService.getMainIdByPersonV2(id); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 数据清理 |
||||||
|
*/ |
||||||
|
@PostMapping("/dataDelete") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@ApiOperation(value = "数据清理", notes = "传id") |
||||||
|
public R dataDelete(@ApiParam(value = "机构ID", required = true) @RequestParam Long deptId, |
||||||
|
@ApiParam(value = "开始时间", required = true) @RequestParam String startDate, |
||||||
|
@ApiParam(value = "结束时间", required = true) @RequestParam String endDate) { |
||||||
|
return imsDutyMainService.dataDelete(deptId, startDate, endDate); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 根据值班id查询值班人员 |
||||||
|
*/ |
||||||
|
@GetMapping("/getHomePageDutyInfo") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@ApiOperation(value = "获取首页值班数据", notes = "传id") |
||||||
|
public R<List<HomePageDutyMainInfoVo>> getHomePageDutyInfo(Long deptId) { |
||||||
|
return R.data(imsDutyMainService.getHomePageDutyInfo(deptId)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 返回对应部门所有人员 |
||||||
|
*/ |
||||||
|
@GetMapping("/getAllPersonInfo") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@ApiOperation(value = "返回对应部门所有人员", notes = "") |
||||||
|
public R getAllPersonInfo(Long deptId) { |
||||||
|
return R.data(imsDutyMainService.getAllPersonInfo(deptId)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 值班人员ID对应班次信息 |
||||||
|
*/ |
||||||
|
@GetMapping("/getDutyMainInfoVoById") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@ApiOperation(value = "值班人员ID对应班次信息", notes = "") |
||||||
|
public R getDutyMainInfoVoById(@ApiParam(value = "机构ID") Long deptId, @ApiParam(value = "申请人ID") Long personId) { |
||||||
|
return imsDutyMainService.getDutyEmergencyEntityById(deptId, personId); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 灵活调入,调出 |
||||||
|
*/ |
||||||
|
@PostMapping("/updateDutyMainInfoVoById") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@ApiOperation(value = "灵活调入,调出", notes = "") |
||||||
|
public R updateDutyMainInfoVoById(@RequestBody ChangeDutyMainVo changeDutyMainVo) { |
||||||
|
return imsDutyMainService.updateDutyMainInfoVoById(changeDutyMainVo); |
||||||
|
} |
||||||
|
|
||||||
|
//班组长交换班
|
||||||
|
@PostMapping("/changDutyMainGroupLeader") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@ApiOperation(value = "班组长交换班", notes = "") |
||||||
|
public R changDutyMainGroupLeader(@RequestBody ExchangeGroupLeader changeGroupLeader) { |
||||||
|
return imsDutyMainService.changDutyMainGroupLeader(changeGroupLeader); |
||||||
|
} |
||||||
|
|
||||||
|
@GetMapping("/exportDuty") |
||||||
|
@ApiOperation(value = "导出排班计划") |
||||||
|
public void exportTemplate(HttpServletResponse response, String time, Long deptId) throws IOException { |
||||||
|
Integer year; |
||||||
|
Integer month; |
||||||
|
if (Func.isEmpty(deptId)) { |
||||||
|
deptId = Long.valueOf(AuthUtil.getDeptId()); |
||||||
|
} |
||||||
|
if (Func.isEmpty(time)) { |
||||||
|
Date date = new Date(); |
||||||
|
year = date.getYear(); |
||||||
|
month = date.getMonth()+1; |
||||||
|
}else { |
||||||
|
String[] split = time.split("-"); |
||||||
|
year=Integer.valueOf(split[0]); |
||||||
|
month=Integer.valueOf(split[1]); |
||||||
|
} |
||||||
|
List<ImsDutyMainReportExcel> list = imsDutyMainService.getExcelDutyData(year, month, deptId); |
||||||
|
|
||||||
|
String deptName = sysClient.getDeptName(deptId).getData(); |
||||||
|
|
||||||
|
response.setCharacterEncoding(StandardCharsets.UTF_8.name()); |
||||||
|
response.setHeader("content-Type", "application/vnd.ms-excel"); |
||||||
|
response.setHeader("Content-Disposition", |
||||||
|
"attachment;filename=" + URLEncoder.encode(year + "年" + month + "月" + deptName + "项目排班表.xlsx", StandardCharsets.UTF_8.name())); |
||||||
|
|
||||||
|
// 从第二行后开始合并
|
||||||
|
int mergeRowIndex = 2; |
||||||
|
// 需要合并的列
|
||||||
|
int[] mergeColumeIndex = {0}; |
||||||
|
|
||||||
|
ExcelTool.resetCellMaxTextLength(); |
||||||
|
// 导出Excel,合并第一列相同内容的单元格
|
||||||
|
EasyExcel.write(response.getOutputStream(), ImsDutyMainReportExcel.class) |
||||||
|
.registerWriteHandler(new ExcelMergeHandler(mergeRowIndex, mergeColumeIndex)).sheet().doWrite(list); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,54 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.controller; |
||||||
|
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import io.swagger.annotations.ApiParam; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.core.tool.utils.Func; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainTemplateEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyMainTemplateService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsSchedulingVo; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
; |
||||||
|
|
||||||
|
/** |
||||||
|
* 控制器 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/imsDutyMainTemplate") |
||||||
|
@Api(value = "排班模版controller", tags = "排班模版") |
||||||
|
public class ImsDutyMainTemplateController { |
||||||
|
private final IImsDutyMainTemplateService iImsDutyMainTemplateService; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 分页 代码自定义代号 |
||||||
|
*/ |
||||||
|
@GetMapping("/listAll") |
||||||
|
@ApiOperationSupport(order = 2) |
||||||
|
@ApiOperation(value = "查询 不分页", notes = "传入ImsDutyMainTemplateEntity") |
||||||
|
public R<List<ImsSchedulingVo>> list(ImsDutyMainTemplateEntity entity) { |
||||||
|
return R.data(iImsDutyMainTemplateService.doListAll(entity)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 删除 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 3) |
||||||
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||||
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return R.status(iImsDutyMainTemplateService.removeByIds(Func.toLongList(ids))); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,244 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.controller; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import io.swagger.annotations.ApiParam; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springblade.core.secure.utils.AuthUtil; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.core.tool.utils.BeanUtil; |
||||||
|
import org.springblade.core.tool.utils.Func; |
||||||
|
import org.springblade.hzinfo_inspect.duty.dto.ImsDutyRecDTO; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyEmergencyEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyRecEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyEmergencyService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyRecService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsDutyEmergencyVo; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsDutyRecVO; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
|
||||||
|
import javax.validation.Valid; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 控制器 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/imsDutyRec") |
||||||
|
@Api(value = "值班交接controller", tags = "值班交接相关操作(交接班管理)") |
||||||
|
public class ImsDutyRecController { |
||||||
|
|
||||||
|
private final IImsDutyRecService imsDutyRecService; |
||||||
|
private final IImsDutyEmergencyService iImsDutyEmergencyService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@ApiOperation(value = "详情", notes = "传入imsDutyRec") |
||||||
|
public R<ImsDutyRecVO> detail(ImsDutyRecEntity imsDutyRec) { |
||||||
|
ImsDutyRecEntity detail = imsDutyRecService.getOne(Condition.getQueryWrapper(imsDutyRec)); |
||||||
|
ImsDutyRecVO vo = BeanUtil.copy(detail, ImsDutyRecVO.class); |
||||||
|
return R.data(imsDutyRecService.getDetail(vo)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 分页 代码自定义代号 |
||||||
|
*/ |
||||||
|
@GetMapping("/list") |
||||||
|
@ApiOperationSupport(order = 2) |
||||||
|
@ApiOperation(value = "分页", notes = "传入imsDutyRec") |
||||||
|
public R<IPage<ImsDutyRecEntity>> list(ImsDutyRecEntity imsDutyRec, Query query) { |
||||||
|
IPage<ImsDutyRecEntity> pages = imsDutyRecService.page(Condition.getPage(query), Condition.getQueryWrapper(imsDutyRec)); |
||||||
|
return R.data(pages); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 自定义分页 附件表 |
||||||
|
*/ |
||||||
|
@GetMapping("/pageList") |
||||||
|
@ApiOperationSupport(order = 3) |
||||||
|
@ApiOperation(value = "分页--交接班记录", notes = "传入entity") |
||||||
|
public R<IPage<ImsDutyRecVO>> page(ImsDutyRecVO vo, Query query) { |
||||||
|
IPage<ImsDutyRecVO> pages = imsDutyRecService.getRecVoPage(Condition.getPage(query), vo); |
||||||
|
return R.data(pages); |
||||||
|
} |
||||||
|
|
||||||
|
@PostMapping("/submit") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@ApiOperation(value = "新增或修改,然后提交,开始工作流程", notes = "传入imsDutyRec") |
||||||
|
public R submit(@Valid @RequestBody ImsDutyRecEntity imsDutyRec) { |
||||||
|
return imsDutyRecService.submit(imsDutyRec); |
||||||
|
//return R.status(imsDutyRecService.submitV2(imsDutyRec,vo));
|
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增,交接班记录 |
||||||
|
*/ |
||||||
|
@PostMapping("/save") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@ApiOperation(value = "新增,交接班记录", notes = "传入imsDutyRec") |
||||||
|
public R save(@Valid @RequestBody ImsDutyRecEntity imsDutyRec) { |
||||||
|
return R.status(imsDutyRecService.save(imsDutyRec)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 删除 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 7) |
||||||
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||||
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return R.status(imsDutyRecService.removeByIds(Func.toLongList(ids))); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 新增或修改 代码自定义代号 |
||||||
|
*/ |
||||||
|
@PostMapping("/complete-task") |
||||||
|
@ApiOperationSupport(order = 8) |
||||||
|
@ApiOperation(value = "处理工作流程", notes = "传入flow") |
||||||
|
public R submit(@Valid @RequestBody ImsDutyRecDTO dto) { |
||||||
|
// return R.success("接口已弃用");
|
||||||
|
return R.status(imsDutyRecService.dealDutyRecFlow(dto)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/getTheCurrentDuty") |
||||||
|
@ApiOperationSupport(order = 10) |
||||||
|
@ApiOperation(value = "获取当前值班班组") |
||||||
|
public R<ImsDutyRecVO> getTheCurrentDuty(@ApiParam(value = "机构ID") Long deptId, String dutyDate) { |
||||||
|
if (null == deptId) { |
||||||
|
deptId = Long.valueOf(AuthUtil.getDeptId()); |
||||||
|
} |
||||||
|
|
||||||
|
return imsDutyRecService.getTheManinGroupRec(deptId, dutyDate); |
||||||
|
} |
||||||
|
|
||||||
|
@GetMapping("/getQrCode") |
||||||
|
@ApiOperationSupport(order = 11) |
||||||
|
@ApiOperation(value = "生成二维码(签到)", notes = "timeToRub") |
||||||
|
public R getQrCode() { |
||||||
|
return R.data(imsDutyRecService.getQRCode()); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 指定当天班组为值班中 |
||||||
|
*/ |
||||||
|
@GetMapping("/update") |
||||||
|
@ApiOperationSupport(order = 12) |
||||||
|
@ApiOperation(value = "指定当天班组为值班中", notes = "传入entity") |
||||||
|
public R update(String dutyDate, Long id) { |
||||||
|
return imsDutyRecService.doUpdate(dutyDate, id); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 交班 |
||||||
|
*/ |
||||||
|
@GetMapping("/judgeDelayedHand") |
||||||
|
@ApiOperationSupport(order = 13) |
||||||
|
@ApiOperation(value = "交班", notes = "传入entity") |
||||||
|
public R judgeDelayedHand(ImsDutyMainEntity entity) { |
||||||
|
imsDutyRecService.judgeDelayedHand(entity, null); |
||||||
|
return R.success("消息提醒成功"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 接班 |
||||||
|
*/ |
||||||
|
@GetMapping("/judgeDelayedCarry") |
||||||
|
@ApiOperationSupport(order = 13) |
||||||
|
@ApiOperation(value = "接班", notes = "传入entity") |
||||||
|
public R judgeDelayedCarry(ImsDutyMainEntity entity) { |
||||||
|
imsDutyRecService.judgeDelayedCarry(entity, null); |
||||||
|
return R.success("消息提醒成功"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 批量修改-测试 |
||||||
|
*/ |
||||||
|
@GetMapping("/batchUpdate-test") |
||||||
|
@ApiOperationSupport(order = 13) |
||||||
|
@ApiOperation(value = "批量修改-测试", notes = "") |
||||||
|
public R batchUpdateTest() { |
||||||
|
return imsDutyRecService.batchUpdateTest(); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 测试-交接班时间判断逻辑 |
||||||
|
*/ |
||||||
|
@GetMapping("/ClassDate-test") |
||||||
|
@ApiOperationSupport(order = 13) |
||||||
|
@ApiOperation(value = "批量修改-测试", notes = "") |
||||||
|
public R testClassDate(@RequestParam("id") Long id, @RequestParam("type") Integer type) { |
||||||
|
return R.data(imsDutyRecService.testClassDate(id, type)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据流程ID批量删除 |
||||||
|
*/ |
||||||
|
@GetMapping("/delProcessInstanceIds") |
||||||
|
@ApiOperationSupport(order = 20) |
||||||
|
@ApiOperation(value = "根据流程ID批量删除", notes = "") |
||||||
|
public R processInstanceIds(@RequestParam("processInstanceIds") String processInstanceIds) { |
||||||
|
return R.data(imsDutyRecService.delProcessInstanceIds(processInstanceIds)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 新增:突发事件记录 |
||||||
|
*/ |
||||||
|
@PostMapping("/addEmergency") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@ApiOperation(value = "新增突发事件", notes = "传入imsDutyEmergencyEntity") |
||||||
|
public R addEmergency(@Valid @RequestBody ImsDutyEmergencyEntity imsDutyEmergencyEntity) { |
||||||
|
return iImsDutyEmergencyService.saveEntity(imsDutyEmergencyEntity); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除:突发事件记录 |
||||||
|
*/ |
||||||
|
@PostMapping("/deleteEmergency") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@ApiOperation(value = "删除突发事件记录", notes = "传入imsDutyEmergencyEntity") |
||||||
|
public R deleteEmergency(@RequestBody ImsDutyEmergencyEntity imsDutyEmergencyEntity) { |
||||||
|
//TODO 是否要加权限控制
|
||||||
|
return iImsDutyEmergencyService.deleteEntity(imsDutyEmergencyEntity); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询:突发事件记录 |
||||||
|
*/ |
||||||
|
@PostMapping("/queryEmergency") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@ApiOperation(value = "查询突发事件记录", notes = "传入imsDutyEmergencyEntity") |
||||||
|
public R queryEmergency(@Valid @RequestBody ImsDutyEmergencyVo imsDutyEmergencyVo, Query query) { |
||||||
|
return iImsDutyEmergencyService.queryEntity(imsDutyEmergencyVo, query); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/changeShift") |
||||||
|
@ApiOperationSupport(order = 21) |
||||||
|
@ApiOperation(value = "交班", notes = "传入imsDutyRecDTO交接班信息") |
||||||
|
public R changeShift(@Valid @RequestBody ImsDutyRecDTO imsDutyRecDTO) { |
||||||
|
return R.status(imsDutyRecService.changeShift(imsDutyRecDTO)); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,66 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.controller; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springblade.core.secure.utils.AuthUtil; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyRecQRRecordEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyRecQRRecordService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsDutyRecQRRecordExtendVo; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsDutyRecQRRecordVo; |
||||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
import javax.validation.Valid; |
||||||
|
|
||||||
|
/** |
||||||
|
* 控制器 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/imsDutyRecQRrecord") |
||||||
|
@Api(value = "交接班扫码记录", tags = "交接班扫码相关操作") |
||||||
|
public class ImsDutyRecQRRecordController { |
||||||
|
|
||||||
|
private final IImsDutyRecQRRecordService recQRRecordService; |
||||||
|
|
||||||
|
/** |
||||||
|
*新增,交接班扫码记录 |
||||||
|
*/ |
||||||
|
@PostMapping("/save") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@ApiOperation(value = "新增,交接班扫码记录", notes = "传入imsDutyRecQRRecordEntity") |
||||||
|
public R save(@Valid @RequestBody ImsDutyRecQRRecordExtendVo vo){ |
||||||
|
ImsDutyRecQRRecordEntity imsDutyRecQRRecordEntity = new ImsDutyRecQRRecordEntity(); |
||||||
|
imsDutyRecQRRecordEntity.setDutyId(Long.valueOf(vo.getDutyId())); |
||||||
|
imsDutyRecQRRecordEntity.setPersonId(AuthUtil.getUserId()); |
||||||
|
imsDutyRecQRRecordEntity.setTenantId(AuthUtil.getTenantId()); |
||||||
|
imsDutyRecQRRecordEntity.setIsDeleted(0); |
||||||
|
return recQRRecordService.doSave(imsDutyRecQRRecordEntity); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
*/ |
||||||
|
/** |
||||||
|
* 自定义分页 附件表 |
||||||
|
*/ |
||||||
|
@PostMapping("/pageList") |
||||||
|
@ApiOperationSupport(order = 3) |
||||||
|
@ApiOperation(value = "分页--交接班扫码记录", notes = "传入vo") |
||||||
|
public R<IPage<ImsDutyRecQRRecordVo>> page(@Valid @RequestBody ImsDutyRecQRRecordVo vo, Query query) { |
||||||
|
return R.data(recQRRecordService.doPageList(Condition.getPage(query), vo)); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,166 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.feign; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import org.springblade.core.tool.utils.*; |
||||||
|
import org.springblade.hzinfo_inspect.duty.constants.DutyConstants; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyEmergencyEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupPEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyRecEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyEmergencyService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyGroupPService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyMainService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyRecService; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.*; |
||||||
|
import org.springblade.system.user.cache.UserCache; |
||||||
|
import org.springblade.system.user.entity.User; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.stream.Collectors; |
||||||
|
|
||||||
|
@RestController |
||||||
|
public class DutyClient implements IDutyClient { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
IImsDutyMainService dutyMainService; |
||||||
|
@Autowired |
||||||
|
IImsDutyGroupPService groupService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
IImsDutyEmergencyService emergencyService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
IImsDutyRecService dutyRecService; |
||||||
|
|
||||||
|
@Override |
||||||
|
public EngineerDutyVo engineerDuty(Long deptId) { |
||||||
|
// 步骤1.查询机构值班记录
|
||||||
|
EngineerDutyVo duty = dutyMainService.engineerDuty(deptId); |
||||||
|
if (ObjectUtil.isEmpty(duty) || ObjectUtil.isEmpty(duty.getDutyId())) { |
||||||
|
return new EngineerDutyVo(); |
||||||
|
} |
||||||
|
// 步骤2.班组长信息 : 手机号、姓名
|
||||||
|
User manager = UserCache.getUser(duty.getManagerId()); |
||||||
|
if (ObjectUtil.isNotEmpty(manager)) { |
||||||
|
duty.setManagerAvatar(manager.getAvatar()); |
||||||
|
duty.setManagerName(manager.getRealName()); |
||||||
|
duty.setManagerPhone(manager.getPhone()); |
||||||
|
} |
||||||
|
// 步骤3.班组成员
|
||||||
|
List<ImsDutyGroupPEntity> members = groupService.selectByGroupId(duty.getGroupId()); |
||||||
|
if (CollectionUtil.isNotEmpty(members)) { |
||||||
|
duty.setMembers(members.stream().filter(o -> !o.getPersonId().equals(duty.getManagerId())).map(member -> { |
||||||
|
User result = UserCache.getUser(member.getPersonId()); |
||||||
|
AuditVo auditVo = new AuditVo(); |
||||||
|
auditVo.setPersonId(member.getPersonId()); |
||||||
|
if (ObjectUtil.isNotEmpty(result)) { |
||||||
|
auditVo.setPersonAvatar(result.getAvatar()); |
||||||
|
auditVo.setPersonName(result.getRealName()); |
||||||
|
auditVo.setPhone(result.getPhone()); |
||||||
|
} |
||||||
|
return auditVo; |
||||||
|
}).collect(Collectors.toList())); |
||||||
|
} |
||||||
|
// 步骤4.值班记录
|
||||||
|
List<ImsDutyEmergencyEntity> emergencys = emergencyService.list(Wrappers.<ImsDutyEmergencyEntity>lambdaQuery() |
||||||
|
.like(ImsDutyEmergencyEntity::getDutyTime, DateUtil.format(duty.getDateTime(), DateUtil.PATTERN_DATETIME)) |
||||||
|
.eq(ImsDutyEmergencyEntity::getDutyClass, duty.getClassId()) |
||||||
|
); |
||||||
|
if (CollectionUtil.isNotEmpty(emergencys)) { |
||||||
|
duty.setDutyRecord(emergencys.stream().map(emergency -> { |
||||||
|
DutyRecordVo record = new DutyRecordVo(); |
||||||
|
record.setTime(DateUtil.format(emergency.getRegisterTime(), DateUtil.PATTERN_DATETIME)); |
||||||
|
record.setContent(emergency.getEventInfo()); |
||||||
|
return record; |
||||||
|
}).collect(Collectors.toList())); |
||||||
|
} |
||||||
|
return duty; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public RelationshipTeamVo relationshipTeam(Long dutyId, Long isQueryFlag) { |
||||||
|
RelationshipTeamVo team = new RelationshipTeamVo(); |
||||||
|
// 步骤1.查询上一班组、下一班组
|
||||||
|
if (DutyConstants.PREVIOUS_TEAM.equals(isQueryFlag)) { |
||||||
|
team = dutyMainService.previousTeam(dutyId); |
||||||
|
} else if (DutyConstants.NEXT_TEAM.equals(isQueryFlag)) { |
||||||
|
team = dutyMainService.nextTeam(dutyId); |
||||||
|
} |
||||||
|
if (ObjectUtil.isEmpty(team) || ObjectUtil.isEmpty(team.getDutyId())) { |
||||||
|
return team; |
||||||
|
} |
||||||
|
Long managerId; |
||||||
|
// 步骤2.班组长信息 : 手机号、姓名
|
||||||
|
if (StringUtil.isNotBlank(team.getManagerId())) { |
||||||
|
managerId = Long.valueOf(team.getManagerId()); |
||||||
|
User user = UserCache.getUser(managerId); |
||||||
|
if (ObjectUtil.isNotEmpty(user)) { |
||||||
|
team.setManagerAvatar(user.getAvatar()); |
||||||
|
team.setManagerName(user.getRealName()); |
||||||
|
team.setManagerPhone(user.getPhone()); |
||||||
|
} |
||||||
|
} else { |
||||||
|
managerId = null; |
||||||
|
} |
||||||
|
// 步骤3.班组成员
|
||||||
|
if (ObjectUtil.isNotEmpty(team.getGroupId())) { |
||||||
|
List<ImsDutyGroupPEntity> members = groupService.selectByGroupId(team.getGroupId()); |
||||||
|
if (CollectionUtil.isNotEmpty(members)) { |
||||||
|
team.setMembers(members.stream().filter(o -> ObjectUtil.isEmpty(managerId) || !o.getPersonId().equals(managerId)).map(member -> { |
||||||
|
User memberUser = UserCache.getUser(member.getPersonId()); |
||||||
|
AuditVo auditVo = new AuditVo(); |
||||||
|
if (ObjectUtil.isNotEmpty(memberUser)) { |
||||||
|
auditVo.setPersonId(memberUser.getId()); |
||||||
|
auditVo.setPersonAvatar(memberUser.getAvatar()); |
||||||
|
auditVo.setPersonName(memberUser.getRealName()); |
||||||
|
auditVo.setPhone(memberUser.getPhone()); |
||||||
|
} |
||||||
|
return auditVo; |
||||||
|
}).collect(Collectors.toList())); |
||||||
|
} |
||||||
|
} |
||||||
|
// 步骤4.值班记录
|
||||||
|
List<ImsDutyEmergencyEntity> emergencys = emergencyService.list(Wrappers.<ImsDutyEmergencyEntity>lambdaQuery() |
||||||
|
.like(ImsDutyEmergencyEntity::getDutyTime, DateUtil.format(team.getDutyDate(), DateUtil.PATTERN_DATETIME)) |
||||||
|
.eq(ImsDutyEmergencyEntity::getDutyClass, team.getClassId()) |
||||||
|
); |
||||||
|
if (CollectionUtil.isNotEmpty(emergencys)) { |
||||||
|
team.setDutyRecord(emergencys.stream().map(emergency -> { |
||||||
|
DutyRecordVo record = new DutyRecordVo(); |
||||||
|
record.setTime(DateUtil.format(emergency.getRegisterTime(), DateUtil.PATTERN_DATETIME)); |
||||||
|
record.setContent(emergency.getEventInfo()); |
||||||
|
return record; |
||||||
|
}).collect(Collectors.toList())); |
||||||
|
} |
||||||
|
return team; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public ImsDutyRecVO handover(Long dutyId) { |
||||||
|
ImsDutyMainEntity imsDutyMainEntity = dutyMainService.getByIdOne(dutyId); |
||||||
|
if (ObjectUtil.isEmpty(imsDutyMainEntity)) { |
||||||
|
return new ImsDutyRecVO(); |
||||||
|
} |
||||||
|
dutyId = imsDutyMainEntity.getPreDutyId(); |
||||||
|
ImsDutyRecEntity detail = dutyRecService.getOne(Wrappers.<ImsDutyRecEntity>lambdaQuery() |
||||||
|
.eq(ImsDutyRecEntity::getDutyId, dutyId)); |
||||||
|
if (ObjectUtil.isEmpty(detail)) { |
||||||
|
return new ImsDutyRecVO(); |
||||||
|
} |
||||||
|
ImsDutyRecVO dutyRec = BeanUtil.copy(detail, ImsDutyRecVO.class); |
||||||
|
dutyRec.setDutyId(imsDutyMainEntity.getPreDutyId()); |
||||||
|
return dutyRecService.getDetail(dutyRec); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<DutyShiftRecord> dutyRecordList(String startTime, String endTime ,Integer limit) { |
||||||
|
return dutyRecService.dutyRecordList(startTime, endTime , limit); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<DutyLog> dutyLogList(String startTime, String endTime, Integer limit){ |
||||||
|
return dutyRecService.dutyLogList(startTime, endTime, limit); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,66 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.job; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.xxl.job.core.biz.model.ReturnT; |
||||||
|
import com.xxl.job.core.handler.annotation.XxlJob; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springblade.core.tool.utils.ObjectUtil; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyMainEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.service.IImsDutyMainService; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.boot.CommandLineRunner; |
||||||
|
import org.springframework.data.redis.core.RedisTemplate; |
||||||
|
import org.springframework.stereotype.Component; |
||||||
|
|
||||||
|
import java.util.*; |
||||||
|
import java.util.stream.Collectors; |
||||||
|
|
||||||
|
@Component |
||||||
|
@Slf4j |
||||||
|
public class DutyMainJob implements CommandLineRunner { |
||||||
|
@Autowired |
||||||
|
private IImsDutyMainService mainService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
RedisTemplate redisTemplate; |
||||||
|
|
||||||
|
public ReturnT<String> dutyClassCache(){ |
||||||
|
|
||||||
|
Date now=new Date(); |
||||||
|
String start= DateUtil.format(now,DateUtil.PATTERN_DATE); |
||||||
|
|
||||||
|
Date now_2=DateUtil.plusDays(now,2); |
||||||
|
String end=DateUtil.format(now_2,DateUtil.PATTERN_DATE); |
||||||
|
List<ImsDutyMainEntity> list = mainService.list(new LambdaQueryWrapper<ImsDutyMainEntity>() {{ |
||||||
|
ge(ImsDutyMainEntity::getDutyDate, start); |
||||||
|
le(ImsDutyMainEntity::getDutyDate, end); |
||||||
|
}}); |
||||||
|
|
||||||
|
|
||||||
|
for(ImsDutyMainEntity entity:list) { |
||||||
|
if (ObjectUtil.isNotEmpty(entity)) { |
||||||
|
Map<String,Object> vo = new HashMap<>(); |
||||||
|
vo.put("mainId", entity.getId()); |
||||||
|
String[] persons = entity.getDutyPersonIds().split("\\^"); |
||||||
|
//string 转为 long
|
||||||
|
List<Long> personList = Arrays.stream(persons) |
||||||
|
.map(s -> Long.parseLong(s.trim())).collect(Collectors.toList()); |
||||||
|
vo.put("persons", personList); |
||||||
|
|
||||||
|
String date=DateUtil.format(entity.getDutyDate(),"MMdd"); |
||||||
|
Long classId=entity.getClassId(); |
||||||
|
redisTemplate.opsForValue().set("inspect:duty:"+date+":"+ classId,vo); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
return ReturnT.SUCCESS; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@Override |
||||||
|
public void run(String... args) throws Exception {//项目启动后执行一次
|
||||||
|
dutyClassCache(); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,16 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.mapper; |
||||||
|
|
||||||
|
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.DutyGroupGeneratingCapacityEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 班组发电量 Mapper 接口 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lx |
||||||
|
* @since 2022-02-24 |
||||||
|
*/ |
||||||
|
public interface DutyGroupGeneratingCapacityMapper extends UserDataScopeBaseMapper<DutyGroupGeneratingCapacityEntity> { |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,30 @@ |
|||||||
|
<?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="org.springblade.hzinfo_inspect.duty.mapper.DutyGroupGeneratingCapacityMapper"> |
||||||
|
|
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="BaseResultMap" type="org.springblade.hzinfo_inspect.duty.entity.DutyGroupGeneratingCapacityEntity"> |
||||||
|
<id column="ID" property="id" /> |
||||||
|
<result column="DUTY_DEPT" property="dutyDept" /> |
||||||
|
<result column="DATE_TIME" property="dateTime" /> |
||||||
|
<result column="GROUP_ID" property="groupId" /> |
||||||
|
<result column="EM_CODE" property="emCode" /> |
||||||
|
<result column="START_TIME" property="startTime" /> |
||||||
|
<result column="END_TIME" property="endTime" /> |
||||||
|
<result column="GENERATING_CAPACITY" property="generatingCapacity" /> |
||||||
|
<result column="TENANT_ID" property="tenantId" /> |
||||||
|
<result column="CREATE_TIME" property="createTime" /> |
||||||
|
<result column="UPDATE_TIME" property="updateTime" /> |
||||||
|
<result column="CREATE_USER" property="createUser" /> |
||||||
|
<result column="UPDATE_USER" property="updateUser" /> |
||||||
|
<result column="IS_DELETED" property="isDeleted" /> |
||||||
|
<result column="STATUS" property="status" /> |
||||||
|
<result column="CREATE_DEPT" property="createDept" /> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
<!-- 通用查询结果列 --> |
||||||
|
<sql id="Base_Column_List"> |
||||||
|
ID, STATION_ID, DATE_TIME, GROUP_ID,EM_CODE, START_TIME, END_TIME, GENERATING_CAPACITY, TENANT_ID, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_DELETED, STATUS, CREATE_DEPT |
||||||
|
</sql> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,16 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.mapper; |
||||||
|
|
||||||
|
|
||||||
|
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.AnalyseExample; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* Mapper 接口 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
public interface ImsAnalyseExampleMapper extends UserDataScopeBaseMapper<AnalyseExample> { |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,16 @@ |
|||||||
|
<?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="org.springblade.hzinfo_inspect.duty.mapper.ImsAnalyseExampleMapper"> |
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="ims_duty_recResultMap" type="org.springblade.hzinfo_inspect.duty.entity.AnalyseExample"> |
||||||
|
<result column="ID" property="id"/> |
||||||
|
<result column="SITE_ID" property="siteId"/> |
||||||
|
<result column="SITE_NAME" property="siteName"/> |
||||||
|
<result column="EQUIPMENT_ID" property="equipmentId"/> |
||||||
|
<result column="EQUIPMENT_NAME" property="equipmentName"/> |
||||||
|
<result column="DEVICE_CODE" property="deviceCode"/> |
||||||
|
<result column="ANALYSE_NAME" property="analyseName"/> |
||||||
|
<result column="PROPERTY_IDS" property="propertyIds"/> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,21 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.core.datascope.annotation.UserDataAuth; |
||||||
|
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyChangeEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsDutyChangeTowVo; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* Mapper 接口 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
public interface ImsDutyChangeMapper extends UserDataScopeBaseMapper<ImsDutyChangeEntity> { |
||||||
|
|
||||||
|
@UserDataAuth |
||||||
|
List<ImsDutyChangeTowVo> selectListDetails(IPage page); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,39 @@ |
|||||||
|
<?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="org.springblade.hzinfo_inspect.duty.mapper.ImsDutyChangeMapper"> |
||||||
|
|
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="ims_duty_changeResultMap" type="org.springblade.hzinfo_inspect.duty.entity.ImsDutyChangeEntity"> |
||||||
|
<result column="CLASS_ID" property="classId"/> |
||||||
|
<result column="APPLY_PERSON_ID" property="applyPersonId"/> |
||||||
|
<result column="APPLY_DATE" property="applyDate"/> |
||||||
|
<result column="APPLY_DUTY_ID" property="applyDutyId"/> |
||||||
|
<result column="ACCEPT_PERSON_ID" property="acceptPersonId"/> |
||||||
|
<result column="ACCEPT_DATE" property="acceptDate"/> |
||||||
|
<result column="ACCEPT_DUTY_ID" property="acceptDutyId"/> |
||||||
|
<result column="PROCESS_DEFINITION_KEY" property="processDefinitionKey"/> |
||||||
|
<result column="PROCESS_INSTANCE_ID" property="processInstanceId"/> |
||||||
|
<result column="MANAGER" property="manager"/> |
||||||
|
<result column="REASON" property="reason"/> |
||||||
|
</resultMap> |
||||||
|
<select id="selectListDetails" resultType="org.springblade.hzinfo_inspect.duty.vo.ImsDutyChangeTowVo"> |
||||||
|
SELECT DC.*, |
||||||
|
DSCA.`CLASS_NAME` AS applyClassName, |
||||||
|
DSCB.`CLASS_NAME` AS acceptClassName, |
||||||
|
DGA.`GROUP_NAME` AS applyGroupName, |
||||||
|
DGB.`GROUP_NAME` AS acceptGroupName, |
||||||
|
DCTA.`CLASS_TYPE_NAME` AS applyClassTypeName, |
||||||
|
DCTB.`CLASS_TYPE_NAME` AS acceptClassTypeName |
||||||
|
FROM hz_ims_duty_change DC |
||||||
|
LEFT JOIN hz_ims_duty_main DMA ON DC.`APPLY_DUTY_ID` = DMA.`ID` |
||||||
|
LEFT JOIN hz_ims_duty_main DMB ON DC.`ACCEPT_DUTY_ID` = DMB.`ID` |
||||||
|
LEFT JOIN hz_ims_duty_class DSCA ON DMA.`CLASS_ID` = DSCA.`ID` |
||||||
|
LEFT JOIN hz_ims_duty_class DSCB ON DMB.`CLASS_ID` = DSCB.`ID` |
||||||
|
LEFT JOIN hz_ims_duty_group DGA ON DMA.`DUTY_GROUP_ID` = DGA.`ID` |
||||||
|
LEFT JOIN hz_ims_duty_group DGB ON DMA.`DUTY_GROUP_ID` = DGB.`ID` |
||||||
|
LEFT JOIN hz_ims_duty_class_type DCTA ON DSCA.CLASS_TYPE_ID = DCTA.`ID` |
||||||
|
LEFT JOIN hz_ims_duty_class_type DCTB ON DSCB.CLASS_TYPE_ID = DCTB.`ID` |
||||||
|
where DC.IS_DELETED = 0 |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,42 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.mapper; |
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
import org.springblade.core.datascope.annotation.UserDataAuth; |
||||||
|
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyClassEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.DutyClassTypeTree; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsDutyClassVO; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* Mapper 接口 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
public interface ImsDutyClassMapper extends UserDataScopeBaseMapper<ImsDutyClassEntity> { |
||||||
|
/** |
||||||
|
* 查询所有班次(不分页) |
||||||
|
* @param imsDutyClass |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@UserDataAuth |
||||||
|
List<ImsDutyClassEntity> getList(ImsDutyClassEntity imsDutyClass); |
||||||
|
|
||||||
|
@UserDataAuth |
||||||
|
ImsDutyClassVO getClassTypeId(); |
||||||
|
|
||||||
|
List<ImsDutyClassEntity> selectListByClassTypeId(Long classTypeId); |
||||||
|
|
||||||
|
|
||||||
|
Integer selectJoinClassTypeId(List<Long> list); |
||||||
|
|
||||||
|
String getClassTypeIds(@Param("createDept") Long createDept, @Param("classTypeId") Long classTypeId); |
||||||
|
|
||||||
|
List<DutyClassTypeTree> getDutyClassTree(@Param("deptId")Long deptId); |
||||||
|
|
||||||
|
List<DutyClassTypeTree> getDutyClassByType(@Param("class_type_id") Long classTypeId); |
||||||
|
|
||||||
|
List<DutyClassTypeTree> getDutyClassTypeByDept(@Param("create_dept") Long deptId); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,122 @@ |
|||||||
|
<?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="org.springblade.hzinfo_inspect.duty.mapper.ImsDutyClassMapper"> |
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="ims_duty_classResultMap" type="org.springblade.hzinfo_inspect.duty.entity.ImsDutyClassEntity"> |
||||||
|
<result column="ID" property="id"/> |
||||||
|
<result column="TENANT_ID" property="tenantId"/> |
||||||
|
<result column="CLASS_TYPE_ID" property="classTypeId"/> |
||||||
|
<result column="CLASS_NAME" property="className"/> |
||||||
|
<result column="START_TIME" property="startTime"/> |
||||||
|
<result column="END_TIME" property="endTime"/> |
||||||
|
<result column="CREATE_TIME" property="createTime"/> |
||||||
|
<result column="UPDATE_TIME" property="updateTime"/> |
||||||
|
<result column="CREATE_USER" property="createUser"/> |
||||||
|
<result column="UPDATE_USER" property="updateUser"/> |
||||||
|
<result column="IS_DELETED" property="isDeleted"/> |
||||||
|
<result column="STATUS" property="status"/> |
||||||
|
<result column="CREATE_DEPT" property="createDept"/> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
|
||||||
|
<resultMap id="deptClassTypeTree" type="org.springblade.hzinfo_inspect.duty.vo.DutyClassTypeTree"> |
||||||
|
<id column="create_dept" property="id"/> |
||||||
|
<collection property="children" column="{create_dept = create_dept}" select="getDutyClassTypeByDept"></collection> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
<resultMap id="dutyClassTypeTree" type="org.springblade.hzinfo_inspect.duty.vo.DutyClassTypeTree"> |
||||||
|
<id column="id" property="id"/> |
||||||
|
<result column="class_type_name" property="name"/> |
||||||
|
<collection property="children" column="{class_type_id = id}" select="getDutyClassByType"></collection> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
<resultMap id="dutyClassTree" type="org.springblade.hzinfo_inspect.duty.vo.DutyClassTypeTree"> |
||||||
|
<id column="id" property="id"/> |
||||||
|
<result column="class_name" property="name"/> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
<sql id="Base_Column_List"> |
||||||
|
ID, TENANT_ID,CLASS_TYPE_ID,CLASS_NAME, START_TIME, END_TIME, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, |
||||||
|
IS_DELETED,STATUS,CREATE_DEPT |
||||||
|
</sql> |
||||||
|
<select id="getList" resultMap="ims_duty_classResultMap" |
||||||
|
parameterType="org.springblade.hzinfo_inspect.duty.entity.ImsDutyClassEntity"> |
||||||
|
select |
||||||
|
<include refid="Base_Column_List"/> |
||||||
|
from hz_ims_duty_class |
||||||
|
where IS_DELETED = 0 |
||||||
|
<if test="classTypeId != null"> |
||||||
|
AND CLASS_TYPE_ID = #{classTypeId} |
||||||
|
</if> |
||||||
|
<if test="className != null"> |
||||||
|
AND CLASS_NAME = #{className} |
||||||
|
</if> |
||||||
|
<if test="startTime != null"> |
||||||
|
AND START_TIME = #{startTime} |
||||||
|
</if> |
||||||
|
<if test="endTime != null"> |
||||||
|
AND END_TIME = #{endTime} |
||||||
|
</if> |
||||||
|
</select> |
||||||
|
<select id="getClassTypeId" resultType="org.springblade.hzinfo_inspect.duty.vo.ImsDutyClassVO"> |
||||||
|
SELECT |
||||||
|
GROUP_CONCAT(CONCAT(CLASS_TYPE_ID)) as classTypeIds,CREATE_USER,CREATE_DEPT |
||||||
|
FROM |
||||||
|
hz_ims_duty_class |
||||||
|
WHERE IS_DELETED = 0 |
||||||
|
</select> |
||||||
|
<select id="selectListByClassTypeId" |
||||||
|
resultType="org.springblade.hzinfo_inspect.duty.entity.ImsDutyClassEntity"> |
||||||
|
SELECT * FROM hz_ims_duty_class DC |
||||||
|
JOIN hz_ims_duty_main DM |
||||||
|
ON DC.`ID` = DM.`CLASS_ID` |
||||||
|
WHERE DC.`CLASS_TYPE_ID` = #{classTypeId} |
||||||
|
</select> |
||||||
|
<select id="selectJoinClassTypeId" resultType="java.lang.Integer"> |
||||||
|
select count(*) from hz_ims_duty_class |
||||||
|
where IS_DELETED = 0 |
||||||
|
<if test="list != null and list.size > 0"> |
||||||
|
and CLASS_TYPE_ID in |
||||||
|
<foreach collection="list" item="item" index="index" open="(" close=")" separator=","> |
||||||
|
#{item} |
||||||
|
</foreach> |
||||||
|
</if> |
||||||
|
</select> |
||||||
|
<select id="getClassTypeIds" resultType="java.lang.String"> |
||||||
|
SELECT |
||||||
|
GROUP_CONCAT(CONCAT(CLASS_TYPE_ID)) as classTypeIds |
||||||
|
FROM |
||||||
|
hz_ims_duty_class |
||||||
|
WHERE IS_DELETED = 0 |
||||||
|
and CREATE_DEPT = #{createDept} |
||||||
|
<if test="classTypeId != null"> |
||||||
|
and CLASS_TYPE_ID <> #{classTypeId} |
||||||
|
</if> |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="getDutyClassTypeByDept" resultMap="dutyClassTypeTree"> |
||||||
|
select distinct ct.id,ct.class_type_name |
||||||
|
from `hz_ims_duty_class_type` ct,`hz_ims_duty_class` dc |
||||||
|
where ct.`id` = dc.`class_type_id` |
||||||
|
and ct.`is_deleted` = 0 |
||||||
|
and dc.`is_deleted` = 0 |
||||||
|
and ct.create_dept = #{create_dept} |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="getDutyClassTree" resultMap="deptClassTypeTree"> |
||||||
|
select distinct `create_dept` |
||||||
|
from `hz_ims_duty_class_type` |
||||||
|
where `is_deleted` = 0 |
||||||
|
<if test="deptId != null and deptId != ''"> |
||||||
|
and `create_dept` = #{deptId} |
||||||
|
</if> |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="getDutyClassByType" resultMap="dutyClassTree"> |
||||||
|
select `id`,`class_name` |
||||||
|
from `hz_ims_duty_class` |
||||||
|
where `is_deleted` = 0 |
||||||
|
and `class_type_id` = #{class_type_id} |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.mapper; |
||||||
|
|
||||||
|
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyClassTypeEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* Mapper 接口 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
public interface ImsDutyClassTypeMapper extends UserDataScopeBaseMapper<ImsDutyClassTypeEntity> { |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,17 @@ |
|||||||
|
<?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="org.springblade.hzinfo_inspect.duty.mapper.ImsDutyClassTypeMapper" > |
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="ims_duty_class_typeResultMap" type="org.springblade.hzinfo_inspect.duty.entity.ImsDutyClassTypeEntity"> |
||||||
|
<result column="ID" property="id"/> |
||||||
|
<result column="TENANT_ID" property="tenantId"/> |
||||||
|
<result column="CLASS_TYPE_NAME" property="classTypeName"/> |
||||||
|
<result column="CREATE_TIME" property="createTime"/> |
||||||
|
<result column="UPDATE_TIME" property="updateTime"/> |
||||||
|
<result column="CREATE_USER" property="createUser"/> |
||||||
|
<result column="UPDATE_USER" property="updateUser"/> |
||||||
|
<result column="IS_DELETED" property="isDeleted"/> |
||||||
|
<result column="STATUS" property="status"/> |
||||||
|
<result column="CREATE_DEPT" property="createDept"/> |
||||||
|
</resultMap> |
||||||
|
</mapper> |
||||||
@ -0,0 +1,15 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.mapper; |
||||||
|
|
||||||
|
|
||||||
|
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyEmergencyEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* Mapper 接口 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
public interface ImsDutyEmergencyMapper extends UserDataScopeBaseMapper<ImsDutyEmergencyEntity> { |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,17 @@ |
|||||||
|
<?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="org.springblade.hzinfo_inspect.duty.mapper.ImsDutyEmergencyMapper"> |
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="ims_duty_recResultMap" type="org.springblade.hzinfo_inspect.duty.entity.ImsDutyEmergencyEntity"> |
||||||
|
<result column="ID" property="id"/> |
||||||
|
<result column="DUTY_TIME" property="dutyTime"/> |
||||||
|
<result column="DUTY_CLASS" property="dutyClass"/> |
||||||
|
<result column="REGISTRANT" property="registrant"/> |
||||||
|
<result column="CHARGE_PERSON" property="chargePerson"/> |
||||||
|
<result column="REGISTER_TIME" property="registerTime"/> |
||||||
|
<result column="EVENT_TITLE" property="eventTitle"/> |
||||||
|
<result column="EVENT_INFO" property="eventInfo"/> |
||||||
|
<result column="EVENT_TYPE" property="eventType"/> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,32 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
import org.springblade.core.datascope.annotation.UserDataAuth; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.DutyGroupMemberVo; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* Mapper 接口 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@Mapper |
||||||
|
public interface ImsDutyGroupMapper extends BaseMapper<ImsDutyGroupEntity> { |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据班组ID修改负责人为null |
||||||
|
* @param id |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
int updateManagerIdById(Long id); |
||||||
|
|
||||||
|
@UserDataAuth |
||||||
|
List<ImsDutyGroupEntity> selectDutyGroupJoinDutyMain(@Param("startDate") String startDate, @Param("endDate") String endDate); |
||||||
|
|
||||||
|
List<DutyGroupMemberVo> groupMember(@Param("deptId") Long deptId); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
<?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="org.springblade.hzinfo_inspect.duty.mapper.ImsDutyGroupMapper"> |
||||||
|
|
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="ims_duty_groupResultMap" type="org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupEntity"> |
||||||
|
<result column="ID" property="id"/> |
||||||
|
<result column="TENANT_ID" property="tenantId"/> |
||||||
|
<result column="GROUP_NAME" property="groupName"/> |
||||||
|
<result column="CREATE_TIME" property="createTime"/> |
||||||
|
<result column="UPDATE_TIME" property="updateTime"/> |
||||||
|
<result column="CREATE_USER" property="createUser"/> |
||||||
|
<result column="UPDATE_USER" property="updateUser"/> |
||||||
|
<result column="IS_DELETED" property="isDeleted"/> |
||||||
|
<result column="STATUS" property="status"/> |
||||||
|
<result column="CREATE_DEPT" property="createDept"/> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
<resultMap id="group_member_map" type="org.springblade.hzinfo_inspect.duty.vo.DutyGroupMemberVo"> |
||||||
|
<result column="ID" property="groupId"/> |
||||||
|
<result column="GROUP_NAME" property="groupName"/> |
||||||
|
<result column="CREATE_DEPT" property="createDept"/> |
||||||
|
<collection property="member" |
||||||
|
select="org.springblade.hzinfo_inspect.duty.mapper.ImsDutyGroupPMapper.member" |
||||||
|
column="ID"> |
||||||
|
</collection> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
<update id="updateManagerIdById"> |
||||||
|
update hz_ims_duty_group set MANAGER_ID = NULL where ID = #{id} |
||||||
|
</update> |
||||||
|
<select id="selectDutyGroupJoinDutyMain" |
||||||
|
resultType="org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupEntity"> |
||||||
|
SELECT DISTINCT DG.`ID`,DG.`GROUP_NAME`,DG.`CREATE_DEPT` FROM hz_ims_duty_group DG |
||||||
|
JOIN hz_ims_duty_main DM |
||||||
|
ON DG.`ID` = DM.`DUTY_GROUP_ID` |
||||||
|
WHERE DG.`IS_DELETED`= 0 |
||||||
|
AND DM.DUTY_DATE >= #{startDate} |
||||||
|
AND DM.DUTY_DATE <= #{endDate} |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="groupMember" resultMap="group_member_map"> |
||||||
|
SELECT ID,GROUP_NAME,CREATE_DEPT |
||||||
|
FROM HZ_IMS_DUTY_GROUP |
||||||
|
<where> |
||||||
|
IS_DELETED = 0 |
||||||
|
<if test="deptId != null"> |
||||||
|
AND CREATE_DEPT = #{deptId} |
||||||
|
</if> |
||||||
|
</where> |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,60 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupPEntity; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.DutyMemberVO; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.DutyPersonalReportVO; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.DutyReportVO; |
||||||
|
import org.springblade.hzinfo_inspect.duty.vo.ImsDutyGroupPVO; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* Mapper 接口 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
public interface ImsDutyGroupPMapper extends BaseMapper<ImsDutyGroupPEntity> { |
||||||
|
/** |
||||||
|
* 删除关联信息 |
||||||
|
* @param groupId |
||||||
|
*/ |
||||||
|
void deleteByGroupId(Long groupId); |
||||||
|
/** |
||||||
|
* 根据小组信息id查询 |
||||||
|
* @param groupId |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
List<ImsDutyGroupPEntity> selectByGroupId(Long groupId); |
||||||
|
|
||||||
|
List<ImsDutyGroupPEntity> selectByGroupIds(@Param("groupId") List<Long> groupId); |
||||||
|
|
||||||
|
void deleteBatch(List<Long> list); |
||||||
|
|
||||||
|
void insertBatchPersonnel(List<ImsDutyGroupPEntity> list); |
||||||
|
|
||||||
|
Integer selectPersonIsExist(ImsDutyGroupPEntity imsDutyGroupPEntity); |
||||||
|
|
||||||
|
List<ImsDutyGroupPVO> selectByGroupIdList(Long groupId); |
||||||
|
|
||||||
|
String selectPersonIdsByGroupId(Long groupId); |
||||||
|
|
||||||
|
|
||||||
|
List<DutyReportVO> getDutyMainStatisticsByClassId(Map<String, Object> params); |
||||||
|
|
||||||
|
List<Map<String,Object>> getDutyConclusion(Map<String, Object> params); |
||||||
|
|
||||||
|
DutyPersonalReportVO getPersonalDutyMain(Map<String, Object> params); |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据班组Id以及人员Id删除 |
||||||
|
* @param groupId |
||||||
|
* @param personId |
||||||
|
*/ |
||||||
|
void deleteByGroupIdAndPersonId(@Param("groupId") Long groupId, @Param("personId") Long personId); |
||||||
|
|
||||||
|
List<DutyMemberVO> member(@Param("groupId") Long groupId); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,169 @@ |
|||||||
|
<?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="org.springblade.hzinfo_inspect.duty.mapper.ImsDutyGroupPMapper"> |
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupPEntity" > |
||||||
|
<result column="ID" property="id" jdbcType="BIGINT" /> |
||||||
|
<result column="TENANT_ID" property="tenantId" jdbcType="VARCHAR"/> |
||||||
|
<result column="GROUP_ID" property="groupId" jdbcType="BIGINT" /> |
||||||
|
<result column="PERSON_ID" property="personId" jdbcType="BIGINT" /> |
||||||
|
</resultMap> |
||||||
|
<sql id="Base_Column_List" > |
||||||
|
ID,TENANT_ID,GROUP_ID,PERSON_ID |
||||||
|
</sql> |
||||||
|
<insert id="insertBatchPersonnel"> |
||||||
|
insert into user(ID,TENANT_ID, GROUP_ID, PERSON_ID) |
||||||
|
VALUES |
||||||
|
<foreach collection="list" item="item" index="index" separator=","> |
||||||
|
( |
||||||
|
#{item.id}, |
||||||
|
#{item.tenantId}, |
||||||
|
#{item.groupId}, |
||||||
|
#{item.personId} |
||||||
|
) |
||||||
|
</foreach> |
||||||
|
</insert> |
||||||
|
<select id="selectByGroupId" resultMap="BaseResultMap" parameterType="java.lang.Long" > |
||||||
|
select |
||||||
|
<include refid="Base_Column_List" /> |
||||||
|
from hz_ims_duty_group_p |
||||||
|
where group_id = #{groupId,jdbcType=BIGINT} |
||||||
|
</select> |
||||||
|
<select id="selectByGroupIds" resultMap="BaseResultMap" parameterType="java.util.List" > |
||||||
|
select |
||||||
|
<include refid="Base_Column_List" /> |
||||||
|
from hz_ims_duty_group_p |
||||||
|
where GROUP_ID in |
||||||
|
<foreach collection="groupId" item="item" open="(" separator="," close=")" > |
||||||
|
#{item} |
||||||
|
</foreach> |
||||||
|
</select> |
||||||
|
<select id="selectPersonIsExist" resultType="java.lang.Integer" parameterType="org.springblade.hzinfo_inspect.duty.entity.ImsDutyGroupPEntity"> |
||||||
|
select IFNULL(count(*),0) from hz_ims_duty_group_p where PERSON_ID = #{personId} |
||||||
|
</select> |
||||||
|
<select id="selectByGroupIdList" resultType="org.springblade.hzinfo_inspect.duty.vo.ImsDutyGroupPVO"> |
||||||
|
select |
||||||
|
<include refid="Base_Column_List" /> |
||||||
|
from hz_ims_duty_group_p |
||||||
|
where GROUP_ID = #{groupId,jdbcType=BIGINT} |
||||||
|
</select> |
||||||
|
<select id="selectPersonIdsByGroupId" resultType="java.lang.String"> |
||||||
|
select |
||||||
|
GROUP_CONCAT(PERSON_ID SEPARATOR '^') names |
||||||
|
from hz_ims_duty_group_p |
||||||
|
where group_id = #{groupId,jdbcType=BIGINT} |
||||||
|
</select> |
||||||
|
|
||||||
|
<delete id="deleteByGroupId" parameterType="java.lang.Long"> |
||||||
|
delete from hz_ims_duty_group_p |
||||||
|
where group_id = #{groupId,jdbcType=BIGINT} |
||||||
|
</delete> |
||||||
|
<delete id="deleteBatch" parameterType="java.util.List"> |
||||||
|
delete from hz_ims_duty_group_p where ID in |
||||||
|
<foreach collection="list" item="item" index="index" open="(" close=")" separator=","> |
||||||
|
#{item} |
||||||
|
</foreach> |
||||||
|
</delete> |
||||||
|
<delete id="deleteByGroupIdAndPersonId"> |
||||||
|
delete from hz_ims_duty_group_p where GROUP_ID = #{groupId,jdbcType=BIGINT} and PERSON_ID = #{personId,jdbcType=BIGINT} |
||||||
|
</delete> |
||||||
|
|
||||||
|
<select id="getDutyMainStatisticsByClassId" resultType="org.springblade.hzinfo_inspect.duty.vo.DutyReportVO"> |
||||||
|
SELECT homt.`DUTY_GROUP_ID` |
||||||
|
, hidg.`GROUP_NAME` classGroupName |
||||||
|
, count(homt.`id`) dutyNum |
||||||
|
, count(hidr.`LEFT_PROBLEM`) findProblemNum |
||||||
|
, sum(abs(TIMESTAMPDIFF(HOUR,DATE_FORMAT(hidc.`END_TIME`,'%Y-%m-%d %H:%i:%s'),DATE_FORMAT(hidc.`START_TIME`,'%Y-%m-%d %H:%i:%s')))) dutyDuration |
||||||
|
,concat( |
||||||
|
case when count(case when hidr.`DELAY_STATUS` > 1 then 1 else null end) is null then 0 else count(case when hidr.`DELAY_STATUS` > 1 then 1 else null end) end |
||||||
|
,'次' |
||||||
|
,case when hidr.`DELAY_STATUS` = 1 then |
||||||
|
concat('(', |
||||||
|
group_concat(concat(date_format(hidr.`EXEC_TIME`,'%Y-%m-%d'),'延迟交班了', |
||||||
|
TIMESTAMPDIFF(MINUTE,concat(homt.`DUTY_DATE`,' ',hidc.`END_TIME`),DATE_FORMAT(hidr.`EXEC_TIME`,'%Y-%m-%d %H:%i:%s')) |
||||||
|
,'分钟') SEPARATOR ';'),')') |
||||||
|
when hidr.`DELAY_STATUS` = 2 then |
||||||
|
concat('(', |
||||||
|
group_concat(concat(date_format(hidr.`ACCEPT_TIME`,'%Y-%m-%d'),'延迟接班了', |
||||||
|
TIMESTAMPDIFF(MINUTE,DATE_FORMAT(hidr.`ACCEPT_TIME`,'%Y-%m-%d %H:%i:%s'),concat(homt.`DUTY_DATE`,' ',hidc.`START_TIME`)) |
||||||
|
,'分钟') SEPARATOR ';'),')') |
||||||
|
when hidr.`DELAY_STATUS` = 3 then |
||||||
|
concat('(', |
||||||
|
group_concat(concat(date_format(hidr.`ACCEPT_TIME`,'%Y-%m-%d'),'延迟接班了', |
||||||
|
TIMESTAMPDIFF(MINUTE,DATE_FORMAT(hidr.`ACCEPT_TIME`,'%Y-%m-%d %H:%i:%s'),concat(homt.`DUTY_DATE`,' ',hidc.`START_TIME`)) |
||||||
|
,'分钟',';',date_format(hidr.`EXEC_TIME`,'%Y-%m-%d'),'延迟交班了', |
||||||
|
TIMESTAMPDIFF(MINUTE,concat(homt.`DUTY_DATE`,' ',hidc.`END_TIME`),DATE_FORMAT(hidr.`EXEC_TIME`,'%Y-%m-%d %H:%i:%s')) |
||||||
|
,'分钟') SEPARATOR ';'),')') |
||||||
|
else '' end |
||||||
|
) delayChangeShifts |
||||||
|
from `hz_ims_duty_main` homt |
||||||
|
left join `hz_ims_duty_rec` hidr on homt.`id` = hidr.`DUTY_ID` |
||||||
|
left join `hz_ims_duty_class` hidc on homt.`CLASS_ID` = hidc.`ID` |
||||||
|
left join `hz_ims_duty_group` hidg on homt.`DUTY_GROUP_ID` = hidg.`ID` |
||||||
|
<where> |
||||||
|
homt.`is_deleted` = 0 |
||||||
|
<if test="startDate != null"> |
||||||
|
and homt.`DUTY_DATE` >= #{startDate} |
||||||
|
</if> |
||||||
|
<if test="endDate != null"> |
||||||
|
and homt.`DUTY_DATE` <= #{endDate} |
||||||
|
</if> |
||||||
|
<if test="deptId != null"> |
||||||
|
and homt.`CREATE_DEPT` in |
||||||
|
<foreach collection="deptId" index="index" item="item" open="(" separator="," close=")"> |
||||||
|
#{item} |
||||||
|
</foreach> |
||||||
|
</if> |
||||||
|
</where> |
||||||
|
group by homt.`DUTY_GROUP_ID`,hidg.`GROUP_NAME` |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="getDutyConclusion" resultType="java.util.Map"> |
||||||
|
select count(distinct homt.`CLASS_ID`) CONCLUSION_CLASS_COUNT |
||||||
|
,count(distinct homt.`DUTY_DATE`) CONCLUSION_DUTY_DATE |
||||||
|
,count(case when hidr.`DELAY_STATUS` > 0 then 1 else null end) CONCLUSION_DELAY_COUNT |
||||||
|
,count(case when hidr.`DELAY_STATUS` = 0 then 1 else null end) CONCLUSION_INTINE_COUNT |
||||||
|
from `hz_ims_duty_main` homt |
||||||
|
left join `hz_ims_duty_rec` hidr on homt.`id` = hidr.`DUTY_ID` |
||||||
|
left join `hz_ims_duty_class` hidc on homt.`CLASS_ID` = hidc.`ID` |
||||||
|
<where> |
||||||
|
homt.`is_deleted` = 0 |
||||||
|
<if test="startDate != null"> |
||||||
|
and homt.`DUTY_DATE` >= #{startDate} |
||||||
|
</if> |
||||||
|
<if test="endDate != null"> |
||||||
|
and homt.`DUTY_DATE` <= #{endDate} |
||||||
|
</if> |
||||||
|
and homt.`CREATE_DEPT` in |
||||||
|
<foreach collection="deptId" item="item" index="index" open="(" close=")" separator=","> |
||||||
|
#{item} |
||||||
|
</foreach> |
||||||
|
</where> |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="getPersonalDutyMain" resultType="org.springblade.hzinfo_inspect.duty.vo.DutyPersonalReportVO"> |
||||||
|
select count(`id`) dutyNum |
||||||
|
,count(distinct `DUTY_DATE`) dutyDayNum |
||||||
|
,GROUP_CONCAT(distinct `DUTY_DATE` SEPARATOR '、' ) dutyDate |
||||||
|
from hz_ims_duty_main |
||||||
|
<where> |
||||||
|
IS_DELETED =0 |
||||||
|
<if test="startDate != null"> |
||||||
|
and `DUTY_DATE` >= #{startDate} |
||||||
|
</if> |
||||||
|
<if test="endDate != null"> |
||||||
|
and `DUTY_DATE` <= #{endDate} |
||||||
|
</if> |
||||||
|
<if test="userId != null"> |
||||||
|
and `DUTY_PERSON_IDS` like concat ("%", #{userId},"%") |
||||||
|
</if> |
||||||
|
</where> |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="member" resultType="org.springblade.hzinfo_inspect.duty.vo.DutyMemberVO"> |
||||||
|
SELECT PERSON_ID |
||||||
|
FROM HZ_IMS_DUTY_GROUP_P |
||||||
|
WHERE GROUP_ID = #{groupId} |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,14 @@ |
|||||||
|
package org.springblade.hzinfo_inspect.duty.mapper; |
||||||
|
|
||||||
|
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||||
|
import org.springblade.hzinfo_inspect.duty.entity.ImsDutyLogEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* Mapper 接口 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
public interface ImsDutyLogMapper extends UserDataScopeBaseMapper<ImsDutyLogEntity> { |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue