人员修改角色单选、评价修改、汇总修改
This commit is contained in:
parent
7db5ac80c8
commit
63cc944674
|
|
@ -72,7 +72,7 @@ public interface InitiateEvaluateDao {
|
||||||
|
|
||||||
int insertInitiateEvaluateLink(@Param("arr") JSONArray jsonArray,@Param("id") String id);
|
int insertInitiateEvaluateLink(@Param("arr") JSONArray jsonArray,@Param("id") String id);
|
||||||
|
|
||||||
List<InitiateEvaluateBean> checkIsExistEvaluate(@Param("arr") JSONArray jsonArray,@Param("evaluateDate") String evaluateDate);
|
int checkIsExistEvaluate(@Param("orgId") String orgId,@Param("evaluateDate") String evaluateDate);
|
||||||
/**
|
/**
|
||||||
* 获取外包商发起评价详情
|
* 获取外包商发起评价详情
|
||||||
* @param bean
|
* @param bean
|
||||||
|
|
|
||||||
|
|
@ -61,10 +61,9 @@ public class InitiateEvaluateServiceImpl implements InitiateEvaluateService {
|
||||||
JSONArray jsonArray = JSONArray.parseArray(subInfo);
|
JSONArray jsonArray = JSONArray.parseArray(subInfo);
|
||||||
//判断是否已经发起过评价
|
//判断是否已经发起过评价
|
||||||
dao.deleteInitiateLink(o.getId());
|
dao.deleteInitiateLink(o.getId());
|
||||||
List<InitiateEvaluateBean> list = dao.checkIsExistEvaluate(jsonArray, o.getEvaluateDate());
|
int count = dao.checkIsExistEvaluate(o.getOrgId(), o.getEvaluateDate());
|
||||||
if (!list.isEmpty()) {
|
if (count > 0) {
|
||||||
String subNames = list.stream().map(InitiateEvaluateBean::getSubName).collect(Collectors.joining(","));
|
ar.setFailMsg("当前事业部已经发起过评价,请勿重复发起!!!");
|
||||||
ar.setFailMsg(subNames + "已经发起过评价,请勿重复发起");
|
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
String json = dao.getTemplationJson(o.getTemplateId());
|
String json = dao.getTemplationJson(o.getTemplateId());
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and per.evaluate_name like concat('%', #{keyWord}, '%' )
|
and per.evaluate_name like concat('%', #{keyWord}, '%' )
|
||||||
</if>
|
</if>
|
||||||
group by per.evaluate_id,status
|
group by per.evaluate_id
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
having status = #{status}
|
having status = #{status}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,10 @@
|
||||||
</update>
|
</update>
|
||||||
<delete id="deleteEvaluateData">
|
<delete id="deleteEvaluateData">
|
||||||
delete from pj_evaluate_details_child where evaluate_id = #{evaluateId} and template_id = #{templateId} and
|
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}
|
||||||
|
<if test="deptId == 0 or deptId == '0'">
|
||||||
|
and person_id = #{userId}
|
||||||
|
</if>
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="saveEvaluateData">
|
<insert id="saveEvaluateData">
|
||||||
insert into pj_evaluate_details_child(details_id,template_id,evaluate_id,post_id,person_id,sub_id,
|
insert into pj_evaluate_details_child(details_id,template_id,evaluate_id,post_id,person_id,sub_id,
|
||||||
|
|
@ -57,7 +60,8 @@
|
||||||
|
|
||||||
<update id="updateEvaluateChildData">
|
<update id="updateEvaluateChildData">
|
||||||
update pj_evaluate_result set json = #{jsonData},title_list = #{titleFiled},is_project =
|
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}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,15 +131,12 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
<select id="checkIsExistEvaluate"
|
<select id="checkIsExistEvaluate"
|
||||||
resultType="com.bonus.gs.sub.evaluate.evaluate.beans.InitiateEvaluateBean">
|
resultType="java.lang.Integer">
|
||||||
select
|
select
|
||||||
sub_name as subName
|
count(1) as count
|
||||||
from pj_evaluate_sub
|
from pj_evaluate_record per
|
||||||
where sub_id in
|
where per.dept_id = #{orgId}
|
||||||
<foreach collection="arr" item="item" open="(" separator="," close=")">
|
and per.year_and_month = #{evaluateDate}
|
||||||
#{item.id}
|
|
||||||
</foreach>
|
|
||||||
and DATE_FORMAT(create_time,'%Y-%m') = #{evaluateDate}
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getInitiateEvaluateDetails"
|
<select id="getInitiateEvaluateDetails"
|
||||||
resultType="com.bonus.gs.sub.evaluate.evaluate.beans.InitiateEvaluateBean">
|
resultType="com.bonus.gs.sub.evaluate.evaluate.beans.InitiateEvaluateBean">
|
||||||
|
|
|
||||||
|
|
@ -65,9 +65,6 @@
|
||||||
<if test="phone != null">
|
<if test="phone != null">
|
||||||
phone = #{phone},
|
phone = #{phone},
|
||||||
</if>
|
</if>
|
||||||
<if test="telephone != null">
|
|
||||||
telephone = #{telephone},
|
|
||||||
</if>
|
|
||||||
<if test="email != null">
|
<if test="email != null">
|
||||||
email = #{email},
|
email = #{email},
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ function initRoles() {
|
||||||
var id = d['id'];
|
var id = d['id'];
|
||||||
var name = d['name'];
|
var name = d['name'];
|
||||||
|
|
||||||
var t = "<label><input type='checkbox' value='" + id + "'>"
|
var t = "<label><input type='radio' name='roleId' value='" + id + "'>  "
|
||||||
+ name + "</label>   ";
|
+ name + "</label>   ";
|
||||||
|
|
||||||
r.append(t);
|
r.append(t);
|
||||||
|
|
@ -22,7 +22,7 @@ function initRoles() {
|
||||||
|
|
||||||
function getCheckedRoleIds() {
|
function getCheckedRoleIds() {
|
||||||
var ids = [];
|
var ids = [];
|
||||||
$("#roles input[type='checkbox']").each(function() {
|
$("#roles input[type='radio']").each(function() {
|
||||||
if ($(this).prop("checked")) {
|
if ($(this).prop("checked")) {
|
||||||
ids.push($(this).val());
|
ids.push($(this).val());
|
||||||
}
|
}
|
||||||
|
|
@ -38,7 +38,7 @@ function initRoleDatas(userId) {
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
var length = data.length;
|
var length = data.length;
|
||||||
for (var i = 0; i < length; i++) {
|
for (var i = 0; i < length; i++) {
|
||||||
$("input[type='checkbox']").each(function() {
|
$("input[type='radio']").each(function() {
|
||||||
var v = $(this).val();
|
var v = $(this).val();
|
||||||
if (v == data[i]['id']) {
|
if (v == data[i]['id']) {
|
||||||
$(this).attr("checked", true);
|
$(this).attr("checked", true);
|
||||||
|
|
|
||||||
|
|
@ -232,6 +232,12 @@
|
||||||
filed.push(key);
|
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 校验数据
|
//TODO 校验数据
|
||||||
let data = {
|
let data = {
|
||||||
templateId: getUrlParam('templateId'),
|
templateId: getUrlParam('templateId'),
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@
|
||||||
<select class="layui-select" id="status" name="status">
|
<select class="layui-select" id="status" name="status">
|
||||||
<option value="">请选择审核状态</option>
|
<option value="">请选择审核状态</option>
|
||||||
<option value="0">待审核</option>
|
<option value="0">待审核</option>
|
||||||
<option value="1">审核中</option>
|
<option value="2">审核中</option>
|
||||||
<option value="2">已审核</option>
|
<option value="1">已审核</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline" id="timeRange">
|
<div class="layui-inline" id="timeRange">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue