From e5e09cdb5e8b9e3a3d30656a0ed05fb5349780be Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期四, 14 十一月 2024 11:04:53 +0800 Subject: [PATCH] 优化未关阀记录接口,解决记录数量少的问题 --- pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeSv.java | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 50 insertions(+), 1 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeSv.java index 59aa42f..626af0e 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeSv.java @@ -1,15 +1,20 @@ package com.dy.pipIrrRemote.rtuUpgrage; +import com.dy.common.softUpgrade.state.UpgradeRtu; import com.dy.pipIrrGlobal.daoRm.UgRtuControllerMapper; import com.dy.pipIrrGlobal.daoRm.UgRtuProgramMapper; import com.dy.pipIrrGlobal.daoRm.UgRtuTaskMapper; import com.dy.pipIrrGlobal.pojoRm.UgRtuProgram; import com.dy.pipIrrGlobal.pojoRm.UgRtuTask; +import com.dy.pipIrrGlobal.voRm.VoUpgradeDetail; import lombok.extern.slf4j.Slf4j; +import org.apache.dubbo.common.utils.PojoUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.Date; import java.util.List; +import java.util.Map; /** * @Author: liurunyu @@ -28,7 +33,7 @@ /** * 閫氫俊涓婚敭鏌ヨ涓�涓崌绾т换鍔� - * @param id 涓婚敭 + * @param taskId 涓婚敭 * @return */ public UgRtuTask selectTaskById(String taskId){ @@ -51,4 +56,48 @@ public List<String> selectAllRtuAddrByTask(String taskId){ return this.cdao.selectAllRtuAddrByTask(Long.valueOf(taskId)) ; } + + /** + * 鏌ヨ涓�涓崌绾т换鍔℃湁鍏充俊鎭� + * @return 鍗囩骇浠诲姟鏈夊叧淇℃伅 + */ + public List<VoUpgradeDetail> selectTaskDetail(String taskId){ + return this.tdao.selectTaskDetail(Long.valueOf(taskId)) ; + } + + + /** + * 淇濆瓨鍗囩骇浠诲姟涓烘墽琛岀姸鎬� + * @param taskId 浠诲姟ID + */ + public void setUpgradeTaskExecuted(String taskId){ + this.tdao.executeById(Long.valueOf(taskId)) ; + } + + + /** + * 淇濆瓨RTU鍗囩骇缁撴潫鐘舵�� + * @param taskId + * @param rtu + */ + public void saveRtuUpgradeState(Long taskId, UpgradeRtu rtu){ + Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(rtu) ; + params.put("taskId", taskId) ; + params.put("overDt", new Date()) ; + cdao.updateRtuUpgradeState(params) ; + } + + ///////////////////////////////////////////////////// + // + // 浠ヤ笅妯℃嫙鏁版嵁 + // + ///////////////////////////////////////////////////// + /** + * 閫氫俊涓婚敭鏌ヨ涓�涓崌绾т换鍔� + * @return + */ + public UgRtuTask selectLastTask(){ + return tdao.selectLastTask(); + } + } -- Gitblit v1.8.0