Browse Source

Merge branch 'dev' into pre-production

newStockUp
pref_mail@163.com 1 year ago
parent
commit
162a3611f0
  1. 1
      blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java
  2. 45
      blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderStatusConstant.java
  3. 197
      blade-biz-common/src/main/java/org/springblade/common/utils/FileUtil.java
  4. 3
      blade-gateway/src/main/resources/bootstrap.yml
  5. 4
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesProcessorEntity.java
  6. 6
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesReturnRecordEntity.java
  7. 2
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataGoodsShelfClient.java
  8. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DisStockOrdercodeRecoEntity.java
  9. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  10. 12
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSignforEntity.java
  11. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  12. 1
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignPrintVO.java
  13. 16
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSigndetailVO.java
  14. 40
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java
  15. 9
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java
  16. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListInfoVO.java
  17. 15
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java
  18. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupTrayVO.java
  19. 2
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseUpdownGoodsEntity.java
  20. 10
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseGoodsAllocationClient.java
  21. 4
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java
  22. 5
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/QuestContrastVO.java
  23. 6
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TaskPackagelistVO.java
  24. 10
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesArbitrationOrderController.java
  25. 12
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesExchangeController.java
  26. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesProcessingResultsController.java
  27. 12
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesReturnRecordController.java
  28. 12
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  29. 21
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java
  30. 6
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesArbitrationOrderService.java
  31. 8
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesExchangeService.java
  32. 6
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesProcessingResultsService.java
  33. 13
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesReturnRecordService.java
  34. 7
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
  35. 18
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesArbitrationOrderServiceImpl.java
  36. 38
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesExchangeServiceImpl.java
  37. 20
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java
  38. 58
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesReturnRecordServiceImpl.java
  39. 145
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  40. 28
      blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java
  41. 1
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicMaterialServiceImpl.java
  42. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataGoodsShelfClient.java
  43. 921
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  44. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java
  45. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java
  46. 30
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSigndetailDTO.java
  47. 24
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockConfigInfoVO.java
  48. 36
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockConfigOrderPackageListVO.java
  49. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java
  50. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  51. 118
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  52. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.java
  53. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.xml
  54. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  55. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  56. 60
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  57. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.xml
  58. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  59. 63
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  60. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java
  61. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  62. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListInfoMapper.java
  63. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListInfoMapper.xml
  64. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java
  65. 17
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  66. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  67. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDisStockOrdercodeRecoService.java
  68. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  69. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
  70. 17
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  71. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DisStockOrdercodeRecoServiceImpl.java
  72. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java
  73. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  74. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  75. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  76. 168
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  77. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  78. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java
  79. 1209
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  80. 1
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/LocationMapper.xml
  81. 3
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/CargoServiceImpl.java
  82. 3
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/LocationServiceImpl.java
  83. 1
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/ShelfServiceImpl.java
  84. 32
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncWarehouseData.java
  85. 19
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTaskApiController.java
  86. 80
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/TaskQuestController.java
  87. 134
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/QuestContrastExcel.java
  88. 14
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseGoodsAllocationClient.java
  89. 14
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownTypeClient.java
  90. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.java
  91. 18
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml
  92. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.xml
  93. 24
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java
  94. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java
  95. 198
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java
  96. 10
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

1
blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java

@ -18,6 +18,7 @@ public class DictBizConstant {
public static final String ORDER_STOCKUP_STATUS = "order_stockup_status";//订单备货状态
public static final String ORDER_RESERVATION_STATUS = "order_reservation_status";//订单预约状态
public static final String RESERVATION_STATUS = "reservation_status";//预约状态
public static final String WORK_ORDER_STATUS = "work_order_status";//异常工单状态
public static final String ORDER_PACKAGE_STATUS = "order_package_status";//配送包件状态

45
blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderStatusConstant.java

@ -0,0 +1,45 @@
package org.springblade.common.constant.aftersales;
public enum WorkOrderStatusConstant {
daichuli("待处理","10"),
yichuli("已处理","30"),
chulizhong("处理中","20"),
daishenhe("待审核","40"),
yishenhe("已审核","50");
/**
* 状态
*/
private String name;
/**
*
*/
private String value;
private WorkOrderStatusConstant(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

197
blade-biz-common/src/main/java/org/springblade/common/utils/FileUtil.java

@ -1,8 +1,19 @@
package org.springblade.common.utils;
import java.io.File;
import org.springblade.common.constant.CommonConstant;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.lang.reflect.Type;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.List;
import java.util.TimerTask;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import static io.undertow.servlet.core.BlockingWriterSenderImpl.BUFFER_SIZE;
/**
* 文件工具类
@ -18,13 +29,195 @@ public class FileUtil extends TimerTask {
this.LocalTempFiles = list;
}
public static File checkZipFile(String reservationCode) {
String savePath = "D:/Test" +"/"+ reservationCode;
return new File(savePath+".zip");
}
@Override
public void run() {
for (String localTempFile : LocalTempFiles) {
File file = new File(localTempFile);
if (file.isFile()){
if (file.isFile()) {
file.delete();
}
}
}
/**
* 处理签收图片
*
* @param urls
* @param type 托盘类型
* @param code 预约编码
* @param consignee 客户名称
*/
public static void handleSignPictureZip(List<String> urls, String type, String code, String consignee) {
//将图片下载至本地中
// String imgPath = CommonConstant.SYSTEMFILEPATH;
String savePath = "D:/Test" +"/"+ code;
String imgPath = savePath;
// 打开连接
//设置请求超时为20s
switch (type) {
case "photo_1":
//上门
imgPath += "\\door";
break;
case "photo_2":
imgPath += "\\stacking";
//堆码
break;
case "photo_3":
imgPath +="\\friability";
//易碎
break;
case "photo_4":
imgPath +="\\home-delivery";
//家配
break;
case "photo_5":
imgPath +="\\signing";
//签收
break;
}
for (String imgUrl : urls) {
String str = imgUrl.substring(imgUrl.lastIndexOf("/")+1, imgUrl.length());
try {
//下载远程地址图片
download(imgUrl, imgPath, str);
//将该客户的签收图片进行ZIP压缩
//读取该文件路径下的文件夹
File file = new File(savePath);
fileToZip(file);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
/**
* sourceFile一定要是文件夹
* 默认会在同目录下生成zip文件
*
* @param sourceFile
* @throws Exception
*/
public static void fileToZip(File sourceFile) throws Exception {
if (!sourceFile.exists()) {
throw new RuntimeException("不存在");
}
if (!sourceFile.isDirectory()) {
throw new RuntimeException("不是文件夹");
}
//zip文件生成位置
File zipFile = new File(sourceFile.getAbsolutePath() + ".zip");
FileOutputStream fos = new FileOutputStream(zipFile);
ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(fos));
fileToZip(zos, sourceFile, "");
zos.close();
fos.close();
}
private static void fileToZip(ZipOutputStream zos, File sourceFile, String path) throws Exception {
System.out.println(sourceFile.getAbsolutePath());
//如果是文件夹只创建zip实体即可,如果是文件,创建zip实体后还要读取文件内容并写入
if (sourceFile.isDirectory()) {
path = path + sourceFile.getName() + "/";
ZipEntry zipEntry = new ZipEntry(path);
zos.putNextEntry(zipEntry);
for (File file : sourceFile.listFiles()) {
fileToZip(zos, file, path);
}
} else {
//创建ZIP实体,并添加进压缩包
ZipEntry zipEntry = new ZipEntry(path + sourceFile.getName());
zos.putNextEntry(zipEntry);
byte[] bufs = new byte[1024 * 10];
//读取待压缩的文件并写进压缩包里
FileInputStream fis = new FileInputStream(sourceFile);
BufferedInputStream bis = new BufferedInputStream(fis, 1024 * 10);
int read = 0;
while ((read = bis.read(bufs, 0, 1024 * 10)) != -1) {
zos.write(bufs, 0, read);
}
bis.close();
fis.close();
}
}
private static void download(String imgUrl, String imgPath, String str) throws IOException {
URL url = new URL(imgUrl);
URLConnection con = url.openConnection();
con.setConnectTimeout(20 * 1000);
//文件路径不存在 则创建
File sf = new File(imgPath);
if (!sf.exists()) {
sf.mkdirs();
}
//jdk 1.7 新特性自动关闭
InputStream in = con.getInputStream();
OutputStream out = new FileOutputStream(sf.getPath() + "\\" + str);
//创建缓冲区
byte[] buff = new byte[1024];
int n;
// 开始读取
while ((n = in.read(buff)) >= 0) {
out.write(buff, 0, n);
}
}
// /**
// * 文件下载到指定路径
// *
// * @param urlString 链接
// * @param savePath 保存路径
// * @param filename 文件名
// * @throws Exception
// */
// public static void download(String urlString, String savePath, String filename, String code) throws IOException, MalformedURLException {
// // 构造URL
//// String imgPath = CommonConstant.SYSTEMFILEPATH;
//
// //将图片下载至本地中
// String imgPath = "D:\\Test" + code;
// URL url = new URL(urlString);
// // 打开连接
// URLConnection con = url.openConnection();
// //设置请求超时为20s
// con.setConnectTimeout(20 * 1000);
// //文件路径不存在 则创建
// File sf = new File(savePath);
// if (!sf.exists()) {
// sf.mkdirs();
// }
// //jdk 1.7 新特性自动关闭
// try (InputStream in = con.getInputStream();
// OutputStream out = new FileOutputStream(sf.getPath() + "\\" + str)) {
// //创建缓冲区
// byte[] buff = new byte[1024];
// int n;
// // 开始读取
// while ((n = in.read(buff)) >= 0) {
// out.write(buff, 0, n);
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
}

3
blade-gateway/src/main/resources/bootstrap.yml

@ -1,5 +1,8 @@
server:
port: 13000
spring:
cloud:
gateway:

4
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesProcessorEntity.java

@ -77,12 +77,12 @@ public class AftersalesProcessorEntity extends TenantEntity {
@ApiModelProperty(value = "异常工单ID")
private Long workOrderId;
/**
* 状态
* 状态 状态 1正常 2新增 3取消
*/
@ApiModelProperty(value = "状态")
private String conditions;
/**
* 类型
* 类型 类型 1 责任方 2 处理方
*/
@ApiModelProperty(value = "类型")
private String typesOf;

6
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesReturnRecordEntity.java

@ -65,12 +65,12 @@ public class AftersalesReturnRecordEntity extends TenantEntity {
* 异常工单ID
*/
@ApiModelProperty(value = "异常工单ID")
private String workOrderId;
private Long workOrderId;
/**
* 待处理营业部ID
*/
@ApiModelProperty(value = "待处理营业部ID")
private String businessId;
private Long businessId;
/**
* 待处理营业部名称
*/
@ -85,6 +85,6 @@ public class AftersalesReturnRecordEntity extends TenantEntity {
* 仓库Id
*/
@ApiModelProperty(value = "仓库Id")
private String warehouseId;
private Long warehouseId;
}

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

@ -55,4 +55,6 @@ public interface IBasicdataGoodsShelfClient {
@GetMapping(API_PREFIX+"/getEntityById")
BasicdataGoodsShelfEntity getEntityByGoodsShelfId(@RequestParam("goodsShelfId") Long goodsShelfId);
@GetMapping(API_PREFIX+"/updateRowAndFloorByShelfId")
void updateRowAndFloorByShelfId(@RequestParam int maxFloor, @RequestParam int maxRow, @RequestParam Long newShelfId);
}

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

@ -50,6 +50,10 @@ public class DisStockOrdercodeRecoEntity extends TenantEntity {
*/
@ApiModelProperty(value = "码值类型 1 库存品明细")
private String codeType;
@ApiModelProperty(value = "库存品ID")
private Long stockListId;
/**
* 预留1
*/

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

@ -78,7 +78,7 @@ public class DistributionParcelListEntity extends TenantEntity {
@ApiModelProperty(value = "仓库ID")
private Long warehouseId;
/**
* 状态
* 包件类型 1 定制品 2 库存品 3零担
*/
@ApiModelProperty(value = "状态")
private Integer conditions;

12
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSignforEntity.java

@ -292,6 +292,18 @@ public class DistributionSignforEntity extends TenantEntity {
@ApiModelProperty(value = "是否有异常装车包件 1-否 2-是")
private Integer isHaveAbnormalPackage;
/**
* 审核人Id
*/
@ApiModelProperty(value = "审核人Id")
private Long examineUserId;
/**
* 审核人名称
*/
@ApiModelProperty(value = "审核人名称")
private String examineUserName;
}

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

@ -43,11 +43,16 @@ public interface IDistributionParcelListClient {
String API_PREFIX = "/client";
String TOP = API_PREFIX + "/top1";
String TOPPARCELLIST = API_PREFIX + "/getParcelList";
String GETPARCELLISTID = API_PREFIX + "/getParcelListId";
String GETPARCELLISTINFO = API_PREFIX + "/getParcelListInfo";
@PostMapping(TOPPARCELLIST)
List<DistributionParcelListEntity> getParcelList(@RequestBody DistributionParcelListEntity parcelListEntity);
@GetMapping(GETPARCELLISTID)
DistributionParcelListEntity getParcelListId(@RequestParam String id);
/**
* 获取在库订单包件清单列表
*

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

@ -30,6 +30,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionSignPrintVO extends DistributionSignPrintEntity {
private static final long serialVersionUID = 1L;
}

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

@ -126,6 +126,22 @@ public class DistributionSigndetailVO extends DistributionSigndetailEntity {
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private String sjsigningTime;
@ApiModelProperty(value = "审核人名称")
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private String examineUserName;
@ApiModelProperty(value = "审核人Id")
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private String examineUserId;
@ApiModelProperty(value = "审核人Id")
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private String signeeName;
@ApiModelProperty(value = "审核人Id")
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Long signeeId;
/**
* 包条信息
*/

40
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java

@ -146,6 +146,12 @@ public class DistributionSignforVO extends DistributionSignforEntity {
@ApiModelProperty(value = "配送司机")
private String driverName;
/**
* 配送司机
*/
@ApiModelProperty(value = "配送司机")
private String driverPhone;
/**
* 装车班组
*/
@ -155,7 +161,39 @@ public class DistributionSignforVO extends DistributionSignforEntity {
* 配车时间
*/
@ApiModelProperty(value = "配车时间")
private Date taskTime;
private String taskTime;
/**
* 装车时间
*/
@ApiModelProperty(value = "装车时间")
private String signLoadingDate;
/**
* 装车时间(区间)
*/
@ApiModelProperty(value = "装车时间(区间)")
private List<String> taskTimeSection;
/**
* 装车时间(区间)
*/
@ApiModelProperty(value = "装车时间(区间)")
private List<String> loadingTimeSection;
/**
* 司机签收(区间)
*/
@ApiModelProperty(value = "司机签收(区间)")
private List<String> sjsigningTimeSection;
/**
* 文员审核(区间)
*/
@ApiModelProperty(value = "文员审核(区间)")
private List<String> signingTimeSection;
/**
* 卸车班组

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

@ -133,7 +133,14 @@ public class DistributionStockArticleVO extends DistributionStockArticleEntity {
* 装车数量
*/
@ApiModelProperty(value = "装车数量")
private String loadingNumber;
private Integer loadingNumber;
/**
* 签收数量
*/
@ApiModelProperty(value = "签收数量")
private Integer signingNumber;
/**
* 备货数量
*/

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

@ -11,7 +11,7 @@ public class DistributionStockupStockListInfoVO implements Serializable {
private Long reservationId;//预约单id
private Long stockListId;//库存品id
private Long stockListId;//库存品id
private String customer;//客户
private String deliveryAddress;//地址

15
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java

@ -3,6 +3,8 @@ package com.logpm.distribution.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
@Data
public class DistributionStockupStockListVO implements Serializable {
@ -22,6 +24,11 @@ public class DistributionStockupStockListVO implements Serializable {
private Integer planNum;//计划数量
/**
* 物品编码
*/
private String cargoNumber;
private String cargoUnit;//单位
private Integer realNum;//实际数量
@ -34,4 +41,12 @@ public class DistributionStockupStockListVO implements Serializable {
private Integer unpack;//是否拆包 0 没有 1 拆了
private String sourceType;//是否拆包 1 订单 2导入
// 货位ID 集合
private String allocations;
/**
* 货位信息集合
*/
private List<Map<String,Object>> allocationList;
}

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupTrayVO.java

@ -3,6 +3,7 @@ package com.logpm.distribution.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @program: LogisticsPlatform-Service
@ -18,5 +19,7 @@ public class DistributionStockupTrayVO implements Serializable {
private String allocationId; // 包件编码
private String allocationTitle; // 包件编码
private String num; // 包件编码
private String warehousingTime; // 入库时间
private Date createTime; // 入库时间
}

2
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseUpdownGoodsEntity.java

@ -62,7 +62,7 @@ public class WarehouseUpdownGoodsEntity extends TenantEntity {
@ApiModelProperty(name = "关联值",notes = "")
private String associationValue ;
/** 关联类型;1.订单号 2运单号 3包件码 */
@ApiModelProperty(name = "关联类型",notes = "1.订单号 2运单号 3包件码")
@ApiModelProperty(name = "关联类型",notes = "1.订单号 2运单号 3包件码 4库存品")
private String associationType ;
/** 货物名称 */
@ApiModelProperty(name = "货物名称",notes = "")

10
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseGoodsAllocationClient.java

@ -23,6 +23,8 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* 货位 Feign接口类
*
@ -52,4 +54,12 @@ public interface IWarehouseGoodsAllocationClient {
@GetMapping(TOP+ "/updateAllocationCache")
Boolean updateAllocationCache(@RequestParam("ids") String ids);
/**
* 跟新货位缓存
*/
@GetMapping(TOP+ "/getAllocationInforByIds")
List<WarehouseGoodsAllocationEntity> getAllocationInforByIds(@RequestParam("ids") String [] ids);
}

4
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java

@ -65,4 +65,8 @@ public interface IWarehouseUpdownTypeClient {
@GetMapping(TOP + "/upShelfPackage")
boolean upShelfPackage(@RequestParam String orderPackageCode, @RequestParam Long locationId, @RequestParam Long warehouseId);
@GetMapping(TOP + "/findUpdownTypeInforByAllocationId")
R findUpdownTypeInforByAllocationId(@RequestParam Long allocationId, @RequestParam Long warehouseId);
@GetMapping(TOP + "/findAllGoodsByAllocationId")
R findAllGoodsByAllocationId(@RequestParam Long allocationId, @RequestParam Long warehouseId);
}

5
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/QuestContrastVO.java

@ -62,6 +62,11 @@ public class QuestContrastVO {
* 盘点时间
*/
private Date updateTime;
/**
* 盘点时间
*/
private String updateTimes;
/**
* 盘点数据
*/

6
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TaskPackagelistVO.java

@ -10,6 +10,12 @@ import java.util.List;
@Data
public class TaskPackagelistVO {
/**
* id
*/
@ApiModelProperty(value = "Id")
private Long id;
/**
* 订单自编号
*/

10
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesArbitrationOrderController.java

@ -121,6 +121,16 @@ public class AftersalesArbitrationOrderController extends BladeController {
return R.status(aftersalesArbitrationOrderService.saveOrUpdate(aftersalesArbitrationOrder));
}
/**
* 异常工单仲裁申请单 批量转异常
*/
@PostMapping("/batchArbitrationOrder")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入aftersalesArbitrationOrder")
public R batchArbitrationOrder(@Valid @RequestBody List<AftersalesArbitrationOrderEntity> aftersalesArbitrationOrder) {
return R.status(aftersalesArbitrationOrderService.batchArbitrationOrder(aftersalesArbitrationOrder));
}
/**
* 异常工单仲裁申请单 删除
*/

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

@ -80,6 +80,18 @@ public class AftersalesExchangeController extends BladeController {
return R.data(AftersalesExchangeWrapper.build().pageVO(pages));
}
/**
* 工单交流处理数据记录 分页
*/
@GetMapping("/exchangeList")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入aftersalesExchange")
public R<List<AftersalesExchangeVO>> getExchangeList(@ApiIgnore @RequestParam Map<String, Object> aftersalesExchange, Query query) {
List<AftersalesExchangeEntity> pages = aftersalesExchangeService.getExchangeList( aftersalesExchange);
return R.data(AftersalesExchangeWrapper.build().listVO(pages));
}
/**
* 工单交流处理数据记录 自定义分页
*/

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

@ -118,7 +118,7 @@ public class AftersalesProcessingResultsController extends BladeController {
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入aftersalesProcessingResults")
public R submit(@Valid @RequestBody AftersalesProcessingResultsEntity aftersalesProcessingResults) {
return R.status(aftersalesProcessingResultsService.saveOrUpdate(aftersalesProcessingResults));
return R.status(aftersalesProcessingResultsService.ownSaveOrUpdate(aftersalesProcessingResults));
}
/**

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

@ -118,7 +118,17 @@ public class AftersalesReturnRecordController extends BladeController {
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入aftersalesReturnRecord")
public R submit(@Valid @RequestBody AftersalesReturnRecordEntity aftersalesReturnRecord) {
return R.status(aftersalesReturnRecordService.saveOrUpdate(aftersalesReturnRecord));
return R.status(aftersalesReturnRecordService.ownSaveOrUpdate(aftersalesReturnRecord));
}
/**
* 异常 工单打回记录 批量打回
*/
@PostMapping("/batchRepulse")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入aftersalesReturnRecord")
public R batchRepulse(@Valid @RequestBody List<AftersalesReturnRecordEntity> aftersalesReturnRecord) {
return R.status(aftersalesReturnRecordService.batchRepulse(aftersalesReturnRecord));
}
/**

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

@ -112,6 +112,18 @@ public class AftersalesWorkOrderController extends BladeController {
return R.status(aftersalesWorkOrderService.save(aftersalesWorkOrder));
}
/**
* 客服异常工单 完结处理熟练
*/
@PostMapping("/addCompletionEnd")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入aftersalesWorkOrder")
public R addCompletionEnd(@Valid @RequestBody List<AftersalesWorkOrderDTO> aftersalesWorkOrder) {
return R.status(aftersalesWorkOrderService.addCompletionEnd(aftersalesWorkOrder));
}
/**
* 客服异常工单 修改
*/

21
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java

@ -36,15 +36,36 @@ public class AftersalesWorkOrderDTO extends AftersalesWorkOrderEntity {
* 包件
*/
private List<AftersalesAbnormalPackageEntity> packageEntityList;
/**
* 清除的ID包件
*/
private List<Long> unPpackageEntityList;
/**
* 责任方和处理方
*/
private List<AftersalesProcessorEntity> processorEntityList;
/**
* 取消的 责任方和处理方
*/
private List<Long> unProcessorEntityList;
/**
* 货损图片
*/
private List<AftersalesDecreaseImageEntity> decreaseImageEntityList;
/**
* 取消的货损图片
*/
private List<Long> unDecreaseImageEntityList;
/**
* 异常工单完结处理结果受款方
*/
private List<AftersalesCompletionRecipientEntity> completionRecipientEntities;
/**
* 异常工单完结处理结果赔款方
*/
private List<AftersalesCompletionRecordEntity> completionRecordEntities;
}

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

@ -49,4 +49,10 @@ public interface IAftersalesArbitrationOrderService extends BaseService<Aftersal
*/
List<AftersalesArbitrationOrderExcel> exportAftersalesArbitrationOrder(Wrapper<AftersalesArbitrationOrderEntity> queryWrapper);
/**
* 批量申请介入
* @param aftersalesArbitrationOrder
* @return
*/
boolean batchArbitrationOrder(List<AftersalesArbitrationOrderEntity> aftersalesArbitrationOrder);
}

8
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesExchangeService.java

@ -23,6 +23,7 @@ import com.logpm.aftersales.excel.AftersalesExchangeExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
import java.util.Map;
/**
* 工单交流处理数据记录 服务类
@ -55,4 +56,11 @@ public interface IAftersalesExchangeService extends BaseService<AftersalesExchan
* @return
*/
boolean ownSaveOrUpdate(AftersalesExchangeEntity aftersalesExchange);
/**
* 查询回复数据
* @param aftersalesExchange
* @return
*/
List<AftersalesExchangeEntity> getExchangeList(Map<String, Object> aftersalesExchange);
}

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

@ -49,4 +49,10 @@ public interface IAftersalesProcessingResultsService extends BaseService<Aftersa
*/
List<AftersalesProcessingResultsExcel> exportAftersalesProcessingResults(Wrapper<AftersalesProcessingResultsEntity> queryWrapper);
/**
* 添加或修改出来结果
* @param aftersalesProcessingResults
* @return
*/
boolean ownSaveOrUpdate(AftersalesProcessingResultsEntity aftersalesProcessingResults);
}

13
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesReturnRecordService.java

@ -49,4 +49,17 @@ public interface IAftersalesReturnRecordService extends BaseService<AftersalesRe
*/
List<AftersalesReturnRecordExcel> exportAftersalesReturnRecord(Wrapper<AftersalesReturnRecordEntity> queryWrapper);
/**
* 添加或修改数据
* @param aftersalesReturnRecord
* @return
*/
boolean ownSaveOrUpdate(AftersalesReturnRecordEntity aftersalesReturnRecord);
/**
* 添加批量打回
* @param aftersalesReturnRecord
* @return
*/
boolean batchRepulse(List<AftersalesReturnRecordEntity> aftersalesReturnRecord);
}

7
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java

@ -64,4 +64,11 @@ public interface IAftersalesWorkOrderService extends BaseService<AftersalesWorkO
* @return
*/
IPage<AftersalesWorkOrderVO> getPendingWorkOrder(AftersalesWorkOrderDTO aftersalesWorkOrder, IPage<Object> page);
/**
* 完结异常工单
* @param aftersalesWorkOrder
* @return
*/
boolean addCompletionEnd(List<AftersalesWorkOrderDTO> aftersalesWorkOrder);
}

18
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesArbitrationOrderServiceImpl.java

@ -16,6 +16,7 @@
*/
package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.logpm.aftersales.entity.AftersalesArbitrationOrderEntity;
import com.logpm.aftersales.vo.AftersalesArbitrationOrderVO;
import com.logpm.aftersales.excel.AftersalesArbitrationOrderExcel;
@ -51,4 +52,21 @@ public class AftersalesArbitrationOrderServiceImpl extends BaseServiceImpl<After
return aftersalesArbitrationOrderList;
}
/**
* 批量申请介入
* @param aftersalesArbitrationOrder
* @return
*/
@Override
public boolean batchArbitrationOrder(List<AftersalesArbitrationOrderEntity> aftersalesArbitrationOrder) {
if(ObjectUtil.isNull(aftersalesArbitrationOrder)){
return false;
}
aftersalesArbitrationOrder.forEach( i ->{
baseMapper.insert(i);
});
return true;
}
}

38
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesExchangeServiceImpl.java

@ -16,16 +16,25 @@
*/
package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.aftersales.entity.AftersalesExchangeEntity;
import com.logpm.aftersales.vo.AftersalesExchangeVO;
import com.logpm.aftersales.excel.AftersalesExchangeExcel;
import com.logpm.aftersales.mapper.AftersalesExchangeMapper;
import com.logpm.aftersales.service.IAftersalesExchangeService;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.AesUtil;
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.Date;
import java.util.List;
import java.util.Map;
/**
* 工单交流处理数据记录 服务实现类
@ -58,7 +67,36 @@ public class AftersalesExchangeServiceImpl extends BaseServiceImpl<AftersalesExc
*/
@Override
public boolean ownSaveOrUpdate(AftersalesExchangeEntity aftersalesExchange) {
BladeUser user = AuthUtil.getUser();
if(ObjectUtil.isNull(aftersalesExchange.getId())){
//添加回复处理交流数据
aftersalesExchange.setCreateTime(new Date());
aftersalesExchange.setCreateDept(Long.valueOf(user.getDeptId()));
aftersalesExchange.setCreateUser(user.getUserId());
aftersalesExchange.setStatus(1);
aftersalesExchange.setIsDeleted(0);
baseMapper.insert(aftersalesExchange);
}else{
//修改
}
return false;
}
/**
* 查询回复数据
* @param aftersalesExchange
* @return
*/
@Override
public List<AftersalesExchangeEntity> getExchangeList(Map<String, Object> aftersalesExchange) {
QueryWrapper<AftersalesExchangeEntity> queryWrapper = Condition.getQueryWrapper(aftersalesExchange, AftersalesExchangeEntity.class);
return baseMapper.selectList(queryWrapper);
}
}

20
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java

@ -16,6 +16,7 @@
*/
package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.logpm.aftersales.entity.AftersalesProcessingResultsEntity;
import com.logpm.aftersales.vo.AftersalesProcessingResultsVO;
import com.logpm.aftersales.excel.AftersalesProcessingResultsExcel;
@ -51,4 +52,23 @@ public class AftersalesProcessingResultsServiceImpl extends BaseServiceImpl<Afte
return aftersalesProcessingResultsList;
}
/**
* 出来修改结果
* @param aftersalesProcessingResults
* @return
*/
@Override
public boolean ownSaveOrUpdate(AftersalesProcessingResultsEntity aftersalesProcessingResults) {
if(ObjectUtil.isNull(aftersalesProcessingResults.getId())){
//添加
baseMapper.insert(aftersalesProcessingResults);
return true;
}else{
//修改
baseMapper.updateById(aftersalesProcessingResults);
return true;
}
}
}

58
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesReturnRecordServiceImpl.java

@ -16,11 +16,18 @@
*/
package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.logpm.aftersales.entity.AftersalesReturnRecordEntity;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.service.IAftersalesWorkOrderService;
import com.logpm.aftersales.vo.AftersalesReturnRecordVO;
import com.logpm.aftersales.excel.AftersalesReturnRecordExcel;
import com.logpm.aftersales.mapper.AftersalesReturnRecordMapper;
import com.logpm.aftersales.service.IAftersalesReturnRecordService;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.aftersales.WorkOrderStatusConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -34,8 +41,12 @@ import java.util.List;
* @since 2023-11-17
*/
@Service
@AllArgsConstructor
public class AftersalesReturnRecordServiceImpl extends BaseServiceImpl<AftersalesReturnRecordMapper, AftersalesReturnRecordEntity> implements IAftersalesReturnRecordService {
private final IAftersalesWorkOrderService aftersalesWorkOrderService;
@Override
public IPage<AftersalesReturnRecordVO> selectAftersalesReturnRecordPage(IPage<AftersalesReturnRecordVO> page, AftersalesReturnRecordVO aftersalesReturnRecord) {
return page.setRecords(baseMapper.selectAftersalesReturnRecordPage(page, aftersalesReturnRecord));
@ -51,4 +62,51 @@ public class AftersalesReturnRecordServiceImpl extends BaseServiceImpl<Aftersale
return aftersalesReturnRecordList;
}
/**
* 添加或修改 打回数据
* @param aftersalesReturnRecord
* @return
*/
@Override
public boolean ownSaveOrUpdate(AftersalesReturnRecordEntity aftersalesReturnRecord) {
if(ObjectUtil.isNull(aftersalesReturnRecord.getId())){
//修改异常工单的状态
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderVO();
workOrderEntity.setId(aftersalesReturnRecord.getWorkOrderId());
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.daichuli.getValue());
aftersalesWorkOrderService.updateById(workOrderEntity);
//添加
baseMapper.insert(aftersalesReturnRecord);
return true;
}else{
//修改
baseMapper.updateById(aftersalesReturnRecord);
return true;
}
}
/**
* 批量打回
* @param aftersalesReturnRecord
* @return
*/
@Override
public boolean batchRepulse(List<AftersalesReturnRecordEntity> aftersalesReturnRecord) {
if(ObjectUtil.isNull(aftersalesReturnRecord)){
aftersalesReturnRecord.forEach( i ->{
//修改异常工单的状态
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderVO();
workOrderEntity.setId(i.getWorkOrderId());
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.daichuli.getValue());
aftersalesWorkOrderService.updateById(workOrderEntity);
//添加
baseMapper.insert(i);
});
return true;
}
return false;
}
}

145
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -16,25 +16,23 @@
*/
package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.entity.AftersalesAbnormalPackageEntity;
import com.logpm.aftersales.entity.AftersalesDecreaseImageEntity;
import com.logpm.aftersales.entity.AftersalesProcessorEntity;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.service.IAftersalesAbnormalPackageService;
import com.logpm.aftersales.service.IAftersalesDecreaseImageService;
import com.logpm.aftersales.service.IAftersalesProcessorService;
import com.logpm.aftersales.service.*;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import com.logpm.aftersales.excel.AftersalesWorkOrderExcel;
import com.logpm.aftersales.mapper.AftersalesWorkOrderMapper;
import com.logpm.aftersales.service.IAftersalesWorkOrderService;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.aftersales.WorkOrderStatusConstant;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.BeanUtil;
@ -48,7 +46,6 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.logging.SimpleFormatter;
/**
* 客服异常工单 服务实现类
@ -64,6 +61,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
private final IAftersalesAbnormalPackageService aftersalesAbnormalPackageService;
private final IAftersalesDecreaseImageService aftersalesDecreaseImageService;
private final IAftersalesProcessorService aftersalesProcessorService;
private final IAftersalesCompletionRecordService completionRecordService;
private final IAftersalesCompletionRecipientService completionRecipientService;
private final IBasicdataWarehouseClient warehouseClient;
@ -122,61 +121,88 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if(ObjectUtils.isNull(aftersalesWorkOrder.getWorkOrderNumber())){
aftersalesWorkOrder.setWorkOrderNumber(getWorkOrderNumber(myCurrentWarehouse.getWarehouseCode()));
}
aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId());
aftersalesWorkOrder.setWorkOrderStatus(WorkOrderStatusConstant.daichuli.getValue());
baseMapper.insert(aftersalesWorkOrder);
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getPackageEntityList())){
//包件信息
List<AftersalesAbnormalPackageEntity> list = new ArrayList<>();
aftersalesWorkOrder.getPackageEntityList().stream().forEach(i ->{
AftersalesAbnormalPackageEntity packageEntity = new AftersalesAbnormalPackageEntity();
BeanUtil.copyProperties(i,packageEntity);
packageEntity.setWorkOrderId(aftersalesWorkOrder.getId());
packageEntity.setWarehouseId(myCurrentWarehouse.getId());
list.add(packageEntity);
});
if(!list.isEmpty()){
aftersalesAbnormalPackageService.saveBatch(list);
}
}
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getDecreaseImageEntityList())){
//货损图片
List<AftersalesDecreaseImageEntity> list = new ArrayList<>();
aftersalesWorkOrder.getDecreaseImageEntityList().stream().forEach(i ->{
AftersalesDecreaseImageEntity packageEntity = new AftersalesDecreaseImageEntity();
BeanUtil.copyProperties(i,packageEntity);
packageEntity.setWorkOrderId(aftersalesWorkOrder.getId());
packageEntity.setWarehouseId(myCurrentWarehouse.getId());
list.add(packageEntity);
});
if(!list.isEmpty()){
aftersalesDecreaseImageService.saveBatch(list);
}
}else{
//修改
if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnPpackageEntityList())){
//删除修改包件
aftersalesAbnormalPackageService.deleteLogic(aftersalesWorkOrder.getUnPpackageEntityList());
}
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())){
if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnProcessorEntityList())){
//责任方 处理方
List<AftersalesProcessorEntity> list = new ArrayList<>();
aftersalesWorkOrder.getProcessorEntityList().stream().forEach(i ->{
AftersalesProcessorEntity packageEntity = new AftersalesProcessorEntity();
BeanUtil.copyProperties(i,packageEntity);
packageEntity.setWorkOrderId(aftersalesWorkOrder.getId());
packageEntity.setConditions("1");//正常
packageEntity.setWarehouseId(myCurrentWarehouse.getId());
list.add(packageEntity);
aftersalesWorkOrder.getUnProcessorEntityList().forEach(i ->{
AftersalesProcessorEntity processorEntity = new AftersalesProcessorEntity();
processorEntity.setId(i);
processorEntity.setConditions("3");
list.add(processorEntity);
});
if(!list.isEmpty()){
aftersalesProcessorService.saveBatch(list);
aftersalesProcessorService.saveOrUpdateBatch(list);
}
}
return true;
if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnDecreaseImageEntityList())){
//图片修改
aftersalesDecreaseImageService.deleteLogic(aftersalesWorkOrder.getUnDecreaseImageEntityList());
}
baseMapper.updateById(aftersalesWorkOrder);
}else{
//修改
}
//添加包件信息
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getPackageEntityList())){
//包件信息
List<AftersalesAbnormalPackageEntity> list = new ArrayList<>();
aftersalesWorkOrder.getPackageEntityList().forEach(i ->{
AftersalesAbnormalPackageEntity packageEntity = new AftersalesAbnormalPackageEntity();
BeanUtil.copyProperties(i,packageEntity);
packageEntity.setWorkOrderId(aftersalesWorkOrder.getId());
packageEntity.setWarehouseId(myCurrentWarehouse.getId());
list.add(packageEntity);
});
if(!list.isEmpty()){
aftersalesAbnormalPackageService.saveBatch(list);
}
}
//添加责任方 处理方
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())){
//责任方 处理方
List<AftersalesProcessorEntity> list = new ArrayList<>();
aftersalesWorkOrder.getProcessorEntityList().forEach(i ->{
AftersalesProcessorEntity packageEntity = new AftersalesProcessorEntity();
BeanUtil.copyProperties(i,packageEntity);
packageEntity.setWorkOrderId(aftersalesWorkOrder.getId());
packageEntity.setConditions("1");//正常
packageEntity.setWarehouseId(myCurrentWarehouse.getId());
list.add(packageEntity);
});
if(!list.isEmpty()){
aftersalesProcessorService.saveBatch(list);
}
}
//添加图片信息
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getDecreaseImageEntityList())){
//货损图片
List<AftersalesDecreaseImageEntity> list = new ArrayList<>();
aftersalesWorkOrder.getDecreaseImageEntityList().forEach(i ->{
AftersalesDecreaseImageEntity packageEntity = new AftersalesDecreaseImageEntity();
BeanUtil.copyProperties(i,packageEntity);
packageEntity.setWorkOrderId(aftersalesWorkOrder.getId());
packageEntity.setWarehouseId(myCurrentWarehouse.getId());
list.add(packageEntity);
});
if(!list.isEmpty()){
aftersalesDecreaseImageService.saveBatch(list);
}
}
return baseMapper.updateById(aftersalesWorkOrder) > 0 ? true : false;
}
return true;
}
/**
@ -192,4 +218,29 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
return list;
}
/**
* 完成异常工单数据
* @param aftersalesWorkOrder
* @return
*/
@Override
public boolean addCompletionEnd(List<AftersalesWorkOrderDTO> aftersalesWorkOrder) {
if(ObjectUtil.isNull(aftersalesWorkOrder)){
return false;
}
aftersalesWorkOrder.forEach(v ->{
if(ObjectUtils.isNull(v.getCompletionRecordEntities()) ){
throw new ServiceException("赔款方数据不能为空");
}
//添加赔付方信息
completionRecordService.saveBatch(v.getCompletionRecordEntities());
//添加受款方信息,可以为空
if(ObjectUtils.isNull(v.getCompletionRecipientEntities())){
completionRecipientService.saveBatch(v.getCompletionRecipientEntities());
}
});
return true;
}
}

28
blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java

@ -16,6 +16,7 @@
*/
package com.logpm.basic.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -106,6 +107,21 @@ public class BasicMaterialController extends BladeController {
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入basicMaterial")
public R save(@Valid @RequestBody BasicMaterialEntity basicMaterial) {
if(ObjectUtil.isNull(basicMaterial)){
log.info("物料添加失败!");
return R.fail("添加失败,物料信息为空!");
}
if(ObjectUtil.isNull(basicMaterial.getName()) || ObjectUtil.isNull(basicMaterial.getProductCode()) ||
ObjectUtil.isNull(basicMaterial.getPackageNum()) || ObjectUtil.isNull(basicMaterial.getPackageNum())||
ObjectUtil.isNull(basicMaterial.getSku())|| ObjectUtil.isNull(basicMaterial.getPackingSpecification())||
ObjectUtil.isNull(basicMaterial.getSpecification())){
log.info("物料添加失败!");
return R.fail("添加失败,物料信息为空!");
}
return R.status(basicMaterialService.save(basicMaterial));
}
@ -126,6 +142,18 @@ public class BasicMaterialController extends BladeController {
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入basicMaterial")
public R submit(@Valid @RequestBody BasicMaterialEntity basicMaterial) {
if(ObjectUtil.isNull(basicMaterial)){
log.info("物料添加失败!");
return R.fail("添加失败,物料信息为空!");
}
if(ObjectUtil.isNull(basicMaterial.getName()) || ObjectUtil.isNull(basicMaterial.getProductCode()) ||
ObjectUtil.isNull(basicMaterial.getPackageNum()) || ObjectUtil.isNull(basicMaterial.getPackageNum())||
ObjectUtil.isNull(basicMaterial.getSku())|| ObjectUtil.isNull(basicMaterial.getPackingSpecification())||
ObjectUtil.isNull(basicMaterial.getSpecification()) || ObjectUtil.isNull(basicMaterial.getLogpmUnit()) ){
log.info("物料添加失败!");
return R.fail("添加失败,必填物料信息不完整为空!");
}
return R.status(basicMaterialService.saveOrUpdateOwn(basicMaterial));
}

1
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicMaterialServiceImpl.java

@ -110,6 +110,7 @@ public class BasicMaterialServiceImpl extends BaseServiceImpl<BasicMaterialMappe
return true;
}else{
//添加
basicMaterial.setHide(1);
this.save(basicMaterial);
return true;

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

@ -65,4 +65,12 @@ public class BasicdataGoodsShelfClient implements IBasicdataGoodsShelfClient {
return basicdataGoodsShelfService.getById(goodsShelfId);
}
@Override
public void updateRowAndFloorByShelfId(int maxFloor, int maxRow, Long newShelfId) {
BasicdataGoodsShelfEntity goodsShelfEntity = basicdataGoodsShelfService.getById(newShelfId);
goodsShelfEntity.setRowNum(maxRow);
goodsShelfEntity.setStoreyNum(maxFloor);
basicdataGoodsShelfService.updateById(goodsShelfEntity);
}
}

921
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

File diff suppressed because it is too large Load Diff

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

@ -261,6 +261,9 @@ public class DistributionSignforController extends BladeController {
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入distributionSignfor")
public R update(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
BladeUser user = AuthUtil.getUser();
distributionSignfor.setExamineUserId(user.getUserId());
distributionSignfor.setExamineUserName(user.getNickName());
R r = distributionSignforService.updateSign(distributionSignfor);
// return R.status(distributionSignforService.updateById(distributionSignfor));
return r;
@ -365,6 +368,14 @@ public class DistributionSignforController extends BladeController {
}
@GetMapping("/handlePicture")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "PC下载签收图片", notes = "传入ids")
public void handlePicture(@RequestParam String ids,HttpServletResponse res) {
distributionSignforService.handlePicture(ids,res);
}

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

@ -331,6 +331,13 @@ public class DistributionStockArticleController extends BladeController {
return R.status(distributionStockArticleService.updateById(distributionStockArticle));
}
@PostMapping("/updateClient")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入distributionStockArticle")
public R updateClient(@Valid @RequestBody DistributionStockArticleEntity distributionStockArticle) {
return R.status(distributionStockArticleService.updateById(distributionStockArticle));
}
/**
* 配送在库订单 新增或修改
*/

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

@ -110,5 +110,35 @@ public class DistributionSigndetailDTO extends DistributionSigndetailEntity {
@ApiModelProperty(value = "查询创建时间")
private String createTime_query;
/**
* 司机名称
*/
@ApiModelProperty(value = "driverName")
private String driverName;
/**
* 车牌号
*/
@ApiModelProperty(value = "车牌号")
private String vehicleName;
/**
* 司机名称
*/
@ApiModelProperty(value = "driverName")
private String taskTime;
/**
* 审核人
*/
@ApiModelProperty(value = "审核人")
private String examineUserName;
/**
* 签收人
*/
@ApiModelProperty(value = "签收人")
private String signeeName;
}

24
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockConfigInfoVO.java

@ -0,0 +1,24 @@
package com.logpm.distribution.dto.app;
import lombok.Data;
import java.util.List;
@Data
public class StockConfigInfoVO {
/**
* 客户
*/
private String customer;
/**
* 地址
*/
private String address;//地址
/**
* 库存扫码记录
*/
private List<StockConfigOrderPackageListVO> stockConfigOrderPackageListVOS;
}

36
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockConfigOrderPackageListVO.java

@ -0,0 +1,36 @@
package com.logpm.distribution.dto.app;
import lombok.Data;
import java.util.Date;
/**
* 配置包条码 扫码完成展示列表
*/
@Data
public class StockConfigOrderPackageListVO {
/**
* 入库批次
*/
private String incomingBatch;
/**
*
*/
private String code;
/**
*
*/
private Integer num;
/**
* 创建时间
*/
private Date createTime;
}

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

@ -31,6 +31,8 @@ public class StockupDTO implements Serializable {
private String descriptionGoods;//物料名称
private String cargoNumber;//物料编码
private String allocation;//库位信息
private Long allocationId;//库位信息ID
private String allocationCode;//库位信息ID

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

@ -66,6 +66,16 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
);
}
/**
* 根据包件id查询数据
* @param id
* @return
*/
@Override
public DistributionParcelListEntity getParcelListId(String id) {
return distributionParcelListService.getById(id);
}
@Override
@GetMapping(TOP)
public BladePage<DistributionParcelListEntity> top(Integer current, Integer size) {

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

@ -1749,64 +1749,70 @@
</select>
<select id="selectDeliveryById" resultType="com.logpm.distribution.vo.DistributionDeliveryListVO">
SELECT
id,
tenant_id,
create_user,
create_time,
update_user,
update_time,
status,
is_deleted,
create_dept,
reserve1,
reserve2,
reserve3,
reserve4,
reserve5,
train_number,
warehouse_name,
warehouse_id,
type,
forklift_id,
forklift_name,
kind,
vehicle_name,
driver_name,
vehicle_id,
driver_id,
distribution_company,
distribution_company_id,
delivery_status,
delivery_list_loading_status,
customers_number,
price,
added_services_id,
order_number,
delivery_number,
scanned_number,
loading_team_type,
loading_team_id,
loading_team_name,
reservation_id,
lead_time,
order_code,
order_id,
loading_time,
note_number,
source,
fee,
task_time,
inventory_nub,
preparation_time,
positioning,
positioning_adr,
remarks,
unloading_team_id,
unloading_team_name
lddl.id,
lddl.tenant_id,
lddl.create_user,
lddl.create_time,
lddl.update_user,
lddl.update_time,
lddl.status,
lddl.is_deleted,
lddl.create_dept,
lddl.reserve1,
lddl.reserve2,
lddl.reserve3,
lddl.reserve4,
lddl.reserve5,
lddl.train_number,
lddl.warehouse_name,
lddl.warehouse_id,
lddl.type,
lddl.forklift_id,
lddl.forklift_name,
lddl.kind,
lddl.vehicle_name,
lddl.driver_name,
lddl.vehicle_id,
lddl.driver_id,
lddl.distribution_company,
lddl.distribution_company_id,
lddl.delivery_status,
lddl.delivery_list_loading_status,
lddl.customers_number,
lddl.price,
lddl.added_services_id,
lddl.order_number,
lddl.delivery_number,
lddl.scanned_number,
lddl.loading_team_type,
lddl.loading_team_id,
lddl.loading_team_name,
lddl.reservation_id,
lddl.lead_time,
lddl.order_code,
lddl.order_id,
lddl.loading_time,
lddl.note_number,
lddl.source,
lddl.fee,
lddl.task_time,
lddl.inventory_nub,
lddl.preparation_time,
lddl.positioning,
lddl.positioning_adr,
lddl.remarks,
lddl.unloading_team_id,
lddl.unloading_team_name,
CASE lddl.kind
WHEN '1' THEN (SELECT driver_phone FROM logpm_distribution_delivery_self AS ldds WHERE ldds.delivery_id= lddl.id AND ldds.is_deleted = 0 AND ldds.is_master = 2)
WHEN '2' THEN (SELECT driver_phone FROM logpm_distribution_delivery_tripartite AS lddt WHERE lddt.delivery_id= lddl.id AND lddt.is_deleted = 0)
ELSE
''
END driverPhone
FROM
logpm_distribution_delivery_list
logpm_distribution_delivery_list AS lddl
WHERE
id = #{deliveryId}
lddl.id = #{deliveryId}
</select>
</mapper>

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

@ -101,4 +101,24 @@ public interface DistributionLoadscanMapper extends BaseMapper<DistributionLoads
Integer selectOrderLoadingNum(@Param("orderId") Long id);
Integer selectOrderSignNum(@Param("orderId") Long id);
/**
* 查询签收列表中订单的装车数
* @param reservationId
* @param deliveryId
* @param id
* @return
*/
Integer selectOrderLoadingNumByReservationIdAndDeliveryIdAndOrderId(@Param("reservationId") Long reservationId,@Param("deliveryId") Long deliveryId,@Param("orderId") Long id);
/**
* 查询签收列表中订单的签收数
* @param reservationId
* @param deliveryId
* @param id
* @return
*/
Integer selectOrderSigningNumByReservationIdAndDeliveryIdAndOrderId(@Param("reservationId") Long reservationId,@Param("deliveryId") Long deliveryId,@Param("orderId") Long id);
}

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

@ -238,6 +238,12 @@
<select id="selectOrderSignNum" resultType="java.lang.Integer">
SELECT SUM(received_quantity) FROM logpm_distribution_loadscan WHERE scan_status != 1 AND signfor_state =2 And order_id =#{orderId}
</select>
<select id="selectOrderLoadingNumByReservationIdAndDeliveryIdAndOrderId" resultType="java.lang.Integer">
SELECT IF(sum( loaded_nub) is null ,0,sum( loaded_nub) ) AS loadingNumber FROM logpm_distribution_loadscan WHERE is_deleted = 0 AND reservation_id = #{reservationId} AND delivery_id = #{deliveryId} AND order_id = #{orderId} AND scan_status != 1
</select>
<select id="selectOrderSigningNumByReservationIdAndDeliveryIdAndOrderId" resultType="java.lang.Integer">
SELECT IF(sum( received_quantity) is null ,0,sum( received_quantity) ) AS signingNumber FROM logpm_distribution_loadscan WHERE is_deleted = 0 AND reservation_id = #{reservationId} AND delivery_id = #{deliveryId} AND order_id = #{orderId} AND scan_status != 1
</select>
</mapper>

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

@ -99,7 +99,7 @@
from logpm_distribution_stock_article ldsa
LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id
<where>
ldsa.warehouse_id = #{param.warehouseId} and ldpl.order_package_status != '70'
ldsa.warehouse_id = #{param.warehouseId} and ldpl.order_package_status in (20,30,40)
<if test="param.mallId != null and param.mallId != ''"> and ldsa.mall_id = #{param.mallId} </if>
<if test="param.genre != null and param.genre != ''">and ldsa.genre = #{param.genre}</if>
<if test="param.isZero != null and param.isZero != ''">and ldsa.is_zero = #{param.isZero}</if>

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

@ -70,6 +70,7 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
List<DistributionStockupOrderListVO> selectStockupOrderList(@Param("reservationId")Long reservationId,@Param("isZero") String isZero);
List<DistributionStockupStockListVO> selectStockupStockList(@Param("reservationId")Long reservationId);
List<DistributionStockupStockListVO> selectStockupStockListNew(@Param("reservationId")Long reservationId);
Integer selectOrderNumByReservationId(@Param("reservationId")Long reservationId);

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

@ -297,6 +297,65 @@
ldst.cargo_norms, ldrs.reservation_num, ldst.cargo_unit, ldst.tray_name, ldst.source_type
</select>
<select id="selectStockupStockListNew" resultType="com.logpm.distribution.vo.DistributionStockupStockListVO">
SELECT
<!-- ldslNew.id AS stockListId,-->
ldslNew.sku AS sku,
ldslNew.cargo_number AS cargoNumber,
ldslNew.description_goods AS materialName,
ldslNew.cargo_norms AS cargoNorms,
ldslNew.cargo_unit AS cargoUnit,
ldslNew.tray_name AS trayName,
ldslNew.unpack AS unpack,
ldslNew.source_type AS sourceType,
ldslNew.source_type,
count(ldss.id) AS realNum,
<!-- t.deliveryDetailsId AS deliveryDetailsId,-->
t.reservation_num as planNum,
CASE
WHEN ldslNew.source_type = '2' THEN
(
SELECT
group_concat(DISTINCT lwug.allocation_id) AS allocations
FROM
logpm_warehouse_updown_goods lwug
WHERE
lwug.association_id = ldslNew.material_id
)
WHEN ldslNew.source_type = '1' THEN
(
SELECT
group_concat(DISTINCT lwug.allocation_id) AS allocations
FROM
logpm_distribution_stock_list AS ldslnew
LEFT JOIN logpm_distribution_parcel_list ldpl ON ldpl.order_code = ldslnew.incoming_batch
AND ldpl.material_id = ldslnew.material_id
AND ldpl.conditions = '2'
LEFT JOIN logpm_warehouse_updown_goods lwug ON lwug.association_value = ldpl.order_package_code
WHERE
ldslnew.id = t.id
)
END AS allocations
FROM
(
SELECT
ldsl.cargo_number,
ldsl.description_goods,
ldsl.id,
ldrs.id as deliveryDetailsId,
ldrs.reservation_num
FROM
logpm_distribution_reservation_stocklist ldrs
LEFT JOIN logpm_distribution_stock_list ldsl ON ldrs.stocklist_id = ldsl.id
WHERE
ldrs.reservation_id = #{reservationId}
) t
LEFT JOIN logpm_distribution_stock_list ldslNew ON t.cargo_number = ldslNew.cargo_number
LEFT JOIN logpm_distribution_stock ldss ON ldss.stock_list_id = t.id where ldslNew.is_deleted = 0
</select>
<select id="selectOrderNumByReservationId" resultType="Integer">
select count(ldrs.id)
from logpm_distribution_reservation ldr
@ -545,6 +604,7 @@
ldsl.tray_id,
ldsl.tray_name,
ldsl.sku,
ldrs.reservation_num,
count(ldsld.stock_package_code) AS stockupNum,
(SELECT lds.stockup_area FROM logpm_distribution_stockup_info AS ldsi INNER JOIN logpm_distribution_stockup AS lds ON ldsi.stockup_id = lds.id WHERE ldsi.reservation_id = ldrs.reservation_id) AS stockupArea
FROM

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

@ -138,6 +138,10 @@
lds.sjsigning_time sjsigningTime,
lddl.driver_name driverName,
lddl.vehicle_name vehicleName,
lds.examine_user_name examineUserName,
lds.examine_user_id examineUserId,
lds.signee_name signeeName,
lds.signee_id signeeId,
lddl.kind,
CASE lddl.kind
WHEN '1' THEN (SELECT ldds.driver_phone FROM logpm_distribution_delivery_self AS ldds WHERE ldds.delivery_id = lddl.id AND ldds.is_master = 2)
@ -159,6 +163,9 @@
<if test="param.serviceNumber!=null and param.serviceNumber!=''">
and ldr.service_number like concat('%',#{param.serviceNumber},'%')
</if>
<if test="param.signeeName!=null and param.signeeName!=''">
and lds.signee_name like concat('%',#{param.signeeName},'%')
</if>
<if test="param.orderCode!=null and param.orderCode!=''">
and ldsa.order_code like concat('%',#{param.orderCode},'%')
</if>
@ -204,6 +211,15 @@
<if test="param.warehouseId!=null and param.warehouseId!=''">
and lddl.warehouse_id = #{param.warehouseId} and ldr.warehouse_id =#{param.warehouseId}
</if>
<if test="param.driverName!=null and param.driverName!=''">
and lddl.driver_name like concat('%',#{param.driverName},'%')
</if>
<if test="param.vehicleName!=null and param.vehicleName!=''">
and lddl.vehicle_name like concat('%',#{param.vehicleName},'%')
</if>
<if test="param.examineUserName!=null and param.examineUserName!=''">
and lds.examine_user_name like concat('%',#{param.examineUserName},'%')
</if>
<!-- <if test="param.leadTime!=null and param.leadTime!=''">-->
<!-- and date_format(ldsd.lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%')-->
<!-- </if>-->

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

@ -31,6 +31,7 @@ import com.logpm.distribution.vo.app.DistributionAppSignforVO;
import com.logpm.distribution.vo.app.DistributionAppStockArticleVO;
import com.logpm.oldproject.dto.SignPushDataUnitDTO;
import org.apache.ibatis.annotations.Param;
import org.springblade.core.secure.BladeUser;
import java.util.List;
@ -285,4 +286,12 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
*/
int deductionLoadingInventoryNum(@Param("reservationId")Long reservationId,@Param("deliveryId") Long deliveryId,@Param("nub") Integer loadedNub);
/**
* 更新签收人
* @param deliveryId
* @param reservationId
* @param user
* @return
*/
Integer updateSignUser(@Param("deliveryId")Long deliveryId,@Param("reservationId") Long reservationId,@Param("user") BladeUser user);
}

63
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -69,6 +69,9 @@
<update id="deductionLoadingInventoryNum">
UPDATE logpm_distribution_signfor lds set lds.loadedin_number = ( lds.loadedin_number - #{nub} ) WHERE lds.is_deleted =0 and lds.reservation_id = #{reservationId} and loadedin_number !=0 and lds.delivery_id = #{deliveryId}
</update>
<update id="updateSignUser">
UPDATE logpm_distribution_signfor SET signee_name = #{user.nickName},signee_id = #{user.userId} WHERE signee_name is null and delivery_id = #{deliveryId} and reservation_id = #{reservationId}
</update>
<delete id="deleteByReservationAndDeliveryId">
DELETE FROM logpm_distribution_signfor
<where>
@ -285,6 +288,7 @@
SELECT
lds.id id,
lds.signee_name signeeName,
lds.signee_id signeeId,
ldr.mall_name mallName,
lds.positioning positioning,
lddl.warehouse_name warehouseName,
@ -300,11 +304,15 @@
lds.is_have_abnormal_package isHaveAbnormalPackage,
lds.signing_type signingType,
lddl.train_number trainNumber,
lddl.driver_name driverName,
lddl.vehicle_name vehicleName,
lddl.task_time taskTime,
lddl.loading_time AS signLoadingDate,
lds.received_quantity receivedQuantity,
lds.examine_user_id examineUserId,
lds.examine_user_name examineUserName,
ldr.delivery_phone deliveryPhone,
(SELECT GROUP_CONCAT(distinct driver_name SEPARATOR ',') from logpm_distribution_loadscan ldl WHERE ldl.reservation_id = lds.reservation_id) deliveryDriverName,
(SELECT GROUP_CONCAT(distinct driver_phone SEPARATOR ',') from logpm_distribution_loadscan ldl WHERE ldl.reservation_id = lds.reservation_id) deliveryDriverPhone,
ldr.reservation_code reservationCode,
ldr.delivery_address deliveryAddress,
lds.delivery_sign_pictures deliverySignPictures,
ldr.reservation_num reservationNum,
@ -326,13 +334,19 @@
lds.signing_status,
ldr.reservation_num - lds.received_quantity unsigneds,
ldr.reservation_num - lds.loaded_number withoutScanning,
lds.reservation_id reservationId
lds.reservation_id reservationId,
CASE lddl.kind
WHEN '1' THEN (SELECT driver_phone FROM logpm_distribution_delivery_self AS ldds WHERE ldds.delivery_id= lddl.id AND ldds.is_deleted = 0 AND ldds.is_master = 2)
WHEN '2' THEN (SELECT driver_phone FROM logpm_distribution_delivery_tripartite AS lddt WHERE lddt.delivery_id= lddl.id AND lddt.is_deleted = 0)
ELSE
''
END driverPhone
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id
<where>
lds.is_deleted = 0 and ldr.is_deleted = 0
lds.is_deleted = 0 and ldr.is_deleted = 0 and lddl.is_deleted = 0
<if test="param.mallName != null and param.mallName!=''">
and ldr.mall_name like concat('%',#{param.mallName},'%')
</if>
@ -345,6 +359,15 @@
<if test="param.storeName != null and param.storeName!=''">
and ldr.store_name like concat('%',#{param.storeName},'%')
</if>
<if test="param.reservationCode != null and param.reservationCode!=''">
and ldr.reservation_code like concat('%',#{param.reservationCode},'%')
</if>
<if test="param.driverName != null and param.driverName!=''">
and lddl.driver_name like concat('%',#{param.driverName},'%')
</if>
<if test="param.vehicleName != null and param.vehicleName!=''">
and lddl.vehicle_name like concat('%',#{param.vehicleName},'%')
</if>
<if test="param.deliveryTime!=null and param.deliveryTime!=''">
and date_format(lds.delivery_time,'%y%m%d%') = date_format(#{param.deliveryTime},'%y%m%d%')
</if>
@ -372,7 +395,6 @@
<if test="param.trainNumber != null and param.trainNumber!=''">
and lddl.train_number like concat('%',#{param.trainNumber},'%')
</if>
<if test="param.deliveryAddress != null and param.deliveryAddress!=''">
and ldr.delivery_address like concat('%',#{param.deliveryAddress},'%')
</if>
@ -385,6 +407,24 @@
<if test="param.taskTime != null and param.taskTime!=''">
and date_format(lddl.task_time,'%Y-%m-%d') = #{param.taskTime}
</if>
<if test="param.signLoadingDate != null and param.signLoadingDate!=''">
and date_format(lddl.loading_time,'%Y-%m-%d') = #{param.signLoadingDate}
</if>
<if test="param.taskTimeSection != null and param.taskTimeSection!=''">
and lddl.task_time between #{param.taskTimeSection[0]} and #{param.taskTimeSection[1]}
</if>
<if test="param.loadingTimeSection != null and param.loadingTimeSection!=''">
and lddl.loading_time between #{param.loadingTimeSection[0]} and #{param.loadingTimeSection[1]}
</if>
<if test="param.signeeName != null and param.signeeName!=''">
and lds.signee_name like concat('%',#{param.signeeName},'%')
</if>
<if test="param.sjsigningTimeSection != null and param.sjsigningTimeSection!=''">
and lds.sjsigning_time between #{param.sjsigningTimeSection[0]} and #{param.sjsigningTimeSection[1]}
</if>
<if test="param.signingTimeSection != null and param.signingTimeSection!=''">
and lds.signing_time between #{param.signingTimeSection[0]} and #{param.signingTimeSection[1]}
</if>
</where>
</select>
@ -451,7 +491,7 @@
JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id
<where>
lds.is_deleted = 0 and lds.driver_signing ='1' and ldr.is_deleted = 0
lds.is_deleted = 0 and lds.driver_signing ='1' and ldr.is_deleted = 0 and lddl.is_deleted = 0 AND lds.signing_status = '1'
<if test="param.mallName != null and param.mallName!=''">
and ldr.mall_name like concat('%',#{param.mallName},'%')
</if>
@ -486,6 +526,9 @@
<if test="param.deliveryAddress != null and param.deliveryAddress!=''">
and ldr.delivery_address like concat('%',#{param.deliveryAddress},'%')
</if>
<if test="param.warehouseId != null and param.warehouseId!=''">
and ldr.warehouse_id = #{param.warehouseId}
</if>
</where>
</select>
@ -497,7 +540,7 @@
JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id
<where>
lds.is_deleted = 0 and lds.signing_status ='1' and ldr.is_deleted = 0
lds.is_deleted = 0 and lds.signing_status ='1' and ldr.is_deleted = 0 and lddl.is_deleted = 0
<if test="param.mallName != null and param.mallName!=''">
and ldr.mall_name like concat('%',#{param.mallName},'%')
</if>
@ -533,6 +576,10 @@
and ldr.delivery_address like concat('%',#{param.deliveryAddress},'%')
</if>
<if test="param.warehouseId != null and param.warehouseId!=''">
and ldr.warehouse_id = #{param.warehouseId}
</if>
</where>
</select>
@ -998,7 +1045,7 @@
WHERE
ldla.reservation_id = #{reservationId} and ldla.delivery_list_id = #{deliveryListId}
</select>
<select id="selectSignImgsUrl" resultType="com.logpm.distribution.entity.DistributionSignPrintEntity">
<select id="selectSignImgsUrl" resultType="com.logpm.distribution.vo.DistributionSignPrintVO">
SELECT * FROM logpm_distribution_sign_print WHERE reservation_id = #{reservationId} and is_deleted = 0
</select>
<select id="exportDistributionSignforSigningOwn" resultType="com.logpm.distribution.vo.DistributionSignforVO">

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

@ -120,4 +120,19 @@ public interface DistributionStockArticleMapper extends BaseMapper<DistributionS
void updateCustomerInfoByOrderCode(@Param("customerName") String customerName, @Param("customerPhone") String customerPhone, @Param("customerRoad") String customerRoad, @Param("orderCode") String orderCode);
void freezeByOrderCode(@Param("orderCode") String orderCode,@Param("freezeStatus") String freezeStatus);
/**
* 扣减在库订单在库数量
* @param orderId
* @param loadedNub
* @return
*/
Integer deductionHandQuantity(@Param("orderId") Long orderId, @Param("deductionNum") Integer loadedNub);
/**
* 增加订单的在库数量
* @param orderId
* @param loadedNub
*/
Integer augmentHandQuantity(@Param("orderId") Long orderId, @Param("augmentNum") Integer loadedNub);
}

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

@ -784,5 +784,12 @@
set freeze_status = #{freezeStatus}
where order_code = #{orderCode}
</update>
<update id="deductionHandQuantity">
UPDATE logpm_distribution_stock_article SET hand_quantity = (hand_quantity - #{deductionNum}) WHERE id=#{orderId} AND is_deleted = 0 AND hand_quantity >= 0
</update>
<update id="augmentHandQuantity">
UPDATE logpm_distribution_stock_article SET hand_quantity = (hand_quantity + #{augmentNum}) WHERE id=#{orderId} AND is_deleted = 0 AND hand_quantity >= 0
</update>
</mapper>

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

@ -25,6 +25,7 @@ import com.logpm.distribution.vo.DistributionStockListInfoVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 库存品明细 Mapper 接口
@ -52,4 +53,5 @@ public interface DistributionStockListInfoMapper extends BaseMapper<Distribution
*/
List<DistributionStockListInfoVO> exportDistributionStockListInfo(@Param("ew") Wrapper<DistributionStockListInfoEntity> queryWrapper);
Map<String, Object> selectDistributionStockByOrderPackageCodeAndWarehourseIdAndCargoNumber(@Param("associationValue") String associationValue, @Param("warehouseId") Long warehouseId, @Param("cargoNumber") String cargoNumber);
}

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListInfoMapper.xml

@ -72,4 +72,24 @@
SELECT * FROM logpm_distribution_stock_list_info ${ew.customSqlSegment}
</select>
<select id="selectDistributionStockByOrderPackageCodeAndWarehourseIdAndCargoNumber" resultType="map">
SELECT
id,
incoming_batch
FROM
logpm_distribution_stock_list
WHERE
cargo_number=#{cargoNumber}
AND
incoming_batch = (
SELECT
order_code
FROM
logpm_distribution_parcel_list
WHERE
warehouse_id = #{warehouseId} and order_package_code=#{associationValue} and conditions=2 and material_code=#{cargoNumber}
);
</select>
</mapper>

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

@ -109,4 +109,6 @@ public interface DistributionStockListMapper extends BaseMapper<DistributionStoc
* @return
*/
List<DistributionStockListVO> getStockListInfo(@Param("par")DistributionStockListEntity distributionStockListEntity);
DistributionStockListEntity selectStockInforByOrderPackageCode(@Param("orderPackageCode") String orderPackageCode);
}

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

@ -485,4 +485,21 @@
</where>
</select>
<select id="selectStockInforByOrderPackageCode" resultType="com.logpm.distribution.entity.DistributionStockListEntity">
SELECT
ldsl.*
FROM
(
SELECT
order_code,
material_code
FROM
logpm_distribution_parcel_list
WHERE
order_package_code = #{orderPackageCode}
AND conditions = 2
) t
LEFT JOIN logpm_distribution_stock_list ldsl ON ldsl.incoming_batch = t.order_code and ldsl.cargo_number=t.material_code
</select>
</mapper>

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

@ -159,7 +159,7 @@
select DISTINCT lwug.position_code positionCode,
lwug.allocation_id allocationId,
lwug.allocation_title allocationTitle,
lwug.num
lwug.num, ldsl.create_time createTime
from logpm_distribution_reservation_stocklist ldrs
LEFT JOIN logpm_distribution_stock_list ldsl on ldrs.stocklist_id = ldsl.id
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.order_code = ldsl.incoming_batch and ldpl.conditions = '2'
@ -172,7 +172,7 @@
select lwug.position_code positionCode,
lwug.allocation_id allocationId,
lwug.allocation_title allocationTitle,
lwug.num
lwug.num, ldsl.create_time createTime
from logpm_distribution_reservation_stocklist ldrs
LEFT JOIN logpm_distribution_stock_list ldsl on ldrs.stocklist_id = ldsl.id
LEFT JOIN logpm_warehouse_updown_goods lwug
@ -185,7 +185,7 @@
select lwug.position_code positionCode,
lwug.allocation_id allocationId,
lwug.allocation_title allocationTitle,
lwug.num
lwug.num, ldsl.create_time createTime
from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_warehouse_updown_goods lwug
@ -200,7 +200,7 @@
select DISTINCT lwug.position_code positionCode,
lwug.allocation_id allocationId,
lwug.allocation_title allocationTitle,
lwug.num
lwug.num, ldsl.create_time createTime
from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.order_code = ldsl.incoming_batch and ldpl.conditions = '2'

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

@ -19,6 +19,7 @@ package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DisStockOrdercodeRecoEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.excel.DisStockOrdercodeRecoExcel;
import com.logpm.distribution.vo.DisStockOrdercodeRecoVO;
import org.springblade.core.mp.base.BaseService;
@ -50,4 +51,6 @@ public interface IDisStockOrdercodeRecoService extends BaseService<DisStockOrder
*/
List<DisStockOrdercodeRecoExcel> exportDisStockOrdercodeReco(Wrapper<DisStockOrdercodeRecoEntity> queryWrapper);
DistributionStockListEntity selectStockOrdercodeRecoListByCode(String packetBarCode);
}

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

@ -35,6 +35,7 @@ import org.apache.poi.ss.formula.functions.T;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@ -205,4 +206,11 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
R updateSign(DistributionSignforDTO distributionSignfor);
IPage<DistributionAddvaluePackageVO> checkAddValuePackageList(IPage<DistributionAddvaluePackageVO> page, Map<String, Object> addValueDTO);
/**
* 导出签收图片
* @param ids
* @return
*/
void handlePicture(String ids, HttpServletResponse res);
}

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

@ -153,6 +153,13 @@ public interface IDistributionStockListService extends BaseService<DistributionS
*/
List<DistributionStockListVO> getStockListInfo(DistributionStockListEntity distributionStockListEntity);
/**
* 根据包件编码查询库存品信息
* @param orderPackageCode
* @return
*/
DistributionStockListEntity selectStockInforByOrderPackageCode(String orderPackageCode);
// /**
// * 查询库存品详情

17
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java

@ -17,8 +17,10 @@
package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.app.StockConfigInfoVO;
import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.dto.app.StockupZeroDTO;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.entity.DistributionStockupEntity;
import com.logpm.distribution.excel.DistributionCityExcel;
import com.logpm.distribution.excel.DistributionMarketExcel;
@ -250,4 +252,19 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
* @return
*/
boolean getTrayBoot(DistributionStockupOrderListVO vo,String type);
DistributionStockListEntity selectStockListInfoByCargoNumberList(Long reservationId, String cargoNumber, Long allocationId, String orderPackageCode);
/**
* 查询库位上最新入库的库存品
* @param reservationId
* @param cargoNumber
* @param allocationId
* @return
*/
Long selectStockListInfoByCargoNumber(Long reservationId, String cargoNumber, Long allocationId);
StockConfigInfoVO stockConfigList(StockupDTO stockupDTO);
}

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

@ -17,13 +17,17 @@
package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DisStockOrdercodeRecoEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.excel.DisStockOrdercodeRecoExcel;
import com.logpm.distribution.mapper.DisStockOrdercodeRecoMapper;
import com.logpm.distribution.mapper.DistributionStockListMapper;
import com.logpm.distribution.service.IDisStockOrdercodeRecoService;
import com.logpm.distribution.vo.DisStockOrdercodeRecoVO;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@ -37,6 +41,9 @@ import java.util.List;
@Service
public class DisStockOrdercodeRecoServiceImpl extends BaseServiceImpl<DisStockOrdercodeRecoMapper, DisStockOrdercodeRecoEntity> implements IDisStockOrdercodeRecoService {
@Autowired
private DistributionStockListMapper distributionStockListMapper;
@Override
public IPage<DisStockOrdercodeRecoVO> selectDisStockOrdercodeRecoPage(IPage<DisStockOrdercodeRecoVO> page, DisStockOrdercodeRecoVO disStockOrdercodeReco) {
return page.setRecords(baseMapper.selectDisStockOrdercodeRecoPage(page, disStockOrdercodeReco));
@ -52,4 +59,16 @@ public class DisStockOrdercodeRecoServiceImpl extends BaseServiceImpl<DisStockOr
return disStockOrdercodeRecoList;
}
@Override
public DistributionStockListEntity selectStockOrdercodeRecoListByCode(String packetBarCode) {
LambdaQueryWrapper<DisStockOrdercodeRecoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
List<DisStockOrdercodeRecoEntity> disStockOrdercodeRecoEntities = baseMapper.selectList(lambdaQueryWrapper);
if(!disStockOrdercodeRecoEntities.isEmpty()){
DisStockOrdercodeRecoEntity disStockOrdercodeRecoEntity = disStockOrdercodeRecoEntities.get(0);
return distributionStockListMapper.selectById(disStockOrdercodeRecoEntity.getStockListId());
}
return null;
}
}

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java

@ -346,8 +346,8 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImpl<Distributio
// distributionAddvalueDetailEntity.setFee(distributionAppAddvalueDTO.getFee());
// }
// break;
default:
return Resp.scanFail("添加失败", "服务器正忙");
// default:
// return Resp.scanFail("添加失败", "服务器正忙");
}
int total = packageEntityList.stream().mapToInt(DistributionAddvaluePackageDTO::getQuantity).sum();
@ -822,6 +822,8 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImpl<Distributio
return R.status(true);
}
// if (Func.isEmpty(detailEntity)) {
// log.error("###########查询增值服务详情错误:{}", detailEntity);
// log.error("###########AddvalueDetailId>>>>>>>>>>>>>>>>>>>>>>>>>>>:{}", detailEntity);

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java

@ -35,6 +35,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.loading.LoadingStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant;
import org.springblade.common.constant.reservation.ReservationOrderStatusConstant;
import org.springblade.common.serviceConstant.ServiceConstant;
import org.springblade.core.mp.base.BaseServiceImpl;
@ -77,6 +78,8 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
private IDistributionStockListService distributionStockListService;
private IDistributionLoadscaninvnService distributionLoadscaninvnService;
@Override
public IPage<DistributionDeliveryInfoVO> selectDistributionDeliveryInfoPage(IPage<DistributionDeliveryInfoVO> page, DistributionDeliveryInfoVO distributionDeliveryInfo) {
List<DistributionDeliveryInfoVO> distributionDeliveryInfoVOS = baseMapper.selectDistributionDeliveryInfoPage(page, distributionDeliveryInfo);
@ -404,6 +407,19 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
Map<Long, DistributionStockListEntity> stockListMap = distributionStockListEntities.stream().collect(Collectors.toMap(DistributionStockListEntity::getId, Function.identity(), (k1, k2) -> k2));
List<DisStockListDetailVO> disStockListDetailVOS = DistributionDisStockListWrapper.build().listVO(inventoryList);
disStockListDetailVOS.stream().forEach(sd->{
//查询一次装车 如果装车了那么
DistributionLoadscaninvnEntity serviceOne = distributionLoadscaninvnService.getOne(Wrappers.<DistributionLoadscaninvnEntity>query().lambda()
.eq(DistributionLoadscaninvnEntity::getReservationId, distributionAppDeliveryListDTO.getReservationId())
.eq(DistributionLoadscaninvnEntity::getInventoryPackageId, sd.getId())
.eq(DistributionLoadscaninvnEntity::getInventoryId, sd.getStockListId())
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(serviceOne)){
sd.setLoadingStatusName(OrderPackageLoadingStatusConstant.yizhuangche.getName());
}else {
sd.setLoadingStatusName(OrderPackageLoadingStatusConstant.weizhuancghe.getName());
}
if (Func.isNotEmpty(stockListMap.get(sd.getStockListId()))){
DistributionStockListEntity distributionStockListEntity = stockListMap.get(sd.getStockListId());
sd.setMarketName(distributionStockListEntity.getMarketName());

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

@ -570,6 +570,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
//扣减订单的在库数量
Integer k = distributionStockArticleMapper.deductionHandQuantity(loadscanEntity.getOrderId(), loadscanEntity.getLoadedNub());
distributionLoadscanService.save(loadscanEntity);
//这里还需要一个维护状态的方法
//异步维护状态
@ -699,6 +701,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
//扣减订单的在库数量
Integer k = distributionStockArticleMapper.deductionHandQuantity(loadscanEntity.getOrderId(), loadscanEntity.getLoadedNub());
// loadingNum.getAndAdd(loadscanEntity.getPackageNub());
distributionAsyncService.checkLoadingByPackage(parcelListEntity, loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId());
}
@ -1375,9 +1379,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//1、查询该客户下是否还存在需要装车的包件和库存品
//查询配送任务配车司机信息
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
DistributionDeliveryListEntity distributionDeliveryListEntity = this.getById(distrilbutionloadingscanDTO.getDeliveryId());
distributionDeliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.yizhuangche.getValue());
distributionDeliveryListMapper.updateById(distributionDeliveryListEntity);
this.updateById(distributionDeliveryListEntity);
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfDTO();
if (StringUtils.isBlank(distrilbutionloadingscanDTO.getLoadingId())) {
if (distributionDeliveryListEntity.getKind().equals("1")) {
@ -1471,8 +1475,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// distributionParcelListService.updateById(parcelListEntity);
distributionLoadscanService.save(loadscanEntity);
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
Integer j = distributionSignforMapper.updateloadByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
//扣减在库订单的在库数量
Integer k =distributionStockArticleMapper.deductionHandQuantity(loadscanEntity.getOrderId(),loadscanEntity.getLoadedNub());
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId());
distributionAsyncService.checkOrderLoadingStatus(parcelListEntity.getId());
}
@ -5653,6 +5658,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionLoadscanService.updateById(loadscanEntity);
// 对应签收信息的装车数量要进行扣减
int a = distributionSignforMapper.deductionLoadingPacjageNum(loadscanEntity.getReservationId(), loadscanEntity.getDeliveryId(), loadscanEntity.getLoadedNub());
//维护在库订单的在库数量字段
distributionStockArticleMapper.augmentHandQuantity(loadscanEntity.getOrderId(),loadscanEntity.getLoadedNub());
distributionAsyncService.checkReservationStatusAndLoadingStatusByPackage(parcelListEntity.getId());
}
//进行了一条包件任务的取消,此时就应该对预约、配送任务进行数量的维护

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

@ -2620,7 +2620,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
@Override
public List<DistributionStockupStockListVO> selectStockupStockList(Long reservationId) {
return baseMapper.selectStockupStockList(reservationId);
return baseMapper.selectStockupStockListNew(reservationId);
}
@Override

168
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -45,6 +45,7 @@ import com.logpm.distribution.wrapper.DistributionStockArticleWrapper;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.springblade.common.constant.DictBizConstant;
@ -61,6 +62,7 @@ import org.springblade.common.constant.reservation.*;
import org.springblade.common.constant.signing.SignforDriverSigningStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.serviceConstant.ServiceConstant;
import org.springblade.common.utils.FileUtil;
import org.springblade.common.utils.GaoDeApiUtil;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.BladeUser;
@ -75,12 +77,20 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.*;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.zip.ZipOutputStream;
/**
* 签收管理 服务实现类
@ -122,6 +132,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
private final IDistributionSignPrintService iDistributionSignPrintService;
private final IDistributionParcelNumberService distributionParcelNumberService;
private final IWarehouseUpdownTypeClient warehouseUpdownTypeClient;
private final DistributionStockArticleMapper distributionStockArticleMapper;
private final RabbitTemplate rabbitTemplate;
@ -130,8 +141,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
public IPage<DistributionSignforVO> selectDistributionSignforPage(IPage<DistributionSignforVO> page, DistributionSignforVO distributionSignfor) {
//转换创建时间
SimpleDateFormat sdf = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss");
if (null != distributionSignfor.getCreateTime()) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
distributionSignfor.setCreateTime_query(sdf.format(distributionSignfor.getCreateTime()));
}
//获取当前登录人仓库
@ -148,17 +159,17 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
} else {
d.setDeliveryTypeName("");
}
Long deliveryId = d.getDeliveryId();
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListMapper.selectOne(Wrappers.<DistributionDeliveryListEntity>query().lambda().eq(DistributionDeliveryListEntity::getId, deliveryId));
List<String> list = new ArrayList<>();
if (Func.equals(deliveryListEntity.getKind(), ServiceConstant.DELIVERLIST_KIND_SELF)) {
List<DistributionDeliverySelfEntity> distributionDeliverySelfEntities = distributionDeliverySelfMapper.selectList(Wrappers.<DistributionDeliverySelfEntity>query().lambda().eq(DistributionDeliverySelfEntity::getDeliveryId, deliveryId));
distributionDeliverySelfEntities.forEach(s -> list.add(s.getDriverPhone()));
} else {
DistributionDeliveryTripartiteEntity tripartiteEntity = distributionDeliveryTripartiteMapper.selectOne(Wrappers.<DistributionDeliveryTripartiteEntity>query().lambda().eq(DistributionDeliveryTripartiteEntity::getDeliveryId, deliveryId));
list.add(tripartiteEntity.getDriverPhone());
}
d.setDeliveryDriverPhone(String.join(",", list));
// Long deliveryId = d.getDeliveryId();
// DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListMapper.selectOne(Wrappers.<DistributionDeliveryListEntity>query().lambda().eq(DistributionDeliveryListEntity::getId, deliveryId));
// List<String> list = new ArrayList<>();
// if (Func.equals(deliveryListEntity.getKind(), ServiceConstant.DELIVERLIST_KIND_SELF)) {
// List<DistributionDeliverySelfEntity> distributionDeliverySelfEntities = distributionDeliverySelfMapper.selectList(Wrappers.<DistributionDeliverySelfEntity>query().lambda().eq(DistributionDeliverySelfEntity::getDeliveryId, deliveryId));
// distributionDeliverySelfEntities.forEach(s -> list.add(s.getDriverPhone()));
// } else {
// DistributionDeliveryTripartiteEntity tripartiteEntity = distributionDeliveryTripartiteMapper.selectOne(Wrappers.<DistributionDeliveryTripartiteEntity>query().lambda().eq(DistributionDeliveryTripartiteEntity::getDeliveryId, deliveryId));
// list.add(tripartiteEntity.getDriverPhone());
// }
// d.setDeliveryDriverPhone(String.join(",", list));
});
return page.setRecords(distributionSignforVOS);
}
@ -253,6 +264,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
public DistributionSignforsnmbVO getNubTotal(DistributionSignforDTO distributionSignfor) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isNotEmpty(myCurrentWarehouse)){
distributionSignfor.setWarehouseId(myCurrentWarehouse.getId());
}
//转换创建时间
DistributionSignforsnmbVO distributionSignforsnmbVO = new DistributionSignforsnmbVO();
//司机待签收
@ -371,6 +386,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
//更新装车包件数和签收包件数
Integer j = distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
//更新签收人
Integer m = distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(),AuthUtil.getUser());
//扣减订单的在库数量
Integer k = distributionStockArticleMapper.deductionHandQuantity(loadscanEntity.getOrderId(), loadscanEntity.getLoadedNub());
warehouseUpdownTypeClient.downPackageOrDelTray(collect.get(0).getOrderPackageCode(), myCurrentWarehouse.getId());
distributionAsyncService.checkSignStatus(distributionLoadscanEntity.getPackageId(),distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getDeliveryId());
}
@ -493,8 +512,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error("###########查询签收信息异常,id:{}", id);
return null;
}
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.<DistributionReservationStockarticleEntity>query().lambda().eq(DistributionReservationStockarticleEntity::getReservationId, signforEntity.getReservationId()).ne(
DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue()));
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.<DistributionReservationStockarticleEntity>query().lambda()
.eq(DistributionReservationStockarticleEntity::getReservationId, signforEntity.getReservationId())
.ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue()));
// if (Func.isEmpty(reservationStockarticleEntityList)) {
// log.error("#####################预约查询无订单信息,reservationId:{}", signforEntity.getReservationId());
// return null;
@ -503,11 +523,25 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (Func.isNotEmpty(orderIds)) {
List<DistributionStockArticleEntity> stockArticleEntities = distributionStockArticleService.listByIds(orderIds);
List<DistributionStockArticleVO> distributionStockArticleVOS = DistributionStockArticleWrapper.build().listVO(stockArticleEntities);
for (DistributionStockArticleVO distributionStockArticleVO : distributionStockArticleVOS) {
//查询计划、装车、签收数量
DistributionReservationStockarticleEntity reservationStockarticleEntity = distributionReservationStockarticleService.getOne(Wrappers.<DistributionReservationStockarticleEntity>query().lambda()
.eq(DistributionReservationStockarticleEntity::getReservationId, signforEntity.getReservationId())
.eq(DistributionReservationStockarticleEntity::getStockArticleId, distributionStockArticleVO.getId())
.ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue())
);
distributionStockArticleVO.setReservationNum(reservationStockarticleEntity.getReservationNum());
Integer loadingNum = distributionLoadscanMapper.selectOrderLoadingNumByReservationIdAndDeliveryIdAndOrderId(signforEntity.getReservationId(),signforEntity.getDeliveryId(),distributionStockArticleVO.getId());
distributionStockArticleVO.setLoadingNumber(loadingNum);
Integer signingNum = distributionLoadscanMapper.selectOrderSigningNumByReservationIdAndDeliveryIdAndOrderId(signforEntity.getReservationId(),signforEntity.getDeliveryId(),distributionStockArticleVO.getId());
distributionStockArticleVO.setSigningNumber(signingNum);
}
List<DistributionSignPrintVO> printEntities = baseMapper.selectSignImgsUrl(distributionSignforVO.getReservationId());
distributionSignforVO.setPrintVOList(printEntities);
if (Func.isNotEmpty(stockArticleEntities)) {
distributionSignforVO.setOrderInfo(DistributionStockArticleWrapper.build().listVO(stockArticleEntities));
distributionSignforVO.setOrderInfo(distributionStockArticleVOS);
}
}
// List<DistributionStockArticleVO> stockArticleEntityList = baseMapper.selectOrderList(id);
@ -990,7 +1024,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscaninvnEntity.setSigningUserId(user.getUserId());
distributionLoadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscaninvnService.save(distributionLoadscaninvnEntity);
//更新装车数量
Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscaninvnEntity.getDeliveryId(), distributionLoadscaninvnEntity.getReservationId(), distributionLoadscaninvnEntity.getPackageNub());
//更新签收人
Integer i = distributionSignforMapper.updateSignUser(distributionLoadscaninvnEntity.getDeliveryId(), distributionLoadscaninvnEntity.getReservationId(), AuthUtil.getUser());
//扣减库存
DistributionStockListEntity stockListEntity = distributionStockListService.getById(inventory.get(0).getStockListId());
stockListEntity.setQuantityOccupied(stockListEntity.getQuantityOccupied() - distributionLoadscaninvnEntity.getPackageNub());
@ -1467,6 +1505,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscaninvnService.updateById(loadscaninvnEntity);
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
//更新签收人
Integer m = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), AuthUtil.getUser());
distributionAsyncService.checkSignStatus(null,loadscaninvnEntity.getReservationId(),loadscaninvnEntity.getDeliveryId());
}
}else {
@ -1520,6 +1560,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
//更新签收表的签收数量和装车数量
Integer j = distributionSignforMapper.updateLoadAndsignforByinvn(newLoadscaninvnEntity.getDeliveryId(), newLoadscaninvnEntity.getReservationId(), newLoadscaninvnEntity.getPackageNub());
//更新签收人
Integer m = distributionSignforMapper.updateSignUser(newLoadscaninvnEntity.getDeliveryId(), newLoadscaninvnEntity.getReservationId(), AuthUtil.getUser());
//维护预约库存品数据
//扣减库存
DistributionStockListEntity stockListEntity = distributionStockListService.getById(detailEntity.getStockListId());
@ -1708,7 +1751,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
distributionLoadscanService.updateById(distributionLoadscanEntity);
distributionAsyncService.checkSignStatus(distributionLoadscanEntity.getPackageId(),distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getDeliveryId());
//更新签收人
Integer m = distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser());
//维护签收数量
DistributionSignforEntity signforEntity = distributionSignforMapper.selectOne(Wrappers.<DistributionSignforEntity>query().lambda().eq(DistributionSignforEntity::getDeliveryId, distributionLoadscanEntity.getDeliveryId()).eq(DistributionSignforEntity::getReservationId, distributionLoadscanEntity.getReservationId()));
BigDecimal loadedNumber = new BigDecimal(signforEntity.getLoadedNumber());
@ -1767,6 +1811,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//更新签收表的签收数量和装车数量
Integer j = distributionSignforMapper.updateSignforByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
//更新签收人
Integer m = distributionSignforMapper.updateSignUser(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), AuthUtil.getUser());
//维护出库数量和签收数量
DistributionParcelNumberEntity parcelNumberServiceById = distributionParcelNumberService.getById(parcelNumberEntity.getId());
BigDecimal signinQuantity = new BigDecimal(parcelNumberServiceById.getSigninQuantity());
@ -1840,6 +1887,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
//更新签收表的签收数量和装车数量
Integer j = distributionSignforMapper.updateSignforByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
//扣减订单的在库数量
Integer k = distributionStockArticleMapper.deductionHandQuantity(loadscanEntity.getOrderId(), loadscanEntity.getLoadedNub());
//更新签收人
Integer m = distributionSignforMapper.updateSignUser(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), AuthUtil.getUser());
distributionAsyncService.checkStockArticleSignStatus(parcelListEntity);
log.info("一件签收包件下架解托>>>>>>>>>>>>>>>parcelListEntity.getOrderPackageCode():{}",parcelListEntity.getOrderPackageCode());
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId());
@ -1851,6 +1903,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntities.setMsg("司机一键签收数据补录");
}
if (!loadscanEntities.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) {
//已经进行过装车 这里不需要进行订制品订单在库数量扣减
loadscanEntities.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
loadscanEntities.setReceivedQuantity(parcelListEntity.getQuantity());
loadscanEntities.setOneClick(1);
@ -1863,6 +1916,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
//更新签收数量
Integer j = distributionSignforMapper.updateSignforNum(loadscanEntities.getDeliveryId(), loadscanEntities.getReservationId(), loadscanEntities.getPackageNub());
//更新签收人
Integer m = distributionSignforMapper.updateSignUser(loadscanEntities.getDeliveryId(), loadscanEntities.getReservationId(), AuthUtil.getUser());
distributionAsyncService.checkSignStatus(loadscanEntities.getPackageId(),loadscanEntities.getReservationId(),loadscanEntities.getDeliveryId());
log.info("一件签收包件解托>>>>>>>>>>>>>>>parcelListEntity.getOrderPackageCode():{}",parcelListEntity.getOrderPackageCode());
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId());
@ -1990,6 +2045,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningTime, simpleDateFormat.format(new Date()))
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningTime, simpleDateFormat.format(new Date()))
.set(distributionSignfor.getIsClerk() && StringUtils.isNotBlank(distributionSignfor.getClerkSignRemarks()), DistributionSignforEntity::getClerkSignRemarks, distributionSignfor.getClerkSignRemarks())
.set(distributionSignfor.getIsClerk() , DistributionSignforEntity::getExamineUserId, user.getUserId())
.set(distributionSignfor.getIsClerk() , DistributionSignforEntity::getExamineUserName, user.getNickName())
.set(!distributionSignfor.getIsClerk() && StringUtils.isNotBlank(distributionSignfor.getDriverRemarks()), DistributionSignforEntity::getDriverRemarks, distributionSignfor.getDriverRemarks())
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getDriverSigning, 2)
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date()));
@ -2826,6 +2883,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新装车包件数和签收包件数
Integer j = distributionSignforMapper.updateSignforByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
//更新签收人
Integer k = distributionSignforMapper.updateSignUser(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), AuthUtil.getUser());
//这里需要维护
BigDecimal deliveryQuantity = new BigDecimal(parcelNumberEntity.getDeliveryQuantity());
BigDecimal outboundQuantity = new BigDecimal(parcelNumberEntity.getOutboundQuantity());
@ -2929,4 +2988,81 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
page.setTotal(addvaluePackageVOS.size());
return page.setRecords(addvaluePackageVOS);
}
@Override
public void handlePicture(String ids, HttpServletResponse res) {
if (Func.isEmpty(ids)){
log.error("#########ids字段缺失:{}",ids);
}
List<File> fileList = new ArrayList<>();
List<Long> signIds = Func.toLongList(",", ids);
List<DistributionSignforEntity> distributionSignforEntities = this.listByIds(signIds);
if (Func.isNotEmpty(distributionSignforEntities)) {
for (DistributionSignforEntity distributionSignforEntity : distributionSignforEntities) {
DistributionReservationEntity distributionReservationEntity = distributionReservationMapper.selectById(distributionSignforEntity.getReservationId());
List<DistributionSignPrintVO> printEntities = baseMapper.selectSignImgsUrl(distributionSignforEntity.getReservationId());
if (Func.isNotEmpty(printEntities)){
//进行分组
Map<String, List<DistributionSignPrintVO>> signingPictureGroup = printEntities.stream().collect(Collectors.groupingBy(DistributionSignPrintVO::getType));
//进行图片
signingPictureGroup.forEach((k,v)->{
//这个方法会根据
List<String> urls = v.stream().map(DistributionSignPrintVO::getUrlRoute).collect(Collectors.toList());
FileUtil.handleSignPictureZip(urls, k, distributionReservationEntity.getReservationCode(), distributionReservationEntity.getConsignee());
});
File file = FileUtil.checkZipFile(distributionReservationEntity.getReservationCode());
if (Func.isNotEmpty(file)){
fileList.add(file);
}
}
}
}
//获取Zip文件
if (Func.isNotEmpty(fileList)){
byte[] buffer = new byte[1024 * 1024 * 1024];
FileInputStream fis = null;
BufferedInputStream bis = null;
try {
for (File file : fileList) {
ServletOutputStream os = res.getOutputStream();
fis = new FileInputStream(file);
bis = new BufferedInputStream(fis);
// res.setHeader("Content-Length", ""+file.listFiles().length);
// res.setContentType("application/zip;charset=UTF-8");
// res.setHeader("Content-Disposition","签收图片打包");
int i = bis.read(buffer);
while (i >= 0) {
os.write(buffer, 0, i);
i = bis.read(buffer);
}
}
} catch (IOException e) {
log.info("Download failed!");
throw new RuntimeException(e);
}finally {
if (bis != null) {
try {
bis.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (fis != null) {
try {
fis.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
}

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

@ -1218,6 +1218,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
public IPage<DistributionParcelListVO> getPackageListByStockArticleId(IPage<DistributionParcelListVO> page, Long orderId) {
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, orderId)
.eq(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue())
.ne(DistributionParcelListEntity::getConditions,2)
.notIn(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue(), OrderPackageStatusConstant.yichuku.getValue()));
List<DistributionParcelListVO> parcelListVOS = DistributionParcelListWrapper.build().listVO(parcelListEntityList);
return page.setRecords(parcelListVOS);

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

@ -476,6 +476,18 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
public List<DistributionStockListVO> getStockListInfo(DistributionStockListEntity distributionStockListEntity) {
return baseMapper.getStockListInfo(distributionStockListEntity);
}
@Override
public DistributionStockListEntity selectStockInforByOrderPackageCode(String orderPackageCode) {
return baseMapper.selectStockInforByOrderPackageCode(orderPackageCode);
}
}
// @Override

1209
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

File diff suppressed because it is too large Load Diff

1
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/LocationMapper.xml

@ -9,7 +9,6 @@
from ht_location l
where l.shelf_id = #{shelfId}
and l.delete_time = 0
and l.`status` = 1
</select>
</mapper>

3
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/CargoServiceImpl.java

@ -19,8 +19,7 @@ public class CargoServiceImpl implements ICargoService {
public List<CargoEntity> getAllByWarehouseId(Integer oldWarehouseId) {
QueryWrapper<CargoEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("warehouse_id",oldWarehouseId)
.eq("delete_time",0)
.eq("status",1);
.eq("delete_time",0);
return cargoMapper.selectList(queryWrapper);
}
}

3
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/LocationServiceImpl.java

@ -25,8 +25,7 @@ public class LocationServiceImpl implements ILocationService {
public List<LocationEntity> getAllByShelfId(Integer shelfId) {
QueryWrapper<LocationEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("shelf_id",shelfId)
.eq("delete_time",0)
.eq("status",1);
.eq("delete_time",0);
return locationMapper.selectList(queryWrapper);
}
}

1
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/ShelfServiceImpl.java

@ -20,7 +20,6 @@ public class ShelfServiceImpl implements IShelfService {
public List<ShelfEntity> getAllByWarehouseIdAndCargoId(Integer cargoId) {
QueryWrapper<ShelfEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("cargo_id",cargoId)
.eq("status",1)
.eq("delete_time",0);
return shelfMapper.selectList(queryWrapper);
}

32
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncWarehouseData.java

@ -66,6 +66,9 @@ public class SyncWarehouseData {
//通过老系统仓库id去查有哪些货区
List<CargoEntity> cargoEntityList = cargoClient.getAllByWarehouseId(oldWarehouseId);
Map<Integer,Integer> areaIsEmptyMap = new HashMap<>();
areaIsEmptyMap.put(1,1);
areaIsEmptyMap.put(0,2);
for (CargoEntity cargoEntity:cargoEntityList){
//货区数据存储
Integer cargoId = cargoEntity.getId();//老系统货区id
@ -76,7 +79,7 @@ public class SyncWarehouseData {
goodsAreaEntity.setCreateDept(1649331096241836033L);
goodsAreaEntity.setWarehouseId(newWarehouseId);
goodsAreaEntity.setHeadline(cargoEntity.getTitle());
goodsAreaEntity.setEnableStatus("1");
goodsAreaEntity.setEnableStatus(areaIsEmptyMap.get(cargoEntity.getStatus())+"");
goodsAreaEntity.setAreaType("2");
goodsAreaEntity.setOldId(cargoId);
Long newAreaId = basicdataGoodsAreaClient.addCargo(goodsAreaEntity);
@ -105,7 +108,7 @@ public class SyncWarehouseData {
goodsShelfEntity.setWarehouseId(newWarehouseId);
goodsShelfEntity.setWarehouseCode(warehouseEntity.getWarehouseCode());
goodsShelfEntity.setGoodsShelfStatus(2);
goodsShelfEntity.setEnableStatus(1);
goodsShelfEntity.setEnableStatus(shelfIsEmptyMap.get(shelfEntity.getStatus()));
goodsShelfEntity.setStoreyNum(storeyAndRow.get("storey"));
goodsShelfEntity.setRowNum(storeyAndRow.get("row"));
goodsShelfEntity.setRemarks("");
@ -115,14 +118,26 @@ public class SyncWarehouseData {
log.warn("#################saveAllocationData: 保存货架信息失败oldShelfId={},oldWarehouseId={}",oldShelfId,oldWarehouseId);
return false;
}else{
int maxFloor = 0;
int maxRow = 0;
//货位数据存储
Map<Integer,Integer> locationIsEmptyMap = new HashMap<>();
locationIsEmptyMap.put(1,2);
locationIsEmptyMap.put(0,1);
locationIsEmptyMap.put(1,1);
locationIsEmptyMap.put(0,2);
List<LocationEntity> locationEntities = locationClient.getAllByShelfId(oldShelfId);
// List<BasicdataGoodsAllocationEntity> newLocations = new ArrayList<>();
for (LocationEntity locationEntity:locationEntities){
Integer locationId = locationEntity.getId();
String title = locationEntity.getTitle();
String[] split = title.split("-");
int floor = Integer.parseInt(split[0]);
int row = Integer.parseInt(split[1]);
if(floor > maxFloor){
maxFloor = floor;
}
if(row > maxRow){
maxRow = row;
}
BasicdataGoodsAllocationEntity entity = new BasicdataGoodsAllocationEntity();
entity.setTenantId("627683");
entity.setId(locationId.longValue());
@ -133,11 +148,11 @@ public class SyncWarehouseData {
entity.setGoodsAllocationName(locationEntity.getTitle());
entity.setWarehouseId(newWarehouseId);
entity.setGoodsShelfId(newShelfId);
entity.setEnableStatus("1");
entity.setEnableStatus(locationIsEmptyMap.get(locationEntity.getStatus())+"");
entity.setAllocationStatus("1");
entity.setLayerNum(locationEntity.getFloor());
entity.setColumnNum(locationEntity.getRow());
entity.setQrCode(shelfEntity.getTitle()+"排"+locationEntity.getFloor()+"层"+locationEntity.getRow()+"列");
entity.setLayerNum(floor);
entity.setColumnNum(row);
entity.setQrCode(shelfEntity.getTitle()+"排"+floor+"层"+row+"列");
entity.setOldId(locationId);
Long newLocationId = basicdataGoodsAllocationClient.addLocation(entity);
if(Objects.isNull(newLocationId)){
@ -147,6 +162,7 @@ public class SyncWarehouseData {
log.info("#################saveAllocationData: 保存货位信息成功locationId={},oldWarehouseId={}",locationId,oldWarehouseId);
}
}
basicdataGoodsShelfClient.updateRowAndFloorByShelfId(maxFloor,maxRow,newShelfId);
}
}
}

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

@ -151,6 +151,25 @@ public class WarehouseTaskApiController {
return r;
}
/**
* 删除盘点数据
*/
@DeleteMapping("/deleteQuestChild")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "删除盘点数据", notes = "code,type")
public R deleteQuestChild(@RequestBody TaskSearchDTO taskSearchDTO) {
if(ObjectUtils.isNull(taskSearchDTO.getQuestNum())){
return R.fail("任务编码不能为空");
}
if(ObjectUtils.isNull(taskSearchDTO.getQuestId())){
return R.fail("任务ID不能为空");
}
R r = taskQuestService.deleteQuestChild(taskSearchDTO);
return r;
}

80
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/TaskQuestController.java

@ -16,8 +16,11 @@
*/
package com.logpm.warehouse.controller;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.logpm.warehouse.dto.QuestDetailDTO;
import com.logpm.warehouse.dto.TaskQuestDTO;
import com.logpm.warehouse.dto.TaskSearchDTO;
import com.logpm.warehouse.excel.QuestContrastExcel;
import com.logpm.warehouse.vo.QuestContrastVO;
import com.logpm.warehouse.vo.QuestDetailVO;
import com.logpm.warehouse.wrapper.TaskQuestVOWrapper;
@ -80,6 +83,7 @@ public class TaskQuestController extends BladeController {
/**
* 盘点任务 任务下的包条
*/
/*
@GetMapping("/SelectStrip")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "盘点任务 任务下的包条", notes = "传入taskQuest")
@ -87,32 +91,52 @@ public class TaskQuestController extends BladeController {
IPage<QuestDetailVO> list = taskQuestService.selectStrip(Condition.getPage(query),id);
return R.data(list);
}
*/
/**
* 盘点任务 任务下的库存品
*/
@GetMapping("/SelectInventory")
/* @GetMapping("/SelectInventory")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "盘点任务 任务下的库存品", notes = "传入id")
public R<IPage<QuestDetailVO>> SelectInventory(Long id,Query query) {
IPage<QuestDetailVO> list = taskQuestService.selectInventory(Condition.getPage(query),id);
return R.data(list);
}
}*/
/**
* 盘点任务 任务下的零担
*/
@GetMapping("/SelectZreo")
/*@GetMapping("/SelectZreo")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "盘点任务 任务下的零担", notes = "传入id")
public R<IPage<QuestDetailVO>> SelectZero(Long id,Query query) {
IPage<QuestDetailVO> list = taskQuestService.selectZero(Condition.getPage(query),id);
return R.data(list);
}*/
/**
* 删除盘点数据
*/
@DeleteMapping("/deleteQuestChild")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "删除盘点数据", notes = "code,type")
public R deleteQuestChild(@RequestBody TaskSearchDTO taskSearchDTO) {
if(ObjectUtils.isNull(taskSearchDTO.getQuestNum())){
return R.fail("任务编码不能为空");
}
if(ObjectUtils.isNull(taskSearchDTO.getQuestId())){
return R.fail("任务ID不能为空");
}
R r = taskQuestService.deleteQuestChild(taskSearchDTO);
return r;
}
/**
* 查询盘点数据
* 查询盘点明细数据
* @return
*/
@GetMapping("/getDetailInfo")
@ -135,6 +159,38 @@ public class TaskQuestController extends BladeController {
return R.data(page);
}
/**
* 查询盘点对比数据
* @return
*/
@GetMapping("/export-getContrastInfo")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "导出数据 盘点对比数据", notes = "传入questDetailDTO")
public void exportGetContrastInfo(QuestDetailDTO questDetailDTO, HttpServletResponse response){
List<QuestContrastExcel> list = taskQuestService.exportGetContrastInfo(questDetailDTO);
ExcelUtil.export(response, "盘点任务数据" + DateUtil.time(), "盘点任务对比明细数据表", list, QuestContrastExcel.class);
}
/**
* 导出数据
*/
// @GetMapping("/export-taskQuest")
// @ApiOperationSupport(order = 9)
// @ApiOperation(value = "导出数据", notes = "传入taskQuest")
// public void exportTaskQuest(@ApiIgnore @RequestParam Map<String, Object> taskQuest, BladeUser bladeUser, HttpServletResponse response) {
// QueryWrapper<TaskQuestEntity> queryWrapper = Condition.getQueryWrapper(taskQuest, TaskQuestEntity.class);
// //if (!AuthUtil.isAdministrator()) {
// // queryWrapper.lambda().eq(TaskQuest::getTenantId, bladeUser.getTenantId());
// //}
// queryWrapper.lambda().eq(TaskQuestEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
// List<TaskQuestExcel> list = taskQuestService.exportTaskQuest(queryWrapper);
// ExcelUtil.export(response, "盘点任务数据" + DateUtil.time(), "盘点任务数据表", list, TaskQuestExcel.class);
// }
/**
* 修改盘点数据
* @return
@ -213,6 +269,22 @@ public class TaskQuestController extends BladeController {
return R.status(taskQuestService.updateQuestInfo(questDetailDTO));
}
/**
* 盘点任务 盘点后的数据查询
*/
@GetMapping("/getQuestChildInfo")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入taskQuest")
public R selectQuestChildInfo( QuestDetailDTO questDetailDTO) {
if(ObjectUtils.isNull(questDetailDTO.getQuestNum())){
return R.fail("任务编号不能为空");
}
if(ObjectUtils.isNull(questDetailDTO.getId())){
return R.fail("包件数据Id不能为空!!");
}
return R.data(taskQuestService.selectQuestChildInfo(questDetailDTO));
}
/**
* 盘点任务 修改时间
*/

134
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/QuestContrastExcel.java

@ -0,0 +1,134 @@
package com.logpm.warehouse.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import java.util.Date;
@Data
public class QuestContrastExcel {
/**
* 订单自编号
*/
@ColumnWidth(20)
@ExcelProperty("订单自编号")
private String orderCode;
/**
* 品牌名称
*/
@ColumnWidth(20)
@ExcelProperty("品牌名称")
private String brandName;
/**
* 入库批次号
*/
@ColumnWidth(20)
@ExcelProperty("入库批次号")
private String incomingBatch;
/**
* 商场 名称
*/
@ColumnWidth(20)
@ExcelProperty("商场名称")
private String mallName;
/***
* 客户名称
*/
@ColumnWidth(20)
@ExcelProperty("客户名称")
private String customerName;
/**
* 三级名称
*/
@ColumnWidth(20)
@ExcelProperty("三级名称")
private String thirdProduct;
/**
* 物料名称
*/
@ColumnWidth(20)
@ExcelProperty("物料名称")
private String materialName;
/**
* 总件数
*/
@ColumnWidth(20)
@ExcelProperty("总件数")
private Integer totalNumber;
/**
* 在库数据
*/
@ColumnWidth(20)
@ExcelProperty("在库数据")
private Integer handQuantity;
/**
* 所在托盘
*/
@ColumnWidth(20)
@ExcelProperty("所在托盘")
private String pallet;
/**
* 货物信息
*/
@ColumnWidth(20)
@ExcelProperty("货物信息")
private String goodsAllocation;
/**
* 盘点人
*/
@ColumnWidth(20)
@ExcelProperty("盘点人")
private String updateUser;
/**
* 盘点时间
*/
/* @ColumnWidth(20)
@ExcelProperty("盘点时间")
private Date updateTime;*/
/**
* 盘点时间
*/
@ColumnWidth(20)
@ExcelProperty("盘点时间")
private String updateTimes;
/**
* 盘点数据
*/
@ColumnWidth(20)
@ExcelProperty("盘点数据")
private Integer questNum;
/**
* 差异数
*/
@ColumnWidth(20)
@ExcelProperty("差异数")
private Integer differenceNum;
/**
* 托盘码
*/
@ColumnWidth(20)
@ExcelProperty("托盘码")
private String trayCode;
@ColumnWidth(20)
@ExcelProperty("货区-货架-货位")
private String positionCode;
/**
* 更新的货物信息
*/
@ColumnWidth(20)
@ExcelProperty("更新的货位")
private String groundingPositionCode;
/**
* 货物状态
*/
@ColumnWidth(20)
@ExcelProperty("货物状态")
private String questStatusName;
}

14
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseGoodsAllocationClient.java

@ -27,6 +27,10 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* 货位 Feign实现类
*
@ -55,5 +59,15 @@ public class WarehouseGoodsAllocationClient implements IWarehouseGoodsAllocation
public Boolean updateAllocationCache(String ids) {
return warehouseGoodsAllocationService.updateAllocationCache(ids);
}
@GetMapping(TOP+ "/getAllocationInforByIds")
@Override
public List<WarehouseGoodsAllocationEntity> getAllocationInforByIds(String [] ids) {
List<Long> lss = new ArrayList<>();
for (String id : ids) {
lss.add(Long.parseLong(id));
}
return warehouseGoodsAllocationService.listByIds(lss);
}
}

14
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownTypeClient.java

@ -21,6 +21,8 @@ import com.logpm.warehouse.dto.UpShelfPackageDTO;
import com.logpm.warehouse.dto.UpShelfStockDTO;
import com.logpm.warehouse.dto.UpShelfZeroOrderDTO;
import com.logpm.warehouse.service.IWarehouseUpdownTypeService;
import com.logpm.warehouse.vo.TragetAllocationVO;
import com.logpm.warehouse.vo.UpShelfAllocationVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
@ -164,4 +166,16 @@ public class WarehouseUpdownTypeClient implements IWarehouseUpdownTypeClient {
public boolean packageChangeStock(List<String> orderPackageCodes) {
return warehouseUpdownTypeService.packageChangeStock(orderPackageCodes);
}
@Override
public R findUpdownTypeInforByAllocationId(Long allocationId, Long warehouseId) {
UpShelfAllocationVO upShelfAllocationVO = warehouseUpdownTypeService.upShelfScanAllocation(allocationId, warehouseId);
return R.data(JSONObject.toJSONString(upShelfAllocationVO));
}
@Override
public R findAllGoodsByAllocationId(Long allocationId, Long warehouseId) {
return warehouseUpdownTypeService.findAllGoodsByAllocationId(allocationId,warehouseId);
}
}

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.java

@ -159,4 +159,6 @@ public interface TaskQuestMapper extends BaseMapper<TaskQuestEntity> {
* @return
*/
List<QuestContrastVO> selectContrastDataInfo(@Param("questNum")String questNum,@Param("param")QuestDetailEntity questDetail);
Integer deleteQuestChild(@Param("questNum")String questNum, @Param("questDetailId")String i);
}

18
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml

@ -28,7 +28,9 @@
<update id="setSqlMode">
SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
</update>
<delete id="deleteQuestChild" >
delete from ${questNum} where quest_detail_id = #{questDetailId}
</delete>
<select id="selectTaskQuestPage" resultType="com.logpm.warehouse.vo.TaskQuestVO">
select ltq.*,lww.name warehouseName from logpm_task_quest ltq left join logpm_warehouse_warehouse lww on lww.id = ltq.warehouse_id
@ -40,6 +42,7 @@
#{item}
</foreach>
</if>
<if test="param.questNum != null and param.questNum != ''"> and ltq.quest_num like concat("%",#{param.questNum},"%")</if>
</where>
ORDER BY ltq.create_time desc
</select>
@ -116,9 +119,13 @@
`material_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料名称(库存品)',
`waybill_number` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '运单号',
PRIMARY KEY (`id`) USING BTREE,
INDEX `quest_id_index`(`quest_id`) USING BTREE COMMENT '任务id',
INDEX `quest_id_index`(`quest_id`,`tenant_id`) USING BTREE COMMENT '任务id',
INDEX `order_id_index`(`order_id`) USING BTREE COMMENT '订单id',
INDEX `tenant_id_index`(`tenant_id`) USING BTREE COMMENT '租户id'
INDEX `allocation_id_index`(`allocation_id`) USING BTREE,
INDEX `order_package_id_index`(`order_package_id`) USING BTREE,
INDEX `order_package_code_index`(`order_package_code`) USING BTREE,
INDEX `tray_index`(`tray_code`, `tray_id`) USING BTREE,
INDEX `quest_target_index`(`quest_target`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '${questNum}盘点明细' ROW_FORMAT = Dynamic;
</update>
<insert id="insertQuestDetail" parameterType="arraylist">
@ -218,7 +225,7 @@
GROUP_CONCAT(DISTINCT p.tray_id) trayId ,GROUP_CONCAT(DISTINCT p.position_code) positionCode,SUM(p.stock_num) handQuantity
,ldsa.total_number totalNumber,GROUP_CONCAT(DISTINCT p.allocation_id) allocationId,GROUP_CONCAT(DISTINCT p.update_user) updateUser
,GROUP_CONCAT(DISTINCT p.grounding_position_code) groundingPositionCode,GROUP_CONCAT(DISTINCT p.quest_status) questStatus,
GROUP_CONCAT(DISTINCT p.update_time) updateTime
GROUP_CONCAT(DISTINCT p.update_time) updateTimes
from ${questNum} p
LEFT JOIN logpm_distribution_parcel_list ldpl on p.order_package_id = ldpl.id
LEFT JOIN logpm_distribution_stock_article ldsa on ldsa.id = ldpl.stock_article_id
@ -255,7 +262,7 @@
<set>
<if test="item.groundingAllocationId != null"> grounding_allocation_id = #{item.groundingAllocationId},</if>
<if test="item.groundingPositionCode != null and item.groundingPositionCode != ''"> grounding_position_code = #{item.groundingPositionCode },</if>
<if test="item.questStatus != null and item.questStatus != ''"> quest_status = #{item.questStatus },</if>
<if test="item.questStatus != null "> quest_status = #{item.questStatus },</if>
<if test="item.orderCode != null and item.orderCode != null"> order_code= #{item.orderCode },</if>
<if test="item.orderPackageCode != null and item.orderPackageCode != null"> order_package_code= #{item.orderPackageCode },</if>
<if test="item.categoryName != null and item.categoryName != null">category_name = #{item.categoryName },</if>
@ -341,6 +348,7 @@
</foreach>
</if>
</where>
and end_time > now()
and ltq.quest_status !=2 and ltq.quest_status !=3 ORDER BY ltq.start_time desc
</select>
<select id="selectallocationList" resultType="com.logpm.warehouse.vo.TaskallocationVO">

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.xml

@ -137,6 +137,7 @@
lwrs.material_number,
lwrs.material_name,
lwrs.inventory_id,
lwrs.retention_quantity,
CASE lwrs.conditions
WHEN 1 THEN '包件'
WHEN 2 THEN '库存品'

24
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java

@ -21,8 +21,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.warehouse.dto.QuestDetailDTO;
import com.logpm.warehouse.dto.TaskQuestDTO;
import com.logpm.warehouse.dto.TaskSearchDTO;
import com.logpm.warehouse.entity.QuestDetailChildEntity;
import com.logpm.warehouse.entity.QuestDetailEntity;
import com.logpm.warehouse.entity.TaskQuestEntity;
import com.logpm.warehouse.excel.QuestContrastExcel;
import com.logpm.warehouse.excel.TaskQuestExcel;
import com.logpm.warehouse.vo.*;
import org.springblade.core.mp.base.BaseService;
@ -245,4 +247,26 @@ public interface ITaskQuestService extends BaseService<TaskQuestEntity> {
* @return
*/
boolean updateQuestInfo(List<QuestDetailDTO> questDetailDTO);
/**
* 删除已盘点的数据
* @param taskSearchDTO
* @return
*/
R deleteQuestChild(TaskSearchDTO taskSearchDTO);
/**
* 查询
*
* @param questDetailDTO
* @return
*/
List<QuestDetailChildEntity> selectQuestChildInfo( QuestDetailDTO questDetailDTO);
/**
* 盘点对比明细数据导出
* @param questDetailDTO
* @return
*/
List<QuestContrastExcel> exportGetContrastInfo(QuestDetailDTO questDetailDTO);
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java

@ -71,4 +71,5 @@ public interface IWarehouseUpdownTypeService extends BaseService<WarehouseUpdown
boolean packageChangeStock(List<String> orderPackageCodes);
R findAllGoodsByAllocationId(Long allocationId, Long warehouseId);
}

198
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

@ -37,6 +37,7 @@ import com.logpm.warehouse.dto.QuestDetailDTO;
import com.logpm.warehouse.dto.TaskQuestDTO;
import com.logpm.warehouse.dto.TaskSearchDTO;
import com.logpm.warehouse.entity.*;
import com.logpm.warehouse.excel.QuestContrastExcel;
import com.logpm.warehouse.excel.TaskQuestExcel;
import com.logpm.warehouse.mapper.TaskQuestMapper;
import com.logpm.warehouse.mapper.WarehouseTrayGoodsMapper;
@ -63,6 +64,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@ -173,7 +175,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
BladeUser user = AuthUtil.getUser();
if(!parcelListInfo.isEmpty()){
List<QuestDetailEntity> detailEntityList = new ArrayList<>();
parcelListInfo.stream().forEach( i ->{
parcelListInfo.forEach( i ->{
QuestDetailEntity detailEntity = new QuestDetailEntity();
detailEntity.setId(getTaskID());
@ -188,7 +190,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
detailEntity.setOrderId(i.getStockArticleId());
// detailEntity.setQuestType();
//盘点对象;1.定制品 2零担 3 库存品
detailEntity.setQuestTarget(i.getConditions());
if(ObjectUtils.isNotNull(i.getConditions()) && i.getConditions().equals(1) ){
detailEntity.setQuestTarget(i.getConditions());
}else if(ObjectUtils.isNotNull(i.getConditions()) && i.getConditions().equals(2)){
detailEntity.setQuestTarget(3); // 库存品
}else{
log.info("包件信息!数据信息不存在!!");
return;
}
// detailEntity.setQuestTarget(1);
detailEntity.setOrderPackageCode(i.getOrderPackageCode());
detailEntity.setWaybillNumber(i.getWaybillNumber());
detailEntity.setOrderPackageId(i.getId());
@ -222,7 +232,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
stockArticle.setMallId(ObjectUtils.isNotNull(stockArticleEntity.getMallId()) ? stockArticleEntity.getMallId() : null);
stockArticle.setIsZero("1");
List<DistributionStockArticleEntity> stockArticleInfo = distributionStockArticleClient.getStockArticleInfo(stockArticle);
if(!stockArticleInfo.isEmpty()){
if(ObjectUtils.isNotNull(stockArticleInfo) && !stockArticleInfo.isEmpty()){
detailEntityList.addAll(handleIsZeroList(stockArticleInfo,taskQuest));
}
log.debug("零担 和 包件数据=={}",detailEntityList.size());
@ -686,24 +696,37 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
return R.fail("待处理的包件为空!QuestNum");
}*/
BladeUser user = AuthUtil.getUser();
QuestDetailEntity questDetailer = new QuestDetailEntity();
List<QuestDetailEntity> questDetailList = baseMapper.selectTaskInfo(questNum, questDetailer);
// 在库包件状态修改
if(ObjectUtils.isNotNull(taskSearchDTO.getQuestDetailIds())){
if(ObjectUtils.isNotNull(taskSearchDTO.getQuestDetailIds()) && ObjectUtils.isNotNull(taskSearchDTO.getQuestDetailIds().get(0)) ){
List<QuestDetailEntity> list = new ArrayList<>();
taskSearchDTO.getQuestDetailIds().forEach( i ->{
AtomicBoolean s = new AtomicBoolean(false);
taskSearchDTO.getQuestDetailIds().stream().forEach( i ->{
//查询当前包件盘点状态
boolean b = questDetailList.stream().anyMatch(q -> q.getId().equals(i) && q.getQuestStatus().equals(1));
if(b){
s.set(true);
}
QuestDetailEntity questDetail = new QuestDetailEntity();
questDetail.setUpdateUser(user.getUserId());
questDetail.setUpdateTime(new Date());
questDetail.setId(Long.valueOf(i));
questDetail.setQuestStatus(1);
questDetail.setUpdateUser(user.getUserId());
questDetail.setUpdateTime(new Date());
// questDetail.setId(Long.valueOf(i));
// questDetail.setQuestStatus(1);
list.add(questDetail);
});
if(s.get()){
return Resp.scanFail("包含已盘点的数据!请勿重复提交!","包含已盘点的数据!请勿重复提交!");
}
baseMapper.updatePositionCodeList(questNum,list);
}
//处理盘点的包件
if(ObjectUtils.isNotNull(taskSearchDTO.getQuestDetailList())){
List<QuestDetailEntity> detailEntityList = new ArrayList<>();
//处理的包件
taskSearchDTO.getQuestDetailList().stream().forEach(i ->{
taskSearchDTO.getQuestDetailList().forEach(i ->{
Long taskID;
if(ObjectUtils.isNotNull(i.getId())){
taskID = i.getId();
@ -770,9 +793,11 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
//是否修改库位
QuestDetailEntity questDetail = new QuestDetailEntity();
if(ObjectUtils.isNotNull(i.getAllocationId())){
if(ObjectUtils.isNotNull(i.getGroundingAllocationId())){
questDetail.setId(i.getId());
questDetail.setGroundingAllocationId(Long.valueOf(i.getAllocationId()));
// questDetail.setGroundingAllocationId(Long.valueOf(i.getAllocationId()));
questDetail.setGroundingAllocationId(i.getGroundingAllocationId());
questDetail.setGroundingPositionCode(i.getGroundingPositionCode());
detailEntityList.add(questDetail);
}
});
@ -800,6 +825,37 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
questDetailEntityIPage.getRecords().stream().forEach( i ->{
QuestDetailVO questDetailVO = new QuestDetailVO();
BeanUtil.copyProperties(i,questDetailVO);
//查询包件信息
if(ObjectUtils.isNotNull(i.getOrderPackageId()) ){
DistributionParcelListEntity parcelListId = distributionParcelListClient.getParcelListId(String.valueOf(i.getOrderPackageId()));
if(ObjectUtils.isNotNull(parcelListId)){
questDetailVO.setFirsts(parcelListId.getFirsts());
questDetailVO.setSecond(parcelListId.getSecond());
questDetailVO.setThirdProduct(parcelListId.getThirdProduct());
questDetailVO.setMaterialName(parcelListId.getMaterialName());
questDetailVO.setMaterialCode(parcelListId.getMaterialCode());
questDetailVO.setBrandName(parcelListId.getBrandName());
}
}else if(i.getQuestTarget().equals(2)){
//零担
DistributionStockArticleEntity stockArticleEntity = new DistributionStockArticleEntity();
stockArticleEntity.setWarehouseId(i.getWarehouseId());
stockArticleEntity.setId(i.getOrderId());
List<DistributionStockArticleEntity> stockArticleInfo = distributionStockArticleClient.getStockArticleInfo(stockArticleEntity);
if(!stockArticleInfo.isEmpty()){
//
questDetailVO.setOrderCode(stockArticleInfo.get(0).getOrderCode());
}
}else if(i.getQuestTarget().equals(3) && ObjectUtils.isNull(i.getOrderPackageId())){
//库存平 无数据的
DistributionStockListEntity stockListById = distributionStockListClient.getStockListById(i.getStockId());
if(ObjectUtils.isNotNull( stockListById)){
questDetailVO.setOrderCode(stockListById.getIncomingBatch());
}
}
questDetailVOS.add(questDetailVO);
});
@ -1055,7 +1111,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
@Override
public Boolean updateByInfo(TaskQuestDTO taskQuest) {
return baseMapper.updateById(taskQuest) > 0 ? true : false;
return baseMapper.updateById(taskQuest) > 0;
}
/**
@ -1075,12 +1131,12 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
if(i.getStockNum() > 0 || i.getWornNum() > 0 || i.getLossNum() > 0 || i.getNoRepairNum() > 0 || i.getDeliveNum() > 0 || i.getNoReceivedNum()> 0){
//添加
List<QuestDetailChildEntity> childList = new ArrayList<>();
childList.add(addQuestDetailChild(i.getStockNum(),"10",i.getQuestId(),myCurrentWarehouse.getId(),i.getQuestNum()));
childList.add(addQuestDetailChild(i.getWornNum(),"20",i.getQuestId(),myCurrentWarehouse.getId(),i.getQuestNum()));
childList.add(addQuestDetailChild(i.getLossNum(),"30",i.getQuestId(),myCurrentWarehouse.getId(),i.getQuestNum()));
childList.add(addQuestDetailChild(i.getNoRepairNum(),"40",i.getQuestId(),myCurrentWarehouse.getId(),i.getQuestNum()));
childList.add(addQuestDetailChild(i.getDeliveNum(),"50",i.getQuestId(),myCurrentWarehouse.getId(),i.getQuestNum()));
childList.add(addQuestDetailChild(i.getNoReceivedNum(),"60",i.getQuestId(),myCurrentWarehouse.getId(),i.getQuestNum()));
childList.add(addQuestDetailChild(i.getStockNum(),"10",i.getId(),myCurrentWarehouse.getId(),i.getQuestNum()));
childList.add(addQuestDetailChild(i.getWornNum(),"20",i.getId(),myCurrentWarehouse.getId(),i.getQuestNum()));
childList.add(addQuestDetailChild(i.getLossNum(),"30",i.getId(),myCurrentWarehouse.getId(),i.getQuestNum()));
childList.add(addQuestDetailChild(i.getNoRepairNum(),"40",i.getId(),myCurrentWarehouse.getId(),i.getQuestNum()));
childList.add(addQuestDetailChild(i.getDeliveNum(),"50",i.getId(),myCurrentWarehouse.getId(),i.getQuestNum()));
childList.add(addQuestDetailChild(i.getNoReceivedNum(),"60",i.getId(),myCurrentWarehouse.getId(),i.getQuestNum()));
if(!childList.isEmpty()){
boolean b = childList.stream().anyMatch(ii -> ObjectUtils.isNull(ii.getId()));
if(b){
@ -1116,6 +1172,59 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
/**
* 删除已提交教的盘点数据
* @param taskSearchDTO
* @return
*/
@Override
public R deleteQuestChild(TaskSearchDTO taskSearchDTO) {
if(ObjectUtils.isNotNull(taskSearchDTO.getQuestDetailIds())){
//修改盘点状态
List<QuestDetailEntity> questDetailEntities = new ArrayList<>();
taskSearchDTO.getQuestDetailIds().stream().forEach(i ->{
QuestDetailEntity questDetail = new QuestDetailEntity();
questDetail.setId(Long.valueOf(i));
questDetail.setQuestStatus(0);
questDetailEntities.add(questDetail);
baseMapper.deleteQuestChild(taskSearchDTO.getQuestNum() + "_child", i);
});
baseMapper.updatePositionCodeList(taskSearchDTO.getQuestNum(),questDetailEntities);
return R.success("删除成功!!");
}else{
return R.fail("修改失败!!");
}
}
/**
* 查询盘点数据
* @param questDetailDTO
* @return
*/
@Override
public List<QuestDetailChildEntity> selectQuestChildInfo(QuestDetailDTO questDetailDTO) {
QuestDetailChildEntity questDetailChild = new QuestDetailChildEntity();
questDetailChild.setQuestDetailId(questDetailDTO.getId());
return baseMapper.selectQuestDetailChildInfo(questDetailDTO.getQuestNum()+"_child",questDetailChild);
}
@Override
public List<QuestContrastExcel> exportGetContrastInfo(QuestDetailDTO questDetailDTO) {
List<QuestContrastExcel> list = new ArrayList<>();
List<QuestContrastVO> contrastInfo = getContrastInfo(questDetailDTO, null);
if(ObjectUtils.isNull(contrastInfo)) {
return list;
}
contrastInfo.forEach( i -> {
QuestContrastExcel questContrastExcel = new QuestContrastExcel();
BeanUtil.copyProperties(i,questContrastExcel);
list.add(questContrastExcel);
});
return list;
}
/**
* 查询货位上的数据
* @param taskSearchDTO
@ -1140,10 +1249,16 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
for (QuestDetailEntity questDetailEntity : questDetailEntities) {
TaskPackagelistVO packagelistVO = new TaskPackagelistVO();
BeanUtil.copyProperties(questDetailEntity, packagelistVO);
packagelistVO.setAllocation(questDetailEntity.getPositionCode());
packagelistVO.setQuestDetailId(questDetailEntity.getId());
if(ObjectUtils.isNotNull(questDetailEntity.getGroundingPositionCode())){
packagelistVO.setAllocation(questDetailEntity.getGroundingPositionCode());
}else{
packagelistVO.setAllocation(questDetailEntity.getPositionCode());
}
if(taskSearchDTO.getTypeState().equals(1)){
//有
if(questDetailEntity.getQuestTarget().equals(2) || ObjectUtils.isNull( questDetailEntity.getOrderPackageId())){
if(questDetailEntity.getQuestTarget().equals(2) || ObjectUtils.isNull( questDetailEntity.getOrderPackageCode())){
continue;
}
//查询包件信息
@ -1156,7 +1271,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}else{
//没有
if(questDetailEntity.getQuestTarget().equals(1) || ObjectUtils.isNotNull(questDetailEntity.getOrderPackageId())){
if(questDetailEntity.getQuestTarget().equals(1) || ObjectUtils.isNotNull(questDetailEntity.getOrderPackageCode())){
continue;
}
@ -1188,7 +1303,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
if(ObjectUtils.isNotNull(byId)){
TaskallocationVO taskallocationVO = new TaskallocationVO();
taskallocationVO.setAllocationId(taskSearchDTO.getAllocationId());
taskallocationVO.setPositionCode(byId.getGoodsAllocationName());
taskallocationVO.setPositionCode(byId.getQrCode());
list.add(taskallocationVO);
}
}
@ -1230,7 +1345,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
if (Func.isEmpty(questDetailEntityList)){
return null;
}
/*Map<Integer, List<QuestDetailEntity>> questDetailMap = questDetailEntityList.stream().collect(Collectors.groupingBy(QuestDetailEntity::getQuestTarget));
Map<Integer, List<QuestDetailEntity>> questDetailMap = questDetailEntityList.stream().collect(Collectors.groupingBy(QuestDetailEntity::getQuestTarget));
//订制品
List<QuestDetailEntity> questDetailEntities = questDetailMap.get(1);
List<QuestDetailEntity> zeroQuestDetailEntities = questDetailMap.get(2);
@ -1288,7 +1403,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
list.add(taskContractVO);
}
}*/
}
return taskPageList.setRecords(list);
}
@ -1461,6 +1576,11 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
taskDataVO.setDataCode(p.getTrayCode()); //托盘ID
TaskPackagelistVO packagelistVO = new TaskPackagelistVO();
BeanUtil.copyProperties(p,packagelistVO);
if(ObjectUtils.isNotNull(p.getGroundingPositionCode())){
packagelistVO.setAllocation(p.getGroundingPositionCode());
}else{
packagelistVO.setAllocation(p.getPositionCode());
}
if(type.equals("1")){
//有 定 库 有
if(p.getQuestTarget().equals(2) || ObjectUtils.isNull(p.getOrderPackageCode())){//去除零担数据
@ -2276,6 +2396,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
for (QuestDetailEntity questDetailEntity : questDetailEntities) {
TaskPackagelistVO packagelistVO = new TaskPackagelistVO();
BeanUtil.copyProperties(questDetailEntity,packagelistVO);
packagelistVO.setQuestDetailId(questDetailEntity.getId());
if(ObjectUtils.isNotNull(questDetailEntity.getGroundingAllocationId())){
packagelistVO.setAllocation(questDetailEntity.getGroundingPositionCode());
}
if(taskSearchDTO.getTypeState().equals(1)){
//有
if(questDetailEntity.getQuestTarget().equals(2) || ObjectUtils.isNull( questDetailEntity.getOrderPackageCode())){
@ -2410,11 +2534,22 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
log.warn("###########saveNewQuestDetail: 货区信息不存在 goodsAreaId={}", goodsAreaId);
throw new CustomerException(403, "货区信息不存在");
}
String positionCode = goodsAreaEntity.getHeadline() + "-" + basicdataGoodsShelfEntity.getGoodsShelfName() + "-" + goodsAllocationEntity.getGoodsAllocationName();
//todo 待放开
TaskQuestEntity taskQuestEntity = baseMapper.selectById(questId);
QuestDetailEntity questDetail = new QuestDetailEntity();
questDetail.setAllocationId(String.valueOf(allocationId));
List<QuestDetailEntity> list = baseMapper.selectTaskInfo(taskQuestEntity.getQuestNum(), questDetail);
Map<String,Object> map = new HashMap<>();
map.put("positionCode",positionCode);
map.put("allocationId",allocationId);
if(!list.isEmpty()){
Set<String> collect = list.stream().map(QuestDetailEntity::getTrayCode).collect(Collectors.toSet());
map.put("trayCode",collect.stream().collect(Collectors.joining(",")));
}
String positionCode = goodsAreaEntity.getHeadline() + "-" + basicdataGoodsShelfEntity.getGoodsShelfName() + "-" + goodsAllocationEntity.getGoodsAllocationName();
map.put("positionCode",positionCode);
return R.data(map);
}
@ -2447,6 +2582,14 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
questDetail.setMarketNames(marketNames);
List<QuestDetailEntity> questDetailEntity = baseMapper.selectQuestDetailList(taskSearchDTO.getQuestNum(), questDetail);
if(ObjectUtils.isNull(questDetailEntity) ||questDetailEntity.isEmpty()){
return R.fail(5000,"包件信息不存在!!");
}
for (QuestDetailEntity i : questDetailEntity) {
if(i.getQuestStatus().equals(1)){
return Resp.scanFail("当前包件已盘点!","当前包件已盘点!");
}
}
// if(Objects.isNull(questDetailEntity)){
// questDetailEntity = new QuestDetailEntity();
// questDetailEntity.setOrdePackageCode(orderPackageCode);
@ -2930,6 +3073,11 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
Long end = CommonUtil.StringToDate(endTime).getTime();
if (now > end) {
log.warn("###########verifyTask: 盘点任务已结束 taskId={}", taskId);
//修改盘点任务
TaskQuestEntity taskQuestEntity = new TaskQuestEntity();
taskQuestEntity.setQuestStatus("3");
taskQuestEntity.setId(taskId);
baseMapper.updateById(taskQuestEntity);
throw new CustomerException(403, "盘点任务已结束");
}
}

10
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.warehouse.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.basicdata.entity.*;
import com.logpm.basicdata.feign.*;
@ -69,6 +70,15 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
return true;
}
@Override
public R findAllGoodsByAllocationId(Long allocationId, Long warehouseId) {
QueryWrapper<WarehouseUpdownGoodsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("allocation_id",allocationId);
List<WarehouseUpdownGoodsEntity> list = warehouseUpdownGoodsService.list(queryWrapper);
String jsonString = JSONObject.toJSONString(list);
return R.data(jsonString);
}
private void packageChangeStockByAllocaton(WarehouseUpdownGoodsEntity one) {

Loading…
Cancel
Save