|
|
@ -1346,6 +1346,9 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
String trunkLinePrice = excel.getTrunkLinePrice(); |
|
|
|
String trunkLinePrice = excel.getTrunkLinePrice(); |
|
|
|
String dispatchPrice = excel.getDispatchPrice(); |
|
|
|
String dispatchPrice = excel.getDispatchPrice(); |
|
|
|
if (StrUtil.isNotEmpty(pickupPrice) && Convert.toDouble(pickupPrice) > 0) { |
|
|
|
if (StrUtil.isNotEmpty(pickupPrice) && Convert.toDouble(pickupPrice) > 0) { |
|
|
|
|
|
|
|
String pickupPricingType = templateEntity.getPickupPricingType(); |
|
|
|
|
|
|
|
// 提货费的计价方式是否包含整车
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(pickupPricingType) && StrUtil.contains(pickupPricingType, PickupPricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { |
|
|
|
boolean b = ObjectUtil.isNotEmpty(pickupIsUnifyAreaBill) && ObjectUtil.equal(pickupIsUnifyAreaBill, BooleanZeroOneEnums.NO.getCode()); |
|
|
|
boolean b = ObjectUtil.isNotEmpty(pickupIsUnifyAreaBill) && ObjectUtil.equal(pickupIsUnifyAreaBill, BooleanZeroOneEnums.NO.getCode()); |
|
|
|
BasicdataPriceFullVehicleEntity entity = null; |
|
|
|
BasicdataPriceFullVehicleEntity entity = null; |
|
|
|
if (b) { |
|
|
|
if (b) { |
|
|
@ -1392,7 +1395,12 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(trunkLinePrice) && Convert.toDouble(trunkLinePrice) > 0) { |
|
|
|
if (StrUtil.isNotEmpty(trunkLinePrice) && Convert.toDouble(trunkLinePrice) > 0) { |
|
|
|
|
|
|
|
String pricingType = templateEntity.getTrunklinePricingType(); |
|
|
|
|
|
|
|
// 提货费的计价方式是否包含整车
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(pricingType) && StrUtil.contains(pricingType, TrunkLinePricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { |
|
|
|
boolean b = ObjectUtil.isNotEmpty(trunklineIsUnifyAreaBill) && ObjectUtil.equal(trunklineIsUnifyAreaBill, BooleanZeroOneEnums.NO.getCode()); |
|
|
|
boolean b = ObjectUtil.isNotEmpty(trunklineIsUnifyAreaBill) && ObjectUtil.equal(trunklineIsUnifyAreaBill, BooleanZeroOneEnums.NO.getCode()); |
|
|
|
BasicdataPriceFullVehicleEntity entity = null; |
|
|
|
BasicdataPriceFullVehicleEntity entity = null; |
|
|
|
if (b) { |
|
|
|
if (b) { |
|
|
@ -1438,8 +1446,12 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
entities.add(entity); |
|
|
|
entities.add(entity); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(dispatchPrice) && Convert.toDouble(dispatchPrice) > 0) { |
|
|
|
if (StrUtil.isNotEmpty(dispatchPrice) && Convert.toDouble(dispatchPrice) > 0) { |
|
|
|
|
|
|
|
String pricingType = templateEntity.getDispatchPricingType(); |
|
|
|
|
|
|
|
// 提货费的计价方式是否包含整车
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(pricingType) && StrUtil.contains(pricingType, DispatchPricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { |
|
|
|
BasicdataPriceFullVehicleEntity entity = null; |
|
|
|
BasicdataPriceFullVehicleEntity entity = null; |
|
|
|
if (dispatchEntityMap.containsKey(excel.getClient() + excel.getBrand() + excel.getVehicleType())) { |
|
|
|
if (dispatchEntityMap.containsKey(excel.getClient() + excel.getBrand() + excel.getVehicleType())) { |
|
|
|
entity = dispatchEntityMap.get(excel.getClient() + excel.getBrand() + excel.getVehicleType()); |
|
|
|
entity = dispatchEntityMap.get(excel.getClient() + excel.getBrand() + excel.getVehicleType()); |
|
|
@ -1462,6 +1474,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
// 价格
|
|
|
|
// 价格
|
|
|
|
entity.setPrice(Convert.toDouble(dispatchPrice)); |
|
|
|
entity.setPrice(Convert.toDouble(dispatchPrice)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (CollUtil.isNotEmpty(pickupEntityMap)) { |
|
|
|
if (CollUtil.isNotEmpty(pickupEntityMap)) { |
|
|
@ -1556,6 +1569,8 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
String dispatchMinCost = basicExcel.getDispatchMinCost(); |
|
|
|
String dispatchMinCost = basicExcel.getDispatchMinCost(); |
|
|
|
String dispatchLeaveBehindMinCost = basicExcel.getDispatchLeaveBehindMinCost(); |
|
|
|
String dispatchLeaveBehindMinCost = basicExcel.getDispatchLeaveBehindMinCost(); |
|
|
|
if (StrUtil.isNotEmpty(pickupMinCost) && Convert.toDouble(pickupMinCost) > 0) { |
|
|
|
if (StrUtil.isNotEmpty(pickupMinCost) && Convert.toDouble(pickupMinCost) > 0) { |
|
|
|
|
|
|
|
Integer isMinCost = templateEntity.getPickupIsMinCost(); |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(isMinCost) && ObjectUtil.equal(isMinCost, BooleanZeroOneEnums.YES.getCode())) { |
|
|
|
boolean b = ObjectUtil.isNotEmpty(pickupIsUnifyAreaBill) && ObjectUtil.equal(pickupIsUnifyAreaBill, BooleanZeroOneEnums.NO.getCode()); |
|
|
|
boolean b = ObjectUtil.isNotEmpty(pickupIsUnifyAreaBill) && ObjectUtil.equal(pickupIsUnifyAreaBill, BooleanZeroOneEnums.NO.getCode()); |
|
|
|
// 服务类型
|
|
|
|
// 服务类型
|
|
|
|
BasicdataPriceGeneralEntity basicEntity = null; |
|
|
|
BasicdataPriceGeneralEntity basicEntity = null; |
|
|
@ -1601,7 +1616,11 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(trunkLineMinCost) && Convert.toDouble(trunkLineMinCost) > 0) { |
|
|
|
if (StrUtil.isNotEmpty(trunkLineMinCost) && Convert.toDouble(trunkLineMinCost) > 0) { |
|
|
|
|
|
|
|
Integer isMinCost = templateEntity.getTrunklineIsMinCost(); |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(isMinCost) && ObjectUtil.equal(isMinCost, BooleanZeroOneEnums.YES.getCode())) { |
|
|
|
boolean b = ObjectUtil.isNotEmpty(trunklineIsUnifyAreaBill) && ObjectUtil.equal(trunklineIsUnifyAreaBill, BooleanZeroOneEnums.NO.getCode()); |
|
|
|
boolean b = ObjectUtil.isNotEmpty(trunklineIsUnifyAreaBill) && ObjectUtil.equal(trunklineIsUnifyAreaBill, BooleanZeroOneEnums.NO.getCode()); |
|
|
|
// 服务类型
|
|
|
|
// 服务类型
|
|
|
|
BasicdataPriceGeneralEntity basicEntity = null; |
|
|
|
BasicdataPriceGeneralEntity basicEntity = null; |
|
|
@ -1645,9 +1664,12 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
entities.add(basicEntity); |
|
|
|
entities.add(basicEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(dispatchMinCost) && Convert.toDouble(dispatchMinCost) > 0) { |
|
|
|
if (StrUtil.isNotEmpty(dispatchMinCost) && Convert.toDouble(dispatchMinCost) > 0) { |
|
|
|
// 服务类型
|
|
|
|
// 服务类型
|
|
|
|
|
|
|
|
Integer isMinCost = templateEntity.getDispatchIsMinCost(); |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(isMinCost) && ObjectUtil.equal(isMinCost, BooleanZeroOneEnums.YES.getCode())) { |
|
|
|
BasicdataPriceGeneralEntity basicEntity = null; |
|
|
|
BasicdataPriceGeneralEntity basicEntity = null; |
|
|
|
if (dispatchEntityMap.containsKey(basicExcel.getClient() + basicExcel.getBrand())) { |
|
|
|
if (dispatchEntityMap.containsKey(basicExcel.getClient() + basicExcel.getBrand())) { |
|
|
|
basicEntity = dispatchEntityMap.get(basicExcel.getClient() + basicExcel.getBrand()); |
|
|
|
basicEntity = dispatchEntityMap.get(basicExcel.getClient() + basicExcel.getBrand()); |
|
|
@ -1666,9 +1688,12 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
basicEntity.setAdditionalCost(Convert.toDouble(basicExcel.getDispatchAddCost())); |
|
|
|
basicEntity.setAdditionalCost(Convert.toDouble(basicExcel.getDispatchAddCost())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(dispatchLeaveBehindMinCost) && Convert.toDouble(dispatchLeaveBehindMinCost) > 0) { |
|
|
|
if (StrUtil.isNotEmpty(dispatchLeaveBehindMinCost) && Convert.toDouble(dispatchLeaveBehindMinCost) > 0) { |
|
|
|
// 服务类型
|
|
|
|
// 服务类型
|
|
|
|
|
|
|
|
Integer isMinCost = templateEntity.getDispatchIsMinCost(); |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(isMinCost) && ObjectUtil.equal(isMinCost, BooleanZeroOneEnums.YES.getCode())) { |
|
|
|
BasicdataPriceGeneralEntity basicEntity = null; |
|
|
|
BasicdataPriceGeneralEntity basicEntity = null; |
|
|
|
if (dispatchLeaveBehindEntityMap.containsKey(basicExcel.getClient() + basicExcel.getBrand())) { |
|
|
|
if (dispatchLeaveBehindEntityMap.containsKey(basicExcel.getClient() + basicExcel.getBrand())) { |
|
|
|
basicEntity = dispatchLeaveBehindEntityMap.get(basicExcel.getClient() + basicExcel.getBrand()); |
|
|
|
basicEntity = dispatchLeaveBehindEntityMap.get(basicExcel.getClient() + basicExcel.getBrand()); |
|
|
@ -1687,6 +1712,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
basicEntity.setAdditionalCost(Convert.toDouble(basicExcel.getDispatchLeaveBehindAddCost())); |
|
|
|
basicEntity.setAdditionalCost(Convert.toDouble(basicExcel.getDispatchLeaveBehindAddCost())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String dispatchUpwardJudgment = basicExcel.getDispatchUpwardJudgment(); |
|
|
|
String dispatchUpwardJudgment = basicExcel.getDispatchUpwardJudgment(); |
|
|
|
if (StrUtil.isNotEmpty(dispatchUpwardJudgment)) { |
|
|
|
if (StrUtil.isNotEmpty(dispatchUpwardJudgment)) { |
|
|
@ -1865,6 +1891,11 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void buildSaveDispatchAddExcel(Map<String, BasicdataCategoryEntity> categoryEntityMap, Map<String, BasicdataPriceCategoryDispatchEntity> dispatchAddEntityMap, BasicdataPriceCategoryV2Excel basicExcel, BasicdataPriceEntity priceEntity, BasicdataPriceTemplateEntity templateEntity) { |
|
|
|
private void buildSaveDispatchAddExcel(Map<String, BasicdataCategoryEntity> categoryEntityMap, Map<String, BasicdataPriceCategoryDispatchEntity> dispatchAddEntityMap, BasicdataPriceCategoryV2Excel basicExcel, BasicdataPriceEntity priceEntity, BasicdataPriceTemplateEntity templateEntity) { |
|
|
|
|
|
|
|
// 配送是否附加费
|
|
|
|
|
|
|
|
Integer dispatchIsAddFee = templateEntity.getDispatchIsAddFee(); |
|
|
|
|
|
|
|
if(ObjectUtil.isEmpty(dispatchIsAddFee) || ObjectUtil.equal(dispatchIsAddFee, BooleanZeroOneEnums.NO.getCode())){ |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
Integer pickupIsByCategory = templateEntity.getDispatchIsByCategory(); |
|
|
|
Integer pickupIsByCategory = templateEntity.getDispatchIsByCategory(); |
|
|
|
// 按品类计费
|
|
|
|
// 按品类计费
|
|
|
|
boolean categoryFlag = ObjectUtil.isNotEmpty(pickupIsByCategory) && ObjectUtil.equal(pickupIsByCategory, BooleanZeroOneEnums.YES.getCode()); |
|
|
|
boolean categoryFlag = ObjectUtil.isNotEmpty(pickupIsByCategory) && ObjectUtil.equal(pickupIsByCategory, BooleanZeroOneEnums.YES.getCode()); |
|
|
@ -1977,6 +2008,11 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void buildSaveWarehouseAddExcel(Map<String, BasicdataCategoryEntity> categoryEntityMap, Map<String, BasicdataPriceCategoryWarehouseEntity> warehouseAddEntityMap, BasicdataPriceCategoryV2Excel basicExcel, BasicdataPriceEntity priceEntity, BasicdataPriceTemplateEntity templateEntity) { |
|
|
|
private void buildSaveWarehouseAddExcel(Map<String, BasicdataCategoryEntity> categoryEntityMap, Map<String, BasicdataPriceCategoryWarehouseEntity> warehouseAddEntityMap, BasicdataPriceCategoryV2Excel basicExcel, BasicdataPriceEntity priceEntity, BasicdataPriceTemplateEntity templateEntity) { |
|
|
|
|
|
|
|
// 仓储是否附加费
|
|
|
|
|
|
|
|
Integer warehouseIsAddFee = templateEntity.getWarehouseIsAddFee(); |
|
|
|
|
|
|
|
if(ObjectUtil.isEmpty(warehouseIsAddFee) || ObjectUtil.equal(warehouseIsAddFee, BooleanZeroOneEnums.NO.getCode())){ |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
Integer pickupIsByCategory = templateEntity.getWarehouseIsCategorySubjoin(); |
|
|
|
Integer pickupIsByCategory = templateEntity.getWarehouseIsCategorySubjoin(); |
|
|
|
// 按品类计费
|
|
|
|
// 按品类计费
|
|
|
|
boolean categoryFlag = ObjectUtil.isNotEmpty(pickupIsByCategory) && ObjectUtil.equal(pickupIsByCategory, BooleanZeroOneEnums.YES.getCode()); |
|
|
|
boolean categoryFlag = ObjectUtil.isNotEmpty(pickupIsByCategory) && ObjectUtil.equal(pickupIsByCategory, BooleanZeroOneEnums.YES.getCode()); |
|
|
|