diff --git a/src/main/java/cn/lihongjie/coal/coalWashingDailyAnalysis/service/CoalWashingDailyAnalysisService.java b/src/main/java/cn/lihongjie/coal/coalWashingDailyAnalysis/service/CoalWashingDailyAnalysisService.java index 1db5472a..dac0f329 100644 --- a/src/main/java/cn/lihongjie/coal/coalWashingDailyAnalysis/service/CoalWashingDailyAnalysisService.java +++ b/src/main/java/cn/lihongjie/coal/coalWashingDailyAnalysis/service/CoalWashingDailyAnalysisService.java @@ -10,6 +10,7 @@ import cn.lihongjie.coal.coalWashingDailyAnalysis.entity.CoalWashingDailyAnalysi import cn.lihongjie.coal.coalWashingDailyAnalysis.mapper.CoalWashingDailyAnalysisMapper; import cn.lihongjie.coal.coalWashingDailyAnalysis.mapper.RoundMapper; import cn.lihongjie.coal.coalWashingDailyAnalysis.repository.CoalWashingDailyAnalysisRepository; +import cn.lihongjie.coal.common.Ctx; import jakarta.annotation.PostConstruct; @@ -40,7 +41,7 @@ public class CoalWashingDailyAnalysisService public CoalWashingDailyAnalysisDto create(CreateCoalWashingDailyAnalysisDto request) { CoalWashingDailyAnalysisEntity entity = mapper.toEntity(request); - + entity.setOrganizationId(Ctx.currentUser().getOrganizationId()); this.repository.save(entity); return getById(entity.getId()); } @@ -57,7 +58,7 @@ public class CoalWashingDailyAnalysisService public CoalWashingDailyAnalysisDto update(UpdateCoalWashingDailyAnalysisDto request) { CoalWashingDailyAnalysisEntity entity = this.repository.get(request.getId()); this.mapper.updateEntity(entity, request); - + entity.setOrganizationId(Ctx.currentUser().getOrganizationId()); this.repository.save(entity); return getById(entity.getId());