|
@@ -37,7 +37,7 @@ public class QCTestController {
|
|
|
|
|
|
@ApiOperation(value = "质控测试接口,无需token信息", notes = "")
|
|
|
@PostMapping("rec_test")
|
|
|
- public Response<OutputInfo> extract(String caseIds) {
|
|
|
+ public Response<OutputInfo> extract(String caseIds, int length, String cid) {
|
|
|
Response response = new Response();
|
|
|
PropertiesUtil propertiesUtil = new PropertiesUtil("kernel.properties");
|
|
|
|
|
@@ -55,12 +55,13 @@ public class QCTestController {
|
|
|
//测试数据查询
|
|
|
String sql = "SELECT qmap.id, qi.id text_id, qi.text, ca.name, entry.code FROM \n" +
|
|
|
"qc_inputcases_mapping qmap, qc_inputcases qi, qc_cases_entry entry, qc_cases ca\n" +
|
|
|
- "where qmap.cases_id = qi.id and qmap.cases_entry_id = entry.id and entry.cases_id = ca.id ";
|
|
|
+ "where qmap.text_id = qi.id and qmap.cases_entry_id = entry.id and entry.cases_id = ca.id ";
|
|
|
|
|
|
if (!StringUtils.isNotEmpty(caseIds)) {
|
|
|
sql = sql + " and entry.cases_id in (" + caseIds + ")";
|
|
|
}
|
|
|
sql = sql + " order by qi.id";
|
|
|
+
|
|
|
Map<String, String> map = new HashMap<>();
|
|
|
rs = st.executeQuery(sql);
|
|
|
//条目数据结构, Key = 条目Code value = 条目属性{"precode":"BEH0002,BEH0003","title":"症状缺少时间描述"}
|
|
@@ -72,7 +73,7 @@ public class QCTestController {
|
|
|
List<String> textList = new ArrayList<>();
|
|
|
List<String> caseList = new ArrayList<>();
|
|
|
List<Map<String, String>> updateList = new ArrayList<>();
|
|
|
- String textId = "";
|
|
|
+ String textId = ""; int index = 0;
|
|
|
while (rs.next()) {
|
|
|
r1 = rs.getString(1);
|
|
|
r2 = rs.getString(2);
|
|
@@ -81,6 +82,11 @@ public class QCTestController {
|
|
|
r5 = rs.getString(5);
|
|
|
if (!textId.equals(r2)) {
|
|
|
if (StringUtils.isNotEmpty(textId)) {
|
|
|
+ index++;
|
|
|
+ if (index > length) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
catalogueList.add(catalogueMap);
|
|
|
updateList.add(updateMap);
|
|
|
textList.add(r3);
|
|
@@ -106,6 +112,7 @@ public class QCTestController {
|
|
|
|
|
|
QueryVo queryVo = new QueryVo();
|
|
|
queryVo.setMedrec(medrec);
|
|
|
+ queryVo.setCid(cid);
|
|
|
queryVo.setInputCatalogueMap(catalogueList.get(i));
|
|
|
|
|
|
OutputInfo outputInfo = qCAnalysis.anlysis(queryVo);
|