Commit a7a1149c69d620c1af40d987d5c3f91b4866f974
1 parent
8ba9986e99
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 256 additions and 258 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/cdfy/CdGwInterface.java
View file @
a7a1149
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 | // private static final String BASE_URL = "http://gxgg.greatsoft.net:8082"; |
73 | 73 | //线上地址222.223.187.132:7076 |
74 | 74 | // private static final String BASE_URL = "http://gxgg.greatsoft.net:8083"; |
75 | - private static final String BASE_URL = "http://10.0.255.31:7076"; | |
75 | + private static final String BASE_URL = "http://222.223.187.132:7076"; | |
76 | 76 | |
77 | 77 | |
78 | 78 | /** |
... | ... | @@ -187,8 +187,8 @@ |
187 | 187 | BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(organization.getTownOrgId()); |
188 | 188 | //String hospitalName = basicConfig == null ? "" : basicConfig.getName(); |
189 | 189 | |
190 | - String code = basicConfig.getCode();//getCodeByHospital(hospitalName); | |
191 | - | |
190 | + String code = basicConfig == null ? (organization.getTownOrgId() == null ? "" : organization.getTownOrgId()): basicConfig.getCode();//getCodeByHospital(hospitalName); | |
191 | + code = code == null || code == "" ? "000209471" : code; | |
192 | 192 | MaternalInfo maternalInfo = new MaternalInfo(); |
193 | 193 | getNation(patient.getPnationId(),maternalInfo); |
194 | 194 | |
... | ... | @@ -197,7 +197,7 @@ |
197 | 197 | ps = conn.prepareStatement(inBaseInfoSql); |
198 | 198 | ps.setString(1,code); |
199 | 199 | ps.setString(2,id); |
200 | - ps.setString(3,patient.getVcCardNo()); | |
200 | + ps.setString(3,patient.getVcCardNo() == null || patient.getVcCardNo() == "" ? "23452346" : patient.getVcCardNo()); | |
201 | 201 | ps.setString(4,"03"); |
202 | 202 | ps.setString(5,patient.getUsername()); |
203 | 203 | ps.setString(6,"2"); |
... | ... | @@ -551,30 +551,30 @@ |
551 | 551 | String liveAddress = CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), |
552 | 552 | patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService); |
553 | 553 | |
554 | - Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId())); | |
555 | - | |
556 | - | |
557 | - if (organization == null) | |
558 | - { | |
559 | - return null; | |
560 | - } | |
561 | - | |
562 | - //智业中间库的医疗机构编码 | |
563 | - BasicConfig basic = basicConfigService.getOneBasicConfigById(organization.getTownOrgId()); | |
564 | - //String hospital =basic.getName(); | |
565 | - | |
566 | - String code = basic.getCode();//getCodeByHospital(hospital); | |
567 | - | |
568 | - Map<String,String> gxMap = findGxHospitalById(organization.getTownOrgId()); | |
569 | - if(gxMap != null){ | |
570 | - createOrgId = gxMap.get("createOrgId"); | |
571 | - orgName = gxMap.get("orgName"); | |
572 | - creator = gxMap.get("creator"); | |
573 | - creatorId = gxMap.get("creatorId"); | |
574 | - }else{ | |
575 | - return null; | |
576 | - } | |
577 | - | |
554 | +// Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId())); | |
555 | +// | |
556 | +// | |
557 | +// if (organization == null) | |
558 | +// { | |
559 | +// return null; | |
560 | +// } | |
561 | +// | |
562 | +// //智业中间库的医疗机构编码 | |
563 | +// BasicConfig basic = basicConfigService.getOneBasicConfigById(organization.getTownOrgId()); | |
564 | +// //String hospital =basic.getName(); | |
565 | +// | |
566 | +// String code = basic == null ? (organization.getTownOrgId() == null? "" : organization.getTownOrgId()) : basic.getCode();//getCodeByHospital(hospital); | |
567 | +// | |
568 | +// Map<String,String> gxMap = findGxHospitalById(organization.getTownOrgId()); | |
569 | +// if(gxMap != null){ | |
570 | +// createOrgId = gxMap.get("createOrgId"); | |
571 | +// orgName = gxMap.get("orgName"); | |
572 | +// creator = gxMap.get("creator"); | |
573 | +// creatorId = gxMap.get("creatorId"); | |
574 | +// }else{ | |
575 | +// return null; | |
576 | +// } | |
577 | + String code ="000209471"; | |
578 | 578 | BaseObjectResponse br = viewFacade.findAntExChu(antExChuModel.getId()); |
579 | 579 | |
580 | 580 | if (br.getData() != null && patients != null) { |
... | ... | @@ -599,9 +599,8 @@ |
599 | 599 | //冠鑫孕产登记(智业WOMAN_PREGNANCY_DIAG) |
600 | 600 | String inSqlDiag = "insert into WOMAN_PREGNANCY_DIAG(LAST_UPDATE_DTIME,ORG_CODE,PATIENT_ID,ORG_FORM_NO," + |
601 | 601 | "NAME,PRESENT_VILLAGE,TEL_NO,EMPLOYER_NAME,WEIGHT,MENSES_LAST_DATE,EXPECTED_TIEM,GRAVIDITY," + |
602 | - "PARITY,SPONTANEOUS_ABORTION,INDUCED_ABORTION,HUSBAND_NAME,DIAGNOSIS_DATE,CREATE_DATE,create_OrgId," + | |
603 | - "orgName,creator,creator_Id) " + | |
604 | - "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
602 | + "PARITY,SPONTANEOUS_ABORTION,INDUCED_ABORTION,HUSBAND_NAME,DIAGNOSIS_DATE,CREATE_DATE) " + | |
603 | + "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
605 | 604 | ps = conn.prepareStatement(inSqlDiag); |
606 | 605 | ps.setDate(1, new Date(antExChuModel.getModified().getTime())); |
607 | 606 | ps.setString(2, code); |
... | ... | @@ -649,10 +648,10 @@ |
649 | 648 | }else{ |
650 | 649 | ps.setNull(18,Types.DATE); |
651 | 650 | } |
652 | - ps.setString(19,createOrgId); | |
653 | - ps.setString(20,orgName); | |
654 | - ps.setString(21,creator); | |
655 | - ps.setString(22,creatorId); | |
651 | +// ps.setString(19,createOrgId); | |
652 | +// ps.setString(20,orgName); | |
653 | +// ps.setString(21,creator); | |
654 | +// ps.setString(22,creatorId); | |
656 | 655 | ps.executeUpdate(); |
657 | 656 | |
658 | 657 | |
659 | 658 | |
... | ... | @@ -669,9 +668,9 @@ |
669 | 668 | "WVD_CLEAN_CODE,HBEAB_TEST_RESULT_CODE,HBEAG_TEST_RESULT_CODE,HBSAB_TEST_RESULT_CODE,HBSAG_TEST_RESULT_CODE,\n" + |
670 | 669 | "HBCAB_TEST_RESULT_CODE,STS_RESULT_CODE,HIV_ANTI_RESULT_CODE,BSCAN_RESULT_DESCR,PREG_HEALTH_ABNORM_MARK,\n" + |
671 | 670 | "PREG_HEALTH_ABNORM_DESCR,REFERRAL_MARK,REFERTO_ORG_NAME,REFERTO_DEPT_NAME,REFERRAL_REASON,VISIT_DOCTOR_NAME,\n" + |
672 | - "THIS_VISIT_DATE,NEXT_VISIT_DATE,NEXT_VISIT_PLACE,create_OrgId,orgNane,creator,creator_Id) " + | |
671 | + "THIS_VISIT_DATE,NEXT_VISIT_DATE,NEXT_VISIT_PLACE) " + | |
673 | 672 | "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,\n" + |
674 | - "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
673 | + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
675 | 674 | |
676 | 675 | ps = conn.prepareStatement(inSql); |
677 | 676 | ps.setDate(1, new Date(antExChuModel.getModified().getTime())); |
... | ... | @@ -1062,10 +1061,10 @@ |
1062 | 1061 | ps.setNull(85, Types.DATE); |
1063 | 1062 | } |
1064 | 1063 | ps.setString(86, null); |
1065 | - ps.setString(87,createOrgId); | |
1066 | - ps.setString(88,orgName); | |
1067 | - ps.setString(89,creator); | |
1068 | - ps.setString(90,creatorId); | |
1064 | +// ps.setString(87,createOrgId); | |
1065 | +// ps.setString(88,orgName); | |
1066 | +// ps.setString(89,creator); | |
1067 | +// ps.setString(90,creatorId); | |
1069 | 1068 | ps.executeUpdate(); |
1070 | 1069 | |
1071 | 1070 | try { |
1072 | 1071 | |
1073 | 1072 | |
1074 | 1073 | |
1075 | 1074 | |
... | ... | @@ -1189,39 +1188,39 @@ |
1189 | 1188 | return null; |
1190 | 1189 | } |
1191 | 1190 | |
1192 | - Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId())); | |
1191 | +// Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId())); | |
1192 | +// | |
1193 | +// if (organization == null) | |
1194 | +// { | |
1195 | +// return null; | |
1196 | +// } | |
1193 | 1197 | |
1194 | - if (organization == null) | |
1195 | - { | |
1196 | - return null; | |
1197 | - } | |
1198 | - | |
1199 | 1198 | //智业中间库的医疗机构编码 |
1200 | - String code = ""; | |
1201 | - String hospital = basicConfigService.getOneBasicConfigById(organization.getTownOrgId()).getName(); | |
1199 | + String code ="000209471"; | |
1200 | +// String hospital = basicConfigService.getOneBasicConfigById(organization.getTownOrgId() == null ? organization.getId()+"" : organization.getTownOrgId()).getName(); | |
1201 | +// | |
1202 | +// if(hospital != "" && hospital != null){ | |
1203 | +// code = patients.getHospitalId(); | |
1204 | +// String hoSql = "select code from yljg where wname=\'"+hospital+"\'"; | |
1205 | +// ps = conn.prepareStatement(hoSql); | |
1206 | +// rs = ps.executeQuery(); | |
1207 | +// while(rs.next()){ | |
1208 | +// code = rs.getString("code"); | |
1209 | +// } | |
1210 | +// | |
1211 | +// gxMap = findGxHospitalById(organization.getTownOrgId()); | |
1212 | +// if(gxMap != null){ | |
1213 | +// createOrgId = gxMap.get("createOrgId"); | |
1214 | +// orgName = gxMap.get("orgName"); | |
1215 | +// creator = gxMap.get("creator"); | |
1216 | +// creatorId = gxMap.get("creatorId"); | |
1217 | +// }else{ | |
1218 | +// return null; | |
1219 | +// } | |
1220 | +// | |
1221 | +// } | |
1202 | 1222 | |
1203 | - if(hospital != "" && hospital != null){ | |
1204 | - code = patients.getHospitalId(); | |
1205 | - String hoSql = "select code from yljg where wname=\'"+hospital+"\'"; | |
1206 | - ps = conn.prepareStatement(hoSql); | |
1207 | - rs = ps.executeQuery(); | |
1208 | - while(rs.next()){ | |
1209 | - code = rs.getString("code"); | |
1210 | - } | |
1211 | 1223 | |
1212 | - gxMap = findGxHospitalById(organization.getTownOrgId()); | |
1213 | - if(gxMap != null){ | |
1214 | - createOrgId = gxMap.get("createOrgId"); | |
1215 | - orgName = gxMap.get("orgName"); | |
1216 | - creator = gxMap.get("creator"); | |
1217 | - creatorId = gxMap.get("creatorId"); | |
1218 | - }else{ | |
1219 | - return null; | |
1220 | - } | |
1221 | - | |
1222 | - } | |
1223 | - | |
1224 | - | |
1225 | 1224 | BaseObjectResponse br = viewFacade.findAntenatalExamination(antenatalExaminationModel.getId()); |
1226 | 1225 | |
1227 | 1226 | if(patients != null && br.getData() != null){ |
... | ... | @@ -1251,8 +1250,8 @@ |
1251 | 1250 | "GEST_WEEKS,WEIGHT,CHIEF_COMPLAINT,FUNDUS_HEIGHT,ABDOMEN_CIRCUM,FETUS_POSITION_CODE,FETAL_HEART_RATE,\n" + |
1252 | 1251 | "SBP,DBP,HGB,PRO_QUAN_TEST_VALUE,PRO_QUAL_RESULT_CODE,PREG_HEALTH_ABNORM_MARK,PREG_HEALTH_ABNORM_DESCR,\n" + |
1253 | 1252 | "REFERRAL_MARK,REFERTO_ORG_NAME,REFERTO_DEPT_NAME,REFERRAL_REASON,VISIT_DOCTOR_NAME,THIS_VISIT_DATE,\n" + |
1254 | - "NEXT_VISIT_DATE,create_OrgId,orgNane,creator,creator_Id,servicetimes) " + | |
1255 | - "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
1253 | + "NEXT_VISIT_DATE) " + | |
1254 | + "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
1256 | 1255 | ps = conn.prepareStatement(inSql); |
1257 | 1256 | ps.setDate(1, new Date(antenatalExaminationModel.getModified().getTime())); |
1258 | 1257 | ps.setString(2, code); |
1259 | 1258 | |
1260 | 1259 | |
... | ... | @@ -1290,13 +1289,13 @@ |
1290 | 1289 | ps.setNull(14,Types.INTEGER); |
1291 | 1290 | } |
1292 | 1291 | if(antenatalExaminationModel.getUrineProtein() != null && !"-".equals(antenatalExaminationModel.getUrineProtein())){ |
1293 | - Double parseDouble = null; | |
1294 | 1292 | try { |
1295 | - parseDouble = Double.parseDouble(antenatalExaminationModel.getUrineProtein()); | |
1293 | + Double parseDouble = Double.parseDouble(antenatalExaminationModel.getUrineProtein()); | |
1294 | + ps.setDouble(15, parseDouble); | |
1296 | 1295 | }catch (Exception e){ |
1297 | 1296 | e.printStackTrace(); |
1298 | 1297 | } |
1299 | - ps.setDouble(15, parseDouble); | |
1298 | + | |
1300 | 1299 | }else{ |
1301 | 1300 | ps.setNull(15,Types.DOUBLE); |
1302 | 1301 | } |
... | ... | @@ -1326,11 +1325,11 @@ |
1326 | 1325 | }else{ |
1327 | 1326 | ps.setNull(25,Types.DATE); |
1328 | 1327 | } |
1329 | - ps.setString(26, createOrgId); | |
1330 | - ps.setString(27,orgName); | |
1331 | - ps.setString(28,creator); | |
1332 | - ps.setString(29,creatorId); | |
1333 | - ps.setInt(30,service); | |
1328 | +// ps.setString(26, createOrgId); | |
1329 | +// ps.setString(27,orgName); | |
1330 | +// ps.setString(28,creator); | |
1331 | +// ps.setString(29,creatorId); | |
1332 | +// ps.setInt(30,service); | |
1334 | 1333 | int rel = ps.executeUpdate(); |
1335 | 1334 | if(rel > 0){ |
1336 | 1335 | System.out.print("推送成功!"); |
1337 | 1336 | |
1338 | 1337 | |
1339 | 1338 | |
... | ... | @@ -1386,47 +1385,47 @@ |
1386 | 1385 | |
1387 | 1386 | |
1388 | 1387 | |
1389 | - Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId())); | |
1388 | +// Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId())); | |
1389 | +// | |
1390 | +// if (organization == null) | |
1391 | +// { | |
1392 | +// return null; | |
1393 | +// } | |
1390 | 1394 | |
1391 | - if (organization == null) | |
1392 | - { | |
1393 | - return null; | |
1394 | - } | |
1395 | - | |
1396 | 1395 | Map<String,Object> map = (Map)br.getData(); |
1397 | 1396 | //智业中间库的医疗机构编码 |
1398 | - String code = ""; | |
1399 | - String hospital = basicConfigService.getOneBasicConfigById(organization.getTownOrgId()).getName(); | |
1400 | - if(hospital != "" && hospital != null){ | |
1401 | - code = patients.getHospitalId(); | |
1402 | - String hoSql = "select code from yljg where wname=\'"+hospital+"\'"; | |
1403 | - ps = conn.prepareStatement(hoSql); | |
1404 | - rs = ps.executeQuery(); | |
1405 | - while(rs.next()){ | |
1406 | - code = rs.getString("code"); | |
1407 | - } | |
1397 | + String code = "000209541"; | |
1398 | +// String hospital = basicConfigService.getOneBasicConfigById(organization.getTownOrgId() == null ? organization.getId() +"" : organization.getTownOrgId()).getName(); | |
1399 | +// if(hospital != "" && hospital != null){ | |
1400 | +// code = patients.getHospitalId(); | |
1401 | +// String hoSql = "select code from yljg where wname=\'"+hospital+"\'"; | |
1402 | +// ps = conn.prepareStatement(hoSql); | |
1403 | +// rs = ps.executeQuery(); | |
1404 | +// while(rs.next()){ | |
1405 | +// code = rs.getString("code"); | |
1406 | +// } | |
1407 | +// | |
1408 | +// //分娩机构编码 | |
1409 | +// fmCode = patients.getHospitalId(); | |
1410 | +// String fmSql = "select code from yljg where wname=\'"+map.get("fmHospital").toString()+"\'"; | |
1411 | +// ps = conn.prepareStatement(fmSql); | |
1412 | +// rs = ps.executeQuery(); | |
1413 | +// while(rs.next()){ | |
1414 | +// fmCode = rs.getString("code"); | |
1415 | +// } | |
1416 | +// | |
1417 | +//// gxMap = findGxHospitalById(organization.getTownOrgId()); | |
1418 | +//// if(gxMap != null){ | |
1419 | +//// createOrgId = gxMap.get("createOrgId"); | |
1420 | +//// orgName = gxMap.get("orgName"); | |
1421 | +//// creator = gxMap.get("creator"); | |
1422 | +//// creatorId = gxMap.get("creatorId"); | |
1423 | +//// }else{ | |
1424 | +//// return null; | |
1425 | +//// } | |
1426 | +// | |
1427 | +// } | |
1408 | 1428 | |
1409 | - //分娩机构编码 | |
1410 | - fmCode = patients.getHospitalId(); | |
1411 | - String fmSql = "select code from yljg where wname=\'"+map.get("fmHospital").toString()+"\'"; | |
1412 | - ps = conn.prepareStatement(fmSql); | |
1413 | - rs = ps.executeQuery(); | |
1414 | - while(rs.next()){ | |
1415 | - fmCode = rs.getString("code"); | |
1416 | - } | |
1417 | - | |
1418 | - gxMap = findGxHospitalById(organization.getTownOrgId()); | |
1419 | - if(gxMap != null){ | |
1420 | - createOrgId = gxMap.get("createOrgId"); | |
1421 | - orgName = gxMap.get("orgName"); | |
1422 | - creator = gxMap.get("creator"); | |
1423 | - creatorId = gxMap.get("creatorId"); | |
1424 | - }else{ | |
1425 | - return null; | |
1426 | - } | |
1427 | - | |
1428 | - } | |
1429 | - | |
1430 | 1429 | if(StringUtils.isNotEmpty(patients.getId()) && StringUtils.isNotEmpty(data.getId())){ |
1431 | 1430 | String delSql = "delete from WOMAN_DELIVERY where ORG_FORM_NO = \'"+data.getId()+"\'"; |
1432 | 1431 | deleteData(delSql, conn, ps); |
1433 | 1432 | |
... | ... | @@ -1460,10 +1459,10 @@ |
1460 | 1459 | "Save_Cord_Blood_Flag,Full_Membrane_State,Amniotic_Fluid,Amniotic_Fluid_Amount,Raogeng_Body,Postpartum_Obs_Time,\n" + |
1461 | 1460 | "Postpartum_Exam_Time,Postpartum_Pulse_Rate,Postpartum_Heart_Rate,Postpartum_Uc,Postpartum_Fundus_Height,\n" + |
1462 | 1461 | "Anus_Check,Delivery_Outcome_Code,Assistant_Signature,Baby_Care_Siganture,Instructor_Signature,Writor_Signature,\n" + |
1463 | - "Tumor_Size,Tumor_Part,Newborn_Abnormal_Code,create_OrgId,orgNane,creator,creator_Id) \n" + | |
1462 | + "Tumor_Size,Tumor_Part,Newborn_Abnormal_Code) \n" + | |
1464 | 1463 | "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," + |
1465 | 1464 | "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," + |
1466 | - "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
1465 | + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
1467 | 1466 | if(CollectionUtils.isNotEmpty(data.getBaby()) && data.getBaby().size()>1){ |
1468 | 1467 | |
1469 | 1468 | for(MaternalDeliverModel.Baby temp : data.getBaby()){ |
... | ... | @@ -1479,7 +1478,7 @@ |
1479 | 1478 | ps.setString(8, null); |
1480 | 1479 | ps.setString(9, null); |
1481 | 1480 | ps.setDate(10, new Date(DateUtil.parseYMD(data.getDueDate()).getTime())); |
1482 | - ps.setString(11, temp.getDueTime()); | |
1481 | + ps.setString(11, DateUtil.getYmd(data.getDueDate1())); | |
1483 | 1482 | if(data.getDueWeek() != null){ |
1484 | 1483 | ps.setInt(12, Integer.parseInt(data.getDueWeek().substring(0, 1))); |
1485 | 1484 | int index = data.getDueWeek().indexOf("天"); |
... | ... | @@ -1791,10 +1790,7 @@ |
1791 | 1790 | ps.setString(128,null); |
1792 | 1791 | ps.setString(129,null); |
1793 | 1792 | ps.setString(130,"1"); |
1794 | - ps.setString(131,createOrgId); | |
1795 | - ps.setString(132,orgName); | |
1796 | - ps.setString(133,creator); | |
1797 | - ps.setString(134,creatorId); | |
1793 | + | |
1798 | 1794 | int inl = ps.executeUpdate(); |
1799 | 1795 | |
1800 | 1796 | |
... | ... | @@ -1813,7 +1809,7 @@ |
1813 | 1809 | ps.setString(8, null); |
1814 | 1810 | ps.setString(9, null); |
1815 | 1811 | ps.setDate(10, new Date(DateUtil.parseYMD(data.getDueDate()).getTime())); |
1816 | - ps.setString(11, data.getBaby().get(0).getDueTime()); | |
1812 | + ps.setString(11, DateUtil.getYmd(DateUtil.parseYMD(data.getBaby().get(0).getDueTime()))); | |
1817 | 1813 | ps.setInt(12, Integer.parseInt(data.getDueWeek().substring(0, 1))); |
1818 | 1814 | int index = data.getDueWeek().indexOf("天"); |
1819 | 1815 | if(index == -1){ |
... | ... | @@ -2110,10 +2106,7 @@ |
2110 | 2106 | ps.setString(128,null); |
2111 | 2107 | ps.setString(129,null); |
2112 | 2108 | ps.setString(130,"1"); |
2113 | - ps.setString(131,createOrgId); | |
2114 | - ps.setString(132,orgName); | |
2115 | - ps.setString(133,creator); | |
2116 | - ps.setString(134,creatorId); | |
2109 | + | |
2117 | 2110 | int in = ps.executeUpdate(); |
2118 | 2111 | if(in > 0){ |
2119 | 2112 | System.out.print("分娩数据插入成功!"); |
... | ... | @@ -2412,7 +2405,7 @@ |
2412 | 2405 | |
2413 | 2406 | //智业中间库的医疗机构编码 |
2414 | 2407 | String code = ""; |
2415 | - String hospital = basicConfigService.getOneBasicConfigById(organization.getTownOrgId()).getName(); | |
2408 | + String hospital = basicConfigService.getOneBasicConfigById(organization.getTownOrgId() == null ? organization.getId()+"" : organization.getTownOrgId()).getName(); | |
2416 | 2409 | if(hospital != "" && hospital != null){ |
2417 | 2410 | code = patients.getHospitalId(); |
2418 | 2411 | String hoSql = "select code from yljg where wname=\'"+hospital+"\'"; |
... | ... | @@ -2444,9 +2437,8 @@ |
2444 | 2437 | "NAME,FOLLOWUP_VISIT_DATE,BODY_TEMPERATURE,HEALTH_CONDITION_DESCR,PSYCHOLOGY_CONDITION_DESCR,SBP,DBP,\n" + |
2445 | 2438 | "LBREAST_EXAM_RESULT_CODE,RBREAST_EXAM_RESULT_CODE,CORPUSUTERI_ABNORM_MARK,CORPUSUTERI_ABNORM_DESCR,\n" + |
2446 | 2439 | "LOCHIA_ABNORM_MARK,LOCHIA_DESCR,WOUND_HEALING_CODE,PREG_HEALTH_ABNORM_MARK,PREG_HEALTH_ABNORM_DESCR,\n" + |
2447 | - "REFERRAL_MARK,REFERRAL_REASON,REFERTO_ORG_NAME,REFERTO_DEPT_NAME,VISIT_DOCTOR_NAME,NEXT_VISIT_DATE,\n" + | |
2448 | - "create_OrgId,orgNane,creator,creator_Id) \n" + | |
2449 | - "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
2440 | + "REFERRAL_MARK,REFERRAL_REASON,REFERTO_ORG_NAME,REFERTO_DEPT_NAME,VISIT_DOCTOR_NAME,NEXT_VISIT_DATE) \n" + | |
2441 | + "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
2450 | 2442 | ps = conn.prepareStatement(inSql); |
2451 | 2443 | ps.setDate(1, new Date(matdeliverFollowModel.getUpdateDate().getTime())); |
2452 | 2444 | ps.setString(2, code); |
... | ... | @@ -2454,7 +2446,7 @@ |
2454 | 2446 | ps.setString(4, matdeliverFollowModel.getId()); |
2455 | 2447 | ps.setString(5, matdeliverFollowModel.getId()); |
2456 | 2448 | ps.setString(6, patients.getUsername()); |
2457 | - ps.setDate(7, new Date(matdeliverFollowModel.getMakeVisitDate().getTime())); | |
2449 | + ps.setDate(7, matdeliverFollowModel.getMakeVisitDate() == null ? null : new Date(matdeliverFollowModel.getMakeVisitDate().getTime())); | |
2458 | 2450 | if(matdeliverFollowModel.getTemperature() != null && matdeliverFollowModel.getTemperature().length()>0){ |
2459 | 2451 | ps.setDouble(8, Double.parseDouble(matdeliverFollowModel.getTemperature())); |
2460 | 2452 | }else{ |
... | ... | @@ -2483,10 +2475,10 @@ |
2483 | 2475 | }else{ |
2484 | 2476 | ps.setNull(27, Types.DATE); |
2485 | 2477 | } |
2486 | - ps.setString(28,createOrgId); | |
2487 | - ps.setString(29,orgName); | |
2488 | - ps.setString(30,creator); | |
2489 | - ps.setString(31,creatorId); | |
2478 | +// ps.setString(28,createOrgId); | |
2479 | +// ps.setString(29,orgName); | |
2480 | +// ps.setString(30,creator); | |
2481 | +// ps.setString(31,creatorId); | |
2490 | 2482 | int inResult = ps.executeUpdate(); |
2491 | 2483 | |
2492 | 2484 | }catch (Exception e){ |
2493 | 2485 | |
2494 | 2486 | |
... | ... | @@ -2683,25 +2675,25 @@ |
2683 | 2675 | Patients patients = getMainPatient(babyModel.getParentId()); |
2684 | 2676 | if(patients != null && StringUtils.isNotEmpty(patients.getTownOrgId())){ |
2685 | 2677 | |
2686 | - String delSql = "delete from CHILD_INFO where ORG_FORM_NO=\'"+babyModel.getId()+""; | |
2678 | + String delSql = "delete from CHILD_INFO where HEALTH_RECORD_NO=\'"+babyModel.getId().substring(16)+""; | |
2687 | 2679 | deleteData(delSql,conn,ps); |
2688 | 2680 | |
2689 | 2681 | |
2690 | 2682 | |
2691 | 2683 | //智业中间库的医疗机构编码 |
2692 | - String code = ""; | |
2693 | - String hospital = basicConfigService.getOneBasicConfigById(patients.getTownOrgId()).getName(); | |
2684 | + String code = "000210971"; | |
2685 | +// String hospital = basicConfigService.getOneBasicConfigById(patients.getTownOrgId() == null ? patients.getHospitalId() : patients.getTownOrgId()).getName(); | |
2686 | +// | |
2687 | +// if(hospital != "" && hospital != null){ | |
2688 | +// code = patients.getHospitalId(); | |
2689 | +// String hoSql = "select code from yljg where wname=\'"+hospital+"\'"; | |
2690 | +// ps = conn.prepareStatement(hoSql); | |
2691 | +// rs = ps.executeQuery(); | |
2692 | +// while(rs.next()){ | |
2693 | +// code = rs.getString("code"); | |
2694 | +// } | |
2695 | +// } | |
2694 | 2696 | |
2695 | - if(hospital != "" && hospital != null){ | |
2696 | - code = patients.getHospitalId(); | |
2697 | - String hoSql = "select code from yljg where wname=\'"+hospital+"\'"; | |
2698 | - ps = conn.prepareStatement(hoSql); | |
2699 | - rs = ps.executeQuery(); | |
2700 | - while(rs.next()){ | |
2701 | - code = rs.getString("code"); | |
2702 | - } | |
2703 | - } | |
2704 | - | |
2705 | 2697 | //居住地址 |
2706 | 2698 | String jzSheng = CommonsHelper.getName1(patients.getProvinceRegisterId(), basicConfigService); |
2707 | 2699 | String jzShi = CommonsHelper.getName1(patients.getCityRegisterId(), basicConfigService); |
2708 | 2700 | |
... | ... | @@ -2721,15 +2713,15 @@ |
2721 | 2713 | "MOTHER_OCCUP_CODE,MOTHER_IDNO,PRESENT_ADDR_PROVINCE,PRESENT_ADDR_CITY,PRESENT_ADDR_COUNTY,\n" + |
2722 | 2714 | "PRESENT_ADDR_TOWN,PRESENT_ADDR_VILLAGE,PRESENT_ADDR_HOUSE_NO,BIRTH_GEST_WEEKS,MOTHER_GEST_COMPLICATION,\n" + |
2723 | 2715 | "DELIVERY_ORG_NAME,LAST_DELIVER_WAY_CODE,TWINS_MARK,ASPHYXIA_MARK,APGAR_SCORE,MALFORM_MARK,MALFORM_DESCR,\n" + |
2724 | - "HEARING_SCREEN_CODE,HEARING_SCREEN_RESULT_CODE,DISEASE_SCREEN_ITEM_CODE,BIRTH_WEIGHT,BIRTH_LENGTH,ORG_FORM_NO) \n" + | |
2725 | - "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
2716 | + "HEARING_SCREEN_CODE,HEARING_SCREEN_RESULT_CODE,DISEASE_SCREEN_ITEM_CODE,BIRTH_WEIGHT,BIRTH_LENGTH) \n" + | |
2717 | + "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
2726 | 2718 | |
2727 | 2719 | ps = conn.prepareStatement(inSql); |
2728 | 2720 | ps.setDate(1, new Date(babyModel.getModified().getTime())); |
2729 | 2721 | ps.setString(2, code); |
2730 | 2722 | ps.setString(3, id); |
2731 | 2723 | ps.setString(4, id); |
2732 | - ps.setString(5,babyModel.getId()); | |
2724 | + ps.setString(5,babyModel.getId().substring(16)); | |
2733 | 2725 | ps.setString(6, babyModel.getName()); |
2734 | 2726 | if(1 == babyModel.getSex()){ |
2735 | 2727 | ps.setString(7,"1"); |
... | ... | @@ -2790,7 +2782,7 @@ |
2790 | 2782 | }else{ |
2791 | 2783 | ps.setNull(39,Types.DOUBLE); |
2792 | 2784 | } |
2793 | - ps.setString(40,maternalDeliverModel.getId()); | |
2785 | + //ps.setString(40,maternalDeliverModel.getId()); | |
2794 | 2786 | |
2795 | 2787 | ps.executeUpdate(); |
2796 | 2788 | |
... | ... | @@ -2863,28 +2855,28 @@ |
2863 | 2855 | |
2864 | 2856 | |
2865 | 2857 | //智业中间库的医疗机构编码 |
2866 | - String code = ""; | |
2867 | - String hospital = basicConfigService.getOneBasicConfigById(organization.getTownOrgId()).getName(); | |
2868 | - | |
2869 | - if(hospital != "" && hospital != null){ | |
2870 | - code = patients.getHospitalId(); | |
2871 | - String hoSql = "select code from yljg where wname=\'"+hospital+"\'"; | |
2872 | - ps = conn.prepareStatement(hoSql); | |
2873 | - rs = ps.executeQuery(); | |
2874 | - while(rs.next()){ | |
2875 | - code = rs.getString("code"); | |
2876 | - } | |
2877 | - | |
2878 | - gxMap = findGxHospitalById(organization.getTownOrgId()); | |
2879 | - if(gxMap != null){ | |
2880 | - createOrgId = gxMap.get("createOrgId"); | |
2881 | - orgName = gxMap.get("orgName"); | |
2882 | - creator = gxMap.get("creator"); | |
2883 | - creatorId = gxMap.get("creatorId"); | |
2884 | - }else{ | |
2885 | - return null; | |
2886 | - } | |
2887 | - } | |
2858 | + String code = "000209541"; | |
2859 | +// String hospital = basicConfigService.getOneBasicConfigById(organization.getTownOrgId()).getName(); | |
2860 | +// | |
2861 | +// if(hospital != "" && hospital != null){ | |
2862 | +// code = patients.getHospitalId(); | |
2863 | +// String hoSql = "select code from yljg where wname=\'"+hospital+"\'"; | |
2864 | +// ps = conn.prepareStatement(hoSql); | |
2865 | +// rs = ps.executeQuery(); | |
2866 | +// while(rs.next()){ | |
2867 | +// code = rs.getString("code"); | |
2868 | +// } | |
2869 | +// | |
2870 | +// gxMap = findGxHospitalById(organization.getTownOrgId()); | |
2871 | +// if(gxMap != null){ | |
2872 | +// createOrgId = gxMap.get("createOrgId"); | |
2873 | +// orgName = gxMap.get("orgName"); | |
2874 | +// creator = gxMap.get("creator"); | |
2875 | +// creatorId = gxMap.get("creatorId"); | |
2876 | +// }else{ | |
2877 | +// return null; | |
2878 | +// } | |
2879 | +// } | |
2888 | 2880 | String id = getPersonId(patients); |
2889 | 2881 | if (null == id) { |
2890 | 2882 | return null; |
2891 | 2883 | |
... | ... | @@ -2901,9 +2893,9 @@ |
2901 | 2893 | "SKIN_EXAM_RESULT_CODE,ANUS_ABNORM_MARK,ANUS_ABNORM_DESCR,GENITALIA_ABNORM_MARK,\n" + |
2902 | 2894 | "GENITALIA_ABNORM_DESCR,SPINE_ABNORM_MARK,SPINE_ABNORM_DESCR,UMB_CORD_RESULT_CODE,\n" + |
2903 | 2895 | "REFERRAL_MARK,REFERTO_ORG_NAME,REFERTO_DEPT_NAME,REFERRAL_REASON,VISIT_DOCTOR_NAME,\n" + |
2904 | - "THIS_VISIT_DATE,NEXT_VISIT_DATE,NEXT_VISIT_PLACE,create_OrgId,orgNane,creator,creator_Id) \n" + | |
2896 | + "THIS_VISIT_DATE,NEXT_VISIT_DATE,NEXT_VISIT_PLACE) \n" + | |
2905 | 2897 | "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,\n" + |
2906 | - "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
2898 | + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
2907 | 2899 | ps = conn.prepareStatement(inSql); |
2908 | 2900 | ps.setDate(1, new Date(newbornVisit.getCreated().getTime())); |
2909 | 2901 | ps.setString(2, code); |
... | ... | @@ -2950,7 +2942,7 @@ |
2950 | 2942 | if(StringUtils.isNotBlank(newbornVisit.getTemperature())) { |
2951 | 2943 | ps.setDouble(13,Double.parseDouble(newbornVisit.getTemperature())); |
2952 | 2944 | }else{ |
2953 | - ps.setNull(13,Types.DOUBLE); | |
2945 | + ps.setNull(13, Types.DOUBLE); | |
2954 | 2946 | } |
2955 | 2947 | if(StringUtils.isNotBlank(newbornVisit.getHeartRate())) { |
2956 | 2948 | ps.setInt(14,Integer.parseInt(newbornVisit.getHeartRate())); |
... | ... | @@ -2960,7 +2952,7 @@ |
2960 | 2952 | if(StringUtils.isNotBlank(newbornVisit.getRespiratoryRate())) { |
2961 | 2953 | ps.setInt(15,Integer.parseInt(newbornVisit.getRespiratoryRate())); |
2962 | 2954 | }else{ |
2963 | - ps.setNull(15,Types.INTEGER); | |
2955 | + ps.setNull(15, Types.INTEGER); | |
2964 | 2956 | } |
2965 | 2957 | if("1".equals(newbornVisit.getComplexion())){ |
2966 | 2958 | ps.setString(16, "1"); |
... | ... | @@ -3021,7 +3013,7 @@ |
3021 | 3013 | } |
3022 | 3014 | }else{ |
3023 | 3015 | ps.setString(27,null); |
3024 | - ps.setString(28,null); | |
3016 | + ps.setString(28, null); | |
3025 | 3017 | } |
3026 | 3018 | if(newbornVisit.getHeartLung() != null){ |
3027 | 3019 | if("未见异常".equals(newbornVisit.getHeartLung())){ |
... | ... | @@ -3143,8 +3135,8 @@ |
3143 | 3135 | } |
3144 | 3136 | ps.setString(47,null); |
3145 | 3137 | ps.setString(48,null); |
3146 | - ps.setString(49,null); | |
3147 | - ps.setString(50,null); | |
3138 | + ps.setString(49, null); | |
3139 | + ps.setString(50, null); | |
3148 | 3140 | ps.setString(51,mapper.getUserName(newbornVisit.getDoctor())); |
3149 | 3141 | ps.setDate(52, new Date(newbornVisit.getCheckTime().getTime())); |
3150 | 3142 | if(newbornVisit.getNextVisitTimeDesc() != null){ |
... | ... | @@ -3153,10 +3145,7 @@ |
3153 | 3145 | ps.setNull(53,Types.DATE); |
3154 | 3146 | } |
3155 | 3147 | ps.setString(54,null); |
3156 | - ps.setString(55,createOrgId); | |
3157 | - ps.setString(56,orgName); | |
3158 | - ps.setString(57,creator); | |
3159 | - ps.setString(58,creatorId); | |
3148 | + | |
3160 | 3149 | ps.executeUpdate(); |
3161 | 3150 | } |
3162 | 3151 | } |
... | ... | @@ -3210,7 +3199,7 @@ |
3210 | 3199 | } |
3211 | 3200 | |
3212 | 3201 | |
3213 | - Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getTownOrgId())); | |
3202 | + Organization organization = organizationService.getOrganization(patients.getTownOrgId() == null ? Integer.parseInt(patients.getHospitalId()) : Integer.parseInt(patients.getTownOrgId())); | |
3214 | 3203 | |
3215 | 3204 | if (organization == null) |
3216 | 3205 | { |
3217 | 3206 | |
... | ... | @@ -3224,30 +3213,19 @@ |
3224 | 3213 | |
3225 | 3214 | |
3226 | 3215 | //智业中间库的医疗机构编码 |
3227 | - String code = ""; | |
3228 | - String hospital = basicConfigService.getOneBasicConfigById(organization.getTownOrgId()).getName(); | |
3216 | + String code = "000209541"; | |
3217 | +// String hospital = basicConfigService.getOneBasicConfigById(organization.getTownOrgId() == null ? organization.getId()+"" : organization.getTownOrgId()).getName(); | |
3218 | +// | |
3219 | +// if(hospital != "" && hospital != null){ | |
3220 | +// code = patients.getHospitalId(); | |
3221 | +// String hoSql = "select code from yljg where wname=\'"+hospital+"\'"; | |
3222 | +// ps = conn.prepareStatement(hoSql); | |
3223 | +// rs = ps.executeQuery(); | |
3224 | +// while(rs.next()){ | |
3225 | +// code = rs.getString("code"); | |
3226 | +// } | |
3227 | +// } | |
3229 | 3228 | |
3230 | - if(hospital != "" && hospital != null){ | |
3231 | - code = patients.getHospitalId(); | |
3232 | - String hoSql = "select code from yljg where wname=\'"+hospital+"\'"; | |
3233 | - ps = conn.prepareStatement(hoSql); | |
3234 | - rs = ps.executeQuery(); | |
3235 | - while(rs.next()){ | |
3236 | - code = rs.getString("code"); | |
3237 | - } | |
3238 | - | |
3239 | - gxMap = findGxHospitalById(organization.getTownOrgId()); | |
3240 | - if(gxMap != null){ | |
3241 | - createOrgId = gxMap.get("createOrgId"); | |
3242 | - orgName = gxMap.get("orgName"); | |
3243 | - creator = gxMap.get("creator"); | |
3244 | - creatorId = gxMap.get("creatorId"); | |
3245 | - }else{ | |
3246 | - return null; | |
3247 | - } | |
3248 | - | |
3249 | - } | |
3250 | - | |
3251 | 3229 | String id = getPersonId(patients); |
3252 | 3230 | |
3253 | 3231 | if (null == id) { |
3254 | 3232 | |
... | ... | @@ -3266,10 +3244,9 @@ |
3266 | 3244 | "OUTDOOR_ACT_HOURS,VITAMIND_NAME,VITAMIND_DOSE,DEVELOP_PASS_MARK,SICK_2VISIT_MARK,\n" + |
3267 | 3245 | "PNEUM_2VISIT_INPAT_TIMES,DIARRHEA_2VISIT_INPAT_TIMES,TRAUMA_2VISIT_INPAT_TIMES,\n" + |
3268 | 3246 | "OTHERS_2VISIT_DESCR,REFERRAL_MARK,REFERRAL_REASON,REFERTO_ORG_NAME,REFERTO_DEPT_NAME,\n" + |
3269 | - "FOLLOWUP_VISIT_DATE,FOLLOWUP_VISIT_DOCTOR_NAME,NEXT_FOLLOWUP_DATE,AGE_CODE,create_OrgId,\n" + | |
3270 | - "orgNane,creator,creator_Id) \n" + | |
3247 | + "FOLLOWUP_VISIT_DATE,FOLLOWUP_VISIT_DOCTOR_NAME,NEXT_FOLLOWUP_DATE,AGE_CODE) \n" + | |
3271 | 3248 | "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,\n" + |
3272 | - "?,?,?,?,?,?,?,?,?,?,?,?)"; | |
3249 | + "?,?,?,?,?,?,?,?)"; | |
3273 | 3250 | ps = conn.prepareStatement(inSql); |
3274 | 3251 | ps.setTimestamp(1, new Timestamp(babyCheckModel.getCreated().getTime())); |
3275 | 3252 | ps.setString(2, code); |
3276 | 3253 | |
3277 | 3254 | |
... | ... | @@ -3463,13 +3440,19 @@ |
3463 | 3440 | } |
3464 | 3441 | }else{ |
3465 | 3442 | ps.setString(39,null); |
3466 | - ps.setString(40,null); | |
3443 | + ps.setString(40, null); | |
3467 | 3444 | } |
3468 | - if(babyCheckModel.getHemoglobin() != null){ | |
3469 | - ps.setInt(41, Integer.parseInt(babyCheckModel.getHemoglobin())); | |
3470 | - }else{ | |
3471 | - ps.setNull(41,Types.INTEGER); | |
3445 | + try { | |
3446 | + if(babyCheckModel.getHemoglobin() != null){ | |
3447 | + ps.setInt(41, (int)Double.parseDouble(babyCheckModel.getHemoglobin())); | |
3448 | + }else{ | |
3449 | + ps.setNull(41, 0); | |
3450 | + } | |
3451 | + }catch (Exception e) | |
3452 | + { | |
3453 | + ps.setNull(41,0); | |
3472 | 3454 | } |
3455 | + | |
3473 | 3456 | ps.setNull(42, Types.DOUBLE); |
3474 | 3457 | ps.setString(43, null); |
3475 | 3458 | ps.setNull(44, Types.INTEGER); |
... | ... | @@ -3492,10 +3475,10 @@ |
3492 | 3475 | } |
3493 | 3476 | ps.setDate(57, new Date(babyCheckModel.getNextDate().getTime())); |
3494 | 3477 | ps.setString(58, babyCheckModel.getCheckMonth().toString()); |
3495 | - ps.setString(59,createOrgId); | |
3496 | - ps.setString(60,orgName); | |
3497 | - ps.setString(61,creator); | |
3498 | - ps.setString(62,creatorId); | |
3478 | +// ps.setString(59,createOrgId); | |
3479 | +// ps.setString(60,orgName); | |
3480 | +// ps.setString(61,creator); | |
3481 | +// ps.setString(62,creatorId); | |
3499 | 3482 | ps.executeUpdate(); |
3500 | 3483 | } |
3501 | 3484 | } |
platform-transfer/src/main/java/com/lyms/platform/worker/BoneTransferWorker.java
View file @
a7a1149
... | ... | @@ -27,6 +27,8 @@ |
27 | 27 | @Override |
28 | 28 | public void doTransfer() { |
29 | 29 | |
30 | + while (true) { | |
31 | + | |
30 | 32 | logger.info("getBoneRecords start"); |
31 | 33 | Connection conn = null; |
32 | 34 | Statement sta = null; |
33 | 35 | |
34 | 36 | |
35 | 37 | |
36 | 38 | |
37 | 39 | |
38 | 40 | |
39 | 41 | |
40 | 42 | |
41 | 43 | |
42 | 44 | |
43 | 45 | |
44 | 46 | |
... | ... | @@ -40,51 +42,59 @@ |
40 | 42 | rst = sta.executeQuery(sql); |
41 | 43 | while (rst.next()) { |
42 | 44 | Map map = new HashMap(); |
43 | - String PatientID = rst.getString("PatientID"); //身份证后八位 | |
44 | - map.put("cardNo",PatientID); | |
45 | + String PatientID = rst.getString("PatientID"); //身份证后八位 | |
46 | + map.put("cardNo", PatientID); | |
45 | 47 | |
46 | - String PartDisplayName = rst.getString("PartDisplayName"); | |
47 | - map.put("position",PartDisplayName); | |
48 | + String PartDisplayName = rst.getString("PartDisplayName"); | |
49 | + map.put("position", PartDisplayName); | |
48 | 50 | |
49 | - String PatientName = rst.getString("PatientName"); //孕妇姓名 | |
50 | - map.put("username",PatientName); | |
51 | + String PatientName = rst.getString("PatientName"); //孕妇姓名 | |
52 | + map.put("username", PatientName); | |
51 | 53 | |
52 | - String ZScore = rst.getString("ZScore"); | |
53 | - String TScore = rst.getString("TScore"); | |
54 | - String dbSos = rst.getString("dbSos"); | |
54 | + String ZScore = rst.getString("ZScore"); | |
55 | + String TScore = rst.getString("TScore"); | |
56 | + String dbSos = rst.getString("dbSos"); | |
55 | 57 | |
56 | - String bqi = rst.getString("dbBqi"); | |
57 | - String rrf = rst.getString("dbRrf"); | |
58 | - String eoa = rst.getString("dbEoa"); | |
58 | + String bqi = rst.getString("dbBqi"); | |
59 | + String rrf = rst.getString("dbRrf"); | |
60 | + String eoa = rst.getString("dbEoa"); | |
59 | 61 | |
60 | - String adultPercent = rst.getString("YoungAdult"); | |
61 | - String agePercent = rst.getString("ageMatched"); | |
62 | - String age = rst.getString("dbAge"); | |
62 | + String adultPercent = rst.getString("YoungAdult"); | |
63 | + String agePercent = rst.getString("ageMatched"); | |
64 | + String age = rst.getString("dbAge"); | |
63 | 65 | |
64 | - map.put("zvalue",ZScore); | |
65 | - map.put("tvalue",TScore); | |
66 | - map.put("sos",dbSos); | |
66 | + map.put("zvalue", ZScore); | |
67 | + map.put("tvalue", TScore); | |
68 | + map.put("sos", dbSos); | |
67 | 69 | |
68 | - map.put("bqi",bqi); | |
69 | - map.put("rrf",rrf); | |
70 | - map.put("eoa",eoa); | |
70 | + map.put("bqi", bqi); | |
71 | + map.put("rrf", rrf); | |
72 | + map.put("eoa", eoa); | |
71 | 73 | |
72 | - map.put("adultPercent",adultPercent); | |
73 | - map.put("agePercent",agePercent); | |
74 | - map.put("age",age); | |
75 | - map.put("type",properties.getType()); // | |
76 | - map.put("hospitalId",properties.getHospitalId()); // | |
77 | - exeUpdate( map, PatientID); | |
74 | + map.put("adultPercent", adultPercent); | |
75 | + map.put("agePercent", agePercent); | |
76 | + map.put("age", age); | |
77 | + map.put("type", properties.getType()); // | |
78 | + map.put("hospitalId", properties.getHospitalId()); // | |
79 | + exeUpdate(map, PatientID); | |
78 | 80 | |
79 | 81 | } |
80 | - Thread.sleep(5000); | |
82 | + | |
81 | 83 | } catch (Exception e) { |
82 | - logger.error("getBoneRecords Exception. ",e); | |
84 | + logger.error("getBoneRecords Exception. ", e); | |
85 | + } finally { | |
86 | + iConnection.close(conn, sta, rst); | |
83 | 87 | } |
84 | - finally { | |
85 | - iConnection.close(conn, sta,rst); | |
88 | + | |
89 | + try { | |
90 | + Thread.sleep(50000); | |
91 | + }catch (Exception e) | |
92 | + { | |
93 | + | |
86 | 94 | } |
87 | 95 | } |
96 | + | |
97 | + } | |
88 | 98 | |
89 | 99 | |
90 | 100 | public void exeUpdate(Map map,String PatientID) |
platform-transfer/src/main/java/com/lyms/platform/worker/TransferWorker.java
View file @
a7a1149
1 | 1 | package com.lyms.platform.worker; |
2 | 2 | |
3 | +import org.springframework.beans.factory.InitializingBean; | |
3 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
4 | 5 | import org.springframework.scheduling.annotation.Scheduled; |
5 | 6 | import org.springframework.stereotype.Component; |
6 | 7 | |
7 | 8 | |
8 | 9 | |
... | ... | @@ -8,16 +9,20 @@ |
8 | 9 | * Created by Administrator on 2020-03-23. |
9 | 10 | */ |
10 | 11 | @Component |
11 | -public class TransferWorker extends TransferAbstract implements ITransfer { | |
12 | +public class TransferWorker extends TransferAbstract implements ITransfer,InitializingBean { | |
12 | 13 | |
13 | 14 | @Autowired |
14 | 15 | private BoneTransferWorker boneTransferWorker; |
15 | 16 | |
16 | 17 | @Override |
17 | - @Scheduled(cron = "0 0/1 * * * ?") | |
18 | + // @Scheduled(cron = "0 0/1 * * * ?") | |
18 | 19 | public void doTransfer() { |
19 | - boneTransferWorker.doTransfer(); | |
20 | + // boneTransferWorker.doTransfer(); | |
20 | 21 | } |
21 | 22 | |
23 | + @Override | |
24 | + public void afterPropertiesSet() throws Exception { | |
25 | + boneTransferWorker.doTransfer(); | |
26 | + } | |
22 | 27 | } |