Bläddra i källkod

fix 履职加分

Administrator 1 år sedan
förälder
incheckning
84cfa7280e

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

@@ -41,8 +41,8 @@ public class ZxBonus extends BaseEntity
     private String bonusReason;
 
     /** 加分时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "加分时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "加分时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date bonusTime;
 
     /** 分数 */

+ 26 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/member/MemberInfo.java

@@ -53,11 +53,36 @@ public class MemberInfo extends BaseEntity
     /** 乡镇(经开区)委员工作室 */
     @Excel(name = "乡镇", readConverterExp = "经=开区")
     private String studio;
+    /**
+     * 分数
+     */
+    private String score;
+    /**
+     * 排名
+     */
+    private String ranking;
 
     /** 删除标志(0代表存在 2代表删除) */
     private String delFlag;
 
-    public void setMemberId(Long memberId) 
+
+    public String getScore() {
+        return score;
+    }
+
+    public void setScore(String score) {
+        this.score = score;
+    }
+
+    public String getRanking() {
+        return ranking;
+    }
+
+    public void setRanking(String ranking) {
+        this.ranking = ranking;
+    }
+
+    public void setMemberId(Long memberId)
     {
         this.memberId = memberId;
     }

+ 3 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZxBonusServiceImpl.java

@@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl;
 
 
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.system.domain.bonus.ZxBonus;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -54,6 +55,8 @@ public class ZxBonusServiceImpl implements IZxBonusService
     @Override
     public int insertZxBonus(ZxBonus zxBonus)
     {
+        //只能给自己账号加分
+        zxBonus.setUserId(SecurityUtils.getUserId());
         zxBonus.setCreateTime(DateUtils.getNowDate());
         return zxBonusMapper.insertZxBonus(zxBonus);
     }

+ 11 - 1
ruoyi-system/src/main/resources/mapper/system/MemberInfoMapper.xml

@@ -15,6 +15,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="avatar"    column="avatar"    />
         <result property="unit"    column="unit"    />
         <result property="studio"    column="studio"    />
+        <result property="score"    column="score"    />
+        <result property="ranking"    column="ranking"    />
         <result property="delFlag"    column="del_flag"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
@@ -24,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectMemberInfoVo">
-        select member_id, user_id, member_name, member_card, boundary, party_affiliation, phonenumber, avatar, unit, studio, del_flag, create_by, create_time, update_by, update_time, remark from member_info
+        select member_id, user_id, member_name, member_card, boundary, party_affiliation, phonenumber, avatar, unit, studio, score,ranking,del_flag, create_by, create_time, update_by, update_time, remark from member_info
     </sql>
 
     <select id="selectMemberInfoList" parameterType="MemberInfo" resultMap="MemberInfoResult">
@@ -39,6 +41,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="avatar != null  and avatar != ''"> and avatar = #{avatar}</if>
             <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
             <if test="studio != null  and studio != ''"> and studio = #{studio}</if>
+            <if test="score != null  and score != ''"> and score = #{score}</if>
+            <if test="ranking != null  and ranking != ''"> and ranking = #{ranking}</if>
         </where>
     </select>
     
@@ -59,6 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="avatar != null">avatar,</if>
             <if test="unit != null">unit,</if>
             <if test="studio != null">studio,</if>
+            <if test="score != null">score,</if>
+            <if test="ranking != null">ranking,</if>
             <if test="delFlag != null">del_flag,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
@@ -76,6 +82,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="avatar != null">#{avatar},</if>
             <if test="unit != null">#{unit},</if>
             <if test="studio != null">#{studio},</if>
+            <if test="score != null">#{score},</if>
+            <if test="ranking != null">#{ranking},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
@@ -97,6 +105,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="avatar != null">avatar = #{avatar},</if>
             <if test="unit != null">unit = #{unit},</if>
             <if test="studio != null">studio = #{studio},</if>
+            <if test="score != null and score != ''">score = #{score},</if>
+            <if test="ranking != null and ranking != ''">ranking = #{ranking},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>