Browse Source

Merge branch 'dev' into test

# Conflicts:
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
test
zhenghaoyu 2 years ago
parent
commit
41b8a6e4ec
  1. 5
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataStoreBusinessEntity.java
  2. 34
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataWarehouseEntity.java
  3. 7
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java
  4. 3
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataStoreBusinessClient.java
  5. 15
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java
  6. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java
  7. 80
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationStockarticleEntity.java
  8. 80
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationStocklistEntity.java
  9. 49
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionReservationStockarticleClient.java
  10. 49
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionReservationStocklistClient.java
  11. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java
  12. 22
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java
  13. 35
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationStockarticleVO.java
  14. 35
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationStocklistVO.java
  15. 3
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java
  16. 1
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceDetailClient.java
  17. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java
  18. 9
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataStoreBusinessClient.java
  19. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataWarehouseMapper.xml
  20. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  21. 150
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationStockarticleController.java
  22. 150
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationStocklistController.java
  23. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationDTO.java
  24. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationStockarticleDTO.java
  25. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationStocklistDTO.java
  26. 105
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationStockarticleExcel.java
  27. 105
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationStocklistExcel.java
  28. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionReservationStockarticleClient.java
  29. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionReservationStocklistClient.java
  30. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java
  31. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java
  32. 41
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  33. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  34. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  35. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  36. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.java
  37. 36
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.xml
  38. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.java
  39. 36
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.xml
  40. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  41. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  42. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationStockarticleService.java
  43. 52
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationStocklistService.java
  44. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  45. 119
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  46. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationStockarticleServiceImpl.java
  47. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationStocklistServiceImpl.java
  48. 6
      blade-service/logpm-factory/pom.xml
  49. 124
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java
  50. 52
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OpenOrderHandler.java
  51. 6
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/AdvanceClient.java
  52. 8
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.java
  53. 7
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.xml
  54. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IAdvanceService.java
  55. 7
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceServiceImpl.java

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

@ -17,10 +17,9 @@
package com.logpm.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@ -75,6 +74,6 @@ public class BasicdataStoreBusinessEntity extends TenantEntity {
* 服务类型类型
*/
@ApiModelProperty(value = "服务类型—类型")
private String mold;
private Integer mold;
}

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

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

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

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

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

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

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

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

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

@ -129,6 +129,12 @@ public class DistributionReservationEntity extends TenantEntity {
*/
@ApiModelProperty(value = "时段;1-上午、2-下午、3-全天")
private String periodOfTime;
/**
* 费用汇总
*/
@ApiModelProperty(value = "费用汇总")
private BigDecimal fee;
/**
/**
* 预留1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -31,6 +31,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -63,6 +64,7 @@ import javax.servlet.http.HttpServletResponse;
@AllArgsConstructor
@RequestMapping("/deliveryList")
@Api(value = "配送管理", tags = "配送管理接口")
@Slf4j
public class DistributionDeliveryListController extends BladeController {
private final IDistributionDeliveryListService distributionDeliveryListService;
@ -104,7 +106,7 @@ public class DistributionDeliveryListController extends BladeController {
/**
* 配送管理 配送车次统计
* 配送车次统计
*/
@GetMapping("/statistics")
@ApiOperationSupport(order = 2)

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

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

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

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

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

@ -17,6 +17,8 @@
package com.logpm.distribution.dto;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -54,13 +56,13 @@ public class DistributionReservationDTO extends DistributionReservationEntity {
* 库存品信息列表
*/
@ApiModelProperty(value = "库存品信息列表")
private List<DistributionStockListDTO> inventoryList;
private List<DistributionStockListEntity> inventoryList;
/**
* 订单信息列表
*/
@ApiModelProperty(value = "订单信息列表")
private List<DistributionStockArticleDTO> stockArticleList;
private List<DistributionStockArticleEntity> stockArticleList;

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -16,14 +16,16 @@
*/
package com.logpm.distribution.feign;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.service.IDistributionStockArticleService;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.service.IDistributionStockArticleService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
@ -51,6 +53,7 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
}
@Override
@PostMapping(API_PREFIX + "/addData")
public Long addData(DistributionStockArticleEntity distributionStockArticleEntity) {
boolean saveFlag = distributionStockArticleService.save(distributionStockArticleEntity);
if(saveFlag){
@ -60,4 +63,12 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
}
}
@Override
@GetMapping(API_PREFIX + "/findByAdvanceId")
public DistributionStockArticleEntity findByAdvanceId(Integer advanceId) {
QueryWrapper<DistributionStockArticleEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("advance_id",advanceId);
return distributionStockArticleService.getOne(queryWrapper);
}
}

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

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

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

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

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

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

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

@ -39,6 +39,12 @@
<result column="loading_team_name" property="loadingTeamName"/>
<result column="reservation_id" property="reservationId"/>
</resultMap>
<update id="updateloadingTime">
UPDATE logpm_distribution_delivery_list lddl
JOIN logpm_distribution_loadscan ldl ON lddl.id = ldl.delivery_id
SET lddl.loading_time = now()
WHERE ldl.package_id = #{id} and lddl.loading_time is null
</update>
<select id="selectDistributionDeliveryListPage" resultType="com.logpm.distribution.vo.DistributionDeliveryListVO">
@ -105,7 +111,7 @@
SELECT * FROM logpm_distribution_delivery_list ${ew.customSqlSegment}
</select>
<select id="selectBycommercialNub" resultType="java.lang.Integer">
SELECT COALESCE(COUNT(1), 0) FROM logpm_distribution_delivery_list
SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_delivery_list
<where>
type = '2'
<if test="param.warehouseName != null and param.warehouseName!=''">
@ -133,12 +139,10 @@
</select>
<select id="selectcommercialTotal" resultType="java.lang.Integer">
SELECT COALESCE
( COUNT( 1 ), 0 )
( COUNT(*), 0 )
FROM
logpm_distribution_delivery_list lddl
JOIN logpm_distribution_loadscan ldl ON lddl.id = ldl.delivery_id
JOIN logpm_distribution_parcel_list ldpl ON ldpl.id = ldl.package_id
WHERE
<where>
lddl.type = '2'
<if test="param.warehouseName != null and param.warehouseName!=''">
@ -165,7 +169,7 @@
</where>
</select>
<select id="selectmarketNub" resultType="java.lang.Integer">
SELECT COALESCE(COUNT(1), 0) FROM logpm_distribution_delivery_list
SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_delivery_list
<where>
type = '1'
<if test="param.warehouseName != null and param.warehouseName!=''">
@ -193,12 +197,11 @@
</select>
<select id="selectmarketTotal" resultType="java.lang.Integer">
SELECT COALESCE
( COUNT( 1 ), 0 )
(COUNT(*), 0 )
FROM
logpm_distribution_delivery_list lddl
JOIN logpm_distribution_loadscan ldl ON lddl.id = ldl.delivery_id
JOIN logpm_distribution_parcel_list ldpl ON ldpl.id = ldl.package_id
WHERE
<where>
lddl.type = '1'
<if test="param.warehouseName != null and param.warehouseName!=''">

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

@ -30,6 +30,7 @@
<result column="goods_shelf_id" property="goodsAreaId"/>
<!-- <result column="reservation_id" property="reservationId"/>-->
<result column="period_of_time" property="periodOfTime"/>
<result column="fee" property="fee"/>
<result column="reserve1" property="reserve1"/>
<result column="reserve2" property="reserve2"/>
<result column="reserve3" property="reserve3"/>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -58,6 +58,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
private final DistributionReservationMapper distributionReservationMapper;
private final DistributionParcelListMapper distributionParcelListMapper;
private final DistributionLoadscanMapper distributionLoadscanMapper;
private final DistributionDeliveryListMapper distributionDeliveryListMapper;
private final DistributionStockArticleMapper distributionStockArticleMapper;
@Override
public IPage<DistributionDeliveryListVO> selectDistributionDeliveryListPage(IPage<DistributionDeliveryListVO> page, DistributionDeliveryListDTO distributionDeliveryList) {
@ -86,13 +88,17 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//转移数据到VO上
BeanUtils.copyProperties(detail, distributionDeliveryListVO);
//查询包条数据
List<DistributionDeliveryInfoVO> stripList = distributionDeliveryInfoMapper.selectStripList(detail.getId());
List<DistributionDeliveryInfoVO> stripList =distributionDeliveryInfoMapper.selectStripList(detail.getId());
distributionDeliveryListVO.setPackadeList(stripList);
if (detail.getSource()==1){
//查询客户信息
List<DistributionDeliveryInfoVO> customList = distributionDeliveryInfoMapper.selectcustomList(detail.getId());
distributionDeliveryListVO.setPackadeList(stripList);
distributionDeliveryListVO.setReservationList(customList);
// List<DistributionPackadeliVO> list = distributionPackadeliMapper.selectjointList(detail.getId());
// distributionDeliveryListVO.setPackadeList(list);
}else if (detail.getSource()==2){
//查询订单信息
List<DistributionDeliveryInfoVO> customList = distributionDeliveryInfoMapper.selectcustomListByOrderId(detail.getOrderId());
distributionDeliveryListVO.setReservationList(customList);
}
return distributionDeliveryListVO;
}
@ -176,7 +182,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public Integer loadingscan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
if (distrilbutionloadingscanDTO.getType()==1){
//找出该包条码
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListMapper.selectList(new QueryWrapper<DistributionParcelListEntity>().lambda()
@ -185,11 +190,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//修改对应的装车表
distributionLoadscanMapper.updateByPackageId(e.getId());
//TODO 查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTime(e.getId());
// baseMapper.updateloadingTime(e.getId());
});
}else if (distrilbutionloadingscanDTO.getType()==2){
//TODO 托盘扫描
}
return 1;
}

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

@ -61,12 +61,20 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
private final IDistributionStockArticleService distributionStockArticleService;
private final IDistributionStockListService distributionStockListService;
private final IDistributionDeliveryListService distributionDeliveryListService;
private final IDistributionTripartiteDeliveryService distributionTripartiteDeliveryService;
private final IDistributionSelfDeliveryService distributionSelfDeliveryService;
private final IDistributionReservationStockarticleService distributionReservationStockarticleService;
private final IDistributionReservationStocklistService distributionReservationStocklistService;
@Override
public IPage<DistributionReservationVO> selectDistrbutionReservationPage(IPage<DistributionReservationVO> page, DistributionReservationVO distrbutionReservation) {
@ -112,59 +120,67 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
@Override
@Transactional
public boolean insertReservation(DistributionReservationDTO distributionReservationDTO) {
try {
if (Func.isEmpty(distributionReservationDTO)) {
log.error("参数错误+{" + distributionReservationDTO + "}");
return false;
}
//这里新增需要对预约列表下的订单配送单的金额进行计算
String idsStr = null;
List<Long> ids = Func.toLongList(idsStr);
if (Func.isEmpty(ids)) {
log.error("ids参数错误:+{" + ids + "}");
if (Func.isEmpty(distributionReservationDTO)){
log.error("参数错误+{" + distributionReservationDTO + "}");
return false;
}
BigDecimal collectFee = new BigDecimal("0");
BigDecimal replaceFee = new BigDecimal("0");
StringBuffer buffer = new StringBuffer();
List<DistributionStockArticleEntity> deliveryEntities = new ArrayList<>();
for (int i = 0; i < ids.size(); i++) {
BaseMapper<DistributionStockArticleEntity> stockArticleMapper = distributionStockArticleService.getBaseMapper();
DistributionStockArticleEntity distributionStockArticleEntity = stockArticleMapper.selectById(ids.get(i));
// deliveryEntities.add(distributionDeliveryEntity);
// collectFee = collectFee.add(distributionDeliveryEntity.getCollectFee());
// //待收货款累加
// replaceFee = replaceFee.add(distributionDeliveryEntity.getReplaceFee());
// String orderId = distributionDeliveryEntity.getOrderId();
buffer.append(distributionStockArticleEntity.getId()).append(",");
}
buffer.deleteCharAt(buffer.length() - 1);
DistributionReservationEntity distributionReservationEntity = new DistributionReservationEntity();
BeanUtils.copyProperties(distributionReservationDTO, distributionReservationEntity);
distributionReservationEntity.setCollectFee(collectFee);
distributionReservationEntity.setReplaceFee(replaceFee);
//设置订单自编号,这里的数据属于冗余部分
distributionReservationEntity.setStockArticleId(buffer.toString());
//设置状态未备货
distributionReservationEntity.setStockupStatus("1");
//设置预约状态为待确认
distributionReservationEntity.setReservationStatus("1");
//设置预约信息来源是自建的方式
distributionReservationEntity.setOrderSource("3");
//这里就对新增的预约信息进行保存
this.save(distributionReservationEntity);
Long reservationEntityId = distributionReservationEntity.getId();
//保存完之后获取新插入的预约服务获取ID然后订单派送单进行绑定
deliveryEntities.forEach(i -> {
i.setReservationId(reservationEntityId);
distributionStockArticleService.getBaseMapper().updateById(i);
}
//构建预约单
DistributionReservationEntity reservationEntity = new DistributionReservationEntity();
Func.copy(distributionReservationDTO,reservationEntity);
reservationEntity.setReservationStatus("1");
reservationEntity.setStockupStatus("1");
this.save(reservationEntity);
//获取新增预约信息的编号
Long reservationId = reservationEntity.getId();
List<DistributionStockArticleEntity> stockArticleList = distributionReservationDTO.getStockArticleList();
List<DistributionStockListEntity> inventoryList = distributionReservationDTO.getInventoryList();
AtomicInteger stockArticleCount = new AtomicInteger();
AtomicInteger stockListCount = new AtomicInteger();
List<String> arrayList = new ArrayList<>();
AtomicReference<BigDecimal> initTotal = new AtomicReference<>(BigDecimal.ZERO);
//存在订单构建预约订单关联信息
if (!Func.isEmpty(stockArticleList)){
stockArticleList.forEach(s->{
//修改订单状态为已预约
s.setState(2);
stockArticleCount.getAndAdd(s.getReservationNum());
distributionStockArticleService.updateById(s);
arrayList.add(s.getOrderSelfNumbering());
initTotal.accumulateAndGet(new BigDecimal(s.getFee().toString()),BigDecimal::add);
initTotal.accumulateAndGet(new BigDecimal(s.getRate().toString()),BigDecimal::add);
Long stockArticleId = s.getId();
DistributionReservationStockarticleEntity distributionReservationStockarticleEntity = new DistributionReservationStockarticleEntity();
distributionReservationStockarticleEntity.setReservationId(reservationId);
distributionReservationStockarticleEntity.setStockarticleId(stockArticleId);
distributionReservationStockarticleEntity.setReservationNum(s.getReservationNum());
distributionReservationStockarticleService.save(distributionReservationStockarticleEntity);
});
}
//存在库存品构建预约库存品关联信息
if (!Func.isEmpty(inventoryList)){
inventoryList.forEach(i->{
distributionStockListService.updateById(i);
Long stocklistId = i.getId();
stockListCount.getAndAdd(i.getReservationNum());
arrayList.add(i.getOrderSelfNumbering());
DistributionReservationStocklistEntity distributionReservationStocklistEntity = new DistributionReservationStocklistEntity();
distributionReservationStocklistEntity.setReservationId(reservationId);
distributionReservationStocklistEntity.setStocklistId(stocklistId);
distributionReservationStocklistEntity.setReservationNum(i.getReservationNum());
distributionReservationStocklistService.save(distributionReservationStocklistEntity);
});
} catch (Exception e) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
log.error("出现异常:+{" + e.getMessage() + "}");
return false;
}
//这里对预约信息再次进行修改
HashSet<String> set = new HashSet<>();
set.addAll(arrayList);
arrayList.addAll(set);
String str = String.join(",", set);
//拼接在库和库存订单编号
reservationEntity.setStockArticleId(str);
//统计数量
BigDecimal fee = initTotal.get().add(reservationEntity.getOtherFee());
reservationEntity.setFee(fee);
distributionReservationMapper.updateById(reservationEntity);
return true;
}
@ -200,7 +216,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
for (Long reservationId : reservationIds) {
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(reservationId);
if (Func.isEmpty(reservationEntity) || !reservationEntity.getReservationStatus().equals("2")) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
log.error("reservationEntity参数异常:+{" + reservationEntity + "}");
return R.fail("预约信息状态异常!!!");
}
@ -214,11 +229,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationStockupEntity.setReservationId(reservationEntity.getId().toString());
result = distributionStockupInfoService.save(reservationStockupEntity);
if (!result) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
log.error("sql执行异常:+{" + result + "}");
return R.fail("请稍后再试");
}
}
} catch (ParseException e) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();

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

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

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

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

