Commit aa40c11f57301479e4b4dff4cc2a2c18b0d2dc5a
1 parent
2a9a257abc
Exists in
master
and in
6 other branches
秦皇岛-区域妇幼-建档优惠券统计,新加筛选预约分娩医院
Showing 2 changed files with 43 additions and 19 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BookbuildingCouponQuery.java
View file @
aa40c11
... | ... | @@ -17,6 +17,15 @@ |
17 | 17 | private String areaId; |
18 | 18 | private String hospitalId; |
19 | 19 | private List<String> personIds; |
20 | + private String yyzyfmHospitalId; | |
21 | + | |
22 | + public String getYyzyfmHospitalId() { | |
23 | + return yyzyfmHospitalId; | |
24 | + } | |
25 | + | |
26 | + public void setYyzyfmHospitalId(String yyzyfmHospitalId) { | |
27 | + this.yyzyfmHospitalId = yyzyfmHospitalId; | |
28 | + } | |
20 | 29 | |
21 | 30 | public List<String> getPersonIds() { |
22 | 31 | return personIds; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
aa40c11
... | ... | @@ -5403,33 +5403,37 @@ |
5403 | 5403 | @Override |
5404 | 5404 | public BaseObjectResponse bookbuildingCoupon(BookbuildingCouponQuery query) { |
5405 | 5405 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
5406 | - List<PersonModel> personList=new ArrayList<>(); | |
5407 | - if(StringUtils.isNotEmpty(query.getName()) || StringUtils.isNotEmpty(query.getCardNo())){ | |
5408 | - PersonModelQuery personModelQuery = new PersonModelQuery(); | |
5409 | - personModelQuery.setYn(YnEnums.YES.getId()); | |
5406 | + List<Patients> patientsList=new ArrayList<>(); | |
5407 | + if(StringUtils.isNotEmpty(query.getName()) || StringUtils.isNotEmpty(query.getCardNo()) || | |
5408 | + StringUtils.isNotEmpty(query.getYyzyfmHospitalId())){ | |
5409 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
5410 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
5410 | 5411 | if (StringUtils.isNotEmpty(query.getName())) { |
5411 | - personModelQuery.setName(query.getName()); | |
5412 | + patientsQuery.setName(query.getName()); | |
5412 | 5413 | } |
5413 | 5414 | if (StringUtils.isNotEmpty(query.getCardNo())) { |
5414 | - personModelQuery.setCardNo(query.getCardNo()); | |
5415 | + patientsQuery.setCardNo(query.getCardNo()); | |
5415 | 5416 | } |
5416 | - personList = personService.queryPersons(personModelQuery); | |
5417 | + if (StringUtils.isNotEmpty(query.getYyzyfmHospitalId())) { | |
5418 | + patientsQuery.setYyzyfmHospitalId(query.getYyzyfmHospitalId()); | |
5419 | + } | |
5420 | + patientsList = patientsService.queryPatient(patientsQuery); | |
5417 | 5421 | //没查到 |
5418 | - if(CollectionUtils.isEmpty(personList)){ | |
5422 | + if(CollectionUtils.isEmpty(patientsList)){ | |
5419 | 5423 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
5420 | 5424 | objectResponse.setErrormsg("成功"); |
5421 | 5425 | return objectResponse; |
5422 | 5426 | } |
5423 | 5427 | } |
5424 | - List<String> personIds=new ArrayList<>(); | |
5425 | - for (PersonModel personModel : personList) { | |
5426 | - if (StringUtils.isNotEmpty(personModel.getId())) { | |
5427 | - personIds.add(personModel.getId()); | |
5428 | + List<String> patientpIds=new ArrayList<>(); | |
5429 | + for (Patients patients : patientsList) { | |
5430 | + if (StringUtils.isNotEmpty(patients.getPid())) { | |
5431 | + patientpIds.add(patients.getPid()); | |
5428 | 5432 | } |
5429 | 5433 | } |
5430 | - //查询姓名身份证结果放入mysql查询 | |
5431 | - if(CollectionUtils.isNotEmpty(personIds)){ | |
5432 | - query.setPersonIds(personIds); | |
5434 | + //筛选档案信息结果放入mysql查询 | |
5435 | + if(CollectionUtils.isNotEmpty(patientpIds)){ | |
5436 | + query.setPersonIds(patientpIds); | |
5433 | 5437 | } |
5434 | 5438 | //分页数据 |
5435 | 5439 | query.mysqlBuild(couponMapper.bookbuildingCouponCount(query)); |
5436 | 5440 | |
... | ... | @@ -5439,11 +5443,22 @@ |
5439 | 5443 | List<Map> result=new ArrayList<>(); |
5440 | 5444 | for (Map bookbuildingCoupon : bookbuildingCouponList) { |
5441 | 5445 | Map map=new HashedMap(); |
5442 | - PersonModel personModel = mongoTemplate.findById(bookbuildingCoupon.get("userid").toString(), PersonModel.class); | |
5443 | - map.put("name", StringUtils.isNotEmpty(personModel.getName())?personModel.getName():""); | |
5444 | - map.put("phone", StringUtils.isNotEmpty(personModel.getPhone())?personModel.getPhone():""); | |
5445 | - map.put("cardNo", StringUtils.isNotEmpty(personModel.getCardNo())?personModel.getCardNo():""); | |
5446 | + PatientsQuery patientsQuery2 = new PatientsQuery(); | |
5447 | + patientsQuery2.setYn(YnEnums.YES.getId()); | |
5448 | + patientsQuery2.setPid(bookbuildingCoupon.get("userid").toString()); | |
5449 | + List<Patients> patients =patientsService.queryPatient(patientsQuery2); | |
5450 | + Patients patientsModel=new Patients(); | |
5451 | + if(CollectionUtils.isNotEmpty(patients)){ | |
5452 | + patientsModel = patients.get(0); | |
5453 | + } | |
5454 | + map.put("name", StringUtils.isNotEmpty(patientsModel.getUsername())?patientsModel.getUsername():""); | |
5455 | + map.put("phone", StringUtils.isNotEmpty(patientsModel.getPhone())?patientsModel.getPhone():""); | |
5456 | + map.put("cardNo", StringUtils.isNotEmpty(patientsModel.getCardNo())?patientsModel.getCardNo():""); | |
5457 | + String address=CommonsHelper.getResidence(patientsModel.getProvinceRegisterId(), patientsModel.getCityRegisterId(), patientsModel.getAreaRegisterId(), patientsModel.getStreetRegisterId(), patientsModel.getAddressRegister(), basicConfigService); | |
5458 | + map.put("address", address); | |
5446 | 5459 | map.put("hospitalName", bookbuildingCoupon.get("hospitalname")); |
5460 | + String yyzyfmHospitalId_name = couponMapper.findHospitalNameById(patientsModel.getYyzyfmHospitalId()); | |
5461 | + map.put("yyzyfmHospitalId", StringUtils.isNotEmpty(yyzyfmHospitalId_name)?yyzyfmHospitalId_name:""); | |
5447 | 5462 | map.put("created", bookbuildingCoupon.get("created")); |
5448 | 5463 | |
5449 | 5464 | result.add(map); |