diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlEnumUtil.java index 072df9e..3897219 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlEnumUtil.java @@ -423,4 +423,128 @@ public class PtlEnumUtil { return tmp; } } + + /** + * PCN同步PTL主数据同步类型枚举 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SYNC_TYPE { + + GET_PTL_DATA(1, "pcn获取Ptl数据"), + DATA_TO_PTL(2, "pcn推送数据至ptl"); + + private int value; + private String description; + + SYNC_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static Integer descriptionOfValue(String description) { + Integer tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(description)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + + /** + * PCN同步PTL主数据同步方式枚举 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SYNC_PATTERN { + + UPDATE(1, "修改"), + INSERT(2, "新增"); + + private int value; + private String description; + + SYNC_PATTERN(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static Integer descriptionOfValue(String description) { + Integer tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(description)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum TRUE_OR_FALSE { + TRUE(1, "是"), + FALSE(2, "否"); + + private int value; + private String description; + + TRUE_OR_FALSE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } } diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java index 45e5c53..42becd3 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java @@ -290,18 +290,20 @@ public class PtlPcnEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum TAG_LIGHT_COLOR_CMD { - TAG_LIGHT_COLOR_RED("00", "红"), - TAG_LIGHT_COLOR_GREEN("01", "绿"), - TAG_LIGHT_COLOR_ORANGE("02", "橙"), - TAG_LIGHT_COLOR_BLUE("03", "蓝"), - TAG_LIGHT_COLOR_PINK_RED("04", "粉红"), - TAG_LIGHT_COLOR_BLUE_GREEN("05", "蓝绿"); + TAG_LIGHT_COLOR_RED("00", 0, "红"), + TAG_LIGHT_COLOR_GREEN("01", 1, "绿"), + TAG_LIGHT_COLOR_ORANGE("02", 2, "橙"), + TAG_LIGHT_COLOR_BLUE("03", 3, "蓝"), + TAG_LIGHT_COLOR_PINK_RED("04", 4, "粉红"), + TAG_LIGHT_COLOR_BLUE_GREEN("05", 5, "蓝绿"); private String code; + private Integer value; private String description; - TAG_LIGHT_COLOR_CMD(String code, String description) { + TAG_LIGHT_COLOR_CMD(String code, Integer value, String description) { this.code = code; + this.value = value; this.description = description; } @@ -314,10 +316,24 @@ public class PtlPcnEnumUtil { return null; } + public static String valueOf(int value) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == value) { + tmp = values()[i].code; + } + } + return tmp; + } + public String getCode() { return code; } + public Integer getValue() { + return value; + } + public String getDescription() { return description; } @@ -355,24 +371,26 @@ public class PtlPcnEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum FINISH_TAG_LIGHT_MUSIC_CMD { - FINISH_TAG_LIGHT_MUSIC_00H("00", "Jingle bells"), - FINISH_TAG_LIGHT_MUSIC_01H("01", "Carmen"), - FINISH_TAG_LIGHT_MUSIC_02H("02", "Happy Chinese new year"), - FINISH_TAG_LIGHT_MUSIC_03H("03", "Edelweiss"), - FINISH_TAG_LIGHT_MUSIC_04H("04", "Going home"), - FINISH_TAG_LIGHT_MUSIC_05H("05", "PAPALA"), - FINISH_TAG_LIGHT_MUSIC_06H("06", "Classical"), - FINISH_TAG_LIGHT_MUSIC_07H("07", "Listen to the rhythm of the falling rain"), - FINISH_TAG_LIGHT_MUSIC_08H("08", "Rock and roll"), - FINISH_TAG_LIGHT_MUSIC_09H("09", "Happy birthday"), - FINISH_TAG_LIGHT_MUSIC_0AH("0A", "Do Re Me"), - FINISH_TAG_LIGHT_MUSIC_0BH("0B", "Strauss"); + FINISH_TAG_LIGHT_MUSIC_00H("00", 0, "Jingle bells"), + FINISH_TAG_LIGHT_MUSIC_01H("01", 1, "Carmen"), + FINISH_TAG_LIGHT_MUSIC_02H("02", 2, "Happy Chinese new year"), + FINISH_TAG_LIGHT_MUSIC_03H("03", 3, "Edelweiss"), + FINISH_TAG_LIGHT_MUSIC_04H("04", 4, "Going home"), + FINISH_TAG_LIGHT_MUSIC_05H("05", 5, "PAPALA"), + FINISH_TAG_LIGHT_MUSIC_06H("06", 6, "Classical"), + FINISH_TAG_LIGHT_MUSIC_07H("07", 7, "Listen to the rhythm of the falling rain"), + FINISH_TAG_LIGHT_MUSIC_08H("08", 8, "Rock and roll"), + FINISH_TAG_LIGHT_MUSIC_09H("09", 9, "Happy birthday"), + FINISH_TAG_LIGHT_MUSIC_0AH("0A", 10, "Do Re Me"), + FINISH_TAG_LIGHT_MUSIC_0BH("0B", 11, "Strauss"); private String code; + private Integer value; private String description; - FINISH_TAG_LIGHT_MUSIC_CMD(String code, String description) { + FINISH_TAG_LIGHT_MUSIC_CMD(String code, Integer value, String description) { this.code = code; + this.value = value; this.description = description; } @@ -385,10 +403,24 @@ public class PtlPcnEnumUtil { return null; } + public static String valueOf(int value) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == value) { + tmp = values()[i].code; + } + } + return tmp; + } + public String getCode() { return code; } + public Integer getValue() { + return value; + } + public String getDescription() { return description; } @@ -590,7 +622,7 @@ public class PtlPcnEnumUtil { public enum MonitorProcessMessageType { CONNECT_CONTROL_CMD(10, "CONNECT_CONTROL_CMD", "connectControlService", "连接控制器"), DISCONNECT_CONTROL_CMD(20, "DISCONNECT_CONTROL_CMD", "disconnectControlService", "断开控制器"), - EXCEPTION__DISCONNECT_CONTROL_CMD(25, "EXCEPTION__DISCONNECT_CONTROL_CMD", "disconnectControlService", "断开控制器"), + EXCEPTION__DISCONNECT_CONTROL_CMD(25, "EXCEPTION_DISCONNECT_CONTROL_CMD", "disconnectControlService", "断开控制器"), LIGHT_ON_CMD(30, "LIGHT_ON_CMD", "lightOnService", "亮灯命令"), LIGHT_OFF_CMD(40, "LIGHT_OFF_CMD", "lightOffService", "灭灯命令"), CONTROL_SIGNAL_CMD(50, "CONTROL_SIGNAL_CMD", "controlSignalService", "控制器反馈信号"), @@ -1142,4 +1174,66 @@ public class PtlPcnEnumUtil { } } + /** + * 系统配置表枚举 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum CONFIG_TYPE { + FASTDFS_SAVE_PATH(10, "SAVE_PATH", ""), + NGINX_HOST(20, "NGINX_HOST", ""), + MES_STATION_SOCKET(30, "mes_station_socket", ""), + GATEWAY_IP(40, "GATEWAY_HOST", ""), + UPDATE_SYNC_TIME(50, "SYNC_DATA_URL", "UPDATE_SYNC_TIME"), + PCN_PULL(60, "SYNC_DATA_URL", "PCN_PULL"), + PCN_PUSH(70, "SYNC_DATA_URL", "PCN_PUSH"), + FDFS_DOWNLOAD(80, "SYNC_DATA_URL", "FDFS_DOWNLOAD"), + REWORK_REPAIR(90, "REWORK_REPAIR", ""), + OPC_LINK_SERVER_URL(100, "OPC_LINK", "OPC_LINK_SERVER_URL"), + OPC_LINK_USERNAME(110, "OPC_LINK", "OPC_LINK_USERNAME"), + OPC_LINK_PASSWORD(120, "OPC_LINK", "OPC_LINK_PASSWORD"), + OPC_LINK_REALM(130, "OPC_LINK", "OPC_LINK_REALM"), + OPC_LINK_CALLBACK(140, "OPC_LINK", "OPC_LINK_CALLBACK"), + SUPPLY_SWITCH(150, "SUPPLY_SWITCH", ""), + PCN_LOGIN(160, "PCN_LOGIN", ""), + PCN_MENU(170, "PCN_MENU", ""), + PCN_MODULE(180, "PCN_MODULE", ""), + PCN_LOGOUT(190, "PCN_LOGOUT", ""), + UPDATE_LOCALE_RES(200, "LOCALE_RES_URL", "LOCALE_RES_URL"), + PCN_SYS_LOCALE_LANGUAGE(210, "PCN_SYS_LOCALE_LANGUAGE", ""), + PCN_SYS_ALL_LANGUAGE(220,"PCN_SYS_ALL_LANGUAGE","PCN_SYS_ALL_LANGUAGE"), + PCN_SYS_RESOURCE_KEY_LANGUAGE(230,"PCN_SYS_RESOURCE_KEY_LANGUAGE","PCN_SYS_RESOURCE_KEY_LANGUAGE"); + + private int value; + private String code; + private String description; + + CONFIG_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } + } diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlLabelTemplate.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlLabelTemplate.java new file mode 100644 index 0000000..a14a5a3 --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlLabelTemplate.java @@ -0,0 +1,54 @@ +package cn.estsh.i3plus.pojo.ptl.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.*; +import java.io.Serializable; +import java.util.List; + +/** + * @Description : 打印模板 + * @Reference : + * @Author : crish + * @CreateDate : 2019-08-18 11:00 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "PTL_LABEL_TEMPLATE") +@Api(value = "打印模板", description = "打印模板") +public class PtlLabelTemplate extends BaseBean implements Serializable { + + private static final long serialVersionUID = 8287307324960885418L; + @Column(name = "TEMPLATE_CODE") + @ApiParam(value = "模板代码") + private String templateCode; + + @Column(name = "TEMPLATE_NAME") + @ApiParam(value = "模板名称") + private String templateName; + + @Lob + @Column(name = "TEMPLATE_CONTENT") + @ApiParam(value = "模板内容") + private String templateContent; + + // 参数拼接,多参数都好分隔,后台在做处理 + @ApiParam(value = "模板参数拼接") + @Transient + private String paramsPack; + + @Transient + @ApiParam(value = "模板id对应的模板参数") + private List labelTemplateParamList; + +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlLabelTemplateParam.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlLabelTemplateParam.java new file mode 100644 index 0000000..08a100e --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlLabelTemplateParam.java @@ -0,0 +1,55 @@ +package cn.estsh.i3plus.pojo.ptl.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.*; +import java.io.Serializable; + +/** + * @Description : 打印模板参数 + * @Reference : + * @Author : crish + * @CreateDate : 2019-08-18 11:00 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "PTL_LABEL_TEMPLATE_PARAM") +@Api(value = "打印模板参数", description = "打印模板参数") +public class PtlLabelTemplateParam extends BaseBean implements Serializable { + + private static final long serialVersionUID = 7292367173575992422L; + @Column(name = "TEMPLATE_ID") + @ApiParam(value = "模板ID", access = "模板ID", example = "-1") + @JsonSerialize(using = ToStringSerializer.class) + private Long templateId; + + @Column(name = "TEMPLATE_CODE") + @ApiParam(value = "模板代码") + private String templateCode; + + @Column(name = "TEMPLATE_PARAM") + @ApiParam(value = "模板参数") + private String templateParam; + + @Lob + @Column(name = "TEMPLATE_PARAM_TEXT") + @ApiParam(value = "模板参数描述") + private String templateParamText; + + // 参数拼接,多参数都好分隔,后台在做处理 + @ApiParam(value = "模板参数值") + @Transient + private String templateParamValue; +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlNode.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlNode.java new file mode 100644 index 0000000..fd3a0d9 --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlNode.java @@ -0,0 +1,87 @@ +package cn.estsh.i3plus.pojo.ptl.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; +import java.io.Serializable; + +/** + * @Description: + * @Reference: + * @Author: adair.song + * @CreateDate:2019-04-22-17:20 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "PTL_PCN_NODE") +@Api("PCN节点") +public class PtlNode extends BaseBean implements Serializable { + private static final long serialVersionUID = -9140094723555406392L; + @Column(name = "PCN_CODE") + @ApiParam("PCN代码") + private String pcnCode; + + @Column(name = "PCN_NAME") + @ApiParam("PCN节点名称") + private String pcnName; + + @Column(name = "AREA_NO") + @ApiParam("区域") + private String areaNo; + + @Column(name = "AREA_NAME") + @ApiParam("区域名称") + private String areaName; + + @Column(name = "WORK_CENTER_CODE") + @ApiParam("工作中心") + private String workCenterCode; + + @Column(name = "WORK_CENTER_NAME") + @ApiParam("工作中心名称") + private String workCenterName; + + @Column(name = "PCN_VERSION") + @ApiParam("PCN版本") + private String pcnVersion; + + @Column(name = "CONNECT_IP") + @ApiParam("连接IP") + private String connectIp; + + @Column(name = "CONNECT_COUNT") + @ApiParam("连接次数") + private Integer connectCount; + + @Column(name = "IS_CONNECT") + @ApiParam("是否连接") + private Integer isConnect; + + @Column(name = "CONNECT_TIME") + @ApiParam("连接时间") + private String connectTime; + + @Column(name = "CODE_SPECIFIC") + @ApiParam("PCN特殊字段") + private String codeSpecific; + + public int getConnectCountVal() { + return this.connectCount == null ? 0 : this.connectCount; + } + + public int getIsConnectVal() { + return this.isConnect == null ? 0 : this.isConnect; + } +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlObjectDao.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlObjectDao.java new file mode 100644 index 0000000..d86d1b1 --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlObjectDao.java @@ -0,0 +1,41 @@ +package cn.estsh.i3plus.pojo.ptl.bean; + + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; +import java.io.Serializable; + +/** + * @Description :PTL_对象与dao对应关系 + * @Reference : + * @Author : adair.song + * @CreateDate : 2019-04-23 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "PTL_OBJECT_DAO") +@Api("PTL_对象与dao对应关系") +public class PtlObjectDao extends BaseBean implements Serializable { + private static final long serialVersionUID = 2286752328499060L; + @Column(name = "OBJECT_CODE") + @ApiParam("对象代码") + private String objectCode; + + @Column(name = "DAO_CLASS") + @ApiParam("dao层类名") + private String daoClass; + +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlPcnSyncCfg.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlPcnSyncCfg.java new file mode 100644 index 0000000..060404d --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlPcnSyncCfg.java @@ -0,0 +1,111 @@ +package cn.estsh.i3plus.pojo.ptl.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; +import javax.persistence.Transient; +import java.io.Serializable; + +/** + * @Description: + * @Reference: + * @Author: adair.song + * @CreateDate:2020-02-28 10:16 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "PTL_PCN_SYNC_CFG") +@Api("PTL_PCN_同步配置") +public class PtlPcnSyncCfg extends BaseBean implements Serializable { + + private static final long serialVersionUID = 7270948230576127126L; + + @Column(name = "PCN_CODE") + @ApiParam("PCN代码") + private String pcnCode; + + @Column(name = "OBJECT_CODE") + @ApiParam("对象代码") + private String objectCode; + + @Column(name = "OBJECT_NAME") + @ApiParam("对象名称") + private String objectName; + + @Column(name = "OBJECT_KEY") + @ApiParam("对象主键") + private String objectKey; + + @Column(name = "SYNC_FREQUENCY") + @ApiParam("同步频率") + private Integer syncFrequency; + + @Column(name = "SYNC_TIME") + @ApiParam(value = "同步时间") + private String syncTime; + + @Column(name = "SYNC_PATTERN") + @ApiParam("同步方式 1、修改 2、新增") + private Integer syncPattern; + + @Column(name = "SYNC_TYPE") + @ApiParam("同步类型 1.pcn获取PTL数据 2.pcn推送数据至PTL") + private Integer syncType; + + @Column(name = "LAST_SYNC_TIME") + @ApiParam(value = "上一同步时间") + private String lastSyncTime; + + @Column(name = "EXTRACT_GAP") + @ApiParam(value = "从数据库抽取的最大值 目前为分钟为限制") + private Integer extractGap; + + @Column(name = "EXTRACT_CONDITION") + @ApiParam(value = "从数据库抽取的条件限制") + private String extractCondition; + + @Column(name = "IS_IGNORE_ORG") + @ApiParam(value = "同步的时候是否区分工厂") + private Integer isIgnoreOrg = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); + + @Transient + @ApiParam("同步方式") + private String syncPatternName; + + @Transient + @ApiParam("同步类型名称") + private String syncTypeName; + + @Transient + @ApiParam(value = "同步的时候是否区分工厂") + private String isIgnoreOrgName; + + public int getIsIgnoreOrgVal() { + return this.isIgnoreOrg == null ? 0 : this.isIgnoreOrg; + } + + public int getSyncFrequencyVal() { + return this.syncFrequency == null ? 0 : this.syncFrequency; + } + + public int getSyncTypeVal() { + return this.syncType == null ? 0 : this.syncType; + } + + public int getSyncPatternVal() { + return this.syncPattern == null ? 0 : this.syncPattern; + } +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlPcnSyncErrorLog.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlPcnSyncErrorLog.java new file mode 100644 index 0000000..110f4a8 --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlPcnSyncErrorLog.java @@ -0,0 +1,55 @@ +package cn.estsh.i3plus.pojo.ptl.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Lob; +import javax.persistence.Table; +import java.io.Serializable; + +/** + * @Description: + * @Reference: + * @Author: crish + * @CreateDate:2019-08-23-17:20 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "PTL_PCN_SYNC_ERRORLOG") +@Api("PTL_PCN同步异常日志") +public class PtlPcnSyncErrorLog extends BaseBean implements Serializable { + + private static final long serialVersionUID = -8285936568677939604L; + @Column(name = "PCN_CODE") + @ApiParam("PCN代码") + private String pcnCode; + + @Column(name = "OBJECT_CODE") + @ApiParam("对象代码") + private String objectCode; + + @Column(name = "OBJECT_NAME") + @ApiParam("对象名称") + private String objectName; + + @Column(name = "ERROR_SPOT") + @ApiParam("异常位置") + private String errorSpot; + + @Lob + @Column(name = "ERROR_CONTENT") + @ApiParam("异常内容") + private String errorContent; + +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlSysUserOffline.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlSysUserOffline.java new file mode 100644 index 0000000..d07f684 --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/bean/PtlSysUserOffline.java @@ -0,0 +1,73 @@ +package cn.estsh.i3plus.pojo.ptl.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Lob; +import javax.persistence.Table; +import java.io.Serializable; + +/** + * @Description : 账号离线登陆表 + * @Reference : + * @Author : wangjie + * @CreateDate : 2019-09-01 11:02 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "PTL_SYS_USER_OFFLINE") +@Api(value = "账号离线登陆表", description = "账号离线登陆表。") +public class PtlSysUserOffline extends BaseBean implements Serializable { + + private static final long serialVersionUID = -6191798106333324803L; + + @Column(name = "USER_ID") + @ApiParam(value = "人员ID", example = "-1") + @JsonSerialize(using = ToStringSerializer.class) + private Long userId; + + @Column(name = "USER_CODE") + @ApiParam(value = "用户编号", access = "用户编号") + private String userCode; + + @Column(name = "USER_NAME") + @ApiParam(value = "用户名称", access = "账号名称") + private String userName; + + @Column(name = "LOGIN_NAME") + @ApiParam(value = "登陆名称", access = "登陆名称") + private String loginName; + + @Column(name="USER_TYPE") + @ApiParam(value ="账号类型(枚举,待定)" , example ="-1") + private Integer userType; + + @Lob + @Column(name="LOGIN_INFO") + @ApiParam(value ="登陆信息" , access ="登陆信息") + private String loginInfo; + + @Lob + @Column(name="MENU_LIST") + @ApiParam(value ="菜单" , access ="菜单") + private String menuList; + + @Lob + @Column(name="MODULE_LIST") + @ApiParam(value ="模块" , access ="模块") + private String moduleList; + +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/model/PtlMonitorControlModel.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/model/PtlMonitorControlModel.java index 40a5e14..28b0ed1 100644 --- a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/model/PtlMonitorControlModel.java +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/model/PtlMonitorControlModel.java @@ -19,6 +19,12 @@ import java.util.List; @Api("亮灯监听Model") public class PtlMonitorControlModel implements Serializable { + @ApiParam("刷新频率") + public String refreshTime; + + @ApiParam("PCN代码") + public String pcnCode; + @ApiParam("区域代码") public String areaNo; diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlLabelTemplateParamRepository.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlLabelTemplateParamRepository.java new file mode 100644 index 0000000..aef8d8a --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlLabelTemplateParamRepository.java @@ -0,0 +1,14 @@ +package cn.estsh.i3plus.pojo.ptl.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.ptl.bean.PtlLabelTemplateParam; + +/** + * @Description : 打印模板 + * @Reference : + * @Author : crish + * @Date : 2019-08-18 12:03:01.024 + * @Modify : + **/ +public interface PtlLabelTemplateParamRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlLabelTemplateRepository.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlLabelTemplateRepository.java new file mode 100644 index 0000000..7fd7624 --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlLabelTemplateRepository.java @@ -0,0 +1,14 @@ +package cn.estsh.i3plus.pojo.ptl.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.ptl.bean.PtlLabelTemplate; + +/** + * @Description : 打印模板 + * @Reference : + * @Author : crish + * @Date : 2019-08-18 12:03:01.024 + * @Modify : + **/ +public interface PtlLabelTemplateRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlNodeRepository.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlNodeRepository.java new file mode 100644 index 0000000..d4b869c --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlNodeRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.ptl.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.ptl.bean.PtlNode; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Reference: + * @Author: adair.song + * @CreateDate:2020-02-28-17:13 + * @Modify: + **/ +@Repository +public interface PtlNodeRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlObjectDaoRepository.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlObjectDaoRepository.java new file mode 100644 index 0000000..93c461d --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlObjectDaoRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.ptl.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.ptl.bean.PtlObjectDao; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Reference: + * @Author: adair.song + * @CreateDate:2019-04-23 + * @Modify: + **/ +@Repository +public interface PtlObjectDaoRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlPcnSyncCfgRepository.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlPcnSyncCfgRepository.java new file mode 100644 index 0000000..0b0be41 --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlPcnSyncCfgRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.ptl.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.ptl.bean.PtlPcnSyncCfg; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Reference: + * @Author: yiming.gu + * @CreateDate:2019-04-24-17:13 + * @Modify: + **/ +@Repository +public interface PtlPcnSyncCfgRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlPcnSyncErrorLogRepository.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlPcnSyncErrorLogRepository.java new file mode 100644 index 0000000..d7e461f --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlPcnSyncErrorLogRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.ptl.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.ptl.bean.PtlPcnSyncErrorLog; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Reference: + * @Author: crish + * @CreateDate:2019-08-23-17:13 + * @Modify: + **/ +@Repository +public interface PtlPcnSyncErrorLogRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlSysUserOfflineRepository.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlSysUserOfflineRepository.java new file mode 100644 index 0000000..ce38550 --- /dev/null +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/repository/PtlSysUserOfflineRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.ptl.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.ptl.bean.PtlSysUserOffline; +import org.springframework.stereotype.Repository; + +/** + * @Description : + * @Reference : + * @Author : wangjie + * @CreateDate : 2019-09-02 + * @Modify: + **/ +@Repository +public interface PtlSysUserOfflineRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/sqlpack/PtlHqlPack.java b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/sqlpack/PtlHqlPack.java index ce00e6d..5efbb4d 100644 --- a/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/sqlpack/PtlHqlPack.java +++ b/modules/i3plus-pojo-ptl/src/main/java/cn/estsh/i3plus/pojo/ptl/sqlpack/PtlHqlPack.java @@ -5,17 +5,9 @@ import cn.estsh.i3plus.pojo.base.bean.DdlPackBean; import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil; import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack; -import cn.estsh.i3plus.pojo.base.tool.HqlPack; -import cn.estsh.i3plus.pojo.ptl.bean.PtlConfig; -import cn.estsh.i3plus.pojo.ptl.bean.PtlPrinterConfigure; -import cn.estsh.i3plus.pojo.ptl.bean.PtlPrintingQueue; -import com.alibaba.fastjson.JSONObject; -import com.google.common.base.Strings; +import cn.estsh.i3plus.pojo.ptl.bean.*; import org.springframework.util.StringUtils; -import java.util.*; -import java.util.stream.Collectors; - /** * @Description : PTL对象封装 * @Reference : @@ -101,6 +93,19 @@ public class PtlHqlPack { } /** + * 通用查询条件 + * + * @param organizeCode + * @return + */ + public static DdlPackBean getAllBaseData(String organizeCode) { + DdlPackBean packBean = new DdlPackBean(); + DdlPreparedPack.getStringEqualPack(organizeCode, "organizeCode", packBean); + DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_DEAL.NO.getValue(), "isDeleted", packBean); + return packBean; + } + + /** * 配置信息 * @param ptlConfig * @return @@ -118,4 +123,64 @@ public class PtlHqlPack { } return packBean; } + + + /** + * PTL-PCN节点查询条件封装 + * + * @param ptlPcn + * @param organizeCode + * @return + */ + public static DdlPackBean getPtlPcnByCondition(PtlNode ptlPcn, String organizeCode) { + DdlPackBean packBean = getAllBaseData(organizeCode); + if (!StringUtils.isEmpty(ptlPcn.getConnectIp())) { + DdlPreparedPack.getStringLikerPack(ptlPcn.getConnectIp(), "connectIp", packBean); + } + if (!StringUtils.isEmpty(ptlPcn.getPcnName())) { + DdlPreparedPack.getStringLikerPack(ptlPcn.getPcnName(), "pcnName", packBean); + } + if (!StringUtils.isEmpty(ptlPcn.getPcnCode())) { + DdlPreparedPack.getStringLikerPack(ptlPcn.getPcnCode(), "pcnCode", packBean); + } + if (!StringUtils.isEmpty(ptlPcn.getAreaNo())) { + DdlPreparedPack.getStringLikerPack(ptlPcn.getAreaNo(), "areaNo", packBean); + } + if (ptlPcn.getIsValid() != null) { + DdlPreparedPack.getNumEqualPack(ptlPcn.getIsValid(), "isValid", packBean); + } + return packBean; + } + + /** + * PTL-PCN同步配置查询条件封装 + * + * @param pcnSyncCfg + * @return + */ + public static DdlPackBean getPtlPcnSyncCfg(PtlPcnSyncCfg pcnSyncCfg, String organizeCode) { + DdlPackBean packBean = getAllBaseDataByNormalPro(pcnSyncCfg, organizeCode); + DdlPreparedPack.getStringLikerPack(pcnSyncCfg.getObjectCode(), "objectCode", packBean); + DdlPreparedPack.getStringLikerPack(pcnSyncCfg.getPcnCode(), "pcnCode", packBean); + DdlPreparedPack.getNumEqualPack(pcnSyncCfg.getSyncType(), "syncType", packBean); + return packBean; + } + + /** + * PTL对象与dao对应关系查询条件封装 + * + * @param objectDao + * @return + */ + public static DdlPackBean getPtlObjectDao(PtlObjectDao objectDao, String organizeCode) { + DdlPackBean packBean = getAllBaseDataByNormalPro(objectDao, organizeCode); + if (!StringUtils.isEmpty(objectDao.getObjectCode())) { + DdlPreparedPack.getStringLikerPack(objectDao.getObjectCode(), "objectCode", packBean); + } + if (!StringUtils.isEmpty(objectDao.getDaoClass())) { + DdlPreparedPack.getStringLikerPack(objectDao.getDaoClass(), "daoClass", packBean); + } + + return packBean; + } } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCsStrategy.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCsStrategy.java index 24bf56a..57df4a3 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCsStrategy.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCsStrategy.java @@ -1,6 +1,7 @@ package cn.estsh.i3plus.pojo.wms.bean; import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; +import cn.estsh.i3plus.pojo.base.annotation.DynamicField; import cn.estsh.i3plus.pojo.base.bean.BaseBean; import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil; import io.swagger.annotations.Api; @@ -40,10 +41,13 @@ public class WmsCsStrategy extends BaseBean implements Serializable { @Column(name = "part_type") @ApiParam(value = "物料分类") + @AnnoOutputColumn(refClass = WmsEnumUtil.PART_ABC.class, refForeignKey = "value", value = "description") + @DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.SELECT, enumName = "PART_ABC") private String partType; @Column(name = "STRATEGY_TYPE") @ApiParam(value = "策略分类", example = "0") + @DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.SELECT, enumName = "CS_STRATEGY_TYPE") @AnnoOutputColumn(refClass = WmsEnumUtil.CS_STRATEGY_TYPE.class, refForeignKey = "value", value = "description") private Integer strategyType; diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMasterDetails.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMasterDetails.java index c667ec4..529c486 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMasterDetails.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMasterDetails.java @@ -179,4 +179,10 @@ public class WmsPOMasterDetails extends BaseBean { this.qty = qty; this.rcQty = rcQty; } + + public WmsPOMasterDetails(String orderNo ,String erpAreaNo,String organizeCode){ + this.orderNo = orderNo; + this.erpAreaNo = erpAreaNo; + this.organizeCode = organizeCode; + } } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsSnOperateRecord.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsSnOperateRecord.java index 456348c..4f60667 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsSnOperateRecord.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsSnOperateRecord.java @@ -1,6 +1,7 @@ package cn.estsh.i3plus.pojo.wms.bean; import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; +import cn.estsh.i3plus.pojo.base.annotation.DynamicField; import cn.estsh.i3plus.pojo.base.bean.BaseBean; import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil; import io.swagger.annotations.Api; @@ -73,6 +74,7 @@ public class WmsSnOperateRecord extends BaseBean { @Column(name = "OPERATE_TYPE") @ApiParam(value = "操作类型") @AnnoOutputColumn(refClass = WmsEnumUtil.SN_OPERATE_TYPE.class, refForeignKey = "value", value = "description") + @DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.SELECT, enumName = "SN_OPERATE_TYPE") private Integer operateType; @Column(name = "ref_sn")