dev #28

Merged
zhaoqiaobo merged 6 commits from dev into pre-production 12 months ago
  1. 21
      blade-biz-common/src/main/java/org/springblade/common/enums/BooleanEnums.java
  2. 21
      blade-biz-common/src/main/java/org/springblade/common/enums/BooleanZeroOneEnums.java
  3. 15
      blade-biz-common/src/main/java/org/springblade/common/model/DictBean.java
  4. 170
      blade-biz-common/src/main/java/org/springblade/common/model/IDict.java
  5. 60
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceCategoryBasicEntity.java
  6. 72
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceCategoryDispatchEntity.java
  7. 74
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceCategoryWarehouseEntity.java
  8. 70
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceEntity.java
  9. 59
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceFullVehicleEntity.java
  10. 57
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceGeneralEntity.java
  11. 67
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceRouteEntity.java
  12. 151
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceTemplateEntity.java
  13. 45
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataPriceClient.java
  14. 49
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceBasicUpdateVO.java
  15. 63
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceCategoryVO.java
  16. 43
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceFullVehicleVO.java
  17. 34
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceGeneralVO.java
  18. 58
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPricePageVO.java
  19. 44
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceRouteVO.java
  20. 77
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceTemplateVO.java
  21. 33
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceVO.java
  22. 43
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceBasicVO.java
  23. 20
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceCategoryVO.java
  24. 49
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceDispatchAdditionalVO.java
  25. 45
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceDispatchBasicVO.java
  26. 64
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceDispatchVO.java
  27. 35
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PricePickupVO.java
  28. 60
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceRouteVO.java
  29. 37
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceTrunkLineVO.java
  30. 35
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceVO.java
  31. 47
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceWarehouseAdditionalVO.java
  32. 49
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceWarehouseBasicVO.java
  33. 24
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceWarehouseVO.java
  34. 54
      blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/enums/NodeEnums.java
  35. 4
      blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/vo/NodePushMsg.java
  36. 5
      blade-service/logpm-basicdata/pom.xml
  37. 74
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/config/XxlJobConfig.java
  38. 102
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataPriceController.java
  39. 101
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataPriceRouteController.java
  40. 150
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataPriceTemplateController.java
  41. 34
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataPriceDTO.java
  42. 34
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataPriceRouteDTO.java
  43. 34
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataPriceTemplateDTO.java
  44. 21
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/CostTypeEnums.java
  45. 27
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/DispatchPricingTypeEnums.java
  46. 21
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/DispatchTypeEnums.java
  47. 24
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/FullVehicleTypeEnums.java
  48. 24
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/GeneralServiceTypeEnums.java
  49. 23
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/MinCostTypeEnums.java
  50. 21
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/MinCostWayEnums.java
  51. 23
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/PickupPricingTypeEnums.java
  52. 24
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/ServiceTypeEnums.java
  53. 23
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/TrunkLinePricingTypeEnums.java
  54. 21
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/WarehouseCalculationBasisEnums.java
  55. 21
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/WarehousePricingModeEnums.java
  56. 23
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/WarehousePricingTypeEnums.java
  57. 23
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/WarehousePricingUnitEnums.java
  58. 43
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataPriceExcel.java
  59. 43
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataPriceRouteExcel.java
  60. 43
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataPriceTemplateExcel.java
  61. 74
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/job/BasicdataPriceJob.java
  62. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCategoryMapper.java
  63. 22
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCategoryMapper.xml
  64. 34
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceCategoryBasicMapper.java
  65. 9
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceCategoryBasicMapper.xml
  66. 34
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceCategoryDispatchMapper.java
  67. 9
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceCategoryDispatchMapper.xml
  68. 35
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceCategoryWarehouseMapper.java
  69. 9
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceCategoryWarehouseMapper.xml
  70. 47
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceFullVehicleMapper.java
  71. 14
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceFullVehicleMapper.xml
  72. 39
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceGeneralMapper.java
  73. 10
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceGeneralMapper.xml
  74. 56
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.java
  75. 35
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml
  76. 54
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceRouteMapper.java
  77. 19
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceRouteMapper.xml
  78. 54
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceTemplateMapper.java
  79. 19
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceTemplateMapper.xml
  80. 44
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceTrunklineRouteMapper.java
  81. 14
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceTrunklineRouteMapper.xml
  82. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataCategoryService.java
  83. 39
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceCategoryBasicService.java
  84. 39
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceCategoryDispatchService.java
  85. 39
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceCategoryWarehouseService.java
  86. 35
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceFullVehicleService.java
  87. 40
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceGeneralService.java
  88. 57
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceRouteService.java
  89. 61
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceService.java
  90. 66
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceTemplateService.java
  91. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCategoryServiceImpl.java
  92. 41
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceCategoryBasicServiceImpl.java
  93. 41
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceCategoryDispatchServiceImpl.java
  94. 41
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceCategoryWarehouseServiceImpl.java
  95. 41
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceFullVehicleServiceImpl.java
  96. 42
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceGeneralServiceImpl.java
  97. 273
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceRouteServiceImpl.java
  98. 1018
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java
  99. 437
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceTemplateServiceImpl.java
  100. 50
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/BasicdataPriceRouteWrapper.java
  101. Some files were not shown because too many files have changed in this diff Show More

21
blade-biz-common/src/main/java/org/springblade/common/enums/BooleanEnums.java

@ -0,0 +1,21 @@
package org.springblade.common.enums;
import org.springblade.common.model.IDict;
/**
* 布尔枚举值
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum BooleanEnums implements IDict<Boolean> {
NO(false, "否"),
YES(true, "是"),
;
BooleanEnums(Boolean code, String text) {
init(code, text);
}
}

21
blade-biz-common/src/main/java/org/springblade/common/enums/BooleanZeroOneEnums.java

@ -0,0 +1,21 @@
package org.springblade.common.enums;
import org.springblade.common.model.IDict;
/**
* 布尔枚举值
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum BooleanZeroOneEnums implements IDict<Integer> {
NO(0, "否"),
YES(1, "是"),
;
BooleanZeroOneEnums(Integer code, String text) {
init(code, text);
}
}

15
blade-biz-common/src/main/java/org/springblade/common/model/DictBean.java

@ -0,0 +1,15 @@
package org.springblade.common.model;
import lombok.Data;
/**
* 字典bean
* 只有code和text可用于展示下拉框
*
* @author zqb
*/
@Data
public class DictBean<T> implements IDict<T> {
private final T code;
private final String text;
}

170
blade-biz-common/src/main/java/org/springblade/common/model/IDict.java

@ -0,0 +1,170 @@
package org.springblade.common.model;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* 字典接口
* <p>
* 自定义的字典枚举类实现本接口后可省略属性code和text以及对应的get方法
* 在构造方法中只需调用init方法即可初始化
*
* @author zqb
* @date 2024-04-01
*/
public interface IDict<T> {
/**
* 通过code获取value
*
* @param clazz 枚举class
* @param code code
* @return text
*/
static <T> String getTextByCode(Class<? extends IDict<T>> clazz, T code) {
return Stream.of(clazz.getEnumConstants())
.filter((IDict<T> e) -> e.getCode().equals(code))
.map(IDict::getText)
.findAny().orElse(null);
}
/**
* 通过text获取code
*
* @param clazz 枚举class
* @param text text
* @return code
*/
static <T> T getCodeByText(Class<? extends IDict<T>> clazz, String text) {
return Stream.of(clazz.getEnumConstants())
.filter((IDict<T> e) -> e.getText().equals(text))
.map(IDict::getCode)
.findAny().orElse(null);
}
/**
* 通过code获取字典枚举实例
*
* @param clazz 枚举class
* @param code code
* @param <T> 字典code类型
* @param <R> 枚举类型
* @return 字典枚举实例
*/
@SuppressWarnings("unchecked")
static <T, R extends IDict<T>> R getByCode(Class<? extends IDict<T>> clazz, T code) {
return Stream.of(clazz.getEnumConstants())
.filter((IDict<T> e) -> (e.getCode().equals(code)))
.map(v -> (R) v)
.findAny()
.orElse(null);
}
/**
* 获取给定的字典枚举项常用下拉框数据请求
*
* @param enums 可指定需要哪些项
* @return List
*/
@SafeVarargs
static <T, E extends IDict<T>> List<IDict<T>> getItems(E... enums) {
return Stream.of(enums)
.map(DictPool::getDict)
.collect(Collectors.toList());
}
/**
* 获取所有字典枚举项除开指定的枚举
*
* @param exclude 指定排除的枚举
* @return List
*/
@SafeVarargs
@SuppressWarnings("unchecked")
static <T, E extends IDict<T>> List<IDict<T>> getItemsExclude(E... exclude) {
Class<IDict<T>> clazz = (Class<IDict<T>>) exclude.getClass().getComponentType();
IDict<T>[] allEnum = clazz.getEnumConstants();
List<IDict<T>> excludeList = Arrays.asList(exclude);
return Stream.of(allEnum)
.filter(e -> !excludeList.contains(e))
.map(DictPool::getDict)
.collect(Collectors.toList());
}
/**
* 获取所有字典枚举项常用下拉框数据请求
* 枚举值上标记@Deprecated的不会返回
*
* @param clazz 字典枚举类
* @return List
*/
static <T> List<IDict<T>> getAll(Class<? extends IDict<T>> clazz) {
Map<String, Field> fieldCache = Arrays.stream(clazz.getDeclaredFields()).
filter(Field::isEnumConstant).
collect(Collectors.toMap(Field::getName, Function.identity()));
IDict<T>[] allEnum = clazz.getEnumConstants();
return Stream.of(allEnum)
.filter(e -> !fieldCache.get(((Enum<?>) e).name()).isAnnotationPresent(Deprecated.class))
.map(DictPool::getDict)
.collect(Collectors.toList());
}
/**
* 初始化
*
* @param code 字典编码
* @param text 字典文本
*/
default void init(T code, String text) {
DictPool.putDict(this, code, text);
}
/**
* 获取编码
*
* @return 编码
*/
default T getCode() {
return DictPool.getDict(this).getCode();
}
/**
* 获取文本
*
* @return 文本
*/
default String getText() {
return DictPool.getDict(this).getText();
}
@SuppressWarnings("all")
class DictPool {
private static final Map<IDict, DictBean> DICT_MAP = new ConcurrentHashMap<>();
private static final Map<String, Class<? extends IDict>> DICT_NAME_CLASS_MAP = new ConcurrentHashMap<>();
static <T> void putDict(IDict<T> dict, T code, String text) {
DICT_NAME_CLASS_MAP.put(dict.getClass().getName(), dict.getClass());
DICT_MAP.put(dict, new DictBean<>(code, text));
}
public static List<IDict<Object>> getDict(String dictName) {
Class<? extends IDict> aClass = DICT_NAME_CLASS_MAP.get(dictName);
return IDict.getAll((Class<? extends IDict<Object>>) aClass);
}
static <K extends IDict<T>, T> DictBean<T> getDict(K dict) {
return DICT_MAP.get(dict);
}
}
}

60
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceCategoryBasicEntity.java

@ -0,0 +1,60 @@
/*
* 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.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 基础价格按品类计费基础价格提货干线 实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
@TableName("logpm_basicdata_price_category_basic")
@ApiModel(value = "BasicdataPriceCategory对象", description = "基础价格按品类计费基础价格")
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceCategoryBasicEntity extends TenantEntity {
@ApiModelProperty(value = "预留1")
private String reserve1;
@ApiModelProperty(value = "预留2")
private String reserve2;
@ApiModelProperty(value = "预留3")
private String reserve3;
@ApiModelProperty(value = "预留4")
private String reserve4;
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "业务id")
private Long boId;
@ApiModelProperty(value = "基础价格id")
private Long priceId;
@ApiModelProperty(value = "品类id")
private Long categoryId;
@ApiModelProperty(value = "计费类型(1:按件,3:按方,4:按重量)")
private Integer type;
@ApiModelProperty(value = "服务类型(1:提货,2:提货路径,3:干线,4:干线路径)")
private Integer serviceType;
@ApiModelProperty(value = "单价")
private Double price;
}

72
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceCategoryDispatchEntity.java

@ -0,0 +1,72 @@
/*
* 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.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 基础价格按品类计费配送费 实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
@TableName("logpm_basicdata_price_category_dispatch")
@ApiModel(value = "BasicdataPriceCategory对象", description = "基础价格按品类计费配送费")
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceCategoryDispatchEntity extends TenantEntity {
@ApiModelProperty(value = "预留1")
private String reserve1;
@ApiModelProperty(value = "预留2")
private String reserve2;
@ApiModelProperty(value = "预留3")
private String reserve3;
@ApiModelProperty(value = "预留4")
private String reserve4;
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "业务id")
private Long boId;
@ApiModelProperty(value = "基础价格id")
private Long priceId;
@ApiModelProperty(value = "品类id")
private Long categoryId;
@ApiModelProperty(value = "计费类型(1:按件,2:按方,3:按重量,4:按公里,5:按吨公里,6:按吨)")
private Integer type;
@ApiModelProperty(value = "费用类型(1:普通费,2附加费)")
private Integer costType;
@ApiModelProperty(value = "服务类型(1:配送)")
private Integer serviceType;
@ApiModelProperty(value = "单价")
private Double price;
@ApiModelProperty(value = "遗留单价")
private Double leaveBehindPrice;
@ApiModelProperty(value = "分货费")
private Double sortPrice;
@ApiModelProperty(value = "操作/装卸费")
private Double handlingPrice;
@ApiModelProperty(value = "平移费")
private Double relocationPrice;
@ApiModelProperty(value = "上楼费")
private Double upstairsDeliveryPrice;
}

74
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceCategoryWarehouseEntity.java

@ -0,0 +1,74 @@
/*
* 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.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 基础价格按品类计费仓储费 实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
@TableName("logpm_basicdata_price_category_warehouse")
@ApiModel(value = "BasicdataPriceCategoryWarehouseEntity", description = "基础价格按品类计费仓储费")
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceCategoryWarehouseEntity extends TenantEntity {
@ApiModelProperty(value = "预留1")
private String reserve1;
@ApiModelProperty(value = "预留2")
private String reserve2;
@ApiModelProperty(value = "预留3")
private String reserve3;
@ApiModelProperty(value = "预留4")
private String reserve4;
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "业务id")
private Long boId;
@ApiModelProperty(value = "基础价格id")
private Long priceId;
@ApiModelProperty(value = "品类id")
private Long categoryId;
@ApiModelProperty(value = "计费类型(1:按件,2:按方,3:按重量,4:按吨)")
private Integer type;
@ApiModelProperty(value = "费用类型(1:普通费,2附加费)")
private Integer costType;
@ApiModelProperty(value = "服务类型(1:仓储)")
private Integer serviceType;
@ApiModelProperty(value = "30天内")
private Double withinThirtyPrice;
@ApiModelProperty(value = "30-60天")
private Double betweenThirtySixtyPrice;
@ApiModelProperty(value = "60天外")
private Double beyondSixtyPrice;
@ApiModelProperty(value = "上限价格")
private Double maximumPrice;
@ApiModelProperty(value = "操作/装卸费")
private Double operatePrice;
@ApiModelProperty(value = "仓储管理费")
private Double warehouseManagementPrice;
@ApiModelProperty(value = "仓储分货费")
private Double warehouseSortPrice;
}

70
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceEntity.java

@ -0,0 +1,70 @@
/*
* 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.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.util.Date;
/**
* 基础价格表 实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
@TableName("logpm_basicdata_price")
@ApiModel(value = "BasicdataPrice对象", description = "基础价格表")
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceEntity extends TenantEntity {
@ApiModelProperty(value = "预留1")
private String reserve1;
@ApiModelProperty(value = "预留2")
private String reserve2;
@ApiModelProperty(value = "预留3")
private String reserve3;
@ApiModelProperty(value = "预留4")
private String reserve4;
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "模板id")
private Long templateId;
@ApiModelProperty(value = "客户id")
private Long clientId;
@ApiModelProperty(value = "品牌id")
private Long brandId;
@ApiModelProperty(value = "维护状态(1:未维护,2:已维护,3:已到期)")
private Integer maintenanceStatus;
@ApiModelProperty(value = "生效时间")
private Date effectiveTime;
@ApiModelProperty(value = "到期时间")
private Date expiryTime;
@ApiModelProperty(value = "配送-上楼费免费楼层")
private Integer dispatchStairsCarryingCharge;
@ApiModelProperty(value = "配送-向上判断件数")
private Double dispatchUpwardJudgment;
@ApiModelProperty(value = "配送-向上判断价格")
private Double dispatchUpwardJudgmentCost;
}

59
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceFullVehicleEntity.java

@ -0,0 +1,59 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 基础价格整车计费 实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
@TableName("logpm_basicdata_price_full_vehicle")
@ApiModel(value = "BasicdataPriceFullVehicle对象", description = "基础价格整车计费")
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceFullVehicleEntity extends TenantEntity {
@ApiModelProperty(value = "预留1")
private String reserve1;
@ApiModelProperty(value = "预留2")
private String reserve2;
@ApiModelProperty(value = "预留3")
private String reserve3;
@ApiModelProperty(value = "预留4")
private String reserve4;
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "业务id")
private Long boId;
@ApiModelProperty(value = "基础价格id")
private Long priceId;
@ApiModelProperty(value = "类型(1:整车提货,2:干线整车运输,3:整车配送,4:提货路径,5:干线路径)")
private Integer type;
@ApiModelProperty(value = "车型")
private Integer vehicleType;
@ApiModelProperty(value = "整车计费(元/车)")
private Double price;
}

57
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceGeneralEntity.java

@ -0,0 +1,57 @@
/*
* 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.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 基础价格一般计费 实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
@TableName("logpm_basicdata_price_general")
@ApiModel(value = "BasicdataPriceGeneral对象", description = "基础价格一般计费")
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceGeneralEntity extends TenantEntity {
@ApiModelProperty(value = "预留1")
private String reserve1;
@ApiModelProperty(value = "预留2")
private String reserve2;
@ApiModelProperty(value = "预留3")
private String reserve3;
@ApiModelProperty(value = "预留4")
private String reserve4;
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "业务id")
private Long boId;
@ApiModelProperty(value = "基础价格id")
private Long priceId;
@ApiModelProperty(value = "服务类型(1:提货,2:提货路径,3:干线,4:干线路径,5:配送,6:配送遗留)")
private Integer serviceType;
@ApiModelProperty(value = "最低计费")
private Double minCost;
@ApiModelProperty(value = "加算价格")
private Double additionalCost;
}

67
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceRouteEntity.java

@ -0,0 +1,67 @@
/*
* 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.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 基础价格路径 实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
@TableName("logpm_basicdata_price_route")
@ApiModel(value = "BasicdataPriceRoute对象", description = "基础价格路径")
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceRouteEntity extends TenantEntity {
@ApiModelProperty(value = "预留1")
private String reserve1;
@ApiModelProperty(value = "预留2")
private String reserve2;
@ApiModelProperty(value = "预留3")
private String reserve3;
@ApiModelProperty(value = "预留4")
private String reserve4;
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "基础价格id")
private Long priceId;
@ApiModelProperty(value = "类型(1:提货,2:干线)")
private Integer serviceType;
@ApiModelProperty(value = "始发地省份id")
private Long startProvinceId;
@ApiModelProperty(value = "始发地城市id")
private Long startCityId;
@ApiModelProperty(value = "始发地区县id")
private Long startCountyId;
@ApiModelProperty(value = "目的地省份id")
private Long endProvinceId;
@ApiModelProperty(value = "目的地城市id")
private Long endCityId;
@ApiModelProperty(value = "目的地区县id")
private Long endCountyId;
@ApiModelProperty(value = "发货单位")
private Long sendOrgId;
}

151
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataPriceTemplateEntity.java

@ -0,0 +1,151 @@
/*
* 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.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
* 基础价格模板表 实体类
*
* @author zqb
* @since 2024-04-01
*/
@Data
@TableName("logpm_basicdata_price_template")
@ApiModel(value = "BasicdataPriceTemplate对象", description = "基础价格模板表")
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceTemplateEntity extends TenantEntity {
@ApiModelProperty(value = "预留1")
private String reserve1;
@ApiModelProperty(value = "预留2")
private String reserve2;
@ApiModelProperty(value = "预留3")
private String reserve3;
@ApiModelProperty(value = "预留4")
private String reserve4;
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "模板名称")
@NotEmpty(message = "模板名称不能为空")
private String name;
@ApiModelProperty(value = "品牌id")
@NotNull(message = "品牌id不能为空")
private Long brandId;
@ApiModelProperty(value = "服务类型")
@NotEmpty(message = "服务类型不能为空")
private String serviceType;
@ApiModelProperty(value = "提货计价方式")
private String pickupPricingType;
@ApiModelProperty(value = "提货是否统一区域计费")
private Integer pickupIsUnifyAreaBill;
@ApiModelProperty(value = "提货是否区分品类")
private Integer pickupIsByCategory;
@ApiModelProperty(value = "提货-按件计费品类")
private String pickupPieceCategory;
@ApiModelProperty(value = "提货-按方计费品类")
private String pickupCubeCategory;
@ApiModelProperty(value = "提货-按重量计费品类")
private String pickupWeightCategory;
@ApiModelProperty(value = "提货-是否最低计费")
private Integer pickupIsMinCost;
@ApiModelProperty(value = "提货-最低计费类型(1:价格 2:件数 3:平方数 4:千克数)")
private Integer pickupMinCostType;
@ApiModelProperty(value = "干线-计价方式")
private String trunklinePricingType;
@ApiModelProperty(value = "干线-是否统一区域计费")
private Integer trunklineIsUnifyAreaBill;
@ApiModelProperty(value = "干线-是否区分品类")
private Integer trunklineIsByCategory;
@ApiModelProperty(value = "干线-按件计费品类")
private String trunklinePieceCategory;
@ApiModelProperty(value = "干线-按方计费品类")
private String trunklineCubeCategory;
@ApiModelProperty(value = "干线-按重量计费品类")
private String trunklineWeightCategory;
@ApiModelProperty(value = "干线-是否特殊配置")
private Integer trunklineIsPeculiarSetup;
@ApiModelProperty(value = "干线-是否最低计费")
private Integer trunklineIsMinCost;
@ApiModelProperty(value = "干线-最低计费类型(1:价格 2:件数 3:立方数 4:千克数)")
private Integer trunklineMinCostType;
@ApiModelProperty(value = "仓储-计价方式")
private Integer warehousePricingType;
@ApiModelProperty(value = "仓储-计费模式")
private Integer warehousePricingMode;
@ApiModelProperty(value = "仓储-计算基准")
private Integer warehouseCalculationBasis;
@ApiModelProperty(value = "仓储-是否区分品类")
private Integer warehouseIsByCategory;
@ApiModelProperty(value = "仓储-仓储费品类")
private String warehousePieceCategory;
@ApiModelProperty(value = "仓储-附加费计价单位")
private Integer warehouseSubjoinFeeUnit;
@ApiModelProperty(value = "仓储-是否有管理费")
private Integer warehouseIsManageFee;
@ApiModelProperty(value = "仓储-是否有操作/装卸费")
private Integer warehouseIsOperateFee;
@ApiModelProperty(value = "仓储-是否有分拣费")
private Integer warehouseIsSortFee;
@ApiModelProperty(value = "仓储-是否按品类附加费计费")
private Integer warehouseIsCategorySubjoin;
@ApiModelProperty(value = "仓储-附加费品类")
private String warehouseSubjoinCategory;
@ApiModelProperty(value = "配送-服务类型")
private Integer dispatchServiceType;
@ApiModelProperty(value = "配送-计价方式")
private String dispatchPricingType;
@ApiModelProperty(value = "配送-是否区分品类")
private Integer dispatchIsByCategory;
@ApiModelProperty(value = "配送-是否遗留件")
private Integer dispatchIsLeaveBehind;
@ApiModelProperty(value = "配送-按件计费品类")
private String dispatchPieceCategory;
@ApiModelProperty(value = "配送-按方计费品类")
private String dispatchCubeCategory;
@ApiModelProperty(value = "配送-按重量计费品类")
private String dispatchWeightCategory;
@ApiModelProperty(value = "配送-是否按品类附加费计费")
private Integer dispatchIsCategorySubjoin;
@ApiModelProperty(value = "配送-是否有分货费")
private Integer dispatchIsSortFee;
@ApiModelProperty(value = "配送-是否有操作/装卸费")
private Integer dispatchIsOperateFee;
@ApiModelProperty(value = "配送-是否有上楼费")
private Integer dispatchIsStairsCarryingCharge;
@ApiModelProperty(value = "配送-是否配置免费楼层")
private Integer dispatchIsFeeFloor;
@ApiModelProperty(value = "配送-是否有平移费")
private Integer dispatchIsShiftingCharge;
@ApiModelProperty(value = "配送-附加费品类")
private String dispatchSubjoinCategory;
@ApiModelProperty(value = "配送-是否最低计费")
private Integer dispatchIsMinCost;
@ApiModelProperty(value = "配送-最低计费方式")
private Integer dispatchMinCostMode;
@ApiModelProperty(value = "配送-最低计费类型(1:价格 2:件数 3:立方数)")
private Integer dispatchMinCostType;
@ApiModelProperty(value = "配送-是否向上判断")
private Integer dispatchIsUpwardJudgment;
}

45
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataPriceClient.java

@ -0,0 +1,45 @@
/*
* 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.basicdata.feign;
import com.logpm.basicdata.entity.BasicdataFreightDetailEntity;
import com.logpm.basicdata.vo.BasicdataFreightApiVO;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* 基础价格体系 Feign接口类
*
* @author zqb
* @since 2024-04-11
*/
@FeignClient(
value = ModuleNameConstant.APPLICATION_BASICDATA_NAME
)
public interface IBasicdataPriceClient {
String API_PREFIX = "/basicdataPrice/client";
String PRICE = API_PREFIX + "/pirce";
@PostMapping(PRICE)
List<BasicdataFreightDetailEntity> pirce(@RequestBody BasicdataFreightApiVO param);
}

49
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceBasicUpdateVO.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.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 基础配置 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
public class BasicdataPriceBasicUpdateVO implements Serializable {
private static final long serialVersionUID = 1L;
@NotNull(message = "修改数据id不能为空")
@ApiModelProperty(value = "id")
private Long id;
@NotNull(message = "模板不能为空")
@ApiModelProperty(value = "模板id")
private Long templateId;
@NotNull(message = "生效时间不能为空")
@ApiModelProperty(value = "生效时间")
private Date effectiveTime;
@NotNull(message = "到期时间不能为空")
@ApiModelProperty(value = "到期时间")
private Date expiryTime;
}

63
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceCategoryVO.java

@ -0,0 +1,63 @@
/*
* 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.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 基础价格按品类计费 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
public class BasicdataPriceCategoryVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "品类id")
private Long categoryId;
@ApiModelProperty(value = "单价")
private Double price;
@ApiModelProperty(value = "30天内")
private Double withinThirtyPrice;
@ApiModelProperty(value = "30-60天")
private Double betweenThirtySixtyPrice;
@ApiModelProperty(value = "60天外")
private Double beyondSixtyPrice;
@ApiModelProperty(value = "上限价格")
private Double maximumPrice;
@ApiModelProperty(value = "遗留单价")
private Double leaveBehindPrice;
@ApiModelProperty(value = "操作/装卸费")
private Double operatePrice;
@ApiModelProperty(value = "仓储管理费")
private Double warehouseManagementPrice;
@ApiModelProperty(value = "仓储分货费")
private Double warehouseSortPrice;
@ApiModelProperty(value = "分货费")
private Double sortPrice;
@ApiModelProperty(value = "装卸费")
private Double handlingPrice;
@ApiModelProperty(value = "平移费")
private Double relocationPrice;
@ApiModelProperty(value = "上楼费")
private Double upstairsDeliveryPrice;
}

43
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceFullVehicleVO.java

@ -0,0 +1,43 @@
/*
* 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.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 基础价格整车计费 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
public class BasicdataPriceFullVehicleVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
private Long id;
@ApiModelProperty(value = "车型")
private Integer vehicleType;
@ApiModelProperty(value = "整车计费(元/车)")
private Double price;
}

34
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceGeneralVO.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.basicdata.vo;
import com.logpm.basicdata.entity.BasicdataPriceGeneralEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 基础价格一般计费 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceGeneralVO extends BasicdataPriceGeneralEntity {
private static final long serialVersionUID = 1L;
}

58
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPricePageVO.java

@ -0,0 +1,58 @@
/*
* 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.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 基础价格表 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
public class BasicdataPricePageVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private String id;
@ApiModelProperty(value = "客户名称")
private String clientName;
@ApiModelProperty(value = "品牌名称")
private String brandName;
@ApiModelProperty(value = "模板服务类型")
private String serviceType;
@ApiModelProperty(value = "维护状态")
private String maintenanceStatus;
@ApiModelProperty(value = "修改时间")
private String updateTime;
@ApiModelProperty(value = "生效时间")
private String effectiveTime;
@ApiModelProperty(value = "过期时间")
private String expiryTime;
}

44
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceRouteVO.java

@ -0,0 +1,44 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.vo;
import com.logpm.basicdata.entity.BasicdataPriceRouteEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 基础价格干线路径 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceRouteVO extends BasicdataPriceRouteEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "始发地")
private String startCountyName;
@ApiModelProperty(value = "目的地")
private String endCountyName;
@ApiModelProperty(value = "发货单位")
private String sendOrgName;
}

77
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceTemplateVO.java

@ -0,0 +1,77 @@
/*
* 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.basicdata.vo;
import com.logpm.basicdata.entity.BasicdataPriceTemplateEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 基础价格模板表 视图实体类
*
* @author zqb
* @since 2024-04-01
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceTemplateVO extends BasicdataPriceTemplateEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "当前选择的服务类型")
private Integer checkType;
@ApiModelProperty(value = "模版类型")
private String templateType;
@ApiModelProperty(value = "用户名称")
private String userName;
@ApiModelProperty(value = "品牌名称")
private String brandName;
@ApiModelProperty(value = "提货-按件计费品类")
private List<PriceCategoryVO> pickupPieceCategorys;
@ApiModelProperty(value = "提货-按方计费品类")
private List<PriceCategoryVO> pickupCubeCategorys;
@ApiModelProperty(value = "提货-按重量计费品类")
private List<PriceCategoryVO> pickupWeightCategorys;
@ApiModelProperty(value = "干线-按件计费品类")
private List<PriceCategoryVO> trunklinePieceCategorys;
@ApiModelProperty(value = "干线-按方计费品类")
private List<PriceCategoryVO> trunklineCubeCategorys;
@ApiModelProperty(value = "干线-按重量计费品类")
private List<PriceCategoryVO> trunklineWeightCategorys;
@ApiModelProperty(value = "仓储-仓储费品类")
private List<PriceCategoryVO> warehousePieceCategorys;
@ApiModelProperty(value = "仓储-附加费品类")
private List<PriceCategoryVO> warehouseSubjoinCategorys;
@ApiModelProperty(value = "配送-按件计费品类")
private List<PriceCategoryVO> dispatchPieceCategorys;
@ApiModelProperty(value = "配送-按方计费品类")
private List<PriceCategoryVO> dispatchCubeCategorys;
@ApiModelProperty(value = "配送-按重量计费品类")
private List<PriceCategoryVO> dispatchWeightCategorys;
@ApiModelProperty(value = "配送-附加费品类")
private List<PriceCategoryVO> dispatchSubjoinCategorys;
}

33
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceVO.java

@ -0,0 +1,33 @@
/*
* 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.basicdata.vo;
import com.logpm.basicdata.entity.BasicdataPriceEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 基础价格表 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceVO extends BasicdataPriceEntity {
private static final long serialVersionUID = 1L;
}

43
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceBasicVO.java

@ -0,0 +1,43 @@
/*
* 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.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 基础价格按品类计费 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
public class PriceBasicVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
private Long id;
@ApiModelProperty(value = "品类id")
private Long categoryId;
@ApiModelProperty(value = "单价")
private Double price;
}

20
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceCategoryVO.java

@ -0,0 +1,20 @@
package com.logpm.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 基础价格品类
* @author zhaoqiaobo
* @create 2024-04-09
*/
@Data
public class PriceCategoryVO implements Serializable {
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "名称")
private String name;
}

