diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java index e1a3cdf9a..05ff00d60 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java @@ -102,4 +102,7 @@ public interface IWarehouseWaybillClient { @PostMapping(API_PREFIX + "/findWaybillVOByWaybillNoSet") List findWaybillVOByWaybillNoSet(@RequestBody Set allWaybillNoSet); + + @GetMapping(API_PREFIX+"/updateWaybillCondigneeId") + void updateWaybillCondigneeId(@RequestParam Long waybillId, @RequestParam Long newConsigneeId); } diff --git a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml index 0fc518969..1c5c97d7c 100644 --- a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml +++ b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml @@ -105,7 +105,7 @@ and Locate(#{param.shipperMoblie},lww.shipper_mobile) > 0 - and Locate(#{param.consigneePerson},lww.consignee_person) > 0 + and Locate(#{param.consigneePerson},lww.consignee_name) > 0 and Locate(#{param.consigneeMobile},lww.consignee_mobile) > 0 diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java index 5ce301c5d..a6260a6f2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java @@ -1401,12 +1401,13 @@ public class OpenOrderController { //当前登录人选择的仓库 BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); - if (Objects.isNull(myCurrentWarehouse)) { - log.warn(method + "仓库信息为空 myCurrentWarehouse={}", myCurrentWarehouse); - return R.fail(403, "多仓权限无法操作,请选择仓库"); + if (!Objects.isNull(myCurrentWarehouse)) { +// log.warn(method + "仓库信息为空 myCurrentWarehouse={}", myCurrentWarehouse); +// return R.fail(403, "多仓权限无法操作,请选择仓库"); + openOrderDTO.setWarehouseId(myCurrentWarehouse.getId()); + openOrderDTO.setWarehouseName(myCurrentWarehouse.getName()); } - openOrderDTO.setWarehouseId(myCurrentWarehouse.getId()); - openOrderDTO.setWarehouseName(myCurrentWarehouse.getName()); + if (Objects.isNull(waybillId)) { log.warn(method + "运单号id为空 waybillId={}", waybillId); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java index 77449c766..82fdd4a9d 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java @@ -5457,9 +5457,16 @@ public class OpenOrderServiceImpl implements IOpenOrderService { stringBuilder.append("收货单位:").append(consignee).append("-->").append(newConsignee).append(";"); waybillEntity.setConsignee(newConsignee); waybillEntity.setConsigneeId(newConsigneeId); - BasicdataClientEntity basicdataClient = basicdataClientClient.findEntityById(newConsigneeId); - if(!Objects.isNull(basicdataClient)){ - waybillEntity.setServiceType(basicdataClient.getTypeService()); + if(Objects.isNull(newConsigneeId)){ + waybillEntity.setServiceType(1); + warehouseWaybillClient.updateWaybillCondigneeId(waybillId,newConsigneeId); + }else{ + BasicdataClientEntity basicdataClient = basicdataClientClient.findEntityById(newConsigneeId); + if(!Objects.isNull(basicdataClient)){ + waybillEntity.setServiceType(basicdataClient.getTypeService()); + }else{ + waybillEntity.setServiceType(1); + } } } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillClient.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillClient.java index 597c90510..877c1b258 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillClient.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillClient.java @@ -10,13 +10,11 @@ import lombok.AllArgsConstructor; import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; -import org.springblade.core.secure.utils.AuthUtil; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; -import java.util.Collections; import java.util.List; import java.util.Set; @@ -131,4 +129,9 @@ public class WarehouseWaybillClient implements IWarehouseWaybillClient { public List findWaybillVOByWaybillNoSet(Set allWaybillNoSet) { return warehouseWaybillService.findWaybillVOByWaybillNoSet(allWaybillNoSet); } + + @Override + public void updateWaybillCondigneeId(Long waybillId, Long newConsigneeId) { + warehouseWaybillService.updateWaybillCondigneeId(waybillId,newConsigneeId); + } } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java index 71d779938..82bffca47 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java @@ -79,4 +79,6 @@ public interface WarehouseWaybillMapper extends BaseMapper waybillIds); List findWaybillVOByWaybillNoSet(@Param("waybillNos") Set allWaybillNoSet); + + void updateWaybillCondigneeId(@Param("waybillId") Long waybillId, @Param("newConsigneeId") Long newConsigneeId); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml index 00d8264ab..9bb5e91a9 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml @@ -1276,4 +1276,8 @@ group by lww.id + + update logpm_warehouse_waybill set consignee_id = #{newConsigneeId} where id = #{waybillId} + + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java index 8235468c2..34a8c5304 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java @@ -91,4 +91,6 @@ public interface IWarehouseWaybillService extends BaseService waybillIds); List findWaybillVOByWaybillNoSet(Set allWaybillNoSet); + + void updateWaybillCondigneeId(Long waybillId, Long newConsigneeId); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java index eddf63742..abfa0fb19 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java @@ -1224,4 +1224,9 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl findWaybillVOByWaybillNoSet(Set allWaybillNoSet) { return baseMapper.findWaybillVOByWaybillNoSet(allWaybillNoSet); } + + @Override + public void updateWaybillCondigneeId(Long waybillId, Long newConsigneeId) { + baseMapper.updateWaybillCondigneeId(waybillId,newConsigneeId); + } }