1.新增测试项查询接口

This commit is contained in:
2024-12-10 08:42:06 +08:00
parent 8a0e0d8c08
commit 8055d08bda
4 changed files with 25 additions and 3 deletions

View File

@@ -49,5 +49,5 @@ public interface WlRecordMapper extends BaseMapper<WlRecord> {
List<CsLedgerVO> getAllLine(@Param("devId") String devId);
List<WlRecord> getWlAssByWlId(String wlId);
List<WlRecord> getWlAssByWlId(@Param("wlId") String wlId);
}

View File

@@ -95,6 +95,21 @@
</select>
<select id="getWlAssByWlId" resultType="com.njcn.csdevice.pojo.po.WlRecord">
SELECT
a.*,c.data_level as dataLevel
FROM
wl_record a
inner join cs_line b on a.line_id = b.line_id
inner join cs_data_set c on b.data_set_id = c.id
WHERE
a.type = 1 and
a.id IN (SELECT data_id FROM wl_record_test_data WHERE test_item_id = #{wlId} )
UNION
SELECT
a.*,null as dataLevel
FROM
wl_record a
WHERE
a.id = #{wlId}
</select>
</mapper>

View File

@@ -61,6 +61,7 @@ import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -642,7 +643,7 @@ public class WlRecordServiceImpl extends ServiceImpl<WlRecordMapper, WlRecord> i
@Override
public List<WlRecord> getWlAssByWlId(String wlId) {
return this.baseMapper.getDataRecordByTestId(wlId,0);
return this.baseMapper.getWlAssByWlId(wlId);
}
@Override