Merge branch 'dev' into test

yun-zuoyi
王杰 5 years ago
commit f88041df1e

@ -48,17 +48,17 @@ public class MesEnumUtil {
} }
/** /**
* JIS * JIS
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_JIS_SCAN_SEQ_TYPE { public enum MES_JIS_SCAN_TYPE {
ONE_PROD(10, "整发"), TRUE(10, "是"),
MANY_PROD(20, "单发"); FALSE(20, "否");
private int value; private int value;
private String description; private String description;
MES_JIS_SCAN_SEQ_TYPE(int value, String description) { MES_JIS_SCAN_TYPE(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }

@ -13,6 +13,112 @@ import org.apache.commons.lang3.StringUtils;
public class MesPcnEnumUtil { public class MesPcnEnumUtil {
/** /**
* JIS
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_JIS_PATTERN_TYPE {
ONE_PROD(10, "单产品发运"),
MANY_PROD(20, "多产品发运");
private int value;
private String description;
MES_JIS_PATTERN_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;
}
}
/**
* JIS
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_JIS_SCAN_TYPE {
TRUE(10, "是"),
FALSE(20, "否");
private int value;
private String description;
MES_JIS_SCAN_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;
}
}
/**
* JIS
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_QUEUE_JIS_STATUS {
TRUE(10, "已发运"),
FALSE(20, "未发运");
private int value;
private String description;
MES_QUEUE_JIS_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;
}
}
/**
* MesMethodmethodType * MesMethodmethodType
* 10. * 10.
*/ */

@ -33,58 +33,4 @@ public class StringUtil {
} }
return fieldNames; return fieldNames;
} }
/**
*
* @param clazz
* @return
*/
public static List<String> getFieldList(Class clazz) {
Field[] fields = clazz.getDeclaredFields();
Field[] superFields = clazz.getSuperclass().getDeclaredFields();
List<String> fieldNames = new ArrayList<>();
for(int i = 0;i < fields.length; i++){
fieldNames.add(fields[i].getName());
}
for(int i = 0;i < superFields.length; i++){
fieldNames.add(superFields[i].getName());
}
return fieldNames;
}
/**
*
* @param fieldName
* @param o
* @return
*/
public static Object getFieldValueByName(String fieldName, Object o) {
try {
String firstLetter = fieldName.substring(0, 1).toUpperCase();
String getter = "get" + firstLetter + fieldName.substring(1);
Method method = o.getClass().getMethod(getter, new Class[] {});
Object value = method.invoke(o, new Object[] {});
return value;
} catch (Exception e) {
return null;
}
}
private static Pattern linePattern = Pattern.compile("_(\\w)");
/** 驼峰转下划线 */
public static Map<String, Object> humpToLine(Map<String, Object> map) {
Map<String, Object> resultMap = new HashMap<>();
for (String str : map.keySet()) {
str = str.toLowerCase();
Matcher matcher = linePattern.matcher(str);
StringBuffer sb = new StringBuffer();
while (matcher.find()) {
matcher.appendReplacement(sb, matcher.group(1).toUpperCase());
}
matcher.appendTail(sb);
resultMap.put(sb.toString(), map.get(str));
}
return resultMap;
}
} }

@ -0,0 +1,64 @@
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 :JIS
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-12-25
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_JIS_PATTERN")
@Api("JIS发运模式")
public class MesJisPattern extends BaseBean {
@Column(name = "PATTERN_NO")
@ApiParam("模式编号")
private String patternNo;
@Column(name = "PATTERN_NAME")
@ApiParam("模式名称")
private String patternName;
@Column(name = "RULE")
@ApiParam("规则")
private String rule;
@Column(name = "DESC")
@ApiParam("描述")
private String desc;
@Column(name = "TOP_NO")
@ApiParam("一次显示TOP数")
private Integer topNo;
@Column(name = "HANDLE_NO")
@ApiParam("一次处理套数")
private Integer handleNo;
@Column(name = "PATTERN_TYPE")
@ApiParam("模式类型")
private Integer patternType;
@Column(name = "SCAN_TYPE")
@ApiParam("是否按主队列顺序扫描")
private Integer scanType;
}

