Browse Source

Merge branch 'dev' into pre-production

master
zhaoqiaobo 8 months ago
parent
commit
dcce6f1972
  1. 19
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java

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

@ -1893,7 +1893,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
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())){
if (ObjectUtil.isEmpty(dispatchIsAddFee) || ObjectUtil.equal(dispatchIsAddFee, BooleanZeroOneEnums.NO.getCode())) {
return;
}
Integer pickupIsByCategory = templateEntity.getDispatchIsByCategory();
@ -2010,7 +2010,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
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())){
if (ObjectUtil.isEmpty(warehouseIsAddFee) || ObjectUtil.equal(warehouseIsAddFee, BooleanZeroOneEnums.NO.getCode())) {
return;
}
Integer pickupIsByCategory = templateEntity.getWarehouseIsCategorySubjoin();
@ -2822,7 +2822,13 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
}
// 校验价格,不能为空,只能是数字
checkPrice(rowMessage, "【提货-单价】只能为数字", basicExcel.getPickupPrice());
if (StrUtil.isNotEmpty(basicExcel.getPickupPrice())) {
checkDataNotEmpty(rowMessage, "提货-单位", basicExcel.getPickupUnit());
}
checkPrice(rowMessage, "【干线-单价】只能为数字", basicExcel.getTrunkLinePrice());
if (StrUtil.isNotEmpty(basicExcel.getPickupPrice())) {
checkDataNotEmpty(rowMessage, "干线-单位", basicExcel.getTrunkLineUnit());
}
checkPrice(rowMessage, "【仓储-30天内】只能为数字", basicExcel.getWithinThirtyPrice());
checkPrice(rowMessage, "【仓储-30-60天】只能为数字", basicExcel.getBetweenThirtySixtyPrice());
checkPrice(rowMessage, "【仓储-60-90天】只能为数字", basicExcel.getBeyondSixtyPrice());
@ -2831,6 +2837,9 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
checkPrice(rowMessage, "【仓储附加费-仓储管理费】只能为数字", basicExcel.getWarehouseManagementPrice());
checkPrice(rowMessage, "【仓储附加费-仓储分货费】只能为数字", basicExcel.getWarehouseSortPrice());
checkPrice(rowMessage, "【配送-一般单价】只能为数字", basicExcel.getDispatchPrice());
if (StrUtil.isNotEmpty(basicExcel.getDispatchPrice())) {
checkDataNotEmpty(rowMessage, "配送-单位", basicExcel.getDispatchUnit());
}
checkPrice(rowMessage, "【配送-遗留单价】只能为数字", basicExcel.getDispatchLeaveBehindPrice());
checkPrice(rowMessage, "【配送附加费-分货费】只能为数字", basicExcel.getDispatchSortPrice());
checkPrice(rowMessage, "【配送附加费-操作/装卸费价格】只能为数字", basicExcel.getDispatchHandlingPrice());
@ -2891,6 +2900,12 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
}
}
private void checkDataNotEmpty(StringBuilder rowMessage, String columnName, String data) {
if (StrUtil.isEmpty(data)) {
rowMessage.append(columnName).append("不能为空;");
}
}
private void checkCategoryExcel(Map<String, BasicdataCategoryEntity> categoryEntityMap, StringBuilder rowMessage, String category) {
if (StrUtil.isNotEmpty(category)) {
if (!categoryEntityMap.containsKey(category)) {

Loading…
Cancel
Save