代码更新

This commit is contained in:
2022-11-27 19:59:31 +08:00
parent d8c7d47f31
commit ac8848ec12
3 changed files with 60 additions and 32 deletions

View File

@@ -63,7 +63,8 @@ public class ProductionOutServiceImpl implements ProductionOutService {
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); // 点位表 WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); // 点位表
JSONObject box_no = whereJson.getJSONObject("box_no"); String box_no = whereJson.getString("box_no");
if (ObjectUtil.isEmpty(box_no)) throw new BadRequestException("木箱不能为空");
JSONObject jsonPoint = pointTab.query("vehicle_code = '" + box_no + "' and is_delete = '0' and is_used = '1'").uniqueResult(0); JSONObject jsonPoint = pointTab.query("vehicle_code = '" + box_no + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
/* /*

View File

@@ -16,6 +16,8 @@ import org.nl.wms.st.outbill.service.impl.CheckOutBillServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.HashSet;
/** /**
* @author liuxy * @author liuxy
* @description 服务实现 * @description 服务实现
@@ -91,8 +93,16 @@ public class VirtualOutServiceImpl implements VirtualOutService {
WQLObject disTab = WQLObject.getWQLObject("ST_IVT_IOStorInvDis"); // 出入库分配明细表 WQLObject disTab = WQLObject.getWQLObject("ST_IVT_IOStorInvDis"); // 出入库分配明细表
WQLObject dtlTab = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl"); // 出入库明细表 WQLObject dtlTab = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl"); // 出入库明细表
String box_no = whereJson.getString("box_no"); // 箱号 JSONArray box_rows = whereJson.getJSONArray("box_rows");
HashSet<String> boxSet = new HashSet<>();
for (int i = 0; i < box_rows.size(); i++) {
JSONObject json = box_rows.getJSONObject(i);
boxSet.add(json.getString("package_box_sn"));
}
for (String box_no : boxSet) {
JSONArray disArr = WQL.getWO("PDA_ST_01").addParam("flag", "7").addParam("box_no", box_no).process().getResultJSONArray(0); JSONArray disArr = WQL.getWO("PDA_ST_01").addParam("flag", "7").addParam("box_no", box_no).process().getResultJSONArray(0);
for (int i = 0; i < disArr.size(); i++) { for (int i = 0; i < disArr.size(); i++) {
JSONObject jsonDis = disArr.getJSONObject(i); JSONObject jsonDis = disArr.getJSONObject(i);
@@ -118,6 +128,7 @@ public class VirtualOutServiceImpl implements VirtualOutService {
} }
} }
} }
}
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
jo.put("message", "出库成功!"); jo.put("message", "出库成功!");
return jo; return jo;

View File

@@ -1988,7 +1988,11 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
param.put("HEAD", paramSapMstArr); param.put("HEAD", paramSapMstArr);
// 调用接口回传 // 调用接口回传
try {
new LmsToSapServiceImpl().returnDelivery(param); new LmsToSapServiceImpl().returnDelivery(param);
} catch (Exception e) {
throw new BadRequestException("回传sap失败"+e.getMessage());
}
// 2.回传mes // 2.回传mes
JSONObject paramMesMst = new JSONObject(); JSONObject paramMesMst = new JSONObject();
@@ -2015,8 +2019,13 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
} }
paramMesMst.put("item", paramArr); paramMesMst.put("item", paramArr);
try {
// 调用接口回传 // 调用接口回传
new LmsToMesServiceImpl().childRollFGOutboundComplete(paramMesMst); new LmsToMesServiceImpl().childRollFGOutboundComplete(paramMesMst);
} catch (Exception e) {
throw new BadRequestException("回传mes失败"+e.getMessage());
}
} }
// 手工出库 // 手工出库
if (StrUtil.equals(bill_type, "1009")) { if (StrUtil.equals(bill_type, "1009")) {
@@ -2080,8 +2089,13 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
param.put("HEAD", paramSapMstArr); param.put("HEAD", paramSapMstArr);
if (ObjectUtil.isNotEmpty(vbeln)) { if (ObjectUtil.isNotEmpty(vbeln)) {
try {
// 调用接口回传 // 调用接口回传
new LmsToSapServiceImpl().returnDelivery(param); new LmsToSapServiceImpl().returnDelivery(param);
} catch (Exception e) {
throw new BadRequestException("回传sap失败"+e.getMessage());
}
} }
} }
@@ -2134,9 +2148,13 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
} }
paramMst.put("T_ITEM", paramArr); paramMst.put("T_ITEM", paramArr);
try {
// 调用接口回传 // 调用接口回传
System.out.println(paramMst.toString()); System.out.println(paramMst.toString());
new LmsToSapServiceImpl().returnMoveDtl(paramMst); new LmsToSapServiceImpl().returnMoveDtl(paramMst);
} catch (Exception e) {
throw new BadRequestException("回传sap失败"+e.getMessage());
}
//调用母卷配送到位接口 //调用母卷配送到位接口
JSONObject mes_jo = new JSONObject(); JSONObject mes_jo = new JSONObject();
@@ -2163,8 +2181,6 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
Long currentUserId = SecurityUtils.getCurrentUserId(); Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName(); String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now(); String now = DateUtil.now();
} }
@Override @Override