Commit 5fcd9dbb674351b0f839a10cbe1d5eb5cfc108cb
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 3 changed files
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/ConnTools.java
View file @
5fcd9db
| ... | ... | @@ -36,10 +36,17 @@ |
| 36 | 36 | private static String fmPassword = "LYMS"; |
| 37 | 37 | |
| 38 | 38 | |
| 39 | - private static String clDirverClassName = "oracle.jdbc.driver.OracleDriver"; | |
| 40 | - private static String clUrl = "jdbc:oracle:thin:@168.254.0.80:1521:jhemr"; | |
| 41 | - private static String clUser = "lyms"; | |
| 42 | - private static String clPassword = "lyms"; | |
| 39 | +// private static String clDirverClassName = "oracle.jdbc.driver.OracleDriver"; | |
| 40 | +// private static String clUrl = "jdbc:oracle:thin:@168.254.0.80:1521:jhemr"; | |
| 41 | +// private static String clUser = "lyms"; | |
| 42 | +// private static String clPassword = "lyms"; | |
| 43 | + | |
| 44 | + | |
| 45 | + private static String clDirverClassName = "com.mysql.jdbc.Driver"; | |
| 46 | + private static String clUrl = "jdbc:mysql://119.90.57.26:3306/platform?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; | |
| 47 | + private static String clUser = "platform"; | |
| 48 | + private static String clPassword = "platform123"; | |
| 49 | + | |
| 43 | 50 | |
| 44 | 51 | public static Connection makeHisConnection() { |
| 45 | 52 | Connection conn = null; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
View file @
5fcd9db
| ... | ... | @@ -212,6 +212,7 @@ |
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | + | |
| 215 | 216 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
| 216 | 217 | objectResponse.setData(result); |
| 217 | 218 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| ... | ... | @@ -225,7 +226,7 @@ |
| 225 | 226 | * @return |
| 226 | 227 | */ |
| 227 | 228 | public BaseResponse addMeasureDataInfo(MeasureInfoRequest measureInfoRequest) { |
| 228 | - BaseResponse baseResponse = new BaseResponse(); | |
| 229 | + BaseObjectResponse baseResponse = new BaseObjectResponse(); | |
| 229 | 230 | |
| 230 | 231 | //是否住院记录 1 住院 2 非住院 |
| 231 | 232 | Integer isZy = 2; |
| 232 | 233 | |
| ... | ... | @@ -245,8 +246,9 @@ |
| 245 | 246 | if (DateUtil.getyyyy_MM_dd(measureDataInfoModel.getModified()).equals(DateUtil.getyyyy_MM_dd(new Date()))) { |
| 246 | 247 | todayCount = measureDataInfoModel.getTodayCount() + 1; |
| 247 | 248 | if (todayCount > MAX_TODAY_COUNT) { |
| 249 | + baseResponse.setData(-1); | |
| 248 | 250 | baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 249 | - baseResponse.setErrormsg("对不起,每天最多可以测量" + MAX_TODAY_COUNT + "次,请明天再来吧!"); | |
| 251 | + baseResponse.setErrormsg("成功"); | |
| 250 | 252 | return baseResponse; |
| 251 | 253 | } |
| 252 | 254 | dataInfoModel.setTodayCount(todayCount); |
| 253 | 255 | |
| ... | ... | @@ -317,21 +319,9 @@ |
| 317 | 319 | } |
| 318 | 320 | |
| 319 | 321 | Integer count = MAX_TODAY_COUNT - todayCount; |
| 320 | - String message = ""; | |
| 321 | - if (measureInfoRequest.getValueType() == 1) | |
| 322 | - { | |
| 323 | - message = "信息记录成功,今天您还可以测量"+count+"次体重和身高"; | |
| 324 | - } | |
| 325 | - else if (measureInfoRequest.getValueType() == 2) | |
| 326 | - { | |
| 327 | - message = "信息记录成功,今天您还可以测量"+count+"次血压和脉搏"; | |
| 328 | - } | |
| 329 | - else if (measureInfoRequest.getValueType() == 3) | |
| 330 | - { | |
| 331 | - message = "信息记录成功,今天您还可以测量"+count+"次体温"; | |
| 332 | - } | |
| 322 | + baseResponse.setData(count); | |
| 333 | 323 | baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 334 | - baseResponse.setErrormsg(message); | |
| 324 | + baseResponse.setErrormsg("保存成功"); | |
| 335 | 325 | return baseResponse; |
| 336 | 326 | } |
| 337 | 327 | |
| 338 | 328 | |
| ... | ... | @@ -419,13 +409,13 @@ |
| 419 | 409 | Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeClConnection(); |
| 420 | 410 | try { |
| 421 | 411 | QueryRunner queryRunner = new QueryRunner(); |
| 422 | - List<MeasurePatientInfo> list = queryRunner.query(conn, " select ZJH as certNo,XM as userName,NL as age,XB as sex, SJH as phone,INP_NO as zyNo,visit_id as visitId,PATIENT_ID as patientId,DZ as address,RYSJ as inDate,CYSJ as outDate from lyms " + | |
| 412 | + List<MeasurePatientInfo> list = queryRunner.query(conn, " select ZJH as certNo,XM as userName,NL as age,XB as sex, SJH as phone,INP_NO as zyNo,VISIT_ID as visitId,PATIENT_ID as patientId,DZ as address,RYSJ as inDate,CYSJ as outDate from lyms " + | |
| 423 | 413 | " where ZJH='"+certNo+"' order by RYSJ desc ", new BeanListHandler<MeasurePatientInfo>(MeasurePatientInfo.class)); |
| 424 | 414 | if (CollectionUtils.isNotEmpty(list)) |
| 425 | 415 | { |
| 426 | 416 | MeasurePatientInfo info = list.get(0); |
| 427 | 417 | Date outDate = info.getOutDate(); |
| 428 | - return outDate != null; | |
| 418 | + return outDate == null; | |
| 429 | 419 | } |
| 430 | 420 | } |
| 431 | 421 | catch (Exception e) |
| ... | ... | @@ -449,7 +439,7 @@ |
| 449 | 439 | Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeClConnection(); |
| 450 | 440 | try { |
| 451 | 441 | QueryRunner queryRunner = new QueryRunner(); |
| 452 | - List<MeasurePatientInfo> list = queryRunner.query(conn, "select ZJH as certNo,XM as userName,NL as age,XB as sex, SJH as phone,INP_NO as zyNo,visit_id as visitId,PATIENT_ID as patientId,DZ as address,RYSJ as inDate,CYSJ as outDate from lyms " + | |
| 442 | + List<MeasurePatientInfo> list = queryRunner.query(conn, "select ZJH as certNo,XM as userName,NL as age,XB as sex, SJH as phone,INP_NO as zyNo,VISIT_ID as visitId,PATIENT_ID as patientId,DZ as address,RYSJ as inDate,CYSJ as outDate from lyms " + | |
| 453 | 443 | " where 1 = 1 "+conditionSql+" order by RYSJ desc ", new BeanListHandler<MeasurePatientInfo>(MeasurePatientInfo.class)); |
| 454 | 444 | if (CollectionUtils.isNotEmpty(list)) |
| 455 | 445 | { |
| ... | ... | @@ -475,6 +465,7 @@ |
| 475 | 465 | result.setVisitId(model.getVisitId() == null ? "" : model.getVisitId()); |
| 476 | 466 | result.setZyNo(model.getZyNo() == null ? "" : model.getZyNo()); |
| 477 | 467 | result.setPatientId(model.getPatientId() == null ? "" : model.getPatientId()); |
| 468 | + result.setHospitalId(hospitalId); | |
| 478 | 469 | } |
| 479 | 470 | return result; |
| 480 | 471 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MeasureBaseInfoResult.java
View file @
5fcd9db
| ... | ... | @@ -80,6 +80,10 @@ |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | public String getVcCardNo() { |
| 83 | + if (vcCardNo == null) | |
| 84 | + { | |
| 85 | + return ""; | |
| 86 | + } | |
| 83 | 87 | return vcCardNo; |
| 84 | 88 | } |
| 85 | 89 | |
| ... | ... | @@ -96,6 +100,10 @@ |
| 96 | 100 | } |
| 97 | 101 | |
| 98 | 102 | public String getPhone() { |
| 103 | + if (phone == null) | |
| 104 | + { | |
| 105 | + return ""; | |
| 106 | + } | |
| 99 | 107 | return phone; |
| 100 | 108 | } |
| 101 | 109 | |
| ... | ... | @@ -112,6 +120,10 @@ |
| 112 | 120 | } |
| 113 | 121 | |
| 114 | 122 | public String getZyNo() { |
| 123 | + if (zyNo == null) | |
| 124 | + { | |
| 125 | + return ""; | |
| 126 | + } | |
| 115 | 127 | return zyNo; |
| 116 | 128 | } |
| 117 | 129 | |
| ... | ... | @@ -120,6 +132,10 @@ |
| 120 | 132 | } |
| 121 | 133 | |
| 122 | 134 | public String getVisitId() { |
| 135 | + if (visitId == null) | |
| 136 | + { | |
| 137 | + return ""; | |
| 138 | + } | |
| 123 | 139 | return visitId; |
| 124 | 140 | } |
| 125 | 141 | |
| ... | ... | @@ -128,6 +144,10 @@ |
| 128 | 144 | } |
| 129 | 145 | |
| 130 | 146 | public String getPatientId() { |
| 147 | + if (patientId == null) | |
| 148 | + { | |
| 149 | + return ""; | |
| 150 | + } | |
| 131 | 151 | return patientId; |
| 132 | 152 | } |
| 133 | 153 | |
| ... | ... | @@ -136,6 +156,10 @@ |
| 136 | 156 | } |
| 137 | 157 | |
| 138 | 158 | public String getAddress() { |
| 159 | + if (address == null) | |
| 160 | + { | |
| 161 | + return ""; | |
| 162 | + } | |
| 139 | 163 | return address; |
| 140 | 164 | } |
| 141 | 165 | |
| ... | ... | @@ -144,6 +168,10 @@ |
| 144 | 168 | } |
| 145 | 169 | |
| 146 | 170 | public String getFace() { |
| 171 | + if (face == null) | |
| 172 | + { | |
| 173 | + return ""; | |
| 174 | + } | |
| 147 | 175 | return face; |
| 148 | 176 | } |
| 149 | 177 | |
| ... | ... | @@ -152,6 +180,10 @@ |
| 152 | 180 | } |
| 153 | 181 | |
| 154 | 182 | public String getFinger() { |
| 183 | + if (finger == null) | |
| 184 | + { | |
| 185 | + return ""; | |
| 186 | + } | |
| 155 | 187 | return finger; |
| 156 | 188 | } |
| 157 | 189 |