tao 2 年 前
コミット
7bc71731d1

+ 10 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/controller/FailureReasonController.java

@@ -41,6 +41,16 @@ public class FailureReasonController {
         return failureReasonService.selectDetails(yclx, dwdm, dydm, jh, gylx, pageNum, pageSize);
     }
 
+    @PutMapping("details")
+    public void updateDetails(@RequestBody FailureReasonDetails failureReasonDetails) {
+        failureReasonService.updateDetails(failureReasonDetails);
+    }
+
+    @GetMapping("details-one")
+    public FailureReasonDetails selectDetailsOne(String rq, String jh) {
+        return failureReasonService.selectDetailsOne(rq, jh);
+    }
+
     @PostMapping("/details/export")
     public ExportResult detailsExport(@RequestBody FailureReasonExport param){
         List<FailureReasonDetails> failureReasonDetails = failureReasonService.selectDetailsAll(param.getYclx(), param.getDwdm(), param.getDydm(), param.getJh(), param.getGylx());

+ 10 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/controller/TubularStructureController.java

@@ -55,6 +55,16 @@ public class TubularStructureController {
         return tubularStructureService.selectDetails(yclx, dwdm, dydm, jh, gylx, fgq, cdPsq, xjf, pageNum, pageSize);
     }
 
+    @GetMapping("details-one")
+    public TubularStructure selectDetailsOne(String jh, String wjrq) {
+        return tubularStructureService.selectDetailsOne(jh, wjrq);
+    }
+
+    @PutMapping("details")
+    public void updateDetails(@RequestBody TubularStructure tubularStructure) {
+        tubularStructureService.updateDetails(tubularStructure);
+    }
+
     @PostMapping("/details/export")
     @ApiOperation("导出管柱结构")
     public ExportResult exportDetails(@RequestBody TubularStructureHomeExport param){

+ 13 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/dao/FailureReasonDao.java

@@ -48,6 +48,12 @@ public interface FailureReasonDao {
      */
     List<FailureReasonDetails> selectDetails(@Param("yclx") String yclx,@Param("dwdm") String dwdm,@Param("dydm") String dydm,@Param("jh") String jh,@Param("gylx") String gylx);
 
+    /**
+     *
+     * @return
+     */
+    FailureReasonDetails selectDetailsOne(@Param("rq") String rq,@Param("jh") String jh);
+
     /**
      *
      * @param yclx
@@ -67,4 +73,11 @@ public interface FailureReasonDao {
      * @return
      */
     Map<String, Object> getPieData(@Param("yclx") String yclx, @Param("dwdm") String dwdm, @Param("dydm") String dydm, @Param("gylx") String gylx);
+
+    /**
+     *
+     * @param failureReasonDetails
+     */
+    void updateDetails(FailureReasonDetails failureReasonDetails);
+
 }

+ 14 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/dao/TubularStructureDao.java

@@ -43,6 +43,20 @@ public interface TubularStructureDao {
                                          @Param("jh") String jh      ,@Param("gylx") String gylx,@Param("fgq") String fgq,
                                          @Param("cdPsq") String cdPsq,@Param("xjf") String xjf);
 
+    /**
+     *
+     * @param jh
+     * @param wjrq
+     * @return
+     */
+    TubularStructure selectDetailsOne(@Param("jh") String jh,@Param("wjrq") String wjrq);
+
+    /**
+     *
+     * @param tubularStructure
+     */
+    void updateDetails(TubularStructure tubularStructure);
+
     /**
      *
      * @param yclx

+ 7 - 2
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/service/FailureReasonService.java

@@ -43,11 +43,14 @@ public class FailureReasonService {
         return new PageInfo<>(failureReasonDao.selectDetails(yclx, dwdm, dydm, jh, gylx));
     }
 
+    public FailureReasonDetails selectDetailsOne(String rq, String jh) {
+        return failureReasonDao.selectDetailsOne(rq, jh);
+    }
+
     public List<FailureReasonDetails> selectDetailsAll(String yclx, String dwdm, String dydm, String jh, String gylx) {
         return failureReasonDao.selectDetails(yclx, dwdm, dydm, jh, gylx);
     }
 
-
     public Map<String, Object> getBarData(String yclx, String dwdm, String dydm, String gylx) {
         Map<String, Object> map = new HashMap<>();
 
@@ -83,5 +86,7 @@ public class FailureReasonService {
         return list;
     }
 
-
+    public void updateDetails(FailureReasonDetails failureReasonDetails) {
+        failureReasonDao.updateDetails(failureReasonDetails);
+    }
 }

+ 8 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/service/TubularStructureService.java

@@ -81,4 +81,12 @@ public class TubularStructureService {
     public List<TubularStructure> selectDetailList(String yclx, String dwdm, String dydm, String jh, String gylx, String fgq, String cdPsq, String xjf) {
         return tubularStructureDao.selectDetails(yclx, dwdm, dydm, jh, gylx, fgq, cdPsq, xjf);
     }
+
+    public TubularStructure selectDetailsOne(String jh, String wjrq) {
+        return tubularStructureDao.selectDetailsOne(jh, wjrq);
+    }
+
+    public void updateDetails(TubularStructure tubularStructure) {
+        tubularStructureDao.updateDetails(tubularStructure);
+    }
 }

+ 38 - 9
vseaf4.4-cyyzs/src/main/resources/mapper/FailureReasonDao.xml

@@ -2,18 +2,36 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.victorysoft.business.cyyzs.dao.FailureReasonDao">
 
+    <update id="updateDetails">
+        update water_failure_reason
+            set gylx = #{gylx, jdbcType=VARCHAR},
+            fsyz_ck = #{fsyzCk, jdbcType=VARCHAR},
+            jgyz = #{jgyz, jdbcType=VARCHAR},
+            fgq = #{fgq, jdbcType=VARCHAR},
+            psq = #{psq, jdbcType=VARCHAR},
+            xjf = #{xjf, jdbcType=VARCHAR},
+            mdgj = #{mdgj, jdbcType=VARCHAR},
+            mgz = #{mgz, jdbcType=VARCHAR},
+            is_gzdx = #{isGzdx, jdbcType=VARCHAR},
+            kzrq = #{kzrq, jdbcType=DATE},
+            sxrq = #{sxrq, jdbcType=DATE},
+            last_is_xjcg = #{lastIsXjcg, jdbcType=VARCHAR}
+        where
+            jh = #{jh, jdbcType=VARCHAR} and to_char(rq, 'yyyy-mm-dd') = to_char(#{rq, jdbcType=DATE}, 'yyyy-mm-dd')
+    </update>
+
     <select id="selectDetails" resultType="cn.com.victorysoft.business.cyyzs.entity.FailureReasonDetails">
         select
             a.rq, a.dwdm, a.dydm, a.jh, a.gylx, b.flag_name gylx_name,
-            case when fsyz_ck = 'Y' then '是' else '否' end fsyz_ck,
-            case when jgyz = 'Y' then '是' else '否' end jgyz,
-            case when fgq = 'Y' then '是' else '否' end fgq,
-            case when psq = 'Y' then '是' else '否' end psq,
-            case when xjf = 'Y' then '是' else '否' end xjf,
-            case when mdgj = 'Y' then '是' else '否' end mdgj,
-            case when mgz = 'Y' then '是' else '否' end mgz,
-            case when is_gzdx = 'Y' then '是' else '否' end is_gzdx,
-            case when last_is_xjcg = 'Y' then '是' else '否' end last_is_xjcg,
+            case when fsyz_ck = 'Y'      then '是' when fsyz_ck is null      then '' else '否' end fsyz_ck,
+            case when jgyz = 'Y'         then '是' when jgyz is null         then '' else '否' end jgyz,
+            case when fgq = 'Y'          then '是' when fgq is null          then '' else '否' end fgq,
+            case when psq = 'Y'          then '是' when psq is null          then '' else '否' end psq,
+            case when xjf = 'Y'          then '是' when xjf is null          then '' else '否' end xjf,
+            case when mdgj = 'Y'         then '是' when mdgj is null         then '' else '否' end mdgj,
+            case when mgz = 'Y'          then '是' when mgz is null          then '' else '否' end mgz,
+            case when is_gzdx = 'Y'      then '是' when is_gzdx is null      then '' else '否' end is_gzdx,
+            case when last_is_xjcg = 'Y' then '是' when last_is_xjcg is null then '' else '否' end last_is_xjcg,
             gjwhxms, zyrj, kzrq, sxrq, yxq, sxyy, qgzfh, zsltbqk,
             d.unitname dwmc, c.blockname dymc,
             rownum xh
@@ -125,4 +143,15 @@
         <if test="dydm != null and dydm != ''"> and a.dydm = #{dydm}</if>
         <if test="dwdm != null and dwdm != ''"> and a.dwdm in (select unitcode from sys_unitinfo start with unitcode = #{dwdm} connect by p_unitcode = prior unitcode) </if>
     </select>
+
+    <select id="selectDetailsOne" resultType="cn.com.victorysoft.business.cyyzs.entity.FailureReasonDetails">
+        select
+            *
+        from
+            water_failure_reason
+        where
+            1 = 1
+        <if test="jh != null and jh != ''"> and jh = #{jh}</if>
+        <if test="rq != null and rq != ''"> and to_char(rq, 'yyyy-mm-dd') = #{rq}</if>
+    </select>
 </mapper>

+ 27 - 1
vseaf4.4-cyyzs/src/main/resources/mapper/TubularStructureDao.xml

@@ -2,6 +2,21 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.victorysoft.business.cyyzs.dao.TubularStructureDao">
 
+    <update id="updateDetails">
+        update water_tubular_structure
+            set cslb = #{cslb, jdbcType=VARCHAR},
+                gylx = #{gylx, jdbcType=VARCHAR},
+                fzjs = #{fzjs, jdbcType=VARCHAR},
+                fzds = #{fzds, jdbcType=VARCHAR},
+                fgq = #{fgq, jdbcType=VARCHAR},
+                cd_psq = #{cdPsq, jdbcType=VARCHAR},
+                mdgj = #{mdgj, jdbcType=VARCHAR},
+                bcgj = #{bcgj, jdbcType=VARCHAR},
+                xjf = #{xjf, jdbcType=VARCHAR}
+        where
+            jh = #{jh, jdbcType=VARCHAR} and wjrq = #{wjrq, jdbcType=VARCHAR}
+    </update>
+
     <select id="selectList" resultType="cn.com.victorysoft.business.cyyzs.entity.TubularStructureHome">
         select
             a.*, b.flag_name gymc, rownum xh
@@ -48,8 +63,19 @@
         <if test="dwdm != null and dwdm != ''"> and a.dwdm in (select unitcode from sys_unitinfo start with unitcode = #{dwdm} connect by p_unitcode = prior unitcode) </if>
     </select>
 
+    <select id="selectDetailsOne" resultType="cn.com.victorysoft.business.cyyzs.entity.TubularStructure">
+        select
+            *
+        from
+            water_tubular_structure
+        where
+            1 = 1
+        <if test="jh != null and jh != ''"> and jh = #{jh}</if>
+        <if test="wjrq != null and wjrq != ''"> and to_char(wjrq, 'yyyy-mm-dd') = #{wjrq}</if>
+    </select>
+
 
-<!--    <select id="getBarData" resultType="cn.com.victorysoft.business.cyyzs.entity.TubularStructureHome">-->
+    <!--    <select id="getBarData" resultType="cn.com.victorysoft.business.cyyzs.entity.TubularStructureHome">-->
 <!--        select-->
 <!--            *-->
 <!--        from-->