6
blade-service/logpm-factory/pom.xml

@ -86,6 +86,12 @@
<version>3.1.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-basicdata-api</artifactId>
<version>3.1.0.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

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

@ -6,6 +6,10 @@ import com.alibaba.fastjson.JSONObject;
import com.alibaba.nacos.shaded.com.google.gson.Gson;
import com.alibaba.nacos.shaded.com.google.gson.GsonBuilder;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import com.logpm.basicdata.entity.BasicdataStoreBusinessEntity;
import com.logpm.basicdata.feign.IBasicdataClientClient;
import com.logpm.basicdata.feign.IBasicdataStoreBusinessClient;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.feign.IDistributionParcelListClient;
@ -13,7 +17,9 @@ import com.logpm.distribution.feign.IDistributionStockArticleClient;
import com.logpm.factory.comfac.dto.OrderInfoDTO;
import com.logpm.factory.comfac.dto.OrderStatusDTO;
import com.logpm.factory.comfac.service.IOrderStatusLogService;
import com.logpm.factory.pan.dto.*;
import com.logpm.factory.pan.dto.PanFactoryOrderDTO;
import com.logpm.factory.pan.dto.PanPackageInfoDTO;
import com.logpm.factory.pan.dto.PanPackageListDTO;
import com.logpm.factory.pan.service.IPanFactoryDataService;
import com.logpm.factory.pan.service.IPanFactoryOrderService;
import com.logpm.factory.pan.service.IPanPackageInfoService;
@ -26,12 +32,10 @@ import com.logpm.factory.snm.entity.PanPackageInfo;
import com.logpm.factory.snm.entity.PanPackageList;
import com.logpm.oldproject.entity.AdvanceDetailEntity;
import com.logpm.oldproject.entity.AdvanceEntity;
import com.logpm.oldproject.entity.OrderEntity;
import com.logpm.oldproject.feign.IAdvanceClient;
import com.logpm.oldproject.feign.IAdvanceDetailClient;
import com.logpm.oldproject.feign.IOrderClient;
import com.logpm.oldproject.feign.IWarehouseClient;
import com.logpm.oldproject.vo.DistributionParcelListEntityVO;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -69,6 +73,9 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
private final IDistributionParcelListClient distributionParcelListClient;
private final IDistributionStockArticleClient distributionStockArticleClient;
private final IBasicdataClientClient basicdataClientClient;
private final IBasicdataStoreBusinessClient basicdataStoreBusinessClient;
// @Override
// public FactoryTokenVO getToken(String corpId, String appKey, String appSecret) throws NoSuchAlgorithmException {
//
@ -302,68 +309,73 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
}
//2.根据包条信息拿到订单信息
String orderSelfNum = advanceDetailEntity.getOrderSelfNum();//订单自编码
//2.1如果订单信息出现两条,就正序排列取时间最早的一条,并在存入platform的时候打上标记
List<OrderEntity> orderEntityList = orderClient.getOrderByOrderSelfNum(orderSelfNum);
AdvanceEntity advanceEntity = advanceClient.getQueryDataOne(orderSelfNum);
Integer advanceId = advanceDetailEntity.getAdvanceId();//订单id
//2.1 因为会存在相同订单自编码的订单,所以为了区分订单只有通过id查询
AdvanceEntity advanceEntity = advanceClient.fingById(advanceId);
if(Objects.isNull(advanceEntity)){
logger.warn("#################handleDataToPlatform: 未找到对应的订单信息 orderSelfNum={}",orderSelfNum);
throw new CustomerException(405,"未找到对应的订单信息");
}
int size = orderEntityList.size();//数据数量
if(size < 1){
logger.warn("#################handleDataToPlatform: 未找到对应的订单信息 orderSelfNum={}",orderSelfNum);
logger.warn("#################handleDataToPlatform: 未找到对应的订单信息 advanceId={}",advanceId);
throw new CustomerException(405,"未找到对应的订单信息");
}
OrderEntity orderEntity = orderEntityList.get(0);
Integer warehouseId = orderEntity.getWarehouseId();//仓库id
Date date = CommonUtil.StringToDate(operationTime);
Date now = new Date();
//根据仓库id查询仓库
String warehouseName = warehouseClient.selectNameById(warehouseId);
DistributionStockArticleEntity distributionStockArticleEntity = new DistributionStockArticleEntity();
distributionStockArticleEntity.setServiceNumber(orderEntity.getServicenum());
distributionStockArticleEntity.setOrderSelfNumbering(orderEntity.getSelfnumber());
distributionStockArticleEntity.setMallName(advanceEntity.getStoreName());
distributionStockArticleEntity.setDescriptionGoods(advanceEntity.getFirstPackName());
distributionStockArticleEntity.setWarehouse(warehouseName);
distributionStockArticleEntity.setWarehouseEntryTime(date);
distributionStockArticleEntity.setStoreTime(0);//TODO
distributionStockArticleEntity.setTotalNumber(advanceEntity.getTotal());
distributionStockArticleEntity.setHandQuantity(0);//TODO
distributionStockArticleEntity.setCompleteSet(1);//TODO
distributionStockArticleEntity.setBrand(advanceEntity.getType());
distributionStockArticleEntity.setTypeService(orderEntity.getDoor());
distributionStockArticleEntity.setCustomerName(orderEntity.getContact());
distributionStockArticleEntity.setCustomerTelephone(orderEntity.getPhone());
distributionStockArticleEntity.setCustomerAddress(orderEntity.getAddress());
distributionStockArticleEntity.setGenre(1);
distributionStockArticleEntity.setState(2);
if(size > 1){
distributionStockArticleEntity.setReserve1("multiple");
Map<String, String> supplyData = advanceDetailClient.getSupplyData(unitNo);
//判断新系统是否有这条订单数据
DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleClient.findByAdvanceId(advanceId);
if(Objects.isNull(distributionStockArticleEntity)){
Date date = CommonUtil.StringToDate(operationTime);
distributionStockArticleEntity = new DistributionStockArticleEntity();
distributionStockArticleEntity.setServiceNumber(advanceEntity.getServiceNum());
distributionStockArticleEntity.setOrderSelfNumbering(advanceEntity.getOrderSelfNum());
distributionStockArticleEntity.setMallName(advanceEntity.getStoreName());
distributionStockArticleEntity.setDescriptionGoods(advanceEntity.getFirstPackName());
distributionStockArticleEntity.setWarehouse(supplyData.get("destinationWarehouse"));
distributionStockArticleEntity.setWarehouseEntryTime(date);
distributionStockArticleEntity.setTotalNumber(advanceEntity.getTotal());
distributionStockArticleEntity.setHandQuantity(0);
distributionStockArticleEntity.setCompleteSet(1);//TODO
distributionStockArticleEntity.setBrand(advanceEntity.getType());
String customerName = advanceEntity.getCustomerName();//客户名称
//通过客户名称去查询客户的服务类型
BasicdataClientEntity basicdataClientEntity = basicdataClientClient.findByName(customerName);
if(!Objects.isNull(basicdataClientEntity)){
Long clientEntityId = basicdataClientEntity.getId();//基础客户
BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(clientEntityId,3);
if(!Objects.isNull(basicdataStoreBusinessEntity)){
distributionStockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold());
}
}
distributionStockArticleEntity.setCustomerName(customerName);
distributionStockArticleEntity.setCustomerTelephone(advanceEntity.getCustomerPhone());
distributionStockArticleEntity.setCustomerAddress(advanceEntity.getCustomerRoad());
distributionStockArticleEntity.setGenre(1);
distributionStockArticleEntity.setState(2);
distributionStockArticleEntity.setAdvanceId(advanceId);
}
Long id = distributionStockArticleClient.addData(distributionStockArticleEntity);
if(id == 0){
logger.warn("#################handleDataToPlatform: 保存订单信息失败 orderSelfNum={}",orderSelfNum);
throw new CustomerException(405,"保存订单信息失败");
}
//通过订单自编号查询包件信息
List<DistributionParcelListEntityVO> detailList = advanceDetailClient.getListByOrderSelfNum(orderSelfNum);
List<DistributionParcelListEntity> parcelListEntityList = new ArrayList<>();
for (DistributionParcelListEntityVO vo:detailList){
DistributionParcelListEntity entity = new DistributionParcelListEntity();
BeanUtil.copyProperties(vo,entity);
entity.setStockArticleId(id+"");
parcelListEntityList.add(entity);
}
boolean b = distributionParcelListClient.addBatch(parcelListEntityList);
if(!b){
logger.warn("#################handleDataToPlatform: 保存包件信息失败 orderSelfNum={}",orderSelfNum);
throw new CustomerException(405,"保存包件信息失败");
}
//存入包件明细
// List<DistributionParcelListEntity> parcelListEntityList = new ArrayList<>();
// for (DistributionParcelListEntityVO vo:detailList){
// DistributionParcelListEntity entity = new DistributionParcelListEntity();
// BeanUtil.copyProperties(vo,entity);
// entity.setStockArticleId(id+"");
// parcelListEntityList.add(entity);
// }
// boolean b = distributionParcelListClient.addBatch(parcelListEntityList);
// if(!b){
// logger.warn("#################handleDataToPlatform: 保存包件信息失败 orderSelfNum={}",orderSelfNum);
// throw new CustomerException(405,"保存包件信息失败");
// }
logger.info("#################handleDataToPlatform: 数据处理完成");
}else{

52
blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OpenOrderHandler.java

@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
@ -48,34 +49,43 @@ public class OpenOrderHandler {
String msg = new String(message.getBody());
log.info("##################我进入这里了 retryCount={}",retryCount++);
OrderInfoDTO orderInfoDTO = (OrderInfoDTO) map.get("messageData");
String orderNo = orderInfoDTO.getOrderNo();//订单自编号
//通过订单自编号去查询该条订单是属于哪个工厂
AdvanceEntity advanceEntity = advanceClient.getQueryDataOne(orderNo);
if(Objects.isNull(advanceEntity)){
log.info("##################openOrderStatusHandler: 未找到对应订单 orderNo={}",orderNo);
String orderNoStr = orderInfoDTO.getOrderNo();//订单自编号
String[] split = orderNoStr.split(",");
for (String orderNo:split){
if(StringUtil.isBlank(orderNo)){
continue;
}
//通过订单自编号去查询该条订单是属于哪个工厂
AdvanceEntity advanceEntity = advanceClient.getQueryDataOne(orderNo);
if(Objects.isNull(advanceEntity)){
log.info("##################openOrderStatusHandler: 未找到对应订单 orderNo={}",orderNo);
// channel.basicAck(deliveryTag,true);
return;
}
String type = advanceEntity.getType();//品牌
return;
}
String type = advanceEntity.getType();//品牌
R r = null;
switch (type){
case FactoryConstant.PIANO:
r = panFactoryDataService.handleData(orderInfoDTO);
int code = r.getCode();
if(code == 400 || code == 200){
log.info("##################openOrderStatusHandler: 该条数据不用处理 orderNo={}",orderNo);
orderInfoDTO.setOrderNo(orderNo);
R r = null;
switch (type){
case FactoryConstant.PIANO:
r = panFactoryDataService.handleData(orderInfoDTO);
int code = r.getCode();
if(code == 400 || code == 200){
log.info("##################openOrderStatusHandler: 该条数据不用处理 orderNo={}",orderNo);
// channel.basicAck(deliveryTag,true);
}else{
throw new CustomerException(code,r.getMsg());
}
break;
}else{
throw new CustomerException(code,r.getMsg());
}
break;
// case FactoryConstant.MENGT:
// r = mtFactoryDataService.handleData(orderInfoDTO);
// break;
default:
log.info("##################openOrderStatusHandler: 未知品牌 type={}",type);
default:
log.info("##################openOrderStatusHandler: 未知品牌 type={}",type);
// channel.basicAck(deliveryTag,true);
}
}
}
}

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

@ -75,4 +75,10 @@ public class AdvanceClient implements IAdvanceClient {
return service.advanceEntityOne(orderSelfNum);
}
@Override
@GetMapping(API_PREFIX + "/fingById")
public AdvanceEntity fingById(Integer advanceId) {
return service.fingById(advanceId);
}
}

