Procházet zdrojové kódy

委托结项查询bug修改

丁治程 před 1 rokem
rodič
revize
417dcfe872

+ 25 - 71
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/mapper/xml/ItdmWeituoInfoMapper.xml

@@ -5,76 +5,30 @@
 
 
     <select id="getWeituoList" resultType="org.jeecg.modules.weituo.entity.ItdmWeituoJieXaingVo">
-        SELECT
-        w.*,
-        t.id AS planid,
-        t.weituo_id,
-        t.test_items_id,
-        t.weituo_yangpin_id,
-        t.shebei_id,
-        t.pm,
-        ye.test_items,
-        y.sample_name
-        FROM
-        itdm_weituo_info w
-        LEFT JOIN itdm_test_plan t ON w.id = t.weituo_id
-        LEFT JOIN itdm_weituo_yangpin_extend ye ON t.test_items_id = ye.id
-        LEFT JOIN itdm_weituo_yangpin y ON t.weituo_yangpin_id = y.id
-        ORDER BY
-        w.weituo_no
-        <!--        select-->
-<!--        t.id as planid,-->
-<!--        t.weituo_id,-->
-<!--        test_items_id,-->
-<!--        t.weituo_yangpin_id,-->
-<!--        t.shebei_id,-->
-<!--        t.pm,-->
-<!--        ye.test_items,-->
-<!--        y.sample_name,-->
-<!--        w.*-->
-<!--        from itdm_test_plan t-->
-<!--        left join itdm_weituo_yangpin_extend  ye-->
-<!--        on t.test_items_id = ye.id-->
-<!--        left join itdm_weituo_yangpin y-->
-<!--        on t.weituo_yangpin_id = y.id-->
-<!--        left join itdm_weituo_info w-->
-<!--        on t.weituo_id = w.id-->
-<!--        <where>-->
-<!--            <if test="itdmWeituoInfo.weituoClient != null">-->
-<!--                w.weituo_client like CONCAT('%', #{itdmWeituoInfo.weituoClient},'%')-->
-<!--            </if>-->
-<!--        </where>-->
-<!--        ORDER BY-->
-<!--        w.weituo_no-->
-
-<!--        select-->
-<!--        t.id as planid,-->
-<!--        t.weituo_id,-->
-<!--        t.test_items_id,-->
-<!--        t.weituo_yangpin_id,-->
-<!--        t.shebei_id,-->
-<!--        t.pm,-->
-<!--        e.device_name,-->
-<!--        y.sample_name,-->
-<!--        w.*-->
-<!--        from itdm_weituo_yangpin_extend  ye-->
-<!--        left join itdm_test_plan t-->
-<!--        on ye.id = t.test_items_id-->
-<!--        left join itdm_weituo_yangpin y-->
-<!--        on ye.yangpin_id = y.id-->
-<!--        LEFT JOIN itdm_device e-->
-<!--        ON t.shebei_id = e.id-->
-<!--        left join itdm_weituo_info w-->
-<!--        on t.weituo_id = w.id-->
-<!--        <where>-->
-<!--            ye.weituo_id in (select id from itdm_weituo_info where itdm_weituo_info.complete_status = 0 and itdm_weituo_info.shenhe_status = '1')-->
-<!--            <if test="itdmWeituoInfo.weituoClient != null">-->
-<!--               and w.weituo_client like CONCAT('%', #{itdmWeituoInfo.weituoClient},'%')-->
-<!--            </if>-->
-<!--        </where> -->
-<!--        ORDER BY-->
-<!--        w.weituo_no-->
-
-
+        SELECT * FROM
+        (
+            SELECT
+            w.*,
+            t.id AS planid,
+            t.weituo_id,
+            t.test_items_id,
+            t.weituo_yangpin_id,
+            t.shebei_id,
+            t.pm,
+            ye.test_items,
+            y.sample_name
+            FROM
+            itdm_weituo_info w
+            LEFT JOIN itdm_test_plan t ON w.id = t.weituo_id
+            LEFT JOIN itdm_weituo_yangpin_extend ye ON t.test_items_id = ye.id
+            LEFT JOIN itdm_weituo_yangpin y ON t.weituo_yangpin_id = y.id
+            <where>
+                <if test="itdmWeituoInfo.weituoClient != null">
+                    w.weituo_client like CONCAT('%', #{itdmWeituoInfo.weituoClient},'%')
+                </if>
+            </where>
+            ORDER BY
+            w.weituo_no
+        ) e
     </select>
 </mapper>