浏览代码

社情民意

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

+ 68 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/sqmy/SqmyInfoController.java

@@ -46,6 +46,18 @@ public class SqmyInfoController extends BaseController
         return getDataTable(list);
     }
 
+    /**
+     * 根据单位查询
+     */
+    @PreAuthorize("@ss.hasPermi('sqmyInfo:info:unitList')")
+    @GetMapping("/unitList")
+    public TableDataInfo unitList(SqmyInfo sqmyInfo)
+    {
+        startPage();
+        List<SqmyInfo> list = sqmyInfoService.unitList(sqmyInfo);
+        return getDataTable(list);
+    }
+
     /**
      * 导出社情民意信息列表
      */
@@ -123,4 +135,60 @@ public class SqmyInfoController extends BaseController
     {
         return sqmyInfoService.assign(sqmyInfo);
     }
+
+    /***
+     * 交办审核
+     */
+    @PreAuthorize("@ss.hasPermi('sqmyInfo:info:assignsh')")
+    @Log(title = "提案信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/assignsh")
+    public AjaxResult assignsh(@RequestBody SqmyInfo sqmyInfo)
+    {
+        return sqmyInfoService.assignsh(sqmyInfo);
+    }
+
+
+    /***
+     * 委员意见
+     */
+    @PreAuthorize("@ss.hasPermi('sqmyInfo:info:idea')")
+    @Log(title = "提案信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/idea")
+    public AjaxResult idea(@RequestBody SqmyInfo sqmyInfo)
+    {
+        return sqmyInfoService.idea(sqmyInfo);
+    }
+
+    /***
+     * 政协意见
+     */
+    @PreAuthorize("@ss.hasPermi('sqmyInfo:info:zxIdea')")
+    @Log(title = "提案信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/zxIdea")
+    public AjaxResult zxIdea(@RequestBody SqmyInfo sqmyInfo)
+    {
+        return sqmyInfoService.zxIdea(sqmyInfo);
+    }
+
+    /***
+     * 推荐重点
+     */
+    @PreAuthorize("@ss.hasPermi('sqmyInfo:info:keyPoint')")
+    @Log(title = "提案信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/keyPoint")
+    public AjaxResult keyPoint(@RequestBody SqmyInfo sqmyInfo)
+    {
+        return sqmyInfoService.keyPoint(sqmyInfo);
+    }
+
+    /***
+     * 推荐优秀
+     */
+    @PreAuthorize("@ss.hasPermi('sqmyInfo:info:outstanding')")
+    @Log(title = "提案信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/outstanding")
+    public AjaxResult outstanding(@RequestBody SqmyInfo sqmyInfo)
+    {
+        return sqmyInfoService.outstanding(sqmyInfo);
+    }
 }

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

@@ -130,6 +130,39 @@ public class SqmyInfo extends BaseEntity
     private List<ZxFj> zxFjList;
     /** 单位回复 */
     private List<SqmyUnitReply> sqmyUnitReplyList;
+    /**主办单位*/
+    private SqmyUnitReply zbUnitReply;
+
+
+    /** 部门id */
+    private Long deptId;
+
+    /** 单位类型 */
+    private String dwType;
+
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    public String getDwType() {
+        return dwType;
+    }
+
+    public void setDwType(String dwType) {
+        this.dwType = dwType;
+    }
+
+    public SqmyUnitReply getZbUnitReply() {
+        return zbUnitReply;
+    }
+
+    public void setZbUnitReply(SqmyUnitReply zbUnitReply) {
+        this.zbUnitReply = zbUnitReply;
+    }
 
     public List<ZxFj> getZxFjList() {
         return zxFjList;

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

@@ -59,4 +59,6 @@ public interface SqmyInfoMapper
      * @return 结果
      */
     public int deleteSqmyInfoBySqmyIds(Long[] sqmyIds);
+
+    List<SqmyInfo> selectSqmyInfoListByUnit(SqmyInfo sqmyInfo);
 }

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

@@ -71,4 +71,31 @@ public interface ISqmyInfoService
      * 交办
      */
     AjaxResult assign(SqmyInfo sqmyInfo);
