Ver Fonte

fix:单次服务加入非合同工单

ly há 9 meses atrás
pai
commit
0a29ab43ff

+ 2 - 2
src/main/resources/mybatis/business/BizWorkOrderMapper.xml

@@ -24,12 +24,12 @@
         left join sys_user t5 on t5.user_id = t1.service_id
         LEFT JOIN biz_archive_input_detail t6 ON t6.id = t1.contract_detail_id
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
-            t1.deleted = 0 and t6.from_id = 0
+            t1.deleted = 0
             <if test="id != null "> AND t1.id = #{id}</if>
             <if test="contractDetailId != null "> AND t1.contract_detail_id = #{contractDetailId}</if>
             <if test="tenantId != null "> AND t1.tenant_id = #{tenantId}</if>
             <if test="companyId != null "> AND t1.company_id = #{companyId}</if>
-            <if test="type != null ">AND t1.type = #{type}</if>
+            <if test="type != null ">AND (t1.type = #{type} or t1.no_contract = 1)</if>
             <if test=" serviceId != null">AND t1.service_id = #{serviceId}</if>
             <if test="noContract != null ">AND t1.no_contract = #{noContract}</if>
             <if test="workOrderNo != null  and workOrderNo != ''">AND t1.work_order_no = #{workOrderNo}</if>