监理人员删除功能修改

This commit is contained in:
liang.chao 2025-02-14 15:48:21 +08:00
parent 4835c32f48
commit 7a29fcddaa
4 changed files with 10 additions and 16 deletions

View File

@ -557,7 +557,7 @@
<!-- task_id = #{taskId}-->
<!-- )-->
) 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
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

View File

@ -222,8 +222,8 @@ public class SupervisionUnitController extends BaseController {
@SysLog(title = "监理管理", businessType = OperaType.INSERT,logType = 0,module = "监理管理->监理入场-监理人员删除",details = "监理入场-监理人员删除")
public AjaxResult delSupervisoryPersonApply(@RequestBody SupervisorPerson supervisorPerson) {
try{
if (StringUtils.isBlank(supervisorPerson.getIdCard()) || StringUtils.isBlank(supervisorPerson.getPhone())){
return error("删除失败,身份证号码和手机号不能为空");
if (StringUtils.isBlank(supervisorPerson.getSupUuid()) && supervisorPerson.getProId() != null){
return error("删除失败,入参错误");
}
return toAjax(suService.delSupervisoryPersonApply(supervisorPerson));
}catch (Exception e){

View File

@ -420,15 +420,12 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
@Override
@Transactional(rollbackFor = Exception.class)
public int delSupervisoryPersonApply(SupervisorPerson supervisorPerson) {
// 删除监理人员信息(user表)
Integer i = suMapper.delUser(supervisorPerson);
if (i > 0) {
Integer supUserId = suMapper.getsupUserId(supervisorPerson);
// 删除监理人员信息(pt_sup_person表)
// 删除监理人员信息(lk_sup_person表)
Integer i1 = suMapper.delPtSupPerson(supervisorPerson);
if (i1 > 0) {
supervisorPerson.setSupId(supUserId);
// 删除监理人员信息(lk_sup_person表)
// 删除监理人员信息(pt_sup_person表)
Integer i2 = suMapper.delLkSupPerson(supervisorPerson);
if (i2 > 0) {
return 1;
@ -438,9 +435,6 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
} else {
throw new RuntimeException("删除失败");
}
} else {
throw new RuntimeException("删除失败");
}
}
private int qualificationMaterialsFile(@NotNull String filePath, int proId,

View File

@ -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>
<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 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>
<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}
</select>
<select id="getsupUserId" resultType="java.lang.Integer">
select sup_user_id
from pt_sup_person
where id_card = #{idCard} and phone = #{phone}
select sup_persion_id
from lk_sup_person
where pro_id = #{proId} and sup_uuid = #{supUuid}
</select>
</mapper>