浏览代码

查找待打卡sop更新

wangliang 1 年之前
父节点
当前提交
6c6619f86e
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      sop-business/src/main/resources/mapper/TBSopInfoMapper.xml

+ 4 - 2
sop-business/src/main/resources/mapper/TBSopInfoMapper.xml

@@ -212,8 +212,10 @@
         </where>) t
         join t_f_custom_flow_entity tfcfe on tfcfe.code = t.sop_no
         join t_f_flow_approve tffa on tffa.flow_id = tfcfe.flow_id
---         where t.status = 'DRAFT' and (tffa.status in ('START', 'DRAFT', 'AUDITING', 'REJECT', 'CANCEL') or (tffa.status = 'FINISH' and (t.datediff <![CDATA[ >= ]]> -1 and t.datediff <![CDATA[ <= ]]> 0)))
-        where (tffa.status in ('START', 'DRAFT', 'AUDITING', 'REJECT', 'CANCEL') or (tffa.status = 'FINISH' and (t.datediff <![CDATA[ >= ]]> -1 and t.datediff <![CDATA[ <= ]]> 0)))
+        join t_b_crm_detail tbcd on tbcd.sop_no = tbsi.sop_no
+        join t_b_user_archives_allocation tbuaa on tbuaa.crm_detail_id = tbcd.id
+        --         where t.status = 'DRAFT' and (tffa.status in ('START', 'DRAFT', 'AUDITING', 'REJECT', 'CANCEL') or (tffa.status = 'FINISH' and (t.datediff <![CDATA[ >= ]]> -1 and t.datediff <![CDATA[ <= ]]> 0)))
+        where tbuaa.sop_role_type = 'ENGINEER' and (tffa.status in ('START', 'DRAFT', 'AUDITING', 'REJECT', 'CANCEL') or (tffa.status = 'FINISH' and (t.datediff <![CDATA[ >= ]]> -1 and t.datediff <![CDATA[ <= ]]> 0)))
     </select>
 
     <select id="findFlowByServiceId" resultType="com.qmth.sop.business.bean.result.SopInfoResult">