Commit 1c18b14e authored by 廖旭伟's avatar 廖旭伟

员工绩效汇总表增加字段

parent a998bb09
......@@ -138,6 +138,7 @@ public class StaffPerformInitDataTaskImpl implements ITaskExcuteService {
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
staffPerformSummaryEntity.setStaffId(item.getId());
staffPerformSummaryEntity.setWorkNum(item.getWorkNum());
staffPerformSummaryEntity.setStaffName(item.getName());
staffPerformSummaryEntity.setDeptId(item.getDeptId());
staffPerformSummaryEntity.setDeptName(item.getDeptName());
......
......@@ -129,6 +129,16 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
*/
@Excel(name = "合计得分",sort = 14)
private BigDecimal sumScore;
/**
* 政务服务管理科审核等次
*/
@Excel(name = "政务服务管理科审核等次",sort = 20)
private String auditLevel;
/**
* 服务明星推荐
*/
@Excel(name = "服务明星推荐",sort = 21)
private String recommend;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -192,5 +202,9 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
this.addTotalScore = BigDecimal.ZERO;
this.sumScore = new BigDecimal(100);;
this.auditLevel = "";
this.recommend = "";
}
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
* 员工绩效统计查询对象
*
* @author zxfei
* @date 2024-07-22
* @date 2025-02-11
*/
public class StaffPerformSummaryQuery extends StaffPerformSummaryEntity {
/** 开始 主键ID,主键,自增长 */
......@@ -327,6 +327,16 @@ public class StaffPerformSummaryQuery extends StaffPerformSummaryEntity {
/** 合计得分排除列表 */
private List <BigDecimal> sumScoreNotList;
/** 政务服务管理科审核等次 */
private List<String> auditLevelList;
/** 政务服务管理科审核等次排除列表 */
private List <String> auditLevelNotList;
/** 服务明星推荐 */
private List<String> recommendList;
/** 服务明星推荐排除列表 */
private List <String> recommendNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<StaffPerformSummaryQuery> orConditionList;
......@@ -2081,6 +2091,70 @@ public class StaffPerformSummaryQuery extends StaffPerformSummaryEntity {
}
/**
* 获取 政务服务管理科审核等次
* @return auditLevelList
*/
public List<String> getAuditLevelList(){
return this.auditLevelList;
}
/**
* 设置 政务服务管理科审核等次
* @param auditLevelList
*/
public void setAuditLevelList(List<String> auditLevelList){
this.auditLevelList = auditLevelList;
}
/**
* 获取 政务服务管理科审核等次
* @return auditLevelNotList
*/
public List<String> getAuditLevelNotList(){
return this.auditLevelNotList;
}
/**
* 设置 政务服务管理科审核等次
* @param auditLevelNotList
*/
public void setAuditLevelNotList(List<String> auditLevelNotList){
this.auditLevelNotList = auditLevelNotList;
}
/**
* 获取 服务明星推荐
* @return recommendList
*/
public List<String> getRecommendList(){
return this.recommendList;
}
/**
* 设置 服务明星推荐
* @param recommendList
*/
public void setRecommendList(List<String> recommendList){
this.recommendList = recommendList;
}
/**
* 获取 服务明星推荐
* @return recommendNotList
*/
public List<String> getRecommendNotList(){
return this.recommendNotList;
}
/**
* 设置 服务明星推荐
* @param recommendNotList
*/
public void setRecommendNotList(List<String> recommendNotList){
this.recommendNotList = recommendNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param id
......@@ -3188,6 +3262,44 @@ public class StaffPerformSummaryQuery extends StaffPerformSummaryEntity {
return this;
}
/**
* 设置 政务服务管理科审核等次
* @param auditLevel
*/
public StaffPerformSummaryQuery auditLevel(String auditLevel){
setAuditLevel(auditLevel);
return this;
}
/**
* 设置 政务服务管理科审核等次
* @param auditLevelList
*/
public StaffPerformSummaryQuery auditLevelList(List<String> auditLevelList){
this.auditLevelList = auditLevelList;
return this;
}
/**
* 设置 服务明星推荐
* @param recommend
*/
public StaffPerformSummaryQuery recommend(String recommend){
setRecommend(recommend);
return this;
}
/**
* 设置 服务明星推荐
* @param recommendList
*/
public StaffPerformSummaryQuery recommendList(List<String> recommendList){
this.recommendList = recommendList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
......@@ -32,10 +32,10 @@
<result property="remarkAdd" column="remarkAdd" />
<result property="addTotalScore" column="addTotalScore" />
<result property="sumScore" column="sumScore" />
<result property="auditLevel" column="auditLevel" />
<result property="recommend" column="recommend" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
......@@ -120,23 +120,29 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sumScore') or colPickMode == 1 and data.containsKey('sumScore')))">
a.sumScore,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('auditLevel') or colPickMode == 1 and data.containsKey('auditLevel')))">
a.auditLevel,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('recommend') or colPickMode == 1 and data.containsKey('recommend')))">
a.recommend,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="StaffPerformSummaryEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_staff_perform_summary
(staffId,workNum,staffName,belongCenter,deptId,deptName,attendScore,reviewScore,complainScore,goworkScore,effectScore,otherScore,errorScore,totalScore,remark,year,month,createTime,createUserId,updateTime,updateUserId,salaId,salaName,remarkAdd,addTotalScore,sumScore)
(staffId,workNum,staffName,belongCenter,deptId,deptName,attendScore,reviewScore,complainScore,goworkScore,effectScore,otherScore,errorScore,totalScore,remark,year,month,createTime,createUserId,updateTime,updateUserId,salaId,salaName,remarkAdd,addTotalScore,sumScore,auditLevel,recommend)
VALUES
(#{staffId},#{workNum},#{staffName},#{belongCenter},#{deptId},#{deptName},#{attendScore},#{reviewScore},#{complainScore},#{goworkScore},#{effectScore},#{otherScore},#{errorScore},#{totalScore},#{remark},#{year},#{month},#{createTime},#{createUserId},#{updateTime},#{updateUserId},#{salaId},#{salaName},#{remarkAdd},#{addTotalScore},#{sumScore})
(#{staffId},#{workNum},#{staffName},#{belongCenter},#{deptId},#{deptName},#{attendScore},#{reviewScore},#{complainScore},#{goworkScore},#{effectScore},#{otherScore},#{errorScore},#{totalScore},#{remark},#{year},#{month},#{createTime},#{createUserId},#{updateTime},#{updateUserId},#{salaId},#{salaName},#{remarkAdd},#{addTotalScore},#{sumScore},#{auditLevel},#{recommend})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_staff_perform_summary
(staffId,workNum,staffName,belongCenter,deptId,deptName,attendScore,reviewScore,complainScore,goworkScore,effectScore,otherScore,errorScore,totalScore,remark,year,month,createTime,createUserId,updateTime,updateUserId,salaId,salaName,remarkAdd,addTotalScore,sumScore)
(staffId,workNum,staffName,belongCenter,deptId,deptName,attendScore,reviewScore,complainScore,goworkScore,effectScore,otherScore,errorScore,totalScore,remark,year,month,createTime,createUserId,updateTime,updateUserId,salaId,salaName,remarkAdd,addTotalScore,sumScore,auditLevel,recommend)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.staffId},#{item.workNum},#{item.staffName},#{item.belongCenter},#{item.deptId},#{item.deptName},#{item.attendScore},#{item.reviewScore},#{item.complainScore},#{item.goworkScore},#{item.effectScore},#{item.otherScore},#{item.errorScore},#{item.totalScore},#{item.remark},#{item.year},#{item.month},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.updateUserId},#{item.salaId},#{item.salaName},#{item.remarkAdd},#{item.addTotalScore},#{item.sumScore})
(#{item.staffId},#{item.workNum},#{item.staffName},#{item.belongCenter},#{item.deptId},#{item.deptName},#{item.attendScore},#{item.reviewScore},#{item.complainScore},#{item.goworkScore},#{item.effectScore},#{item.otherScore},#{item.errorScore},#{item.totalScore},#{item.remark},#{item.year},#{item.month},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.updateUserId},#{item.salaId},#{item.salaName},#{item.remarkAdd},#{item.addTotalScore},#{item.sumScore},#{item.auditLevel},#{item.recommend})
</foreach>
</insert>
......@@ -275,6 +281,12 @@
<if test="(colPickMode==0 and data.containsKey('sumScoreIncrement')) or (colPickMode==1 and !data.containsKey('sumScoreIncrement'))">
a.sumScore=ifnull(a.sumScore,0) + #{data.sumScoreIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('auditLevel')) or (colPickMode==1 and !data.containsKey('auditLevel'))">
a.auditLevel=#{data.auditLevel},
</if>
<if test="(colPickMode==0 and data.containsKey('recommend')) or (colPickMode==1 and !data.containsKey('recommend'))">
a.recommend=#{data.recommend},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -554,6 +566,20 @@
</choose>
</foreach>
</trim>
<trim prefix="auditLevel=(case" suffix="ELSE auditLevel end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('auditLevel')) or (colPickMode==1 and !item.containsKey('auditLevel'))">
when a.id=#{item.id} then #{item.auditLevel}
</if>
</foreach>
</trim>
<trim prefix="recommend=(case" suffix="ELSE recommend end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('recommend')) or (colPickMode==1 and !item.containsKey('recommend'))">
when a.id=#{item.id} then #{item.recommend}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -665,6 +691,10 @@
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="permissionSql != null and permissionSql != ''">
${permissionSql}
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
......@@ -1333,6 +1363,48 @@
${_conditionType_} a.sumScore <![CDATA[ <= ]]> #{${_conditionParam_}.sumScoreEnd}
</if>
<if test="conditionParamRef.containsKey('auditLevel')">
<if test="conditionParamRef.auditLevel != null and conditionParamRef.auditLevel != ''">
${_conditionType_} a.auditLevel like #{${_conditionParam_}.auditLevel}
</if>
<if test="conditionParamRef.auditLevel == null">
${_conditionType_} a.auditLevel is null
</if>
</if>
<if test="conditionParamRef.containsKey('auditLevelList') and conditionParamRef.auditLevelList.size() > 0">
${_conditionType_} a.auditLevel in
<foreach collection="conditionParamRef.auditLevelList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('auditLevelNotList') and conditionParamRef.auditLevelNotList.size() > 0">
${_conditionType_} a.auditLevel not in
<foreach collection="conditionParamRef.auditLevelNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('recommend')">
<if test="conditionParamRef.recommend != null and conditionParamRef.recommend != ''">
${_conditionType_} a.recommend like #{${_conditionParam_}.recommend}
</if>
<if test="conditionParamRef.recommend == null">
${_conditionType_} a.recommend is null
</if>
</if>
<if test="conditionParamRef.containsKey('recommendList') and conditionParamRef.recommendList.size() > 0">
${_conditionType_} a.recommend in
<foreach collection="conditionParamRef.recommendList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('recommendNotList') and conditionParamRef.recommendNotList.size() > 0">
${_conditionType_} a.recommend not in
<foreach collection="conditionParamRef.recommendNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -1733,6 +1805,16 @@
<if test='orderCol.sumScore != null and "DESC".equalsIgnoreCase(orderCol.sumScore)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('auditLevel')">
a.auditLevel
<if test='orderCol.auditLevel != null and "DESC".equalsIgnoreCase(orderCol.auditLevel)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('recommend')">
a.recommend
<if test='orderCol.recommend != null and "DESC".equalsIgnoreCase(orderCol.recommend)'>DESC</if>
,
</if>
</trim>
</if>
......
......@@ -1342,4 +1342,11 @@ ALTER TABLE `mortals_xhx_staff_perform_summary`
ADD COLUMN `remarkAdd` VARCHAR (2048) DEFAULT NULL COMMENT '加分备注' AFTER `month`,
ADD COLUMN `addTotalScore` DECIMAL (10, 2) DEFAULT NULL COMMENT '加分合计' AFTER `remarkAdd`,
ADD COLUMN `sumScore` DECIMAL (10, 2) DEFAULT NULL COMMENT '合计得分' AFTER `addTotalScore`;
UPDATE `mortals_xhx_staff_perform_summary` SET sumScore=totalScore,addTotalScore=0;
\ No newline at end of file
UPDATE `mortals_xhx_staff_perform_summary` SET sumScore=totalScore,addTotalScore=0;
-- ----------------------------
-- 2025-02-11
-- ----------------------------
ALTER TABLE `mortals_xhx_staff_perform_summary`
ADD COLUMN `auditLevel` varchar(128) COMMENT '政务服务管理科审核等次' AFTER `sumScore`,
ADD COLUMN `recommend` varchar(128) COMMENT '服务明星推荐' AFTER `auditLevel`;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment