Commit 19ec30e0b97496b33a6fcfc4534b7e19b77340f9
1 parent
23cc0b8076
Exists in
master
and in
8 other branches
code update
Showing 2 changed files with 27 additions and 19 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/JdbcUtil.java
View file @
19ec30e
| ... | ... | @@ -1205,8 +1205,10 @@ |
| 1205 | 1205 | |
| 1206 | 1206 | |
| 1207 | 1207 | if (buildHospitalId != null && !"".equals(buildHospitalId)) { |
| 1208 | - String hname = getString(getOralceSingleObjBySql("select h_name from plat_hospital h where h.h_isvalid=1 and h_id = '" + buildHospitalId + "'")); | |
| 1209 | - String id = getString(getMysqlSingleObjBySql("select id from organization where name = '" + hname + "'")); | |
| 1208 | + String hname = getPatHosptalById(buildHospitalId); | |
| 1209 | +// String hname = getString(getOralceSingleObjBySql("select h_name from plat_hospital h where h.h_isvalid=1 and h_id = '" + buildHospitalId + "'")); | |
| 1210 | +// String id = getString(getMysqlSingleObjBySql("select id from organization where name = '" + hname + "'")); | |
| 1211 | + String id = getOrgIdByName(hname); | |
| 1210 | 1212 | model.setHospitalId(id); |
| 1211 | 1213 | } |
| 1212 | 1214 | |
| ... | ... | @@ -1218,7 +1220,8 @@ |
| 1218 | 1220 | |
| 1219 | 1221 | String dueTypeId = getString(map.get("PI_FENMIAN")); |
| 1220 | 1222 | if (dueTypeId != null && !"".equals(dueTypeId)) { |
| 1221 | - String name = getString(getOralceSingleObjBySql("select pd.dc_name from Plat_Datacontent pd where pd.dc_id='" + dueTypeId + "'")); | |
| 1223 | + String name = getDataContentByById(dueTypeId); | |
| 1224 | + //String name = getString(getOralceSingleObjBySql("select pd.dc_name from Plat_Datacontent pd where pd.dc_id='" + dueTypeId + "'")); | |
| 1222 | 1225 | model.setDueType(FmTypeEnums.getIdByName(name)); |
| 1223 | 1226 | } |
| 1224 | 1227 | |
| ... | ... | @@ -1231,8 +1234,10 @@ |
| 1231 | 1234 | |
| 1232 | 1235 | String doctorId = getString(map.get("PI_CREATEOPER")); |
| 1233 | 1236 | if (doctorId != null && !"".equals(doctorId)) { |
| 1234 | - String hname = getString(getOralceSingleObjBySql("select e.e_name from mommy_employee e where e.e_id = '" + doctorId + "'")); | |
| 1235 | - String id = getString(getMysqlSingleObjBySql("select id from users where name = '" + hname + "'")); | |
| 1237 | + String hname = getEmpNameById(doctorId); | |
| 1238 | + //String hname = getString(getOralceSingleObjBySql("select e.e_name from mommy_employee e where e.e_id = '" + doctorId + "'")); | |
| 1239 | + //String id = getString(getMysqlSingleObjBySql("select id from users where name = '" + hname + "'")); | |
| 1240 | + String id = getUserIdByName(hname); | |
| 1236 | 1241 | model.setBuildDoctor(id); |
| 1237 | 1242 | } |
| 1238 | 1243 | |
| ... | ... | @@ -1324,7 +1329,8 @@ |
| 1324 | 1329 | |
| 1325 | 1330 | String hname = getString(map.get("CER_EXAMINHOSPITAL")); |
| 1326 | 1331 | if (hname != null && !"".equals(hname)) { |
| 1327 | - String id = getString(getMysqlSingleObjBySql("select id from organization where name = '" + hname + "'")); | |
| 1332 | + String id = getOrgIdByName(hname); | |
| 1333 | + //String id = getString(getMysqlSingleObjBySql("select id from organization where name = '" + hname + "'")); | |
| 1328 | 1334 | checkModel.setHospitalId(id); |
| 1329 | 1335 | } |
| 1330 | 1336 | checkModel.setCreated(getDate(map.get("CER_CREATETIME"))); |
| ... | ... | @@ -1334,7 +1340,8 @@ |
| 1334 | 1340 | |
| 1335 | 1341 | String doctorName = getString(map.get("CER_DOCTORSIGNATURE")); |
| 1336 | 1342 | if (doctorName != null && !"".equals(doctorName)) { |
| 1337 | - String id = getString(getMysqlSingleObjBySql("select id from users where name = '" + doctorName + "'")); | |
| 1343 | + String id = getUserIdByName(doctorName); | |
| 1344 | + // String id = getString(getMysqlSingleObjBySql("select id from users where name = '" + doctorName + "'")); | |
| 1338 | 1345 | checkModel.setCheckDoctor(id); |
| 1339 | 1346 | } |
| 1340 | 1347 | |
| ... | ... | @@ -1528,7 +1535,7 @@ |
| 1528 | 1535 | } |
| 1529 | 1536 | } |
| 1530 | 1537 | |
| 1531 | - public void syncDataBaby(String hid, MongoTemplate mongoTemplate) { | |
| 1538 | + public static void syncDataBaby(String hid, MongoTemplate mongoTemplate) { | |
| 1532 | 1539 | try { |
| 1533 | 1540 | syncBabyData(hid, mongoTemplate); |
| 1534 | 1541 | } catch (Exception e) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
19ec30e
| ... | ... | @@ -99,22 +99,23 @@ |
| 99 | 99 | @ResponseBody |
| 100 | 100 | public String syncData(@RequestParam(required = true) final String oracleHid,@RequestParam(required = true) final Integer mysqlHid) { |
| 101 | 101 | final MongoTemplate template = mongoTemplate; |
| 102 | -// new Thread(new Runnable() { | |
| 103 | -// @Override | |
| 104 | -// public void run() { | |
| 105 | -// System.out.print("同步开始儿童>>>>>>>>>>>>>>>>>>>>>>>>>"); | |
| 106 | -// new com.lyms.platform.biz.JdbcUtil().syncDataBaby(hid, template); | |
| 107 | -// System.out.print("同步结束儿童>>>>>>>>>>>>>>>>>>>>>>>>>"); | |
| 108 | -// } | |
| 109 | -// }).start(); | |
| 102 | + | |
| 110 | 103 | JdbcUtil.initData(mysqlHid); |
| 111 | 104 | System.out.println("initData------"); |
| 112 | 105 | |
| 113 | - System.out.println("同步开始孕妇1>>>>>>>>>>>>>>>>>>>>>>>>>"); | |
| 114 | - JdbcUtil.syncDataPat(oracleHid, template); | |
| 115 | - System.out.println("同步结束孕妇1>>>>>>>>>>>>>>>>>>>>>>>>>"); | |
| 106 | + new Thread(new Runnable() { | |
| 107 | + @Override | |
| 108 | + public void run() { | |
| 109 | + System.out.print("同步开始儿童>>>>>>>>>>>>>>>>>>>>>>>>>"); | |
| 110 | + JdbcUtil.syncDataBaby(oracleHid, template); | |
| 111 | + System.out.print("同步结束儿童>>>>>>>>>>>>>>>>>>>>>>>>>"); | |
| 112 | + } | |
| 113 | + }).start(); | |
| 116 | 114 | |
| 117 | 115 | |
| 116 | +// System.out.println("同步开始孕妇1>>>>>>>>>>>>>>>>>>>>>>>>>"); | |
| 117 | +// JdbcUtil.syncDataPat(oracleHid, template); | |
| 118 | +// System.out.println("同步结束孕妇1>>>>>>>>>>>>>>>>>>>>>>>>>"); | |
| 118 | 119 | return "starting..........."; |
| 119 | 120 | } |
| 120 | 121 | } |