Merge branch 'test' into ext-dev

yun-zuoyi
nies 3 years ago
commit 53a7709bc8

@ -1642,34 +1642,34 @@ public class ImppEnumUtil {
}
}
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_SEPARATOR_STRATEGY{
MYSQL(10,"mysql","dataSeparatorStrategyMysql","迁移数据到mysql");
private final int value;
private final String code;
private final String strategyName;
private final String description;
DATA_SEPARATOR_STRATEGY(int value,String code,String strategyName,String description){
this.value = value;
this.code = code;
this.strategyName = strategyName;
this.description = description;
}
public String getCode() {
return code;
}
public static String codeOfStrategyName(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].strategyName;
}
}
return tmp;
}
}
// @JsonFormat(shape = JsonFormat.Shape.OBJECT)
// public enum DATA_SEPARATOR_STRATEGY{
// MYSQL(10,"mysql","dataSeparatorStrategyMysql","迁移数据到mysql");
// private final int value;
// private final String code;
// private final String strategyName;
// private final String description;
// DATA_SEPARATOR_STRATEGY(int value,String code,String strategyName,String description){
// this.value = value;
// this.code = code;
// this.strategyName = strategyName;
// this.description = description;
// }
//
// public String getCode() {
// return code;
// }
//
// public static String codeOfStrategyName(String code) {
// String tmp = null;
// for (int i = 0; i < values().length; i++) {
// if (values()[i].code.equals(code)) {
// tmp = values()[i].strategyName;
// }
// }
// return tmp;
// }
// }
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum AUTH_LOGIN_STRATEGY {

@ -9747,6 +9747,85 @@ public class WmsEnumUtil {
return valueOf(val);
}
}
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_SOURCE_STATUS {
CONN_SUCCESS(10, "连接成功", "连接成功"),
CONN_FAILURE(20, "连接失败", "连接失败");
private int value;
private String code;
private String description;
private DATA_SOURCE_STATUS(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 valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].value;
}
}
return tmp;
}
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 WmsEnumUtil.DATA_SOURCE_STATUS valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

@ -0,0 +1,90 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2022/1/7 10:44
* @Modify:
**/
@Data
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Entity
@Table(name = "ORE_DATA_SOURCE")
public class CoreDataSource extends BaseBean{
@Column(
name = "SOURCE_NAME"
)
@ApiParam("数据源名称")
private String sourceName;
@Column(
name = "SOURCE_CODE"
)
@ApiParam("数据源编码")
private String sourceCode;
@Column(
name = "SOURCE_STATUS"
)
@ApiParam(
value = "数据源状态",
name = "状态:可用,不可用 看枚举当中是否存在"
)
private Integer sourceStatus;
@Column(
name = "SOURCE_TYPE"
)
@ApiParam(
value = "数据源类型",
name = "BlockFormEnumUtil.DATA_SOURCE_TYPE"
)
private Integer sourceType;
@Column(
name = "SOURCE_HOST"
)
@ApiParam("数据源连接地址")
private String sourceHost;
@Column(
name = "SOURCE_PORT"
)
@ApiParam("数据源端口")
private Integer sourcePort;
@Column(
name = "SOURCE_DATA_BASE_NAME"
)
@ApiParam("数据库名称")
private String sourceDataBaseName;
@Column(
name = "SOURCE_USER_NAME"
)
@ApiParam("数据库用户名称")
private String sourceUserName;
@Column(
name = "SOURCE_PASSWORD"
)
@ApiParam("数据库用户密码")
private String sourcePassword;
@Column(
name = "SOURCE_DESCRIPTION"
)
@ApiParam("数据源描述")
private String sourceDescription;
public CoreDataSource(Long id, String sourceName) {
this.id = id;
this.sourceCode = sourceName;
}
}

@ -26,29 +26,14 @@ public class DataSeparatorMessage implements Serializable {
*
*/
private String refClass;
/**
* eg: mysql,sqlServer,es
*/
private String destUrl;
/**
*
*/
private String userName;
/**
*
*/
private String password;
/**
*
*/
private String destTableName;
/**
* esmysql,sqlserver
*/
private String classification;
/**
*
* id
*/
private String databaseName;
private Long destDataSourceId;
}

