Browse Source

1.干线-功能提交

dev-pushdata-important
zhenghaoyu 1 year ago
parent
commit
2b6b1f32ac
  1. 10
      blade-biz-common/src/main/java/org/springblade/common/utils/CommonUtil.java
  2. 8
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataBrandClient.java
  3. 4
      blade-service-api/logpm-trunkline-api/pom.xml
  4. 75
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/ImportCustomizedOuPaiDTO.java
  5. 82
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/ImportStandardOuPaiDTO.java
  6. 52
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenLabelDTO.java
  7. 9
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java
  8. 83
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/PacakgeDetailExcelDTO.java
  9. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/WaybillDetailDTO.java
  10. 14
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java
  11. 4
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceEntity.java
  12. 6
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceVO.java
  13. 12
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillDetailClient.java
  14. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataBrandClient.java
  15. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataBrandMapper.java
  16. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataBrandMapper.xml
  17. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataBrandService.java
  18. 10
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataBrandServiceImpl.java
  19. 23
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
  20. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java
  21. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  22. 4
      blade-service/logpm-trunkline/pom.xml
  23. 17
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/AdvanceDetailController.java
  24. 302
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java
  25. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java
  26. 19
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml
  27. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.java
  28. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml
  29. 20
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java
  30. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java
  31. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceService.java
  32. 1137
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  33. 111
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java
  34. 23
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  35. 20
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillDetailClient.java
  36. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWayBillDetailService.java
  37. 10
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWayBillDetailServiceImpl.java

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

@ -248,4 +248,14 @@ public class CommonUtil {
}
}
public static String getHaxCodeByLong(String str,int changdu){
int hashValue = str.hashCode(); // 获取哈希值(32位)
// 将32位哈希值转换为6位长度的纯数字形式
String s = Math.abs(hashValue) + "";
String substring = s.substring(0, changdu);
return substring;
}
}

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

@ -16,6 +16,7 @@
*/
package com.logpm.basicdata.feign;
import com.alibaba.fastjson.JSONObject;
import com.logpm.basicdata.entity.BasicdataBrandEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage;
@ -23,6 +24,8 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* 基础品牌表 Feign接口类
*
@ -34,7 +37,7 @@ import org.springframework.web.bind.annotation.RequestParam;
)
public interface IBasicdataBrandClient {
String API_PREFIX = "/client";
String API_PREFIX = "/brand/client";
String TOP = API_PREFIX + "/top1";
/**
@ -47,4 +50,7 @@ public interface IBasicdataBrandClient {
@GetMapping(TOP)
BladePage<BasicdataBrandEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
@GetMapping(API_PREFIX+"/findAllList")
List<JSONObject> findAllList();
}

4
blade-service-api/logpm-trunkline-api/pom.xml

@ -10,6 +10,10 @@
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-excel</artifactId>
</dependency>
</dependencies>
<parent>

75
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/ImportCustomizedOuPaiDTO.java

@ -0,0 +1,75 @@
package com.logpm.trunkline.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class ImportCustomizedOuPaiDTO implements Serializable {
@ExcelProperty(value = "基地")
private String siteName;
@ExcelProperty(value = "商场编码")
private String dealerCode;
@ExcelProperty(value = "商场名称")
private String dealerName;
@ExcelProperty(value = "是否干仓配商场")
private String isOupai;
@ExcelProperty(value = "省份")
private String province;
@ExcelProperty(value = "品类")
private String firstsName;
@ExcelProperty(value = "二级品类代码")
private String sencodsCode;
@ExcelProperty(value = "二级品类")
private String sencodsName;
@ExcelProperty(value = "三级品类代码")
private String thirdsCode;
@ExcelProperty(value = "三级品类")
private String thirdsName;
@ExcelProperty(value = "数量")
private String num;
@ExcelProperty(value = "订单自编号")
private String orderCode;
@ExcelProperty(value = "服务号")
private String serviceNum;
@ExcelProperty(value = "工厂交割")
private String dueDateStr;
@ExcelProperty(value = "例放补进")
private String supple;
@ExcelProperty(value = "包条码")
private String orderPackageCode;
@ExcelProperty(value = "货运清单号")
private String manifest;
@ExcelProperty(value = "货运回执号")
private String returnNum;
@ExcelProperty(value = "车次号")
private String trainNumber;
@ExcelProperty(value = "订单号")
private String order;
@ExcelProperty(value = "承运商")
private String carrierName;
@ExcelProperty(value = "发货类型")
private String orderType;
@ExcelProperty(value = "收货日期")
private String imcomingDateStr;
@ExcelProperty(value = "调度日期")
private String dispatchDateStr;
@ExcelProperty(value = "发货日期")
private String sendDateStr;
@ExcelProperty(value = "车牌")
private String carNumber;
@ExcelProperty(value = "货主")
private String goodsMan;
@ExcelProperty(value = "客户名称")
private String customerName;
@ExcelProperty(value = "客户电话")
private String customerPhone;
@ExcelProperty(value = "客户地址")
private String customerAddress;
}

82
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/ImportStandardOuPaiDTO.java

@ -0,0 +1,82 @@
package com.logpm.trunkline.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class ImportStandardOuPaiDTO implements Serializable {
@ExcelProperty(value = "订单自编号")
private String orderCode;
@ExcelProperty(value = "一级品类名称")
private String firstsName;
@ExcelProperty(value = "二级品类名称")
private String sencodsName;
@ExcelProperty(value = "三级品类名称")
private String thirdsName;
@ExcelProperty(value = "物料名称")
private String materialName;
@ExcelProperty(value = "物料编码")
private String materialCode;
@ExcelProperty(value = "物料件数")
private String num;
@ExcelProperty(value = "车次号")
private String trainNumber;
@ExcelProperty(value = "发货时间")
private String sendDateStr;
@ExcelProperty(value = "仓库")
private String sendFactory;
@ExcelProperty(value = "货运回执号")
private String returnNum;
@ExcelProperty(value = "包条码")
private String orderPackageCode;
@ExcelProperty(value = "包体积")
private String volume;
@ExcelProperty(value = "车牌")
private String carNumber;
@ExcelProperty(value = "基地")
private String siteName;
@ExcelProperty(value = "承运商名称")
private String carrierName;
@ExcelProperty(value = "省份")
private String province;
@ExcelProperty(value = "商场编码")
private String dealerCode;
@ExcelProperty(value = "商场名称")
private String dealerName;
@ExcelProperty(value = "是否干仓配")
private String isOupai;
@ExcelProperty(value = "订单号")
private String order;
@ExcelProperty(value = "客户名称")
private String customerName;
@ExcelProperty(value = "客户电话")
private String customerPhone;
@ExcelProperty(value = "客户地址")
private String customerAddress;
@ExcelProperty(value = "工厂交期")
private String dueDateStr;
}

52
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenLabelDTO.java

@ -0,0 +1,52 @@
package com.logpm.trunkline.dto;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
public class OpenLabelDTO implements Serializable {
private Long warehouseId;
private String warehouseName;
private String siteName;
private String area;
private String orderCode;
private String serviceNum;
private Integer totalNumber = 0;
private String firsts;
private String sencods;
private String thirds;
private Long brandId;
private String brand;
private BigDecimal volume;
private String dealerCode;
private String dealerName;
private String senderName;
private String senderPhone;
private String senderAddress;
private String customerName;
private String customerPhone;
private String customerAddress;
private MultipartFile file;
}

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

@ -10,6 +10,8 @@ import java.util.List;
@Data
public class OpenOrderDTO implements Serializable {
private Long waybillId;
private String brand;//品牌
private String customerTrain;//客户车次号
private String waybillNo;//运单号
@ -38,6 +40,9 @@ public class OpenOrderDTO implements Serializable {
private List<WaybillDetailDTO> waybillDetailList = new ArrayList<>();
private List<WaybillDetailDTO> addList = new ArrayList<>();
private List<WaybillDetailDTO> removeList = new ArrayList<>();
private Integer totalCount;
private BigDecimal totalWeghit;
private BigDecimal totalVolume;
@ -81,4 +86,8 @@ public class OpenOrderDTO implements Serializable {
private BigDecimal rebate;//回扣
private BigDecimal replacePrice;//代收货款
private Integer enterFlag;
}

83
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/PacakgeDetailExcelDTO.java

@ -0,0 +1,83 @@
package com.logpm.trunkline.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class PacakgeDetailExcelDTO implements Serializable {
@ExcelProperty(value = "服务号")
private String serviceNum;
@ExcelProperty(value = "订单自编号")
private String orderCode;
@ExcelProperty(value = "包条码")
private String orderPackageCode;
@ExcelProperty(value = "物料编码")
private String materialCode;
@ExcelProperty(value = "物料名称")
private String materialName;
@ExcelProperty(value = "体积")
private String volume;
@ExcelProperty(value = "重量")
private String weight;
@ExcelProperty(value = "车次号")
private String trainNumber;
@ExcelProperty(value = "商场名称")
private String dealerName;
@ExcelProperty(value = "商场编码")
private String dealerCode;
@ExcelProperty(value = "商场收货人")
private String consigneePerson;
@ExcelProperty(value = "商场收货人电话")
private String consigneeMobile;
@ExcelProperty(value = "商场收货地址")
private String consigneeAddress;
@ExcelProperty(value = "发货人")
private String senderName;
@ExcelProperty(value = "发货人电话")
private String senderPhone;
@ExcelProperty(value = "发货人地址")
private String senderAddress;
@ExcelProperty(value = "收货人")
private String customerName;
@ExcelProperty(value = "联系电话")
private String customerTelephone;
@ExcelProperty(value = "地址")
private String customerAddress;
@ExcelProperty(value = "品牌")
private String brand;
@ExcelProperty(value = "一级品类")
private String firsts;
@ExcelProperty(value = "二级品类")
private String sencods;
@ExcelProperty(value = "三级品类")
private String thirds;
@ExcelProperty(value = "配送区域")
private String area;
}

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

@ -8,6 +8,9 @@ import java.math.BigDecimal;
@Data
public class WaybillDetailDTO implements Serializable {
private Long waybillDetailId;
private Integer updateType;
private Integer chargeType;//计价方式 1件 2方 3公斤
private Long goodsId;//品类id

14
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java

@ -109,6 +109,16 @@ public class TrunklineAdvanceDetailEntity extends TenantEntity {
/** 计价方式 1件 2方 3公斤 */
@ApiModelProperty(name = "计价方式 1件 2方 3公斤",notes = "")
private Integer chargeType ;
@ApiModelProperty(name = "例放补进",notes = "")
private String supple;
@ApiModelProperty(name = "货运清单号")
private String manifest;
@ApiModelProperty(name = "货运回执号")
private String returnNum;
@ApiModelProperty(name = "发货日期")
private String sendDateStr;
@ApiModelProperty(name = "车牌")
private String carNumber;
@ApiModelProperty(name = "货主")
private String goodsMan;
}

