Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev-warehouse
caoyizhong 2 years ago
parent
commit
26160c1af4
  1. 11
      blade-biz-common/src/main/java/org/springblade/common/utils/CommonUtil.java
  2. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java
  3. 271
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscanEntity.java
  4. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java
  5. 85
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSelfDeliveryEntity.java
  6. 11
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSigndetailEntity.java
  7. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java
  8. 91
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionTripartiteDeliveryEntity.java
  9. 50
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionLoadscanClient.java
  10. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  11. 49
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionSelfDeliveryClient.java
  12. 49
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionTripartiteDeliveryClient.java
  13. 35
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionLoadscanVO.java
  14. 35
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSelfDeliveryVO.java
  15. 11
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSigndetailVO.java
  16. 35
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionTripartiteDeliveryVO.java
  17. 31
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/entity/AdvanceDetailEntity.java
  18. 11
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/entity/ServiceNumEntity.java
  19. 5
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IServiceNumClient.java
  20. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java
  21. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataDriverArteryServiceImpl.java
  22. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java
  23. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/DistributionApplication.java
  24. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  25. 150
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionLoadscanController.java
  26. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java
  27. 150
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSelfDeliveryController.java
  28. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java
  29. 150
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionTripartiteDeliveryController.java
  30. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryListDTO.java
  31. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionLoadscanDTO.java
  32. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSelfDeliveryDTO.java
  33. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSigndetailDTO.java
  34. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionTripartiteDeliveryDTO.java
  35. 26
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionloadingscanDTO.java
  36. 316
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionLoadscanExcel.java
  37. 111
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSelfDeliveryExcel.java
  38. 112
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionTripartiteDeliveryExcel.java
  39. 53
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionLoadscanClient.java
  40. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  41. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  42. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  43. 83
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  44. 59
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.java
  45. 173
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.xml
  46. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  47. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSelfDeliveryMapper.java
  48. 37
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSelfDeliveryMapper.xml
  49. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.xml
  50. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionTripartiteDeliveryMapper.java
  51. 38
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionTripartiteDeliveryMapper.xml
  52. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  53. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionLoadscanService.java
  54. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
  55. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSelfDeliveryService.java
  56. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java
  57. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionTripartiteDeliveryService.java
  58. 41
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  59. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionLoadscanServiceImpl.java
  60. 221
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  61. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSelfDeliveryServiceImpl.java
  62. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  63. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionTripartiteDeliveryServiceImpl.java
  64. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/controller/FactoryCommonController.java
  65. 4
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/IAsyncDataService.java
  66. 91
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java
  67. 4
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/controller/MtFactoryDataController.java
  68. 23
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java
  69. 37
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/controller/PanFactoryDataController.java
  70. 4
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/IPanFactoryDataService.java
  71. 80
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java
  72. 3
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/DealWithDataHandler.java
  73. 6
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/ServiceNumClient.java
  74. 4
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.xml
  75. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IServiceNumService.java
  76. 8
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/ServiceNumServiceImpl.java
  77. 1806
      doc/dpm/物流租户系统.pdma.json

11
blade-biz-common/src/main/java/org/springblade/common/utils/CommonUtil.java

@ -19,6 +19,7 @@ package org.springblade.common.utils;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
@ -96,4 +97,14 @@ public class CommonUtil {
return UUID.randomUUID().toString().replace("-", ""); return UUID.randomUUID().toString().replace("-", "");
} }
public static Date StringToDate(String value) {
try {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return format.parse(value);
} catch (Exception e) {
return null;
}
}
} }

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

@ -185,6 +185,11 @@ public class DistributionDeliveryListEntity extends TenantEntity {
@ApiModelProperty(value = "配送单号") @ApiModelProperty(value = "配送单号")
private String noteNumber; private String noteNumber;
/**
* 数据来源
*/
@ApiModelProperty(value = "数据来源")
private Integer source;
} }

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

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

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

@ -42,7 +42,7 @@ public class DistributionReservationEntity extends TenantEntity {
* 订单自编号;展示使用 * 订单自编号;展示使用
*/ */
@ApiModelProperty(value = "订单自编号;订单自编号,关联订单表") @ApiModelProperty(value = "订单自编号;订单自编号,关联订单表")
private String orderId; private String stockArticleId;
/** /**
* 收货人 * 收货人
*/ */

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

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

11
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSigndetailEntity.java

@ -106,10 +106,15 @@ public class DistributionSigndetailEntity extends TenantEntity {
@ApiModelProperty(value = "货物名称") @ApiModelProperty(value = "货物名称")
private String goodsName; private String goodsName;
/** /**
* 仓库 * 仓库名称
*/ */
@ApiModelProperty(value = "仓库") @ApiModelProperty(value = "仓库名称")
private String warehouse; private String warehouseName;
/**
* 仓库Id
*/
@ApiModelProperty(value = "仓库Id")
private String warehouseId;
/** /**
* 入库时间 * 入库时间
*/ */

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

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

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

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

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

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

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

@ -17,9 +17,11 @@
package com.logpm.distribution.feign; package com.logpm.distribution.feign;
import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionParcelListEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.BladePage;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
@ -52,6 +54,6 @@ public interface IDistributionParcelListClient {
@GetMapping(API_PREFIX+"/findByPacketBarCode") @GetMapping(API_PREFIX+"/findByPacketBarCode")
DistributionParcelListEntity findByPacketBarCode(String unitNo); DistributionParcelListEntity findByPacketBarCode(String unitNo);
@GetMapping(API_PREFIX+"/addBatch") @PostMapping(API_PREFIX+"/addBatch")
boolean addBatch(@RequestBody List<DistributionParcelListEntity> parcelListEntityList); boolean addBatch(@RequestBody List<DistributionParcelListEntity> parcelListEntityList);
} }

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

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

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

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

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

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

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

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

11
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSigndetailVO.java

@ -38,10 +38,15 @@ import java.util.List;
public class DistributionSigndetailVO extends DistributionSigndetailEntity { public class DistributionSigndetailVO extends DistributionSigndetailEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 客户 * 客户名称
*/ */
@ApiModelProperty(value = "客户") @ApiModelProperty(value = "客户名称")
private String consignee; private String consigneeName;
/**
* 客户Id
*/
@ApiModelProperty(value = "客户Id")
private String consigneeId;
/** /**
* 客户电话 * 客户电话
*/ */

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

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

31
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/entity/AdvanceDetailEntity.java

@ -17,14 +17,12 @@
package com.logpm.oldproject.entity; package com.logpm.oldproject.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.tenant.mp.TenantEntity;
import java.time.LocalDate; import java.time.LocalDate;
@ -59,11 +57,13 @@ public class AdvanceDetailEntity {
* 线下订单明细标时 * 线下订单明细标时
*/ */
@ApiModelProperty(value = "线下订单明细标时") @ApiModelProperty(value = "线下订单明细标时")
@TableField("lineID")
private String lineID; private String lineID;
/** /**
* 序列号 * 序列号
*/ */
@ApiModelProperty(value = "序列号") @ApiModelProperty(value = "序列号")
@TableField("serialKey")
private String serialKey; private String serialKey;
/** /**
* 区域 * 区域
@ -74,6 +74,7 @@ public class AdvanceDetailEntity {
* 订单自编号 * 订单自编号
*/ */
@ApiModelProperty(value = "订单自编号") @ApiModelProperty(value = "订单自编号")
@TableField("orderSelfNum")
private String orderSelfNum; private String orderSelfNum;
/** /**
* 订单来源 * 订单来源
@ -84,11 +85,13 @@ public class AdvanceDetailEntity {
* 订单类型 * 订单类型
*/ */
@ApiModelProperty(value = "订单类型") @ApiModelProperty(value = "订单类型")
@TableField("systemType")
private String systemType; private String systemType;
/** /**
* MSCS单号 * MSCS单号
*/ */
@ApiModelProperty(value = "MSCS单号") @ApiModelProperty(value = "MSCS单号")
@TableField("orderNum")
private String orderNum; private String orderNum;
/** /**
* 是否干仓配1=0= * 是否干仓配1=0=
@ -99,101 +102,121 @@ public class AdvanceDetailEntity {
* MTDS单号 * MTDS单号
*/ */
@ApiModelProperty(value = "MTDS单号") @ApiModelProperty(value = "MTDS单号")
@TableField("mtdsNo")
private String mtdsNo; private String mtdsNo;
/** /**
* 一级品类 * 一级品类
*/ */
@ApiModelProperty(value = "一级品类") @ApiModelProperty(value = "一级品类")
@TableField("firstPackName")
private String firstPackName; private String firstPackName;
/** /**
* 二级品类 * 二级品类
*/ */
@ApiModelProperty(value = "二级品类") @ApiModelProperty(value = "二级品类")
@TableField("firstPackCode")
private String firstPackCode; private String firstPackCode;
/** /**
* 基地名称 * 基地名称
*/ */
@ApiModelProperty(value = "基地名称") @ApiModelProperty(value = "基地名称")
@TableField("siteName")
private String siteName; private String siteName;
/** /**
* 基地编码 * 基地编码
*/ */
@ApiModelProperty(value = "基地编码") @ApiModelProperty(value = "基地编码")
@TableField("siteCode")
private String siteCode; private String siteCode;
/** /**
* 货品名称 * 货品名称
*/ */
@ApiModelProperty(value = "货品名称") @ApiModelProperty(value = "货品名称")
@TableField("productCode")
private String productCode; private String productCode;
/** /**
* 二级品类名称 * 二级品类名称
*/ */
@ApiModelProperty(value = "二级品类名称") @ApiModelProperty(value = "二级品类名称")
@TableField("secondPackName")
private String secondPackName; private String secondPackName;
/** /**
* 二级品类 * 二级品类
*/ */
@ApiModelProperty(value = "二级品类") @ApiModelProperty(value = "二级品类")
@TableField("secondPackCode")
private String secondPackCode; private String secondPackCode;
/** /**
* 三级品类名称 * 三级品类名称
*/ */
@ApiModelProperty(value = "三级品类名称") @ApiModelProperty(value = "三级品类名称")
@TableField("thirdPackName")
private String thirdPackName; private String thirdPackName;
/** /**
* 三级品类 * 三级品类
*/ */
@ApiModelProperty(value = "三级品类") @ApiModelProperty(value = "三级品类")
@TableField("thirdPackCode")
private String thirdPackCode; private String thirdPackCode;
/** /**
* 产品类型 * 产品类型
*/ */
@ApiModelProperty(value = "产品类型") @ApiModelProperty(value = "产品类型")
@TableField("goodName")
private String goodName; private String goodName;
/** /**
* 例放N=正常Y=例放 * 例放N=正常Y=例放
*/ */
@ApiModelProperty(value = "例放:N=正常,Y=例放") @ApiModelProperty(value = "例放:N=正常,Y=例放")
@TableField("isAddin")
private String isAddin; private String isAddin;
/** /**
* 三级例放N=正常Y=例放 * 三级例放N=正常Y=例放
*/ */
@ApiModelProperty(value = "三级例放:N=正常,Y=例放") @ApiModelProperty(value = "三级例放:N=正常,Y=例放")
@TableField("isThirdAddin")
private String isThirdAddin; private String isThirdAddin;
/** /**
* 补进N=正常Y=例放 * 补进N=正常Y=例放
*/ */
@ApiModelProperty(value = "补进:N=正常,Y=例放") @ApiModelProperty(value = "补进:N=正常,Y=例放")
@TableField("isSuppin")
private String isSuppin; private String isSuppin;
/** /**
* 发货数量 * 发货数量
*/ */
@ApiModelProperty(value = "发货数量") @ApiModelProperty(value = "发货数量")
@TableField("mscsNum")
private String mscsNum; private String mscsNum;
/** /**
* 销售数量 * 销售数量
*/ */
@ApiModelProperty(value = "销售数量") @ApiModelProperty(value = "销售数量")
@TableField("mtdsNum")
private Integer mtdsNum; private Integer mtdsNum;
/** /**
* 体积 * 体积
*/ */
@ApiModelProperty(value = "体积") @ApiModelProperty(value = "体积")
@TableField("volume")
private String volume; private String volume;
/** /**
* 包条码 * 包条码
*/ */
@ApiModelProperty(value = "包条码") @ApiModelProperty(value = "包条码")
@TableField("unitNo")
private String unitNo; private String unitNo;
/** /**
* 车次号 * 车次号
*/ */
@ApiModelProperty(value = "车次号") @ApiModelProperty(value = "车次号")
@TableField("mctsTruck")
private String mctsTruck; private String mctsTruck;
/** /**
* 车牌号 * 车牌号
*/ */
@ApiModelProperty(value = "车牌号") @ApiModelProperty(value = "车牌号")
@TableField("mctsTruckNo")
private String mctsTruckNo; private String mctsTruckNo;
/** /**
* 基地发货日期 * 基地发货日期
@ -234,6 +257,7 @@ public class AdvanceDetailEntity {
* 服务号 * 服务号
*/ */
@ApiModelProperty(value = "服务号") @ApiModelProperty(value = "服务号")
@TableField("serviceNum")
private String serviceNum; private String serviceNum;
/** /**
* *
@ -249,6 +273,7 @@ public class AdvanceDetailEntity {
* 交期 * 交期
*/ */
@ApiModelProperty(value = "交期") @ApiModelProperty(value = "交期")
@TableField("dueDate")
private LocalDate dueDate; private LocalDate dueDate;
/** /**
* 交期 * 交期

11
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/entity/ServiceNumEntity.java

@ -17,14 +17,12 @@
package com.logpm.oldproject.entity; package com.logpm.oldproject.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.tenant.mp.TenantEntity;
import java.time.LocalDate; import java.time.LocalDate;
@ -49,11 +47,13 @@ public class ServiceNumEntity {
* 服务号 * 服务号
*/ */
@ApiModelProperty(value = "服务号") @ApiModelProperty(value = "服务号")
@TableField("serviceNum")
private String serviceNum; private String serviceNum;
/** /**
* 订单数量 * 订单数量
*/ */
@ApiModelProperty(value = "订单数量") @ApiModelProperty(value = "订单数量")
@TableField("total")
private String total; private String total;
/** /**
* 包数量 * 包数量
@ -64,26 +64,31 @@ public class ServiceNumEntity {
* 商场名 * 商场名
*/ */
@ApiModelProperty(value = "商场名") @ApiModelProperty(value = "商场名")
@TableField("storeName")
private String storeName; private String storeName;
/** /**
* 商场编号 * 商场编号
*/ */
@ApiModelProperty(value = "商场编号") @ApiModelProperty(value = "商场编号")
@TableField("storeNo")
private String storeNo; private String storeNo;
/** /**
* 顾客姓名 * 顾客姓名
*/ */
@ApiModelProperty(value = "顾客姓名") @ApiModelProperty(value = "顾客姓名")
@TableField("customerName")
private String customerName; private String customerName;
/** /**
* 顾客电话 * 顾客电话
*/ */
@ApiModelProperty(value = "顾客电话") @ApiModelProperty(value = "顾客电话")
@TableField("customerPhone")
private String customerPhone; private String customerPhone;
/** /**
* 顾客地址 * 顾客地址
*/ */
@ApiModelProperty(value = "顾客地址") @ApiModelProperty(value = "顾客地址")
@TableField("customerRoad")
private String customerRoad; private String customerRoad;
/** /**
* 是否干仓配 * 是否干仓配

5
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IServiceNumClient.java

@ -18,8 +18,10 @@ package com.logpm.oldproject.feign;
import com.logpm.oldproject.entity.ServiceNumEntity; import com.logpm.oldproject.entity.ServiceNumEntity;
import org.springframework.cloud.openfeign.FeignClient; 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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List; import java.util.List;
@ -53,4 +55,7 @@ public interface IServiceNumClient {
*/ */
@PostMapping(API_PREFIX + "/addServiceNum") @PostMapping(API_PREFIX + "/addServiceNum")
Boolean addServiceNum(@RequestBody List<ServiceNumEntity> serviceNumEntity); Boolean addServiceNum(@RequestBody List<ServiceNumEntity> serviceNumEntity);
@GetMapping(API_PREFIX + "/findByserviceNum")
ServiceNumEntity findByserviceNum(@RequestParam String sn);
} }

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java

@ -116,7 +116,7 @@ public class BasicdataDriverArteryController extends BladeController {
public R save(@Valid @RequestBody BasicdataDriverArteryDTO basicdataDriverArtery) { public R save(@Valid @RequestBody BasicdataDriverArteryDTO basicdataDriverArtery) {
boolean save = basicdataDriverArteryService.save(basicdataDriverArtery); boolean save = basicdataDriverArteryService.save(basicdataDriverArtery);
//加入关联表 //加入关联表
if (null !=basicdataDriverArtery.getBindVehicles() && save){ if (null !=basicdataDriverArtery.getBindVehicles()&& save){
Integer b = basicdataDriverArteryService.updateVehicle(basicdataDriverArtery); Integer b = basicdataDriverArteryService.updateVehicle(basicdataDriverArtery);
} }
return R.status(save); return R.status(save);

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataDriverArteryServiceImpl.java

@ -71,8 +71,9 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
public Integer updateVehicle(BasicdataDriverArteryDTO basicdataDriverArtery) { public Integer updateVehicle(BasicdataDriverArteryDTO basicdataDriverArtery) {
//删除原有绑定关系 //删除原有绑定关系
int delete = basicdataDrivermiddleMapper.delete(new QueryWrapper<BasicdataDrivermiddleEntity>().lambda().eq(BasicdataDrivermiddleEntity::getDriverId, basicdataDriverArtery.getId())); int delete = basicdataDrivermiddleMapper.delete(new QueryWrapper<BasicdataDrivermiddleEntity>().lambda().eq(BasicdataDrivermiddleEntity::getDriverId, basicdataDriverArtery.getId()));
if (basicdataDriverArtery.getBindVehicles().equals(""))return delete;
//新增现有的数据 //新增现有的数据
if (delete>0){ //if (delete>0){
List<String> bindVehicles = Arrays.asList(basicdataDriverArtery.getBindVehicles().split(",")); List<String> bindVehicles = Arrays.asList(basicdataDriverArtery.getBindVehicles().split(","));
ArrayList<BasicdataDrivermiddleEntity> basicdataDrivermiddleEntities = new ArrayList<>(); ArrayList<BasicdataDrivermiddleEntity> basicdataDrivermiddleEntities = new ArrayList<>();
bindVehicles.forEach(e->{ bindVehicles.forEach(e->{
@ -82,7 +83,7 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
basicdataDrivermiddleEntities.add(basicdataDrivermiddleEntity); basicdataDrivermiddleEntities.add(basicdataDrivermiddleEntity);
}); });
basicdataDrivermiddleService.saveBatch(basicdataDrivermiddleEntities); basicdataDrivermiddleService.saveBatch(basicdataDrivermiddleEntities);
} //}
return delete; return delete;
} }

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java

@ -83,8 +83,9 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl<BasicdataVehicl
public Integer updateOwners(BasicdataVehicleDTO basicdataVehicle) { public Integer updateOwners(BasicdataVehicleDTO basicdataVehicle) {
//删除原有绑定关系 //删除原有绑定关系
int delete = basicdataDrivermiddleMapper.delete(new QueryWrapper<BasicdataDrivermiddleEntity>().lambda().eq(BasicdataDrivermiddleEntity::getBrandId, basicdataVehicle.getId())); int delete = basicdataDrivermiddleMapper.delete(new QueryWrapper<BasicdataDrivermiddleEntity>().lambda().eq(BasicdataDrivermiddleEntity::getBrandId, basicdataVehicle.getId()));
if (basicdataVehicle.getVehicleOwners().equals(""))return delete;
//新增现有的数据 //新增现有的数据
if (delete>0){ // if (delete>0){
List<String> bindOwners = Arrays.asList(basicdataVehicle.getVehicleOwners().split(",")); List<String> bindOwners = Arrays.asList(basicdataVehicle.getVehicleOwners().split(","));
ArrayList<BasicdataDrivermiddleEntity> basicdataDrivermiddleEntities = new ArrayList<>(); ArrayList<BasicdataDrivermiddleEntity> basicdataDrivermiddleEntities = new ArrayList<>();
bindOwners.forEach(e->{ bindOwners.forEach(e->{
@ -94,7 +95,7 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl<BasicdataVehicl
basicdataDrivermiddleEntities.add(basicdataDrivermiddleEntity); basicdataDrivermiddleEntities.add(basicdataDrivermiddleEntity);
}); });
basicdataDrivermiddleService.saveBatch(basicdataDrivermiddleEntities); basicdataDrivermiddleService.saveBatch(basicdataDrivermiddleEntities);
} // }
return delete; return delete;
} }

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

@ -16,7 +16,6 @@
*/ */
package com.logpm.distribution; package com.logpm.distribution;
import org.springblade.common.constant.LauncherConstant;
import org.springblade.common.constant.ModuleNameConstant; import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.cloud.client.BladeCloudApplication; import org.springblade.core.cloud.client.BladeCloudApplication;
import org.springblade.core.launch.BladeApplication; import org.springblade.core.launch.BladeApplication;

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

@ -20,6 +20,7 @@ import cn.hutool.core.util.BooleanUtil;
import com.baomidou.mybatisplus.core.metadata.OrderItem; import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO; import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionDeliveryListDTO; import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO;
import com.logpm.distribution.service.IDistributionDeliveryInfoService; import com.logpm.distribution.service.IDistributionDeliveryInfoService;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO; import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.vo.DistributionstatisticsnmbVO; import com.logpm.distribution.vo.DistributionstatisticsnmbVO;
@ -113,6 +114,18 @@ public class DistributionDeliveryListController extends BladeController {
return R.data(distributionstatisticsnmbVO); return R.data(distributionstatisticsnmbVO);
} }
/**
* 配送管理 装车扫描
*/
@PostMapping("/loadingscan")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionDeliveryList")
public R<Integer> loadingscan(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
Integer i = distributionDeliveryListService.loadingscan(distrilbutionloadingscanDTO);
return R.data(i);
}
/** /**
* 配送管理 点击发车 * 配送管理 点击发车
*/ */
@ -130,7 +143,7 @@ public class DistributionDeliveryListController extends BladeController {
@GetMapping("/page") @GetMapping("/page")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入distributionDeliveryList") @ApiOperation(value = "分页", notes = "传入distributionDeliveryList")
public R<IPage<DistributionDeliveryListVO>> page(DistributionDeliveryListVO distributionDeliveryList, Query query) { public R<IPage<DistributionDeliveryListVO>> page(DistributionDeliveryListDTO distributionDeliveryList, Query query) {
IPage<DistributionDeliveryListVO> pages = distributionDeliveryListService.selectDistributionDeliveryListPage(Condition.getPage(query), distributionDeliveryList); IPage<DistributionDeliveryListVO> pages = distributionDeliveryListService.selectDistributionDeliveryListPage(Condition.getPage(query), distributionDeliveryList);
return R.data(pages); return R.data(pages);
} }

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

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

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

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

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

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

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

@ -220,4 +220,16 @@ public class DistributionStockArticleController extends BladeController {
return result; return result;
} }
/**
* 获取批量在库订单信息
*/
@GetMapping("/stockArticleInfo")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R getStockArticleInfo(@ApiParam(value = "主键集合", required = true) String ids) {
R<List<DistributionStockArticleVO>> result = distributionStockArticleService.getStockArticleInfo(ids);
return result;
}
} }

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

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

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

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

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

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

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

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

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

@ -39,7 +39,7 @@ public class DistributionSigndetailDTO extends DistributionSigndetailEntity {
* 客户 * 客户
*/ */
@ApiModelProperty(value = "客户") @ApiModelProperty(value = "客户")
private String consignee; private String consigneeName;
/** /**
* 客户电话 * 客户电话
*/ */

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -18,13 +18,14 @@ package com.logpm.distribution.feign;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.service.IDistributionParcelListService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.service.IDistributionParcelListService;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
@ -62,6 +63,7 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
} }
@Override @Override
@PostMapping(API_PREFIX+"/addBatch")
public boolean addBatch(List<DistributionParcelListEntity> parcelListEntityList) { public boolean addBatch(List<DistributionParcelListEntity> parcelListEntityList) {
return distributionParcelListService.saveBatch(parcelListEntityList); return distributionParcelListService.saveBatch(parcelListEntityList);
} }

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

