Merge remote-tracking branch '惠信/qms/develop' into qms/develop

This commit is contained in:
曹鹏飞 2026-05-14 11:28:05 +08:00
commit 4e32725dc7
3 changed files with 11 additions and 8 deletions

View File

@ -300,9 +300,9 @@ public class QmsIssueTicketControllerService {
throw new NflgException(STATE.BusinessError, "PDI检测任务记录不存在");
}
// 2. 校验任务状态必须为3待流转
if (!Objects.equals(taskRecord.getInspectionEnable(), 3)) {
throw new NflgException(STATE.BusinessError, "只有待流转状态的任务才能创建工单,当前状态:" + taskRecord.getInspectionEnable());
// 2. 校验任务状态必须为3待流转或4逾期
if (!Objects.equals(taskRecord.getInspectionEnable(), 3) && !Objects.equals(taskRecord.getInspectionEnable(), 4)) {
throw new NflgException(STATE.BusinessError, "只有待流转或逾期状态的任务才能创建工单,当前状态:" + taskRecord.getInspectionEnable());
}
// 3. 校验是否已存在工单
@ -923,9 +923,9 @@ public class QmsIssueTicketControllerService {
throw new NflgException(STATE.BusinessError, "PDI检测任务记录不存在");
}
// 校验任务状态必须为3待流转
if (!Objects.equals(taskRecord.getInspectionEnable(), 3)) {
throw new NflgException(STATE.BusinessError, "只有待流转状态的任务才能创建工单,当前状态:" + taskRecord.getInspectionEnable());
// 校验任务状态必须为3待流转或4逾期
if (!Objects.equals(taskRecord.getInspectionEnable(), 3) && !Objects.equals(taskRecord.getInspectionEnable(), 4)) {
throw new NflgException(STATE.BusinessError, "只有待流转或逾期状态的任务才能创建工单,当前状态:" + taskRecord.getInspectionEnable());
}
// 校验是否已存在工单同一taskRecordId只能创建一次工单

View File

@ -14,7 +14,7 @@ public class QmsPdiInspectionResultsSearchQO {
private String key;
/**
* 任务状态可选0=待流转1=质检中2=已完成3=待流转逾期
* 任务状态可选0=待流转1=质检中2=已完成3=待流转4=逾期根据overdue字段动态判断
*/
private Integer inspectionEnable;

View File

@ -32,9 +32,12 @@
)
</if>
<!-- 任务状态筛选 -->
<if test="request.inspectionEnable != null">
<if test="request.inspectionEnable != null and request.inspectionEnable != 4">
AND t.inspection_enable = #{request.inspectionEnable}
</if>
<if test="request.inspectionEnable != null and request.inspectionEnable == 4">
AND t.overdue = true
</if>
</where>
ORDER BY t.id DESC
</select>