Merge remote-tracking branch 'origin/master'

This commit is contained in:
haozq 2025-06-04 15:52:21 +08:00
commit 5abc225caf
33 changed files with 1013 additions and 77 deletions

View File

@ -41,6 +41,9 @@ public class BaseBean implements Serializable {
private String procInsId;
/**
* 用户类型00业主用户01监理用户02承包商03分包商
*/
private String userType;
/**

View File

@ -51,6 +51,11 @@ public class QuestionsExamVo {
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTimeDate;
/**
* 修改时间
*/

View File

@ -93,9 +93,12 @@ public class CoursewareLibraryController {
while ((line = bufferedReader.readLine()) != null) {
stringBuilder.append(line);
}
String str=decord(stringBuilder.toString());
String str = decord(stringBuilder.toString());
if (str.startsWith("[") && str.endsWith("]")) {
str = str.substring(1, str.length() - 1);
}
String courseId = str.split("&")[0].split("=")[1];
String fileType =str.split("&")[1].split("=")[1];
String fileType = str.split("&")[1].split("=")[1];
if (!StaticVariableUtils.ONE.equals(fileType)) {
dto.setCoursewareId(Integer.parseInt(courseId));
}
@ -108,16 +111,17 @@ public class CoursewareLibraryController {
}
}
public String decord(String str){
try{
return URLDecoder.decode(str, StandardCharsets.UTF_8.toString());
}catch (Exception e){
log.error(e.toString(),e);
public String decord(String str) {
try {
return URLDecoder.decode(str, StandardCharsets.UTF_8.toString());
} catch (Exception e) {
log.error(e.toString(), e);
}
return str;
return str;
}
/**
* 课件上传
*
@ -146,6 +150,7 @@ public class CoursewareLibraryController {
/**
* 1.新增题库使用的tree 2.移动使用的tree
*
* @param dto
* @return AjaxResult
* @author cwchen

View File

@ -35,6 +35,9 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@ -148,7 +151,7 @@ public class CoursewareLibraryServiceImpl implements CoursewareLibraryService {
if (Objects.equals(dto.getFileType(), BusinessConstants.FILE_TYPE)) {
// 多个文件下载
CoursewareVo vo = new CoursewareVo();
String[] split = dto.getCourseId().split("%252C");
String[] split = dto.getCourseId().split("%2C");
List<CoursewareVo> list = mapper.getSelectFileToDownload(split);
downLoadBatchFile(response, list);
@ -217,7 +220,7 @@ public class CoursewareLibraryServiceImpl implements CoursewareLibraryService {
String tempTime = "temp_" + System.currentTimeMillis();
String parentSourceFilePath = upload_path + File.separator + "coursewareZip";
if (!new File(parentSourceFilePath).exists()) {
new File(parentSourceFilePath).mkdir();
new File(parentSourceFilePath).mkdirs();
}
String sourceFilePath = parentSourceFilePath + File.separator + tempTime;
String zipFilePath = null;
@ -245,13 +248,34 @@ public class CoursewareLibraryServiceImpl implements CoursewareLibraryService {
invokeAllTasks(testTaskExecutor,tasks);
///usr/local/bonus/uploadPath/tempTime文件夹进行压缩
// Compress files into a zip
String zipFileName = "courseware_" + tempTime + ".zip";
String zipFileName = tempTime + ".zip";
zipFilePath = parentSourceFilePath + File.separator + zipFileName;
zipFolderContents(sourceFilePath, zipFilePath);
// Set response headers
zipFolder(sourceFilePath, zipFilePath);
File zipFile = new File(zipFilePath);
if (!zipFile.exists() || zipFile.isDirectory()) {
response.sendError(HttpServletResponse.SC_NOT_FOUND, "文件不存在");
return;
}
response.setCharacterEncoding("utf-8");
response.setContentType("application/zip");
response.setHeader("Content-Disposition", "attachment;filename=" +
URLEncoder.encode(zipFileName, "UTF-8"));
response.setContentLength((int) zipFile.length());
try (InputStream is = new FileInputStream(zipFile);
OutputStream os = response.getOutputStream()) {
byte[] buffer = new byte[4096];
int bytesRead;
while ((bytesRead = is.read(buffer)) != -1) {
os.write(buffer, 0, bytesRead);
}
}
// zipFolderContents(sourceFilePath, zipFilePath);
// Set response headers
/* response.setCharacterEncoding("utf-8");
response.setContentType("application/zip");
response.setHeader("Content-Disposition", "attachment;filename="
.concat(String.valueOf(URLEncoder.encode(zipFileName, "UTF-8"))));
@ -260,19 +284,39 @@ public class CoursewareLibraryServiceImpl implements CoursewareLibraryService {
try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) {
File sourceFolder = new File(sourceFilePath);
compressFolderContents(sourceFolder, zos, "");
}
}*/
} catch (Exception e) {
log.error(e.toString(), e);
throw new ServiceException("文件下载异常");
} finally {
// FileUtil.deleteFolder(Paths.get(sourceFilePath));
// if (zipFilePath != null) {
// FileUtil.deleteFolder(Paths.get(zipFilePath));
// }
}
}
public static void zipFolder(String sourceFolderPath, String zipFilePath) throws IOException {
Path sourcePath = Paths.get(sourceFolderPath);
if (!Files.exists(sourcePath) || !Files.isDirectory(sourcePath)) {
throw new IllegalArgumentException("源文件夹不存在或不是目录: " + sourceFolderPath);
}
Path zipPath = Paths.get(zipFilePath);
try (ZipOutputStream zos = new ZipOutputStream(Files.newOutputStream(zipPath))) {
Files.walk(sourcePath)
.filter(path -> !Files.isDirectory(path)) // 只处理文件排除目录本身
.forEach(path -> {
try {
// 计算相对于源文件夹的相对路径
Path targetPath = sourcePath.relativize(path);
ZipEntry zipEntry = new ZipEntry(targetPath.toString().replace("\\", "/"));
zos.putNextEntry(zipEntry);
// 将文件内容写入 ZIP 输出流
Files.copy(path, zos);
zos.closeEntry();
} catch (IOException e) {
System.err.println("无法添加文件到ZIP: " + path + ", 错误信息: " + e.getMessage());
}
});
}
}
public static boolean zipFolderContents(String sourceFolderPath, String zipFilePath) {
try {
FileOutputStream fos = new FileOutputStream(zipFilePath);

View File

@ -78,6 +78,7 @@
update_time AS updateTime,
file_type AS fileType,
parent_id AS parentId,
file_path AS filePath,
IFNULL(marl,'') AS marl
FROM edu_courseware
WHERE is_active = '1'

View File

@ -162,22 +162,22 @@
<!--学员数据列表-->
<select id="getTaskUsers" resultType="com.bonus.common.exam.vo.StudyTaskPersonVo">
SELECT su.nick_name AS name,
etu.user_id AS userId,
etu.sex AS sex,
if(etu.sex = '0', '男', '女') AS sexName,
ppi.pro_name AS proName,
pci.cont_name AS subName,
su.phonenumber AS phone,
su.id_card AS idCard,
etu.post_name AS postName,
sp.post_name AS typeOfWork,
etu.user_uuid AS userUuid,
estp.exam_paper_id AS examPaperId,
eepr.score AS score,
CASE WHEN eepr.score IS NULL THEN ''
WHEN eepr.score &gt;= eep.pass_score THEN '1'
ELSE '0'
END AS isPass
etu.user_id AS userId,
etu.sex AS sex,
if(etu.sex = '0', '男', '女') AS sexName,
ppi.pro_name AS proName,
pci.cont_name AS subName,
su.phonenumber AS phone,
su.id_card AS idCard,
etu.post_name AS postName,
sp.post_name AS typeOfWork,
etu.user_uuid AS userUuid,
estp.exam_paper_id AS examPaperId,
ifnull(eepr.score,0) AS score,
CASE
WHEN ifnull(eepr.score,0) &gt;= eep.pass_score THEN '1'
ELSE '0'
END AS isPass
FROM ek_task_user etu
LEFT JOIN ek_study_task_paper estp ON etu.task_id = estp.study_task_id AND estp.task_type = '3'
LEFT JOIN edu_exam_paper eep ON estp.exam_paper_id = eep.exam_paper_id

View File

@ -196,7 +196,7 @@
eqe.content AS content,
eqe.correct_answer AS correctAnswer,
eqe.analysis AS analysis,
eqe.create_time AS createTime,
eqe.create_time AS createTimeDate,
eqe.question_type AS questionType,
eqe.create_user_name AS createUserName,
a.questionLabel

View File

@ -20,6 +20,9 @@ public class AuditTask {
private String taskId;
@NotNull
private String contUuid;
/**
* 00业主用户01监理用户02承包商03分包商
*/
@NotNull
private String userType;
@NotNull

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

@ -74,6 +74,26 @@ public class AdmissionRequestController extends BaseController {
return getDataTableError(new ArrayList<>());
}
/**
* 特殊工种列表
*
* @param bean 特殊工种列表
* @return 特殊工种列表
*/
@RequiresPermissions("system:listPersonnelInformation:list")
@GetMapping("/listPersonnelInfo")
@SysLog(title = "特殊工种列表", businessType = OperaType.QUERY, logType = 0, module = "人员管理->人员信息列表", details = "查询人员信息列表")
public TableDataInfo listPersonnelInfo(AdmissionRequest bean) {
try {
startPage();
List<AdmissionRequest> list = arService.listPersonnelInfo(bean);
return getDataTable(list);
} catch (Exception e) {
logger.error(e.toString(), e);
}
return getDataTableError(new ArrayList<>());
}
/**
* 获取人员出场列表
*

View File

@ -50,6 +50,24 @@ public class EquipController extends BaseController {
return getDataTableError(new ArrayList<>());
}
/**
* 特种设备列表
*/
@RequiresPermissions("system:equip:list")
@GetMapping("/listEquipment")
@SysLog(title = "特种设备列表", businessType = OperaType.QUERY, logType = 0, module = "工器具管理->列表查询")
public TableDataInfo listEquipment(Equipment bean) {
try {
// startPage();
List<Equipment> list = service.listEquipment(bean);
return getDataTable1(list);
} catch (Exception e) {
log.error(e.toString(), e);
}
return getDataTableError(new ArrayList<>());
}
/**
* 新增工器具
*

View File

@ -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,76 @@ 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);
}
/**
* 获取监管人员入场列表
* @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

@ -23,4 +23,8 @@ public class IndexBean extends BaseBean implements Serializable {
private String specialPersonNum;
private String equipNum;
private String specialEquipNum;
/**
* 是否外委外包项目 0:工程建设 1外委外包
*/
private String isOutsource;
}

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

@ -299,4 +299,6 @@ public interface AdmissionRequestMapper {
* @return
*/
String getIdCardByPhone(@Param("phone") String phone);
List<AdmissionRequest> listPersonnelInfo(AdmissionRequest bean);
}

View File

@ -73,4 +73,6 @@ public interface EquipMapper {
* @return 工器具入场审批列表
*/
List<Equipment> entryOfUtensilsList(Equipment bean);
List<Equipment> listEquipment(Equipment bean);
}

View File

@ -196,4 +196,50 @@ 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);
/**
* 获取入场监理人员列表
* @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

@ -149,4 +149,11 @@ public interface AdmissionRequestService {
* @return 是否存在
*/
List<String> judgeIsFileComplete(SupervisoryUnit bean);
/**
* 特殊工种列表
* @param bean
* @return
*/
List<AdmissionRequest> listPersonnelInfo(AdmissionRequest bean);
}

View File

@ -54,4 +54,11 @@ public interface EquipService {
* @return 工器具入场审批列表
*/
List<Equipment> entryOfUtensilsList(Equipment bean);
/**
* 特种设备列表
* @param bean
* @return
*/
List<Equipment> listEquipment(Equipment bean);
}

View File

@ -88,4 +88,32 @@ public interface SupervisionUnitService {
AjaxResult delSupervisionUnitUser(Long[] addressId);
int delSupervisoryPersonApply(SupervisorPerson supervisorPerson);
/**
* 获取新增监管人员列表
* @param bean
* @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

@ -936,6 +936,16 @@ public class AdmissionRequestServiceImpl implements AdmissionRequestService {
return arMapper.judgeIsFileComplete(bean);
}
/**
*特殊工种列表
* @param bean
* @return
*/
@Override
public List<AdmissionRequest> listPersonnelInfo(AdmissionRequest bean) {
return arMapper.listPersonnelInfo(bean);
}
private static @org.jetbrains.annotations.NotNull SysFileInfo getFileInfo(String classification, String fromType, String informationType,
String uuid) {

View File

@ -241,6 +241,18 @@ public class EquipServiceImpl implements EquipService {
// }
// return list;
// }
/**
* 特种设备列表
* @param bean
* @return
*/
@Override
public List<Equipment> listEquipment(Equipment bean) {
List<Equipment> list = mapper.listEquipment(bean);
return list;
}
/**
* 获取工器具文件列表
* @param bean 工器具bean

View File

@ -84,7 +84,7 @@ public class ProjectServiceImpl implements ProjectService {
for (BaseBean bean : list) {
//获取处理后的短信内容
String content = getMessage(bean);
// ShortMessageUtils.sendShortMessage(bean.getUuid(), content);
// ShortMessageUtils.sendShortMessage(bean.getUuid(), content);
MsgBean b = new MsgBean();
b.setPhone(bean.getUuid());
b.setMsg(content);
@ -103,8 +103,10 @@ public class ProjectServiceImpl implements ProjectService {
@Value("${user.url}")
private String url;
/**
* 短信内容处理
*
* @param bean 实体
* @return 短信内容
*/
@ -112,10 +114,10 @@ public class ProjectServiceImpl implements ProjectService {
private String getMessage(BaseBean bean) {
String content;
if (StaticVariableUtils.ZERO_01.equals(bean.getUserType())) {
content = bean.getProName() + "工程即将开工,请及时上传相关入场文件!浏览器网址:"+url+
content = bean.getProName() + "工程即将开工,请及时上传相关入场文件!浏览器网址:" + url +
";初始账号:" + bean.getUuid() + ",初始密码:" + supervisionPassword;
} else {
content = bean.getProName() + "工程即将开工,请及时上传相关入场文件!浏览器网址:"+url+
content = bean.getProName() + "工程即将开工,请及时上传相关入场文件!浏览器网址:" + url +
"初始账号:" + bean.getUuid() + ",初始密码:" + contractorPassword;
}
return content;
@ -159,7 +161,7 @@ public class ProjectServiceImpl implements ProjectService {
projectMapper.delConsPersonToPcp(project);
projectMapper.delConsPersonToLk(project);
}catch (Exception e){
} catch (Exception e) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
log.error("Failed to delete project due to exception", e);
}
@ -178,12 +180,12 @@ public class ProjectServiceImpl implements ProjectService {
//设置回滚点
Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
try {
if(StringHelper.isNullOrEmptyString(bean.getJlId())){
return AjaxResult.error("请先选择监理单位");
}else {
if (StringHelper.isNullOrEmptyString(bean.getJlId())) {
return AjaxResult.error("请先选择监理单位");
} else {
//对监理人员信息进行赋值
SupervisoryUnit unit= projectMapper.getSupervisoryUnitById(bean);
if(unit==null){
SupervisoryUnit unit = projectMapper.getSupervisoryUnitById(bean);
if (unit == null) {
return AjaxResult.error("监理单位不存在");
}
bean.setJlUuid(unit.getJlUuid());
@ -206,7 +208,7 @@ public class ProjectServiceImpl implements ProjectService {
//查询身份证是否重复
result = projectMapper.checkIsExistIdCard(bean.getDirectorsIdCard());
if (result > 0) {
return AjaxResult.error("总监身份证号码已存在!");
return AjaxResult.error("总监身份证号码已存在!");
}
// 添加监理信息到人员表
AdmissionRequest admissionRequest = new AdmissionRequest();
@ -217,7 +219,7 @@ public class ProjectServiceImpl implements ProjectService {
if (result <= 0) {
TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
// 抛出异常触发事务回滚
return AjaxResult.error("添加总监人员失败!");
return AjaxResult.error("添加总监人员失败!");
}
//向SysUser bean中添加监理人员id
SysUser sysUser = new SysUser();
@ -232,28 +234,29 @@ public class ProjectServiceImpl implements ProjectService {
// 新增用户角色信息
insertUserRole(Long.valueOf(bean.getId()), roleIds);
} else {
return AjaxResult.error("总监手机号已存在!");
return AjaxResult.error("总监手机号已存在!");
}
// 添加监理信息到监理单位表
result = projectMapper.addSupervisoryUnit(bean);
if (result > 0) {
// 抛出异常触发事务回滚
return AjaxResult.success("添加成功");
return AjaxResult.success("添加成功");
}
TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
// 返回操作结果可能是插入的记录数或者其他标识
} catch (Exception e) {
// 手动进行回滚
TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
log.error(e.toString(),e);
log.error(e.toString(), e);
}
return AjaxResult.error("添加总监人员失败,请联系管理员!");
return AjaxResult.error("添加总监人员失败,请联系管理员!");
}
@Override
public AjaxResult addSupervisoryUnitUser(SupervisoryUnit bean) {
try{
int nums=projectMapper.getSupervisoryUnitUser(bean);
if(nums>0){
try {
int nums = projectMapper.getSupervisoryUnitUser(bean);
if (nums > 0) {
return AjaxResult.error("监理单位名称已存在");
}
// 新增监理信息到人员表
@ -261,36 +264,38 @@ public class ProjectServiceImpl implements ProjectService {
bean.setCreatePerson(SecurityUtils.getUsername());
bean.setCreatePersonId(String.valueOf(SecurityUtils.getUserId()));
bean.setUuid(StringUtils.getUuid());
int successNum=projectMapper.addSupervisoryUnitUser(bean);
if(successNum<1){
int successNum = projectMapper.addSupervisoryUnitUser(bean);
if (successNum < 1) {
return AjaxResult.error("监理单位添加失败,请联系管理员");
}
return AjaxResult.success("添加成功",bean);
}catch (Exception e){
log.error(e.toString(),e);
return AjaxResult.success("添加成功", bean);
} catch (Exception e) {
log.error(e.toString(), e);
}
return AjaxResult.error("监理单位添加失败,请联系管理员");
}
/**
* 查询工程必填项
*
* @param entity
* @return
*/
@Override
public AjaxResult getProRequest(Project entity) {
try{
List<String> list=projectMapper.getProRequest(entity);
String data= String.join(",", list);
return AjaxResult.success(data);
}catch (Exception e){
log.error(e.toString(),e);
try {
List<String> list = projectMapper.getProRequest(entity);
String data = String.join(",", list);
return AjaxResult.success(data);
} catch (Exception e) {
log.error(e.toString(), e);
}
return AjaxResult.error("查询参数异常");
return AjaxResult.error("查询参数异常");
}
/**
* 新增承包商单位
*
* @param bean 监理单位实体
* @return 是否新增成功
*/
@ -528,6 +533,31 @@ public class ProjectServiceImpl implements ProjectService {
throw new RuntimeException("Failed to add address project");
}
}
//插入承包商-工程关联信息(先删后增---临时先放开 后期可能会删除)
projectMapper.delConsProject(project);
projectMapper.delMaterialProject(project);
projectMapper.delConsPersonToPcp(project);
projectMapper.delConsPersonToLk(project);
for (int i = 0; i < project.getConsArr().size(); i++) {
project.setConsId(projectMapper.getConsUuid(project.getConsArr().get(i).getValue()));
project.setRelateUuid(StringUtils.getUuid());
result = projectMapper.addConsProject(project);
if (result <= 0) {
throw new RuntimeException("Failed to add cons project");
}
for (int j = 0; j < project.getConsArr().get(i).getCheckList().size(); j++) {
//插入材料-工程关联信息
project.setMaterialId(project.getConsArr().get(i).getCheckList().get(j));
project.setRelateUuid(StringUtils.getUuid());
project.setConsId(project.getConsArr().get(i).getValue());
result = projectMapper.addMaterialProject(project);
if (result <= 0) {
throw new RuntimeException("Failed to add material project");
}
}
// TODO 获取承包商信息 --- 新增承包商信息到承包商人员表
addConsPerson(project);
}
} catch (Exception e) {
result = 0;
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
@ -536,7 +566,6 @@ public class ProjectServiceImpl implements ProjectService {
}
/**
* 插入关联信息
*
@ -588,6 +617,7 @@ public class ProjectServiceImpl implements ProjectService {
}
return result;
}
/**
* 新增监理人员
*
@ -603,6 +633,7 @@ public class ProjectServiceImpl implements ProjectService {
//插入关联表
projectMapper.addSupPersonToLk(subPerson);
}
/**
* 新增承包商人员
*

View File

@ -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,94 @@ 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);
}
/**
* 获取入场监管人员列表
* @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

@ -534,6 +534,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginTime != null and params.beginTime != ''">
and pfp.create_time between #{params.beginTime} and #{params.endTime}
</if>
order by pfp.create_time desc
</select>
@ -593,6 +594,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and lpec.pro_id = #{proId}
</if>
</select>
<select id="listPersonnelInfo" resultType="com.bonus.project.domain.AdmissionRequest">
SELECT
lkc.id AS id,
lkc.uuid AS uuid,
lkc.pro_id AS proId,
lkc.cont_uuid AS contUuid,
lkc.cons_persion_id AS consPersonId,
lkc.cont_uuid AS contUuid,
lkc.sub_uuid AS subUuid,
lkc.admission_date AS admissionDate,
lkc.departure_date AS departureDate,
case lkc.into_status
when '1' then '待审批'
when '2' then '审批中'
when '3' then '已通过'
when '4' then '已驳回'
when '5' then '已撤回'
end as status,
lkc.task_id_out AS `taskId`,
lkc.proc_inst_id_out as procInsId,
pcp.cons_user_id AS consUserId,
pcp.cons_name AS consName,
if(pcp.sex = '0', '男', '女') AS sex,
pcp.age AS age,
pcp.phone AS phone,
pcp.native AS natives,
pcp.id_card AS idCard,
pcp.nation AS nation,
pcp.home_address AS homeAddress,
pcp.address AS address,
sdd.dict_label AS post,
IFNULL(pcp.work_type, '暂无') AS workType,
pcp.face_path AS facePath,
pcp.person_type AS personType,
pcp.create_time AS createTime,
pcp.update_time AS updateTime
FROM
lk_cont_person lkc
LEFT JOIN
pt_cons_person pcp ON lkc.cons_persion_id = pcp.cons_user_id
AND pcp.is_active = '1'
left join sys_dict_data sdd on sdd.dict_value = pcp.post and sdd.dict_type = 'sys_cons_post' and sdd.status =
'0'
WHERE
lkc.into_status = '3' and lkc.out_status != '3' and pcp.post = '1'
</select>
<insert id="addPtCheckConfigurationDetails">

View File

@ -218,5 +218,36 @@
group by ppt.tools_id
</select>
<select id="listEquipment" resultType="com.bonus.project.domain.Equipment">
select
ppt.tools_id as id,
ppt.pro_id as proId,
ppt.cont_uuid as conSuuid,
ppt.task_id as taskId,
ppt.proc_inst_id as procInsId,
ppt.uuid as uuid,
ppt.tools_name as equipName,
ppt.tools_model as model,
ppt.tools_unit as unit,
ppt.tools_num as num,
sdd1.dict_label as equipType,
ppt.detection_time as detectionTime,
ppt.next_detection_time as nextDetectionTime,
if(ppt.is_detection = '1','是','否') as isForceDetection,
ppt.create_time as createTime,
ppt.admission_date as admissionDate,
ppt.departure_date as departureDate,
ppt.status as intoStatus,
'0' as status,
group_concat(pci.information_path) as filePath
from pt_pro_tools ppt
left join sys_dict_data sdd1 on sdd1.dict_value = ppt.tools_type and sdd1.dict_type = 'sys_tools_type' and
sdd1.status = '0'
left join sys_dict_data sdd on sdd.dict_value = ppt.status and sdd.dict_type = 'sys_approval_state' and
sdd.status = '0'
left join pt_cons_information pci on pci.uuid = ppt.uuid and pci.from_type = '4' and pci.information_type = '4'
and pci.is_active = '1'
where ppt.is_active = '1' and ppt.status = '3' and ppt.tools_type = '2' group by ppt.tools_id
</select>
</mapper>

View File

@ -535,6 +535,7 @@
select
pro_id as id,
pro_name as proName,
is_outsource as isOutsource,
if(pro_status = '3','在建中','筹备中') as proStatus
from pt_project_info
where is_active = '1' and (pro_status = '3' or pro_status = '2')

View File

@ -86,7 +86,7 @@
SELECT
ss.create_user_id as snapshotId,
ss.phone as phone,
ss.create_user_name as userName,
su.nick_name as userName,
ss.dept_name as deptName,
ss.post_name as postName,
count(1) as num,
@ -102,6 +102,7 @@
from sys_role sr
LEFT JOIN sys_user_role sur ON sur.role_id = sr.role_id
group by sur.user_id)r on r.user_id = ss.create_user_id
LEFT JOIN sys_user su on su.user_id = ss.create_user_id
WHERE ss.is_active = '1'
<if test="phone != null and phone != ''">
and ss.phone like concat('%', #{phone}, '%')
@ -133,4 +134,4 @@
and st_id = #{snapshotId}
</if>
</select>
</mapper>
</mapper>

View File

@ -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
@ -204,7 +204,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND ppi.pro_name like concat('%',#{proName},'%')
</if>
<if test="supName != null and supName != ''">
AND ppi.sup_name like concat('%',#{supName},'%')
AND ppi.sup_unit_name like concat('%',#{supName},'%')
</if>
<if test="proId != null and proId != ''">
AND ppi.pro_id = #{proId}
@ -243,13 +243,322 @@ 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,
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,
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,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 = '0'
<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="intoStatus != null and intoStatus != ''">
and lsp.into_status = #{intoStatus}
</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,
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,
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 = '0'
<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="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>
</mapper>
</mapper>