49
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceDispatchAdditionalVO.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.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 基础价格按品类计费 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
public class PriceDispatchAdditionalVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
private Long id;
@ApiModelProperty(value = "品类id")
private Long categoryId;
@ApiModelProperty(value = "分货费")
private Double sortPrice;
@ApiModelProperty(value = "装卸费")
private Double handlingPrice;
@ApiModelProperty(value = "平移费")
private Double relocationPrice;
@ApiModelProperty(value = "上楼费")
private Double upstairsDeliveryPrice;
}

45
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceDispatchBasicVO.java

@ -0,0 +1,45 @@
/*
* 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.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 基础价格按品类计费 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
public class PriceDispatchBasicVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
private Long id;
@ApiModelProperty(value = "品类id")
private Long categoryId;
@ApiModelProperty(value = "单价")
private Double price;
@ApiModelProperty(value = "遗留单价")
private Double leaveBehindPrice;
}

64
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceDispatchVO.java

@ -0,0 +1,64 @@
package com.logpm.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 价格配送vo
*
* @author zhaoqiaobo
* @create 2024-04-03
*/
@Data
public class PriceDispatchVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "整车计费")
private List<BasicdataPriceFullVehicleVO> fullVehicle;
@ApiModelProperty(value = "按件品类计费")
private List<PriceDispatchBasicVO> pieceCategory;
@ApiModelProperty(value = "按方品类计费")
private List<PriceDispatchBasicVO> cubeCategory;
@ApiModelProperty(value = "按重量品类计费")
private List<PriceDispatchBasicVO> weightCategory;
@ApiModelProperty(value = "按公里计费")
private List<PriceDispatchBasicVO> kilometerCost;
@ApiModelProperty(value = "按吨公里计费")
private List<PriceDispatchBasicVO> tonKilometerCost;
@ApiModelProperty(value = "按吨计费")
private List<PriceDispatchBasicVO> tonCost;
@ApiModelProperty(value = "附加费")
private List<PriceDispatchAdditionalVO> additionalCategory;
@ApiModelProperty(value = "配送-上楼费免费楼层")
private Integer dispatchStairsCarryingCharge;
@ApiModelProperty(value = "最低计费")
private Double minCost;
@ApiModelProperty(value = "加算价格")
private Double additionalCost;
@ApiModelProperty(value = "遗留最低计费")
private Double leaveBehindMinCost;
@ApiModelProperty(value = "遗留加算价格")
private Double leaveBehindAdditionalCost;
@ApiModelProperty(value = "向上判断件数")
private Double dispatchUpwardJudgment;
@ApiModelProperty(value = "向上判断加价")
private Double dispatchUpwardJudgmentCost;
}

35
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PricePickupVO.java

@ -0,0 +1,35 @@
package com.logpm.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 价格提货vo
* @author zhaoqiaobo
* @create 2024-04-03
*/
@Data
public class PricePickupVO implements Serializable {
@ApiModelProperty(value = "整车计费")
private List<BasicdataPriceFullVehicleVO> fullVehicle;
@ApiModelProperty(value = "按件品类计费")
private List<PriceBasicVO> pieceCategory;
@ApiModelProperty(value = "按方品类计费")
private List<PriceBasicVO> cubeCategory;
@ApiModelProperty(value = "按重量品类计费")
private List<PriceBasicVO> weightCategory;
@ApiModelProperty(value = "最低计费")
private Double minCost;
@ApiModelProperty(value = "加算价格")
private Double additionalCost;
}

60
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceRouteVO.java

@ -0,0 +1,60 @@
package com.logpm.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 价格提货vo
*
* @author zhaoqiaobo
* @create 2024-04-03
*/
@Data
public class PriceRouteVO implements Serializable {
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "基础价格id")
private Long priceId;
@ApiModelProperty(value = "类型(1:提货,2:干线)")
private Integer serviceType;
@ApiModelProperty(value = "始发地省份id")
private Long startProvinceId;
@ApiModelProperty(value = "始发地城市id")
private Long startCityId;
@ApiModelProperty(value = "始发地区县id")
private Long startCountyId;
@ApiModelProperty(value = "目的地省份id")
private Long endProvinceId;
@ApiModelProperty(value = "目的地城市id")
private Long endCityId;
@ApiModelProperty(value = "目的地区县id")
private Long endCountyId;
@ApiModelProperty(value = "发货单位")
private Long sendOrgId;
@ApiModelProperty(value = "整车计费")
private List<BasicdataPriceFullVehicleVO> fullVehicle;
@ApiModelProperty(value = "按件品类计费")
private List<PriceBasicVO> pieceCategory;
@ApiModelProperty(value = "按方品类计费")
private List<PriceBasicVO> cubeCategory;
@ApiModelProperty(value = "按重量品类计费")
private List<PriceBasicVO> weightCategory;
@ApiModelProperty(value = "最低计费")
private Double minCost;
@ApiModelProperty(value = "加算价格")
private Double additionalCost;
}

37
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceTrunkLineVO.java

@ -0,0 +1,37 @@
package com.logpm.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 价格干线vo
* @author zhaoqiaobo
* @create 2024-04-03
*/
@Data
public class PriceTrunkLineVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "整车计费")
private List<BasicdataPriceFullVehicleVO> fullVehicle;
@ApiModelProperty(value = "按件品类计费")
private List<PriceBasicVO> pieceCategory;
@ApiModelProperty(value = "按方品类计费")
private List<PriceBasicVO> cubeCategory;
@ApiModelProperty(value = "按重量品类计费")
private List<PriceBasicVO> weightCategory;
@ApiModelProperty(value = "最低计费")
private Double minCost;
@ApiModelProperty(value = "加算价格")
private Double additionalCost;
}

35
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceVO.java

@ -0,0 +1,35 @@
package com.logpm.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 价格vo
*
* @author zhaoqiaobo
* @create 2024-04-03
*/
@Data
public class PriceVO implements Serializable {
private static final long serialVersionUID = 1L;
@NotNull(message = "修改数据id不能为空")
@ApiModelProperty(value = "主键")
private Long id;
@NotNull(message = "请确定当前修改的服务类型")
@ApiModelProperty(value = "当前选择的服务类型")
private Integer checkType;
@ApiModelProperty(value = "提货")
private PricePickupVO pickup;
@ApiModelProperty(value = "干线")
private PriceTrunkLineVO trunkLine;
@ApiModelProperty(value = "仓储")
private PriceWarehouseVO warehouse;
@ApiModelProperty(value = "配送")
private PriceDispatchVO dispatch;
}

47
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceWarehouseAdditionalVO.java

@ -0,0 +1,47 @@
/*
* 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.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 基础价格按品类计费 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
public class PriceWarehouseAdditionalVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
private Long id;
@ApiModelProperty(value = "品类id")
private Long categoryId;
@ApiModelProperty(value = "操作/装卸费")
private Double operatePrice;
@ApiModelProperty(value = "仓储管理费")
private Double warehouseManagementPrice;
@ApiModelProperty(value = "仓储分货费")
private Double warehouseSortPrice;
}

49
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceWarehouseBasicVO.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.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 基础价格按品类计费 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
public class PriceWarehouseBasicVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
private Long id;
@ApiModelProperty(value = "品类id")
private Long categoryId;
@ApiModelProperty(value = "30天内")
private Double withinThirtyPrice;
@ApiModelProperty(value = "30-60天")
private Double betweenThirtySixtyPrice;
@ApiModelProperty(value = "60天外")
private Double beyondSixtyPrice;
@ApiModelProperty(value = "上限价格")
private Double maximumPrice;
}

24
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceWarehouseVO.java

@ -0,0 +1,24 @@
package com.logpm.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 价格仓储vo
*
* @author zhaoqiaobo
* @create 2024-04-03
*/
@Data
public class PriceWarehouseVO implements Serializable {
@ApiModelProperty(value = "按品类计费")
private List<PriceWarehouseBasicVO> catergory;
@ApiModelProperty(value = "附加费")
private List<PriceWarehouseAdditionalVO> additionalCategory;
}

54
blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/enums/NodeEnums.java

@ -1,54 +0,0 @@
package com.logpm.factorydata.enums;
import lombok.Getter;
import java.io.Serializable;
/**
* 作业节点枚举
*
* @author zhaoqiaobo
* @create 2024-03-20 15:19
*/
@Getter
public enum NodeEnums implements Serializable {
INITIAL_DATA_ENTRY(10, "数据入库"),
INITIAL_WAREHOUSE_ENTRY(20, "始发仓入库"),
BILLING(30, "开单"),
INITIAL_WAREHOUSE_LOADING(40, "始发仓装车"),
CANCEL_INITIAL_WAREHOUSE_LOADING(50, "始发仓取消装车"),
INITIAL_WAREHOUSE_DEPART(60, "始发仓发车"),
CANCEL_INITIAL_WAREHOUSE_DEPART(70, "始发仓取消发车"),
NET_ARRIVE_CAR(80,"网点到车"),
CANCEL_NET_ARRIVE_CAR(90,"网点取消到车"),
UNLOAD_INCOMING_WAREHOUSE(100,"卸车入库"),
TRANSFER_WAREHOUSE_UNLOADING(110, "网点卸车确认"),
TRANSFER_WAREHOUSE_DEPART(120, "网点发车"),
CANEL_TRANSFER_WAREHOUSE_DEPART(130, "网点取消发车"),
FINAL_NET_ARRIVE_CAR(140,"终点到车"),
CANCEL_FINAL_NET_ARRIVE_CAR(150,"终点取消到车"),
SIGN_DIRECT_SHIPPER(160,"直发商家签收"),
END_WAREHOUSE_UNLOADING(170, "末端仓卸车确认"),
TRIPARTITE_TRANSFER_DEPART(180, "三方中转发车"),
CANCEL_TRIPARTITE_TRANSFER_DEPART(190, "三方中转取消发车"),
ARRICE_TRIPARTITE_TRANSFER_DEPART(200, "三方中转到达"),
sign_TRIPARTITE_TRANSFER_DEPART(210, "三方中转签收"),
SORTING_TRAYS(220, "分拣打托"),
UN_SORTING_TRAYS(230, "包件解托"),
PUTAWAY(240, "上架"),
DELIST(250, "下架"),
STOCKING_OPERATION(260, "备货作业"),
DISTRIBUTION_LOADING(270, "配送装车"),
DISTRIBUTION_SIGN_FOR(280, "配送签收"),
CLERK_REVIEW(290, "文员复核");
private Integer code;
private String value;
NodeEnums(Integer code, String value) {
this.code = code;
this.value = value;
}
}

4
blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/vo/NodePushMsg.java

