Commit 0b2b5859 by lal Committed by chenzg

修复BUG

parent 323a7608
...@@ -633,10 +633,19 @@ public class JxglController { ...@@ -633,10 +633,19 @@ public class JxglController {
// if(appisal.getAppraisalPersonNum() == 1) { // if(appisal.getAppraisalPersonNum() == 1) {
// //
// } // }
if(appraisalUpdateSts.getSts() == 0) {//开启评分
List<JxglAppraisal> ais = JxglAppraisal.builder().build().selectList(new QueryWrapper<JxglAppraisal>().lambda().eq(JxglAppraisal::getPerformanceAppraisalId, appraisalUpdateSts.getId())
.eq(JxglAppraisal::getSts, 1));
if(ais.size() == 0) {
return ResultUtil.error("已无可开启的绩效评分");
}
}else if(appraisalUpdateSts.getSts() == 1) {//开启结果确认
List<JxglAppraisal> ais = jxglAppraisalMapper.selectListByappraisalid(appraisalUpdateSts.getId());
if(ais.size() == 0) {
return ResultUtil.error("已无可开启的绩效结果确认");
}
}
List<JxglAppraisal> ais = JxglAppraisal.builder().build().selectList(new QueryWrapper<JxglAppraisal>().lambda().eq(JxglAppraisal::getPerformanceAppraisalId, appraisalUpdateSts.getId())
.eq(JxglAppraisal::getSts, 0));
if(ais.size() > 0) {
JxglPerformanceAppraisal performanceAppraisal = jxglPerformanceAppraisalMapper JxglPerformanceAppraisal performanceAppraisal = jxglPerformanceAppraisalMapper
.selectOne(new QueryWrapper<JxglPerformanceAppraisal>().lambda() .selectOne(new QueryWrapper<JxglPerformanceAppraisal>().lambda()
.eq(JxglPerformanceAppraisal::getId, appraisalUpdateSts.getId()) .eq(JxglPerformanceAppraisal::getId, appraisalUpdateSts.getId())
...@@ -793,9 +802,7 @@ public class JxglController { ...@@ -793,9 +802,7 @@ public class JxglController {
return ResultUtil.success(); return ResultUtil.success();
}else {
return ResultUtil.error("已无可开启的绩效节点");
}
} }
/** /**
......
package cn.timer.api.dao.jxgl; package cn.timer.api.dao.jxgl;
import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -26,5 +28,7 @@ public interface JxglAppraisalMapper extends BaseMapper<JxglAppraisal> { ...@@ -26,5 +28,7 @@ public interface JxglAppraisalMapper extends BaseMapper<JxglAppraisal> {
IPage<JxglAppraisal> selectMyEmpByQuery(IPage<JxglAppraisal> page,@Param("param") EmpPerformanceQuery query); IPage<JxglAppraisal> selectMyEmpByQuery(IPage<JxglAppraisal> page,@Param("param") EmpPerformanceQuery query);
String CurrentdepartmentID(int orgcode,int empnum); String CurrentdepartmentID(int orgcode,int empnum);
List<JxglAppraisal> selectListByappraisalid(int appraisalid);
} }
...@@ -229,6 +229,13 @@ ...@@ -229,6 +229,13 @@
is_edit JxglAppraisal_is_edit is_edit JxglAppraisal_is_edit
</sql> </sql>
<select id="selectListByappraisalid" resultMap="BaseResultMap" >
SELECT id,performance_appraisal_id,emp_num,name,appraisal_explain,create_time,update_time,is_edit,sts,total,level
FROM jxgl_appraisal
WHERE performance_appraisal_id = #{appraisalid}
AND (sts = 2 or sts = 3)
</select>
<select id="selectListByQuery" resultMap="BaseResultMap_All" > <select id="selectListByQuery" resultMap="BaseResultMap_All" >
SELECT SELECT
<include refid="Base_Column_List_a" />, <include refid="Base_Column_List_a" />,
......
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
</select> </select>
<select id="selectMyProcessedByQuery" resultMap="BaseResultMap_ALl" > <select id="selectMyProcessedByQuery" resultMap="BaseResultMap_ALl" >
SELECT <!-- SELECT
a.name,a.appraisal_start_time,a.appraisal_end_time, a.name,a.appraisal_start_time,a.appraisal_end_time,
b.id b_id,b.sts b_sts, b.id b_id,b.sts b_sts,
c.comprehensive_score c_comprehensive_score, c.comprehensive_score c_comprehensive_score,
...@@ -267,8 +267,23 @@ ...@@ -267,8 +267,23 @@
AND d.executor_id = #{param.id} AND d.executor_id = #{param.id}
AND d.sts = 2 AND d.sts = 2
</where> </where>
ORDER BY a.id DESC ORDER BY a.id DESC -->
select em.`name` b_user_name,
em.phone b_phone,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = em.bmgw_id limit 1) limit 1) as b_bm_name,
pe.`name`,
nod.process_type as b_sts,
jx.total c_comprehensive_score,
jx.`level` c_level
from jxgl_process_node nod
LEFT JOIN jxgl_appraisal as jx on jx.id = nod.appraisal_id
LEFT JOIN jxgl_performance_appraisal as pe on pe.id = jx.performance_appraisal_id
LEFT JOIN yggl_main_emp as em on em.emp_num = nod.executor_id
where nod.executor_id = #{param.id}
and pe.org_code = #{param.orgCode}
and nod.sts = 2
ORDER BY pe.id DESC
</select> </select>
......
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