From 74bf0bda7de41119785e39acb67369bbd936378f Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期六, 26 四月 2025 11:53:03 +0800 Subject: [PATCH] 文档 --- ansteel-biz/src/main/java/com/iailab/module/ansteel/coking/service/impl/CokingTraceSuggestServiceImpl.java | 34 +++++++++++++++++++++++++++++++++- 1 files changed, 33 insertions(+), 1 deletions(-) diff --git a/ansteel-biz/src/main/java/com/iailab/module/ansteel/coking/service/impl/CokingTraceSuggestServiceImpl.java b/ansteel-biz/src/main/java/com/iailab/module/ansteel/coking/service/impl/CokingTraceSuggestServiceImpl.java index d0fd969..6da3ddf 100644 --- a/ansteel-biz/src/main/java/com/iailab/module/ansteel/coking/service/impl/CokingTraceSuggestServiceImpl.java +++ b/ansteel-biz/src/main/java/com/iailab/module/ansteel/coking/service/impl/CokingTraceSuggestServiceImpl.java @@ -1,12 +1,15 @@ package com.iailab.module.ansteel.coking.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.iailab.framework.common.util.date.DateUtils; import com.iailab.module.ansteel.coking.dao.CokingTraceSuggestDao; import com.iailab.module.ansteel.coking.entity.CokingTraceSuggestEntity; import com.iailab.module.ansteel.coking.service.CokingTraceSuggestService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.Calendar; import java.util.List; import java.util.Map; @@ -24,11 +27,40 @@ @Override public List<CokingTraceSuggestEntity> list(Map<String, Object> params) { - return cokingTraceSuggestDao.selectList(new QueryWrapper<>()); + String relId = (String) params.get("relId"); + String sugObj = (String) params.get("sugObj"); + + QueryWrapper<CokingTraceSuggestEntity> queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("rel_id", relId) + .eq(StringUtils.isNotBlank(sugObj), "sug_obj", sugObj) + .orderByAsc("create_date"); + return cokingTraceSuggestDao.selectList(queryWrapper); } @Override public void save(CokingTraceSuggestEntity suggestEntity) { cokingTraceSuggestDao.insert(suggestEntity); } + + @Override + public void insert(List<CokingTraceSuggestEntity> suggestEntitieList) { + cokingTraceSuggestDao.insert(suggestEntitieList); + } + + @Override + public List<CokingTraceSuggestEntity> getAbnormalData(Map<String, Object> params) { + String processType = (String) params.get("processType"); + String clock = (String) params.get("clock"); + if (StringUtils.isBlank(clock)) { + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.DAY_OF_YEAR, -1); + clock = DateUtils.format(calendar.getTime(), "yyyy-MM-dd"); + } + + QueryWrapper<CokingTraceSuggestEntity> queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("sug_obj", processType) + .eq("clock", clock) + .orderByAsc("create_date"); + return cokingTraceSuggestDao.selectList(queryWrapper); + } } \ No newline at end of file -- Gitblit v1.9.3