add:二期虚拟区发货

This commit is contained in:
2024-07-29 14:12:26 +08:00
parent cd53d3de73
commit 9794e5a590
4 changed files with 26 additions and 8 deletions

View File

@@ -73,7 +73,7 @@ public class ProductOutTwoServiceImpl implements ProductOutTwoService {
.map(BstIvtBoxlashbound::getBox_no) .map(BstIvtBoxlashbound::getBox_no)
.collect(Collectors.joining("','")); .collect(Collectors.joining("','"));
JSONObject jsonPoint = schBasePointService.query("vehicle_code IN ('" + box_in + "') and is_delete = '0' and is_used = '1' and point_type = '9'").uniqueResult(0); JSONObject jsonPoint = schBasePointService.query("vehicle_code IN ('" + box_in + "') and is_delete = '0' and is_used = '1' and point_type = '8'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonPoint)) { if (ObjectUtil.isEmpty(jsonPoint)) {
throw new BadRequestException("请输入正确的木箱或查看点位是否存在"); throw new BadRequestException("请输入正确的木箱或查看点位是否存在");
@@ -86,7 +86,10 @@ public class ProductOutTwoServiceImpl implements ProductOutTwoService {
schBasePointService.update(jsonPoint); schBasePointService.update(jsonPoint);
// 删除木箱绑定关系 // 删除木箱绑定关系
iBstIvtBoxlashboundService.removeByIds(boundDaoList); iBstIvtBoxlashboundService.remove(
new QueryWrapper<BstIvtBoxlashbound>().lambda()
.eq(BstIvtBoxlashbound::getBound_id, boundDaoList.get(0).getBound_id())
);
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
result.put("message", "解绑成功!"); result.put("message", "解绑成功!");

View File

@@ -8,12 +8,15 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvOutService;
import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.wql.WQL; import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl; import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
import org.nl.wms.pda.st.service.VirtualOutService; import org.nl.wms.pda.st.service.VirtualOutService;
import org.nl.wms.st.inbill.service.CheckOutBillService; import org.nl.wms.st.inbill.service.CheckOutBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@@ -29,6 +32,9 @@ public class VirtualOutServiceImpl implements VirtualOutService {
private final CheckOutBillService checkOutBillService; private final CheckOutBillService checkOutBillService;
@Autowired
private IStIvtIostorinvOutService iStIvtIostorinvOutService;
@Override @Override
public JSONObject ivtQuery(JSONObject whereJson) { public JSONObject ivtQuery(JSONObject whereJson) {
@@ -108,6 +114,7 @@ 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"); // 出入库明细表
WQLObject mstTab = WQLObject.getWQLObject("st_ivt_iostorinv"); // 出入库主表
JSONArray box_rows = whereJson.getJSONArray("box_rows"); JSONArray box_rows = whereJson.getJSONArray("box_rows");
@@ -121,6 +128,8 @@ public class VirtualOutServiceImpl implements VirtualOutService {
if (ObjectUtil.isEmpty(disArr)) { if (ObjectUtil.isEmpty(disArr)) {
throw new BadRequestException("木箱码无效"); throw new BadRequestException("木箱码无效");
} }
// 查询主表
JSONObject jsonMst = mstTab.query("iostorinv_id = '" + disArr.getJSONObject(0).getString("iostorinv_id") + "'").uniqueResult(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);
// 更新状态为完成 // 更新状态为完成
@@ -138,10 +147,12 @@ public class VirtualOutServiceImpl implements VirtualOutService {
// 判断此明细是否全部完成 // 判断此明细是否全部完成
JSONArray dtlNoArr = dtlTab.query("iostorinv_id = '" + jsonDis.getString("iostorinv_id") + "' and bill_status <> '99'").getResultJSONArray(0); JSONArray dtlNoArr = dtlTab.query("iostorinv_id = '" + jsonDis.getString("iostorinv_id") + "' and bill_status <> '99'").getResultJSONArray(0);
if (ObjectUtil.isEmpty(dtlNoArr)) { if (ObjectUtil.isEmpty(dtlNoArr)) {
// 调用强制完成接口 // 调用强制完成接口(判断是一期还是二期)
JSONObject param = new JSONObject(); if (jsonMst.getString("stor_id").equals(IOSEnum.STOR_ID.code("二期"))) {
param.put("iostorinv_id", jsonDis.getString("iostorinv_id")); iStIvtIostorinvOutService.confirm(jsonMst);
checkOutBillService.confirmOrder(param); } else {
checkOutBillService.confirmOrder(jsonMst);
}
} }
} }
} }

View File

@@ -85,7 +85,8 @@
WHERE WHERE
mst.is_delete = '0' mst.is_delete = '0'
AND mst.io_type = '1' AND mst.io_type = '1'
AND point.point_type = '9' AND point.point_type = '8'
AND mst.stor_code = 'BC01'
OPTION 输入.box_no <> "" OPTION 输入.box_no <> ""
point.vehicle_code LIKE 输入.box_no point.vehicle_code LIKE 输入.box_no
@@ -141,7 +142,7 @@
WHERE WHERE
mst.is_delete = '0' mst.is_delete = '0'
AND mst.io_type = '1' AND mst.io_type = '1'
AND point.point_type = '9' AND point.point_type = '8'
OPTION 输入.box_no <> "" OPTION 输入.box_no <> ""
point.vehicle_code LIKE 输入.box_no point.vehicle_code LIKE 输入.box_no

View File

@@ -219,11 +219,14 @@
mst.is_delete = '0' mst.is_delete = '0'
AND mst.io_type = '1' AND mst.io_type = '1'
AND dis.work_status <> '99' AND dis.work_status <> '99'
AND mst.bill_status <> '99'
OPTION 输入.box_no <> "" OPTION 输入.box_no <> ""
dis.box_no = 输入.box_no dis.box_no = 输入.box_no
ENDOPTION ENDOPTION
ORDER BY mst.input_time DESC
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY
ENDIF ENDIF