4
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceEntity.java

@ -121,4 +121,8 @@ public class TrunklineAdvanceEntity extends TenantEntity {
@ApiModelProperty(name = "交期",notes = "")
private Date deliveryDate ;
/** 发货工厂 */
@ApiModelProperty(name = "发货工厂",notes = "")
private String senderFactory ;
}

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

@ -1,11 +1,17 @@
package com.logpm.trunkline.vo;
import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity;
import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class TrunklineAdvanceVO extends TrunklineAdvanceEntity {
private String htMallName;
private List<TrunklineAdvanceDetailEntity> detailList = new ArrayList<>();
}

12
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillDetailClient.java

@ -53,4 +53,16 @@ public interface IWarehouseWaybillDetailClient {
@GetMapping(API_PREFIX+"/findListByWaybillNo")
List<WarehouseWayBillDetail> findListByWaybillNo(@RequestParam String waybillNo);
@GetMapping(API_PREFIX+"/findEntityByWaybillDetailId")
WarehouseWayBillDetail findEntityByWaybillDetailId(@RequestParam Long waybillDetailId);
@GetMapping(API_PREFIX+"/deleteByWaybillDetailId")
void deleteByWaybillDetailId(@RequestParam Long waybillDetailId);
@PostMapping(API_PREFIX+"/updateEntityById")
void updateEntityById(@RequestBody WarehouseWayBillDetail warehouseWayBillDetail);
@PostMapping(API_PREFIX+"/addEntity")
void addEntity(@RequestBody WarehouseWayBillDetail warehouseWayBillDetail);
}

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

@ -16,6 +16,7 @@
*/
package com.logpm.basicdata.feign;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataBrandEntity;
import com.logpm.basicdata.service.IBasicdataBrandService;
@ -27,6 +28,8 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
/**
* 基础品牌表 Feign实现类
*
@ -50,4 +53,9 @@ public class BasicdataBrandClient implements IBasicdataBrandClient {
return BladePage.of(page);
}
@Override
public List<JSONObject> findAllList() {
return basicdataBrandService.findAllList();
}
}

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataBrandMapper.java

@ -16,6 +16,7 @@
*/
package com.logpm.basicdata.mapper;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -52,4 +53,6 @@ public interface BasicdataBrandMapper extends BaseMapper<BasicdataBrandEntity> {
*/
List<BasicdataBrandExcel> exportBasicdataBrand(@Param("ew") Wrapper<BasicdataBrandEntity> queryWrapper);
List<JSONObject> findAllList();
}

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataBrandMapper.xml

@ -16,4 +16,9 @@
SELECT * FROM logpm_basicdata_brand ${ew.customSqlSegment}
</select>
<select id="findAllList" resultType="com.alibaba.fastjson.JSONObject">
select brand_name brandName
from logpm_basicdata_brand
</select>
</mapper>

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataBrandService.java

@ -16,6 +16,7 @@
*/
package com.logpm.basicdata.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataBrandEntity;
@ -50,4 +51,6 @@ public interface IBasicdataBrandService extends BaseService<BasicdataBrandEntity
*/
List<BasicdataBrandExcel> exportBasicdataBrand(Wrapper<BasicdataBrandEntity> queryWrapper);
List<JSONObject> findAllList();
}

10
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataBrandServiceImpl.java

