dev #37

Merged
zhaoqiaobo merged 2 commits from dev into pre-production 9 months ago
  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);
}
/**
* 导入货架前置条件
*/
@GetMapping("/preImport")
@ApiOperationSupport(order = 12)
@ApiOperation(value = "导入货架", notes = "传入ids")
public R preImport(Long ids) {
basicdataGoodsShelfService.saveIds(ids);
return R.success("操作成功");
}
// /**
// * 导入货架前置条件
// */
// @GetMapping("/preImport")
// @ApiOperationSupport(order = 12)
// @ApiOperation(value = "导入货架", notes = "传入ids")
// public R preImport(Long ids) {
// 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);
/**
* 货架 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 Long ids;
@Override
@ -884,7 +883,6 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
List<BasicdataGoodsShelfEntity> basicdataGoodsShelfEntities = baseMapper.selectList(new QueryWrapper<BasicdataGoodsShelfEntity>().lambda()
.eq(BasicdataGoodsShelfEntity::getGoodsShelfName, datum.getGoodsShelfName())
.eq(BasicdataGoodsShelfEntity::getWarehouseId, myCurrentWarehouse.getId())
.eq(BasicdataGoodsShelfEntity::getGoodsAreaId, Long.valueOf(ids))
.eq(BasicdataGoodsShelfEntity::getIsDeleted, 0)
);
if (!basicdataGoodsShelfEntities.isEmpty()) {
@ -894,7 +892,6 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
log.info("复制后>>>>>>>>>>>>{}", copy);
assert copy != null;
copy.setWarehouseId(myCurrentWarehouse.getId());
copy.setGoodsAreaId(Long.valueOf(ids));
arrayList.add(copy);
}
// 根据对象的value属性进行去重
@ -902,10 +899,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
this.saveBatch(collect);
}
@Override
public void saveIds(Long ids) {
this.ids = ids;
}
// @NotNull
// 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())) {
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);
}
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 最低计费一个价格体系一个服务类型只存在一条
BasicdataPriceGeneralEntity generalEntity = generalService.getOne(Wrappers.<BasicdataPriceGeneralEntity>lambdaQuery()
.eq(BasicdataPriceGeneralEntity::getBoId, priceId)
.eq(BasicdataPriceGeneralEntity::getBoId, routeEntity.getId())
.eq(BasicdataPriceGeneralEntity::getServiceType, code)
);
if (ObjectUtil.isEmpty(generalEntity)) {
generalEntity = new BasicdataPriceGeneralEntity();
generalEntity.setBoId(priceId);
generalEntity.setPriceId(priceId);
generalEntity.setBoId(routeEntity.getId());
generalEntity.setPriceId(routeEntity.getPriceId());
generalEntity.setServiceType(code);
}
// 设置最低计费和加算价格

Loading…
Cancel
Save