@ -35,11 +35,6 @@ public class DataSeparatorRule extends BaseBean {
@ApiParam(value = "具体的数字,作为迁移标准")
private String rule;
@Column(name = "CLASSIFICATION")
@ApiParam(value = "迁移分类是迁移到mysql,sqlserver,ES 等做区分")
private String classification;
@Column(name = "REF_BEAN_NAME")
@ApiParam(value = "迁移的类的名称")
private String refBeanName;
@ -49,20 +44,9 @@ public class DataSeparatorRule extends BaseBean {
@ApiParam(value = "迁移目的地的表名")
private String tableNameDest;
@Column(name = "IP")
@ApiParam(value = "目标位置的ip")
private String ip;
@Column(name = "USER_NAME")
@ApiParam(value = "目标库的用户名")
private String userName;
@Column(name = "PASSWORD")
@ApiParam(value = "目标库的密码")
private String password;
@Column(name = "DEST_DATA_SOURCE_ID")
@ApiParam(value = "目的数据源id")
private Long destDataSourceId;
@Column(name = "DATABASE_NAME")
@ApiParam(value = "目标库名")
private String databaseName;
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.platform.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.platform.bean.CoreDataSource;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2022/1/7 13:18
* @Modify:
**/
@Repository
public interface CoreDataSourceRepository extends BaseRepository<CoreDataSource,Long> {
}

@ -47,14 +47,14 @@ public class WmsHealthVariable extends BaseBean {
private String variableName;
@Column(name = "CYCLE_RANGE")
@ApiParam(value = "周期(天)")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER)
private Integer cycleRange;
@ApiParam(value = "周期")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
private String cycleRange;
@Column(name = "CALC_FREQUENCY")
@ApiParam(value = "计算频次(天)")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER)
private Integer calcFrequency;
@ApiParam(value = "计算频次")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
private String calcFrequency;
@Column(name = "LAST_CALC_TIME")
@ApiParam(value = "末次计算时间")

@ -0,0 +1,89 @@
package cn.estsh.i3plus.pojo.wms.bean.datasource;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2021/12/17 10:26
* @Modify:
**/
@Data
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Entity
@Table(name = "wms_cus_datasource")
public class CusDatasource extends BaseBean {
@Column(
name = "SOURCE_NAME"
)
@ApiParam("数据源名称")
private String sourceName;
@Column(
name = "SOURCE_CODE"
)
@ApiParam("数据源编码")
private String sourceCode;
@Column(
name = "SOURCE_STATUS"
)
@ApiParam(
value = "数据源状态",
name = "状态:可用,不可用 看枚举当中是否存在"
)
private Integer sourceStatus;
@Column(
name = "SOURCE_TYPE"
)
@ApiParam(
value = "数据源类型",
name = "BlockFormEnumUtil.DATA_SOURCE_TYPE"
)
private Integer sourceType;
@Column(
name = "SOURCE_HOST"
)
@ApiParam("数据源连接地址")
private String sourceHost;
@Column(
name = "SOURCE_PORT"
)
@ApiParam("数据源端口")
private Integer sourcePort;
@Column(
name = "SOURCE_DATA_BASE_NAME"
)
@ApiParam("数据库名称")
private String sourceDataBaseName;
@Column(
name = "SOURCE_USER_NAME"
)
@ApiParam("数据库用户名称")
private String sourceUserName;
@Column(
name = "SOURCE_PASSWORD"
)
@ApiParam("数据库用户密码")
private String sourcePassword;
@Column(
name = "SOURCE_DESCRIPTION"
)
@ApiParam("数据源描述")
private String sourceDescription;
public CusDatasource(Long id, String sourceName) {
this.id = id;
this.sourceName = sourceName;
}
}

@ -50,6 +50,16 @@ public class WmsInterfaceDataMapper extends BaseBean {
@Column(name = "SRC_DATA_SOURCE", length = 50)
public String dataSource;
/**
* id
*/
@Column(name = "DEST_DATA_SOURCE_ID)")
public Long destDatasourceId;
/**
* id
*/
@Column(name = "SRC_DATA_SOURCE_ID)")
public Long srcDatasourceId;
/**
*
*/
@Column(name = "SRC_TABLE_NAME", length = 50)

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.datasource.CusDatasource;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2021/12/21 13:33
* @Modify:
**/
@Repository
public interface CusDatasourceRepository extends BaseRepository<CusDatasource, Long> {
}

@ -1,7 +1,6 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.AmpJisRec;
import cn.estsh.i3plus.pojo.wms.dbinterface.WmsInterfaceDataMapper;
import org.springframework.stereotype.Repository;

Loading…
Cancel
Save