Browse Source

1.更新订单状态更新

2.提过通过暂存单包件码查询运单信息
master
zhenghaoyu 8 months ago
parent
commit
fd3e133a1a
  1. 4
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java
  2. 67
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  3. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml
  4. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  5. 8
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  6. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillClient.java
  7. 3
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java
  8. 10
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml
  9. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java
  10. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

4
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java

@ -83,4 +83,8 @@ public interface IWarehouseWaybillClient {
@PostMapping(API_PREFIX + "/updateWaybillFreezeStatusByWaybillIds")
void updateWaybillFreezeStatusByWaybillIds(@RequestBody List<Long> waybillIds);
@GetMapping(API_PREFIX+"/findWaybillEntityByOrderPackageCode")
WarehouseWaybillEntity findWaybillEntityByOrderPackageCode(@RequestParam String orderPackageCode);
}

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

@ -1472,26 +1472,14 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
stockArticleEntity.setWarehouseEntryTime(new Date(firstEntryTime));
stockArticleEntity.setWarehouseEntryTimeEnd(new Date(lastEntryTime));
if (incomingNum == 0) {
if(incomingNum == 0){
stockArticleEntity.setOrderReceiveStatus("10");
stockArticleEntity.setCompleteSet(1);
stockArticleEntity.setOrderStatus("0");
stockArticleEntity.setReservationStatus("10");
stockArticleEntity.setGroundingStatus("10");
} else if (0 < incomingNum && incomingNum < totalNumber) {
stockArticleEntity.setOrderReceiveStatus("20");
stockArticleEntity.setCompleteSet(1);
if (signNum == 0) {
if (handleNum == 0) {
stockArticleEntity.setOrderStatus("20");
} else if (0 < handleNum && handleNum < totalNumber) {
stockArticleEntity.setOrderStatus("20");
} else {
stockArticleEntity.setOrderStatus("20");
}
} else {
stockArticleEntity.setOrderStatus("70");
}
stockArticleEntity.setOrderStatus("10");
if (reservationNum == 0) {
stockArticleEntity.setReservationStatus("10");
@ -1504,26 +1492,22 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
} else {
stockArticleEntity.setGroundingStatus("20");
}
} else {
stockArticleEntity.setOrderReceiveStatus("30");
stockArticleEntity.setCompleteSet(2);
if (signNum == 0) {
if (handleNum == 0) {
stockArticleEntity.setOrderStatus("20");
} else if (0 < handleNum && handleNum < totalNumber) {
stockArticleEntity.setOrderStatus("20");
} else {
stockArticleEntity.setOrderStatus("20");
}
} else {
if (signNum.equals(totalNumber)) {
stockArticleEntity.setOrderStatus("80");
} else {
stockArticleEntity.setOrderStatus("70");
if(signNum == 0){
if(outNum == 0){
stockArticleEntity.setOrderStatus("10");
}else{
stockArticleEntity.setOrderStatus("30");
}
}else{
stockArticleEntity.setOrderStatus("70");
}
}else{
stockArticleEntity.setOrderReceiveStatus("30");
stockArticleEntity.setCompleteSet(2);
stockArticleEntity.setOrderStatus("20");
if (reservationNum == 0) {
if (reservationNum.equals(0)) {
stockArticleEntity.setReservationStatus("10");
} else if (reservationNum > 0 && reservationNum < totalNumber) {
stockArticleEntity.setReservationStatus("20");
@ -1531,13 +1515,32 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
stockArticleEntity.setReservationStatus("30");
}
if (groundingNum == 0) {
if (groundingNum.equals(0)) {
stockArticleEntity.setGroundingStatus("10");
} else if (groundingNum > 0 && groundingNum < totalNumber) {
stockArticleEntity.setGroundingStatus("20");
} else {
stockArticleEntity.setGroundingStatus("30");
}
if(signNum.equals(0)){
if(outNum.equals(0)){
stockArticleEntity.setOrderStatus("20");
}else{
if(outNum.equals(totalNumber)){
stockArticleEntity.setOrderStatus("40");
}else{
stockArticleEntity.setOrderStatus("30");
}
}
}else{
if(signNum.equals(totalNumber)){
stockArticleEntity.setOrderStatus("80");
}else{
stockArticleEntity.setOrderStatus("70");
}
}
}
stockArticleEntity.setIncomingNum(incomingNum);

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml

@ -33,6 +33,7 @@
ltad.system_type systemType,
ltad.weight weight,
ltad.volume volume,
ltad.advance_id advanceId,
ltad.incoming_warehouse_name incomingWarehouseName
from logpm_trunkline_advance_detail ltad
left join logpm_trunkline_advance lta on lta.id = ltad.advance_id

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -30,6 +30,7 @@ import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient;
import com.logpm.warehouse.vo.WarehouseWaybillVO;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.CodeNumConstant;
@ -329,7 +330,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
return R.success("验证成功");
}
// @Transactional(rollbackFor = ServiceException.class)
@GlobalTransactional
@Transactional(rollbackFor = Exception.class)
@Override
public R openWaybill(OpenOrderDTO openOrderDTO) {
log.info("############openWaybill: 开单开始 openOrderDTO={}", openOrderDTO);
@ -460,6 +462,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setAbolishStatus(0);
waybillEntity.setFreezeStatus(0);
Long waybillId = warehouseWaybillClient.addEnntity(waybillEntity);
waybillEntity.setId(waybillId);
if (!Objects.isNull(waybillId)) {
log.info("#################openWaybill: 运单保存成功");

8
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -3579,6 +3579,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
orderId = finalOrderCodes.get(e);
}
List<TrunklineCarsLoadScanEntity> carsLoadScanEntities = loadScanEntityListHasDataNoTrayMap.get(e);
if(ObjectUtil.isNull(orderId)){
//没有id
DistributionStockArticleEntity stockArticleEntity = stockArticleMap.get(e);
@ -3603,7 +3605,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
List<TrunklineCarsLoadScanEntity> carsLoadScanEntities = loadScanEntityListHasDataNoTrayMap.get(e);
Long finalOrderId = orderId;
carsLoadScanEntities.forEach(p -> {
Long fromWarehouseId = p.getFromWarehouseId();
@ -3697,6 +3699,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntitiesMap.keySet().forEach(e -> {
//判断是否有已经有order了
Long orderId = finalOrderCodes1.get(e);
List<TrunklineCarsLoadScanEntity> carsLoadScanList = carsLoadScanEntitiesMap.get(e);
if(ObjectUtil.isNull(orderId)){
//没有id
DistributionStockArticleEntity stockArticleEntity = stockArticleMap.get(e);
@ -3720,7 +3724,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
finalOrderCodes1.put(e,orderId);
}
List<TrunklineCarsLoadScanEntity> carsLoadScanList = carsLoadScanEntitiesMap.get(e);
Long finalOrderId = orderId;
carsLoadScanList.forEach(p -> {
DistributionParcelListEntity parcelListEntity = parcelListMap.get(p.getScanCode());

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillClient.java

@ -104,4 +104,9 @@ public class WarehouseWaybillClient implements IWarehouseWaybillClient {
.in("id",waybillIds);
warehouseWaybillService.update(updateWrapper);
}
@Override
public WarehouseWaybillEntity findWaybillEntityByOrderPackageCode(String orderPackageCode) {
return warehouseWaybillService.findWaybillEntityByOrderPackageCode(orderPackageCode);
}
}

3
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java

@ -58,4 +58,7 @@ public interface WarehouseWaybillMapper extends BaseMapper<WarehouseWaybillEntit
List<WarehouseWaybillEntity> findWaybillBillladingList(@Param("waybillNo") String waybillNo,@Param("warehouseId") Long warehouseId);
List<WarehouseWaybillEntity> findFreezeOrAbolishByWaybillNos(@Param("waybillNos") List<String> waybillNos);
WarehouseWaybillEntity findWaybillEntityByOrderPackageCode(@Param("orderPackageCode") String orderPackageCode);
}

10
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -300,4 +300,14 @@
</foreach>
</select>
<select id="findWaybillEntityByOrderPackageCode" resultType="com.logpm.warehouse.entity.WarehouseWaybillEntity">
select lww.*
from logpm_trunkline_advance_detail ltad
left join logpm_warehouse_waybill lww on lww.id = ltad.waybill_id
where 1=1
and ltad.is_deleted = 0
and ltad.order_package_code = #{orderPackageCode}
</select>
</mapper>

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java

@ -69,4 +69,6 @@ public interface IWarehouseWaybillService extends BaseService<WarehouseWaybillEn
List<PrintPreviewVO> printBatch(String ids, String tempId) throws Exception;
List<WarehouseWaybillEntity> findFreezeOrAbolishByWaybillNos(List<String> waybillNos);
WarehouseWaybillEntity findWaybillEntityByOrderPackageCode(String orderPackageCode);
}

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

@ -798,6 +798,11 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
return baseMapper.findFreezeOrAbolishByWaybillNos(waybillNos);
}
@Override
public WarehouseWaybillEntity findWaybillEntityByOrderPackageCode(String orderPackageCode) {
return baseMapper.findWaybillEntityByOrderPackageCode(orderPackageCode);
}
private PrintPreviewVO buildPrintWallet(WarehouseWaybillEntity warehouseWaybillEntity, List<WarehouseWayBillDetail> warehouseWayBillDetails, BasicPrintTemplateEntity template) throws Exception {
PrintPreviewVO printPreviewVO = new PrintPreviewVO();
String html = TemplateUtil.getTemplateByUrl(template.getTemplateUrl());

Loading…
Cancel
Save