开发PTL--PCN节点维护,同步配置和对象映射功能
parent
5a5854e0b6
commit
51d666b5bc
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
||||||
|
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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<PtlNode, Long> {
|
||||||
|
}
|
@ -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<PtlObjectDao, Long> {
|
||||||
|
}
|
@ -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<PtlPcnSyncCfg, Long> {
|
||||||
|
}
|
Loading…
Reference in New Issue