bug修复
This commit is contained in:
parent
50492b9fe2
commit
40a0ca3db8
|
|
@ -38,5 +38,6 @@ public class TeamGroupBean {
|
||||||
private String faceUrl;
|
private String faceUrl;
|
||||||
private String isTeamLeader;
|
private String isTeamLeader;
|
||||||
private Integer teamId;
|
private Integer teamId;
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,19 @@ public class TeamGroupController extends BaseController<TeamGroupBean> {
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("updaTeteamGroup")
|
||||||
|
public AjaxRes updaTeteamGroup(@RequestBody TeamGroupBean teamGroupBean) {
|
||||||
|
AjaxRes ar = new AjaxRes();
|
||||||
|
try {
|
||||||
|
teamGroupService.updaTeteamGroup(teamGroupBean);
|
||||||
|
ar.setSucceedMsg("修改成功");
|
||||||
|
return ar;
|
||||||
|
} catch (Exception e) {
|
||||||
|
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||||
|
}
|
||||||
|
return ar;
|
||||||
|
}
|
||||||
|
|
||||||
// 获取班组人员
|
// 获取班组人员
|
||||||
@GetMapping("getTeamGroupPerson")
|
@GetMapping("getTeamGroupPerson")
|
||||||
public AjaxRes getTeamGroupPerson(TeamGroupBean teamGroupBean) {
|
public AjaxRes getTeamGroupPerson(TeamGroupBean teamGroupBean) {
|
||||||
|
|
@ -213,7 +226,7 @@ public class TeamGroupController extends BaseController<TeamGroupBean> {
|
||||||
@RequestMapping(value = "importTeamPerson", method = RequestMethod.POST)
|
@RequestMapping(value = "importTeamPerson", method = RequestMethod.POST)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxRes importTeamPerson(@RequestParam String id, @RequestParam("file") MultipartFile file) {
|
public AjaxRes importTeamPerson(@RequestParam String id, @RequestParam("file") MultipartFile file) {
|
||||||
return teamGroupService.importTeamPerson(id,file);
|
return teamGroupService.importTeamPerson(id, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ public class OrganizationalServiceImpl implements OrganizationalService {
|
||||||
} else if (bean.getLevel() == 3) {
|
} else if (bean.getLevel() == 3) {
|
||||||
int count = projectDao.getProIsExistByDepartmentId(bean);
|
int count = projectDao.getProIsExistByDepartmentId(bean);
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
ar.setFailMsg("该项目在该事业部下已存在");
|
ar.setFailMsg("该项目在此事业部下已存在");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -479,7 +479,9 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
||||||
BeanUtils.copyProperties(o, childBean);
|
BeanUtils.copyProperties(o, childBean);
|
||||||
childBean.setJsonData(list.get(i).toString());
|
childBean.setJsonData(list.get(i).toString());
|
||||||
childBean.setDeptId(deptId);
|
childBean.setDeptId(deptId);
|
||||||
childBean.setUserId(userId);
|
if (!checkMapValuesAllEmpty(list.get(i))){
|
||||||
|
childBean.setUserId(userId);
|
||||||
|
}
|
||||||
childBean.setParentId(o.getId());
|
childBean.setParentId(o.getId());
|
||||||
childBean.setProId(list.get(i).get("proId").toString());
|
childBean.setProId(list.get(i).get("proId").toString());
|
||||||
childBean.setProName(list.get(i).get("proName").toString());
|
childBean.setProName(list.get(i).get("proName").toString());
|
||||||
|
|
@ -499,7 +501,9 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
||||||
detailsBean.setEvaluateId(o.getEvaluateId());
|
detailsBean.setEvaluateId(o.getEvaluateId());
|
||||||
detailsBean.setTemplateId(o.getTemplateId());
|
detailsBean.setTemplateId(o.getTemplateId());
|
||||||
detailsBean.setDeptId(deptId);
|
detailsBean.setDeptId(deptId);
|
||||||
detailsBean.setUserId(userId);
|
if (!checkMapValuesAllEmpty(map)){
|
||||||
|
detailsBean.setUserId(userId);
|
||||||
|
}
|
||||||
detailsBean.setParentId(o.getId());
|
detailsBean.setParentId(o.getId());
|
||||||
detailsBean.setProId(map.get("proId").toString());
|
detailsBean.setProId(map.get("proId").toString());
|
||||||
detailsBean.setProName(map.get("proName").toString());
|
detailsBean.setProName(map.get("proName").toString());
|
||||||
|
|
@ -526,6 +530,33 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean checkMapValuesAllEmpty(Map<String, Object> map) {
|
||||||
|
if (map == null || map.isEmpty()) {
|
||||||
|
return true; // 空map认为所有值都是空
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Object value : map.values()) {
|
||||||
|
if (value == null) {
|
||||||
|
continue; // null 是空值,继续检查下一个
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value instanceof String) {
|
||||||
|
String strVal = (String) value;
|
||||||
|
if (!strVal.trim().isEmpty()) {
|
||||||
|
return false; // 发现非空字符串,立即返回 false
|
||||||
|
}
|
||||||
|
} else if (value instanceof Boolean) {
|
||||||
|
return false; // boolean 类型(true/false),不为空
|
||||||
|
} else if (value instanceof Number) {
|
||||||
|
return false; // 数字类型(0 也是有效值)
|
||||||
|
} else {
|
||||||
|
// 其他对象只要不为null就认为是非空
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true; // 所有值都为空
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public AjaxRes getAuditBtn(EvaluateDataBean o) {
|
public AjaxRes getAuditBtn(EvaluateDataBean o) {
|
||||||
AjaxRes ar = new AjaxRes();
|
AjaxRes ar = new AjaxRes();
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@
|
||||||
org_type orgType
|
org_type orgType
|
||||||
FROM pm_org_info
|
FROM pm_org_info
|
||||||
WHERE status = 1
|
WHERE status = 1
|
||||||
AND level in (1, 2)
|
-- AND level in (1, 2)
|
||||||
</select>
|
</select>
|
||||||
<select id="getDataDetails" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
|
<select id="getDataDetails" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
|
||||||
select id,
|
select id,
|
||||||
|
|
@ -294,6 +294,7 @@
|
||||||
poi.STATUS = 1
|
poi.STATUS = 1
|
||||||
AND poi.LEVEL = 4
|
AND poi.LEVEL = 4
|
||||||
AND poi.lk_id = #{id}
|
AND poi.lk_id = #{id}
|
||||||
|
AND poi2.id IS NOT NULL
|
||||||
</select>
|
</select>
|
||||||
<select id="getTeamGroupType" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
|
<select id="getTeamGroupType" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
|
||||||
select id,
|
select id,
|
||||||
|
|
|
||||||
|
|
@ -832,7 +832,7 @@
|
||||||
from
|
from
|
||||||
pj_evaluate_details_child
|
pj_evaluate_details_child
|
||||||
where
|
where
|
||||||
evaluate_id = #{evaluateId} and post_id = #{deptId} and details_id = #{detailsId} and (score is null or score = '')
|
evaluate_id = #{evaluateId} and post_id = #{deptId} and details_id = #{detailsId} and score is null
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateEvaluateRecordByEvaluateId">
|
<update id="updateEvaluateRecordByEvaluateId">
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@
|
||||||
SELECT
|
SELECT
|
||||||
poi2.NAME subContractor,
|
poi2.NAME subContractor,
|
||||||
poi3.NAME project,
|
poi3.NAME project,
|
||||||
|
poi3.user_id as userId,
|
||||||
poi.NAME teamGroupName,
|
poi.NAME teamGroupName,
|
||||||
poi.id as id,
|
poi.id as id,
|
||||||
poi.status as status,
|
poi.status as status,
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,10 @@ function initTreeTable() {
|
||||||
let html = "";
|
let html = "";
|
||||||
html +=
|
html +=
|
||||||
'<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px" id="edit">修改</a>';
|
'<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px" id="edit">修改</a>';
|
||||||
html +=
|
if (d.roleName !== "项目经理"){
|
||||||
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size: 15px;margin-left: 10px" id="del">删除</a>';
|
html +=
|
||||||
|
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size: 15px;margin-left: 10px" id="del">删除</a>';
|
||||||
|
}
|
||||||
return html;
|
return html;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
// 专责审批 js文件
|
// 专责审批 js文件
|
||||||
let layer, laydate, table, form;
|
let layer, laydate, table, form, loginUser;
|
||||||
$(function () {
|
$(function () {
|
||||||
layui.use(["layer", "laydate", "table", "form"], function () {
|
layui.use(["layer", "laydate", "table", "form"], function () {
|
||||||
layer = layui.layer;
|
layer = layui.layer;
|
||||||
laydate = layui.laydate;
|
laydate = layui.laydate;
|
||||||
form = layui.form;
|
form = layui.form;
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
|
loginUser = JSON.parse(localStorage.getItem("loginUser"));
|
||||||
laydate.render({
|
laydate.render({
|
||||||
elem: "#startDate",
|
elem: "#startDate",
|
||||||
type: "month",
|
type: "month",
|
||||||
|
|
@ -135,7 +136,7 @@ function initTable() {
|
||||||
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size:' +
|
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size:' +
|
||||||
' 15px;margin-left: 10px"' +
|
' 15px;margin-left: 10px"' +
|
||||||
' id="del">删除</a>';
|
' id="del">删除</a>';
|
||||||
if (d.status == 1) {
|
if (d.status == 1 && loginUser.id === d.userId) {
|
||||||
text +=
|
text +=
|
||||||
'<a lay-event="exit" style="color: #009688;cursor: pointer;font-size:' +
|
'<a lay-event="exit" style="color: #009688;cursor: pointer;font-size:' +
|
||||||
' 15px;margin-left: 10px"' +
|
' 15px;margin-left: 10px"' +
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue