| | |
| | | List<CokingAnalyIndEntity> list(Map<String, Object> params); |
| | | |
| | | void save(List<CokingAnalyIndEntity> entityList); |
| | | |
| | | void delete(String analyType, String analyDate, String analyClass); |
| | | } |
| | |
| | | List<CokingTraceChartEntity> list(Map<String, Object> params); |
| | | |
| | | void save(CokingTraceChartEntity cokingTraceChartEntity); |
| | | |
| | | void insert(List<CokingTraceChartEntity> list); |
| | | |
| | | void save(String relId, String clock, String indType, Date startDate, Date endDate); |
| | |
| | | public void save(List<CokingAnalyIndEntity> entityList) { |
| | | cokingAnalyIndDao.insert(entityList); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(String analyType, String analyDate, String analyClass) { |
| | | QueryWrapper<CokingAnalyIndEntity> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("analy_type", analyType) |
| | | .eq("analy_date", analyDate) |
| | | .eq("analy_class", analyClass); |
| | | cokingAnalyIndDao.delete(queryWrapper); |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | import com.iailab.module.ansteel.coking.entity.CokingTraceConfEntity; |
| | | import com.iailab.module.ansteel.coking.service.CokingTraceChartService; |
| | | import com.iailab.module.ansteel.coking.service.CokingTraceConfService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | * @author lirm ${email} |
| | | * @since 1.0.0 2025-04-16 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class CokingTraceChartServiceImpl implements CokingTraceChartService { |
| | | |
| | |
| | | |
| | | @Override |
| | | public void save(String relId, String clock, String indType, Date startDate, Date endDate) { |
| | | // 查询需要保存chart的配置 |
| | | log.info("查询需要保存chart的配置"); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("indType", indType); |
| | | map.put("ext1", "chart"); |
| | |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | return; |
| | | } |
| | | log.info("list.size={}", list.size()); |
| | | |
| | | List<CokingTraceChartEntity> entityList = new ArrayList<>(); |
| | | list.forEach(value -> { |
| | |
| | | analyIndEntity.setSort(i + 1); |
| | | entityList.add(analyIndEntity); |
| | | } |
| | | // 清理旧数据 |
| | | cokingAnalyIndService.delete(process, analyDate, analyClass); |
| | | cokingAnalyIndService.save(entityList); |
| | | } |
| | | } |
| | |
| | | analyIndEntity.setSort(i+1); |
| | | entityList.add(analyIndEntity); |
| | | } |
| | | // 清理旧数据 |
| | | cokingAnalyIndService.delete(process, analyDate, analyClass); |
| | | cokingAnalyIndService.save(entityList); |
| | | } |
| | | } |
| | |
| | | analyIndEntity.setSort(i + 1); |
| | | entityList.add(analyIndEntity); |
| | | } |
| | | // 清理旧数据 |
| | | cokingAnalyIndService.delete(process, analyDate, analyClass); |
| | | cokingAnalyIndService.save(entityList); |
| | | } |
| | | } |
| | |
| | | analyIndEntity.setSort(i + 1); |
| | | entityList.add(analyIndEntity); |
| | | } |
| | | // 清理旧数据 |
| | | cokingAnalyIndService.delete(process, analyDate, analyClass); |
| | | cokingAnalyIndService.save(entityList); |
| | | } |
| | | } |