@ -0,0 +1,64 @@
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 :JIS
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-12-24
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_QUEUE_JIS")
@Api("JIS发运队列")
public class MesQueueJis extends BaseBean {
@Column(name = "JIS_NO")
@ApiParam("主队列编号")
private String jisNo;
@Column(name = "PROD_CFG_CODE")
@ApiParam("产品配置代码")
private String prodCfgCode;
@Column(name = "VIN_CODE")
@ApiParam("vin")
private String vinCode;
@Column(name = "CAR_NO")
@ApiParam("车号")
private String carNo;
@Column(name = "SEQ")
@ApiParam("排序")
private Double seq;
@Column(name = "STATUS")
@ApiParam("状态")
private Integer status;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
}

@ -0,0 +1,56 @@
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 :JIS
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-12-24
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_QUEUE_JIS_DETAIL")
@Api("JIS发运队列明细")
public class MesQueueJisDetail extends BaseBean {
@Column(name = "JIS_NO")
@ApiParam("主队列编号")
private String jisNo;
@Column(name = "PROD_CFG_CODE")
@ApiParam("产品配置代码")
private String prodCfgCode;
@Column(name = "PART_NO")
@ApiParam("物料号")
private String partNo;
@Column(name = "PART_NAME_RDD")
@ApiParam("物料名称")
private String partNameRdd;
@Column(name = "STATUS")
@ApiParam("状态")
private Integer status;
@Column(name = "SERIAL_NUMBER")
@ApiParam("产品条码")
private String serialNumber;
}

@ -0,0 +1,60 @@
package cn.estsh.i3plus.pojo.mes.pcn.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
@Data
public class QueueJisModel implements Serializable {
@ApiParam("主队列编号")
private String jisNo;
@ApiParam("vin")
private String vinCode;
@ApiParam("车号")
private String carNo;
@ApiParam("排序")
private Double seq;
@ApiParam("状态")
private Integer status;
@ApiParam("产品配置代码")
private String prodCfgCode;
@ApiParam("物料号")
private String partNo;
@ApiParam("物料名称")
private String partNameRdd;
@ApiParam("产品类型代码")
private String produceCategoryCode;
@ApiParam("明细状态")
private Integer detailStatus;
@ApiParam("产品条码")
private String serialNumber;
public QueueJisModel() {
}
public QueueJisModel(String jisNo, String vinCode, String carNo, Double seq, Integer status, String prodCfgCode, String partNo, String partNameRdd, String produceCategoryCode, Integer detailStatus, String serialNumber) {
this.jisNo = jisNo;
this.vinCode = vinCode;
this.carNo = carNo;
this.seq = seq;
this.status = status;
this.prodCfgCode = prodCfgCode;
this.partNo = partNo;
this.partNameRdd = partNameRdd;
this.produceCategoryCode = produceCategoryCode;
this.detailStatus = detailStatus;
this.serialNumber = serialNumber;
}
}

@ -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.MesJisPattern;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-12-25
* @Modify:
**/
@Repository
public interface MesJisPatternRepository extends BaseRepository<MesJisPattern, Long> {
}

@ -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.MesQueueJisDetail;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-12-25
* @Modify:
**/
@Repository
public interface MesQueueJisDetailRepository extends BaseRepository<MesQueueJisDetail, Long> {
}

@ -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.MesQueueJis;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-12-25
* @Modify:
**/
@Repository
public interface MesQueueJisRepository extends BaseRepository<MesQueueJis, Long> {
}

@ -57,8 +57,8 @@ public class MesJisPattern extends BaseBean {
@ApiParam("模式类型") @ApiParam("模式类型")
private Integer patternType; private Integer patternType;
@Column(name = "SCAN_SEQ_TYPE") @Column(name = "SCAN_TYPE")
@ApiParam("产品组扫描顺序类型") @ApiParam("是否按主队列顺序扫描")
private Integer scanSeqType; private Integer scanType;
} }

@ -53,4 +53,12 @@ public class MesQueueJis extends BaseBean {
@ApiParam("状态") @ApiParam("状态")
private Integer status; private Integer status;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
} }

