yun-zuoyi
许心洁 5 years ago
commit 5a1dc6dc7d

@ -12,6 +12,88 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CALENDAR_TYPE {
DAY(10, "日"),
WEEK(20, "周"),
MONTH(30, "月"),
YEAR(40, "年");
private int value;
private String description;
CALENDAR_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;
}
}
/**
* redis
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum EXPIRE_TIME {
NEVER(-1, "不过期"),
ONE_HOUR(3600, "一小时"),
ONE_MIN(60, "一分钟");
private int value;
private String description;
EXPIRE_TIME(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;
}
}
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum TRUE_OR_FALSE {
TRUE(1, "是"),
@ -779,7 +861,7 @@ public class MesEnumUtil {
SCRATCH(10, "划痕"),
FRACTURE(20, "破碎"),
SCRAP_TYPE3(30, "缺失");
SCRAP_TYPE(30, "缺失");
private int value;
private String description;
@ -1377,7 +1459,9 @@ public class MesEnumUtil {
MES_REPAIR(320, "质量数据处理措施"),
MES_EQU_TASK_PLAN(330, "设备作业周期计划"),
MES_PART_OJBECT(340, "物料对象"),
MES_ROUTE_PROCESS_WORK_CELL(350,"工序工作单元");
MES_ROUTE_PROCESS_WORK_CELL(350, "工序工作单元"),
MES_DATASOURCE(360, "DB地址清单"),
MES_EQU_TASK_NOTIFY_CFG(370, "设备通知配置");
private int value;
private String description;
@ -3077,7 +3161,78 @@ public class MesEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QUALITY_STANDARD_TYPE {
NG_RATE(10, "不良率"),
PPM(20, "PPM");
private int value;
private String description;
QUALITY_STANDARD_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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QUALITY_OBJECT_TYPE {
ORGANIZE(10, "工厂"),
WORK_CENTER_CODE(20, "产线"),
PRODUCT(30, "产品");
private int value;
private String description;
QUALITY_OBJECT_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;
}
}
/**
* MesProduceSnqcStatus
*/

