监理单位模块修改

This commit is contained in:
haozq 2025-02-11 16:04:00 +08:00
parent 44a96f1999
commit a7cca53515
4 changed files with 19 additions and 12 deletions

View File

@ -96,7 +96,7 @@ public class SupervisionUnitController extends BaseController {
* @param bean 监理单位实体
* @return 结果
*/
@PutMapping("/updateSupervisionUnitUser")
@PostMapping("/updateSupervisionUnitUser")
@SysLog(title = "监理单位管理", businessType = OperaType.UPDATE, logType = 0, module = "外来单位管理->监理单位总监")
public AjaxResult updateSupervisionUnitUser(@Validated @RequestBody SupervisionUnit bean) {
try {

View File

@ -237,10 +237,9 @@ public class ProjectServiceImpl implements ProjectService {
result = projectMapper.addSupervisoryUnit(bean);
if (result > 0) {
// 抛出异常触发事务回滚
TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
return AjaxResult.success("添加成功");
}
TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
// 返回操作结果可能是插入的记录数或者其他标识
} catch (Exception e) {
// 手动进行回滚

View File

@ -401,7 +401,7 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
for (Long id:addressId){
List<Project> list = suMapper.getSupProUserNum(id);
if(StringUtils.isNotEmpty(list)){
return AjaxResult.success(list.get(0).getSupervisorUnit()+"存在工程信息,不允许删除");
return AjaxResult.error(list.get(0).getSupervisorUnit()+"存在工程信息,不允许删除");
}
}
}

View File

@ -117,12 +117,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join (
select count(1) num , sup_unit_id
from pt_project_info
where sup_unit_id is not null and sup_unit_id!=''
where sup_unit_id is not null and sup_unit_id!='' and is_active=1
GROUP BY sup_unit_id
)pro on pro.sup_unit_id=psi.id
left join(
select count(1) num ,unit_id
FROM pt_sup_info
where is_active=1
GROUP BY unit_id
)us on us.unit_id=psi.id
where psi.is_active = 1
@ -136,12 +137,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
comm_user_id commUserId,
comm_user_name directorsName,
comm_user_phone directorsPhone,
comm_user_code commUserCode
comm_user_code commUserCode,
IFNULL(pro.num,0) status
from (select @rowNum := 0) r,
pt_sup_info
pt_sup_info psi
left join (
select count(1) num , sup_user_id
from pt_project_info
where sup_user_id is not null and sup_user_id!='' and is_active=1
GROUP BY sup_user_id
)pro on pro.sup_user_id=psi.sup_id
where is_active=1 and unit_id=#{unitId}
<if test="directorsName != null and directorsName != ''">
and comm_user_phone like concat('%',#{directorsName},'%')
and comm_user_name like concat('%',#{directorsName},'%')
</if>
</select>
<select id="listSupEntry" resultType="com.bonus.project.domain.SupervisionOfAdmission">