diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java index 5801766a7..2f6ed1e13 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java @@ -352,6 +352,11 @@ public class DistributionSignforVO extends DistributionSignforEntity { @ApiModelProperty(value = "客户订单列表") private List orderInfo; + /** + * 是否超时 + */ + private Integer isTimeOut; + } 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 9a285d546..6be39b08f 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 @@ -215,6 +215,11 @@ public class LoadCarsDTO implements Serializable { private String createTime; private String ids; + /** + * 是否超时 + */ + private Integer isTimeOut; + /** * 商场联系人 */ diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadAllOrderVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadAllOrderVO.java index 3b7129886..2551d5bdf 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadAllOrderVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadAllOrderVO.java @@ -44,4 +44,9 @@ public class CarsLoadAllOrderVO implements Serializable { private Date warehouseEntryTimeEnd;//入库时间 private Date warehouseEntryTimeStart;//入库时间 + /** + * 是否超时 + */ + private Integer isTimeOut; + } diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicNoticeController.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicNoticeController.java index 9a9b9e2b3..c91042af4 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicNoticeController.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicNoticeController.java @@ -37,6 +37,8 @@ import org.springblade.core.tool.utils.Func; import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; +import java.util.ArrayList; +import java.util.List; import java.util.Map; /** @@ -80,21 +82,29 @@ public class BasicNoticeController extends BladeController { return R.data(BasicNoticeWrapper.build().pageVO(pages)); } + + /** - * 多表联合查询自定义分页 + * 分页 */ - @GetMapping("/page") + @GetMapping("/homeList") @ApiImplicitParams({ @ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"), @ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string") }) - @ApiOperationSupport(order = 3) + @ApiOperationSupport(order = 2) @ApiOperation(value = "分页", notes = "传入notice") - public R> page(@ApiIgnore BasicNoticeVO notice, Query query) { - IPage pages = noticeService.selectNoticePage(Condition.getPage(query), notice); - return R.data(pages); + public R> list() { + List list = noticeService.list(); + List data = new ArrayList<>(); + for (BasicNotice notice : list) { + BasicNoticeVO vo = BasicNoticeWrapper.build().entityVO(notice); + data.add(vo); + } + return R.data(data); } + /** * 新增 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml index d2f881f82..2a2f2def0 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml @@ -410,7 +410,8 @@ lddl.id AND lddt.is_deleted = 0) ELSE '' - END driverPhone + END driverPhone, + if( NOW() > DATE_ADD(lds.create_time, INTERVAL 24 HOUR), 1,0) isTimeOut FROM logpm_distribution_signfor lds JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id AND lddl.is_deleted = 0 AND lddl.customers_number > 0 @@ -503,6 +504,9 @@ and lds.signing_time between #{param.signingTimeSection[0]} and #{param.signingTimeSection[1]} + + and (NOW() > DATE_ADD(lds.create_time, INTERVAL 24 HOUR))= ${param.isTimeOut} + and ldr.mall_id in diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index 1e28804f1..7be29345a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -2095,7 +2095,8 @@ GROUP_CONCAT( DISTINCT ldpl.dealer_name ), lww.create_time openTime, IFNULL(sum(ldpl.weight),0) weight, - IFNULL(sum(ldpl.volume),0) volume + IFNULL(sum(ldpl.volume),0) volume, + if( NOW() > DATE_ADD(ldsa.warehouse_entry_time, INTERVAL 48 HOUR), 1,0) isTimeOut from logpm_distribution_stock_article ldsa LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id left join logpm_warehouse_waybill lww on lww.waybill_no = ldpl.waybill_number @@ -2239,6 +2240,10 @@ and lww.create_time <= #{param.openTimeEnd} + + + and (NOW() > DATE_ADD(ldsa.warehouse_entry_time, INTERVAL 48 HOUR))= ${param.isTimeOut} + group by ldpl.order_code,ldpl.waybill_number HAVING sum(ldpl.is_transfer) > 0 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 762a75099..ed863b25f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -293,17 +293,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse(); - List collect = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); - distributionSignfor.setWarehouseIdList(collect); - } else { - List collect = new ArrayList<>(); - collect.add(myCurrentWarehouse.getId()); - distributionSignfor.setWarehouseIdList(collect); - } + List collect = basicdataWarehouseClient.getWarehouseIds(); + distributionSignfor.setWarehouseIdList(collect); List distributionSignforVOS; @@ -326,26 +317,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl distributionSignforVOS, List reservationIds) { -// List distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationIds(reservationIds); -//// List list = disStockListDetailService.list(Wrappers.query().lambda() -//// .in(DisStockListDetailEntity::getReservationId, reservationIds) -//// .ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) -//// ); -// List reservationZeroPackageEntities = distributionReservationZeroPackageService.list(Wrappers.query().lambda() -// .in(DistributionReservationZeroPackageEntity::getReservationId, reservationIds) -// .ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) -// ); -// -// List inventoryList = disStockListDetailService.list(Wrappers.query().lambda() -// .in(DisStockListDetailEntity::getReservationId,reservationIds) -// .ne(DisStockListDetailEntity::getStockPackageStatus,ReservationPackageStatusConstant.quxiao.getValue()) -// ); - - -// Map> packageMap = distributionParcelListEntities.stream().collect(Collectors.groupingBy(DistributionParcelListVO::getReservationId)); -// Map> inventoryMap = list.stream().collect(Collectors.groupingBy(DisStockListDetailEntity::getReservationId)); -// Map> zeroPackageMap = reservationZeroPackageEntities.stream().collect(Collectors.groupingBy(DistributionReservationZeroPackageEntity::getReservationId)); - distributionSignforVOS.forEach(d -> { d.setDeliveryTypeName(getDeliveryTypeName(d.getDeliveryType())); @@ -363,14 +334,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl> packageMap, Map> zeroPackageMap, DistributionSignforVO d) { -// -// int fromParcelList = packageMap.getOrDefault(d.getReservationId(), Collections.emptyList()).stream().filter(f -> !f.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())).mapToInt(DistributionParcelListVO::getQuantity).sum(); -// int fromZeroPackage = calculateWeiqianshouFromZeroPackage(zeroPackageMap, d); -// -// return fromParcelList + fromZeroPackage; -// } - private int calculateWeiqianshouFromZeroPackage(Map> zeroPackageMap, DistributionSignforVO d) { if (!zeroPackageMap.containsKey(d.getReservationId())) { return 0; diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java b/blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java index 252a0ef31..35654ce76 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java @@ -213,8 +213,8 @@ public class WarehouseIndexController { indexDTO.setWarehouseIds(warehouseIds); //查询订制品打托列表 - IndexTrunklineHandOrderDataVO indexTrunklineHandOrderDataVO = warehouseIndexService.trunklineHandOrderData(indexDTO); - return R.data(indexTrunklineHandOrderDataVO); + List indexTrunklineHandOrderDataVOs = warehouseIndexService.trunklineHandOrderData(indexDTO); + return R.data(indexTrunklineHandOrderDataVOs); } catch (CustomerException e) { log.warn(e.message); return R.fail(e.code, e.message); diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java index 676ad0526..801b66f4f 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java @@ -40,9 +40,9 @@ public interface WarehouseIndexMapper { Integer findUpshelfNum(@Param("param") IndexDTO indexDTO); - JSONObject findPackageTrunklineHandOrderData(@Param("param") IndexDTO indexDTO); + JSONObject findPackageTrunklineHandOrderData(@Param("warehouseId") Long warehouseId); - JSONObject findZeroTrunklineHandOrderData(@Param("param") IndexDTO indexDTO); + JSONObject findZeroTrunklineHandOrderData(@Param("warehouseId") Long warehouseId); IndexTrunklineCarsDataVO trunklineCarsData(@Param("param") IndexDTO indexDTO); diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml index 8189c522f..b7cea47af 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml @@ -147,10 +147,7 @@ where 1=1 and ldpl.order_package_code != null and ldpl.order_package_status = '20' - and ldpl.warehouse_id in - - #{item} - + and ldpl.warehouse_id =#{warehouseId} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/waybil/StatusLogListener.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/waybil/StatusLogListener.java index 0bbad530c..556208252 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/waybil/StatusLogListener.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/waybil/StatusLogListener.java @@ -36,7 +36,8 @@ import java.util.stream.Collectors; @AllArgsConstructor public class StatusLogListener { - private final ITrunklineWaybillTrackClient trunklineWaybillTrackClient ; +// private final ITrunklineWaybillTrackClient trunklineWaybillTrackClient ; + private final ITrunklineWaybillTrackService trunklineWaybillTrackService; @RabbitListener(bindings = @QueueBinding( value = @Queue(name = FanoutConstants.DeliveryOfPickup.BillSignReview.QUEUE.waybillStatusLog, durable = "true"), @@ -93,7 +94,8 @@ public class StatusLogListener { t.setType(3); - trunklineWaybillTrackClient.addSignWaybillLog(t); +// trunklineWaybillTrackClient.addSignWaybillLog(t); + trunklineWaybillTrackService.addSignWaybillLog(t); } @@ -157,8 +159,8 @@ public class StatusLogListener { t.setNum(waybillCountMap.get(waybillNumber)); t.setSignOrderCode(vo.getReservationCode()); t.setType(3); - trunklineWaybillTrackClient.addSignWaybillLog(t); - +// trunklineWaybillTrackClient.addSignWaybillLog(t); + trunklineWaybillTrackService.addSignWaybillLog(t); } }