人员修改角色单选、评价修改、汇总修改

This commit is contained in:
tqzhang 2025-01-21 14:50:36 +08:00
parent 7db5ac80c8
commit 63cc944674
10 changed files with 31 additions and 28 deletions

View File

@ -72,7 +72,7 @@ public interface InitiateEvaluateDao {
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

View File

@ -61,10 +61,9 @@ public class InitiateEvaluateServiceImpl implements InitiateEvaluateService {
JSONArray jsonArray = JSONArray.parseArray(subInfo);
//判断是否已经发起过评价
dao.deleteInitiateLink(o.getId());
List<InitiateEvaluateBean> 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());

View File

@ -61,7 +61,7 @@
<if test="keyWord != null and keyWord != ''">
and per.evaluate_name like concat('%', #{keyWord}, '%' )
</if>
group by per.evaluate_id,status
group by per.evaluate_id
<if test="status != null and status != ''">
having status = #{status}
</if>

View File

@ -11,7 +11,10 @@
</update>
<delete id="deleteEvaluateData">
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>
<insert id="saveEvaluateData">
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 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}
</update>

View File

@ -131,15 +131,12 @@
</foreach>
</select>
<select id="checkIsExistEvaluate"
resultType="com.bonus.gs.sub.evaluate.evaluate.beans.InitiateEvaluateBean">
resultType="java.lang.Integer">
select
sub_name as subName
from pj_evaluate_sub
where sub_id in
<foreach collection="arr" item="item" open="(" separator="," close=")">
#{item.id}
</foreach>
and DATE_FORMAT(create_time,'%Y-%m') = #{evaluateDate}
count(1) as count
from pj_evaluate_record per
where per.dept_id = #{orgId}
and per.year_and_month = #{evaluateDate}
</select>
<select id="getInitiateEvaluateDetails"
resultType="com.bonus.gs.sub.evaluate.evaluate.beans.InitiateEvaluateBean">

View File

@ -65,9 +65,6 @@
<if test="phone != null">
phone = #{phone},
</if>
<if test="telephone != null">
telephone = #{telephone},
</if>
<if test="email != null">
email = #{email},
</if>

View File

@ -11,7 +11,7 @@ function initRoles() {
var id = d['id'];
var name = d['name'];
var t = "<label><input type='checkbox' value='" + id + "'>"
var t = "<label><input type='radio' name='roleId' value='" + id + "'> &nbsp"
+ name + "</label> &nbsp&nbsp";
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);

View File

@ -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'),

View File

@ -44,8 +44,8 @@
<select class="layui-select" id="status" name="status">
<option value="">请选择审核状态</option>
<option value="0">待审核</option>
<option value="1">审核中</option>
<option value="2">已审核</option>
<option value="2">审核中</option>
<option value="1">已审核</option>
</select>
</div>
<div class="layui-inline" id="timeRange">