任务列表、详情查询修改
This commit is contained in:
parent
b9d4237519
commit
7536b781c7
|
|
@ -13,7 +13,6 @@ import com.nflg.wms.common.pojo.vo.QmsPdiTaskRecordDefectPageVO;
|
|||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskRecordPageVO;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskRecordStatusItemGroupVO;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskRecordSummaryVO;
|
||||
import com.nflg.wms.common.util.UserUtil;
|
||||
import com.nflg.wms.repository.entity.QmsPdiComponentAnagement;
|
||||
import com.nflg.wms.repository.entity.QmsPdiDetectionRules;
|
||||
import com.nflg.wms.repository.entity.QmsPdiDetectionRulesDeliveryItem;
|
||||
|
|
@ -96,8 +95,6 @@ public class QmsPdiTaskRecordControllerService {
|
|||
*/
|
||||
public PageData<QmsPdiTaskRecordPageVO> search(QmsPdiTaskRecordSearchQO request) {
|
||||
// 填充当前登录用户ID(用于数据权限过滤)
|
||||
request.setCurrentUserId(UserUtil.getUserId());
|
||||
|
||||
Page<QmsPdiTaskRecordPageVO> page = taskRecordService.search(request);
|
||||
PageData<QmsPdiTaskRecordPageVO> result = new PageData<>();
|
||||
result.setItems(page.getRecords());
|
||||
|
|
@ -112,8 +109,6 @@ public class QmsPdiTaskRecordControllerService {
|
|||
*/
|
||||
public PageData<QmsPdiTaskRecordDefectPageVO> searchDefect(QmsPdiTaskRecordDefectSearchQO request) {
|
||||
// 填充当前登录用户ID(用于数据权限过滤)
|
||||
request.setCurrentUserId(UserUtil.getUserId());
|
||||
|
||||
Page<QmsPdiTaskRecordDefectPageVO> page = taskRecordService.searchDefect(request);
|
||||
PageData<QmsPdiTaskRecordDefectPageVO> result = new PageData<>();
|
||||
result.setItems(page.getRecords());
|
||||
|
|
|
|||
|
|
@ -56,11 +56,6 @@
|
|||
<if test="request.warehouseNo != null and request.warehouseNo != ''">
|
||||
AND t.warehouse_no = #{request.warehouseNo}
|
||||
</if>
|
||||
<!-- 权限校验:当前登录用户只能看到自己负责的数据 -->
|
||||
AND (
|
||||
r.inspector_id = #{request.currentUserId}
|
||||
OR t.assistant_id = #{request.currentUserId}
|
||||
)
|
||||
<!-- 合格物料过滤:inspection_enable=0/1/3不校验;inspection_enable=2校验自身结果+检测项结果(type=2除外) -->
|
||||
AND (
|
||||
t.inspection_inspection IS NULL
|
||||
|
|
@ -113,32 +108,6 @@
|
|||
<!-- 固定条件:已完成/待流转,且(总体不合格 或 存在不合格检测项) -->
|
||||
AND t.inspection_enable IN (2, 3)
|
||||
AND t.inspection_inspection = false
|
||||
<!-- 权限校验:当前登录用户只能看到自己负责的数据 -->
|
||||
AND (
|
||||
<!-- 无工单时:显示给质检人或帮办人 -->
|
||||
(it.id IS NULL AND (r.inspector_id = #{request.currentUserId} OR t.assistant_id = #{request.currentUserId}))
|
||||
OR
|
||||
<!-- 有工单时:显示给质检人/帮办人 或 工单处理人 或 处理人的领导 -->
|
||||
(it.id IS NOT NULL AND (
|
||||
r.inspector_id = #{request.currentUserId}
|
||||
OR t.assistant_id = #{request.currentUserId}
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM qms_issue_ticket_process p
|
||||
WHERE p.issue_ticket_id = it.id
|
||||
AND p.handler_user_id = #{request.currentUserId}
|
||||
)
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM qms_issue_ticket_process p
|
||||
LEFT JOIN "user" handler_user ON handler_user.id = p.handler_user_id
|
||||
LEFT JOIN user_interior handler_ui ON handler_ui.user_id = handler_user.id
|
||||
LEFT JOIN department handler_dept ON handler_dept.id = handler_ui.dept_id
|
||||
WHERE p.issue_ticket_id = it.id
|
||||
AND handler_dept.head_user_id = #{request.currentUserId}
|
||||
)
|
||||
))
|
||||
)
|
||||
<if test="request.inspectionType != null">
|
||||
AND r.inspection_type = #{request.inspectionType}
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue