LIVE_YE 1 рік тому
батько
коміт
227ca73069
23 змінених файлів з 1098 додано та 334 видалено
  1. 6 0
      pom.xml
  2. 22 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/proposal/ProposalInfoController.java
  3. 23 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/sqmy/SqmyInfoController.java
  4. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
  5. 6 0
      ruoyi-common/pom.xml
  6. 140 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/jPush/AbstractJPushToolUtil.java
  7. 62 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/jPush/JPushConfig.java
  8. 37 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/jPush/JPushToolUtil.java
  9. 51 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/jPush/JPushVO.java
  10. 22 4
      ruoyi-system/src/main/java/com/ruoyi/system/domain/ProposalInfo.java
  11. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/member/MemberInfo.java
  12. 13 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/sqmy/SqmyInfo.java
  13. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProposalInfoMapper.java
  14. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SqmyInfoMapper.java
  15. 4 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IProposalInfoService.java
  16. 5 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISqmyInfoService.java
  17. 4 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MemberInfoServiceImpl.java
  18. 56 8
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProposalInfoServiceImpl.java
  19. 14 5
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProposalUnitReplyServiceImpl.java
  20. 46 10
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SqmyInfoServiceImpl.java
  21. 10 5
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SqmyUnitReplyServiceImpl.java
  22. 370 197
      ruoyi-system/src/main/resources/mapper/system/ProposalInfoMapper.xml
  23. 200 101
      ruoyi-system/src/main/resources/mapper/system/SqmyInfoMapper.xml

+ 6 - 0
pom.xml

@@ -170,6 +170,12 @@
                 <version>${ruoyi.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>cn.jpush.api</groupId>
+                <artifactId>jpush-client</artifactId>
+                <version>3.4.3</version>
+            </dependency>
+
         </dependencies>
     </dependencyManagement>
 

+ 22 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/proposal/ProposalInfoController.java

@@ -69,6 +69,18 @@ public class ProposalInfoController extends BaseController
         return getDataTable(list);
     }
 
+    /**
+     * 催办列表
+     */
+    @PreAuthorize("@ss.hasPermi('proposalInfo:info:tacbList')")
+    @GetMapping("/tacbList")
+    public TableDataInfo tacbList(ProposalInfo proposalInfo)
+    {
+        startPage();
+        List<ProposalInfo> list = proposalInfoService.tacbList(proposalInfo);
+        return getDataTable(list);
+    }
+
     /**
      * 联名提案信息列表导出(只查询附议)
      */
@@ -243,6 +255,15 @@ public class ProposalInfoController extends BaseController
         return proposalInfoService.outstanding(proposalInfo);
     }
 
-
+    /***
+     * 承办单位答复委员
+     */
+    @PreAuthorize("@ss.hasPermi('proposalInfo:info:cbdwdfwy')")
+    @Log(title = "提案信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/cbdwdfwy")
+    public AjaxResult cbdwdfwy(@RequestBody ProposalInfo proposalInfo)
+    {
+        return toAjax(proposalInfoService.cbdwdfwy(proposalInfo));
+    }
 
 }

+ 23 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/sqmy/SqmyInfoController.java

@@ -49,7 +49,6 @@ public class SqmyInfoController extends BaseController
     /**
      * 列表页统计
      */
-    @PreAuthorize("@ss.hasPermi('sqmyInfo:info:statistics')")
     @GetMapping("/list/statistics")
     public AjaxResult statistics(SqmyInfo sqmyInfo)
     {
@@ -68,6 +67,18 @@ public class SqmyInfoController extends BaseController
         return getDataTable(list);
     }
 
+    /**
+     * 催办列表
+     */
+    @PreAuthorize("@ss.hasPermi('sqmyInfo:info:sqmycbList')")
+    @GetMapping("/sqmycbList")
+    public TableDataInfo sqmycbList(SqmyInfo sqmyInfo)
+    {
+        startPage();
+        List<SqmyInfo> list = sqmyInfoService.sqmycbList(sqmyInfo);
+        return getDataTable(list);
+    }
+
     /**
      * 导出社情民意信息列表
      */
@@ -201,4 +212,15 @@ public class SqmyInfoController extends BaseController
     {
         return sqmyInfoService.outstanding(sqmyInfo);
     }
+
+    /***
+     * 承办单位答复委员
+     */
+    @PreAuthorize("@ss.hasPermi('sqmyInfo:info:cbdwdfwy')")
+    @Log(title = "提案信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/cbdwdfwy")
+    public AjaxResult cbdwdfwy(@RequestBody SqmyInfo sqmyInfo)
+    {
+        return toAjax(sqmyInfoService.cbdwdfwy(sqmyInfo));
+    }
 }

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java

@@ -80,7 +80,7 @@ public class SysLoginController
         }else {
             ajax.put("memberInfo", null);
             //判断要不要弹框,首先判断是否是委员角色
-            flag = permissions.contains("zxwy");
+            flag = roles.contains("zxwy");
         }
         ajax.put("user", user);
         ajax.put("isMember", flag);

+ 6 - 0
ruoyi-common/pom.xml

@@ -157,6 +157,12 @@
             <artifactId>javax.servlet-api</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>cn.jpush.api</groupId>
+            <artifactId>jpush-client</artifactId>
+            <version>3.4.3</version>
+        </dependency>
+
     </dependencies>
 
 </project>

+ 140 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/jPush/AbstractJPushToolUtil.java

@@ -0,0 +1,140 @@
+package com.ruoyi.common.utils.jPush;
+
+import cn.jiguang.common.resp.APIConnectionException;
+import cn.jiguang.common.resp.APIRequestException;
+import cn.jpush.api.JPushClient;
+import cn.jpush.api.push.PushResult;
+import cn.jpush.api.push.model.Message;
+import cn.jpush.api.push.model.Options;
+import cn.jpush.api.push.model.Platform;
+import cn.jpush.api.push.model.PushPayload;
+import cn.jpush.api.push.model.audience.Audience;
+import cn.jpush.api.push.model.notification.AndroidNotification;
+import cn.jpush.api.push.model.notification.IosAlert;
+import cn.jpush.api.push.model.notification.Notification;
+import com.alibaba.fastjson2.JSON;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+
+@Component
+public abstract class AbstractJPushToolUtil {
+
+    private static final Logger log = LoggerFactory.getLogger(AbstractJPushToolUtil.class);
+
+    /*@Autowired
+    private JPushConfig jPush;*/
+
+    protected static AbstractJPushToolUtil abstractJPushToolUtils;
+
+    @PostConstruct
+    public void init() {
+        abstractJPushToolUtils = this;
+    }
+
+
+    private final static String appKey = "275af46e0d888270da3cfd1d";
+
+    private final static String masterSecret = "47047dfe7509f243bb8e25c7";
+
+    private static JPushClient jPushClient = new JPushClient(masterSecret, appKey);
+
+    /**
+     * 发送给指定极光Id
+     *
+     * @param registrationId
+     * @param notificationTitle
+     * @param msgTitle
+     * @param msgContent
+     * @param jPushVO
+     * @return
+     */
+    public static boolean sendToRegistrationId1(String notificationTitle, String
+            msgTitle, String msgContent, String jPushVO, String... registrationId) {
+        boolean result = false;
+        try {
+            PushPayload pushPayload = buildPushObject_all_registrationId_alertWithTitle
+                    (notificationTitle, msgTitle, msgContent, jPushVO, registrationId);
+            //TODO
+            if(pushPayload == null){
+                return result;
+            }
+            log.info("极光推送入参信息pushPayload:{}", JSON.toJSONString(pushPayload));
+            PushResult pushResult = jPushClient.sendPush(pushPayload);
+            log.info("极光推送出参信息pushResult:{}", JSON.toJSONString(pushResult));
+            if (pushResult.getResponseCode() == 200) {
+                result = true;
+            }
+        } catch (APIConnectionException e) {
+            e.printStackTrace();
+        } catch (APIRequestException e) {
+            e.printStackTrace();
+        }
+        return result;
+
+    }
+    /**
+     * 给指定设备id推送
+     *
+     * @param notificationTitle 通知标题
+     * @param msgTitle          消息标题
+     * @param msgContent        消息内容
+     * @param jPushVO       附加字段
+     * @param registrationId     设备id
+     * @return
+     */
+
+    private static PushPayload buildPushObject_all_registrationId_alertWithTitle(
+            String notificationTitle, String msgTitle, String msgContent, String jPushVO, String... registrationId) {
+        return PushPayload.newBuilder()
+                //指定要推送的平台,all代表当前应用配置了的所有平台,也可以传android等具体平台
+                .setPlatform(Platform.all())
+                //指定推送的接收对象,all代表所有人,也可以指定已经设置成功的tag或alias或该应应用客户端调用接口获取到的registration id
+                .setAudience(Audience.registrationId(registrationId))
+                //jpush的通知,android的由jpush直接下发,iOS的由apns服务器下发,Winphone的由mpns下发
+                .setNotification(Notification.newBuilder()
+                        //指定当前推送的android通知
+                        .addPlatformNotification(
+                                AndroidNotification.newBuilder()
+                                        .setTitle(notificationTitle)
+                                        .setAlert(msgContent)
+                                        //此字段为透传字段(类型被极光限定,不能传object),不会显示在通知栏。用户可以通过此字段来做一些定制需求,如特定的key传要指定跳转的页面(value)
+                                        .addExtra("data", JSON.toJSONString(jPushVO))
+                                        .build())
+                        .build())
+
+                //Platform指定了哪些平台就会像指定平台中符合推送条件的设备进行推送。 jpush的自定义消息,
+                // sdk默认不做任何处理,不会有通知提示。建议看文档http://docs.jpush.io/guideline/faq/的
+                // [通知与自定义消息有什么区别?]了解通知和自定义消息的区别
+                .setMessage(Message.newBuilder()
+                        .setMsgContent(msgContent)
+                        .setTitle(msgTitle)
+                        .addExtra("data", JSON.toJSONString(jPushVO))
+                        .build())
+                .setOptions(Options.newBuilder()
+                        //此字段的值是用来指定本推送要推送的apns环境,false表示开发,true表示生产;对android和自定义消息无意义
+                        .setApnsProduction(false)
+                        //此字段是给开发者自己给推送编号,方便推送者分辨推送记录
+                        .setSendno(1)
+                        //此字段的值是用来指定本推送的离线保存时长,如果不传此字段则默认保存一天,最多指定保留十天;
+                        .setTimeToLive(86400)
+                        .build())
+                .build();
+    }
+
+
+    /**
+     * 获取IOS的IosAlert
+     *
+     * @param notificationTitle
+     * @param subTitle
+     * @param msgContent
+     * @return
+     */
+    private static IosAlert queryIosAlert(String notificationTitle, String subTitle, String msgContent) {
+        return IosAlert.newBuilder().setTitleAndBody(notificationTitle, subTitle, msgContent).build();
+    }
+
+    }

+ 62 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/jPush/JPushConfig.java

@@ -0,0 +1,62 @@
+package com.ruoyi.common.utils.jPush;/*
+package com.ruoyi.common.utils.jPush;
+
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+@Component
+public class JPushConfig {
+
+    */
+/**
+     * 极光官网-个人管理中心-点击查看-secret
+     *//*
+
+    @Value("${jpush.masterSecret}")
+    private String masterSecret;
+
+    */
+/**
+     * 指定本推送要推送的apns环境,true表示生产,false表示开发
+     *//*
+
+    @Value("${jpush.environment}")
+    private boolean environment;
+
+    */
+/**
+     * 极光官网-个人管理中心-appkey
+     *//*
+
+    @Value("${push.appKey}")
+    private String appKey;
+
+    public String getMasterSecret() {
+        return masterSecret;
+    }
+
+    public boolean isEnvironment() {
+        return environment;
+    }
+
+    public String getAppKey() {
+        return appKey;
+    }
+
+    public void setMasterSecret(String masterSecret) {
+        this.masterSecret = masterSecret;
+    }
+
+    public void setEnvironment(boolean environment) {
+        this.environment = environment;
+    }
+
+    public void setAppKey(String appKey) {
+        this.appKey = appKey;
+    }
+
+
+
+}
+*/

+ 37 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/jPush/JPushToolUtil.java

@@ -0,0 +1,37 @@
+package com.ruoyi.common.utils.jPush;
+
+
+import org.springframework.stereotype.Component;
+
+@Component
+public class JPushToolUtil extends AbstractJPushToolUtil {
+    /**
+     * 发送给指定的极光ID
+     * @param notificationTitle  通知标题
+     * @param msgTitle 内容标题
+     * @param msgContent 内容
+     * @param jPushVO 扩展的json
+     * @param registrationId 极光id
+     * @return
+     */
+    public static boolean sendToRegistrationId(
+            String notificationTitle,
+            String msgTitle,
+            String msgContent,
+            String jPushVO,
+            String... registrationId) {
+        return sendToRegistrationId1(notificationTitle,msgTitle,msgContent,jPushVO,registrationId);
+    }
+
+    /*public static void main(String[] args) {
+        String num = "-0405-别名";
+        String notificationTitle = "推送测试-通知标题" + num;
+        String msgTitle = "推送测试-内容标题" + num;
+        String msgContent = "我是内容" + num;
+        String jPushVO = "我是扩展的json" + num;
+        String[]  registrationId = {"", ""};
+        boolean b = JPushToolUtil.sendToRegistrationId(notificationTitle, msgTitle, msgContent, jPushVO, registrationId);
+        System.out.println("i="+b);
+    }*/
+}
+

+ 51 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/jPush/JPushVO.java

