Merge branch 'dev' into test

yun-zuoyi
王杰 6 years ago
commit 2417b40635

@ -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);
}
}

@ -202,30 +202,26 @@ public class BeanRelation {
}
}
public static <T extends BaseBean> List<T> lastList(BaseBean entity, Enum<?>... args) {
List<T> result = new ArrayList<T>();
lastListImpl(result, entity, null, args, 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);
public static <T extends BaseBean> List<T> lastList(BaseBean bean, Enum<?>... holders) {
List<T> result = new ArrayList<>();
lastListImpl(result, bean, bean, holders, 0);
return result;
}
@SuppressWarnings("unchecked")
private final static <T extends BaseBean> boolean lastListImpl(List<T> result, BaseBean entity, Predicate<T> filter,
Enum<?>[] args, int index) {
if (index >= args.length) {
private final static <T extends BaseBean> boolean lastListImpl(List<T> 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<BaseBean> relaEntities = list(entity, args[index]);
for (BaseBean relaEntity : relaEntities) {
if (lastListImpl(result, relaEntity, filter, args, index + 1)) {
result.add((T)relaEntity);
List<BaseBean> nextBeans = list(bean, holders[index]);
for (BaseBean nextBean : nextBeans) {
if (lastListImpl(result, nextBean, self, holders, index + 1)) {
result.add((T)nextBean);
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 java.util.ArrayList;
import java.util.List;
/**
@ -14,5 +15,5 @@ import java.util.List;
**/
public class ResourceCompose {
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;
@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 ="入参适配")
private List<LacSuitTaskParamAdapter> inputParamAdapterList;

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

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

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

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

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

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

@ -1,13 +1,8 @@
package cn.estsh.i3plus.pojo.model.lac;
import cn.estsh.i3plus.pojo.lac.bean.LacCommandStackRecord;
import cn.estsh.i3plus.pojo.lac.bean.LacSuitTask;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* @Description : lacmodel
@ -35,23 +30,14 @@ public class LacCommandStackModel {
private LacSuitRequest request;
/**
*
*/
private LacSuitResponse response;
/**
*
* key :
* value
* XML
*/
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();
}
public List<TaskParam> getTaskRequestParam(String taskCode){
public Object getTaskRequestParam(String taskCode){
for (Task task : this.getRequest().getTaskList()) {
if(task.getCode().equals(taskCode)){
return task.getParamList();
@ -77,17 +63,4 @@ public class LacCommandStackModel {
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 lombok.Data;
import java.util.List;
/**
* @Description :
@ -17,5 +16,5 @@ public class Task {
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;
/**
*
*/
@Column(name = "DEST_PK_PROPERTIES", length = 50)
@Column(name = "DEST_PK_PROPERTIES", length = 500)
public String destPkProperties;
/**
* List<MappingItem> JSON

Loading…
Cancel
Save