@ -1,100 +0,0 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
@Data
public class QueueJisModel implements Serializable {
@ApiParam("id")
private Long id;
@ApiParam("作业任务编号")
private String taskNo;
@ApiParam("作业类型")
private Integer taskType;
@ApiParam("作业状态")
private Integer taskStatus;
@ApiParam(value="生产线")
private String workCenterCode;
@ApiParam("计划日期")
private String planTime;
@ApiParam("任务来源")
private Integer taskSource;
@ApiParam("备注")
private String memo;
@ApiParam("通知标识")
private Integer notifyFlag;
@ApiParam("关联任务")
private String relateTask;
@ApiParam("组织代码")
public String organizeCode;
@ApiParam("有效性")
public Integer isValid;
@ApiParam("是否已删除")
public Integer isDeleted;
@ApiParam("创建用户")
public String createUser;
@ApiParam("创建日期")
public String createDatetime;
@ApiParam("修改人")
public String modifyUser;
@ApiParam("修改日期")
public String modifyDatetime;
@ApiParam("作业类型")
private String taskTypeName;
@ApiParam("作业状态")
private String taskStatusName;
@ApiParam("任务来源")
private String taskSourceName;
@ApiParam("通知标识")
private String notifyFlagName;
@ApiParam("mes设备作业任务页面按钮控制")
private MesButtonFlagModel mesButtonFlagModel;
public QueueJisModel() {
}
public QueueJisModel(Long id, String taskNo, Integer taskType, Integer taskStatus, String workCenterCode, String planTime, Integer taskSource, String memo, Integer notifyFlag, String relateTask, String organizeCode, Integer isValid, Integer isDeleted, String createUser, String createDatetime, String modifyUser, String modifyDatetime) {
this.id = id;
this.taskNo = taskNo;
this.taskType = taskType;
this.taskStatus = taskStatus;
this.workCenterCode = workCenterCode;
this.planTime = planTime;
this.taskSource = taskSource;
this.memo = memo;
this.notifyFlag = notifyFlag;
this.relateTask = relateTask;
this.organizeCode = organizeCode;
this.isValid = isValid;
this.isDeleted = isDeleted;
this.createUser = createUser;
this.createDatetime = createDatetime;
this.modifyUser = modifyUser;
this.modifyDatetime = modifyDatetime;
}
}

@ -1388,7 +1388,7 @@ public class MesHqlPack {
if (!StringUtils.isEmpty(mesQcCheckStandard.getWorkCenterCode())) { if (!StringUtils.isEmpty(mesQcCheckStandard.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(mesQcCheckStandard.getWorkCenterCode(), "workCenterCode", packBean); DdlPreparedPack.getStringEqualPack(mesQcCheckStandard.getWorkCenterCode(), "workCenterCode", packBean);
} }
if (null == mesQcCheckStandard.getCheckType()) { if (mesQcCheckStandard.getCheckType() != null) {
DdlPreparedPack.getNumberBiggerEqualPack(mesQcCheckStandard.getCheckType(), "checkType", packBean); DdlPreparedPack.getNumberBiggerEqualPack(mesQcCheckStandard.getCheckType(), "checkType", packBean);
} }
if (!StringUtils.isEmpty(mesQcCheckStandard.getCheckItem())) { if (!StringUtils.isEmpty(mesQcCheckStandard.getCheckItem())) {
@ -2118,9 +2118,6 @@ public class MesHqlPack {
if (!StringUtils.isEmpty(jisPattern.getPatternType())) { if (!StringUtils.isEmpty(jisPattern.getPatternType())) {
DdlPreparedPack.getNumEqualPack(jisPattern.getPatternType(), "patternType", packBean); DdlPreparedPack.getNumEqualPack(jisPattern.getPatternType(), "patternType", packBean);
} }
if (!StringUtils.isEmpty(jisPattern.getScanSeqType())) {
DdlPreparedPack.getNumEqualPack(jisPattern.getScanSeqType(), "scanSeqType", packBean);
}
return packBean; return packBean;
} }

Loading…
Cancel
Save