Commit d1000805eb9402597fe2f081c91b01d4bf2c1543
1 parent
5900598e11
Exists in
master
and in
6 other branches
儿童服务配置
Showing 2 changed files with 60 additions and 27 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/rcfy/RcGlxtService.java
View file @
d100080
| ... | ... | @@ -1513,7 +1513,7 @@ |
| 1513 | 1513 | patientsQuery1.setModifiedStart(start); |
| 1514 | 1514 | patientsQuery1.setHospitalList(hids); |
| 1515 | 1515 | List<Patients> patientses = patientsService.queryPatient(patientsQuery1); |
| 1516 | - System.out.println("xxxxxxpatientses="+patientses.size()+"===="+patientsQuery1.convertToQuery().convertToMongoQuery().toString()); | |
| 1516 | + //System.out.println("xxxxxxpatientses="+patientses.size()+"===="+patientsQuery1.convertToQuery().convertToMongoQuery().toString()); | |
| 1517 | 1517 | if (org.apache.commons.collections.CollectionUtils.isNotEmpty(patientses)) |
| 1518 | 1518 | { |
| 1519 | 1519 | for (Patients pat : patientses) |
| ... | ... | @@ -1530,7 +1530,7 @@ |
| 1530 | 1530 | matDeliverQuery.setModifiedStart(start); |
| 1531 | 1531 | matDeliverQuery.setModifiedEnd(end); |
| 1532 | 1532 | List<MaternalDeliverModel> list2 = matDeliverService.query(matDeliverQuery); |
| 1533 | - System.out.println("xxxxxx fm="+list2.size()+"===="+matDeliverQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1533 | + //System.out.println("xxxxxx fm="+list2.size()+"===="+matDeliverQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1534 | 1534 | if (org.apache.commons.collections.CollectionUtils.isNotEmpty(list2)) |
| 1535 | 1535 | { |
| 1536 | 1536 | for (MaternalDeliverModel maternalDeliverModel : list2) |
| ... | ... | @@ -1547,7 +1547,7 @@ |
| 1547 | 1547 | matDeliverQuery1.setModifiedStart(start); |
| 1548 | 1548 | matDeliverQuery1.setModifiedEnd(end); |
| 1549 | 1549 | List<MaternalDeliverModel> list1 = matDeliverService.query(matDeliverQuery1); |
| 1550 | - System.out.println("xxxxxx new baby="+list1.size()+"===="+matDeliverQuery1.convertToQuery().convertToMongoQuery().toString()); | |
| 1550 | + // System.out.println("xxxxxx new baby="+list1.size()+"===="+matDeliverQuery1.convertToQuery().convertToMongoQuery().toString()); | |
| 1551 | 1551 | if (org.apache.commons.collections.CollectionUtils.isNotEmpty(list1)) |
| 1552 | 1552 | { |
| 1553 | 1553 | for (MaternalDeliverModel maternalDeliverModel : list1) |
| ... | ... | @@ -1562,7 +1562,7 @@ |
| 1562 | 1562 | matDeliverFollowQuery.setCreatedTimeStart(start); |
| 1563 | 1563 | matDeliverFollowQuery.setVisitStatus(2); |
| 1564 | 1564 | List<MatdeliverFollowModel> matdeliverFollowModels = matDeliverFollowService.query(matDeliverFollowQuery); |
| 1565 | - System.out.println("xxxxxx fs="+matdeliverFollowModels.size()+"===="+matDeliverFollowQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1565 | + //System.out.println("xxxxxx fs="+matdeliverFollowModels.size()+"===="+matDeliverFollowQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1566 | 1566 | if (CollectionUtils.isNotEmpty(matdeliverFollowModels)) |
| 1567 | 1567 | { |
| 1568 | 1568 | for (MatdeliverFollowModel matdeliverFollowModel : matdeliverFollowModels) |
| ... | ... | @@ -1580,7 +1580,7 @@ |
| 1580 | 1580 | query.setHospitalIds(hids); |
| 1581 | 1581 | query.setSexType(1); |
| 1582 | 1582 | List<PremaritalCheckup> checkupList = premaritalCheckupService.queryPremaritalCheckup(query); |
| 1583 | - System.out.println("xxxxxx hj="+checkupList.size()+"===="+query.convertToQuery().convertToMongoQuery().toString()); | |
| 1583 | + //System.out.println("xxxxxx hj="+checkupList.size()+"===="+query.convertToQuery().convertToMongoQuery().toString()); | |
| 1584 | 1584 | if (CollectionUtils.isNotEmpty(checkupList)) |
| 1585 | 1585 | { |
| 1586 | 1586 | for (PremaritalCheckup premaritalCheckup : checkupList) |
| ... | ... | @@ -1596,7 +1596,7 @@ |
| 1596 | 1596 | folicAcidQuery.setModifiedEnd(end); |
| 1597 | 1597 | folicAcidQuery.setHospitalList(hids); |
| 1598 | 1598 | List<FolicAcid> folicAcidList = folicAcidService.queryFolicAcidWithSort(folicAcidQuery, "drawTime", Sort.Direction.ASC); |
| 1599 | - System.out.println("xxxxxx ys="+folicAcidList.size()+"===="+folicAcidQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1599 | + //System.out.println("xxxxxx ys="+folicAcidList.size()+"===="+folicAcidQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1600 | 1600 | if (CollectionUtils.isNotEmpty(folicAcidList)) |
| 1601 | 1601 | { |
| 1602 | 1602 | for (FolicAcid folicAcid : folicAcidList) |
| ... | ... | @@ -1612,7 +1612,7 @@ |
| 1612 | 1612 | sieveResultQuery.setModifiedStart(start); |
| 1613 | 1613 | sieveResultQuery.setModifiedEnd(end); |
| 1614 | 1614 | List<SieveResultModel> list = sieveService.queryListSieveResult(sieveResultQuery); |
| 1615 | - System.out.println("xxxxxx sieve=" + list.size()+"===="+sieveResultQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1615 | + //System.out.println("xxxxxx sieve=" + list.size()+"===="+sieveResultQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1616 | 1616 | if (org.apache.commons.collections.CollectionUtils.isNotEmpty(list)) |
| 1617 | 1617 | { |
| 1618 | 1618 | for (SieveResultModel sieveResultModel : list) |
| ... | ... | @@ -1627,7 +1627,7 @@ |
| 1627 | 1627 | antExRecordQuery.setModifiedStart(start); |
| 1628 | 1628 | antExRecordQuery.setModifiedEnd(end); |
| 1629 | 1629 | List<AntExRecordModel> recordModels = recordService.queryAntExRecords(antExRecordQuery); |
| 1630 | - System.out.println("xxxxxx recordModels=" + recordModels.size()+"===="+antExRecordQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1630 | + //System.out.println("xxxxxx recordModels=" + recordModels.size()+"===="+antExRecordQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1631 | 1631 | if (org.apache.commons.collections.CollectionUtils.isNotEmpty(recordModels)) |
| 1632 | 1632 | { |
| 1633 | 1633 | for (AntExRecordModel antExRecordModel : recordModels) |
| ... | ... | @@ -1644,7 +1644,7 @@ |
| 1644 | 1644 | antExChuQuery.setModifiedStart(start); |
| 1645 | 1645 | antExChuQuery.setModifiedEnd(end); |
| 1646 | 1646 | List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery); |
| 1647 | - System.out.println("xxxxxx antExChuModels=" + antExChuModels.size()+"===="+antExChuQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1647 | + //System.out.println("xxxxxx antExChuModels=" + antExChuModels.size()+"===="+antExChuQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1648 | 1648 | if (CollectionUtils.isNotEmpty(antExChuModels)) |
| 1649 | 1649 | { |
| 1650 | 1650 | for (AntExChuModel chuModel : antExChuModels) |
| ... | ... | @@ -1662,7 +1662,7 @@ |
| 1662 | 1662 | antExQuery.setModifiedStart(start); |
| 1663 | 1663 | antExQuery.setModifiedEnd(end); |
| 1664 | 1664 | List<AntenatalExaminationModel> antEx = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); |
| 1665 | - System.out.println("xxxxxx antEx=" + antEx.size()+"===="+antExQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1665 | + //System.out.println("xxxxxx antEx=" + antEx.size()+"===="+antExQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 1666 | 1666 | if (CollectionUtils.isNotEmpty(antEx)) |
| 1667 | 1667 | { |
| 1668 | 1668 | for (AntenatalExaminationModel f : antEx) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
d100080
| ... | ... | @@ -24,12 +24,10 @@ |
| 24 | 24 | import com.lyms.platform.operate.web.utils.BabyListTask; |
| 25 | 25 | import com.lyms.platform.operate.web.utils.GrowthCountTask; |
| 26 | 26 | import com.lyms.platform.operate.web.utils.MongoUtil; |
| 27 | -import com.lyms.platform.permission.model.Organization; | |
| 28 | -import com.lyms.platform.permission.model.OrganizationQuery; | |
| 29 | -import com.lyms.platform.permission.model.PatientService; | |
| 30 | -import com.lyms.platform.permission.model.Users; | |
| 27 | +import com.lyms.platform.permission.model.*; | |
| 31 | 28 | import com.lyms.platform.permission.service.CouponService; |
| 32 | 29 | import com.lyms.platform.permission.service.OrganizationService; |
| 30 | +import com.lyms.platform.permission.service.PatientServiceService; | |
| 33 | 31 | import com.lyms.platform.permission.service.UsersService; |
| 34 | 32 | import com.lyms.platform.pojo.*; |
| 35 | 33 | import com.lyms.platform.query.*; |
| ... | ... | @@ -84,6 +82,9 @@ |
| 84 | 82 | private BabyBookbuildingService babyBookbuildingService; |
| 85 | 83 | |
| 86 | 84 | @Autowired |
| 85 | + private PatientServiceService patientServiceService; | |
| 86 | + | |
| 87 | + @Autowired | |
| 87 | 88 | private BasicConfigFacade basicConfigFacade; |
| 88 | 89 | |
| 89 | 90 | @Autowired |
| ... | ... | @@ -365,7 +366,7 @@ |
| 365 | 366 | * @return |
| 366 | 367 | */ |
| 367 | 368 | public BaseResponse updateBabyBookbuilding(BabyBookbuildingAddRequest request, Integer userId) { |
| 368 | - BabyModel model = getBabyModel(request,true); | |
| 369 | + BabyModel model = getBabyModel(request,true,userId); | |
| 369 | 370 | model.setModified(new Date()); |
| 370 | 371 | model.setOperator(userId); |
| 371 | 372 | if (StringUtils.isNotEmpty(request.getMommyCertificateNum())) { |
| ... | ... | @@ -717,7 +718,7 @@ |
| 717 | 718 | return br; |
| 718 | 719 | } |
| 719 | 720 | |
| 720 | - BabyModel model = getBabyModel(request,true); | |
| 721 | + BabyModel model = getBabyModel(request,true,userId); | |
| 721 | 722 | model.setmHighRiskReason(request.getmHighRiskReason()); |
| 722 | 723 | model.setPid(babyPersonId); |
| 723 | 724 | model.setOperator(userId); |
| ... | ... | @@ -1043,7 +1044,7 @@ |
| 1043 | 1044 | * @param b |
| 1044 | 1045 | * @return |
| 1045 | 1046 | */ |
| 1046 | - private BabyModel getBabyModel(BabyBookbuildingAddRequest b,boolean isAdd) { | |
| 1047 | + private BabyModel getBabyModel(BabyBookbuildingAddRequest b,boolean isAdd,Integer userId) { | |
| 1047 | 1048 | // hujiaqi添加了一个字段,判断是插入还是更新,如果是更新,就不更新birth字段 |
| 1048 | 1049 | BabyModel bm = new BabyModel(); |
| 1049 | 1050 | |
| 1050 | 1051 | |
| 1051 | 1052 | |
| ... | ... | @@ -1172,19 +1173,51 @@ |
| 1172 | 1173 | |
| 1173 | 1174 | //建档开通增值服务,以前数据 |
| 1174 | 1175 | if (CollectionUtils.isNotEmpty(b.getSerInfos())) { |
| 1175 | - for (Map<String, String> serInfo : b.getSerInfos()) { | |
| 1176 | - //标准服务 | |
| 1177 | - if (Integer.parseInt(serInfo.get("serType")) == PatientSerEnums.SerTypeEnums.babyBzfw.getId()) { | |
| 1178 | - bm.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId()); | |
| 1179 | - bm.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId()); | |
| 1180 | - }else if(Integer.parseInt(serInfo.get("serType")) == PatientSerEnums.SerTypeEnums.babyjzzz.getId()){//增值服务:修改为孕期精准指导 | |
| 1181 | - bm.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId()); | |
| 1182 | - bm.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId()); | |
| 1183 | - break; | |
| 1176 | +// for (Map<String, String> serInfo : b.getSerInfos()) { | |
| 1177 | +// //标准服务 | |
| 1178 | +// if (Integer.parseInt(serInfo.get("serType")) == PatientSerEnums.SerTypeEnums.babyBzfw.getId()) { | |
| 1179 | +// bm.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId()); | |
| 1180 | +// bm.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId()); | |
| 1181 | +// }else if(Integer.parseInt(serInfo.get("serType")) == PatientSerEnums.SerTypeEnums.babyjzzz.getId()){//增值服务:修改为孕期精准指导 | |
| 1182 | +// bm.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId()); | |
| 1183 | +// bm.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId()); | |
| 1184 | +// break; | |
| 1185 | +// } | |
| 1186 | +// } | |
| 1187 | + try { | |
| 1188 | + | |
| 1189 | + PatientServiceQuery patientQuery = new PatientServiceQuery(); | |
| 1190 | + patientQuery.setParentid(b.getId()); | |
| 1191 | + | |
| 1192 | + List<PatientService> services = patientServiceService.queryPatientService(patientQuery); | |
| 1193 | + if (CollectionUtils.isNotEmpty(services)) | |
| 1194 | + { | |
| 1195 | + PatientService patientService = services.get(0); | |
| 1196 | + patientServiceService.deletePatientService(patientService.getId()); | |
| 1184 | 1197 | } |
| 1198 | + PatientService patientService = new PatientService(); | |
| 1199 | + patientService.setPerType(2); | |
| 1200 | + patientService.setSerInfos(b.getSerInfos()); | |
| 1201 | + patientService.setCreateUser(String.valueOf(userId)); | |
| 1202 | + //开通日期与建档日期一致 | |
| 1203 | + patientService.setCreateDate(new Date()); | |
| 1204 | + patientService.setParentid(b.getId()); | |
| 1205 | + | |
| 1206 | + BabyModelQuery babyQuery = new BabyModelQuery(); | |
| 1207 | + babyQuery.setId(b.getId()); | |
| 1208 | + List<BabyModel> babyModels = babyBookbuildingService.queryBabyBuildByCond(babyQuery); | |
| 1209 | + if (CollectionUtils.isNotEmpty(babyModels)) | |
| 1210 | + { | |
| 1211 | + patientService.setPid(babyModels.get(0).getPid()); | |
| 1212 | + } | |
| 1213 | + patientServiceFacade.addPatientService(patientService, userId, b.getHospitalId()); | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + } catch (Exception e) { | |
| 1217 | + System.out.println("儿童修改服务开通异常!"); | |
| 1218 | + e.printStackTrace(); | |
| 1185 | 1219 | } |
| 1186 | 1220 | } |
| 1187 | - | |
| 1188 | 1221 | |
| 1189 | 1222 | bm.setDueDate(DateUtil.parseYMD(b.getDueDate())); |
| 1190 | 1223 | bm.setDueType(b.getDueType()); |