监理人员入场出场审核流

This commit is contained in:
马三炮 2025-05-29 18:13:44 +08:00
parent d8b5a24bfa
commit 1fb21ef912
11 changed files with 566 additions and 5 deletions

View File

@ -252,6 +252,14 @@ public class StageEndListener implements ExecutionListener, ApplicationContextAw
//修改延期申请状态
businessService.updateExtensionApplicationByUuid(id, statusType,"");
break;
case "18":
//监理入场申请状态
businessService.updateSupPersonIntoStatusByUuid(id, statusType);
break;
case "19":
//监理出场申请状态
businessService.updateSupPersonOutStatusByUuid(id, statusType);
break;
default:
}
}

View File

@ -545,4 +545,45 @@ public interface BusinessMapper {
String getCheckTree(String taskId);
void updateAuditUserInfo(ConfigurationVo add);
/**
* 修改监理中途入场任务id流程实例id 审核状态
* @param uuid
* @param taskId
* @param processInstanceId
* @param enterStatus
* @return
*/
Integer updateSupPersonStatus(@Param("uuid") String uuid, @Param("taskId")String taskId,@Param("processInstanceId") String processInstanceId,@Param("enterStatus") String enterStatus);
/**
* 修改监理中途出场任务id流程实例id 审核状态
* @param uuid
* @param taskId
* @param processInstanceId
* @param enterStatus
* @return
*/
Integer updateSupPersonOutStatus(@Param("uuid") String uuid, @Param("taskId")String taskId, @Param("processInstanceId")String processInstanceId, @Param("enterStatus") String enterStatus);
/**
* 修改用户状态
* @param uuid
*/
void updateSupPersonSysUserStatus(String uuid);
/**
* 修改监理中途入场审核状态
* @param uuid
* @param statusType
* @return
*/
int updateSupPersonIntoStatusByUuid(@Param("uuid")String uuid, @Param("statusType")String statusType);
/**
* 修改监理中途出场审核状态
* @param uuid
* @param statusType
* @return
*/
int updateSupPersonOutStatusByUuid(@Param("uuid")String uuid, @Param("statusType")String statusType);
}

View File

@ -204,4 +204,16 @@ public interface BusinessService {
void updateExtensionApplicationByUuid(String uuid,String statusType,String rejectReason);
List<CheckComment> checkHistory(RequestEntity entity);
/**
* 修改延期申请状态
* @param uuid uuid
* @param statusType 状态
*/
int updateSupPersonIntoStatusByUuid(String uuid, String statusType);
/**
* 修改延期申请状态
* @param uuid uuid
* @param statusType 状态
*/
int updateSupPersonOutStatusByUuid(String uuid, String statusType);
}

View File

