新增专员审核
This commit is contained in:
parent
e65aba9c94
commit
a73cd622d1
|
|
@ -32,6 +32,7 @@ public class EvaluateDataBean {
|
|||
private String subName;
|
||||
private String isApprove;
|
||||
private String isTwoApprove;
|
||||
private String isThreeApprove;
|
||||
private String name;
|
||||
private String evaluateType;
|
||||
private String leaderName;
|
||||
|
|
|
|||
|
|
@ -92,6 +92,25 @@ public class EvalSummaryController extends BaseController<EvaluateBean> {
|
|||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
/**
|
||||
* 专员汇总列表
|
||||
* @param bean 查询条件
|
||||
* @return AjaxRes
|
||||
*/
|
||||
@RequestMapping(path = "dedicatedEvalSummaryList", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public AjaxRes dedicatedEvalSummaryList(EvalSummaryBean bean) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
List<OutSourceBean> list = service.dedicatedEvalSummaryList(bean);
|
||||
ar.setListSucceed(list);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
/**
|
||||
* 线下评价汇总列表
|
||||
* @param bean 查询条件
|
||||
|
|
|
|||
|
|
@ -331,6 +331,12 @@ public class OutsourcerEvaluateController extends BaseController<EvaluateSubBean
|
|||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看第一级是否审核
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("isCheckOneIsAudit")
|
||||
@ResponseBody
|
||||
public AjaxRes isCheckOneIsAudit(EvaluateDataBean o) {
|
||||
|
|
@ -343,6 +349,136 @@ public class OutsourcerEvaluateController extends BaseController<EvaluateSubBean
|
|||
return ar;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看第二级是否审核
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("isCheckTwoIsAudit")
|
||||
@ResponseBody
|
||||
public AjaxRes isCheckTwoIsAudit(EvaluateDataBean o) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
try {
|
||||
ar = outsourcerEvaluateService.isCheckTwoIsAudit(o);
|
||||
} catch (Exception e) {
|
||||
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 专员审核
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("dedicatedAudit")
|
||||
@ResponseBody
|
||||
public synchronized AjaxRes dedicatedAudit(EvaluateDataBean o) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
List<String> stringList = outsourcerEvaluateDao.getExaminePersonByDeptAndRoleName("7","专责");
|
||||
if(StringUtils.isBlank(o.getEvaluateId())){
|
||||
ar.setFailMsg("评价ID不能为空");
|
||||
return ar;
|
||||
}
|
||||
|
||||
if(stringList==null || stringList.size() == 0){
|
||||
ar.setFailMsg("请先配置专责审批人");
|
||||
return ar;
|
||||
}
|
||||
try {
|
||||
o.setUserId(String.valueOf(UserUtil.getLoginUser().getId()));
|
||||
if (StringUtils.isBlank(o.getRejectReason())) {
|
||||
o.setRejectReason("");
|
||||
} else {
|
||||
o.setIsApprove("2");
|
||||
//修改pj_evaluate_details状态
|
||||
outsourcerEvaluateDao.updatepjEvaluateDetailsStatus(o);
|
||||
}
|
||||
int code = outsourcerEvaluateDao.audit(o);
|
||||
if (code > 0) {
|
||||
ar.setSucceedMsg("审核成功");
|
||||
} else {
|
||||
ar.setFailMsg("审核失败");
|
||||
}
|
||||
//查询当前的审核状态
|
||||
int count = outsourcerEvaluateDao.getCurrentIsApprove(o);
|
||||
if (count == 0) {
|
||||
//修改pj_evaluate状态
|
||||
o.setIsApprove("1");
|
||||
outsourcerEvaluateDao.updatepjEvaluateDetailsStatus(o);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ar.setFailMsg("审核失败");
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
@RequestMapping("dedicatedAllAudit")
|
||||
@ResponseBody
|
||||
public synchronized AjaxRes dedicatedAllAudit(EvaluateDataBean o) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
List<String> stringList = outsourcerEvaluateDao.getExaminePersonByDeptAndRoleName("7","专责");
|
||||
if(StringUtils.isBlank(o.getEvaluateId())){
|
||||
ar.setFailMsg("评价ID不能为空");
|
||||
return ar;
|
||||
}
|
||||
|
||||
if(stringList==null || stringList.size() == 0){
|
||||
ar.setFailMsg("请先配置专责审批人");
|
||||
return ar;
|
||||
|
||||
}
|
||||
|
||||
o.setUserId(String.valueOf(UserUtil.getLoginUser().getId()));
|
||||
if (StringUtils.isBlank(o.getRejectReason())) {
|
||||
o.setRejectReason("");
|
||||
} else {
|
||||
o.setIsApprove("2");
|
||||
}
|
||||
//修改pj_evaluate_details状态
|
||||
outsourcerEvaluateDao.updatePjEvaluateDetailsStatusByThreeParams(o);
|
||||
|
||||
int code = outsourcerEvaluateDao.auditByThreeParams(o);
|
||||
if (code > 0) {
|
||||
ar.setSucceedMsg("审核成功");
|
||||
} else {
|
||||
ar.setFailMsg("审核失败");
|
||||
}
|
||||
//修改pj_evaluate状态
|
||||
outsourcerEvaluateDao.updatePjEvaluateDetailsStatusByThreeParams(o);
|
||||
|
||||
int startId = outsourcerEvaluateService.startCollectExamineByEvaluateId(o);
|
||||
String evaluateType = o.getEvaluateType();
|
||||
System.err.println("startId:"+startId+" ,evaluateType="+evaluateType);
|
||||
if(startId == 0 && ("1".equals(evaluateType) || "2".equals(evaluateType))){
|
||||
|
||||
int examineNum = outsourcerEvaluateDao.getExamineNumByEvaluateId(o.getEvaluateId(),"1");
|
||||
if(examineNum == 0){
|
||||
//新增二级审核
|
||||
ExamineBean childBean = new ExamineBean();
|
||||
childBean.setEvaluateId(o.getEvaluateId());
|
||||
//添加汇总审核人id
|
||||
childBean.setUserList(String.valueOf(String.join(",",stringList)));
|
||||
//添加汇总审核人姓名
|
||||
childBean.setPostId("7");
|
||||
childBean.setEvaluateType("0");
|
||||
childBean.setEvaluateNode("1");
|
||||
outsourcerEvaluateDao.addExaminePerson(childBean);
|
||||
}
|
||||
|
||||
} else if (startId == 0 && "3".equals(evaluateType)) {
|
||||
//汇总审核结束 更新状态
|
||||
outsourcerEvaluateDao.updateEvaluateRecordByEvaluateId("2",o.getEvaluateId());
|
||||
}else{
|
||||
//过程中 暂不做处理
|
||||
|
||||
}
|
||||
|
||||
|
||||
return ar;
|
||||
}
|
||||
|
||||
@RequestMapping("updateJsonData")
|
||||
@ResponseBody
|
||||
public AjaxRes updateJsonData(EvaluateDataBean o) {
|
||||
|
|
|
|||
|
|
@ -33,4 +33,6 @@ public interface EvalSummaryDao {
|
|||
List<OutSourceBean> getOfflineSummaryList(EvalSummaryBean bean);
|
||||
|
||||
int deleteOffEvaluateById(String id);
|
||||
|
||||
List<OutSourceBean> dedicatedEvalSummaryList(EvalSummaryBean bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,4 +139,6 @@ public interface OutsourcerEvaluateDao {
|
|||
List<EvaluateDataBean> getEvaluateSubInfo(EvaluateDataBean o);
|
||||
|
||||
int addMonthRank(@Param("bean") EvaluateDataBean bean,@Param("list") List<EvaluateDataBean> list);
|
||||
|
||||
int isCheckTwoIsAudit(EvaluateDataBean o);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,4 +33,6 @@ public interface EvalSummaryService {
|
|||
List<OutSourceBean> getOfflineSummaryList(EvalSummaryBean bean);
|
||||
|
||||
int deleteOffEvaluateById(String id);
|
||||
|
||||
List<OutSourceBean> dedicatedEvalSummaryList(EvalSummaryBean bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,4 +60,9 @@ public class EvalSummaryServiceImpl implements EvalSummaryService {
|
|||
public int deleteOffEvaluateById(String id) {
|
||||
return dao.deleteOffEvaluateById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OutSourceBean> dedicatedEvalSummaryList(EvalSummaryBean bean) {
|
||||
return dao.dedicatedEvalSummaryList(bean);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,4 +71,6 @@ public interface OutsourcerEvaluateService {
|
|||
AjaxRes getSummaryCompareList(EvaluateSubBean o);
|
||||
|
||||
AjaxRes isCheckOneIsAudit(EvaluateDataBean o);
|
||||
|
||||
AjaxRes isCheckTwoIsAudit(EvaluateDataBean o);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -864,6 +864,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
map.put("id", bean.getId());
|
||||
map.put("isApprove", bean.getIsApprove());
|
||||
map.put("isTwoApprove", bean.getIsTwoApprove());
|
||||
map.put("isThreeApprove", bean.getIsThreeApprove());
|
||||
map.put("detailsId", bean.getParentId());
|
||||
childList.add(map);
|
||||
}
|
||||
|
|
@ -1244,4 +1245,16 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxRes isCheckTwoIsAudit(EvaluateDataBean o) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
int count = outsourcerEvaluateDao.isCheckTwoIsAudit(o);
|
||||
if (count > 0) {
|
||||
ar.setSucceed("1");
|
||||
} else {
|
||||
ar.setFailMsg("0");
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
left join pj_evaluate_details ped on ped.evaluate_id = per.evaluate_id
|
||||
left join (
|
||||
select
|
||||
count(if(check_two > 0,1,null)) as num,
|
||||
count(if(check_three > 0,1,null)) as num,
|
||||
count(1) as total,
|
||||
evaluate_id
|
||||
from pj_evaluate_details
|
||||
|
|
@ -47,9 +47,9 @@
|
|||
) m on m.evaluate_id = per.evaluate_id
|
||||
left join(
|
||||
SELECT
|
||||
count(IF(check_two is null or check_two = 0 or check_two = '',1,null)) as num,
|
||||
GROUP_CONCAT(DISTINCT IF(reject_two is null or reject_two = '',null,reject_two)) as rejectReason,
|
||||
count(if(check_two = 2,1,null)) as failNum,
|
||||
count(IF(check_three is null or check_three = 0 or check_three = '',1,null)) as num,
|
||||
GROUP_CONCAT(DISTINCT IF(reject_three is null or reject_three = '',null,reject_three)) as rejectReason,
|
||||
count(if(check_three = 2,1,null)) as failNum,
|
||||
evaluate_id
|
||||
from pj_evaluate_result
|
||||
GROUP BY evaluate_id
|
||||
|
|
@ -94,4 +94,69 @@
|
|||
</if>
|
||||
|
||||
</select>
|
||||
<select id="dedicatedEvalSummaryList" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OutSourceBean">
|
||||
select
|
||||
per.evaluate_id as id,
|
||||
ped.details_id as detailsId,
|
||||
per.template_id as templateId,
|
||||
poi.name as evaluateDept,
|
||||
per.evaluate_name as evaluateTitle,
|
||||
per.year_and_month as evaluateMonth,
|
||||
per.create_time as createTime,
|
||||
r.proNum as projectNum,
|
||||
r.subNum as outsourcerNum,
|
||||
ifnull(GROUP_CONCAT(ped.post_id),'') as deptId,
|
||||
check_one as isApprove,
|
||||
IF(rr.num > 0,1,if(rr.num = 0 and rr.failNum = 0,0,2)) as isAudit,
|
||||
if(m.num = m.total,1,if(m.num > 0,2,0)) as status,
|
||||
rr.rejectReason as rejectReason
|
||||
from pj_evaluate_record per
|
||||
left join (
|
||||
select
|
||||
evaluate_id,
|
||||
count(distinct sub_id) as subNum,
|
||||
count(distinct pro_id) as proNum
|
||||
from pj_evaluate_sub pes where pes.is_active = 1
|
||||
group by evaluate_id
|
||||
)r on per.evaluate_id = r.evaluate_id
|
||||
left join pj_template_config pt on pt.config_id = per.template_id and pt.is_active = 1
|
||||
left join pm_org_info poi on per.dept_id = poi.id and poi.status = 1
|
||||
left join pj_evaluate_details ped on ped.evaluate_id = per.evaluate_id
|
||||
left join (
|
||||
select
|
||||
count(if(check_two > 0,1,null)) as num,
|
||||
count(1) as total,
|
||||
evaluate_id
|
||||
from pj_evaluate_details
|
||||
group by evaluate_id
|
||||
) m on m.evaluate_id = per.evaluate_id
|
||||
left join(
|
||||
SELECT
|
||||
count(IF(check_two is null or check_two = 0 or check_two = '',1,null)) as num,
|
||||
GROUP_CONCAT(DISTINCT IF(reject_two is null or reject_two = '',null,reject_two)) as rejectReason,
|
||||
count(if(check_two = 2,1,null)) as failNum,
|
||||
evaluate_id
|
||||
from pj_evaluate_result
|
||||
GROUP BY evaluate_id
|
||||
)rr on rr.evaluate_id = per.evaluate_id
|
||||
where per.is_active = 1
|
||||
<if test="evaluateDeptId != null and evaluateDeptId != ''">
|
||||
and per.dept_id = #{evaluateDeptId}
|
||||
</if>
|
||||
<if test="searchDate != null and searchDate != ''">
|
||||
and per.year_and_month = #{searchDate}
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and per.evaluate_name like concat('%', #{keyWord}, '%' )
|
||||
</if>
|
||||
group by per.evaluate_id
|
||||
<if test="status != null and status != ''">
|
||||
having status = #{status}
|
||||
</if>
|
||||
<if test="type == 'view'">
|
||||
having status = 1
|
||||
</if>
|
||||
|
||||
order by MAX(per.create_time) desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -41,6 +41,11 @@
|
|||
check_one = #{type}
|
||||
where id = #{id}
|
||||
</if>
|
||||
<if test="evaluateType == 3 ">
|
||||
update pj_evaluate_result set check_three = #{type},reject_three = #{rejectReason},check_person_three = #{userId},
|
||||
check_one = #{type},check_two = #{type}
|
||||
where id = #{id}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<update id="auditByThreeParams" >
|
||||
|
|
@ -54,7 +59,11 @@
|
|||
check_one = #{type}
|
||||
where evaluate_id = #{evaluateId} and sub_evaluate_id = #{templateId} and dept_id = #{deptId}
|
||||
</if>
|
||||
|
||||
<if test="evaluateType == 3 ">
|
||||
update pj_evaluate_result set check_three = #{type},reject_three = #{rejectReason},check_person_three = #{userId},
|
||||
check_two = #{type},check_one = #{type}
|
||||
where evaluate_id = #{evaluateId} and sub_evaluate_id = #{templateId} and dept_id = #{deptId}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
|
|
@ -70,9 +79,12 @@
|
|||
update pj_evaluate_details set check_one = #{isApprove} where details_id = #{detailsId}
|
||||
</if>
|
||||
|
||||
<if test=" evaluateType == 2 or evaluateType == 3 ">
|
||||
<if test=" evaluateType == 2 ">
|
||||
update pj_evaluate_details set check_two = #{isApprove},check_one = #{isApprove} where details_id = #{detailsId}
|
||||
</if>
|
||||
<if test=" evaluateType == 3 ">
|
||||
update pj_evaluate_details set check_three = #{isApprove}, check_two = #{isApprove},check_one = #{isApprove} where details_id = #{detailsId}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<update id="updatePjEvaluateDetailsStatusByThreeParams">
|
||||
|
|
@ -83,6 +95,9 @@
|
|||
<if test=" evaluateType == 2 ">
|
||||
update pj_evaluate_details set check_two = #{isApprove},check_one = #{isApprove} where evaluate_id = #{evaluateId} and post_id = #{deptId} and sub_evaluate_id = #{templateId}
|
||||
</if>
|
||||
<if test=" evaluateType == 3 ">
|
||||
update pj_evaluate_details set check_three = #{isApprove},check_two = #{isApprove},check_one = #{isApprove} where evaluate_id = #{evaluateId} and post_id = #{deptId} and sub_evaluate_id = #{templateId}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<update id="updateJsonData">
|
||||
|
|
@ -537,7 +552,8 @@
|
|||
su.username as userName,
|
||||
per.person_id as userId,
|
||||
ifnull(per.check_one,'0') as isApprove,
|
||||
ifnull(per.check_two,'0') as isTwoApprove
|
||||
ifnull(per.check_two,'0') as isTwoApprove,
|
||||
ifnull(per.check_three,'0') as isThreeApprove
|
||||
from pj_evaluate_result per
|
||||
left join sys_user su on per.person_id = su.id
|
||||
where
|
||||
|
|
@ -561,10 +577,12 @@
|
|||
<if test="evaluateType == 1 ">
|
||||
and check_one != '1'
|
||||
</if>
|
||||
|
||||
<if test="evaluateType == 2 ">
|
||||
and check_two != '1'
|
||||
</if>
|
||||
<if test="evaluateType == 3 ">
|
||||
and check_three != '1'
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="getIsBusinessDivision" resultType="java.lang.String">
|
||||
|
|
@ -689,7 +707,9 @@
|
|||
<if test="evaluateType == 2 ">
|
||||
and check_two ='0'
|
||||
</if>
|
||||
|
||||
<if test="evaluateType == 3 ">
|
||||
and check_three ='0'
|
||||
</if>
|
||||
</select>
|
||||
<select id="getCurrentTwoIsApprove" resultType="java.lang.Integer">
|
||||
select
|
||||
|
|
@ -768,6 +788,11 @@
|
|||
group by
|
||||
pes.sub_id
|
||||
</select>
|
||||
<select id="isCheckTwoIsAudit" resultType="java.lang.Integer">
|
||||
|
||||
select count(1) from pj_evaluate_details where evaluate_id = #{evaluateId} and post_id = #{deptId} and
|
||||
check_two = '1' and sub_evaluate_id = #{templateId}
|
||||
</select>
|
||||
|
||||
<update id="updateEvaluateRecordByEvaluateId">
|
||||
update pj_evaluate_record set task_status = #{taskStatus} where evaluate_id = #{evaluateId}
|
||||
|
|
|
|||
Loading…
Reference in New Issue