监理人员删除功能修改
This commit is contained in:
parent
4835c32f48
commit
7a29fcddaa
|
|
@ -557,7 +557,7 @@
|
||||||
<!-- task_id = #{taskId}-->
|
<!-- task_id = #{taskId}-->
|
||||||
<!-- )-->
|
<!-- )-->
|
||||||
) a
|
) a
|
||||||
LEFT JOIN nxdt_ii.pt_check_comment b ON a.proc_inst_id = b.proc_inst_id and b.agree != '2'
|
LEFT JOIN nxdt_ii.pt_check_comment b ON a.proc_inst_id = b.proc_inst_id
|
||||||
) d ON c.id = d.user_id
|
) d ON c.id = d.user_id
|
||||||
AND d.id
|
AND d.id
|
||||||
IS NOT NULL LEFT JOIN ( SELECT user_name AS userName, nick_name AS NAME, user_id AS userId, dept_id AS deptId FROM nxdt_ii.sys_user WHERE user_type = '00' or user_type='01' or user_type='02') e ON c.id = e.userId
|
IS NOT NULL LEFT JOIN ( SELECT user_name AS userName, nick_name AS NAME, user_id AS userId, dept_id AS deptId FROM nxdt_ii.sys_user WHERE user_type = '00' or user_type='01' or user_type='02') e ON c.id = e.userId
|
||||||
|
|
|
||||||
|
|
@ -222,8 +222,8 @@ public class SupervisionUnitController extends BaseController {
|
||||||
@SysLog(title = "监理管理", businessType = OperaType.INSERT,logType = 0,module = "监理管理->监理入场-监理人员删除",details = "监理入场-监理人员删除")
|
@SysLog(title = "监理管理", businessType = OperaType.INSERT,logType = 0,module = "监理管理->监理入场-监理人员删除",details = "监理入场-监理人员删除")
|
||||||
public AjaxResult delSupervisoryPersonApply(@RequestBody SupervisorPerson supervisorPerson) {
|
public AjaxResult delSupervisoryPersonApply(@RequestBody SupervisorPerson supervisorPerson) {
|
||||||
try{
|
try{
|
||||||
if (StringUtils.isBlank(supervisorPerson.getIdCard()) || StringUtils.isBlank(supervisorPerson.getPhone())){
|
if (StringUtils.isBlank(supervisorPerson.getSupUuid()) && supervisorPerson.getProId() != null){
|
||||||
return error("删除失败,身份证号码和手机号不能为空");
|
return error("删除失败,入参错误");
|
||||||
}
|
}
|
||||||
return toAjax(suService.delSupervisoryPersonApply(supervisorPerson));
|
return toAjax(suService.delSupervisoryPersonApply(supervisorPerson));
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|
|
||||||
|
|
@ -420,15 +420,12 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int delSupervisoryPersonApply(SupervisorPerson supervisorPerson) {
|
public int delSupervisoryPersonApply(SupervisorPerson supervisorPerson) {
|
||||||
// 删除监理人员信息(user表)
|
|
||||||
Integer i = suMapper.delUser(supervisorPerson);
|
|
||||||
if (i > 0) {
|
|
||||||
Integer supUserId = suMapper.getsupUserId(supervisorPerson);
|
Integer supUserId = suMapper.getsupUserId(supervisorPerson);
|
||||||
// 删除监理人员信息(pt_sup_person表)
|
// 删除监理人员信息(lk_sup_person表)
|
||||||
Integer i1 = suMapper.delPtSupPerson(supervisorPerson);
|
Integer i1 = suMapper.delPtSupPerson(supervisorPerson);
|
||||||
if (i1 > 0) {
|
if (i1 > 0) {
|
||||||
supervisorPerson.setSupId(supUserId);
|
supervisorPerson.setSupId(supUserId);
|
||||||
// 删除监理人员信息(lk_sup_person表)
|
// 删除监理人员信息(pt_sup_person表)
|
||||||
Integer i2 = suMapper.delLkSupPerson(supervisorPerson);
|
Integer i2 = suMapper.delLkSupPerson(supervisorPerson);
|
||||||
if (i2 > 0) {
|
if (i2 > 0) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -438,9 +435,6 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("删除失败");
|
throw new RuntimeException("删除失败");
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
throw new RuntimeException("删除失败");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private int qualificationMaterialsFile(@NotNull String filePath, int proId,
|
private int qualificationMaterialsFile(@NotNull String filePath, int proId,
|
||||||
|
|
|
||||||
|
|
@ -104,10 +104,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
delete from sys_user where id_card = #{idCard} and phonenumber = #{phone} and del_flag = '0'
|
delete from sys_user where id_card = #{idCard} and phonenumber = #{phone} and del_flag = '0'
|
||||||
</delete>
|
</delete>
|
||||||
<delete id="delPtSupPerson">
|
<delete id="delPtSupPerson">
|
||||||
delete from pt_sup_person where id_card = #{idCard} and phone = #{phone} and is_active = '1'
|
delete from lk_sup_person where pro_id = #{proId} and sup_uuid = #{supUuid}
|
||||||
</delete>
|
</delete>
|
||||||
<delete id="delLkSupPerson">
|
<delete id="delLkSupPerson">
|
||||||
delete from lk_sup_person where sup_persion_id = #{supId}
|
delete from pt_sup_person where sup_user_id = #{supId} and is_active = 1
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="listSupervisionUnit" resultType="com.bonus.project.domain.SupervisionUnit">
|
<select id="listSupervisionUnit" resultType="com.bonus.project.domain.SupervisionUnit">
|
||||||
|
|
@ -223,9 +223,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where is_active=1 and unit_id=#{id}
|
where is_active=1 and unit_id=#{id}
|
||||||
</select>
|
</select>
|
||||||
<select id="getsupUserId" resultType="java.lang.Integer">
|
<select id="getsupUserId" resultType="java.lang.Integer">
|
||||||
select sup_user_id
|
select sup_persion_id
|
||||||
from pt_sup_person
|
from lk_sup_person
|
||||||
where id_card = #{idCard} and phone = #{phone}
|
where pro_id = #{proId} and sup_uuid = #{supUuid}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue