Commit caae115579e8ac9b406318e24e35d348602ecd11
1 parent
0c77a880e9
Exists in
master
and in
1 other branch
his接口
Showing 3 changed files with 71 additions and 2 deletions
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
caae115
| ... | ... | @@ -108,8 +108,17 @@ |
| 108 | 108 | //医院id |
| 109 | 109 | private List<String> hospitalList; |
| 110 | 110 | |
| 111 | + //档案编号 | |
| 112 | + private String fileCode; | |
| 111 | 113 | |
| 114 | + public String getFileCode() { | |
| 115 | + return fileCode; | |
| 116 | + } | |
| 112 | 117 | |
| 118 | + public void setFileCode(String fileCode) { | |
| 119 | + this.fileCode = fileCode; | |
| 120 | + } | |
| 121 | + | |
| 113 | 122 | public String getProvinceRegisterId() { |
| 114 | 123 | return provinceRegisterId; |
| 115 | 124 | } |
| ... | ... | @@ -847,7 +856,8 @@ |
| 847 | 856 | MongoCondition con1 = MongoCondition.newInstance("phone", queryNo, MongoOper.IS); |
| 848 | 857 | MongoCondition con2 = MongoCondition.newInstance("username", queryNo, MongoOper.IS); |
| 849 | 858 | MongoCondition con3 = MongoCondition.newInstance("cardNo", queryNo, MongoOper.IS); |
| 850 | - c1= c.orCondition(new MongoCondition[]{con1, con2, con3}).getCriteria(); | |
| 859 | + MongoCondition con4 = MongoCondition.newInstance("fileCode", queryNo, MongoOper.IS); | |
| 860 | + c1= c.orCondition(new MongoCondition[]{con1, con2, con3,con4}).getCriteria(); | |
| 851 | 861 | } |
| 852 | 862 | |
| 853 | 863 | if (lastCheckEmployeeId != null) { |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/ConnTools.java
View file @
caae115
| ... | ... | @@ -15,7 +15,7 @@ |
| 15 | 15 | */ |
| 16 | 16 | public class ConnTools { |
| 17 | 17 | private static String hisDirverClassName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; |
| 18 | - private static String hisUrl = "jdbc:sqlserver://168.254.0.7:1443; DatabaseName=THIS4"; | |
| 18 | + private static String hisUrl = "jdbc:sqlserver://168.254.0.7:1433; DatabaseName=THIS4"; | |
| 19 | 19 | private static String hisUser = "sa"; |
| 20 | 20 | private static String hisPassword = "ccnms05*"; |
| 21 | 21 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
caae115
| ... | ... | @@ -441,6 +441,65 @@ |
| 441 | 441 | return "initCardNo finish - " + a; |
| 442 | 442 | } |
| 443 | 443 | |
| 444 | + | |
| 445 | + | |
| 446 | + @RequestMapping(value = "/modifyRiskFactor", method = RequestMethod.GET) | |
| 447 | + @ResponseBody | |
| 448 | + public String modifyRiskFactor(@RequestParam(required = true) String hid) { | |
| 449 | + PatientsQuery patientQuery = new PatientsQuery(); | |
| 450 | + patientQuery.setYn(YnEnums.YES.getId()); | |
| 451 | + patientQuery.setHospitalId(hid); | |
| 452 | + patientQuery.setrLevel("e637b361-99cf-41eb-84f2-f0dab596e928"); | |
| 453 | + | |
| 454 | + | |
| 455 | + List<Patients> patientses = patientsService.queryPatient(patientQuery); | |
| 456 | + int batchSize = 500; | |
| 457 | + int end = 0; | |
| 458 | + for (int i = 0; i < patientses.size(); i += batchSize) { | |
| 459 | + end = (end + batchSize); | |
| 460 | + if (end > patientses.size()) { | |
| 461 | + end = patientses.size(); | |
| 462 | + } | |
| 463 | + System.out.println("start:" + i + ",end:" + end); | |
| 464 | + final List<Patients> tempList = patientses.subList(i, end); | |
| 465 | + new Thread(new Runnable() { | |
| 466 | + @Override | |
| 467 | + public void run() { | |
| 468 | + if (CollectionUtils.isNotEmpty(tempList)) | |
| 469 | + { | |
| 470 | + for (Patients pat : tempList) { | |
| 471 | + if (pat != null) | |
| 472 | + { | |
| 473 | + String levelStr = pat.getRiskLevelId(); | |
| 474 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(levelStr)) | |
| 475 | + { | |
| 476 | + List<String> levels = JsonUtil.toList(levelStr, String.class); | |
| 477 | + if (CollectionUtils.isNotEmpty(levels) && levels.contains("e637b361-99cf-41eb-84f2-f0dab596e928") && levels.size() > 1) | |
| 478 | + { | |
| 479 | + List<String> rFactors = pat.getRiskFactorId(); | |
| 480 | + if (CollectionUtils.isNotEmpty(rFactors) && rFactors.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")) | |
| 481 | + { | |
| 482 | + rFactors.remove("d42eec03-aa86-45b8-a4e0-78a0ff365fb6"); | |
| 483 | + String resultLevel = JsonUtil.array2JsonString(levels.remove("e637b361-99cf-41eb-84f2-f0dab596e928")); | |
| 484 | + pat.setRiskLevelId(resultLevel); | |
| 485 | + patientsService.updatePatient(pat); | |
| 486 | + } | |
| 487 | + } | |
| 488 | + | |
| 489 | + } | |
| 490 | + | |
| 491 | + } | |
| 492 | + } | |
| 493 | + } | |
| 494 | + } | |
| 495 | + }).start(); | |
| 496 | + } | |
| 497 | + | |
| 498 | + return "modifyRiskFactor finish"; | |
| 499 | + } | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 444 | 503 | public static void main(String[] a) { |
| 445 | 504 | try { |
| 446 | 505 | List<String> list = FileUtils.readLines(new File("D:\\temp\\qhdfy_lost1.csv")); |