feat(cost): 添加生产指标计算结果批量保存功能

- 在CostProdMetricResultBo中新增resultIds和prodMetricResultList字段
- 添加/batch接口支持批量保存生产指标计算结果
- 实现batchSaveWithDelete方法支持先删除再插入操作
- 使用事务注解确保批量操作的数据一致性
- 集成CollUtil工具类处理集合操作
- 完善相关的Service接口定义
This commit is contained in:
2026-06-17 10:11:10 +08:00
parent c547456108
commit 7b7f4b902e
4 changed files with 46 additions and 0 deletions

View File

@@ -75,6 +75,16 @@ public class CostProdMetricResultController extends BaseController {
return toAjax(iCostProdMetricResultService.insertByBo(bo));
}
/**
* 批量保存生产指标计算结果(先删除再插入)
*/
@Log(title = "生产指标计算结果", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping("/batch")
public R<Void> batchSave(@RequestBody CostProdMetricResultBo bo) {
return toAjax(iCostProdMetricResultService.batchSaveWithDelete(bo));
}
/**
* 修改生产指标计算结果
*/