mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
refactor(coal): 优化洗煤日报分析服务和 KFAC 自动完成脚本
- 使用 BeanUtil 复制实体对象中的 KF 项列表,提高代码可读性和性能 - 修复 KFAC 自动完成脚本中的查询参数处理,简化代码结构
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package cn.lihongjie.coal.coalWashingDailyAnalysis.service;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.lihongjie.coal.base.dto.CommonQuery;
|
||||
import cn.lihongjie.coal.base.dto.IdRequest;
|
||||
import cn.lihongjie.coal.base.service.BaseService;
|
||||
@@ -156,7 +157,8 @@ public class CoalWashingDailyAnalysisService
|
||||
public CoalWashingDailyAnalysisDto updateMain(UpdateCoalWashingDailyAnalysisDto request) {
|
||||
|
||||
CoalWashingDailyAnalysisEntity entity = this.repository.get(request.getId());
|
||||
List<CoalWashingDailyAnalysisKFItemVo> kfItems = entity.getKfItems();
|
||||
List<CoalWashingDailyAnalysisKFItemVo> kfItems =
|
||||
BeanUtil.copyToList(entity.getKfItems(), CoalWashingDailyAnalysisKFItemVo.class);
|
||||
|
||||
if (this.repository.containArchived(request.getId())) {
|
||||
throw new BizException("部分数据已归档,无法编辑或删除");
|
||||
|
||||
@@ -12,5 +12,5 @@ def service = ioc.getBean(DictionaryService.class)
|
||||
|
||||
|
||||
|
||||
return service.autoComplete(new AutoCompleteRequest(tableName: "t_coal_washing_daily_analysis_kf_items kf inner join t_coal_washing_daily_analysis a on kf.coal_washing_daily_analysis_id = a.id", fieldName: "kf.name",organizationId: Ctx.currentUser().organizationId, query: params.get("query", null)?.asText()))
|
||||
return service.autoComplete(new AutoCompleteRequest(tableName: "t_coal_washing_daily_analysis_kf_items kf inner join t_coal_washing_daily_analysis a on kf.coal_washing_daily_analysis_id = a.id", fieldName: "kf.name",organizationId: Ctx.currentUser().organizationId, query: params.get("query")?.asText()))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user