Browse Source

Merge branch 'dev' into pre-production

newStockUp
zhenghaoyu 1 year ago
parent
commit
0354f0cd3d
  1. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java
  2. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java
  4. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  5. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java
  6. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  7. 7
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java
  8. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java

@ -101,4 +101,7 @@ public interface IDistributionStockArticleClient {
@GetMapping(API_PREFIX + "/findShelfNumByOrderCodeAndWarehouseId")
Map findShelfNumByOrderCodeAndWarehouseId(@RequestParam String orderCode, @RequestParam Long warehouseId);
@GetMapping(API_PREFIX + "/submitHandleNumByOrderId")
void submitHandleNumByOrderId(@RequestParam Integer subNum, @RequestParam Long articleId);
}

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java

@ -186,4 +186,9 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
return distributionStockArticleService.findShelfNumByOrderCodeAndWarehouseId(orderCode,warehouseId);
}
@Override
public void submitHandleNumByOrderId(Integer subNum, Long articleId) {
distributionStockArticleService.submitHandleNumByOrderId(subNum,articleId);
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java

@ -115,4 +115,6 @@ public interface DistributionStockArticleMapper extends BaseMapper<DistributionS
List<DistributionStockArticleGroundingVO> selectListGrounding(@Param("ids")List<String> ids);
Map findShelfNumByOrderCodeAndWarehouseId(@Param("orderCode")String orderCode, @Param("warehouseId")Long warehouseId);
void submitHandleNumByOrderId(@Param("subNum") Integer subNum, @Param("articleId") Long articleId);
}

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -663,5 +663,11 @@
AND warehouse_id = #{warehouseId}
</update>
<update id="submitHandleNumByOrderId" >
update logpm_distribution_stock_article
set hand_quantity = hand_quantity - #{subNum}
where id = #{articleId}
and hand_quantity - #{subNum} &gt;= 0
</update>
</mapper>

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java

@ -182,4 +182,6 @@ public interface IDistributionStockArticleService extends BaseService<Distributi
List<DistributionStockArticleQRCodeVO> selectTemplate(List<Long> ids);
Map findShelfNumByOrderCodeAndWarehouseId(String orderCode, Long warehouseId);
void submitHandleNumByOrderId(Integer subNum, Long articleId);
}

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -1241,6 +1241,11 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
return baseMapper.findShelfNumByOrderCodeAndWarehouseId(orderCode,warehouseId);
}
@Override
public void submitHandleNumByOrderId(Integer subNum, Long articleId) {
baseMapper.submitHandleNumByOrderId(subNum,articleId);
}
@Override
public DistributionStockArticleEntity findZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) {

7
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java

@ -185,6 +185,13 @@ public class WarehouseWaybillController extends BladeController {
log.warn("################splitOrder: 当前在库订单已转库存品,不能拆单 waybillNo={}", waybillNo);
return R.fail(405, "当前在库订单已转库存品");
}
String isZero = distributionStockArticleEntity.getIsZero();
if(!isZero.equals("1")){
log.warn("################splitOrder: 当前订单不属于零担订单,不能拆单 isZero={}", isZero);
return R.fail(405, "当前订单不属于零担订单");
}
Integer state = Integer.parseInt(distributionStockArticleEntity.getOrderStatus());//订单状态
Long orderId = distributionStockArticleEntity.getId();//订单id
if (state > 30) {

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -395,6 +395,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
List<DistributionStockArticleEntity> articleList = distributionStockArticleClient.likeOrderSelfNumbering(orderSelfNum);
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findEntityListByOrderCode(orderSelfNum, warehouseId);
int size = articleList.size();
Integer subNum = 0;
for (int i = 0; i < splitOrderDTOList.size(); i++) {
SplitOrderDTO splitOrderDTO = splitOrderDTOList.get(i);
DistributionStockArticleEntity entity = new DistributionStockArticleEntity();
@ -497,9 +498,13 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
log.warn("###########splitOrder: 减掉包件数量失败 articleId={},productName={},num={}", articleId, productName, num);
throw new CustomerException(405, "减掉包件数量失败");
}
subNum = subNum + num;
}
size++;
}
//减去零担零担上的在库件数
distributionStockArticleClient.submitHandleNumByOrderId(subNum,articleId);
}

Loading…
Cancel
Save