【需求:1090 返厂返修增加分页查询】

yun-zuoyi
jokelone 6 years ago
parent 5b712ce774
commit bc13a8a3ac

@ -12,6 +12,43 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil {
/**
* MesScrap
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SCRAP_TYPE {
SCRAP_TYPE(10, "过期"),
SCRAP_TYPE2(20, "不合格"),
SCRAP_TYPE3(30, "缺失");
private int value;
private String description;
SCRAP_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;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)

@ -12,6 +12,82 @@ import org.apache.commons.lang3.StringUtils;
**/
public class MesPcnEnumUtil {
/**
* MesScrap
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SCRAP_TYPE {
SCRAP_TYPE(10, "过期"),
SCRAP_TYPE2(20, "不合格"),
SCRAP_TYPE3(30, "缺失");
private int value;
private String description;
SCRAP_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
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PRODUCE_SN_QC_STATUS {
QUALIFIED(10, "合格"),
DEFECTED(20, "不合格"),
SCRAPED(30, "报废"),
DISMANTLED(40, "已拆解");
private int value;
private String description;
PRODUCE_SN_QC_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;
}
}
/**
* mes
*/

@ -53,6 +53,10 @@ public class MesDefectRecord extends BaseBean {
@ApiParam("缺陷位置")
private String defectLocation;
@Column(name = "SIDE_LOCATION")
@ApiParam("面位")
private String sideLocation;
@Column(name="REPAIR_STATUS")
@ApiParam("维修状态")
private Integer repairStatus;

@ -36,4 +36,8 @@ public class MesScrap extends BaseBean {
@ApiParam("报废名称")
private String scrapName;
@Column(name = "SCRAP_TYPE")
@ApiParam("报废类型")
private String scrapType;
}

@ -60,10 +60,6 @@ public class MesScrapRecord extends BaseBean {
@ApiParam("工位")
private String workCellCode;
@Column(name = "SCRAP_REASON")
@ApiParam("报废原因")
private String scrapReason;
@Column(name = "MEMO")
@ApiParam("备注")
private String memo;

@ -36,6 +36,16 @@ public class MesProdBindRecordModel {
private Integer missQty;
@ApiParam("报废数")
private Integer scrapQty;
@ApiParam("创建时间")
private String createUser;
@ApiParam("创建时间")
private String createDatetime;
@ApiParam("修改人")
private String modifyUser;
@ApiParam("修改时间")
private String modifyDatetime;
@ApiParam("产品条码")
private String serialNumber;
public MesProdBindRecordModel() {
}
@ -72,4 +82,26 @@ public class MesProdBindRecordModel {
this.parentPartNo = parentPartNo;
this.parentPartName = parentPartName;
}
public MesProdBindRecordModel(Long id, String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String parentPartName, String createUser, String createDatetime, String modifyUser, String modifyDatetime, String serialNumber) {
this.id = id;
this.itemPartNo = itemPartNo;
this.itemPartName = itemPartName;
this.qty = qty;
this.isValid = isValid;
this.isDeleted = isDeleted;
this.organizeCode = organizeCode;
this.isFeed = isFeed;
this.workCenterCode = workCenterCode;
this.workCellCode = workCellCode;
this.kpSn = kpSn;
this.parentPartNo = parentPartNo;
this.parentPartName = parentPartName;
this.createUser = createUser;
this.createDatetime = createDatetime;
this.modifyUser = modifyUser;
this.modifyDatetime = modifyDatetime;
this.serialNumber = serialNumber;
}
}

@ -220,4 +220,64 @@ public class MesHqlPack {
return packBean;
}
/**
* MES PCN
*
* @param mesRepair
* @return
*/
public static DdlPackBean getMesRepair(MesRepair mesRepair, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesRepair.getRepairCode())) {
DdlPreparedPack.getStringLikerPack(mesRepair.getRepairCode(), "repairCode", packBean);
}
if (StringUtils.isNotEmpty(mesRepair.getRepairName())) {
DdlPreparedPack.getStringLikerPack(mesRepair.getRepairName(), "repairName", packBean);
}
if (mesRepair.getRepairType() != null) {
DdlPreparedPack.getNumEqualPack(mesRepair.getRepairType(), "repairType", packBean);
}
return packBean;
}
/**
* MES PCN
*
* @param mesScrap
* @return
*/
public static DdlPackBean getMesScrap(MesScrap mesScrap, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesScrap.getScrapCode())) {
DdlPreparedPack.getStringLikerPack(mesScrap.getScrapCode(), "scrapCode", packBean);
}
if (StringUtils.isNotEmpty(mesScrap.getScrapName())) {
DdlPreparedPack.getStringLikerPack(mesScrap.getScrapName(), "scrapName", packBean);
}
if (StringUtils.isNotEmpty(mesScrap.getScrapType())) {
DdlPreparedPack.getStringLikerPack(mesScrap.getScrapType(), "scrapType", packBean);
}
return packBean;
}
/**
* MES PCN
*
* @param mesDefectCause
* @return
*/
public static DdlPackBean getMesDefectCause(MesDefectCause mesDefectCause, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesDefectCause.getDcCode())) {
DdlPreparedPack.getStringLikerPack(mesDefectCause.getDcCode(), "dcCode", packBean);
}
if (StringUtils.isNotEmpty(mesDefectCause.getDcName())) {
DdlPreparedPack.getStringLikerPack(mesDefectCause.getDcName(), "dcName", packBean);
}
if (mesDefectCause.getDcType() != null) {
DdlPreparedPack.getNumEqualPack(mesDefectCause.getDcType(), "dcType", packBean);
}
return packBean;
}
}

Loading…
Cancel
Save