@ -2,7 +2,7 @@ package com.logpm.factorydata.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.logpm.factorydata.enums.BrandEnums;
import com.logpm.factorydata.enums.NodeEnums;
import org.springblade.common.constant.WorkNodeEnums;
import com.logpm.factorydata.enums.SignForStatusEnums;
import lombok.AllArgsConstructor;
import lombok.Builder;
@ -33,7 +33,7 @@ public class NodePushMsg implements Serializable {
/**
* 作业节点
*/
private NodeEnums node;
private WorkNodeEnums node;
/**
* 操作人

5
blade-service/logpm-basicdata/pom.xml

@ -78,6 +78,11 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
</dependency>
</dependencies>

74
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/config/XxlJobConfig.java

@ -0,0 +1,74 @@
package com.logpm.basicdata.config;
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* xxl-job config
*
* @author xuxueli 2017-04-28
*/
@Configuration(proxyBeanMethods = false)
public class XxlJobConfig {
private final Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
@Value("${xxl.job.admin.addresses}")
private String adminAddresses;
@Value("${xxl.job.executor.appname}")
private String appName;
@Value("${xxl.job.executor.ip}")
private String ip;
@Value("${xxl.job.executor.port}")
private int port;
@Value("${xxl.job.accessToken}")
private String accessToken;
@Value("${xxl.job.executor.logpath}")
private String logPath;
@Value("${xxl.job.executor.logretentiondays}")
private int logRetentionDays;
@Bean
public XxlJobSpringExecutor xxlJobExecutor() {
logger.info(">>>>>>>>>>> xxl-job config init.");
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
xxlJobSpringExecutor.setAppName(appName);
xxlJobSpringExecutor.setIp(ip);
xxlJobSpringExecutor.setPort(port);
xxlJobSpringExecutor.setAccessToken(accessToken);
xxlJobSpringExecutor.setLogPath(logPath);
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
return xxlJobSpringExecutor;
}
/**
* 针对多网卡容器内部署等情况可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP
*
* 1引入依赖
* <dependency>
* <groupId>org.springframework.cloud</groupId>
* <artifactId>spring-cloud-commons</artifactId>
* <version>${version}</version>
* </dependency>
*
* 2配置文件或者容器启动变量
* spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
*
* 3获取IP
* String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
*/
}

102
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataPriceController.java

@ -0,0 +1,102 @@
/*
* 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.basicdata.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.service.IBasicdataPriceService;
import com.logpm.basicdata.vo.BasicdataPriceBasicUpdateVO;
import com.logpm.basicdata.vo.BasicdataPricePageVO;
import com.logpm.basicdata.vo.BasicdataPriceVO;
import com.logpm.basicdata.vo.PriceVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
/**
* 基础价格表 控制器
*
* @author zqb
* @since 2024-04-02
*/
@RestController
@AllArgsConstructor
@RequestMapping("basicdataPrice")
@Api(value = "基础价格表", tags = "基础价格表接口")
public class BasicdataPriceController extends BladeController {
private final IBasicdataPriceService basicdataPriceService;
/**
* 基础价格表 详情
*/
@GetMapping("/{id}")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入basicdataPrice")
public R<PriceVO> detail(@PathVariable Long id) {
PriceVO detail = basicdataPriceService.detail(id);
return R.data(detail);
}
/**
* 基础价格表 自定义分页
*/
@GetMapping
@ApiOperationSupport(order = 2)
@ApiOperation(value = "基础价格分页", notes = "传入basicdataPrice")
public R<IPage<BasicdataPricePageVO>> page(BasicdataPriceVO basicdataPrice, Query query) {
IPage<BasicdataPricePageVO> pages = basicdataPriceService.selectBasicdataPricePage(Condition.getPage(query), basicdataPrice);
return R.data(pages);
}
/**
* 基础价格表 修改
*/
@PatchMapping
@ApiOperationSupport(order = 4)
@ApiOperation(value = "基础配置", notes = "传入basicdataPrice")
public R<Boolean> basicUpdate(@Valid @RequestBody BasicdataPriceBasicUpdateVO vo) {
return R.status(basicdataPriceService.basicUpdate(vo));
}
/**
* 基础价格表 修改
*/
@PutMapping
@ApiOperationSupport(order = 3)
@ApiOperation(value = "修改", notes = "传入basicdataPrice")
public R<Boolean> update(@Valid @RequestBody PriceVO vo) {
Boolean res = basicdataPriceService.updatePrice(vo);
return R.status(res);
}
}

101
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataPriceRouteController.java

@ -0,0 +1,101 @@
/*
* 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.basicdata.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.service.IBasicdataPriceRouteService;
import com.logpm.basicdata.vo.BasicdataPriceRouteVO;
import com.logpm.basicdata.vo.PriceRouteVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
/**
* 基础价格路径 控制器
*
* @author zqb
* @since 2024-04-08
*/
@RestController
@AllArgsConstructor
@RequestMapping("/priceRoute")
@Api(value = "基础价格路径", tags = "基础价格路径接口")
public class BasicdataPriceRouteController extends BladeController {
private final IBasicdataPriceRouteService basicdataPriceRouteService;
/**
* 基础价格路径 详情
*/
@GetMapping("/{id}")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入basicdataPriceRoute")
public R<PriceRouteVO> detail(@PathVariable Long id) {
PriceRouteVO detail = basicdataPriceRouteService.detail(id);
return R.data(detail);
}
/**
* 基础价格路径 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入basicdataPriceRoute")
public R<IPage<BasicdataPriceRouteVO>> page(BasicdataPriceRouteVO basicdataPriceRoute, Query query) {
IPage<BasicdataPriceRouteVO> pages = basicdataPriceRouteService.selectBasicdataPriceRoutePage(Condition.getPage(query), basicdataPriceRoute);
return R.data(pages);
}
/**
* 基础价格路径 新增
*/
@PostMapping("submit")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增/修改", notes = "传入basicdataPriceRoute")
public R save(@Valid @RequestBody PriceRouteVO vo) {
Long id = basicdataPriceRouteService.saveRoute(vo);
return R.success(StrUtil.toString(id));
}
/**
* 基础价格路径 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(basicdataPriceRouteService.deleteLogic(Func.toLongList(ids)));
}
}

150
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataPriceTemplateController.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.basicdata.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.entity.BasicdataPriceTemplateEntity;
import com.logpm.basicdata.excel.BasicdataPriceTemplateExcel;
import com.logpm.basicdata.service.IBasicdataPriceTemplateService;
import com.logpm.basicdata.vo.BasicdataPriceTemplateVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
/**
* 基础价格模板表 控制器
*
* @author zqb
* @since 2024-04-01
*/
@RestController
@AllArgsConstructor
@RequestMapping("priceTemplate")
@Api(value = "基础价格模板表", tags = "基础价格模板表接口")
public class BasicdataPriceTemplateController extends BladeController {
private final IBasicdataPriceTemplateService basicdataPriceTemplateService;
/**
* 基础价格模板表 详情
*/
@GetMapping("/{id}")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "根据id获取详情")
public R<BasicdataPriceTemplateVO> detail(@PathVariable Long id) {
BasicdataPriceTemplateVO basicdataPriceTemplateVO = basicdataPriceTemplateService.detail(id);
return R.data(basicdataPriceTemplateVO);
}
/**
* 基础价格模板表 自定义分页
*/
@GetMapping
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入basicdataPriceTemplate")
public R<IPage<BasicdataPriceTemplateVO>> page(BasicdataPriceTemplateVO basicdataPriceTemplate, Query query) {
IPage<BasicdataPriceTemplateVO> pages = basicdataPriceTemplateService.selectBasicdataPriceTemplatePage(Condition.getPage(query), basicdataPriceTemplate);
return R.data(pages);
}
/**
* 基础价格模板表 新增
*/
@PostMapping
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入basicdataPriceTemplate")
public R<Long> save(@Valid @RequestBody BasicdataPriceTemplateEntity basicdataPriceTemplate) {
Long id = basicdataPriceTemplateService.saveTemplate(basicdataPriceTemplate);
return R.data(id);
}
/**
* 基础价格模板表 修改
*/
@PutMapping
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入basicdataPriceTemplate")
public R<Boolean> updateByCheckType(@Valid @RequestBody BasicdataPriceTemplateVO basicdataPriceTemplate) {
return R.status(basicdataPriceTemplateService.updateByCheckType(basicdataPriceTemplate));
}
/**
* 基础价格模板表 清除指定类型数据
*/
@PatchMapping
@ApiOperationSupport(order = 6)
@ApiOperation(value = "清除指定类型数据", notes = "传入basicdataPriceTemplate")
public R<Boolean> clearDataByServiceType(@RequestParam("templateId") Long templateId, @RequestParam("checkType") Integer checkType) {
return R.status(basicdataPriceTemplateService.clearDataByServiceType(templateId, checkType));
}
/**
* 基础价格模板表 删除
*/
@DeleteMapping
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(basicdataPriceTemplateService.deleteLogic(Func.toLongList(ids)));
}
/**
* 导出数据
*/
@GetMapping("/export-basicdataPriceTemplate")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入basicdataPriceTemplate")
public void exportBasicdataPriceTemplate(@ApiIgnore @RequestParam Map<String, Object> basicdataPriceTemplate, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<BasicdataPriceTemplateEntity> queryWrapper = Condition.getQueryWrapper(basicdataPriceTemplate, BasicdataPriceTemplateEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(BasicdataPriceTemplate::getTenantId, bladeUser.getTenantId());
//}
queryWrapper.lambda().eq(BasicdataPriceTemplateEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<BasicdataPriceTemplateExcel> list = basicdataPriceTemplateService.exportBasicdataPriceTemplate(queryWrapper);
ExcelUtil.export(response, "基础价格模板表数据" + DateUtil.time(), "基础价格模板表数据表", list, BasicdataPriceTemplateExcel.class);
}
}

34
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataPriceDTO.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.basicdata.dto;
import com.logpm.basicdata.entity.BasicdataPriceEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 基础价格表 数据传输对象实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceDTO extends BasicdataPriceEntity {
private static final long serialVersionUID = 1L;
}

34
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataPriceRouteDTO.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.basicdata.dto;
import com.logpm.basicdata.entity.BasicdataPriceRouteEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 基础价格路径 数据传输对象实体类
*
* @author zqb
* @since 2024-04-08
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceRouteDTO extends BasicdataPriceRouteEntity {
private static final long serialVersionUID = 1L;
}

34
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataPriceTemplateDTO.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.basicdata.dto;
import com.logpm.basicdata.entity.BasicdataPriceTemplateEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 基础价格模板表 数据传输对象实体类
*
* @author zqb
* @since 2024-04-01
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class BasicdataPriceTemplateDTO extends BasicdataPriceTemplateEntity {
private static final long serialVersionUID = 1L;
}

21
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/CostTypeEnums.java

@ -0,0 +1,21 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 最低计费类型
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum CostTypeEnums implements IDict<Integer> {
NOMAL(1, "普通费"),
ADD(2, "附加费"),
;
CostTypeEnums(Integer code, String text) {
init(code, text);
}
}

27
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/DispatchPricingTypeEnums.java

@ -0,0 +1,27 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 配送计费方式
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum DispatchPricingTypeEnums implements IDict<Integer> {
PIECE(1, "按件计费"),
WEIGHT(2, "按重量计费"),
CUBE(3, "按方计费"),
COMPLETE_VEHICLE(4, "按整车计费"),
DESTINATIONS_NUMBER(5, "按点位计费"),
TON_PER_KILOMETER(6, "按吨公里计费"),
KILOMETER(7, "按公里计费"),
TON(8, "按吨计费"),
;
DispatchPricingTypeEnums(Integer code, String text) {
init(code, text);
}
}

21
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/DispatchTypeEnums.java

@ -0,0 +1,21 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 配送类型
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum DispatchTypeEnums implements IDict<Integer> {
COMMERCIAL_DISTRIBUTION(1, "商配"),
URBAN_DELIVERY(2, "市配"),
;
DispatchTypeEnums(Integer code, String text) {
init(code, text);
}
}

24
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/FullVehicleTypeEnums.java

@ -0,0 +1,24 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 整车类型
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum FullVehicleTypeEnums implements IDict<Integer> {
PICK_UP(1, "整车提货"),
TRUNK_LINE(2, "干线整车运输"),
DISPATCH(3, "整车配送"),
TRUNK_LINE_ROUTE(4, "干线路径整车运输"),
PICK_UP_ROUTE(5, "提货路径整车运输"),
;
FullVehicleTypeEnums(Integer code, String text) {
init(code, text);
}
}

24
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/GeneralServiceTypeEnums.java

@ -0,0 +1,24 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 一般计费服务类型
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum GeneralServiceTypeEnums implements IDict<Integer> {
PICK_UP(1, "提货"),
PICK_UP_ROUTE(2, "提货路径"),
TRUNK_LINE(3, "干线"),
TRUNK_LINE_ROUTE(4, "干线路径"),
DISPATCH(5, "配送"),
DISPATCH_LEAVE_BEHIND(6, "配送遗留"),
;
GeneralServiceTypeEnums(Integer code, String text) {
init(code, text);
}
}

23
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/MinCostTypeEnums.java

@ -0,0 +1,23 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 最低计费类型
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum MinCostTypeEnums implements IDict<Integer> {
PRICE(1, "价格"),
PIECE(2, "件"),
CUBE(3, "方数(m³)"),
KILOGRAM(4, "重量(Kg)"),
;
MinCostTypeEnums(Integer code, String text) {
init(code, text);
}
}

21
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/MinCostWayEnums.java

@ -0,0 +1,21 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 最低计费方式
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum MinCostWayEnums implements IDict<Integer> {
PRICE(1, "订单"),
PIECE(2, "配送任务"),
;
MinCostWayEnums(Integer code, String text) {
init(code, text);
}
}

23
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/PickupPricingTypeEnums.java

@ -0,0 +1,23 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 提货计价方式
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum PickupPricingTypeEnums implements IDict<Integer> {
PIECE(1, "按件"),
COMPLETE_VEHICLE(2, "按整车"),
CUBE(3, "按方"),
WEIGHT(4, "按重量"),
;
PickupPricingTypeEnums(Integer code, String text) {
init(code, text);
}
}

24
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/ServiceTypeEnums.java

@ -0,0 +1,24 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 服务类型
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum ServiceTypeEnums implements IDict<Integer> {
PICK_UP(1, "提货"),
TRUNK_LINE(2, "干线"),
WAREHOUSE(3, "仓储"),
DISPATCH(4, "配送"),
INSTALL(5, "安装"),
;
ServiceTypeEnums(Integer code, String text) {
init(code, text);
}
}

23
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/TrunkLinePricingTypeEnums.java

@ -0,0 +1,23 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 干线计费方式
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum TrunkLinePricingTypeEnums implements IDict<Integer> {
PIECE(1, "按件"),
COMPLETE_VEHICLE(2, "按整车"),
CUBE(3, "按方"),
WEIGHT(4, "按重量"),
;
TrunkLinePricingTypeEnums(Integer code, String text) {
init(code, text);
}
}

21
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/WarehouseCalculationBasisEnums.java

@ -0,0 +1,21 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 仓储计费基准
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum WarehouseCalculationBasisEnums implements IDict<Integer> {
PIECE_PER_DAY(1, "件/天"),
PIECE_PER_MONTH(2, "件/月"),
;
WarehouseCalculationBasisEnums(Integer code, String text) {
init(code, text);
}
}

21
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/WarehousePricingModeEnums.java

@ -0,0 +1,21 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 仓储计费模式
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum WarehousePricingModeEnums implements IDict<Integer> {
SEGMENTED_CHARGING(1, "分段式计费"),
MAXIMUM_BILLING(2, "最高标准计费"),
;
WarehousePricingModeEnums(Integer code, String text) {
init(code, text);
}
}

23
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/WarehousePricingTypeEnums.java

@ -0,0 +1,23 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 仓储计费方式
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum WarehousePricingTypeEnums implements IDict<Integer> {
PIECE(1, "按件"),
CUBE(2, "按方"),
WEIGHT(3, "按重量(Kg)"),
TONNE(4, "按吨(t)"),
;
WarehousePricingTypeEnums(Integer code, String text) {
init(code, text);
}
}

23
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/WarehousePricingUnitEnums.java

@ -0,0 +1,23 @@
package com.logpm.basicdata.enums;
import org.springblade.common.model.IDict;
/**
* 仓储费用计价单位
*
* @author zhaoqiaobo
* @create 2024-04-01
*/
public enum WarehousePricingUnitEnums implements IDict<Integer> {
PIECE(1, "按件"),
CUBE(2, "按方"),
WEIGHT(3, "按重量(Kg)"),
TONNE(4, "按吨(t)"),
;
WarehousePricingUnitEnums(Integer code, String text) {
init(code, text);
}
}

43
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataPriceExcel.java

@ -0,0 +1,43 @@
/*
* 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.basicdata.excel;
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 lombok.Data;
import java.io.Serializable;
/**
* 基础价格表 Excel实体类
*
* @author zqb
* @since 2024-04-02
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class BasicdataPriceExcel implements Serializable {
private static final long serialVersionUID = 1L;
}

43
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataPriceRouteExcel.java

@ -0,0 +1,43 @@
/*
* 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.basicdata.excel;
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 lombok.Data;
import java.io.Serializable;
/**
* 基础价格路径 Excel实体类
*
* @author zqb
* @since 2024-04-08
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class BasicdataPriceRouteExcel implements Serializable {
private static final long serialVersionUID = 1L;
}

43
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataPriceTemplateExcel.java

@ -0,0 +1,43 @@
/*
* 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.basicdata.excel;
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 lombok.Data;
import java.io.Serializable;
/**
* 基础价格模板表 Excel实体类
*
* @author zqb
* @since 2024-04-01
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class BasicdataPriceTemplateExcel implements Serializable {
private static final long serialVersionUID = 1L;
}

74
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/job/BasicdataPriceJob.java

@ -0,0 +1,74 @@
package com.logpm.basicdata.job;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.entity.BasicdataPriceEntity;
import com.logpm.basicdata.entity.BasicdataStoreBrandEntity;
import com.logpm.basicdata.service.IBasicdataClientService;
import com.logpm.basicdata.service.IBasicdataPriceService;
import com.logpm.basicdata.service.IBasicdataStoreBrandService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author zhaoqiaobo
* @create 2024-04-02
*/
@AllArgsConstructor
@Component
public class BasicdataPriceJob {
private final IBasicdataClientService clientService;
private final IBasicdataStoreBrandService storeBrandService;
private final IBasicdataPriceService priceService;
/**
* 定时生成价格体系基础数据
* 根据客户品牌关系表中的品牌和客户id生成价格体系表只处理不存在的数据
*
* @param param
* @return
* @throws Exception
*/
@XxlJob("initPrice")
public ReturnT<String> factoryJobHandler(String param) throws Exception {
List<BasicdataStoreBrandEntity> list = storeBrandService.list(Wrappers.<BasicdataStoreBrandEntity>lambdaQuery().eq(BasicdataStoreBrandEntity::getIsDeleted, 0));
List<BasicdataPriceEntity> priceList = priceService.list(Wrappers.<BasicdataPriceEntity>lambdaQuery().eq(BasicdataPriceEntity::getIsDeleted, 0));
Map<String, BasicdataPriceEntity> priceMap = new HashMap<>();
List<BasicdataPriceEntity> priceEntities = new ArrayList<>();
if (CollUtil.isNotEmpty(priceList)) {
for (BasicdataPriceEntity basicdataPriceEntity : priceList) {
Long brandId = basicdataPriceEntity.getBrandId();
Long clientId = basicdataPriceEntity.getClientId();
priceMap.put(brandId.toString() + clientId.toString(), basicdataPriceEntity);
}
}
for (BasicdataStoreBrandEntity basicdataStoreBrandEntity : list) {
Long brandId = basicdataStoreBrandEntity.getBrandId();
Long clientId = basicdataStoreBrandEntity.getClientId();
if (!priceMap.containsKey(StrUtil.toString(brandId) + StrUtil.toString(clientId))) {
BasicdataPriceEntity basicdataPriceEntity = new BasicdataPriceEntity();
basicdataPriceEntity.setClientId(clientId);
basicdataPriceEntity.setBrandId(Convert.toLong(brandId));
basicdataPriceEntity.setMaintenanceStatus(1);
basicdataPriceEntity.setTenantId(basicdataStoreBrandEntity.getTenantId());
priceEntities.add(basicdataPriceEntity);
}
}
if (CollUtil.isNotEmpty(priceEntities)) {
priceService.saveBatch(priceEntities);
}
return ReturnT.SUCCESS;
}
}

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

@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataCategoryEntity;
import com.logpm.basicdata.excel.BasicdataCategoryExcel;
import com.logpm.basicdata.vo.BasicdataCategoryVO;
import com.logpm.basicdata.vo.PriceCategoryVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -57,5 +58,7 @@ public interface BasicdataCategoryMapper extends BaseMapper<BasicdataCategoryEnt
List<JSONObject> findListByName(@Param("goodsName") String goodsName);
List<BasicdataCategoryEntity> listName(@Param("name") String name);
List<BasicdataCategoryEntity> listName(@Param("name") String name);
List<PriceCategoryVO> findCategoryByIds(@Param("ids") List<Long> ids);
}

22
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataCategoryMapper.xml

@ -117,8 +117,26 @@
select *
from logpm_basicdata_category
where `name` like concat(#{name},"%")
and is_deleted = 0
limit 10
and is_deleted = 0
limit 10
</select>
<select id="findCategoryByIds" resultType="com.logpm.basicdata.vo.PriceCategoryVO">
select id,
name
from logpm_basicdata_category t
where exists(
select 1 from (
<foreach collection="ids" index="ind" item="item">
<if test="ind == 0">
select #{item} pid
</if>
<if test="ind != 0">
union all
select #{item} pid
</if>
</foreach>
) categoryIds where categoryIds.pid = t.id)
</select>

34
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceCategoryBasicMapper.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.basicdata.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.basicdata.entity.BasicdataPriceCategoryBasicEntity;
import org.apache.ibatis.annotations.Delete;
/**
* 基础价格按品类计费 Mapper 接口
*
* @author zqb
* @since 2024-04-02
*/
public interface BasicdataPriceCategoryBasicMapper extends BaseMapper<BasicdataPriceCategoryBasicEntity> {
@Delete("delete from logpm_basicdata_price_category_basic where price_id = #{priceId}")
void removeByPriceId(Long priceId);
}

9
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceCategoryBasicMapper.xml

@ -0,0 +1,9 @@
<?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.basicdata.mapper.BasicdataPriceCategoryBasicMapper">
<!-- 通用查询映射结果 -->
<resultMap id="basicdataPriceCategoryResultMap" type="com.logpm.basicdata.entity.BasicdataPriceCategoryBasicEntity">
</resultMap>
</mapper>

34
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceCategoryDispatchMapper.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.basicdata.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.basicdata.entity.BasicdataPriceCategoryDispatchEntity;
import org.apache.ibatis.annotations.Delete;
/**
* 基础价格按品类计费 Mapper 接口
*
* @author zqb
* @since 2024-04-02
*/
public interface BasicdataPriceCategoryDispatchMapper extends BaseMapper<BasicdataPriceCategoryDispatchEntity> {
@Delete("delete from logpm_basicdata_price_category_dispatch where price_id = #{priceId}")
void removeByPriceId(Long priceId);
}

9
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceCategoryDispatchMapper.xml

@ -0,0 +1,9 @@
<?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.basicdata.mapper.BasicdataPriceCategoryDispatchMapper">
<!-- 通用查询映射结果 -->
<resultMap id="basicdataPriceCategoryResultMap" type="com.logpm.basicdata.entity.BasicdataPriceCategoryDispatchEntity">
</resultMap>
</mapper>

35
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceCategoryWarehouseMapper.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.basicdata.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.basicdata.entity.BasicdataPriceCategoryWarehouseEntity;
import org.apache.ibatis.annotations.Delete;
/**
* 基础价格按品类计费 Mapper 接口
*
* @author zqb
* @since 2024-04-02
*/
public interface BasicdataPriceCategoryWarehouseMapper extends BaseMapper<BasicdataPriceCategoryWarehouseEntity> {
@Delete("delete from logpm_basicdata_price_category_warehouse where price_id = #{priceId}")
void removeByPriceId(Long priceId);
}

9
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceCategoryWarehouseMapper.xml

@ -0,0 +1,9 @@
<?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.basicdata.mapper.BasicdataPriceCategoryWarehouseMapper">
<!-- 通用查询映射结果 -->
<resultMap id="basicdataPriceCategoryResultMap" type="com.logpm.basicdata.entity.BasicdataPriceCategoryWarehouseEntity">
</resultMap>
</mapper>

47
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceFullVehicleMapper.java

@ -0,0 +1,47 @@
/*
* 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.basicdata.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataPriceFullVehicleEntity;
import com.logpm.basicdata.vo.BasicdataPriceFullVehicleVO;
import org.apache.ibatis.annotations.Delete;
import java.util.List;
/**
* 基础价格整车计费 Mapper 接口
*
* @author zqb
* @since 2024-04-02
*/
public interface BasicdataPriceFullVehicleMapper extends BaseMapper<BasicdataPriceFullVehicleEntity> {
/**
* 自定义分页
*
* @param page
* @param basicdataPriceFullVehicle
* @return
*/
List<BasicdataPriceFullVehicleVO> selectBasicdataPriceFullVehiclePage(IPage page, BasicdataPriceFullVehicleVO basicdataPriceFullVehicle);
@Delete("delete from logpm_basicdata_price_full_vehicle where price_id = #{priceId}")
void removeByPriceId(Long priceId);
}

14
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceFullVehicleMapper.xml

@ -0,0 +1,14 @@
<?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.basicdata.mapper.BasicdataPriceFullVehicleMapper">
<!-- 通用查询映射结果 -->
<resultMap id="basicdataPriceFullVehicleResultMap" type="com.logpm.basicdata.entity.BasicdataPriceFullVehicleEntity">
</resultMap>
<select id="selectBasicdataPriceFullVehiclePage" resultMap="basicdataPriceFullVehicleResultMap">
select * from logpm_basicdata_price_full_vehicle where is_deleted = 0
</select>
</mapper>

39
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceGeneralMapper.java

@ -0,0 +1,39 @@
/*
* 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.basicdata.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.basicdata.entity.BasicdataPriceGeneralEntity;
import org.apache.ibatis.annotations.Delete;
/**
* 基础价格一般计费 Mapper 接口
*
* @author zqb
* @since 2024-04-02
*/
public interface BasicdataPriceGeneralMapper extends BaseMapper<BasicdataPriceGeneralEntity> {
/**
* 根据价格ID删除logpm_basicdata_price_general表中的记录
*
* @param priceId 价格ID用于指定要删除的价格记录
* @return void 方法没有返回值
*/
@Delete("delete from logpm_basicdata_price_general where price_id = #{priceId}")
void removeByPriceId(Long priceId);
}

10
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceGeneralMapper.xml

@ -0,0 +1,10 @@
<?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.basicdata.mapper.BasicdataPriceGeneralMapper">
<!-- 通用查询映射结果 -->
<resultMap id="basicdataPriceGeneralResultMap" type="com.logpm.basicdata.entity.BasicdataPriceGeneralEntity">
</resultMap>
</mapper>

56
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.java

@ -0,0 +1,56 @@
/*
* 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.basicdata.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.basicdata.entity.BasicdataPriceEntity;
import com.logpm.basicdata.excel.BasicdataPriceExcel;
import com.logpm.basicdata.vo.BasicdataPricePageVO;
import com.logpm.basicdata.vo.BasicdataPriceVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 基础价格表 Mapper 接口
*
* @author zqb
* @since 2024-04-02
*/
public interface BasicdataPriceMapper extends BaseMapper<BasicdataPriceEntity> {
/**
* 自定义分页
*
* @param page
* @param basicdataPrice
* @return
*/
List<BasicdataPricePageVO> selectBasicdataPricePage(IPage page, BasicdataPriceVO basicdataPrice);
/**
* 获取导出数据
*
* @param queryWrapper
* @return
*/
List<BasicdataPriceExcel> exportBasicdataPrice(@Param("ew") Wrapper<BasicdataPriceEntity> queryWrapper);
}

35
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml

@ -0,0 +1,35 @@
<?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.basicdata.mapper.BasicdataPriceMapper">
<!-- 通用查询映射结果 -->
<resultMap id="basicdataPriceResultMap" type="com.logpm.basicdata.entity.BasicdataPriceEntity">
</resultMap>
<select id="selectBasicdataPricePage" resultType="com.logpm.basicdata.vo.BasicdataPricePageVO">
select t.id,
cli.client_name,
ldb.brand_name,
lbpt.service_type,
case
when t.maintenance_status = 1 then '未维护'
when t.maintenance_status = 2 then '已维护'
else ''
end maintenance_status,
t.update_time,
t.effective_time,
t.expiry_time
from logpm_basicdata_price t
left join logpm_basicdata_price_template lbpt on t.template_id = lbpt.id
left join logpm_basicdata_client cli on cli.id = t.client_id
left join logpm_basicdata_brand ldb on ldb.id = t.brand_id
where t.is_deleted = 0
</select>
<select id="exportBasicdataPrice" resultType="com.logpm.basicdata.excel.BasicdataPriceExcel">
SELECT * FROM logpm_basicdata_price ${ew.customSqlSegment}
</select>
</mapper>

54
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceRouteMapper.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.basicdata.mapper;
import com.logpm.basicdata.entity.BasicdataPriceRouteEntity;
import com.logpm.basicdata.vo.BasicdataPriceRouteVO;
import com.logpm.basicdata.excel.BasicdataPriceRouteExcel;
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 zqb
* @since 2024-04-08
*/
public interface BasicdataPriceRouteMapper extends BaseMapper<BasicdataPriceRouteEntity> {
/**
* 自定义分页
*
* @param page
* @param basicdataPriceRoute
* @return
*/
List<BasicdataPriceRouteVO> selectBasicdataPriceRoutePage(IPage page, BasicdataPriceRouteVO basicdataPriceRoute);
/**
* 获取导出数据
*
* @param queryWrapper
* @return
*/
List<BasicdataPriceRouteExcel> exportBasicdataPriceRoute(@Param("ew") Wrapper<BasicdataPriceRouteEntity> queryWrapper);
}

19
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceRouteMapper.xml

@ -0,0 +1,19 @@
<?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.basicdata.mapper.BasicdataPriceRouteMapper">
<!-- 通用查询映射结果 -->
<resultMap id="basicdataPriceRouteResultMap" type="com.logpm.basicdata.entity.BasicdataPriceRouteEntity">
</resultMap>
<select id="selectBasicdataPriceRoutePage" resultMap="basicdataPriceRouteResultMap">
select * from logpm_basicdata_price_route where is_deleted = 0
</select>
<select id="exportBasicdataPriceRoute" resultType="com.logpm.basicdata.excel.BasicdataPriceRouteExcel">
SELECT * FROM logpm_basicdata_price_route ${ew.customSqlSegment}
</select>
</mapper>

54
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceTemplateMapper.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.basicdata.mapper;
import com.logpm.basicdata.entity.BasicdataPriceTemplateEntity;
import com.logpm.basicdata.vo.BasicdataPriceTemplateVO;
import com.logpm.basicdata.excel.BasicdataPriceTemplateExcel;
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 zqb
* @since 2024-04-01
*/
public interface BasicdataPriceTemplateMapper extends BaseMapper<BasicdataPriceTemplateEntity> {
/**
* 自定义分页
*
* @param page
* @param basicdataPriceTemplate
* @return
*/
List<BasicdataPriceTemplateVO> selectBasicdataPriceTemplatePage(IPage page, BasicdataPriceTemplateVO basicdataPriceTemplate);
/**
* 获取导出数据
*
* @param queryWrapper
* @return
*/
List<BasicdataPriceTemplateExcel> exportBasicdataPriceTemplate(@Param("ew") Wrapper<BasicdataPriceTemplateEntity> queryWrapper);
}

19
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceTemplateMapper.xml

@ -0,0 +1,19 @@
<?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.basicdata.mapper.BasicdataPriceTemplateMapper">
<!-- 通用查询映射结果 -->
<resultMap id="basicdataPriceTemplateResultMap" type="com.logpm.basicdata.vo.BasicdataPriceTemplateVO">
</resultMap>
<select id="selectBasicdataPriceTemplatePage" resultMap="basicdataPriceTemplateResultMap">
select * from logpm_basicdata_price_template where is_deleted = 0 order by id desc
</select>
<select id="exportBasicdataPriceTemplate" resultType="com.logpm.basicdata.excel.BasicdataPriceTemplateExcel">
SELECT * FROM logpm_basicdata_price_template ${ew.customSqlSegment}
</select>
</mapper>

44
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceTrunklineRouteMapper.java

@ -0,0 +1,44 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataPriceRouteEntity;
import com.logpm.basicdata.vo.BasicdataPriceRouteVO;
import java.util.List;
/**
* 基础价格干线路径 Mapper 接口
*
* @author zqb
* @since 2024-04-02
*/
public interface BasicdataPriceTrunklineRouteMapper extends BaseMapper<BasicdataPriceRouteEntity> {
/**
* 自定义分页
*
* @param page
* @param basicdataPriceTrunklineRoute
* @return
*/
List<BasicdataPriceRouteVO> selectBasicdataPriceTrunklineRoutePage(IPage page, BasicdataPriceRouteVO basicdataPriceTrunklineRoute);
}

14
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceTrunklineRouteMapper.xml

@ -0,0 +1,14 @@
<?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.basicdata.mapper.BasicdataPriceTrunklineRouteMapper">
<!-- 通用查询映射结果 -->
<resultMap id="basicdataPriceTrunklineRouteResultMap" type="com.logpm.basicdata.entity.BasicdataPriceRouteEntity">
</resultMap>
<select id="selectBasicdataPriceTrunklineRoutePage" resultMap="basicdataPriceTrunklineRouteResultMap">
select * from logpm_basicdata_price_trunkline_route where is_deleted = 0
</select>
</mapper>

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

@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataCategoryEntity;
import com.logpm.basicdata.excel.BasicdataCategoryExcel;
import com.logpm.basicdata.vo.BasicdataCategoryVO;
import com.logpm.basicdata.vo.PriceCategoryVO;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
@ -56,5 +57,5 @@ public interface IBasicdataCategoryService extends BaseService<BasicdataCategory
List<JSONObject> findListByName(String goodsName);
List<BasicdataCategoryEntity> listName(BasicdataCategoryVO basicdataCategory);
List<PriceCategoryVO> findCategoryByIds(List<Long> newArrayList);
}

39
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceCategoryBasicService.java

@ -0,0 +1,39 @@
/*
* 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.basicdata.service;
import com.logpm.basicdata.entity.BasicdataPriceCategoryBasicEntity;
import org.springblade.core.mp.base.BaseService;
/**
* 基础价格按品类计费 服务类
*
* @author zqb
* @since 2024-04-02
*/
public interface IBasicdataPriceCategoryBasicService extends BaseService<BasicdataPriceCategoryBasicEntity> {
/**
* 根据价格ID移除相关记录
*
* @param priceId 价格ID用于标识需要被移除的记录
* 如果提供了一个不存在的价格ID则该操作可能不执行任何操作
* 长整型不能为null
*/
void removeByPriceId(Long priceId);
}

39
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceCategoryDispatchService.java

@ -0,0 +1,39 @@
/*
* 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.basicdata.service;
import com.logpm.basicdata.entity.BasicdataPriceCategoryDispatchEntity;
import org.springblade.core.mp.base.BaseService;
/**
* 基础价格按品类计费 服务类
*
* @author zqb
* @since 2024-04-02
*/
public interface IBasicdataPriceCategoryDispatchService extends BaseService<BasicdataPriceCategoryDispatchEntity> {
/**
* 根据价格ID移除相关记录
*
* @param priceId 价格ID用于标识需要被移除的记录
* 如果提供了一个不存在的价格ID则该操作可能不执行任何操作
* 长整型不能为null
*/
void removeByPriceId(Long priceId);
}

39
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceCategoryWarehouseService.java

@ -0,0 +1,39 @@
/*
* 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.basicdata.service;
import com.logpm.basicdata.entity.BasicdataPriceCategoryWarehouseEntity;
import org.springblade.core.mp.base.BaseService;
/**
* 基础价格按品类计费 服务类
*
* @author zqb
* @since 2024-04-02
*/
public interface IBasicdataPriceCategoryWarehouseService extends BaseService<BasicdataPriceCategoryWarehouseEntity> {
/**
* 根据价格ID移除相关记录
*
* @param priceId 价格ID用于标识需要被移除的记录
* 如果提供了一个不存在的价格ID则该操作可能不执行任何操作
* 长整型不能为null
*/
void removeByPriceId(Long priceId);
}

35
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceFullVehicleService.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.basicdata.service;
import com.logpm.basicdata.entity.BasicdataPriceFullVehicleEntity;
import org.springblade.core.mp.base.BaseService;
/**
* 基础价格整车计费 服务类
*
* @author zqb
* @since 2024-04-02
*/
public interface IBasicdataPriceFullVehicleService extends BaseService<BasicdataPriceFullVehicleEntity> {
/**
* 根据价格id删除
* @param id
*/
void removeByPriceId(Long priceId);
}

40
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceGeneralService.java

@ -0,0 +1,40 @@
/*
* 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.basicdata.service;
import com.logpm.basicdata.entity.BasicdataPriceGeneralEntity;
import org.springblade.core.mp.base.BaseService;
/**
* 基础价格一般计费 服务类
*
* @author zqb
* @since 2024-04-02
*/
public interface IBasicdataPriceGeneralService extends BaseService<BasicdataPriceGeneralEntity> {
/**
* 根据价格ID移除相关记录
*
* @param priceId 价格ID用于标识需要被移除的记录
* 如果提供了一个不存在的价格ID则该操作可能不执行任何操作
* 长整型不能为null
*/
void removeByPriceId(Long priceId);
}

57
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceRouteService.java

@ -0,0 +1,57 @@
/*
* 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.basicdata.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataPriceRouteEntity;
import com.logpm.basicdata.excel.BasicdataPriceRouteExcel;
import com.logpm.basicdata.vo.BasicdataPriceRouteVO;
import com.logpm.basicdata.vo.PriceRouteVO;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* 基础价格路径 服务类
*
* @author zqb
* @since 2024-04-08
*/
public interface IBasicdataPriceRouteService extends BaseService<BasicdataPriceRouteEntity> {
/**
* 自定义分页
*
* @param page
* @param basicdataPriceRoute
* @return
*/
IPage<BasicdataPriceRouteVO> selectBasicdataPriceRoutePage(IPage<BasicdataPriceRouteVO> page, BasicdataPriceRouteVO basicdataPriceRoute);
/**
* 导出数据
*
* @param queryWrapper
* @return
*/
List<BasicdataPriceRouteExcel> exportBasicdataPriceRoute(Wrapper<BasicdataPriceRouteEntity> queryWrapper);
Long saveRoute(PriceRouteVO vo);
PriceRouteVO detail(Long id);
}

61
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceService.java

@ -0,0 +1,61 @@
/*
* 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.basicdata.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataPriceEntity;
import com.logpm.basicdata.excel.BasicdataPriceExcel;
import com.logpm.basicdata.vo.BasicdataPriceBasicUpdateVO;
import com.logpm.basicdata.vo.BasicdataPricePageVO;
import com.logpm.basicdata.vo.BasicdataPriceVO;
import com.logpm.basicdata.vo.PriceVO;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* 基础价格表 服务类
*
* @author zqb
* @since 2024-04-02
*/
public interface IBasicdataPriceService extends BaseService<BasicdataPriceEntity> {
/**
* 自定义分页
*
* @param page
* @param basicdataPrice
* @return
*/
IPage<BasicdataPricePageVO > selectBasicdataPricePage(IPage<BasicdataPricePageVO > page, BasicdataPriceVO basicdataPrice);
/**
* 导出数据
*
* @param queryWrapper
* @return
*/
List<BasicdataPriceExcel> exportBasicdataPrice(Wrapper<BasicdataPriceEntity> queryWrapper);
Boolean basicUpdate(BasicdataPriceBasicUpdateVO vo);
Boolean updatePrice(PriceVO vo);
PriceVO detail(Long id);
}

66
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceTemplateService.java

@ -0,0 +1,66 @@
/*
* 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.basicdata.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.basicdata.entity.BasicdataPriceTemplateEntity;
import com.logpm.basicdata.vo.BasicdataPriceTemplateVO;
import com.logpm.basicdata.excel.BasicdataPriceTemplateExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* 基础价格模板表 服务类
*
* @author zqb
* @since 2024-04-01
*/
public interface IBasicdataPriceTemplateService extends BaseService<BasicdataPriceTemplateEntity> {
/**
* 自定义分页
*
* @param page
* @param basicdataPriceTemplate
* @return
*/
IPage<BasicdataPriceTemplateVO> selectBasicdataPriceTemplatePage(IPage<BasicdataPriceTemplateVO> page, BasicdataPriceTemplateVO basicdataPriceTemplate);
/**
* 导出数据
*
* @param queryWrapper
* @return
*/
List<BasicdataPriceTemplateExcel> exportBasicdataPriceTemplate(Wrapper<BasicdataPriceTemplateEntity> queryWrapper);
Boolean updateByCheckType(BasicdataPriceTemplateVO basicdataPriceTemplate);
BasicdataPriceTemplateVO detail(Long id);
Long saveTemplate(BasicdataPriceTemplateEntity basicdataPriceTemplate);
/**
* 根据服务类型清除数据
*
* @param templateId 模板ID用于指定需要清除数据的模板
* @param checkType 检查类型用于指定清除数据的检查类型
* @return 返回一个布尔值表示数据是否成功被清除
*/
Boolean clearDataByServiceType(Long templateId, Integer checkType);
}

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

@ -24,6 +24,7 @@ import com.logpm.basicdata.excel.BasicdataCategoryExcel;
import com.logpm.basicdata.mapper.BasicdataCategoryMapper;
import com.logpm.basicdata.service.IBasicdataCategoryService;
import com.logpm.basicdata.vo.BasicdataCategoryVO;
import com.logpm.basicdata.vo.PriceCategoryVO;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
@ -67,5 +68,9 @@ public class BasicdataCategoryServiceImpl extends BaseServiceImpl<BasicdataCateg
public List<BasicdataCategoryEntity> listName(BasicdataCategoryVO basicdataCategory) {
return baseMapper.listName(basicdataCategory.getName());
}
@Override
public List<PriceCategoryVO> findCategoryByIds(List<Long> ids) {
return baseMapper.findCategoryByIds(ids);
}
}

