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
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加外包企业
|
* 添加外包企业
|
||||||
|
*
|
||||||
* @param o
|
* @param o
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -113,6 +114,7 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 外包企业表单复现
|
* 外包企业表单复现
|
||||||
|
*
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -129,6 +131,7 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改外包企业
|
* 修改外包企业
|
||||||
|
*
|
||||||
* @param o
|
* @param o
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -148,6 +151,7 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除外包企业
|
* 删除外包企业
|
||||||
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -202,6 +206,7 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("exportTeamGroupPerson")
|
@RequestMapping("exportTeamGroupPerson")
|
||||||
public void exportTeamGroupPerson(HttpServletRequest request, HttpServletResponse response, TeamGroupBean teamGroupBean) {
|
public void exportTeamGroupPerson(HttpServletRequest request, HttpServletResponse response, TeamGroupBean teamGroupBean) {
|
||||||
String filename = "班组人员详情表";
|
String filename = "班组人员详情表";
|
||||||
|
|
@ -246,6 +251,7 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
if (hssfSheet != null) {
|
if (hssfSheet != null) {
|
||||||
// 遍历行row,continue只是终止本次循环,接着还执行后面的循环
|
// 遍历行row,continue只是终止本次循环,接着还执行后面的循环
|
||||||
int rowNum = hssfSheet.getLastRowNum();
|
int rowNum = hssfSheet.getLastRowNum();
|
||||||
|
boolean hasEmptyRow = false;
|
||||||
// 从第三行开始
|
// 从第三行开始
|
||||||
for (int rownum = 2; rownum <= rowNum; rownum++) {
|
for (int rownum = 2; rownum <= rowNum; rownum++) {
|
||||||
// 获取到每一行
|
// 获取到每一行
|
||||||
|
|
@ -262,6 +268,10 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
result = 2;
|
result = 2;
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ar.setFailMsg("第 " + (rownum + 1) + " 行数据为空,导入失败");
|
||||||
|
ar.setRes(0);
|
||||||
|
return ar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (result != 2) {
|
if (result != 2) {
|
||||||
|
|
@ -504,6 +514,7 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
out.close();
|
out.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void excelOutTeamGroupPersons(HttpServletResponse response, List<TeamGroupBean> registlist, String filename, String sheetname)
|
private void excelOutTeamGroupPersons(HttpServletResponse response, List<TeamGroupBean> registlist, String filename, String sheetname)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
if (registlist != null) {
|
if (registlist != null) {
|
||||||
|
|
@ -584,6 +595,7 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
|
|
||||||
return maps;
|
return maps;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, Object> outVehicleOilBeanMap(int i, TeamGroupBean bean, String sheetname) {
|
private Map<String, Object> outVehicleOilBeanMap(int i, TeamGroupBean bean, String sheetname) {
|
||||||
Map<String, Object> maps = new LinkedHashMap<String, Object>();
|
Map<String, Object> maps = new LinkedHashMap<String, Object>();
|
||||||
maps.put("id", i + 1);
|
maps.put("id", i + 1);
|
||||||
|
|
@ -675,8 +687,5 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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();
|
|
||||||
}else{
|
|
||||||
window.parent.search(1);
|
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