diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java index d91e7c82d..8775e120e 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java @@ -135,4 +135,17 @@ public class LoadCarsDTO implements Serializable { private Integer unloadAbnormal; private Integer isSupple; + + private String createTimeStartStr; + private String createTimeEndStr; + + private Date createTimeStart; + private Date createTimeEnd; + + private String unloadTimeStartStr; + private String unloadTimeEndStr; + + private Date unloadTimeStart; + private Date unloadTimeEnd; + } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java index 291de11cc..20b2c01e7 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java @@ -110,6 +110,8 @@ public class OpenOrderDTO implements Serializable { private String editResonCode;//改单原因编码 private String editReson;//改单原因 + private String abolishReson;//作废原因 + private Integer pickupCompleteOrNot;//提货是否整车 0否 1是 private Integer trunklineCompleteOrNot;//干线是否整车 0否 1是 diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java index a61a14c97..3af0c2f46 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java @@ -654,12 +654,6 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull( aftersalesWorkOrder.getOrderCode()) ){ throw new ServiceException("订单自编号未填!"); } -// if(ObjectUtils.isNull( aftersalesWorkOrder.getFirst()) ){ -// throw new ServiceException("一级品类未填!"); -// } -// if(ObjectUtils.isNull( aftersalesWorkOrder.getSecondary()) ){ -// throw new ServiceException("二级品类未填!"); -// } } try { aftersalesWorkOrder.setInitiationIdentification("PC"); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionBillLadingDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionBillLadingDTO.java index baed00de9..78816800e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionBillLadingDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionBillLadingDTO.java @@ -52,10 +52,20 @@ public class DistrilbutionBillLadingDTO extends DistrilbutionBillLadingEntity { */ private String pickupBatch; + /** + * 提货批次 + */ + private String orderCode; + /** * 多个提货批次 */ private List pickupBatchs; + + /** + * 多个订单 + */ + private List orderCodes; /** * 服务号 */ @@ -142,10 +152,7 @@ public class DistrilbutionBillLadingDTO extends DistrilbutionBillLadingEntity { */ private String stockupCode; - /** - * 订单自编号 - */ - private String orderCode; + /** * 库存品 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml index 4196fdab6..ad4753e00 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml @@ -1512,7 +1512,13 @@ ldl.signing_user AS nodeControlsUserName, ldl.signing_user_id AS nodeControlsUserId, IF(ldla.id is not null AND ldl.scan_status = '2','异常签收','扫描签收' )AS nodeName, - CONCAT('签收操作成功') AS description + CASE ldl.scan_status + WHEN '2' THEN CONCAT('扫描签收,签收方式:',IF(ldl.tray_no is not null,'托盘','包件'),IF(ldl.tray_no is null,'',ldl.tray_no)) + WHEN '3' THEN CONCAT('扫描签收,签收方式:订单') + WHEN '4' THEN CONCAT('扫描签收,签收方式:批量确认') + WHEN '5' THEN CONCAT('扫描签收,签收方式:未装车签收') + ELSE CONCAT('扫描装车,装车方式:',IF(ldl.tray_no is not null,'托盘','包件'),IF(ldl.tray_no is null,'',ldl.tray_no)) + END description FROM logpm_distribution_loadscan AS ldl LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldl.package_id = ldpl.id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java index d23a3783b..cf07dd518 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java @@ -99,7 +99,7 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper selectBillStockList(IPage page, @Param("distrilbutionBillLading") Map distrilbutionBillLading); - List exportDistributionBillLading(@Param("param") Map param, @Param("idArr") List idArr); + List exportDistributionBillLading(@Param("param") Map param); /** diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml index 4a693961a..17dbf5c05 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml @@ -32,97 +32,165 @@ diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java index ec6946060..4fd39ba48 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java @@ -86,7 +86,7 @@ public interface IOpenOrderService { R unFreezeWaybill(List waybillIds, Long warehouseId, String warehouseName); - R abolishWaybill(List waybillIds, Long warehouseId, String warehouseName); + R abolishWaybill(List waybillIds, Long warehouseId, String warehouseName, String abolishReson); // R findWaybillInfo(String waybillNo); 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 3f5b94d3a..860a4cdae 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 @@ -230,25 +230,51 @@ public class OpenOrderServiceImpl implements IOpenOrderService { basicdataFreightApiVO.setDestination(openOrderVO.getDestinationCode()); basicdataFreightApiVO.setArrivalWarehouse(openOrderVO.getDestinationWarehouseId() + ""); - for (AdvanceDetailGoodsVO advanceDetailGoodsVO : goodsList) { - String goodsName = advanceDetailGoodsVO.getGoodsName(); - BasicdataCategoryEntity basicdataCategoryEntity = basicdataCategoryClient.findByName(goodsName); - Long goodsId = null; - if (Objects.isNull(basicdataCategoryEntity)) { - basicdataCategoryEntity = new BasicdataCategoryEntity(); - basicdataCategoryEntity.setType(1); - basicdataCategoryEntity.setName(goodsName); - goodsId = basicdataCategoryClient.addReturnId(basicdataCategoryEntity); - } else { - goodsId = basicdataCategoryEntity.getId(); + if(goodsList.isEmpty()){ + List ls = new ArrayList<>(); + //把list中的元素通过packName分组如果pickName为空则换为"其他" + Map> groupedEntities = list.stream() + .collect(Collectors.groupingBy(entity -> { + String packName = entity.getPackName(); + return packName != null ? packName : "其他"; + })); + + groupedEntities.keySet().forEach(packName -> { + int total; + List advanceEntityList = groupedEntities.get(packName); + total = advanceEntityList.stream().mapToInt(TrunklineAdvanceEntity::getTotalNum).sum(); + AdvanceDetailGoodsVO advanceDetailGoodsVO = new AdvanceDetailGoodsVO(); + advanceDetailGoodsVO.setChargeType(1); + advanceDetailGoodsVO.setGoodsName(packName); + advanceDetailGoodsVO.setNum(total); + advanceDetailGoodsVO.setVolume(BigDecimal.ZERO); + advanceDetailGoodsVO.setWeight(BigDecimal.ZERO); + ls.add(advanceDetailGoodsVO); + }); + goodsList = new ArrayList<>(ls); + }else{ + for (AdvanceDetailGoodsVO advanceDetailGoodsVO : goodsList) { + String goodsName = advanceDetailGoodsVO.getGoodsName(); + BasicdataCategoryEntity basicdataCategoryEntity = basicdataCategoryClient.findByName(goodsName); + Long goodsId = null; + if (Objects.isNull(basicdataCategoryEntity)) { + basicdataCategoryEntity = new BasicdataCategoryEntity(); + basicdataCategoryEntity.setType(1); + basicdataCategoryEntity.setName(goodsName); + goodsId = basicdataCategoryClient.addReturnId(basicdataCategoryEntity); + } else { + goodsId = basicdataCategoryEntity.getId(); + } + advanceDetailGoodsVO.setGoodsId(goodsId); + basicdataFreightApiVO.setCategory(goodsId + ""); + List pirceList = basicdataFreightClient.pirce(basicdataFreightApiVO); + JSONArray price = JSONArray.parseArray(JSON.toJSONString(pirceList)); + advanceDetailGoodsVO.setArrPirce(price); } - advanceDetailGoodsVO.setGoodsId(goodsId); - basicdataFreightApiVO.setCategory(goodsId + ""); - List pirceList = basicdataFreightClient.pirce(basicdataFreightApiVO); - JSONArray price = JSONArray.parseArray(JSON.toJSONString(pirceList)); - advanceDetailGoodsVO.setArrPirce(price); } + + openOrderVO.setGoodsList(goodsList); //查询支付方式 @@ -2127,7 +2153,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { advanceEntity.setLegacyStatus("1"); } advanceEntity.setHasPackage(0); - advanceEntity.setCreateUserName(AuthUtil.getUserName()); + advanceEntity.setCreateUserName(AuthUtil.getNickName()); list.add(advanceEntity); } }); @@ -2731,7 +2757,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { @Transactional(rollbackFor = Exception.class) @Override - public R abolishWaybill(List waybillIds, Long warehouseId, String warehouseName) { + public R abolishWaybill(List waybillIds, Long warehouseId, String warehouseName, String abolishReson) { List waybillList = warehouseWaybillClient.findListByWaybillIds(waybillIds); List waybillEntities = warehouseWaybillClient.findListByWaybillIds(waybillIds); waybillList.forEach(waybillEntity -> { @@ -2785,7 +2811,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { waybillEntities.forEach(waybillEntity -> { String createOperationRemark = "作废运单" + waybillEntity.getWaybillNo() + ",时间:" + CommonUtil.dateToString(new Date()); - openOrderAsyncService.saveLog(waybillEntity.getId(), waybillEntity.getWaybillNo(), "1000", "作废运单", createOperationRemark, AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName); + openOrderAsyncService.saveLog(waybillEntity.getId(), waybillEntity.getWaybillNo(), "1000", "作废运单", createOperationRemark+" 原因:"+abolishReson, AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName); }); return R.success("作废成功"); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index ed4bfe45a..b6dbd378a 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -2054,6 +2054,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl pageList = trunklineCarsLoadScanService.loadingDetail(page, loadCarsDTO); return R.data(pageList); 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 a55b29270..53547d8e9 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 @@ -236,6 +236,33 @@ and create_time <= #{param.createTimeEndDate} + + and Locate(#{param.agent},agent) > 0 + + + and Locate(#{param.goodsName},goods_name) > 0 + + + and freeze_status = #{param.freezeStatus} + + + and abolish_status = #{param.abolishStatus} + + + and Locate(#{param.remark},remark) > 0 + + + and Locate(#{param.consigneeAddress},consignee_address) > 0 + + + and total_count = #{param.totalCount} + + + and total_weight = #{param.totalWeight} + + + and total_volume = #{param.totalVolume} + order by create_time desc