From dc4b025a2d7d5a918efe671dec81d91841942f7d Mon Sep 17 00:00:00 2001
From: xieb <vip_xiaobin810@163.com>
Date: Wed, 17 May 2023 11:32:12 +0800
Subject: [PATCH] 水文特征参数修改

---
 skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/mapper/AttResStagCharMapper.xml          |   85 ++++++++++++++++++++++++++++--------------
 skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/controller/AttResStagCharController.java |    4 ++
 2 files changed, 60 insertions(+), 29 deletions(-)

diff --git a/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/controller/AttResStagCharController.java b/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/controller/AttResStagCharController.java
index aca79eb..e3b053d 100644
--- a/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/controller/AttResStagCharController.java
+++ b/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/controller/AttResStagCharController.java
@@ -15,6 +15,7 @@
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.StringUtil;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -55,6 +56,9 @@
 	@ApiOperation(value = "水库特征水位-编辑", notes = "水库特征水位-编辑")
 	@PostMapping(value = "/edit")
 	public R edit(@RequestBody AttResStagChar attResStagChar) {
+		if (StringUtil.isBlank(attResStagChar.getResGuid())) {
+			return R.fail("参数不正确");
+		}
 		return R.data(attResStagCharService.customizeUpdateByGuid(attResStagChar));
 //		return R.data(attResStagCharService.updateById(attResStagChar));
 	}
diff --git a/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/mapper/AttResStagCharMapper.xml b/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/mapper/AttResStagCharMapper.xml
index 5ad5079..3b145b0 100644
--- a/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/mapper/AttResStagCharMapper.xml
+++ b/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/mapper/AttResStagCharMapper.xml
@@ -2,90 +2,117 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.gistack.sm.sjztmd.mapper.AttResStagCharMapper">
     <update id="customizeUpdateByGuid">
-        UPDATE "att_res_stag_char" SET
-        <if test="attResStagChar.deadStag !=null ">
+        UPDATE "tb_res_stag_char" SET
+        <if test="attResStagChar.deadStag !=null and attResStagChar.deadStag != ''">
             "dead_stag" = #{attResStagChar.deadStag},
         </if>
-        <if test="attResStagChar.benResStag !=null ">
+        <if test="attResStagChar.benResStag !=null and attResStagChar.benResStag != ''">
             "ben_res_stag" = #{attResStagChar.benResStag},
         </if>
-        <if test="attResStagChar.checFlStag !=null ">
+        <if test="attResStagChar.checFlStag !=null and attResStagChar.checFlStag != '' ">
             "chec_fl_stag" = #{attResStagChar.checFlStag},
         </if>
-        <if test="attResStagChar.checFlFlow !=null ">
+        <if test="attResStagChar.checFlFlow !=null and attResStagChar.checFlFlow != '' ">
             "chec_fl_flow" = #{attResStagChar.checFlFlow},
         </if>
-        <if test="attResStagChar.checFlFlowMax !=null ">
+        <if test="attResStagChar.checFlFlowMax !=null and attResStagChar.checFlFlowMax !='' ">
             "chec_fl_flow_max" = #{attResStagChar.checFlFlowMax},
         </if>
-        <if test="attResStagChar.checFlStand !=null ">
+        <if test="attResStagChar.checFlStand !=null and attResStagChar.checFlStand !='' ">
             "chec_fl_stand" = #{attResStagChar.checFlStand},
         </if>
-        <if test="attResStagChar.desFlStag !=null ">
+        <if test="attResStagChar.desFlStag !=null and attResStagChar.desFlStag != '' ">
             "des_fl_stag" = #{attResStagChar.desFlStag},
         </if>
-        <if test="attResStagChar.desFlFlow !=null">
+        <if test="attResStagChar.desFlFlow !=null  and attResStagChar.desFlFlow != ''">
             "des_fl_flow" = #{attResStagChar.desFlFlow},
         </if>
-        <if test="attResStagChar.desFlFlowMax !=null ">
+        <if test="attResStagChar.desFlFlowMax !=null  and attResStagChar.desFlFlowMax != '' ">
             "des_fl_flow_max" = #{attResStagChar.desFlFlowMax},
         </if>
-        <if test="attResStagChar.desFlStand !=null ">
+        <if test="attResStagChar.desFlStand !=null  and attResStagChar.desFlStand != '' ">
             "des_fl_stand" = #{attResStagChar.desFlStand},
         </if>
-        <if test="attResStagChar.flprHighStag !=null ">
+        <if test="attResStagChar.flprHighStag !=null  and attResStagChar.flprHighStag != '' ">
             "flpr_high_stag" = #{attResStagChar.flprHighStag},
         </if>
-        <if test="attResStagChar.lowStagAleVal !=null ">
+        <if test="attResStagChar.lowStagAleVal !=null  and attResStagChar.lowStagAleVal != '' ">
             "low_stag_ale_val" = #{attResStagChar.lowStagAleVal},
         </if>
-        <if test="attResStagChar.flprHighStagStand !=null ">
+        <if test="attResStagChar.flprHighStagStand !=null  and attResStagChar.flprHighStagStand != '' ">
             "flpr_high_stag_stand" = #{attResStagChar.flprHighStagStand},
         </if>
-        <if test="attResStagChar.normPoolArea !=null ">
+        <if test="attResStagChar.normPoolArea !=null  and attResStagChar.normPoolArea != '' ">
             "norm_pool_area" = #{attResStagChar.normPoolArea},
         </if>
