处理小数点

This commit is contained in:
2023-08-02 17:28:11 +08:00
parent b03b36d791
commit 7a63b646b8

View File

@@ -4,6 +4,7 @@ import cn.lihongjie.coal.dao.CoalWashingDailyAnalysisRepository;
import cn.lihongjie.coal.dto.*;
import cn.lihongjie.coal.entity.CoalWashingDailyAnalysisEntity;
import cn.lihongjie.coal.mapper.CoalWashingDailyAnalysisMapper;
import cn.lihongjie.coal.mapper.RoundMapper;
import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -23,6 +24,8 @@ public class CoalWashingDailyAnalysisService extends BaseService<CoalWashingDail
@Autowired
CoalWashingDailyAnalysisMapper mapper;
@Autowired
RoundMapper roundMapper;
@PostConstruct
public void init() {
@@ -48,7 +51,7 @@ public class CoalWashingDailyAnalysisService extends BaseService<CoalWashingDail
entity.rollingAvg();
return mapper.toDto(entity);
return mapper.toDto(roundMapper.round(entity));
}