Commit 7a16b11e authored by 赵啸非's avatar 赵啸非

修改考勤汇总

parent 938ee527
...@@ -24,6 +24,11 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo { ...@@ -24,6 +24,11 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
* 人员id * 人员id
*/ */
private Long staffId; private Long staffId;
/**
* 所属中心
*/
@Excel(name = "所属中心")
private String belongCenter;
/** /**
* 工号 * 工号
*/ */
...@@ -146,5 +151,7 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo { ...@@ -146,5 +151,7 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
this.year = DateUtil.year(new Date()); this.year = DateUtil.year(new Date());
this.month = DateUtil.month(new Date())+1; this.month = DateUtil.month(new Date())+1;
this.belongCenter = "宜宾市民中心";
} }
} }
\ No newline at end of file
...@@ -4,11 +4,11 @@ import java.math.BigDecimal; ...@@ -4,11 +4,11 @@ import java.math.BigDecimal;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity; import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
/** /**
* 员工绩效统计查询对象 * 员工绩效统计查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-14 * @date 2023-07-18
*/ */
public class StaffPerformSummaryQuery extends StaffPerformSummaryEntity { public class StaffPerformSummaryQuery extends StaffPerformSummaryEntity {
/** 开始 主键ID,主键,自增长 */ /** 开始 主键ID,主键,自增长 */
private Long idStart; private Long idStart;
...@@ -267,6 +267,11 @@ public class StaffPerformSummaryQuery extends StaffPerformSummaryEntity { ...@@ -267,6 +267,11 @@ public class StaffPerformSummaryQuery extends StaffPerformSummaryEntity {
/** 更新人id排除列表 */ /** 更新人id排除列表 */
private List <Long> updateUserIdNotList; private List <Long> updateUserIdNotList;
/** 所属中心 */
private List<String> belongCenterList;
/** 所属中心排除列表 */
private List <String> belongCenterNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<StaffPerformSummaryQuery> orConditionList; private List<StaffPerformSummaryQuery> orConditionList;
...@@ -1682,6 +1687,38 @@ public class StaffPerformSummaryQuery extends StaffPerformSummaryEntity { ...@@ -1682,6 +1687,38 @@ public class StaffPerformSummaryQuery extends StaffPerformSummaryEntity {
} }
/**
* 获取 所属中心
* @return belongCenterList
*/
public List<String> getBelongCenterList(){
return this.belongCenterList;
}
/**
* 设置 所属中心
* @param belongCenterList
*/
public void setBelongCenterList(List<String> belongCenterList){
this.belongCenterList = belongCenterList;
}
/**
* 获取 所属中心
* @return belongCenterNotList
*/
public List<String> getBelongCenterNotList(){
return this.belongCenterNotList;
}
/**
* 设置 所属中心
* @param belongCenterNotList
*/
public void setBelongCenterNotList(List<String> belongCenterNotList){
this.belongCenterNotList = belongCenterNotList;
}
/** /**
* 设置 主键ID,主键,自增长 * 设置 主键ID,主键,自增长
* @param id * @param id
...@@ -2570,6 +2607,25 @@ public class StaffPerformSummaryQuery extends StaffPerformSummaryEntity { ...@@ -2570,6 +2607,25 @@ public class StaffPerformSummaryQuery extends StaffPerformSummaryEntity {
return this; return this;
} }
/**
* 设置 所属中心
* @param belongCenter
*/
public StaffPerformSummaryQuery belongCenter(String belongCenter){
setBelongCenter(belongCenter);
return this;
}
/**
* 设置 所属中心
* @param belongCenterList
*/
public StaffPerformSummaryQuery belongCenterList(List<String> belongCenterList){
this.belongCenterList = belongCenterList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.staff.dao.ibatis.StaffPerformSummaryDaoImpl"> <mapper namespace="com.mortals.xhx.module.staff.dao.ibatis.StaffPerformSummaryDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<result property="createUserId" column="createUserId" /> <result property="createUserId" column="createUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="updateUserId" column="updateUserId" /> <result property="updateUserId" column="updateUserId" />
<result property="belongCenter" column="belongCenter" />
</resultMap> </resultMap>
...@@ -96,23 +97,26 @@ ...@@ -96,23 +97,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId, a.updateUserId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('belongCenter') or colPickMode == 1 and data.containsKey('belongCenter')))">
a.belongCenter,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="StaffPerformSummaryEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="StaffPerformSummaryEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_staff_perform_summary insert into mortals_xhx_staff_perform_summary
(staffId,workNum,staffName,deptId,deptName,attendScore,reviewScore,complainScore,goworkScore,effectScore,otherScore,errorScore,totalScore,remark,year,month,createTime,createUserId,updateTime,updateUserId) (staffId,workNum,staffName,deptId,deptName,attendScore,reviewScore,complainScore,goworkScore,effectScore,otherScore,errorScore,totalScore,remark,year,month,createTime,createUserId,updateTime,updateUserId,belongCenter)
VALUES VALUES
(#{staffId},#{workNum},#{staffName},#{deptId},#{deptName},#{attendScore},#{reviewScore},#{complainScore},#{goworkScore},#{effectScore},#{otherScore},#{errorScore},#{totalScore},#{remark},#{year},#{month},#{createTime},#{createUserId},#{updateTime},#{updateUserId}) (#{staffId},#{workNum},#{staffName},#{deptId},#{deptName},#{attendScore},#{reviewScore},#{complainScore},#{goworkScore},#{effectScore},#{otherScore},#{errorScore},#{totalScore},#{remark},#{year},#{month},#{createTime},#{createUserId},#{updateTime},#{updateUserId},#{belongCenter})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_staff_perform_summary insert into mortals_xhx_staff_perform_summary
(staffId,workNum,staffName,deptId,deptName,attendScore,reviewScore,complainScore,goworkScore,effectScore,otherScore,errorScore,totalScore,remark,year,month,createTime,createUserId,updateTime,updateUserId) (staffId,workNum,staffName,deptId,deptName,attendScore,reviewScore,complainScore,goworkScore,effectScore,otherScore,errorScore,totalScore,remark,year,month,createTime,createUserId,updateTime,updateUserId,belongCenter)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.staffId},#{item.workNum},#{item.staffName},#{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.staffId},#{item.workNum},#{item.staffName},#{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.belongCenter})
</foreach> </foreach>
</insert> </insert>
...@@ -224,6 +228,9 @@ ...@@ -224,6 +228,9 @@
<if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))"> <if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement}, a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('belongCenter')) or (colPickMode==1 and !data.containsKey('belongCenter'))">
a.belongCenter=#{data.belongCenter},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -446,6 +453,13 @@ ...@@ -446,6 +453,13 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="belongCenter=(case" suffix="ELSE belongCenter end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('belongCenter')) or (colPickMode==1 and !item.containsKey('belongCenter'))">
when a.id=#{item.id} then #{item.belongCenter}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -1081,6 +1095,27 @@ ...@@ -1081,6 +1095,27 @@
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd} ${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if> </if>
<if test="conditionParamRef.containsKey('belongCenter')">
<if test="conditionParamRef.belongCenter != null and conditionParamRef.belongCenter != ''">
${_conditionType_} a.belongCenter like #{${_conditionParam_}.belongCenter}
</if>
<if test="conditionParamRef.belongCenter == null">
${_conditionType_} a.belongCenter is null
</if>
</if>
<if test="conditionParamRef.containsKey('belongCenterList') and conditionParamRef.belongCenterList.size() > 0">
${_conditionType_} a.belongCenter in
<foreach collection="conditionParamRef.belongCenterList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('belongCenterNotList') and conditionParamRef.belongCenterNotList.size() > 0">
${_conditionType_} a.belongCenter not in
<foreach collection="conditionParamRef.belongCenterNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -1199,6 +1234,11 @@ ...@@ -1199,6 +1234,11 @@
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if> <if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('belongCenter')">
a.belongCenter
<if test='orderCol.belongCenter != null and "DESC".equalsIgnoreCase(orderCol.belongCenter)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
...@@ -767,3 +767,5 @@ ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `goTimes` int(9) default ...@@ -767,3 +767,5 @@ ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `goTimes` int(9) default
ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `morningTimes` int(9) default 0 COMMENT '上午缺卡次数' AFTER goTimes; ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `morningTimes` int(9) default 0 COMMENT '上午缺卡次数' AFTER goTimes;
ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `afternoonTimes` int(9) default 0 COMMENT '下午缺卡次数' AFTER morningTimes; ALTER TABLE mortals_xhx_attendance_stat ADD COLUMN `afternoonTimes` int(9) default 0 COMMENT '下午缺卡次数' AFTER morningTimes;
ALTER TABLE mortals_xhx_staff_perform_summary ADD COLUMN `belongCenter` varchar(512) DEFAULT '宜宾市民中心' COMMENT '所属中心' AFTER staffName;
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