Commit 43969095 authored by yanghao's avatar yanghao

fix: 修复出货阶段入仓追加时出现空指针异常的bug

parent 20c13a21
......@@ -3433,12 +3433,12 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
private void compareOrderItemFieldAppend(OrderWarehouseInCreateReqVO createReqVO, OrderItemDO orderItemOld, List<ApplyInfoVO> applyInfoList) {
String prodName = String.format("商品:%s - ", orderItemOld.getProdTitleZh());
String prodName = String.format("商品:%s - ", createReqVO.getProdTitleZh());
// 新增品名
Boolean isAddNewOrderItem = !createReqVO.getIsAppend();
if (isAddNewOrderItem) {
prodName = String.format("出货追加新商品:%s - ", orderItemOld.getProdTitleZh());
prodName = String.format("出货追加新商品:%s - ", createReqVO.getProdTitleZh());
}
......@@ -3601,11 +3601,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 入仓影像
List<String> pictureUrls =
CollectionUtil.isNotEmpty(createReqVO.getPictureUrls()) ? createReqVO.getPictureUrls() : new ArrayList<>();
List<String> pictureUrlsOld = isAddNewOrderItem ? new ArrayList<>() :
orderWarehousePictureService.getWarehousePictureUrlList(5,
orderItemOld.getOrderItemId());
if (pictureUrlsOld.size() != pictureUrls.size() ||
pictureUrlsOld.containsAll(pictureUrls)) {
List<String> pictureUrlsOld = isAddNewOrderItem ? new ArrayList<>() : orderWarehousePictureService.getWarehousePictureUrlList(5, orderItemOld.getOrderItemId());
if (pictureUrlsOld.size() != pictureUrls.size() || pictureUrlsOld.containsAll(pictureUrls)) {
infoVO = new ApplyInfoVO();
infoVO.setName(prodName + "入仓影像");
infoVO.setOrgValue((CollectionUtil.isEmpty(pictureUrlsOld) ? 0 : pictureUrlsOld.size()) + "个");
......@@ -3676,7 +3673,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
String prodTitleZh = createReqVO.getProdTitleZh();
String prodTitleEn = createReqVO.getProdTitleEn();
OrderItemDO orderItemDO = null;
OrderItemDO orderItemDO = new OrderItemDO();
// 下单货物,
if (orderItemId != null) {
orderItemDO = orderItemService.selectOne(OrderItemDO::getOrderItemId,
......
......@@ -93,6 +93,15 @@ Content-Type: application/json
{"table":[{"id":46775,"cartonsNum":100,"quantityAll":100,"specificationType":"1","unit":"1","boxGauge":"150*34*44","volume":22.44,"weight":30,"expressNo":"df123123","remark":null,"inTime":1698722752000,"heavyNumber":null,"lightNumber":3747.5,"orderLocationBackVOList":[{"id":49330,"orderId":19698,"wareId":1,"areaId":3,"locationId":8,"orderItemId":28123,"warehouseInId":46775,"adminId":0,"createTime":1698722752000,"warehouseName":"广州仓A","areaName":"B","locationName":"3-1"}],"createTime":1698722752000,"updateTime":1698722752000,"orderLocationStr4Merge":"B3-1","orderWarehouseInDetailsVOList":[{"unit":"2","brand":441,"prodId":395,"volume":"0.11","weight":30,"boxGauge":"141*23*33","usageIds":"","expressNo":"sf12312312","cartonsNum":null,"createTime":null,"prodAttrIds":"2,2","quantityAll":"222","specificationType":null}],"boxGauge1":"150","boxGauge2":"34","boxGauge3":"44"}],"brandType":0,"orderId":19698,"orderNo":"A2300278NG","brand":325,"inTime":null,"material":null,"orderItemId":28123,"warehouseInProdAttrIds":"2","prodId":3314,"prodTitleEn":"kifdasdasd","prodTitleZh":"kif头戴式耳机","prodType":1,"feeType":0,"recordMode":0,"pictureUrls":["https://static.jd.jdshangmen.com/2023/10/31/654073bfe4b09171582d5638.png"],"usageIds":"","num":100,"volume":"2.12","weight":"30.00","orderWarehouseInUpdateItemDoList":[{"id":46775,"cartonsNum":100,"quantityAll":100,"specificationType":"1","unit":"1","boxGauge":"150*34*44","volume":22.44,"weight":30,"expressNo":"df123123","remark":null,"inTime":1698722752000,"heavyNumber":null,"lightNumber":3747.5,"orderLocationBackVOList":[{"id":49330,"orderId":19698,"wareId":1,"areaId":3,"locationId":8,"orderItemId":28123,"warehouseInId":46775,"adminId":0,"createTime":1698722752000,"warehouseName":"广州仓A","areaName":"B","locationName":"3-1"}],"createTime":1698722752000,"updateTime":1698722752000,"orderLocationStr4Merge":"B3-1","orderWarehouseInDetailsVOList":[{"unit":"2","brand":441,"prodId":395,"volume":"0.11","weight":30,"boxGauge":"141*23*33","usageIds":"","expressNo":"sf123112","cartonsNum":null,"createTime":null,"prodAttrIds":"2,2","quantityAll":"222","specificationType":null}],"boxGauge1":"150","boxGauge2":"34","boxGauge3":"44","orderLocationCreateReqVOList":[{"id":49330,"orderId":19698,"wareId":1,"areaId":3,"locationId":8,"orderItemId":28123,"warehouseInId":46775,"adminId":0,"createTime":1698722752000,"warehouseName":"广州仓A","areaName":"B","locationName":"3-1"}]}]}
### 出货阶段 - 入仓/追加申请
POST {{baseUrl}}/order/order-warehouse-in/append-apply-when-shipment
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
Content-Type: application/json
{"table":[{"boxGauge1":"2","boxGauge2":"2","boxGauge3":"2","cartonsNum":"2","expressNo":"","unit":"1","volume":"0.01","weight":"2","specificationType":"1","table":[],"orderLocationBackVOList":[]}],"brandType":0,"orderId":83529,"orderNo":"NG2424546L","brand":2635,"material":"1","warehouseInProdAttrIds":"2","prodId":3842,"prodTitleEn":"TV screen","prodTitleZh":"电视屏幕","type":1,"feeType":2,"recordMode":1,"pictureUrls":["https://static2.groupage.cn/2024/11/15/67362cdee4b0afc77d38d646.png"],"usageIds":"","orderWarehouseInItemDoList":[{"boxGauge1":"2","boxGauge2":"2","boxGauge3":"2","cartonsNum":"2","expressNo":"","unit":"1","volume":"0.01","weight":"2","specificationType":"1","table":[],"orderLocationBackVOList":[],"boxGauge":"2*2*2","orderLocationCreateReqVOList":[]}]}
### 调仓申请
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment