| | |
| | | public interface CokingTraceReportService { |
| | | List<CokingTraceReportEntity> list(Map<String, Object> params); |
| | | |
| | | String save(String process, String reportName, String analyDate, String analyClass, String clock, String analyContent); |
| | | |
| | | String save(CokingTraceReportEntity reportEntity); |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<CokingTraceConfEntity> list(Map<String, Object> params) { |
| | | return cokingTraceConfDao.selectList(new QueryWrapper<CokingTraceConfEntity>().eq(ObjectUtils.isNotEmpty(params.get("indType")),"ind_type",params.get("indType"))); |
| | | String indType = (String) params.get("indType"); |
| | | String ext1 = (String) params.get("ext1"); |
| | | if (StringUtils.isBlank(indType)) { |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | QueryWrapper<CokingTraceConfEntity> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("ind_type", indType) |
| | | .eq(StringUtils.isNotBlank(ext1),"ext1", ext1); |
| | | return cokingTraceConfDao.selectList(queryWrapper); |
| | | } |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * 焦化工序异常溯源报告 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public String save(String process, String reportName, String analyDate, String analyClass, String clock, String analyContent) { |
| | | // 先删除,防止重复 |
| | | QueryWrapper<CokingTraceReportEntity> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("process", process); |
| | | queryWrapper.eq("report_name", reportName); |
| | | queryWrapper.eq("clock", clock); |
| | | cokingTraceReportDao.delete(queryWrapper); |
| | | |
| | | CokingTraceReportEntity entity = new CokingTraceReportEntity(); |
| | | entity.setId(UUID.randomUUID().toString()); |
| | | entity.setProcess(process); |
| | | entity.setReportName(process + "异常溯源报告"); |
| | | entity.setAnalyDate(analyDate); |
| | | entity.setAnalyClass(analyClass); |
| | | entity.setClock(clock); |
| | | entity.setAnalyContent(analyContent); |
| | | cokingTraceReportDao.insert(entity); |
| | | |
| | | |
| | | return entity.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public String save(CokingTraceReportEntity reportEntity) { |
| | | cokingTraceReportDao.insert(reportEntity); |
| | | return reportEntity.getId(); |