ansteel-biz/src/main/java/com/iailab/module/ansteel/api/controller/admin/PowerController.java
@@ -1227,4 +1227,13 @@ public CommonResult<Boolean> savePowerPriceList(@RequestBody PowerPriceMainDTO mainDTO) { return success(powerPriceMainService.save(mainDTO)); } @PostMapping("/power-price/update") @Operation(summary = "修改峰谷平电价信息") public CommonResult<Boolean> updatePowerPriceList(@RequestBody PowerPriceMainDTO mainDTO) { if("".equals(mainDTO.getId()) || mainDTO.getId() == null) { return error(GlobalErrorCodeConstants.BAD_REQUEST); } return success(powerPriceMainService.update(mainDTO)); } } ansteel-biz/src/main/java/com/iailab/module/ansteel/power/service/PowerPriceMainService.java
@@ -14,4 +14,6 @@ List<PowerPriceMainDTO> list(Map<String, Object> params); Boolean save(PowerPriceMainDTO mainDTO); Boolean update(PowerPriceMainDTO mainDTO); } ansteel-biz/src/main/java/com/iailab/module/ansteel/power/service/impl/PowerPriceMainServiceImpl.java
@@ -81,4 +81,28 @@ } return true; } @Override @Transactional(rollbackFor = Exception.class) public Boolean update(PowerPriceMainDTO mainDTO) { if (!CollectionUtils.isEmpty(mainDTO.getDetList())) { PowerPriceMainEntity powerPriceMainEntity = powerPriceMainDao.selectById(mainDTO.getId()); powerPriceMainEntity.setCreator(SecurityFrameworkUtils.getLoginUser().getId()); powerPriceMainEntity.setCreateDate(new Date()); powerPriceMainDao.updateById(powerPriceMainEntity); QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("main_id", powerPriceMainEntity.getId()); powerPriceDetDao.delete(queryWrapper); for (int i = 0; i < mainDTO.getDetList().size(); i++) { PowerPriceDetEntity powerPriceDetEntity = ConvertUtils.sourceToTarget(mainDTO.getDetList().get(i), PowerPriceDetEntity.class); powerPriceDetEntity.setMainId(powerPriceMainEntity.getId()); powerPriceDetEntity.setSort(i + 1); powerPriceDetDao.insert(powerPriceDetEntity); } } return true; } } doc/鞍钢数据接口文档_dev_li.docBinary files differ
doc/鞍钢数据接口文档_master.docBinary files differ