Browse Source

fix(all): 增加枚举

pull/28/head
zhaoqiaobo 12 months ago
parent
commit
47dbd69865
  1. 21
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/CostTypeEnums.java
  2. 27
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/DispatchPricingTypeEnums.java
  3. 21
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/DispatchTypeEnums.java
  4. 24
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/FullVehicleTypeEnums.java
  5. 24
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/GeneralServiceTypeEnums.java
  6. 23
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/MinCostTypeEnums.java
  7. 21
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/MinCostWayEnums.java
  8. 23
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/PickupPricingTypeEnums.java
  9. 24
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/ServiceTypeEnums.java
  10. 23
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/TrunkLinePricingTypeEnums.java
  11. 21
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/WarehouseCalculationBasisEnums.java
  12. 21
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/WarehousePricingModeEnums.java
  13. 23
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/WarehousePricingTypeEnums.java
  14. 23
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/enums/WarehousePricingUnitEnums.java
  15. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/job/BasicdataPriceJob.java

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);
}
}

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

@ -2,6 +2,7 @@ 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;
@ -52,9 +53,9 @@ public class BasicdataPriceJob {
}
}
for (BasicdataStoreBrandEntity basicdataStoreBrandEntity : list) {
String brandId = basicdataStoreBrandEntity.getBrandId();
Long brandId = basicdataStoreBrandEntity.getBrandId();
Long clientId = basicdataStoreBrandEntity.getClientId();
if (!priceMap.containsKey(brandId + clientId)) {
if (!priceMap.containsKey(StrUtil.toString(brandId) + StrUtil.toString(clientId))) {
BasicdataPriceEntity basicdataPriceEntity = new BasicdataPriceEntity();
basicdataPriceEntity.setClientId(clientId);
basicdataPriceEntity.setBrandId(Convert.toLong(brandId));

Loading…
Cancel
Save