Browse Source

Merge remote-tracking branch 'origin/master'

Administrator 1 year ago
parent
commit
8ba37b3efb

+ 10 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/proposal/ProposalInfoController.java

@@ -48,6 +48,16 @@ public class ProposalInfoController extends BaseController
         return getDataTable(list);
     }
 
+    /**
+     * 列表页统计
+     */
+    @PreAuthorize("@ss.hasPermi('proposalInfo:info:statistics')")
+    @GetMapping("/list/statistics")
+    public AjaxResult statistics(ProposalInfo proposalInfo)
+    {
+        return proposalInfoService.statistics(proposalInfo);
+    }
+
     /**
      * 查询联名提案信息列表(只查询附议)
      */

+ 15 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/sqmy/SqmyInfoController.java

@@ -34,11 +34,11 @@ public class SqmyInfoController extends BaseController
     @Autowired
     private ISqmyInfoService sqmyInfoService;
 
-/**
- * 查询社情民意信息列表
- */
-@PreAuthorize("@ss.hasPermi('sqmyInfo:info:list')")
-@GetMapping("/list")
+    /**
+     * 查询社情民意信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('sqmyInfo:info:list')")
+    @GetMapping("/list")
     public TableDataInfo list(SqmyInfo sqmyInfo)
     {
         startPage();
@@ -46,6 +46,16 @@ public class SqmyInfoController extends BaseController
         return getDataTable(list);
     }
 
+    /**
+     * 列表页统计
+     */
+    @PreAuthorize("@ss.hasPermi('sqmyInfo:info:statistics')")
+    @GetMapping("/list/statistics")
+    public AjaxResult statistics(SqmyInfo sqmyInfo)
+    {
+        return sqmyInfoService.statistics(sqmyInfo);
+    }
+
     /**
      * 根据单位查询
      */

+ 11 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/ProposalInfo.java

@@ -108,6 +108,9 @@ public class ProposalInfo extends BaseEntity
     @Excel(name = "提案进度(0:提交提案,1:提案审查,2:提案立案,3:提案交办,4:办理提案,5:提案反馈,6:办结审核,7:已办结)")
     private String proposalProgress;
 
+    @Excel(name = "打回理由")
+    private String backReason;
+
     /** 滚动办理(0是 1否) */
     @Excel(name = "滚动办理", readConverterExp = "0=是,1=否")
     private String rollingProcess;
@@ -179,6 +182,14 @@ public class ProposalInfo extends BaseEntity
     /** 单位类型 */
     private String dwType;
 
+    public String getBackReason() {
+        return backReason;
+    }
+
+    public void setBackReason(String backReason) {
+        this.backReason = backReason;
+    }
+
     public String getDwType() {
         return dwType;
     }

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

@@ -38,6 +38,10 @@ public class SqmyInfo extends BaseEntity
     @Excel(name = "主题类型1:经济建设类,2:政治建设类,3:文化建设类,4:社会建设类,5:生态文明建设类,6:其他")
     private String topicType;
 
+    /** 打回理由 */
+    @Excel(name = "打回理由")
+    private String backReason;
+
     /** 联系人姓名 */
     @Excel(name = "联系人姓名")
     private String lxrName;
@@ -144,6 +148,14 @@ public class SqmyInfo extends BaseEntity
     /** 单位类型 */
     private String dwType;
 
+    public String getBackReason() {
+        return backReason;
+    }
+
+    public void setBackReason(String backReason) {
+        this.backReason = backReason;
+    }
+
     public Long getDeptId() {
         return deptId;
     }

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

@@ -78,4 +78,9 @@ public interface IProposalInfoService
     AjaxResult assignsh(ProposalInfo proposalInfo);
 
     List<ProposalInfo> unitList(ProposalInfo proposalInfo);
+
+    /**
+     * 列表页统计
+     */
+    AjaxResult statistics(ProposalInfo proposalInfo);
 }

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

@@ -98,4 +98,9 @@ public interface ISqmyInfoService
     AjaxResult assignsh(SqmyInfo sqmyInfo);
 
     List<SqmyInfo> unitList(SqmyInfo sqmyInfo);
+
+    /**
+     * 列表页统计
+     */
+    AjaxResult statistics(SqmyInfo sqmyInfo);
 }

+ 32 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProposalInfoServiceImpl.java

@@ -1,7 +1,9 @@
 package com.ruoyi.system.service.impl;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysDept;
@@ -97,6 +99,35 @@ public class ProposalInfoServiceImpl implements IProposalInfoService
         return proposalInfoMapper.selectProposalInfoList(proposalInfo);
     }
 
+    /**
+     * 列表页统计
+     */
+    @Override
+    public AjaxResult statistics(ProposalInfo proposalInfo) {
+        Map<String,Object> map = new HashMap<>();
+        List<ProposalInfo> proposalInfos = proposalInfoMapper.selectProposalInfoList(proposalInfo);
+        int totle = proposalInfos.size();
+        int dsc = 0;
+        int yla = 0;
+        int byla = 0;
+        for (ProposalInfo info : proposalInfos) {
+            if("1".equals(info.getProposalProgress())){
+                dsc++;
+            }else if("3".equals(info.getProposalProgress())){
+                byla++;
+            }else if(!"0".equals(info.getProposalProgress())){
+                yla++;
+            }
+        }
+        map.put("totle",totle);
+        map.put("dsc",dsc);
+        map.put("yla",yla);
+        map.put("byla",byla);
+
+        return AjaxResult.success(map);
+    }
+
+
     /**
      * 新增提案信息
      * 
@@ -288,4 +319,5 @@ public class ProposalInfoServiceImpl implements IProposalInfoService
         proposalInfo.setDeptId(user.getDeptId());
         return proposalInfoMapper.selectProposalInfoListByUnit(proposalInfo);
     }
+
 }

+ 28 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SqmyInfoServiceImpl.java

@@ -1,12 +1,15 @@
 package com.ruoyi.system.service.impl;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.domain.ProposalInfo;
 import com.ruoyi.system.domain.ProposalUnitReply;
 import com.ruoyi.system.domain.ZxFj;
 import com.ruoyi.system.domain.sqmy.SqmyInfo;
@@ -86,6 +89,30 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
         return sqmyInfoMapper.selectSqmyInfoList(sqmyInfo);
     }
 
+    /**
+     * 列表页统计
+     */
+    @Override
+    public AjaxResult statistics(SqmyInfo sqmyInfo) {
+        Map<String,Object> map = new HashMap<>();
+        List<SqmyInfo> sqmyInfos = sqmyInfoMapper.selectSqmyInfoList(sqmyInfo);
+        int totle = sqmyInfos.size();
+        int dsh = 0;
+        int ysh = 0;
+        for (SqmyInfo info : sqmyInfos) {
+            if("1".equals(info.getSqmyProgress())){
+                dsh++;
+            }else {
+                ysh++;
+            }
+        }
+        map.put("totle",totle);
+        map.put("dsh",dsh);
+        map.put("ysh",ysh);
+
+        return AjaxResult.success(map);
+    }
+
     /**
      * 新增社情民意信息
      * 
@@ -268,4 +295,5 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
         sqmyInfo.setDeptId(user.getDeptId());
         return sqmyInfoMapper.selectSqmyInfoListByUnit(sqmyInfo);
     }
+
 }

+ 7 - 3
ruoyi-system/src/main/resources/mapper/system/ProposalInfoMapper.xml

@@ -28,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <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"    />
@@ -58,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </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, rolling_process, complex_type, is_cases_together, unite_proposal_id, satisfaction, members_opinion,
+        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>
 
@@ -110,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <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.rolling_process, p.complex_type,
+               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
@@ -157,7 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <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.rolling_process, p.complex_type,
+        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
@@ -226,6 +227,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="negotiateType != null">negotiate_type,</if>
             <if test="proposedContractor != null">proposed_contractor,</if>
             <if test="proposalProgress != null">proposal_progress,</if>
+            <if test="backReason != null">back_reason,</if>
             <if test="rollingProcess != null">rolling_process,</if>
             <if test="complexType != null">complex_type,</if>
             <if test="isCasesTogether != null">is_cases_together,</if>
@@ -268,6 +270,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="negotiateType != null">#{negotiateType},</if>
             <if test="proposedContractor != null">#{proposedContractor},</if>
             <if test="proposalProgress != null">#{proposalProgress},</if>
+            <if test="backReason != null">#{backReason},</if>
             <if test="rollingProcess != null">#{rollingProcess},</if>
             <if test="complexType != null">#{complexType},</if>
             <if test="isCasesTogether != null">#{isCasesTogether},</if>
@@ -314,6 +317,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="negotiateType != null">negotiate_type = #{negotiateType},</if>
             <if test="proposedContractor != null">proposed_contractor = #{proposedContractor},</if>
             <if test="proposalProgress != null">proposal_progress = #{proposalProgress},</if>
+            <if test="backReason != null">back_reason = #{backReason},</if>
             <if test="rollingProcess != null">rolling_process = #{rollingProcess},</if>
             <if test="complexType != null">complex_type = #{complexType},</if>
             <if test="isCasesTogether != null">is_cases_together = #{isCasesTogether},</if>

+ 6 - 2
ruoyi-system/src/main/resources/mapper/system/SqmyInfoMapper.xml

@@ -20,6 +20,7 @@
         <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"    />
@@ -44,7 +45,7 @@
     </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, 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">
@@ -88,7 +89,7 @@
 
     <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, s.rolling_process,
+               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
@@ -143,6 +144,7 @@
             <if test="unit != null">unit,</if>
             <if test="isRecord != null">is_record,</if>
             <if test="sqmyProgress != null">sqmy_progress,</if>
+            <if test="backReason != null">back_reason,</if>
             <if test="rollingProcess != null">rolling_process,</if>
             <if test="complexType != null">complex_type,</if>
             <if test="isCasesTogether != null">is_cases_together,</if>
@@ -177,6 +179,7 @@
             <if test="unit != null">#{unit},</if>
             <if test="isRecord != null">#{isRecord},</if>
             <if test="sqmyProgress != null">#{sqmyProgress},</if>
+            <if test="backReason != null">#{backReason},</if>
             <if test="rollingProcess != null">#{rollingProcess},</if>
             <if test="complexType != null">#{complexType},</if>
             <if test="isCasesTogether != null">#{isCasesTogether},</if>
@@ -215,6 +218,7 @@
             <if test="unit != null">unit = #{unit},</if>
             <if test="isRecord != null">is_record = #{isRecord},</if>
             <if test="sqmyProgress != null">sqmy_progress = #{sqmyProgress},</if>
+            <if test="backReason != null">back_reason = #{backReason},</if>
             <if test="rollingProcess != null">rolling_process = #{rollingProcess},</if>
             <if test="complexType != null">complex_type = #{complexType},</if>
             <if test="isCasesTogether != null">is_cases_together = #{isCasesTogether},</if>