Browse Source

委托结项从委托单号开始查询

丁治程 1 year ago
parent
commit
bf93fc7e85

+ 0 - 4
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/entity/ItdmWeituoJieXaingVo.java

@@ -89,9 +89,5 @@ public class ItdmWeituoJieXaingVo implements Serializable{
     @Excel(name = "项目经理", width = 15)
     @Excel(name = "项目经理", width = 15)
     @ApiModelProperty(value = "项目经理")
     @ApiModelProperty(value = "项目经理")
     private java.lang.String pm;
     private java.lang.String pm;
-    /**设备名称*/
-    @Excel(name = "设备名称", width = 15)
-    @ApiModelProperty(value = "设备名称")
-    private java.lang.String deviceName;
 
 
 }
 }

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

@@ -5,29 +5,76 @@
 
 
 
 
     <select id="getWeituoList" resultType="org.jeecg.modules.weituo.entity.ItdmWeituoJieXaingVo">
     <select id="getWeituoList" resultType="org.jeecg.modules.weituo.entity.ItdmWeituoJieXaingVo">
-        select
-        t.id as planid,
+        SELECT
+        w.*,
+        t.id AS planid,
         t.weituo_id,
         t.weituo_id,
-        test_items_id,
+        t.test_items_id,
         t.weituo_yangpin_id,
         t.weituo_yangpin_id,
         t.shebei_id,
         t.shebei_id,
         t.pm,
         t.pm,
         ye.test_items,
         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>
+        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
         ORDER BY
         w.weituo_no
         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>
     </select>
 </mapper>
 </mapper>