1
0
Переглянути джерело

工程许可添加上链接口

gushoubang 2 місяців тому
батько
коміт
43015ef971

+ 15 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/JsgcghxkController.java

@@ -75,4 +75,19 @@ public class JsgcghxkController extends BaseController {
             return R.fail(e.getMessage());
         }
     }
+
+    /**
+     * 更新建设工程规划许可的上链状态
+     */
+    @PutMapping("/onchain")
+    public R<Void> updateHasOnchain(@RequestBody Map<String, Object> params) {
+        try {
+            String id = (String) params.get("id");
+            Boolean hasOnchain = (Boolean) params.get("hasOnchain");
+            jsgcghxkService.updateHasOnchain(id, hasOnchain);
+            return R.ok();
+        } catch (Exception e) {
+            return R.fail(e.getMessage());
+        }
+    }
 }

+ 15 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/JsydghxkController.java

@@ -72,4 +72,19 @@ public class JsydghxkController extends BaseController {
             return R.fail(e.getMessage());
         }
     }
+
+    /**
+     * 更新建设用地规划许可的上链状态
+     */
+    @PutMapping("/onchain")
+    public R<Void> updateHasOnchain(@RequestBody Map<String, Object> params) {
+        try {
+            String id = (String) params.get("id");
+            Boolean hasOnchain = (Boolean) params.get("hasOnchain");
+            jsydghxkService.updateHasOnchain(id, hasOnchain);
+            return R.ok();
+        } catch (Exception e) {
+            return R.fail(e.getMessage());
+        }
+    }
 }

+ 8 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/mapper/JsgcghxkMapper.java

@@ -3,6 +3,7 @@ package com.siwei.apply.mapper;
 import com.siwei.apply.domain.Jsgcghxk;
 import com.siwei.apply.domain.vo.JsgcghxkUpdateVo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -35,4 +36,11 @@ public interface JsgcghxkMapper {
      * @param jsgcghxkUpdateVo
      */
     void update(JsgcghxkUpdateVo jsgcghxkUpdateVo);
+
+    /**
+     * 更新建设工程规划许可的上链状态
+     * @param id 主键ID
+     * @param hasOnchain 是否上链
+     */
+    void updateHasOnchain(@Param("id") String id, @Param("hasOnchain") Boolean hasOnchain);
 }

+ 8 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/mapper/JsydghxkMapper.java

@@ -3,6 +3,7 @@ package com.siwei.apply.mapper;
 import com.siwei.apply.domain.Jsydghxk;
 import com.siwei.apply.domain.vo.JsydghxkUpdateVo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 // 建设用地规划许可 Mapper 接口
 @Mapper
@@ -33,4 +34,11 @@ public interface JsydghxkMapper {
      * @param jsydghxkUpdateVo
      */
     void update(JsydghxkUpdateVo jsydghxkUpdateVo);
+
+    /**
+     * 更新建设用地规划许可的上链状态
+     * @param id 主键ID
+     * @param hasOnchain 是否上链
+     */
+    void updateHasOnchain(@Param("id") String id, @Param("hasOnchain") Boolean hasOnchain);
 }

+ 7 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/JsgcghxkService.java

@@ -37,4 +37,11 @@ public interface JsgcghxkService {
      * @param jsgcghxkUpdateVo 建设工程规划许可更新视图对象
      */
     void update(JsgcghxkUpdateVo jsgcghxkUpdateVo);
+
+    /**
+     * 更新建设工程规划��可的上链状态
+     * @param id 主键ID
+     * @param hasOnchain 是否上链
+     */
+    void updateHasOnchain(String id, Boolean hasOnchain);
 }

+ 7 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/JsydghxkService.java

@@ -35,4 +35,11 @@ public interface JsydghxkService {
      * @param jsydghxkUpdateVo 建设用地规划许可更新视图对象
      */
     void update(JsydghxkUpdateVo jsydghxkUpdateVo);
+
+    /**
+     * 更新建设用地规划许可的上链状态
+     * @param id 主键ID
+     * @param hasOnchain 是否上链
+     */
+    void updateHasOnchain(String id, Boolean hasOnchain);
 }

+ 5 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/impl/JsydghxkImpl.java

@@ -58,4 +58,9 @@ public class JsydghxkImpl implements JsydghxkService {
     public void update(JsydghxkUpdateVo jsydghxkUpdateVo) {
         jsydghxkMapper.update(jsydghxkUpdateVo);
     }
+
+    @Override
+    public void updateHasOnchain(String id, Boolean hasOnchain) {
+        jsydghxkMapper.updateHasOnchain(id, hasOnchain);
+    }
 }

+ 7 - 0
siwei-modules/siwei-apply/src/main/resources/mapper/JsgcghxkMapper.xml

@@ -63,4 +63,11 @@
         WHERE id = #{id}
     </update>
 
+    <!-- 更新has_onchain字段 -->
+    <update id="updateHasOnchain">
+        UPDATE t_jsgcghxk
+        SET has_onchain = #{hasOnchain}, updated_at = now()
+        WHERE id = #{id}
+    </update>
+
 </mapper>

+ 7 - 0
siwei-modules/siwei-apply/src/main/resources/mapper/JsydghxkMapper.xml

@@ -69,4 +69,11 @@
         WHERE id = #{id}
     </update>
 
+    <!-- 更新has_onchain字段 -->
+    <update id="updateHasOnchain">
+        UPDATE t_jsydghxk
+        SET has_onchain = #{hasOnchain}, updated_at = now()
+        WHERE id = #{id}
+    </update>
+
 </mapper>