41
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceCategoryBasicServiceImpl.java

@ -0,0 +1,41 @@
/*
* 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.basicdata.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.logpm.basicdata.entity.BasicdataPriceCategoryBasicEntity;
import com.logpm.basicdata.mapper.BasicdataPriceCategoryBasicMapper;
import com.logpm.basicdata.service.IBasicdataPriceCategoryBasicService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* 基础价格按品类计费 服务实现类
*
* @author zqb
* @since 2024-04-02
*/
@Service
public class BasicdataPriceCategoryBasicServiceImpl extends BaseServiceImpl<BasicdataPriceCategoryBasicMapper, BasicdataPriceCategoryBasicEntity> implements IBasicdataPriceCategoryBasicService {
@Override
public void removeByPriceId(Long priceId) {
if (ObjectUtil.isNotEmpty(priceId)) {
baseMapper.removeByPriceId(priceId);
}
}
}

41
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceCategoryDispatchServiceImpl.java

@ -0,0 +1,41 @@
/*
* 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.basicdata.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.logpm.basicdata.entity.BasicdataPriceCategoryDispatchEntity;
import com.logpm.basicdata.mapper.BasicdataPriceCategoryDispatchMapper;
import com.logpm.basicdata.service.IBasicdataPriceCategoryDispatchService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* 基础价格按品类计费 服务实现类
*
* @author zqb
* @since 2024-04-02
*/
@Service
public class BasicdataPriceCategoryDispatchServiceImpl extends BaseServiceImpl<BasicdataPriceCategoryDispatchMapper, BasicdataPriceCategoryDispatchEntity> implements IBasicdataPriceCategoryDispatchService {
@Override
public void removeByPriceId(Long priceId) {
if (ObjectUtil.isNotEmpty(priceId)) {
this.baseMapper.removeByPriceId(priceId);
}
}
}

