1
0
gushoubang 2 ماه پیش
والد
کامیت
533f1cd691

+ 1 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/Tjyydhx.java

@@ -21,6 +21,7 @@ public class Tjyydhx {
     private String cjDate;           // 出具日期
     private String cjyj;           // 出具意见
     private String creatorId;      // 创建人ID
+    private Boolean hasOnchain;    // 是否上链
 
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createdAt;        // 创建时间

+ 1 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/res/TjyydhxRes.java

@@ -10,4 +10,5 @@ import lombok.Data;
 public class TjyydhxRes extends Tjyydhx {
     String projectName;// 项目名称
     String projectCode;// 项目代码
+    private Boolean hasOnchain;    // 是否上链
 }

+ 7 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/mapper/TjyydhxMapper.java

@@ -33,4 +33,11 @@ public interface TjyydhxMapper {
      * @param tjyydhxUpdateVo
      */
     void update(TjyydhxUpdateVo tjyydhxUpdateVo);
+
+    /**
+     * 更新上链状态
+     * @param id 主键ID
+     * @param hasOnchain 上链状态
+     */
+    void updateHasOnchain(String id, Boolean hasOnchain);
 }

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

@@ -35,4 +35,11 @@ public interface TjyydhxService {
      * @param tjyydhxUpdateVo 规划条件与用地红线出具更新视图对象
      */
     void update(TjyydhxUpdateVo tjyydhxUpdateVo);
+
+    /**
+     * 更新规划条件与用地红线出具的上链状态
+     * @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/TjyydhxImpl.java

@@ -59,4 +59,9 @@ public class TjyydhxImpl implements TjyydhxService {
     public void update(TjyydhxUpdateVo tjyydhxUpdateVo) {
         tjyydhxMapper.update(tjyydhxUpdateVo);
     }
+
+    @Override
+    public void updateHasOnchain(String id, Boolean hasOnchain) {
+        tjyydhxMapper.updateHasOnchain(id, hasOnchain);
+    }
 }

+ 10 - 2
siwei-modules/siwei-apply/src/main/resources/mapper/TjyydhxMapper.xml

@@ -18,6 +18,7 @@
         <result property="creatorId" column="creator_id"/>
         <result property="createdAt" column="created_at"/>
         <result property="updatedAt" column="updated_at"/>
+        <result property="hasOnchain" column="has_onchain"/>
     </resultMap>
 
     <select id="isExit" resultType="Boolean">
@@ -29,9 +30,9 @@
     <!-- 添加记录 -->
     <insert id="add" parameterType="com.siwei.apply.domain.Tjyydhx">
         INSERT INTO t_tjyydhx (id, project_id, dkbm, area, ydxz, ydwz,
-                               cjbh, cj_date, cjyj, creator_id, created_at, updated_at)
+        cjbh, cj_date, cjyj, creator_id, has_onchain, created_at, updated_at)
         VALUES (#{id}, #{projectId}, #{dkbm}, #{area}, #{ydxz}, #{ydwz},
-                #{cjbh}, #{cjDate}, #{cjyj}, #{creatorId}, now(), now())
+        #{cjbh}, #{cjDate}, #{cjyj}, #{creatorId},false, now(), now())
     </insert>
 
     <!-- 根据项目ID获取记录 -->
@@ -59,4 +60,11 @@
         WHERE id = #{id}
     </update>
 
+    <!-- 更新上链状态 -->
+    <update id="updateHasOnchain">
+        UPDATE t_tjyydhx
+        SET has_onchain = #{hasOnchain}, updated_at = now()
+        WHERE id = #{id}
+    </update>
+
 </mapper>