Browse Source

Merge branch 'dev' into dist.1.2.0

# Conflicts:
#	blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataWarehouseClient.java
#	blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java
#	blade-service/logpm-distribution/pom.xml
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.java
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.xml
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionLoadscanService.java
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionLoadscanServiceImpl.java
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
dist.1.3.0
pref_mail@163.com 6 months ago
parent
commit
de2726690a
  1. 20
      blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java
  2. 26
      blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java
  3. 53
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAbnormalRecordZeroDetailEntity.java
  4. 4
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordClient.java
  5. 44
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordZeroDetailClient.java
  6. 8
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataClientEntity.java
  7. 2
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataDriverArteryClient.java
  8. 5
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataWarehouseClient.java
  9. 16
      blade-service-api/logpm-business-api/src/main/java/com/logpm/business/dto/BusinessSanDTO.java
  10. 20
      blade-service-api/logpm-business-api/src/main/java/com/logpm/business/entity/BusinessPreOrderEntity.java
  11. 8
      blade-service-api/logpm-business-api/src/main/java/com/logpm/business/vo/DistributionBusinessPreCarDetalPackageVO.java
  12. 4
      blade-service-api/logpm-business-api/src/main/java/com/logpm/business/vo/DistributionBusinessPreCarNumberVO.java
  13. 3
      blade-service-api/logpm-business-api/src/main/java/com/logpm/business/vo/DistributionBusinessPreCarNumerPageQueryVO.java
  14. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  15. 44
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  16. 11
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelNumberClient.java
  17. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionReservationStockarticleClient.java
  18. 9
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java
  19. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java
  20. 16
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/ZeroPackageSupplyVO.java
  21. 10
      blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/mt/feign/MtFactoryDataClient.java
  22. 492
      blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/QualityDeliverEntity.java
  23. 14
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/AftersalesOrderDTO.java
  24. 4
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/ChangesRecordDTO.java
  25. 32
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/MerchantStatisticsDTO.java
  26. 55
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsAftersalesOrderRecordEntity.java
  27. 52
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsBalanceOrderInfoEntity.java
  28. 4
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsChangesRecordEntity.java
  29. 70
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsDistributionPackageEntity.java
  30. 74
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsOrderInfoEntity.java
  31. 105
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsReconciliationOrderInfoEntity.java
  32. 95
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsTrunklinePackageEntity.java
  33. 67
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsWarehousePackageEntity.java
  34. 19
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/feign/IOrderInfoClient.java
  35. 143
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/vo/StatisticsOrderInfoVO.java
  36. 2
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  37. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java
  38. 7
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/WaybillDetailDTO.java
  39. 16
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/ZeroPackageDTO.java
  40. 51
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineScanZeroDetailEntity.java
  41. 18
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/IExtractedDataClient.java
  42. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineAdvanceClient.java
  43. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineAdvanceDetailClient.java
  44. 26
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineScanZeroDetailClient.java
  45. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadOrderInfoVO.java
  46. 13
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/GoodsLoadingNumVO.java
  47. 5
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadZeroListVO.java
  48. 9
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java
  49. 14
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OrderCodeNumVO.java
  50. 4
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OrderScanDetailVO.java
  51. 6
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/SignPackageVO.java
  52. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadScanVO.java
  53. 11
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineScanZeroDetailVO.java
  54. 6
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java
  55. 16
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroPackageVO.java
  56. 40
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroSuppleListVO.java
  57. 4
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroSuppleVO.java
  58. 25
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseSettingEntity.java
  59. 21
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWayBillDetail.java
  60. 46
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java
  61. 19
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseSettingClient.java
  62. 204
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillExportVO.java
  63. 87
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillVO.java
  64. 31
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAbnormalRecordController.java
  65. 5
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AbnormalRecordDTO.java
  66. 6
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java
  67. 22
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordZeroDetailClient.java
  68. 9
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordZeroDetailMapper.java
  69. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordService.java
  70. 12
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordZeroDetailService.java
  71. 343
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java
  72. 25
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordZeroDetailServiceImpl.java
  73. 2
      blade-service/logpm-aftersales/src/main/resources/application-dev.yml
  74. 11
      blade-service/logpm-aftersales/src/main/resources/application-test.yml
  75. 31
      blade-service/logpm-basic/src/main/resources/application-test.yml
  76. 20
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataFactoryCategoryImporter.java
  77. 16
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java
  78. 31
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java
  79. 20
      blade-service/logpm-basicdata/src/main/resources/application-test.yml
  80. 19
      blade-service/logpm-business/src/main/java/com/logpm/business/api/BusinessPreOrderApi.java
  81. 20
      blade-service/logpm-business/src/main/java/com/logpm/business/controller/DistributionBusinessPreOrderController.java
  82. 51
      blade-service/logpm-business/src/main/java/com/logpm/business/mapper/BusinessPreOrderMapper.xml
  83. 6
      blade-service/logpm-business/src/main/java/com/logpm/business/service/IBusinessPreOrderService.java
  84. 13
      blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessAsyncServiceImpl.java
  85. 311
      blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessPreOrderServiceImpl.java
  86. 2
      blade-service/logpm-business/src/main/resources/application-dev.yml
  87. 16
      blade-service/logpm-business/src/main/resources/application-test.yml
  88. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java
  89. 64
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  90. 29
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelNumberClient.java
  91. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionReservationStockarticleClient.java
  92. 32
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java
  93. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  94. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.java
  95. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.xml
  96. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  97. 69
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  98. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelNumberMapper.java
  99. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelNumberMapper.xml
  100. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.java
  101. Some files were not shown because too many files have changed in this diff Show More

20
blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java

@ -57,6 +57,26 @@ public abstract class FanoutConstants {
}
interface CHECKWAYBILL {
// 交换机
String EXCHANGE = "fanout.trunkline.checkwaybill" + ModuleNameConstant.DEVAUTH;
interface QUEUE {
String CHECKWAYBILL_INCOMINGDATA = "fanout.trunkline.checkwaybill.statisticsdata.incomingdata" + ModuleNameConstant.DEVAUTH;
}
}
interface CANCLECHECKWAYBILL {
// 交换机
String EXCHANGE = "fanout.trunkline.canclecheckwaybill" + ModuleNameConstant.DEVAUTH;
interface QUEUE {
String CANCLECHECKWAYBILL_INCOMINGDATA = "fanout.trunkline.canclecheckwaybill.statisticsdata.incomingdata" + ModuleNameConstant.DEVAUTH;
}
}
}

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

@ -43,27 +43,25 @@ public class LauncherServiceImpl implements LauncherService {
// 开启elk日志
// PropsUtil.setProperty(props, "blade.log.elk.destination", LauncherConstant.elkAddr(profile));
PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));
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");
PropsUtil.setProperty(props, "dubbo.protocol.name", "dubbo");
PropsUtil.setProperty(props, "dubbo.registry.address", "nacos://" + LauncherConstant.nacosAddr(profile));
PropsUtil.setProperty(props, "dubbo.version", AppConstant.APPLICATION_VERSION);
PropsUtil.setProperty(props, "dubbo.scan.base-packages", AppConstant.BASE_PACKAGES);
// PropsUtil.setProperty(props, "dubbo.application.name", appName);
// PropsUtil.setProperty(props, "dubbo.application.qos.enable", "false");
// PropsUtil.setProperty(props, "dubbo.protocol.name", "dubbo");
// PropsUtil.setProperty(props, "dubbo.registry.address", "nacos://" + LauncherConstant.nacosAddr(profile));
// PropsUtil.setProperty(props, "dubbo.version", AppConstant.APPLICATION_VERSION);
// PropsUtil.setProperty(props, "dubbo.scan.base-packages", AppConstant.BASE_PACKAGES);
// seata注册地址
PropsUtil.setProperty(props, "seata.service.grouplist.default", LauncherConstant.seataAddr(profile));
// seata注册group格式
PropsUtil.setProperty(props, "seata.tx-service-group", LauncherConstant.seataServiceGroup(appName));
// seata配置服务group
PropsUtil.setProperty(props, "seata.service.vgroup-mapping.".concat(LauncherConstant.seataServiceGroup(appName)), LauncherConstant.DEFAULT_MODE);
// // seata注册地址
// PropsUtil.setProperty(props, "seata.service.grouplist.default", LauncherConstant.seataAddr(profile));
// // seata注册group格式
// PropsUtil.setProperty(props, "seata.tx-service-group", LauncherConstant.seataServiceGroup(appName));
// // seata配置服务group
// PropsUtil.setProperty(props, "seata.service.vgroup-mapping.".concat(LauncherConstant.seataServiceGroup(appName)), LauncherConstant.DEFAULT_MODE);
// seata注册模式配置
// PropsUtil.setProperty(props, "seata.registry.type", LauncherConstant.NACOS_MODE);
// PropsUtil.setProperty(props, "seata.registry.nacos.server-addr", LauncherConstant.nacosAddr(profile));

53
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAbnormalRecordZeroDetailEntity.java

@ -0,0 +1,53 @@
package com.logpm.aftersales.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("logpm_aftersales_abnormal_record_zero_detail")
@ApiModel(value = "AftersalesAbnormalRecordZeroDetail对象", description = "异常记录零担明细表")
@EqualsAndHashCode(callSuper = true)
public class AftersalesAbnormalRecordZeroDetailEntity extends TenantEntity {
/** 预留1 */
@ApiModelProperty(name = "预留1",notes = "")
private String reserve1 ;
/** 预留2 */
@ApiModelProperty(name = "预留2",notes = "")
private String reserve2 ;
/** 预留3 */
@ApiModelProperty(name = "预留3",notes = "")
private String reserve3 ;
/** 预留4 */
@ApiModelProperty(name = "预留4",notes = "")
private String reserve4 ;
/** 预留5 */
@ApiModelProperty(name = "预留5",notes = "")
private String reserve5 ;
@ApiModelProperty(name = "异常记录id",notes = "")
private Long abnormalRecordId;
@ApiModelProperty(name = "包件id",notes = "")
private Long packageId;
@ApiModelProperty(name = "品类id",notes = "")
private Long goodsId;
@ApiModelProperty(name = "品类名称",notes = "")
private String goodsName;
@ApiModelProperty(name = "异常数量",notes = "")
private Integer abnormalNum;
@ApiModelProperty(name = "回库数量",notes = "")
private Integer returnNum;
@ApiModelProperty(name = "入库数量",notes = "")
private Integer incomingNum;
}

4
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordClient.java

@ -58,4 +58,8 @@ public interface IAftersalesAbnormalRecordClient {
@PostMapping(API_PREFIX+"/addAbnormalRecordList")
void addAbnormalRecordList(@RequestBody List<AftersalesAbnormalRecordEntity> abnormalRecordEntities);
@PostMapping(API_PREFIX+"/addAbnormalRecordListReturnList")
List<AftersalesAbnormalRecordEntity> addAbnormalRecordListReturnList(@RequestBody List<AftersalesAbnormalRecordEntity> abnormalRecordEntities);
}

44
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordZeroDetailClient.java

@ -0,0 +1,44 @@
/*
* 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.aftersales.feign;
import com.logpm.aftersales.entity.AftersalesAbnormalRecordZeroDetailEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* 货位 Feign接口类
*
* @author zhy
* @since 2023-09-02
*/
@FeignClient(
value = ModuleNameConstant.APPLICATION_AFTERSALES_NAME
)
public interface IAftersalesAbnormalRecordZeroDetailClient {
String API_PREFIX = "abormal/client";
String TOP = API_PREFIX + "/top";
@PostMapping(API_PREFIX+"/addAbnormalRecordZeroDetail")
void addAbnormalRecordZeroDetail(@RequestBody List<AftersalesAbnormalRecordZeroDetailEntity> abnormalRecordZeroDetailEntityList);
}

8
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataClientEntity.java

@ -80,6 +80,14 @@ public class BasicdataClientEntity extends TenantEntity {
*/
@ApiModelProperty(value = "客户类型 ")
private String clientType;
/**
* 结算对象类型1.工厂 2.商场 3.个人
*/
@ApiModelProperty(value = "结算对象类型 ")
private String cleanObjType;
/**
* 详细地址
*/

2
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataDriverArteryClient.java

@ -62,7 +62,7 @@ public interface IBasicdataDriverArteryClient {
List<JSONObject> findDriverListByName(@RequestParam String driverName,@RequestParam String jobType);
@GetMapping(API_PREFIX+"/getDriverArteryById")
BasicdataDriverArteryEntity getDriverArteryById(Long id);
BasicdataDriverArteryEntity getDriverArteryById(@RequestParam Long id);
@GetMapping(API_PREFIX+"/findDriverListByNameAndWarehouseId")
List<JSONObject> findDriverListByNameAndWarehouseId(@RequestParam String driverName, @RequestParam String jobType, @RequestParam Long warehouseId);

5
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataWarehouseClient.java

@ -139,11 +139,12 @@ public interface IBasicdataWarehouseClient {
@GetMapping(API_PREFIX + "/findWarehouseList")
List<JSONObject> findWarehouseList(@RequestParam("warehouseName") String warehouseName);
@GetMapping(API_PREFIX + "/findWarehousesByIds")
List<BasicdataWarehouseEntity> findWarehousesByIds(@RequestParam("ids") List<Long> ids);
@GetMapping(API_PREFIX + "/findAllList")
List<BasicdataWarehouseEntity> findAllList();
@GetMapping(API_PREFIX + "/findWarehousesByIds")
List<BasicdataWarehouseEntity> findWarehousesByIds(@RequestParam("ids") List<Long> ids);
}

16
blade-service-api/logpm-business-api/src/main/java/com/logpm/business/dto/BusinessSanDTO.java

@ -9,9 +9,9 @@ public class BusinessSanDTO {
@ApiModelProperty(value = "配送车次")
private String distrCarNumber;
@ApiModelProperty(value = "包间码")
String orderPackageCode;
private String orderPackageCode;
@ApiModelProperty(value = "预约单号")
String reservationCode;
private String reservationCode;
@ApiModelProperty(value = "异常入库 0 正常 1 异常")
private Integer inWarehouseException;
@ -30,4 +30,16 @@ public class BusinessSanDTO {
@ApiModelProperty(value = "打托方式")
private String trayType;//打托方式
@ApiModelProperty(value = "订单号")
private String orderCode;
@ApiModelProperty(value = "零担品类")
private String firsts;
@ApiModelProperty(value = "卸车数量")
private Integer unloadNum;
@ApiModelProperty(value = "状态 1 定制品 2 库存品 3零担")
private String conditions;
}

20
blade-service-api/logpm-business-api/src/main/java/com/logpm/business/entity/BusinessPreOrderEntity.java

@ -169,10 +169,28 @@ public class BusinessPreOrderEntity extends TenantEntity {
@ApiModelProperty(value = "物料单位")
private String materialUnit;
/**
* 数量
* 计划数量
*/
@ApiModelProperty(value = "数量")
private Integer quantity;
/**
* 卸车数量
*/
@ApiModelProperty(value = "卸车数量")
private Integer unloadNum;
/**
* 装车数量
*/
@ApiModelProperty(value = "装车数量")
private Integer loadNum;
/**
* 车次号
*/

8
blade-service-api/logpm-business-api/src/main/java/com/logpm/business/vo/DistributionBusinessPreCarDetalPackageVO.java

@ -24,5 +24,13 @@ public class DistributionBusinessPreCarDetalPackageVO {
private Integer inWarehouse;
@ApiModelProperty(value = "操作状态 0 正常操作 1.补录操作")
private Integer operationStatus;
@ApiModelProperty(value = "计划数量")
private Integer quantity;
@ApiModelProperty(value = "卸车数量")
private Integer unloadNum;
@ApiModelProperty(value = "预约单号")
private String reservationCode;
}

4
blade-service-api/logpm-business-api/src/main/java/com/logpm/business/vo/DistributionBusinessPreCarNumberVO.java

@ -24,5 +24,9 @@ public class DistributionBusinessPreCarNumberVO {
@ApiModelProperty(value = "待入库件数")
private Integer restNum;
@ApiModelProperty(value = "配送司机")
private String driverName;
@ApiModelProperty(value = "配送时间")
private String taskTime;
}

3
blade-service-api/logpm-business-api/src/main/java/com/logpm/business/vo/DistributionBusinessPreCarNumerPageQueryVO.java

@ -13,4 +13,7 @@ public class DistributionBusinessPreCarNumerPageQueryVO {
private String orderCode;
@ApiModelProperty(value = "配送车次号")
private String distrCarNumber;
@ApiModelProperty(value = "物品类型 1 定制品 3零担")
private String conditions;
}

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

@ -332,11 +332,11 @@ public class DistributionParcelListEntity extends TenantEntity {
@ApiModelProperty(value = "包件冻结状态")
private String orderPackageFreezeStatus;
@ApiModelProperty(value = "包件冻结状态")
@ApiModelProperty(value = "预约状态")
private String orderPackageReservationStatus;
@ApiModelProperty(value = "包件冻结状态")
@ApiModelProperty(value = "预约数量")
@TableField(exist = false)
private Integer reservationNum;

44
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java

@ -16,10 +16,12 @@
*/
package com.logpm.distribution.feign;
import com.alibaba.fastjson.JSONObject;
import com.logpm.distribution.dto.FindParamterDTO;
import com.logpm.distribution.dto.OrderPackageDTO;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.ZeroPackageSupplyVO;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.tool.api.R;
@ -100,9 +102,26 @@ public interface IDistributionParcelListClient {
@PostMapping(API_PREFIX + "/update")
void update(@RequestBody DistributionParcelListEntity distributionParcelListEntity);
/**
* 根据 订单号合开单品类查询指定仓库下的零担的品类信息
* @param orderCode
* @param first
* @param warehouseId
* @return
*/
@GetMapping(API_PREFIX + "/findDistributionParcelListEntityByOrderCodeAndFirstName")
DistributionParcelListEntity findDistributionParcelListEntityByOrderCodeAndFirstName(@RequestParam String orderCode, @RequestParam String first,@RequestParam Long warehouseId);
@GetMapping(API_PREFIX + "/SumEntityZkByOrderId")
Integer SumEntityByOrderId(@RequestParam Long orderId, @RequestParam Long warehouseId);
/**
* 根据 订单号合开单品类查询指定租户下的仓库的零担的品类信息
* @param tenantId
* @param orderCode
* @param first
* @param warehouseId
* @return
*/
@GetMapping(API_PREFIX + "/findDistributionParcelListEntityByOrderCodeAndFirstNameAndTenantId")
DistributionParcelListEntity findDistributionParcelListEntityByOrderCodeAndFirstNameAndTenantId(@RequestParam String tenantId,@RequestParam String orderCode, @RequestParam String first,@RequestParam Long warehouseId);
/**
@ -211,6 +230,27 @@ public interface IDistributionParcelListClient {
@PostMapping(API_PREFIX + "/clearPallet")
void clearPallet(@RequestBody List<Long> orderPackageIdList);
@GetMapping(API_PREFIX + "/findPackageGoodsListByWaybillNo")
List<JSONObject> findPackageGoodsListByWaybillNo(@RequestParam String waybillNo);
@GetMapping(API_PREFIX + "/findListByStockArticleId")
List<DistributionParcelListEntity> findListByStockArticleId(@RequestParam Long articleId);
@GetMapping(API_PREFIX + "/findEntityVOListByOrderCode")
List<DistributionParcelListVO> findEntityVOListByOrderCode(@RequestParam String orderCode, @RequestParam Long fromWarehouseId);
@GetMapping(API_PREFIX + "/addZeroQuantity")
void addZeroQuantity(@RequestParam Long packageId, @RequestParam int num);
@PostMapping(API_PREFIX + "/findListByStockArticleIds")
List<ZeroPackageSupplyVO> findListByStockArticleIds(@RequestBody List<Long> orderIdList);
@GetMapping(API_PREFIX + "/updateWaybillIdByWaybillNo")
void updateWaybillIdByWaybillNo(@RequestParam Long waybillId, @RequestParam String waybillNo);
@GetMapping(API_PREFIX + "/findOrderCodeByWaybillId")
List<String> findOrderCodeByWaybillId(@RequestParam Long waybillId);
@PostMapping(API_PREFIX + "/clearWaybillInfoByParceListIds")
void clearWaybillInfoByParceListIds(@RequestBody List<Long> parceListIds);
}

11
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelNumberClient.java

@ -54,4 +54,15 @@ public interface IDistributionParcelNumberClient {
@PostMapping(API_PREFIX + "/addBatch")
void addBatch(@RequestBody List<DistributionParcelNumberEntity> parcelNumberList);
@PostMapping(API_PREFIX + "/findListByParcelListIds")
List<DistributionParcelNumberEntity> findListByParcelListIds(@RequestBody List<Long> parcelListIds);
@PostMapping(API_PREFIX + "/updateList")
void updateList(@RequestBody List<DistributionParcelNumberEntity> updateParceNumberList);
@GetMapping(API_PREFIX+"/findListByStockArticleId")
List<DistributionParcelNumberEntity> findListByStockArticleId(@RequestParam Long orderId);
@GetMapping(API_PREFIX+"/addHandleQuantity")
void addHandleQuantity(@RequestParam Long packageId, @RequestParam int num);
}

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

@ -21,8 +21,12 @@ 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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* 预约订单中间表 Feign接口类
*
@ -47,4 +51,6 @@ public interface IDistributionReservationStockarticleClient {
@GetMapping(TOP)
BladePage<DistributionReservationStockarticleEntity> reservationStockArticleTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
@PostMapping(API_PREFIX+"/findReservationIdsByOrderCodes")
List<Long> findReservationIdsByOrderCodes(@RequestBody List<String> orderCodes);
}

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

@ -75,6 +75,9 @@ public interface IDistributionStockArticleClient {
@GetMapping(API_PREFIX + "/findByOrderSelfNum")
DistributionStockArticleEntity findByOrderSelfNum(@RequestParam String orderCode, @RequestParam Long warehouseId);
@GetMapping(API_PREFIX + "/findByOrderSelfNumAndTenantId")
DistributionStockArticleEntity findByOrderSelfNumAndTenantId(@RequestParam String tenantId,@RequestParam String orderCode, @RequestParam Long warehouseId);
@GetMapping(API_PREFIX + "/deleteById")
void deleteById(@RequestParam Long orderId);
@ -211,4 +214,10 @@ public interface IDistributionStockArticleClient {
@GetMapping(API_PREFIX + "/findSignNumByWaybillNo")
Integer findSignNumByWaybillNo(@RequestParam String waybillNo, @RequestParam Long destinationWarehouseId);
@GetMapping(API_PREFIX + "/addSignNum")
void addSignNum(@RequestParam Long orderId, @RequestParam Integer unloadNum);
@PostMapping(value = API_PREFIX + "/deleteZeroOrderByWaybillNoList",consumes = MediaType.APPLICATION_JSON_VALUE)
void deleteZeroOrderByWaybillNoList(@RequestBody List<String> waybillNoList);
}

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java

@ -37,6 +37,8 @@ import java.util.List;
public class DistributionParcelListVO extends DistributionParcelListEntity {
private static final long serialVersionUID = 1L;
private Integer zeroPackageTotalNum;
private String stockupStatus; //备货状态
private String stockupStatusName; //备货名称
private Date stockupDate;

16
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/ZeroPackageSupplyVO.java

@ -0,0 +1,16 @@
package com.logpm.distribution.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class ZeroPackageSupplyVO implements Serializable {
private Long stockArticleId;
private Long packageId;
private Long goodsId;
private String goodsName;//品类名称
private Integer stockNum;//品类在库件数
}

10
blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/mt/feign/MtFactoryDataClient.java

@ -4,8 +4,8 @@ package com.logpm.factory.mt.feign;
import com.logpm.factory.mt.dto.MtPushDataDTO;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Set;
@ -20,10 +20,10 @@ public interface MtFactoryDataClient {
/**
* 根据订单编号查询梦天的数据
* @param orderCodes
* @param orderCode
*/
@GetMapping(HANDLEDATATOPLATFORM)
List<MtPushDataDTO> orderPushData(@RequestParam("orderCode") Set<String> orderCodes);
@PostMapping(HANDLEDATATOPLATFORM)
List<MtPushDataDTO> orderPushData(@RequestBody Set<String> orderCode);

492
blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/QualityDeliverEntity.java

@ -0,0 +1,492 @@
package com.logpm.report.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springblade.core.tenant.mp.TenantEntity;
import java.math.BigDecimal;
import java.util.Date;
/**
* 配送明细
*
* @author zqb
* @create 2024-08-23
*/
@Data
@TableName("logpm_quality_deliver")
@ApiModel(value = "QualityDeliver对象", description = "配送明细")
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class QualityDeliverEntity extends TenantEntity {
private static final long serialVersionUID = 1L;
/**
* 事业线
*/
@ApiModelProperty(value = "事业线")
private String businessUnit;
/**
* 作业仓库
*/
@ApiModelProperty(value = "作业仓库")
private String warehouseName;
/**
* 作业仓库ID
*/
@ApiModelProperty(value = "作业仓库ID")
private Long warehouseId;
/**
* 品牌
*/
@ApiModelProperty(value = "品牌")
private String brandName;
/**
* 客户名称
*/
@ApiModelProperty(value = "客户名称")
private String customName;
/**
* 客户电话
*/
@ApiModelProperty(value = "客户电话")
private String customPhone;
/**
* 客户地址
*/
@ApiModelProperty(value = "客户地址")
private String customAddress;
/**
* 运单发货单位
*/
@ApiModelProperty(value = "运单发货单位")
private String shipperUnit;
/**
* 运单发货人
*/
@ApiModelProperty(value = "运单发货人")
private String shipperPerson;
/**
* 运单发货电话
*/
@ApiModelProperty(value = "运单发货电话")
private String shipperMobile;
/**
* 运单发货地址
*/
@ApiModelProperty(value = "运单发货地址")
private String shipperAddress;
/**
* 运单收货单位
*/
@ApiModelProperty(value = "运单收货单位")
private String consigneeUnit;
/**
* 运单收货人
*/
@ApiModelProperty(value = "运单收货人")
private String consigneePerson;
/**
* 运单收货电话
*/
@ApiModelProperty(value = "运单收货电话")
private String consigneeMobile;
/**
* 运单收货地址
*/
@ApiModelProperty(value = "运单收货地址")
private String consigneeAddress;
/**
* 运单号
*/
@ApiModelProperty(value = "运单号")
private String waybillNumber;
/**
* 商场名称
*/
@ApiModelProperty(value = "商场名称")
private String mallName;
/**
* 商场ID
*/
@ApiModelProperty(value = "商场ID")
private Long mallId;
/**
* 入库批次号
*/
@ApiModelProperty(value = "入库批次号")
private String incomingBatch;
/**
* 订单号
*/
@ApiModelProperty(value = "订单号")
private String orderCode;
/**
* 包条码
*/
@ApiModelProperty(value = "包条码")
private String orderPackageCode;
/**
* 客户车次号
*/
@ApiModelProperty(value = "客户车次号")
private String trainNumber;
/**
* 数据类型 1 定制品 2 库存品 3零担
*/
@ApiModelProperty(value = "数据类型 1 定制品 2 库存品 3零担")
private Integer conditions;
/**
* 一级品
*/
@ApiModelProperty(value = "一级品")
private String firstsProduct;
/**
* 二级品
*/
@ApiModelProperty(value = "二级品")
private String secondProduct;
/**
* 三级品
*/
@ApiModelProperty(value = "三级品")
private String thirdProduct;
/**
* 体积
*/
@ApiModelProperty(value = "体积")
private BigDecimal volume;
/**
* 重量
*/
@ApiModelProperty(value = "重量")
private BigDecimal weight;
/**
* 成本结算品类
*/
@ApiModelProperty(value = "成本结算品类")
private String costCategory;
/**
* 收入结算品类
*/
@ApiModelProperty(value = "收入结算品类")
private String revenueCategory;
/**
* 物料信息
*/
@ApiModelProperty(value = "物料信息")
private String materielName;
/**
* 物料编码
*/
@ApiModelProperty(value = "物料编码")
private String materielCode;
/**
* 始发仓
*/
@ApiModelProperty(value = "始发仓")
private String beginWarehouseName;
/**
* 始发仓入库时间
*/
@ApiModelProperty(value = "始发仓入库时间")
private Date beginWarehouseInTime;
/**
* 始发仓发货时间
*/
@ApiModelProperty(value = "始发仓发货时间")
private Date beginWarehouseOutTime;
/**
* 末端仓入库时间
*/
@ApiModelProperty(value = "末端仓入库时间")
private String endWarehouseInTime;
/**
* 计划配送单号 包含配送车次和自提车次 直发商家 对应干线车次 三方中转 三方中转车次号
*/
@ApiModelProperty(value = "计划配送单号 包含配送车次和自提车次 直发商家 对应干线车次 三方中转 三方中转车次号")
private String planTrainNumber;
/**
* 计划预约单号 只有商市配自提采用自提车次号 三方中转采用三方中转车次号
*/
@ApiModelProperty(value = "计划预约单号 只有商市配,自提采用自提车次号 三方中转采用三方中转车次号")
private String planReservationCode;
/**
* 配送日期
*/
@ApiModelProperty(value = "配送日期")
private Date deliveryTime;
/**
* 配送类型2市配 1商配 3自提 4三方中转5直发商家 签收节点进行驱动) 没有这个字段
*/
@ApiModelProperty(value = "配送类型2市配 1商配 3自提 4三方中转(5直发商家 【签收节点进行驱动】) 没有这个字段")
private String deliveryType;
/**
* 配送种类
*/
@ApiModelProperty(value = "配送种类")
private String deliveryKind;
/**
* 配送车辆 存在多个逗号拼接
*/
@ApiModelProperty(value = "配送车辆 存在多个逗号拼接")
private String vehicleName;
/**
* 配送司机 存在多个逗号拼接
*/
@ApiModelProperty(value = "配送司机 存在多个逗号拼接")
private String driverName;
/**
* 配送公司
*/
@ApiModelProperty(value = "配送公司")
private String distributionCompany;
/**
* 计划时间
*/
@ApiModelProperty(value = "计划时间")
private Date deliveryPlanTime;
/**
* 计划数量
*/
@ApiModelProperty(value = "计划数量")
private Integer planNum;
/**
* 计划类型新增 补录
*/
@ApiModelProperty(value = "计划类型(新增 补录)")
private String planType;
/**
* 计划人
*/
@ApiModelProperty(value = "计划人")
private String deliveryCreateUserName;
/**
* 备货单号
*/
@ApiModelProperty(value = "备货单号")
private String stockupCode;
/**
* 备货人
*/
@ApiModelProperty(value = "备货人")
private String stockupUserName;
/**
* 备货时间
*/
@ApiModelProperty(value = "备货时间")
private Date stockupFinishTime;
/**
* 备货数量
*/
@ApiModelProperty(value = "备货数量")
private Integer stockNum;
/**
* 备货区
*/
@ApiModelProperty(value = "备货区")
private String stockAllocation;
/**
* 备货类型新增 补录
*/
@ApiModelProperty(value = "备货类型(新增 补录)")
private String stockupType;
/**
* 装车人
*/
@ApiModelProperty(value = "装车人")
private String loadUserName;
/**
* 装车时间
*/
@ApiModelProperty(value = "装车时间")
private Date loadTime;
/**
* 装车配送单号 包含配送车次和自提车次 直发商家 对应干线车次 三方中转 三方中转车次号
*/
@ApiModelProperty(value = "装车配送单号 包含配送车次和自提车次 直发商家 对应干线车次 三方中转 三方中转车次号")
private String loadTrainNumber;
/**
* 装车数量
*/
@ApiModelProperty(value = "装车数量")
private Integer loadNum;
/**
* 装车类型按件装车 一键装车 补录
*/
@ApiModelProperty(value = "装车类型(按件装车 一键装车 补录)")
private String loadType;
/**
* 发车人
*/
@ApiModelProperty(value = "发车人")
private String startCarUserName;
/**
* 发车时间
*/
@ApiModelProperty(value = "发车时间")
private String startCarTime;
/**
* 到达人
*/
@ApiModelProperty(value = "到达人")
private String arriveCarUserName;
/**
* 到达时间
*/
@ApiModelProperty(value = "到达时间")
private String arriveCarTime;
/**
* 到达省
*/
@ApiModelProperty(value = "到达省")
private String arriveProvince;
/**
* 到达市
*/
@ApiModelProperty(value = "到达市")
private String arriveCity;
/**
* 到达区/
*/
@ApiModelProperty(value = "到达区/县")
private String arriveDistrict;
/**
* 到达地址
*/
@ApiModelProperty(value = "到达地址")
private String arriveAddress;
/**
* 签收人
*/
@ApiModelProperty(value = "签收人")
private String signUserName;
/**
* 签收时间
*/
@ApiModelProperty(value = "签收时间")
private String signTime;
/**
* 签收状态 1.已签收 0 未签收 -1 已回库 -2 滞留
*/
@ApiModelProperty(value = "签收状态 1.已签收 0 未签收 -1 已回库 -2 滞留")
private String signStatus;
/**
* 签收数量
*/
@ApiModelProperty(value = "签收数量")
private String signNum;
/**
* 签收配送单号 包含配送车次和自提车次 直发商家 对应干线车次 三方中转 三方中转车次号
*/
@ApiModelProperty(value = "签收配送单号 包含配送车次和自提车次 直发商家 对应干线车次 三方中转 三方中转车次号")
private String signTrainNumber;
/**
* 签收预约单号 只有商市配自提没有该字段
*/
@ApiModelProperty(value = "签收预约单号 只有商市配,自提没有该字段")
private String signReservationCode;
/**
* 签收车牌
*/
@ApiModelProperty(value = "签收车牌")
private String signCarNumber;
/**
* 签收类型按件签收 批量签收 补录
*/
@ApiModelProperty(value = "签收类型(按件签收 批量签收 补录)")
private String signType;
/**
* 车辆类型
*/
@ApiModelProperty(value = "车辆类型")
private String signCarType;
/**
* 复核人
*/
@ApiModelProperty(value = "复核人")
private String reviewUserName;
/**
* 复核时间 复核时间=回库时间
*/
@ApiModelProperty(value = "复核时间 复核时间=回库时间")
private String reviewTime;
/**
* 滞留人
*/
@ApiModelProperty(value = "滞留人")
private String retentionUserName;
/**
* 滞留时间
*/
@ApiModelProperty(value = "滞留时间")
private String retentionTime;
/**
* 配送成本
*/
@ApiModelProperty(value = "配送成本")
private String distributionCost;
/**
* 分货费成本
*/
@ApiModelProperty(value = "分货费成本")
private String apartCost;
/**
* 上楼费成本
*/
@ApiModelProperty(value = "上楼费成本")
private String apstairsCost;
/**
* 平移费成本
*/
@ApiModelProperty(value = "平移费成本")
private String moveCost;
/**
* 装卸费成本
*/
@ApiModelProperty(value = "装卸费成本")
private String stevedoreCost;
/**
* 公里数成本
*/
@ApiModelProperty(value = "公里数成本")
private String kiloAllowCost;
/**
* 补贴公里数成本
*/
@ApiModelProperty(value = "补贴公里数成本")
private String allowKiloAllowCost;
/**
* 超区公里数成本
*/
@ApiModelProperty(value = "超区公里数成本")
private String ultrAllpwCost;
/**
* 点位补贴成本
*/
@ApiModelProperty(value = "点位补贴成本")
private String pointAllowCost;
/**
* 保底费成本
*/
@ApiModelProperty(value = "保底费成本")
private String guarCost;
/**
* 油费成本
*/
@ApiModelProperty(value = "油费成本")
private String fuelCost;
/**
* 其它成本
*/
@ApiModelProperty(value = "其它成本")
private String otherCost;
}

14
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/AftersalesOrderDTO.java

@ -0,0 +1,14 @@
package com.logpm.statistics.dto;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
public class AftersalesOrderDTO implements Serializable {
private String aftersaleOrder;
private BigDecimal aftersalesFee;
}

4
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/ChangesRecordDTO.java

@ -9,9 +9,9 @@ import java.util.List;
@Data
public class ChangesRecordDTO implements Serializable {
private Long orderInfoId;//单id
private Long reconciliationOrderId;//对账单id
private String orderCode;//单号
private String reconciliationOrderCode;//对账单号
private BigDecimal pickupFee = BigDecimal.ZERO;//提货费

32
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/MerchantStatisticsDTO.java

@ -3,6 +3,7 @@ package com.logpm.statistics.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
@ -18,11 +19,42 @@ public class MerchantStatisticsDTO implements Serializable {
private Integer listType;
private String consignee;
private String shipper;
private Long consigneeId;
private Integer confirmStatisticsOrder;//对账状态 0 1
private List<Long> reconciliationOrderIds;
private List<Long> orderInfoIds;
private Long balanceOrderInfoId;
private Long reconciliationOrderId;
private List<AftersalesOrderDTO> aftersalesOrderDTOS;
private Integer syncFeeSstatus;
private Integer signStatus;
private String waybillNo;
private String orderCode;
private String departureWarehouseName;
private String destinationWarehouseName;
private String typeService;
private String shipperPerson;
private String shipperMoblie;
private String consigneePerson;
private String consigneeMobile;
private String cleanObjType;
private String payType;
private String payWay;
private String openTimeStartStr;
private String openTimeEndStr;
private Date openTimeStart;
private Date openTimeEnd;
}

55
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsAftersalesOrderRecordEntity.java

@ -0,0 +1,55 @@
package com.logpm.statistics.entity;
import com.baomidou.mybatisplus.annotation.TableName;
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;
@Data
@TableName("logpm_statistics_aftersales_order_record")
@ApiModel(value = "StatisticsAftersalesOrderRecord对象", description = "售后单记录表")
@EqualsAndHashCode(callSuper = true)
public class StatisticsAftersalesOrderRecordEntity 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;
private Long reconciliationOrderId;
private Long balanceOrderId;
private String aftersaleOrderCode;
private BigDecimal aftersalesFee;
}

52
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsBalanceOrderInfoEntity.java

@ -42,48 +42,27 @@ public class StatisticsBalanceOrderInfoEntity extends TenantEntity {
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "结算单号")
private String balanceOrderNo;//结算单号
@ApiModelProperty(value = "品牌")
private String brand;//品牌
private String waybillNo;//运单号
private String orderCode;//订单号
private String typeService;//服务类型
private Integer typeService;//服务类型
private String productGoods;//货物品类
private String productTypeNum;//品类数
private BigDecimal totalBalanceFee;//结算总金额
private Integer totalCount;//总数量
private BigDecimal totalWeight;//总重量
private BigDecimal totalVolume;//总体积
private String shipper;//发货单位
private String shipperPerson;//发货人
private String shipperMobile;//发货电话
private String shipperAddress;//发货地址
private Long consigneeId;//收货单位ID
private String consignee;//收货单位
private String consigneePerson;//收货人
private String consigneeMobile;//收货电话
private String consigneeAddress;//收货地址
private String departure;//发站
private String destination;//到站
private String departureWarehouseName;//发站仓
private String destinationWarehouseName;//目的仓
private String payType;//支付类型
private String payWay;//支付方式
private Integer isAftersale;//是否有售后
private BigDecimal aftersalesFee;//售后金额
private BigDecimal totalBalanceFee;//结算总金额
private BigDecimal totalFee;
private BigDecimal openFee;
private BigDecimal realTotalFee;//实际费用
private BigDecimal pickupFee;//提货费
private BigDecimal freightFee;//运费
private BigDecimal warehouseServiceFee;//仓库服务费
@ -91,25 +70,19 @@ public class StatisticsBalanceOrderInfoEntity extends TenantEntity {
private BigDecimal warehouseManageFee;//仓储管理费
private BigDecimal warehouseSortingFee;//仓储分拣费
private BigDecimal warehouseOperatingFee;//仓储操作费
private BigDecimal deliveryServiceFee;//配送服务费
private BigDecimal deliveryFee;//配送费
private BigDecimal deliveryServiceFee;//配送服务费
private BigDecimal deliveryLoadingFee;//配送装卸费
private BigDecimal deliverySortingFee;//配送分拣费
private BigDecimal deliveryUpfloorFee;//配送上楼费
private BigDecimal deliveryMoveFee;//配送平移费
private BigDecimal deliveryOtherFee;//配送其他费
private BigDecimal deliveryCrossingFee;//超区费
private BigDecimal installFee;//安装费
private BigDecimal quotationFee;//保价费
private BigDecimal claimingValue;//申明价值
private BigDecimal otherFee;//其他费
private BigDecimal returnFee;//回扣
private BigDecimal thirdOprationFee;//三方操作费
private BigDecimal xPay;//现付
private BigDecimal dPay;//到付
private BigDecimal hPay;//回付
private BigDecimal yPay;//月结
private Integer isAftersale;//是否有售后
private String aftersaleOrder;//售后单号
private BigDecimal aftersalesFee;//售后金额
private Integer balanceStatus;//0未结算 1部分结算 2已结算
@ -125,4 +98,7 @@ public class StatisticsBalanceOrderInfoEntity extends TenantEntity {
private String abnormalUserName;//异常确认人
private String abnormalRemark;//异常备注
private Long destinationWarehouseId;//目的仓id
private String destinationWarehouseName;//目的仓名称
}

4
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsChangesRecordEntity.java

@ -42,9 +42,9 @@ public class StatisticsChangesRecordEntity extends TenantEntity {
@ApiModelProperty(value = "预留5")
private String reserve5;
private Long orderInfoId;//单id
private Long reconciliationOrderId;//对账单id
private String orderCode;//单号
private String reconciliationOrderCode;//对账单号
private BigDecimal pickupFee;//提货费

70
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsDistributionPackageEntity.java

@ -42,30 +42,6 @@ public class StatisticsDistributionPackageEntity extends TenantEntity {
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* 仓库id
*/
@ApiModelProperty(value = "仓库id")
private Long warehouseId;
/**
* 品牌id
*/
@ApiModelProperty(value = "品牌id")
private Long brandId;
/**
* 客户id
*/
@ApiModelProperty(value = "客户id")
private Long consigneeId;
/**
* 仓库名称
*/
@ApiModelProperty(value = "仓库名称")
private String warehouseName;
/**
* 运单id
*/
@ -102,56 +78,44 @@ public class StatisticsDistributionPackageEntity extends TenantEntity {
@ApiModelProperty(value = "品类Id")
private String productId;
/**
* 配送车次号
*/
@ApiModelProperty(value = "配送车次号")
private String trainNumber;
/**
* 件数
*/
@ApiModelProperty(value = "件数")
private Integer totalNum;
private Integer num;
/**
* 重量
*/
@ApiModelProperty(value = "重量")
private BigDecimal totalWeight;
private BigDecimal weight;
@ApiModelProperty(value = "体积")
private BigDecimal totalVolume;
private BigDecimal volume;
private BigDecimal openPrice;
private BigDecimal totalPrice;
private BigDecimal deliveryServiceFee;
private BigDecimal systemDeliveryFee;
private BigDecimal deliveryFee;
private BigDecimal deliveryServiceFee;
private BigDecimal deliveryLoadingFee;
private BigDecimal deliverySortingFee;
private BigDecimal deliveryUpfloorFee;
private BigDecimal deliveryMoveFee;
private BigDecimal deliveryDistance;
private BigDecimal deliveryOtherFee;
private BigDecimal deliveryCrossingFee;
private Integer isAftersales;
private BigDecimal aftersalesPrice;
private Integer hasStatement;
private Long statementCreateTime;
private String statementCreateUser;
private Integer isZero;
private BigDecimal realDeliveryServiceFee;
private BigDecimal realDeliveryFee;
private BigDecimal realDeliveryLoadingFee;
private BigDecimal realDeliverySortingFee;
private BigDecimal realDeliveryUpfloorFee;
private BigDecimal realDeliveryMoveFee;
private BigDecimal realDeliveryDistance;
private BigDecimal realDeliveryCrossingFee;
private Integer goodsType; //1 订制品 2零担 3库存品
private String typeService; //1 商配 2市配 3自提 4三方中转
private Long orderInfoId;
private Integer isSign;//是否签收 0否 1是
private Integer signNum;//签收件数
private Date signTime; //签收时间
private Integer isSign;//是否签收1是0否
private String trainNumber;
private Long brandId;
private Long consigneeId;
private Integer systemDeliveryChargeType;
private Integer deliveryChargeType;
}

74
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsOrderInfoEntity.java

@ -48,27 +48,93 @@ public class StatisticsOrderInfoEntity extends TenantEntity {
@ApiModelProperty(value = "品牌id")
private Long brandId;
@ApiModelProperty(value = "品牌")
private String brand;
/**
* 收货单位id
*/
@ApiModelProperty(value = "收货单位id")
private Long consigneeId;
@ApiModelProperty(value = "收货单位")
private String consignee;
@ApiModelProperty(value = "订单号")
private String orderCode;
@ApiModelProperty(value = "运单id")
private Long waybillId;
@ApiModelProperty(value = "运单号")
private String waybillNo;
private String typeService;
@ApiModelProperty(value = "服务类型")
private Integer typeService;
@ApiModelProperty(value = "签收状态")
private Integer signStatus;// 签收状态 0未签收 1部分签收 2已签收
@ApiModelProperty(value = "签收时间")
private Date signDate;
@ApiModelProperty(value = "计算金额状态 0否 1是")
private Integer syncFeeStatus;
@ApiModelProperty(value = "计算金额时间")
private Date syncFeeDate;
@ApiModelProperty(value = "生成对账单状态")
private Integer createReconciliationOrderStatus;//0未生成 1已生成
@ApiModelProperty(value = "生成对账单确认人")
private String createReconciliationUserName;//生成对账单确认人
@ApiModelProperty(value = "生成对账单时间")
private Date createReconciliationDate;//生成对账单时间
@ApiModelProperty(value = "商家对账单id")
private Long reconciliationOrderId;//商家对账单id
@ApiModelProperty(value = "商家对账单号")
private String reconciliationOrderNo;//商家对账单号
private Integer confirmStatisticsOrder;//0未确认 1已确认
private String confirmStatisticsUserName;//对账确认人
private Date confirmStatisticsTime;//对账确认时间
@ApiModelProperty(value = "确认对账状态")
private Integer confirmBalanceOrderStatus;//0未确认 1已确认
@ApiModelProperty(value = "确认对账人")
private String confirmBalanceUserName;//对账确认人
@ApiModelProperty(value = "确认对账时间")
private Date confirmBalanceDate;//对账确认时间
private Long waybillInfoId;//运单维度id
@ApiModelProperty(value = "结算单id")
private Long balanceOrderId;//结算单id
@ApiModelProperty(value = "结算单号")
private String balanceOrderNo;//结算单号
@ApiModelProperty(value = "异动金额")
private BigDecimal changesFee;//异动金额
@ApiModelProperty(value = "异常金额")
private BigDecimal exceptionFee;//异常金额
@ApiModelProperty(value = "在库周期")
private Integer cycle;//在库周期
@ApiModelProperty(value = "在库费用区间")
private String warehouseFeeInterval;//费用区间
@ApiModelProperty(value = "发站仓id")
private Long departureWarehouseId;
@ApiModelProperty(value = "发站仓名称")
private String departureWarehouseName;
@ApiModelProperty(value = "目的仓id")
private Long destinationWarehouseId;
@ApiModelProperty(value = "目的仓名称")
private String destinationWarehouseName;
@ApiModelProperty(value = "取消对账单确认人")
private String cancleReconciliationUserName;//取消对账单确认人
@ApiModelProperty(value = "取消对账单时间")
private Date cancleReconciliationDate;//取消对账单时间
}

105
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsReconciliationOrderInfoEntity.java

@ -0,0 +1,105 @@
package com.logpm.statistics.entity;
import com.baomidou.mybatisplus.annotation.TableName;
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;
@Data
@TableName("logpm_statistics_reconciliation_order_info")
@ApiModel(value = "StatisticsReconciliationOrderInfo对象", description = "对账单表")
@EqualsAndHashCode(callSuper = true)
public class StatisticsReconciliationOrderInfoEntity 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;
@ApiModelProperty(value = "对账单号")
private String reconciliationOrderNo;//对账单号
private String waybillNo;//运单号
private String orderCode;//订单号
@ApiModelProperty(value = "品牌")
private String brand;//品牌
private Long consigneeId;//收货单位ID
private String consignee;//收货单位
private Long destinationWarehouseId;//目的仓id
private String destinationWarehouseName;//目的仓名称
private Integer totalNum;//总数量
private BigDecimal totalWeight;//总重量
private BigDecimal totalVolume;//总体积
private BigDecimal realTotalFee;//实际费用
private BigDecimal pickupFee;//提货费
private BigDecimal freightFee;//运费
private BigDecimal warehouseServiceFee;//仓库服务费
private BigDecimal warehouseFee;//仓储费
private BigDecimal warehouseManageFee;//仓储管理费
private BigDecimal warehouseSortingFee;//仓储分拣费
private BigDecimal warehouseOperatingFee;//仓储操作费
private BigDecimal deliveryFee;//配送费
private BigDecimal deliveryServiceFee;//配送服务费
private BigDecimal deliveryLoadingFee;//配送装卸费
private BigDecimal deliverySortingFee;//配送分拣费
private BigDecimal deliveryUpfloorFee;//配送上楼费
private BigDecimal deliveryMoveFee;//配送平移费
private BigDecimal deliveryOtherFee;//配送其他费
private BigDecimal deliveryCrossingFee;//超区费
private BigDecimal installFee;//安装费
private BigDecimal otherFee;//其他费
private Integer isAftersale;//是否有售后
private String aftersaleOrder;//售后单号
private BigDecimal aftersalesFee;//售后金额
private String createUserName;
private Integer isChanges;//是否有异动 0 否 1是
private BigDecimal changesFee;//异动金额
private String changesItems;//异动栏目
private String changesRemark;//异动备注
private Date changesTime;//异动时间
private Integer checkStatus;//确认结算状态 0为确认 1已确认
private String checkUserName;
private Date checkTime;
private String balanceOrderNo;
private Long balanceOrderId;
}

95
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsTrunklinePackageEntity.java

@ -41,18 +41,6 @@ public class StatisticsTrunklinePackageEntity extends TenantEntity {
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* 仓库id
*/
@ApiModelProperty(value = "仓库id")
private Long warehouseId;
/**
* 仓库名称
*/
@ApiModelProperty(value = "仓库名称")
private String warehouseName;
/**
* 运单id
*/
@ -87,59 +75,66 @@ public class StatisticsTrunklinePackageEntity extends TenantEntity {
* 品类名称
*/
@ApiModelProperty(value = "品类id")
private String productId;
private Long productId;
/**
* 件数
*/
@ApiModelProperty(value = "件数")
private Integer totalNum;
private Integer num;
/**
* 重量
*/
@ApiModelProperty(value = "重量")
private BigDecimal totalWeight;
private BigDecimal weight;
@ApiModelProperty(value = "体积")
private BigDecimal totalVolume;
private BigDecimal openPrice;
private BigDecimal totalPrice;
private BigDecimal pickupFee;
private BigDecimal freightFee;
private BigDecimal installFee;
private BigDecimal quotationFee;
private BigDecimal claimingValue;
private BigDecimal otherFee;
private BigDecimal returnFee;
private BigDecimal thirdOprationFee;
private BigDecimal xPay;
private BigDecimal dPay;
private BigDecimal hPay;
private BigDecimal yPay;
private Integer isAftersales;
private BigDecimal aftersalesPrice;
private Integer hasStatement;
private Long statementCreateTime;
private String statementCreateUser;
private Integer isZero;
private BigDecimal realPickupFee;
private BigDecimal realFreightFee;
private BigDecimal realInstallFee;
private BigDecimal realQuotationFee;
private BigDecimal realClaimingValue;
private BigDecimal realOtherFee;
private BigDecimal realReturnFee;
private BigDecimal realThirdOprationFee;
private BigDecimal realXPay;
private BigDecimal realDPay;
private BigDecimal realHPay;
private BigDecimal realYPay;
private BigDecimal volume;
@ApiModelProperty(value = "实际运费计算方式")
private Integer freightChargeType;
@ApiModelProperty(value = "系统运费计算方式")
private Integer systemFreightChargeType;
@ApiModelProperty(value = "实际提货费计算方式")
private Integer pickupChargeType;
@ApiModelProperty(value = "系统提货费计算方式")
private Integer systemPickupChargeType;
@ApiModelProperty(value = "系统总费用")
private BigDecimal totalSystemFee;
@ApiModelProperty(value = "实际总费用")
private BigDecimal totalRealFee;
@ApiModelProperty(value = "系统运费单价")
private BigDecimal systemFreightPrice;
@ApiModelProperty(value = "实际运费单价")
private BigDecimal freightPrice;
@ApiModelProperty(value = "系统提货单价")
private BigDecimal systemPickupPrice;
@ApiModelProperty(value = "实际提货单价")
private BigDecimal pickupPrice;
@ApiModelProperty(value = "保价费")
private BigDecimal insurancePrice;
@ApiModelProperty(value = "保价费")
private BigDecimal otherPrice;
@ApiModelProperty(value = "三方操作费")
private BigDecimal thirdOperationPrice;
@ApiModelProperty(value = "货物类型")
private Integer goodsType; //1 订制品 2零担 3库存品
private String typeService; //1 商配 2市配 3自提 4三方中转
@ApiModelProperty(value = "订单id")
private Long orderInfoId;
private Long brandId;
private Long consigneeId;
}

67
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/StatisticsWarehousePackageEntity.java

@ -42,18 +42,6 @@ public class StatisticsWarehousePackageEntity extends TenantEntity {
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* 仓库id
*/
@ApiModelProperty(value = "仓库id")
private Long warehouseId;
/**
* 仓库名称
*/
@ApiModelProperty(value = "仓库名称")
private String warehouseName;
/**
* 运单id
*/
@ -88,53 +76,58 @@ public class StatisticsWarehousePackageEntity extends TenantEntity {
* 品类名称
*/
@ApiModelProperty(value = "品类id")
private String productId;
private Long productId;
/**
* 件数
*/
@ApiModelProperty(value = "件数")
private Integer totalNum;
private Integer num;
/**
* 重量
*/
@ApiModelProperty(value = "重量")
private BigDecimal totalWeight;
private BigDecimal weight;
@ApiModelProperty(value = "体积")
private BigDecimal totalVolume;
private BigDecimal volume;
private BigDecimal openPrice;
private BigDecimal totalPrice;
private Date incomingTime;
@ApiModelProperty(value = "签收时间")
private Date signTime;
@ApiModelProperty(value = "末端仓入库时间")
private Date warehouseEntryTimeEnd;
private Date outingTime;
@ApiModelProperty(value = "在库周期")
private Integer cycle;
@ApiModelProperty(value = "仓库费用区间")
private String warehouseFeeInterval;
@ApiModelProperty(value = "仓库服务费合计")
private BigDecimal warehouseServiceFee;
@ApiModelProperty(value = "仓库仓储费")
private BigDecimal warehouseFee;
@ApiModelProperty(value = "仓库管理费")
private BigDecimal warehouseManageFee;
@ApiModelProperty(value = "仓库分拣费")
private BigDecimal warehouseSortingFee;
@ApiModelProperty(value = "仓库操作费")
private BigDecimal warehouseOperatingFee;
private Integer isAftersales;
private BigDecimal aftersalesPrice;
private Integer hasStatement;
private Long statementCreateTime;
private String statementCreateUser;
private Integer isZero;
private String realWarehouseFeeInterval;
private BigDecimal realWarehouseServiceFee;
private BigDecimal realWarehouseFee;
private BigDecimal realWarehouseManageFee;
private BigDecimal realWarehouseSortingFee;
private BigDecimal realWarehouseOperatingFee;
@ApiModelProperty(value = "货物类型")
private Integer goodsType; //1 订制品 2零担 3库存品
private String typeService; //1 商配 2市配 3自提 4三方中转
@ApiModelProperty(value = "订单id")
private Long orderInfoId;
@ApiModelProperty(value = "签收时间")
private Date signTime;
private Date warehouseEntryTimeEnd;
private Long brandId;
private Long consigneeId;
private Integer chargeType;
}

19
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/feign/IOrderInfoClient.java

@ -0,0 +1,19 @@
package com.logpm.statistics.feign;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(
value = ModuleNameConstant.APPLICATION_BASICDATA_NAME
)
public interface IOrderInfoClient {
String API_PREFIX = "/orderInfo/client";
@GetMapping(API_PREFIX+"/findCreateRencilitionOrderStatus")
Integer findCreateRencilitionOrderStatus(@RequestParam Long waybillId);
}

143
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/vo/StatisticsOrderInfoVO.java

@ -10,9 +10,11 @@ import java.util.Date;
public class StatisticsOrderInfoVO implements Serializable {
private Long orderInfoId;
private Long brandId;//品牌id
private String brand;//品牌
private Long waybillId;//运单id
private String waybillNo;//运单号
private String orderNo;//订单号
private String orderCode;//订单号
private String typeService;//商家服务类型
private String shipper;//发货单位
private String shipperPerson;//发货人
@ -22,117 +24,64 @@ public class StatisticsOrderInfoVO implements Serializable {
private String consigneePerson;//收货人
private String consigneeMobile;//收货电话
private String consigneeAddress;//收货地址
private String waybillStatus;//运单状态
private Integer signStatus;//订单签收状态
private Integer isCheck;//运单是否审核
private Date signDate;//签收时间
private Date openTime;//开单时间
private String goodsName;//物料品类
private String departure;//发站
private String destination;//到站
private Long departureWarehouseId;//发站仓id
private String departureWarehouseName;//发站仓
private Long destinationWarehouseId;//目的仓id
private String destinationWarehouseName;//目的仓
private String deliveryMethod;//配送方式
private String departure;//发站
private String destination;//到站
private String customerTrain;//客户车次号
private String receiptStatus;//回单状态
private String waybillRemark;//运单备注
private String statisticsFang;
private String statisticsFang;//结算方
private String payType;//支付类型
private String payWay;//支付方式
private String storeBusiness;
private Integer confirmStatisticsOrder;//0未确认 1已确认
private String confirmStatisticsUserName;//对账确认人
private Date confirmStatisticsTime;//对账确认时间
private Integer isEdit;
private String goodsTypeNum;
private Integer productTypeNum;
private Integer totalcount;//订单数量
private String goodsName;//物料品类
private Integer totalNum;//订单数量
private BigDecimal totalWeight;//订单重量
private BigDecimal totalVolume;//订单体积
private BigDecimal systemFreightPrice;
private BigDecimal freightPrice;
private BigDecimal systemPickupPrice;
private BigDecimal pickupPrice;
private BigDecimal warehouseServiceFee;
private BigDecimal warehouseFee;
private BigDecimal warehouseManageFee;
private BigDecimal warehouseSortingFee;
private BigDecimal warehouseOperatingFee;
private BigDecimal systemDeliveryFee;
private BigDecimal deliveryFee;
private BigDecimal deliveryServiceFee;
private BigDecimal deliveryLoadingFee;
private BigDecimal deliverySortingFee;
private BigDecimal deliveryUpfloorFee;
private BigDecimal deliveryMoveFee;
private BigDecimal deliveryOtherFee;
private BigDecimal deliveryCrossingFee;
private Integer cycle;//在库周期
private String cleanObjType;//结算方
private String warehouseFeeInterval;//费用区间
private BigDecimal installFee = BigDecimal.ZERO;//安装费
private BigDecimal otherFee = BigDecimal.ZERO;//其他费
private BigDecimal totalFee;//总费用
private BigDecimal openFee;//开单费
//干线
private BigDecimal pickupFee;//开单提货费
private BigDecimal realPickupFee;//实际提货费
private BigDecimal freightFee;//开单运费
private BigDecimal realFreightFee;//实际运费
private BigDecimal installFee;//开单安装费
private BigDecimal realInstallFee;//实际安装费
private BigDecimal quotationFee;//保价费
private BigDecimal realQuotationFee;//实际保价费
private BigDecimal claimingValue;//开单申明价值
private BigDecimal realClaimingValue;//实际申明价值
private BigDecimal otherFee;//开单其他费
private BigDecimal realOtherFee;//实际其他费
private BigDecimal returnFee;//开单回扣
private BigDecimal realReturnFee;//实际回扣
private BigDecimal thirdOprationFee;//开单三方操作费
private BigDecimal realThirdOprationFee;//实际三方操作费
private BigDecimal xPay;//开单现付
private BigDecimal realXPay;//实际现付
private BigDecimal dPay;//开单到付
private BigDecimal realDPay;//实际到付
private BigDecimal hPay;//开单回付
private BigDecimal realHPay;//实际回付
private BigDecimal yPay;//开单月结
private BigDecimal realYPay;//实际月结
private Date incomingTime;//入库时间
private Date outingTime;//出库时间
private String warehouseFeeInterval;
private BigDecimal warehouseServiceFee;//开单仓库服务费
private BigDecimal realWarehouseServiceFee;//实际仓库服务费
private BigDecimal warehouseFee;//开单仓储费
private BigDecimal realWarehouseFee;//实际仓储费
private BigDecimal warehouseManageFee;//开单仓储管理费
private BigDecimal realWarehouseManageFee;//实际仓储管理费
private BigDecimal warehouseSortingFee;//开单仓储分拣费
private BigDecimal realWarehouseSortingFee;//实际仓储分拣费
private BigDecimal warehouseOperatingFee;//开单仓储操作费
private BigDecimal realWarehouseOperatingFee;//实际仓储操作费
//配送
private BigDecimal deliveryServiceFee;//开单配送服务费
private BigDecimal realDeliveryServiceFee;//实际配送服务费
private BigDecimal deliveryFee;//开单配送费
private BigDecimal realDeliveryFee;//实际配送费
private BigDecimal deliveryLoadingFee;//配送装卸费
private BigDecimal realDeliveryLoadingFee;//实际配送装卸费
private BigDecimal deliverySortingFee;//配送分拣费
private BigDecimal realDeliverySortingFee;//实际配送分拣费
private BigDecimal deliveryUpfloorFee;//开单配送上楼费
private BigDecimal realDeliveryUpfloorFee;//实际配送上楼费
private BigDecimal deliveryMoveFee;//开单配送平移费
private BigDecimal realDeliveryMoveFee;//实际平移费
private BigDecimal deliveryDistance;//开单配送公里数
private BigDecimal realDeliveryDistance;//实际配送公里数
private BigDecimal deliveryCrossingFee;//开单超区费
private BigDecimal realDeliveryCrossingFee;//实际超区费
// private String isAftersales;
// private BigDecimal aftersalesFee;
private BigDecimal totalStatementFee;//对账总金额
private String statementStatus;
private BigDecimal hasStatementFee;
private String statementCreateUser;
private Integer isChanges;//是否异动0否 1是
private BigDecimal changesFee;//异动金额
private String changesItems;//异动条目
private String changesRemark;//异动备注
private Date changesTime;//最晚一条
private Integer signNum;
private Date signTime;//最晚一条
private String statisticsStatus;//结算状态
private BigDecimal totalStatisticsFee;//结算总金额
private BigDecimal hasStatisticsFee;//已结算金额
private Integer isAbnormalStatistics;//是否异常结算 0否 1是
private BigDecimal abnormalFee;//异常金额
private Integer syncFeeStatus;
private Date syncFeeDate;
private Integer createReconciliationOrderStatus;//0未生成 1已生成
private String createReconciliationUserName;//生成对账单确认人
private Date createReconciliationDate;//生成对账单时间
}

2
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java

@ -37,6 +37,7 @@ public class LoadCarsDTO implements Serializable {
private String deliveryType;
private String operator;
private String settlementPerson;
private String customerType;
private Long warehouseId;
private List<Long> warehouseIds;
@ -61,6 +62,7 @@ public class LoadCarsDTO implements Serializable {
private String orderPackageCode;
private List<ProductInfoDTO> productInfoList = new ArrayList<>();
private List<ZeroPackageDTO> zeroPackageList = new ArrayList<>();
private String goodsName;

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java

@ -159,5 +159,8 @@ public class OpenOrderDTO implements Serializable {
private List<TrunklineAdvanceDetailEntity> updateAdvanceDetailList;
private String checkReson;
private String checkRemark;
}

7
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/WaybillDetailDTO.java

@ -1,5 +1,6 @@
package com.logpm.trunkline.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@ -22,5 +23,11 @@ public class WaybillDetailDTO implements Serializable {
private BigDecimal subtotalFreight;//小计运费
private BigDecimal deliveryPrice;//配送单价
private BigDecimal subtotalDeliveryFee;//小计配送费用
private BigDecimal pickupPrice;
private BigDecimal freightPrice;
private Integer systemChargeType;
private Integer systemDeliveryChargeType;
private Integer systemPickupChargeType;
private Integer systemWarehouseChargeType;
}

16
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/ZeroPackageDTO.java

@ -0,0 +1,16 @@
package com.logpm.trunkline.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class ZeroPackageDTO implements Serializable {
private Long id;
private Long packageId;
private Long goodsId;
private String goodsName;//品类名称
private Integer enterNum;//装车数量
}

51
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineScanZeroDetailEntity.java

@ -0,0 +1,51 @@
package com.logpm.trunkline.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("logpm_trunkline_scan_zero_detail")
@ApiModel(value = "TrunklineScanZeroDetail对象", description = "装车扫描零担明细表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineScanZeroDetailEntity extends TenantEntity {
/** 预留1 */
@ApiModelProperty(name = "预留1",notes = "")
private String reserve1 ;
/** 预留2 */
@ApiModelProperty(name = "预留2",notes = "")
private String reserve2 ;
/** 预留3 */
@ApiModelProperty(name = "预留3",notes = "")
private String reserve3 ;
/** 预留4 */
@ApiModelProperty(name = "预留4",notes = "")
private String reserve4 ;
/** 预留5 */
@ApiModelProperty(name = "预留5",notes = "")
private String reserve5 ;
/** scanId */
@ApiModelProperty(name = "装车扫描id",notes = "")
private Long scanId ;
/** packageId */
@ApiModelProperty(name = "包件id",notes = "")
private Long packageId ;
/** goodsId */
@ApiModelProperty(name = "品类id",notes = "")
private Long goodsId ;
/** goodsName */
@ApiModelProperty(name = "品类名称",notes = "")
private String goodsName ;
/** loadingNum */
@ApiModelProperty(name = "装车数量",notes = "")
private Integer loadingNum ;
/** unloadNum */
@ApiModelProperty(name = "卸车数量",notes = "")
private Integer unloadNum ;
}

18
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/IExtractedDataClient.java

@ -0,0 +1,18 @@
package com.logpm.trunkline.feign;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(
value = ModuleNameConstant.APPLICATION_TRUNKLINE_NAME
)
public interface IExtractedDataClient {
String API_PREFIX = "extractedData/client";
@GetMapping(API_PREFIX+"/findEntityByCarsNo")
void execute(@RequestParam String tenantId,@RequestParam String wallbillNum);
}

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineAdvanceClient.java

@ -29,4 +29,7 @@ public interface ITrunklineAdvanceClient {
@PostMapping(API_PREFIX+"/cancelOrder")
Boolean cancelOrder(@RequestBody CancelOrderParamVO orderCode);
@GetMapping(API_PREFIX+"/findListByWaybillNo")
List<TrunklineAdvanceEntity> findListByWaybillNo(@RequestParam String waybillNo);
}

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineAdvanceDetailClient.java

@ -25,4 +25,7 @@ public interface ITrunklineAdvanceDetailClient {
List<TrunklineAdvanceDetailVO> findListByAdvanceIds(@RequestBody List<Long> collect);
@GetMapping(API_PREFIX+"/findEntityByOrderPackageCode")
TrunklineAdvanceDetailEntity findEntityByOrderPackageCode(@RequestParam String orderPackageCode);
@GetMapping(API_PREFIX+"/findListByWaybillId")
List<TrunklineAdvanceDetailEntity> findListByWaybillId(@RequestParam Long waybillId);
}

26
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineScanZeroDetailClient.java

@ -0,0 +1,26 @@
package com.logpm.trunkline.feign;
import com.logpm.trunkline.entity.TrunklineScanZeroDetailEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(
value = ModuleNameConstant.APPLICATION_TRUNKLINE_NAME
)
public interface ITrunklineScanZeroDetailClient {
String API_PREFIX = "trunklineScanZeroDetail/client";
@GetMapping(API_PREFIX+"/findListByCarsLoadScanId")
List<TrunklineScanZeroDetailEntity> findListByCarsLoadScanId(@RequestParam Long carsLoadScanId);
@PostMapping(API_PREFIX+"/updateBetch")
void updateBetch(@RequestBody List<TrunklineScanZeroDetailEntity> updateScanZeroDetailEntityList);
}

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadOrderInfoVO.java

@ -17,6 +17,7 @@ public class CarsLoadOrderInfoVO implements Serializable {
private BigDecimal unloadIncome;
private BigDecimal costZhang;
private BigDecimal costPiece;
private BigDecimal income;
private BigDecimal weight;
private BigDecimal volume;
private BigDecimal orderFreight;

13
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/GoodsLoadingNumVO.java

@ -0,0 +1,13 @@
package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class GoodsLoadingNumVO implements Serializable {
private Long goodsId;
private Integer loadingNum;
}

5
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadZeroListVO.java

@ -3,6 +3,8 @@ package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Data
public class LoadZeroListVO implements Serializable {
@ -12,4 +14,7 @@ public class LoadZeroListVO implements Serializable {
private Integer planNum;//计划装车件数
private Integer loadingNum;//已装车件数
private Integer unloadingNum;//已卸车件数
private List<ZeroPackageVO> zeroPackageList = new ArrayList<>();
}

9
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java

@ -1,5 +1,6 @@
package com.logpm.trunkline.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@ -10,6 +11,9 @@ import java.util.Date;
@Data
public class LoadingDetailExportVO implements Serializable {
@ExcelIgnore
private Long id;
@ExcelProperty(value = "运单号")
private String waybillNo;
@ -85,4 +89,9 @@ public class LoadingDetailExportVO implements Serializable {
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date signTime;
@ExcelProperty(value = "装车品类数量")
private String loadingGoods;
@ExcelProperty(value = "卸车品类数量")
private String unloadGoods;
}

14
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OrderCodeNumVO.java

@ -0,0 +1,14 @@
package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class OrderCodeNumVO implements Serializable {
private String orderCode;
private Integer totalNum;
}

4
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OrderScanDetailVO.java

@ -3,6 +3,8 @@ package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Data
public class OrderScanDetailVO implements Serializable {
@ -13,4 +15,6 @@ public class OrderScanDetailVO implements Serializable {
private String trayName;
private String trayCode;
private List<TrunklineScanZeroDetailVO> zeroDetailList = new ArrayList<>();
}

6
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/SignPackageVO.java

@ -3,6 +3,8 @@ package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Data
public class SignPackageVO implements Serializable {
@ -12,5 +14,9 @@ public class SignPackageVO implements Serializable {
private Integer num;
private Integer unloadNum;
private String scanStatus;
private String orderCode;
private String waybillNo;
private List<TrunklineScanZeroDetailVO> scanZeroDetailList = new ArrayList<>();
}

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadScanVO.java

@ -7,8 +7,11 @@ import lombok.Data;
public class TrunklineCarsLoadScanVO extends TrunklineCarsLoadScanEntity {
private Long signOrderId;
private Long carsLoadScanId;
private String destinationWarehouseName;
private String loadingGoods;
private String unloadGoods;
}

11
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineScanZeroDetailVO.java

@ -0,0 +1,11 @@
package com.logpm.trunkline.vo;
import com.logpm.trunkline.entity.TrunklineScanZeroDetailEntity;
import lombok.Data;
@Data
public class TrunklineScanZeroDetailVO extends TrunklineScanZeroDetailEntity {
}

6
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java

@ -3,6 +3,8 @@ package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Data
public class UnloadPackageVO implements Serializable {
@ -15,5 +17,9 @@ public class UnloadPackageVO implements Serializable {
private String trayCode;
private String scanStatus;
private String unloadNodeName;
private String orderCode;
private String waybillNo;
private List<TrunklineScanZeroDetailVO> scanZeroDetailList = new ArrayList<>();
}

16
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroPackageVO.java

@ -0,0 +1,16 @@
package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class ZeroPackageVO implements Serializable {
private Long packageId;
private Long goodsId;
private String goodsName;//品类名称
private Integer stockNum;//品类在库件数
private Integer loadingNum;//品类装车件数
}

40
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroSuppleListVO.java

@ -0,0 +1,40 @@
package com.logpm.trunkline.vo;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Data
public class ZeroSuppleListVO implements Serializable {
private Long orderId;
private String waybillNo;
private String orderCode;
private Integer stockNum;//在库数量
private Date createTime;//开单时间
private String destination;//到站
private String destinationWarehouseName;//目的仓
private String shipper;//发货单位
private String shipperName;//发货人
private String consignee;//收货单位
private String consigneeName;//收货人
private String goodsName;//货物名称
private Integer totalNum;//运单总件数
private BigDecimal weight;//运单总重量
private BigDecimal volume;//运单总体积
private String customerTrain;//客户车次号
private String remark;//备注
private String loadSignCode;//签收单号
private Long signOrderId;//签收单id
private BigDecimal totalFreight;//总运费
private BigDecimal price;//总运费
private List<JSONObject> zeroPackageSupplyVOS = new ArrayList<>();
}

4
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroSuppleVO.java

@ -1,8 +1,11 @@
package com.logpm.trunkline.vo;
import com.logpm.trunkline.dto.ZeroPackageDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Data
public class ZeroSuppleVO implements Serializable {
@ -14,5 +17,6 @@ public class ZeroSuppleVO implements Serializable {
private Long finalNodeId;//目的仓id
private Long signOrderId;//签收单id
private List<ZeroPackageDTO> zeroPackageList = new ArrayList<>();
}

25
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseSettingEntity.java

@ -0,0 +1,25 @@
package com.logpm.warehouse.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@TableName("logpm_warehouse_setting")
@ApiModel(value = "WarehouseSetting对象", description = "仓库设置")
@EqualsAndHashCode(callSuper = true)
@Data
public class WarehouseSettingEntity extends TenantEntity {
private static final long serialVersionUID = 1L;
/**
* 仓库id
*/
private Long warehouseId;
/**
* 强制装车0=不限制1=强制
*/
private Integer mandatoryLoading;
}

21
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWayBillDetail.java

@ -50,7 +50,7 @@ public class WarehouseWayBillDetail extends BaseEntity {
private BigDecimal subtotalFreight;
/** 计价方式 1件 2方 3公斤 */
@ApiModelProperty(name = "计价方式 1件 2方 3公斤",notes = "")
@ApiModelProperty(name = "实际运费计价方式 1件 2方 3公斤",notes = "")
private Integer chargeType;
/** 单价 */
@ -61,5 +61,24 @@ public class WarehouseWayBillDetail extends BaseEntity {
@ApiModelProperty(name = "小计配送费用",notes = "")
private BigDecimal subtotalDeliveryFee;
/** 单价 */
@ApiModelProperty(name = "提货单价",notes = "")
private BigDecimal pickupPrice;
/** 单价 */
@ApiModelProperty(name = "运费单价",notes = "")
private BigDecimal freightPrice;
@ApiModelProperty(name = "系统运费计价方式 1件 2方 3公斤",notes = "")
private Integer systemChargeType;
@ApiModelProperty(name = "系统配送计价方式 1件 2方 3公斤",notes = "")
private Integer systemDeliveryChargeType;
@ApiModelProperty(name = "系统提货计价方式 1件 2方 3公斤",notes = "")
private Integer systemPickupChargeType;
@ApiModelProperty(name = "系统仓库计价方式 1件 2方 3公斤",notes = "")
private Integer systemWarehouseChargeType;
}

46
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java

@ -492,4 +492,50 @@ public class WarehouseWaybillEntity extends TenantEntity {
@ApiModelProperty(value = "提货件数 ")
private Integer billladingNum;
@ApiModelProperty(value = "审核时间 ")
private Date checkTime;
@ApiModelProperty(value = "回单状态 ")
private Integer returnStatus;
@ApiModelProperty(value = "审核状态 ")
private Integer checkStatus;
@ApiModelProperty(value = "更新状态 ")
private Integer updateStatus;
@ApiModelProperty(value = "审核意见 ")
private String checkReson;
@ApiModelProperty(value = "审核备注 ")
private String checkRemark;
@ApiModelProperty(value = "取消审核备注 ")
private String cancleCheckRemark;
@ApiModelProperty(value = "取消审核人id")
private Long cancleCheckUserId;
@ApiModelProperty(value = "取消审核人名称")
private String cancleCheckUserName;
@ApiModelProperty(value = "取消审核时间 ")
private Date cancleCheckTime;
@ApiModelProperty(value = "签收件数 ")
private Integer signNum;
@ApiModelProperty(value = "签收人")
private String signUserName;
@ApiModelProperty(value = "签收时间 ")
private Date signTime;
@ApiModelProperty(value = "文员复核人")
private String signCheckUserName;
@ApiModelProperty(value = "文员复核时间 ")
private Date signCheckTime;
}

19
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseSettingClient.java

@ -0,0 +1,19 @@
package com.logpm.warehouse.feign;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
/**
* 仓库设置 Feign接口
*/
@FeignClient(
value = ModuleNameConstant.APPLICATION_WAREHOUSE_NAME
)
public interface IWarehouseSettingClient {
String API_PREFIX = "warehouse-setting/client";
@GetMapping(API_PREFIX + "/is-mandatory-loading")
Boolean isMandatoryLoading(Long warehouseId);
}

204
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillExportVO.java

@ -0,0 +1,204 @@
package com.logpm.warehouse.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class FinanceWaybillExportVO implements Serializable {
@ExcelIgnore
private Long waybillId;
@ExcelProperty(value = "品牌")
private String brand;
@ExcelProperty(value = "运单号")
private String waybillNo;
@ExcelProperty(value = "订单号")
private String orderNo;
@ExcelProperty(value = "收货单位")
private String consignee;
@ExcelProperty(value = "收货人")
private String consigneeName;
@ExcelProperty(value = "收货人电话")
private String consigneeMobile;
@ExcelProperty(value = "收货人地址")
private String consigneeAddress;
@ExcelProperty(value = "发货单位")
private String shipper;
@ExcelProperty(value = "发货人")
private String shipperName;
@ExcelProperty(value = "发货人电话")
private String shipperMobile;
@ExcelProperty(value = "发货地址")
private String shipperAddress;
@ExcelProperty(value = "到站")
private String destination;
@ExcelProperty(value = "发站")
private String departure;
@ExcelProperty(value = "发站仓")
private String departureWarehouseName;
@ExcelProperty(value = "目的仓")
private String destinationWarehouseName;
@ExcelProperty(value = "目的仓")
private String deliveryWay;
@ExcelProperty(value = "车次号")
private String customerTrain;
@ExcelProperty(value = "备注")
private String remark;
@ExcelProperty(value = "备注")
private String cleanObjType;
@ExcelProperty(value = "支付方式")
private String payType;
@ExcelProperty(value = "付款方式")
private String payWay;
@ExcelProperty(value = "现付")
private BigDecimal xPay;
@ExcelProperty(value = "到付")
private BigDecimal dPay;
@ExcelProperty(value = "回付")
private BigDecimal hPay;
@ExcelProperty(value = "月结")
private BigDecimal yPay;
@ExcelProperty(value = "服务类型")
private String serviceType;
@ExcelProperty(value = "是否改单")
private String updateStatus;
@ExcelProperty(value = "是否审单")
private String checkStatus;
@ExcelProperty(value = "审核原因")
private String checkReson;
@ExcelProperty(value = "审核备注")
private String checkRemark;
@ExcelProperty(value = "审核人")
private String checkUserName;
@ExcelProperty(value = "审核时间")
private Date checkTime;
@ExcelProperty(value = "取消审核备注")
private String cancleCheckRemark;
@ExcelProperty(value = "取消审核人")
private String cancleCheckUserName;
@ExcelProperty(value = "取消审核时间")
private Date cancleCheckTime;
@ExcelProperty(value = "运单状态")
private String waybillStatus;
@ExcelProperty(value = "开单时间")
private Date openTime;
@ExcelProperty(value = "货物品类")
private String goodsName;
@ExcelProperty(value = "总数量")
private Integer totalCount;
@ExcelProperty(value = "总重量")
private BigDecimal totalWeight;
@ExcelProperty(value = "总重量")
private BigDecimal totalVolume;
@ExcelProperty(value = "总费用")
private BigDecimal totalFee;
@ExcelProperty(value = "开单费用")
private BigDecimal systemTotalFee;
@ExcelProperty(value = "提货费")
private BigDecimal pickupFee;
@ExcelProperty(value = "运费")
private BigDecimal freightFee;
@ExcelProperty(value = "仓库服务费合计")
private BigDecimal warehouseServiceFee;
@ExcelProperty(value = "仓储费")
private BigDecimal warehouseFee;
@ExcelProperty(value = "仓储管理费")
private BigDecimal warehouseManagementFee;
@ExcelProperty(value = "仓储分拣费")
private BigDecimal warehouseSortingFee;
@ExcelProperty(value = "仓储操作费")
private BigDecimal warehouseOprationFee;
@ExcelProperty(value = "配送服务费合计")
private BigDecimal deliveryServiceFee;
@ExcelProperty(value = "配送费")
private BigDecimal deliveryFee;
@ExcelProperty(value = "配送装卸费")
private BigDecimal deliveryHandlingFee;
@ExcelProperty(value = "配送分货费")
private BigDecimal deliverySortingFee;
@ExcelProperty(value = "配送上楼费")
private BigDecimal deliveryUpfloorFee;
@ExcelProperty(value = "配送平移费")
private BigDecimal deliveryMoveFee;
@ExcelProperty(value = "配送公里数")
private BigDecimal deliveryLine;
@ExcelProperty(value = "超区公里费")
private BigDecimal deliveryLineFee;
@ExcelProperty(value = "其他费用")
private BigDecimal otherFee;
@ExcelProperty(value = "安装费")
private BigDecimal installFee;
@ExcelProperty(value = "保价费")
private BigDecimal insuranceFee;
@ExcelProperty(value = "申明价值")
private BigDecimal claimingValue;
@ExcelProperty(value = "三方操作费")
private BigDecimal thirdOperationFee;
@ExcelProperty(value = "回扣")
private BigDecimal rebate;
@ExcelProperty(value = "品类数量")
private BigDecimal goodsTypeNum;
@ExcelProperty(value = "品类开单运费")
private BigDecimal goodsTypePrice;
@ExcelProperty(value = "品类系统配送单价")
private BigDecimal goodsTypeDeliveryPrice;
@ExcelProperty(value = "品类系统提货单价")
private BigDecimal goodsTypePickupPrice;
@ExcelProperty(value = "品类系统运费单价")
private BigDecimal goodsTypeFreightPrice;
@ExcelProperty(value = "品类数")
private BigDecimal goodsTypeCount;
}

87
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillVO.java

@ -0,0 +1,87 @@
package com.logpm.warehouse.vo;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class FinanceWaybillVO implements Serializable {
private Long id;
private String brand;
private String waybillNo;
private String orderNo;
private String consignee;
private String consigneeName;
private String consigneeMobile;
private String consigneeAddress;
private String shipper;
private String shipperName;
private String shipperMobile;
private String shipperAddress;
private String destination;
private String departure;
private String departureWarehouseName;
private String destinationWarehouseName;
private String deliveryWay;
private String customerTrain;
private Integer returnStatus;
private String remark;
private String cleanObjType;
private String payType;
private String payWay;
private BigDecimal xPay;
private BigDecimal dPay;
private BigDecimal hPay;
private BigDecimal yPay;
private String serviceType;
private Integer updateStatus;
private Integer checkStatus;
private String checkReson;
private String checkRemark;
private String checkUserName;
private Date checkTime;
private String cancleCheckRemark;
private String cancleCheckUserName;
private Date cancleCheckTime;
private String waybillStatus;
private Date openTime;
private String goodsName;
private Integer totalCount;
private BigDecimal totalWeight;
private BigDecimal totalVolume;
private BigDecimal totalFee;
private BigDecimal systemTotalFee;
private BigDecimal pickupFee;
private BigDecimal freightFee;
private BigDecimal warehouseServiceFee;
private BigDecimal warehouseFee;
private BigDecimal warehouseManagementFee;
private BigDecimal warehouseSortingFee;
private BigDecimal warehouseOprationFee;
private BigDecimal deliveryServiceFee;
private BigDecimal deliveryFee;
private BigDecimal deliveryHandlingFee;
private BigDecimal deliverySortingFee;
private BigDecimal deliveryUpfloorFee;
private BigDecimal deliveryMoveFee;
private BigDecimal deliveryLine;
private BigDecimal deliveryLineFee;
private BigDecimal otherFee;
private BigDecimal installFee;
private BigDecimal insuranceFee;
private BigDecimal claimingValue;
private BigDecimal thirdOperationFee;
private BigDecimal rebate;
private BigDecimal goodsTypeNum;
private BigDecimal goodsTypePrice;
private BigDecimal goodsTypeDeliveryPrice;
private BigDecimal goodsTypePickupPrice;
private BigDecimal goodsTypeFreightPrice;
private BigDecimal goodsTypeCount;
}

31
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAbnormalRecordController.java

@ -19,8 +19,6 @@ package com.logpm.aftersales.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.aftersales.dto.AbnormalRecordDTO;
import com.logpm.aftersales.service.IAftersalesAbnormalRecordService;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
@ -84,9 +82,34 @@ public class AftersalesAbnormalRecordController extends BladeController {
return R.fail(405,"异常id为空");
}
return aftersalesAbnormalRecordService.dealAbnormal(abnormalRecordDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
return aftersalesAbnormalRecordService.dealAbnormal(abnormalRecordDTO);
@ResponseBody
@PostMapping("/findZeroDetail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "处理异常", notes = "传入loadCarsDTO")
public R findZeroDetail(@RequestBody AbnormalRecordDTO abnormalRecordDTO) {
String method = "############findZeroDetail: ";
log.info(method + "请求参数{}", abnormalRecordDTO);
Long abnormalRecordId = abnormalRecordDTO.getAbnormalRecordId();
try{
if(Objects.isNull(abnormalRecordId)){
log.warn(method+"异常id为空 abnormalRecordId={}",abnormalRecordId);
return R.fail(405,"异常id为空");
}
return aftersalesAbnormalRecordService.findZeroDetail(abnormalRecordDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
@ -95,4 +118,6 @@ public class AftersalesAbnormalRecordController extends BladeController {
return R.fail(500,"系统异常");
}
}
}

5
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AbnormalRecordDTO.java

@ -1,9 +1,12 @@
package com.logpm.aftersales.dto;
import com.logpm.aftersales.entity.AftersalesAbnormalRecordEntity;
import com.logpm.trunkline.dto.ZeroPackageDTO;
import lombok.Data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Data
public class AbnormalRecordDTO extends AftersalesAbnormalRecordEntity {
@ -27,4 +30,6 @@ public class AbnormalRecordDTO extends AftersalesAbnormalRecordEntity {
private Date dealDateStart;
private Date dealDateEnd;
private List<ZeroPackageDTO> zeroPackageDTOS = new ArrayList<>();
}

6
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java

@ -54,4 +54,10 @@ public class AftersalesAbnormalRecordClient implements IAftersalesAbnormalRecord
public void addAbnormalRecordList(List<AftersalesAbnormalRecordEntity> abnormalRecordEntities) {
aftersalesAbnormalRecordService.saveBatch(abnormalRecordEntities);
}
@Override
public List<AftersalesAbnormalRecordEntity> addAbnormalRecordListReturnList(List<AftersalesAbnormalRecordEntity> abnormalRecordEntities) {
aftersalesAbnormalRecordService.saveBatch(abnormalRecordEntities);
return abnormalRecordEntities;
}
}

22
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordZeroDetailClient.java

@ -0,0 +1,22 @@
package com.logpm.aftersales.feign;
import com.logpm.aftersales.entity.AftersalesAbnormalRecordZeroDetailEntity;
import com.logpm.aftersales.service.IAftersalesAbnormalRecordZeroDetailService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@ApiIgnore()
@RestController
@AllArgsConstructor
public class AftersalesAbnormalRecordZeroDetailClient implements IAftersalesAbnormalRecordZeroDetailClient {
private final IAftersalesAbnormalRecordZeroDetailService abnormalRecordZeroDetailService;
@Override
public void addAbnormalRecordZeroDetail(List<AftersalesAbnormalRecordZeroDetailEntity> abnormalRecordZeroDetailEntityList) {
abnormalRecordZeroDetailService.saveBatch(abnormalRecordZeroDetailEntityList);
}
}

9
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordZeroDetailMapper.java

@ -0,0 +1,9 @@
package com.logpm.aftersales.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.aftersales.entity.AftersalesAbnormalRecordZeroDetailEntity;
import org.mapstruct.Mapper;
@Mapper
public interface AftersalesAbnormalRecordZeroDetailMapper extends BaseMapper<AftersalesAbnormalRecordZeroDetailEntity> {
}

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordService.java

@ -12,4 +12,6 @@ public interface IAftersalesAbnormalRecordService extends BaseService<Aftersales
R dealAbnormal(AbnormalRecordDTO abnormalRecordDTO);
JSONObject findListByCarsNoAndUpWarehouseId(String carsNo, Long warehouseId);
R findZeroDetail(AbnormalRecordDTO abnormalRecordDTO);
}

12
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordZeroDetailService.java

@ -0,0 +1,12 @@
package com.logpm.aftersales.service;
import com.logpm.aftersales.entity.AftersalesAbnormalRecordZeroDetailEntity;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
public interface IAftersalesAbnormalRecordZeroDetailService extends BaseService<AftersalesAbnormalRecordZeroDetailEntity> {
List<AftersalesAbnormalRecordZeroDetailEntity> findListByAbnormalRecordId(Long abnormalRecordId);
}

343
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java

@ -1,24 +1,30 @@
package com.logpm.aftersales.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.aftersales.dto.AbnormalRecordDTO;
import com.logpm.aftersales.entity.AftersalesAbnormalRecordEntity;
import com.logpm.aftersales.entity.AftersalesAbnormalRecordZeroDetailEntity;
import com.logpm.aftersales.mapper.AftersalesAbnormalRecordMapper;
import com.logpm.aftersales.service.IAftersalesAbnormalRecordService;
import com.logpm.aftersales.service.IAftersalesAbnormalRecordZeroDetailService;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.feign.IDistributionParcelListClient;
import com.logpm.distribution.feign.IDistributionParcelNumberClient;
import com.logpm.distribution.feign.IDistributionStockArticleClient;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.trunkline.dto.AddWaybillTrackDTO;
import com.logpm.trunkline.dto.ZeroPackageDTO;
import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity;
import com.logpm.trunkline.feign.ITrunklineCarsLoadScanClient;
import com.logpm.trunkline.feign.ITrunklineWaybillOrderClient;
import com.logpm.trunkline.feign.ITrunklineWaybillPackageClient;
import com.logpm.trunkline.feign.ITrunklineWaybillTrackClient;
import com.logpm.trunkline.entity.TrunklineScanZeroDetailEntity;
import com.logpm.trunkline.feign.*;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.AllArgsConstructor;
@ -30,10 +36,8 @@ import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@Slf4j
@ -49,6 +53,8 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
private final IDistributionParcelListClient parcelListClient;
private final IDistributionParcelNumberClient parcelNumberClient;
private final IWarehouseWaybillClient warehouseWaybillClient;
private final ITrunklineWaybillTrackClient trunklineWaybillTrackClient;
@ -57,6 +63,10 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
private final ITrunklineWaybillPackageClient trunklineWaybillPackageClient;
private final IAftersalesAbnormalRecordZeroDetailService recordZeroDetailService;
private final ITrunklineScanZeroDetailClient scanZeroDetailClient;
@Override
public R findPageList(AbnormalRecordDTO abnormalRecordDTO) {
IPage<Object> page = new Page<>();
@ -145,149 +155,229 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
//零担卸车数量异常
Long waybillId = null;
Integer dealType = abnormalRecordDTO.getDealType();
List<ZeroPackageDTO> zeroPackageDTOS = abnormalRecordDTO.getZeroPackageDTOS();
if(CollUtil.isEmpty(zeroPackageDTOS)){
log.warn("################dealAbnormal: 品类信息不存在");
return R.fail(405,"品类信息不存在");
}
Integer num = abnormalRecordEntity.getNum();
Long associationId = abnormalRecordEntity.getAssociationId();
TrunklineCarsLoadScanEntity carsLoadScanEntity = trunklineCarsLoadScanClient.findEntityById(associationId);
Long carsLoadScanId = abnormalRecordEntity.getAssociationId();
TrunklineCarsLoadScanEntity carsLoadScanEntity = trunklineCarsLoadScanClient.findEntityById(carsLoadScanId);
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId();
String orderCode = carsLoadScanEntity.getOrderCode();
List<AftersalesAbnormalRecordZeroDetailEntity> recordZeroDetailEntities = recordZeroDetailService.findListByAbnormalRecordId(abnormalRecordId);
//把zeroPackageDTOS转化成以goodsId作为key的Map
Map<Long, AftersalesAbnormalRecordZeroDetailEntity> recordZeroDetailEntitiesMapByGoodsId = recordZeroDetailEntities.stream().collect(Collectors.toMap(AftersalesAbnormalRecordZeroDetailEntity::getGoodsId, Function.identity()));
List<TrunklineScanZeroDetailEntity> scanZeroDetailEntityList = scanZeroDetailClient.findListByCarsLoadScanId(carsLoadScanId);
DistributionStockArticleEntity stockArticleEntity = stockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, fromWarehouseId);
if(!Objects.isNull(stockArticleEntity)){
Long stockId = stockArticleEntity.getId();
if(dealType.equals(5)){
//回退原仓库
recordZeroDetailEntities.forEach(detailEntity -> {
parcelListClient.addZeroQuantity(detailEntity.getPackageId(),detailEntity.getAbnormalNum());
detailEntity.setReturnNum(detailEntity.getAbnormalNum());
});
stockArticleClient.addHandQuantity(stockId,num);
recordZeroDetailService.updateBatchById(recordZeroDetailEntities);
abnormalRecordEntity.setRemark("差异件数退回原仓");
}else if(dealType.equals(6)){
//入库本仓
Integer enterNum = abnormalRecordDTO.getNum();
//把scanZeroDetailEntityList转化成以packageId为key的map
Map<Long, TrunklineScanZeroDetailEntity> scanZeroDetailEntityMap = scanZeroDetailEntityList.stream().collect(Collectors.toMap(TrunklineScanZeroDetailEntity::getPackageId, Function.identity()));
if(enterNum > 0){
Date now = new Date();
int diff = num - enterNum;
Long warehouseId = abnormalRecordEntity.getWarehouseId();
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId);
//把zeroPackageDTOS转化成以packageId作为key的Map
Map<Long, ZeroPackageDTO> zeroPackageDTOSMapByPackageId = zeroPackageDTOS.stream().collect(Collectors.toMap(ZeroPackageDTO::getPackageId, Function.identity()));
if(diff == 0){
//全部入库到本仓
DistributionStockArticleEntity currentStockArticleEntity = stockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(Objects.isNull(currentStockArticleEntity)){
currentStockArticleEntity = new DistributionStockArticleEntity();
Integer totalNumber = stockArticleEntity.getTotalNumber();
BeanUtil.copy(stockArticleEntity,currentStockArticleEntity);
currentStockArticleEntity.setId(null);
currentStockArticleEntity.setHandQuantity(enterNum);
currentStockArticleEntity.setWarehouseId(warehouseId);
currentStockArticleEntity.setWarehouse(warehouseEntity.getName());
currentStockArticleEntity.setWarehouseEntryTime(now);
currentStockArticleEntity.setCompleteSet(1);
currentStockArticleEntity.setOrderReceiveStatus("20");
if(totalNumber.equals(enterNum)){
currentStockArticleEntity.setCompleteSet(2);
currentStockArticleEntity.setOrderReceiveStatus("30");
}
currentStockArticleEntity.setStockupStatus("10");
currentStockArticleEntity.setReservationStatus("10");
currentStockArticleEntity.setOrderStatus("20");
currentStockArticleEntity.setGroundingStatus("10");
currentStockArticleEntity.setFreezeStatus("10");
currentStockArticleEntity.setWarehouseEntryTimeEnd(now);
currentStockArticleEntity.setSortingQuantity(0);
currentStockArticleEntity.setDeliveryQuantity(0);
currentStockArticleEntity.setTransferQuantity(0);
currentStockArticleEntity.setSigninQuantity(0);
currentStockArticleEntity.setAllocation(null);
currentStockArticleEntity.setTrays(null);
currentStockArticleEntity.setIncomingNum(enterNum);
Long orderId = stockArticleClient.addData(currentStockArticleEntity);
if(!Objects.isNull(orderId)){
List<DistributionParcelListEntity> addParcelListEntityList = new ArrayList<>();
List<DistributionParcelListEntity> parcelListEntityList = parcelListClient.findEntityListByOrderCode(orderCode, warehouseId);
parcelListEntityList.forEach(parcelListEntity -> {
DistributionParcelListEntity currentParcelListEntity = new DistributionParcelListEntity();
BeanUtil.copy(parcelListEntity,currentParcelListEntity);
Long acceptWarehouseId = parcelListEntity.getAcceptWarehouseId();
currentParcelListEntity.setId(null);
currentParcelListEntity.setGoodsAllocation(null);
currentParcelListEntity.setStockArticleId(orderId);
currentParcelListEntity.setPallet(null);
currentParcelListEntity.setWarehouseId(warehouseId);
currentParcelListEntity.setWarehouse(warehouseEntity.getName());
currentParcelListEntity.setIsTransfer(1);
if(acceptWarehouseId.equals(warehouseId)){
currentParcelListEntity.setIsTransfer(0);
}
addParcelListEntityList.add(currentParcelListEntity);
});
parcelListClient.addZeroParcelList(addParcelListEntityList);
}
}else{
stockArticleClient.addHandQuantityAndIncomingNum(currentStockArticleEntity.getId(),enterNum);
}
abnormalRecordEntity.setRemark("差异"+enterNum+"件数入库本仓");
}else{
//回退原仓库
recordZeroDetailEntities.forEach(detailEntity -> {
Long packageId = detailEntity.getPackageId();
Integer abnormalNum = detailEntity.getAbnormalNum();
ZeroPackageDTO zeroPackageDTO = zeroPackageDTOSMapByPackageId.get(packageId);
Integer enterPackageNum = zeroPackageDTO.getEnterNum();
parcelListClient.addZeroQuantity(packageId,abnormalNum - enterPackageNum);
detailEntity.setReturnNum(abnormalNum - enterPackageNum);
});
stockArticleClient.addHandQuantity(stockId,diff);
recordZeroDetailService.updateBatchById(recordZeroDetailEntities);
abnormalRecordEntity.setRemark("差异"+enterNum+"件数入库本仓,原仓返回"+diff+"件");
}
//全部入库到本仓
DistributionStockArticleEntity currentStockArticleEntity = stockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(Objects.isNull(currentStockArticleEntity)){
currentStockArticleEntity = new DistributionStockArticleEntity();
Integer totalNumber = stockArticleEntity.getTotalNumber();
BeanUtil.copy(stockArticleEntity,currentStockArticleEntity);
currentStockArticleEntity.setId(null);
currentStockArticleEntity.setHandQuantity(enterNum);
currentStockArticleEntity.setWarehouseId(warehouseId);
currentStockArticleEntity.setWarehouse(warehouseEntity.getName());
currentStockArticleEntity.setWarehouseEntryTime(now);
currentStockArticleEntity.setCompleteSet(1);
currentStockArticleEntity.setOrderReceiveStatus("20");
if(totalNumber.equals(enterNum)){
currentStockArticleEntity.setCompleteSet(2);
currentStockArticleEntity.setOrderReceiveStatus("30");
DistributionStockArticleEntity currentStockArticleEntity = stockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(Objects.isNull(currentStockArticleEntity)){
currentStockArticleEntity = new DistributionStockArticleEntity();
Integer totalNumber = stockArticleEntity.getTotalNumber();
BeanUtil.copy(stockArticleEntity,currentStockArticleEntity);
currentStockArticleEntity.setId(null);
currentStockArticleEntity.setHandQuantity(enterNum);
currentStockArticleEntity.setWarehouseId(warehouseId);
currentStockArticleEntity.setWarehouse(warehouseEntity.getName());
currentStockArticleEntity.setWarehouseEntryTime(now);
currentStockArticleEntity.setCompleteSet(1);
currentStockArticleEntity.setOrderReceiveStatus("20");
if(totalNumber.equals(enterNum)){
currentStockArticleEntity.setCompleteSet(2);
currentStockArticleEntity.setOrderReceiveStatus("30");
}
currentStockArticleEntity.setStockupStatus("10");
currentStockArticleEntity.setReservationStatus("10");
currentStockArticleEntity.setOrderStatus("20");
currentStockArticleEntity.setGroundingStatus("10");
currentStockArticleEntity.setFreezeStatus("10");
currentStockArticleEntity.setWarehouseEntryTimeEnd(now);
currentStockArticleEntity.setSortingQuantity(0);
currentStockArticleEntity.setDeliveryQuantity(0);
currentStockArticleEntity.setTransferQuantity(0);
currentStockArticleEntity.setSigninQuantity(0);
currentStockArticleEntity.setAllocation(null);
currentStockArticleEntity.setTrays(null);
currentStockArticleEntity.setIncomingNum(enterNum);
Long orderId = stockArticleClient.addData(currentStockArticleEntity);
if(!Objects.isNull(orderId)){
List<TrunklineScanZeroDetailEntity> updateScanZeroDetailEntityList = new ArrayList<>();
List<DistributionParcelNumberEntity> addParcelNumberEntityList = new ArrayList<>();
List<AftersalesAbnormalRecordZeroDetailEntity> updateRecordZeroDetailList = new ArrayList<>();
List<DistributionParcelListVO> parcelListEntityList = parcelListClient.findEntityVOListByOrderCode(orderCode, fromWarehouseId);
parcelListEntityList.forEach(parcelListEntity -> {
Long packageId = parcelListEntity.getId();
Integer zeroPackageTotalNum = parcelListEntity.getZeroPackageTotalNum();
ZeroPackageDTO zeroPackageDTO = zeroPackageDTOSMapByPackageId.get(packageId);
Long goodsId = zeroPackageDTO.getGoodsId();
Integer packageEnterNum = zeroPackageDTO.getEnterNum();
//保存包件信息
DistributionParcelListEntity currentParcelListEntity = new DistributionParcelListEntity();
BeanUtil.copy(parcelListEntity,currentParcelListEntity);
Long acceptWarehouseId = parcelListEntity.getAcceptWarehouseId();
currentParcelListEntity.setId(null);
currentParcelListEntity.setQuantity(packageEnterNum);
currentParcelListEntity.setGoodsAllocation(null);
currentParcelListEntity.setStockArticleId(orderId);
currentParcelListEntity.setPallet(null);
currentParcelListEntity.setWarehouseId(warehouseId);
currentParcelListEntity.setWarehouse(warehouseEntity.getName());
currentParcelListEntity.setIsTransfer(1);
if(acceptWarehouseId.equals(warehouseId)){
currentParcelListEntity.setIsTransfer(0);
}
Long parceListId = parcelListClient.addReturnId(currentParcelListEntity);
if(!Objects.isNull(parceListId)){
//保存零担包件数量信息
DistributionParcelNumberEntity currentParcelNumberEntity = new DistributionParcelNumberEntity();
currentParcelNumberEntity.setStockArticleId(orderId);
currentParcelNumberEntity.setParcelListId(parceListId);
currentParcelNumberEntity.setQuantity(zeroPackageTotalNum);
currentParcelNumberEntity.setHandQuantity(packageEnterNum);
currentParcelNumberEntity.setOutboundQuantity(0);
currentParcelNumberEntity.setDeliveryQuantity(0);
currentParcelNumberEntity.setSigninQuantity(0);
addParcelNumberEntityList.add(currentParcelNumberEntity);
}
//更新异常列表零担品类数量信息
AftersalesAbnormalRecordZeroDetailEntity aftersalesAbnormalRecordZeroDetailEntity = recordZeroDetailEntitiesMapByGoodsId.get(goodsId);
AftersalesAbnormalRecordZeroDetailEntity updateRecordZeroDetail = new AftersalesAbnormalRecordZeroDetailEntity();
updateRecordZeroDetail.setId(aftersalesAbnormalRecordZeroDetailEntity.getId());
updateRecordZeroDetail.setIncomingNum(packageEnterNum);
updateRecordZeroDetailList.add(updateRecordZeroDetail);
//更新装车明细零担信息
TrunklineScanZeroDetailEntity scanZeroDetailEntity = scanZeroDetailEntityMap.get(packageId);
TrunklineScanZeroDetailEntity updateScanZeroDetailEntity = new TrunklineScanZeroDetailEntity();
updateScanZeroDetailEntity.setId(scanZeroDetailEntity.getId());
updateScanZeroDetailEntity.setUnloadNum(scanZeroDetailEntity.getUnloadNum()+packageEnterNum);
updateScanZeroDetailEntityList.add(updateScanZeroDetailEntity);
});
if(CollUtil.isNotEmpty(updateRecordZeroDetailList)){
recordZeroDetailService.updateBatchById(updateRecordZeroDetailList);
}
if(CollUtil.isNotEmpty(updateScanZeroDetailEntityList)){
scanZeroDetailClient.updateBetch(updateScanZeroDetailEntityList);
}
currentStockArticleEntity.setStockupStatus("10");
currentStockArticleEntity.setReservationStatus("10");
currentStockArticleEntity.setOrderStatus("20");
currentStockArticleEntity.setGroundingStatus("10");
currentStockArticleEntity.setFreezeStatus("10");
currentStockArticleEntity.setWarehouseEntryTimeEnd(now);
currentStockArticleEntity.setSortingQuantity(0);
currentStockArticleEntity.setDeliveryQuantity(0);
currentStockArticleEntity.setTransferQuantity(0);
currentStockArticleEntity.setSigninQuantity(0);
currentStockArticleEntity.setAllocation(null);
currentStockArticleEntity.setTrays(null);
currentStockArticleEntity.setIncomingNum(enterNum);
Long orderId = stockArticleClient.addData(currentStockArticleEntity);
if(!Objects.isNull(orderId)){
List<DistributionParcelListEntity> addParcelListEntityList = new ArrayList<>();
List<DistributionParcelListEntity> parcelListEntityList = parcelListClient.findEntityListByOrderCode(orderCode, warehouseId);
parcelListEntityList.forEach(parcelListEntity -> {
DistributionParcelListEntity currentParcelListEntity = new DistributionParcelListEntity();
BeanUtil.copy(parcelListEntity,currentParcelListEntity);
Long acceptWarehouseId = parcelListEntity.getAcceptWarehouseId();
currentParcelListEntity.setId(null);
currentParcelListEntity.setGoodsAllocation(null);
currentParcelListEntity.setStockArticleId(orderId);
currentParcelListEntity.setPallet(null);
currentParcelListEntity.setWarehouseId(warehouseId);
currentParcelListEntity.setWarehouse(warehouseEntity.getName());
currentParcelListEntity.setIsTransfer(1);
if(acceptWarehouseId.equals(warehouseId)){
currentParcelListEntity.setIsTransfer(0);
}
addParcelListEntityList.add(currentParcelListEntity);
});
parcelListClient.addZeroParcelList(addParcelListEntityList);
if(CollUtil.isNotEmpty(addParcelNumberEntityList)){
parcelNumberClient.addBatch(addParcelNumberEntityList);
}
}else{
}
}else{
Long orderId = currentStockArticleEntity.getId();
List<DistributionParcelListEntity> parcelListEntityList = parcelListClient.findListByStockArticleId(orderId);
//把parcelListEntityList转化成以firsts为key的map
Map<String, DistributionParcelListEntity> parcelListEntityMapByFirsts = parcelListEntityList.stream().collect(Collectors.toMap(DistributionParcelListEntity::getFirsts, Function.identity()));
List<DistributionParcelNumberEntity> parcelNumberEntityList =parcelNumberClient.findListByStockArticleId(orderId);
//把parcelNumberEntityList转化成以parceListId为key的Map
Map<Long, DistributionParcelNumberEntity> parcelNumberEntityMapByParcelListId = parcelNumberEntityList.stream().collect(Collectors.toMap(DistributionParcelNumberEntity::getParcelListId, Function.identity()));
//把scanZeroDetailEntityList转化成以goodsId为key的Map
Map<Long, TrunklineScanZeroDetailEntity> scanZeroDetailEntityMapByGoodsId = scanZeroDetailEntityList.stream().collect(Collectors.toMap(TrunklineScanZeroDetailEntity::getGoodsId, Function.identity()));
List<TrunklineScanZeroDetailEntity> updateScanZeroDetailEntityList = new ArrayList<>();
List<AftersalesAbnormalRecordZeroDetailEntity> updateAbnormalRecordZeroDetailEntityList = new ArrayList<>();
List<DistributionParcelListEntity> updateParcelListEntityList = new ArrayList<>();
List<DistributionParcelNumberEntity> updateParcelNumberEntityList = new ArrayList<>();
zeroPackageDTOS.forEach(zeroPackageDTO -> {
Integer packageNum = zeroPackageDTO.getEnterNum();
String goodsName = zeroPackageDTO.getGoodsName();
Long goodsId = zeroPackageDTO.getGoodsId();
//更新装车明细零担信息
TrunklineScanZeroDetailEntity scanZeroDetailEntity = scanZeroDetailEntityMapByGoodsId.get(goodsId);
TrunklineScanZeroDetailEntity updateScanZeroDetailEntity = new TrunklineScanZeroDetailEntity();
updateScanZeroDetailEntity.setId(scanZeroDetailEntity.getId());
updateScanZeroDetailEntity.setUnloadNum(scanZeroDetailEntity.getUnloadNum()+packageNum);
updateScanZeroDetailEntityList.add(updateScanZeroDetailEntity);
//更新异常列表零担品类数量
AftersalesAbnormalRecordZeroDetailEntity aftersalesAbnormalRecordZeroDetailEntity = recordZeroDetailEntitiesMapByGoodsId.get(goodsId);
AftersalesAbnormalRecordZeroDetailEntity updateRecordZeroDetail = new AftersalesAbnormalRecordZeroDetailEntity();
updateRecordZeroDetail.setId(aftersalesAbnormalRecordZeroDetailEntity.getId());
updateRecordZeroDetail.setIncomingNum(aftersalesAbnormalRecordZeroDetailEntity.getIncomingNum()+packageNum);
updateAbnormalRecordZeroDetailEntityList.add(updateRecordZeroDetail);
//更新;零担包件信息
DistributionParcelListEntity parcelList = parcelListEntityMapByFirsts.get(goodsName);
Long parcelListId = parcelList.getId();
DistributionParcelListEntity updateParceListEntity = new DistributionParcelListEntity();
updateParceListEntity.setId(parcelListId);
updateParceListEntity.setQuantity(parcelList.getQuantity()+packageNum);
updateParcelListEntityList.add(updateParceListEntity);
//更新零担品类数量信息
DistributionParcelNumberEntity parcelNumberEntity = parcelNumberEntityMapByParcelListId.get(parcelListId);
DistributionParcelNumberEntity updateParceNumberEntity = new DistributionParcelNumberEntity();
updateParceNumberEntity.setId(parcelNumberEntity.getId());
updateParceNumberEntity.setHandQuantity(parcelNumberEntity.getHandQuantity()+packageNum);
updateParcelNumberEntityList.add(updateParceNumberEntity);
});
if(CollUtil.isNotEmpty(updateScanZeroDetailEntityList)){
scanZeroDetailClient.updateBetch(updateScanZeroDetailEntityList);
}
if(CollUtil.isNotEmpty(updateAbnormalRecordZeroDetailEntityList)){
recordZeroDetailService.updateBatchById(updateAbnormalRecordZeroDetailEntityList);
}
if(CollUtil.isNotEmpty(updateParcelListEntityList)){
parcelListClient.updateList(updateParcelListEntityList);
}
if(CollUtil.isNotEmpty(updateParcelNumberEntityList)){
parcelNumberClient.updateList(updateParcelNumberEntityList);
}
stockArticleClient.addHandQuantityAndIncomingNum(currentStockArticleEntity.getId(),enterNum);
stockArticleClient.addHandQuantityAndIncomingNum(currentStockArticleEntity.getId(),enterNum);
}
abnormalRecordEntity.setRemark("差异"+enterNum+"件数入库本仓,原仓返回"+diff+"件");
}
carsLoadScanEntity.setScanStatus("2");
carsLoadScanEntity.setUnloadNum(carsLoadScanEntity.getUnloadNum()+enterNum);
trunklineCarsLoadScanClient.updateEntity(carsLoadScanEntity);
@ -353,4 +443,13 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
public JSONObject findListByCarsNoAndUpWarehouseId(String carsNo, Long warehouseId) {
return baseMapper.findListByCarsNoAndUpWarehouseId(carsNo,warehouseId);
}
@Override
public R findZeroDetail(AbnormalRecordDTO abnormalRecordDTO) {
Long abnormalRecordId = abnormalRecordDTO.getAbnormalRecordId();
QueryWrapper<AftersalesAbnormalRecordZeroDetailEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("abnormal_record_id",abnormalRecordId);
List<AftersalesAbnormalRecordZeroDetailEntity> list = recordZeroDetailService.list(queryWrapper);
return R.data(list);
}
}

25
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordZeroDetailServiceImpl.java

@ -0,0 +1,25 @@
package com.logpm.aftersales.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.aftersales.entity.AftersalesAbnormalRecordZeroDetailEntity;
import com.logpm.aftersales.mapper.AftersalesAbnormalRecordZeroDetailMapper;
import com.logpm.aftersales.service.IAftersalesAbnormalRecordZeroDetailService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@AllArgsConstructor
@Slf4j
public class AftersalesAbnormalRecordZeroDetailServiceImpl extends BaseServiceImpl<AftersalesAbnormalRecordZeroDetailMapper, AftersalesAbnormalRecordZeroDetailEntity> implements IAftersalesAbnormalRecordZeroDetailService {
@Override
public List<AftersalesAbnormalRecordZeroDetailEntity> findListByAbnormalRecordId(Long abnormalRecordId) {
QueryWrapper<AftersalesAbnormalRecordZeroDetailEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("abnormal_record_id",abnormalRecordId);
return baseMapper.selectList(queryWrapper);
}
}

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

@ -12,7 +12,7 @@ server:
spring:
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure,com.alibaba.cloud.seata.feign.SeataFeignClientAutoConfiguration
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
dynamic:
druid:

11
blade-service/logpm-aftersales/src/main/resources/application-test.yml

@ -12,7 +12,7 @@ server:
spring:
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure,com.alibaba.cloud.seata.feign.SeataFeignClientAutoConfiguration
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
dynamic:
druid:
@ -25,11 +25,4 @@ spring:
url: ${blade.datasource.aftersales.master.url}
username: ${blade.datasource.aftersales.master.username}
password: ${blade.datasource.aftersales.master.password}
627683:
url: ${blade.datasource.aftersales.627683.url}
username: ${blade.datasource.aftersales.627683.username}
password: ${blade.datasource.aftersales.627683.password}
695224:
url: ${blade.datasource.aftersales.695224.url}
username: ${blade.datasource.aftersales.695224.username}
password: ${blade.datasource.aftersales.695224.password}

31
blade-service/logpm-basic/src/main/resources/application-test.yml

@ -12,7 +12,7 @@ server:
spring:
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure,com.alibaba.cloud.seata.feign.SeataFeignClientAutoConfiguration
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
dynamic:
druid:
@ -33,32 +33,3 @@ spring:
url: ${blade.datasource.basic.master.url}
username: ${blade.datasource.basic.master.username}
password: ${blade.datasource.basic.master.password}
627683:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.basic.627683.url}
username: ${blade.datasource.basic.627683.username}
password: ${blade.datasource.basic.627683.password}
695224:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.basic.695224.url}
username: ${blade.datasource.basic.695224.username}
password: ${blade.datasource.basic.695224.password}
645789:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.basic.645789.url}
username: ${blade.datasource.basic.645789.username}
password: ${blade.datasource.basic.645789.password}

20
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataFactoryCategoryImporter.java

@ -94,7 +94,7 @@ public class BasicdataFactoryCategoryImporter implements ExcelImporter<Basicdata
String equalString = buildEqualString(allBasicdataFactoryCategoryEntity);
String equalString2 = buildEqualString2(datum);
if (equalString2.equals(equalString)) {
throw new ServiceException("品牌:" + datum.getBrand() + " 品类:" + datum.getCategory() + "已存在相同的配置内容");
throw new CustomerException("品牌:" + datum.getBrand() + " 品类:" + datum.getCategory() + "已存在相同的配置内容");
}
}
@ -110,6 +110,9 @@ public class BasicdataFactoryCategoryImporter implements ExcelImporter<Basicdata
private String buildEqualString(BasicdataFactoryCategoryEntity allBasicdataFactoryCategoryEntity) {
StringBuilder stringBuffer = new StringBuilder();
stringBuffer.append(allBasicdataFactoryCategoryEntity.getBrand()).append(allBasicdataFactoryCategoryEntity.getCategory());
// 增加结算类型 收入或者成本
stringBuffer.append(allBasicdataFactoryCategoryEntity.getType());
if (ObjectUtil.isNotEmpty(allBasicdataFactoryCategoryEntity.getFirsts())) {
stringBuffer.append(allBasicdataFactoryCategoryEntity.getFirsts());
} else {
@ -126,6 +129,12 @@ public class BasicdataFactoryCategoryImporter implements ExcelImporter<Basicdata
} else {
stringBuffer.append("-");
}
if (ObjectUtil.isNotEmpty(allBasicdataFactoryCategoryEntity.getMaterielName())) {
stringBuffer.append(allBasicdataFactoryCategoryEntity.getMaterielName());
} else {
stringBuffer.append("-");
}
return stringBuffer.toString();
}
@ -139,6 +148,8 @@ public class BasicdataFactoryCategoryImporter implements ExcelImporter<Basicdata
private String buildEqualString2(BasicdataFactoryCategoryExcel datum) {
StringBuilder stringBuffer = new StringBuilder();
stringBuffer.append(datum.getBrand()).append(datum.getCategory());
// 增加结算类型 收入或者成本
stringBuffer.append(datum.getType());
if (ObjectUtil.isNotEmpty(datum.getFirsts())) {
stringBuffer.append(datum.getFirsts());
} else {
@ -155,6 +166,13 @@ public class BasicdataFactoryCategoryImporter implements ExcelImporter<Basicdata
} else {
stringBuffer.append("-");
}
if (ObjectUtil.isNotEmpty(datum.getMaterielName())) {
stringBuffer.append(datum.getMaterielName());
} else {
stringBuffer.append("-");
}
return stringBuffer.toString();
}

16
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java

@ -238,6 +238,15 @@ public class BasicdataWarehouseClient implements IBasicdataWarehouseClient {
return list;
}
@Override
public List<BasicdataWarehouseEntity> findAllList() {
return warehouseWarehouseService.list(Wrappers.<BasicdataWarehouseEntity>lambdaQuery()
.eq(BasicdataWarehouseEntity::getEnableStatus,2)
);
}
@Override
public List<BasicdataWarehouseEntity> findWarehousesByIds(List<Long> ids) {
if(CollUtil.isNotEmpty(ids)){
@ -265,12 +274,5 @@ public class BasicdataWarehouseClient implements IBasicdataWarehouseClient {
return Collections.emptyList();
}
@Override
public List<BasicdataWarehouseEntity> findAllList() {
return warehouseWarehouseService.list(Wrappers.<BasicdataWarehouseEntity>lambdaQuery()
.eq(BasicdataWarehouseEntity::getEnableStatus,2)
);
}
}

31
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java

@ -463,6 +463,19 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
Map<Integer, List<BasicdataPriceGeneralEntity>> generalMap = new HashMap<>();
buildDetailMap(priceEntity, fullMap, basicMap, warehouseMap, dispatchMap, generalMap);
String serviceType = templateEntity.getServiceType();
LambdaQueryWrapper<BasicdataPriceRouteEntity> wrapper = Wrappers.<BasicdataPriceRouteEntity>lambdaQuery()
.eq(BasicdataPriceRouteEntity::getPriceId, priceEntity.getId())
.eq(BasicdataPriceRouteEntity::getSendOrgId, param.getSendOrgId())
.eq(BasicdataPriceRouteEntity::getStartProvinceId, param.getStartProvinceId())
.eq(BasicdataPriceRouteEntity::getStartCityId, param.getStartCityId())
.eq(BasicdataPriceRouteEntity::getEndProvinceId, param.getEndProvinceId())
.eq(BasicdataPriceRouteEntity::getEndCityId, param.getEndCityId());
if (ObjectUtil.isNotEmpty(param.getStartCountyId())) {
wrapper.eq(BasicdataPriceRouteEntity::getStartCountyId, param.getStartCountyId());
}
if (ObjectUtil.isNotEmpty(param.getEndCountyId())) {
wrapper.eq(BasicdataPriceRouteEntity::getEndCountyId, param.getEndCountyId());
}
// 提货费
if (StrUtil.contains(serviceType, ServiceTypeEnums.PICK_UP.getCode().toString())) {
// 提货不按区域计费
@ -471,13 +484,8 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
priceClientVO.setPickup(initPickUp(priceEntity, templateEntity, fullMap.get(FullVehicleTypeEnums.PICK_UP.getCode()), basicMap.get(ServiceTypeEnums.PICK_UP.getCode()), generalMap.get(GeneralServiceTypeEnums.PICK_UP.getCode())));
} else {
// 按区域计费,查询路径,返回价格
List<BasicdataPriceRouteEntity> routeEntities = basicdataPriceRouteService.list(Wrappers.<BasicdataPriceRouteEntity>lambdaQuery()
.eq(BasicdataPriceRouteEntity::getPriceId, priceEntity.getId())
.eq(BasicdataPriceRouteEntity::getSendOrgId, param.getSendOrgId())
.eq(BasicdataPriceRouteEntity::getStartCountyId, param.getStartCountyId())
.eq(BasicdataPriceRouteEntity::getEndCountyId, param.getEndCountyId())
.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.PICK_UP.getCode())
);
wrapper.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.TRUNK_LINE.getCode());
List<BasicdataPriceRouteEntity> routeEntities = basicdataPriceRouteService.list(wrapper);
if (CollUtil.isNotEmpty(routeEntities)) {
PriceRouteVO detail = basicdataPriceRouteService.detail(routeEntities.get(0).getId());
PricePickupVO pickup = new PricePickupVO();
@ -500,13 +508,8 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
basicMap.get(ServiceTypeEnums.TRUNK_LINE.getCode()), generalMap.get(GeneralServiceTypeEnums.TRUNK_LINE.getCode())));
} else {
// 按区域计费,查询路径,返回价格
List<BasicdataPriceRouteEntity> routeEntities = basicdataPriceRouteService.list(Wrappers.<BasicdataPriceRouteEntity>lambdaQuery()
.eq(BasicdataPriceRouteEntity::getPriceId, priceEntity.getId())
.eq(BasicdataPriceRouteEntity::getSendOrgId, param.getSendOrgId())
.eq(BasicdataPriceRouteEntity::getStartCountyId, param.getStartCountyId())
.eq(BasicdataPriceRouteEntity::getEndCountyId, param.getEndCountyId())
.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.TRUNK_LINE.getCode())
);
wrapper.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.TRUNK_LINE.getCode());
List<BasicdataPriceRouteEntity> routeEntities = basicdataPriceRouteService.list(wrapper);
if (CollUtil.isNotEmpty(routeEntities)) {
PriceRouteVO detail = basicdataPriceRouteService.detail(routeEntities.get(0).getId());
PriceTrunkLineVO trunkLineVO = new PriceTrunkLineVO();

20
blade-service/logpm-basicdata/src/main/resources/application-test.yml

@ -12,7 +12,7 @@ server:
spring:
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure,com.alibaba.cloud.seata.feign.SeataFeignClientAutoConfiguration
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
dynamic:
druid:
@ -33,20 +33,4 @@ spring:
url: ${blade.datasource.basicdata.master.url}
username: ${blade.datasource.basicdata.master.username}
password: ${blade.datasource.basicdata.master.password}
627683:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.basicdata.627683.url}
username: ${blade.datasource.basicdata.627683.username}
password: ${blade.datasource.basicdata.627683.password}
695224:
url: ${blade.datasource.basicdata.695224.url}
username: ${blade.datasource.basicdata.695224.username}
password: ${blade.datasource.basicdata.695224.password}
645789:
url: ${blade.datasource.basicdata.645789.url}
username: ${blade.datasource.basicdata.645789.username}
password: ${blade.datasource.basicdata.645789.password}

19
blade-service/logpm-business/src/main/java/com/logpm/business/api/BusinessPreOrderApi.java

@ -23,6 +23,7 @@ import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Objects;
@RestController
@ -37,7 +38,7 @@ public class BusinessPreOrderApi {
@PostMapping("/list")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "模糊查询", notes = "传入trayTypeDTO")
public R list(@RequestBody BusinessPreListDTO queryrderDTO){
public R list(@RequestBody BusinessPreListDTO queryrderDTO) {
DistributionBusinessPreOrderListVO data = distributionIBusinessPreOrderService.list(queryrderDTO);
@ -45,9 +46,15 @@ public class BusinessPreOrderApi {
}
/**
* 商家入库接口
* 零担入库也走这个接口
* @param businessSanDTO
* @return
*/
@PostMapping("/scanOrderPackageCode")
@ApiOperationSupport(order = 1)
public R scanOrderPackageCode(@RequestBody BusinessSanDTO businessSanDTO){
public R scanOrderPackageCode(@RequestBody BusinessSanDTO businessSanDTO) {
Resp resp = null;
try {
@ -61,12 +68,13 @@ public class BusinessPreOrderApi {
@GetMapping("/listCarNum")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "条件查询", notes = "传入trayTypeDTO")
public R listCarNum(DistributionBusinessPreCarNumerPageQueryVO distributionBusinessPreCarNumerPageQueryVO, Query query){
public R listCarNum(DistributionBusinessPreCarNumerPageQueryVO distributionBusinessPreCarNumerPageQueryVO, Query query) {
IPage<DistributionBusinessPreCarNumerPageVO> data = distributionIBusinessPreOrderService.listCarNum(Condition.getPage(query),distributionBusinessPreCarNumerPageQueryVO);
IPage<DistributionBusinessPreCarNumerPageVO> data = distributionIBusinessPreOrderService.listCarNum(Condition.getPage(query), distributionBusinessPreCarNumerPageQueryVO);
return R.data(data);
}
@ -74,7 +82,7 @@ public class BusinessPreOrderApi {
@GetMapping("/preCarInfoDetailByCarNum")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "条件查询", notes = "传入trayTypeDTO")
public R preCarInfoDetailByCarNum(DistributionBusinessPreCarNumerPageQueryVO distributionBusinessPreCarNumerPageQueryVO){
public R preCarInfoDetailByCarNum(DistributionBusinessPreCarNumerPageQueryVO distributionBusinessPreCarNumerPageQueryVO) {
DistributionBusinessPreCarDetalVO distributionBusinessPreCarDetalVO = distributionIBusinessPreOrderService.preCarInfoDetailByCarNumber(distributionBusinessPreCarNumerPageQueryVO);
@ -82,5 +90,4 @@ public class BusinessPreOrderApi {
}
}

20
blade-service/logpm-business/src/main/java/com/logpm/business/controller/DistributionBusinessPreOrderController.java

@ -14,12 +14,10 @@ import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.Map;
@RestController
@ -72,6 +70,20 @@ public class DistributionBusinessPreOrderController extends BladeController {
}
@PostMapping("/inOrderByZero")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "页面ID", notes = "传入distributionDeliveryList")
public R<Boolean> inOrderByZero(@ApiParam(value = "主键集合", required = true) @RequestBody List<BusinessPreOrderVO> businessPreOrderList) {
try {
Boolean isSuccess = distributionIBusinessPreOrderService.inOrderByZero(businessPreOrderList);
return R.data(isSuccess);
}catch (Exception e){
log.error("预入库信息入库失败",e);
return R.fail(500,e.getMessage());
}
}

51
blade-service/logpm-business/src/main/java/com/logpm/business/mapper/BusinessPreOrderMapper.xml

@ -25,7 +25,8 @@
firsts,
`SECOND`,
third_product,
quantity,
quantity,unload_num,
load_num,
train_number,
order_code,
service_number,
@ -45,7 +46,8 @@
volume,
driver_name,
vehicle_name,
in_warehouse
in_warehouse,
conditions
FROM
logpm_business_pre_order
<where>
@ -108,6 +110,10 @@
AND in_warehouse = #{param.inWarehouse}
</if>
<if test="param.conditions != null ">
AND conditions = #{param.conditions}
</if>
</where>
@ -158,11 +164,13 @@
<select id="pageByCarNum" resultType="com.logpm.business.vo.DistributionBusinessPreCarNumberVO">
SELECT distr_car_number,
waybill_number,
order_code,
COUNT(1) as totalNum,
COUNT(CASE WHEN in_warehouse = 1 THEN 1 END) as inNum,
COUNT(1)-COUNT(CASE WHEN in_warehouse = 1 THEN 1 END) as restNum
GROUP_CONCAT(waybill_number) as waybill_number,
GROUP_CONCAT(order_code) as order_code,
GROUP_CONCAT(DISTINCT driver_name) as driver_name,
sum(quantity) as totalNum,
sum(unload_num) as inNum,
sum(quantity)-sum(unload_num) as restNum,
GROUP_CONCAT(DISTINCT task_time) as taskTime
from logpm_business_pre_order
<where>
@ -177,11 +185,22 @@
and order_code LIKE CONCAT(#{distributionBusinessPreOrderDTO.orderCode},'%')
</if>
<if test="distributionBusinessPreOrderDTO.taskTimeStart != null ">
AND task_time > #{distributionBusinessPreOrderDTO.taskTimeStart}
</if>
<if test="distributionBusinessPreOrderDTO.taskTimeEnd != null ">
AND task_time &lt; #{distributionBusinessPreOrderDTO.taskTimeEnd}
</if>
<if test="distributionBusinessPreOrderDTO.driverName != null ">
AND driver_name like concat("%",#{distributionBusinessPreOrderDTO.driverName},'%')
</if>
</where>
GROUP BY
distr_car_number,
waybill_number,
order_code
distr_car_number
order by task_time desc
</select>
<select id="listCarNum" resultType="com.logpm.business.vo.DistributionBusinessPreCarNumerPageVO">
SELECT
@ -190,9 +209,9 @@
driver_name,
task_time,
COUNT(DISTINCT order_code) as orderCount,
COUNT(DISTINCT order_package_code) as orderPackageCodeCount,
sum(case when order_package_loading_status =20 then 1 else 0 end ) as loadCarCount,
sum(case when in_warehouse =1 then 1 else 0 end ) as inWarehouseCount
sum( quantity ) as orderPackageCodeCount,
sum( load_num ) as loadCarCount,
sum( unload_num ) as inWarehouseCount
from logpm_business_pre_order
<where>
@ -218,9 +237,9 @@
driver_name,
task_time,
COUNT(DISTINCT order_code) as orderCount,
COUNT(DISTINCT order_package_code) as orderPackageCodeCount,
sum(case when order_package_loading_status =20 then 1 else 0 end ) as loadCarCount,
sum(case when in_warehouse =1 then 1 else 0 end ) as inWarehouseCount
sum(quantity) as orderPackageCodeCount,
sum(load_num ) as loadCarCount,
sum(unload_num ) as inWarehouseCount
from logpm_business_pre_order
<where>
is_deleted=0

6
blade-service/logpm-business/src/main/java/com/logpm/business/service/IBusinessPreOrderService.java

@ -106,4 +106,10 @@ public interface IBusinessPreOrderService extends BaseService<BusinessPreOrderEn
String sourceTenantId
);
/**
* 零担入库
* @param businessPreOrderList
* @return
*/
Boolean inOrderByZero(List<BusinessPreOrderVO> businessPreOrderList);
}

13
blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessAsyncServiceImpl.java

@ -46,6 +46,10 @@ public class BusinessAsyncServiceImpl implements IBusinessAsyncService {
log.info(" saveOtherDataBaseNew dataResult 参数错误");
}
LambdaQueryWrapper<BusinessPreOrderEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(BusinessPreOrderEntity::getInWarehouse, 0);
lambdaQueryWrapper.in(BusinessPreOrderEntity::getOrderCode, orderCodeList);
@ -62,7 +66,7 @@ public class BusinessAsyncServiceImpl implements IBusinessAsyncService {
businessPreOrderEntity.setTenantId(tenant.getTenantId());
if (businessPreOrderEntity.getStockArticleId().equals(distributionBusinessPreOrderEntity.getStockArticleId())) {
// 找到订单
if (businessPreOrderEntity.getOrderPackageCode().equals(distributionBusinessPreOrderEntity.getOrderPackageCode())) {
if (distributionBusinessPreOrderEntity.getConditions().equals(1) && businessPreOrderEntity.getOrderPackageCode().equals(distributionBusinessPreOrderEntity.getOrderPackageCode())) {
//找到包件 并标记为删除状态
if (distributionBusinessPreOrderEntity.getInWarehouse().equals(1)) {
// 需要删除集合中的数据
@ -70,6 +74,13 @@ public class BusinessAsyncServiceImpl implements IBusinessAsyncService {
} else {
temsp.add(distributionBusinessPreOrderEntity.getId());
}
}else if(distributionBusinessPreOrderEntity.getConditions().equals(3) &&distributionBusinessPreOrderEntity.getFirsts().equals(businessPreOrderEntity.getFirsts())){
if (distributionBusinessPreOrderEntity.getInWarehouse().equals(1)) {
// 需要删除集合中的数据
dataResult.remove(i);
} else {
temsp.add(distributionBusinessPreOrderEntity.getId());
}
}
}

311
blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessPreOrderServiceImpl.java

@ -17,8 +17,12 @@ import com.logpm.business.service.IBusinessAsyncService;
import com.logpm.business.service.IBusinessPreOrderService;
import com.logpm.business.vo.*;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.feign.IDistributionDeliveryListClient;
import com.logpm.distribution.feign.IDistributionParcelListClient;
import com.logpm.distribution.feign.IDistributionParcelNumberClient;
import com.logpm.distribution.feign.IDistributionStockArticleClient;
import com.logpm.trunkline.dto.InComingDTO;
import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity;
import com.logpm.trunkline.feign.IInComingClient;
@ -56,6 +60,9 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
private final BladeRedis bladeRedis;
private final IWarehouseTrayTypeClient warehouseTrayTypeClient;
private final IDistributionDeliveryListClient distributionDeliveryListClient;
private final IDistributionStockArticleClient distributionStockArticleClient;
private final IDistributionParcelListClient distributionParcelListClient;
private final IDistributionParcelNumberClient distributionParcelNumberClient;
@Override
@ -98,6 +105,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
// 更新成功
// 更新入库状态
distributionBusinessPreOrderEntity.setInWarehouse(1);
distributionBusinessPreOrderEntity.setUnloadNum(1);
baseMapper.updateById(distributionBusinessPreOrderEntity);
Object o = bladeRedis.get(RedisKeyConstant.BUSINESS_IN_CARNUMBER + distributionBusinessPreOrderEntity.getDistrCarNumber());
if (!Objects.isNull(o)) {
@ -200,43 +208,182 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
try {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
businessSanDTO.setWarehouseId(myCurrentWarehouse.getId());
businessSanDTO.setWarehouseName(myCurrentWarehouse.getName());
String orderPackageCode = businessSanDTO.getOrderPackageCode();
String distrCarNumber = businessSanDTO.getDistrCarNumber();
if ("1".equals(businessSanDTO.getConditions())) {
businessSanDTO.setWarehouseId(myCurrentWarehouse.getId());
businessSanDTO.setWarehouseName(myCurrentWarehouse.getName());
String orderPackageCode = businessSanDTO.getOrderPackageCode();
String distrCarNumber = businessSanDTO.getDistrCarNumber();
if (Func.isAllEmpty(orderPackageCode, distrCarNumber, businessSanDTO.getInWarehouseException())) {
return Resp.scanFail("扫描失败", "没有包件或者车次");
}
// 查询配送车次下面所有的包件
LambdaQueryWrapper<BusinessPreOrderEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(BusinessPreOrderEntity::getDistrCarNumber, distrCarNumber);
queryWrapper.eq(BusinessPreOrderEntity::getIsDeleted, 0);
List<BusinessPreOrderEntity> list = baseMapper.selectList(queryWrapper);
if (list.isEmpty()) {
return Resp.scanFail("扫描失败", "车次信息不存在");
}
if (Func.isAllEmpty(orderPackageCode, distrCarNumber, businessSanDTO.getInWarehouseException())) {
return Resp.scanFail("扫描失败", "没有包件或者车次");
}
// 查询配送车次下面所有的包件
LambdaQueryWrapper<BusinessPreOrderEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(BusinessPreOrderEntity::getDistrCarNumber, distrCarNumber);
queryWrapper.eq(BusinessPreOrderEntity::getIsDeleted, 0);
List<BusinessPreOrderEntity> list = baseMapper.selectList(queryWrapper);
if (list.isEmpty()) {
return Resp.scanFail("扫描失败", "车次信息不存在");
}
// 异常入库
if (1 == businessSanDTO.getInWarehouseException()) {
Resp a = handleExceptionalWarehourse(businessSanDTO, list, orderPackageCode, distrCarNumber);
if (a != null) return a;
} else {
//正常入口
Resp scanFail = handleNormalWarehourse(businessSanDTO, orderPackageCode, list, distrCarNumber);
if (scanFail != null) return scanFail;
}
} else if ("3".equals(businessSanDTO.getConditions())) {
// 零担
LambdaQueryWrapper<BusinessPreOrderEntity> queryWrapper3 = new LambdaQueryWrapper<>();
queryWrapper3.eq(BusinessPreOrderEntity::getDistrCarNumber, businessSanDTO.getDistrCarNumber());
queryWrapper3.eq(BusinessPreOrderEntity::getReservationCode, businessSanDTO.getReservationCode());
queryWrapper3.eq(BusinessPreOrderEntity::getOrderCode, businessSanDTO.getOrderCode());
queryWrapper3.eq(BusinessPreOrderEntity::getFirsts, businessSanDTO.getFirsts());
List<BusinessPreOrderEntity> list3 = baseMapper.selectList(queryWrapper3);
if (list3.isEmpty()) {
throw new CustomerException("入库数据错误,请联系管理员");
}
BusinessPreOrderEntity businessPreOrderEntity = list3.get(0);
if (1 == businessPreOrderEntity.getInWarehouse()) {
return Resp.scanFail("操作失败", businessSanDTO.getFirsts() + "已入库");
}
// 构建 订单
DistributionStockArticleEntity distributionStockArticleEntity = checkStockArticle(businessPreOrderEntity, myCurrentWarehouse);
// 构建 订单下级【包件】
DistributionParcelListEntity distributionParcelListEntityByOrderCodeAndFirstName = distributionParcelListClient.findDistributionParcelListEntityByOrderCodeAndFirstName(businessPreOrderEntity.getOrderCode(), businessSanDTO.getFirsts(), myCurrentWarehouse.getId());
int temp = 0;
if (distributionParcelListEntityByOrderCodeAndFirstName == null) {
// 执行新增功能
DistributionParcelListEntity distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId = distributionParcelListClient.findDistributionParcelListEntityByOrderCodeAndFirstNameAndTenantId(businessPreOrderEntity.getFromTenantId(), businessPreOrderEntity.getOrderCode(), businessSanDTO.getFirsts(), businessPreOrderEntity.getWarehouseId());
if (distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId != null) {
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setId(null);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setTenantId(null);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setCreateUser(null);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setUpdateUser(null);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setCreateTime(null);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setUpdateTime(null);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setOrderPackageReservationStatus("10");
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setOrderPackageLoadingStatus("10");
// 卸车数量作为入库数量
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setQuantity(businessSanDTO.getUnloadNum());
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setStockArticleId(distributionStockArticleEntity.getId());
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setConditions(3);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setWarehouseId(myCurrentWarehouse.getId());
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setWarehouse(myCurrentWarehouse.getName());
Long id =distributionParcelListClient.addReturnId(distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId);
// 增加logpm_distribution_parcel_number 的数据
DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity();
parcelNumberEntity.setStockArticleId(distributionStockArticleEntity.getId());
parcelNumberEntity.setParcelListId(id);
parcelNumberEntity.setQuantity(businessSanDTO.getUnloadNum());
parcelNumberEntity.setHandQuantity(businessSanDTO.getUnloadNum());
parcelNumberEntity.setDeliveryQuantity(0);
parcelNumberEntity.setSigninQuantity(0);
parcelNumberEntity.setOutboundQuantity(0);
parcelNumberEntity.setWarehouseId(myCurrentWarehouse.getId());
List<DistributionParcelNumberEntity> ls = new ArrayList<>();
ls.add(parcelNumberEntity);
distributionParcelNumberClient.addBatch(ls);
distributionStockArticleEntity.setHandQuantity(distributionStockArticleEntity.getHandQuantity()==null?0:distributionStockArticleEntity.getHandQuantity() + businessSanDTO.getUnloadNum());
distributionStockArticleEntity.setIncomingNum(distributionStockArticleEntity.getIncomingNum()==null?0:distributionStockArticleEntity.getIncomingNum() + businessSanDTO.getUnloadNum());
distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity);
// distributionParcelNumberClient.add(new DistributionParcelNumberEntity(distributionParcelListEntityByOrderCodeAndFirstName.getId(), distributionParcelListEntityByOrderCodeAndFirstName.getOrderPackageCode(), distributionParcelListEntityByOrderCodeAndFirstName.getOrderPackageReservationStatus(), distributionParcelListEntityByOrderCodeAndFirstName.getQuantity()));
temp = businessSanDTO.getUnloadNum();
}
} else {
// 修改其入库数量
if(distributionParcelListEntityByOrderCodeAndFirstName.getQuantity()<businessSanDTO.getUnloadNum()){
temp = distributionParcelListEntityByOrderCodeAndFirstName.getQuantity() - businessSanDTO.getUnloadNum();
}else{
temp = businessSanDTO.getUnloadNum() - distributionParcelListEntityByOrderCodeAndFirstName.getQuantity();
}
distributionParcelListEntityByOrderCodeAndFirstName.setQuantity(businessSanDTO.getUnloadNum());
distributionParcelListClient.update(distributionParcelListEntityByOrderCodeAndFirstName);
}
// distributionStockArticleEntity.setHandQuantity(distributionStockArticleEntity.getHandQuantity() + temp);
// distributionStockArticleEntity.setIncomingNum(distributionStockArticleEntity.getIncomingNum() + temp);
// distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity);
// 修改预入库数据
businessPreOrderEntity.setInWarehouse(1);
businessPreOrderEntity.setUnloadNum(businessSanDTO.getUnloadNum());
this.updateById(businessPreOrderEntity);
return Resp.scanSuccess("操作成功", "入库"+businessSanDTO.getUnloadNum()+"件");
// 异常入库
if (1 == businessSanDTO.getInWarehouseException()) {
Resp a = handleExceptionalWarehourse(businessSanDTO, list, orderPackageCode, distrCarNumber);
if (a != null) return a;
} else {
//正常入口
Resp scanFail = handleNormalWarehourse(businessSanDTO, orderPackageCode, list, distrCarNumber);
if (scanFail != null) return scanFail;
log.warn("?? 参数传递错误 ");
}
} catch (Exception e) {
log.error("系统异常", e);
throw new CustomerException(e.getMessage());
}
return Resp.scanFail("扫描失败", "系统错误");
return Resp.scanFail("操作失败", "系统错误");
}
/**
* 对订单进行处理 当订单不存在的时候进行新增
*
* @param businessPreOrderEntity
* @param myCurrentWarehouse
* @return
*/
private DistributionStockArticleEntity checkStockArticle(BusinessPreOrderEntity businessPreOrderEntity, BasicdataWarehouseEntity myCurrentWarehouse) {
DistributionStockArticleEntity byOrderSelfNumAndTenantId = distributionStockArticleClient.findByOrderSelfNum(businessPreOrderEntity.getOrderCode(), myCurrentWarehouse.getId());
if (byOrderSelfNumAndTenantId == null) {
// 执行新增功能
byOrderSelfNumAndTenantId = distributionStockArticleClient.findByOrderSelfNumAndTenantId(businessPreOrderEntity.getFromTenantId(), businessPreOrderEntity.getOrderCode(), businessPreOrderEntity.getWarehouseId());
if (byOrderSelfNumAndTenantId != null) {
byOrderSelfNumAndTenantId.setId(null);
byOrderSelfNumAndTenantId.setTenantId(null);
byOrderSelfNumAndTenantId.setCreateUser(null);
byOrderSelfNumAndTenantId.setUpdateUser(null);
byOrderSelfNumAndTenantId.setCreateTime(null);
byOrderSelfNumAndTenantId.setUpdateTime(null);
byOrderSelfNumAndTenantId.setOrderStatus("20");
byOrderSelfNumAndTenantId.setReservationStatus("10");
byOrderSelfNumAndTenantId.setWarehouse(myCurrentWarehouse.getName());
byOrderSelfNumAndTenantId.setWarehouseId(myCurrentWarehouse.getId());
byOrderSelfNumAndTenantId.setDeliveryQuantity(0);
byOrderSelfNumAndTenantId.setStoreTime(null);
byOrderSelfNumAndTenantId.setWaybillId(null);
// 对应新增的订单默认在库件数未0
byOrderSelfNumAndTenantId.setHandQuantity(0);
byOrderSelfNumAndTenantId.setIncomingNum(0);
Long id = distributionStockArticleClient.addData(byOrderSelfNumAndTenantId);
byOrderSelfNumAndTenantId.setId(id);
}
}
return byOrderSelfNumAndTenantId;
}
@Nullable
private Resp handleNormalWarehourse(BusinessSanDTO businessSanDTO, String orderPackageCode, List<BusinessPreOrderEntity> list, String distrCarNumber) {
LambdaQueryWrapper<BusinessPreOrderEntity> queryWrapper1 = new LambdaQueryWrapper<>();
@ -295,6 +442,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
R r = inOrderWarehourseByFeign(businessSanDTO);
if (r.isSuccess()) {
selectD.setInWarehouse(1);
selectD.setUnloadNum(1);
this.updateById(selectD);
int a = 0;
@ -348,7 +496,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
// 推送业务系统
distributionDeliveryListClient.mallClientSignfor(selectD.getFromTenantId(), businessSanDTO.getDistrCarNumber(), selectD.getAcceptWarehouseId(), orderPackageCode, AuthUtil.getTenantId());
//distributionDeliveryListClient.mallClientSignfor(selectD.getFromTenantId(), businessSanDTO.getDistrCarNumber(), selectD.getAcceptWarehouseId(), orderPackageCode, AuthUtil.getTenantId());
return Resp.scanSuccess("扫描成功", a + "件");
@ -389,6 +537,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
R r = inOrderWarehourseByFeign(businessSanDTO);
if (r.isSuccess() && t != null) {
t.setInWarehouse(1);
t.setUnloadNum(1);
this.updateById(t);
int a = 0;
@ -441,7 +590,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
// 推送业务系统
distributionDeliveryListClient.mallClientSignfor(t.getFromTenantId(), businessSanDTO.getDistrCarNumber(), t.getAcceptWarehouseId(), orderPackageCode, AuthUtil.getTenantId());
//distributionDeliveryListClient.mallClientSignfor(t.getFromTenantId(), businessSanDTO.getDistrCarNumber(), t.getAcceptWarehouseId(), orderPackageCode, AuthUtil.getTenantId());
return Resp.scanSuccess("扫描成功", "异常" + a + "件");
}
@ -466,6 +615,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
LambdaQueryWrapper<BusinessPreOrderEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(BusinessPreOrderEntity::getDistrCarNumber, queryVO.getDistrCarNumber());
queryWrapper.eq(BusinessPreOrderEntity::getIsDeleted, 0);
queryWrapper.eq(BusinessPreOrderEntity::getConditions, queryVO.getConditions());
List<BusinessPreOrderEntity> list = this.list(queryWrapper);
if (list != null) {
@ -488,13 +638,24 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
private void processGroupedData(String orderCode, List<BusinessPreOrderEntity> entities, List<DistributionBusinessPreCarOrderDetalVO> data) {
DistributionBusinessPreCarOrderDetalVO t = new DistributionBusinessPreCarOrderDetalVO();
t.setOrderCode(orderCode);
String wallbillNum = entities.stream().map(BusinessPreOrderEntity::getWaybillNumber).distinct().collect(Collectors.joining(","));
// todo 这里的计算存在问题,没有计算零担的数据
int planNum = entities.size();
int loadNum = (int) entities.stream().filter(e -> "20".equals(e.getOrderPackageLoadingStatus())).count();
int inNum = (int) entities.stream().filter(e -> e.getInWarehouse() == 1).count();
// 计算 entities 集合中 对象 的quantity 的和值
int planNum = entities.stream().mapToInt(BusinessPreOrderEntity::getQuantity).sum();
// 装车数量
int loadNum = entities.stream().mapToInt(BusinessPreOrderEntity::getLoadNum).sum();
// 卸车数量== 入库数量
int inNum = entities.stream().mapToInt(BusinessPreOrderEntity::getUnloadNum).sum();
/**
* 零担无法进行异常卸车
*/
int inExceNum = (int) entities.stream().filter(e -> e.getOperationStatus() == 1).count();
String wallbillNum = entities.stream().map(BusinessPreOrderEntity::getWaybillNumber).distinct().collect(Collectors.joining(","));
t.setWaybillNumber(wallbillNum);
t.setLoadCarCount(loadNum);
@ -625,4 +786,96 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
return r;
}
@Override
public Boolean inOrderByZero(List<BusinessPreOrderVO> businessPreOrderList) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
List<Long> ids = businessPreOrderList.stream().map(BusinessPreOrderVO::getId).collect(Collectors.toList());
// 查询与入库数量
List<BusinessPreOrderEntity> list = baseMapper.selectList(new LambdaQueryWrapper<BusinessPreOrderEntity>().in(BusinessPreOrderEntity::getId, ids));
for (BusinessPreOrderEntity businessPreOrderEntity : list) {
BusinessPreOrderVO t = businessPreOrderList.stream().filter(a->businessPreOrderEntity.getId().equals(a.getId())).findFirst().get();
if (1 == businessPreOrderEntity.getInWarehouse()) {
throw new CustomerException( businessPreOrderEntity.getFirsts() + "已入库");
}
// 构建 订单
DistributionStockArticleEntity distributionStockArticleEntity = checkStockArticle(businessPreOrderEntity, myCurrentWarehouse);
// 构建 订单下级【包件】
DistributionParcelListEntity distributionParcelListEntityByOrderCodeAndFirstName = distributionParcelListClient.findDistributionParcelListEntityByOrderCodeAndFirstName(businessPreOrderEntity.getOrderCode(), businessPreOrderEntity.getFirsts(), myCurrentWarehouse.getId());
int temp = 0;
if (distributionParcelListEntityByOrderCodeAndFirstName == null) {
// 执行新增功能
DistributionParcelListEntity distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId = distributionParcelListClient.findDistributionParcelListEntityByOrderCodeAndFirstNameAndTenantId(businessPreOrderEntity.getFromTenantId(), businessPreOrderEntity.getOrderCode(), businessPreOrderEntity.getFirsts(), businessPreOrderEntity.getWarehouseId());
if (distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId != null) {
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setId(null);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setTenantId(null);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setCreateUser(null);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setUpdateUser(null);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setCreateTime(null);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setUpdateTime(null);
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setOrderPackageReservationStatus("10");
// 卸车数量作为入库数量
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setQuantity(t.getUnloadNum());
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId.setStockArticleId(distributionStockArticleEntity.getId());
// distributionParcelListClient.add(distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId);
Long id =distributionParcelListClient.addReturnId(distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId);
// 增加logpm_distribution_parcel_number 的数据
DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity();
parcelNumberEntity.setStockArticleId(distributionStockArticleEntity.getId());
parcelNumberEntity.setParcelListId(id);
parcelNumberEntity.setQuantity(t.getUnloadNum());
parcelNumberEntity.setHandQuantity(t.getUnloadNum());
parcelNumberEntity.setDeliveryQuantity(0);
parcelNumberEntity.setSigninQuantity(0);
parcelNumberEntity.setOutboundQuantity(0);
parcelNumberEntity.setWarehouseId(myCurrentWarehouse.getId());
List<DistributionParcelNumberEntity> ls = new ArrayList<>();
ls.add(parcelNumberEntity);
distributionParcelNumberClient.addBatch(ls);
distributionStockArticleEntity.setHandQuantity(distributionStockArticleEntity.getHandQuantity()==null?0:distributionStockArticleEntity.getHandQuantity() + t.getUnloadNum());
distributionStockArticleEntity.setIncomingNum(distributionStockArticleEntity.getIncomingNum()==null?0:distributionStockArticleEntity.getIncomingNum() + t.getUnloadNum());
distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity);
temp = t.getUnloadNum();
}
} else {
// 修改其入库数量
if(distributionParcelListEntityByOrderCodeAndFirstName.getQuantity()<t.getUnloadNum()){
temp = distributionParcelListEntityByOrderCodeAndFirstName.getQuantity() - t.getUnloadNum();
}else{
temp = t.getUnloadNum() - distributionParcelListEntityByOrderCodeAndFirstName.getQuantity();
}
distributionParcelListEntityByOrderCodeAndFirstName.setQuantity(t.getUnloadNum());
distributionParcelListClient.update(distributionParcelListEntityByOrderCodeAndFirstName);
}
distributionStockArticleEntity.setHandQuantity(distributionStockArticleEntity.getHandQuantity() + temp);
// distributionStockArticleEntity.setIncomingNum(distributionStockArticleEntity.getIncomingNum() + temp);
distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity);
// 修改预入库数据
businessPreOrderEntity.setInWarehouse(1);
businessPreOrderEntity.setUnloadNum(t.getUnloadNum());
this.updateById(businessPreOrderEntity);
}
return true;
}
}

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

@ -11,7 +11,7 @@ server:
spring:
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure,com.alibaba.cloud.seata.feign.SeataFeignClientAutoConfiguration
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
dynamic:
druid:

16
blade-service/logpm-business/src/main/resources/application-test.yml

@ -12,7 +12,7 @@ server:
spring:
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure,com.alibaba.cloud.seata.feign.SeataFeignClientAutoConfiguration
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
dynamic:
druid:
@ -25,19 +25,7 @@ spring:
url: ${blade.datasource.business.master.url}
username: ${blade.datasource.business.master.username}
password: ${blade.datasource.business.master.password}
627683:
url: ${blade.datasource.business.627683.url}
username: ${blade.datasource.business.627683.username}
password: ${blade.datasource.business.627683.password}
645789:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.business.645789.url}
username: ${blade.datasource.business.645789.username}
password: ${blade.datasource.business.645789.password}
#rabbitmq配置
rabbitmq:
host: 192.168.2.110

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java

@ -42,6 +42,9 @@ public class DistributionDeliveryListExcel implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
/**
* 车次
*/

64
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java

@ -18,6 +18,7 @@ package com.logpm.distribution.feign;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@ -33,8 +34,10 @@ import com.logpm.distribution.service.IDistributionParcelListService;
import com.logpm.distribution.service.IDistributionParcelNumberService;
import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.ZeroPackageSupplyVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.annotations.ChangeAsync;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -216,11 +219,20 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
distributionStockArticleService.updateOrderInfo(orderCode, warehouseId);
}
@Override
public DistributionParcelListEntity findDistributionParcelListEntityByOrderCodeAndFirstName(String orderCode, String first, Long warehouseId) {
LambdaQueryWrapper<DistributionParcelListEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(DistributionParcelListEntity::getOrderCode, orderCode);
lambdaQueryWrapper.eq(DistributionParcelListEntity::getFirsts, first);
lambdaQueryWrapper.eq(DistributionParcelListEntity::getWarehouseId, warehouseId);
return distributionParcelListService.getOne(lambdaQueryWrapper);
}
@ChangeAsync
@Override
public Integer SumEntityByOrderId(Long orderId, Long warehouseId) {
Integer i = distributionParcelListService.selectSumByOrderId(orderId, warehouseId);
return i;
public DistributionParcelListEntity findDistributionParcelListEntityByOrderCodeAndFirstNameAndTenantId(String tenantId, String orderCode, String first, Long warehouseId) {
return findDistributionParcelListEntityByOrderCodeAndFirstName(orderCode, first, warehouseId);
}
@Override
@ -502,4 +514,50 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
public void clearPallet(List<Long> orderPackageIdList) {
distributionParcelListService.clearPalletByIds(orderPackageIdList);
}
@Override
public List<JSONObject> findPackageGoodsListByWaybillNo(String waybillNo) {
return distributionParcelListService.findPackageGoodsListByWaybillNo(waybillNo);
}
@Override
public List<DistributionParcelListEntity> findListByStockArticleId(Long articleId) {
QueryWrapper<DistributionParcelListEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("stock_article_id",articleId);
return distributionParcelListService.list(queryWrapper);
}
@Override
public List<DistributionParcelListVO> findEntityVOListByOrderCode(String orderCode, Long fromWarehouseId) {
return distributionParcelListService.findEntityVOListByOrderCode(orderCode,fromWarehouseId);
}
@Override
public void addZeroQuantity(Long packageId, int num) {
//零担加了数量
distributionParcelListService.addZeroPackageQuantity(packageId,num);
//对应的parceNumber也要加上在库数量
distributionParcelNumberService.addZeroQuantity(packageId,num);
}
@Override
public List<ZeroPackageSupplyVO> findListByStockArticleIds(List<Long> orderIdList) {
return distributionParcelListService.findListByStockArticleIds(orderIdList);
}
@Override
public void updateWaybillIdByWaybillNo(Long waybillId, String waybillNo) {
distributionParcelListService.updateWaybillIdByWaybillNo(waybillId,waybillNo);
}
@Override
public List<String> findOrderCodeByWaybillId(Long waybillId) {
return distributionParcelListService.findOrderCodeByWaybillId(waybillId);
}
@Override
public void clearWaybillInfoByParceListIds(List<Long> parceListIds) {
distributionParcelListService.clearWaybillInfoByParceListIds(parceListIds);
}
}

29
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelNumberClient.java

@ -16,13 +16,14 @@
*/
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.DistributionParcelNumberEntity;
import com.logpm.distribution.service.IDistributionParcelNumberService;
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.DistributionParcelNumberEntity;
import com.logpm.distribution.service.IDistributionParcelNumberService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
@ -57,4 +58,28 @@ public class DistributionParcelNumberClient implements IDistributionParcelNumber
distributionParcelNumberService.saveBatch(parcelNumberList);
}
@Override
public List<DistributionParcelNumberEntity> findListByParcelListIds(List<Long> parcelListIds) {
QueryWrapper<DistributionParcelNumberEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.in("parcel_list_id", parcelListIds);
return distributionParcelNumberService.list(queryWrapper);
}
@Override
public void updateList(List<DistributionParcelNumberEntity> updateParceNumberList) {
distributionParcelNumberService.updateBatchById(updateParceNumberList);
}
@Override
public List<DistributionParcelNumberEntity> findListByStockArticleId(Long orderId) {
QueryWrapper<DistributionParcelNumberEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.in("stock_article_id", orderId);
return distributionParcelNumberService.list(queryWrapper);
}
@Override
public void addHandleQuantity(Long packageId, int num) {
distributionParcelNumberService.addZeroQuantity(packageId, num);
}
}

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

@ -27,6 +27,8 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
/**
* 预约订单中间表 Feign实现类
*
@ -49,4 +51,9 @@ public class DistributionReservationStockarticleClient implements IDistributionR
IPage<DistributionReservationStockarticleEntity> page = distributionReservationStockarticleService.page(Condition.getPage(query));
return BladePage.of(page);
}
@Override
public List<Long> findReservationIdsByOrderCodes(List<String> orderCodes) {
return distributionReservationStockarticleService.findReservationIdsByOrderCodes(orderCodes);
}
}

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

@ -20,6 +20,7 @@ import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -32,6 +33,7 @@ import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.vo.UpDownStockupAreaVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.annotations.ChangeAsync;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
@ -108,6 +110,12 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
return distributionStockArticleService.getOne(queryWrapper);
}
@ChangeAsync
@Override
public DistributionStockArticleEntity findByOrderSelfNumAndTenantId(String tenantId, String orderCode, Long warehouseId) {
return findByOrderSelfNum(orderCode,warehouseId);
}
@Override
public void deleteById(Long orderId) {
QueryWrapper<DistributionParcelListEntity> queryWrapper = new QueryWrapper<>();
@ -414,4 +422,28 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
return distributionStockArticleService.findSignNumByWaybillNo(waybillNo,destinationWarehouseId);
}
@Override
public void addSignNum(Long orderId, Integer unloadNum) {
DistributionStockArticleEntity stockArticle = distributionStockArticleService.getById(orderId);
Integer signinQuantity = stockArticle.getSigninQuantity();
DistributionStockArticleEntity updateEntity = new DistributionStockArticleEntity();
updateEntity.setId(orderId);
updateEntity.setSigninQuantity(signinQuantity+unloadNum);
distributionStockArticleService.updateById(updateEntity);
}
@Override
public void deleteZeroOrderByWaybillNoList(List<String> waybillNoList) {
UpdateWrapper<DistributionStockArticleEntity> updateWrapper = new UpdateWrapper<>();
updateWrapper.set("is_deleted",1)
.in("waybill_number",waybillNoList);
distributionStockArticleService.update(updateWrapper);
UpdateWrapper<DistributionParcelListEntity> updateParceWrapper = new UpdateWrapper<>();
updateParceWrapper.set("is_deleted",1)
.in("waybill_number",waybillNoList);
distributionParcelListService.update(updateParceWrapper);
}
}

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

@ -212,7 +212,6 @@
FROM logpm_distribution_delivery_list lddl
left JOIN logpm_distribution_signfor lds on lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation ldr on ldr.id = lds.reservation_id
LEFT JOIN (SELECT lddl.id,ldsa.order_code FROM logpm_distribution_delivery_list lddl LEFT JOIN logpm_distribution_signfor lds ON lddl.id = lds.delivery_id LEFT JOIN logpm_distribution_reservation_stockarticle AS ldrs ON lds.reservation_id = ldrs.reservation_id AND ldrs.stock_article_status != 2 LEFT JOIN logpm_distribution_stock_article AS ldsa ON ldrs.stock_article_id = ldsa.id ) AS y ON y.id = lddl.id
<where>
lddl.is_deleted = 0
AND (IF(lddl.delivery_number is null ,0,lddl.delivery_number) + IF(lddl.inventory_nub is null ,0,lddl.inventory_nub)) > 0
@ -251,7 +250,7 @@
and lddl.loading_team_name like concat('%',#{param.loadingTeamName},'%')
</if>
<if test="param.orderCode != null and param.orderCode!=''">
and y.order_code like concat('%',#{param.orderCode},'%')
and ldr.stock_article_id like concat('%',#{param.orderCode},'%')
</if>
<if test="param.kind != null and param.kind!=''">
and lddl.kind = #{param.kind}

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

@ -193,4 +193,12 @@ public interface DistributionLoadscanMapper extends BaseMapper<DistributionLoads
* @return
*/
List<DistributionLoadscanEntity> selectSignDataForArticleAndZero(@Param("reservationId") Long reservationId);
/**
* 根据预约单ID和包间Id查询装车/签收数据
* @param reservationId
* @param parcelListId
* @return
*/
DistributionLoadscanEntity findLoadDataByRelationIdAndParcelListId(@Param("reservationId") Long reservationId, @Param("parcelListId")Long parcelListId);
}

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

@ -80,7 +80,7 @@
SELECT GROUP_CONCAT(DISTINCT ldl.driver_name SEPARATOR ',' ) FROM logpm_distribution_loadscan ldl where ldl.order_id =#{id}
</select>
<select id="statisticsLoadingNum" resultType="java.lang.Integer">
SELECT COUNT(ldl.loaded_nub) FROM logpm_distribution_loadscan AS ldl Where ldl.delivery_id = #{deliveryListId} and ldl.is_abnormal_loading = 1 and ldl.scan_status != 1
SELECT IFNULL(SUM(ldl.loaded_nub),0) FROM logpm_distribution_loadscan AS ldl Where ldl.delivery_id = #{deliveryListId} and ldl.is_abnormal_loading = 1 and ldl.scan_status != 1
</select>
<select id="statisticsAbnormalLoadingNum" resultType="java.lang.Integer">
SELECT COUNT(ldl.loaded_nub) FROM logpm_distribution_loadscan AS ldl Where ldl.delivery_id = #{deliveryListId} and ldl.is_abnormal_loading = 2
@ -96,7 +96,7 @@
</select>
<select id="selectOrderSigningNumByReservationIdAndDeliveryIdAndOrderId" resultType="java.lang.Integer">
SELECT IF(sum( received_quantity) is null ,0,sum( received_quantity) ) AS signingNumber FROM logpm_distribution_loadscan WHERE is_deleted = 0 AND reservation_id = #{reservationId} AND delivery_id = #{deliveryId} AND order_id = #{orderId} AND scan_status != 1
SELECT IFNULL(sum(received_quantity),0) AS signingNumber FROM logpm_distribution_loadscan WHERE is_deleted = 0 AND reservation_id = #{reservationId} AND delivery_id = #{deliveryId} AND order_id = #{orderId} AND scan_status != 1
</select>
<select id="selectPackageSigningTime" resultType="java.lang.String">
SELECT signing_time FROM logpm_distribution_loadscan WHERE package_id = #{packageId} AND signfor_state = 2 AND scan_state != 1
@ -153,4 +153,13 @@
SELECT * from logpm_distribution_loadscan where reservation_id=#{reservationId} and signfor_state=2
</select>
<select id="findLoadDataByRelationIdAndParcelListId"
resultType="com.logpm.distribution.entity.DistributionLoadscanEntity">
SELECT
*
FROM
logpm_distribution_loadscan
WHERE
reservation_id = #{reservationId} AND package_id = #{parcelListId}
</select>
</mapper>

15
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.mapper;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionParcelListDTO;
@ -296,4 +297,18 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
String findAllAllocationByNoParcelListIds(@Param("parcelListIdList") List<Long> parcelListIdList, @Param("orderCode") String orderCode);
void clearAllocationByIds(@Param("clearTrayList") List<Long> clearTrayList);
List<JSONObject> findPackageGoodsListByWaybillNo(@Param("waybillNo") String waybillNo);
List<DistributionParcelListVO> findEntityVOListByOrderCode(@Param("orderCode") String orderCode,@Param("fromWarehouseId") Long fromWarehouseId);
void addZeroPackageQuantity(@Param("packageId") Long packageId, @Param("num") int num);
List<ZeroPackageSupplyVO> findListByStockArticleIds(@Param("orderIdList") List<Long> orderIdList);
void updateWaybillIdByWaybillNo(@Param("waybillId") Long waybillId, @Param("waybillNo") String waybillNo);
List<String> findOrderCodeByWaybillId(@Param("waybillId") Long waybillId);
void clearWaybillInfoByParceListIds(@Param("parceListIds") List<Long> parceListIds);
}

69
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -1874,4 +1874,73 @@
</foreach>
</update>
<select id="findPackageGoodsListByWaybillNo" resultType="com.alibaba.fastjson.JSONObject">
select ldpl.id packageId,
lwwd.product_id goodsId,
lwwd.product_name goodsName,
ldpl.quantity stockNum
from logpm_distribution_parcel_list ldpl
left join logpm_warehouse_waybill_detail lwwd on lwwd.id = ldpl.advance_id
where lwwd.waybill_no = #{waybillNo}
</select>
<select id="findEntityVOListByOrderCode" resultType="com.logpm.distribution.vo.DistributionParcelListVO">
select ldpl.*,
lwwd.num zeroPackageTotalNum
from logpm_distribution_parcel_list ldpl
left join logpm_warehouse_waybill_detail lwwd on lwwd.id = ldpl.advance_id
where ldpl.order_code = #{orderCode}
and ldpl.warehouse_id = #{fromWarehouseId}
</select>
<update id="addZeroPackageQuantity" >
update logpm_distribution_parcel_list
set quantity = quantity + #{num}
where id = #{packageId}
</update>
<select id="findListByStockArticleIds" resultType="com.logpm.distribution.vo.ZeroPackageSupplyVO">
select ldpl.stock_article_id stockArticleId,
ldpl.id packageId,
lwwd.product_id goodsId,
lwwd.product_name goodsName,
ldpl.quantity stockNum
from logpm_distribution_parcel_list ldpl
left join logpm_warehouse_waybill_detail lwwd on lwwd.id = ldpl.advance_id
where ldpl.stock_article_id in
<foreach collection="orderIdList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<update id="updateWaybillIdByWaybillNo">
update logpm_distribution_parcel_list
set waybill_id = #{waybillId}
where waybill_number = #{waybillNo}
</update>
<select id="findOrderCodeByWaybillId" resultType="String">
select order_code
from logpm_distribution_parcel_list
where waybill_id = #{waybillId}
group by order_code
</select>
<update id="clearWaybillInfoByParceListIds">
update logpm_distribution_parcel_list
set waybill_id = null,
waybill_number = null,
send_warehouse_id = null,
send_warehouse_id = null,
accept_warehouse_id = null,
accept_warehouse_name = null
where id in
<foreach collection="parcelListIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>

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

@ -74,4 +74,6 @@ public interface DistributionParcelNumberMapper extends BaseMapper<DistributionP
* @return
*/
Integer augmentSignForNum(@Param("packageId") Long id,@Param("stockArticleId") Long stockArticleId,@Param("quantity") Integer quantity);
void addZeroQuantity(@Param("packageId") Long packageId, @Param("num") int num);
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelNumberMapper.xml

@ -78,5 +78,13 @@
ldsa.order_code = #{orderCode} AND ldsa.warehouse_id = #{warehouseId} AND ldsa.is_deleted = 0
</select>
<update id="addZeroQuantity">
UPDATE
logpm_distribution_parcel_number
SET
hand_quantity = hand_quantity + #{num}
WHERE
parcel_list_id = #{packageId}
</update>
</mapper>

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

@ -16,7 +16,6 @@
*/
package com.logpm.distribution.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionReservationStockarticleDTO;
@ -83,4 +82,6 @@ public interface DistributionReservationStockarticleMapper extends BaseMapper<Di
* @param id
*/
void deleteStockArticleByReservationId(@Param("reservationId") Long id);
List<Long> findReservationIdsByOrderCodes(@Param("orderCodes") List<String> orderCodes);
}

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

Loading…
Cancel
Save