【1211:报表1】

yun-zuoyi
jokelone 6 years ago
parent 7d07580a78
commit 0acf17ddd7

@ -12,6 +12,53 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil {
/**
* 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, "是"),
@ -341,7 +388,7 @@ public class MesEnumUtil {
public enum IF_CONNECT_TYPE {
DB("10", "DB"),
WEBSERVICE("20", "webservice "),
WEBSERVICE("20", "webservice"),
RESTFUL("30", "restful");
private String value;
@ -779,7 +826,7 @@ public class MesEnumUtil {
SCRATCH(10, "划痕"),
FRACTURE(20, "破碎"),
SCRAP_TYPE3(30, "缺失");
SCRAP_TYPE(30, "缺失");
private int value;
private String description;

@ -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;

@ -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();
}
}

@ -131,11 +131,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;

@ -128,6 +128,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;
}

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

@ -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;
}
}

@ -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(),

Loading…
Cancel
Save