41
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceCategoryWarehouseServiceImpl.java

@ -0,0 +1,41 @@
/*
* 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.basicdata.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.logpm.basicdata.entity.BasicdataPriceCategoryWarehouseEntity;
import com.logpm.basicdata.mapper.BasicdataPriceCategoryWarehouseMapper;
import com.logpm.basicdata.service.IBasicdataPriceCategoryWarehouseService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* 基础价格按品类计费 服务实现类
*
* @author zqb
* @since 2024-04-02
*/
@Service
public class BasicdataPriceCategoryWarehouseServiceImpl extends BaseServiceImpl<BasicdataPriceCategoryWarehouseMapper, BasicdataPriceCategoryWarehouseEntity> implements IBasicdataPriceCategoryWarehouseService {
@Override
public void removeByPriceId(Long priceId) {
if (ObjectUtil.isNotEmpty(priceId)) {
baseMapper.removeByPriceId(priceId);
}
}
}

41
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceFullVehicleServiceImpl.java

@ -0,0 +1,41 @@
/*
* 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.basicdata.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.logpm.basicdata.entity.BasicdataPriceFullVehicleEntity;
import com.logpm.basicdata.mapper.BasicdataPriceFullVehicleMapper;
import com.logpm.basicdata.service.IBasicdataPriceFullVehicleService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* 基础价格整车计费 服务实现类
*
* @author zqb
* @since 2024-04-02
*/
@Service
public class BasicdataPriceFullVehicleServiceImpl extends BaseServiceImpl<BasicdataPriceFullVehicleMapper, BasicdataPriceFullVehicleEntity> implements IBasicdataPriceFullVehicleService {
@Override
public void removeByPriceId(Long priceId) {
if (ObjectUtil.isNotEmpty(priceId)) {
this.baseMapper.removeByPriceId(priceId);
}
}
}

42
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceGeneralServiceImpl.java

@ -0,0 +1,42 @@
/*
* 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.basicdata.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.logpm.basicdata.entity.BasicdataPriceGeneralEntity;
import com.logpm.basicdata.mapper.BasicdataPriceGeneralMapper;
import com.logpm.basicdata.service.IBasicdataPriceGeneralService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* 基础价格一般计费 服务实现类
*
* @author zqb
* @since 2024-04-02
*/
@Service
public class BasicdataPriceGeneralServiceImpl extends BaseServiceImpl<BasicdataPriceGeneralMapper, BasicdataPriceGeneralEntity> implements IBasicdataPriceGeneralService {
@Override
public void removeByPriceId(Long priceId) {
if (ObjectUtil.isNotEmpty(priceId)) {
baseMapper.removeByPriceId(priceId);
}
}
}

273
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceRouteServiceImpl.java

@ -0,0 +1,273 @@
/*
* 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.basicdata.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.entity.BasicdataPriceCategoryBasicEntity;
import com.logpm.basicdata.entity.BasicdataPriceFullVehicleEntity;
import com.logpm.basicdata.entity.BasicdataPriceGeneralEntity;
import com.logpm.basicdata.entity.BasicdataPriceRouteEntity;
import com.logpm.basicdata.enums.FullVehicleTypeEnums;
import com.logpm.basicdata.enums.GeneralServiceTypeEnums;
import com.logpm.basicdata.enums.PickupPricingTypeEnums;
import com.logpm.basicdata.enums.ServiceTypeEnums;
import com.logpm.basicdata.excel.BasicdataPriceRouteExcel;
import com.logpm.basicdata.mapper.BasicdataPriceRouteMapper;
import com.logpm.basicdata.service.IBasicdataPriceCategoryBasicService;
import com.logpm.basicdata.service.IBasicdataPriceFullVehicleService;
import com.logpm.basicdata.service.IBasicdataPriceGeneralService;
import com.logpm.basicdata.service.IBasicdataPriceRouteService;
import com.logpm.basicdata.vo.BasicdataPriceFullVehicleVO;
import com.logpm.basicdata.vo.BasicdataPriceRouteVO;
import com.logpm.basicdata.vo.PriceBasicVO;
import com.logpm.basicdata.vo.PriceRouteVO;
import lombok.RequiredArgsConstructor;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 基础价格路径 服务实现类
*
* @author zqb
* @since 2024-04-08
*/
@Service
@RequiredArgsConstructor
public class BasicdataPriceRouteServiceImpl extends BaseServiceImpl<BasicdataPriceRouteMapper, BasicdataPriceRouteEntity> implements IBasicdataPriceRouteService {
private final IBasicdataPriceFullVehicleService fullVehicleService;
private final IBasicdataPriceCategoryBasicService categoryBasicService;
private final IBasicdataPriceGeneralService generalService;
@Override
public IPage<BasicdataPriceRouteVO> selectBasicdataPriceRoutePage(IPage<BasicdataPriceRouteVO> page, BasicdataPriceRouteVO basicdataPriceRoute) {
return page.setRecords(baseMapper.selectBasicdataPriceRoutePage(page, basicdataPriceRoute));
}
@Override
public List<BasicdataPriceRouteExcel> exportBasicdataPriceRoute(Wrapper<BasicdataPriceRouteEntity> queryWrapper) {
List<BasicdataPriceRouteExcel> basicdataPriceRouteList = baseMapper.exportBasicdataPriceRoute(queryWrapper);
//basicdataPriceRouteList.forEach(basicdataPriceRoute -> {
// basicdataPriceRoute.setTypeName(DictCache.getValue(DictEnum.YES_NO, BasicdataPriceRoute.getType()));
//});
return basicdataPriceRouteList;
}
@Override
public Long saveRoute(PriceRouteVO vo) {
// 处理基础数据
BasicdataPriceRouteEntity route = new BasicdataPriceRouteEntity();
route.setId(vo.getId());
route.setSendOrgId(vo.getSendOrgId());
route.setPriceId(vo.getPriceId());
route.setServiceType(vo.getServiceType());
route.setStartCityId(vo.getStartCityId());
route.setStartProvinceId(vo.getStartProvinceId());
route.setStartCountyId(vo.getStartCountyId());
route.setEndCityId(vo.getEndCityId());
route.setEndProvinceId(vo.getEndProvinceId());
route.setEndCountyId(vo.getEndCountyId());
this.saveOrUpdate(route);
List<BasicdataPriceFullVehicleEntity> fullVehicleEntities = new ArrayList<>();
FullVehicleTypeEnums fullVehicleTypeEnums = null;
GeneralServiceTypeEnums generalServiceTypeEnums = null;
if (ObjectUtil.equal(vo.getServiceType(), ServiceTypeEnums.PICK_UP.getCode())) {
fullVehicleTypeEnums = FullVehicleTypeEnums.PICK_UP_ROUTE;
generalServiceTypeEnums = GeneralServiceTypeEnums.PICK_UP_ROUTE;
} else {
fullVehicleTypeEnums = FullVehicleTypeEnums.TRUNK_LINE_ROUTE;
generalServiceTypeEnums = GeneralServiceTypeEnums.TRUNK_LINE_ROUTE;
}
// 整车
if (CollUtil.isNotEmpty(vo.getFullVehicle())) {
FullVehicleTypeEnums finalFullVehicleTypeEnums = fullVehicleTypeEnums;
vo.getFullVehicle().forEach(fullVehicle -> {
buildFullVehicle(route.getId(), fullVehicleEntities, fullVehicle, finalFullVehicleTypeEnums.getCode());
});
if (CollUtil.isNotEmpty(fullVehicleEntities)) {
fullVehicleService.saveOrUpdateBatch(fullVehicleEntities);
}
}
// 按件
List<BasicdataPriceCategoryBasicEntity> categoryEntities = new ArrayList<>();
if (CollUtil.isNotEmpty(vo.getPieceCategory())) {
vo.getPieceCategory().forEach(pieceCategory -> {
buildCategory(route.getId(), categoryEntities, pieceCategory, PickupPricingTypeEnums.PIECE.getCode());
});
}
// 按方
if (CollUtil.isNotEmpty(vo.getCubeCategory())) {
vo.getCubeCategory().forEach(cubeCategory -> {
buildCategory(route.getId(), categoryEntities, cubeCategory, PickupPricingTypeEnums.CUBE.getCode());
});
}
// 按重量
if (CollUtil.isNotEmpty(vo.getWeightCategory())) {
vo.getWeightCategory().forEach(weightCategory -> {
buildCategory(route.getId(), categoryEntities, weightCategory, PickupPricingTypeEnums.WEIGHT.getCode());
});
}
if (CollUtil.isNotEmpty(categoryEntities)) {
categoryBasicService.saveOrUpdateBatch(categoryEntities);
}
// 最低计费
if (ObjectUtil.isNotEmpty(vo.getMinCost())) {
List<BasicdataPriceGeneralEntity> priceGeneralEntities = new ArrayList<>();
biuldGeneral(route.getId(), generalServiceTypeEnums.getCode(), vo.getMinCost(), vo.getAdditionalCost(), priceGeneralEntities);
generalService.saveOrUpdateBatch(priceGeneralEntities);
}
return route.getId();
}
@Override
public PriceRouteVO detail(Long id) {
// 1.查询基础数据
BasicdataPriceRouteEntity route = this.getById(id);
if (ObjectUtil.isNotEmpty(route)) {
Integer serviceType = route.getServiceType();
PriceRouteVO vo = new PriceRouteVO();
BeanUtil.copyProperties(route, vo);
// 2.查询整车
Integer type = null;
if (ObjectUtil.equal(serviceType, ServiceTypeEnums.PICK_UP.getCode())) {
type = FullVehicleTypeEnums.PICK_UP_ROUTE.getCode();
} else {
type = FullVehicleTypeEnums.TRUNK_LINE_ROUTE.getCode();
}
List<BasicdataPriceFullVehicleEntity> fullVehicleEntities = fullVehicleService.list(Wrappers.<BasicdataPriceFullVehicleEntity>lambdaQuery()
.eq(BasicdataPriceFullVehicleEntity::getBoId, route.getId())
.eq(BasicdataPriceFullVehicleEntity::getType, type));
if (CollUtil.isNotEmpty(fullVehicleEntities)) {
List<BasicdataPriceFullVehicleVO> fulls = new ArrayList<>();
fullVehicleEntities.forEach(fullVehicle -> {
BasicdataPriceFullVehicleVO basicdataPriceFullVehicleVO = new BasicdataPriceFullVehicleVO();
BeanUtil.copyProperties(fullVehicle, basicdataPriceFullVehicleVO);
fulls.add(basicdataPriceFullVehicleVO);
});
vo.setFullVehicle(fulls);
}
// 3.按品类
List<BasicdataPriceCategoryBasicEntity> categoryEntities = categoryBasicService.list(Wrappers.<BasicdataPriceCategoryBasicEntity>lambdaQuery()
.eq(BasicdataPriceCategoryBasicEntity::getBoId, route.getId()));
if (CollUtil.isNotEmpty(categoryEntities)) {
// 将categoryEntities转换为Map,其中type为key
Map<Integer, List<BasicdataPriceCategoryBasicEntity>> categoryMap = categoryEntities.stream().collect(Collectors.groupingBy(BasicdataPriceCategoryBasicEntity::getType));
// 按件
if (categoryMap.containsKey(PickupPricingTypeEnums.PIECE.getCode())) {
List<BasicdataPriceCategoryBasicEntity> pieceCategory = categoryMap.get(PickupPricingTypeEnums.PIECE.getCode());
List<PriceBasicVO> pieceCategoryVO = new ArrayList<>();
pieceCategory.forEach(piece -> {
PriceBasicVO basicdataPriceCategoryBasicVO = new PriceBasicVO();
BeanUtil.copyProperties(piece, basicdataPriceCategoryBasicVO);
pieceCategoryVO.add(basicdataPriceCategoryBasicVO);
});
vo.setPieceCategory(pieceCategoryVO);
}
// 按方
if (categoryMap.containsKey(PickupPricingTypeEnums.CUBE.getCode())) {
List<BasicdataPriceCategoryBasicEntity> cubeCategory = categoryMap.get(PickupPricingTypeEnums.CUBE.getCode());
List<PriceBasicVO> cubeCategoryVO = new ArrayList<>();
cubeCategory.forEach(cube -> {
PriceBasicVO basicdataPriceCategoryBasicVO = new PriceBasicVO();
BeanUtil.copyProperties(cube, basicdataPriceCategoryBasicVO);
cubeCategoryVO.add(basicdataPriceCategoryBasicVO);
});
vo.setCubeCategory(cubeCategoryVO);
}
// 按重量
if (categoryMap.containsKey(PickupPricingTypeEnums.WEIGHT.getCode())) {
List<BasicdataPriceCategoryBasicEntity> weightCategory = categoryMap.get(PickupPricingTypeEnums.WEIGHT.getCode());
List<PriceBasicVO> weightCategoryVO = new ArrayList<>();
weightCategory.forEach(weight -> {
PriceBasicVO basicdataPriceCategoryBasicVO = new PriceBasicVO();
BeanUtil.copyProperties(weight, basicdataPriceCategoryBasicVO);
});
vo.setWeightCategory(weightCategoryVO);
}
}
// 4.最低计费
List<BasicdataPriceGeneralEntity> generalEntities = generalService.list(Wrappers.<BasicdataPriceGeneralEntity>lambdaQuery()
.eq(BasicdataPriceGeneralEntity::getBoId, route.getId()));
if (CollUtil.isNotEmpty(generalEntities)) {
BasicdataPriceGeneralEntity generalEntity = generalEntities.get(0);
vo.setId(generalEntity.getId());
vo.setMinCost(generalEntity.getMinCost());
vo.setAdditionalCost(generalEntity.getAdditionalCost());
}
return vo;
}
throw new ServiceException("表单不存在");
}
private void biuldGeneral(Long priceId, Integer code, Double minCost, Double additionalCost, List<BasicdataPriceGeneralEntity> generalList) {
// 1 最低计费一个价格体系一个服务类型只存在一条
BasicdataPriceGeneralEntity generalEntity = generalService.getOne(Wrappers.<BasicdataPriceGeneralEntity>lambdaQuery()
.eq(BasicdataPriceGeneralEntity::getBoId, priceId)
.eq(BasicdataPriceGeneralEntity::getServiceType, code)
);
if (ObjectUtil.isEmpty(generalEntity)) {
generalEntity = new BasicdataPriceGeneralEntity();
generalEntity.setBoId(priceId);
generalEntity.setServiceType(code);
}
// 设置最低计费和加算价格
generalEntity.setMinCost(minCost);
generalEntity.setAdditionalCost(additionalCost);
generalList.add(generalEntity);
}
private void buildCategory(Long priceId, List<BasicdataPriceCategoryBasicEntity> cubeCategoryEntities, PriceBasicVO cubeCategory, Integer type) {
BasicdataPriceCategoryBasicEntity categoryEntity = new BasicdataPriceCategoryBasicEntity();
Long id = cubeCategory.getId();
if (ObjectUtil.isEmpty(id)) {
categoryEntity.setBoId(priceId);
categoryEntity.setType(type);
} else {
categoryEntity.setId(id);
}
categoryEntity.setPrice(cubeCategory.getPrice());
categoryEntity.setCategoryId(cubeCategory.getCategoryId());
cubeCategoryEntities.add(categoryEntity);
}
private void buildFullVehicle(Long priceId, List<BasicdataPriceFullVehicleEntity> fullVehicleEntities, BasicdataPriceFullVehicleVO fullVehicle, Integer type) {
BasicdataPriceFullVehicleEntity basicdataPriceFullVehicleEntity = new BasicdataPriceFullVehicleEntity();
basicdataPriceFullVehicleEntity.setPrice(fullVehicle.getPrice());
basicdataPriceFullVehicleEntity.setVehicleType(fullVehicle.getVehicleType());
if (ObjectUtil.isEmpty(fullVehicle.getId())) {
basicdataPriceFullVehicleEntity.setBoId(priceId);
basicdataPriceFullVehicleEntity.setType(type);
} else {
basicdataPriceFullVehicleEntity.setId(fullVehicle.getId());
}
fullVehicleEntities.add(basicdataPriceFullVehicleEntity);
}
}

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