@@ -0,0 +1,51 @@
+package com.ruoyi.common.utils.jPush;
+
+
+/**
+ * 极光拓展字段不能传输object,限制了类型,所以封装更好些
+ * 此类为极光推送拓展字段封装类(目前字段是暂定,你也可以拓展)
+ *
+ * @author juzi
+ * @date 2022-12-2
+ */
+public class JPushVO {
+    private Long id;
+
+    private String userName;
+
+    private String content;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @Override
+    public String toString() {
+        return "JPushVO{" +
+                "id=" + id +
+                ", userName='" + userName + '\'' +
+                ", content='" + content + '\'' +
+                '}';
+    }
+}
+

+ 22 - 4
ruoyi-system/src/main/java/com/ruoyi/system/domain/ProposalInfo.java

@@ -170,7 +170,10 @@ public class ProposalInfo extends BaseEntity
     private List<ZxFj> zxFjList;
     /** 单位回复 */
     private List<ProposalUnitReply> proposalUnitReplyList;
-
+    /**主办单位*/
+    private ProposalUnitReply zbUnitReply;
+    /** 回复单位 */
+    private ProposalUnitReply hfProposalUnitReply;
 
 
     /** 是否同意联名 */
@@ -189,6 +192,24 @@ public class ProposalInfo extends BaseEntity
      * 冗余字段
      */
     private String type;
+    /** 单位是否答复(0:是,1:否) */
+    private String isReply;
+
+    public String getIsReply() {
+        return isReply;
+    }
+
+    public void setIsReply(String isReply) {
+        this.isReply = isReply;
+    }
+
+    public ProposalUnitReply getHfProposalUnitReply() {
+        return hfProposalUnitReply;
+    }
+
+    public void setHfProposalUnitReply(ProposalUnitReply hfProposalUnitReply) {
+        this.hfProposalUnitReply = hfProposalUnitReply;
+    }
 
     public String getType() {
         return type;
@@ -254,9 +275,6 @@ public class ProposalInfo extends BaseEntity
         this.zbUnitReply = zbUnitReply;
     }
 
-    /**主办单位*/
-    private ProposalUnitReply zbUnitReply;
-
 
     public String getIsKeyPoint() {
         return isKeyPoint;

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/member/MemberInfo.java

@@ -56,6 +56,7 @@ public class MemberInfo extends BaseEntity
     /**
      * 是否是常委
      */
+    @Excel(name = "是否是常委")
     private String isMember;
     /**
      * 排名
@@ -64,6 +65,7 @@ public class MemberInfo extends BaseEntity
     /**
      * 级别,多选
      */
+    @Excel(name = "委员级别")
     private String grade;
 
     /** 删除标志(0代表存在 2代表删除) */

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/sqmy/SqmyInfo.java

@@ -147,10 +147,23 @@ public class SqmyInfo extends BaseEntity
 
     /** 单位类型 */
     private String dwType;
+    /** 单位是否答复(0:是,1:否) */
+    private String isReply;
 
     private String endTime;
     private String startTime;
 
+
+
+    public String getIsReply() {
+        return isReply;
+    }
+
+    public void setIsReply(String isReply) {
+        this.isReply = isReply;
+    }
+
+
     public String getEndTime() {
         return endTime;
     }

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProposalInfoMapper.java

@@ -62,4 +62,6 @@ public interface ProposalInfoMapper
     List<ProposalInfo> selectProposalInfoListByUser(ProposalInfo proposalInfo);
 
     List<ProposalInfo> selectProposalInfoListByUnit(ProposalInfo proposalInfo);
+
+    List<ProposalInfo> tacbList(ProposalInfo proposalInfo);
 }

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SqmyInfoMapper.java

@@ -61,4 +61,6 @@ public interface SqmyInfoMapper
     public int deleteSqmyInfoBySqmyIds(Long[] sqmyIds);
 
     List<SqmyInfo> selectSqmyInfoListByUnit(SqmyInfo sqmyInfo);
+
+    List<SqmyInfo> sqmycbList(SqmyInfo sqmyInfo);
 }

+ 4 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IProposalInfoService.java

@@ -83,4 +83,8 @@ public interface IProposalInfoService
      * 列表页统计
      */
     AjaxResult statistics(ProposalInfo proposalInfo);
+
+    int cbdwdfwy(ProposalInfo proposalInfo);
+
+    List<ProposalInfo> tacbList(ProposalInfo proposalInfo);
 }

+ 5 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ISqmyInfoService.java

@@ -1,6 +1,7 @@
 package com.ruoyi.system.service;
 
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.system.domain.ProposalInfo;
 import com.ruoyi.system.domain.sqmy.SqmyInfo;
 
 import java.util.List;
@@ -103,4 +104,8 @@ public interface ISqmyInfoService
      * 列表页统计
      */
     AjaxResult statistics(SqmyInfo sqmyInfo);
+
+    List<SqmyInfo> sqmycbList(SqmyInfo sqmyInfo);
+
+    int cbdwdfwy(SqmyInfo sqmyInfo);
 }

+ 4 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MemberInfoServiceImpl.java

@@ -28,6 +28,7 @@ import com.ruoyi.system.service.ISysConfigService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.service.IMemberInfoService;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.validation.Validator;
 import java.util.ArrayList;
@@ -306,6 +307,7 @@ public class MemberInfoServiceImpl implements IMemberInfoService {
     }
 
     @Override
