zhenglingfeng 8 éve
szülő
commit
a6d44546e5

+ 11 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/record/OutpatientService.java

@ -100,6 +100,17 @@ public class OutpatientService extends BaseService {
                        for (String key : jsonObjectMap.keySet()) {
                            resultArray.put(jsonObjectMap.get(key));
                        }
                        JSONObject temp;
                        for (int i = 0; i < resultArray.length(); i++) {
                            for (int j = i+1; j < resultArray.length(); j++) {
                                if (resultArray.getJSONObject(i).get("END_TIME").toString().compareTo(resultArray.getJSONObject(i).get("END_TIME").toString()) < 0) {
                                    temp = resultArray.getJSONObject(i);
                                    resultArray.put(i, resultArray.getJSONObject(j));
                                    resultArray.put(j, temp);  // 两个数交换位置
                                }
                            }
                        }
                    }
                }
            }