yun-zuoyi
WYnneaoapc 6 years ago
commit 4b47ceb42d

@ -0,0 +1,25 @@
package cn.estsh.i3plus.pojo.aps.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Data
public class GanttCalendarModel {
@Data
public static class Block {
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date beginTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
private Boolean onDuty;
}
private Long resourceId;
private List<Block> timeBlocks = new ArrayList<>();
}

@ -13,6 +13,82 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil {
/**
* MesProductEncodeCfg
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_MATCH_TYPE {
ORGANIZATION("10", "工厂"),
PART("20", "物料"),
CUST_CODE("30", "客户代码"),
CUST_PART_NO("40", "客户物料号"),
WORK_CENTER("50", "产线");
private String value;
private String description;
MES_MATCH_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 (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesProductEncodeCfg
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_CODE_TYPE {
SERIAL_SN("10", "过程条码"),
PRODUCT_SN("20", "产品条码"),
PACK_SN("30", "包装条码");
private String value;
private String description;
MES_CODE_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 (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesDatasource
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -51,10 +127,10 @@ public class MesEnumUtil {
}
/**
* MesRepair
* Mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_DADA_OPRATE_TYPE {
public enum MES_DATA_OPERATE_TYPE {
INSERT(10, "insert"),
SELECT(20, "select"),
@ -63,7 +139,7 @@ public class MesEnumUtil {
private int value;
private String description;
MES_DADA_OPRATE_TYPE(int value, String description) {
MES_DATA_OPERATE_TYPE(int value, String description) {
this.value = value;
this.description = description;
}

@ -0,0 +1,46 @@
package cn.estsh.i3plus.pojo.mes.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: joke.wang
* @CreateDate: 2019\11\5 10:47
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PRODUCT_ENCODE_CFG")
@Api("产品编码配置")
public class MesProductEncodeCfg extends BaseBean {
@Column(name = "CODE_TYPE")
@ApiParam("编码类型")
private String codeType;
@Column(name = "MATCH_TYPE")
@ApiParam("匹配类型")
private String matchType;
@Column(name = "MATCH_VALUE")
@ApiParam("匹配值")
private String matchValue;
@Column(name = "RULE_CODE")
@ApiParam("编码规则代码")
private String ruleCode;
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesProductEncodeCfg;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\11\5 10:59
* @Modify:
**/
public interface MesProductEncodeCfgRepository extends BaseRepository<MesProductEncodeCfg, Long> {
}

@ -1653,7 +1653,7 @@ public class MesHqlPack {
DdlPreparedPack.getNumEqualPack(mesDataObject.getOperateType(), "operateType", packBean);
}
if (!StringUtils.isEmpty(mesDataObject.getFieldPk())) {
DdlPreparedPack.getStringLikerPack(mesDataObject.getObjectName(), "fieldPk", packBean);
DdlPreparedPack.getStringLikerPack(mesDataObject.getFieldPk(), "fieldPk", packBean);
}
return packBean;
}
@ -1683,4 +1683,27 @@ public class MesHqlPack {
}
return packBean;
}
/**
*
* @param mesProductEncodeCfg
* @param organizeCode
* @return
*/
public static DdlPackBean getMesProductEncodeCfg(MesProductEncodeCfg mesProductEncodeCfg, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesProductEncodeCfg, organizeCode);
if (!StringUtils.isEmpty(mesProductEncodeCfg.getMatchValue())) {
DdlPreparedPack.getStringLikerPack(mesProductEncodeCfg.getMatchValue(), "matchValue", packBean);
}
if (!StringUtils.isEmpty(mesProductEncodeCfg.getCodeType())) {
DdlPreparedPack.getStringEqualPack(mesProductEncodeCfg.getCodeType(), "codeType", packBean);
}
if (!StringUtils.isEmpty(mesProductEncodeCfg.getMatchType())) {
DdlPreparedPack.getStringEqualPack(mesProductEncodeCfg.getMatchType(), "matchType", packBean);
}
if (!StringUtils.isEmpty(mesProductEncodeCfg.getRuleCode())) {
DdlPreparedPack.getStringEqualPack(mesProductEncodeCfg.getRuleCode(), "ruleCode", packBean);
}
return packBean;
}
}

Loading…
Cancel
Save