diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionAddvalueController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionAddvalueController.java index 48a46921c..caa7cbafa 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionAddvalueController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionAddvalueController.java @@ -16,6 +16,7 @@ */ package com.logpm.distribution.controller; +import com.logpm.distribution.dto.app.DistributionAppAddvalueDTO; import com.logpm.distribution.entity.DistributionAddvalueEntity; import com.logpm.distribution.excel.DistributionAddvalueExcel; import com.logpm.distribution.service.IDistributionAddvalueService; @@ -52,7 +53,7 @@ import javax.servlet.http.HttpServletResponse; */ @RestController @AllArgsConstructor -@RequestMapping("addvalue/distributionAddvalue") +@RequestMapping("/addvalue") @Api(value = "配送增值服务表", tags = "配送增值服务表接口") public class DistributionAddvalueController extends BladeController { @@ -147,4 +148,17 @@ public class DistributionAddvalueController extends BladeController { ExcelUtil.export(response, "配送增值服务表数据" + DateUtil.time(), "配送增值服务表数据表", list, DistributionAddvalueExcel.class); } + +// /** +// * 查询 +// */ +// @PostMapping("/addvalueInfoList") +// @ApiOperationSupport(order = 2) +// @ApiOperation(value = "分页", notes = "传入distributionAddvalue") +// public R addvalueInfoList(@ApiIgnore @RequestBody DistributionAppAddvalueDTO distributionAddvalue) { +// R r = distributionAddvalueService.editAddvalueInfo(distributionAddvalue); +// return r; +// } + + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java index ad8edb991..8d28b8cf5 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java @@ -19,6 +19,7 @@ package com.logpm.distribution.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.logpm.distribution.dto.DistributionAddvalueDTO; import com.logpm.distribution.dto.DistributionReservationStocklistDTO; import com.logpm.distribution.dto.DistributionSignforDTO; import com.logpm.distribution.entity.DistributionSignforEntity; @@ -233,4 +234,17 @@ public class DistributionSignforController extends BladeController { ExcelUtil.export(response, "签收管理数据" + DateUtil.time(), "签收管理数据表", list, DistributionSignforExcel.class); } + + /** + * 签收管理 删除 + */ + @PostMapping("/addvalueInfoList") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R addvalueInfoList(@RequestBody DistributionAddvalueDTO distributionAddvalueDTO) { + R r = distributionSignforService.getAddvalueInfoList(distributionAddvalueDTO); + return r; + } + + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionAddvalueDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionAddvalueDTO.java index cfd7fcecb..bd7fb5f92 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionAddvalueDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionAddvalueDTO.java @@ -31,4 +31,9 @@ import lombok.EqualsAndHashCode; public class DistributionAddvalueDTO extends DistributionAddvalueEntity { private static final long serialVersionUID = 1L; + /** + * 签收ID + */ + private Long signforId; + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.java index 7784277ce..5aaaab958 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.java @@ -19,6 +19,7 @@ package com.logpm.distribution.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.dto.DistributionAddvalueDTO; import com.logpm.distribution.entity.DistributionAddvalueEntity; import com.logpm.distribution.entity.DistributionAddvaluePackageEntity; import com.logpm.distribution.excel.DistributionAddvalueExcel; @@ -73,6 +74,13 @@ public interface DistributionAddvalueMapper extends BaseMapper addvalueInfo(@Param("reservationId")Long reservationId); + /** + * 查询签收列表客户的增值服务项 + * @param distributionAddvalueDTO + * @return + */ + DistributionAddvalueVO getAddvalueBySignfor(@Param("par")DistributionAddvalueDTO distributionAddvalueDTO); + // /** // * 删除增值服务 // * @param reservationId diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml index 7ab373283..88c63d76c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml @@ -72,5 +72,23 @@ GROUP BY ldad.fee,ldad.num,ldad.flool_num,ldad.distance,ldad.id + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAddvalueService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAddvalueService.java index 3868f1013..fa17d1529 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAddvalueService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAddvalueService.java @@ -19,6 +19,7 @@ package com.logpm.distribution.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; +import com.logpm.distribution.dto.DistributionAddvalueDTO; import com.logpm.distribution.dto.app.DistributionAppAddvalueDTO; import com.logpm.distribution.entity.DistributionAddvalueEntity; import com.logpm.distribution.entity.DistributionAddvaluePackageEntity; @@ -103,4 +104,12 @@ public interface IDistributionAddvalueService extends IService getAddvalueBySignfor(DistributionAddvalueDTO distributionAddvalueDTO); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java index 907148f06..88fc06078 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java @@ -19,6 +19,7 @@ package com.logpm.distribution.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.logpm.distribution.bean.Resp; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.dto.DistributionAddvalueDTO; import com.logpm.distribution.dto.DistributionReservationStocklistDTO; import com.logpm.distribution.dto.DistributionSignforDTO; import com.logpm.distribution.dto.DistrilbutionAppsignforDTO; @@ -143,4 +144,11 @@ public interface IDistributionSignforService extends BaseService signforInventoryList(Long signforId); + + /** + * 查询签收对应的增值服务类型 + * @param distributionAddvalueDTO + * @return + */ + R getAddvalueInfoList(DistributionAddvalueDTO distributionAddvalueDTO); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java index 45ca5d504..dd248fe70 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java @@ -21,6 +21,7 @@ import com.alibaba.druid.sql.visitor.functions.If; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.distribution.bean.Res; import com.logpm.distribution.bean.Resp; +import com.logpm.distribution.dto.DistributionAddvalueDTO; import com.logpm.distribution.dto.app.DistributionAppAddvalueDTO; import com.logpm.distribution.entity.*; import com.logpm.distribution.excel.DistributionAddvalueExcel; @@ -411,4 +412,18 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImpl getAddvalueBySignfor(DistributionAddvalueDTO distributionAddvalueDTO) { +// DistributionAddvalueVO addvalueVO = distributionAddvalueMapper.getAddvalueBySignfor(distributionAddvalueDTO); +// if (Func.isNotEmpty(addvalueVO)){ +// String packageListIds = addvalueVO.getPackageListIds(); +// if (Func.isNotEmpty(packageListIds)){ +// List longs = Func.toLongList(packageListIds); +// List distributionAddvaluePackageEntities = distributionAddvaluePackageService.list(Wrappers.query().lambda().in(DistributionAddvaluePackageEntity::getPackageId,longs).eq(DistributionAddvaluePackageEntity::getAddvalueDetailId,addvalueVO.getAddvalueDetailId())); +// addvalueVO.setPackageEntityList(distributionAddvaluePackageEntities); +// } +// } +// return R.data(addvalueVO); +// } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 49574c7fd..8c40bc968 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -28,9 +28,7 @@ import com.logpm.basic.entity.BasicPrintTemplateEntity; import com.logpm.basic.feign.IBasicPrintTemplateClient; import com.logpm.basicdata.entity.BasicdataDriverArteryEntity; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; -import com.logpm.basicdata.feign.IBasicdataCarrierClient; import com.logpm.basicdata.feign.IBasicdataDriverArteryClient; -import com.logpm.basicdata.feign.IBasicdataVehicleClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.distribution.bean.Resp; import com.logpm.distribution.dto.*; @@ -76,7 +74,6 @@ import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; -import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; @@ -111,7 +108,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl selectDistributionDeliveryListPage(IPage page, DistributionDeliveryListDTO distributionDeliveryList) { @@ -1942,11 +1934,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl consigneeAddress = new HashSet<>(); //运单客户收货单位 HashSet consignee = new HashSet<>(); + //运单号 + HashSet waybillNo = new HashSet<>(); clientTotal.getAndIncrement(); if (Func.isEmpty(oldClient.get(k))) { DistributionReservationEntity reservationEntity = new DistributionReservationEntity(); - reservationEntity.setWaybillNo(k); +// reservationEntity.setWaybillNo(k); reservationEntity.setReservationDate(reservationDate); reservationEntity.setReservationStatus(ReservationStatusConstant.daipeisong.getValue()); reservationEntity.setDeliveryType(DistributionTypeConstant.shangpei.getValue()); @@ -1996,6 +1990,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl packageListInfo = s.getPackageListInfo(); @@ -2109,6 +2106,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl selectDistributionSignforPage(IPage page, DistributionSignforVO distributionSignfor) { @@ -1384,5 +1387,23 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl addvaluePackageEntities = distributionAddvalueService.getAddvalueBySignfor(distributionAddvalueDTO); + DistributionAddvalueVO addvalueBySignfor = distributionAddvalueMapper.getAddvalueBySignfor(distributionAddvalueDTO); + if (Func.isNotEmpty(addvalueBySignfor)){ + String packageListIds = addvalueBySignfor.getPackageListIds(); + if (Func.isNotEmpty(packageListIds)){ + List longs = Func.toLongList(packageListIds); + List distributionAddvaluePackageEntities = distributionAddvaluePackageService.list(Wrappers.query().lambda() + .in(DistributionAddvaluePackageEntity::getPackageId,longs) + .eq(DistributionAddvaluePackageEntity::getAddvalueDetailId,addvalueBySignfor.getAddvalueDetailId())); + + addvalueBySignfor.setPackageEntityList(distributionAddvaluePackageEntities); + } + } + return R.data(addvalueBySignfor); + } + } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java index ae25e3b89..748016f19 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java @@ -493,6 +493,12 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { logger.info("#############sendReceiveInfo: 未找到对应订单mainId={}", mainId); continue; } + // 需要判断本次任务是否为中心仓的订单 + if("转运仓".equals(mtFactoryOrderMain.getWarehouseType())){ + // 转运仓的订单和签收不进行推送 + logger.info("############# 转运仓的数据不进行推送 mtFactoryOrderMain={}", mtFactoryOrderMain); + continue; + } MtReceiveContentDTO mtReceiveContentDTO = new MtReceiveContentDTO(); mtReceiveContentDTO.setInvoiceOrderCode(mtFactoryOrderMain.getInvoiceOrderCode()); @@ -504,14 +510,15 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { mtReceiveContentDTOList.add(mtReceiveContentDTO); } - logger.info("#############sendReceiveInfo:tag{}", 10); + logger.info("#############mtReceiveContentDTOList: size {}", mtReceiveContentDTOList.size()); - if(mtReceiveContentDTOList.size()==0){ + if(mtReceiveContentDTOList.isEmpty()){ logger.info("############# 没有找到需要配推送的订单包件"); return R.success(""); } + //签收信息数据存入头部数据 mtReceiveDTO.setReceiveContentList(mtReceiveContentDTOList); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java index 97868eb98..53de52a46 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java @@ -281,7 +281,11 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { log.info("############handleData: 数据处理开始"); analyzeData(resultArray); opOrderStatusLogEntity.setDataStatus(1); - } catch (Exception e) { + } catch (CustomerException e) { + log.error(">>>> error {}", e.getMessage()); + opOrderStatusLogEntity.setDataStatus(2); + + }catch (Exception e) { log.error(">>>> error {}", e.getMessage()); opOrderStatusLogEntity.setDataStatus(2); @@ -312,6 +316,8 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { String type = valueObject.getString("Type"); if ("中转".equals(type)) { receivingOrderEntity.setType(1); + log.warn("############handleData: 中转到货暂不接收"); + throw new CustomerException(403,"中转到货暂不接收"); } else if ("配送".equals(type)) { receivingOrderEntity.setType(2); } else {