@ -707,7 +707,8 @@ public class MesPcnEnumUtil {
public enum MES_REPAIR_STATUS {
REPAIRED(10, "已维修"),
NO_REPAIR(20, "待维修");
NO_REPAIR(20, "待维修"),
NO_CONFIRM(30, "待确认");
private int value;
private String description;

@ -4427,8 +4427,9 @@ public class WmsEnumUtil {
WAIT_RECEIVING(10, "待收货"),
RECEIVING(20, "收货中"),
COMPLETE_RECEIVING(30, "收货完成"),
UN_RECEIVED(40, "延迟未收货"),
ELSE(50,"其他");
CLOSE(40,"已关闭"),
CANCEL(50,"已取消"),
UN_RECEIVED(60, "延迟未收货");
private int value;
private String description;

@ -1,5 +1,10 @@
package cn.estsh.i3plus.pojo.base.util;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
public class StringUtil {
public static boolean isEmpty(Object obj){
@ -10,4 +15,78 @@ public class StringUtil {
return false;
}
/**
*
* @param clazz
* @return
*/
public static String[] getFields(Class clazz) {
Field[] fields = clazz.getDeclaredFields();
String[] fieldNames = new String[fields.length];
for(int i=0;i<fields.length;i++){
fieldNames[i]=fields[i].getName();
}
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());
}
// fieldNames.add("id");
// fieldNames.add("organizeCode");
// fieldNames.add("isValid");
// fieldNames.add("isDeleted");
// fieldNames.add("createUser");
// fieldNames.add("createDatetime");
// fieldNames.add("modifyUser");
// fieldNames.add("modifyDatetime");
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;
}
}
/**
*
* @return
*/
public static String getFieldNames(String[] fieldNames) {
StringBuffer stringBuffer = new StringBuffer();
for (String fieldName : fieldNames) {
stringBuffer.append(fieldName).append(",");
}
int stringBufferLength = stringBuffer.length();
stringBuffer.delete(stringBufferLength - 1, stringBufferLength);
return stringBuffer.toString();
}
}

@ -132,11 +132,11 @@ public class MesProduceSn extends BaseBean {
@Transient
@ApiParam("下线开始时间")
private String outWorkCenterStartTime;
private String outWorkCenterTimeStart;
@Transient
@ApiParam("下线结束时间")
private String outWorkCenterEndTime;
private String outWorkCenterTimeEnd;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;

@ -130,6 +130,14 @@ public class MesProduceSnTravel extends BaseBean {
@ApiParam("返回信息")
private String resultMsg;
@Transient
@ApiParam("下线开始时间")
private String outWorkCenterTimeStart;
@Transient
@ApiParam("下线结束时间")
private String outWorkCenterTimeEnd;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;
}

@ -13,6 +13,7 @@ import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
@ -106,4 +107,8 @@ public class MesProductData extends BaseBean {
@ApiParam("数据组号")
private String groupNo;
@Transient
@ApiParam("字段总数")
private Integer fieldNum;
}

@ -0,0 +1,52 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
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;
import javax.persistence.Transient;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_QUALITY_STANDARD_CFG")
@Api("质量标准配置")
public class MesQualityStandardCfg extends BaseBean {
@Column(name = "STANDARD_TYPE")
@ApiParam("标准类型")
private Integer standardType;
@Column(name = "OBJECT_TYPE")
@ApiParam("对象类型")
private Integer objectType;
@Column(name = "OBJECT_KEY_VALUE")
@ApiParam("对象键值")
private String objectKeyValue;
@Column(name = "OBJECT_KEY")
@ApiParam("对象键")
private String objectKey;
}

@ -4,6 +4,7 @@ import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* @Description : 线
@ -39,7 +40,7 @@ public class ProductBiModel {
private double outputQty;
@ApiParam(value = "完成率")
private double CompleteRate;
private double completeRate;
@ApiParam(value = "合格数量")
private double passQty;
@ -53,6 +54,9 @@ public class ProductBiModel {
@ApiParam(value = "不良率")
private double ngRate;
@ApiParam(value = "警戒值")
private double sentinelValue;
@ApiParam("客户代码")
private String customerCode;
@ -65,12 +69,16 @@ public class ProductBiModel {
@ApiParam("图表显示的数据")
private List<ProductBiSeriesModel> series;
@ApiParam("列名")
private Map<String, String> colMap;
@Deprecated
public double getCompleteRate() {
if (this.planQty != 0) {
this.CompleteRate = outputQty / planQty;
this.completeRate = outputQty / planQty;
} else {
this.CompleteRate = 0;
this.completeRate = 0;
}
return this.CompleteRate;
return this.completeRate;
}
}

@ -1,6 +1,5 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -80,13 +80,13 @@ public class QcCheckDataModel {
private String workCellName;
@ApiParam("物料名称")
private String partNoName;
private String partName;
public QcCheckDataModel() {
}
public QcCheckDataModel(Long id, String organizeCode, String createUser, String createDatetime, String checkId, String partNo, String workCenterCode, String workCellCode, Integer checkType, String checkItem, String checkStandard, String checkGuide, String checkFrequency, String checkValue, String checkResult, String sn, Integer qty, String memo, String orderNo, String custCode, String shiftCode, String shiftGroupName, String squadLeader, String workCellName, String partNoName) {
public QcCheckDataModel(Long id, String organizeCode, String createUser, String createDatetime, String checkId, String partNo, String workCenterCode, String workCellCode, Integer checkType, String checkItem, String checkStandard, String checkGuide, String checkFrequency, String checkValue, String checkResult, String sn, Integer qty, String memo, String orderNo, String custCode, String shiftCode, String shiftGroupName, String squadLeader, String workCellName, String partName) {
this.id = id;
this.organizeCode = organizeCode;
this.createUser = createUser;
@ -111,6 +111,6 @@ public class QcCheckDataModel {
this.shiftGroupName = shiftGroupName;
this.squadLeader = squadLeader;
this.workCellName = workCellName;
this.partNoName = partNoName;
this.partName = partName;
}
}

@ -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.MesQualityStandardCfg;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\11\13 11:53
* @Modify:
**/
public interface MesQualityStandardCfgRepository extends BaseRepository<MesQualityStandardCfg, Long> {
}

@ -414,7 +414,7 @@ public class MesHqlPack {
/**
* MES 线
*
* @param mesWcCheck
* @param wcCheck
* @return
*/
public static DdlPackBean getMesWcCheck(MesWcCheck wcCheck, String organizeCode) {
@ -1838,11 +1838,11 @@ public class MesHqlPack {
if (mesProduceSn.getQcStatus() != null) {
DdlPreparedPack.getNumEqualPack(mesProduceSn.getQcStatus(), "qcStatus", packBean);
}
if (!StringUtil.isEmpty(mesProduceSn.getOutWorkCenterStartTime())) {
DdlPreparedPack.getStringSmallerPack(mesProduceSn.getOutWorkCenterStartTime(), "outWorkCenterTime", packBean);
if (!StringUtil.isEmpty(mesProduceSn.getOutWorkCenterTimeEnd())) {
DdlPreparedPack.getStringSmallerPack(mesProduceSn.getOutWorkCenterTimeEnd(), "outWorkCenterTime", packBean);
}
if (!StringUtil.isEmpty(mesProduceSn.getOutWorkCenterEndTime())) {
DdlPreparedPack.getStringBiggerPack(mesProduceSn.getOutWorkCenterEndTime(), "outWorkCenterTime", packBean);
if (!StringUtil.isEmpty(mesProduceSn.getOutWorkCenterTimeStart())) {
DdlPreparedPack.getStringBiggerPack(mesProduceSn.getOutWorkCenterTimeStart(), "outWorkCenterTime", packBean);
// DdlPreparedPack.timeBuilder(
// mesProduceSn.getOutWorkCenterStartTime(),
// mesProduceSn.getOutWorkCenterEndTime(),
@ -2021,6 +2021,12 @@ public class MesHqlPack {
if (mesProduceSnTravel.getQcStatus() != null) {
DdlPreparedPack.getNumEqualPack(mesProduceSnTravel.getQcStatus(), "qcStatus", packBean);
}
if (!StringUtil.isEmpty(mesProduceSnTravel.getOutWorkCenterTimeStart())) {
DdlPreparedPack.getStringBiggerPack(mesProduceSnTravel.getOutWorkCenterTimeStart(), "outWorkCenterTime", packBean);
}
if (!StringUtil.isEmpty(mesProduceSnTravel.getOutWorkCenterTimeEnd())) {
DdlPreparedPack.getStringSmallerPack(mesProduceSnTravel.getOutWorkCenterTimeEnd(), "outWorkCenterTime", packBean);
}
DdlPreparedPack.timeBuilder(
mesProduceSnTravel.getCreateDateTimeStart(),
mesProduceSnTravel.getCreateDateTimeEnd(),

@ -159,7 +159,7 @@ public class WmsPOMaster extends BaseBean {
@Transient
private List<String> orderNoList;
@Column(name = "DOCK")
@Column(name = "DOCK",columnDefinition = "varchar(50) default '1'")
@ApiParam("道口")
public String dock;

Loading…
Cancel
Save