+
+    /***
+     * 委员意见
+     */
+    AjaxResult idea(SqmyInfo sqmyInfo);
+
+    /***
+     * 政协意见
+     */
+    AjaxResult zxIdea(SqmyInfo sqmyInfo);
+
+    /***
+     * 推荐重点
+     */
+    AjaxResult keyPoint(SqmyInfo sqmyInfo);
+
+    /***
+     * 推荐优秀
+     */
+    AjaxResult outstanding(SqmyInfo sqmyInfo);
+
+    /***
+     * 交办审核
+     */
+    AjaxResult assignsh(SqmyInfo sqmyInfo);
+
+    List<SqmyInfo> unitList(SqmyInfo sqmyInfo);
 }

+ 81 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SqmyInfoServiceImpl.java

@@ -184,8 +184,88 @@ public class SqmyInfoServiceImpl implements ISqmyInfoService
         return i > 0 ? AjaxResult.success() : AjaxResult.error();
     }
 
+    /***
+     * 交办
+     */
     @Override
     public AjaxResult assign(SqmyInfo sqmyInfo) {
-        return null;
+        List<SqmyUnitReply> sqmyUnitReplyList = sqmyInfo.getSqmyUnitReplyList();
+        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.setUpdateTime(DateUtils.getNowDate());
+        int i = sqmyInfoMapper.updateSqmyInfo(sqmyInfo);
+        return i > 0 ? AjaxResult.success() : AjaxResult.error();
+    }
+
+    /***
+     * 委员意见
+     */
+    @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();
+    }
+
+    /***
+     * 政协意见
+     */
+    @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();
+    }
+
+    /***
+     * 推荐重点
+     */
+    @Override
+    public AjaxResult keyPoint(SqmyInfo sqmyInfo) {
+        sqmyInfo.setUpdateTime(DateUtils.getNowDate());
+        int i = sqmyInfoMapper.updateSqmyInfo(sqmyInfo);
+        return i > 0 ? AjaxResult.success() : AjaxResult.error();
+    }
+
+    /***
+     * 推荐优秀
+     */
+    @Override
+    public AjaxResult outstanding(SqmyInfo sqmyInfo) {
+        sqmyInfo.setUpdateTime(DateUtils.getNowDate());
+        int i = sqmyInfoMapper.updateSqmyInfo(sqmyInfo);
+        return i > 0 ? AjaxResult.success() : AjaxResult.error();
+    }
+
+    /***
+     * 交办审核
+     */
+    @Override
+    public AjaxResult assignsh(SqmyInfo sqmyInfo) {
+        sqmyInfo.setUpdateTime(DateUtils.getNowDate());
+        int i = sqmyInfoMapper.updateSqmyInfo(sqmyInfo);
+        return i > 0 ? AjaxResult.success() : AjaxResult.error();
+    }
+
+    @Override
+    public List<SqmyInfo> unitList(SqmyInfo sqmyInfo) {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        sqmyInfo.setDeptId(user.getDeptId());
+        return sqmyInfoMapper.selectSqmyInfoListByUnit(sqmyInfo);
     }
 }

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

@@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                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_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,u.type as dwType
+               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 u.user_id = #{proposalUserId} and u.type = '2'
@@ -160,11 +160,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         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_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
+        p.update_by, p.update_time, p.remark,u.type as dwType
         from proposal_info p
         left join proposal_unit_reply u on p.proposal_id = u.proposal_id
         where u.dept_id = #{deptId}
-        <if test="type != null  and type != ''"> and u.type = #{dwType}</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>

+ 43 - 0
ruoyi-system/src/main/resources/mapper/system/SqmyInfoMapper.xml

@@ -37,6 +37,9 @@
         <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"    />
     </resultMap>
 
     <sql id="selectSqmyInfoVo">
@@ -73,6 +76,7 @@
             <if test="isOutstanding != null  and isOutstanding != ''"> and is_outstanding = #{isOutstanding}</if>
             <if test="outstandingArgument != null  and outstandingArgument != ''"> and outstanding_argument = #{outstandingArgument}</if>
         </where>
+        order by update_time desc
     </select>
 
     <select id="selectSqmyInfoBySqmyId" parameterType="Long" resultMap="SqmyInfoResult">
@@ -80,6 +84,45 @@
         where sqmy_id = #{sqmyId}
     </select>
 
+    <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.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
+        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="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>
+        order by s.update_time desc
+    </select>
+
     <insert id="insertSqmyInfo" parameterType="SqmyInfo" useGeneratedKeys="true" keyProperty="sqmyId">
         insert into sqmy_info
         <trim prefix="(" suffix=")" suffixOverrides=",">