Commit 8c76040529ed70667ed452278ea06b19cb754c58
1 parent
1f00b89150
Exists in
master
and in
3 other branches
code update
Showing 3 changed files with 38 additions and 13 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/AntenatalExaminationDaoImpl.java
View file @
8c76040
| ... | ... | @@ -6,8 +6,16 @@ |
| 6 | 6 | import com.lyms.platform.common.dao.operator.MongoOper; |
| 7 | 7 | import com.lyms.platform.common.dao.operator.MongoQuery; |
| 8 | 8 | import com.lyms.platform.common.dao.operator.Page; |
| 9 | +import com.lyms.platform.common.enums.YnEnums; | |
| 10 | +import com.lyms.platform.common.utils.StringUtils; | |
| 9 | 11 | import com.lyms.platform.pojo.AntenatalExaminationModel; |
| 10 | 12 | import com.lyms.platform.pojo.Patients; |
| 13 | +import com.mongodb.DBCollection; | |
| 14 | +import com.mongodb.DBObject; | |
| 15 | +import com.mongodb.MapReduceCommand; | |
| 16 | +import com.mongodb.MapReduceOutput; | |
| 17 | +import org.apache.commons.collections.CollectionUtils; | |
| 18 | +import org.springframework.data.domain.Sort; | |
| 11 | 19 | import org.springframework.data.mongodb.core.aggregation.Aggregation; |
| 12 | 20 | import org.springframework.data.mongodb.core.aggregation.AggregationOperation; |
| 13 | 21 | import org.springframework.data.mongodb.core.aggregation.AggregationResults; |
| ... | ... | @@ -16,6 +24,7 @@ |
| 16 | 24 | |
| 17 | 25 | import java.text.ParseException; |
| 18 | 26 | import java.text.SimpleDateFormat; |
| 27 | +import java.util.ArrayList; | |
| 19 | 28 | import java.util.Date; |
| 20 | 29 | import java.util.List; |
| 21 | 30 | |
| 22 | 31 | |
| ... | ... | @@ -64,9 +73,28 @@ |
| 64 | 73 | public List<AntenatalExaminationModel> queryYuyueAntenatalExamination(Date yuYueDate,String hospitalId) { |
| 65 | 74 | AggregationOperation match = Aggregation.match(Criteria.where("nextCheckTime").gte(yuYueDate).lte(yuYueDate).and("hospitalId").is(hospitalId)); |
| 66 | 75 | AggregationOperation group = Aggregation.group("parentId").max("created").as("created"); |
| 67 | - Aggregation aggregation = Aggregation.newAggregation(match, group); | |
| 76 | + Aggregation aggregation = Aggregation.newAggregation(group,match); | |
| 68 | 77 | AggregationResults<AntenatalExaminationModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_antex", AntenatalExaminationModel.class); |
| 69 | 78 | return result.getMappedResults(); |
| 79 | +// AggregationOperation match = Aggregation.match(Criteria.where("hospitalId").is(hospitalId)); | |
| 80 | +// AggregationOperation group = Aggregation.group("parentId").max("created").as("created"); | |
| 81 | +// Aggregation aggregation = Aggregation.newAggregation(match, group); | |
| 82 | +// AggregationResults<AntenatalExaminationModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_antex", AntenatalExaminationModel.class); | |
| 83 | +// | |
| 84 | +// | |
| 85 | +// List<AntenatalExaminationModel> fuzs = result.getMappedResults(); | |
| 86 | +// | |
| 87 | +// for (AntenatalExaminationModel f : fuzs) { | |
| 88 | +// String parentId = f.getId(); //这里的id就是parentid | |
| 89 | +// MongoCondition condition = MongoCondition.newInstance("parentId", parentId, MongoOper.IS).and("yn", YnEnums.YES.getId(), MongoOper.IS).and("nextCheckTime", yuYueDate, MongoOper.IS); | |
| 90 | +// MongoQuery query = condition.toMongoQuery().addOrder(Sort.Direction.DESC, "created"); | |
| 91 | +// List<AntenatalExaminationModel> results = find(query.convertToMongoQuery()); | |
| 92 | +// if (CollectionUtils.isNotEmpty(results)) | |
| 93 | +// { | |
| 94 | +// | |
| 95 | +// } | |
| 96 | +// } | |
| 97 | +// return ; | |
| 70 | 98 | } |
| 71 | 99 | @Override |
| 72 | 100 | public List<AntenatalExaminationModel> queryYuyueAntenatalExamination(Date startDate,String hospitalId,String parentId) { |
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
View file @
8c76040
| ... | ... | @@ -411,10 +411,10 @@ |
| 411 | 411 | babyQuery.setYn(YnEnums.YES.getId()); |
| 412 | 412 | babyQuery.setHospitalId(hospitalId); |
| 413 | 413 | |
| 414 | -// List buildType = new ArrayList(); | |
| 415 | -// buildType.add(1); | |
| 416 | -// buildType.add(2); | |
| 417 | -// babyQuery.setBuildTypeList(buildType); | |
| 414 | + List buildType = new ArrayList(); | |
| 415 | + buildType.add(1); | |
| 416 | + buildType.add(2); | |
| 417 | + babyQuery.setBuildTypeList(buildType); | |
| 418 | 418 | |
| 419 | 419 | //儿童年龄满三岁就不在提供短信服务 |
| 420 | 420 | Date birthdayMax = DateUtil.addYear(new Date(), -3); |
| ... | ... | @@ -689,7 +689,7 @@ |
| 689 | 689 | SmsConfigQuery configQuery = new SmsConfigQuery(); |
| 690 | 690 | configQuery.setYn(YnEnums.YES.getId()); |
| 691 | 691 | configQuery.setPrefixTypes(new Integer[]{0, 1}); |
| 692 | - // configQuery.setHospitalId(221 + ""); | |
| 692 | + configQuery.setHospitalId(221 + ""); | |
| 693 | 693 | |
| 694 | 694 | //查询出对应医院配置 |
| 695 | 695 | List<SmsConfigModel> configs = smsConfigService.querySmsConfig(configQuery); |
| 696 | 696 | |
| ... | ... | @@ -732,13 +732,11 @@ |
| 732 | 732 | //循环每一个模板,根据模板条件查询到用户 发送短信 |
| 733 | 733 | for (SmsTemplateModel template : templates) |
| 734 | 734 | { |
| 735 | - | |
| 736 | 735 | // if (!("57d605380cf2e638ab9a7036".equals(template.getId())) ) |
| 737 | 736 | // { |
| 738 | 737 | // continue; |
| 739 | 738 | // } |
| 740 | 739 | |
| 741 | - | |
| 742 | 740 | //模板属于的医院id |
| 743 | 741 | String tempHid = template.getHospitalId(); |
| 744 | 742 | |
| 745 | 743 | |
| ... | ... | @@ -751,14 +749,12 @@ |
| 751 | 749 | //消息类型 |
| 752 | 750 | Integer smsType = template.getSmsType(); |
| 753 | 751 | |
| 754 | - | |
| 755 | 752 | //发送时间 SendTimeEnums DT(0,"当天"),QYT(1,"前一天"),QLT(2,"前两天"),QST(3,"前三天"); |
| 756 | 753 | Integer sendTimeType = template.getSendTimeType(); |
| 757 | 754 | |
| 758 | 755 | if (tempHid == null || serviceObj == null) { |
| 759 | 756 | continue; |
| 760 | 757 | } |
| 761 | - | |
| 762 | 758 | |
| 763 | 759 | //false 表示该服务没有启动 smsType为消息类型 |
| 764 | 760 | boolean isStart = isStartTemplate(config, smsType); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
8c76040
| ... | ... | @@ -493,13 +493,14 @@ |
| 493 | 493 | personModel.setCreated(new Date()); |
| 494 | 494 | babyModel.setPid(personService.addPerson(personModel).getId()); |
| 495 | 495 | |
| 496 | + ExceptionUtils.catchException("分娩---------->" + babyModel.getMphone() + ";name=" + babyModel.getName()); | |
| 496 | 497 | |
| 497 | - ExceptionUtils.catchException("分娩---------->"+babyModel.getMphone()+";name="+babyModel.getName()); | |
| 498 | + } | |
| 499 | + babyIds.add(babyService.addOneBaby(babyModel).getId()); | |
| 500 | + if ((RenShenJieJuEnums.O.getId() + "").equals(baby.getPregnancyOut())) { | |
| 498 | 501 | //儿童建档 |
| 499 | 502 | babyBookbuildingFacade.createBuildSms(babyModel); |
| 500 | - | |
| 501 | 503 | } |
| 502 | - babyIds.add(babyService.addOneBaby(babyModel).getId()); | |
| 503 | 504 | |
| 504 | 505 | i++; |
| 505 | 506 | } |