@ -16,6 +16,7 @@
*/
package com.logpm.basicdata.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataBrandEntity;
@ -52,4 +53,13 @@ public class BasicdataBrandServiceImpl extends BaseServiceImpl<BasicdataBrandMap
return basicdataBrandList;
}
@Override
public List<JSONObject> findAllList() {
List<JSONObject> allList = baseMapper.findAllList();
JSONObject jsonObject = new JSONObject();
jsonObject.put("brandName","零担");
allList.add(0,jsonObject);
return allList;
}
}

23
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java

@ -355,21 +355,28 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
}
//包条 HT+仓库拼音/超管/职能+年月日时分秒+订单索引+包条个数索引
String haxCodeByLong = CommonUtil.getHaxCodeByLong(orderCode, 8);
//获得年月日短字符串
Date date = new Date();
String s = CommonUtil.dateToStringShort(date);
String dateShort = CommonUtil.dateToString(date);
String dateShort = CommonUtil.dateToStringShort(date);
//redis的key
String key = warehouseCode + ":" + orderCode+":"+s;
String key = warehouseCode + ":" + haxCodeByLong+":"+dateShort;
//获得序号
Long incr = bladeRedis.incr(key);
if(1 == incr){
//如果为1就是刚刚才建立,给他一个过期时间
bladeRedis.expireAt(key,CommonUtil.getDayEnd());
Boolean exists = bladeRedis.exists(key);
Long incr = null;
if(exists){
incr = bladeRedis.incr(key);
}else{
String value = dateShort+"00001";
incr = Long.parseLong(value);
bladeRedis.set(key,incr);
bladeRedis.expireAt(key,CommonUtil.getMonthDayEnd());
}
return "HT" + warehouseCode + dateShort + CommonUtil.geFourNumber(incr,5);
return "HT" + warehouseCode + dateShort + haxCodeByLong + incr;
}
}

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

@ -203,4 +203,5 @@ public interface IDistributionStockArticleService extends BaseService<Distributi
* @param warehouseId
*/
void maintenanceOrderInfo(String orderCodes, Long warehouseId);
}

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

@ -71,7 +71,6 @@ import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.DictBiz;
import org.springblade.system.entity.User;
import org.springblade.system.feign.IDictBizClient;
import org.springblade.system.feign.IUserClient;
import org.springframework.stereotype.Service;
@ -1576,9 +1575,6 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
}
@Override
public DistributionStockArticleEntity findZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) {
QueryWrapper<DistributionStockArticleEntity> queryWrapper = new QueryWrapper<>();

4
blade-service/logpm-trunkline/pom.xml

@ -24,10 +24,6 @@
<groupId>org.springblade</groupId>
<artifactId>blade-starter-swagger</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-excel</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-auto</artifactId>

17
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/AdvanceDetailController.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.vo.OrderPackgeCodeDataVO;
import com.logpm.trunkline.dto.AdvanceDetailDTO;
import com.logpm.trunkline.service.ITrunklineAdvanceDetailService;
import com.logpm.trunkline.vo.TrunklineAdvanceDetailVO;
@ -14,7 +15,9 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.Objects;
@Slf4j
@ -56,5 +59,19 @@ public class AdvanceDetailController {
}
@GetMapping("/showAdvancePackgeCode")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "返回模板和模板内容")
public R showAdvancePackgeCode(@ApiIgnore @RequestParam Map<String,Object> params){
OrderPackgeCodeDataVO orderPackgeCodeDataVo= null;
try {
orderPackgeCodeDataVo = advanceDetailService.showAdvancePackgeCode(params);
} catch (Exception e) {
return R.fail(e.getMessage());
}
return R.data(orderPackgeCodeDataVo);
}
}

302
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java

