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