diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/InitiateEvaluateDao.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/InitiateEvaluateDao.java index 5aa8229..cb04095 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/InitiateEvaluateDao.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/InitiateEvaluateDao.java @@ -72,7 +72,7 @@ public interface InitiateEvaluateDao { int insertInitiateEvaluateLink(@Param("arr") JSONArray jsonArray,@Param("id") String id); - List checkIsExistEvaluate(@Param("arr") JSONArray jsonArray,@Param("evaluateDate") String evaluateDate); + int checkIsExistEvaluate(@Param("orgId") String orgId,@Param("evaluateDate") String evaluateDate); /** * 获取外包商发起评价详情 * @param bean diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/InitiateEvaluateServiceImpl.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/InitiateEvaluateServiceImpl.java index 47055ad..4859992 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/InitiateEvaluateServiceImpl.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/InitiateEvaluateServiceImpl.java @@ -61,10 +61,9 @@ public class InitiateEvaluateServiceImpl implements InitiateEvaluateService { JSONArray jsonArray = JSONArray.parseArray(subInfo); //判断是否已经发起过评价 dao.deleteInitiateLink(o.getId()); - List list = dao.checkIsExistEvaluate(jsonArray, o.getEvaluateDate()); - if (!list.isEmpty()) { - String subNames = list.stream().map(InitiateEvaluateBean::getSubName).collect(Collectors.joining(",")); - ar.setFailMsg(subNames + "已经发起过评价,请勿重复发起"); + int count = dao.checkIsExistEvaluate(o.getOrgId(), o.getEvaluateDate()); + if (count > 0) { + ar.setFailMsg("当前事业部已经发起过评价,请勿重复发起!!!"); return ar; } String json = dao.getTemplationJson(o.getTemplateId()); diff --git a/src/main/resources/mappers/evaluate/EvalSummaryMapper.xml b/src/main/resources/mappers/evaluate/EvalSummaryMapper.xml index fe3c7c4..b3e43bf 100644 --- a/src/main/resources/mappers/evaluate/EvalSummaryMapper.xml +++ b/src/main/resources/mappers/evaluate/EvalSummaryMapper.xml @@ -61,7 +61,7 @@ and per.evaluate_name like concat('%', #{keyWord}, '%' ) - group by per.evaluate_id,status + group by per.evaluate_id having status = #{status} diff --git a/src/main/resources/mappers/evaluate/OutsourcerEvaluateMapper.xml b/src/main/resources/mappers/evaluate/OutsourcerEvaluateMapper.xml index 2a1e61f..8c3c5c0 100644 --- a/src/main/resources/mappers/evaluate/OutsourcerEvaluateMapper.xml +++ b/src/main/resources/mappers/evaluate/OutsourcerEvaluateMapper.xml @@ -11,7 +11,10 @@ delete from pj_evaluate_details_child where evaluate_id = #{evaluateId} and template_id = #{templateId} and - post_id = #{deptId} and person_id = #{userId} + post_id = #{deptId} + + and person_id = #{userId} + insert into pj_evaluate_details_child(details_id,template_id,evaluate_id,post_id,person_id,sub_id, @@ -57,7 +60,8 @@ update pj_evaluate_result set json = #{jsonData},title_list = #{titleFiled},is_project = - #{isProject},check_one = '0',check_person_one = '0',reject_one = '',check_two = '0',check_person_two = '0',reject_two = '' + #{isProject},check_one = '0',check_person_one = '0',reject_one = '',check_two = '0',check_person_two = + '0',reject_two = '',person_id = #{userId} where id = #{id} diff --git a/src/main/resources/mappers/initiateEvaluate/InitiateEvaluateMapper.xml b/src/main/resources/mappers/initiateEvaluate/InitiateEvaluateMapper.xml index eaa2442..627f270 100644 --- a/src/main/resources/mappers/initiateEvaluate/InitiateEvaluateMapper.xml +++ b/src/main/resources/mappers/initiateEvaluate/InitiateEvaluateMapper.xml @@ -131,15 +131,12 @@ " + var t = "   "; r.append(t); @@ -22,7 +22,7 @@ function initRoles() { function getCheckedRoleIds() { var ids = []; - $("#roles input[type='checkbox']").each(function() { + $("#roles input[type='radio']").each(function() { if ($(this).prop("checked")) { ids.push($(this).val()); } @@ -38,7 +38,7 @@ function initRoleDatas(userId) { success : function(data) { var length = data.length; for (var i = 0; i < length; i++) { - $("input[type='checkbox']").each(function() { + $("input[type='radio']").each(function() { var v = $(this).val(); if (v == data[i]['id']) { $(this).attr("checked", true); diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index 5390f87..cbfc126 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -232,6 +232,12 @@ filed.push(key); } } + if(getUrlParam("type") == '2'){ + //对tableData进行处理 appraiser = 当前人 + for (let i = 0; i < tableData.length; i++) { + tableData[i].appraiser = JSON.parse(localStorage.getItem('loginUser')).nickname; + } + } //TODO 校验数据 let data = { templateId: getUrlParam('templateId'), diff --git a/src/main/resources/static/pages/evaluate/summaryAudit/summaryAudit.html b/src/main/resources/static/pages/evaluate/summaryAudit/summaryAudit.html index 66d24c5..d63096b 100644 --- a/src/main/resources/static/pages/evaluate/summaryAudit/summaryAudit.html +++ b/src/main/resources/static/pages/evaluate/summaryAudit/summaryAudit.html @@ -44,8 +44,8 @@
diff --git a/src/main/resources/static/pages/user/updateUser.html b/src/main/resources/static/pages/user/updateUser.html index df10cdc..964c334 100644 --- a/src/main/resources/static/pages/user/updateUser.html +++ b/src/main/resources/static/pages/user/updateUser.html @@ -96,14 +96,14 @@ elem: '#birthday' }); }); - + showDictSelect("sex", "sex"); showDictSelect("status", "userStatus"); - + initRoles(); - + initData(); - + function initData(){ var id = getUrlParam("id"); if(id != ""){