Merge remote-tracking branch 'origin/dev-wuhan-temp' into dev-wuhan-temp

tags/yfai-pcn-ext-v2.3
jun 7 months ago
commit bd3ee9e8f7

@ -0,0 +1,55 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.model;
public class MesSpsDetailInfo {
private String PartNo;
private String PartName;
private Double Qty;
private String Section;
private String Address;
public String getPartNo() {
return PartNo;
}
public void setPartNo(String partNo) {
PartNo = partNo;
}
public String getPartName() {
return PartName;
}
public void setPartName(String partName) {
PartName = partName;
}
public Double getQty() {
return Qty;
}
public void setQty(Double qty) {
Qty = qty;
}
public String getSection() {
return Section;
}
public void setSection(String section) {
Section = section;
}
public String getAddress() {
return Address;
}
public void setAddress(String address) {
Address = address;
}
}

@ -0,0 +1,55 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.model;
import java.util.List;
public class MesSpsInfo {
private Long id;
private String OrderCode;
private String CustOrderCode;
private Long Seq;
private List<MesSpsDetailInfo> PartList;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getOrderCode() {
return OrderCode;
}
public void setOrderCode(String orderCode) {
OrderCode = orderCode;
}
public String getCustOrderCode() {
return CustOrderCode;
}
public void setCustOrderCode(String custOrderCode) {
CustOrderCode = custOrderCode;
}
public Long getSeq() {
return Seq;
}
public void setSeq(Long seq) {
Seq = seq;
}
public List<MesSpsDetailInfo> getPartList() {
return PartList;
}
public void setPartList(List<MesSpsDetailInfo> partList) {
PartList = partList;
}
}

@ -4,6 +4,8 @@ import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesConfigService;
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesNumberRuleMatchDispatchService;
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProduceSnExtService;
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesPullingOrderInfoService;
import cn.estsh.i3plus.ext.mes.pcn.apiservice.model.MesSpsDetailInfo;
import cn.estsh.i3plus.ext.mes.pcn.apiservice.model.MesSpsInfo;
import cn.estsh.i3plus.ext.mes.pcn.apiservice.util.MesPcnException;
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
@ -346,7 +348,38 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService {
log.error("没有配置表mes_config,cfg_code为WU_HAN_SPS_CODE,key为WU_HAN_WORK_CENTER_CODE_100 或者 WU_HAN_ORGANIZE_CODE没有配置");
return null;
}
return JSON.toJSONString(getPullingOrder(organizeCode, assemblyLine));
MesPullingOrderInfo pullingOrder = getPullingOrder(organizeCode, assemblyLine);
Map<String, MesSpsInfo> result = new HashMap<>();
if (pullingOrder != null){
MesSpsInfo mesSpsInfo = new MesSpsInfo();
mesSpsInfo.setId(pullingOrder.getId());
mesSpsInfo.setSeq(pullingOrder.getProductSeq());
mesSpsInfo.setOrderCode(pullingOrder.getWorkOrderNo());
mesSpsInfo.setCustOrderCode(pullingOrder.getCustOrderNo());
List<MesPullingOrderPartInfo> partList = pullingOrder.getPartList();
List<MesSpsDetailInfo> detailInfoList = new ArrayList<>();
if (partList !=null && !partList.isEmpty()){
for (MesPullingOrderPartInfo part : partList) {
MesSpsDetailInfo detailInfo = new MesSpsDetailInfo();
detailInfo.setPartNo(part.getPartNo());
detailInfo.setQty(part.getPullQty());
detailInfo.setPartName(part.getPartName());
if (part.getLocation().indexOf(",") > 0){
String[] locations = part.getLocation().split(",");
detailInfo.setSection(locations[0]);
detailInfo.setAddress(locations[1]);
}else {
detailInfo.setAddress(part.getLocation());
}
detailInfoList.add(detailInfo);
}
}
mesSpsInfo.setPartList(detailInfoList);
result.put("info", mesSpsInfo);
}
return JSON.toJSONString(result);
}
@Override
@ -388,7 +421,37 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService {
log.error("没有配置表mes_config,cfg_code为WU_HAN_SPS_CODE,key为WU_HAN_WORK_CENTER_CODE_100 或者 WU_HAN_ORGANIZE_CODE没有配置");
return null;
}
return JSON.toJSONString(getPullingOrder(organizeCode, assemblyLine));
MesPullingOrderInfo pullingOrder = getPullingOrder(organizeCode, assemblyLine);
Map<String, MesSpsInfo> result = new HashMap<>();
if (pullingOrder != null){
MesSpsInfo mesSpsInfo = new MesSpsInfo();
mesSpsInfo.setId(pullingOrder.getId());
mesSpsInfo.setSeq(pullingOrder.getProductSeq());
mesSpsInfo.setOrderCode(pullingOrder.getWorkOrderNo());
mesSpsInfo.setCustOrderCode(pullingOrder.getCustOrderNo());
List<MesPullingOrderPartInfo> partList = pullingOrder.getPartList();
List<MesSpsDetailInfo> detailInfoList = new ArrayList<>();
if (partList !=null && !partList.isEmpty()){
for (MesPullingOrderPartInfo part : partList) {
MesSpsDetailInfo detailInfo = new MesSpsDetailInfo();
detailInfo.setPartNo(part.getPartNo());
detailInfo.setQty(part.getPullQty());
detailInfo.setPartName(part.getPartName());
if (part.getLocation().indexOf(",") > 0){
String[] locations = part.getLocation().split(",");
detailInfo.setSection(locations[0]);
detailInfo.setAddress(locations[1]);
}else {
detailInfo.setAddress(part.getLocation());
}
detailInfoList.add(detailInfo);
}
}
mesSpsInfo.setPartList(detailInfoList);
result.put("info", mesSpsInfo);
}
return JSON.toJSONString(result);
}
// @Override

Loading…
Cancel
Save