Merge branch 'dev' into test

yun-zuoyi
王杰 6 years ago
commit 2417b40635

@ -1,6 +1,8 @@
package cn.estsh.i3plus.pojo.aps.bean; package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS; 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.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data; import lombok.Data;
@ -21,27 +23,55 @@ import javax.persistence.Table;
@Table(name = "APS_SHIPPING_TIME") @Table(name = "APS_SHIPPING_TIME")
@Api("运输时间") @Api("运输时间")
public class ShippingTime extends BaseAPS { 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") @Column(name="PREV_RES_CODE")
@ApiParam(value ="前资源编码") @ApiParam(value ="前资源对象Id")
private String prevResCode; private Long prevResId;
@Column(name="POST_RES_CODE") @Column(name="POST_RES_CODE")
@ApiParam(value ="后资源编码") @ApiParam(value ="后资源对象Id")
private String postResCode; private Long postResId;
@Column(name="PREV_STAND_CODE") @Column(name="PREV_STAND_CODE")
@ApiParam(value ="前标准工序编码") @ApiParam(value ="前标准工序对象Id")
private String prevStandCode; private Long prevStandId;
@Column(name="POST_STAND_CODE") @Column(name="POST_STAND_CODE")
@ApiParam(value ="后标准工序编码") @ApiParam(value ="后标准工序对象Id")
private String postStandCode; private Long postStandId;
@Column(name="TIME") public Resource getPrevRes() {return BeanRelation.get(this, EShippingTime.PrevRes); }
@ApiParam(value ="运输时间")
private String time;
@Column(name="PRIORITY") public void setPrevRes(Resource res) {
@ApiParam(value ="优先级") this.prevResId = res != null ? res.getId() : 0l;
private Integer priority; 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);
}
} }

@ -202,30 +202,26 @@ public class BeanRelation {
} }
} }
public static <T extends BaseBean> List<T> lastList(BaseBean entity, Enum<?>... args) { public static <T extends BaseBean> List<T> lastList(BaseBean bean, Enum<?>... holders) {
List<T> result = new ArrayList<T>(); List<T> result = new ArrayList<>();
lastListImpl(result, entity, null, args, 0); lastListImpl(result, bean, bean, holders, 0);
return result;
}
public static <T extends BaseBean> List<T> lastList(BaseBean entity, Predicate<T> filter, Enum<?>... args) {
List<T> result = new ArrayList<T>();
lastListImpl(result, entity, filter, args, 0);
return result; return result;
} }
private final static <T extends BaseBean> boolean lastListImpl(List<T> result, BaseBean bean, BaseBean self,
@SuppressWarnings("unchecked") Enum<?>[] holders, int index) {
private final static <T extends BaseBean> boolean lastListImpl(List<T> result, BaseBean entity, Predicate<T> filter, if (index >= holders.length) {
Enum<?>[] args, int index) { if (self == bean) {
if (index >= args.length) { return false;
}
index = 0; index = 0;
self = bean;
} }
boolean bNotLast = true; boolean bNotLast = true;
List<BaseBean> relaEntities = list(entity, args[index]); List<BaseBean> nextBeans = list(bean, holders[index]);
for (BaseBean relaEntity : relaEntities) { for (BaseBean nextBean : nextBeans) {
if (lastListImpl(result, relaEntity, filter, args, index + 1)) { if (lastListImpl(result, nextBean, self, holders, index + 1)) {
result.add((T)relaEntity); result.add((T)nextBean);
bNotLast = false; bNotLast = false;
} }
} }

@ -0,0 +1,8 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EShippingTime {
PrevRes, // 前资源
PostRes, // 后资源
PrevStand, // 前标准工序
PostStand // 后标准工序
}

@ -2,6 +2,7 @@ package cn.estsh.i3plus.pojo.aps.model;
import cn.estsh.i3plus.pojo.aps.bean.WorkResource; import cn.estsh.i3plus.pojo.aps.bean.WorkResource;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -14,5 +15,5 @@ import java.util.List;
**/ **/
public class ResourceCompose { public class ResourceCompose {
public WorkResource resource; public WorkResource resource;
public List<WorkResource> assResource; public List<WorkResource> assResource = new ArrayList<>();
} }

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="WorkPlan">
<Relation field="PrevRes" name="Resource" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="PostRes" name="Resource" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="PrevStand" name="StandOperation" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="PostStand" name="StandOperation" type="MULTI_TO_ONE" owner="false">
</Relation>
</Class>

@ -132,6 +132,22 @@ public class LacSuitTask extends BaseBean {
private List<LacSuitTaskParam> lacSuitTaskParamList; private List<LacSuitTaskParam> lacSuitTaskParamList;
@Transient @Transient
@ApiParam(value ="适配原始参数")
private Object orginParam;
@Transient
@ApiParam(value ="适配转换后参数")
private Object transParam;
@Transient
@ApiParam(value ="原始报文")
private Object orginMessage;
@Transient
@ApiParam(value ="转换后报文")
private Object transMessage;
@Transient
@ApiParam(value ="入参适配") @ApiParam(value ="入参适配")
private List<LacSuitTaskParamAdapter> inputParamAdapterList; private List<LacSuitTaskParamAdapter> inputParamAdapterList;

@ -12,6 +12,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
/** /**
* @Author: Wynne.Lu * @Author: Wynne.Lu
@ -46,9 +47,9 @@ public class MesPackage extends BaseBean {
@ApiParam("包装规格数量") @ApiParam("包装规格数量")
private Double packSpecQty; private Double packSpecQty;
@Column(name = "NUIT") @Column(name = "UNIT")
@ApiParam("包装规格数量") @ApiParam("包装规格数量")
private String nuit; private String unit;
@Column(name = "LOT_NO") @Column(name = "LOT_NO")
@ApiParam("批号") @ApiParam("批号")
@ -62,6 +63,10 @@ public class MesPackage extends BaseBean {
@ApiParam("是否封箱") @ApiParam("是否封箱")
private Integer isSealed; private Integer isSealed;
@Transient
@ApiParam("封箱状态")
private String sealStatus;
@Column(name = "PRINT_STATUS") @Column(name = "PRINT_STATUS")
@ApiParam("打印状态10未打印 20已打印") @ApiParam("打印状态10未打印 20已打印")
private Integer printStatus; private Integer printStatus;

@ -112,10 +112,6 @@ public class MesProduceSn extends BaseBean implements Serializable {
@ApiParam("客户代码") @ApiParam("客户代码")
private String custCode; private String custCode;
@Column(name = "PACKAGE_SN")
@ApiParam("包装条码")
private String packageSn;
@Column(name = "SN_TYPE") @Column(name = "SN_TYPE")
@ApiParam("条码类型 10=正常 20=首检件") @ApiParam("条码类型 10=正常 20=首检件")
private Integer snType; private Integer snType;
@ -178,7 +174,6 @@ public class MesProduceSn extends BaseBean implements Serializable {
", workOrderNo='" + workOrderNo + '\'' + ", workOrderNo='" + workOrderNo + '\'' +
", custSn='" + custSn + '\'' + ", custSn='" + custSn + '\'' +
", custPartNo='" + custPartNo + '\'' + ", custPartNo='" + custPartNo + '\'' +
", packageSn='" + packageSn + '\'' +
", snType='" + snType + '\'' + ", snType='" + snType + '\'' +
", tray='" + tray + '\'' + ", tray='" + tray + '\'' +
", resultMsg='" + resultMsg + '\'' + ", resultMsg='" + resultMsg + '\'' +

@ -12,6 +12,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
/** /**
* @Author: Wynne.Lu * @Author: Wynne.Lu
@ -46,9 +47,9 @@ public class MesPackage extends BaseBean {
@ApiParam("包装规格数量") @ApiParam("包装规格数量")
private Double packSpecQty; private Double packSpecQty;
@Column(name = "NUIT") @Column(name = "UNIT")
@ApiParam("包装规格数量") @ApiParam("单位")
private String nuit; private String unit;
@Column(name = "LOT_NO") @Column(name = "LOT_NO")
@ApiParam("批号") @ApiParam("批号")
@ -62,6 +63,10 @@ public class MesPackage extends BaseBean {
@ApiParam("是否封箱") @ApiParam("是否封箱")
private Integer isSealed; private Integer isSealed;
@Transient
@ApiParam("封箱状态")
private String sealStatus;
@Column(name = "PRINT_STATUS") @Column(name = "PRINT_STATUS")
@ApiParam("打印状态10未打印 20已打印") @ApiParam("打印状态10未打印 20已打印")
private Integer printStatus; private Integer printStatus;

@ -83,7 +83,7 @@ public class MesProcessBom extends BaseBean {
@ApiParam(value = "是否投料配置") @ApiParam(value = "是否投料配置")
private Integer isFeed; private Integer isFeed;
@Column(name = "is_BIND_KEY") @Column(name = "IS_BIND_KEY")
@ApiParam(value = "是否绑定关键件") @ApiParam(value = "是否绑定关键件")
private Integer isBindKey; private Integer isBindKey;

@ -109,10 +109,6 @@ public class MesProduceSn extends BaseBean {
@ApiParam("客户代码") @ApiParam("客户代码")
private String custCode; private String custCode;
@Column(name = "PACKAGE_SN")
@ApiParam("包装条码")
private String packageSn;
@Column(name = "SN_TYPE") @Column(name = "SN_TYPE")
@ApiParam("条码类型") @ApiParam("条码类型")
private Integer snType; private Integer snType;
@ -175,7 +171,6 @@ public class MesProduceSn extends BaseBean {
", workOrderNo='" + workOrderNo + '\'' + ", workOrderNo='" + workOrderNo + '\'' +
", custSn='" + custSn + '\'' + ", custSn='" + custSn + '\'' +
", custPartNo='" + custPartNo + '\'' + ", custPartNo='" + custPartNo + '\'' +
", packageSn='" + packageSn + '\'' +
", snType='" + snType + '\'' + ", snType='" + snType + '\'' +
", tray='" + tray + '\'' + ", tray='" + tray + '\'' +
", resultMsg='" + resultMsg + '\'' + ", resultMsg='" + resultMsg + '\'' +

@ -880,7 +880,6 @@ public class MesHqlPack {
public static DdlPackBean getMesProdCfgExcludeById(MesProdRouteCfg mesProdRouteCfg, String org) { public static DdlPackBean getMesProdCfgExcludeById(MesProdRouteCfg mesProdRouteCfg, String org) {
DdlPackBean packBean = getAllBaseData(org); DdlPackBean packBean = getAllBaseData(org);
DdlPreparedPack.getStringEqualPack(mesProdRouteCfg.getPartNo(), "partNo", packBean); DdlPreparedPack.getStringEqualPack(mesProdRouteCfg.getPartNo(), "partNo", packBean);
DdlPreparedPack.getStringEqualPack(mesProdRouteCfg.getRouteCode(), "routeCode", packBean);
DdlPreparedPack.getStringEqualPack(mesProdRouteCfg.getWorkCenterCode(), "workCenterCode", packBean); DdlPreparedPack.getStringEqualPack(mesProdRouteCfg.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getNumNOEqualPack(mesProdRouteCfg.getId(), "id", packBean); DdlPreparedPack.getNumNOEqualPack(mesProdRouteCfg.getId(), "id", packBean);
return packBean; return packBean;

@ -1,13 +1,8 @@
package cn.estsh.i3plus.pojo.model.lac; package cn.estsh.i3plus.pojo.model.lac;
import cn.estsh.i3plus.pojo.lac.bean.LacCommandStackRecord; import cn.estsh.i3plus.pojo.lac.bean.LacCommandStackRecord;
import cn.estsh.i3plus.pojo.lac.bean.LacSuitTask;
import lombok.Data; import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/** /**
* @Description : lacmodel * @Description : lacmodel
@ -35,23 +30,14 @@ public class LacCommandStackModel {
private LacSuitRequest request; private LacSuitRequest request;
/** /**
* * XML
*/
private LacSuitResponse response;
/**
*
* key :
* value
*/ */
private Map<Long, Object> orginMessageMap = new ConcurrentHashMap<>(); private String requestXml;
/** /**
* *
* key :
* value
*/ */
private Map<Long, Object> transMessageMap = new ConcurrentHashMap<>(); private LacSuitResponse response;
/** /**
* *
@ -68,7 +54,7 @@ public class LacCommandStackModel {
this.recordId = commandStackRecord.getId(); this.recordId = commandStackRecord.getId();
} }
public List<TaskParam> getTaskRequestParam(String taskCode){ public Object getTaskRequestParam(String taskCode){
for (Task task : this.getRequest().getTaskList()) { for (Task task : this.getRequest().getTaskList()) {
if(task.getCode().equals(taskCode)){ if(task.getCode().equals(taskCode)){
return task.getParamList(); return task.getParamList();
@ -77,17 +63,4 @@ public class LacCommandStackModel {
return null; return null;
} }
public void putOrginMessage(LacSuitTask lacSuitTask,Object orginMessage){
if(lacSuitTask == null || lacSuitTask.getTaskInstanceId() ==null){
return;
}
this.orginMessageMap.put(lacSuitTask.getTaskInstanceId(), orginMessage == null ? StringUtils.EMPTY : orginMessage);
}
public void putTransMessage(LacSuitTask lacSuitTask,Object transMessage){
if(lacSuitTask == null || lacSuitTask.getTaskInstanceId() ==null){
return;
}
this.transMessageMap.put(lacSuitTask.getTaskInstanceId(), transMessage == null ? StringUtils.EMPTY : transMessage);
}
} }

@ -2,7 +2,6 @@ package cn.estsh.i3plus.pojo.model.lac;
import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* @Description : * @Description :
@ -17,5 +16,5 @@ public class Task {
private String code; private String code;
private List<TaskParam> paramList; private Object paramList;
} }

@ -76,12 +76,12 @@ public class WmsInterfaceDataMapper extends BaseBean {
/** /**
* *
*/ */
@Column(name = "DEST_BEAN_NAME", length = 50) @Column(name = "DEST_BEAN_NAME", length = 500)
public String destBeanName; public String destBeanName;
/** /**
* *
*/ */
@Column(name = "DEST_PK_PROPERTIES", length = 50) @Column(name = "DEST_PK_PROPERTIES", length = 500)
public String destPkProperties; public String destPkProperties;
/** /**
* List<MappingItem> JSON * List<MappingItem> JSON

Loading…
Cancel
Save