Merge remote-tracking branch 'remotes/origin/test'

yun-zuoyi
曾贞一 6 years ago
commit 6c8cfd8678

@ -325,6 +325,14 @@ public class AndonManageQueue extends BaseBean {
@ApiParam(value = "安灯状态集合") @ApiParam(value = "安灯状态集合")
private List<String> statusCodeList; private List<String> statusCodeList;
@Transient
@ApiParam(value = "日发生次数")
private int dayTime;
@Transient
@ApiParam(value = "周发生次数")
private int weekendsTime;
// 是否转呼 // 是否转呼
public Integer getIsShiftCall() { public Integer getIsShiftCall() {
return this.isShiftCall == null ? 0 : this.isShiftCall; return this.isShiftCall == null ? 0 : this.isShiftCall;

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>i3plus-pojo-aps</artifactId>
<dependencies>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-base</artifactId>
</dependency>
</dependencies>
</project>

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.aps.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface FieldAnnotation {
boolean modify() default true;
boolean display() default true;
int pric() default 2;
}

@ -0,0 +1,18 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import java.util.HashMap;
import java.util.Map;
public class BaseAPS extends BaseBean {
private transient Map<String, Object> customFields = new HashMap<>();
public Object getCustomField(String code) {
return customFields.get(code);
}
public void setCustomField(String code, Object value) {
customFields.put(code, value);
}
}

@ -0,0 +1,30 @@
package cn.estsh.i3plus.pojo.aps.bean;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-12
* @Modify:
**/
@Data
@MappedSuperclass
public class BaseCode extends BaseAPS {
@Column(name="CODE")
@ApiParam(value ="编码")
private String code;
@Column(name="NAME")
@ApiParam(value ="名称")
private String name;
@Column(name="REMARK")
@ApiParam(value ="备注")
private String remark;
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class BaseOrder extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class BaseRule extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class CancelPlanRule extends BaseRule {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class DayShift extends BaseAPS {
}

@ -0,0 +1,49 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.enums.FIELD_TYPE;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.Api;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.lang.reflect.Method;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-11
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="APS_FIELD_INFO")
@Api("字段信息")
public class FieldInfo extends BaseCode {
private String className;
private FIELD_TYPE type;
private Boolean customize;
private Boolean modify;
private Boolean display;
private Integer pric;
private String tips;
private String expression;
private String position;
@JsonIgnore
private transient Class<? extends BaseBean> clazz;
@JsonIgnore
private transient Class<?> typeClass;
@JsonIgnore
private transient Method getMethod;
@JsonIgnore
private transient Method setMethod;
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class FieldSetRule extends BaseRule {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class HeuristicRule extends BaseRule {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class Inventory extends BaseOrder {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class MatCalcRule extends BaseRule {
}

@ -0,0 +1,103 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.enums.MATERIAL_TYPE;
import cn.estsh.i3plus.pojo.aps.enums.PREPARE_TYPE;
import cn.estsh.i3plus.pojo.aps.enums.REPLENISHMENT_TYPE;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
@Data
@MappedSuperclass
@Table(name = "MATERIAL")
public class Material extends BaseCode {
@Column(name="TYPE")
@ApiParam(value ="类型")
private MATERIAL_TYPE type;
@Column(name="PREPARE_TYPE")
@ApiParam(value ="备料类型")
private PREPARE_TYPE prepareType;
@Column(name="REPL_TYPE")
@ApiParam(value ="补充类型")
private REPLENISHMENT_TYPE replType;
@Column(name="PURCHASE_LEAD_TIME")
@ApiParam(value ="采购提前期")
private String purchaseLeadTime;
@Column(name="MANUF_LEAD_TIME")
@ApiParam(value ="制造提前期")
private String manufLeadTime;
@Column(name="SHIPMENT_LEAD_TIME")
@ApiParam(value ="配送提前期")
private String shipmentLeadTime;
@Column(name="UNIT_PURCHASE")
@ApiParam(value ="单位采购量")
private Integer unitPurchase;
@Column(name="UNIT_MANUF")
@ApiParam(value ="单位制造量")
private Integer unitManuf;
@Column(name="UNIT_SHIPMENT")
@ApiParam(value ="单位配送量")
private Integer unitShipment;
@Column(name="LEVEL")
@ApiParam(value ="低阶码")
private Integer level;
@Column(name="IS_AUTO_FIX_PEGGING")
@ApiParam(value ="自动补充标识")
private boolean autoFixPegging;
@Column(name="MAX_MANUF_BATCH")
@ApiParam(value ="最大制造批量")
private Double maxManufBatch;
@Column(name="MIN_MANUF_BATCH")
@ApiParam(value ="最小制造批量")
private Double minManufBatch;
@Column(name="MANUF_UNIT_BATCH")
@ApiParam(value ="制造批量单位")
private Double manufUnitBatch;
@Column(name="MAX_PUR_BATCH")
@ApiParam(value ="最大采购批量")
private Double maxPurBatch;
@Column(name="MIN_PUR_BATCH")
@ApiParam(value ="最小采购批量")
private Double minPurBatch;
@Column(name="PUR_UNIT_BATCH")
@ApiParam(value ="采购批量单位")
private Double purUnitBatch;
@Column(name="MIN_STOCK_COUNT")
@ApiParam(value ="最小库存数量")
private Double minStockCount;
@Column(name="SAFE_STOCK_COUNT")
@ApiParam(value ="安全库存数量")
private Double safeStockCount;
@Column(name="MAX_STOCK_COUNT")
@ApiParam(value ="最大库存数量")
private Double maxStockCount;
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class OperInput extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class OperOutput extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class OperResource extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class Operation extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class OvertimeCalendar extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class PlanFeedback extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class ProductOrder extends BaseOrder {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :线
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class ProductRouting extends BaseCode {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class PurchaseOrder extends BaseOrder {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class ResCalendar extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class Resource extends BaseCode {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class RuleGroup extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class SalesOrder extends BaseOrder {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class StandOperation extends BaseCode {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class SysParam extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class Work extends BaseCode {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class WorkInput extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class WorkOutput extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class WorkRelation extends BaseAPS {
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class WorkResource extends BaseAPS {
}

@ -0,0 +1,20 @@
package cn.estsh.i3plus.pojo.aps.enums;
public enum FIELD_TYPE {
NONE,
BOOLEAN, // 布尔
CHAR, // 字符
SHORT, // 短整型
INTEGER, // 整型
LONG, // 长整型
DOUBLE, // 浮点型
DATE, // 日期类型(2019-09-16)
TIME, // 时间类型(17:35:30)
DATETIME, // 日期时间类型(2019-09-16 17:35:30)
DURATION, // 时间段(1H)
ENUM, // 枚举
MULTIENUM, // 多选枚举
STRING, // 字符串
OBJECT, // 关联对象下来选择关联对象的Code值
LIST // 对象集合,不可编辑。
}

@ -0,0 +1,7 @@
package cn.estsh.i3plus.pojo.aps.enums;
public enum MATERIAL_TYPE {
PRODUCT,
HALF_PRODUCT,
RAW_MATERIAL
}

@ -0,0 +1,7 @@
package cn.estsh.i3plus.pojo.aps.enums;
public enum PREPARE_TYPE {
NO,
SELF_MAKE,
PURCHASE
}

@ -0,0 +1,7 @@
package cn.estsh.i3plus.pojo.aps.enums;
public enum REPLENISHMENT_TYPE {
NO,
BATCH,
ONEBYONE
}

@ -0,0 +1,9 @@
package cn.estsh.i3plus.pojo.aps.model;
import lombok.Data;
@Data
public class EnumModel {
private String code;
private String name;
}

@ -0,0 +1,9 @@
package cn.estsh.i3plus.pojo.aps.repository;
import cn.estsh.i3plus.pojo.aps.bean.FieldInfo;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface FieldInfoRepository extends BaseRepository<FieldInfo, Long> {
}

@ -2,6 +2,7 @@ package cn.estsh.i3plus.pojo.base.bean;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
@ -66,8 +67,7 @@ public abstract class BaseBean implements Serializable {
@Column(name="IS_VALID") @Column(name="IS_VALID")
@ApiParam(value = "有效性",example = "1") @ApiParam(value = "有效性",example = "1")
@AnnoOutputColumn(hidden = true) @AnnoOutputColumn(refClass = WmsEnumUtil.TRUE_OR_FALSE.class,refForeignKey = "value",value = "description")
//启用停用
public Integer isValid; //CommonEnumUtil.IS_VAILD; public Integer isValid; //CommonEnumUtil.IS_VAILD;
@Column(name="IS_DELETED") @Column(name="IS_DELETED")

@ -62,6 +62,7 @@ public class XStreamFactory {
// xStream.setMode(XStream.NO_REFERENCES); // xStream.setMode(XStream.NO_REFERENCES);
xStream.autodetectAnnotations(true); xStream.autodetectAnnotations(true);
// XStream.setupDefaultSecurity(xStream);
return xStream; return xStream;
} }
@ -123,6 +124,16 @@ public class XStreamFactory {
} }
/** /**
* Javabean XML
* @param <T>
* @return xml
*/
public static <T> String toXmlNoHeadLine(T t) {
xStream.processAnnotations(t.getClass());
return xStream.toXML(t);
}
/**
* XMLjavabean * XMLjavabean
* *
* @param xmlStr xml * @param xmlStr xml

@ -0,0 +1,25 @@
package cn.estsh.i3plus.pojo.base.common.converter;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.collections.MapConverter;
import com.thoughtworks.xstream.mapper.Mapper;
import org.springframework.util.LinkedCaseInsensitiveMap;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-09-09 14:35
* @Modify:
**/
public class LinkedCaseInsensitiveMapConverter extends MapConverter implements Converter {
public LinkedCaseInsensitiveMapConverter(Mapper mapper) {
super(mapper);
}
@Override
public boolean canConvert(Class aClass) {
return aClass.equals(LinkedCaseInsensitiveMap.class);
}
}

@ -106,6 +106,52 @@ public class AndonEnumUtil {
} }
/** /**
*
* 10-20-
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum COUNT_TYPE {
DAY("10","按照天统计"),
WEEKEND("20","按照周统计");
private String value;
private String description;
COUNT_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].value, val)) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String descriptionOfValue(String val) {
String tmp = "";
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].description, val)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
* *
* 10-20- * 10-20-
*/ */
@ -211,9 +257,10 @@ public class AndonEnumUtil {
SIGN(2,"20","响应"), SIGN(2,"20","响应"),
RESOLVE(3,"30","解决"), RESOLVE(3,"30","解决"),
CANCEL(4,"40", "撤销"), CANCEL(4,"40", "撤销"),
COMMIT(5,"50","提交"), COMMIT(5,"50","解决待审"),// 20190917将“提交”更改为“解决待审”
PASS(6,"60","审批"), PASS(6,"60","审批完成"), // 20190917将“审批”更改为“审批完成”
REJECT(7,"70","驳回"); REJECT(7,"70","驳回"),
CONFIRMED_CANCEL(8,"80","撤销已确认"); // 20190917增加这个枚举
private int value; private int value;
private String code; private String code;
@ -245,6 +292,16 @@ public class AndonEnumUtil {
return tmp; return tmp;
} }
public static String codeOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].code, val)) {
tmp = values()[i].description;
}
}
return tmp;
}
public static int descriptionOfValue(String val) { public static int descriptionOfValue(String val) {
int tmp = -1; int tmp = -1;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {

@ -3,6 +3,9 @@ package cn.estsh.i3plus.pojo.base.enumutil;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
/** /**
* @Description : * @Description :
* @Reference : * @Reference :
@ -17,12 +20,12 @@ public class BlockSoftSwitchEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CASE_TYPE{ public enum CASE_TYPE{
SOCKET(10,"SOCKET"), SOCKET(10,"SOCKET套件"),
RESTFUL(20,"RESTFUL"), RESTFUL(20,"RESTFUL套件"),
DATASOURCE(30,"数据源"), DATASOURCE(30,"数据源套件"),
WEBSERVICE(40,"WebService"), WEB_SERVICE(40,"WebService套件"),
MQ(50,"消息队列"), MQ(50,"消息队列套件"),
WebSocket(60,"WebSocket"); WEB_SOCKET(60,"WebSocket套件");
private int value; private int value;
private String description; private String description;
@ -49,6 +52,146 @@ public class BlockSoftSwitchEnumUtil {
} }
return tmp; return tmp;
} }
public static CASE_TYPE valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SUIT_MODE{
CLIENT(1,"客户端"),
SERVER(2,"服务端");
private int value;
private String description;
SUIT_MODE(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;
}
}
/**
*
* <per>
* <br/> ID
* <br/> 1 2
* <br/>
* <br/> ID
* </per>
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SOFTS_WITCH_ACTION{
/* WebService */
SERVER_WEB_SERVICE_SEND_EMAIL(SUIT_MODE.SERVER,CASE_TYPE.WEB_SERVICE,240001,"Server IMPP 服务邮件服务"),
SERVER_WEB_SERVICE_HELLO(SUIT_MODE.SERVER,CASE_TYPE.WEB_SERVICE,240003,"Server Hello测试服务"),
CLIENT_WEB_SERVICE_HELLO(SUIT_MODE.CLIENT,CASE_TYPE.WEB_SERVICE,140002,"Client IMPP邮件测试"),
CLIENT_WEB_SERVICE_DEFAULT(SUIT_MODE.CLIENT,CASE_TYPE.WEB_SERVICE,140003,"Client 默认设置"),
/* 数据源 */
CLIENT_DATA_SOURCE_IMPP(SUIT_MODE.CLIENT,CASE_TYPE.DATASOURCE,130001,"Client 数据库适配服务"),
/* Restful */
CLIENT_RESTFUL_IMPP(SUIT_MODE.CLIENT,CASE_TYPE.RESTFUL,120001,"Client Impp Test");
private int value;
private String description;
private String clazzName;
private SUIT_MODE mode;
private CASE_TYPE type;
SOFTS_WITCH_ACTION(SUIT_MODE mode, CASE_TYPE type,int value, String description) {
this.value = value;
this.description = description;
this.mode = mode;
this.type = type;
}
SOFTS_WITCH_ACTION(SUIT_MODE mode, CASE_TYPE type,int value, String clazzName, String description) {
this.value = value;
this.description = description;
this.clazzName = clazzName;
this.mode = mode;
this.type = type;
}
public static SOFTS_WITCH_ACTION 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 SOFTS_WITCH_ACTION[] valueOfCaseType(CASE_TYPE type) {
List<SOFTS_WITCH_ACTION> result = new ArrayList<>();
for (int i = 0; i < values().length; i++) {
if (values()[i].type.equals(type)) {
result.add(values()[i]);
}
}
return result.toArray(new SOFTS_WITCH_ACTION[result.size()]);
}
public static SOFTS_WITCH_ACTION[] valueOfMode(SUIT_MODE mode) {
List<SOFTS_WITCH_ACTION> result = new ArrayList<>();
for (int i = 0; i < values().length; i++) {
if (values()[i].mode.equals(mode)) {
result.add(values()[i]);
}
}
return result.toArray(new SOFTS_WITCH_ACTION[result.size()]);
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getClazzName() {
return clazzName;
}
public SUIT_MODE getMode() {
return mode;
}
public CASE_TYPE getType() {
return type;
}
} }
/** /**
@ -58,7 +201,9 @@ public class BlockSoftSwitchEnumUtil {
public enum REQUEST_SOURCE{ public enum REQUEST_SOURCE{
ACTIVE(1,"主动请求"), ACTIVE(1,"主动请求"),
SCHEDULE(2,"定时调度"), SCHEDULE(2,"定时调度"),
RABBITMQ(3,"MQ 调用"); RABBITMQ(3,"MQ 调用"),
HTTP(4,"接口调用"),
CLOUD(5,"Cloud调用");
private int value; private int value;
private String description; private String description;
@ -375,41 +520,6 @@ public class BlockSoftSwitchEnumUtil {
} }
/** /**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SUIT_MODE{
ACTIVE(1,"客户端"),
PASSIVE(2,"服务端");
private int value;
private String description;
SUIT_MODE(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;
}
}
/**
* *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -479,41 +589,4 @@ public class BlockSoftSwitchEnumUtil {
} }
} }
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SUIT_SERVER_WEB_SERVICE{
ACTIVE(40001,"serverWebServiceHello","hello"),
SCHEDULE(40002,"serverWebServiceSendEmail","邮件测试");
private int value;
private String description;
private String clazzName;
SUIT_SERVER_WEB_SERVICE(int value, String clazzName,String description) {
this.value = value;
this.clazzName = clazzName;
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;
}
}
} }

@ -2,6 +2,7 @@ package cn.estsh.i3plus.pojo.base.enumutil;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
/** /**
* @Description : * @Description :
@ -211,6 +212,9 @@ public class CommonEnumUtil {
public enum SYS_LOCALE_RESOURCE_TYPE { public enum SYS_LOCALE_RESOURCE_TYPE {
COMMON(1, "通用"), COMMON(1, "通用"),
EXCEPTION(2, "异常"), EXCEPTION(2, "异常"),
EXCEPTION_DETAIL(3, "异常明细"),
EXCEPTION_SOLUTION(4, "解决方案"),
EXCEPTION_ENUM(5, "枚举"),
MODULE(10, "模块"), MODULE(10, "模块"),
METHOD(11, "功能"), METHOD(11, "功能"),
BUTTON(12, "按钮"), BUTTON(12, "按钮"),
@ -866,45 +870,6 @@ public class CommonEnumUtil {
} }
/** /**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MATH_SYMBOL {
GREATER(1, ">"),
GREATER_OR_EQUAL(2, ">="),
LESS(3, "<"),
LESS_OR_EQUAL(4, "<="),
EQUAL(5, "="),
NOT_EQUAL(6, "<>");
private int value;
private String description;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private MATH_SYMBOL(int value, String description) {
this.value = value;
this.description = description;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* Content-Type * Content-Type
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -1090,4 +1055,5 @@ public class CommonEnumUtil {
public static final int VALID = CommonEnumUtil.IS_VAILD.VAILD.getValue(); public static final int VALID = CommonEnumUtil.IS_VAILD.VAILD.getValue();
// 数据未删除的静态常量 // 数据未删除的静态常量
public static final int FALSE = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); public static final int FALSE = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue();
} }

@ -18,9 +18,9 @@ public class ImppEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ORGANIZE_YTPE{ public enum ORGANIZE_YTPE{
TYPE_GROUP(1,"集团","组织类型为集团"), TYPE_GROUP(1,"集团","集团"),
TYPE_COMPANY(2,"公司","组织类型为公司"), TYPE_COMPANY(2,"公司","公司"),
TYPE_FACTORY(3,"工厂","组织类型为集团"), TYPE_FACTORY(3,"工厂","工厂"),
; ;
private int value; private int value;
@ -174,7 +174,7 @@ public class ImppEnumUtil {
LOG_LEVEL(int value, String name, String description) { LOG_LEVEL(int value, String name, String description) {
this.value = value; this.value = value;
this.name = name; this.name = name;
this.description = description; this.description = name;
} }
public int getValue() { public int getValue() {

@ -12,6 +12,43 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil { public class MesEnumUtil {
/** /**
* MesWorkOrderapprovalStatus
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_ORDER_APPROVAL_STATUS {
WAIT_APPROVAL(10, "待审批"),
COMPLETE_APPROVAL(20, "已审批"),
REJECT_APPROVAL(30, "驳回");
private int value;
private String description;
WORK_ORDER_APPROVAL_STATUS(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;
}
}
/**
* mes-pcn * mes-pcn
* *
*/ */
@ -459,6 +496,16 @@ public class MesEnumUtil {
} }
return tmp; 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;
}
} }
/** /**

@ -422,6 +422,15 @@ public class WmsEnumUtil {
return tmp; return tmp;
} }
public static LOCATE_TYPE codeOf(int val) {
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
public static int descOf(String desc) { public static int descOf(String desc) {
int tmp = 1; int tmp = 1;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
@ -717,7 +726,9 @@ public class WmsEnumUtil {
OUTSTOCK("OUTSTOCK", "出库"), OUTSTOCK("OUTSTOCK", "出库"),
INSTOCK("INSTOCK", "入库"), INSTOCK("INSTOCK", "入库"),
MOVESTOCK("MOVESTOCK", "移库"), MOVESTOCK("MOVESTOCK", "移库"),
CS("CS", "盘点"); CS("CS", "盘点"),
VDARC("VDARC", "VDA收货");
private String value; private String value;
private String description; private String description;
@ -1877,7 +1888,8 @@ public class WmsEnumUtil {
ZONE(20, "ZONE", "存储区对象"), ZONE(20, "ZONE", "存储区对象"),
LOCATE(30, "LOCATE", "库位对象"), LOCATE(30, "LOCATE", "库位对象"),
MATERIAL(40, "MATERIAL", "物料对象"), MATERIAL(40, "MATERIAL", "物料对象"),
TRANS_TYPE(50, "TRANS_TYPE", "交易代码对象"); TRANS_TYPE(50, "TRANS_TYPE", "交易代码对象"),
BUSI_TYPE(60, "BUSI_TYPE", "业务类型对象");
private String code; private String code;
private String description; private String description;
@ -3339,4 +3351,57 @@ public class WmsEnumUtil {
} }
} }
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum REC_STATUS{
UNRECEIVED("UNRECEIVED", "未收货"),
COMPLETE_RECEIPT("COMPLETE_RECEIPT", "完成收货"),
PARTIAL_RECEIPT("PARTIAL_RECEIPT", "部分收货"),
OVER_RECEIVED_GOODS("OVER_RECEIVED_GOODS", "超量收货"),
OTHER("ELSE", "其他"),;
private String value;
private String description;
REC_STATUS(String value, String description) {
this.value = value;
this.description = description;
}
public String getDescription() {
return description;
}
public String getCode() {
return value;
}
public String getValue() {
return value;
}
public static String getDes(String 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 String valueOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(val) ) {
tmp = values()[i].description;
}
}
return tmp;
}
}
} }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save