Commit b88d4cd6 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents e1b706a0 e797cc7d
...@@ -106,8 +106,8 @@ public class StaffCheckSummaryService implements IApplicationStartedService { ...@@ -106,8 +106,8 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
if(query.getStaffId()!=null){ if(query.getStaffId()!=null){
condition.put("staffId",query.getStaffId()); condition.put("staffId",query.getStaffId());
} }
staffPerformSummaryService.getDao().update(staffPerformSummaryEntity,condition); //staffPerformSummaryService.getDao().update(staffPerformSummaryEntity,condition);
staffPerformSummaryService.getDao().updateSumScore(condition);
if(query.getCheckType() == CheckTypeEnum.考勤绩效.getValue()){ if(query.getCheckType() == CheckTypeEnum.考勤绩效.getValue()){
checkAttendRecordService.summaryCheck(query); checkAttendRecordService.summaryCheck(query);
} }
......
...@@ -3,6 +3,8 @@ package com.mortals.xhx.module.staff.dao; ...@@ -3,6 +3,8 @@ package com.mortals.xhx.module.staff.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity; import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 员工绩效统计Dao * 员工绩效统计Dao
* 员工绩效统计 DAO接口 * 员工绩效统计 DAO接口
...@@ -13,5 +15,5 @@ import java.util.List; ...@@ -13,5 +15,5 @@ import java.util.List;
public interface StaffPerformSummaryDao extends ICRUDDao<StaffPerformSummaryEntity,Long>{ public interface StaffPerformSummaryDao extends ICRUDDao<StaffPerformSummaryEntity,Long>{
int updateSumScore(Map<String,Object> condition);
} }
...@@ -7,6 +7,8 @@ import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity; ...@@ -7,6 +7,8 @@ import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
import java.util.Date; import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis; import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 员工绩效统计DaoImpl DAO接口 * 员工绩效统计DaoImpl DAO接口
* *
...@@ -17,5 +19,8 @@ import java.util.List; ...@@ -17,5 +19,8 @@ import java.util.List;
public class StaffPerformSummaryDaoImpl extends BaseCRUDDaoMybatis<StaffPerformSummaryEntity,Long> implements StaffPerformSummaryDao { public class StaffPerformSummaryDaoImpl extends BaseCRUDDaoMybatis<StaffPerformSummaryEntity,Long> implements StaffPerformSummaryDao {
@Override
public int updateSumScore(Map<String,Object> condition) {
return this.getSqlSession().update(this.getSqlId("updateSumScore"),condition);
}
} }
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.staff.dao.ibatis.StaffPerformSummaryDaoImpl">
<update id="updateSumScore" parameterType="map">
update mortals_xhx_staff_perform_summary
set attendScore=0,reviewScore=0,complainScore=0,goworkScore=0,effectScore=0,otherScore=0,errorScore=0,totalScore=100,
sumScore = totalScore + addTotalScore,updateTime = NOW()
where 1 = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="year != null and year!=''"> AND `year` = #{year} </if>
<if test="month != null and month!=''"> AND `month` = #{month} </if>
</update>
</mapper>
\ 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