yun-zuoyi
刘敏 6 years ago
commit 8a94b054d8

@ -350,14 +350,16 @@ public class MesPcnEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_CENTER_RUNNING_STATUS {
RUNNING(1, "开线"),
STOPPED(2, "停线");
RUNNING(1, "start", "开线"),
STOPPED(2, "stop", "停线");
private int value;
private String code;
private String description;
WORK_CENTER_RUNNING_STATUS(int value, String description) {
WORK_CENTER_RUNNING_STATUS(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
@ -365,6 +367,10 @@ public class MesPcnEnumUtil {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
@ -378,6 +384,16 @@ public class MesPcnEnumUtil {
}
return tmp;
}
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;
}
}
/**
@ -386,10 +402,10 @@ public class MesPcnEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WC_CHECK_TYPE {
PERSON(10, "person", "人"),
EQUIPMENT(20, "equipment", "机"),
MATERIAL(30, "material", "料"),
ROUTE(40, "route", "法"),
PERSON(10, "people", "人"),
EQUIPMENT(20, "equipments", "设备"),
MATERIAL(30, "materials", "料"),
ROUTE(40, "routes", "工艺"),
ONLINE_SIGNAL(50, "onlineSignal", "开线信号");
private int value;
@ -423,6 +439,16 @@ public class MesPcnEnumUtil {
}
return tmp;
}
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;
}
}
/**
@ -498,4 +524,442 @@ public class MesPcnEnumUtil {
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum EQP_CONNECT_TYPE {
PLC(10, "PLC"),
DB(20, "DB"),
OTHER(30,"OTHER");
private int value;
private String description;
EQP_CONNECT_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;
}
}
/**
* MesPlanOrderstatus
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PLAN_ORDER_STATUS {
CREATE(10, "CREATED", "创建"),
DE_COMPOSE_ING(20, "DE_COMPOSE_ING", "分解中"),
DE_COMPOSE_ED(30, "DE_COMPOSE_ED", "分解完成"),
CLOSE(40, "CLOSE", "关闭");
private int value;
private String code;
private String description;
PLAN_ORDER_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 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;
}
}
/**
* MesWorkOrderworkOrderStatus
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_ORDER_STATUS {
CREATE(10, "创建"),
LANDED(20, "下达"),
OPEN(30, "启动"),
PAUSE(40, "暂停"),
CANCEL(50, "取消"),
CLOSE(60, "关闭");
private int value;
private String description;
WORK_ORDER_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;
}
}
/**
* MesWorkOrderworkOrderType
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_ORDER_TYPE {
STANDARD_ORDER(10, "标准工单"),
BTS_ORDER(20, "BTS工单"),
ATTEMPT_ORDER(30, "试制工单");
private int value;
private String description;
WORK_ORDER_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;
}
}
/**
* MesPlanOrderplanType
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PLAN_ORDER_TYPE {
STANDARD_ORDER(10, "标准");
private int value;
private String description;
PLAN_ORDER_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;
}
}
/**
* MesPlanOrdersource
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PALN_ORDER_SOURCE {
MES("MES", "来源于MES"),
SAP("SAP", "来源于SAP");
private String value;
private String description;
PALN_ORDER_SOURCE(String value, String description) {
this.value = value;
this.description = description;
}
public String 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.equals(val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesWorkOrdersource
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_ORDER_SOURCE {
MES("MES", "来源于MES"),
AMES("AMES", "来源于AMES"),
SAP("SAP", "来源于SAP"),
CREATE("CREATE", "手工新增"),
RESOLVE("RESOLVE", "计划分解");
private String value;
private String description;
WORK_ORDER_SOURCE(String value, String description) {
this.value = value;
this.description = description;
}
public String 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.equals(val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesQueueOrderstatus
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QUEUE_ORDER_STATUS {
NORMAL(10, "正常"),
ONLINE(20, "已上线"),
OFFLINE(30, "已下线"),
CLOSE(40, "已关闭"),
;
private int value;
private String description;
QUEUE_ORDER_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;
}
}
/**
* MesQueueOrderDetailstatus
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QUEUE_ORDER_DETAIL_STATUS {
NORMAL(10, "正常"),
CLOSE(20, "关闭");
private int value;
private String description;
QUEUE_ORDER_DETAIL_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;
}
}
/**
* MesPartCategorycategoryType
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PART_CATEGORY_TYPE {
CATEGORY_ONE("Category1", "类型1"),
CATEGORY_TWO("Category2", "类型2"),
CATEGORY_THREE("Category3", "类型3");
private String value;
private String description;
PART_CATEGORY_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 (val.equals(values()[i].value)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* 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;
}
public static String valueOfDescription2(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description.equals("已审批") ? "审批" : values()[i].description;
}
}
return tmp;
}
}
}

@ -0,0 +1,42 @@
package cn.estsh.i3plus.pojo.mes.pcn.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;
/**
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_PART_CATEGORY")
@Api("零件种类")
public class MesPartCategory extends BaseBean {
@Column(name="CATEGORY_CODE")
@ApiParam("分类代码")
private String categoryCode;
@Column(name="CATEGORY_NAME")
@ApiParam("分类名称")
private String categoryName;
@Column(name="CATEGORY_TYPE")
@ApiParam("分类类型")
private String categoryType;
}

@ -163,6 +163,10 @@ public class MesWorkOrder extends BaseBean {
public String prodCfgName;
@Transient
@ApiParam("区域代码名称")
private String areaCodeName;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划开始日期查询用,查询开始日期",example = "2018-12-31 23:59:59")
public String startTimeStart;

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.mes.pcn.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesPartCategory;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
* @Modify:
**/
@Repository
public interface MesPartCategoryRepository extends BaseRepository<MesPartCategory, Long> {
}

@ -33,6 +33,20 @@ public class MesHqlPack {
}
/**
*
*
* @param organizeCode
* @return
*/
public static DdlPackBean getAllBaseDataByNormalPro(BaseBean baseBean, String organizeCode) {
DdlPackBean packBean = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(organizeCode, "organizeCode", packBean);
DdlPreparedPack.getNumEqualPack(baseBean.getIsValid(), "isValid", packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_DEAL.NO.getValue(), "isDeleted", packBean);
return packBean;
}
/**
* MES PCN
*
* @param mesConfig
@ -153,4 +167,55 @@ public class MesHqlPack {
return packBean;
}
/**
*
*
* @param mesPart
* @return
*/
public static DdlPackBean getPartCondition(MesPart mesPart, String organizeCode) {
DdlPackBean packBean = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(organizeCode, "organizeCode", packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue(), "isValid", packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_DEAL.NO.getValue(), "isDeleted", packBean);
if (StringUtils.isNotEmpty(mesPart.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesPart.getPartNo(), "partNo", packBean);
}
if (StringUtils.isNotEmpty(mesPart.getPartName())) {
DdlPreparedPack.getStringLikerPack(mesPart.getPartName(), "partName", packBean);
}
if (StringUtils.isNotEmpty(mesPart.getCategoryCode1())) {
DdlPreparedPack.getStringEqualPack(mesPart.getCategoryCode1(), "categoryCode1", packBean);
}
if (StringUtils.isNotEmpty(mesPart.getCategoryCode2())) {
DdlPreparedPack.getStringEqualPack(mesPart.getCategoryCode2(), "categoryCode2", packBean);
}
if (StringUtils.isNotEmpty(mesPart.getCategoryCode3())) {
DdlPreparedPack.getStringEqualPack(mesPart.getCategoryCode3(), "categoryCode3", packBean);
}
DdlPreparedPack.getOrderDefault(mesPart);
DdlPreparedPack.getOrderByPack(new Object[]{"2"}, new String[]{mesPart.getOrderByParam()}, packBean);
return packBean;
}
/**
* MES
*
* @param customer
* @return
*/
public static DdlPackBean getMesCustomer(MesCustomer customer, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(customer, organizeCode);
if (StringUtils.isNotEmpty(customer.getCustomerCode())) {
DdlPreparedPack.getStringLikerPack(customer.getCustomerCode(), "customerCode", packBean);
}
if (StringUtils.isNotEmpty(customer.getCustomerName())) {
DdlPreparedPack.getStringLikerPack(customer.getCustomerName(), "customerName", packBean);
}
return packBean;
}
}

@ -163,6 +163,10 @@ public class MesWorkOrder extends BaseBean {
public String prodCfgName;
@Transient
@ApiParam("区域代码名称")
private String areaCodeName;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划开始日期查询用,查询开始日期",example = "2018-12-31 23:59:59")
public String startTimeStart;

@ -163,10 +163,12 @@ public class WmsActionGroupDetails extends BaseBean {
public WmsActionGroupDetails() {
}
public WmsActionGroupDetails(Long agId, Integer seq, Integer okSeq, Integer ngSeq, Integer valueType, Integer toUpper,
public WmsActionGroupDetails(Long id, Long agId, Integer seq, Integer okSeq, Integer ngSeq, Integer valueType, Integer toUpper,
Integer lenCheck, String regularCheck, String regularCheckFailMsg, Long asId, Long atId,
String asName, String atName, String goToBtnCode, String goToBtnName, Integer preShow,
Long showAmId, Integer isCommitAble, Integer isAutoOpenWindow, String searchKey, String groupKey) {
Long showAmId, Integer isCommitAble, Integer isAutoOpenWindow, String searchKey,
String groupKey, String organizeCode) {
this.id = id;
this.agId = agId;
this.seq = seq;
this.okSeq = okSeq;
@ -188,5 +190,6 @@ public class WmsActionGroupDetails extends BaseBean {
this.isAutoOpenWindow = isAutoOpenWindow;
this.searchKey = searchKey;
this.groupKey = groupKey;
this.organizeCode = organizeCode;
}
}

Loading…
Cancel
Save