bug修复
This commit is contained in:
parent
a8edbfab2f
commit
f7f2cb962c
|
|
@ -19,5 +19,7 @@ public class ProjectBean {
|
||||||
private Integer subcontractorNum;
|
private Integer subcontractorNum;
|
||||||
private Integer evaluateDeptId;
|
private Integer evaluateDeptId;
|
||||||
private Integer personInChargeId;
|
private Integer personInChargeId;
|
||||||
|
// 所属事业部Id
|
||||||
|
private Integer departmentId;
|
||||||
private String keyWord;
|
private String keyWord;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,9 @@ public class ProjectController {
|
||||||
AjaxRes ar = new AjaxRes();
|
AjaxRes ar = new AjaxRes();
|
||||||
try {
|
try {
|
||||||
Integer i = service.updateName(projectBean);
|
Integer i = service.updateName(projectBean);
|
||||||
if (i > 0) {
|
if (i == 100) {
|
||||||
|
ar.setFailMsg("该事业部下班组名称已重复");
|
||||||
|
} else if (i > 0) {
|
||||||
ar.setSucceedMsg("修改成功");
|
ar.setSucceedMsg("修改成功");
|
||||||
} else {
|
} else {
|
||||||
ar.setFailMsg("修改失败");
|
ar.setFailMsg("修改失败");
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,6 @@ public interface ProjectDao {
|
||||||
Integer delProjectSubcontractor(ViolationBean bean);
|
Integer delProjectSubcontractor(ViolationBean bean);
|
||||||
|
|
||||||
List<OrganizationalBean> getNoBindSubcontractorSelect(ViolationBean bean);
|
List<OrganizationalBean> getNoBindSubcontractorSelect(ViolationBean bean);
|
||||||
|
|
||||||
|
int getProjectByName(ProjectBean projectBean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,12 @@ public class ProjectServiceImpl implements ProjectService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer updateName(ProjectBean projectBean) {
|
public Integer updateName(ProjectBean projectBean) {
|
||||||
|
if (projectDao.getProjectByName(projectBean) > 0) {
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
return projectDao.updateName(projectBean);
|
return projectDao.updateName(projectBean);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -169,7 +169,8 @@
|
||||||
status,
|
status,
|
||||||
org_type orgType
|
org_type orgType
|
||||||
FROM pm_org_info
|
FROM pm_org_info
|
||||||
WHERE status = 1 and level in (1, 2)
|
WHERE status = 1
|
||||||
|
-- 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,
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@
|
||||||
SELECT
|
SELECT
|
||||||
poi1.id,
|
poi1.id,
|
||||||
poi1.name as projectName,
|
poi1.name as projectName,
|
||||||
|
poi2.id as departmentId,
|
||||||
poi2.name as department,
|
poi2.name as department,
|
||||||
poi1.user_name as projectManager
|
poi1.user_name as projectManager
|
||||||
FROM
|
FROM
|
||||||
|
|
@ -106,4 +107,15 @@
|
||||||
pa.is_active = '1'
|
pa.is_active = '1'
|
||||||
AND NOT EXISTS ( SELECT 1 FROM pm_org_info poi WHERE poi.lk_id = pa.id AND poi.parent_id = #{id} )
|
AND NOT EXISTS ( SELECT 1 FROM pm_org_info poi WHERE poi.lk_id = pa.id AND poi.parent_id = #{id} )
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getProjectByName" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count(*)
|
||||||
|
FROM
|
||||||
|
pm_org_info poi
|
||||||
|
left join pm_org_info poi2 on poi2.id = poi.parent_id
|
||||||
|
WHERE
|
||||||
|
poi.name = #{projectName} and poi2.id = #{departmentId}
|
||||||
|
AND poi.level = 3
|
||||||
|
AND poi.status = 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ function updateName(data,id) {
|
||||||
let url = `${ctxPath}` + "/project/updateName";
|
let url = `${ctxPath}` + "/project/updateName";
|
||||||
let item = {
|
let item = {
|
||||||
id: id,
|
id: id,
|
||||||
|
departmentId: objParam.departmentId,
|
||||||
projectName: data.field.projectName,
|
projectName: data.field.projectName,
|
||||||
};
|
};
|
||||||
// console.log(JSON.stringify(data)+"data")
|
// console.log(JSON.stringify(data)+"data")
|
||||||
|
|
|
||||||
|
|
@ -122,13 +122,12 @@ function submitApply(data) {
|
||||||
|
|
||||||
// 关闭页面
|
// 关闭页面
|
||||||
function closePage(type) {
|
function closePage(type) {
|
||||||
let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引
|
// 获取当前 iframe 层的索引
|
||||||
|
let index = parent.layer.getFrameIndex(window.name);
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
if (objParam.operType === 'back') {
|
// 调用父页面的方法(例如刷新列表)
|
||||||
window.parent.reloadTreeTable();
|
window.parent.search(1);
|
||||||
}else{
|
|
||||||
window.parent.search(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
parent.layer.close(index); // 再执行关闭
|
// 关闭当前弹出层
|
||||||
|
parent.layer.close(index);
|
||||||
}
|
}
|
||||||
|
|
@ -164,7 +164,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-box">
|
<div class="btn-box">
|
||||||
<button class="layui-btn layui-btn-normal save" onclick="saveData2()">提交</button>
|
<button class="layui-btn layui-btn-normal save" onclick="saveData2()">提交</button>
|
||||||
<button class="layui-btn layui-btn-primary cancel" onclick="closePage()">取消</button>
|
<!-- <button class="layui-btn layui-btn-primary cancel" onclick="closePage()">取消</button>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="../../../js/publicJs.js"></script>
|
<script src="../../../js/publicJs.js"></script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue