Commit bc81decda1ff900ae516483e8064e9960c857f7e

Authored by liquanyu
1 parent f872297049

工位机构

Showing 3 changed files with 87 additions and 45 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdJbgwInterface.java View file @ bc81dec
... ... @@ -83,17 +83,20 @@
83 83 try{
84 84 patients = getMainPatient(patients.getId());
85 85  
86   - if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()))
  86 + if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()) || !StringUtils.isNumeric(patients.getTownOrgId()))
87 87 {
88 88 continue;
89 89 }
90 90  
91   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(patients.getTownOrgId());
92   - if (basicConfig == null)
  91 + Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId()));
  92 + if (organization == null || StringUtils.isEmpty(organization.getTownOrgId()))
93 93 {
94 94 continue;
95 95 }
96 96  
  97 +
  98 +
  99 +
97 100 //居住地址
98 101 String jzSheng = CommonsHelper.getName1(patients.getProvinceRegisterId(), basicConfigService);
99 102 String jzShi = CommonsHelper.getName1(patients.getCityRegisterId(), basicConfigService);
... ... @@ -180,8 +183,8 @@
180 183 map.put("MENSESLASTDATE",DateUtil.getyyyy_MM_dd(patients.getLastMenses()));
181 184 map.put("EXPECTEDCHILDBIRTHDAY",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
182 185  
183   - map.put("ORGNAME",basicConfig.getName());
184   - map.put("ORGCODE",basicConfig.getId());
  186 + map.put("ORGNAME",organization.getName());
  187 + map.put("ORGCODE",organization.getTownOrgId());
185 188 map.put("BUILDINGMANUALDATE",DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate()));
186 189 map.put("NATIONALITYVALUE",getBasicConfig(patients.getPnationId()));
187 190 map.put("BUILDWEEKS", ResolveUtils.getPregnancyWeek(patients, patients.getBookbuildingDate()));
188 191  
... ... @@ -227,13 +230,14 @@
227 230 Map<String,String> map = new HashMap<String,String>();
228 231 Patients patients = getMainPatient(antExChuModel.getParentId());
229 232  
230   - if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()))
  233 +
  234 + if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()) || !StringUtils.isNumeric(patients.getTownOrgId()))
231 235 {
232 236 continue;
233 237 }
234 238  
235   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(patients.getTownOrgId());
236   - if (basicConfig == null)
  239 + Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId()));
  240 + if (organization == null || StringUtils.isEmpty(organization.getTownOrgId()))
237 241 {
238 242 continue;
239 243 }
... ... @@ -299,8 +303,8 @@
299 303 map.put("MENSESLASTDATE",DateUtil.getyyyy_MM_dd(patients.getLastMenses()));
300 304 map.put("EXPECTEDCHILDBIRTHDAY",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
301 305  
302   - map.put("ORGNAME",basicConfig.getName());
303   - map.put("ORGCODE",basicConfig.getId());
  306 + map.put("ORGNAME",organization.getName());
  307 + map.put("ORGCODE",organization.getTownOrgId());
304 308 map.put("BUILDINGMANUALDATE",DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate()));
305 309 map.put("NATIONALITYVALUE",getBasicConfig(patients.getPnationId()));
306 310 map.put("BUILDWEEKS", ResolveUtils.getPregnancyWeek(patients, patients.getBookbuildingDate()));
307 311  
... ... @@ -637,13 +641,13 @@
637 641 try{
638 642 Patients patients = getMainPatient(data.getParentId());
639 643  
640   - if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()))
  644 + if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()) || !StringUtils.isNumeric(patients.getTownOrgId()))
641 645 {
642 646 continue;
643 647 }
644 648  
645   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(patients.getTownOrgId());
646   - if (basicConfig == null)
  649 + Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId()));
  650 + if (organization == null || StringUtils.isEmpty(organization.getTownOrgId()))
647 651 {
648 652 continue;
649 653 }
650 654  
... ... @@ -693,9 +697,9 @@
693 697 }
694 698 }
695 699 map.put("FOLLOWUPDOCTORNAME",checkDoctor);
696   - map.put("ORGCODE",basicConfig.getId());
  700 + map.put("ORGCODE",organization.getTownOrgId());
697 701  
698   - map.put("ORGNAME",basicConfig.getName());
  702 + map.put("ORGNAME",organization.getName());
699 703  
700 704 mList.add(map);
701 705 }catch (Exception e){
702 706  
... ... @@ -738,13 +742,13 @@
738 742 for(MaternalDeliverModel data : allList) {
739 743 Patients patients = getMainPatient(data.getParentId());
740 744  
741   - if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()))
  745 + if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()) || !StringUtils.isNumeric(patients.getTownOrgId()))
742 746 {
743 747 continue;
744 748 }
745 749  
746   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(patients.getTownOrgId());
747   - if (basicConfig == null)
  750 + Organization organization1 = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId()));
  751 + if (organization1 == null || StringUtils.isEmpty(organization1.getTownOrgId()))
748 752 {
749 753 continue;
750 754 }
751 755  
... ... @@ -984,9 +988,9 @@
984 988  
985 989 }
986 990 }*/
987   - map.put("ORGCODE", basicConfig.getId());
  991 + map.put("ORGCODE", organization1.getTownOrgId());
988 992  
989   - map.put("ORGNAME", basicConfig.getName());
  993 + map.put("ORGNAME", organization1.getName());
990 994 mList.add(map);
991 995  
992 996 }
993 997  
... ... @@ -1031,13 +1035,13 @@
1031 1035 try{
1032 1036 Patients patients = getMainPatient(babyModel.getParentId());
1033 1037  
1034   - if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()))
  1038 + if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()) || !StringUtils.isNumeric(patients.getTownOrgId()))
1035 1039 {
1036 1040 continue;
1037 1041 }
1038 1042  
1039   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(patients.getTownOrgId());
1040   - if (basicConfig == null)
  1043 + Organization organization1 = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId()));
  1044 + if (organization1 == null || StringUtils.isEmpty(organization1.getTownOrgId()))
1041 1045 {
1042 1046 continue;
1043 1047 }
1044 1048  
... ... @@ -1075,9 +1079,9 @@
1075 1079 map.put("BABYAPGAR1",map1.get("pf1").toString());
1076 1080 map.put("BABYAPGAR5",map1.get("pf5").toString());
1077 1081 }
1078   - map.put("ORGCODE",basicConfig.getId());
  1082 + map.put("ORGCODE",organization1.getTownOrgId());
1079 1083  
1080   - map.put("ORGNAME",basicConfig.getName());
  1084 + map.put("ORGNAME",organization1.getName());
1081 1085  
1082 1086 mList.add(map);
1083 1087 }catch (Exception e){
1084 1088  
... ... @@ -1129,13 +1133,13 @@
1129 1133  
1130 1134 Patients patients = getMainPatient(md.getParentId());
1131 1135  
1132   - if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()))
  1136 + if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()) || !StringUtils.isNumeric(patients.getTownOrgId()))
1133 1137 {
1134 1138 continue;
1135 1139 }
1136 1140  
1137   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(patients.getTownOrgId());
1138   - if (basicConfig == null)
  1141 + Organization organization1 = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId()));
  1142 + if (organization1 == null || StringUtils.isEmpty(organization1.getTownOrgId()))
1139 1143 {
1140 1144 continue;
1141 1145 }
... ... @@ -1226,8 +1230,8 @@
1226 1230 }
1227 1231 }
1228 1232 map.put("FOLLOWUPDOCTORNAME",checkDoctor);
1229   - map.put("ORGCODE",basicConfig.getId());
1230   - map.put("ORGNAME",basicConfig.getName());
  1233 + map.put("ORGCODE",organization1.getTownOrgId());
  1234 + map.put("ORGNAME",organization1.getName());
1231 1235 mList.add(map);
1232 1236  
1233 1237 }catch (Exception e){
1234 1238  
... ... @@ -1273,13 +1277,13 @@
1273 1277 try{
1274 1278 Patients patients = getMainPatient(data.getParentId());
1275 1279  
1276   - if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()))
  1280 + if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()) || !StringUtils.isNumeric(patients.getTownOrgId()))
1277 1281 {
1278 1282 continue;
1279 1283 }
1280 1284  
1281   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(patients.getTownOrgId());
1282   - if (basicConfig == null)
  1285 + Organization organization1 = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId()));
  1286 + if (organization1 == null || StringUtils.isEmpty(organization1.getTownOrgId()))
1283 1287 {
1284 1288 continue;
1285 1289 }
... ... @@ -1343,8 +1347,8 @@
1343 1347 }
1344 1348 }
1345 1349 map.put("FOLLOWUPDOCTORNAME",checkDoctor);
1346   - map.put("ORGCODE",basicConfig.getId());
1347   - map.put("ORGNAME",basicConfig.getName());
  1350 + map.put("ORGCODE",organization1.getTownOrgId());
  1351 + map.put("ORGNAME",organization1.getName());
1348 1352  
1349 1353 mList.add(map);
1350 1354  
1351 1355  
... ... @@ -1385,13 +1389,13 @@
1385 1389 //获取母亲基本信息
1386 1390 Patients patients = getMainPatient(model.getParentId());
1387 1391  
1388   - if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()))
  1392 + if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()) || !StringUtils.isNumeric(patients.getTownOrgId()))
1389 1393 {
1390 1394 continue;
1391 1395 }
1392 1396  
1393   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(patients.getTownOrgId());
1394   - if (basicConfig == null)
  1397 + Organization organization1 = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId()));
  1398 + if (organization1 == null || StringUtils.isEmpty(organization1.getTownOrgId()))
1395 1399 {
1396 1400 continue;
1397 1401 }
1398 1402  
... ... @@ -1677,9 +1681,9 @@
1677 1681 if(newbornVisit.getNextVisitTimeDesc() != null){
1678 1682 map.put("NEXTVISITDATE",DateUtil.getyyyy_MM_dd(newbornVisit.getNextVisitTimeDesc()));
1679 1683 }
1680   - map.put("ORGCODE",basicConfig.getId());
  1684 + map.put("ORGCODE",organization1.getTownOrgId());
1681 1685  
1682   - map.put("ORGNAME",basicConfig.getName());
  1686 + map.put("ORGNAME",organization1.getName());
1683 1687 if(newbornVisit.getSpine() != null){
1684 1688 if("未见异常".equals(newbornVisit.getSpine())){
1685 1689 map.put("SPINEABNORMCODE","1");
1686 1690  
... ... @@ -1743,13 +1747,13 @@
1743 1747 //获取母亲基本信息
1744 1748 Patients patients = getMainPatient(babyModel.getParentId());
1745 1749  
1746   - if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()))
  1750 + if (patients == null || StringUtils.isEmpty(patients.getTownOrgId()) || !StringUtils.isNumeric(patients.getTownOrgId()))
1747 1751 {
1748 1752 continue;
1749 1753 }
1750 1754  
1751   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(patients.getTownOrgId());
1752   - if (basicConfig == null)
  1755 + Organization organization1 = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId()));
  1756 + if (organization1 == null || StringUtils.isEmpty(organization1.getTownOrgId()))
1753 1757 {
1754 1758 continue;
1755 1759 }
... ... @@ -2128,8 +2132,8 @@
2128 2132 }
2129 2133 }
2130 2134  
2131   - map.put("ORGCODE",basicConfig.getId());
2132   - map.put("ORGNAME",basicConfig.getName());
  2135 + map.put("ORGCODE",organization1.getTownOrgId());
  2136 + map.put("ORGNAME",organization1.getName());
2133 2137  
2134 2138 mList.add(map);
2135 2139  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BasicConfigController.java View file @ bc81dec
... ... @@ -165,6 +165,18 @@
165 165 return basicConfigFacade.getQhdBabyDiagnosis();
166 166 }
167 167  
  168 +
  169 + /**
  170 + * 获取工位机构数据
  171 + * @return
  172 + */
  173 + @RequestMapping(method = RequestMethod.GET, value = "/getGwOrgs")
  174 + @ResponseBody
  175 + public BaseObjectResponse getGwOrgs() {
  176 + return basicConfigFacade.getGwOrgs();
  177 + }
  178 +
  179 +
168 180 /**
169 181 * 获取高危因素
170 182 *
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java View file @ bc81dec
... ... @@ -548,5 +548,31 @@
548 548 return new BaseObjectResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
549 549  
550 550 }
  551 +
  552 + public BaseObjectResponse getGwOrgs() {
  553 +
  554 +
  555 + Map map = new HashMap();
  556 + BasicConfigQuery basicConfigQuery = new BasicConfigQuery();
  557 + basicConfigQuery.setEnable(1);
  558 + basicConfigQuery.setTypeId("5cbd67f5f29960ef73349a70");
  559 +
  560 + List<Map> towns = new ArrayList<>();
  561 +
  562 + //所有数据
  563 + List<BasicConfig> basicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery);
  564 +
  565 + if (CollectionUtils.isNotEmpty(basicConfigList)) {
  566 + for (BasicConfig model : basicConfigList) {
  567 + Map data = new HashMap();
  568 + data.put("id", model.getId());
  569 + data.put("name", model.getName());
  570 + towns.add(data);
  571 + }
  572 + }
  573 +
  574 + map.put("towns", towns);
  575 + return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  576 + }
551 577 }