Browse Source

计划排期查询加上实绩日期

LLL 1 year ago
parent
commit
a3b6d8ab42

+ 16 - 1
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/mapper/ItdmGongdanMasterMapper.java

@@ -1,9 +1,10 @@
 package org.jeecg.modules.itdmGongDan.mapper;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanMaster;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.itdmGongDan.vo.ShijiDate;
 
 import java.util.List;
 
@@ -20,4 +21,18 @@ public interface ItdmGongdanMasterMapper extends BaseMapper<ItdmGongdanMaster> {
             "where t.weituo_id = #{weituoId}")
     public List<String> selectWoIdListByWeituoId(@Param("weituoId") String weituoId);
 
+    /**
+     * 根据委托id查工单master
+     */
+    @Select("select * from itdm_gongdan_master where jihua_shiyan_id in " +
+            "(select id from itdm_test_plan where weituo_id = #{weituoId})")
+    public List<ItdmGongdanMaster> listByWeituoId(@Param("weituoId") String weituoId);
+
+    /**
+     * 根据计划试验id查所有工单master的最早实绩开始日期和最晚实绩结束日期
+     */
+    @Select("select max(shiji_end_date) as shijiEndDate, min(shiji_start_date) as shijiStartDate from itdm_gongdan_master " +
+            "where jihua_shiyan_id = #{testPlanId}")
+    public ShijiDate getShijiDateByTestPlanId(@Param("testPlanId") String testPlanId);
+
 }