8
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.java

@ -16,12 +16,7 @@
*/
package com.logpm.oldproject.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.oldproject.entity.AdvanceEntity;
import com.logpm.oldproject.vo.AdvanceVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -49,4 +44,7 @@ public interface AdvanceMapper {
AdvanceEntity advanceEntityOne(@Param("orderSelfNum") String orderSelfNum);
AdvanceEntity fingById(@Param("advanceId") Integer advanceId);
}

7
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.xml

@ -38,5 +38,12 @@
</insert>
<select id="fingById" resultMap="advanceResultMap">
select * from ht_advance
<where>
delete_administrators_id = 0
and id = #{advanceId}
</where>
</select>
</mapper>

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

@ -38,4 +38,6 @@ public interface IAdvanceService {
Boolean addAdvanceEntity(AdvanceEntity advanceEntity);
AdvanceEntity advanceEntityOne(String orderSelfNum);
AdvanceEntity fingById(Integer advanceId);
}

7
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceServiceImpl.java

@ -20,9 +20,7 @@ import com.logpm.oldproject.dto.AdvanceDTO;
import com.logpm.oldproject.entity.AdvanceEntity;
import com.logpm.oldproject.mapper.AdvanceMapper;
import com.logpm.oldproject.service.IAdvanceService;
import io.micrometer.core.instrument.binder.BaseUnits;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.utils.BeanUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@ -61,4 +59,9 @@ public class AdvanceServiceImpl implements IAdvanceService {
public AdvanceEntity advanceEntityOne(String orderSelfNum) {
return advanceMapper.advanceEntityOne(orderSelfNum);
}
@Override
public AdvanceEntity fingById(Integer advanceId) {
return advanceMapper.fingById(advanceId);
}
}

Loading…
Cancel
Save