Browse Source

Merge branch 'test' into pre-production

# Conflicts:
#	blade-service/logpm-distribution/src/main/resources/application-test.yml
dev-warehouse
zhenghaoyu 2 years ago
parent
commit
f8033f847d
  1. 5
      blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java
  2. 3
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataStoreBusinessEntity.java
  3. 34
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataWarehouseEntity.java
  4. 7
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java
  5. 3
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataStoreBusinessClient.java
  6. 20
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java
  7. 271
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscanEntity.java
  8. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  9. 8
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java
  10. 80
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationStockarticleEntity.java
  11. 80
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationStocklistEntity.java
  12. 85
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSelfDeliveryEntity.java
  13. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionServiceLogEntity.java
  14. 37
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java
  15. 16
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java
  16. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java
  17. 91
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionTripartiteDeliveryEntity.java
  18. 50
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionLoadscanClient.java
  19. 49
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionReservationStockarticleClient.java
  20. 49
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionReservationStocklistClient.java
  21. 49
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionSelfDeliveryClient.java
  22. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java
  23. 49
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionTripartiteDeliveryClient.java
  24. 22
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java
  25. 35
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionLoadscanVO.java
  26. 35
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationStockarticleVO.java
  27. 35
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationStocklistVO.java
  28. 35
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSelfDeliveryVO.java
  29. 1
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java
  30. 35
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionTripartiteDeliveryVO.java
  31. 3
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java
  32. 1
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceDetailClient.java
  33. 2
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineNodeService.java
  34. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java
  35. 9
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataStoreBusinessClient.java
  36. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataWarehouseMapper.xml
  37. 2
      blade-service/logpm-distribution/Dockerfile
  38. 5
      blade-service/logpm-distribution/pom.xml
  39. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  40. 150
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionLoadscanController.java
  41. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java
  42. 150
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationStockarticleController.java
  43. 150
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationStocklistController.java
  44. 150
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSelfDeliveryController.java
  45. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionServiceLogController.java
  46. 53
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java
  47. 150
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionTripartiteDeliveryController.java
  48. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryListDTO.java
  49. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionLoadscanDTO.java
  50. 42
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationDTO.java
  51. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationStockarticleDTO.java
  52. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationStocklistDTO.java
  53. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSelfDeliveryDTO.java
  54. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionTripartiteDeliveryDTO.java
  55. 26
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionloadingscanDTO.java
  56. 316
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionLoadscanExcel.java
  57. 105
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationStockarticleExcel.java
  58. 105
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationStocklistExcel.java
  59. 111
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSelfDeliveryExcel.java
  60. 112
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionTripartiteDeliveryExcel.java
  61. 53
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionLoadscanClient.java
  62. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionReservationStockarticleClient.java
  63. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionReservationStocklistClient.java
  64. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java
  65. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java
  66. 43
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  67. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  68. 98
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  69. 59
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.java
  70. 173
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.xml
  71. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  72. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.java
  73. 36
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.xml
  74. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.java
  75. 36
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.xml
  76. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSelfDeliveryMapper.java
  77. 37
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSelfDeliveryMapper.xml
  78. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  79. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  80. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionTripartiteDeliveryMapper.java
  81. 38
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionTripartiteDeliveryMapper.xml
  82. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  83. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionLoadscanService.java
  84. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
  85. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationStockarticleService.java
  86. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationStocklistService.java
  87. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSelfDeliveryService.java
  88. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionServiceLogService.java
  89. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java
  90. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionTripartiteDeliveryService.java
  91. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  92. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionLoadscanServiceImpl.java
  93. 318
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  94. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationStockarticleServiceImpl.java
  95. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationStocklistServiceImpl.java
  96. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSelfDeliveryServiceImpl.java
  97. 35
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionServiceLogServiceImpl.java
  98. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  99. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionTripartiteDeliveryServiceImpl.java
  100. 2
      blade-service/logpm-distribution/src/main/resources/application-dev.yml
  101. Some files were not shown because too many files have changed in this diff Show More

5
blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java

@ -49,6 +49,11 @@ public class LauncherServiceImpl implements LauncherService {
PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));
// PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", "true");
PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.username","nacos");
PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.password","Nacos123123");
PropsUtil.setProperty(props, "spring.cloud.nacos.config.username","nacos");
PropsUtil.setProperty(props, "spring.cloud.nacos.config.password","Nacos123123");
// dubbo注册
PropsUtil.setProperty(props, "dubbo.application.name", appName);
PropsUtil.setProperty(props, "dubbo.application.qos.enable", "false");

3
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataStoreBusinessEntity.java

@ -17,10 +17,9 @@
package com.logpm.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;

34
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataWarehouseEntity.java

@ -23,6 +23,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@ -239,20 +241,26 @@ public class BasicdataWarehouseEntity extends TenantEntity {
@ApiModelProperty(value = "区划编号")
private String code;
/**
* 镇区划编号
*/
@ApiModelProperty(value = "管理区域省级区划编号")
private String manageProvinceCode;
/**
* 村区划编号
*/
@ApiModelProperty(value = "管理区域市级区划编号")
private String manageCityCode;
/**
* 村区划编号
* 管理区域
*/
@ApiModelProperty(value = "管理区域区划编号")
private String manageCode;
@ApiModelProperty(value = "管理区域")
private String administrativeAreas;
// /**
// * 镇区划编号
// */
// @ApiModelProperty(value = "管理区域省级区划编号")
// private String manageProvinceCode;
// /**
// * 村区划编号
// */
// @ApiModelProperty(value = "管理区域市级区划编号")
// private String manageCityCode;
// /**
// * 村区划编号
// */
// @ApiModelProperty(value = "管理区域区划编号")
// private String manageCode;
/**
* 村区划编号

7
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java

@ -16,8 +16,9 @@
*/
package com.logpm.basicdata.feign;
import org.springblade.core.mp.support.BladePage;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -29,7 +30,7 @@ import org.springframework.web.bind.annotation.RequestParam;
* @since 2023-05-16
*/
@FeignClient(
value = "blade-basicdataClient"
value = ModuleNameConstant.APPLICATION_BASICDATA_NAME
)
public interface IBasicdataClientClient {
@ -46,4 +47,6 @@ public interface IBasicdataClientClient {
@GetMapping(TOP)
BladePage<BasicdataClientEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
@GetMapping(API_PREFIX+"/findByName")
BasicdataClientEntity findByName(String customerName);
}

3
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataStoreBusinessClient.java

@ -46,4 +46,7 @@ public interface IBasicdataStoreBusinessClient {
@GetMapping(TOP)
BladePage<BasicdataStoreBusinessEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
@GetMapping(API_PREFIX+"/findByClientIdAndTypeService")
BasicdataStoreBusinessEntity findByClientIdAndTypeService(Long clientEntityId, Integer typeService);
}

20
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java

@ -98,6 +98,16 @@ public class DistributionDeliveryListEntity extends TenantEntity {
*/
@ApiModelProperty(value = "配送司机(id)")
private String driverId;
/**
* 叉车司机(id)
*/
@ApiModelProperty(value = "叉车司机(id)")
private String forkliftId;
/**
* 叉车司机()
*/
@ApiModelProperty(value = "叉车司机(值)")
private String forkliftName;
/**
* 配送车辆(名称)
*/
@ -158,6 +168,11 @@ public class DistributionDeliveryListEntity extends TenantEntity {
*/
@ApiModelProperty(value = "装卸班组(名称)")
private String loadingTeamName;
/**
* 装卸类型
*/
@ApiModelProperty(value = "装卸类型(1-装,2-卸)")
private Integer loadingTeamType;
/**
* 关联预约表id客户
*/
@ -185,6 +200,11 @@ public class DistributionDeliveryListEntity extends TenantEntity {
@ApiModelProperty(value = "配送单号")
private String noteNumber;
/**
* 数据来源
*/
@ApiModelProperty(value = "数据来源")
private Integer source;
}

271
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscanEntity.java

@ -0,0 +1,271 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 装车扫描表 实体类
*
* @author lmy
* @since 2023-06-27
*/
@Data
@TableName("logpm_distribution_loadscan")
@ApiModel(value = "DistributionLoadscan对象", description = "装车扫描表")
@EqualsAndHashCode(callSuper = true)
public class DistributionLoadscanEntity extends TenantEntity {
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* 扫码类型;1-件装车,2-托盘装车
*/
@ApiModelProperty(value = "扫码类型;(1-件装车,2-托盘装车)")
private String scanType;
/**
* 托盘id
*/
@ApiModelProperty(value = "托盘id")
private String trayId;
/**
* 品牌id
*/
@ApiModelProperty(value = "品牌id")
private String brandId;
/**
* 品牌名字
*/
@ApiModelProperty(value = "品牌名字")
private String brandName;
/**
* 托盘码
*/
@ApiModelProperty(value = "托盘码")
private String trayNo;
/**
* 车次号
*/
@ApiModelProperty(value = "车次号")
private String trainNumber;
/**
* 配送车辆id
*/
@ApiModelProperty(value = "配送车辆id")
private String vehicleId;
/**
* 配送司机id
*/
@ApiModelProperty(value = "配送司机id")
private String driverId;
/**
* 配送车辆车牌
*/
@ApiModelProperty(value = "配送车辆车牌")
private String vehicleName;
/**
* 配送司机名称
*/
@ApiModelProperty(value = "配送司机名称")
private String driverName;
/**
* 扫描仓库id
*/
@ApiModelProperty(value = "扫描仓库id")
private Long warehouseId;
/**
* 仓库名称
*/
@ApiModelProperty(value = "仓库名称")
private String warehouseName;
/**
* 包条表id
*/
@ApiModelProperty(value = "包条表id")
private Long packageId;
/**
* 包条码
*/
@ApiModelProperty(value = "包条码")
private String packetBarCode;
/**
* 扫描状态;1=未装车2=扫描,3=确认
*/
@ApiModelProperty(value = "扫描状态;(1=未装车,2=扫描,3=确认)")
private Integer scanStatus;
/**
* 确认时间
*/
@ApiModelProperty(value = "确认时间")
private Date confirmTime;
/**
* 扫描时间
*/
@ApiModelProperty(value = "扫描时间")
private Date scanTime;
/**
* 是否齐套;1未齐套2齐套
*/
@ApiModelProperty(value = "是否齐套;(1未齐套,2齐套)")
private Integer kitting;
/**
* 类型;1卸车2装车
*/
@ApiModelProperty(value = "类型;(1卸车,2装车)")
private Integer type;
/**
* 滞留操作人
*/
@ApiModelProperty(value = "滞留操作人")
private String detentionPerson;
/**
* 卸货仓库id
*/
@ApiModelProperty(value = "卸货仓库id")
private Long unWarehouseId;
/**
* 卸货仓库名称
*/
@ApiModelProperty(value = "卸货仓库名称")
private String unWarehouseName;
/**
* 卸货人id
*/
@ApiModelProperty(value = "卸货人id")
private Long unAdministratorsId;
/**
* 卸货人名称
*/
@ApiModelProperty(value = "卸货人名称")
private String unAdministratorsName;
/**
* 补录;1=正常,2=补录数据
*/
@ApiModelProperty(value = "补录;(1=正常,2=补录数据)")
private Integer isInsert;
/**
* 扫码状态;1=无数据装车2=有数据装车
*/
@ApiModelProperty(value = "扫码状态;(1=无数据装车;2=有数据装车)")
private Integer scanState;
/**
* 同步;1=正常数据2=无编码未同步3=无编码已同步待绑定
*/
@ApiModelProperty(value = "同步;(1=正常数据,2=无编码未同步,3=无编码已同步待绑定)")
private Integer scanSynchronous;
/**
* 计划目的网点
*/
@ApiModelProperty(value = "计划目的网点")
private String planDestinationId;
/**
* 备注信息
*/
@ApiModelProperty(value = "备注信息")
private String msg;
/**
* 卸车时间
*/
@ApiModelProperty(value = "卸车时间")
private Date unloadTime;
/**
* 订单表id
*/
@ApiModelProperty(value = "订单表id")
private Long orderId;
/**
* 客户表id
*/
@ApiModelProperty(value = "客户表id")
private Long reservationId;
/**
* 配送表id
*/
@ApiModelProperty(value = "配送表id")
private Long deliveryId;
/**
* 装车数量
*/
@ApiModelProperty(value = "装车数量")
private Integer loadedNub;
/**
* 包内数量
*/
@ApiModelProperty(value = "包内数量")
private Integer packageNub;
}

5
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java

@ -61,6 +61,11 @@ public class DistributionParcelListEntity extends TenantEntity {
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private String orderSelfNumbering;
/**
* 仓库
*/

8
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java

@ -42,7 +42,7 @@ public class DistributionReservationEntity extends TenantEntity {
* 订单自编号;展示使用
*/
@ApiModelProperty(value = "订单自编号;订单自编号,关联订单表")
private String orderId;
private String stockArticleId;
/**
* 收货人
*/
@ -129,6 +129,12 @@ public class DistributionReservationEntity extends TenantEntity {
*/
@ApiModelProperty(value = "时段;1-上午、2-下午、3-全天")
private String periodOfTime;
/**
* 费用汇总
*/
@ApiModelProperty(value = "费用汇总")
private BigDecimal fee;
/**
/**
* 预留1

80
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationStockarticleEntity.java

@ -0,0 +1,80 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 预约订单中间表 实体类
*
* @author TJJ
* @since 2023-06-28
*/
@Data
@TableName("logpm_distribution_reservation_stockarticle")
@ApiModel(value = "DistributionReservationStockarticle对象", description = "预约订单中间表")
@EqualsAndHashCode(callSuper = true)
public class DistributionReservationStockarticleEntity extends TenantEntity {
/**
* 预约编号
*/
@ApiModelProperty(value = "预约编号")
private Long reservationId;
/**
* 订单编号
*/
@ApiModelProperty(value = "订单编号")
private Long stockarticleId;
/**
* 预约数量
*/
@ApiModelProperty(value = "预约数量")
private Integer reservationNum;
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
}

80
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationStocklistEntity.java

@ -0,0 +1,80 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 预约库存中间表 实体类
*
* @author TJJ
* @since 2023-06-28
*/
@Data
@TableName("logpm_distribution_reservation_stocklist")
@ApiModel(value = "DistributionReservationStocklist对象", description = "预约库存中间表")
@EqualsAndHashCode(callSuper = true)
public class DistributionReservationStocklistEntity extends TenantEntity {
/**
* 预约编号
*/
@ApiModelProperty(value = "预约编号")
private Long reservationId;
/**
* 库存编号
*/
@ApiModelProperty(value = "库存编号")
private Long stocklistId;
/**
* 预约数量
*/
@ApiModelProperty(value = "预约数量")
private Integer reservationNum;
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
}

85
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSelfDeliveryEntity.java

@ -0,0 +1,85 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 自主配送信息列表 实体类
*
* @author TJJ
* @since 2023-06-26
*/
@Data
@TableName("logpm_distribution_self_delivery")
@ApiModel(value = "DistributionSelfDelivery对象", description = "自主配送信息列表")
@EqualsAndHashCode(callSuper = true)
public class DistributionSelfDeliveryEntity extends TenantEntity {
/**
* 预约信息编号
*/
@ApiModelProperty(value = "预约信息编号")
private String reservationIds;
/**
* 车辆编号
*/
@ApiModelProperty(value = "车辆编号")
private String vehicleIds;
/**
* 司机负责人
*/
@ApiModelProperty(value = "司机负责人")
private String masterDriverId;
/**
* 配送司机
*/
@ApiModelProperty(value = "配送司机")
private String slaveDriverIds;
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
}

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionServiceLogEntity.java

@ -81,6 +81,6 @@ public class DistributionServiceLogEntity extends TenantEntity {
* 在库Id
*/
@ApiModelProperty(value = "在库ID")
private Long stockArticleId;
private String stockArticleId;
}

37
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java

@ -16,16 +16,17 @@
*/
package com.logpm.distribution.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.math.BigDecimal;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 配送在库订单 实体类
@ -89,6 +90,11 @@ public class DistributionStockArticleEntity extends TenantEntity {
*/
@ApiModelProperty(value = "仓库")
private String warehouse;
@TableField(exist = false)
private String stateName;
@TableField(exist = false)
private String typeName;
/**
* 入库时间
*/
@ -166,7 +172,30 @@ public class DistributionStockArticleEntity extends TenantEntity {
/**
* 增值服务总费用
*/
@ApiModelProperty(value = "预约编号")
@ApiModelProperty(value = "增值服务总费用")
private BigDecimal fee;
/**
* 协商费用
*/
@ApiModelProperty(value = "协商费用")
private BigDecimal rate;
/**
* 老系统advanceId
*/
@ApiModelProperty(value = "老系统advanceId")
private Integer advanceId;
/**
* 预约数量
*/
@ApiModelProperty(value = "预约数量")
private Integer reservationNum;
}

16
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java

@ -91,6 +91,16 @@ public class DistributionStockListEntity extends TenantEntity {
*/
@ApiModelProperty(value = "仓库")
private String warehouse;
/**
* 工厂车次
*/
@ApiModelProperty(value = "工厂车次")
private String factory;
/**
* 品分类
*/
@ApiModelProperty(value = "品分类")
private String category;
/**
* 商场
*/
@ -132,4 +142,10 @@ public class DistributionStockListEntity extends TenantEntity {
@ApiModelProperty(value = "发运车次")
private String despatch;
/**
* 预约数量
*/
@ApiModelProperty(value = "预约数量")
private Integer reservationNum;
}

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java

@ -52,7 +52,7 @@ public class DistributionStockupEntity extends TenantEntity {
* ids
*/
@TableField(exist = false)
@ApiModelProperty(value = "备货人")
@ApiModelProperty(value = "预约编号")
private String ids;
/**
* 备货状态

91
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionTripartiteDeliveryEntity.java

@ -0,0 +1,91 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.math.BigDecimal;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 外协配送信息列表 实体类
*
* @author TJJ
* @since 2023-06-26
*/
@Data
@TableName("logpm_distribution_tripartite_delivery")
@ApiModel(value = "DistributionTripartiteDelivery对象", description = "外协配送信息列表")
@EqualsAndHashCode(callSuper = true)
public class DistributionTripartiteDeliveryEntity extends TenantEntity {
/**
* 司机名称
*/
@ApiModelProperty(value = "司机名称")
private String driverName;
/**
* 司机电话
*/
@ApiModelProperty(value = "司机电话")
private String driverPhone;
/**
* 车辆车牌
*/
@ApiModelProperty(value = "车辆车牌")
private String vehicleNum;
/**
* 预约信息编号
*/
@ApiModelProperty(value = "预约信息")
private String reservationIds;
/**
* 配送费用
*/
@ApiModelProperty(value = "配送费用")
private BigDecimal deliveryFee;
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
}

50
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionLoadscanClient.java

@ -0,0 +1,50 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.feign;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* 装车扫描表 Feign接口类
*
* @author lmy
* @since 2023-06-27
*/
@FeignClient(
value = ModuleNameConstant.APPLICATION_DISTRIBUTION_NAME
)
public interface IDistributionLoadscanClient {
String API_PREFIX = "loadscan/client";
String TOP = API_PREFIX + "/top";
/**
* 获取装车扫描表列表
*
* @param current 页号
* @param size 页数
* @return BladePage
*/
@GetMapping(TOP)
BladePage<DistributionLoadscanEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
}

49
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionReservationStockarticleClient.java

@ -0,0 +1,49 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.feign;
import org.springblade.core.mp.support.BladePage;
import com.logpm.distribution.entity.DistributionReservationStockarticleEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* 预约订单中间表 Feign接口类
*
* @author TJJ
* @since 2023-06-28
*/
@FeignClient(
value = "reservationStockArticle"
)
public interface IDistributionReservationStockarticleClient {
String API_PREFIX = "reservationStockArticle/client";
String TOP = API_PREFIX + "/top";
/**
* 获取预约订单中间表列表
*
* @param current 页号
* @param size 页数
* @return BladePage
*/
@GetMapping(TOP)
BladePage<DistributionReservationStockarticleEntity> reservationStockArticleTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
}

49
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionReservationStocklistClient.java

@ -0,0 +1,49 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.feign;
import org.springblade.core.mp.support.BladePage;
import com.logpm.distribution.entity.DistributionReservationStocklistEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* 预约库存中间表 Feign接口类
*
* @author TJJ
* @since 2023-06-28
*/
@FeignClient(
value = "reservationStockList"
)
public interface IDistributionReservationStocklistClient {
String API_PREFIX = "reservationStockList/client";
String TOP = API_PREFIX + "/top";
/**
* 获取预约库存中间表列表
*
* @param current 页号
* @param size 页数
* @return BladePage
*/
@GetMapping(TOP)
BladePage<DistributionReservationStocklistEntity> reservationStockListTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
}

49
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionSelfDeliveryClient.java

@ -0,0 +1,49 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.feign;
import org.springblade.core.mp.support.BladePage;
import com.logpm.distribution.entity.DistributionSelfDeliveryEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* 自主配送信息列表 Feign接口类
*
* @author TJJ
* @since 2023-06-26
*/
@FeignClient(
value = "selfDelivery"
)
public interface IDistributionSelfDeliveryClient {
String API_PREFIX = "selfDelivery/client";
String TOP = API_PREFIX + "/top";
/**
* 获取自主配送信息列表列表
*
* @param current 页号
* @param size 页数
* @return BladePage
*/
@GetMapping(TOP)
BladePage<DistributionSelfDeliveryEntity> selfDeliveryTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
}

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java

@ -50,4 +50,7 @@ public interface IDistributionStockArticleClient {
@PostMapping(API_PREFIX + "/addData")
Long addData(@RequestBody DistributionStockArticleEntity distributionStockArticleEntity);
@GetMapping(API_PREFIX + "/findByAdvanceId")
DistributionStockArticleEntity findByAdvanceId(@RequestParam Integer advanceId);
}

49
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionTripartiteDeliveryClient.java

@ -0,0 +1,49 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.feign;
import org.springblade.core.mp.support.BladePage;
import com.logpm.distribution.entity.DistributionTripartiteDeliveryEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* 外协配送信息列表 Feign接口类
*
* @author TJJ
* @since 2023-06-26
*/
@FeignClient(
value = "tripartiteDelivery"
)
public interface IDistributionTripartiteDeliveryClient {
String API_PREFIX = "tripartiteDelivery/client";
String TOP = API_PREFIX + "/top";
/**
* 获取外协配送信息列表列表
*
* @param current 页号
* @param size 页数
* @return BladePage
*/
@GetMapping(TOP)
BladePage<DistributionTripartiteDeliveryEntity> tripartiteDeliveryTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
}

22
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java

@ -93,11 +93,11 @@ public class DistributionDeliveryInfoVO extends DistributionDeliveryInfoEntity {
*/
@ApiModelProperty(value = "车次号")
private String trainNumber;
/**
* 在库订单ID
*/
@ApiModelProperty(value = "在库订单ID")
private String stockArticleId;
// /**
// * 在库订单ID
// */
// @ApiModelProperty(value = "在库订单ID")
// private String stockArticleId;
@ -106,7 +106,7 @@ public class DistributionDeliveryInfoVO extends DistributionDeliveryInfoEntity {
* 订单自编号;展示使用
*/
@ApiModelProperty(value = "订单自编号;订单自编号,关联订单表")
private String orderIds;
private String stockArticleId;
/**
* 收货人
*/
@ -183,11 +183,11 @@ public class DistributionDeliveryInfoVO extends DistributionDeliveryInfoEntity {
*/
@ApiModelProperty(value = "备注")
private String remarks;
/**
* 预约单编号系统构建生成
*/
@ApiModelProperty(value = "预约单编号")
private String reservationIds;
// /**
// * 预约单编号,系统构建生成
// */
// @ApiModelProperty(value = "预约单编号")
// private String reservationId;
/**
* 时段
*/

35
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionLoadscanVO.java

@ -0,0 +1,35 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 装车扫描表 视图实体类
*
* @author lmy
* @since 2023-06-27
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionLoadscanVO extends DistributionLoadscanEntity {
private static final long serialVersionUID = 1L;
}

35
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationStockarticleVO.java

@ -0,0 +1,35 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistributionReservationStockarticleEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 预约订单中间表 视图实体类
*
* @author TJJ
* @since 2023-06-28
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionReservationStockarticleVO extends DistributionReservationStockarticleEntity {
private static final long serialVersionUID = 1L;
}

35
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationStocklistVO.java

@ -0,0 +1,35 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistributionReservationStocklistEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 预约库存中间表 视图实体类
*
* @author TJJ
* @since 2023-06-28
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionReservationStocklistVO extends DistributionReservationStocklistEntity {
private static final long serialVersionUID = 1L;
}

35
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSelfDeliveryVO.java

@ -0,0 +1,35 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistributionSelfDeliveryEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 自主配送信息列表 视图实体类
*
* @author TJJ
* @since 2023-06-26
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionSelfDeliveryVO extends DistributionSelfDeliveryEntity {
private static final long serialVersionUID = 1L;
}

1
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java

@ -32,4 +32,5 @@ import lombok.EqualsAndHashCode;
public class DistributionStockArticleVO extends DistributionStockArticleEntity {
private static final long serialVersionUID = 1L;
}

35
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionTripartiteDeliveryVO.java

@ -0,0 +1,35 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistributionTripartiteDeliveryEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 外协配送信息列表 视图实体类
*
* @author TJJ
* @since 2023-06-26
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionTripartiteDeliveryVO extends DistributionTripartiteDeliveryEntity {
private static final long serialVersionUID = 1L;
}

3
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java

@ -78,5 +78,6 @@ public interface IAdvanceClient {
@GetMapping(API_PREFIX + "/queryDataOne")
AdvanceEntity getQueryDataOne(@RequestParam String orderSelfNum);
@GetMapping(API_PREFIX + "/fingById")
AdvanceEntity fingById(@RequestParam Integer advanceId);
}

1
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceDetailClient.java

@ -75,4 +75,5 @@ public interface IAdvanceDetailClient {
@GetMapping(API_PREFIX + "/getListByOrderSelfNum")
List<DistributionParcelListEntityVO> getListByOrderSelfNum(@RequestParam String orderSelfNum);
void getOneByUnitNo();
}

2
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineNodeService.java

@ -50,7 +50,7 @@ public interface IBasicDelineNodeService extends BaseService<BasicDelineNodeEnti
*/
List<BasicDelineNodeExcel> exportBasicDelineNode(Wrapper<BasicDelineNodeEntity> queryWrapper);
/**
* 获取字典
* 获取
*
* @return
*/

8
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java

@ -16,6 +16,7 @@
*/
package com.logpm.basicdata.feign;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.BladePage;
@ -50,4 +51,11 @@ public class BasicdataClientClient implements IBasicdataClientClient {
return BladePage.of(page);
}
@Override
public BasicdataClientEntity findByName(String customerName) {
QueryWrapper<BasicdataClientEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("client_name",customerName);
return basicdataClientService.getOne(queryWrapper);
}
}

9
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataStoreBusinessClient.java

@ -16,6 +16,7 @@
*/
package com.logpm.basicdata.feign;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.BladePage;
@ -50,4 +51,12 @@ public class BasicdataStoreBusinessClient implements IBasicdataStoreBusinessClie
return BladePage.of(page);
}
@Override
public BasicdataStoreBusinessEntity findByClientIdAndTypeService(Long clientEntityId, Integer typeService) {
QueryWrapper<BasicdataStoreBusinessEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("client_id",clientEntityId)
.eq("type_service",typeService);
return basicdataStoreBusinessService.getOne(queryWrapper);
}
}

8
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataWarehouseMapper.xml

@ -23,7 +23,7 @@
<result column="abbreviation" property="abbreviation"/>
<result column="linkman" property="linkman"/>
<result column="contact_number" property="contactNumber"/>
<!-- <result column="administrative_areas" property="administrativeAreas"/>-->
<result column="administrative_areas" property="administrativeAreas"/>
<result column="business_line" property="businessLine"/>
<!-- <result column="depot_base" property="depotBase"/>-->
<result column="remarks" property="remarks"/>
@ -48,9 +48,9 @@
<result column="province_code" property="provinceCode"/>
<result column="city_code" property="cityCode"/>
<result column="code" property="code"/>
<result column="manage_province_code" property="manageProvinceCode"/>
<result column="manage_city_code" property="manageCityCode"/>
<result column="manage_code" property="manageCode"/>
<!-- <result column="manage_province_code" property="manageProvinceCode"/>-->
<!-- <result column="manage_city_code" property="manageCityCode"/>-->
<!-- <result column="manage_code" property="manageCode"/>-->
<result column="payment_code_url" property="paymentCodeUrl"/>
</resultMap>
<update id="removeWarehouse">

2
blade-service/logpm-distribution/Dockerfile

@ -6,7 +6,7 @@ RUN mkdir -p /logpm/distribution
WORKDIR /logpm/distribution
EXPOSE 8500
EXPOSE 8600
ADD ./target/logpm-distribution.jar ./app.jar

5
blade-service/logpm-distribution/pom.xml

@ -27,6 +27,11 @@
<groupId>org.springblade</groupId>
<artifactId>blade-starter-excel</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-dict-api</artifactId>
<version>${bladex.project.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-distribution-api</artifactId>

19
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -20,6 +20,7 @@ import cn.hutool.core.util.BooleanUtil;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO;
import com.logpm.distribution.service.IDistributionDeliveryInfoService;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.vo.DistributionstatisticsnmbVO;
@ -30,6 +31,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -62,6 +64,7 @@ import javax.servlet.http.HttpServletResponse;
@AllArgsConstructor
@RequestMapping("/deliveryList")
@Api(value = "配送管理", tags = "配送管理接口")
@Slf4j
public class DistributionDeliveryListController extends BladeController {
private final IDistributionDeliveryListService distributionDeliveryListService;
@ -103,7 +106,7 @@ public class DistributionDeliveryListController extends BladeController {
/**
* 配送管理 配送车次统计
* 配送车次统计
*/
@GetMapping("/statistics")
@ApiOperationSupport(order = 2)
@ -113,6 +116,18 @@ public class DistributionDeliveryListController extends BladeController {
return R.data(distributionstatisticsnmbVO);
}
/**
* 配送管理 装车扫描
*/
@PostMapping("/loadingscan")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionDeliveryList")
public R<Integer> loadingscan(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
Integer i = distributionDeliveryListService.loadingscan(distrilbutionloadingscanDTO);
return R.data(i);
}
/**
* 配送管理 点击发车
*/
@ -130,7 +145,7 @@ public class DistributionDeliveryListController extends BladeController {
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入distributionDeliveryList")
public R<IPage<DistributionDeliveryListVO>> page(DistributionDeliveryListVO distributionDeliveryList, Query query) {
public R<IPage<DistributionDeliveryListVO>> page(DistributionDeliveryListDTO distributionDeliveryList, Query query) {
IPage<DistributionDeliveryListVO> pages = distributionDeliveryListService.selectDistributionDeliveryListPage(Condition.getPage(query), distributionDeliveryList);
return R.data(pages);
}

150
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionLoadscanController.java

@ -0,0 +1,150 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.vo.DistributionLoadscanVO;
import com.logpm.distribution.excel.DistributionLoadscanExcel;
import com.logpm.distribution.service.IDistributionLoadscanService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
/**
* 装车扫描表 控制器
*
* @author lmy
* @since 2023-06-27
*/
@RestController
@AllArgsConstructor
@RequestMapping("loadscan/distributionLoadscan")
@Api(value = "装车扫描表", tags = "装车扫描表接口")
public class DistributionLoadscanController extends BladeController {
private final IDistributionLoadscanService distributionLoadscanService;
/**
* 装车扫描表 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入distributionLoadscan")
public R<DistributionLoadscanEntity> detail(DistributionLoadscanEntity distributionLoadscan) {
DistributionLoadscanEntity detail = distributionLoadscanService.getOne(Condition.getQueryWrapper(distributionLoadscan));
return R.data(detail);
}
/**
* 装车扫描表 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionLoadscan")
public R<IPage<DistributionLoadscanEntity>> list(@ApiIgnore @RequestParam Map<String, Object> distributionLoadscan, Query query) {
IPage<DistributionLoadscanEntity> pages = distributionLoadscanService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionLoadscan, DistributionLoadscanEntity.class));
return R.data(pages);
}
/**
* 装车扫描表 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入distributionLoadscan")
public R<IPage<DistributionLoadscanVO>> page(DistributionLoadscanVO distributionLoadscan, Query query) {
IPage<DistributionLoadscanVO> pages = distributionLoadscanService.selectDistributionLoadscanPage(Condition.getPage(query), distributionLoadscan);
return R.data(pages);
}
/**
* 装车扫描表 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入distributionLoadscan")
public R save(@Valid @RequestBody DistributionLoadscanEntity distributionLoadscan) {
return R.status(distributionLoadscanService.save(distributionLoadscan));
}
/**
* 装车扫描表 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入distributionLoadscan")
public R update(@Valid @RequestBody DistributionLoadscanEntity distributionLoadscan) {
return R.status(distributionLoadscanService.updateById(distributionLoadscan));
}
/**
* 装车扫描表 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入distributionLoadscan")
public R submit(@Valid @RequestBody DistributionLoadscanEntity distributionLoadscan) {
return R.status(distributionLoadscanService.saveOrUpdate(distributionLoadscan));
}
/**
* 装车扫描表 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(distributionLoadscanService.deleteLogic(Func.toLongList(ids)));
}
/**
* 导出数据
*/
@GetMapping("/export-distributionLoadscan")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入distributionLoadscan")
public void exportDistributionLoadscan(@ApiIgnore @RequestParam Map<String, Object> distributionLoadscan, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<DistributionLoadscanEntity> queryWrapper = Condition.getQueryWrapper(distributionLoadscan, DistributionLoadscanEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(DistributionLoadscan::getTenantId, bladeUser.getTenantId());
//}
queryWrapper.lambda().eq(DistributionLoadscanEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<DistributionLoadscanExcel> list = distributionLoadscanService.exportDistributionLoadscan(queryWrapper);
ExcelUtil.export(response, "装车扫描表数据" + DateUtil.time(), "装车扫描表数据表", list, DistributionLoadscanExcel.class);
}
}

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java

@ -183,4 +183,15 @@ public class DistributionReservationController extends BladeController {
List<DistributionReservationEntity> result = reservationService.getReservationAddr(ids);
return R.data(result);
}
/**
* 批量预约转配送任务
*/
@PostMapping("/deliveryTask")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "批量预约转备货任务")
public R deliveryTask(@RequestBody Map<String,Object> deliveryInfo) {
R<?> result = reservationService.deliveryTask(deliveryInfo);
return result;
}
}

150
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationStockarticleController.java

@ -0,0 +1,150 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionReservationStockarticleEntity;
import com.logpm.distribution.vo.DistributionReservationStockarticleVO;
import com.logpm.distribution.excel.DistributionReservationStockarticleExcel;
import com.logpm.distribution.service.IDistributionReservationStockarticleService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
/**
* 预约订单中间表 控制器
*
* @author TJJ
* @since 2023-06-28
*/
@RestController
@AllArgsConstructor
@RequestMapping("reservationStockarticle/distributionReservationStockarticle")
@Api(value = "预约订单中间表", tags = "预约订单中间表接口")
public class DistributionReservationStockarticleController extends BladeController {
private final IDistributionReservationStockarticleService distributionReservationStockarticleService;
/**
* 预约订单中间表 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入distributionReservationStockarticle")
public R<DistributionReservationStockarticleEntity> detail(DistributionReservationStockarticleEntity distributionReservationStockarticle) {
DistributionReservationStockarticleEntity detail = distributionReservationStockarticleService.getOne(Condition.getQueryWrapper(distributionReservationStockarticle));
return R.data(detail);
}
/**
* 预约订单中间表 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionReservationStockarticle")
public R<IPage<DistributionReservationStockarticleEntity>> list(@ApiIgnore @RequestParam Map<String, Object> distributionReservationStockarticle, Query query) {
IPage<DistributionReservationStockarticleEntity> pages = distributionReservationStockarticleService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionReservationStockarticle, DistributionReservationStockarticleEntity.class));
return R.data(pages);
}
/**
* 预约订单中间表 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入distributionReservationStockarticle")
public R<IPage<DistributionReservationStockarticleVO>> page(DistributionReservationStockarticleVO distributionReservationStockarticle, Query query) {
IPage<DistributionReservationStockarticleVO> pages = distributionReservationStockarticleService.selectDistributionReservationStockarticlePage(Condition.getPage(query), distributionReservationStockarticle);
return R.data(pages);
}
/**
* 预约订单中间表 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入distributionReservationStockarticle")
public R save(@Valid @RequestBody DistributionReservationStockarticleEntity distributionReservationStockarticle) {
return R.status(distributionReservationStockarticleService.save(distributionReservationStockarticle));
}
/**
* 预约订单中间表 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入distributionReservationStockarticle")
public R update(@Valid @RequestBody DistributionReservationStockarticleEntity distributionReservationStockarticle) {
return R.status(distributionReservationStockarticleService.updateById(distributionReservationStockarticle));
}
/**
* 预约订单中间表 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入distributionReservationStockarticle")
public R submit(@Valid @RequestBody DistributionReservationStockarticleEntity distributionReservationStockarticle) {
return R.status(distributionReservationStockarticleService.saveOrUpdate(distributionReservationStockarticle));
}
/**
* 预约订单中间表 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(distributionReservationStockarticleService.deleteLogic(Func.toLongList(ids)));
}
/**
* 导出数据
*/
@GetMapping("/export-distributionReservationStockarticle")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入distributionReservationStockarticle")
public void exportDistributionReservationStockarticle(@ApiIgnore @RequestParam Map<String, Object> distributionReservationStockarticle, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<DistributionReservationStockarticleEntity> queryWrapper = Condition.getQueryWrapper(distributionReservationStockarticle, DistributionReservationStockarticleEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(DistributionReservationStockarticle::getTenantId, bladeUser.getTenantId());
//}
queryWrapper.lambda().eq(DistributionReservationStockarticleEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<DistributionReservationStockarticleExcel> list = distributionReservationStockarticleService.exportDistributionReservationStockarticle(queryWrapper);
ExcelUtil.export(response, "预约订单中间表数据" + DateUtil.time(), "预约订单中间表数据表", list, DistributionReservationStockarticleExcel.class);
}
}

150
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationStocklistController.java

@ -0,0 +1,150 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionReservationStocklistEntity;
import com.logpm.distribution.vo.DistributionReservationStocklistVO;
import com.logpm.distribution.excel.DistributionReservationStocklistExcel;
import com.logpm.distribution.service.IDistributionReservationStocklistService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
/**
* 预约库存中间表 控制器
*
* @author TJJ
* @since 2023-06-28
*/
@RestController
@AllArgsConstructor
@RequestMapping("reservationStocklist/distributionReservationStocklist")
@Api(value = "预约库存中间表", tags = "预约库存中间表接口")
public class DistributionReservationStocklistController extends BladeController {
private final IDistributionReservationStocklistService distributionReservationStocklistService;
/**
* 预约库存中间表 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入distributionReservationStocklist")
public R<DistributionReservationStocklistEntity> detail(DistributionReservationStocklistEntity distributionReservationStocklist) {
DistributionReservationStocklistEntity detail = distributionReservationStocklistService.getOne(Condition.getQueryWrapper(distributionReservationStocklist));
return R.data(detail);
}
/**
* 预约库存中间表 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionReservationStocklist")
public R<IPage<DistributionReservationStocklistEntity>> list(@ApiIgnore @RequestParam Map<String, Object> distributionReservationStocklist, Query query) {
IPage<DistributionReservationStocklistEntity> pages = distributionReservationStocklistService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionReservationStocklist, DistributionReservationStocklistEntity.class));
return R.data(pages);
}
/**
* 预约库存中间表 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入distributionReservationStocklist")
public R<IPage<DistributionReservationStocklistVO>> page(DistributionReservationStocklistVO distributionReservationStocklist, Query query) {
IPage<DistributionReservationStocklistVO> pages = distributionReservationStocklistService.selectDistributionReservationStocklistPage(Condition.getPage(query), distributionReservationStocklist);
return R.data(pages);
}
/**
* 预约库存中间表 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入distributionReservationStocklist")
public R save(@Valid @RequestBody DistributionReservationStocklistEntity distributionReservationStocklist) {
return R.status(distributionReservationStocklistService.save(distributionReservationStocklist));
}
/**
* 预约库存中间表 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入distributionReservationStocklist")
public R update(@Valid @RequestBody DistributionReservationStocklistEntity distributionReservationStocklist) {
return R.status(distributionReservationStocklistService.updateById(distributionReservationStocklist));
}
/**
* 预约库存中间表 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入distributionReservationStocklist")
public R submit(@Valid @RequestBody DistributionReservationStocklistEntity distributionReservationStocklist) {
return R.status(distributionReservationStocklistService.saveOrUpdate(distributionReservationStocklist));
}
/**
* 预约库存中间表 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(distributionReservationStocklistService.deleteLogic(Func.toLongList(ids)));
}
/**
* 导出数据
*/
@GetMapping("/export-distributionReservationStocklist")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入distributionReservationStocklist")
public void exportDistributionReservationStocklist(@ApiIgnore @RequestParam Map<String, Object> distributionReservationStocklist, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<DistributionReservationStocklistEntity> queryWrapper = Condition.getQueryWrapper(distributionReservationStocklist, DistributionReservationStocklistEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(DistributionReservationStocklist::getTenantId, bladeUser.getTenantId());
//}
queryWrapper.lambda().eq(DistributionReservationStocklistEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<DistributionReservationStocklistExcel> list = distributionReservationStocklistService.exportDistributionReservationStocklist(queryWrapper);
ExcelUtil.export(response, "预约库存中间表数据" + DateUtil.time(), "预约库存中间表数据表", list, DistributionReservationStocklistExcel.class);
}
}

150
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSelfDeliveryController.java

@ -0,0 +1,150 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionSelfDeliveryEntity;
import com.logpm.distribution.vo.DistributionSelfDeliveryVO;
import com.logpm.distribution.excel.DistributionSelfDeliveryExcel;
import com.logpm.distribution.service.IDistributionSelfDeliveryService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
/**
* 自主配送信息列表 控制器
*
* @author TJJ
* @since 2023-06-26
*/
@RestController
@AllArgsConstructor
@RequestMapping("selfDelivery/distributionSelfDelivery")
@Api(value = "自主配送信息列表", tags = "自主配送信息列表接口")
public class DistributionSelfDeliveryController extends BladeController {
private final IDistributionSelfDeliveryService distributionSelfDeliveryService;
/**
* 自主配送信息列表 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入distributionSelfDelivery")
public R<DistributionSelfDeliveryEntity> detail(DistributionSelfDeliveryEntity distributionSelfDelivery) {
DistributionSelfDeliveryEntity detail = distributionSelfDeliveryService.getOne(Condition.getQueryWrapper(distributionSelfDelivery));
return R.data(detail);
}
/**
* 自主配送信息列表 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionSelfDelivery")
public R<IPage<DistributionSelfDeliveryEntity>> list(@ApiIgnore @RequestParam Map<String, Object> distributionSelfDelivery, Query query) {
IPage<DistributionSelfDeliveryEntity> pages = distributionSelfDeliveryService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionSelfDelivery, DistributionSelfDeliveryEntity.class));
return R.data(pages);
}
/**
* 自主配送信息列表 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入distributionSelfDelivery")
public R<IPage<DistributionSelfDeliveryVO>> page(DistributionSelfDeliveryVO distributionSelfDelivery, Query query) {
IPage<DistributionSelfDeliveryVO> pages = distributionSelfDeliveryService.selectDistributionSelfDeliveryPage(Condition.getPage(query), distributionSelfDelivery);
return R.data(pages);
}
/**
* 自主配送信息列表 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入distributionSelfDelivery")
public R save(@Valid @RequestBody DistributionSelfDeliveryEntity distributionSelfDelivery) {
return R.status(distributionSelfDeliveryService.save(distributionSelfDelivery));
}
/**
* 自主配送信息列表 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入distributionSelfDelivery")
public R update(@Valid @RequestBody DistributionSelfDeliveryEntity distributionSelfDelivery) {
return R.status(distributionSelfDeliveryService.updateById(distributionSelfDelivery));
}
/**
* 自主配送信息列表 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入distributionSelfDelivery")
public R submit(@Valid @RequestBody DistributionSelfDeliveryEntity distributionSelfDelivery) {
return R.status(distributionSelfDeliveryService.saveOrUpdate(distributionSelfDelivery));
}
/**
* 自主配送信息列表 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(distributionSelfDeliveryService.deleteLogic(Func.toLongList(ids)));
}
/**
* 导出数据
*/
@GetMapping("/export-distributionSelfDelivery")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入distributionSelfDelivery")
public void exportDistributionSelfDelivery(@ApiIgnore @RequestParam Map<String, Object> distributionSelfDelivery, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<DistributionSelfDeliveryEntity> queryWrapper = Condition.getQueryWrapper(distributionSelfDelivery, DistributionSelfDeliveryEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(DistributionSelfDelivery::getTenantId, bladeUser.getTenantId());
//}
queryWrapper.lambda().eq(DistributionSelfDeliveryEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<DistributionSelfDeliveryExcel> list = distributionSelfDeliveryService.exportDistributionSelfDelivery(queryWrapper);
ExcelUtil.export(response, "自主配送信息列表数据" + DateUtil.time(), "自主配送信息列表数据表", list, DistributionSelfDeliveryExcel.class);
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionServiceLogController.java

@ -117,7 +117,7 @@ public class DistributionServiceLogController extends BladeController {
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入distributionServiceLog")
public R submit(@Valid @RequestBody DistributionServiceLogEntity distributionServiceLog) {
return R.status(distributionServiceLogService.saveOrUpdate(distributionServiceLog));
return R.status(distributionServiceLogService.OwnSaveOrUpdate(distributionServiceLog));
}
/**

53
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java

@ -29,6 +29,10 @@ import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.entity.Dict;
import org.springblade.system.entity.DictBiz;
import org.springblade.system.feign.IDictBizClient;
import org.springblade.system.feign.IDictClient;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -59,6 +63,8 @@ public class DistributionStockArticleController extends BladeController {
private final IDistributionStockArticleService distributionStockArticleService;
private final IDictBizClient dictBizClient;
/**
* 配送在库订单 详情
*/
@ -77,6 +83,31 @@ public class DistributionStockArticleController extends BladeController {
@ApiOperation(value = "分页", notes = "传入distributionStockArticle")
public R<IPage<DistributionStockArticleEntity>> list(@ApiIgnore @RequestParam Map<String, Object> distributionStockArticle, Query query) {
IPage<DistributionStockArticleEntity> pages = distributionStockArticleService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionStockArticle, DistributionStockArticleEntity.class));
pages.getRecords().forEach( i ->{
R<List<DictBiz>> distribution_type = dictBizClient.getList("distribution_type");
DictBiz dictBiz = distribution_type.getData().get(i.getTypeService()-1);
i.setTypeName(dictBiz.getDictValue());
switch (i.getState()){
case 1:
i.setStateName("待预约");
break;
case 2:
i.setStateName("已预约");
break;
case 3:
i.setStateName("待配送");
break;
case 4:
i.setStateName("配送中");
break;
case 5:
i.setStateName("已配送");
break;
case 6:
i.setStateName("已完成");
break;
}
});
return R.data(pages);
}
@ -88,6 +119,16 @@ public class DistributionStockArticleController extends BladeController {
@ApiOperation(value = "分页", notes = "传入distributionStockArticle")
public R<IPage<DistributionStockArticleVO>> page(DistributionStockArticleVO distributionStockArticle, Query query) {
IPage<DistributionStockArticleVO> pages = distributionStockArticleService.selectDistributionStockArticlePage(Condition.getPage(query), distributionStockArticle);
pages.getRecords().forEach( i ->{
switch (i.getState()){
case 1:
i.setStateName("待预约");
break;
case 2:
i.setStateName("已预约");
break;
}
});
return R.data(pages);
}
@ -179,4 +220,16 @@ public class DistributionStockArticleController extends BladeController {
return result;
}
/**
* 获取批量在库订单信息
*/
@GetMapping("/stockArticleInfo")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R getStockArticleInfo(@ApiParam(value = "主键集合", required = true) String ids) {
R<List<DistributionStockArticleVO>> result = distributionStockArticleService.getStockArticleInfo(ids);
return result;
}
}

150
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionTripartiteDeliveryController.java

@ -0,0 +1,150 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionTripartiteDeliveryEntity;
import com.logpm.distribution.vo.DistributionTripartiteDeliveryVO;
import com.logpm.distribution.excel.DistributionTripartiteDeliveryExcel;
import com.logpm.distribution.service.IDistributionTripartiteDeliveryService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
/**
* 外协配送信息列表 控制器
*
* @author TJJ
* @since 2023-06-26
*/
@RestController
@AllArgsConstructor
@RequestMapping("tripartiteDelivery/distributionTripartiteDelivery")
@Api(value = "外协配送信息列表", tags = "外协配送信息列表接口")
public class DistributionTripartiteDeliveryController extends BladeController {
private final IDistributionTripartiteDeliveryService distributionTripartiteDeliveryService;
/**
* 外协配送信息列表 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入distributionTripartiteDelivery")
public R<DistributionTripartiteDeliveryEntity> detail(DistributionTripartiteDeliveryEntity distributionTripartiteDelivery) {
DistributionTripartiteDeliveryEntity detail = distributionTripartiteDeliveryService.getOne(Condition.getQueryWrapper(distributionTripartiteDelivery));
return R.data(detail);
}
/**
* 外协配送信息列表 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionTripartiteDelivery")
public R<IPage<DistributionTripartiteDeliveryEntity>> list(@ApiIgnore @RequestParam Map<String, Object> distributionTripartiteDelivery, Query query) {
IPage<DistributionTripartiteDeliveryEntity> pages = distributionTripartiteDeliveryService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionTripartiteDelivery, DistributionTripartiteDeliveryEntity.class));
return R.data(pages);
}
/**
* 外协配送信息列表 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入distributionTripartiteDelivery")
public R<IPage<DistributionTripartiteDeliveryVO>> page(DistributionTripartiteDeliveryVO distributionTripartiteDelivery, Query query) {
IPage<DistributionTripartiteDeliveryVO> pages = distributionTripartiteDeliveryService.selectDistributionTripartiteDeliveryPage(Condition.getPage(query), distributionTripartiteDelivery);
return R.data(pages);
}
/**
* 外协配送信息列表 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入distributionTripartiteDelivery")
public R save(@Valid @RequestBody DistributionTripartiteDeliveryEntity distributionTripartiteDelivery) {
return R.status(distributionTripartiteDeliveryService.save(distributionTripartiteDelivery));
}
/**
* 外协配送信息列表 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入distributionTripartiteDelivery")
public R update(@Valid @RequestBody DistributionTripartiteDeliveryEntity distributionTripartiteDelivery) {
return R.status(distributionTripartiteDeliveryService.updateById(distributionTripartiteDelivery));
}
/**
* 外协配送信息列表 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入distributionTripartiteDelivery")
public R submit(@Valid @RequestBody DistributionTripartiteDeliveryEntity distributionTripartiteDelivery) {
return R.status(distributionTripartiteDeliveryService.saveOrUpdate(distributionTripartiteDelivery));
}
/**
* 外协配送信息列表 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(distributionTripartiteDeliveryService.deleteLogic(Func.toLongList(ids)));
}
/**
* 导出数据
*/
@GetMapping("/export-distributionTripartiteDelivery")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入distributionTripartiteDelivery")
public void exportDistributionTripartiteDelivery(@ApiIgnore @RequestParam Map<String, Object> distributionTripartiteDelivery, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<DistributionTripartiteDeliveryEntity> queryWrapper = Condition.getQueryWrapper(distributionTripartiteDelivery, DistributionTripartiteDeliveryEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(DistributionTripartiteDelivery::getTenantId, bladeUser.getTenantId());
//}
queryWrapper.lambda().eq(DistributionTripartiteDeliveryEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<DistributionTripartiteDeliveryExcel> list = distributionTripartiteDeliveryService.exportDistributionTripartiteDelivery(queryWrapper);
ExcelUtil.export(response, "外协配送信息列表数据" + DateUtil.time(), "外协配送信息列表数据表", list, DistributionTripartiteDeliveryExcel.class);
}
}

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryListDTO.java

@ -20,6 +20,7 @@ import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
/**
* 配送管理 数据传输对象实体类

34
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionLoadscanDTO.java

@ -0,0 +1,34 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.dto;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 装车扫描表 数据传输对象实体类
*
* @author lmy
* @since 2023-06-27
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionLoadscanDTO extends DistributionLoadscanEntity {
private static final long serialVersionUID = 1L;
}

42
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationDTO.java

@ -17,6 +17,8 @@
package com.logpm.distribution.dto;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -36,29 +38,33 @@ import java.util.Map;
public class DistributionReservationDTO extends DistributionReservationEntity {
private static final long serialVersionUID = 1L;
// /**
// * 备货区编号
// */
// @ApiModelProperty(value = "备货区编号")
// private String goddsAreaId;
//
// /**
// * 备货时间
// */
// @ApiModelProperty(value = "备货时间")
// private Date stockupDate;
//
// /**
// * 增值服务
// */
// @ApiModelProperty(value = "增值服务")
// private List<?> addvalueInfo;
/**
* 订单配送单编号多条订单信息
*/
@ApiModelProperty(value = "订单配送单编号")
private String ids;
private String stockArticleIds;
/**
* 库存品编号
*/
@ApiModelProperty(value = "库存品编号")
private String inventoryIds;
/**
* 库存品信息列表
*/
@ApiModelProperty(value = "库存品信息列表")
private List<DistributionStockListEntity> inventoryList;
/**
* 订单信息列表
*/
@ApiModelProperty(value = "订单信息列表")
private List<DistributionStockArticleEntity> stockArticleList;

34
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationStockarticleDTO.java

@ -0,0 +1,34 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.dto;
import com.logpm.distribution.entity.DistributionReservationStockarticleEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 预约订单中间表 数据传输对象实体类
*
* @author TJJ
* @since 2023-06-28
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionReservationStockarticleDTO extends DistributionReservationStockarticleEntity {
private static final long serialVersionUID = 1L;
}

34
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationStocklistDTO.java

@ -0,0 +1,34 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.dto;
import com.logpm.distribution.entity.DistributionReservationStocklistEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 预约库存中间表 数据传输对象实体类
*
* @author TJJ
* @since 2023-06-28
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionReservationStocklistDTO extends DistributionReservationStocklistEntity {
private static final long serialVersionUID = 1L;
}

34
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSelfDeliveryDTO.java

@ -0,0 +1,34 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.dto;
import com.logpm.distribution.entity.DistributionSelfDeliveryEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 自主配送信息列表 数据传输对象实体类
*
* @author TJJ
* @since 2023-06-26
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionSelfDeliveryDTO extends DistributionSelfDeliveryEntity {
private static final long serialVersionUID = 1L;
}

34
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionTripartiteDeliveryDTO.java

@ -0,0 +1,34 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.dto;
import com.logpm.distribution.entity.DistributionTripartiteDeliveryEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 外协配送信息列表 数据传输对象实体类
*
* @author TJJ
* @since 2023-06-26
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionTripartiteDeliveryDTO extends DistributionTripartiteDeliveryEntity {
private static final long serialVersionUID = 1L;
}

26
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionloadingscanDTO.java

@ -0,0 +1,26 @@
package com.logpm.distribution.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NonNull;
import javax.validation.constraints.NotEmpty;
@Data
public class DistrilbutionloadingscanDTO {
/**
* 扫描包条信息
*/
@ApiModelProperty(value = "扫描包条信息")
@NotEmpty(message = "扫描单号不能为空")
private String barcode;
/**
* 扫描类型
*/
@ApiModelProperty(value = "扫描类型(1-包条,2-托盘)")
@NotEmpty(message = "扫描类型不能为空")
private Integer type;
}

316
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionLoadscanExcel.java

@ -0,0 +1,316 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.excel;
import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import java.io.Serializable;
/**
* 装车扫描表 Excel实体类
*
* @author lmy
* @since 2023-06-27
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class DistributionLoadscanExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 租户号
*/
@ColumnWidth(20)
@ExcelProperty("租户号")
private String tenantId;
/**
* 是否已删除
*/
@ColumnWidth(20)
@ExcelProperty("是否已删除")
private Integer isDeleted;
/**
* 预留1
*/
@ColumnWidth(20)
@ExcelProperty("预留1")
private String reserve1;
/**
* 预留2
*/
@ColumnWidth(20)
@ExcelProperty("预留2")
private String reserve2;
/**
* 预留3
*/
@ColumnWidth(20)
@ExcelProperty("预留3")
private String reserve3;
/**
* 预留4
*/
@ColumnWidth(20)
@ExcelProperty("预留4")
private String reserve4;
/**
* 预留5
*/
@ColumnWidth(20)
@ExcelProperty("预留5")
private String reserve5;
/**
* 扫码类型;1-件装车,2-托盘装车
*/
@ColumnWidth(20)
@ExcelProperty("扫码类型;(1-件装车,2-托盘装车)")
private String scanType;
/**
* 托盘id
*/
@ColumnWidth(20)
@ExcelProperty("托盘id")
private String trayId;
/**
* 品牌id
*/
@ColumnWidth(20)
@ExcelProperty("品牌id")
private String brandId;
/**
* 品牌名字
*/
@ColumnWidth(20)
@ExcelProperty("品牌名字")
private String brandName;
/**
* 托盘码
*/
@ColumnWidth(20)
@ExcelProperty("托盘码")
private String trayNo;
/**
* 车次号
*/
@ColumnWidth(20)
@ExcelProperty("车次号")
private String trainNumber;
/**
* 配送车辆id
*/
@ColumnWidth(20)
@ExcelProperty("配送车辆id")
private String vehicleId;
/**
* 配送司机id
*/
@ColumnWidth(20)
@ExcelProperty("配送司机id")
private String driverId;
/**
* 配送车辆车牌
*/
@ColumnWidth(20)
@ExcelProperty("配送车辆车牌")
private String vehicleName;
/**
* 配送司机名称
*/
@ColumnWidth(20)
@ExcelProperty("配送司机名称")
private String driverName;
/**
* 扫描仓库id
*/
@ColumnWidth(20)
@ExcelProperty("扫描仓库id")
private Long warehouseId;
/**
* 仓库名称
*/
@ColumnWidth(20)
@ExcelProperty("仓库名称")
private String warehouseName;
/**
* 包条表id
*/
@ColumnWidth(20)
@ExcelProperty("包条表id")
private Long packageId;
/**
* 包条码
*/
@ColumnWidth(20)
@ExcelProperty("包条码")
private String packetBarCode;
/**
* 扫描状态;1=未装车2=扫描,3=确认
*/
@ColumnWidth(20)
@ExcelProperty("扫描状态;(1=未装车,2=扫描,3=确认)")
private Integer scanStatus;
/**
* 确认时间
*/
@ColumnWidth(20)
@ExcelProperty("确认时间")
private Date confirmTime;
/**
* 扫描时间
*/
@ColumnWidth(20)
@ExcelProperty("扫描时间")
private Date scanTime;
/**
* 是否齐套;1未齐套2齐套
*/
@ColumnWidth(20)
@ExcelProperty("是否齐套;(1未齐套,2齐套)")
private Integer kitting;
/**
* 类型;1卸车2装车
*/
@ColumnWidth(20)
@ExcelProperty("类型;(1卸车,2装车)")
private Integer type;
/**
* 滞留操作人
*/
@ColumnWidth(20)
@ExcelProperty("滞留操作人")
private String detentionPerson;
/**
* 卸货仓库id
*/
@ColumnWidth(20)
@ExcelProperty("卸货仓库id")
private Long unWarehouseId;
/**
* 卸货仓库名称
*/
@ColumnWidth(20)
@ExcelProperty("卸货仓库名称")
private String unWarehouseName;
/**
* 卸货人id
*/
@ColumnWidth(20)
@ExcelProperty("卸货人id")
private Long unAdministratorsId;
/**
* 卸货人名称
*/
@ColumnWidth(20)
@ExcelProperty("卸货人名称")
private String unAdministratorsName;
/**
* 补录;1=正常,2=补录数据
*/
@ColumnWidth(20)
@ExcelProperty("补录;(1=正常,2=补录数据)")
private Integer isInsert;
/**
* 扫码状态;1=无数据装车2=有数据装车
*/
@ColumnWidth(20)
@ExcelProperty("扫码状态;(1=无数据装车;2=有数据装车)")
private Integer scanState;
/**
* 同步;1=正常数据2=无编码未同步3=无编码已同步待绑定
*/
@ColumnWidth(20)
@ExcelProperty("同步;(1=正常数据,2=无编码未同步,3=无编码已同步待绑定)")
private Integer scanSynchronous;
/**
* 计划目的网点
*/
@ColumnWidth(20)
@ExcelProperty("计划目的网点")
private String planDestinationId;
/**
* 备注信息
*/
@ColumnWidth(20)
@ExcelProperty("备注信息")
private String msg;
/**
* 卸车时间
*/
@ColumnWidth(20)
@ExcelProperty("卸车时间")
private Date unloadTime;
/**
* 订单表id
*/
@ColumnWidth(20)
@ExcelProperty("订单表id")
private Long orderId;
/**
* 客户表id
*/
@ColumnWidth(20)
@ExcelProperty("客户表id")
private Long reservationId;
/**
* 配送表id
*/
@ColumnWidth(20)
@ExcelProperty("配送表id")
private Long deliveryId;
/**
* 装车数量
*/
@ColumnWidth(20)
@ExcelProperty("装车数量")
private Integer loadedNub;
/**
* 包内数量
*/
@ColumnWidth(20)
@ExcelProperty("包内数量")
private Integer packageNub;
}

105
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationStockarticleExcel.java

@ -0,0 +1,105 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.excel;
import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import java.io.Serializable;
/**
* 预约订单中间表 Excel实体类
*
* @author TJJ
* @since 2023-06-28
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class DistributionReservationStockarticleExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 租户号
*/
@ColumnWidth(20)
@ExcelProperty("租户号")
private String tenantId;
/**
* 是否已删除
*/
@ColumnWidth(20)
@ExcelProperty("是否已删除")
private Integer isDeleted;
/**
* 预约编号
*/
@ColumnWidth(20)
@ExcelProperty("预约编号")
private String reservationId;
/**
* 订单编号
*/
@ColumnWidth(20)
@ExcelProperty("订单编号")
private String stockarticleId;
/**
* 预约数量
*/
@ColumnWidth(20)
@ExcelProperty("预约数量")
private String reservationNum;
/**
* 预留1
*/
@ColumnWidth(20)
@ExcelProperty("预留1")
private String reserve1;
/**
* 预留2
*/
@ColumnWidth(20)
@ExcelProperty("预留2")
private String reserve2;
/**
* 预留3
*/
@ColumnWidth(20)
@ExcelProperty("预留3")
private String reserve3;
/**
* 预留4
*/
@ColumnWidth(20)
@ExcelProperty("预留4")
private String reserve4;
/**
* 预留5
*/
@ColumnWidth(20)
@ExcelProperty("预留5")
private String reserve5;
}

105
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationStocklistExcel.java

@ -0,0 +1,105 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.excel;
import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import java.io.Serializable;
/**
* 预约库存中间表 Excel实体类
*
* @author TJJ
* @since 2023-06-28
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class DistributionReservationStocklistExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 租户号
*/
@ColumnWidth(20)
@ExcelProperty("租户号")
private String tenantId;
/**
* 是否已删除
*/
@ColumnWidth(20)
@ExcelProperty("是否已删除")
private Integer isDeleted;
/**
* 预约编号
*/
@ColumnWidth(20)
@ExcelProperty("预约编号")
private String reservationId;
/**
* 库存编号
*/
@ColumnWidth(20)
@ExcelProperty("库存编号")
private String stocklistId;
/**
* 预约数量
*/
@ColumnWidth(20)
@ExcelProperty("预约数量")
private String reservationNum;
/**
* 预留1
*/
@ColumnWidth(20)
@ExcelProperty("预留1")
private String reserve1;
/**
* 预留2
*/
@ColumnWidth(20)
@ExcelProperty("预留2")
private String reserve2;
/**
* 预留3
*/
@ColumnWidth(20)
@ExcelProperty("预留3")
private String reserve3;
/**
* 预留4
*/
@ColumnWidth(20)
@ExcelProperty("预留4")
private String reserve4;
/**
* 预留5
*/
@ColumnWidth(20)
@ExcelProperty("预留5")
private String reserve5;
}

111
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSelfDeliveryExcel.java

@ -0,0 +1,111 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.excel;
import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import java.io.Serializable;
/**
* 自主配送信息列表 Excel实体类
*
* @author TJJ
* @since 2023-06-26
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class DistributionSelfDeliveryExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 租户号
*/
@ColumnWidth(20)
@ExcelProperty("租户号")
private String tenantId;
/**
* 是否已删除
*/
@ColumnWidth(20)
@ExcelProperty("是否已删除")
private Integer isDeleted;
/**
* 预约信息编号
*/
@ColumnWidth(20)
@ExcelProperty("预约信息编号")
private String reservationIds;
/**
* 车辆编号
*/
@ColumnWidth(20)
@ExcelProperty("车辆编号")
private String vehicleIds;
/**
* 司机负责人
*/
@ColumnWidth(20)
@ExcelProperty("司机负责人")
private String masterDriverId;
/**
* 配送司机
*/
@ColumnWidth(20)
@ExcelProperty("配送司机")
private String slaveDriverIds;
/**
* 预留1
*/
@ColumnWidth(20)
@ExcelProperty("预留1")
private String reserve1;
/**
* 预留2
*/
@ColumnWidth(20)
@ExcelProperty("预留2")
private String reserve2;
/**
* 预留3
*/
@ColumnWidth(20)
@ExcelProperty("预留3")
private String reserve3;
/**
* 预留4
*/
@ColumnWidth(20)
@ExcelProperty("预留4")
private String reserve4;
/**
* 预留5
*/
@ColumnWidth(20)
@ExcelProperty("预留5")
private String reserve5;
}

112
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionTripartiteDeliveryExcel.java

@ -0,0 +1,112 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.excel;
import lombok.Data;
import java.util.Date;
import java.math.BigDecimal;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import java.io.Serializable;
/**
* 外协配送信息列表 Excel实体类
*
* @author TJJ
* @since 2023-06-26
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class DistributionTripartiteDeliveryExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 租户号
*/
@ColumnWidth(20)
@ExcelProperty("租户号")
private String tenantId;
/**
* 是否已删除
*/
@ColumnWidth(20)
@ExcelProperty("是否已删除")
private Integer isDeleted;
/**
* 司机名称
*/
@ColumnWidth(20)
@ExcelProperty("司机名称")
private String driverName;
/**
* 司机电话
*/
@ColumnWidth(20)
@ExcelProperty("司机电话")
private String driverPhone;
/**
* 车辆车牌
*/
@ColumnWidth(20)
@ExcelProperty("车辆车牌")
private String vehicleNum;
/**
* 配送费用
*/
@ColumnWidth(20)
@ExcelProperty("配送费用")
private BigDecimal deliveryFee;
/**
* 预留1
*/
@ColumnWidth(20)
@ExcelProperty("预留1")
private String reserve1;
/**
* 预留2
*/
@ColumnWidth(20)
@ExcelProperty("预留2")
private String reserve2;
/**
* 预留3
*/
@ColumnWidth(20)
@ExcelProperty("预留3")
private String reserve3;
/**
* 预留4
*/
@ColumnWidth(20)
@ExcelProperty("预留4")
private String reserve4;
/**
* 预留5
*/
@ColumnWidth(20)
@ExcelProperty("预留5")
private String reserve5;
}

53
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionLoadscanClient.java

@ -0,0 +1,53 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.feign;
import com.baomidou.mybatisplus.core.metadata.IPage;
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 com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.service.IDistributionLoadscanService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
/**
* 装车扫描表 Feign实现类
*
* @author lmy
* @since 2023-06-27
*/
@ApiIgnore()
@RestController
@AllArgsConstructor
public class DistributionLoadscanClient implements IDistributionLoadscanClient {
private final IDistributionLoadscanService distributionLoadscanService;
@Override
@GetMapping(TOP)
public BladePage<DistributionLoadscanEntity> top(Integer current, Integer size) {
Query query = new Query();
query.setCurrent(current);
query.setSize(size);
IPage<DistributionLoadscanEntity> page = distributionLoadscanService.page(Condition.getPage(query));
return BladePage.of(page);
}
}

52
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionReservationStockarticleClient.java

@ -0,0 +1,52 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.feign;
import com.baomidou.mybatisplus.core.metadata.IPage;
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 com.logpm.distribution.entity.DistributionReservationStockarticleEntity;
import com.logpm.distribution.service.IDistributionReservationStockarticleService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
/**
* 预约订单中间表 Feign实现类
*
* @author TJJ
* @since 2023-06-28
*/
@ApiIgnore()
@RestController
@AllArgsConstructor
public class DistributionReservationStockarticleClient implements IDistributionReservationStockarticleClient {
private final IDistributionReservationStockarticleService distributionReservationStockarticleService;
@Override
@GetMapping(TOP)
public BladePage<DistributionReservationStockarticleEntity> reservationStockArticleTop(Integer current, Integer size) {
Query query = new Query();
query.setCurrent(current);
query.setSize(size);
IPage<DistributionReservationStockarticleEntity> page = distributionReservationStockarticleService.page(Condition.getPage(query));
return BladePage.of(page);
}
}

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionReservationStocklistClient.java

@ -0,0 +1,54 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.feign;
import com.baomidou.mybatisplus.core.metadata.IPage;
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 com.logpm.distribution.entity.DistributionReservationStocklistEntity;
import com.logpm.distribution.service.IDistributionReservationStocklistService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
/**
* 预约库存中间表 Feign实现类
*
* @author TJJ
* @since 2023-06-28
*/
@ApiIgnore()
@RestController
@AllArgsConstructor
public class DistributionReservationStocklistClient implements IDistributionReservationStocklistClient {
private final IDistributionReservationStocklistService distributionReservationStocklistService;
@Override
@GetMapping(TOP)
public BladePage<DistributionReservationStocklistEntity> reservationStockListTop(Integer current, Integer size) {
Query query = new Query();
query.setCurrent(current);
query.setSize(size);
IPage<DistributionReservationStocklistEntity> page = distributionReservationStocklistService.page(Condition.getPage(query));
return BladePage.of(page);
}
}

15
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java

@ -16,14 +16,16 @@
*/
package com.logpm.distribution.feign;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.service.IDistributionStockArticleService;
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 com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.service.IDistributionStockArticleService;
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;
@ -51,6 +53,7 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
}
@Override
@PostMapping(API_PREFIX + "/addData")
public Long addData(DistributionStockArticleEntity distributionStockArticleEntity) {
boolean saveFlag = distributionStockArticleService.save(distributionStockArticleEntity);
if(saveFlag){
@ -60,4 +63,12 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
}
}
@Override
@GetMapping(API_PREFIX + "/findByAdvanceId")
public DistributionStockArticleEntity findByAdvanceId(Integer advanceId) {
QueryWrapper<DistributionStockArticleEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("advance_id",advanceId);
return distributionStockArticleService.getOne(queryWrapper);
}
}

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java

@ -82,4 +82,10 @@ public interface DistributionDeliveryInfoMapper extends BaseMapper<DistributionD
* @return
*/
Integer selectWrapCount(Long id);
/**
* 通过配送查询订单
*
* @return
*/
List<DistributionDeliveryInfoVO> selectcustomListByOrderId(String orderId);
}

43
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml

@ -32,7 +32,7 @@
SELECT * FROM logpm_distribution_delivery_info ${ew.customSqlSegment}
</select>
<select id="selectorderIdList" resultType="java.lang.String">
select GROUP_CONCAT(order_id SEPARATOR ',') from logpm_distribution_delivery_info where is_deleted = 0 and reservation_id = #{id}
select GROUP_CONCAT(distinct order_id SEPARATOR ',') from logpm_distribution_loadscan where is_deleted = 0 and reservation_id = #{id} and (scan_status = 2 or scan_status = 3)
</select>
<select id="selectStripList" resultType="com.logpm.distribution.vo.DistributionDeliveryInfoVO">
SELECT
@ -48,14 +48,13 @@
ldpl.quantity quantity,
ldpl.train_number trainNumber,
ldpl.stock_article_id stockArticleId,
lddi.loaded_state loadedState,
lddi.package_nub packageNub,
lddi.loaded_nub loadedNub
ldl.package_nub packageNub,
ldl.loaded_nub loadedNub
FROM
logpm_distribution_delivery_info lddi
JOIN logpm_distribution_parcel_list ldpl ON lddi.package_id = ldpl.id
logpm_distribution_loadscan ldl
JOIN logpm_distribution_parcel_list ldpl ON ldl.package_id = ldpl.id
<where>
lddi.is_deleted = 0 and lddi.delivery_id = #{id}
ldl.is_deleted = 0 and ldl.delivery_id = #{id}
</where>
</select>
<select id="selectcustomList" resultType="com.logpm.distribution.vo.DistributionDeliveryInfoVO">
@ -63,16 +62,16 @@
ldr.consignee consignee,
ldr.delivery_address deliveryAddress,
ldr.delivery_phone deliveryPhone,
ldr.order_id orderIds,
COALESCE(COUNT(lddi.package_nub), 0) packageNub,
COALESCE(COUNT(lddi.loaded_nub), 0) loadedNub
ldr.stock_article_id orderIds,
COALESCE(COUNT(ldl.package_nub), 0) packageNub,
COALESCE(COUNT(ldl.loaded_nub), 0) loadedNub
FROM
logpm_distribution_delivery_info lddi
JOIN logpm_distribution_reservation ldr ON lddi.reservation_id = ldr.id
logpm_distribution_loadscan ldl
JOIN logpm_distribution_reservation ldr ON ldl.reservation_id = ldr.id
<where>
lddi.is_deleted = 0 and lddi.delivery_id = #{id}
ldl.is_deleted = 0 and ldl.delivery_id = #{id}
</where>
GROUP BY lddi.reservation_id
GROUP BY ldl.reservation_id
</select>
<select id="selectDistributionDeliverywrapInfoPage" resultType="com.logpm.distribution.vo.DistributionDeliveryInfoVO">
SELECT
@ -107,6 +106,22 @@
lddi.is_deleted = 0 and lddi.reservation_id = #{id}
</where>
</select>
<select id="selectcustomListByOrderId" resultType="com.logpm.distribution.vo.DistributionDeliveryInfoVO">
SELECT
ldsa.customer_name consignee,
ldsa.customer_address deliveryAddress,
ldsa.customer_telephone deliveryPhone,
ldsa.id orderIds,
COALESCE(COUNT(ldl.package_nub), 0) packageNub,
COALESCE(COUNT(ldl.loaded_nub), 0) loadedNub
FROM
logpm_distribution_loadscan ldl
JOIN logpm_distribution_stock_article ldsa ON ldl.order_id = ldsa.id
<where>
ldl.is_deleted = 0 and ldl.order_id = #{id}
</where>
GROUP BY ldl.order_id
</select>
</mapper>

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java

@ -41,7 +41,7 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
* @param distributionDeliveryList
* @return
*/
List<DistributionDeliveryListVO> selectDistributionDeliveryListPage(IPage page, DistributionDeliveryListVO distributionDeliveryList);
List<DistributionDeliveryListVO> selectDistributionDeliveryListPage(IPage page, @Param("param") DistributionDeliveryListDTO distributionDeliveryList);
/**
@ -74,5 +74,11 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
*
* @return
*/
Integer selectmarketTotal(DistributionDeliveryListDTO distributionDeliveryList);
Integer selectmarketTotal(@Param("param") DistributionDeliveryListDTO distributionDeliveryList);
/**
* 更新上车时间
*
* @return
*/
Integer updateloadingTime(Long id);
}

98
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -39,10 +39,71 @@
<result column="loading_team_name" property="loadingTeamName"/>
<result column="reservation_id" property="reservationId"/>
</resultMap>
<update id="updateloadingTime">
UPDATE logpm_distribution_delivery_list lddl
JOIN logpm_distribution_loadscan ldl ON lddl.id = ldl.delivery_id
SET lddl.loading_time = now()
WHERE ldl.package_id = #{id} and lddl.loading_time is null
</update>
<select id="selectDistributionDeliveryListPage" resultMap="distributionDeliveryListResultMap">
select * from logpm_distribution_delivery_list where is_deleted = 0
<select id="selectDistributionDeliveryListPage" resultType="com.logpm.distribution.vo.DistributionDeliveryListVO">
SELECT
lddl.id id,
lddl.train_number trainNumber,
lddl.warehouse_name warehouseName,
lddl.warehouse_id warehouseId,
lddl.type type,
lddl.kind kind,
lddl.vehicle_name vehicleName,
lddl.driver_name driverName,
lddl.vehicle_id vehicleId,
lddl.driver_id driverId,
lddl.distribution_company distributionCompany,
lddl.state state,
lddl.customers_number customersNumber,
lddl.price price,
lddl.added_services_id addedServicesId,
lddl.order_number orderNumber,
lddl.delivery_number deliveryNumber,
lddl.loading_team_id loadingTeamId,
lddl.loading_team_name loadingTeamName,
lddl.reservation_id reservationId,
lddl.lead_time leadTime,
lddl.order_id orderId,
lddl.loading_time loadingTime,
lddl.note_number noteNumber,
lddl.source source,
(SELECT COALESCE(COUNT(loaded_nub), 0) FROM logpm_distribution_loadscan ldls WHERE (scan_status=2 or scan_status=3) and lddl.id = ldls.delivery_id) scannedNumber
FROM
logpm_distribution_delivery_list lddl
<where>
<if test="param.warehouseName != null and param.warehouseName!=''">
and lddl.warehouse_name like concat('%',#{param.warehouseName},'%')
</if>
<if test="param.kind != null and param.kind!=''">
and lddl.kind = #{param.kind}
</if>
<if test="param.distributionCompany != null and param.distributionCompany!=''">
and lddl.distribution_company = #{param.distributionCompany}
</if>
<if test="param.type != null and param.type!=''">
and lddl.type = #{param.type}
</if>
<if test="param.state != null and param.state!=''">
and lddl.state = #{param.state}
</if>
<if test="param.createTime_query!=null and param.createTime_query!=''">
and lddl.date_format(create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%')
</if>
<if test="param.leadTime!=null and param.leadTime!=''">
and lddl.date_format(lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%')
</if>
<if test="param.loadingTime!=null and param.loadingTime!=''">
and lddl.date_format(loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%')
</if>
</where>
</select>
@ -50,11 +111,11 @@
SELECT * FROM logpm_distribution_delivery_list ${ew.customSqlSegment}
</select>
<select id="selectBycommercialNub" resultType="java.lang.Integer">
SELECT COALESCE(COUNT(1), 0) FROM logpm_distribution_delivery_list
SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_delivery_list
<where>
type = '2'
<if test="param.warehouse != null and param.warehouse!=''">
and warehouse like concat('%',#{param.warehouse},'%')
<if test="param.warehouseName != null and param.warehouseName!=''">
and warehouse_name like concat('%',#{param.warehouseName},'%')
</if>
<if test="param.kind != null and param.kind!=''">
and kind = #{param.kind}
@ -78,16 +139,14 @@
</select>
<select id="selectcommercialTotal" resultType="java.lang.Integer">
SELECT COALESCE
( COUNT( 1 ), 0 )
( COUNT(*), 0 )
FROM
logpm_distribution_delivery_list lddl
JOIN logpm_distribution_packadeli ldp ON lddl.id = ldp.delivery_id
JOIN logpm_distribution_parcel_list ldpl ON ldpl.id = ldp.parcel_list_id
WHERE
JOIN logpm_distribution_loadscan ldl ON lddl.id = ldl.delivery_id
<where>
lddl.type = '2'
<if test="param.warehouse != null and param.warehouse!=''">
and lddl.warehouse like concat('%',#{param.warehouse},'%')
<if test="param.warehouseName != null and param.warehouseName!=''">
and lddl.warehouse_name like concat('%',#{param.warehouseName},'%')
</if>
<if test="param.kind != null and param.kind!=''">
and lddl.kind = #{param.kind}
@ -110,11 +169,11 @@
</where>
</select>
<select id="selectmarketNub" resultType="java.lang.Integer">
SELECT COALESCE(COUNT(1), 0) FROM logpm_distribution_delivery_list
SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_delivery_list
<where>
type = '1'
<if test="param.warehouse != null and param.warehouse!=''">
and warehouse like concat('%',#{param.warehouse},'%')
<if test="param.warehouseName != null and param.warehouseName!=''">
and warehouse_name like concat('%',#{param.warehouseName},'%')
</if>
<if test="param.kind != null and param.kind!=''">
and kind = #{param.kind}
@ -138,16 +197,15 @@
</select>
<select id="selectmarketTotal" resultType="java.lang.Integer">
SELECT COALESCE
( COUNT( 1 ), 0 )
(COUNT(*), 0 )
FROM
logpm_distribution_delivery_list lddl
JOIN logpm_distribution_packadeli ldp ON lddl.id = ldp.delivery_id
JOIN logpm_distribution_parcel_list ldpl ON ldpl.id = ldp.parcel_list_id
WHERE
JOIN logpm_distribution_loadscan ldl ON lddl.id = ldl.delivery_id
<where>
lddl.type = '1'
<if test="param.warehouse != null and param.warehouse!=''">
and lddl.warehouse like concat('%',#{param.warehouse},'%')
<if test="param.warehouseName != null and param.warehouseName!=''">
and lddl.warehouse_name like concat('%',#{param.warehouseName},'%')
</if>
<if test="param.kind != null and param.kind!=''">
and lddl.kind = #{param.kind}

59
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.java

@ -0,0 +1,59 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.mapper;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.vo.DistributionLoadscanVO;
import com.logpm.distribution.excel.DistributionLoadscanExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 装车扫描表 Mapper 接口
*
* @author lmy
* @since 2023-06-27
*/
public interface DistributionLoadscanMapper extends BaseMapper<DistributionLoadscanEntity> {
/**
* 自定义分页
*
* @param page
* @param distributionLoadscan
* @return
*/
List<DistributionLoadscanVO> selectDistributionLoadscanPage(IPage page, DistributionLoadscanVO distributionLoadscan);
/**
* 获取导出数据
*
* @param queryWrapper
* @return
*/
List<DistributionLoadscanExcel> exportDistributionLoadscan(@Param("ew") Wrapper<DistributionLoadscanEntity> queryWrapper);
/**
* 装车扫描修改状态
*
* @return
*/
Integer updateByPackageId(Long id);
}

173
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.xml

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.distribution.mapper.DistributionLoadscanMapper">
<!-- 通用查询映射结果 -->
<resultMap id="distributionLoadscanResultMap" type="com.logpm.distribution.entity.DistributionLoadscanEntity">
<result column="id" property="id"/>
<result column="tenant_id" property="tenantId"/>
<result column="create_user" property="createUser"/>
<result column="create_time" property="createTime"/>
<result column="update_user" property="updateUser"/>
<result column="update_time" property="updateTime"/>
<result column="status" property="status"/>
<result column="is_deleted" property="isDeleted"/>
<result column="create_dept" property="createDept"/>
<result column="reserve1" property="reserve1"/>
<result column="id" property="id"/>
<result column="reserve2" property="reserve2"/>
<result column="tenant_id" property="tenantId"/>
<result column="reserve3" property="reserve3"/>
<result column="create_user" property="createUser"/>
<result column="reserve4" property="reserve4"/>
<result column="create_time" property="createTime"/>
<result column="reserve5" property="reserve5"/>
<result column="update_user" property="updateUser"/>
<result column="scan_type" property="scanType"/>
<result column="update_time" property="updateTime"/>
<result column="tray_id" property="trayId"/>
<result column="status" property="status"/>
<result column="brand_id" property="brandId"/>
<result column="is_deleted" property="isDeleted"/>
<result column="brand_name" property="brandName"/>
<result column="create_dept" property="createDept"/>
<result column="tray_no" property="trayNo"/>
<result column="reserve1" property="reserve1"/>
<result column="train_number" property="trainNumber"/>
<result column="vehicle_id" property="vehicleId"/>
<result column="reserve3" property="reserve3"/>
<result column="driver_id" property="driverId"/>
<result column="reserve4" property="reserve4"/>
<result column="vehicle_name" property="vehicleName"/>
<result column="reserve5" property="reserve5"/>
<result column="driver_name" property="driverName"/>
<result column="scan_type" property="scanType"/>
<result column="warehouse_id" property="warehouseId"/>
<result column="tray_id" property="trayId"/>
<result column="warehouse_name" property="warehouseName"/>
<result column="brand_id" property="brandId"/>
<result column="package_id" property="packageId"/>
<result column="brand_name" property="brandName"/>
<result column="packet_bar_code" property="packetBarCode"/>
<result column="tray_no" property="trayNo"/>
<result column="scan_status" property="scanStatus"/>
<result column="train_number" property="trainNumber"/>
<result column="confirm_time" property="confirmTime"/>
<result column="id" property="id"/>
<result column="vehicle_id" property="vehicleId"/>
<result column="scan_time" property="scanTime"/>
<result column="tenant_id" property="tenantId"/>
<result column="driver_id" property="driverId"/>
<result column="kitting" property="kitting"/>
<result column="create_user" property="createUser"/>
<result column="vehicle_name" property="vehicleName"/>
<result column="type" property="type"/>
<result column="create_time" property="createTime"/>
<result column="driver_name" property="driverName"/>
<result column="detention_person" property="detentionPerson"/>
<result column="update_user" property="updateUser"/>
<result column="warehouse_id" property="warehouseId"/>
<result column="un_warehouse_id" property="unWarehouseId"/>
<result column="update_time" property="updateTime"/>
<result column="warehouse_name" property="warehouseName"/>
<result column="un_warehouse_name" property="unWarehouseName"/>
<result column="status" property="status"/>
<result column="package_id" property="packageId"/>
<result column="un_administrators_id" property="unAdministratorsId"/>
<result column="is_deleted" property="isDeleted"/>
<result column="packet_bar_code" property="packetBarCode"/>
<result column="un_administrators_name" property="unAdministratorsName"/>
<result column="create_dept" property="createDept"/>
<result column="scan_status" property="scanStatus"/>
<result column="is_insert" property="isInsert"/>
<result column="reserve1" property="reserve1"/>
<result column="confirm_time" property="confirmTime"/>
<result column="scan_state" property="scanState"/>
<result column="scan_time" property="scanTime"/>
<result column="scan_synchronous" property="scanSynchronous"/>
<result column="reserve3" property="reserve3"/>
<result column="kitting" property="kitting"/>
<result column="plan_destination_id" property="planDestinationId"/>
<result column="reserve4" property="reserve4"/>
<result column="type" property="type"/>
<result column="msg" property="msg"/>
<result column="reserve5" property="reserve5"/>
<result column="detention_person" property="detentionPerson"/>
<result column="unload_time" property="unloadTime"/>
<result column="scan_type" property="scanType"/>
<result column="un_warehouse_id" property="unWarehouseId"/>
<result column="order_id" property="orderId"/>
<result column="tray_id" property="trayId"/>
<result column="un_warehouse_name" property="unWarehouseName"/>
<result column="reservation_id" property="reservationId"/>
<result column="brand_id" property="brandId"/>
<result column="un_administrators_id" property="unAdministratorsId"/>
<result column="delivery_id" property="deliveryId"/>
<result column="brand_name" property="brandName"/>
<result column="un_administrators_name" property="unAdministratorsName"/>
<result column="loaded_nub" property="loadedNub"/>
<result column="tray_no" property="trayNo"/>
<result column="is_insert" property="isInsert"/>
<result column="package_nub" property="packageNub"/>
<result column="train_number" property="trainNumber"/>
<result column="scan_state" property="scanState"/>
<result column="vehicle_id" property="vehicleId"/>
<result column="scan_synchronous" property="scanSynchronous"/>
<result column="driver_id" property="driverId"/>
<result column="plan_destination_id" property="planDestinationId"/>
<result column="vehicle_name" property="vehicleName"/>
<result column="msg" property="msg"/>
<result column="driver_name" property="driverName"/>
<result column="unload_time" property="unloadTime"/>
<result column="warehouse_id" property="warehouseId"/>
<result column="order_id" property="orderId"/>
<result column="warehouse_name" property="warehouseName"/>
<result column="reservation_id" property="reservationId"/>
<result column="package_id" property="packageId"/>
<result column="delivery_id" property="deliveryId"/>
<result column="packet_bar_code" property="packetBarCode"/>
<result column="loaded_nub" property="loadedNub"/>
<result column="scan_status" property="scanStatus"/>
<result column="package_nub" property="packageNub"/>
<result column="confirm_time" property="confirmTime"/>
<result column="scan_time" property="scanTime"/>
<result column="kitting" property="kitting"/>
<result column="type" property="type"/>
<result column="detention_person" property="detentionPerson"/>
<result column="un_warehouse_id" property="unWarehouseId"/>
<result column="un_warehouse_name" property="unWarehouseName"/>
<result column="un_administrators_id" property="unAdministratorsId"/>
<result column="un_administrators_name" property="unAdministratorsName"/>
<result column="is_insert" property="isInsert"/>
<result column="scan_state" property="scanState"/>
<result column="scan_synchronous" property="scanSynchronous"/>
<result column="plan_destination_id" property="planDestinationId"/>
<result column="msg" property="msg"/>
<result column="unload_time" property="unloadTime"/>
<result column="order_id" property="orderId"/>
<result column="reservation_id" property="reservationId"/>
<result column="delivery_id" property="deliveryId"/>
<result column="loaded_nub" property="loadedNub"/>
<result column="package_nub" property="packageNub"/>
</resultMap>
<update id="updateByPackageId">
UPDATE logpm_distribution_loadscan
SET scan_status = 2,
loaded_nub =
CASE
WHEN ( loaded_nub + 1 ) > package_nub THEN
package_nub ELSE ( loaded_nub + 1 )
END where package_id = #{id}
</update>
<select id="selectDistributionLoadscanPage" resultMap="distributionLoadscanResultMap">
select * from logpm_distribution_loadscan where is_deleted = 0
</select>
<select id="exportDistributionLoadscan" resultType="com.logpm.distribution.excel.DistributionLoadscanExcel">
SELECT * FROM logpm_distribution_loadscan ${ew.customSqlSegment}
</select>
</mapper>

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -13,7 +13,7 @@
<result column="status" property="status"/>
<result column="is_deleted" property="isDeleted"/>
<result column="create_dept" property="createDept"/>
<result column="order_id" property="orderId"/>
<result column="stock_article_id" property="stockArticleId"/>
<result column="consignee" property="consignee"/>
<result column="delivery_address" property="deliveryAddress"/>
<result column="reservation_data" property="reservationDate"/>
@ -30,6 +30,7 @@
<result column="goods_shelf_id" property="goodsAreaId"/>
<!-- <result column="reservation_id" property="reservationId"/>-->
<result column="period_of_time" property="periodOfTime"/>
<result column="fee" property="fee"/>
<result column="reserve1" property="reserve1"/>
<result column="reserve2" property="reserve2"/>
<result column="reserve3" property="reserve3"/>

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.java

@ -0,0 +1,54 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.mapper;
import com.logpm.distribution.entity.DistributionReservationStockarticleEntity;
import com.logpm.distribution.vo.DistributionReservationStockarticleVO;
import com.logpm.distribution.excel.DistributionReservationStockarticleExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 预约订单中间表 Mapper 接口
*
* @author TJJ
* @since 2023-06-28
*/
public interface DistributionReservationStockarticleMapper extends BaseMapper<DistributionReservationStockarticleEntity> {
/**
* 自定义分页
*
* @param page
* @param distributionReservationStockarticle
* @return
*/
List<DistributionReservationStockarticleVO> selectDistributionReservationStockarticlePage(IPage page, DistributionReservationStockarticleVO distributionReservationStockarticle);
/**
* 获取导出数据
*
* @param queryWrapper
* @return
*/
List<DistributionReservationStockarticleExcel> exportDistributionReservationStockarticle(@Param("ew") Wrapper<DistributionReservationStockarticleEntity> queryWrapper);
}

36
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.xml

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.distribution.mapper.DistributionReservationStockarticleMapper">
<!-- 通用查询映射结果 -->
<resultMap id="distributionReservationStockarticleResultMap" type="com.logpm.distribution.entity.DistributionReservationStockarticleEntity">
<result column="id" property="id"/>
<result column="tenant_id" property="tenantId"/>
<result column="create_user" property="createUser"/>
<result column="create_time" property="createTime"/>
<result column="update_user" property="updateUser"/>
<result column="update_time" property="updateTime"/>
<result column="status" property="status"/>
<result column="is_deleted" property="isDeleted"/>
<result column="create_dept" property="createDept"/>
<result column="reservation_id" property="reservationId"/>
<result column="stockarticle_id" property="stockarticleId"/>
<result column="reservation_num" property="reservationNum"/>
<result column="reserve1" property="reserve1"/>
<result column="reserve2" property="reserve2"/>
<result column="reserve3" property="reserve3"/>
<result column="reserve4" property="reserve4"/>
<result column="reserve5" property="reserve5"/>
</resultMap>
<select id="selectDistributionReservationStockarticlePage" resultMap="distributionReservationStockarticleResultMap">
select * from logpm_distribution_reservation_stockarticle where is_deleted = 0
</select>
<select id="exportDistributionReservationStockarticle" resultType="com.logpm.distribution.excel.DistributionReservationStockarticleExcel">
SELECT * FROM logpm_distribution_reservation_stockarticle ${ew.customSqlSegment}
</select>
</mapper>

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.java

@ -0,0 +1,54 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.mapper;
import com.logpm.distribution.entity.DistributionReservationStocklistEntity;
import com.logpm.distribution.vo.DistributionReservationStocklistVO;
import com.logpm.distribution.excel.DistributionReservationStocklistExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 预约库存中间表 Mapper 接口
*
* @author TJJ
* @since 2023-06-28
*/
public interface DistributionReservationStocklistMapper extends BaseMapper<DistributionReservationStocklistEntity> {
/**
* 自定义分页
*
* @param page
* @param distributionReservationStocklist
* @return
*/
List<DistributionReservationStocklistVO> selectDistributionReservationStocklistPage(IPage page, DistributionReservationStocklistVO distributionReservationStocklist);
/**
* 获取导出数据
*
* @param queryWrapper
* @return
*/
List<DistributionReservationStocklistExcel> exportDistributionReservationStocklist(@Param("ew") Wrapper<DistributionReservationStocklistEntity> queryWrapper);
}

36
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.xml

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.distribution.mapper.DistributionReservationStocklistMapper">
<!-- 通用查询映射结果 -->
<resultMap id="distributionReservationStocklistResultMap" type="com.logpm.distribution.entity.DistributionReservationStocklistEntity">
<result column="id" property="id"/>
<result column="tenant_id" property="tenantId"/>
<result column="create_user" property="createUser"/>
<result column="create_time" property="createTime"/>
<result column="update_user" property="updateUser"/>
<result column="update_time" property="updateTime"/>
<result column="status" property="status"/>
<result column="is_deleted" property="isDeleted"/>
<result column="create_dept" property="createDept"/>
<result column="reservation_id" property="reservationId"/>
<result column="stocklist_id" property="stocklistId"/>
<result column="reservation_num" property="reservationNum"/>
<result column="reserve1" property="reserve1"/>
<result column="reserve2" property="reserve2"/>
<result column="reserve3" property="reserve3"/>
<result column="reserve4" property="reserve4"/>
<result column="reserve5" property="reserve5"/>
</resultMap>
<select id="selectDistributionReservationStocklistPage" resultMap="distributionReservationStocklistResultMap">
select * from logpm_distribution_reservation_stocklist where is_deleted = 0
</select>
<select id="exportDistributionReservationStocklist" resultType="com.logpm.distribution.excel.DistributionReservationStocklistExcel">
SELECT * FROM logpm_distribution_reservation_stocklist ${ew.customSqlSegment}
</select>
</mapper>

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSelfDeliveryMapper.java

@ -0,0 +1,54 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.mapper;
import com.logpm.distribution.entity.DistributionSelfDeliveryEntity;
import com.logpm.distribution.vo.DistributionSelfDeliveryVO;
import com.logpm.distribution.excel.DistributionSelfDeliveryExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 自主配送信息列表 Mapper 接口
*
* @author TJJ
* @since 2023-06-26
*/
public interface DistributionSelfDeliveryMapper extends BaseMapper<DistributionSelfDeliveryEntity> {
/**
* 自定义分页
*
* @param page
* @param distributionSelfDelivery
* @return
*/
List<DistributionSelfDeliveryVO> selectDistributionSelfDeliveryPage(IPage page, DistributionSelfDeliveryVO distributionSelfDelivery);
/**
* 获取导出数据
*
* @param queryWrapper
* @return
*/
List<DistributionSelfDeliveryExcel> exportDistributionSelfDelivery(@Param("ew") Wrapper<DistributionSelfDeliveryEntity> queryWrapper);
}

37
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSelfDeliveryMapper.xml

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.distribution.mapper.DistributionSelfDeliveryMapper">
<!-- 通用查询映射结果 -->
<resultMap id="distributionSelfDeliveryResultMap" type="com.logpm.distribution.entity.DistributionSelfDeliveryEntity">
<result column="tenant_id" property="tenantId"/>
<result column="create_user" property="createUser"/>
<result column="create_time" property="createTime"/>
<result column="update_user" property="updateUser"/>
<result column="update_time" property="updateTime"/>
<result column="status" property="status"/>
<result column="is_deleted" property="isDeleted"/>
<result column="create_dept" property="createDept"/>
<result column="id" property="id"/>
<result column="reservation_ids" property="reservationIds"/>
<result column="vehicle_ids" property="vehicleIds"/>
<result column="master_driver_id" property="masterDriverId"/>
<result column="slave_driver_ids" property="slaveDriverIds"/>
<result column="reserve1" property="reserve1"/>
<result column="reserve2" property="reserve2"/>
<result column="reserve3" property="reserve3"/>
<result column="reserve4" property="reserve4"/>
<result column="reserve5" property="reserve5"/>
</resultMap>
<select id="selectDistributionSelfDeliveryPage" resultMap="distributionSelfDeliveryResultMap">
select * from logpm_distribution_self_delivery where is_deleted = 0
</select>
<select id="exportDistributionSelfDelivery" resultType="com.logpm.distribution.excel.DistributionSelfDeliveryExcel">
SELECT * FROM logpm_distribution_self_delivery ${ew.customSqlSegment}
</select>
</mapper>

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -37,6 +37,7 @@
<result column="state" property="state"/>
<result column="fee" property="fee"/>
<result column="reservation_id" property="reservationId"/>
<result column="reservation_num" property="reservationNum"/>
</resultMap>

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml

@ -31,6 +31,7 @@
<result column="quantity_stock" property="quantityStock"/>
<result column="outbound_quantity" property="outboundQuantity"/>
<result column="despatch" property="despatch"/>
<result column="reservation_num" property="reservationNum"/>
</resultMap>

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionTripartiteDeliveryMapper.java

@ -0,0 +1,54 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.mapper;
import com.logpm.distribution.entity.DistributionTripartiteDeliveryEntity;
import com.logpm.distribution.vo.DistributionTripartiteDeliveryVO;
import com.logpm.distribution.excel.DistributionTripartiteDeliveryExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 外协配送信息列表 Mapper 接口
*
* @author TJJ
* @since 2023-06-26
*/
public interface DistributionTripartiteDeliveryMapper extends BaseMapper<DistributionTripartiteDeliveryEntity> {
/**
* 自定义分页
*
* @param page
* @param distributionTripartiteDelivery
* @return
*/
List<DistributionTripartiteDeliveryVO> selectDistributionTripartiteDeliveryPage(IPage page, DistributionTripartiteDeliveryVO distributionTripartiteDelivery);
/**
* 获取导出数据
*
* @param queryWrapper
* @return
*/
List<DistributionTripartiteDeliveryExcel> exportDistributionTripartiteDelivery(@Param("ew") Wrapper<DistributionTripartiteDeliveryEntity> queryWrapper);
}

38
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionTripartiteDeliveryMapper.xml

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.distribution.mapper.DistributionTripartiteDeliveryMapper">
<!-- 通用查询映射结果 -->
<resultMap id="distributionTripartiteDeliveryResultMap" type="com.logpm.distribution.entity.DistributionTripartiteDeliveryEntity">
<result column="tenant_id" property="tenantId"/>
<result column="create_user" property="createUser"/>
<result column="create_time" property="createTime"/>
<result column="update_user" property="updateUser"/>
<result column="update_time" property="updateTime"/>
<result column="status" property="status"/>
<result column="is_deleted" property="isDeleted"/>
<result column="create_dept" property="createDept"/>
<result column="id" property="id"/>
<result column="driver_name" property="driverName"/>
<result column="driver_phone" property="driverPhone"/>
<result column="vehicle_num" property="vehicleNum"/>
<result column="delivery_fee" property="deliveryFee"/>
<result column="reservation_ids" property="reservationIds"/>
<result column="reserve1" property="reserve1"/>
<result column="reserve2" property="reserve2"/>
<result column="reserve3" property="reserve3"/>
<result column="reserve4" property="reserve4"/>
<result column="reserve5" property="reserve5"/>
</resultMap>
<select id="selectDistributionTripartiteDeliveryPage" resultMap="distributionTripartiteDeliveryResultMap">
select * from logpm_distribution_tripartite_delivery where is_deleted = 0
</select>
<select id="exportDistributionTripartiteDelivery" resultType="com.logpm.distribution.excel.DistributionTripartiteDeliveryExcel">
SELECT * FROM logpm_distribution_tripartite_delivery ${ew.customSqlSegment}
</select>
</mapper>

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java

@ -18,6 +18,7 @@ package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import com.logpm.distribution.vo.DistributionDeliveryListVO;
import com.logpm.distribution.excel.DistributionDeliveryListExcel;
@ -41,7 +42,7 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
* @param distributionDeliveryList
* @return
*/
IPage<DistributionDeliveryListVO> selectDistributionDeliveryListPage(IPage<DistributionDeliveryListVO> page, DistributionDeliveryListVO distributionDeliveryList);
IPage<DistributionDeliveryListVO> selectDistributionDeliveryListPage(IPage<DistributionDeliveryListVO> page, DistributionDeliveryListDTO distributionDeliveryList);
/**
@ -74,4 +75,8 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
* @return
*/
Integer start(DistributionDeliveryListDTO distributionDeliveryList);
/**
*装车扫描
*/
Integer loadingscan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO);
}

52
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionLoadscanService.java

@ -0,0 +1,52 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.vo.DistributionLoadscanVO;
import com.logpm.distribution.excel.DistributionLoadscanExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* 装车扫描表 服务类
*
* @author lmy
* @since 2023-06-27
*/
public interface IDistributionLoadscanService extends BaseService<DistributionLoadscanEntity> {
/**
* 自定义分页
*
* @param page
* @param distributionLoadscan
* @return
*/
IPage<DistributionLoadscanVO> selectDistributionLoadscanPage(IPage<DistributionLoadscanVO> page, DistributionLoadscanVO distributionLoadscan);
/**
* 导出数据
*
* @param queryWrapper
* @return
*/
List<DistributionLoadscanExcel> exportDistributionLoadscan(Wrapper<DistributionLoadscanEntity> queryWrapper);
}

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java

@ -88,4 +88,13 @@ public interface IDistributionReservationService extends BaseService<Distributio
* @return
*/
List<DistributionReservationEntity> getReservationAddr(String ids);
/**
* 批量转配送任务
* @param deliveryInfo
* @return
*/
R<?> deliveryTask(Map<String, Object> deliveryInfo);
}

52
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationStockarticleService.java

@ -0,0 +1,52 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.distribution.entity.DistributionReservationStockarticleEntity;
import com.logpm.distribution.vo.DistributionReservationStockarticleVO;
import com.logpm.distribution.excel.DistributionReservationStockarticleExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* 预约订单中间表 服务类
*
* @author TJJ
* @since 2023-06-28
*/
public interface IDistributionReservationStockarticleService extends BaseService<DistributionReservationStockarticleEntity> {
/**
* 自定义分页
*
* @param page
* @param distributionReservationStockarticle
* @return
*/
IPage<DistributionReservationStockarticleVO> selectDistributionReservationStockarticlePage(IPage<DistributionReservationStockarticleVO> page, DistributionReservationStockarticleVO distributionReservationStockarticle);
/**
* 导出数据
*
* @param queryWrapper
* @return
*/
List<DistributionReservationStockarticleExcel> exportDistributionReservationStockarticle(Wrapper<DistributionReservationStockarticleEntity> queryWrapper);
}

52
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationStocklistService.java

@ -0,0 +1,52 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.distribution.entity.DistributionReservationStocklistEntity;
import com.logpm.distribution.vo.DistributionReservationStocklistVO;
import com.logpm.distribution.excel.DistributionReservationStocklistExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* 预约库存中间表 服务类
*
* @author TJJ
* @since 2023-06-28
*/
public interface IDistributionReservationStocklistService extends BaseService<DistributionReservationStocklistEntity> {
/**
* 自定义分页
*
* @param page
* @param distributionReservationStocklist
* @return
*/
IPage<DistributionReservationStocklistVO> selectDistributionReservationStocklistPage(IPage<DistributionReservationStocklistVO> page, DistributionReservationStocklistVO distributionReservationStocklist);
/**
* 导出数据
*
* @param queryWrapper
* @return
*/
List<DistributionReservationStocklistExcel> exportDistributionReservationStocklist(Wrapper<DistributionReservationStocklistEntity> queryWrapper);
}

52
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSelfDeliveryService.java

@ -0,0 +1,52 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.distribution.entity.DistributionSelfDeliveryEntity;
import com.logpm.distribution.vo.DistributionSelfDeliveryVO;
import com.logpm.distribution.excel.DistributionSelfDeliveryExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* 自主配送信息列表 服务类
*
* @author TJJ
* @since 2023-06-26
*/
public interface IDistributionSelfDeliveryService extends BaseService<DistributionSelfDeliveryEntity> {
/**
* 自定义分页
*
* @param page
* @param distributionSelfDelivery
* @return
*/
IPage<DistributionSelfDeliveryVO> selectDistributionSelfDeliveryPage(IPage<DistributionSelfDeliveryVO> page, DistributionSelfDeliveryVO distributionSelfDelivery);
/**
* 导出数据
*
* @param queryWrapper
* @return
*/
List<DistributionSelfDeliveryExcel> exportDistributionSelfDelivery(Wrapper<DistributionSelfDeliveryEntity> queryWrapper);
}

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionServiceLogService.java

@ -49,4 +49,5 @@ public interface IDistributionServiceLogService extends BaseService<Distribution
*/
List<DistributionServiceLogExcel> exportDistributionServiceLog(Wrapper<DistributionServiceLogEntity> queryWrapper);
Boolean OwnSaveOrUpdate(DistributionServiceLogEntity distributionServiceLog);
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java

@ -63,4 +63,6 @@ public interface IDistributionStockArticleService extends BaseService<Distributi
R<?> addIncrement(Map<String, Object> addvalueInfo);
Boolean saveStockRow(DistributionStockArticleDTO distributionStockArticleDTO);
R<List<DistributionStockArticleVO>> getStockArticleInfo(String ids);
}

52
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionTripartiteDeliveryService.java

@ -0,0 +1,52 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.distribution.entity.DistributionTripartiteDeliveryEntity;
import com.logpm.distribution.vo.DistributionTripartiteDeliveryVO;
import com.logpm.distribution.excel.DistributionTripartiteDeliveryExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* 外协配送信息列表 服务类
*
* @author TJJ
* @since 2023-06-26
*/
public interface IDistributionTripartiteDeliveryService extends BaseService<DistributionTripartiteDeliveryEntity> {
/**
* 自定义分页
*
* @param page
* @param distributionTripartiteDelivery
* @return
*/
IPage<DistributionTripartiteDeliveryVO> selectDistributionTripartiteDeliveryPage(IPage<DistributionTripartiteDeliveryVO> page, DistributionTripartiteDeliveryVO distributionTripartiteDelivery);
/**
* 导出数据
*
* @param queryWrapper
* @return
*/
List<DistributionTripartiteDeliveryExcel> exportDistributionTripartiteDelivery(Wrapper<DistributionTripartiteDeliveryEntity> queryWrapper);
}

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -19,6 +19,7 @@ package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.mapper.*;
import com.logpm.distribution.vo.*;
@ -53,19 +54,27 @@ import java.util.List;
@AllArgsConstructor
@Slf4j
public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<DistributionDeliveryListMapper, DistributionDeliveryListEntity> implements IDistributionDeliveryListService {
private final DistributionPackadeliMapper distributionPackadeliMapper;
private final DistributionDeliveryInfoMapper distributionDeliveryInfoMapper;
private final DistributionReservationMapper distributionReservationMapper;
private final DistributionSignforMapper distributionSignforMapper;
private final DistributionParcelListMapper distributionParcelListMapper;
private final DistributionLoadscanMapper distributionLoadscanMapper;
private final DistributionDeliveryListMapper distributionDeliveryListMapper;
private final DistributionStockArticleMapper distributionStockArticleMapper;
@Override
public IPage<DistributionDeliveryListVO> selectDistributionDeliveryListPage(IPage<DistributionDeliveryListVO> page, DistributionDeliveryListVO distributionDeliveryList) {
public IPage<DistributionDeliveryListVO> selectDistributionDeliveryListPage(IPage<DistributionDeliveryListVO> page, DistributionDeliveryListDTO distributionDeliveryList) {
//转换创建时间
if (null != distributionDeliveryList.getCreateTime()) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
distributionDeliveryList.setCreateTime_query(sdf.format(distributionDeliveryList.getCreateTime()));
}
return page.setRecords(baseMapper.selectDistributionDeliveryListPage(page, distributionDeliveryList));
}
@Override
public List<DistributionDeliveryListExcel> exportDistributionDeliveryList(Wrapper<DistributionDeliveryListEntity> queryWrapper) {
List<DistributionDeliveryListExcel> distributionDeliveryListList = baseMapper.exportDistributionDeliveryList(queryWrapper);
//distributionDeliveryListList.forEach(distributionDeliveryList -> {
// distributionDeliveryList.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionDeliveryList.getType()));
@ -79,13 +88,17 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//转移数据到VO上
BeanUtils.copyProperties(detail, distributionDeliveryListVO);
//查询包条数据
List<DistributionDeliveryInfoVO> stripList = distributionDeliveryInfoMapper.selectStripList(detail.getId());
List<DistributionDeliveryInfoVO> stripList =distributionDeliveryInfoMapper.selectStripList(detail.getId());
distributionDeliveryListVO.setPackadeList(stripList);
if (detail.getSource()==1){
//查询客户信息
List<DistributionDeliveryInfoVO> customList = distributionDeliveryInfoMapper.selectcustomList(detail.getId());
distributionDeliveryListVO.setPackadeList(stripList);
distributionDeliveryListVO.setReservationList(customList);
// List<DistributionPackadeliVO> list = distributionPackadeliMapper.selectjointList(detail.getId());
// distributionDeliveryListVO.setPackadeList(list);
}else if (detail.getSource()==2){
//查询订单信息
List<DistributionDeliveryInfoVO> customList = distributionDeliveryInfoMapper.selectcustomListByOrderId(detail.getOrderId());
distributionDeliveryListVO.setReservationList(customList);
}
return distributionDeliveryListVO;
}
@ -121,6 +134,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
public Integer start(DistributionDeliveryListDTO distributionDeliveryList) {
log.info("开始发车>>>>>>>>>{}", distributionDeliveryList);
//获取关联的客户信息
if (distributionDeliveryList.getSource() ==1){
String reservationId = distributionDeliveryList.getReservationId();
List<Long> reservationIds = Arrays.asList(Long.valueOf(String.valueOf(reservationId.split(","))));
//查询客户信息,装车情况
@ -144,16 +158,18 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
String orderIds = distributionDeliveryInfoMapper.selectorderIdList(e.getId());
distributionSignforEntity.setOrderId(orderIds);
//查询订单总数
Integer i = StringUtils.countMatches(e.getOrderId(), ",")+1;
Integer i = StringUtils.countMatches(e.getStockArticleId(), ",")+1;
distributionSignforEntity.setOrderTotal(i);
//该客户总件数
Integer i1 =distributionDeliveryInfoMapper.selectWrapCount(e.getId());
distributionSignforEntity.setTotal(i1);
//装车件数
distributionSignforEntities.add(distributionSignforEntity);
});
}else {
}
//插入配送管理表
//获取关联订单
@ -163,4 +179,24 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return null;
}
@Override
public Integer loadingscan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
if (distrilbutionloadingscanDTO.getType()==1){
//找出该包条码
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListMapper.selectList(new QueryWrapper<DistributionParcelListEntity>().lambda()
.eq(DistributionParcelListEntity::getPacketBarCode,distrilbutionloadingscanDTO.getBarcode()));
distributionParcelListEntities.forEach(e->{
//修改对应的装车表
distributionLoadscanMapper.updateByPackageId(e.getId());
//TODO 查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTime(e.getId());
// baseMapper.updateloadingTime(e.getId());
});
}else if (distrilbutionloadingscanDTO.getType()==2){
//TODO 托盘扫描
}
return 1;
}
}

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionLoadscanServiceImpl.java

@ -0,0 +1,54 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.service.impl;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.vo.DistributionLoadscanVO;
import com.logpm.distribution.excel.DistributionLoadscanExcel;
import com.logpm.distribution.mapper.DistributionLoadscanMapper;
import com.logpm.distribution.service.IDistributionLoadscanService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;
/**
* 装车扫描表 服务实现类
*
* @author lmy
* @since 2023-06-27
*/
@Service
public class DistributionLoadscanServiceImpl extends BaseServiceImpl<DistributionLoadscanMapper, DistributionLoadscanEntity> implements IDistributionLoadscanService {
@Override
public IPage<DistributionLoadscanVO> selectDistributionLoadscanPage(IPage<DistributionLoadscanVO> page, DistributionLoadscanVO distributionLoadscan) {
return page.setRecords(baseMapper.selectDistributionLoadscanPage(page, distributionLoadscan));
}
@Override
public List<DistributionLoadscanExcel> exportDistributionLoadscan(Wrapper<DistributionLoadscanEntity> queryWrapper) {
List<DistributionLoadscanExcel> distributionLoadscanList = baseMapper.exportDistributionLoadscan(queryWrapper);
//distributionLoadscanList.forEach(distributionLoadscan -> {
// distributionLoadscan.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionLoadscan.getType()));
//});
return distributionLoadscanList;
}
}

318
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -19,18 +19,13 @@ package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import com.logpm.distribution.dto.DistributionReservationDTO;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.entity.DistributionStockupEntity;
import com.logpm.distribution.entity.DistributionStockupInfoEntity;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.excel.DistributionReservationExcel;
import com.logpm.distribution.mapper.DistributionReservationMapper;
import com.logpm.distribution.mapper.DistributionStockupInfoMapper;
import com.logpm.distribution.service.IDistributionReservationService;
import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.service.IDistributionStockupService;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.DistributionReservationVO;
import lombok.AllArgsConstructor;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.BeanUtils;
@ -44,10 +39,9 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
/**
* 预约列表 服务实现类
@ -59,13 +53,28 @@ import java.util.Map;
@AllArgsConstructor
public class DistributionReservationServiceImpl extends BaseServiceImpl<DistributionReservationMapper, DistributionReservationEntity> implements IDistributionReservationService {
private DistributionReservationMapper distributionReservationMapper;
private final DistributionReservationMapper distributionReservationMapper;
private final IDistributionStockupService distributionStockupService;
private final IDistributionStockupInfoService distributionStockupInfoService;
private final IDistributionStockArticleService distributionStockArticleService;
private final IDistributionStockListService distributionStockListService;
private final IDistributionDeliveryListService distributionDeliveryListService;
private final IDistributionTripartiteDeliveryService distributionTripartiteDeliveryService;
private final IDistributionSelfDeliveryService distributionSelfDeliveryService;
private final IDistributionReservationStockarticleService distributionReservationStockarticleService;
private final IDistributionReservationStocklistService distributionReservationStocklistService;
private IDistributionStockupService distributionStockupService;
private DistributionStockupInfoMapper distributionStockupInfoMapper;
private IDistributionStockArticleService distributionStockArticleService;
@Override
public IPage<DistributionReservationVO> selectDistrbutionReservationPage(IPage<DistributionReservationVO> page, DistributionReservationVO distrbutionReservation) {
@ -83,20 +92,20 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
@Override
public R<?> addReservations(Map<String,Object> param) {
public R<?> addReservations(Map<String, Object> param) {
String ids = (String) param.get("ids");
//对参数进行校验
List<Long> longs = Func.toLongList(ids);
if (Func.isEmpty(longs)){
log.error("参数异常:+{"+longs+"}");
if (Func.isEmpty(longs)) {
log.error("参数异常:+{" + longs + "}");
R.fail("服务器异常,请重新添加!!");
}
//这里就对预约信息列表进行批量的确认状态修改
boolean result = SqlHelper.retBool(distributionReservationMapper.addReservations(longs));
if (result){
if (result) {
return R.status(result);
}else {
log.error("sql执行错误+{"+result+"}");
} else {
log.error("sql执行错误+{" + result + "}");
return null;
}
@ -111,68 +120,76 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
@Override
@Transactional
public boolean insertReservation(DistributionReservationDTO distributionReservationDTO) {
try {
if (Func.isEmpty(distributionReservationDTO)){
log.error("参数错误+{"+ distributionReservationDTO +"}");
if (Func.isEmpty(distributionReservationDTO)){
log.error("参数错误+{" + distributionReservationDTO + "}");
return false;
}
//这里新增需要对预约列表下的订单配送单的金额进行计算
String idsStr = distributionReservationDTO.getIds();
List<Long> ids = Func.toLongList(idsStr);
if (Func.isEmpty(ids)){
log.error("ids参数错误:+{"+ids+"}");
return false;
}
BigDecimal collectFee = new BigDecimal("0");
BigDecimal replaceFee = new BigDecimal("0") ;
StringBuffer buffer = new StringBuffer();
List<DistributionStockArticleEntity> deliveryEntities = new ArrayList<>();
for (int i = 0; i < ids.size(); i++) {
BaseMapper<DistributionStockArticleEntity> stockArticleMapper = distributionStockArticleService.getBaseMapper();
DistributionStockArticleEntity distributionStockArticleEntity = stockArticleMapper.selectById(ids.get(i));
// deliveryEntities.add(distributionDeliveryEntity);
// collectFee = collectFee.add(distributionDeliveryEntity.getCollectFee());
// //待收货款累加
// replaceFee = replaceFee.add(distributionDeliveryEntity.getReplaceFee());
// String orderId = distributionDeliveryEntity.getOrderId();
buffer.append(distributionStockArticleEntity.getId()).append(",");
}
buffer.deleteCharAt(buffer.length()-1);
DistributionReservationEntity distributionReservationEntity = new DistributionReservationEntity();
BeanUtils.copyProperties(distributionReservationDTO, distributionReservationEntity);
distributionReservationEntity.setCollectFee(collectFee);
distributionReservationEntity.setReplaceFee(replaceFee);
//设置订单自编号,这里的数据属于冗余部分
distributionReservationEntity.setOrderId(buffer.toString());
//设置状态未备货
distributionReservationEntity.setStockupStatus("1");
//设置预约状态为待确认
distributionReservationEntity.setReservationStatus("1");
//设置预约信息来源是自建的方式
distributionReservationEntity.setOrderSource("3");
//这里就对新增的预约信息进行保存
this.save(distributionReservationEntity);
Long reservationEntityId = distributionReservationEntity.getId();
//保存完之后获取新插入的预约服务获取ID然后订单派送单进行绑定
deliveryEntities.forEach(i->{
i.setReservationId(reservationEntityId);
distributionStockArticleService.getBaseMapper().updateById(i);
}
//构建预约单
DistributionReservationEntity reservationEntity = new DistributionReservationEntity();
Func.copy(distributionReservationDTO,reservationEntity);
reservationEntity.setReservationStatus("1");
reservationEntity.setStockupStatus("1");
this.save(reservationEntity);
//获取新增预约信息的编号
Long reservationId = reservationEntity.getId();
List<DistributionStockArticleEntity> stockArticleList = distributionReservationDTO.getStockArticleList();
List<DistributionStockListEntity> inventoryList = distributionReservationDTO.getInventoryList();
AtomicInteger stockArticleCount = new AtomicInteger();
AtomicInteger stockListCount = new AtomicInteger();
List<String> arrayList = new ArrayList<>();
AtomicReference<BigDecimal> initTotal = new AtomicReference<>(BigDecimal.ZERO);
//存在订单构建预约订单关联信息
if (!Func.isEmpty(stockArticleList)){
stockArticleList.forEach(s->{
//修改订单状态为已预约
s.setState(2);
stockArticleCount.getAndAdd(s.getReservationNum());
distributionStockArticleService.updateById(s);
arrayList.add(s.getOrderSelfNumbering());
initTotal.accumulateAndGet(new BigDecimal(s.getFee().toString()),BigDecimal::add);
initTotal.accumulateAndGet(new BigDecimal(s.getRate().toString()),BigDecimal::add);
Long stockArticleId = s.getId();
DistributionReservationStockarticleEntity distributionReservationStockarticleEntity = new DistributionReservationStockarticleEntity();
distributionReservationStockarticleEntity.setReservationId(reservationId);
distributionReservationStockarticleEntity.setStockarticleId(stockArticleId);
distributionReservationStockarticleEntity.setReservationNum(s.getReservationNum());
distributionReservationStockarticleService.save(distributionReservationStockarticleEntity);
});
}catch (Exception e){
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
log.error("出现异常:+{"+e.getMessage()+"}");
return false;
}
//存在库存品构建预约库存品关联信息
if (!Func.isEmpty(inventoryList)){
inventoryList.forEach(i->{
distributionStockListService.updateById(i);
Long stocklistId = i.getId();
stockListCount.getAndAdd(i.getReservationNum());
arrayList.add(i.getOrderSelfNumbering());
DistributionReservationStocklistEntity distributionReservationStocklistEntity = new DistributionReservationStocklistEntity();
distributionReservationStocklistEntity.setReservationId(reservationId);
distributionReservationStocklistEntity.setStocklistId(stocklistId);
distributionReservationStocklistEntity.setReservationNum(i.getReservationNum());
distributionReservationStocklistService.save(distributionReservationStocklistEntity);
});
}
//这里对预约信息再次进行修改
HashSet<String> set = new HashSet<>();
set.addAll(arrayList);
arrayList.addAll(set);
String str = String.join(",", set);
//拼接在库和库存订单编号
reservationEntity.setStockArticleId(str);
//统计数量
BigDecimal fee = initTotal.get().add(reservationEntity.getOtherFee());
reservationEntity.setFee(fee);
distributionReservationMapper.updateById(reservationEntity);
return true;
}
@Transactional
@Override
public R<?> stockUpTask(Map<String,Object> stockUpInfo) {
if (Func.isEmpty(stockUpInfo)){
log.error("参数异常:+{"+stockUpInfo+"}");
public R<?> stockUpTask(Map<String, Object> stockUpInfo) {
if (Func.isEmpty(stockUpInfo)) {
log.error("参数异常:+{" + stockUpInfo + "}");
return R.fail("服务器正忙!!!");
}
boolean result = false;
@ -198,9 +215,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
List<Long> reservationIds = Func.toLongList(ids);
for (Long reservationId : reservationIds) {
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(reservationId);
if (Func.isEmpty(reservationEntity) || !reservationEntity.getReservationStatus().equals("2")){
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
log.error("reservationEntity参数异常:+{"+reservationEntity+"}");
if (Func.isEmpty(reservationEntity) || !reservationEntity.getReservationStatus().equals("2")) {
log.error("reservationEntity参数异常:+{" + reservationEntity + "}");
return R.fail("预约信息状态异常!!!");
}
//修改预约备货状态
@ -211,16 +227,15 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
DistributionStockupInfoEntity reservationStockupEntity = new DistributionStockupInfoEntity();
reservationStockupEntity.setStockupId(id.toString());
reservationStockupEntity.setReservationId(reservationEntity.getId().toString());
result = SqlHelper.retBool(distributionStockupInfoMapper.insert(reservationStockupEntity));
if (!result){
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
log.error("sql执行异常:+{"+result+"}");
result = distributionStockupInfoService.save(reservationStockupEntity);
if (!result) {
log.error("sql执行异常:+{" + result + "}");
return R.fail("请稍后再试");
}
}
} catch (ParseException e) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
log.error("执行异常:+{"+e.getMessage()+"}");
log.error("执行异常:+{" + e.getMessage() + "}");
return R.fail("请稍后再试");
}
//批量备货,循环多条预约信息数据
@ -229,15 +244,15 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
@Override
public List<DistributionReservationEntity> getReservationAddr(String ids) {
if (Func.isBlank(ids)){
if (Func.isBlank(ids)) {
return null;
}
String[] split = ids.split(",");
List<DistributionReservationEntity> distributionReservationVOS = new ArrayList<>();
if (split.length==1){
if (split.length == 1) {
DistributionReservationEntity reservationEntity = this.getBaseMapper().selectById(ids);
distributionReservationVOS.add(reservationEntity);
}else {
} else {
for (String s : split) {
DistributionReservationEntity reservationEntity = this.getBaseMapper().selectById(s);
distributionReservationVOS.add(reservationEntity);
@ -245,4 +260,135 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
return distributionReservationVOS;
}
@Transactional
@Override
public R<?> deliveryTask(Map<String, Object> deliveryInfo) {
//获取前端传递的多个预约信息
String idsStr = (String) deliveryInfo.get("reservationIds");
String[] ids = idsStr.split(",");
if (Func.isEmpty(ids)) {
log.error("预约参数错误+{" + ids + "}");
return R.fail("预约信息错误!!!");
}
String text = "4564654654";
String[] split = text.split(",");
//判断是自主配送还是三方配送
String tripartiteSource = (String) deliveryInfo.get("tripartiteSource");
boolean result = false;
try {
if (Func.isBlank(tripartiteSource)) {
//自主配送
DistributionSelfDeliveryEntity distributionSelfDeliveryEntity = new DistributionSelfDeliveryEntity();
distributionSelfDeliveryEntity.setMasterDriverId((String) deliveryInfo.get("masterDriver"));
distributionSelfDeliveryEntity.setReservationIds(idsStr);
distributionSelfDeliveryEntity.setVehicleIds((String) deliveryInfo.get("vehicleIds"));
distributionSelfDeliveryEntity.setSlaveDriverIds((String) deliveryInfo.get("slaveDriver"));
//保存自主配送信息
result = distributionSelfDeliveryService.save(distributionSelfDeliveryEntity);
//获取自主配送信息id
Long distributionSelfDeliveryEntityId = distributionSelfDeliveryEntity.getId();
} else {
//三方配送
DistributionTripartiteDeliveryEntity distributionTripartiteDeliveryEntity = new DistributionTripartiteDeliveryEntity();
distributionTripartiteDeliveryEntity.setDriverPhone((String) deliveryInfo.get("driverPhone"));
distributionTripartiteDeliveryEntity.setDriverName((String) deliveryInfo.get("driverName"));
distributionTripartiteDeliveryEntity.setVehicleNum((String) deliveryInfo.get("vehicleNum"));
distributionTripartiteDeliveryEntity.setDeliveryFee(new BigDecimal((String) deliveryInfo.get("deliveryFee")) );
distributionTripartiteDeliveryEntity.setReservationIds(idsStr);
result = distributionTripartiteDeliveryService.save(distributionTripartiteDeliveryEntity);
Long distributionTripartiteDeliveryEntityId = distributionTripartiteDeliveryEntity.getId();
}
//备货信息构建
DistributionStockupEntity stockupEntity = new DistributionStockupEntity();
stockupEntity.setForklift(Long.parseLong((String) deliveryInfo.get("forklift")));
stockupEntity.setStockupStatus("2");
stockupEntity.setStockupArea((String) deliveryInfo.get("goodsAreaId"));
stockupEntity.setStockupUser(AuthUtil.getUser().getUserId().toString());
stockupEntity.setLoader(Long.parseLong((String) deliveryInfo.get("loader")) );
stockupEntity.setAssignStatus("2");
stockupEntity.setAssignTime(new Date());
String stockUpdate = (String) deliveryInfo.get("stockupDate");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Date date = format.parse(stockUpdate);
stockupEntity.setStockupDate(date);
//完成对备货任务信息的保存
result = distributionStockupService.save(stockupEntity);
Long stockupEntityId = stockupEntity.getId();
StringBuffer reservationIdBuffer = new StringBuffer();
StringBuffer stockArticleIdBuffer = new StringBuffer();
AtomicReference<String> warehouseName = new AtomicReference<>();
AtomicInteger count = new AtomicInteger();
Arrays.stream(ids).forEach(id -> {
//对预约信息进行备货状态修改
DistributionReservationEntity reservationEntity = this.getBaseMapper().selectById(id);
String stockupStatus = reservationEntity.getStockupStatus();
if (!stockupStatus.equals("1")){
//预约任务处于未备货状态
//预约信息编号拼接
reservationIdBuffer.append(reservationEntity.getId()).append(",");
//修改备货状态为待备货
reservationEntity.setStockupStatus("2");
this.updateById(reservationEntity);
reservationEntity.setUpdateTime(new Date());
reservationEntity.setUpdateUser(AuthUtil.getUserId());
reservationEntity.setIsDeleted(1);
}
String stockArticleId = reservationEntity.getStockArticleId();
stockArticleIdBuffer.append(stockArticleId).append(",");
//对预约信息中的订单状态进行修改并且将预约信息从预约列表中清除
String[] stockArticleIds = stockArticleId.split(",");
for (String articleId : stockArticleIds) {
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(articleId);
stockArticleEntity.setState(3);
distributionStockArticleService.updateById(stockArticleEntity);
warehouseName.set(stockArticleEntity.getWarehouse());
//TODO 统计预约单下订单配送包件数量
}
//构建预约备货中间表信息
DistributionStockupInfoEntity distributionStockupInfoEntity = new DistributionStockupInfoEntity();
distributionStockupInfoEntity.setReservationId(reservationEntity.getId().toString());
distributionStockupInfoEntity.setStockupId(stockupEntityId.toString());
distributionStockupInfoService.save(distributionStockupInfoEntity);
count.getAndIncrement();
});
reservationIdBuffer.deleteCharAt(reservationIdBuffer.length() - 1);
stockupEntity.setIds(reservationIdBuffer.toString());
result = distributionStockupService.updateById(stockupEntity);
//这里还需要将数据保存至配送列表中
DistributionDeliveryListEntity distributionDeliveryListEntity = new DistributionDeliveryListEntity();
distributionDeliveryListEntity.setReservationId(idsStr);
stockArticleIdBuffer.deleteCharAt(stockArticleIdBuffer.length() - 1);
distributionDeliveryListEntity.setOrderId(stockArticleIdBuffer.toString());
distributionDeliveryListEntity.setWarehouseId(warehouseName.get());
String masterDriverName = (String) deliveryInfo.get("masterDriverName");
String slaveDriverNames = (String) deliveryInfo.get("slaveDriverNames");
if (Func.isBlank(masterDriverName)){
//这里就是外协配送的方式
distributionDeliveryListEntity.setDriverName((String) deliveryInfo.get("driverName"));
distributionDeliveryListEntity.setKind("2");
distributionDeliveryListEntity.setVehicleName((String) deliveryInfo.get("vehicleNum"));
}else {
distributionDeliveryListEntity.setVehicleName((String) deliveryInfo.get("vehicleNums"));
distributionDeliveryListEntity.setVehicleId((String) deliveryInfo.get("vehicleIds"));
distributionDeliveryListEntity.setDriverName(masterDriverName+","+slaveDriverNames);
distributionDeliveryListEntity.setDriverId((String) deliveryInfo.get("driverIds"));
distributionDeliveryListEntity.setKind("1");
}
distributionDeliveryListEntity.setCustomersNumber(Integer.parseInt(count.toString()));
distributionDeliveryListEntity.setState("1");
distributionDeliveryListEntity.setLoadingTeamId((String) deliveryInfo.get("loader"));
distributionDeliveryListEntity.setLoadingTeamName((String) deliveryInfo.get("loaderName"));
//TODO 配送的来源,这里是通过预约单转配送
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
} catch (Exception e) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
log.error("异常错误+{"+e.getMessage()+"}");
return R.fail("操作失败!!!");
}
return R.status(result);
}
}

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationStockarticleServiceImpl.java

@ -0,0 +1,54 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.service.impl;
import com.logpm.distribution.entity.DistributionReservationStockarticleEntity;
import com.logpm.distribution.vo.DistributionReservationStockarticleVO;
import com.logpm.distribution.excel.DistributionReservationStockarticleExcel;
import com.logpm.distribution.mapper.DistributionReservationStockarticleMapper;
import com.logpm.distribution.service.IDistributionReservationStockarticleService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;
/**
* 预约订单中间表 服务实现类
*
* @author TJJ
* @since 2023-06-28
*/
@Service
public class DistributionReservationStockarticleServiceImpl extends BaseServiceImpl<DistributionReservationStockarticleMapper, DistributionReservationStockarticleEntity> implements IDistributionReservationStockarticleService {
@Override
public IPage<DistributionReservationStockarticleVO> selectDistributionReservationStockarticlePage(IPage<DistributionReservationStockarticleVO> page, DistributionReservationStockarticleVO distributionReservationStockarticle) {
return page.setRecords(baseMapper.selectDistributionReservationStockarticlePage(page, distributionReservationStockarticle));
}
@Override
public List<DistributionReservationStockarticleExcel> exportDistributionReservationStockarticle(Wrapper<DistributionReservationStockarticleEntity> queryWrapper) {
List<DistributionReservationStockarticleExcel> distributionReservationStockarticleList = baseMapper.exportDistributionReservationStockarticle(queryWrapper);
//distributionReservationStockarticleList.forEach(distributionReservationStockarticle -> {
// distributionReservationStockarticle.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionReservationStockarticle.getType()));
//});
return distributionReservationStockarticleList;
}
}

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationStocklistServiceImpl.java

@ -0,0 +1,54 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.service.impl;
import com.logpm.distribution.entity.DistributionReservationStocklistEntity;
import com.logpm.distribution.vo.DistributionReservationStocklistVO;
import com.logpm.distribution.excel.DistributionReservationStocklistExcel;
import com.logpm.distribution.mapper.DistributionReservationStocklistMapper;
import com.logpm.distribution.service.IDistributionReservationStocklistService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;
/**
* 预约库存中间表 服务实现类
*
* @author TJJ
* @since 2023-06-28
*/
@Service
public class DistributionReservationStocklistServiceImpl extends BaseServiceImpl<DistributionReservationStocklistMapper, DistributionReservationStocklistEntity> implements IDistributionReservationStocklistService {
@Override
public IPage<DistributionReservationStocklistVO> selectDistributionReservationStocklistPage(IPage<DistributionReservationStocklistVO> page, DistributionReservationStocklistVO distributionReservationStocklist) {
return page.setRecords(baseMapper.selectDistributionReservationStocklistPage(page, distributionReservationStocklist));
}
@Override
public List<DistributionReservationStocklistExcel> exportDistributionReservationStocklist(Wrapper<DistributionReservationStocklistEntity> queryWrapper) {
List<DistributionReservationStocklistExcel> distributionReservationStocklistList = baseMapper.exportDistributionReservationStocklist(queryWrapper);
//distributionReservationStocklistList.forEach(distributionReservationStocklist -> {
// distributionReservationStocklist.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionReservationStocklist.getType()));
//});
return distributionReservationStocklistList;
}
}

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSelfDeliveryServiceImpl.java

@ -0,0 +1,54 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.service.impl;
import com.logpm.distribution.entity.DistributionSelfDeliveryEntity;
import com.logpm.distribution.vo.DistributionSelfDeliveryVO;
import com.logpm.distribution.excel.DistributionSelfDeliveryExcel;
import com.logpm.distribution.mapper.DistributionSelfDeliveryMapper;
import com.logpm.distribution.service.IDistributionSelfDeliveryService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;
/**
* 自主配送信息列表 服务实现类
*
* @author TJJ
* @since 2023-06-26
*/
@Service
public class DistributionSelfDeliveryServiceImpl extends BaseServiceImpl<DistributionSelfDeliveryMapper, DistributionSelfDeliveryEntity> implements IDistributionSelfDeliveryService {
@Override
public IPage<DistributionSelfDeliveryVO> selectDistributionSelfDeliveryPage(IPage<DistributionSelfDeliveryVO> page, DistributionSelfDeliveryVO distributionSelfDelivery) {
return page.setRecords(baseMapper.selectDistributionSelfDeliveryPage(page, distributionSelfDelivery));
}
@Override
public List<DistributionSelfDeliveryExcel> exportDistributionSelfDelivery(Wrapper<DistributionSelfDeliveryEntity> queryWrapper) {
List<DistributionSelfDeliveryExcel> distributionSelfDeliveryList = baseMapper.exportDistributionSelfDelivery(queryWrapper);
//distributionSelfDeliveryList.forEach(distributionSelfDelivery -> {
// distributionSelfDelivery.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionSelfDelivery.getType()));
//});
return distributionSelfDeliveryList;
}
}

35
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionServiceLogServiceImpl.java

@ -17,14 +17,22 @@
package com.logpm.distribution.service.impl;
import com.logpm.distribution.entity.DistributionServiceLogEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.vo.DistributionServiceLogVO;
import com.logpm.distribution.excel.DistributionServiceLogExcel;
import com.logpm.distribution.mapper.DistributionServiceLogMapper;
import com.logpm.distribution.service.IDistributionServiceLogService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
/**
@ -34,8 +42,12 @@ import java.util.List;
* @since 2023-06-14
*/
@Service
@Slf4j
@AllArgsConstructor
public class DistributionServiceLogServiceImpl extends BaseServiceImpl<DistributionServiceLogMapper, DistributionServiceLogEntity> implements IDistributionServiceLogService {
private final IDistributionStockArticleService distributionStockArticleService;
@Override
public IPage<DistributionServiceLogVO> selectDistributionServiceLogPage(IPage<DistributionServiceLogVO> page, DistributionServiceLogVO distributionServiceLog) {
return page.setRecords(baseMapper.selectDistributionServiceLogPage(page, distributionServiceLog));
@ -51,4 +63,27 @@ public class DistributionServiceLogServiceImpl extends BaseServiceImpl<Distribut
return distributionServiceLogList;
}
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean OwnSaveOrUpdate(DistributionServiceLogEntity distributionServiceLog) {
String[] split = distributionServiceLog.getStockArticleId().split(",");
List<DistributionServiceLogEntity> list = new ArrayList<>();
List<DistributionStockArticleEntity> entityList = new ArrayList<>();
for (String s : split) {
DistributionServiceLogEntity distributionServiceLogEntity = new DistributionServiceLogEntity();
BeanUtils.copyProperties(distributionServiceLog,distributionServiceLogEntity);
distributionServiceLogEntity.setStockArticleId(s);
list.add(distributionServiceLogEntity);
DistributionStockArticleEntity distributionStockArticle = new DistributionStockArticleEntity();
distributionStockArticle.setId(Long.parseLong(s));
distributionStockArticle.setTypeService(distributionServiceLog.getTypeService());
distributionStockArticle.setRate(distributionServiceLog.getCost());
entityList.add(distributionStockArticle);
}
//添加记录
this.saveBatch(list);
//修改订单服务状态
return distributionStockArticleService.saveOrUpdateBatch(entityList);
}
}

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

@ -223,4 +223,23 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
return distributionStockArticleEntity;
}
@Override
public R<List<DistributionStockArticleVO>> getStockArticleInfo(String ids) {
if (Func.isBlank(ids)){
log.error("参数异常:+["+ids+"]");
return R.fail("操作失败!!!");
}
List<Long> l = Func.toLongList(ids);
List<DistributionStockArticleVO> distributionStockArticleEntityList = new ArrayList<>();
//这里进行订单查询
l.forEach(id->{
DistributionStockArticleEntity distributionStockArticleEntity = this.baseMapper.selectById(id);
DistributionStockArticleVO distributionStockArticleVO = Func.copy(distributionStockArticleEntity, DistributionStockArticleVO.class);
distributionStockArticleEntityList.add(distributionStockArticleVO);
});
return R.data(distributionStockArticleEntityList);
}
}

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionTripartiteDeliveryServiceImpl.java

@ -0,0 +1,54 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.service.impl;
import com.logpm.distribution.entity.DistributionTripartiteDeliveryEntity;
import com.logpm.distribution.vo.DistributionTripartiteDeliveryVO;
import com.logpm.distribution.excel.DistributionTripartiteDeliveryExcel;
import com.logpm.distribution.mapper.DistributionTripartiteDeliveryMapper;
import com.logpm.distribution.service.IDistributionTripartiteDeliveryService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;
/**
* 外协配送信息列表 服务实现类
*
* @author TJJ
* @since 2023-06-26
*/
@Service
public class DistributionTripartiteDeliveryServiceImpl extends BaseServiceImpl<DistributionTripartiteDeliveryMapper, DistributionTripartiteDeliveryEntity> implements IDistributionTripartiteDeliveryService {
@Override
public IPage<DistributionTripartiteDeliveryVO> selectDistributionTripartiteDeliveryPage(IPage<DistributionTripartiteDeliveryVO> page, DistributionTripartiteDeliveryVO distributionTripartiteDelivery) {
return page.setRecords(baseMapper.selectDistributionTripartiteDeliveryPage(page, distributionTripartiteDelivery));
}
@Override
public List<DistributionTripartiteDeliveryExcel> exportDistributionTripartiteDelivery(Wrapper<DistributionTripartiteDeliveryEntity> queryWrapper) {
List<DistributionTripartiteDeliveryExcel> distributionTripartiteDeliveryList = baseMapper.exportDistributionTripartiteDelivery(queryWrapper);
//distributionTripartiteDeliveryList.forEach(distributionTripartiteDelivery -> {
// distributionTripartiteDelivery.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionTripartiteDelivery.getType()));
//});
return distributionTripartiteDeliveryList;
}
}

2
blade-service/logpm-distribution/src/main/resources/application-dev.yml

@ -1,6 +1,6 @@
#服务器端口
server:
port: 8200
port: 8600
#数据源配置
#spring:

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save