-        <if test="attResStagChar.normPoolStag !=null ">
+        <if test="attResStagChar.normPoolStag !=null  and attResStagChar.normPoolStag != '' ">
             "norm_pool_stag" = #{attResStagChar.normPoolStag},
         </if>
-        <if test="attResStagChar.benResCap !=null ">
+        <if test="attResStagChar.benResCap !=null  and attResStagChar.benResCap != '' ">
             "ben_res_cap" = #{attResStagChar.benResCap},
         </if>
-        <if test="attResStagChar.capCoef !=null">
+        <if test="attResStagChar.capCoef !=null  and attResStagChar.capCoef != ''">
             "cap_coef" = #{attResStagChar.capCoef},
         </if>
-        <if test="attResStagChar.deadCap !=null ">
+        <if test="attResStagChar.deadCap !=null  and attResStagChar.deadCap != '' ">
             "dead_cap" = #{attResStagChar.deadCap},
         </if>
-        <if test="attResStagChar.flcoCap !=null ">
+        <if test="attResStagChar.flcoCap !=null  and attResStagChar.flcoCap != '' ">
             "flco_cap" = #{attResStagChar.flcoCap},
         </if>
-        <if test="attResStagChar.normPoolCap !=null ">
+        <if test="attResStagChar.normPoolCap !=null  and attResStagChar.normPoolCap != '' ">
             "norm_pool_cap" = #{attResStagChar.normPoolCap},
         </if>
-        <if test="attResStagChar.flseLimCap !=null ">
+        <if test="attResStagChar.flseLimCap !=null  and attResStagChar.flseLimCap != '' ">
             "flse_lim_cap" = #{attResStagChar.flseLimCap},
         </if>
-        <if test="attResStagChar.siltStorageCapacity !=null ">
+        <if test="attResStagChar.siltStorageCapacity !=null  and attResStagChar.siltStorageCapacity != '' ">
             "silt_storage_capacity" = #{attResStagChar.siltStorageCapacity},
         </if>
-        <if test="attResStagChar.storFlCap !=null ">
+        <if test="attResStagChar.storFlCap !=null  and attResStagChar.storFlCap != '' ">
             "stor_fl_cap" = #{attResStagChar.storFlCap},
         </if>
-        <if test="attResStagChar.totCap !=null ">
+        <if test="attResStagChar.totCap !=null  and attResStagChar.totCap != '' ">
             "tot_cap" = #{attResStagChar.totCap},
         </if>
-        <if test="attResStagChar.conArea !=null ">
+        <if test="attResStagChar.conArea !=null  and attResStagChar.conArea != '' ">
             "con_area" = #{attResStagChar.conArea},
         </if>
-        <if test="attResStagChar.moyearFlAge !=null ">
+        <if test="attResStagChar.moyearFlAge !=null  and attResStagChar.moyearFlAge != '' ">
             "moyear_fl_age" = #{attResStagChar.moyearFlAge},
         </if>
+        <if test="attResStagChar.floodSeasonBStart !=null  and attResStagChar.floodSeasonBStart != '' ">
+            "flood_season_b_start" = #{attResStagChar.floodSeasonBStart},
+        </if>
+        <if test="attResStagChar.floodSeasonBEnd !=null  and attResStagChar.floodSeasonBEnd != '' ">
+            "flood_season_b_end" = #{attResStagChar.floodSeasonBEnd},
+        </if>
+        <if test="attResStagChar.floodSeasonBz !=null  and attResStagChar.floodSeasonBz != '' ">
+            "flood_season_bz" = #{attResStagChar.floodSeasonBz},
+        </if>
+        <if test="attResStagChar.floodSeasonMStart !=null  and attResStagChar.floodSeasonMStart != '' ">
+            "flood_season_m_start" = #{attResStagChar.floodSeasonMStart},
+        </if>
+        <if test="attResStagChar.floodSeasonMEnd !=null  and attResStagChar.floodSeasonMEnd != '' ">
+            "flood_season_m_end" = #{attResStagChar.floodSeasonMEnd},
+        </if>
+        <if test="attResStagChar.floodSeasonMz !=null  and attResStagChar.floodSeasonMz != '' ">
+            "flood_season_mz" = #{attResStagChar.floodSeasonMz},
+        </if>
+        <if test="attResStagChar.floodSeasonAStart !=null  and attResStagChar.floodSeasonAStart != '' ">
+            "flood_season_a_start" = #{attResStagChar.floodSeasonAStart},
+        </if>
+        <if test="attResStagChar.floodSeasonAEnd !=null  and attResStagChar.floodSeasonAEnd != '' ">
+            "flood_season_a_end" = #{attResStagChar.floodSeasonAEnd},
+        </if>
+        <if test="attResStagChar.floodSeasonAz !=null  and attResStagChar.floodSeasonAz != '' ">
+            "flood_season_az" = #{attResStagChar.floodSeasonAz},
+        </if>
             "update_time" = #{attResStagChar.updateTime}
-            WHERE "guid" = #{attResStagChar.guid}
+            WHERE "res_guid" = #{attResStagChar.resGuid}
     </update>
 
     <select id="getByResGuid" resultType="cn.gistack.sm.sjztmd.entity.AttResStagChar">
-        SELECT * FROM "SJZT_MD"."att_res_stag_char" WHERE "res_guid" = #{resGuid}
+        SELECT * FROM "SJZT_MD"."tb_res_stag_char" WHERE "res_guid" = #{resGuid}
     </select>
 </mapper>

--
Gitblit v1.9.3