返厂返修

yun-zuoyi
jokelone 6 years ago
parent ffdb547dc7
commit 7fc439319e

@ -13,6 +13,101 @@ public class MesEnumUtil {
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_REPAIR_STATUS {
REPAIRED(1, "已维修"),
NO_REPAIR(2, "未维修");
private int value;
private String description;
MES_REPAIR_STATUS(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
// 根据value返回枚举类型,主要在switch中使用
public static MES_REPAIR_STATUS getByValue(int value) {
for (MES_REPAIR_STATUS mesInsertExcel : values()) {
if (mesInsertExcel.getValue() == value) {
return mesInsertExcel;
}
}
return null;
}
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)
public enum MES_OPERATE_TYPE {
MES_QUALITY_JUDGEMENT(10, "质量判定");
private int value;
private String description;
MES_OPERATE_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
// 根据value返回枚举类型,主要在switch中使用
public static MES_OPERATE_TYPE getByValue(int value) {
for (MES_OPERATE_TYPE mesInsertExcel : values()) {
if (mesInsertExcel.getValue() == value) {
return mesInsertExcel;
}
}
return null;
}
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)
@ -695,7 +790,8 @@ public class MesEnumUtil {
public enum PASS_FAIL {
PASS(1, "合格"),
FAIL(2, "不合格");
FAIL(2, "不合格"),
SCRAP(3, "报废");
private int value;
private String description;

@ -0,0 +1,42 @@
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:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 14:25
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DEFECT")
@Api("缺陷表")
public class MesDefect extends BaseBean {
@Column(name = "DEFECT_CODE")
@ApiParam("缺陷代码")
private String defectCode;
@Column(name = "DEFECT_NAME")
@ApiParam("缺陷名称")
private String defectName;
@Column(name = "DEFECT_TYPE")
@ApiParam("缺陷类型")
private String defectType;
}

@ -0,0 +1,42 @@
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:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 14:28
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DEFECT_CAUSE")
@Api("缺陷原因表")
public class MesDefectCause extends BaseBean {
@Column(name = "DC_CODE")
@ApiParam("缺陷原因代码")
private String dcCode;
@Column(name = "DC_NAME")
@ApiParam("缺陷原因名称")
private String dcName;
@Column(name = "DC_TYPE")
@ApiParam("缺陷原因类型")
private String dcType;
}

@ -0,0 +1,69 @@
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:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 19:53
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_DEFECT_RECORD")
@Api("不良信息记录表")
public class MesDefectRecord extends BaseBean {
@Column(name="SERIAL_NUMBER")
@ApiParam("产品条码")
private String serialNumber;
@Column(name="PART_NO")
@ApiParam("物料号")
private String partNo;
@Column(name="PART_NAME")
@ApiParam("物料名称")
private String partName;
@Column(name="DEFECT_CODE")
@ApiParam("缺陷代码")
private String defectCode;
@Column(name="DEFECT_NAME")
@ApiParam("缺陷名称")
private String defectName;
@Column(name="DEFECT_LOCATION")
@ApiParam("缺陷位置")
private Integer defectLocation;
@Column(name="REPAIR_STATUS")
@ApiParam("维修状态")
private Integer repairStatus;
@Column(name="WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name="WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name="MEMO")
@ApiParam("备注")
private String memo;
}

@ -0,0 +1,86 @@
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:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 15:03
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DISMANTLE_RECORD")
@Api("物料拆解记录表")
public class MesDismantleRecord extends BaseBean {
@Column(name = "DISMANTLE_ID")
@ApiParam("拆解编号")
private String dismantleId;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name = "PARENT_PART_NO")
@ApiParam("产品物料编码")
private String parentPartNo;
@Column(name = "PARENT_PART_NAME")
@ApiParam("产品物料名称")
private String parentPartName;
@Column(name = "SN")
@ApiParam("产品条码")
private String sn;
@Column(name = "QTY")
@ApiParam("产品数量")
private Integer qty;
@Column(name = "DISMANTLE_QTY")
@ApiParam("拆解数")
private Integer dismantleQty;
@Column(name = "ITEM_PART_NO")
@ApiParam("子物料编码")
private String itemPartNo;
@Column(name = "ITEM_PART_NAME")
@ApiParam("子物料名称")
private String itemPartName;
@Column(name = "OK_QTY")
@ApiParam("合格数")
private Integer okQty;
@Column(name = "MISS_QTY")
@ApiParam("缺失数")
private Integer missQty;
@Column(name = "SCRAP_QTY")
@ApiParam("报废数")
private Integer scrapQty;
@Column(name = "MEMO")
@ApiParam("备注")
private String meno;
}

@ -0,0 +1,46 @@
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:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 14:17
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PRODUCE_CTGY_PICTURE")
@Api("产品类型图片表")
public class MesProduceCtgyPicture extends BaseBean {
@Column(name = "PRODUCE_CTGY_CODE")
@ApiParam("产品类型代码")
private String produceCtgyCode;
@Column(name = "SIDE_LOCATION")
@ApiParam("面位")
private String sideLocation;
@Column(name = "PICTURE_URL")
@ApiParam("图片URL")
private String pictureUrl;
@Column(name = "PICTURE_NAME")
@ApiParam("图片名称")
private String pictureName;
}

@ -121,6 +121,10 @@ public class MesProduceSn extends BaseBean {
@ApiParam("返回信息")
private String resultMsg;
@Column(name="OPERATE_TYPE")
@ApiParam("操作类型")
private Integer operateType;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;
}

@ -0,0 +1,86 @@
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:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 14:33
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_REPAIR_RECORD")
@Api("维修信息记录表")
public class MesRepairRecord extends BaseBean {
@Column(name = "SERIAL_NUMBER")
@ApiParam("产品条码")
private String serialNumber;
@Column(name = "PART_NO")
@ApiParam("产品物料号")
private String partNo;
@Column(name = "PART_NAME")
@ApiParam("物料名称")
private String partName;
@Column(name = "DEFECT_CODE")
@ApiParam("缺陷代码")
private String defectCode;
@Column(name = "DEFECT_NAME")
@ApiParam("缺陷名称")
private String defectName;
@Column(name = "SIDE_LOCATION")
@ApiParam("产品面位")
private String sideLocation;
@Column(name = "DEFECT_LOCATION")
@ApiParam("缺陷位置")
private String defectLocation;
@Column(name = "REPAIR_CODE")
@ApiParam("维修代码")
private String repairCode;
@Column(name = "REPAIR_NAME")
@ApiParam("维修名称")
private String repairName;
@Column(name = "DC_CODE")
@ApiParam("缺陷原因代码")
private String dcCode;
@Column(name = "DC_NAME")
@ApiParam("缺陷原因描述")
private String dcName;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("生产线")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工位")
private String workCellCode;
@Column(name = "MEMO")
@ApiParam("备注")
private String meno;
}

@ -0,0 +1,70 @@
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:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 14:42
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_SCRAP_RECORD")
@Api("报废信息记录表")
public class MesScrapRecord extends BaseBean {
@Column(name = "SERIAL_NUMBER")
@ApiParam("产品条码")
private String serialNumber;
@Column(name = "PART_NO")
@ApiParam("产品物料号")
private String partNo;
@Column(name = "PART_NAME")
@ApiParam("物料名称")
private String partName;
@Column(name = "DEFECT_CODE")
@ApiParam("缺陷代码")
private String defectCode;
@Column(name = "SCRAP_CODE")
@ApiParam("报废代码")
private String repairCode;
@Column(name = "SCRAP_NAME")
@ApiParam("报废名称")
private String scrapName;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("生产线")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工位")
private String workCellCode;
@Column(name = "SCRAP_REASON")
@ApiParam("报废原因")
private String scrapReason;
@Column(name = "MEMO")
@ApiParam("备注")
private String meno;
}

@ -1,8 +1,6 @@
package cn.estsh.i3plus.pojo.mes.pcn.model;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesPart;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesQueueOrder;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesWorkOrder;
import cn.estsh.i3plus.pojo.mes.pcn.bean.*;
import java.util.List;
@ -15,6 +13,12 @@ import java.util.List;
**/
public class RequestModel {
private List<MesDefectRecord> mesDefectRecordList; // 不良/缺陷记录数据集
private List<MesRepairRecord> mesRepairRecordList; // 维修记录数据集
private List<MesDismantleRecord> dismantleRecordList; // 拆解记录数据集
private List<MesWorkOrder> workOrderList; // 工单数据集
private List<MesPart> partList; // 物料数据集
@ -46,6 +50,30 @@ public class RequestModel {
this.partList = partList;
}
public List<MesDefectRecord> getMesDefectRecordList() {
return mesDefectRecordList;
}
public void setMesDefectRecordList(List<MesDefectRecord> mesDefectRecordList) {
this.mesDefectRecordList = mesDefectRecordList;
}
public List<MesRepairRecord> getMesRepairRecordList() {
return mesRepairRecordList;
}
public void setMesRepairRecordList(List<MesRepairRecord> mesRepairRecordList) {
this.mesRepairRecordList = mesRepairRecordList;
}
public List<MesDismantleRecord> getDismantleRecordList() {
return dismantleRecordList;
}
public void setDismantleRecordList(List<MesDismantleRecord> dismantleRecordList) {
this.dismantleRecordList = dismantleRecordList;
}
public List<MesWorkOrder> getWorkOrderList() {
return workOrderList;
}

@ -0,0 +1,14 @@
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.MesDefectCause;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 20:04
* @Modify:
**/
public interface MesDefectCauseRepository extends BaseRepository<MesDefectCause, Long> {
}

@ -0,0 +1,14 @@
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.MesDefectRecord;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 20:05
* @Modify:
**/
public interface MesDefectRecordRepository extends BaseRepository<MesDefectRecord, Long> {
}

@ -0,0 +1,14 @@
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.MesDefect;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 20:04
* @Modify:
**/
public interface MesDefectRepository extends BaseRepository<MesDefect, Long> {
}

@ -0,0 +1,14 @@
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.MesDismantleRecord;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 20:06
* @Modify:
**/
public interface MesDismantleRecordRepository extends BaseRepository<MesDismantleRecord, Long> {
}

@ -0,0 +1,14 @@
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.MesProduceCtgyPicture;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 20:35
* @Modify:
**/
public interface MesProduceCtgyPictureRepository extends BaseRepository<MesProduceCtgyPicture, Long> {
}

@ -0,0 +1,14 @@
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.MesRepairRecord;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 20:06
* @Modify:
**/
public interface MesRepairRecordRepository extends BaseRepository<MesRepairRecord, Long> {
}

@ -0,0 +1,14 @@
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.MesScrapRecord;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 20:07
* @Modify:
**/
public interface MesScrapRecordRepository extends BaseRepository<MesScrapRecord, Long> {
}

@ -0,0 +1,42 @@
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\10\16 14:25
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DEFECT")
@Api("缺陷表")
public class MesDefect extends BaseBean {
@Column(name = "DEFECT_CODE")
@ApiParam("缺陷代码")
private String defectCode;
@Column(name = "DEFECT_NAME")
@ApiParam("缺陷名称")
private String defectName;
@Column(name = "DEFECT_TYPE")
@ApiParam("缺陷类型")
private String defectType;
}

@ -0,0 +1,42 @@
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\10\16 14:28
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DEFECT_CAUSE")
@Api("缺陷原因表")
public class MesDefectCause extends BaseBean {
@Column(name = "DC_CODE")
@ApiParam("缺陷原因代码")
private String dcCode;
@Column(name = "DC_NAME")
@ApiParam("缺陷原因名称")
private String dcName;
@Column(name = "DC_TYPE")
@ApiParam("缺陷原因类型")
private String dcType;
}

@ -26,7 +26,7 @@ import java.util.Date;
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_DEFECT_RECORD")
@Api("生产工单")
@Api("不良信息记录表")
public class MesDefectRecord extends BaseBean {
@Column(name="SERIAL_NUMBER")
@ApiParam("产品条码")
@ -36,10 +36,22 @@ public class MesDefectRecord extends BaseBean {
@ApiParam("物料号")
private String partNo;
@Column(name="PART_NAME")
@ApiParam("物料名称")
private String partName;
@Column(name="DEFECT_CODE")
@ApiParam("不良代码")
@ApiParam("缺陷代码")
private String defectCode;
@Column(name="DEFECT_NAME")
@ApiParam("缺陷名称")
private String defectName;
@Column(name="DEFECT_LOCATION")
@ApiParam("缺陷位置")
private Integer defectLocation;
@Column(name="REPAIR_STATUS")
@ApiParam("维修状态")
private Integer repairStatus;
@ -55,8 +67,4 @@ public class MesDefectRecord extends BaseBean {
@Column(name="MEMO")
@ApiParam("备注")
private String memo;
public int getRepairStatusVal() {
return this.repairStatus == null ? 0 : this.repairStatus;
}
}

@ -0,0 +1,86 @@
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\10\16 15:03
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DISMANTLE_RECORD")
@Api("物料拆解记录表")
public class MesDismantleRecord extends BaseBean {
@Column(name = "DISMANTLE_ID")
@ApiParam("拆解编号")
private String dismantleId;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name = "PARENT_PART_NO")
@ApiParam("产品物料编码")
private String parentPartNo;
@Column(name = "PARENT_PART_NAME")
@ApiParam("产品物料名称")
private String parentPartName;
@Column(name = "SN")
@ApiParam("产品条码")
private String sn;
@Column(name = "QTY")
@ApiParam("产品数量")
private Integer qty;
@Column(name = "DISMANTLE_QTY")
@ApiParam("拆解数")
private Integer dismantleQty;
@Column(name = "ITEM_PART_NO")
@ApiParam("子物料编码")
private String itemPartNo;
@Column(name = "ITEM_PART_NAME")
@ApiParam("子物料名称")
private String itemPartName;
@Column(name = "OK_QTY")
@ApiParam("合格数")
private Integer okQty;
@Column(name = "MISS_QTY")
@ApiParam("缺失数")
private Integer missQty;
@Column(name = "SCRAP_QTY")
@ApiParam("报废数")
private Integer scrapQty;
@Column(name = "MEMO")
@ApiParam("备注")
private String meno;
}

@ -0,0 +1,42 @@
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\10\16 15:00
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PART_OBJECT")
@Api("物料对象配置表")
public class MesPartObject extends BaseBean {
@Column(name = "PART_NO")
@ApiParam("物料编码")
private String partNo;
@Column(name = "OBJECT_CODE")
@ApiParam("对象代码")
private String objectCode;
@Column(name = "OBJECT_NAME")
@ApiParam("物料名称")
private String objectName;
}

@ -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\10\16 14:17
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PRODUCE_CTGY_PICTURE")
@Api("产品类型图片表")
public class MesProduceCtgyPicture extends BaseBean {
@Column(name = "PRODUCE_CTGY_CODE")
@ApiParam("产品类型代码")
private String produceCtgyCode;
@Column(name = "SIDE_LOCATION")
@ApiParam("面位")
private String sideLocation;
@Column(name = "PICTURE_URL")
@ApiParam("图片URL")
private String pictureUrl;
@Column(name = "PICTURE_NAME")
@ApiParam("图片名称")
private String pictureName;
}

@ -0,0 +1,86 @@
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\10\16 14:33
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_REPAIR_RECORD")
@Api("维修信息记录表")
public class MesRepairRecord extends BaseBean {
@Column(name = "SERIAL_NUMBER")
@ApiParam("产品条码")
private String serialNumber;
@Column(name = "PART_NO")
@ApiParam("产品物料号")
private String partNo;
@Column(name = "PART_NAME")
@ApiParam("物料名称")
private String partName;
@Column(name = "DEFECT_CODE")
@ApiParam("缺陷代码")
private String defectCode;
@Column(name = "DEFECT_NAME")
@ApiParam("缺陷名称")
private String defectName;
@Column(name = "SIDE_LOCATION")
@ApiParam("产品面位")
private String sideLocation;
@Column(name = "DEFECT_LOCATION")
@ApiParam("缺陷位置")
private String defectLocation;
@Column(name = "REPAIR_CODE")
@ApiParam("维修代码")
private String repairCode;
@Column(name = "REPAIR_NAME")
@ApiParam("维修名称")
private String repairName;
@Column(name = "DC_CODE")
@ApiParam("缺陷原因代码")
private String dcCode;
@Column(name = "DC_NAME")
@ApiParam("缺陷原因描述")
private String dcName;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("生产线")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工位")
private String workCellCode;
@Column(name = "MEMO")
@ApiParam("备注")
private String meno;
}

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

@ -0,0 +1,66 @@
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\10\16 14:42
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_SCRAP_RECORD")
@Api("报废信息记录表")
public class MesScrapRecord extends BaseBean {
@Column(name = "SERIAL_NUMBER")
@ApiParam("产品条码")
private String serialNumber;
@Column(name = "PART_NO")
@ApiParam("产品物料号")
private String partNo;
@Column(name = "PART_NAME")
@ApiParam("物料名称")
private String partName;
@Column(name = "DEFECT_CODE")
@ApiParam("缺陷代码")
private String defectCode;
@Column(name = "SCRAP_CODE")
@ApiParam("报废代码")
private String repairCode;
@Column(name = "SCRAP_NAME")
@ApiParam("报废名称")
private String scrapName;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("生产线")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工位")
private String workCellCode;
@Column(name = "MEMO")
@ApiParam("备注")
private String meno;
}

@ -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\10\16 14:22
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_TYPE_CFG")
@Api("类型信息表")
public class MesTypeCfg extends BaseBean {
@Column(name = "TYPE_CODE")
@ApiParam("类型代码")
private String typeCode;
@Column(name = "TYPE_NAME")
@ApiParam("类型名称")
private String typeName;
@Column(name = "BUSINESS_TYPE_CODE")
@ApiParam("业务类型代码")
private String businessTypeCode;
@Column(name = "BUSINESS_TYPE_NAME")
@ApiParam("业务类型名称")
private String businessTypeName;
}

@ -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.MesDefectCause;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 16:56
* @Modify:
**/
public interface MesDefectCauseRepository extends BaseRepository<MesDefectCause, Long> {
}

@ -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.MesDefect;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 15:24
* @Modify:
**/
public interface MesDefectRepository extends BaseRepository<MesDefect, Long> {
}

@ -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.MesProduceCtgyPicture;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 15:44
* @Modify:
**/
public interface MesProduceCtgyPictureRepository extends BaseRepository<MesProduceCtgyPicture, Long> {
}

@ -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.MesTypeCfg;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\16 16:29
* @Modify:
**/
public interface MesTypeCfgRepository extends BaseRepository<MesTypeCfg, Long> {
}

@ -1391,4 +1391,87 @@ public class MesHqlPack {
}
return packBean;
}
/**
* MES
* @param mesDefect
* @param organizeCode
* @return
*/
public static DdlPackBean getMesDefect(MesDefect mesDefect, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesDefect, organizeCode);
if (!StringUtils.isEmpty(mesDefect.getDefectCode())) {
DdlPreparedPack.getStringLikerPack(mesDefect.getDefectCode(), "defectCode", packBean);
}
if (!StringUtils.isEmpty(mesDefect.getDefectName())) {
DdlPreparedPack.getStringLikerPack(mesDefect.getDefectName(), "defectName", packBean);
}
if (!StringUtils.isEmpty(mesDefect.getDefectType())) {
DdlPreparedPack.getStringLikerPack(mesDefect.getDefectType(), "defectType", packBean);
}
return packBean;
}
/**
* MES
* @param mesProduceCtgyPicture
* @param organizeCode
* @return
*/
public static DdlPackBean getMesProduceCtgyPicture(MesProduceCtgyPicture mesProduceCtgyPicture, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesProduceCtgyPicture, organizeCode);
if (!StringUtils.isEmpty(mesProduceCtgyPicture.getProduceCtgyCode())) {
DdlPreparedPack.getStringLikerPack(mesProduceCtgyPicture.getProduceCtgyCode(), "produceCtgyCode", packBean);
}
if (!StringUtils.isEmpty(mesProduceCtgyPicture.getPictureName())) {
DdlPreparedPack.getStringLikerPack(mesProduceCtgyPicture.getPictureName(), "pictureName", packBean);
}
if (!StringUtils.isEmpty(mesProduceCtgyPicture.getSideLocation())) {
DdlPreparedPack.getStringLikerPack(mesProduceCtgyPicture.getSideLocation(), "sideLocation", packBean);
}
return packBean;
}
/**
* MES
* @param mesTypeCfg
* @param organizeCode
* @return
*/
public static DdlPackBean getMesTypeCfg(MesTypeCfg mesTypeCfg, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesTypeCfg, organizeCode);
if (!StringUtils.isEmpty(mesTypeCfg.getTypeCode())) {
DdlPreparedPack.getStringLikerPack(mesTypeCfg.getTypeCode(), "typeCode", packBean);
}
if (!StringUtils.isEmpty(mesTypeCfg.getBusinessTypeCode())) {
DdlPreparedPack.getStringLikerPack(mesTypeCfg.getBusinessTypeCode(), "businessTypeCode", packBean);
}
if (!StringUtils.isEmpty(mesTypeCfg.getTypeName())) {
DdlPreparedPack.getStringLikerPack(mesTypeCfg.getTypeName(), "typeName", packBean);
}
if (!StringUtils.isEmpty(mesTypeCfg.getBusinessTypeName())) {
DdlPreparedPack.getStringLikerPack(mesTypeCfg.getBusinessTypeName(), "businessTypeName", packBean);
}
return packBean;
}
/**
* MES
* @param mesDefectCause
* @param organizeCode
* @return
*/
public static DdlPackBean getMesDefectCause(MesDefectCause mesDefectCause, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesDefectCause, organizeCode);
if (!StringUtils.isEmpty(mesDefectCause.getDcCode())) {
DdlPreparedPack.getStringLikerPack(mesDefectCause.getDcCode(), "dcCode", packBean);
}
if (!StringUtils.isEmpty(mesDefectCause.getDcName())) {
DdlPreparedPack.getStringLikerPack(mesDefectCause.getDcName(), "dcName", packBean);
}
if (!StringUtils.isEmpty(mesDefectCause.getDcType())) {
DdlPreparedPack.getStringLikerPack(mesDefectCause.getDcType(), "dcType", packBean);
}
return packBean;
}
}

Loading…
Cancel
Save