Ver código fonte

fix 年度履职报告

Administrator 1 ano atrás
pai
commit
61bd989d27

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/member/MemberInfoController.java

@@ -98,7 +98,7 @@ public class MemberInfoController extends BaseController {
     /**
      * 获取委员履职年度报告
      */
-    @PreAuthorize("@ss.hasPermi('member:info:queryJop')")
+    @PreAuthorize("@ss.hasPermi('member:info:MemberReport')")
     @PostMapping(value = "/getMemberReport")
     public AjaxResult getMemberReport(@RequestBody MemberInfo memberInfo) {
         return success(memberInfoService.getMemberReport(memberInfo));

+ 12 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java

@@ -41,11 +41,23 @@ public class BaseEntity implements Serializable
      * 年份
      */
     private String year;
+    /**
+     * 分数
+     */
+    private Long score;
 
     /** 请求参数 */
     @JsonInclude(JsonInclude.Include.NON_EMPTY)
     private Map<String, Object> params;
 
+    public Long getScore() {
+        return score;
+    }
+
+    public void setScore(Long score) {
+        this.score = score;
+    }
+
     public String getYear() {
         return year;
     }

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

@@ -185,6 +185,18 @@ public class ProposalInfo extends BaseEntity
 
     private String endTime;
     private String startTime;
+    /**
+     * 冗余字段
+     */
+    private String type;
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
 
     public String getEndTime() {
         return endTime;

+ 0 - 13
ruoyi-system/src/main/java/com/ruoyi/system/domain/bonus/ZxBonus.java

@@ -49,10 +49,6 @@ public class ZxBonus extends BaseEntity
     @Excel(name = "加分时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date bonusTime;
 
-    /** 分数 */
-    @Excel(name = "分数")
-    private String score;
-
     public String getType() {
         return type;
     }
@@ -124,15 +120,6 @@ public class ZxBonus extends BaseEntity
     {
         return bonusTime;
     }
-    public void setScore(String score) 
-    {
-        this.score = score;
-    }
-
-    public String getScore() 
-    {
-        return score;
-    }
 
     @Override
     public String toString() {

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

@@ -53,10 +53,6 @@ public class MemberInfo extends BaseEntity
     /** 乡镇(经开区)委员工作室 */
     @Excel(name = "乡镇", readConverterExp = "经=开区")
     private String studio;
-    /**
-     * 分数
-     */
-    private String score;
     /**
      * 排名
      */
@@ -104,13 +100,6 @@ public class MemberInfo extends BaseEntity
         this.grade = grade;
     }
 
-    public String getScore() {
-        return score;
-    }
-
-    public void setScore(String score) {
-        this.score = score;
-    }
 
     public String getRanking() {
         return ranking;

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MemberInfoVo.java

@@ -8,6 +8,7 @@ import com.ruoyi.system.domain.speak.ZxSpeak;
 import com.ruoyi.system.domain.sqmy.SqmyInfo;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Author: tjf
@@ -40,6 +41,18 @@ public class MemberInfoVo {
      * 发言集合
      */
     private List<ZxSpeak> zxSpeakList;
+    /**
+     * 相关集合
+     */
+    private Map<String,Object> map;
+
+    public Map<String, Object> getMap() {
+        return map;
+    }
+
+    public void setMap(Map<String, Object> map) {
+        this.map = map;
+    }
 
     public MemberInfo getMemberInfo() {
         return memberInfo;

+ 27 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MemberInfoServiceImpl.java

@@ -17,7 +17,9 @@ import org.springframework.stereotype.Service;
 import com.ruoyi.system.service.IMemberInfoService;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 委员信息Service业务层处理
@@ -95,12 +97,34 @@ public class MemberInfoServiceImpl implements IMemberInfoService
         //查询出委员信息
         Long userId = memberInfo.getUserId();
         MemberInfo memberInfoSelect = memberInfoMapper.selectMemberInfoByUserId(memberInfo.getUserId());
-        //查询履职情况
+        memberInfoVo.setMemberInfo(memberInfoSelect);
+        //履职状况初始化
+        Map<String,Object> map = new HashMap<>();
+        //提案
+        map.put("proposalInfoNum",0);
+        //社情民意
+        map.put("sqmyInfoNum",0);
+        //会议
+        map.put("conferenceNum",0);
+        //活动
+        map.put("activityNum",0);
+        //发言数量
+        map.put("speakNum",0);
+        map.put("proposalInfoScore",0);
+        map.put("sqmyInfoScore",0);
+        map.put("conferenceScore",0);
+        map.put("activityScore",0);
+        map.put("speakScore",0);
         ProposalInfo proposalInfo = new ProposalInfo();
         proposalInfo.setProposalUserId(userId);
-        proposalInfoMapper.selectProposalInfoListByUser(proposalInfo);
+        //查询履职情况
+        List<ProposalInfo> proposalInfos = proposalInfoMapper.selectProposalInfoListByUser(proposalInfo);
+        if (proposalInfos != null && proposalInfos.size() > 0){
 
-        return null;
+        }
+        //查询社情民意
+        memberInfoVo.setMap(map);
+        return memberInfoVo;
     }
 
     /**

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

@@ -353,6 +353,7 @@ public class ProposalInfoServiceImpl implements IProposalInfoService
     public List<ProposalInfo> jointlyList(ProposalInfo proposalInfo) {
         SysUser user = SecurityUtils.getLoginUser().getUser();
         proposalInfo.setProposalUserId(user.getUserId());
+        proposalInfo.setType("2");
         return proposalInfoMapper.selectProposalInfoListByUser(proposalInfo);
     }
 

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

@@ -124,8 +124,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                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'
+        <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="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>
@@ -159,6 +160,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <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="proposalUserId != null  and proposalUserId != ''"> and u.user_id = #{proposalUserId}</if>
+        <if test="year != null and year != ''"><!-- 开始时间检索 -->
+            AND date_format(p.update_time,'%y') = date_format(#{year},'%y')
+        </if>
+        </where>
         order by p.update_time desc
     </select>