From 6cf345bc8fe98d393320b89182f9293171aa19ff Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 22 四月 2025 16:39:55 +0800
Subject: [PATCH] 1、根据江海协议中开阀类型变化,修改相应代码; 2、江海协议RTU模拟器启动参数注释。
---
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramSv.java | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 105 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramSv.java
new file mode 100644
index 0000000..cd7bbb3
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramSv.java
@@ -0,0 +1,105 @@
+package com.dy.pipIrrBase.rtuUpgrade.program;
+
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoRm.UgRtuProgramMapper;
+import com.dy.pipIrrGlobal.pojoUg.UgRtuProgram;
+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 org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/11/5 8:33
+ * @Description
+ */
+@Slf4j
+@Service
+public class UgRtuProgramSv {
+
+ @Autowired
+ private UgRtuProgramMapper dao ;
+
+ /**
+ * 寰楀埌涓�涓竴浜涘崌绾х▼搴�
+ * @param id 涓�浜涘崌绾х▼搴廔D
+ * @return 涓�浜涘崌绾х▼搴忓疄浣�
+ */
+ public UgRtuProgram selectById(Long id){
+ return this.dao.selectByPrimaryKey(id) ;
+ }
+
+ /**
+ * 寰楀埌涓�浜涘崌绾х▼搴�
+ * @return 涓�浜涘崌绾х▼搴�
+ */
+ public QueryResultVo<List<UgRtuProgram>> selectSome(QueryVo queryVo){
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo) ;
+ Long itemTotal = this.dao.selectTotal(params) ;
+
+ QueryResultVo<List<UgRtuProgram>> rsVo = new QueryResultVo<>() ;
+ rsVo.pageSize = queryVo.pageSize ;
+ rsVo.pageCurr = queryVo.pageCurr ;
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = this.dao.selectSome(params) ;
+
+ return rsVo ;
+ }
+
+ /**
+ * 寰楀埌鎵�鏈夊崌绾х▼搴忚褰旾D鍜屾枃浠跺悕绉�
+ * @return 涓�浜涘崌绾х▼搴�
+ */
+ public QueryResultVo<List<UgRtuProgram>> selectAll(){
+ QueryResultVo<List<UgRtuProgram>> rsVo = new QueryResultVo<>() ;
+ rsVo.obj = this.dao.selectAll() ;
+ return rsVo ;
+ }
+ /**
+ * 鏌ヨ鏁版嵁搴擄紝鏄惁瀛樺湪缁欏畾鍗囩骇鏂囦欢鍚嶇О
+ * @param programFileName 鏂囦欢鍚嶇О
+ * @return bool
+ */
+ public boolean existFileName(String programFileName){
+ Long count = this.dao.selectByFileName(programFileName) ;
+ if(count != null && count > 0){
+ return true ;
+ }else{
+ return false ;
+ }
+ }
+
+ /**
+ * 鏂板淇濆瓨鍒嗘按鍙e疄浣�
+ * @param po 瀹炰綋
+ * @return 鏁伴噺
+ */
+ @Transactional
+ public int save(UgRtuProgram po){
+ return this.dao.insertSelective(po) ;
+ }
+ /**
+ * 淇濆瓨淇敼瀹炰綋
+ * @param po 瀹炰綋
+ * @return 鏁伴噺
+ */
+ @Transactional
+ public int update(UgRtuProgram po){
+ return this.dao.updateByPrimaryKeySelective(po) ;
+ }
+
+ /**
+ * 閫昏緫鍒犻櫎瀹炰綋
+ * @param id 瀹炰綋ID
+ * @return 鏁伴噺
+ */
+ @Transactional
+ public int delete(Long id){
+ return this.dao.deleteLogicById(id) ;
+ }
+
+}
--
Gitblit v1.8.0