@ -5,6 +5,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.trunkline.dto.AdvanceDTO;
import com.logpm.trunkline.dto.OpenLabelDTO;
import com.logpm.trunkline.dto.OpenOrderDTO;
import com.logpm.trunkline.dto.WaybillDetailDTO;
import com.logpm.trunkline.service.IOpenOrderService;
@ -18,6 +19,7 @@ import org.springblade.common.exception.CustomerException;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.math.BigDecimal;
import java.util.List;
@ -752,4 +754,304 @@ public class OpenOrderController {
}
}
//--------------暂存单 导入功能
@ResponseBody
@PostMapping("/openLabel")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "开标签", notes = "传入openOrderDTO")
public R openLabel(@RequestBody OpenLabelDTO openLabelDTO) {
String method = "############openLabel: ";
log.info(method + "请求参数{}", openLabelDTO);
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
openLabelDTO.setWarehouseId(myCurrentWarehouse.getId());
openLabelDTO.setWarehouseName(myCurrentWarehouse.getName());
//验证开单参数是否正确
openLabelParamVerify(openLabelDTO);
return openOrderService.openLabel(openLabelDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
private void openLabelParamVerify(OpenLabelDTO openLabelDTO) {
String method = "#############openLabelParamVerify: ";
log.info(method+"验证开标签数据");
String orderCode = openLabelDTO.getOrderCode();
if(StringUtil.isBlank(orderCode)){
log.warn(method+"订单号为空 orderCode={}",orderCode);
throw new CustomerException(405,"订单号为空");
}
Integer totalNumber = openLabelDTO.getTotalNumber();
if(totalNumber == 0){
log.warn(method+"总数量不正确 totalNumber={}",totalNumber);
throw new CustomerException(405,"总数量不正确");
}
String firsts = openLabelDTO.getFirsts();
if(StringUtil.isBlank(firsts)){
log.warn(method+"一级品类为空 firsts={}",firsts);
throw new CustomerException(405,"一级品类为空");
}
String brand = openLabelDTO.getBrand();
if(StringUtil.isBlank(brand)){
log.warn(method+"品牌为空 brand={}",brand);
throw new CustomerException(405,"品牌为空");
}
String dealerName = openLabelDTO.getDealerName();
if(StringUtil.isBlank(dealerName)){
log.warn(method+"商场为空 dealerName={}",dealerName);
throw new CustomerException(405,"商场为空");
}
String customerName = openLabelDTO.getCustomerName();
if(StringUtil.isBlank(customerName)){
log.warn(method+"收货人为空 customerName={}",customerName);
throw new CustomerException(405,"收货人为空");
}
String customerPhone = openLabelDTO.getCustomerPhone();
if(StringUtil.isBlank(customerPhone)){
log.warn(method+"收货人电话为空 customerPhone={}",customerPhone);
throw new CustomerException(405,"收货人电话为空");
}
String customerAddress = openLabelDTO.getCustomerAddress();
if(StringUtil.isBlank(customerAddress)){
log.warn(method+"收货人地址为空 customerAddress={}",customerAddress);
throw new CustomerException(405,"收货人地址为空");
}
}
@ResponseBody
@PostMapping("/openLabelHasPacakage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "开标签有数据", notes = "传入openOrderDTO")
public R openLabelHasPacakage(@RequestParam(value = "file") MultipartFile file) {
String method = "############openLabelHasPacakage: ";
log.info(method + "请求参数{}", file);
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
return openOrderService.openLabelHasPacakage(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/importCustomizedOuPai")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "导入欧派订制品", notes = "传入openOrderDTO")
public R importCustomizedOuPai(@RequestParam(value = "file") MultipartFile file) {
String method = "############importCustomizedOuPai: ";
log.info(method + "请求参数{}", file);
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
return openOrderService.importCustomizedOuPai(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/importStandardOuPai")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "导入欧派标准品", notes = "传入openOrderDTO")
public R importStandardOuPai(@RequestParam(value = "file") MultipartFile file) {
String method = "############importStandardOuPai: ";
log.info(method + "请求参数{}", file);
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
return openOrderService.importStandardOuPai(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/findWaybillDetail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询运单详情", notes = "传入openOrderDTO")
public R findWaybillDetail(@RequestBody OpenOrderDTO openOrderDTO) {
String method = "############findWaybillDetail: ";
log.info(method + "请求参数{}", openOrderDTO);
Long waybillId = openOrderDTO.getWaybillId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
openOrderDTO.setWarehouseName(myCurrentWarehouse.getName());
if (Objects.isNull(waybillId)){
log.warn(method+"运单号id为空 waybillId={}",waybillId);
return R.fail(403,"运单号id为空");
}
return openOrderService.findWaybillDetail(openOrderDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/updateWaybillVerify")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "改单验证", notes = "传入openOrderDTO")
public R updateWaybillVerify(@RequestBody OpenOrderDTO openOrderDTO) {
String method = "############updateWaybillVerify: ";
log.info(method + "请求参数{}", openOrderDTO);
Long waybillId = openOrderDTO.getWaybillId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
openOrderDTO.setWarehouseName(myCurrentWarehouse.getName());
if (Objects.isNull(waybillId)){
log.warn(method+"运单号id为空 waybillId={}",waybillId);
return R.fail(403,"运单号id为空");
}
return openOrderService.updateWaybillVerify(openOrderDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/updateWaybill")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "改单", notes = "传入openOrderDTO")
public R updateWaybill(@RequestBody OpenOrderDTO openOrderDTO) {
String method = "############updateWaybill: ";
log.info(method + "请求参数{}", openOrderDTO);
Long waybillId = openOrderDTO.getWaybillId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
openOrderDTO.setWarehouseName(myCurrentWarehouse.getName());
if (Objects.isNull(waybillId)){
log.warn(method+"运单号id为空 waybillId={}",waybillId);
return R.fail(403,"运单号id为空");
}
return openOrderService.updateWaybill(openOrderDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/findBrandList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询品牌列表", notes = "传入openOrderDTO")
public R findBrandList(@RequestBody OpenOrderDTO openOrderDTO) {
String method = "############findBrandList: ";
log.info(method + "请求参数{}", openOrderDTO);
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
openOrderDTO.setWarehouseName(myCurrentWarehouse.getName());
return openOrderService.findBrandList(openOrderDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
}

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java

@ -29,4 +29,10 @@ public interface TrunklineAdvanceDetailMapper extends BaseMapper<TrunklineAdvanc
IPage<TrunklineAdvanceDetailVO> advanceDetailPageList(IPage<Object> page, @Param("param") AdvanceDetailDTO advanceDetailDTO);
Integer getIncomingNum(@Param("advanceId") Long advanceId);
Integer getNumByAdvanceId(@Param("advanceId") Long advanceId);
TrunklineAdvanceDetailEntity findEntityByOrderPackageCodelimit1(@Param("orderPackageCode") String orderPackageCode);
List<String> findOrderPackageCodesByAdvanceId(@Param("advanceId") Long advanceId);
}

19
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml

@ -125,4 +125,23 @@
and ltad.package_status = 1
</select>
<select id="getNumByAdvanceId" resultType="int">
select count(id)
from logpm_trunkline_advance_detail
where advance_id = #{advanceId}
</select>
<select id="findEntityByOrderPackageCodelimit1" resultType="com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity">
select *
from logpm_trunkline_advance_detail
where order_package_code = #{orderPackageCode}
limit 1
</select>
<select id="findOrderPackageCodesByAdvanceId" resultType="String">
select order_package_code
from logpm_trunkline_advance_detail
where advance_id = #{advanceId}
</select>
</mapper>

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.java

@ -24,4 +24,6 @@ public interface TrunklineAdvanceMapper extends BaseMapper<TrunklineAdvanceEntit
OpenOrderVO selectInfoByIds(@Param("list") List<Long> advanceIds);
List<CustomerInfoVO> findCustomerInfoList(@Param("advanceIds") List<Long> advanceIds);
void updateTotalNumById(@Param("id") Long id, @Param("totalNum") int totalNum);
}

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml

@ -58,4 +58,10 @@
</foreach>
</select>
<update id="updateTotalNumById">
update logpm_trunkline_advance
set total_num = #{totalNum}
where id = #{id}
</update>
</mapper>

20
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java

@ -2,11 +2,14 @@ package com.logpm.trunkline.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.AdvanceDTO;
import com.logpm.trunkline.dto.OpenLabelDTO;
import com.logpm.trunkline.dto.OpenOrderDTO;
import com.logpm.trunkline.vo.TrunklineAdvanceDetailVO;
import com.logpm.trunkline.vo.TrunklineAdvanceVO;
import org.springblade.core.tool.api.R;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.List;
public interface IOpenOrderService {
@ -38,5 +41,22 @@ public interface IOpenOrderService {
R findWarehouseList(String warehouseName);
R openLabel(OpenLabelDTO openLabelDTO);
R openLabelHasPacakage(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R importCustomizedOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R importStandardOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R findWaybillDetail(OpenOrderDTO openOrderDTO);
R updateWaybill(OpenOrderDTO openOrderDTO);
R updateWaybillVerify(OpenOrderDTO openOrderDTO);
R findBrandList(OpenOrderDTO openOrderDTO);
// R findWaybillInfo(String waybillNo);
}

12
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java

@ -1,6 +1,7 @@
package com.logpm.trunkline.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.vo.OrderPackgeCodeDataVO;
import com.logpm.trunkline.dto.AdvanceDetailDTO;
import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity;
import com.logpm.trunkline.vo.AdvanceDetailGoodsVO;
@ -10,6 +11,7 @@ import com.logpm.trunkline.vo.TrunklineAdvanceDetailVO;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
import java.util.Map;
public interface ITrunklineAdvanceDetailService extends BaseService<TrunklineAdvanceDetailEntity> {
@ -30,4 +32,14 @@ public interface ITrunklineAdvanceDetailService extends BaseService<TrunklineAdv
TrunklineAdvanceDetailEntity findEntityByOrderPackageCode(String orderPackageCode);
Integer getIncomingNum(Long advanceId);
TrunklineAdvanceDetailEntity findEntityByOrderPackageCodeAndTrainNumberAndServiceNumAndOrderCode(String orderPackageCode, String trainNumber, String serviceNum, String orderCode);
Integer getNumByAdvanceId(Long advanceId);
OrderPackgeCodeDataVO showAdvancePackgeCode(Map<String, Object> params) throws Exception;
List<TrunklineAdvanceDetailEntity> findListByAdvanceId(Long advanceId);
List<String> findOrderPackageCodesByAdvanceId(Long advanceId);
}

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceService.java

@ -22,4 +22,10 @@ public interface ITrunklineAdvanceService extends BaseService<TrunklineAdvanceEn
OpenOrderVO selectInfoByIds(List<Long> advanceIds);
List<CustomerInfoVO> findCustomerInfoList(List<Long> advanceIds);
TrunklineAdvanceEntity findEntityByOrderCodeAndServiceNumAndTrainNumber(String orderCode, String trainNumber, String serviceNum);
TrunklineAdvanceEntity findEntityByOrderCodeAndTrainNumber(String orderCode, String trainNumber);
void updateTotalNumById(Long id, int totalNum);
}

1137
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

File diff suppressed because it is too large Load Diff

111
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java

@ -1,24 +1,48 @@
package com.logpm.trunkline.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.basic.entity.BasicPrintTemplateEntity;
import com.logpm.basic.feign.IBasicPrintTemplateClient;
import com.logpm.distribution.vo.DistributionStockArticleQRCodeVO;
import com.logpm.distribution.vo.OrderPackgeCodeDataVO;
import com.logpm.trunkline.dto.AdvanceDetailDTO;
import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity;
import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import com.logpm.trunkline.mapper.TrunklineAdvanceDetailMapper;
import com.logpm.trunkline.mapper.TrunklineAdvanceMapper;
import com.logpm.trunkline.service.ITrunklineAdvanceDetailService;
import com.logpm.trunkline.vo.*;
import com.logpm.trunkline.vo.AdvanceDetailGoodsVO;
import com.logpm.trunkline.vo.AdvanceDetailStockNumVO;
import com.logpm.trunkline.vo.BillladingPackageVO;
import com.logpm.trunkline.vo.TrunklineAdvanceDetailVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.utils.QRCodeUtil;
import org.springblade.common.utils.TemplateUtil;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Slf4j
@Service
@AllArgsConstructor
public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<TrunklineAdvanceDetailMapper, TrunklineAdvanceDetailEntity> implements ITrunklineAdvanceDetailService {
private final IBasicPrintTemplateClient basicPrintTemplateClient;
private final TrunklineAdvanceMapper advanceMapper;
@Override
public void updatePackageStatusById(String packageStatus, Long advanceDetailId) {
baseMapper.updatePackageStatusById(packageStatus,advanceDetailId);
@ -76,4 +100,89 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline
public Integer getIncomingNum(Long advanceId) {
return baseMapper.getIncomingNum(advanceId);
}
@Override
public TrunklineAdvanceDetailEntity findEntityByOrderPackageCodeAndTrainNumberAndServiceNumAndOrderCode(String orderPackageCode, String trainNumber, String serviceNum, String orderCode) {
QueryWrapper<TrunklineAdvanceDetailEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("order_package_code",orderPackageCode)
.eq("order_code",orderCode)
.eq("train_number",trainNumber)
.eq("service_num",serviceNum);
return baseMapper.selectOne(queryWrapper);
}
@Override
public Integer getNumByAdvanceId(Long advanceId) {
return baseMapper.getNumByAdvanceId(advanceId);
}
@Override
public OrderPackgeCodeDataVO showAdvancePackgeCode(Map<String, Object> params) throws Exception {
OrderPackgeCodeDataVO orderPackgeCodeDataVO = new OrderPackgeCodeDataVO();
List<Map> data = new ArrayList<>();
BasicPrintTemplateEntity template = basicPrintTemplateClient.getPrintTemplate(PrintTemplateStatusConstant.daiqueren_10.getValue());
if (ObjectUtil.isEmpty(template)) {
throw new ServiceException("模板内容未找到");
}
String html = TemplateUtil.getTemplateByUrl(template.getTemplateUrl());
orderPackgeCodeDataVO.setTemplateHtml(html);
orderPackgeCodeDataVO.setTemplateId(template.getId());
String orderPackageCodes = (String) params.get("orderPackageCodes");
String[] idArray = orderPackageCodes.split(",");
if(ObjectUtils.isNull(idArray)){
throw new ServiceException("参数错误");
}
for (String orderPackageCode : idArray) {
DistributionStockArticleQRCodeVO vo = new DistributionStockArticleQRCodeVO();
TrunklineAdvanceDetailEntity advanceDetailEntity = baseMapper.findEntityByOrderPackageCodelimit1(orderPackageCode);
Long advanceId = advanceDetailEntity.getAdvanceId();
TrunklineAdvanceEntity advanceEntity = advanceMapper.selectById(advanceId);
if(ObjectUtil.isEmpty(advanceEntity.getSenderName()) || ("/").equals(advanceEntity.getSenderName())){
vo.setShipperName("无");
}
if(ObjectUtil.isEmpty(advanceEntity.getSenderAddress())){
vo.setShipperAddress(" ");
}
vo.setOrderCode(advanceDetailEntity.getOrderCode());
vo.setMallName(advanceEntity.getDealerName());
vo.setCustomerName(advanceEntity.getCustomerName());
vo.setCustomerTelephone(advanceEntity.getCustomerPhone());
vo.setMaterialName(advanceDetailEntity.getMaterialName());
vo.setCategory(advanceDetailEntity.getFirstPackName());
vo.setWaybillNumber(StringUtil.isBlank(advanceDetailEntity.getWaybillNo())?"":advanceDetailEntity.getWaybillNo());
vo.setObjective(advanceEntity.getWarehouseName());
vo.setDealerCode(advanceEntity.getDealerCode());
vo.setQrCode(orderPackageCode);
vo.setDealerName(advanceEntity.getDealerName());
vo.setTotalNumber(advanceEntity.getTotalNum()+"");
Map<String, Object> map = JSONObject.parseObject(JSONObject.toJSONString(vo), Map.class);
map.put("id",advanceDetailEntity.getId());
String filename = QRCodeUtil.createCodeToFile(vo.getQrCode());
map.put("img", QRCodeUtil.getEmpAutograph(filename));
// 订单号 生成二维码
String fileTypeName = QRCodeUtil.createCodeToFile(vo.getOrderCode());
map.put("imgType", QRCodeUtil.getEmpAutograph(fileTypeName));
data.add(map);
}
orderPackgeCodeDataVO.setDataList(data);
return orderPackgeCodeDataVO;
}
@Override
public List<TrunklineAdvanceDetailEntity> findListByAdvanceId(Long advanceId) {
QueryWrapper<TrunklineAdvanceDetailEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("advance_id",advanceId);
return baseMapper.selectList(queryWrapper);
}
@Override
public List<String> findOrderPackageCodesByAdvanceId(Long advanceId) {
return baseMapper.findOrderPackageCodesByAdvanceId(advanceId);
}
}

23
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.trunkline.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basic.entity.BasicMaterialEntity;
import com.logpm.basic.feign.IBasicMaterialClient;
@ -297,4 +298,26 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
return baseMapper.findCustomerInfoList(advanceIds);
}
@Override
public TrunklineAdvanceEntity findEntityByOrderCodeAndServiceNumAndTrainNumber(String orderCode, String trainNumber, String serviceNum) {
QueryWrapper<TrunklineAdvanceEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("order_code",orderCode)
.eq("train_number",trainNumber)
.eq("service_num",serviceNum);
return baseMapper.selectOne(queryWrapper);
}
@Override
public TrunklineAdvanceEntity findEntityByOrderCodeAndTrainNumber(String orderCode, String trainNumber) {
QueryWrapper<TrunklineAdvanceEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("order_code",orderCode)
.eq("train_number",trainNumber);
return baseMapper.selectOne(queryWrapper);
}
@Override
public void updateTotalNumById(Long id, int totalNum) {
baseMapper.updateTotalNumById(id,totalNum);
}
}

20
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillDetailClient.java

@ -29,4 +29,24 @@ public class WarehouseWaybillDetailClient implements IWarehouseWaybillDetailClie
public List<WarehouseWayBillDetail> findListByWaybillNo(String waybillNo) {
return warehouseWayBillDetailService.findListByWaybillNo(waybillNo);
}
@Override
public WarehouseWayBillDetail findEntityByWaybillDetailId(Long waybillDetailId) {
return warehouseWayBillDetailService.findEntityByWaybillDetailId(waybillDetailId);
}
@Override
public void deleteByWaybillDetailId(Long waybillDetailId) {
warehouseWayBillDetailService.deleteByWaybillDetailId(waybillDetailId);
}
@Override
public void updateEntityById(WarehouseWayBillDetail warehouseWayBillDetail) {
warehouseWayBillDetailService.update(warehouseWayBillDetail);
}
@Override
public void addEntity(WarehouseWayBillDetail warehouseWayBillDetail) {
warehouseWayBillDetailService.save(warehouseWayBillDetail);
}
}

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWayBillDetailService.java

@ -18,4 +18,9 @@ public interface IWarehouseWayBillDetailService {
void addList(List<WarehouseWayBillDetail> ls);
List<WarehouseWayBillDetail> findListByWaybillNo(String waybillNo);
WarehouseWayBillDetail findEntityByWaybillDetailId(Long waybillDetailId);
void deleteByWaybillDetailId(Long waybillDetailId);
}

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

@ -59,4 +59,14 @@ public class WarehouseWayBillDetailServiceImpl implements IWarehouseWayBillDetai
queryWrapper.eq("waybill_no",waybillNo);
return warehouseWayBillDetailMapper.selectList(queryWrapper);
}
@Override
public WarehouseWayBillDetail findEntityByWaybillDetailId(Long waybillDetailId) {
return warehouseWayBillDetailMapper.selectById(waybillDetailId);
}
@Override
public void deleteByWaybillDetailId(Long waybillDetailId) {
warehouseWayBillDetailMapper.deleteById(waybillDetailId);
}
}

Loading…
Cancel
Save