新增监理人员列表和查询接口
This commit is contained in:
parent
ce2d341234
commit
d8b5a24bfa
|
|
@ -41,6 +41,9 @@ public class BaseBean implements Serializable {
|
|||
private String procInsId;
|
||||
|
||||
|
||||
/**
|
||||
* 用户类型(00业主用户、01监理用户、02承包商、03分包商)
|
||||
*/
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.project.controller;
|
||||
|
||||
import com.bonus.common.core.utils.PageUtils;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -256,4 +257,22 @@ public class SupervisionUnitController extends BaseController {
|
|||
}
|
||||
return error("系统异常,请联系管理员");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取新增监管人员列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getPtSupPerson")
|
||||
@SysLog(title = "监理管理", businessType = OperaType.INSERT,logType = 0,module = "监理管理->监理入场",details = "监理入场申请")
|
||||
public TableDataInfo getPtSupPerson(SupervisorPerson bean) {
|
||||
try{
|
||||
startPage();
|
||||
List<SupervisorPerson> list = suService.getPtSupPerson(bean);
|
||||
return getDataTable(list);
|
||||
}catch (Exception e){
|
||||
logger.error(e.toString(),e);
|
||||
}
|
||||
return getDataTableError(null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,4 +196,18 @@ public interface SupervisionUnitMapper {
|
|||
* @param userId
|
||||
*/
|
||||
void deleteUserById(@Param("userId") String userId);
|
||||
|
||||
/**
|
||||
* 获取新增监管人员列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<SupervisorPerson> getPtSupPerson(SupervisorPerson bean);
|
||||
|
||||
/**
|
||||
* 获取新增监管人员列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<SupervisorPerson> getPtSupPersonAll(SupervisorPerson bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,4 +88,11 @@ public interface SupervisionUnitService {
|
|||
AjaxResult delSupervisionUnitUser(Long[] addressId);
|
||||
|
||||
int delSupervisoryPersonApply(SupervisorPerson supervisorPerson);
|
||||
|
||||
/**
|
||||
* 获取新增监管人员列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<SupervisorPerson> getPtSupPerson(SupervisorPerson bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -468,11 +468,10 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int delSupervisoryPersonApply(SupervisorPerson supervisorPerson) {
|
||||
Integer supUserId = suMapper.getsupUserId(supervisorPerson);
|
||||
// 删除监理人员信息(lk_sup_person表)
|
||||
Integer i1 = suMapper.delPtSupPerson(supervisorPerson);
|
||||
if (i1 > 0) {
|
||||
supervisorPerson.setSupId(supUserId);
|
||||
supervisorPerson.setSupId(Integer.valueOf(supervisorPerson.getUserId()));
|
||||
// 删除监理人员信息(pt_sup_person表)
|
||||
Integer i2 = suMapper.delLkSupPerson(supervisorPerson);
|
||||
if (i2 > 0) {
|
||||
|
|
@ -485,6 +484,20 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取新增监管人员列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SupervisorPerson> getPtSupPerson(SupervisorPerson bean) {
|
||||
//判断如果是业主,查询全部
|
||||
if (StaticVariableUtils.ZERO_00.equals(bean.getUserType())) {
|
||||
return suMapper.getPtSupPersonAll(bean);
|
||||
}
|
||||
return suMapper.getPtSupPerson(bean);
|
||||
}
|
||||
|
||||
private int qualificationMaterialsFile(@NotNull String filePath, int proId,
|
||||
long fileSize, String fromType,
|
||||
String informationType, String uuid) {
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ 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 lk_sup_person where pro_id = #{proId} and sup_uuid = #{supUuid}
|
||||
delete from lk_sup_person where pro_id = #{proId} and sup_uuid = #{supUuid} and sup_persion_id = #{userId}
|
||||
</delete>
|
||||
<delete id="delLkSupPerson">
|
||||
delete from pt_sup_person where sup_user_id = #{supId} and is_active = 1
|
||||
|
|
@ -243,13 +243,80 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="getsupUserId" resultType="java.lang.Integer">
|
||||
select sup_persion_id
|
||||
from lk_sup_person
|
||||
where pro_id = #{proId} and sup_uuid = #{supUuid}
|
||||
where pro_id = #{proId} and sup_uuid = #{supUuid} and sup_persion_id = #{userId}
|
||||
</select>
|
||||
<select id="getUserIdBySupId" resultType="java.lang.String">
|
||||
select comm_user_id userId
|
||||
from pt_sup_info
|
||||
where sup_id=#{supId}
|
||||
</select>
|
||||
<select id="getPtSupPerson" resultType="com.bonus.project.domain.SupervisorPerson">
|
||||
select
|
||||
(@rowNum := @rowNum + 1) as exportId,
|
||||
lsp.pro_id as proId,
|
||||
lsp.sup_uuid as supUuid,
|
||||
lsp.uuid as uuid,
|
||||
lsp.status as status,
|
||||
sup_user_id as id,
|
||||
sup_name as name,
|
||||
if(sex = '0','男','女') as sex,
|
||||
age,
|
||||
phone,
|
||||
id_card as idCard,
|
||||
sdd.dict_label as postName,
|
||||
face_path as faceUrl
|
||||
from (select @rowNum := 0) r,pt_sup_person psp
|
||||
left join (select sup_persion_id,pro_id,sup_uuid,uuid,status from lk_sup_person lpsp where lpsp.pro_id = #{proId}) lsp
|
||||
on
|
||||
psp.sup_user_id = lsp.sup_persion_id
|
||||
left join sys_dict_data sdd on sdd.dict_value = psp.post and sdd.dict_type = 'sys_sup_post' and sdd.status = '0'
|
||||
where psp.is_active = '1' and lsp.status!='3'
|
||||
<if test="supId != null and supId != ''">
|
||||
and lsp.sup_uuid = (select uuid from pt_sup_info where
|
||||
sup_id = #{supId})
|
||||
</if>
|
||||
<if test="supUuid != null and supUuid != ''">
|
||||
and lsp.sup_uuid = #{supUuid}
|
||||
</if>
|
||||
<if test="supervisorName != null and supervisorName != ''">
|
||||
and psp.sup_name like concat('%', #{supervisorName}, '%')
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and psp.sup_name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getPtSupPersonAll" resultType="com.bonus.project.domain.SupervisorPerson">
|
||||
select
|
||||
(@rowNum := @rowNum + 1) as exportId,
|
||||
lsp.pro_id as proId,
|
||||
lsp.sup_uuid as supUuid,
|
||||
lsp.uuid as uuid,
|
||||
lsp.status as status,
|
||||
sup_user_id as id,
|
||||
sup_name as name,
|
||||
if(sex = '0','男','女') as sex,
|
||||
age,
|
||||
phone,
|
||||
id_card as idCard,
|
||||
sdd.dict_label as postName,
|
||||
face_path as faceUrl
|
||||
from (select @rowNum := 0) r,pt_sup_person psp
|
||||
left join lk_sup_person lsp
|
||||
on
|
||||
psp.sup_user_id = lsp.sup_persion_id
|
||||
left join sys_dict_data sdd on sdd.dict_value = psp.post and sdd.dict_type = 'sys_sup_post' and sdd.status = '0'
|
||||
where psp.is_active = '1' and lsp.status!='3'
|
||||
<if test="supId != null and supId != ''">
|
||||
and lsp.sup_uuid = (select uuid from pt_sup_info where
|
||||
sup_id = #{supId})
|
||||
</if>
|
||||
<if test="supervisorName != null and supervisorName != ''">
|
||||
and psp.sup_name like concat('%', #{supervisorName}, '%')
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and psp.sup_name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue