parent
7143c27031
commit
5525c6474b
|
|
@ -256,7 +256,7 @@ public class QmsIssueTicketProcessMeasureControllerService {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (StrUtil.isBlank(item.getChargeUser())) {
|
if (StrUtil.isBlank(item.getChargeUser())) {
|
||||||
throw new NflgException(STATE.BusinessError, "措施负责人不能为空");
|
item.setChargeUser(currentUserName);
|
||||||
}
|
}
|
||||||
return StrUtil.equals(item.getChargeUser(), currentUserName);
|
return StrUtil.equals(item.getChargeUser(), currentUserName);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -308,6 +308,7 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
vo.setSelfTesterName(record.getSelfTesterName());
|
vo.setSelfTesterName(record.getSelfTesterName());
|
||||||
vo.setReviewerId(record.getReviewerId());
|
vo.setReviewerId(record.getReviewerId());
|
||||||
vo.setReviewerName(record.getReviewerName());
|
vo.setReviewerName(record.getReviewerName());
|
||||||
|
vo.setCurrentHandlerName(getPqcCurrentHandlerName(record));
|
||||||
|
|
||||||
vo.setStatus(record.getStatus());
|
vo.setStatus(record.getStatus());
|
||||||
vo.setCreateTime(record.getCreateTime());
|
vo.setCreateTime(record.getCreateTime());
|
||||||
|
|
@ -408,6 +409,7 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
vo.setModelNo(record.getModelNo());
|
vo.setModelNo(record.getModelNo());
|
||||||
vo.setAufnr(record.getAufnr());
|
vo.setAufnr(record.getAufnr());
|
||||||
vo.setCreateTime(record.getCreateTime());
|
vo.setCreateTime(record.getCreateTime());
|
||||||
|
vo.setCurrentHandlerName(getPqcCurrentHandlerName(record));
|
||||||
|
|
||||||
QmsPqcInspectionPoint point = finalPointMap.get(record.getInspectionPointId());
|
QmsPqcInspectionPoint point = finalPointMap.get(record.getInspectionPointId());
|
||||||
if (point != null) {
|
if (point != null) {
|
||||||
|
|
@ -432,6 +434,20 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
/**
|
/**
|
||||||
* 3. 查询PQC任务详情(PC端)
|
* 3. 查询PQC任务详情(PC端)
|
||||||
*/
|
*/
|
||||||
|
private String getPqcCurrentHandlerName(QmsPqcTaskRecord record) {
|
||||||
|
if (record == null || record.getStatus() == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (Objects.equals(record.getStatus(), (short) 0)) {
|
||||||
|
return record.getSelfTesterName();
|
||||||
|
}
|
||||||
|
if (Objects.equals(record.getStatus(), (short) 1)
|
||||||
|
|| Objects.equals(record.getStatus(), (short) 2)) {
|
||||||
|
return record.getReviewerName();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public QmsPqcTaskRecordDetailVO getPqcTaskDetail(Long taskId) {
|
public QmsPqcTaskRecordDetailVO getPqcTaskDetail(Long taskId) {
|
||||||
QmsPqcTaskRecord taskRecord = pqcTaskRecordService.getById(taskId);
|
QmsPqcTaskRecord taskRecord = pqcTaskRecordService.getById(taskId);
|
||||||
VUtil.trueThrowBusinessError(taskRecord == null).throwMessage("任务不存在");
|
VUtil.trueThrowBusinessError(taskRecord == null).throwMessage("任务不存在");
|
||||||
|
|
|
||||||
|
|
@ -176,6 +176,8 @@ public class QmsIncomingInspectionTaskVO {
|
||||||
*/
|
*/
|
||||||
private String agentName;
|
private String agentName;
|
||||||
|
|
||||||
|
private String currentHandlerName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 送检时间
|
* 送检时间
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@ public class QmsPdiInspectionResultsPageVO {
|
||||||
*/
|
*/
|
||||||
private Integer inspectionEnable;
|
private Integer inspectionEnable;
|
||||||
|
|
||||||
|
private String currentHandlerName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否超期
|
* 是否超期
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,8 @@ public class QmsPdiTaskRecordDefectPageVO {
|
||||||
*/
|
*/
|
||||||
private Long assistantId;
|
private Long assistantId;
|
||||||
|
|
||||||
|
private String currentHandlerName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质检时间(开始检测时间)
|
* 质检时间(开始检测时间)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,8 @@ public class QmsPdiTaskRecordPageVO {
|
||||||
*/
|
*/
|
||||||
private String assistantName;
|
private String assistantName;
|
||||||
|
|
||||||
|
private String currentHandlerName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质检时间(开始检测时间)
|
* 质检时间(开始检测时间)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,8 @@ public class QmsPqcTaskRecordPageVO {
|
||||||
*/
|
*/
|
||||||
private String reviewerName;
|
private String reviewerName;
|
||||||
|
|
||||||
|
private String currentHandlerName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检验状态:0为自检中,1为待复核,2为复核中,3为已复核
|
* 检验状态:0为自检中,1为待复核,2为复核中,3为已复核
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ public class QmsPqcTaskRecordTabletPageVO {
|
||||||
*/
|
*/
|
||||||
private Short status;
|
private Short status;
|
||||||
|
|
||||||
|
private String currentHandlerName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,11 @@
|
||||||
t.inspector_name,
|
t.inspector_name,
|
||||||
t.agent_id,
|
t.agent_id,
|
||||||
t.agent_name,
|
t.agent_name,
|
||||||
|
CASE
|
||||||
|
WHEN t.agent_name IS NOT NULL AND t.inspector_name IS NOT NULL AND t.agent_name != t.inspector_name
|
||||||
|
THEN t.agent_name || ';' || t.inspector_name
|
||||||
|
ELSE COALESCE(t.agent_name, t.inspector_name)
|
||||||
|
END AS current_handler_name,
|
||||||
t.submit_time,
|
t.submit_time,
|
||||||
t.inspection_start_time,
|
t.inspection_start_time,
|
||||||
t.inspection_finish_time,
|
t.inspection_finish_time,
|
||||||
|
|
@ -133,6 +138,11 @@
|
||||||
t.inspector_name,
|
t.inspector_name,
|
||||||
t.agent_id,
|
t.agent_id,
|
||||||
t.agent_name,
|
t.agent_name,
|
||||||
|
CASE
|
||||||
|
WHEN t.agent_name IS NOT NULL AND t.inspector_name IS NOT NULL AND t.agent_name != t.inspector_name
|
||||||
|
THEN t.agent_name || ';' || t.inspector_name
|
||||||
|
ELSE COALESCE(t.agent_name, t.inspector_name)
|
||||||
|
END AS current_handler_name,
|
||||||
t.submit_time,
|
t.submit_time,
|
||||||
t.inspection_start_time,
|
t.inspection_start_time,
|
||||||
t.inspection_finish_time,
|
t.inspection_finish_time,
|
||||||
|
|
@ -198,6 +208,11 @@
|
||||||
t.inspector_name,
|
t.inspector_name,
|
||||||
t.agent_id,
|
t.agent_id,
|
||||||
t.agent_name,
|
t.agent_name,
|
||||||
|
CASE
|
||||||
|
WHEN t.agent_name IS NOT NULL AND t.inspector_name IS NOT NULL AND t.agent_name != t.inspector_name
|
||||||
|
THEN t.agent_name || ';' || t.inspector_name
|
||||||
|
ELSE COALESCE(t.agent_name, t.inspector_name)
|
||||||
|
END AS current_handler_name,
|
||||||
t.submit_time,
|
t.submit_time,
|
||||||
t.inspection_start_time,
|
t.inspection_start_time,
|
||||||
t.inspection_finish_time,
|
t.inspection_finish_time,
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,16 @@
|
||||||
t.submission_time AS submissionTime,
|
t.submission_time AS submissionTime,
|
||||||
t.required_completion_time AS requiredCompletionTime,
|
t.required_completion_time AS requiredCompletionTime,
|
||||||
t.inspection_enable AS inspectionEnable,
|
t.inspection_enable AS inspectionEnable,
|
||||||
|
CASE
|
||||||
|
WHEN ua.user_name IS NOT NULL AND ui.user_name IS NOT NULL AND ua.user_name != ui.user_name
|
||||||
|
THEN ua.user_name || ';' || ui.user_name
|
||||||
|
ELSE COALESCE(ua.user_name, ui.user_name)
|
||||||
|
END AS currentHandlerName,
|
||||||
t.overdue
|
t.overdue
|
||||||
FROM qms_pdi_task_record t
|
FROM qms_pdi_task_record t
|
||||||
LEFT JOIN qms_pdi_detection_rules r ON r.id = t.detection_rules_id
|
LEFT JOIN qms_pdi_detection_rules r ON r.id = t.detection_rules_id
|
||||||
|
LEFT JOIN "user" ui ON ui.id = r.inspector_id
|
||||||
|
LEFT JOIN "user" ua ON ua.id = t.assistant_id
|
||||||
<where>
|
<where>
|
||||||
<!-- 权限过滤:只能看自己是帮办人或质检负责人的任务单 -->
|
<!-- 权限过滤:只能看自己是帮办人或质检负责人的任务单 -->
|
||||||
<if test="request.userId != null">
|
<if test="request.userId != null">
|
||||||
|
|
@ -54,9 +61,16 @@
|
||||||
t.submission_time AS submissionTime,
|
t.submission_time AS submissionTime,
|
||||||
t.required_completion_time AS requiredCompletionTime,
|
t.required_completion_time AS requiredCompletionTime,
|
||||||
t.inspection_enable AS inspectionEnable,
|
t.inspection_enable AS inspectionEnable,
|
||||||
|
CASE
|
||||||
|
WHEN ua.user_name IS NOT NULL AND ui.user_name IS NOT NULL AND ua.user_name != ui.user_name
|
||||||
|
THEN ua.user_name || ';' || ui.user_name
|
||||||
|
ELSE COALESCE(ua.user_name, ui.user_name)
|
||||||
|
END AS currentHandlerName,
|
||||||
t.overdue
|
t.overdue
|
||||||
FROM qms_pdi_task_record t
|
FROM qms_pdi_task_record t
|
||||||
LEFT JOIN qms_pdi_detection_rules r ON r.id = t.detection_rules_id
|
LEFT JOIN qms_pdi_detection_rules r ON r.id = t.detection_rules_id
|
||||||
|
LEFT JOIN "user" ui ON ui.id = r.inspector_id
|
||||||
|
LEFT JOIN "user" ua ON ua.id = t.assistant_id
|
||||||
<where>
|
<where>
|
||||||
<if test="request.userId != null">
|
<if test="request.userId != null">
|
||||||
AND (t.assistant_id = #{request.userId} OR r.inspector_id = #{request.userId})
|
AND (t.assistant_id = #{request.userId} OR r.inspector_id = #{request.userId})
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,11 @@
|
||||||
t.inspection_inspection AS inspectionInspection,
|
t.inspection_inspection AS inspectionInspection,
|
||||||
ui.user_name AS inspectorName,
|
ui.user_name AS inspectorName,
|
||||||
ua.user_name AS assistantName,
|
ua.user_name AS assistantName,
|
||||||
|
CASE
|
||||||
|
WHEN ua.user_name IS NOT NULL AND ui.user_name IS NOT NULL AND ua.user_name != ui.user_name
|
||||||
|
THEN ua.user_name || ';' || ui.user_name
|
||||||
|
ELSE COALESCE(ua.user_name, ui.user_name)
|
||||||
|
END AS currentHandlerName,
|
||||||
t.start_detection_time AS startDetectionTime,
|
t.start_detection_time AS startDetectionTime,
|
||||||
t.submission_time AS submissionTime,
|
t.submission_time AS submissionTime,
|
||||||
t.required_completion_time AS requiredCompletionTime,
|
t.required_completion_time AS requiredCompletionTime,
|
||||||
|
|
@ -82,6 +87,11 @@
|
||||||
r.inspector_id AS inspectorId,
|
r.inspector_id AS inspectorId,
|
||||||
ua.user_name AS assistantName,
|
ua.user_name AS assistantName,
|
||||||
t.assistant_id AS assistantId,
|
t.assistant_id AS assistantId,
|
||||||
|
CASE
|
||||||
|
WHEN ua.user_name IS NOT NULL AND ui.user_name IS NOT NULL AND ua.user_name != ui.user_name
|
||||||
|
THEN ua.user_name || ';' || ui.user_name
|
||||||
|
ELSE COALESCE(ua.user_name, ui.user_name)
|
||||||
|
END AS currentHandlerName,
|
||||||
t.start_detection_time AS startDetectionTime,
|
t.start_detection_time AS startDetectionTime,
|
||||||
t.submission_time AS submissionTime,
|
t.submission_time AS submissionTime,
|
||||||
t.required_completion_time AS requiredCompletionTime,
|
t.required_completion_time AS requiredCompletionTime,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue