From 921be6b0f211a877ade5a3c49350017f190b77f7 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 1 Nov 2019 14:13:33 +0800 Subject: [PATCH 1/5] =?UTF-8?q?1=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E8=AE=A1=E5=88=92=E8=B5=84=E6=BA=90=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../estsh/i3plus/pojo/aps/bean/ShippingTime.java | 58 ++++++++++++++++------ .../estsh/i3plus/pojo/aps/common/BeanRelation.java | 32 ++++++------ .../i3plus/pojo/aps/holders/EShippingTime.java | 8 +++ .../i3plus/pojo/aps/model/ResourceCompose.java | 3 +- .../src/main/resources/relations/ShippingTime.xml | 11 ++++ 5 files changed, 79 insertions(+), 33 deletions(-) create mode 100644 modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/holders/EShippingTime.java create mode 100644 modules/i3plus-pojo-aps/src/main/resources/relations/ShippingTime.xml diff --git a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/ShippingTime.java b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/ShippingTime.java index 9e637b2..25967a8 100644 --- a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/ShippingTime.java +++ b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/ShippingTime.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.aps.bean; import cn.estsh.i3plus.pojo.aps.common.BaseAPS; +import cn.estsh.i3plus.pojo.aps.common.BeanRelation; +import cn.estsh.i3plus.pojo.aps.holders.EShippingTime; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -21,27 +23,55 @@ import javax.persistence.Table; @Table(name = "APS_SHIPPING_TIME") @Api("运输时间") public class ShippingTime extends BaseAPS { + @Column(name="TIME") + @ApiParam(value ="运输时间") + private String time; + + @Column(name="PRIORITY") + @ApiParam(value ="优先级") + private Integer priority; + @Column(name="PREV_RES_CODE") - @ApiParam(value ="前资源编码") - private String prevResCode; + @ApiParam(value ="前资源对象Id") + private Long prevResId; @Column(name="POST_RES_CODE") - @ApiParam(value ="后资源编码") - private String postResCode; + @ApiParam(value ="后资源对象Id") + private Long postResId; @Column(name="PREV_STAND_CODE") - @ApiParam(value ="前标准工序编码") - private String prevStandCode; + @ApiParam(value ="前标准工序对象Id") + private Long prevStandId; @Column(name="POST_STAND_CODE") - @ApiParam(value ="后标准工序编码") - private String postStandCode; + @ApiParam(value ="后标准工序对象Id") + private Long postStandId; - @Column(name="TIME") - @ApiParam(value ="运输时间") - private String time; + public Resource getPrevRes() {return BeanRelation.get(this, EShippingTime.PrevRes); } - @Column(name="PRIORITY") - @ApiParam(value ="优先级") - private Integer priority; + public void setPrevRes(Resource res) { + this.prevResId = res != null ? res.getId() : 0l; + BeanRelation.set(this, EShippingTime.PrevRes, res); + } + + public Resource getPostRes() { return BeanRelation.get(this, EShippingTime.PostRes); } + + public void setPostRes(Resource res) { + this.postResId = res != null ? res.getId() : 0l; + BeanRelation.set(this, EShippingTime.PostRes, res); + } + + public StandOperation getPrevStand() { return BeanRelation.get(this, EShippingTime.PrevStand);} + + public void setPrevStand(StandOperation stand) { + this.prevStandId = stand != null ? stand.getId() : 0l; + BeanRelation.set(this, EShippingTime.PrevStand, stand); + } + + public StandOperation getPostStand() { return BeanRelation.get(this, EShippingTime.PostStand); } + + public void setPostStand(StandOperation stand) { + this.postStandId = stand != null ? stand.getId() : 0l; + BeanRelation.set(this, EShippingTime.PostStand, stand); + } } diff --git a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/common/BeanRelation.java b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/common/BeanRelation.java index 700a1cf..fa3db91 100644 --- a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/common/BeanRelation.java +++ b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/common/BeanRelation.java @@ -202,30 +202,26 @@ public class BeanRelation { } } - public static List lastList(BaseBean entity, Enum... args) { - List result = new ArrayList(); - lastListImpl(result, entity, null, args, 0); - return result; - } - - public static List lastList(BaseBean entity, Predicate filter, Enum... args) { - List result = new ArrayList(); - lastListImpl(result, entity, filter, args, 0); + public static List lastList(BaseBean bean, Enum... holders) { + List result = new ArrayList<>(); + lastListImpl(result, bean, bean, holders, 0); return result; } - - @SuppressWarnings("unchecked") - private final static boolean lastListImpl(List result, BaseBean entity, Predicate filter, - Enum[] args, int index) { - if (index >= args.length) { + private final static boolean lastListImpl(List result, BaseBean bean, BaseBean self, + Enum[] holders, int index) { + if (index >= holders.length) { + if (self == bean) { + return false; + } index = 0; + self = bean; } boolean bNotLast = true; - List relaEntities = list(entity, args[index]); - for (BaseBean relaEntity : relaEntities) { - if (lastListImpl(result, relaEntity, filter, args, index + 1)) { - result.add((T)relaEntity); + List nextBeans = list(bean, holders[index]); + for (BaseBean nextBean : nextBeans) { + if (lastListImpl(result, nextBean, self, holders, index + 1)) { + result.add((T)nextBean); bNotLast = false; } } diff --git a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/holders/EShippingTime.java b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/holders/EShippingTime.java new file mode 100644 index 0000000..100379b --- /dev/null +++ b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/holders/EShippingTime.java @@ -0,0 +1,8 @@ +package cn.estsh.i3plus.pojo.aps.holders; + +public enum EShippingTime { + PrevRes, // 前资源 + PostRes, // 后资源 + PrevStand, // 前标准工序 + PostStand // 后标准工序 +} diff --git a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/model/ResourceCompose.java b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/model/ResourceCompose.java index 314ecfa..b735390 100644 --- a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/model/ResourceCompose.java +++ b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/model/ResourceCompose.java @@ -2,6 +2,7 @@ package cn.estsh.i3plus.pojo.aps.model; import cn.estsh.i3plus.pojo.aps.bean.WorkResource; +import java.util.ArrayList; import java.util.List; /** @@ -14,5 +15,5 @@ import java.util.List; **/ public class ResourceCompose { public WorkResource resource; - public List assResource; + public List assResource = new ArrayList<>(); } diff --git a/modules/i3plus-pojo-aps/src/main/resources/relations/ShippingTime.xml b/modules/i3plus-pojo-aps/src/main/resources/relations/ShippingTime.xml new file mode 100644 index 0000000..c51acb0 --- /dev/null +++ b/modules/i3plus-pojo-aps/src/main/resources/relations/ShippingTime.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file From 21087d5d4d9ddab44833decad99cece707f7a851 Mon Sep 17 00:00:00 2001 From: jokelone Date: Fri, 1 Nov 2019 15:41:26 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E3=80=90=E9=9C=80=E6=B1=82=EF=BC=9A1092=20?= =?UTF-8?q?=E5=B7=A5=E5=BA=8FBOM=E5=92=8C=E7=89=A9=E6=96=99=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E8=AE=B0=E5=BD=95=E6=A8=A1=E6=9D=BF=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=9E=84=E9=80=A0=E6=96=B9=E6=B3=95=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/mes/pcn/model/MesProcessBomModel.java | 14 ++++++++++++++ .../pojo/mes/pcn/model/MesProdBindRecordModel.java | 16 ++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProcessBomModel.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProcessBomModel.java index 11940aa..86e92b4 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProcessBomModel.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProcessBomModel.java @@ -58,4 +58,18 @@ public class MesProcessBomModel { this.parentPartNo = parentPartNo; this.parentPartName = parentPartName; } + + public MesProcessBomModel(String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String parentPartNo, String parentPartName) { + 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.parentPartNo = parentPartNo; + this.parentPartName = parentPartName; + } } diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProdBindRecordModel.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProdBindRecordModel.java index 8736abb..42840a9 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProdBindRecordModel.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProdBindRecordModel.java @@ -50,11 +50,10 @@ public class MesProdBindRecordModel { } - 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, Double dismantleQty) { + public MesProdBindRecordModel(Long id, String itemPartNo, String itemPartName, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String parentPartName, Double dismantleQty) { this.id = id; this.itemPartNo = itemPartNo; this.itemPartName = itemPartName; - this.qty = qty; this.isValid = isValid; this.isDeleted = isDeleted; this.organizeCode = organizeCode; @@ -104,4 +103,17 @@ public class MesProdBindRecordModel { this.serialNumber = serialNumber; } + public MesProdBindRecordModel(String itemPartNo, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String serialNumber) { + this.itemPartNo = itemPartNo; + 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.serialNumber = serialNumber; + } } From 2c47556abf21fa1cfe7fd93c04dc3816ec917c09 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 1 Nov 2019 16:15:23 +0800 Subject: [PATCH 3/5] =?UTF-8?q?1=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E8=AE=A1=E5=88=92=E8=B5=84=E6=BA=90=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/estsh/i3plus/pojo/aps/bean/ShippingTime.java | 5 +++++ .../src/main/java/cn/estsh/i3plus/pojo/aps/bean/WorkPlan.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/ShippingTime.java b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/ShippingTime.java index 25967a8..cfffda0 100644 --- a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/ShippingTime.java +++ b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/ShippingTime.java @@ -1,5 +1,6 @@ package cn.estsh.i3plus.pojo.aps.bean; +import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation; import cn.estsh.i3plus.pojo.aps.common.BaseAPS; import cn.estsh.i3plus.pojo.aps.common.BeanRelation; import cn.estsh.i3plus.pojo.aps.holders.EShippingTime; @@ -33,18 +34,22 @@ public class ShippingTime extends BaseAPS { @Column(name="PREV_RES_CODE") @ApiParam(value ="前资源对象Id") + @FieldAnnotation(property = false) private Long prevResId; @Column(name="POST_RES_CODE") @ApiParam(value ="后资源对象Id") + @FieldAnnotation(property = false) private Long postResId; @Column(name="PREV_STAND_CODE") @ApiParam(value ="前标准工序对象Id") + @FieldAnnotation(property = false) private Long prevStandId; @Column(name="POST_STAND_CODE") @ApiParam(value ="后标准工序对象Id") + @FieldAnnotation(property = false) private Long postStandId; public Resource getPrevRes() {return BeanRelation.get(this, EShippingTime.PrevRes); } diff --git a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/WorkPlan.java b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/WorkPlan.java index d034238..0d114d5 100644 --- a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/WorkPlan.java +++ b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/WorkPlan.java @@ -90,7 +90,7 @@ public class WorkPlan extends BaseAPS { @Column(name="LOCK_BEGIN") @ApiParam(value ="锁定开始时间") @FieldAnnotation(modify = false) - @RippleAnnotation(dependence = {"PostRelations.PostWork.WorkPlan.produceBegin"}, method = "calcPositiveLockBegin") + @RippleAnnotation(dependence = {"PostRelations.PostWork.WorkPlan.produceBegin", "produceBegin"}, method = "calcPositiveLock") private Date lockBegin; @Column(name="LOCK_END") From 9ad66157a813a9c33b27a6de4679867841c72315 Mon Sep 17 00:00:00 2001 From: WYnneaoapc Date: Fri, 1 Nov 2019 16:33:24 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E4=BC=98=E5=8C=96=201078-4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProcessBom.java | 9 ++++++++- .../cn/estsh/i3plus/pojo/mes/pcn/bean/MesProdBindRecord.java | 5 +++-- .../main/java/cn/estsh/i3plus/pojo/mes/bean/MesProcessBom.java | 4 ++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProcessBom.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProcessBom.java index c4dfe04..8ac4a33 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProcessBom.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProcessBom.java @@ -67,8 +67,12 @@ public class MesProcessBom extends BaseBean { @ApiParam(value = "子零件数量", example = "0") private Double qty; + @Transient + @ApiParam(value = "绑定数量") + private Double boundQty; + @Column(name = "IS_REPEAT") - @ApiParam(value = "是否可重复") + @ApiParam(value = "是否可重复") private Integer isRepeat; @Column(name = "IS_CHECK") @@ -99,6 +103,9 @@ public class MesProcessBom extends BaseBean { @ApiParam("产品条码") private String serialNumber; + public double getBoundQtyVal() { + return this.boundQty == null ? 0.0d : this.boundQty; + } public double getQtyVal() { return this.qty == null ? 0.0d : this.qty; diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProdBindRecord.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProdBindRecord.java index 13e4804..111be8e 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProdBindRecord.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProdBindRecord.java @@ -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 :产品绑定记录表 @@ -70,11 +71,11 @@ public class MesProdBindRecord extends BaseBean { private String supplierCode; @Column(name = "LOT_NO") - @ApiParam + @ApiParam("关联批次") private String lotNo; @Column(name = "IS_FEED") - @ApiParam + @ApiParam("是否投料配置") private Integer isFeed; @Column(name = "VERSION") diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesProcessBom.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesProcessBom.java index 4e0986f..58f0644 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesProcessBom.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesProcessBom.java @@ -69,6 +69,10 @@ public class MesProcessBom extends BaseBean { @ColumnDefault("0") @ApiParam(value = "子零件数量", example = "0") private Double qty; + + @Transient + @ApiParam(value = "绑定数量") + private Double boundQty; @Column(name = "IS_REPEAT") @ApiParam(value = "是否可重复") From 7f9f9cb242fe132bfef9c8cfe358c78882b52e18 Mon Sep 17 00:00:00 2001 From: WYnneaoapc Date: Fri, 1 Nov 2019 17:22:17 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=BF=94=E5=B7=A5=E8=BF=94=E4=BF=AEpojo?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=9B=B4=E6=94=B9=201092?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProduceCtgyPicture.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProduceCtgyPicture.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProduceCtgyPicture.java index f148413..db5ccea 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProduceCtgyPicture.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesProduceCtgyPicture.java @@ -30,7 +30,7 @@ public class MesProduceCtgyPicture extends BaseBean { @Column(name = "PRODUCE_CTGY_CODE") @ApiParam("产品类型代码") - private String produceCtgyCode; + private String produceCategoryCode; @Column(name = "SIDE_LOCATION") @ApiParam("面位")