浏览代码

添加是否答复

LIVE_YE 1 年之前
父节点
当前提交
b9659b6c12

+ 9 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/ProposalUnitReply.java

@@ -32,6 +32,11 @@ public class ProposalUnitReply extends BaseEntity
     @Excel(name = "提案id")
     private Long proposalId;
 
+    /** 是否答复(0:是,1:否) */
+    @Excel(name = "是否答复(0:是,1:否)")
+    private String isReply;
+
+
     /** 答复内容 */
     @Excel(name = "答复内容")
     private String content;
@@ -43,6 +48,10 @@ public class ProposalUnitReply extends BaseEntity
     /** 附件 */
     private List<ZxFj> zxFjList;
 
+    public void setIsReply(String isReply) {
+        this.isReply = isReply;
+    }
+
     public List<ZxFj> getZxFjList() {
         return zxFjList;
     }

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProposalUnitReplyServiceImpl.java

@@ -113,6 +113,7 @@ public class ProposalUnitReplyServiceImpl implements IProposalUnitReplyService
         List<ProposalUnitReply> list = proposalUnitReplyMapper.selectProposalUnitReplyList(proposalUnitReply);
         for (ProposalUnitReply unitReply : list) {
             unitReply.setContent(proposalUnitReply.getContent());
+            unitReply.setIsReply("0");
             proposalUnitReplyMapper.updateProposalUnitReply(unitReply);
         }
         if(list.get(0).getType().equals("2")){

+ 6 - 1
ruoyi-system/src/main/resources/mapper/system/ProposalUnitReplyMapper.xml

@@ -9,13 +9,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deptId"    column="dept_id"    />
         <result property="deptName"    column="dept_name"    />
         <result property="proposalId"    column="proposal_id"    />
+        <result property="isReply"    column="is_reply"    />
         <result property="content"    column="content"    />
         <result property="type"    column="type"    />
         <result property="remark"    column="remark"    />
     </resultMap>
 
     <sql id="selectProposalUnitReplyVo">
-        select id, dept_id,dept_name, proposal_id, content, type, remark from proposal_unit_reply
+        select id, dept_id,dept_name, proposal_id,is_reply, content, type, remark from proposal_unit_reply
     </sql>
 
     <select id="selectProposalUnitReplyList" parameterType="ProposalUnitReply" resultMap="ProposalUnitReplyResult">
@@ -25,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="proposalId != null "> and proposal_id = #{proposalId}</if>
             <if test="content != null  and content != ''"> and content = #{content}</if>
             <if test="type != null  and type != ''"> and type = #{type}</if>
+            <if test="isReply != null  and isReply != ''"> and is_reply = #{isReply}</if>
         </where>
     </select>
     
@@ -39,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id,</if>
             <if test="deptName != null and deptName != ''">dept_name,</if>
             <if test="proposalId != null">proposal_id,</if>
+            <if test="isReply != null  ">is_reply ,</if>
             <if test="content != null and content != ''">content,</if>
             <if test="type != null">type,</if>
             <if test="remark != null">remark,</if>
@@ -47,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">#{deptId},</if>
             <if test="deptName != null and deptName != ''">#{deptName},</if>
             <if test="proposalId != null">#{proposalId},</if>
+            <if test="isReply != null  ">#{isReply},</if>
             <if test="content != null and content != ''">#{content},</if>
             <if test="type != null">#{type},</if>
             <if test="remark != null">#{remark},</if>
@@ -59,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="deptName != null and deptName != ''">dept_name= #{deptName},</if>
             <if test="proposalId != null">proposal_id = #{proposalId},</if>
+            <if test="isReply != null  "> is_reply = #{isReply},</if>
             <if test="content != null and content != ''">content = #{content},</if>
             <if test="type != null">type = #{type},</if>
             <if test="remark != null">remark = #{remark},</if>