Commit e78151ff6b9b87af9a9c94240d52370e46b7ce35
1 parent
ebfd0dc4d9
Exists in
master
and in
6 other branches
update
Showing 7 changed files with 112 additions and 18 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/LisReportQuery.java
- platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LisController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
- platform-operate-api/src/main/resources/config.properties
- regional-etl/pom.xml
platform-biz-service/src/main/java/com/lyms/platform/permission/model/LisReportQuery.java
View file @
e78151f
| ... | ... | @@ -20,6 +20,10 @@ |
| 20 | 20 | private String type; |
| 21 | 21 | // 就诊卡号 |
| 22 | 22 | private String vcCardNo; |
| 23 | + | |
| 24 | + // 就诊卡号 | |
| 25 | + private List<String> vcCardNos; | |
| 26 | + | |
| 23 | 27 | // 患者姓名 |
| 24 | 28 | private String name; |
| 25 | 29 | // 住院号 |
| 26 | 30 | |
| ... | ... | @@ -47,9 +51,15 @@ |
| 47 | 51 | // 医院id |
| 48 | 52 | private String hospitalId; |
| 49 | 53 | |
| 54 | + // 医院id | |
| 55 | + private List<String> hospitalIds; | |
| 56 | + | |
| 50 | 57 | //联系方式 |
| 51 | 58 | private String phone; |
| 52 | 59 | |
| 60 | + //联系方式 | |
| 61 | + private List<String> phones; | |
| 62 | + | |
| 53 | 63 | //检验项集合 |
| 54 | 64 | private List<LisReportItemModel> items; |
| 55 | 65 | |
| ... | ... | @@ -58,6 +68,31 @@ |
| 58 | 68 | |
| 59 | 69 | //检验明细json |
| 60 | 70 | private String itemJson; |
| 71 | + | |
| 72 | + | |
| 73 | + public List<String> getPhones() { | |
| 74 | + return phones; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void setPhones(List<String> phones) { | |
| 78 | + this.phones = phones; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public List<String> getHospitalIds() { | |
| 82 | + return hospitalIds; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void setHospitalIds(List<String> hospitalIds) { | |
| 86 | + this.hospitalIds = hospitalIds; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public List<String> getVcCardNos() { | |
| 90 | + return vcCardNos; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public void setVcCardNos(List<String> vcCardNos) { | |
| 94 | + this.vcCardNos = vcCardNos; | |
| 95 | + } | |
| 61 | 96 | |
| 62 | 97 | public Integer getStatus() { |
| 63 | 98 | return status; |
platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml
View file @
e78151f
| ... | ... | @@ -225,12 +225,37 @@ |
| 225 | 225 | AND ID = #{id} |
| 226 | 226 | </if> |
| 227 | 227 | |
| 228 | - <if test="vcCardNo != null || phone != null "> | |
| 229 | - AND (VCCARDNO=#{vcCardNo} OR PHONE = #{phone}) | |
| 228 | + <if test="vcCardNos.size() !=0 || phones.size() != 0 "> | |
| 229 | + AND ( | |
| 230 | + <if test="vcCardNos.size() !=0 "> | |
| 231 | + VCCARDNO IN | |
| 232 | + <foreach collection="vcCardNos" item="vcCardNo" | |
| 233 | + index="index" open="(" close=")" separator=","> | |
| 234 | + #{vcCardNo} | |
| 235 | + </foreach> | |
| 236 | + OR | |
| 237 | + </if> | |
| 238 | + | |
| 239 | + <if test="phones.size() !=0 "> | |
| 240 | + PHONE IN | |
| 241 | + <foreach collection="phones" item="phone" | |
| 242 | + index="index" open="(" close=")" separator=","> | |
| 243 | + #{phone} | |
| 244 | + </foreach> | |
| 245 | + </if> | |
| 246 | + ) | |
| 230 | 247 | </if> |
| 231 | 248 | |
| 232 | 249 | <if test="hospitalId != null"> |
| 233 | 250 | AND HOSPITAL_ID=#{hospitalId} |
| 251 | + </if> | |
| 252 | + | |
| 253 | + <if test="hospitalIds !=null and hospitalIds.size() !=0 "> | |
| 254 | + AND HOSPITAL_ID IN | |
| 255 | + <foreach collection="hospitalIds" item="hospitalId" | |
| 256 | + index="index" open="(" close=")" separator=","> | |
| 257 | + #{hospitalId} | |
| 258 | + </foreach> | |
| 234 | 259 | </if> |
| 235 | 260 | |
| 236 | 261 | <if test="status != null"> |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
e78151f
| ... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 | public class PatientsQuery extends BaseQuery implements IConvertToNativeQuery { |
| 23 | 23 | |
| 24 | 24 | private String id; |
| 25 | + private List<String> ids; | |
| 25 | 26 | |
| 26 | 27 | private String husbandPhone; |
| 27 | 28 | |
| ... | ... | @@ -119,6 +120,14 @@ |
| 119 | 120 | |
| 120 | 121 | private String desc; |
| 121 | 122 | |
| 123 | + public List<String> getIds() { | |
| 124 | + return ids; | |
| 125 | + } | |
| 126 | + | |
| 127 | + public void setIds(List<String> ids) { | |
| 128 | + this.ids = ids; | |
| 129 | + } | |
| 130 | + | |
| 122 | 131 | public String getDesc() { |
| 123 | 132 | return desc; |
| 124 | 133 | } |
| ... | ... | @@ -987,6 +996,11 @@ |
| 987 | 996 | if (StringUtils.isNotEmpty(id)) { |
| 988 | 997 | condition = condition.and("id", id, MongoOper.IS); |
| 989 | 998 | } |
| 999 | + | |
| 1000 | + if (CollectionUtils.isNotEmpty(ids)) { | |
| 1001 | + condition = condition.and("id", ids, MongoOper.IN); | |
| 1002 | + } | |
| 1003 | + | |
| 990 | 1004 | if (null != vcCardNo) { |
| 991 | 1005 | condition = condition.and("vcCardNo", vcCardNo, MongoOper.IS); |
| 992 | 1006 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LisController.java
View file @
e78151f
| ... | ... | @@ -120,15 +120,15 @@ |
| 120 | 120 | /** |
| 121 | 121 | * 返回小程序查询个人的lis报告 返回的是列表 |
| 122 | 122 | * 该接口由app服务器端调用 |
| 123 | - * @param patientId 院内系统的孕妇的建档id | |
| 123 | + * @param patientIds 院内系统的孕妇的建档id | |
| 124 | 124 | * @param status 0 未推送 1已推送 不传就查询所有 |
| 125 | 125 | * @return |
| 126 | 126 | */ |
| 127 | 127 | @RequestMapping(method = RequestMethod.GET, value = "/getAppLis") |
| 128 | 128 | @ResponseBody |
| 129 | - public BaseResponse getLisAndRisData(@RequestParam("patientId") String patientId, | |
| 130 | - @RequestParam(required = false) Integer page, | |
| 131 | - @RequestParam(required = false) Integer limit, | |
| 129 | + public BaseResponse getLisAndRisData(@RequestParam("patientIds") String patientIds, | |
| 130 | + @RequestParam("page") Integer page, | |
| 131 | + @RequestParam("limit") Integer limit, | |
| 132 | 132 | @RequestParam(required = false) Integer status, |
| 133 | 133 | @RequestHeader("Authorization") String token) { |
| 134 | 134 | |
| ... | ... | @@ -138,7 +138,7 @@ |
| 138 | 138 | return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("Token is error"); |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | - return lisFacade.getAppLisList(patientId, status, page, limit); | |
| 141 | + return lisFacade.getAppLisList(patientIds, status, page, limit); | |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
View file @
e78151f
| ... | ... | @@ -400,31 +400,53 @@ |
| 400 | 400 | /** |
| 401 | 401 | * 返回小程序查询个人的lis报告 |
| 402 | 402 | * 该接口由app服务器端调用 |
| 403 | - * @param patientId 院内系统孕妇建档id | |
| 403 | + * @param patientIds 院内系统孕妇建档id | |
| 404 | 404 | * @return |
| 405 | 405 | */ |
| 406 | - public BaseResponse getAppLisList(String patientId,Integer status,Integer page,Integer limit) { | |
| 406 | + public BaseResponse getAppLisList(String patientIds,Integer status,Integer page,Integer limit) { | |
| 407 | 407 | |
| 408 | + List<String> ids = new ArrayList<>(); | |
| 409 | + if (StringUtils.isNotEmpty(patientIds)) | |
| 410 | + { | |
| 411 | + CollectionUtils.addAll(ids,patientIds.split(",")); | |
| 412 | + } | |
| 408 | 413 | |
| 409 | 414 | PatientsQuery patientsQuery=new PatientsQuery(); |
| 410 | - patientsQuery.setId(patientId); | |
| 415 | + patientsQuery.setIds(ids); | |
| 411 | 416 | patientsQuery.setYn(YnEnums.YES.getId()); |
| 412 | 417 | List<Patients> list= patientsService.queryPatient(patientsQuery); |
| 413 | 418 | List<LisReportModel> lises = null; |
| 414 | 419 | if (CollectionUtils.isNotEmpty(list)) |
| 415 | 420 | { |
| 416 | - Patients patients = list.get(0); | |
| 421 | + List<String> vcCardNos = new ArrayList<>(); | |
| 422 | + List<String> hosptalIds = new ArrayList<>(); | |
| 423 | + List<String> phones = new ArrayList<>(); | |
| 417 | 424 | |
| 425 | + for(Patients pat : list) | |
| 426 | + { | |
| 427 | + if (pat != null && StringUtils.isNotEmpty(pat.getHospitalId())) | |
| 428 | + { | |
| 429 | + if (StringUtils.isNotEmpty(pat.getVcCardNo())) | |
| 430 | + { | |
| 431 | + vcCardNos.add(pat.getVcCardNo()); | |
| 432 | + } | |
| 433 | + if (StringUtils.isNotEmpty(pat.getPhone())) | |
| 434 | + { | |
| 435 | + phones.add(pat.getPhone()); | |
| 436 | + } | |
| 437 | + hosptalIds.add(pat.getHospitalId()); | |
| 438 | + } | |
| 439 | + } | |
| 418 | 440 | LisReportQuery query = new LisReportQuery(); |
| 419 | 441 | query.setPage(page); |
| 420 | 442 | query.setLimit(limit); |
| 421 | 443 | query.setNeed("true"); |
| 422 | 444 | query.setSort(" PUBLISH_TIME DESC "); |
| 423 | 445 | |
| 424 | - query.setPhone(patients.getPhone()); | |
| 425 | - query.setVcCardNo(patients.getVcCardNo()); | |
| 446 | + query.setPhones(phones); | |
| 447 | + query.setVcCardNos(vcCardNos); | |
| 426 | 448 | query.setStatus(status); |
| 427 | - query.setHospitalId(patients.getHospitalId()); | |
| 449 | + query.setHospitalIds(hosptalIds); | |
| 428 | 450 | |
| 429 | 451 | lises = lisService.queryLisDataByQuery(query); |
| 430 | 452 | if (CollectionUtils.isNotEmpty(lises)) |
| ... | ... | @@ -440,8 +462,6 @@ |
| 440 | 462 | } |
| 441 | 463 | } |
| 442 | 464 | } |
| 443 | - | |
| 444 | - | |
| 445 | 465 | } |
| 446 | 466 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
| 447 | 467 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
platform-operate-api/src/main/resources/config.properties
View file @
e78151f
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | area_count_url=119.90.57.26:1522 |
| 29 | 29 | |
| 30 | 30 | #同步mysql数据到各个区域的地址,多个用逗号隔开 如:https://area-qhd-api.healthbaby.com.cn:18019/syncMysqlData,https://area-dz-api.healthbaby.com.cn:12356/syncMysqlData |
| 31 | -sync_mysql_data_url=https://stage-rp-api.healthbaby.com.cn/syncMysqlData | |
| 31 | +sync_mysql_data_url= | |
| 32 | 32 | |
| 33 | 33 | #数据源相关配置 |
| 34 | 34 | jdbc.0.driver=oracle.jdbc.driver.OracleDriver |
regional-etl/pom.xml
View file @
e78151f
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | <properties> |
| 13 | 13 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 14 | 14 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| 15 | - <java.version>1.8</java.version> | |
| 15 | + <java.version>1.7</java.version> | |
| 16 | 16 | </properties> |
| 17 | 17 | |
| 18 | 18 | <dependencies> |