File diff suppressed because it is too large Load Diff

437
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceTemplateServiceImpl.java

@ -0,0 +1,437 @@
/*
* 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.basicdata.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataBrandEntity;
import com.logpm.basicdata.entity.BasicdataPriceTemplateEntity;
import com.logpm.basicdata.enums.ServiceTypeEnums;
import com.logpm.basicdata.excel.BasicdataPriceTemplateExcel;
import com.logpm.basicdata.mapper.BasicdataPriceTemplateMapper;
import com.logpm.basicdata.service.IBasicdataBrandService;
import com.logpm.basicdata.service.IBasicdataCategoryService;
import com.logpm.basicdata.service.IBasicdataPriceTemplateService;
import com.logpm.basicdata.vo.BasicdataPriceTemplateVO;
import com.logpm.basicdata.vo.PriceCategoryVO;
import com.logpm.basicdata.wrapper.BasicdataPriceTemplateWrapper;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.HttpConstants;
import org.springblade.common.model.IDict;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.system.entity.User;
import org.springblade.system.feign.IUserClient;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* 基础价格模板表 服务实现类
*
* @author zqb
* @since 2024-04-01
*/
@AllArgsConstructor
@Service
public class BasicdataPriceTemplateServiceImpl extends BaseServiceImpl<BasicdataPriceTemplateMapper, BasicdataPriceTemplateEntity> implements IBasicdataPriceTemplateService {
private final IUserClient userClient;
private final IBasicdataCategoryService categoryService;
private final IBasicdataBrandService brandService;
@Override
public IPage<BasicdataPriceTemplateVO> selectBasicdataPriceTemplatePage(IPage<BasicdataPriceTemplateVO> page, BasicdataPriceTemplateVO basicdataPriceTemplate) {
List<BasicdataPriceTemplateVO> records = baseMapper.selectBasicdataPriceTemplatePage(page, basicdataPriceTemplate);
if (CollUtil.isNotEmpty(records)) {
List<Long> userIds = records.stream().map(BasicdataPriceTemplateVO::getCreateUser).collect(Collectors.toList());
List<Long> brandIds = records.stream().map(BasicdataPriceTemplateVO::getBrandId).collect(Collectors.toList());
List<BasicdataBrandEntity> basicdataBrandEntities = brandService.listByIds(brandIds);
Map<Long, String> brandNameMap = new HashMap<>();
if (CollUtil.isNotEmpty(basicdataBrandEntities)) {
brandNameMap = basicdataBrandEntities.stream().collect(Collectors.toMap(BasicdataBrandEntity::getId, BasicdataBrandEntity::getBrandName));
}
R<List<User>> listR = userClient.userInfoByIds(AuthUtil.getTenantId(), userIds.stream().map(Object::toString).collect(Collectors.joining(",")));
Map<Long, String> names = new HashMap<>();
Map<Long, String> accounts = new HashMap<>();
if (ObjectUtil.equal(HttpConstants.HTTP.HTTP_RESOURCE_CODE.SUCCESS_CODE, listR.getCode())) {
names = listR.getData().stream().collect(Collectors.toMap(User::getId, User::getName));
accounts = listR.getData().stream().collect(Collectors.toMap(User::getId, User::getAccount));
}
for (BasicdataPriceTemplateVO record : records) {
Long createUser = record.getCreateUser();
if (ObjectUtil.equal(accounts.get(createUser), "admin")) {
record.setTemplateType("系统");
} else {
record.setTemplateType("用户");
}
record.setUserName(names.get(createUser));
if (brandNameMap.containsKey(record.getBrandId())) {
record.setBrandName(brandNameMap.get(record.getBrandId()));
}
String serviceType = record.getServiceType();
if (StrUtil.isNotEmpty(serviceType)) {
StringBuilder sb = new StringBuilder();
List<String> split = StrUtil.split(serviceType, ",");
for (String s : split) {
sb.append(IDict.getTextByCode(ServiceTypeEnums.class, Convert.toInt(s))).append("/");
}
String s = sb.toString();
record.setServiceType(s.substring(0, s.length() - 1));
}
}
}
return page.setRecords(records);
}
@Override
public List<BasicdataPriceTemplateExcel> exportBasicdataPriceTemplate(Wrapper<BasicdataPriceTemplateEntity> queryWrapper) {
List<BasicdataPriceTemplateExcel> basicdataPriceTemplateList = baseMapper.exportBasicdataPriceTemplate(queryWrapper);
//basicdataPriceTemplateList.forEach(basicdataPriceTemplate -> {
// basicdataPriceTemplate.setTypeName(DictCache.getValue(DictEnum.YES_NO, BasicdataPriceTemplate.getType()));
//});
return basicdataPriceTemplateList;
}
@Override
public Boolean updateByCheckType(BasicdataPriceTemplateVO basicdataPriceTemplate) {
Integer checkType = basicdataPriceTemplate.getCheckType();
if (ObjectUtil.isEmpty(checkType)) {
throw new ServiceException("参数缺失,缺少当前选择的服务类型");
}
if (ObjectUtil.isEmpty(basicdataPriceTemplate.getId())) {
throw new ServiceException("修改时,id不能为空");
}
checkParam(basicdataPriceTemplate);
BasicdataPriceTemplateEntity priceTemplateEntity = new BasicdataPriceTemplateEntity();
priceTemplateEntity.setId(basicdataPriceTemplate.getId());
priceTemplateEntity.setServiceType(basicdataPriceTemplate.getServiceType());
priceTemplateEntity.setName(basicdataPriceTemplate.getName());
priceTemplateEntity.setBrandId(basicdataPriceTemplate.getBrandId());
ServiceTypeEnums currentDict = IDict.getByCode(ServiceTypeEnums.class, checkType);
switch (currentDict) {
case PICK_UP:
String pickupPricingType = basicdataPriceTemplate.getPickupPricingType();
if (StrUtil.isEmpty(pickupPricingType)) {
throw new ServiceException("请选择提货计价方式");
}
priceTemplateEntity.setPickupPricingType(basicdataPriceTemplate.getPickupPricingType());
priceTemplateEntity.setPickupIsByCategory(basicdataPriceTemplate.getPickupIsByCategory());
priceTemplateEntity.setPickupPieceCategory(basicdataPriceTemplate.getPickupPieceCategory());
priceTemplateEntity.setPickupCubeCategory(basicdataPriceTemplate.getPickupCubeCategory());
priceTemplateEntity.setPickupWeightCategory(basicdataPriceTemplate.getPickupWeightCategory());
priceTemplateEntity.setPickupIsMinCost(basicdataPriceTemplate.getPickupIsMinCost());
priceTemplateEntity.setPickupMinCostType(basicdataPriceTemplate.getPickupMinCostType());
break;
case TRUNK_LINE:
String trunklinePricingType = basicdataPriceTemplate.getTrunklinePricingType();
if (StrUtil.isEmpty(trunklinePricingType)) {
throw new ServiceException("请选择干线计价方式");
}
priceTemplateEntity.setTrunklinePricingType(basicdataPriceTemplate.getTrunklinePricingType());
priceTemplateEntity.setTrunklineIsUnifyAreaBill(basicdataPriceTemplate.getTrunklineIsUnifyAreaBill());
priceTemplateEntity.setTrunklineIsByCategory(basicdataPriceTemplate.getTrunklineIsByCategory());
priceTemplateEntity.setTrunklinePieceCategory(basicdataPriceTemplate.getTrunklinePieceCategory());
priceTemplateEntity.setTrunklineCubeCategory(basicdataPriceTemplate.getTrunklineCubeCategory());
priceTemplateEntity.setTrunklineWeightCategory(basicdataPriceTemplate.getTrunklineWeightCategory());
priceTemplateEntity.setTrunklineIsPeculiarSetup(basicdataPriceTemplate.getTrunklineIsPeculiarSetup());
priceTemplateEntity.setTrunklineIsMinCost(basicdataPriceTemplate.getTrunklineIsMinCost());
priceTemplateEntity.setTrunklineMinCostType(basicdataPriceTemplate.getTrunklineMinCostType());
break;
case WAREHOUSE:
Integer warehousePricingType = basicdataPriceTemplate.getWarehousePricingType();
if (ObjectUtil.isEmpty(warehousePricingType)) {
throw new ServiceException("请选择仓储计价方式");
}
priceTemplateEntity.setWarehousePricingType(basicdataPriceTemplate.getWarehousePricingType());
priceTemplateEntity.setWarehousePricingMode(basicdataPriceTemplate.getWarehousePricingMode());
priceTemplateEntity.setWarehouseCalculationBasis(basicdataPriceTemplate.getWarehouseCalculationBasis());
priceTemplateEntity.setWarehouseIsByCategory(basicdataPriceTemplate.getWarehouseIsByCategory());
priceTemplateEntity.setWarehousePieceCategory(basicdataPriceTemplate.getWarehousePieceCategory());
priceTemplateEntity.setWarehouseSubjoinFeeUnit(basicdataPriceTemplate.getWarehouseSubjoinFeeUnit());
priceTemplateEntity.setWarehouseIsManageFee(basicdataPriceTemplate.getWarehouseIsManageFee());
priceTemplateEntity.setWarehouseIsOperateFee(basicdataPriceTemplate.getWarehouseIsOperateFee());
priceTemplateEntity.setWarehouseIsSortFee(basicdataPriceTemplate.getWarehouseIsSortFee());
priceTemplateEntity.setWarehouseIsCategorySubjoin(basicdataPriceTemplate.getWarehouseIsCategorySubjoin());
priceTemplateEntity.setWarehouseSubjoinCategory(basicdataPriceTemplate.getWarehouseSubjoinCategory());
break;
case DISPATCH:
String dispatchPricingType = basicdataPriceTemplate.getDispatchPricingType();
if (StrUtil.isEmpty(dispatchPricingType)) {
throw new ServiceException("请选择配送计价方式");
}
priceTemplateEntity.setDispatchServiceType(basicdataPriceTemplate.getDispatchServiceType());
priceTemplateEntity.setDispatchPricingType(basicdataPriceTemplate.getDispatchPricingType());
priceTemplateEntity.setDispatchIsByCategory(basicdataPriceTemplate.getDispatchIsByCategory());
priceTemplateEntity.setDispatchIsLeaveBehind(basicdataPriceTemplate.getDispatchIsLeaveBehind());
priceTemplateEntity.setDispatchPieceCategory(basicdataPriceTemplate.getDispatchPieceCategory());
priceTemplateEntity.setDispatchCubeCategory(basicdataPriceTemplate.getDispatchCubeCategory());
priceTemplateEntity.setDispatchWeightCategory(basicdataPriceTemplate.getDispatchWeightCategory());
priceTemplateEntity.setDispatchIsCategorySubjoin(basicdataPriceTemplate.getDispatchIsCategorySubjoin());
priceTemplateEntity.setDispatchIsSortFee(basicdataPriceTemplate.getDispatchIsSortFee());
priceTemplateEntity.setDispatchIsOperateFee(basicdataPriceTemplate.getDispatchIsOperateFee());
priceTemplateEntity.setDispatchIsStairsCarryingCharge(basicdataPriceTemplate.getDispatchIsStairsCarryingCharge());
priceTemplateEntity.setDispatchIsFeeFloor(basicdataPriceTemplate.getDispatchIsFeeFloor());
priceTemplateEntity.setDispatchIsShiftingCharge(basicdataPriceTemplate.getDispatchIsShiftingCharge());
priceTemplateEntity.setDispatchSubjoinCategory(basicdataPriceTemplate.getDispatchSubjoinCategory());
priceTemplateEntity.setDispatchIsMinCost(basicdataPriceTemplate.getDispatchIsMinCost());
priceTemplateEntity.setDispatchMinCostMode(basicdataPriceTemplate.getDispatchMinCostMode());
priceTemplateEntity.setDispatchMinCostType(basicdataPriceTemplate.getDispatchMinCostType());
priceTemplateEntity.setDispatchIsUpwardJudgment(basicdataPriceTemplate.getDispatchIsUpwardJudgment());
break;
case INSTALL:
break;
default:
throw new ServiceException("当前选择的类型不存在");
}
this.baseMapper.updateById(priceTemplateEntity);
return Boolean.TRUE;
}
@Override
public BasicdataPriceTemplateVO detail(Long id) {
BasicdataPriceTemplateEntity detail = this.getById(id);
BasicdataPriceTemplateVO basicdataPriceTemplateVO = null;
if (ObjectUtil.isNotEmpty(detail)) {
basicdataPriceTemplateVO = BasicdataPriceTemplateWrapper.build().entityVO(detail);
}
Set<Long> categoryIds = new HashSet<>();
biuldCategory(categoryIds, basicdataPriceTemplateVO);
return basicdataPriceTemplateVO;
}
@Override
public Long saveTemplate(BasicdataPriceTemplateEntity basicdataPriceTemplate) {
checkParam(basicdataPriceTemplate);
this.save(basicdataPriceTemplate);
return basicdataPriceTemplate.getId();
}
@Override
public Boolean clearDataByServiceType(Long templateId, Integer checkType) {
// 更新服务类型
BasicdataPriceTemplateEntity templateEntity = this.getById(templateId);
if (ObjectUtil.isEmpty(templateEntity)) {
throw new ServiceException("模版不存在,请检查");
}
String serviceType = templateEntity.getServiceType();
if (StrUtil.isNotEmpty(serviceType)) {
List<String> types = CollUtil.newArrayList(serviceType.split(","));
List<String> collect = types.stream().filter(type -> !ObjectUtil.equal(type, checkType)).collect(Collectors.toList());
if (CollUtil.isNotEmpty(collect)) {
templateEntity.setServiceType(StrUtil.join(",", collect));
}
}
// 清空指定类型的数据
ServiceTypeEnums currentDict = IDict.getByCode(ServiceTypeEnums.class, checkType);
switch (currentDict) {
case PICK_UP:
templateEntity.setPickupPricingType(null);
templateEntity.setPickupIsByCategory(null);
templateEntity.setPickupPieceCategory(null);
templateEntity.setPickupCubeCategory(null);
templateEntity.setPickupWeightCategory(null);
templateEntity.setPickupIsMinCost(null);
templateEntity.setPickupMinCostType(null);
break;
case TRUNK_LINE:
templateEntity.setTrunklinePricingType(null);
templateEntity.setTrunklineIsUnifyAreaBill(null);
templateEntity.setTrunklineIsByCategory(null);
templateEntity.setTrunklinePieceCategory(null);
templateEntity.setTrunklineCubeCategory(null);
templateEntity.setTrunklineWeightCategory(null);
templateEntity.setTrunklineIsPeculiarSetup(null);
templateEntity.setTrunklineIsMinCost(null);
templateEntity.setTrunklineMinCostType(null);
break;
case WAREHOUSE:
templateEntity.setWarehousePricingType(null);
templateEntity.setWarehousePricingMode(null);
templateEntity.setWarehouseCalculationBasis(null);
templateEntity.setWarehouseIsByCategory(null);
templateEntity.setWarehousePieceCategory(null);
templateEntity.setWarehouseSubjoinFeeUnit(null);
templateEntity.setWarehouseIsManageFee(null);
templateEntity.setWarehouseIsOperateFee(null);
templateEntity.setWarehouseIsSortFee(null);
templateEntity.setWarehouseIsCategorySubjoin(null);
templateEntity.setWarehouseSubjoinCategory(null);
break;
case DISPATCH:
templateEntity.setDispatchServiceType(null);
templateEntity.setDispatchPricingType(null);
templateEntity.setDispatchIsByCategory(null);
templateEntity.setDispatchIsLeaveBehind(null);
templateEntity.setDispatchPieceCategory(null);
templateEntity.setDispatchCubeCategory(null);
templateEntity.setDispatchWeightCategory(null);
templateEntity.setDispatchIsCategorySubjoin(null);
templateEntity.setDispatchIsSortFee(null);
templateEntity.setDispatchIsOperateFee(null);
templateEntity.setDispatchIsStairsCarryingCharge(null);
templateEntity.setDispatchIsFeeFloor(null);
templateEntity.setDispatchIsShiftingCharge(null);
templateEntity.setDispatchSubjoinCategory(null);
templateEntity.setDispatchIsMinCost(null);
templateEntity.setDispatchMinCostMode(null);
templateEntity.setDispatchMinCostType(null);
templateEntity.setDispatchIsUpwardJudgment(null);
break;
case INSTALL:
break;
default:
throw new ServiceException("当前选择的类型不存在");
}
this.saveOrUpdate(templateEntity);
return Boolean.TRUE;
}
private void checkParam(BasicdataPriceTemplateEntity basicdataPriceTemplate) {
checkDataHasDuplicates(basicdataPriceTemplate.getPickupCubeCategory());
checkDataHasDuplicates(basicdataPriceTemplate.getPickupPieceCategory());
checkDataHasDuplicates(basicdataPriceTemplate.getPickupWeightCategory());
checkDataHasDuplicates(basicdataPriceTemplate.getTrunklineCubeCategory());
checkDataHasDuplicates(basicdataPriceTemplate.getTrunklinePieceCategory());
checkDataHasDuplicates(basicdataPriceTemplate.getTrunklineWeightCategory());
checkDataHasDuplicates(basicdataPriceTemplate.getWarehousePieceCategory());
checkDataHasDuplicates(basicdataPriceTemplate.getWarehouseSubjoinCategory());
checkDataHasDuplicates(basicdataPriceTemplate.getDispatchCubeCategory());
checkDataHasDuplicates(basicdataPriceTemplate.getDispatchPieceCategory());
checkDataHasDuplicates(basicdataPriceTemplate.getDispatchWeightCategory());
checkDataHasDuplicates(basicdataPriceTemplate.getDispatchSubjoinCategory());
}
private void checkDataHasDuplicates(String pickupCubeCategory) {
if (StrUtil.isNotEmpty(pickupCubeCategory)) {
if (hasDuplicates(Arrays.asList(pickupCubeCategory.split(",")))) {
throw new ServiceException("品类存在重复数据,请检查");
}
}
}
private <T> boolean hasDuplicates(Collection<T> collection) {
return collection.stream()
.collect(Collectors.toMap(Function.identity(), v -> true, (existing, replacement) -> existing, HashMap::new))
.size() != collection.size();
}
private void biuldCategory(Set<Long> categoryIds, BasicdataPriceTemplateVO basicdataPriceTemplateVO) {
// 提货
String pickupCubeCategory = basicdataPriceTemplateVO.getPickupCubeCategory();
initCategoryIds(categoryIds, pickupCubeCategory);
String pickupPieceCategory = basicdataPriceTemplateVO.getPickupPieceCategory();
initCategoryIds(categoryIds, pickupPieceCategory);
String pickupWeightCategory = basicdataPriceTemplateVO.getPickupWeightCategory();
initCategoryIds(categoryIds, pickupWeightCategory);
// 干线
String trunklineCubeCategory = basicdataPriceTemplateVO.getTrunklineCubeCategory();
initCategoryIds(categoryIds, trunklineCubeCategory);
String trunklinePieceCategory = basicdataPriceTemplateVO.getTrunklinePieceCategory();
initCategoryIds(categoryIds, trunklinePieceCategory);
String trunklineWeightCategory = basicdataPriceTemplateVO.getTrunklineWeightCategory();
initCategoryIds(categoryIds, trunklineWeightCategory);
// 仓储
String warehousePieceCategory = basicdataPriceTemplateVO.getWarehousePieceCategory();
initCategoryIds(categoryIds, warehousePieceCategory);
String warehouseSubjoinCategory = basicdataPriceTemplateVO.getWarehouseSubjoinCategory();
initCategoryIds(categoryIds, warehouseSubjoinCategory);
// 配送
String dispatchCubeCategory = basicdataPriceTemplateVO.getDispatchCubeCategory();
initCategoryIds(categoryIds, dispatchCubeCategory);
String dispatchPieceCategory = basicdataPriceTemplateVO.getDispatchPieceCategory();
initCategoryIds(categoryIds, dispatchPieceCategory);
String dispatchWeightCategory = basicdataPriceTemplateVO.getDispatchWeightCategory();
initCategoryIds(categoryIds, dispatchWeightCategory);
String dispatchSubjoinCategory = basicdataPriceTemplateVO.getDispatchSubjoinCategory();
initCategoryIds(categoryIds, dispatchSubjoinCategory);
// 查询所有category
Map<Long, PriceCategoryVO> categoryVOMap = new HashMap<>();
if (CollUtil.isNotEmpty(categoryIds)) {
List<PriceCategoryVO> vos = categoryService.findCategoryByIds(CollUtil.newArrayList(categoryIds));
if (CollUtil.isNotEmpty(vos)) {
for (PriceCategoryVO vo : vos) {
categoryVOMap.put(vo.getId(), vo);
}
}
}
if (StrUtil.isNotEmpty(pickupCubeCategory)) {
basicdataPriceTemplateVO.setPickupCubeCategorys(Arrays.stream(pickupCubeCategory.split(",")).map(s -> categoryVOMap.get(Long.valueOf(s))).collect(Collectors.toList()));
}
if (StrUtil.isNotEmpty(pickupPieceCategory)) {
basicdataPriceTemplateVO.setPickupPieceCategorys(Arrays.stream(pickupPieceCategory.split(",")).map(s -> categoryVOMap.get(Long.valueOf(s))).collect(Collectors.toList()));
}
if (StrUtil.isNotEmpty(pickupWeightCategory)) {
basicdataPriceTemplateVO.setPickupWeightCategorys(Arrays.stream(pickupWeightCategory.split(",")).map(s -> categoryVOMap.get(Long.valueOf(s))).collect(Collectors.toList()));
}
if (StrUtil.isNotEmpty(trunklineCubeCategory)) {
basicdataPriceTemplateVO.setTrunklineCubeCategorys(Arrays.stream(trunklineCubeCategory.split(",")).map(s -> categoryVOMap.get(Long.valueOf(s))).collect(Collectors.toList()));
}
if (StrUtil.isNotEmpty(trunklinePieceCategory)) {
basicdataPriceTemplateVO.setTrunklinePieceCategorys(Arrays.stream(trunklinePieceCategory.split(",")).map(s -> categoryVOMap.get(Long.valueOf(s))).collect(Collectors.toList()));
}
if (StrUtil.isNotEmpty(trunklineWeightCategory)) {
basicdataPriceTemplateVO.setTrunklineWeightCategorys(Arrays.stream(trunklineWeightCategory.split(",")).map(s -> categoryVOMap.get(Long.valueOf(s))).collect(Collectors.toList()));
}
if (StrUtil.isNotEmpty(warehousePieceCategory)) {
basicdataPriceTemplateVO.setWarehousePieceCategorys(Arrays.stream(warehousePieceCategory.split(",")).map(s -> categoryVOMap.get(Long.valueOf(s))).collect(Collectors.toList()));
}
if (StrUtil.isNotEmpty(warehouseSubjoinCategory)) {
basicdataPriceTemplateVO.setWarehouseSubjoinCategorys(Arrays.stream(warehouseSubjoinCategory.split(",")).map(s -> categoryVOMap.get(Long.valueOf(s))).collect(Collectors.toList()));
}
if (StrUtil.isNotEmpty(dispatchCubeCategory)) {
basicdataPriceTemplateVO.setDispatchCubeCategorys(Arrays.stream(dispatchCubeCategory.split(",")).map(s -> categoryVOMap.get(Long.valueOf(s))).collect(Collectors.toList()));
}
if (StrUtil.isNotEmpty(dispatchPieceCategory)) {
basicdataPriceTemplateVO.setDispatchPieceCategorys(Arrays.stream(dispatchPieceCategory.split(",")).map(s -> categoryVOMap.get(Long.valueOf(s))).collect(Collectors.toList()));
}
if (StrUtil.isNotEmpty(dispatchWeightCategory)) {
basicdataPriceTemplateVO.setDispatchWeightCategorys(Arrays.stream(dispatchWeightCategory.split(",")).map(s -> categoryVOMap.get(Long.valueOf(s))).collect(Collectors.toList()));
}
if (StrUtil.isNotEmpty(dispatchSubjoinCategory)) {
basicdataPriceTemplateVO.setDispatchSubjoinCategorys(Arrays.stream(dispatchSubjoinCategory.split(",")).map(s -> categoryVOMap.get(Long.valueOf(s))).collect(Collectors.toList()));
}
}
private void initCategoryIds(Set<Long> categoryIds, String pickupCubeCategory) {
if (StrUtil.isNotEmpty(pickupCubeCategory)) {
String[] split = pickupCubeCategory.split(",");
for (String s : split) {
categoryIds.add(Long.valueOf(s));
}
}
}
}

50
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/BasicdataPriceRouteWrapper.java

@ -0,0 +1,50 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import com.logpm.basicdata.entity.BasicdataPriceRouteEntity;
import com.logpm.basicdata.vo.BasicdataPriceRouteVO;
import java.util.Objects;
/**
* 基础价格路径 包装类,返回视图层所需的字段
*
* @author zqb
* @since 2024-04-08
*/
public class BasicdataPriceRouteWrapper extends BaseEntityWrapper<BasicdataPriceRouteEntity, BasicdataPriceRouteVO> {
public static BasicdataPriceRouteWrapper build() {
return new BasicdataPriceRouteWrapper();
}
@Override
public BasicdataPriceRouteVO entityVO(BasicdataPriceRouteEntity basicdataPriceRoute) {
BasicdataPriceRouteVO basicdataPriceRouteVO = Objects.requireNonNull(BeanUtil.copy(basicdataPriceRoute, BasicdataPriceRouteVO.class));
//User createUser = UserCache.getUser(basicdataPriceRoute.getCreateUser());
//User updateUser = UserCache.getUser(basicdataPriceRoute.getUpdateUser());
//basicdataPriceRouteVO.setCreateUserName(createUser.getName());
//basicdataPriceRouteVO.setUpdateUserName(updateUser.getName());
return basicdataPriceRouteVO;
}
}

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

Loading…
Cancel
Save