|
@@ -57,10 +57,10 @@ public class QCTestController {
|
|
"qc_inputcases_mapping qmap, qc_inputcases qi, qc_cases_entry entry, qc_cases ca\n" +
|
|
"qc_inputcases_mapping qmap, qc_inputcases qi, qc_cases_entry entry, qc_cases ca\n" +
|
|
"where qmap.text_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)) {
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(caseIds)) {
|
|
sql = sql + " and entry.cases_id in (" + caseIds + ")";
|
|
sql = sql + " and entry.cases_id in (" + caseIds + ")";
|
|
}
|
|
}
|
|
- if (!StringUtils.isNotEmpty(txtId)) {
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(txtId)) {
|
|
sql = sql + " and qi.id = " + txtId;
|
|
sql = sql + " and qi.id = " + txtId;
|
|
}
|
|
}
|
|
sql = sql + " order by qi.id";
|
|
sql = sql + " order by qi.id";
|
|
@@ -77,19 +77,19 @@ public class QCTestController {
|
|
List<String> caseList = new ArrayList<>();
|
|
List<String> caseList = new ArrayList<>();
|
|
List<Map<String, String>> updateList = new ArrayList<>();
|
|
List<Map<String, String>> updateList = new ArrayList<>();
|
|
String textId = ""; int index = 0;
|
|
String textId = ""; int index = 0;
|
|
|
|
+ String text = ""; String caseName = "";
|
|
while (rs.next()) {
|
|
while (rs.next()) {
|
|
r1 = rs.getString(1);
|
|
r1 = rs.getString(1);
|
|
r2 = rs.getString(2);
|
|
r2 = rs.getString(2);
|
|
r3 = rs.getString(3);
|
|
r3 = rs.getString(3);
|
|
r4 = rs.getString(4);
|
|
r4 = rs.getString(4);
|
|
r5 = rs.getString(5);
|
|
r5 = rs.getString(5);
|
|
- if (!textId.equals(r2)) {
|
|
|
|
|
|
+ if (!textId.equals(String.valueOf(r2))) {
|
|
if (StringUtils.isNotEmpty(textId)) {
|
|
if (StringUtils.isNotEmpty(textId)) {
|
|
index++;
|
|
index++;
|
|
if (index > length) {
|
|
if (index > length) {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
-
|
|
|
|
catalogueList.add(catalogueMap);
|
|
catalogueList.add(catalogueMap);
|
|
updateList.add(updateMap);
|
|
updateList.add(updateMap);
|
|
textList.add(r3);
|
|
textList.add(r3);
|
|
@@ -100,6 +100,15 @@ public class QCTestController {
|
|
catalogueMap.put(r5, new HashMap<>());
|
|
catalogueMap.put(r5, new HashMap<>());
|
|
updateMap.put(r5, r1);
|
|
updateMap.put(r5, r1);
|
|
textId = r2;
|
|
textId = r2;
|
|
|
|
+ text = r3;
|
|
|
|
+ caseName = r4;
|
|
|
|
+ }
|
|
|
|
+ //最后一份病历无法在循环中写入 需要填回
|
|
|
|
+ if (StringUtils.isNotEmpty(textId)) {
|
|
|
|
+ catalogueList.add(catalogueMap);
|
|
|
|
+ updateList.add(updateMap);
|
|
|
|
+ textList.add(text);
|
|
|
|
+ caseList.add(caseName);
|
|
}
|
|
}
|
|
|
|
|
|
for (int i = 0; i < textList.size(); i++) {
|
|
for (int i = 0; i < textList.size(); i++) {
|