+    @Transactional
     public String importData(List<MemberInfo> list, boolean updateSupport, String operName) {
         if (StringUtils.isNull(list) || list.size() == 0)
         {
@@ -325,6 +327,7 @@ public class MemberInfoServiceImpl implements IMemberInfoService {
                 if (StringUtils.isNull(u))
                 {
                     SysUser user = new SysUser();
+                    user.setDeptId(100L);
                     user.setUserName(member.getPhonenumber());
                     user.setNickName(member.getName());
                     user.setPhonenumber(member.getPhonenumber());
@@ -338,7 +341,7 @@ public class MemberInfoServiceImpl implements IMemberInfoService {
                     Long[] roleIds = {3L};
                     insertUserRole(user.getUserId(),roleIds);
                     //新增委员
-                    member.setUserId(SecurityUtils.getUserId());
+                    member.setUserId(user.getUserId());
                     member.setCreateTime(DateUtils.getNowDate());
                     memberInfoMapper.insertMemberInfo(member);
                     successNum++;

+ 56 - 8
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProposalInfoServiceImpl.java

@@ -7,7 +7,9 @@ import java.util.Map;
 
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.entity.SysRole;
 import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
@@ -56,8 +58,15 @@ public class ProposalInfoServiceImpl implements IProposalInfoService
         ZxFj zxFj = new ZxFj();
         zxFj.setMainId(proposalId);
         List<ZxFj> zxFjList = zxFjMapper.selectZxFjList(zxFj);
+        List<ZxFj> fjList = new ArrayList<>();
         if(zxFjList!=null && zxFjList.size()>0){
-            proposalInfo.setZxFjList(zxFjList);
+            for (ZxFj fj : zxFjList) {
+                if(proposalId == fj.getSourceId()){
+                    fjList.add(fj);
+                }
+            }
+
+            proposalInfo.setZxFjList(fjList);
         }
         //查询人员
         ProposalUser proposalUser = new ProposalUser();
@@ -97,6 +106,15 @@ public class ProposalInfoServiceImpl implements IProposalInfoService
     @Override
     public List<ProposalInfo> selectProposalInfoList(ProposalInfo proposalInfo)
     {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        List<SysRole> roles = user.getRoles();
+
+        for (SysRole role : roles) {
+            if("jbdw".equals(role.getRoleKey())){
+                proposalInfo.setIsRecord("0");
+            }
+        }
+
         return proposalInfoMapper.selectProposalInfoList(proposalInfo);
     }
 
@@ -173,6 +191,32 @@ public class ProposalInfoServiceImpl implements IProposalInfoService
         return AjaxResult.success(map);
     }
 
+    @Override
+    @Transactional
+    public int cbdwdfwy(ProposalInfo proposalInfo) {
+        ProposalInfo info = proposalInfoMapper.selectProposalInfoByProposalId(proposalInfo.getProposalId());
+        if(!"7".equals(info.getProposalProgress())){
+            throw new ServiceException("请等待交办单位审核完成!");
+        }
+        if(proposalInfo.getZxFjList()!=null && proposalInfo.getZxFjList().size()>0){
+            for (ZxFj zxFj : proposalInfo.getZxFjList()) {
+                zxFj.setMainId(proposalInfo.getProposalId());
+                zxFj.setSourceId(proposalInfo.getProposalId());
+                zxFj.setType("1");
+                zxFj.setStytle("5");
+                zxFjMapper.insertZxFj(zxFj);
+            }
+        }
+        proposalInfo.setProposalProgress("8");
+        proposalInfo.setCreateTime(DateUtils.getNowDate());
+        return proposalInfoMapper.updateProposalInfo(proposalInfo);
+    }
+
+    @Override
+    public List<ProposalInfo> tacbList(ProposalInfo proposalInfo) {
+        return proposalInfoMapper.tacbList(proposalInfo);
+    }
+
 
     /**
      * 新增提案信息
@@ -281,9 +325,14 @@ public class ProposalInfoServiceImpl implements IProposalInfoService
     @Override
     @Transactional
     public AjaxResult isRecord(ProposalInfo proposalInfo) {
+
+        ProposalInfo info = proposalInfoMapper.selectProposalInfoByProposalId(proposalInfo.getProposalId());
+        if(!"1".equals(info.getProposalProgress())){
+            throw new ServiceException("当前提案已操作,请勿重复操作!");
+        }
         //不立案,指定答复单位
         if("1".equals(proposalInfo.getIsRecord())){
-            proposalInfo.setProposalProgress("1");
+            proposalInfo.setProposalProgress("3");
             List<ProposalUnitReply> proposalUnitReplyList = proposalInfo.getProposalUnitReplyList();
             for (ProposalUnitReply proposalUnitReply : proposalUnitReplyList) {
                 proposalUnitReply.setProposalId(proposalInfo.getProposalId());
@@ -310,18 +359,16 @@ public class ProposalInfoServiceImpl implements IProposalInfoService
 
         if(proposalUnitReplyList!=null && proposalUnitReplyList.size()>0){
             for (ProposalUnitReply proposalUnitReply : proposalUnitReplyList) {
-                proposalUnitReply.setType("2");
                 proposalUnitReply.setProposalId(proposalInfo.getProposalId());
                 proposalUnitReply.setStartTime(DateUtils.getNowDate());
                 proposalUnitReplyMapper.insertProposalUnitReply(proposalUnitReply);
             }
         }
         zbUnitReply.setProposalId(proposalInfo.getProposalId());
-        zbUnitReply.setType("1");
         zbUnitReply.setStartTime(DateUtils.getNowDate());
         proposalUnitReplyMapper.insertProposalUnitReply(zbUnitReply);
 
-        proposalInfo.setProposalProgress("3");
+        proposalInfo.setProposalProgress("4");
         proposalInfo.setUpdateTime(DateUtils.getNowDate());
         int i = proposalInfoMapper.updateProposalInfo(proposalInfo);
         return i > 0 ? AjaxResult.success() : AjaxResult.error();
@@ -329,7 +376,6 @@ public class ProposalInfoServiceImpl implements IProposalInfoService
 
     @Override
     public AjaxResult idea(ProposalInfo proposalInfo) {
-        proposalInfo.setProposalProgress("5");
         proposalInfo.setUpdateTime(DateUtils.getNowDate());
         int i = proposalInfoMapper.updateProposalInfo(proposalInfo);
         return i > 0 ? AjaxResult.success() : AjaxResult.error();
@@ -359,7 +405,6 @@ public class ProposalInfoServiceImpl implements IProposalInfoService
 
     @Override
     public AjaxResult zxIdea(ProposalInfo proposalInfo) {
-        proposalInfo.setProposalProgress("5");
         proposalInfo.setUpdateTime(DateUtils.getNowDate());
         int i = proposalInfoMapper.updateProposalInfo(proposalInfo);
         return i > 0 ? AjaxResult.success() : AjaxResult.error();
@@ -374,8 +419,11 @@ public class ProposalInfoServiceImpl implements IProposalInfoService
 
     @Override
     public List<ProposalInfo> unitList(ProposalInfo proposalInfo) {
+
         SysUser user = SecurityUtils.getLoginUser().getUser();
-        proposalInfo.setDeptId(user.getDeptId());
+        if(!"admin".equals(user.getUserName())){
+            proposalInfo.setDeptId(user.getDeptId());
+        }
         return proposalInfoMapper.selectProposalInfoListByUnit(proposalInfo);
     }
 

+ 14 - 5
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProposalUnitReplyServiceImpl.java

@@ -3,6 +3,7 @@ package com.ruoyi.system.service.impl;
 import java.util.List;
 
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.system.domain.ProposalInfo;
@@ -16,6 +17,8 @@ import com.ruoyi.system.domain.ProposalUnitReply;
 import com.ruoyi.system.service.IProposalUnitReplyService;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.servlet.ServletException;
+
 /**
  * 提案单位答复Service业务层处理
  * 
@@ -109,18 +112,24 @@ public class ProposalUnitReplyServiceImpl implements IProposalUnitReplyService
     public AjaxResult reply(ProposalUnitReply proposalUnitReply) {
         //查询当前账号部门
         Long deptId = SecurityUtils.getDeptId();
-        proposalUnitReply.setDeptId(deptId);
-        proposalUnitReply.setEndTime(DateUtils.getNowDate());
-        List<ProposalUnitReply> list = proposalUnitReplyMapper.selectProposalUnitReplyList(proposalUnitReply);
+        ProposalUnitReply proposalUnit = new ProposalUnitReply();
+        proposalUnit.setDeptId(deptId);
+        proposalUnit.setProposalId(proposalUnitReply.getProposalId());
+        List<ProposalUnitReply> list = proposalUnitReplyMapper.selectProposalUnitReplyList(proposalUnit);
+
         for (ProposalUnitReply unitReply : list) {
             unitReply.setContent(proposalUnitReply.getContent());
             unitReply.setIsReply("0");
+            unitReply.setEndTime(DateUtils.getNowDate());
+            unitReply.setHandling(proposalUnitReply.getHandling());
+            unitReply.setDegree(proposalUnitReply.getDegree());
+            unitReply.setRemark(proposalUnitReply.getRemark());
             proposalUnitReplyMapper.updateProposalUnitReply(unitReply);
         }
         if(list.get(0).getType().equals("2")){
             ProposalInfo proposalInfo = new ProposalInfo();
             proposalInfo.setProposalId(proposalUnitReply.getProposalId());
-            proposalInfo.setProposalProgress("4");
+            proposalInfo.setProposalProgress("5");
             proposalInfo.setUpdateTime(DateUtils.getNowDate());
             proposalInfoMapper.updateProposalInfo(proposalInfo);
         }
@@ -128,7 +137,7 @@ public class ProposalUnitReplyServiceImpl implements IProposalUnitReplyService
         if(proposalUnitReply.getZxFjList()!=null && proposalUnitReply.getZxFjList().size()>0){
             for (ZxFj zxFj : proposalUnitReply.getZxFjList()) {
                 zxFj.setMainId(proposalUnitReply.getProposalId());
-                zxFj.setSourceId(proposalUnitReply.getId());
+                zxFj.setSourceId(list.get(0).getId());
                 zxFj.setType("1");
                 zxFj.setStytle(list.get(0).getType());
                 zxFjMapper.insertZxFj(zxFj);

+ 46 - 10
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SqmyInfoServiceImpl.java

@@ -6,9 +6,11 @@ import java.util.List;
 import java.util.Map;
 
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysRole;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.ProposalInfo;
 import com.ruoyi.system.domain.ProposalUnitReply;
 import com.ruoyi.system.domain.ZxFj;
@@ -51,8 +53,14 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
         ZxFj zxFj = new ZxFj();
         zxFj.setMainId(sqmyId);
         List<ZxFj> zxFjList = zxFjMapper.selectZxFjList(zxFj);
+        List<ZxFj> fjList = new ArrayList<>();
         if(zxFjList!=null && zxFjList.size()>0){
-            sqmyInfo.setZxFjList(zxFjList);
+            for (ZxFj fj : zxFjList) {
+                if(sqmyId == fj.getSourceId()){
+                    fjList.add(fj);
+                }
+            }
+            sqmyInfo.setZxFjList(fjList);
         }
         //查询答复
         SqmyUnitReply sqmyUnitReply = new SqmyUnitReply();
@@ -86,6 +94,14 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
     @Override
     public List<SqmyInfo> selectSqmyInfoList(SqmyInfo sqmyInfo)
     {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        List<SysRole> roles = user.getRoles();
+
+        for (SysRole role : roles) {
+            if("jbdw".equals(role.getRoleKey())){
+                sqmyInfo.setIsRecord("0");
+            }
+        }
         return sqmyInfoMapper.selectSqmyInfoList(sqmyInfo);
     }
 
@@ -117,10 +133,10 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
         //未办结
         int wbj = 0;
         for (SqmyInfo info : sqmyInfos) {
-            if(Integer.parseInt(info.getSatisfaction())>4){
+            if(StringUtils.isNotEmpty(info.getSatisfaction()) && Integer.parseInt(info.getSatisfaction())>4){
                 yjb++;
             }
-            if(Integer.parseInt(info.getSatisfaction())<=4){
+            if(StringUtils.isNotEmpty(info.getSatisfaction()) && Integer.parseInt(info.getSatisfaction())<=4){
                 djb++;
             }
             if("8".equals(info.getSqmyProgress())) {
@@ -142,6 +158,27 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
         return AjaxResult.success(map);
     }
 
+    @Override
+    public List<SqmyInfo> sqmycbList(SqmyInfo sqmyInfo) {
+        return sqmyInfoMapper.sqmycbList(sqmyInfo);
+    }
+
+    @Override
+    public int cbdwdfwy(SqmyInfo sqmyInfo) {
+        if(sqmyInfo.getZxFjList()!=null && sqmyInfo.getZxFjList().size()>0){
+            for (ZxFj zxFj : sqmyInfo.getZxFjList()) {
+                zxFj.setMainId(sqmyInfo.getSqmyId());
+                zxFj.setSourceId(sqmyInfo.getSqmyId());
+                zxFj.setType("2");
+                zxFj.setStytle("5");
+                zxFjMapper.insertZxFj(zxFj);
+            }
+        }
+        sqmyInfo.setSqmyProgress("8");
+        sqmyInfo.setUpdateTime(DateUtils.getNowDate());
+        return sqmyInfoMapper.updateSqmyInfo(sqmyInfo);
+    }
+
     /**
      * 新增社情民意信息
      * 
@@ -155,6 +192,7 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
         sqmyInfo.setSqmyUserId(user.getUserId());
         sqmyInfo.setSqmyProgress("1");
         sqmyInfo.setCreateTime(DateUtils.getNowDate());
+        sqmyInfo.setUpdateTime(DateUtils.getNowDate());
         int i = sqmyInfoMapper.insertSqmyInfo(sqmyInfo);
         if(sqmyInfo.getZxFjList()!=null && sqmyInfo.getZxFjList().size()>0){
             for (ZxFj zxFj : sqmyInfo.getZxFjList()) {
@@ -224,7 +262,7 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
     public AjaxResult isRecord(SqmyInfo sqmyInfo) {
         //不立案,指定答复单位
         if("1".equals(sqmyInfo.getIsRecord())){
-            sqmyInfo.setSqmyProgress("1");
+            sqmyInfo.setSqmyProgress("3");
             List<SqmyUnitReply> sqmyUnitReplyList = sqmyInfo.getSqmyUnitReplyList();
             for (SqmyUnitReply sqmyUnitReply : sqmyUnitReplyList) {
                 sqmyUnitReply.setSqmyId(sqmyInfo.getSqmyId());
@@ -249,18 +287,16 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
         SqmyUnitReply zbUnitReply = sqmyInfo.getZbUnitReply();
         if(sqmyUnitReplyList!=null && sqmyUnitReplyList.size()>0){
             for (SqmyUnitReply sqmyUnitReply : sqmyUnitReplyList) {
-                sqmyUnitReply.setType("2");
                 sqmyUnitReply.setSqmyId(sqmyInfo.getSqmyId());
                 sqmyUnitReply.setStartTime(DateUtils.getNowDate());
                 sqmyUnitReplyMapper.insertSqmyUnitReply(sqmyUnitReply);
             }
         }
         zbUnitReply.setSqmyId(sqmyInfo.getSqmyId());
-        zbUnitReply.setType("1");
         zbUnitReply.setStartTime(DateUtils.getNowDate());
         sqmyUnitReplyMapper.insertSqmyUnitReply(zbUnitReply);
 
-        sqmyInfo.setSqmyProgress("3");
+        sqmyInfo.setSqmyProgress("4");
         sqmyInfo.setUpdateTime(DateUtils.getNowDate());
         int i = sqmyInfoMapper.updateSqmyInfo(sqmyInfo);
         return i > 0 ? AjaxResult.success() : AjaxResult.error();
@@ -271,7 +307,6 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
      */
     @Override
     public AjaxResult idea(SqmyInfo sqmyInfo) {
-        sqmyInfo.setSqmyProgress("5");
         sqmyInfo.setUpdateTime(DateUtils.getNowDate());
         int i = sqmyInfoMapper.updateSqmyInfo(sqmyInfo);
         return i > 0 ? AjaxResult.success() : AjaxResult.error();
@@ -282,7 +317,6 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
      */
     @Override
     public AjaxResult zxIdea(SqmyInfo sqmyInfo) {
-        sqmyInfo.setSqmyProgress("5");
         sqmyInfo.setUpdateTime(DateUtils.getNowDate());
         int i = sqmyInfoMapper.updateSqmyInfo(sqmyInfo);
         return i > 0 ? AjaxResult.success() : AjaxResult.error();
@@ -321,7 +355,9 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
     @Override
     public List<SqmyInfo> unitList(SqmyInfo sqmyInfo) {
         SysUser user = SecurityUtils.getLoginUser().getUser();
-        sqmyInfo.setDeptId(user.getDeptId());
+        if(!"admin".equals(user.getUserName())){
+            sqmyInfo.setDeptId(user.getDeptId());
+        }
         return sqmyInfoMapper.selectSqmyInfoListByUnit(sqmyInfo);
     }
 

+ 10 - 5
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SqmyUnitReplyServiceImpl.java

@@ -109,18 +109,23 @@ public class SqmyUnitReplyServiceImpl implements ISqmyUnitReplyService
     public AjaxResult reply(SqmyUnitReply sqmyUnitReply) {
         //查询当前账号部门
         Long deptId = SecurityUtils.getDeptId();
-        sqmyUnitReply.setDeptId(deptId);
-        sqmyUnitReply.setEndTime(DateUtils.getNowDate());
-        List<SqmyUnitReply> list = sqmyUnitReplyMapper.selectSqmyUnitReplyList(sqmyUnitReply);
+        SqmyUnitReply sqmyUnit = new SqmyUnitReply();
+        sqmyUnit.setDeptId(deptId);
+        sqmyUnit.setSqmyId(sqmyUnitReply.getSqmyId());
+        List<SqmyUnitReply> list = sqmyUnitReplyMapper.selectSqmyUnitReplyList(sqmyUnit);
         for (SqmyUnitReply unitReply : list) {
             unitReply.setContent(sqmyUnitReply.getContent());
             unitReply.setIsReply("0");
+            unitReply.setEndTime(DateUtils.getNowDate());
+            unitReply.setHandling(sqmyUnitReply.getHandling());
+            unitReply.setDegree(sqmyUnitReply.getDegree());
+            unitReply.setRemark(sqmyUnitReply.getRemark());
             sqmyUnitReplyMapper.updateSqmyUnitReply(unitReply);
         }
         if(list.get(0).getType().equals("2")){
             SqmyInfo sqmyInfo = new SqmyInfo();
             sqmyInfo.setSqmyId(sqmyUnitReply.getSqmyId());
-            sqmyInfo.setSqmyProgress("4");
+            sqmyInfo.setSqmyProgress("5");
             sqmyInfo.setUpdateTime(DateUtils.getNowDate());
             sqmyInfoMapper.updateSqmyInfo(sqmyInfo);
         }
@@ -128,7 +133,7 @@ public class SqmyUnitReplyServiceImpl implements ISqmyUnitReplyService
         if(sqmyUnitReply.getZxFjList()!=null && sqmyUnitReply.getZxFjList().size()>0){
             for (ZxFj zxFj : sqmyUnitReply.getZxFjList()) {
                 zxFj.setMainId(sqmyUnitReply.getSqmyId());
-                zxFj.setSourceId(sqmyUnitReply.getId());
+                zxFj.setSourceId(list.get(0).getId());
                 zxFj.setType("1");
                 zxFj.setStytle(list.get(0).getType());
                 zxFjMapper.insertZxFj(zxFj);

+ 370 - 197
ruoyi-system/src/main/resources/mapper/system/ProposalInfoMapper.xml

@@ -1,111 +1,170 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.system.mapper.ProposalInfoMapper">
-    
+
     <resultMap type="ProposalInfo" id="ProposalInfoResult">
-        <result property="proposalId"    column="proposal_id"    />
-        <result property="proposalUserId"    column="proposal_user_id"    />
-        <result property="proposalNumber"    column="proposal_number"    />
-        <result property="title"    column="title"    />
-        <result property="proposalName"    column="proposal_name"    />
-        <result property="proposalPhone"    column="proposal_phone"    />
-        <result property="boundary"    column="boundary"    />
-        <result property="partyAffiliation"    column="party_affiliation"    />
-        <result property="contactAddress"    column="contact_address"    />
-        <result property="categoryId"    column="category_id"    />
-        <result property="categoryName"    column="category_name"    />
-        <result property="proposalType"    column="proposal_type"    />
-        <result property="proposalContent"    column="proposal_content"    />
-        <result property="isJointly"    column="is_jointly"    />
-        <result property="isPublicity"    column="is_publicity"    />
-        <result property="contentPublicity"    column="content_publicity"    />
-        <result property="isSurvey"    column="is_survey"    />
-        <result property="isFirst"    column="is_first"    />
-        <result property="isPerson"    column="is_person"    />
-        <result property="isRecord"    column="is_record"    />
-        <result property="negotiateType"    column="negotiate_type"    />
-        <result property="proposedContractor"    column="proposed_contractor"    />
-        <result property="proposalProgress"    column="proposal_progress"    />
-        <result property="backReason"    column="back_reason"    />
-        <result property="rollingProcess"    column="rolling_process"    />
-        <result property="complexType"    column="complex_type"    />
-        <result property="isCasesTogether"    column="is_cases_together"    />
-        <result property="uniteProposalId"    column="unite_proposal_id"    />
-        <result property="satisfaction"    column="satisfaction"    />
-        <result property="membersOpinion"    column="members_opinion"    />
+        <result property="proposalId" column="proposal_id"/>
+        <result property="proposalUserId" column="proposal_user_id"/>
+        <result property="proposalNumber" column="proposal_number"/>
+        <result property="title" column="title"/>
+        <result property="proposalName" column="proposal_name"/>
+        <result property="proposalPhone" column="proposal_phone"/>
+        <result property="boundary" column="boundary"/>
+        <result property="partyAffiliation" column="party_affiliation"/>
+        <result property="contactAddress" column="contact_address"/>
+        <result property="categoryId" column="category_id"/>
+        <result property="categoryName" column="category_name"/>
+        <result property="proposalType" column="proposal_type"/>
+        <result property="proposalContent" column="proposal_content"/>
+        <result property="isJointly" column="is_jointly"/>
+        <result property="isPublicity" column="is_publicity"/>
+        <result property="contentPublicity" column="content_publicity"/>
+        <result property="isSurvey" column="is_survey"/>
+        <result property="isFirst" column="is_first"/>
+        <result property="isPerson" column="is_person"/>
+        <result property="isRecord" column="is_record"/>
+        <result property="negotiateType" column="negotiate_type"/>
+        <result property="proposedContractor" column="proposed_contractor"/>
+        <result property="proposalProgress" column="proposal_progress"/>
+        <result property="backReason" column="back_reason"/>
+        <result property="rollingProcess" column="rolling_process"/>
+        <result property="complexType" column="complex_type"/>
+        <result property="isCasesTogether" column="is_cases_together"/>
+        <result property="uniteProposalId" column="unite_proposal_id"/>
+        <result property="satisfaction" column="satisfaction"/>
+        <result property="membersOpinion" column="members_opinion"/>
 
-        <result property="cbdwdfwy"    column="cbdwdfwy"    />
+        <result property="cbdwdfwy" column="cbdwdfwy"/>
 
-        <result property="zxSatisfaction"    column="zx_satisfaction"    />
-        <result property="zxOpinion"    column="zx_opinion"    />
+        <result property="zxSatisfaction" column="zx_satisfaction"/>
+        <result property="zxOpinion" column="zx_opinion"/>
 
-        <result property="isKeyPoint"    column="is_key_point"    />
-        <result property="keyPointArgument"    column="key_point_argument"    />
-        <result property="isOutstanding"    column="is_outstanding"    />
-        <result property="outstandingArgument"    column="outstanding_argument"    />
+        <result property="isKeyPoint" column="is_key_point"/>
+        <result property="keyPointArgument" column="key_point_argument"/>
+        <result property="isOutstanding" column="is_outstanding"/>
+        <result property="outstandingArgument" column="outstanding_argument"/>
 
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="remark"    column="remark"    />
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
 
 
-        <result property="isAgree"    column="isAgree"    />
-        <result property="deptId"    column="deptId"    />
-        <result property="dwType"    column="dwType"    />
-        <collection  property="proposalUserList"   javaType="java.util.List"  resultMap="ProposalUserResult" />
+        <result property="isAgree" column="isAgree"/>
+        <result property="deptId" column="deptId"/>
+        <result property="dwType" column="dwType"/>
+        <result property="isReply" column="isReply"/>
+        <collection property="proposalUserList" javaType="java.util.List" resultMap="ProposalUserResult"/>
     </resultMap>
 
     <resultMap type="ProposalUser" id="ProposalUserResult">
-        <result property="isAgree"    column="is_agree"    />
+        <result property="isAgree" column="is_agree"/>
     </resultMap>
 
     <sql id="selectProposalInfoVo">
-        select proposal_id, proposal_user_id, proposal_number, title, proposal_name, proposal_phone, boundary, party_affiliation, contact_address, category_id, category_name, proposal_type, proposal_content, is_jointly, is_publicity, content_publicity, is_survey, is_first, is_person, is_record, negotiate_type, proposed_contractor, proposal_progress,back_reason, rolling_process, complex_type, is_cases_together, unite_proposal_id, satisfaction, members_opinion,
-               cbdwdfwy,zx_satisfaction,zx_opinion,is_key_point,key_point_argument,is_outstanding,outstanding_argument,create_by, create_time, update_by, update_time, remark from proposal_info
+        select proposal_id,
+               proposal_user_id,
+               proposal_number,
+               title,
+               proposal_name,
+               proposal_phone,
+               boundary,
+               party_affiliation,
+               contact_address,
+               category_id,
+               category_name,
+               proposal_type,
+               proposal_content,
+               is_jointly,
+               is_publicity,
+               content_publicity,
+               is_survey,
+               is_first,
+               is_person,
+               is_record,
+               negotiate_type,
+               proposed_contractor,
+               proposal_progress,
+               back_reason,
+               rolling_process,
+               complex_type,
+               is_cases_together,
+               unite_proposal_id,
+               satisfaction,
+               members_opinion,
+               cbdwdfwy,
+               zx_satisfaction,
+               zx_opinion,
+               is_key_point,
+               key_point_argument,
+               is_outstanding,
+               outstanding_argument,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               remark
+        from proposal_info
     </sql>
 
     <select id="selectProposalInfoList" parameterType="ProposalInfo" resultMap="ProposalInfoResult">
         <include refid="selectProposalInfoVo"/>
-        <where>  
-            <if test="proposalUserId != null "> and proposal_user_id = #{proposalUserId}</if>
-            <if test="proposalNumber != null  and proposalNumber != ''"> and proposal_number = #{proposalNumber}</if>
-            <if test="title != null  and title != ''"> and title = #{title}</if>
-            <if test="proposalName != null  and proposalName != ''"> and proposal_name like concat('%', #{proposalName}, '%')</if>
-            <if test="proposalPhone != null  and proposalPhone != ''"> and proposal_phone = #{proposalPhone}</if>
-            <if test="boundary != null  and boundary != ''"> and boundary = #{boundary}</if>
-            <if test="partyAffiliation != null  and partyAffiliation != ''"> and party_affiliation = #{partyAffiliation}</if>
-            <if test="contactAddress != null  and contactAddress != ''"> and contact_address = #{contactAddress}</if>
-            <if test="categoryId != null "> and category_id = #{categoryId}</if>
-            <if test="categoryName != null  and categoryName != ''"> and category_name like concat('%', #{categoryName}, '%')</if>
-            <if test="proposalType != null  and proposalType != ''"> and proposal_type = #{proposalType}</if>
-            <if test="proposalContent != null  and proposalContent != ''"> and proposal_content = #{proposalContent}</if>
-            <if test="isJointly != null  and isJointly != ''"> and is_jointly = #{isJointly}</if>
-            <if test="isPublicity != null  and isPublicity != ''"> and is_publicity = #{isPublicity}</if>
-            <if test="contentPublicity != null  and contentPublicity != ''"> and content_publicity = #{contentPublicity}</if>
-            <if test="isSurvey != null  and isSurvey != ''"> and is_survey = #{isSurvey}</if>
-            <if test="isFirst != null  and isFirst != ''"> and is_first = #{isFirst}</if>
-            <if test="isPerson != null  and isPerson != ''"> and is_person = #{isPerson}</if>
-            <if test="isRecord != null  and isRecord != ''"> and is_record = #{isRecord}</if>
-            <if test="negotiateType != null  and negotiateType != ''"> and negotiate_type = #{negotiateType}</if>
-            <if test="proposedContractor != null  and proposedContractor != ''"> and proposed_contractor = #{proposedContractor}</if>
-            <if test="proposalProgress != null  and proposalProgress != ''"> and proposal_progress = #{proposalProgress}</if>
-            <if test="rollingProcess != null  and rollingProcess != ''"> and rolling_process = #{rollingProcess}</if>
-            <if test="complexType != null  and complexType != ''"> and complex_type = #{complexType}</if>
-            <if test="isCasesTogether != null  and isCasesTogether != ''"> and is_cases_together = #{isCasesTogether}</if>
-            <if test="uniteProposalId != null "> and unite_proposal_id = #{uniteProposalId}</if>
-            <if test="satisfaction != null  and satisfaction != ''"> and satisfaction = #{satisfaction}</if>
-            <if test="membersOpinion != null  and membersOpinion != ''"> and members_opinion = #{membersOpinion}</if>
-            <if test="zxSatisfaction != null  and zxSatisfaction != ''"> and zx_satisfaction = #{zxSatisfaction}</if>
-            <if test="zxOpinion != null  and zxOpinion != ''"> and zx_opinion = #{zxOpinion}</if>
+        <where>
+            <if test="proposalUserId != null ">and proposal_user_id = #{proposalUserId}</if>
+            <if test="proposalNumber != null  and proposalNumber != ''">and proposal_number = #{proposalNumber}</if>
+            <if test="title != null  and title != ''">and title = #{title}</if>
+            <if test="proposalName != null  and proposalName != ''">and proposal_name like concat('%', #{proposalName},
+                '%')
+            </if>
+            <if test="proposalPhone != null  and proposalPhone != ''">and proposal_phone = #{proposalPhone}</if>
+            <if test="boundary != null  and boundary != ''">and boundary = #{boundary}</if>
+            <if test="partyAffiliation != null  and partyAffiliation != ''">and party_affiliation =
+                #{partyAffiliation}
+            </if>
+            <if test="contactAddress != null  and contactAddress != ''">and contact_address = #{contactAddress}</if>
+            <if test="categoryId != null ">and category_id = #{categoryId}</if>
+            <if test="categoryName != null  and categoryName != ''">and category_name like concat('%', #{categoryName},
+                '%')
+            </if>
+            <if test="proposalType != null  and proposalType != ''">and proposal_type = #{proposalType}</if>
+            <if test="proposalContent != null  and proposalContent != ''">and proposal_content = #{proposalContent}</if>
+            <if test="isJointly != null  and isJointly != ''">and is_jointly = #{isJointly}</if>
+            <if test="isPublicity != null  and isPublicity != ''">and is_publicity = #{isPublicity}</if>
+            <if test="contentPublicity != null  and contentPublicity != ''">and content_publicity =
+                #{contentPublicity}
+            </if>
+            <if test="isSurvey != null  and isSurvey != ''">and is_survey = #{isSurvey}</if>
+            <if test="isFirst != null  and isFirst != ''">and is_first = #{isFirst}</if>
+            <if test="isPerson != null  and isPerson != ''">and is_person = #{isPerson}</if>
+            <if test="isRecord != null  and isRecord != ''">and is_record = #{isRecord}</if>
+            <if test="negotiateType != null  and negotiateType != ''">and negotiate_type = #{negotiateType}</if>
+            <if test="proposedContractor != null  and proposedContractor != ''">and proposed_contractor =
+                #{proposedContractor}
+            </if>
+            <if test="proposalProgress != null  and proposalProgress != ''">and proposal_progress =
+                #{proposalProgress}
+            </if>
+            <if test="rollingProcess != null  and rollingProcess != ''">and rolling_process = #{rollingProcess}</if>
+            <if test="complexType != null  and complexType != ''">and complex_type = #{complexType}</if>
+            <if test="isCasesTogether != null  and isCasesTogether != ''">and is_cases_together = #{isCasesTogether}
+            </if>
+            <if test="uniteProposalId != null ">and unite_proposal_id = #{uniteProposalId}</if>
+            <if test="satisfaction != null  and satisfaction != ''">and satisfaction = #{satisfaction}</if>
+            <if test="membersOpinion != null  and membersOpinion != ''">and members_opinion = #{membersOpinion}</if>
+            <if test="zxSatisfaction != null  and zxSatisfaction != ''">and zx_satisfaction = #{zxSatisfaction}</if>
+            <if test="zxOpinion != null  and zxOpinion != ''">and zx_opinion = #{zxOpinion}</if>
 
-            <if test="isKeyPoint != null  and isKeyPoint != ''"> and is_key_point = #{isKeyPoint}</if>
-            <if test="keyPointArgument != null  and keyPointArgument != ''"> and key_point_argument = #{keyPointArgument}</if>
-            <if test="isOutstanding != null  and isOutstanding != ''"> and is_outstanding = #{isOutstanding}</if>
-            <if test="outstandingArgument != null  and outstandingArgument != ''"> and outstanding_argument = #{outstandingArgument}</if>
+            <if test="isKeyPoint != null  and isKeyPoint != ''">and is_key_point = #{isKeyPoint}</if>
+            <if test="keyPointArgument != null  and keyPointArgument != ''">and key_point_argument =
+                #{keyPointArgument}
+            </if>
+            <if test="isOutstanding != null  and isOutstanding != ''">and is_outstanding = #{isOutstanding}</if>
+            <if test="outstandingArgument != null  and outstandingArgument != ''">and outstanding_argument =
+                #{outstandingArgument}
+            </if>
             <if test="startTime != null and startTime != ''"><!-- 开始时间检索 -->
                 AND date_format(create_time,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d')
             </if>
@@ -115,111 +174,223 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by create_time desc
     </select>
-    
+
     <select id="selectProposalInfoByProposalId" parameterType="Long" resultMap="ProposalInfoResult">
         <include refid="selectProposalInfoVo"/>
         where proposal_id = #{proposalId}
     </select>
     <select id="selectProposalInfoListByUser" resultMap="ProposalInfoResult">
-        select p.proposal_id, p.proposal_user_id, p.proposal_number, p.title, p.proposal_name, p.proposal_phone, p.boundary, p.party_affiliation,
-               p.contact_address, p.category_id, p.category_name, p.proposal_type, p.proposal_content, p.is_jointly, p.is_publicity, p.content_publicity,
-               p.is_survey, p.is_first, p.is_person, p.is_record, p.negotiate_type, p.proposed_contractor, p.proposal_progress,p.back_reason, p.rolling_process, p.complex_type,
-               p.is_cases_together, p.unite_proposal_id, p.satisfaction, p.members_opinion,p.cbdwdfwy,
-               p.zx_satisfaction,p.zx_opinion,p.is_key_point,p.key_point_argument,p.is_outstanding,p.outstanding_argument,p.create_by, p.create_time,
-               p.update_by, p.update_time, p.remark,u.is_agree as isAgree
+        select p.proposal_id, p.proposal_user_id, p.proposal_number, p.title, p.proposal_name, p.proposal_phone,
+        p.boundary, p.party_affiliation,
+        p.contact_address, p.category_id, p.category_name, p.proposal_type, p.proposal_content, p.is_jointly,
+        p.is_publicity, p.content_publicity,
+        p.is_survey, p.is_first, p.is_person, p.is_record, p.negotiate_type, p.proposed_contractor,
+        p.proposal_progress,p.back_reason, p.rolling_process, p.complex_type,
+        p.is_cases_together, p.unite_proposal_id, p.satisfaction, p.members_opinion,p.cbdwdfwy,
+        p.zx_satisfaction,p.zx_opinion,p.is_key_point,p.key_point_argument,p.is_outstanding,p.outstanding_argument,p.create_by,
+        p.create_time,
+        p.update_by, p.update_time, p.remark,u.is_agree as isAgree
         from proposal_info p
         left join proposal_user u on p.proposal_id = u.proposal_id
         <where>
-        <if test="isAgree != null  and isAgree != ''"> and u.is_agree = #{isAgree}</if>
-        <if test="type != null  and type != ''"> and u.type = #{type}</if>
-        <if test="proposalUserId != null  "> and u.user_id = #{proposalUserId}</if>
-        <if test="proposalNumber != null  and proposalNumber != ''"> and p.proposal_number = #{proposalNumber}</if>
-        <if test="title != null  and title != ''"> and p.title = #{title}</if>
-        <if test="proposalName != null  and proposalName != ''"> and p.proposal_name like concat('%', #{proposalName}, '%')</if>
-        <if test="proposalPhone != null  and proposalPhone != ''"> and p.proposal_phone = #{proposalPhone}</if>
-        <if test="boundary != null  and boundary != ''"> and p.boundary = #{boundary}</if>
-        <if test="partyAffiliation != null  and partyAffiliation != ''"> and p.party_affiliation = #{partyAffiliation}</if>
-        <if test="contactAddress != null  and contactAddress != ''"> and p.contact_address = #{contactAddress}</if>
-        <if test="categoryId != null "> and p.category_id = #{categoryId}</if>
-        <if test="categoryName != null  and categoryName != ''"> and p.category_name like concat('%', #{categoryName}, '%')</if>
-        <if test="proposalType != null  and proposalType != ''"> and p.proposal_type = #{proposalType}</if>
-        <if test="proposalContent != null  and proposalContent != ''"> and p.proposal_content = #{proposalContent}</if>
-        <if test="isJointly != null  and isJointly != ''"> and p.is_jointly = #{isJointly}</if>
-        <if test="isPublicity != null  and isPublicity != ''"> and p.is_publicity = #{isPublicity}</if>
-        <if test="contentPublicity != null  and contentPublicity != ''"> and p.content_publicity = #{contentPublicity}</if>
-        <if test="isSurvey != null  and isSurvey != ''"> and p.is_survey = #{isSurvey}</if>
-        <if test="isFirst != null  and isFirst != ''"> and p.is_first = #{isFirst}</if>
-        <if test="isPerson != null  and isPerson != ''"> and p.is_person = #{isPerson}</if>
-        <if test="isRecord != null  and isRecord != ''"> and p.is_record = #{isRecord}</if>
-        <if test="negotiateType != null  and negotiateType != ''"> and p.negotiate_type = #{negotiateType}</if>
-        <if test="proposedContractor != null  and proposedContractor != ''"> and p.proposed_contractor = #{proposedContractor}</if>
-        <if test="proposalProgress != null  and proposalProgress != ''"> and p.proposal_progress = #{proposalProgress}</if>
-        <if test="rollingProcess != null  and rollingProcess != ''"> and p.rolling_process = #{rollingProcess}</if>
-        <if test="complexType != null  and complexType != ''"> and p.complex_type = #{complexType}</if>
-        <if test="isCasesTogether != null  and isCasesTogether != ''"> and p.is_cases_together = #{isCasesTogether}</if>
-        <if test="uniteProposalId != null "> and p.unite_proposal_id = #{uniteProposalId}</if>
-        <if test="satisfaction != null  and satisfaction != ''"> and p.satisfaction = #{satisfaction}</if>
-        <if test="membersOpinion != null  and membersOpinion != ''"> and p.members_opinion = #{membersOpinion}</if>
-        <if test="zxSatisfaction != null  and zxSatisfaction != ''"> and p.zx_satisfaction = #{zxSatisfaction}</if>
-        <if test="zxOpinion != null  and zxOpinion != ''"> and p.zx_opinion = #{zxOpinion}</if>
-        <if test="isKeyPoint != null  and isKeyPoint != ''"> and p.is_key_point = #{isKeyPoint}</if>
-        <if test="keyPointArgument != null  and keyPointArgument != ''"> and p.key_point_argument = #{keyPointArgument}</if>
-        <if test="isOutstanding != null  and isOutstanding != ''"> and p.is_outstanding = #{isOutstanding}</if>
-        <if test="outstandingArgument != null  and outstandingArgument != ''"> and p.outstanding_argument = #{outstandingArgument}</if>
-        <if test="year != null and year != ''"><!-- 开始时间检索 -->
-            AND date_format(p.update_time,'%Y') = #{year}
-        </if>
+            <if test="isAgree != null  and isAgree != ''">and u.is_agree = #{isAgree}</if>
+            <if test="type != null  and type != ''">and u.type = #{type}</if>
+            <if test="proposalUserId != null  ">and u.user_id = #{proposalUserId}</if>
+            <if test="proposalNumber != null  and proposalNumber != ''">and p.proposal_number = #{proposalNumber}</if>
+            <if test="title != null  and title != ''">and p.title = #{title}</if>
+            <if test="proposalName != null  and proposalName != ''">and p.proposal_name like concat('%',
+                #{proposalName}, '%')
+            </if>
+            <if test="proposalPhone != null  and proposalPhone != ''">and p.proposal_phone = #{proposalPhone}</if>
+            <if test="boundary != null  and boundary != ''">and p.boundary = #{boundary}</if>
+            <if test="partyAffiliation != null  and partyAffiliation != ''">and p.party_affiliation =
+                #{partyAffiliation}
+            </if>
+            <if test="contactAddress != null  and contactAddress != ''">and p.contact_address = #{contactAddress}</if>
+            <if test="categoryId != null ">and p.category_id = #{categoryId}</if>
+            <if test="categoryName != null  and categoryName != ''">and p.category_name like concat('%',
+                #{categoryName}, '%')
+            </if>
+            <if test="proposalType != null  and proposalType != ''">and p.proposal_type = #{proposalType}</if>
+            <if test="proposalContent != null  and proposalContent != ''">and p.proposal_content = #{proposalContent}
+            </if>
+            <if test="isJointly != null  and isJointly != ''">and p.is_jointly = #{isJointly}</if>
+            <if test="isPublicity != null  and isPublicity != ''">and p.is_publicity = #{isPublicity}</if>
+            <if test="contentPublicity != null  and contentPublicity != ''">and p.content_publicity =
+                #{contentPublicity}
+            </if>
+            <if test="isSurvey != null  and isSurvey != ''">and p.is_survey = #{isSurvey}</if>
+            <if test="isFirst != null  and isFirst != ''">and p.is_first = #{isFirst}</if>
+            <if test="isPerson != null  and isPerson != ''">and p.is_person = #{isPerson}</if>
+            <if test="isRecord != null  and isRecord != ''">and p.is_record = #{isRecord}</if>
+            <if test="negotiateType != null  and negotiateType != ''">and p.negotiate_type = #{negotiateType}</if>
+            <if test="proposedContractor != null  and proposedContractor != ''">and p.proposed_contractor =
+                #{proposedContractor}
+            </if>
+            <if test="proposalProgress != null  and proposalProgress != ''">and p.proposal_progress =
+                #{proposalProgress}
+            </if>
+            <if test="rollingProcess != null  and rollingProcess != ''">and p.rolling_process = #{rollingProcess}</if>
+            <if test="complexType != null  and complexType != ''">and p.complex_type = #{complexType}</if>
+            <if test="isCasesTogether != null  and isCasesTogether != ''">and p.is_cases_together = #{isCasesTogether}
+            </if>
+            <if test="uniteProposalId != null ">and p.unite_proposal_id = #{uniteProposalId}</if>
+            <if test="satisfaction != null  and satisfaction != ''">and p.satisfaction = #{satisfaction}</if>
+            <if test="membersOpinion != null  and membersOpinion != ''">and p.members_opinion = #{membersOpinion}</if>
+            <if test="zxSatisfaction != null  and zxSatisfaction != ''">and p.zx_satisfaction = #{zxSatisfaction}</if>
+            <if test="zxOpinion != null  and zxOpinion != ''">and p.zx_opinion = #{zxOpinion}</if>
+            <if test="isKeyPoint != null  and isKeyPoint != ''">and p.is_key_point = #{isKeyPoint}</if>
+            <if test="keyPointArgument != null  and keyPointArgument != ''">and p.key_point_argument =
+                #{keyPointArgument}
+            </if>
+            <if test="isOutstanding != null  and isOutstanding != ''">and p.is_outstanding = #{isOutstanding}</if>
+            <if test="outstandingArgument != null  and outstandingArgument != ''">and p.outstanding_argument =
+                #{outstandingArgument}
+            </if>
+            <if test="year != null and year != ''"><!-- 开始时间检索 -->
+                AND date_format(p.update_time,'%Y') = #{year}
+            </if>
         </where>
         order by p.update_time desc
     </select>
 
     <select id="selectProposalInfoListByUnit" resultMap="ProposalInfoResult">
-        select p.proposal_id, p.proposal_user_id, p.proposal_number, p.title, p.proposal_name, p.proposal_phone, p.boundary, p.party_affiliation,
-        p.contact_address, p.category_id, p.category_name, p.proposal_type, p.proposal_content, p.is_jointly, p.is_publicity, p.content_publicity,
-        p.is_survey, p.is_first, p.is_person, p.is_record, p.negotiate_type, p.proposed_contractor, p.proposal_progress,p.back_reason, p.rolling_process, p.complex_type,
+        select p.proposal_id, p.proposal_user_id, p.proposal_number, p.title, p.proposal_name, p.proposal_phone,
+        p.boundary, p.party_affiliation,
+        p.contact_address, p.category_id, p.category_name, p.proposal_type, p.proposal_content, p.is_jointly,
+        p.is_publicity, p.content_publicity,
+        p.is_survey, p.is_first, p.is_person, p.is_record, p.negotiate_type, p.proposed_contractor,
+        p.proposal_progress,p.back_reason, p.rolling_process, p.complex_type,
         p.is_cases_together, p.unite_proposal_id, p.satisfaction, p.members_opinion,p.cbdwdfwy,
-        p.zx_satisfaction,p.zx_opinion,p.is_key_point,p.key_point_argument,p.is_outstanding,p.outstanding_argument,p.create_by, p.create_time,
-        p.update_by, p.update_time, p.remark,u.type as dwType
+        p.zx_satisfaction,p.zx_opinion,p.is_key_point,p.key_point_argument,p.is_outstanding,p.outstanding_argument,p.create_by,
+        p.create_time,
+        p.update_by, p.update_time, p.remark,u.type as dwType,u.is_reply as isReply
         from proposal_info p
         left join proposal_unit_reply u on p.proposal_id = u.proposal_id
-        where u.dept_id = #{deptId}
-        <if test="dwType != null  and dwType != ''"> and u.type = #{dwType}</if>
-        <if test="proposalNumber != null  and proposalNumber != ''"> and p.proposal_number = #{proposalNumber}</if>
-        <if test="title != null  and title != ''"> and p.title = #{title}</if>
-        <if test="proposalName != null  and proposalName != ''"> and p.proposal_name like concat('%', #{proposalName}, '%')</if>
-        <if test="proposalPhone != null  and proposalPhone != ''"> and p.proposal_phone = #{proposalPhone}</if>
-        <if test="boundary != null  and boundary != ''"> and p.boundary = #{boundary}</if>
-        <if test="partyAffiliation != null  and partyAffiliation != ''"> and p.party_affiliation = #{partyAffiliation}</if>
-        <if test="contactAddress != null  and contactAddress != ''"> and p.contact_address = #{contactAddress}</if>
-        <if test="categoryId != null "> and p.category_id = #{categoryId}</if>
-        <if test="categoryName != null  and categoryName != ''"> and p.category_name like concat('%', #{categoryName}, '%')</if>
-        <if test="proposalType != null  and proposalType != ''"> and p.proposal_type = #{proposalType}</if>
-        <if test="proposalContent != null  and proposalContent != ''"> and p.proposal_content = #{proposalContent}</if>
-        <if test="isJointly != null  and isJointly != ''"> and p.is_jointly = #{isJointly}</if>
-        <if test="isPublicity != null  and isPublicity != ''"> and p.is_publicity = #{isPublicity}</if>
-        <if test="contentPublicity != null  and contentPublicity != ''"> and p.content_publicity = #{contentPublicity}</if>
-        <if test="isSurvey != null  and isSurvey != ''"> and p.is_survey = #{isSurvey}</if>
-        <if test="isFirst != null  and isFirst != ''"> and p.is_first = #{isFirst}</if>
-        <if test="isPerson != null  and isPerson != ''"> and p.is_person = #{isPerson}</if>
-        <if test="isRecord != null  and isRecord != ''"> and p.is_record = #{isRecord}</if>
-        <if test="negotiateType != null  and negotiateType != ''"> and p.negotiate_type = #{negotiateType}</if>
-        <if test="proposedContractor != null  and proposedContractor != ''"> and p.proposed_contractor = #{proposedContractor}</if>
-        <if test="proposalProgress != null  and proposalProgress != ''"> and p.proposal_progress = #{proposalProgress}</if>
-        <if test="rollingProcess != null  and rollingProcess != ''"> and p.rolling_process = #{rollingProcess}</if>
-        <if test="complexType != null  and complexType != ''"> and p.complex_type = #{complexType}</if>
-        <if test="isCasesTogether != null  and isCasesTogether != ''"> and p.is_cases_together = #{isCasesTogether}</if>
-        <if test="uniteProposalId != null "> and p.unite_proposal_id = #{uniteProposalId}</if>
-        <if test="satisfaction != null  and satisfaction != ''"> and p.satisfaction = #{satisfaction}</if>
-        <if test="membersOpinion != null  and membersOpinion != ''"> and p.members_opinion = #{membersOpinion}</if>
-        <if test="zxSatisfaction != null  and zxSatisfaction != ''"> and p.zx_satisfaction = #{zxSatisfaction}</if>
-        <if test="zxOpinion != null  and zxOpinion != ''"> and p.zx_opinion = #{zxOpinion}</if>
-        <if test="isKeyPoint != null  and isKeyPoint != ''"> and p.is_key_point = #{isKeyPoint}</if>
-        <if test="keyPointArgument != null  and keyPointArgument != ''"> and p.key_point_argument = #{keyPointArgument}</if>
-        <if test="isOutstanding != null  and isOutstanding != ''"> and p.is_outstanding = #{isOutstanding}</if>
-        <if test="outstandingArgument != null  and outstandingArgument != ''"> and p.outstanding_argument = #{outstandingArgument}</if>
+        <where>
+            <if test="deptId != null  and deptId != ''">and u.dept_id = #{deptId}</if>
+            <if test="dwType != null  and dwType != ''">and u.type = #{dwType}</if>
+            <if test="proposalNumber != null  and proposalNumber != ''">and p.proposal_number = #{proposalNumber}</if>
+            <if test="title != null  and title != ''">and p.title = #{title}</if>
+            <if test="proposalName != null  and proposalName != ''">and p.proposal_name like concat('%',
+                #{proposalName}, '%')
+            </if>
+            <if test="proposalPhone != null  and proposalPhone != ''">and p.proposal_phone = #{proposalPhone}</if>
+            <if test="boundary != null  and boundary != ''">and p.boundary = #{boundary}</if>
+            <if test="partyAffiliation != null  and partyAffiliation != ''">and p.party_affiliation =
+                #{partyAffiliation}
+            </if>
+            <if test="contactAddress != null  and contactAddress != ''">and p.contact_address = #{contactAddress}</if>
+            <if test="categoryId != null ">and p.category_id = #{categoryId}</if>
+            <if test="categoryName != null  and categoryName != ''">and p.category_name like concat('%',
+                #{categoryName}, '%')
+            </if>
+            <if test="proposalType != null  and proposalType != ''">and p.proposal_type = #{proposalType}</if>
+            <if test="proposalContent != null  and proposalContent != ''">and p.proposal_content = #{proposalContent}
+            </if>
+            <if test="isJointly != null  and isJointly != ''">and p.is_jointly = #{isJointly}</if>
+            <if test="isPublicity != null  and isPublicity != ''">and p.is_publicity = #{isPublicity}</if>
+            <if test="contentPublicity != null  and contentPublicity != ''">and p.content_publicity =
+                #{contentPublicity}
+            </if>
+            <if test="isSurvey != null  and isSurvey != ''">and p.is_survey = #{isSurvey}</if>
+            <if test="isFirst != null  and isFirst != ''">and p.is_first = #{isFirst}</if>
+            <if test="isPerson != null  and isPerson != ''">and p.is_person = #{isPerson}</if>
+            <if test="isRecord != null  and isRecord != ''">and p.is_record = #{isRecord}</if>
+            <if test="negotiateType != null  and negotiateType != ''">and p.negotiate_type = #{negotiateType}</if>
+            <if test="proposedContractor != null  and proposedContractor != ''">and p.proposed_contractor =
+                #{proposedContractor}
+            </if>
+            <if test="proposalProgress != null  and proposalProgress != ''">and p.proposal_progress =
+                #{proposalProgress}
+            </if>
+            <if test="rollingProcess != null  and rollingProcess != ''">and p.rolling_process = #{rollingProcess}</if>
+            <if test="complexType != null  and complexType != ''">and p.complex_type = #{complexType}</if>
+            <if test="isCasesTogether != null  and isCasesTogether != ''">and p.is_cases_together = #{isCasesTogether}
+            </if>
+            <if test="uniteProposalId != null ">and p.unite_proposal_id = #{uniteProposalId}</if>
+            <if test="satisfaction != null  and satisfaction != ''">and p.satisfaction = #{satisfaction}</if>
+            <if test="membersOpinion != null  and membersOpinion != ''">and p.members_opinion = #{membersOpinion}</if>
+            <if test="zxSatisfaction != null  and zxSatisfaction != ''">and p.zx_satisfaction = #{zxSatisfaction}</if>
+            <if test="zxOpinion != null  and zxOpinion != ''">and p.zx_opinion = #{zxOpinion}</if>
+            <if test="isKeyPoint != null  and isKeyPoint != ''">and p.is_key_point = #{isKeyPoint}</if>
+            <if test="keyPointArgument != null  and keyPointArgument != ''">and p.key_point_argument =
+                #{keyPointArgument}
+            </if>
+            <if test="isOutstanding != null  and isOutstanding != ''">and p.is_outstanding = #{isOutstanding}</if>
+            <if test="outstandingArgument != null  and outstandingArgument != ''">and p.outstanding_argument =
+                #{outstandingArgument}
+            </if>
+        </where>
         order by p.update_time desc
     </select>
 
+    <select id="tacbList" resultMap="ProposalInfoResult">
+        <include refid="selectProposalInfoVo"/>
+        <where>
+            proposal_progress > 3
+            <if test="proposalUserId != null ">and proposal_user_id = #{proposalUserId}</if>
+            <if test="proposalNumber != null  and proposalNumber != ''">and proposal_number = #{proposalNumber}</if>
+            <if test="title != null  and title != ''">and title = #{title}</if>
+            <if test="proposalName != null  and proposalName != ''">and proposal_name like concat('%', #{proposalName},
+                '%')
+            </if>
+            <if test="proposalPhone != null  and proposalPhone != ''">and proposal_phone = #{proposalPhone}</if>
+            <if test="boundary != null  and boundary != ''">and boundary = #{boundary}</if>
+            <if test="partyAffiliation != null  and partyAffiliation != ''">and party_affiliation =
+                #{partyAffiliation}
+            </if>
+            <if test="contactAddress != null  and contactAddress != ''">and contact_address = #{contactAddress}</if>
+            <if test="categoryId != null ">and category_id = #{categoryId}</if>
+            <if test="categoryName != null  and categoryName != ''">and category_name like concat('%', #{categoryName},
+                '%')
+            </if>
+            <if test="proposalType != null  and proposalType != ''">and proposal_type = #{proposalType}</if>
+            <if test="proposalContent != null  and proposalContent != ''">and proposal_content = #{proposalContent}</if>
+            <if test="isJointly != null  and isJointly != ''">and is_jointly = #{isJointly}</if>
+            <if test="isPublicity != null  and isPublicity != ''">and is_publicity = #{isPublicity}</if>
+            <if test="contentPublicity != null  and contentPublicity != ''">and content_publicity =
+                #{contentPublicity}
+            </if>
+            <if test="isSurvey != null  and isSurvey != ''">and is_survey = #{isSurvey}</if>
+            <if test="isFirst != null  and isFirst != ''">and is_first = #{isFirst}</if>
+            <if test="isPerson != null  and isPerson != ''">and is_person = #{isPerson}</if>
+            <if test="isRecord != null  and isRecord != ''">and is_record = #{isRecord}</if>
+            <if test="negotiateType != null  and negotiateType != ''">and negotiate_type = #{negotiateType}</if>
+            <if test="proposedContractor != null  and proposedContractor != ''">and proposed_contractor =
+                #{proposedContractor}
+            </if>
+            <if test="proposalProgress != null  and proposalProgress != ''">and proposal_progress =
+                #{proposalProgress}
+            </if>
+            <if test="rollingProcess != null  and rollingProcess != ''">and rolling_process = #{rollingProcess}</if>
+            <if test="complexType != null  and complexType != ''">and complex_type = #{complexType}</if>
+            <if test="isCasesTogether != null  and isCasesTogether != ''">and is_cases_together = #{isCasesTogether}
+            </if>
+            <if test="uniteProposalId != null ">and unite_proposal_id = #{uniteProposalId}</if>
+            <if test="satisfaction != null  and satisfaction != ''">and satisfaction = #{satisfaction}</if>
+            <if test="membersOpinion != null  and membersOpinion != ''">and members_opinion = #{membersOpinion}</if>
+            <if test="zxSatisfaction != null  and zxSatisfaction != ''">and zx_satisfaction = #{zxSatisfaction}</if>
+            <if test="zxOpinion != null  and zxOpinion != ''">and zx_opinion = #{zxOpinion}</if>
+
+            <if test="isKeyPoint != null  and isKeyPoint != ''">and is_key_point = #{isKeyPoint}</if>
+            <if test="keyPointArgument != null  and keyPointArgument != ''">and key_point_argument =
+                #{keyPointArgument}
+            </if>
+            <if test="isOutstanding != null  and isOutstanding != ''">and is_outstanding = #{isOutstanding}</if>
+            <if test="outstandingArgument != null  and outstandingArgument != ''">and outstanding_argument =
+                #{outstandingArgument}
+            </if>
+            <if test="startTime != null and startTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
+            </if>
+        </where>
+        order by create_time desc
+    </select>
+
     <insert id="insertProposalInfo" parameterType="ProposalInfo" useGeneratedKeys="true" keyProperty="proposalId">
         insert into proposal_info
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -252,19 +423,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="uniteProposalId != null">unite_proposal_id,</if>
             <if test="satisfaction != null">satisfaction,</if>
             <if test="membersOpinion != null">members_opinion,</if>
-            <if test="cbdwdfwy != null  "> cbdwdfwy,</if>
-            <if test="zxSatisfaction != null  "> zx_satisfaction,</if>
-            <if test="zxOpinion != null  "> zx_opinion,</if>
-            <if test="isKeyPoint != null  "> is_key_point,</if>
-            <if test="keyPointArgument != null "> key_point_argument, </if>
-            <if test="isOutstanding != null  "> is_outstanding ,</if>
-            <if test="outstandingArgument != null  "> outstanding_argument, </if>
+            <if test="cbdwdfwy != null  ">cbdwdfwy,</if>
+            <if test="zxSatisfaction != null  ">zx_satisfaction,</if>
+            <if test="zxOpinion != null  ">zx_opinion,</if>
+            <if test="isKeyPoint != null  ">is_key_point,</if>
+            <if test="keyPointArgument != null ">key_point_argument,</if>
+            <if test="isOutstanding != null  ">is_outstanding ,</if>
+            <if test="outstandingArgument != null  ">outstanding_argument,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="proposalUserId != null">#{proposalUserId},</if>
             <if test="proposalNumber != null">#{proposalNumber},</if>
@@ -295,19 +466,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="uniteProposalId != null">#{uniteProposalId},</if>
             <if test="satisfaction != null">#{satisfaction},</if>
             <if test="membersOpinion != null">#{membersOpinion},</if>
-            <if test="cbdwdfwy != null  "> #{cbdwdfwy},</if>
-            <if test="zxSatisfaction != null "> #{zxSatisfaction},</if>
+            <if test="cbdwdfwy != null  ">#{cbdwdfwy},</if>
+            <if test="zxSatisfaction != null ">#{zxSatisfaction},</if>
             <if test="zxOpinion != null  ">#{zxOpinion},</if>
-            <if test="isKeyPoint != null  "> #{isKeyPoint},</if>
-            <if test="keyPointArgument != null  "> #{keyPointArgument},</if>
-            <if test="isOutstanding != null  "> #{isOutstanding},</if>
-            <if test="outstandingArgument != null "> #{outstandingArgument},</if>
+            <if test="isKeyPoint != null  ">#{isKeyPoint},</if>
+            <if test="keyPointArgument != null  ">#{keyPointArgument},</if>
+            <if test="isOutstanding != null  ">#{isOutstanding},</if>
+            <if test="outstandingArgument != null ">#{outstandingArgument},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateProposalInfo" parameterType="ProposalInfo">
@@ -342,13 +513,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="uniteProposalId != null">unite_proposal_id = #{uniteProposalId},</if>
             <if test="satisfaction != null">satisfaction = #{satisfaction},</if>
             <if test="membersOpinion != null">members_opinion = #{membersOpinion},</if>
-            <if test="cbdwdfwy != null  "> cbdwdfwy = #{cbdwdfwy},</if>
-            <if test="zxSatisfaction != null "> zx_satisfaction = #{zxSatisfaction},</if>
-            <if test="zxOpinion != null "> zx_opinion = #{zxOpinion},</if>
-            <if test="isKeyPoint != null ">  is_key_point = #{isKeyPoint},</if>
-            <if test="keyPointArgument != null  ">  key_point_argument = #{keyPointArgument},</if>
-            <if test="isOutstanding != null  ">  is_outstanding = #{isOutstanding},</if>
-            <if test="outstandingArgument != null ">  outstanding_argument = #{outstandingArgument},</if>
+            <if test="cbdwdfwy != null  ">cbdwdfwy = #{cbdwdfwy},</if>
+            <if test="zxSatisfaction != null ">zx_satisfaction = #{zxSatisfaction},</if>
+            <if test="zxOpinion != null ">zx_opinion = #{zxOpinion},</if>
+            <if test="isKeyPoint != null ">is_key_point = #{isKeyPoint},</if>
+            <if test="keyPointArgument != null  ">key_point_argument = #{keyPointArgument},</if>
+            <if test="isOutstanding != null  ">is_outstanding = #{isOutstanding},</if>
+            <if test="outstandingArgument != null ">outstanding_argument = #{outstandingArgument},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
@@ -359,11 +530,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <delete id="deleteProposalInfoByProposalId" parameterType="Long">
-        delete from proposal_info where proposal_id = #{proposalId}
+        delete
+        from proposal_info
+        where proposal_id = #{proposalId}
     </delete>
 
     <delete id="deleteProposalInfoByProposalIds" parameterType="String">
-        delete from proposal_info where proposal_id in 
+        delete from proposal_info where proposal_id in
         <foreach item="proposalId" collection="array" open="(" separator="," close=")">
             #{proposalId}
         </foreach>

+ 200 - 101
ruoyi-system/src/main/resources/mapper/system/SqmyInfoMapper.xml

@@ -5,79 +5,119 @@
 <mapper namespace="com.ruoyi.system.mapper.SqmyInfoMapper">
 
     <resultMap type="SqmyInfo" id="SqmyInfoResult">
-        <result property="sqmyId"    column="sqmy_id"    />
-        <result property="sqmyUserId"    column="sqmy_user_id"    />
-        <result property="sqmyNumber"    column="sqmy_number"    />
-        <result property="title"    column="title"    />
-        <result property="topicType"    column="topic_type"    />
-        <result property="lxrName"    column="lxr_name"    />
-        <result property="lxrPhone"    column="lxr_phone"    />
-        <result property="sqmyName"    column="sqmy_name"    />
-        <result property="sqmyPhone"    column="sqmy_phone"    />
-        <result property="sqmyContent"    column="sqmy_content"    />
-        <result property="isPublicity"    column="is_publicity"    />
-        <result property="isSecret"    column="is_secret"    />
-        <result property="unit"    column="unit"    />
-        <result property="isRecord"    column="is_record"    />
-        <result property="sqmyProgress"    column="sqmy_progress"    />
-        <result property="backReason"    column="back_reason"    />
-        <result property="rollingProcess"    column="rolling_process"    />
-        <result property="complexType"    column="complex_type"    />
-        <result property="isCasesTogether"    column="is_cases_together"    />
-        <result property="uniteSqmyId"    column="unite_sqmy_id"    />
-        <result property="cbdwdfwy"    column="cbdwdfwy"    />
-        <result property="satisfaction"    column="satisfaction"    />
-        <result property="membersOpinion"    column="members_opinion"    />
-        <result property="zxSatisfaction"    column="zx_satisfaction"    />
-        <result property="zxOpinion"    column="zx_opinion"    />
-        <result property="isKeyPoint"    column="is_key_point"    />
-        <result property="keyPointArgument"    column="key_point_argument"    />
-        <result property="isOutstanding"    column="is_outstanding"    />
-        <result property="outstandingArgument"    column="outstanding_argument"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="remark"    column="remark"    />
+        <result property="sqmyId" column="sqmy_id"/>
+        <result property="sqmyUserId" column="sqmy_user_id"/>
+        <result property="sqmyNumber" column="sqmy_number"/>
+        <result property="title" column="title"/>
+        <result property="topicType" column="topic_type"/>
+        <result property="lxrName" column="lxr_name"/>
+        <result property="lxrPhone" column="lxr_phone"/>
+        <result property="sqmyName" column="sqmy_name"/>
+        <result property="sqmyPhone" column="sqmy_phone"/>
+        <result property="sqmyContent" column="sqmy_content"/>
+        <result property="isPublicity" column="is_publicity"/>
+        <result property="isSecret" column="is_secret"/>
+        <result property="unit" column="unit"/>
+        <result property="isRecord" column="is_record"/>
+        <result property="sqmyProgress" column="sqmy_progress"/>
+        <result property="backReason" column="back_reason"/>
+        <result property="rollingProcess" column="rolling_process"/>
+        <result property="complexType" column="complex_type"/>
+        <result property="isCasesTogether" column="is_cases_together"/>
+        <result property="uniteSqmyId" column="unite_sqmy_id"/>
+        <result property="cbdwdfwy" column="cbdwdfwy"/>
+        <result property="satisfaction" column="satisfaction"/>
+        <result property="membersOpinion" column="members_opinion"/>
+        <result property="zxSatisfaction" column="zx_satisfaction"/>
+        <result property="zxOpinion" column="zx_opinion"/>
+        <result property="isKeyPoint" column="is_key_point"/>
+        <result property="keyPointArgument" column="key_point_argument"/>
+        <result property="isOutstanding" column="is_outstanding"/>
+        <result property="outstandingArgument" column="outstanding_argument"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
 
-        <result property="deptId"    column="deptId"    />
-        <result property="dwType"    column="dwType"    />
+        <result property="deptId" column="deptId"/>
+        <result property="dwType" column="dwType"/>
+        <result property="isReply" column="isReply"/>
     </resultMap>
 
     <sql id="selectSqmyInfoVo">
-        select sqmy_id, sqmy_user_id, sqmy_number, title,topic_type, lxr_name, lxr_phone, sqmy_name, sqmy_phone, sqmy_content, is_publicity, is_secret, unit, is_record, sqmy_progress,back_reason, rolling_process, complex_type, is_cases_together, unite_sqmy_id, cbdwdfwy, satisfaction, members_opinion, zx_satisfaction, zx_opinion, is_key_point, key_point_argument, is_outstanding, outstanding_argument, create_by, create_time, update_by, update_time, remark from sqmy_info
+        select sqmy_id,
+               sqmy_user_id,
+               sqmy_number,
+               title,
+               topic_type,
+               lxr_name,
+               lxr_phone,
+               sqmy_name,
+               sqmy_phone,
+               sqmy_content,
+               is_publicity,
+               is_secret,
+               unit,
+               is_record,
+               sqmy_progress,
+               back_reason,
+               rolling_process,
+               complex_type,
+               is_cases_together,
+               unite_sqmy_id,
+               cbdwdfwy,
+               satisfaction,
+               members_opinion,
+               zx_satisfaction,
+               zx_opinion,
+               is_key_point,
+               key_point_argument,
+               is_outstanding,
+               outstanding_argument,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               remark
+        from sqmy_info
     </sql>
 
     <select id="selectSqmyInfoList" parameterType="SqmyInfo" resultMap="SqmyInfoResult">
         <include refid="selectSqmyInfoVo"/>
         <where>
-            <if test="sqmyUserId != null "> and sqmy_user_id = #{sqmyUserId}</if>
-            <if test="sqmyNumber != null  and sqmyNumber != ''"> and sqmy_number = #{sqmyNumber}</if>
-            <if test="title != null  and title != ''"> and title = #{title}</if>
-            <if test="topicType != null  and topicType != ''"> and topic_type = #{topicType}</if>
-            <if test="lxrName != null  and lxrName != ''"> and lxr_name like concat('%', #{lxrName}, '%')</if>
-            <if test="lxrPhone != null  and lxrPhone != ''"> and lxr_phone = #{lxrPhone}</if>
-            <if test="sqmyName != null  and sqmyName != ''"> and sqmy_name like concat('%', #{sqmyName}, '%')</if>
-            <if test="sqmyPhone != null  and sqmyPhone != ''"> and sqmy_phone = #{sqmyPhone}</if>
-            <if test="sqmyContent != null  and sqmyContent != ''"> and sqmy_content = #{sqmyContent}</if>
-            <if test="isPublicity != null  and isPublicity != ''"> and is_publicity = #{isPublicity}</if>
-            <if test="isSecret != null  and isSecret != ''"> and is_secret = #{isSecret}</if>
-            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
-            <if test="isRecord != null  and isRecord != ''"> and is_record = #{isRecord}</if>
-            <if test="sqmyProgress != null  and sqmyProgress != ''"> and sqmy_progress = #{sqmyProgress}</if>
-            <if test="rollingProcess != null  and rollingProcess != ''"> and rolling_process = #{rollingProcess}</if>
-            <if test="complexType != null  and complexType != ''"> and complex_type = #{complexType}</if>
-            <if test="isCasesTogether != null  and isCasesTogether != ''"> and is_cases_together = #{isCasesTogether}</if>
-            <if test="uniteSqmyId != null "> and unite_sqmy_id = #{uniteSqmyId}</if>
-            <if test="cbdwdfwy != null  and cbdwdfwy != ''"> and cbdwdfwy = #{cbdwdfwy}</if>
-            <if test="satisfaction != null  and satisfaction != ''"> and satisfaction = #{satisfaction}</if>
-            <if test="membersOpinion != null  and membersOpinion != ''"> and members_opinion = #{membersOpinion}</if>
-            <if test="zxSatisfaction != null  and zxSatisfaction != ''"> and zx_satisfaction = #{zxSatisfaction}</if>
-            <if test="zxOpinion != null  and zxOpinion != ''"> and zx_opinion = #{zxOpinion}</if>
-            <if test="isKeyPoint != null  and isKeyPoint != ''"> and is_key_point = #{isKeyPoint}</if>
-            <if test="keyPointArgument != null  and keyPointArgument != ''"> and key_point_argument = #{keyPointArgument}</if>
-            <if test="isOutstanding != null  and isOutstanding != ''"> and is_outstanding = #{isOutstanding}</if>
-            <if test="outstandingArgument != null  and outstandingArgument != ''"> and outstanding_argument = #{outstandingArgument}</if>
+            <if test="sqmyUserId != null ">and sqmy_user_id = #{sqmyUserId}</if>
+            <if test="sqmyNumber != null  and sqmyNumber != ''">and sqmy_number = #{sqmyNumber}</if>
+            <if test="title != null  and title != ''">and title = #{title}</if>
+            <if test="topicType != null  and topicType != ''">and topic_type = #{topicType}</if>
+            <if test="lxrName != null  and lxrName != ''">and lxr_name like concat('%', #{lxrName}, '%')</if>
+            <if test="lxrPhone != null  and lxrPhone != ''">and lxr_phone = #{lxrPhone}</if>
+            <if test="sqmyName != null  and sqmyName != ''">and sqmy_name like concat('%', #{sqmyName}, '%')</if>
+            <if test="sqmyPhone != null  and sqmyPhone != ''">and sqmy_phone = #{sqmyPhone}</if>
+            <if test="sqmyContent != null  and sqmyContent != ''">and sqmy_content = #{sqmyContent}</if>
+            <if test="isPublicity != null  and isPublicity != ''">and is_publicity = #{isPublicity}</if>
+            <if test="isSecret != null  and isSecret != ''">and is_secret = #{isSecret}</if>
+            <if test="unit != null  and unit != ''">and unit = #{unit}</if>
+            <if test="isRecord != null  and isRecord != ''">and is_record = #{isRecord}</if>
+            <if test="sqmyProgress != null  and sqmyProgress != ''">and sqmy_progress = #{sqmyProgress}</if>
+            <if test="rollingProcess != null  and rollingProcess != ''">and rolling_process = #{rollingProcess}</if>
+            <if test="complexType != null  and complexType != ''">and complex_type = #{complexType}</if>
+            <if test="isCasesTogether != null  and isCasesTogether != ''">and is_cases_together = #{isCasesTogether}
+            </if>
+            <if test="uniteSqmyId != null ">and unite_sqmy_id = #{uniteSqmyId}</if>
+            <if test="cbdwdfwy != null  and cbdwdfwy != ''">and cbdwdfwy = #{cbdwdfwy}</if>
+            <if test="satisfaction != null  and satisfaction != ''">and satisfaction = #{satisfaction}</if>
+            <if test="membersOpinion != null  and membersOpinion != ''">and members_opinion = #{membersOpinion}</if>
+            <if test="zxSatisfaction != null  and zxSatisfaction != ''">and zx_satisfaction = #{zxSatisfaction}</if>
+            <if test="zxOpinion != null  and zxOpinion != ''">and zx_opinion = #{zxOpinion}</if>
+            <if test="isKeyPoint != null  and isKeyPoint != ''">and is_key_point = #{isKeyPoint}</if>
+            <if test="keyPointArgument != null  and keyPointArgument != ''">and key_point_argument =
+                #{keyPointArgument}
+            </if>
+            <if test="isOutstanding != null  and isOutstanding != ''">and is_outstanding = #{isOutstanding}</if>
+            <if test="outstandingArgument != null  and outstandingArgument != ''">and outstanding_argument =
+                #{outstandingArgument}
+            </if>
             <if test="startTime != null and startTime != ''"><!-- 开始时间检索 -->
                 AND date_format(create_time,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d')
             </if>
@@ -98,51 +138,108 @@
 
     <select id="selectSqmyInfoListByUnit" resultMap="SqmyInfoResult">
         select s.sqmy_id, s.sqmy_user_id, s.sqmy_number, s.title, s.lxr_name, s.lxr_phone, s.sqmy_name, s.sqmy_phone,
-               s.sqmy_content, s.is_publicity, s.is_secret, s.unit, s.is_record, s.sqmy_progress,p.back_reason, s.rolling_process,
-               s.complex_type, s.is_cases_together, s.unite_sqmy_id, s.cbdwdfwy, s.satisfaction, s.members_opinion,
-               s.zx_satisfaction, s.zx_opinion, s.is_key_point, s.key_point_argument, s.is_outstanding, s.outstanding_argument,
-               s.create_by, s.create_time, s.update_by, s.update_time, s.remark,s.topic_type,u.type as dwType
+        s.sqmy_content, s.is_publicity, s.is_secret, s.unit, s.is_record, s.sqmy_progress,s.back_reason,
+        s.rolling_process,
+        s.complex_type, s.is_cases_together, s.unite_sqmy_id, s.cbdwdfwy, s.satisfaction, s.members_opinion,
+        s.zx_satisfaction, s.zx_opinion, s.is_key_point, s.key_point_argument, s.is_outstanding, s.outstanding_argument,
+        s.create_by, s.create_time, s.update_by, s.update_time, s.remark,s.topic_type,u.type as dwType,u.is_reply as isReply
         from sqmy_info s
-        left join sqmy_unit_reply u on p.sqmy_id = u.sqmy_id
-        where u.dept_id = #{deptId}
-        <if test="dwType != null  and dwType != ''"> and u.type = #{dwType}</if>
-        <if test="topicType != null  and topicType != ''"> and topic_type = #{topicType}</if>
-        <if test="sqmyUserId != null "> and s.sqmy_user_id = #{sqmyUserId}</if>
-        <if test="sqmyNumber != null  and sqmyNumber != ''"> and s.sqmy_number = #{sqmyNumber}</if>
-        <if test="title != null  and title != ''"> and s.title = #{title}</if>
-        <if test="lxrName != null  and lxrName != ''"> and s.lxr_name like concat('%', #{lxrName}, '%')</if>
-        <if test="lxrPhone != null  and lxrPhone != ''"> and s.lxr_phone = #{lxrPhone}</if>
-        <if test="sqmyName != null  and sqmyName != ''"> and s.sqmy_name like concat('%', #{sqmyName}, '%')</if>
-        <if test="sqmyPhone != null  and sqmyPhone != ''"> and s.sqmy_phone = #{sqmyPhone}</if>
-        <if test="sqmyContent != null  and sqmyContent != ''"> and s.sqmy_content = #{sqmyContent}</if>
-        <if test="isPublicity != null  and isPublicity != ''"> and s.is_publicity = #{isPublicity}</if>
-        <if test="isSecret != null  and isSecret != ''"> and s.is_secret = #{isSecret}</if>
-        <if test="unit != null  and unit != ''"> and s.unit = #{unit}</if>
-        <if test="isRecord != null  and isRecord != ''"> and s.is_record = #{isRecord}</if>
-        <if test="sqmyProgress != null  and sqmyProgress != ''"> and s.sqmy_progress = #{sqmyProgress}</if>
-        <if test="rollingProcess != null  and rollingProcess != ''"> and s.rolling_process = #{rollingProcess}</if>
-        <if test="complexType != null  and complexType != ''"> and s.complex_type = #{complexType}</if>
-        <if test="isCasesTogether != null  and isCasesTogether != ''"> and s.is_cases_together = #{isCasesTogether}</if>
-        <if test="uniteSqmyId != null "> and s.unite_sqmy_id = #{uniteSqmyId}</if>
-        <if test="cbdwdfwy != null  and cbdwdfwy != ''"> and s.cbdwdfwy = #{cbdwdfwy}</if>
-        <if test="satisfaction != null  and satisfaction != ''"> and s.satisfaction = #{satisfaction}</if>
-        <if test="membersOpinion != null  and membersOpinion != ''"> and s.members_opinion = #{membersOpinion}</if>
-        <if test="zxSatisfaction != null  and zxSatisfaction != ''"> and s.zx_satisfaction = #{zxSatisfaction}</if>
-        <if test="zxOpinion != null  and zxOpinion != ''"> and s.zx_opinion = #{zxOpinion}</if>
-        <if test="isKeyPoint != null  and isKeyPoint != ''"> and s.is_key_point = #{isKeyPoint}</if>
-        <if test="keyPointArgument != null  and keyPointArgument != ''"> and s.key_point_argument = #{keyPointArgument}</if>
-        <if test="isOutstanding != null  and isOutstanding != ''"> and s.is_outstanding = #{isOutstanding}</if>
-        <if test="outstandingArgument != null  and outstandingArgument != ''"> and s.outstanding_argument = #{outstandingArgument}</if>
+        left join sqmy_unit_reply u on s.sqmy_id = u.sqmy_id
+        <where>
+            <if test="deptId != null  and deptId != ''">and u.dept_id = #{deptId}</if>
+            <if test="dwType != null  and dwType != ''">and u.type = #{dwType}</if>
+            <if test="topicType != null  and topicType != ''">and s.topic_type = #{topicType}</if>
+            <if test="sqmyUserId != null ">and s.sqmy_user_id = #{sqmyUserId}</if>
+            <if test="sqmyNumber != null  and sqmyNumber != ''">and s.sqmy_number = #{sqmyNumber}</if>
+            <if test="title != null  and title != ''">and s.title = #{title}</if>
+            <if test="lxrName != null  and lxrName != ''">and s.lxr_name like concat('%', #{lxrName}, '%')</if>
+            <if test="lxrPhone != null  and lxrPhone != ''">and s.lxr_phone = #{lxrPhone}</if>
+            <if test="sqmyName != null  and sqmyName != ''">and s.sqmy_name like concat('%', #{sqmyName}, '%')</if>
+            <if test="sqmyPhone != null  and sqmyPhone != ''">and s.sqmy_phone = #{sqmyPhone}</if>
+            <if test="sqmyContent != null  and sqmyContent != ''">and s.sqmy_content = #{sqmyContent}</if>
+            <if test="isPublicity != null  and isPublicity != ''">and s.is_publicity = #{isPublicity}</if>
+            <if test="isSecret != null  and isSecret != ''">and s.is_secret = #{isSecret}</if>
+            <if test="unit != null  and unit != ''">and s.unit = #{unit}</if>
+            <if test="isRecord != null  and isRecord != ''">and s.is_record = #{isRecord}</if>
+            <if test="sqmyProgress != null  and sqmyProgress != ''">and s.sqmy_progress = #{sqmyProgress}</if>
+            <if test="rollingProcess != null  and rollingProcess != ''">and s.rolling_process = #{rollingProcess}</if>
+            <if test="complexType != null  and complexType != ''">and s.complex_type = #{complexType}</if>
+            <if test="isCasesTogether != null  and isCasesTogether != ''">and s.is_cases_together = #{isCasesTogether}
+            </if>
+            <if test="uniteSqmyId != null ">and s.unite_sqmy_id = #{uniteSqmyId}</if>
+            <if test="cbdwdfwy != null  and cbdwdfwy != ''">and s.cbdwdfwy = #{cbdwdfwy}</if>
+            <if test="satisfaction != null  and satisfaction != ''">and s.satisfaction = #{satisfaction}</if>
+            <if test="membersOpinion != null  and membersOpinion != ''">and s.members_opinion = #{membersOpinion}</if>
+            <if test="zxSatisfaction != null  and zxSatisfaction != ''">and s.zx_satisfaction = #{zxSatisfaction}</if>
+            <if test="zxOpinion != null  and zxOpinion != ''">and s.zx_opinion = #{zxOpinion}</if>
+            <if test="isKeyPoint != null  and isKeyPoint != ''">and s.is_key_point = #{isKeyPoint}</if>
+            <if test="keyPointArgument != null  and keyPointArgument != ''">and s.key_point_argument =
+                #{keyPointArgument}
+            </if>
+            <if test="isOutstanding != null  and isOutstanding != ''">and s.is_outstanding = #{isOutstanding}</if>
+            <if test="outstandingArgument != null  and outstandingArgument != ''">and s.outstanding_argument =
+                #{outstandingArgument}
+            </if>
+        </where>
         order by s.update_time desc
     </select>
 
+    <select id="sqmycbList" resultMap="SqmyInfoResult">
+        <include refid="selectSqmyInfoVo"/>
+        <where>
+            sqmy_progress>3
+            <if test="sqmyUserId != null ">and sqmy_user_id = #{sqmyUserId}</if>
+            <if test="sqmyNumber != null  and sqmyNumber != ''">and sqmy_number = #{sqmyNumber}</if>
+            <if test="title != null  and title != ''">and title = #{title}</if>
+            <if test="topicType != null  and topicType != ''">and topic_type = #{topicType}</if>
+            <if test="lxrName != null  and lxrName != ''">and lxr_name like concat('%', #{lxrName}, '%')</if>
+            <if test="lxrPhone != null  and lxrPhone != ''">and lxr_phone = #{lxrPhone}</if>
+            <if test="sqmyName != null  and sqmyName != ''">and sqmy_name like concat('%', #{sqmyName}, '%')</if>
+            <if test="sqmyPhone != null  and sqmyPhone != ''">and sqmy_phone = #{sqmyPhone}</if>
+            <if test="sqmyContent != null  and sqmyContent != ''">and sqmy_content = #{sqmyContent}</if>
+            <if test="isPublicity != null  and isPublicity != ''">and is_publicity = #{isPublicity}</if>
+            <if test="isSecret != null  and isSecret != ''">and is_secret = #{isSecret}</if>
+            <if test="unit != null  and unit != ''">and unit = #{unit}</if>
+            <if test="isRecord != null  and isRecord != ''">and is_record = #{isRecord}</if>
+            <if test="sqmyProgress != null  and sqmyProgress != ''">and sqmy_progress = #{sqmyProgress}</if>
+            <if test="rollingProcess != null  and rollingProcess != ''">and rolling_process = #{rollingProcess}</if>
+            <if test="complexType != null  and complexType != ''">and complex_type = #{complexType}</if>
+            <if test="isCasesTogether != null  and isCasesTogether != ''">and is_cases_together = #{isCasesTogether}
+            </if>
+            <if test="uniteSqmyId != null ">and unite_sqmy_id = #{uniteSqmyId}</if>
+            <if test="cbdwdfwy != null  and cbdwdfwy != ''">and cbdwdfwy = #{cbdwdfwy}</if>
+            <if test="satisfaction != null  and satisfaction != ''">and satisfaction = #{satisfaction}</if>
+            <if test="membersOpinion != null  and membersOpinion != ''">and members_opinion = #{membersOpinion}</if>
+            <if test="zxSatisfaction != null  and zxSatisfaction != ''">and zx_satisfaction = #{zxSatisfaction}</if>
+            <if test="zxOpinion != null  and zxOpinion != ''">and zx_opinion = #{zxOpinion}</if>
+            <if test="isKeyPoint != null  and isKeyPoint != ''">and is_key_point = #{isKeyPoint}</if>
+            <if test="keyPointArgument != null  and keyPointArgument != ''">and key_point_argument =
+                #{keyPointArgument}
+            </if>
+            <if test="isOutstanding != null  and isOutstanding != ''">and is_outstanding = #{isOutstanding}</if>
+            <if test="outstandingArgument != null  and outstandingArgument != ''">and outstanding_argument =
+                #{outstandingArgument}
+            </if>
+            <if test="startTime != null and startTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
+            </if>
+            <if test="year != null and year != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%Y') = #{year}
+            </if>
+        </where>
+        order by update_time desc
+    </select>
+
     <insert id="insertSqmyInfo" parameterType="SqmyInfo" useGeneratedKeys="true" keyProperty="sqmyId">
         insert into sqmy_info
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="sqmyUserId != null">sqmy_user_id,</if>
             <if test="sqmyNumber != null">sqmy_number,</if>
             <if test="title != null and title != ''">title,</if>
-            <if test="topicType != null  and topicType != ''"> topic_type,</if>
+            <if test="topicType != null  and topicType != ''">topic_type,</if>
             <if test="lxrName != null and lxrName != ''">lxr_name,</if>
             <if test="lxrPhone != null and lxrPhone != ''">lxr_phone,</if>
             <if test="sqmyName != null and sqmyName != ''">sqmy_name,</if>
@@ -177,7 +274,7 @@
             <if test="sqmyUserId != null">#{sqmyUserId},</if>
             <if test="sqmyNumber != null">#{sqmyNumber},</if>
             <if test="title != null and title != ''">#{title},</if>
-            <if test="topicType != null  and topicType != ''"> #{topicType},</if>
+            <if test="topicType != null  and topicType != ''">#{topicType},</if>
             <if test="lxrName != null and lxrName != ''">#{lxrName},</if>
             <if test="lxrPhone != null and lxrPhone != ''">#{lxrPhone},</if>
             <if test="sqmyName != null and sqmyName != ''">#{sqmyName},</if>
@@ -251,7 +348,9 @@
     </update>
 
     <delete id="deleteSqmyInfoBySqmyId" parameterType="Long">
-        delete from sqmy_info where sqmy_id = #{sqmyId}
+        delete
+        from sqmy_info
+        where sqmy_id = #{sqmyId}
     </delete>
 
     <delete id="deleteSqmyInfoBySqmyIds" parameterType="String">