This commit is contained in:
2023-11-14 13:56:34 +08:00
parent f20cb6ee91
commit 0d6e637942

View File

@@ -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());