diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesCellFeedRecord.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesCellFeedRecord.java new file mode 100644 index 0000000..6464445 --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesCellFeedRecord.java @@ -0,0 +1,74 @@ +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; +import java.io.Serializable; + +/** + * @Description :工位投料履历信息 + * @Reference : + * @Author : siliter.yuan + * @CreateDate : 2020-06-17 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "MES_CELL_FEED_RECORD") +@Api("工位投料履历信息") +public class MesCellFeedRecord extends BaseBean implements Serializable { + private static final long serialVersionUID = 1947971379489107783L; + @Column(name = "WORK_CENTER_CODE") + @ApiParam("工作中心") + private String workCenterCode; + + @Column(name = "WORK_CELL_CODE") + @ApiParam("工作单元") + private String workCellCode; + + @Column(name = "PART_NO") + @ApiParam("物料号") + private String partNo; + + @Column(name = "PART_NAME") + @ApiParam("物料名称") + private String partName; + + @Column(name = "RAW_TYPE") + @ApiParam("原料类型") + private String rawType; + + @Column(name = "RAW_SN") + @ApiParam("原材料条码") + private String rawSn; + + @Column(name = "RAW_QTY") + @ApiParam("原材料数量") + private Double rawQty; + + @Column(name = "LOT_NO") + @ApiParam("关联批次") + private String lotNo; + + @Column(name = "SUPPLIER_CODE") + @ApiParam("供应商代码") + private String supplierCode; + + + public double getRawQtyVal() { + return this.rawQty == null ? 0l : this.rawQty; + } + +} diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesCellFeedRecordRepository.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesCellFeedRecordRepository.java new file mode 100644 index 0000000..6153d23 --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesCellFeedRecordRepository.java @@ -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.MesCellFeedRecord; + +/** + * @Description : 工位投料履历持久化类 + * @Reference : + * @Author : siliter.yuan + * @CreateDate : 2020-06-17 09:53 + * @Modify: + **/ +public interface MesCellFeedRecordRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesCellFeedRecord.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesCellFeedRecord.java new file mode 100644 index 0000000..9386832 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesCellFeedRecord.java @@ -0,0 +1,74 @@ +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; +import java.io.Serializable; + +/** + * @Description :工位投料履历信息 + * @Reference : + * @Author : siliter.yuan + * @CreateDate : 2020-06-17 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "MES_CELL_FEED_RECORD") +@Api("工位投料履历信息") +public class MesCellFeedRecord extends BaseBean implements Serializable { + private static final long serialVersionUID = 1947971369489107783L; + @Column(name = "WORK_CENTER_CODE") + @ApiParam("工作中心") + private String workCenterCode; + + @Column(name = "WORK_CELL_CODE") + @ApiParam("工作单元") + private String workCellCode; + + @Column(name = "PART_NO") + @ApiParam("物料号") + private String partNo; + + @Column(name = "PART_NAME") + @ApiParam("物料名称") + private String partName; + + @Column(name = "RAW_TYPE") + @ApiParam("原料类型") + private String rawType; + + @Column(name = "RAW_SN") + @ApiParam("原材料条码") + private String rawSn; + + @Column(name = "RAW_QTY") + @ApiParam("原材料数量") + private Double rawQty; + + @Column(name = "LOT_NO") + @ApiParam("关联批次") + private String lotNo; + + @Column(name = "SUPPLIER_CODE") + @ApiParam("供应商代码") + private String supplierCode; + + + public double getRawQtyVal() { + return this.rawQty == null ? 0l : this.rawQty; + } + +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesCellFeedRecordRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesCellFeedRecordRepository.java new file mode 100644 index 0000000..5cb4185 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesCellFeedRecordRepository.java @@ -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.MesCellFeedRecord; + +/** + * @Description : 工位投料履历持久化类 + * @Reference : + * @Author : siliter.yuan + * @CreateDate : 2020-06-17 09:53 + * @Modify: + **/ +public interface MesCellFeedRecordRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesPcnHqlPack.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesPcnHqlPack.java index 91597a2..9d81d04 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesPcnHqlPack.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesPcnHqlPack.java @@ -111,6 +111,22 @@ public class MesPcnHqlPack { return packBean; } + /** + * 获取工作中心下所有的投料履历数据 + * + * @param mesCellFeedRecord + * @param org + * @return + */ + public static DdlPackBean getMesCellFeedRecord(MesCellFeedRecord mesCellFeedRecord, String org) { + DdlPackBean packBean = getAllBaseData(org); + DdlPreparedPack.getStringEqualPack(mesCellFeedRecord.getWorkCenterCode(), "workCenterCode", packBean); + DdlPreparedPack.getNumberBiggerPack(0, "rawQty", packBean); + DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue(), "isValid", packBean); + DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), "isDeleted", packBean); + return packBean; + } + /** * 获取原材料扫描信息的对应工序BOM