@ -32,7 +32,7 @@
SELECT * FROM logpm_distribution_delivery_info ${ew.customSqlSegment} SELECT * FROM logpm_distribution_delivery_info ${ew.customSqlSegment}
</select> </select>
<select id="selectorderIdList" resultType="java.lang.String"> <select id="selectorderIdList" resultType="java.lang.String">
select GROUP_CONCAT(order_id SEPARATOR ',') from logpm_distribution_delivery_info where is_deleted = 0 and reservation_id = #{id} select GROUP_CONCAT(distinct order_id SEPARATOR ',') from logpm_distribution_loadscan where is_deleted = 0 and reservation_id = #{id} and (scan_status = 2 or scan_status = 3)
</select> </select>
<select id="selectStripList" resultType="com.logpm.distribution.vo.DistributionDeliveryInfoVO"> <select id="selectStripList" resultType="com.logpm.distribution.vo.DistributionDeliveryInfoVO">
SELECT SELECT

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

@ -41,7 +41,7 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
* @param distributionDeliveryList * @param distributionDeliveryList
* @return * @return
*/ */
List<DistributionDeliveryListVO> selectDistributionDeliveryListPage(IPage page, DistributionDeliveryListVO distributionDeliveryList); List<DistributionDeliveryListVO> selectDistributionDeliveryListPage(IPage page, @Param("param") DistributionDeliveryListDTO distributionDeliveryList);
/** /**

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

@ -41,8 +41,63 @@
</resultMap> </resultMap>
<select id="selectDistributionDeliveryListPage" resultMap="distributionDeliveryListResultMap"> <select id="selectDistributionDeliveryListPage" resultType="com.logpm.distribution.vo.DistributionDeliveryListVO">
select * from logpm_distribution_delivery_list where is_deleted = 0 SELECT
lddl.id id,
lddl.train_number trainNumber,
lddl.warehouse_name warehouseName,
lddl.warehouse_id warehouseId,
lddl.type type,
lddl.kind kind,
lddl.vehicle_name vehicleName,
lddl.driver_name driverName,
lddl.vehicle_id vehicleId,
lddl.driver_id driverId,
lddl.distribution_company distributionCompany,
lddl.state state,
lddl.customers_number customersNumber,
lddl.price price,
lddl.added_services_id addedServicesId,
lddl.order_number orderNumber,
lddl.delivery_number deliveryNumber,
lddl.loading_team_id loadingTeamId,
lddl.loading_team_name loadingTeamName,
lddl.reservation_id reservationId,
lddl.lead_time leadTime,
lddl.order_id orderId,
lddl.loading_time loadingTime,
lddl.note_number noteNumber,
lddl.source source,
(SELECT COALESCE(COUNT(loaded_nub), 0) FROM logpm_distribution_loadscan ldls WHERE (scan_status=2 or scan_status=3) and lddl.id = ldls.delivery_id) scannedNumber
FROM
logpm_distribution_delivery_list lddl
<where>
<if test="param.warehouseName != null and param.warehouseName!=''">
and lddl.warehouse_name like concat('%',#{param.warehouseName},'%')
</if>
<if test="param.kind != null and param.kind!=''">
and lddl.kind = #{param.kind}
</if>
<if test="param.distributionCompany != null and param.distributionCompany!=''">
and lddl.distribution_company = #{param.distributionCompany}
</if>
<if test="param.type != null and param.type!=''">
and lddl.type = #{param.type}
</if>
<if test="param.state != null and param.state!=''">
and lddl.state = #{param.state}
</if>
<if test="param.createTime_query!=null and param.createTime_query!=''">
and lddl.date_format(create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%')
</if>
<if test="param.leadTime!=null and param.leadTime!=''">
and lddl.date_format(lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%')
</if>
<if test="param.loadingTime!=null and param.loadingTime!=''">
and lddl.date_format(loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%')
</if>
</where>
</select> </select>
@ -53,8 +108,8 @@
SELECT COALESCE(COUNT(1), 0) FROM logpm_distribution_delivery_list SELECT COALESCE(COUNT(1), 0) FROM logpm_distribution_delivery_list
<where> <where>
type = '2' type = '2'
<if test="param.warehouse != null and param.warehouse!=''"> <if test="param.warehouseName != null and param.warehouseName!=''">
and warehouse like concat('%',#{param.warehouse},'%') and warehouse_name like concat('%',#{param.warehouseName},'%')
</if> </if>
<if test="param.kind != null and param.kind!=''"> <if test="param.kind != null and param.kind!=''">
and kind = #{param.kind} and kind = #{param.kind}
@ -81,13 +136,13 @@
( COUNT( 1 ), 0 ) ( COUNT( 1 ), 0 )
FROM FROM
logpm_distribution_delivery_list lddl logpm_distribution_delivery_list lddl
JOIN logpm_distribution_packadeli ldp ON lddl.id = ldp.delivery_id JOIN logpm_distribution_loadscan ldl ON lddl.id = ldl.delivery_id
JOIN logpm_distribution_parcel_list ldpl ON ldpl.id = ldp.parcel_list_id JOIN logpm_distribution_parcel_list ldpl ON ldpl.id = ldl.package_id
WHERE WHERE
<where> <where>
lddl.type = '2' lddl.type = '2'
<if test="param.warehouse != null and param.warehouse!=''"> <if test="param.warehouseName != null and param.warehouseName!=''">
and lddl.warehouse like concat('%',#{param.warehouse},'%') and lddl.warehouse_name like concat('%',#{param.warehouseName},'%')
</if> </if>
<if test="param.kind != null and param.kind!=''"> <if test="param.kind != null and param.kind!=''">
and lddl.kind = #{param.kind} and lddl.kind = #{param.kind}
@ -113,8 +168,8 @@
SELECT COALESCE(COUNT(1), 0) FROM logpm_distribution_delivery_list SELECT COALESCE(COUNT(1), 0) FROM logpm_distribution_delivery_list
<where> <where>
type = '1' type = '1'
<if test="param.warehouse != null and param.warehouse!=''"> <if test="param.warehouseName != null and param.warehouseName!=''">
and warehouse like concat('%',#{param.warehouse},'%') and warehouse_name like concat('%',#{param.warehouseName},'%')
</if> </if>
<if test="param.kind != null and param.kind!=''"> <if test="param.kind != null and param.kind!=''">
and kind = #{param.kind} and kind = #{param.kind}
@ -141,13 +196,13 @@
( COUNT( 1 ), 0 ) ( COUNT( 1 ), 0 )
FROM FROM
logpm_distribution_delivery_list lddl logpm_distribution_delivery_list lddl
JOIN logpm_distribution_packadeli ldp ON lddl.id = ldp.delivery_id JOIN logpm_distribution_loadscan ldl ON lddl.id = ldl.delivery_id
JOIN logpm_distribution_parcel_list ldpl ON ldpl.id = ldp.parcel_list_id JOIN logpm_distribution_parcel_list ldpl ON ldpl.id = ldl.package_id
WHERE WHERE
<where> <where>
lddl.type = '1' lddl.type = '1'
<if test="param.warehouse != null and param.warehouse!=''"> <if test="param.warehouseName != null and param.warehouseName!=''">
and lddl.warehouse like concat('%',#{param.warehouse},'%') and lddl.warehouse_name like concat('%',#{param.warehouseName},'%')
</if> </if>
<if test="param.kind != null and param.kind!=''"> <if test="param.kind != null and param.kind!=''">
and lddl.kind = #{param.kind} and lddl.kind = #{param.kind}

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

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

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

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

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

@ -13,7 +13,7 @@
<result column="status" property="status"/> <result column="status" property="status"/>
<result column="is_deleted" property="isDeleted"/> <result column="is_deleted" property="isDeleted"/>
<result column="create_dept" property="createDept"/> <result column="create_dept" property="createDept"/>
<result column="order_id" property="orderId"/> <result column="stock_article_id" property="stockArticleId"/>
<result column="consignee" property="consignee"/> <result column="consignee" property="consignee"/>
<result column="delivery_address" property="deliveryAddress"/> <result column="delivery_address" property="deliveryAddress"/>
<result column="reservation_data" property="reservationDate"/> <result column="reservation_data" property="reservationDate"/>

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

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

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

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

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

@ -26,7 +26,7 @@
<result column="order_id" property="orderId"/> <result column="order_id" property="orderId"/>
<result column="mall_name" property="mallName"/> <result column="mall_name" property="mallName"/>
<result column="goods_name" property="goodsName"/> <result column="goods_name" property="goodsName"/>
<result column="warehouse" property="warehouse"/> <result column="warehouse" property="warehouseName"/>
<result column="warehousing_time" property="warehousingTime"/> <result column="warehousing_time" property="warehousingTime"/>
<result column="lead_time" property="leadTime"/> <result column="lead_time" property="leadTime"/>
<result column="duration_in_stock" property="durationInStock"/> <result column="duration_in_stock" property="durationInStock"/>
@ -54,7 +54,8 @@
ldsd.is_kitting isKitting, ldsd.is_kitting isKitting,
ldsd.brand brand, ldsd.brand brand,
ldsd.signed_number signedNumber, ldsd.signed_number signedNumber,
ldsf.consignee consignee, ldsf.consignee_name consigneeName,
ldsf.consignee_id consigneeId,
ldsf.signing_time signingTime, ldsf.signing_time signingTime,
ldsf.sjsigning_time sjsigningTime, ldsf.sjsigning_time sjsigningTime,
ldsf.delivery_phone deliveryPhone, ldsf.delivery_phone deliveryPhone,
@ -85,8 +86,8 @@
<if test="param.goodsName!=null and param.goodsName!=''"> <if test="param.goodsName!=null and param.goodsName!=''">
and ldsd.goods_name like concat('%',#{param.goodsName},'%') and ldsd.goods_name like concat('%',#{param.goodsName},'%')
</if> </if>
<if test="param.warehouse!=null and param.warehouse!=''"> <if test="param.warehouseName!=null and param.warehouseName!=''">
and ldsd.warehouse like concat('%',#{param.warehouse},'%') and ldsf.warehouse_name like concat('%',#{param.warehouseName},'%')
</if> </if>
<if test="param.durationInStock!=null and param.durationInStock!=''"> <if test="param.durationInStock!=null and param.durationInStock!=''">
and ldsd.duration_in_stock like concat('%',#{param.durationInStock},'%') and ldsd.duration_in_stock like concat('%',#{param.durationInStock},'%')
@ -94,8 +95,8 @@
<if test="param.deliveryAddress!=null and param.deliveryAddress!=''"> <if test="param.deliveryAddress!=null and param.deliveryAddress!=''">
and ldsf.deliveryAddress like concat('%',#{param.deliveryAddress},'%') and ldsf.deliveryAddress like concat('%',#{param.deliveryAddress},'%')
</if> </if>
<if test="param.consignee!=null and param.consignee!=''"> <if test="param.consigneeName!=null and param.consigneeName!=''">
and ldsd.consignee like concat('%',#{param.consignee},'%') and ldsd.consignee_name like concat('%',#{param.consigneeName},'%')
</if> </if>
<if test="param.consigneePhone!=null and param.consigneePhone!=''"> <if test="param.consigneePhone!=null and param.consigneePhone!=''">
and ldsd.consignee_phone like concat('%',#{param.consigneePhone},'%') and ldsd.consignee_phone like concat('%',#{param.consigneePhone},'%')

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/controller/FactoryCommonController.java

@ -113,7 +113,7 @@ public class FactoryCommonController {
@ResponseBody @ResponseBody
@PostMapping("/sendReceiveInfo") @PostMapping("/sendReceiveInfo")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "订单状态推送", notes = "传入orderInfoDTO") @ApiOperation(value = "签收信息推送", notes = "传入receiveInfoDTO")
public R sendReceiveInfo(@RequestBody ReceiveInfoDTO receiveInfoDTO) { public R sendReceiveInfo(@RequestBody ReceiveInfoDTO receiveInfoDTO) {
log.info("############sendReceiveInfo: 请求参数{}", receiveInfoDTO); log.info("############sendReceiveInfo: 请求参数{}", receiveInfoDTO);
//处理数据 //处理数据

4
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/IAsyncDataService.java

@ -3,9 +3,9 @@ package com.logpm.factory.comfac.service;
public interface IAsyncDataService { public interface IAsyncDataService {
void handlerPanDataToHt(); void handlerPanDataToHt(Long orderId);
void handlerMtDataToHt(); void handlerMtDataToHt(Long mainId);
} }

91
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java

@ -57,11 +57,12 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
*/ */
@Override @Override
@Async @Async
public void handlerPanDataToHt() { public void handlerPanDataToHt(Long id) {
log.info("################handlerDataToHt: 处理皮阿诺订单数据到"); log.info("################handlerDataToHt: 处理皮阿诺订单数据到");
//查询需要同步的订单 //查询需要同步的订单
QueryWrapper<PanFactoryOrder> orderQueryWrapper = new QueryWrapper<>(); QueryWrapper<PanFactoryOrder> orderQueryWrapper = new QueryWrapper<>();
orderQueryWrapper.eq("status",1) orderQueryWrapper.eq("status",1)
.eq("id",id)
.eq("is_deleted",0); .eq("is_deleted",0);
List<PanFactoryOrder> panFactoryOrders = panFactoryOrderService.list(orderQueryWrapper); List<PanFactoryOrder> panFactoryOrders = panFactoryOrderService.list(orderQueryWrapper);
List<ServiceNumEntity> serviceNumEntityList = new ArrayList<>(); List<ServiceNumEntity> serviceNumEntityList = new ArrayList<>();
@ -69,7 +70,6 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
for (PanFactoryOrder panFactoryOrder:panFactoryOrders){ for (PanFactoryOrder panFactoryOrder:panFactoryOrders){
Long orderId = panFactoryOrder.getId(); Long orderId = panFactoryOrder.getId();
log.info("#########handlerDataToHt: 当前处理的订单id={}",orderId); log.info("#########handlerDataToHt: 当前处理的订单id={}",orderId);
//添加订单信息 //添加订单信息
AdvanceEntity advanceEntity = new AdvanceEntity(); AdvanceEntity advanceEntity = new AdvanceEntity();
advanceEntity.setOrderSelfNum(StringUtil.isBlank(panFactoryOrder.getOrderNo())?"":panFactoryOrder.getOrderNo()); //订单自编号 advanceEntity.setOrderSelfNum(StringUtil.isBlank(panFactoryOrder.getOrderNo())?"":panFactoryOrder.getOrderNo()); //订单自编号
@ -93,8 +93,8 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
advanceEntity.setCustomerPhone(StringUtil.isBlank(panFactoryOrder.getCustomerNumber())?"":panFactoryOrder.getCustomerNumber()); // 顾客电话 advanceEntity.setCustomerPhone(StringUtil.isBlank(panFactoryOrder.getCustomerNumber())?"":panFactoryOrder.getCustomerNumber()); // 顾客电话
advanceEntity.setCustomerRoad(StringUtil.isBlank(panFactoryOrder.getCustomerAddress())?"":panFactoryOrder.getCustomerAddress());//顾客地址 advanceEntity.setCustomerRoad(StringUtil.isBlank(panFactoryOrder.getCustomerAddress())?"":panFactoryOrder.getCustomerAddress());//顾客地址
advanceEntity.setSystemType("线上"); //订单类型 advanceEntity.setSystemType("线上"); //订单类型
advanceEntity.setStoreNo(""); //门店编码 advanceEntity.setStoreNo(StringUtil.isBlank(panFactoryOrder.getUserId())?"":panFactoryOrder.getUserId()); //门店编码
advanceEntity.setStoreName(""); //门店名称 advanceEntity.setStoreName(StringUtil.isBlank(panFactoryOrder.getUserName())?"":panFactoryOrder.getUserName()); //门店名称
advanceEntity.setSerialKey(""); //序列号 advanceEntity.setSerialKey(""); //序列号
advanceEntity.setServiceNum(StringUtil.isBlank(panFactoryOrder.getServiceNum())?"":panFactoryOrder.getServiceNum()); //服务号 advanceEntity.setServiceNum(StringUtil.isBlank(panFactoryOrder.getServiceNum())?"":panFactoryOrder.getServiceNum()); //服务号
advanceEntity.setMatingCode("");//齐套模式 可以为空 advanceEntity.setMatingCode("");//齐套模式 可以为空
@ -103,13 +103,13 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
advanceEntity.setSenderMobile(StringUtil.isBlank(panFactoryOrder.getSenderMobile())?"":panFactoryOrder.getSenderMobile());//发货人电话 可以为空 advanceEntity.setSenderMobile(StringUtil.isBlank(panFactoryOrder.getSenderMobile())?"":panFactoryOrder.getSenderMobile());//发货人电话 可以为空
advanceEntity.setSenderAddress(StringUtil.isBlank(panFactoryOrder.getSenderAddress())?"":panFactoryOrder.getSenderAddress()); //发货地址 可以为空 advanceEntity.setSenderAddress(StringUtil.isBlank(panFactoryOrder.getSenderAddress())?"":panFactoryOrder.getSenderAddress()); //发货地址 可以为空
advanceEntity.setSenderName(StringUtil.isBlank(panFactoryOrder.getSendFactory())?"":panFactoryOrder.getSendFactory()); //发货工厂名称 可以为空 advanceEntity.setSenderName(StringUtil.isBlank(panFactoryOrder.getSendFactory())?"":panFactoryOrder.getSendFactory()); //发货工厂名称 可以为空
advanceEntity.setAdministratorsId(0);// 导入人 advanceEntity.setAdministratorsId(1078);// 导入人
advanceEntity.setCreateTime(LocalDate.now()); //添加时间 advanceEntity.setCreateTime(LocalDate.now()); //添加时间
advanceEntity.setCarsNum(StringUtil.isBlank(panFactoryOrder.getDeliveryNumber())?"":panFactoryOrder.getDeliveryNumber()); //派车单--snm 可以为空 advanceEntity.setCarsNum(StringUtil.isBlank(panFactoryOrder.getDeliveryNumber())?"":panFactoryOrder.getDeliveryNumber()); //派车单--snm 可以为空
advanceEntity.setDeleteTime(0); // 删除时间 advanceEntity.setDeleteTime(0); // 删除时间
advanceEntity.setWaybillNo("");//运单号 可以为空 advanceEntity.setWaybillNo("");//运单号 可以为空
Integer id = PanFactoryEnum.getId(panFactoryOrder.getPlantId()); Integer warehouseId = PanFactoryEnum.getId(panFactoryOrder.getPlantId());
advanceEntity.setWarehouseId(id); //导入人仓库id advanceEntity.setWarehouseId(warehouseId); //导入人仓库id
advanceEntity.setWaybillStatus(Byte.parseByte("1"));//开单状态:1=未开单,2=已开单 advanceEntity.setWaybillStatus(Byte.parseByte("1"));//开单状态:1=未开单,2=已开单
advanceEntity.setOldId(0);// advanceEntity.setOldId(0);//
advanceEntity.setFreeze(Byte.parseByte("1"));//冻结状态:1=正常,2=冻结 advanceEntity.setFreeze(Byte.parseByte("1"));//冻结状态:1=正常,2=冻结
@ -130,6 +130,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
//通过订单id查询对应的包件 //通过订单id查询对应的包件
QueryWrapper<PanPackageInfo> packageQueryWrapper = new QueryWrapper<>(); QueryWrapper<PanPackageInfo> packageQueryWrapper = new QueryWrapper<>();
packageQueryWrapper.eq("order_id",orderId) packageQueryWrapper.eq("order_id",orderId)
.eq("status",1)
.eq("is_deleted",0); .eq("is_deleted",0);
List<PanPackageInfo> packages = panPackageInfoService.list(packageQueryWrapper); List<PanPackageInfo> packages = panPackageInfoService.list(packageQueryWrapper);
for(PanPackageInfo panPackageInfo:packages){ for(PanPackageInfo panPackageInfo:packages){
@ -222,41 +223,49 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
} }
} }
ServiceNumEntity serviceNum = new ServiceNumEntity(); String sn = StringUtil.isBlank(panFactoryOrder.getServiceNum()) ? "" : panFactoryOrder.getServiceNum();
serviceNum.setServiceNum(StringUtil.isBlank(panFactoryOrder.getServiceNum())?"":panFactoryOrder.getServiceNum()); //服务号 ServiceNumEntity serviceNum = serviceNumClient.findByserviceNum(sn);
serviceNum.setTotal("1"); //订单数量 if(Objects.isNull(serviceNum)){
serviceNum.setDetailTotal(Objects.isNull(panFactoryOrder.getServiceCount())?"":panFactoryOrder.getServiceCount()+""); // 包数量 serviceNum = new ServiceNumEntity();
serviceNum.setStoreName(StringUtil.isBlank(panFactoryOrder.getUserName())?"":panFactoryOrder.getUserName()); //商场名 serviceNum.setServiceNum(sn); //服务号
serviceNum.setStoreNo(""); // 商场编号 serviceNum.setTotal("1"); //订单数量
serviceNum.setCustomerName(StringUtil.isBlank(panFactoryOrder.getCustomerName())?"":panFactoryOrder.getCustomerName());//顾客姓名 serviceNum.setDetailTotal(Objects.isNull(panFactoryOrder.getServiceCount())?"":panFactoryOrder.getServiceCount()+""); // 包数量
serviceNum.setCustomerPhone(StringUtil.isBlank(panFactoryOrder.getCustomerNumber())?"":panFactoryOrder.getCustomerNumber()); //顾客电话 serviceNum.setStoreName(StringUtil.isBlank(panFactoryOrder.getUserName())?"":panFactoryOrder.getUserName()); //商场名
serviceNum.setCustomerRoad(""); //顾客地址 serviceNum.setStoreNo(StringUtil.isBlank(panFactoryOrder.getUserId())?"":panFactoryOrder.getUserId()); // 商场编号
serviceNum.setIsOpai(1); //是否干仓配 serviceNum.setCustomerName(StringUtil.isBlank(panFactoryOrder.getCustomerName())?"":panFactoryOrder.getCustomerName());//顾客姓名
serviceNum.setCompleteSet("V"); //齐套标识:Y=齐套,N=未齐套,V=未知 serviceNum.setCustomerPhone(StringUtil.isBlank(panFactoryOrder.getCustomerNumber())?"":panFactoryOrder.getCustomerNumber()); //顾客电话
serviceNum.setCustomerRoad(StringUtil.isBlank(panFactoryOrder.getCustomerAddress())?"":panFactoryOrder.getCustomerAddress()); //顾客地址
serviceNum.setIsOpai(1); //是否干仓配
serviceNum.setCompleteSet("V"); //齐套标识:Y=齐套,N=未齐套,V=未知
// serviceNum.setCreateTime(LocalDate.now()); // serviceNum.setCreateTime(LocalDate.now());
serviceNum.setDeleteTime(0); serviceNum.setDeleteTime(0);
serviceNumEntityList.add(serviceNum); serviceNumEntityList.add(serviceNum);
}else{
log.info("#############handlerDataToHt: 当前服务号已存在数据serviceNum={}",sn);
}
}
if(!serviceNumEntityList.isEmpty()){
serviceNumClient.addServiceNum(serviceNumEntityList);
} }
serviceNumClient.addServiceNum(serviceNumEntityList);
log.info("##############handlerDataToHt: 处理数据完成"); log.info("##############handlerDataToHt: 处理数据完成");
} }
@Override @Override
@Async @Async
public void handlerMtDataToHt() { public void handlerMtDataToHt(Long mainId) {
log.info("################handlerMtDataToHt: 处理梦天订单数据到"); log.info("################handlerMtDataToHt: 处理梦天订单数据到");
//查询需要同步的订单 //查询需要同步的订单
QueryWrapper<MtFactoryOrder> orderQueryWrapper = new QueryWrapper<>(); QueryWrapper<MtFactoryOrder> orderQueryWrapper = new QueryWrapper<>();
orderQueryWrapper.eq("status",1) orderQueryWrapper.eq("status",1)
.eq("main_id",mainId)
.eq("is_deleted",0); .eq("is_deleted",0);
List<MtFactoryOrder> mtFactoryOrders = mtFactoryOrderService.list(orderQueryWrapper); List<MtFactoryOrder> mtFactoryOrders = mtFactoryOrderService.list(orderQueryWrapper);
List<ServiceNumEntity> serviceNumEntityList = new ArrayList<>(); List<ServiceNumEntity> serviceNumEntityList = new ArrayList<>();
log.info("#########handlerMtDataToHt: 待处理的订单数量为{}",mtFactoryOrders.size()); log.info("#########handlerMtDataToHt: 待处理的订单数量为{}",mtFactoryOrders.size());
MtFactoryOrderMain mtFactoryOrderMain = mtFactoryOrderMainService.getById(mainId);
for (MtFactoryOrder mtFactoryOrder:mtFactoryOrders){ for (MtFactoryOrder mtFactoryOrder:mtFactoryOrders){
Long orderId = mtFactoryOrder.getId(); Long orderId = mtFactoryOrder.getId();
Long mainId = mtFactoryOrder.getMainId();
MtFactoryOrderMain mtFactoryOrderMain = mtFactoryOrderMainService.getById(mainId);
log.info("#########handlerMtDataToHt: 当前处理的订单id={}",orderId); log.info("#########handlerMtDataToHt: 当前处理的订单id={}",orderId);
@ -320,6 +329,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
//通过订单id查询对应的包件 //通过订单id查询对应的包件
QueryWrapper<MtPackageInfo> packageQueryWrapper = new QueryWrapper<>(); QueryWrapper<MtPackageInfo> packageQueryWrapper = new QueryWrapper<>();
packageQueryWrapper.eq("order_id",orderId) packageQueryWrapper.eq("order_id",orderId)
.eq("status",1)
.eq("is_deleted",0); .eq("is_deleted",0);
List<MtPackageInfo> packages = mtPackageInfoService.list(packageQueryWrapper); List<MtPackageInfo> packages = mtPackageInfoService.list(packageQueryWrapper);
for(MtPackageInfo mtPackageInfo:packages){ for(MtPackageInfo mtPackageInfo:packages){
@ -380,20 +390,27 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
} }
} }
ServiceNumEntity serviceNum = new ServiceNumEntity(); String sn = StringUtil.isBlank(mtFactoryOrder.getMainOrderCode()) ? "" : mtFactoryOrder.getMainOrderCode();
serviceNum.setServiceNum(StringUtil.isBlank(mtFactoryOrderMain.getInvoiceOrderCode())?"":mtFactoryOrderMain.getInvoiceOrderCode()); //服务号 ServiceNumEntity serviceNum = serviceNumClient.findByserviceNum(sn);
serviceNum.setTotal("1"); //订单数量 if(Objects.isNull(serviceNum)){
serviceNum.setDetailTotal(Objects.isNull(mtFactoryOrder.getQuantity())?"":mtFactoryOrder.getQuantity()+""); // 包数量 serviceNum = new ServiceNumEntity();
serviceNum.setStoreName(StringUtil.isBlank(mtFactoryOrder.getExclusiveName())?"":mtFactoryOrder.getExclusiveName()); //商场名 serviceNum.setServiceNum(StringUtil.isBlank(mtFactoryOrder.getMainOrderCode())?"":mtFactoryOrder.getMainOrderCode()); //服务号
serviceNum.setStoreNo(StringUtil.isBlank(mtFactoryOrder.getExclusiveCode())?"":mtFactoryOrder.getExclusiveCode()); // 商场编号 serviceNum.setTotal("1"); //订单数量
serviceNum.setCustomerName(StringUtil.isBlank(mtFactoryOrder.getCustomName())?"":mtFactoryOrder.getCustomName());//顾客姓名 serviceNum.setDetailTotal(Objects.isNull(mtFactoryOrder.getQuantity())?"":mtFactoryOrder.getQuantity()+""); // 包数量
serviceNum.setCustomerPhone(StringUtil.isBlank(mtFactoryOrder.getCustomPhone())?"":mtFactoryOrder.getCustomPhone()); //顾客电话 serviceNum.setStoreName(StringUtil.isBlank(mtFactoryOrder.getExclusiveName())?"":mtFactoryOrder.getExclusiveName()); //商场名
serviceNum.setCustomerRoad(StringUtil.isBlank(mtFactoryOrder.getCustomAddress())?"":mtFactoryOrder.getCustomAddress()); //顾客地址 serviceNum.setStoreNo(StringUtil.isBlank(mtFactoryOrder.getExclusiveCode())?"":mtFactoryOrder.getExclusiveCode()); // 商场编号
serviceNum.setIsOpai(1); //是否干仓配 serviceNum.setCustomerName(StringUtil.isBlank(mtFactoryOrder.getCustomName())?"":mtFactoryOrder.getCustomName());//顾客姓名
serviceNum.setCompleteSet("V"); //齐套标识:Y=齐套,N=未齐套,V=未知 serviceNum.setCustomerPhone(StringUtil.isBlank(mtFactoryOrder.getCustomPhone())?"":mtFactoryOrder.getCustomPhone()); //顾客电话
serviceNum.setCustomerRoad(StringUtil.isBlank(mtFactoryOrder.getCustomAddress())?"":mtFactoryOrder.getCustomAddress()); //顾客地址
serviceNum.setIsOpai(1); //是否干仓配
serviceNum.setCompleteSet("V"); //齐套标识:Y=齐套,N=未齐套,V=未知
// serviceNum.setCreateTime(LocalDate.now()); // serviceNum.setCreateTime(LocalDate.now());
serviceNum.setDeleteTime(0); serviceNum.setDeleteTime(0);
serviceNumEntityList.add(serviceNum); serviceNumEntityList.add(serviceNum);
}else{
log.info("#############handlerMtDataToHt: 当前服务号已存在数据serviceNum={}",sn);
}
} }
serviceNumClient.addServiceNum(serviceNumEntityList); serviceNumClient.addServiceNum(serviceNumEntityList);
log.info("##############handlerMtDataToHt: 处理数据完成"); log.info("##############handlerMtDataToHt: 处理数据完成");

4
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/controller/MtFactoryDataController.java

@ -34,6 +34,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Map;
/** /**
* 梦天数据 控制器 * 梦天数据 控制器
@ -79,7 +80,8 @@ public class MtFactoryDataController extends BladeController {
if(code == 200){ if(code == 200){
orderStatusLog.setStatus(0); orderStatusLog.setStatus(0);
//开启异步线程处理数据 //开启异步线程处理数据
asyncDataService.handlerMtDataToHt(); Map<String,Long> map = (Map<String, Long>) r.getData();
asyncDataService.handlerMtDataToHt(map.get("mainId"));
}else{ }else{
orderStatusLog.setStatus(2); orderStatusLog.setStatus(2);
} }

23
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java

@ -55,6 +55,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
//先判断该发货单编码是否已经存在 //先判断该发货单编码是否已经存在
QueryWrapper<MtFactoryOrderMain> queryWrapper = new QueryWrapper<>(); QueryWrapper<MtFactoryOrderMain> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("invoice_order_code",invoiceOrderCode); queryWrapper.eq("invoice_order_code",invoiceOrderCode);
Long mainId = null;
MtFactoryOrderMain mtFactoryOrderMain = mtFactoryOrderMainService.getOne(queryWrapper); MtFactoryOrderMain mtFactoryOrderMain = mtFactoryOrderMainService.getOne(queryWrapper);
if(!Objects.isNull(mtFactoryOrderMain)){ if(!Objects.isNull(mtFactoryOrderMain)){
log.warn("#############dealWithData: 数据已存在 invoiceOrderCode={}",invoiceOrderCode); log.warn("#############dealWithData: 数据已存在 invoiceOrderCode={}",invoiceOrderCode);
@ -64,7 +65,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
BeanUtil.copyProperties(mtFactoryDataDTO,mtFactoryOrderMain); BeanUtil.copyProperties(mtFactoryDataDTO,mtFactoryOrderMain);
boolean saveMain = mtFactoryOrderMainService.save(mtFactoryOrderMain); boolean saveMain = mtFactoryOrderMainService.save(mtFactoryOrderMain);
if(saveMain){ if(saveMain){
Long mainId = mtFactoryOrderMain.getId();//发货单id mainId = mtFactoryOrderMain.getId();//发货单id
List<MtFactoryOrderDTO> orderList = mtFactoryDataDTO.getOrderList();//所有订单数据 List<MtFactoryOrderDTO> orderList = mtFactoryDataDTO.getOrderList();//所有订单数据
for(MtFactoryOrderDTO mtFactoryOrderDTO:orderList){ for(MtFactoryOrderDTO mtFactoryOrderDTO:orderList){
String orderCode = mtFactoryOrderDTO.getOrderCode(); String orderCode = mtFactoryOrderDTO.getOrderCode();
@ -73,8 +74,23 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
mtFactoryOrder.setMainId(mainId); mtFactoryOrder.setMainId(mainId);
boolean saveOrder = mtFactoryOrderService.save(mtFactoryOrder); boolean saveOrder = mtFactoryOrderService.save(mtFactoryOrder);
if(saveOrder){ if(saveOrder){
//根据订单自编码去查是否有已存在的包件,有就舍去
Long orderId = mtFactoryOrder.getId(); Long orderId = mtFactoryOrder.getId();
QueryWrapper<MtPackageInfo> qw = new QueryWrapper<>();
qw.eq("order_id",orderId);
List<MtPackageInfo> existPackages = mtPackageInfoService.list(qw);
List<MtPackageInfoDTO> packageInfos = mtFactoryOrderDTO.getPackageInfos(); List<MtPackageInfoDTO> packageInfos = mtFactoryOrderDTO.getPackageInfos();
for(MtPackageInfo mtPackageInfo:existPackages){
String packageCode = mtPackageInfo.getPackageCode();
for (MtPackageInfoDTO mtPackageInfoDTO:packageInfos){
String pc = mtPackageInfoDTO.getPackageCode();
if(packageCode.equals(pc)){
packageInfos.remove(mtPackageInfoDTO);
break;
}
}
}
List<MtPackageInfo> list = new ArrayList<>(); List<MtPackageInfo> list = new ArrayList<>();
for(MtPackageInfoDTO mtPackageInfoDTO:packageInfos){ for(MtPackageInfoDTO mtPackageInfoDTO:packageInfos){
MtPackageInfo mtPackageInfo = new MtPackageInfo(); MtPackageInfo mtPackageInfo = new MtPackageInfo();
@ -99,7 +115,10 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
log.warn("#############dealWithData: 保存发货单失败 invoiceOrderCode={}",invoiceOrderCode); log.warn("#############dealWithData: 保存发货单失败 invoiceOrderCode={}",invoiceOrderCode);
throw new CustomerException(405,"保存发货单失败"); throw new CustomerException(405,"保存发货单失败");
} }
return R.success("接收成功"); Map<String,Long> map = new HashMap<>();
map.put("mainId",mainId);
return R.data(map);
} }
@Override @Override

37
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/controller/PanFactoryDataController.java

@ -17,20 +17,16 @@
package com.logpm.factory.pan.controller; package com.logpm.factory.pan.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.factory.comfac.service.IAsyncDataService; import com.logpm.factory.comfac.service.IAsyncDataService;
import com.logpm.factory.comfac.service.IOrderStatusLogService; import com.logpm.factory.comfac.service.IOrderStatusLogService;
import com.logpm.factory.pan.dto.PanFactoryOrderDTO; import com.logpm.factory.pan.dto.PanFactoryOrderDTO;
import com.logpm.factory.pan.dto.PanPackageInfoDTO;
import com.logpm.factory.pan.service.IPanFactoryDataService; import com.logpm.factory.pan.service.IPanFactoryDataService;
import com.logpm.factory.pan.service.IPanFactoryOrderService; import com.logpm.factory.pan.service.IPanFactoryOrderService;
import com.logpm.factory.pan.service.IPanPackageInfoService; import com.logpm.factory.pan.service.IPanPackageInfoService;
import com.logpm.factory.pan.service.IPanPackageListService; import com.logpm.factory.pan.service.IPanPackageListService;
import com.logpm.factory.snm.bean.Resp; import com.logpm.factory.snm.bean.Resp;
import com.logpm.factory.snm.entity.OrderStatusLog; import com.logpm.factory.snm.entity.OrderStatusLog;
import com.logpm.factory.snm.entity.PanFactoryOrder;
import com.logpm.factory.snm.entity.PanPackageInfo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -41,7 +37,6 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Objects; import java.util.Objects;
/** /**
@ -115,32 +110,9 @@ public class PanFactoryDataController extends BladeController {
//判断数据是否已存入 //判断数据是否已存入
String orderNo = factoryOrderDTO.getOrderNo(); String orderNo = factoryOrderDTO.getOrderNo();
QueryWrapper<PanFactoryOrder> queryWrapper = new QueryWrapper<>(); Long orderId = null;
queryWrapper.eq("order_no",orderNo);
PanFactoryOrder one = factoryOrderService.getOne(queryWrapper);
if(!Objects.isNull(one)){
// log.warn("############data: 订单数据已存在 orderNo={}",orderNo);
// return Resp.fail(400,"订单数据已存在");
//如果订单已存在就去验证订单下面的包件信息
List<PanPackageInfoDTO> order_attributes = factoryOrderDTO.getORDER_ATTRIBUTES();
QueryWrapper<PanPackageInfo> qw = new QueryWrapper<>();
qw.eq("order_no",orderNo);
List<PanPackageInfo> list = packageInfoService.list(qw);
for(PanPackageInfo panPackageInfo:list){
String unitNo = panPackageInfo.getUnitNo();
for(int i = 0; i<order_attributes.size(); i++){
String newUnitNo = order_attributes.get(i).getUnitNo();
if(unitNo.equals(newUnitNo)){
order_attributes.remove(i);
break;
}
}
}
factoryOrderDTO.setORDER_ATTRIBUTES(order_attributes);
}
try{ try{
panFactoryDataService.saveData(factoryOrderDTO); orderId = panFactoryDataService.saveData(factoryOrderDTO);
panOrderStatusLog.setStatus(0); panOrderStatusLog.setStatus(0);
}catch (Exception e){ }catch (Exception e){
log.warn("############data: 保存数据失败 orderNo={}",orderNo); log.warn("############data: 保存数据失败 orderNo={}",orderNo);
@ -151,7 +123,10 @@ public class PanFactoryDataController extends BladeController {
panOrderStatusLogService.saveOrUpdate(panOrderStatusLog); panOrderStatusLogService.saveOrUpdate(panOrderStatusLog);
//开启异步线程处理数据 //开启异步线程处理数据
syncDataService.handlerPanDataToHt(); if(!Objects.isNull(orderId)){
syncDataService.handlerPanDataToHt(orderId);
}
return Resp.successOrderNo(factoryOrderDTO.getOrderNo(),factoryOrderDTO.getDeliveryNumber(),"SUCCESS"); return Resp.successOrderNo(factoryOrderDTO.getOrderNo(),factoryOrderDTO.getDeliveryNumber(),"SUCCESS");
} }

4
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/IPanFactoryDataService.java

@ -16,7 +16,7 @@ public interface IPanFactoryDataService {
R handleStatusData(OrderStatusDTO orderStatusDTO); R handleStatusData(OrderStatusDTO orderStatusDTO);
void handleDataToPlatform(String unitNo); void handleDataToPlatform(String unitNo,String operationTime);
void saveData(PanFactoryOrderDTO factoryOrderDTO); Long saveData(PanFactoryOrderDTO factoryOrderDTO);
} }

80
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

@ -36,6 +36,7 @@ import lombok.AllArgsConstructor;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springblade.common.exception.CustomerException; import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil; import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -287,7 +288,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
@Transactional @Transactional
@Override @Override
public void handleDataToPlatform(String unitNo) { public void handleDataToPlatform(String unitNo,String operationTime) {
logger.info("############handleDataToPlatform: 处理数据到platform unitNo={}",unitNo); logger.info("############handleDataToPlatform: 处理数据到platform unitNo={}",unitNo);
//先查询包件是否已存入到新系统数据库 //先查询包件是否已存入到新系统数据库
DistributionParcelListEntity distributionParcelListEntity = distributionParcelListClient.findByPacketBarCode(unitNo); DistributionParcelListEntity distributionParcelListEntity = distributionParcelListClient.findByPacketBarCode(unitNo);
@ -315,6 +316,10 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
} }
OrderEntity orderEntity = orderEntityList.get(0); OrderEntity orderEntity = orderEntityList.get(0);
Integer warehouseId = orderEntity.getWarehouseId();//仓库id Integer warehouseId = orderEntity.getWarehouseId();//仓库id
Date date = CommonUtil.StringToDate(operationTime);
Date now = new Date();
//根据仓库id查询仓库 //根据仓库id查询仓库
String warehouseName = warehouseClient.selectNameById(warehouseId); String warehouseName = warehouseClient.selectNameById(warehouseId);
@ -324,7 +329,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
distributionStockArticleEntity.setMallName(advanceEntity.getStoreName()); distributionStockArticleEntity.setMallName(advanceEntity.getStoreName());
distributionStockArticleEntity.setDescriptionGoods(advanceEntity.getFirstPackName()); distributionStockArticleEntity.setDescriptionGoods(advanceEntity.getFirstPackName());
distributionStockArticleEntity.setWarehouse(warehouseName); distributionStockArticleEntity.setWarehouse(warehouseName);
distributionStockArticleEntity.setWarehouseEntryTime(null);//TODO 入库时间没找到 distributionStockArticleEntity.setWarehouseEntryTime(date);
distributionStockArticleEntity.setStoreTime(0);//TODO distributionStockArticleEntity.setStoreTime(0);//TODO
distributionStockArticleEntity.setTotalNumber(advanceEntity.getTotal()); distributionStockArticleEntity.setTotalNumber(advanceEntity.getTotal());
distributionStockArticleEntity.setHandQuantity(0);//TODO distributionStockArticleEntity.setHandQuantity(0);//TODO
@ -334,7 +339,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
distributionStockArticleEntity.setCustomerName(orderEntity.getContact()); distributionStockArticleEntity.setCustomerName(orderEntity.getContact());
distributionStockArticleEntity.setCustomerTelephone(orderEntity.getPhone()); distributionStockArticleEntity.setCustomerTelephone(orderEntity.getPhone());
distributionStockArticleEntity.setCustomerAddress(orderEntity.getAddress()); distributionStockArticleEntity.setCustomerAddress(orderEntity.getAddress());
distributionStockArticleEntity.setGenre(2); distributionStockArticleEntity.setGenre(1);
distributionStockArticleEntity.setState(2); distributionStockArticleEntity.setState(2);
if(size > 1){ if(size > 1){
distributionStockArticleEntity.setReserve1("multiple"); distributionStockArticleEntity.setReserve1("multiple");
@ -369,26 +374,52 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
@Transactional @Transactional
@Override @Override
public void saveData(PanFactoryOrderDTO factoryOrderDTO) { public Long saveData(PanFactoryOrderDTO factoryOrderDTO) {
QueryWrapper<PanFactoryOrder> qw = new QueryWrapper<>(); // QueryWrapper<PanFactoryOrder> qw = new QueryWrapper<>();
qw.eq("order_no",factoryOrderDTO.getOrderNo()); // qw.eq("order_no",factoryOrderDTO.getOrderNo());
//先查询订单是否存在 // //先查询订单是否存在
PanFactoryOrder factoryOrder = factoryOrderService.getOne(qw); // PanFactoryOrder factoryOrder = factoryOrderService.getOne(qw);
boolean flag = false; // boolean flag = false;
if(Objects.isNull(factoryOrder)){ // if(Objects.isNull(factoryOrder)){
factoryOrder = new PanFactoryOrder(); // factoryOrder = new PanFactoryOrder();
BeanUtil.copyProperties(factoryOrderDTO,factoryOrder); // BeanUtil.copyProperties(factoryOrderDTO,factoryOrder);
//保存订单数据 // //保存订单数据
factoryOrderService.save(factoryOrder); // factoryOrderService.save(factoryOrder);
}else{ // }else{
flag = true; // factoryOrder.setStatus(1);
// factoryOrderService.saveOrUpdate(factoryOrder);
// flag = true;
// }
String orderNo = factoryOrderDTO.getOrderNo();
QueryWrapper<PanFactoryOrder> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("order_no",orderNo);
List<PanFactoryOrder> one = factoryOrderService.list(queryWrapper);
if(!Objects.isNull(one)&& one.size() > 0){
//如果订单已存在就去验证订单下面的包件信息
List<PanPackageInfoDTO> order_attributes = factoryOrderDTO.getORDER_ATTRIBUTES();
QueryWrapper<PanPackageInfo> qw = new QueryWrapper<>();
qw.eq("order_no",orderNo);
List<PanPackageInfo> list = packageInfoService.list(qw);
for(PanPackageInfo panPackageInfo:list){
String unitNo = panPackageInfo.getUnitNo();
for(int i = 0; i<order_attributes.size(); i++){
String newUnitNo = order_attributes.get(i).getUnitNo();
if(unitNo.equals(newUnitNo)){
order_attributes.remove(i);
break;
}
}
}
factoryOrderDTO.setORDER_ATTRIBUTES(order_attributes);
} }
// PanFactoryOrder factoryOrder = new PanFactoryOrder(); PanFactoryOrder factoryOrder = new PanFactoryOrder();
// BeanUtil.copyProperties(factoryOrderDTO,factoryOrder); BeanUtil.copyProperties(factoryOrderDTO,factoryOrder);
// //保存订单数据 //保存订单数据
// factoryOrderService.save(factoryOrder); factoryOrderService.save(factoryOrder);
List<PanPackageInfoDTO> packageInfos = factoryOrderDTO.getORDER_ATTRIBUTES(); List<PanPackageInfoDTO> packageInfos = factoryOrderDTO.getORDER_ATTRIBUTES();
List<PanPackageInfo> panPackageInfos = new ArrayList<>(); List<PanPackageInfo> panPackageInfos = new ArrayList<>();
@ -398,11 +429,6 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
PanPackageInfo packageInfo = new PanPackageInfo(); PanPackageInfo packageInfo = new PanPackageInfo();
BeanUtil.copyProperties(dto,packageInfo); BeanUtil.copyProperties(dto,packageInfo);
packageInfo.setOrderId(factoryOrder.getId()); packageInfo.setOrderId(factoryOrder.getId());
if(flag){
packageInfo.setReissueStatus(1);
}else{
packageInfo.setReissueStatus(0);
}
panPackageInfos.add(packageInfo); panPackageInfos.add(packageInfo);
//保存包件信息数据 //保存包件信息数据
@ -427,6 +453,8 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
packageListService.saveBatch(panPackagelist); packageListService.saveBatch(panPackagelist);
return factoryOrder.getId();
} }
private void checkListunitNo(PanPackageList packages, List<PanPackageInfo> panPackageInfos) { private void checkListunitNo(PanPackageList packages, List<PanPackageInfo> panPackageInfos) {

3
blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/DealWithDataHandler.java

@ -43,6 +43,7 @@ public class DealWithDataHandler {
OrderStatusDTO orderStatusDTO = (OrderStatusDTO) map.get("messageData"); OrderStatusDTO orderStatusDTO = (OrderStatusDTO) map.get("messageData");
String status = orderStatusDTO.getStatus(); String status = orderStatusDTO.getStatus();
String unitNo = orderStatusDTO.getUnitNo(); String unitNo = orderStatusDTO.getUnitNo();
String operationTime = orderStatusDTO.getOperationTime();
if("4".equals(status)){ if("4".equals(status)){
//继续判断是否到达目的仓 //继续判断是否到达目的仓
String currentWarehouseId = orderStatusDTO.getCurrentWarehouse();//当前仓Id String currentWarehouseId = orderStatusDTO.getCurrentWarehouse();//当前仓Id
@ -58,7 +59,7 @@ public class DealWithDataHandler {
// channel.basicAck(deliveryTag,false); // channel.basicAck(deliveryTag,false);
}else{ }else{
//真正的处理需要的数据 //真正的处理需要的数据
panFactoryDataService.handleDataToPlatform(unitNo); panFactoryDataService.handleDataToPlatform(unitNo,operationTime);
} }
} }

6
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/ServiceNumClient.java

@ -46,6 +46,12 @@ public class ServiceNumClient implements IServiceNumClient {
return serviceNumService.addServiceNum(serviceNumEntity); return serviceNumService.addServiceNum(serviceNumEntity);
} }
@Override
@GetMapping(API_PREFIX + "/findByserviceNum")
public ServiceNumEntity findByserviceNum(String sn) {
return serviceNumService.findByserviceNum(sn);
}
// @Override // @Override
// @GetMapping(TOP) // @GetMapping(TOP)
// public BladePage<ServiceNumEntity> top(Integer current, Integer size) { // public BladePage<ServiceNumEntity> top(Integer current, Integer size) {

4
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.xml

@ -78,8 +78,8 @@
<select id="getSupplyData" resultType="Map" > <select id="getSupplyData" resultType="Map" >
SELECT SELECT
wo.waybill_no logiBillNo, wo.waybill_no logiBillNo,
wb.arrive_site destinationWarehouse, wb.warehouse_name destinationWarehouse,
wb.arrive_site_id destinationWarehouseId cast (wb.warehouse_id as char) destinationWarehouseId
FROM ht_advance_detail d FROM ht_advance_detail d
left join ht_waybill_order wo on wo.advance_id = d.advance_id and wo.delete_time = 0 left join ht_waybill_order wo on wo.advance_id = d.advance_id and wo.delete_time = 0
left join ht_way_bill wb on wb.id = wo.way_bill_id and wb.delete_time = 0 left join ht_way_bill wb on wb.id = wo.way_bill_id and wb.delete_time = 0

2
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IServiceNumService.java

@ -32,4 +32,6 @@ public interface IServiceNumService {
//添加 //添加
Boolean addServiceNum(List<ServiceNumEntity> serviceNum); Boolean addServiceNum(List<ServiceNumEntity> serviceNum);
ServiceNumEntity findByserviceNum(String sn);
} }

8
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/ServiceNumServiceImpl.java

@ -16,6 +16,7 @@
*/ */
package com.logpm.oldproject.service.impl; package com.logpm.oldproject.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.oldproject.entity.ServiceNumEntity; import com.logpm.oldproject.entity.ServiceNumEntity;
import com.logpm.oldproject.mapper.ServiceNumMapper; import com.logpm.oldproject.mapper.ServiceNumMapper;
import com.logpm.oldproject.service.IServiceNumService; import com.logpm.oldproject.service.IServiceNumService;
@ -44,4 +45,11 @@ public class ServiceNumServiceImpl implements IServiceNumService {
} }
return true; return true;
} }
@Override
public ServiceNumEntity findByserviceNum(String sn) {
QueryWrapper<ServiceNumEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("serviceNum",sn);
return serviceNumMapper.selectOne(queryWrapper);
}
} }

1806
doc/dpm/物流租户系统.pdma.json

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save