Browse Source

Merge pull request 'dev' (#37) from dev into pre-production

Reviewed-on: #37
master
zhaoqiaobo 9 months ago
parent
commit
d11d7beb7f
  1. 19
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataGoodsShelfController.java
  2. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsShelfService.java
  3. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsShelfServiceImpl.java
  4. 10
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceRouteServiceImpl.java

19
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataGoodsShelfController.java

@ -245,16 +245,15 @@ public class BasicdataGoodsShelfController extends BladeController {
ExcelUtil.export(response, "货架数据" + DateUtil.time(), "货架数据表", list, BasicdataGoodsShelfExcel.class); ExcelUtil.export(response, "货架数据" + DateUtil.time(), "货架数据表", list, BasicdataGoodsShelfExcel.class);
} }
/** // /**
* 导入货架前置条件 // * 导入货架前置条件
*/ // */
@GetMapping("/preImport") // @GetMapping("/preImport")
@ApiOperationSupport(order = 12) // @ApiOperationSupport(order = 12)
@ApiOperation(value = "导入货架", notes = "传入ids") // @ApiOperation(value = "导入货架", notes = "传入ids")
public R preImport(Long ids) { // public R preImport(Long ids) {
basicdataGoodsShelfService.saveIds(ids); // return R.success("操作成功");
return R.success("操作成功"); // }
}
/** /**
* 导入货架 * 导入货架

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

@ -137,8 +137,5 @@ public interface IBasicdataGoodsShelfService extends BaseService<BasicdataGoodsS
* 货架 导入 * 货架 导入
*/ */
void importGoodsShelf(List<BasicdataGoodsShelfExcel> data); void importGoodsShelf(List<BasicdataGoodsShelfExcel> data);
/**
* 货架 ids
*/
void saveIds(Long ids);
} }

8
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsShelfServiceImpl.java

@ -94,7 +94,6 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
private IBasicdataWarehouseService basicdataWarehouseService; private IBasicdataWarehouseService basicdataWarehouseService;
private Long ids;
@Override @Override
@ -884,7 +883,6 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
List<BasicdataGoodsShelfEntity> basicdataGoodsShelfEntities = baseMapper.selectList(new QueryWrapper<BasicdataGoodsShelfEntity>().lambda() List<BasicdataGoodsShelfEntity> basicdataGoodsShelfEntities = baseMapper.selectList(new QueryWrapper<BasicdataGoodsShelfEntity>().lambda()
.eq(BasicdataGoodsShelfEntity::getGoodsShelfName, datum.getGoodsShelfName()) .eq(BasicdataGoodsShelfEntity::getGoodsShelfName, datum.getGoodsShelfName())
.eq(BasicdataGoodsShelfEntity::getWarehouseId, myCurrentWarehouse.getId()) .eq(BasicdataGoodsShelfEntity::getWarehouseId, myCurrentWarehouse.getId())
.eq(BasicdataGoodsShelfEntity::getGoodsAreaId, Long.valueOf(ids))
.eq(BasicdataGoodsShelfEntity::getIsDeleted, 0) .eq(BasicdataGoodsShelfEntity::getIsDeleted, 0)
); );
if (!basicdataGoodsShelfEntities.isEmpty()) { if (!basicdataGoodsShelfEntities.isEmpty()) {
@ -894,7 +892,6 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
log.info("复制后>>>>>>>>>>>>{}", copy); log.info("复制后>>>>>>>>>>>>{}", copy);
assert copy != null; assert copy != null;
copy.setWarehouseId(myCurrentWarehouse.getId()); copy.setWarehouseId(myCurrentWarehouse.getId());
copy.setGoodsAreaId(Long.valueOf(ids));
arrayList.add(copy); arrayList.add(copy);
} }
// 根据对象的value属性进行去重 // 根据对象的value属性进行去重
@ -902,10 +899,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
this.saveBatch(collect); this.saveBatch(collect);
} }
@Override
public void saveIds(Long ids) {
this.ids = ids;
}
// @NotNull // @NotNull
// static Integer getLayerNum(@NotNull List<BasicdataGoodsAllocationEntity> products, String ColumnNum) { // static Integer getLayerNum(@NotNull List<BasicdataGoodsAllocationEntity> products, String ColumnNum) {

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

@ -147,7 +147,7 @@ public class BasicdataPriceRouteServiceImpl extends BaseServiceImpl<BasicdataPri
// 最低计费 // 最低计费
if (ObjectUtil.isNotEmpty(vo.getMinCost())) { if (ObjectUtil.isNotEmpty(vo.getMinCost())) {
List<BasicdataPriceGeneralEntity> priceGeneralEntities = new ArrayList<>(); List<BasicdataPriceGeneralEntity> priceGeneralEntities = new ArrayList<>();
biuldGeneral(route.getId(), generalServiceTypeEnums.getCode(), vo.getMinCost(), vo.getAdditionalCost(), priceGeneralEntities); biuldGeneral(route, generalServiceTypeEnums.getCode(), vo.getMinCost(), vo.getAdditionalCost(), priceGeneralEntities);
generalService.saveOrUpdateBatch(priceGeneralEntities); generalService.saveOrUpdateBatch(priceGeneralEntities);
} }
return route.getId(); return route.getId();
@ -263,16 +263,16 @@ public class BasicdataPriceRouteServiceImpl extends BaseServiceImpl<BasicdataPri
} }
} }
private void biuldGeneral(Long priceId, Integer code, Double minCost, Double additionalCost, List<BasicdataPriceGeneralEntity> generalList) { private void biuldGeneral(BasicdataPriceRouteEntity routeEntity, Integer code, Double minCost, Double additionalCost, List<BasicdataPriceGeneralEntity> generalList) {
// 1 最低计费一个价格体系一个服务类型只存在一条 // 1 最低计费一个价格体系一个服务类型只存在一条
BasicdataPriceGeneralEntity generalEntity = generalService.getOne(Wrappers.<BasicdataPriceGeneralEntity>lambdaQuery() BasicdataPriceGeneralEntity generalEntity = generalService.getOne(Wrappers.<BasicdataPriceGeneralEntity>lambdaQuery()
.eq(BasicdataPriceGeneralEntity::getBoId, priceId) .eq(BasicdataPriceGeneralEntity::getBoId, routeEntity.getId())
.eq(BasicdataPriceGeneralEntity::getServiceType, code) .eq(BasicdataPriceGeneralEntity::getServiceType, code)
); );
if (ObjectUtil.isEmpty(generalEntity)) { if (ObjectUtil.isEmpty(generalEntity)) {
generalEntity = new BasicdataPriceGeneralEntity(); generalEntity = new BasicdataPriceGeneralEntity();
generalEntity.setBoId(priceId); generalEntity.setBoId(routeEntity.getId());
generalEntity.setPriceId(priceId); generalEntity.setPriceId(routeEntity.getPriceId());
generalEntity.setServiceType(code); generalEntity.setServiceType(code);
} }
// 设置最低计费和加算价格 // 设置最低计费和加算价格

Loading…
Cancel
Save