@ -790,6 +790,12 @@ public class BusinessServiceImpl implements BusinessService {
case "17":
//延期申请---修改任务ID和流程实例ID
return mapper.updateExtensionApplicationStatus(uuid, taskId, processInstanceId, enterStatus);
case "18":
//监理施工中入场审批---修改任务ID和流程实例ID
return mapper.updateSupPersonStatus(uuid, taskId, processInstanceId, enterStatus);
case "19":
//监理施工中出场审批---修改任务ID和流程实例ID
return mapper.updateSupPersonOutStatus(uuid, taskId, processInstanceId, enterStatus);
default:
break;
}
@ -1048,6 +1054,33 @@ public class BusinessServiceImpl implements BusinessService {
return list;
}
/**
* 修改延期申请状态
* @param uuid uuid
* @param statusType 状态
*/
@Override
public int updateSupPersonIntoStatusByUuid(String uuid, String statusType) {
try {
if ("3".equals(statusType)) {
mapper.updateSupPersonSysUserStatus(uuid);
}
} catch (Exception e) {
log.error("修改监理人员状态失败");
}
return mapper.updateSupPersonIntoStatusByUuid(uuid, statusType);
}
/**
* 修改延期申请状态
* @param uuid uuid
* @param statusType 状态
*/
@Override
public int updateSupPersonOutStatusByUuid(String uuid, String statusType) {
return mapper.updateSupPersonOutStatusByUuid(uuid, statusType);
}
@Override
public void addComment(@Param("uuid") String taskId, @Param("uuid") String processInstanceId, @Param("uuid") String userId, @Param("uuid") String comment, @Param("agree") String agree, @Param("rejectReason") String rejectReason) {
mapper.addComment(taskId, processInstanceId, userId, comment, agree, rejectReason);

View File

@ -325,6 +325,7 @@
<update id="updateSupervisorPersonStatus">
update nxdt_ii.lk_sup_person
set status = #{statusType},
into_status = #{statusType},
admission_date = DATE(NOW())
where sup_uuid = (select sup_uuid from nxdt_ii.lk_pro_sup where uuid = #{uuid})
</update>
@ -704,6 +705,37 @@
SET audit_status=#{state},is_audit=#{isAudit},is_now=#{isNow}
where task_id=#{taskId} and audit_user=#{userId}
</update>
<update id="updateSupPersonStatus">
update nxdt_ii.lk_sup_person
set into_status =#{enterStatus},
task_id_into = #{taskId},
proc_inst_id_into = #{processInstanceId}
where uuid = #{uuid}
</update>
<update id="updateSupPersonOutStatus">
update nxdt_ii.lk_sup_person
set out_status =#{enterStatus},
task_id_out = #{taskId},
proc_inst_id_out = #{processInstanceId}
where uuid = #{uuid}
</update>
<update id="updateSupPersonSysUserStatus">
update nxdt_ii.sys_user
set status = '0'
where parent_uuid = (select sup_uuid from nxdt_ii.lk_sup_person where uuid = #{uuid})
</update>
<update id="updateSupPersonIntoStatusByUuid">
update nxdt_ii.lk_sup_person
set into_status =#{statusType},
admission_date = DATE(NOW())
where uuid = #{uuid}
</update>
<update id="updateSupPersonOutStatusByUuid">
update nxdt_ii.lk_sup_person
set out_status =#{statusType},
departure_date = DATE(NOW())
where uuid = #{uuid}
</update>
<select id="approvalHistoryUser" resultType="com.bonus.flowable.entity.ConfigurationVo">

View File

@ -275,4 +275,58 @@ public class SupervisionUnitController extends BaseController {
}
return getDataTableError(null);
}
/**
* 获取监管人员入场列表
* @param bean
* @return
*/
@GetMapping("/getPtSupPersonInto")
@SysLog(title = "监理管理", businessType = OperaType.INSERT,logType = 0,module = "监理管理->监理入场",details = "监理入场申请")
public TableDataInfo getPtSupPersonInto(SupervisorPerson bean) {
try{
startPage();
List<SupervisorPerson> list = suService.getPtSupPersonInto(bean);
return getDataTable(list);
}catch (Exception e){
logger.error(e.toString(),e);
}
return getDataTableError(null);
}
/**
* 获取监管人员出场列表
* @param bean
* @return
*/
@GetMapping("/getPtSupPersonOut")
@SysLog(title = "监理管理", businessType = OperaType.INSERT,logType = 0,module = "监理管理->监理入场",details = "监理入场申请")
public TableDataInfo getPtSupPersonOut(SupervisorPerson bean) {
try{
startPage();
List<SupervisorPerson> list = suService.getPtSupPersonOut(bean);
return getDataTable(list);
}catch (Exception e){
logger.error(e.toString(),e);
}
return getDataTableError(null);
}
/**
* 获取监管人员入场/出场申请列表
* @param bean
* @return
*/
@GetMapping("/getPtSupPersonList")
@SysLog(title = "监理管理", businessType = OperaType.INSERT,logType = 0,module = "监理管理->监理入场",details = "监理入场申请")
public TableDataInfo getPtSupPersonList(SupervisorPerson bean) {
try{
startPage();
List<SupervisorPerson> list = suService.getPtSupPersonList(bean);
return getDataTable(list);
}catch (Exception e){
logger.error(e.toString(),e);
}
return getDataTableError(null);
}
}

View File

@ -82,4 +82,16 @@ public class SupervisorPerson extends BaseBean implements Serializable {
private String roleId;
private String deptId;
private String status;
/**
* 0待审核;1已提交 2 审核中 3通过 4驳回 5回撤
*/
private String intoStatus;
/**
* 0待审核;1已提交 2 审核中 3通过 4驳回 5回撤
*/
private String outStatus;
private List<String> proInsId;
private int dataType=0;
}

View File

@ -205,9 +205,41 @@ public interface SupervisionUnitMapper {
List<SupervisorPerson> getPtSupPerson(SupervisorPerson bean);
/**
* 获取新增监管人员列表
* 业主获取新增监管人员列表
* @param bean
* @return
*/
List<SupervisorPerson> getPtSupPersonAll(SupervisorPerson bean);
/**
* 获取入场监理人员列表
* @param bean
* @return
*/
List<SupervisorPerson> getPtSupPersonInto(SupervisorPerson bean);
/**
* 业主获取入场监理人员列表
* @param bean
* @return
*/
List<SupervisorPerson> getPtSupPersonIntoAll(SupervisorPerson bean);
/**
* 获取出场监理人员列表
* @param bean
* @return
*/
List<SupervisorPerson> getPtSupPersonOut(SupervisorPerson bean);
/**
* 业主获取出场监理人员列表
* @param bean
* @return
*/
List<SupervisorPerson> getPtSupPersonOutAll(SupervisorPerson bean);
/**
* 获取监管人员入场/出场申请列表
* @param bean
* @return
*/
List<SupervisorPerson> getPtSupPersonList(SupervisorPerson bean);
}

View File

@ -95,4 +95,25 @@ public interface SupervisionUnitService {
* @return
*/
List<SupervisorPerson> getPtSupPerson(SupervisorPerson bean);
/**
* 获取入场监管人员列表
* @param bean
* @return
*/
List<SupervisorPerson> getPtSupPersonInto(SupervisorPerson bean);
/**
* 获取出场监管人员列表
* @param bean
* @return
*/
List<SupervisorPerson> getPtSupPersonOut(SupervisorPerson bean);
/**
* 获取监管人员入场/出场申请列表
* @param bean
* @return
*/
List<SupervisorPerson> getPtSupPersonList(SupervisorPerson bean);
}

View File

@ -498,6 +498,80 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
return suMapper.getPtSupPerson(bean);
}
/**
* 获取入场监管人员列表
* @param bean
* @return
*/
@Override
public List<SupervisorPerson> getPtSupPersonInto(SupervisorPerson bean) {
//判断如果是业主,查询全部
if (StaticVariableUtils.ZERO_00.equals(bean.getUserType())) {
return suMapper.getPtSupPersonIntoAll(bean);
}
return suMapper.getPtSupPersonInto(bean);
}
/**
* 获取出场监管人员列表
* @param bean
* @return
*/
@Override
public List<SupervisorPerson> getPtSupPersonOut(SupervisorPerson bean) {
//判断如果是业主,查询全部
if (StaticVariableUtils.ZERO_00.equals(bean.getUserType())) {
return suMapper.getPtSupPersonOutAll(bean);
}
return suMapper.getPtSupPersonOut(bean);
}
/**
* 获取监管人员入场/出场申请列表
* @param bean
* @return
*/
@Override
public List<SupervisorPerson> getPtSupPersonList(SupervisorPerson bean) {
long startTime = System.currentTimeMillis();
RequestEntity entity = new RequestEntity();
//数据查询
Map<String, String> checkMaps= Maps.newHashMap();
List<SupervisorPerson> list = new ArrayList<>();
if("1".equals(bean.getStatus())){
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
AjaxResult ajaxResult = flowTaskService.getStayFlow(entity);
if (ajaxResult.isSuccess()) {
List<Map<String, Object>> data = (List<Map<String, Object>>) ajaxResult.get("data");
List<String> proInsId=new ArrayList<>();
data.forEach(map->{
proInsId.add((String)map.get("proInsId"));
checkMaps.put((String)map.get("proInsId"),(String) map.get("finalCheck"));
});
if(StringUtils.isNotEmpty(data)){
bean.setDataType(1);
bean.setProInsId(proInsId);
}
if (proInsId.isEmpty()){
return list;
}
}
}
PageUtils.startPage();
list = suMapper.getPtSupPersonList(bean);
list.forEach(data->{
if("1".equals(data.getStatus())){
if ("2".equals(data.getIntoStatus())) {
data.setIntoStatus("1");
}
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
}
});
long endTime = System.currentTimeMillis();
System.err.println("耗时:"+(endTime-startTime));
return list;
}
private int qualificationMaterialsFile(@NotNull String filePath, int proId,
long fileSize, String fromType,
String informationType, String uuid) {

View File

@ -257,6 +257,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
lsp.sup_uuid as supUuid,
lsp.uuid as uuid,
lsp.status as status,
lsp.into_status as intoStatus,
lsp.out_status as outStatus,
lsp.task_id_into as taskId,
lsp.proc_inst_id_into as procInsId,
sup_user_id as id,
sup_name as name,
if(sex = '0','男','女') as sex,
@ -266,11 +270,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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
left join (select sup_persion_id,pro_id,sup_uuid,uuid,status,into_status,out_status,task_id_into,proc_inst_id_into 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'
where psp.is_active = '1'
<if test="supId != null and supId != ''">
and lsp.sup_uuid = (select uuid from pt_sup_info where
sup_id = #{supId})
@ -284,14 +288,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="name != null and name != ''">
and psp.sup_name like concat('%', #{name}, '%')
</if>
<if test="intoStatus != null and intoStatus != ''">
and lsp.into_status = #{intoStatus}
</if>
</select>
<select id="getPtSupPersonAll" resultType="com.bonus.project.domain.SupervisorPerson">
<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,
lsp.into_status as intoStatus,
lsp.out_status as outStatus,
lsp.task_id_into as taskId,
lsp.proc_inst_id_into as procInsId,
sup_user_id as id,
sup_name as name,
if(sex = '0','男','女') as sex,
@ -305,7 +316,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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'
where psp.is_active = '1'
<if test="supId != null and supId != ''">
and lsp.sup_uuid = (select uuid from pt_sup_info where
sup_id = #{supId})
@ -316,6 +327,237 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="name != null and name != ''">
and psp.sup_name like concat('%', #{name}, '%')
</if>
<if test="intoStatus != null and intoStatus != ''">
and lsp.into_status = #{intoStatus}
</if>
</select>
<select id="getPtSupPersonInto" resultType="com.bonus.project.domain.SupervisorPerson">
select
lsp.pro_id as proId,
lsp.sup_uuid as supUuid,
lsp.uuid as uuid,
lsp.status as status,
lsp.into_status as intoStatus,
lsp.out_status as outStatus,
lsp.task_id_out as taskId,
lsp.proc_inst_id_out as procInsId,
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 pt_sup_person psp
left join (select sup_persion_id,pro_id,sup_uuid,uuid,status,into_status,out_status,proc_inst_id_out,task_id_out 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.into_status='3' and lsp.out_status in ('0','5')
<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>
<if test="outStatus != null and outStatus != ''">
and lsp.out_status = #{outStatus}
</if>
</select>
<select id="getPtSupPersonIntoAll" resultType="com.bonus.project.domain.SupervisorPerson">
select
lsp.pro_id as proId,
lsp.sup_uuid as supUuid,
lsp.uuid as uuid,
lsp.status as status,
lsp.into_status as intoStatus,
lsp.out_status as outStatus,
lsp.task_id_out as taskId,
lsp.proc_inst_id_out as procInsId,
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 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.into_status='3' and lsp.out_status in ('0','5')
<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>
<if test="outStatus != null and outStatus != ''">
and lsp.out_status = #{outStatus}
</if>
</select>
<select id="getPtSupPersonOut" resultType="com.bonus.project.domain.SupervisorPerson">
select
lsp.pro_id as proId,
lsp.sup_uuid as supUuid,
lsp.uuid as uuid,
lsp.status as status,
lsp.into_status as intoStatus,
lsp.out_status as outStatus,
lsp.task_id_out as taskId,
lsp.proc_inst_id_out as procInsId,
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 pt_sup_person psp
left join (select sup_persion_id,pro_id,sup_uuid,uuid,status,into_status,out_status,task_id_out,proc_inst_id_out 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.out_status in ('1','2','3','4')
<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>
<if test="outStatus != null and outStatus != ''">
and lsp.out_status = #{outStatus}
</if>
</select>
<select id="getPtSupPersonOutAll" resultType="com.bonus.project.domain.SupervisorPerson">
select
lsp.pro_id as proId,
lsp.sup_uuid as supUuid,
lsp.uuid as uuid,
lsp.status as status,
lsp.into_status as intoStatus,
lsp.out_status as outStatus,
lsp.task_id_out as taskId,
lsp.proc_inst_id_out as procInsId,
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 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.out_status in ('1','2','3','4')
<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>
<if test="outStatus != null and outStatus != ''">
and lsp.out_status = #{outStatus}
</if>
</select>
<select id="getPtSupPersonList" resultType="com.bonus.project.domain.SupervisorPerson">
select
lsp.pro_id as proId,
lsp.sup_uuid as supUuid,
lsp.uuid as uuid,
lsp.status as status,
lsp.into_status as intoStatus,
lsp.out_status as outStatus,
<if test="type == '出场'">
lsp.task_id_out as taskId,
lsp.proc_inst_id_out as procInsId,
</if>
<if test="type == '入场'">
lsp.task_id_into as taskId,
lsp.proc_inst_id_into as procInsId,
</if>
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 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'
<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>
<if test="type == '入场'">
<if test="status != null and status != '' and status != 1 and status != '1' and status != '2' and status != 2 ">
and lsp.into_status = #{status}
</if>
<if test="status==2 or status=='2'">
and lsp.into_status = #{status}
</if>
<if test='dataType==1'>
AND lsp.proc_inst_id_into IN (
<foreach collection="proInsId" item="item" separator=",">
#{item}
</foreach>
)
</if>
</if>
<if test="type == '出场'">
and lsp.out_status != '0' and lsp.into_status = '3'
<if test="status != null and status != '' and status != 1 and status != '1' and status != '2' and status != 2 ">
and lsp.out_status = #{status}
</if>
<if test="status==2 or status=='2'">
and lsp.out_status = #{status}
</if>
<if test='dataType==1'>
AND lsp.proc_inst_id_out IN (
<foreach collection="proInsId" item="item" separator=",">
#{item}
</foreach>
)
</if>
</if>
</select>