Commit 4fc6236da7a7d6a0f827c2358c9c5466da825295
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 7 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/MatDeliverFollowService.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/llfy/LlfyFmService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatdeliverFollowFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MatdeliverFollowListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/AreaHighRiskCountExportTask.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/MatDeliverFollowService.java
View file @
4fc6236
| ... | ... | @@ -31,7 +31,7 @@ |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public List<MatdeliverFollowModel> query(MatDeliverFollowQuery deliverQuery){ |
| 34 | - return iMatdeliverFollowModelDao.queryMatdeliverFollowModel(deliverQuery.convertToQuery().addOrder(Sort.Direction.DESC, "updateDate")); | |
| 34 | + return iMatdeliverFollowModelDao.queryMatdeliverFollowModel(deliverQuery.convertToQuery().addOrder(Sort.Direction.ASC, "updateDate")); | |
| 35 | 35 | } |
| 36 | 36 | public void deleteOne(String id){ |
| 37 | 37 | iMatdeliverFollowModelDao.deleteMatdeliverFollowModel(id); |
platform-operate-api/src/main/java/com/lyms/hospitalapi/llfy/LlfyFmService.java
View file @
4fc6236
| ... | ... | @@ -119,7 +119,7 @@ |
| 119 | 119 | " 姓名 as NAME,\n" + |
| 120 | 120 | " 身份证号 as IDCARD,\n" + |
| 121 | 121 | " CREATED as CREATED,\t\n" + |
| 122 | - " 婴儿产出时间 as BABY_DELIVERY_TIME,\n" + | |
| 122 | + " 婴儿产出时日 as BABY_DELIVERY_TIME,\n" + | |
| 123 | 123 | " 婴儿性别 as BABY_SEX,\n" + |
| 124 | 124 | " 孕周 as DUE_WEEK,\n" + |
| 125 | 125 | // " DUE_DAY as DUE_DAY,\n" + |
| ... | ... | @@ -143,7 +143,7 @@ |
| 143 | 143 | " 第三期 as PROD_PROCESS_THREE,\n" + |
| 144 | 144 | " 总计 as TOTAL_PROCESS,\n" + |
| 145 | 145 | " 胎盘数量 as PLACENTA_NUM,\n" + |
| 146 | - " DELIVER_HOSPITAL as DELIVER_HOSPITAL,\n" + | |
| 146 | + //" DELIVER_HOSPITAL as DELIVER_HOSPITAL,\n" + | |
| 147 | 147 | " 产妇居住地址 as ADDR,\n"+ |
| 148 | 148 | " 接生者 as DELIVER_DOCTOR"; |
| 149 | 149 | |
| ... | ... | @@ -155,7 +155,7 @@ |
| 155 | 155 | try { |
| 156 | 156 | |
| 157 | 157 | String sql ="select "+cloumns+" from xlhhis..v_fmjl where " + |
| 158 | - " CREATED > to_date('"+start+"', 'yyyy-mm-dd hh24:mi:ss') and CREATED <= to_date('"+end+"', 'yyyy-mm-dd hh24:mi:ss')" ; | |
| 158 | + " CREATED > CONVERT(varchar(100), '"+start+"', 120) and CREATED <= CONVERT(varchar(100), '"+start+"', 120)" ; | |
| 159 | 159 | if (phone != null) |
| 160 | 160 | { |
| 161 | 161 | sql+=" and 手机号码 = '"+phone+"'"; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
4fc6236
| ... | ... | @@ -1217,6 +1217,10 @@ |
| 1217 | 1217 | |
| 1218 | 1218 | for(MaternalDeliverModel deliverModel : maternalDeliverModelList){ |
| 1219 | 1219 | MatdeliverFollowListResult matdeliverFollowListResult = patientsMap.get(deliverModel.getParentId()); |
| 1220 | + | |
| 1221 | + //最后一次随访Id | |
| 1222 | + matdeliverFollowListResult.setMatFollowId(deliverModel.getMatFollowId()); | |
| 1223 | + | |
| 1220 | 1224 | matdeliverFollowListResult.setId(deliverModel.getId()); |
| 1221 | 1225 | //机构信息 |
| 1222 | 1226 | Organization organization = organizationService.getOrganization(Integer.valueOf(deliverModel.getFmHospital())); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatdeliverFollowFacade.java
View file @
4fc6236
| ... | ... | @@ -141,23 +141,25 @@ |
| 141 | 141 | |
| 142 | 142 | //如果修改的是最后一次随访记录,则进行同步修改分娩记录里的随访信息 |
| 143 | 143 | if (matDeliverFollowAddRequest.getId().equals(maternalDeliverModel.getMatFollowId())) { |
| 144 | - //获取随访详情 | |
| 145 | - MatdeliverFollowModel matdeliverFollowModel = matDeliverFollowService.getOneMatDeliverFollow(matDeliverFollowAddRequest.getId()); | |
| 146 | 144 | |
| 147 | 145 | //在分娩记录上记录随访部分信息 |
| 148 | - maternalDeliverModel.setMatFollowId(matdeliverFollowModel.getId()); | |
| 149 | - maternalDeliverModel.setContactResult(matdeliverFollowModel.getContactResult()); | |
| 150 | - maternalDeliverModel.setContactReason(matdeliverFollowModel.getContactReason()); | |
| 151 | - maternalDeliverModel.setVisitAffirm(matdeliverFollowModel.getVisitAffirm()); | |
| 152 | - maternalDeliverModel.setVisitStatus(matdeliverFollowModel.getVisitStatus()); | |
| 153 | - maternalDeliverModel.setMakeType(matdeliverFollowModel.getMakeType()); | |
| 154 | - maternalDeliverModel.setVisitResult(matdeliverFollowModel.getVisitResult()); | |
| 155 | - maternalDeliverModel.setNextVisitDate(matdeliverFollowModel.getNextVisitDate()); | |
| 156 | - maternalDeliverModel.setIsClose(matdeliverFollowModel.getIsClose()); | |
| 146 | + maternalDeliverModel.setContactResult(matDeliverFollowAddRequest.getContactResult()); | |
| 147 | + maternalDeliverModel.setContactReason(matDeliverFollowAddRequest.getContactReason()); | |
| 148 | + maternalDeliverModel.setVisitAffirm(matDeliverFollowAddRequest.getVisitAffirm()); | |
| 149 | + maternalDeliverModel.setVisitStatus(matDeliverFollowAddRequest.getVisitStatus()); | |
| 150 | + maternalDeliverModel.setMakeType(matDeliverFollowAddRequest.getMakeType()); | |
| 151 | + maternalDeliverModel.setVisitResult(matDeliverFollowAddRequest.getVisitResult()); | |
| 152 | + maternalDeliverModel.setNextVisitDate(matDeliverFollowAddRequest.getNextVisitDate()); | |
| 153 | + maternalDeliverModel.setIsClose(matDeliverFollowAddRequest.getIsClose()); | |
| 157 | 154 | //修改分娩记录 |
| 158 | 155 | matDeliverService.updateOne(maternalDeliverModel, maternalDeliverModel.getId()); |
| 156 | + baseResponse.setObject(matDeliverFollowAddRequest.getId()); | |
| 159 | 157 | } |
| 158 | + //获取随访详情 | |
| 159 | + MatdeliverFollowModel matdeliverFollowModel = matDeliverFollowService.getOneMatDeliverFollow(matDeliverFollowAddRequest.getId()); | |
| 160 | + | |
| 160 | 161 | } else {//新增随访记录,并同步更新分娩记录里的随访信息 |
| 162 | + matDeliverFollowAddRequest.setId(null); | |
| 161 | 163 | //新增随访记录 |
| 162 | 164 | MatdeliverFollowModel matdeliverFollowModel = matDeliverFollowService.addMatDeliverFollow(matDeliverFollowAddRequest.convertToDataModel()); |
| 163 | 165 | |
| 164 | 166 | |
| ... | ... | @@ -179,7 +181,9 @@ |
| 179 | 181 | }else{ |
| 180 | 182 | log.error("分娩记录随访没有找到随访记录,传入随访id:"+matDeliverFollowAddRequest.getDeliverId()); |
| 181 | 183 | } |
| 184 | + baseResponse.setObject(matdeliverFollowModel.getId()); | |
| 182 | 185 | } |
| 186 | + | |
| 183 | 187 | baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 184 | 188 | baseResponse.setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION); |
| 185 | 189 | return baseResponse; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
View file @
4fc6236
| ... | ... | @@ -817,7 +817,7 @@ |
| 817 | 817 | } |
| 818 | 818 | final List<String> organizations = currentUserHospPermissions.subList(i, end); |
| 819 | 819 | Callable callable = new AreaHighRiskCountExportTask(basicConfigService,usersService,patientsService,organizationService, |
| 820 | - riskLevelConfig,organizations,countRequest.getExportType(),this,countRequest); | |
| 820 | + riskLevelConfig,organizations,this,countRequest); | |
| 821 | 821 | Future f = commonThreadPool.submit(callable); |
| 822 | 822 | futures.add(f); |
| 823 | 823 | } |
| ... | ... | @@ -839,6 +839,24 @@ |
| 839 | 839 | } |
| 840 | 840 | } |
| 841 | 841 | } |
| 842 | + | |
| 843 | + if (countRequest.getExportType() < 3) | |
| 844 | + { | |
| 845 | + Collections.sort(datas, new Comparator<Map<String, Object>>() { | |
| 846 | + @Override | |
| 847 | + public int compare(Map<String, Object> o1, Map<String, Object> o2) { | |
| 848 | + | |
| 849 | + Object value1 = o1.get("highRiskPatTotal"); | |
| 850 | + int num1 = Integer.parseInt(String.valueOf(value1)); | |
| 851 | + | |
| 852 | + Object value2 = o2.get("highRiskPatTotal"); | |
| 853 | + int num2 = Integer.parseInt(String.valueOf(value2)); | |
| 854 | + | |
| 855 | + return num1 == num2 ? 0 : (num1 > num2 ? -1 : 1); | |
| 856 | + } | |
| 857 | + }); | |
| 858 | + } | |
| 859 | + | |
| 842 | 860 | |
| 843 | 861 | OutputStream out = response.getOutputStream(); |
| 844 | 862 | Map<String, String> cnames = new LinkedHashMap<>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MatdeliverFollowListResult.java
View file @
4fc6236
| ... | ... | @@ -14,8 +14,11 @@ |
| 14 | 14 | private String patientId; |
| 15 | 15 | |
| 16 | 16 | private String pid; |
| 17 | - | |
| 18 | 17 | /** |
| 18 | + * 最后一次随访id | |
| 19 | + */ | |
| 20 | + private String matFollowId; | |
| 21 | + /** | |
| 19 | 22 | * @discription 姓名 |
| 20 | 23 | */ |
| 21 | 24 | private String name; |
| ... | ... | @@ -77,6 +80,14 @@ |
| 77 | 80 | * 是否结案 1-未结案、2-已结案 |
| 78 | 81 | */ |
| 79 | 82 | private Integer isClose; |
| 83 | + | |
| 84 | + public String getMatFollowId() { | |
| 85 | + return matFollowId; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public void setMatFollowId(String matFollowId) { | |
| 89 | + this.matFollowId = matFollowId; | |
| 90 | + } | |
| 80 | 91 | |
| 81 | 92 | public String getId() { |
| 82 | 93 | return id; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/AreaHighRiskCountExportTask.java
View file @
4fc6236
| ... | ... | @@ -35,7 +35,6 @@ |
| 35 | 35 | private UsersService usersService; |
| 36 | 36 | private OrganizationService organizationService; |
| 37 | 37 | private BasicConfigService basicConfigService; |
| 38 | - private Integer exportType; | |
| 39 | 38 | private List<String> organizations; |
| 40 | 39 | |
| 41 | 40 | private List<BasicConfig> riskLevelConfig; |
| ... | ... | @@ -48,7 +47,6 @@ |
| 48 | 47 | OrganizationService organizationService, |
| 49 | 48 | List<BasicConfig> riskLevelConfig, |
| 50 | 49 | List<String> organizations, |
| 51 | - Integer exportType, | |
| 52 | 50 | RiskReportFacade riskReportFacade, |
| 53 | 51 | RiskPatientsCountRequest countRequest) |
| 54 | 52 | { |
| ... | ... | @@ -58,7 +56,6 @@ |
| 58 | 56 | this.patientsService = patientsService; |
| 59 | 57 | this.organizations = organizations; |
| 60 | 58 | this.riskLevelConfig = riskLevelConfig; |
| 61 | - this.exportType = exportType; | |
| 62 | 59 | this.riskReportFacade = riskReportFacade; |
| 63 | 60 | this.countRequest = countRequest; |
| 64 | 61 | } |
| 65 | 62 | |
| ... | ... | @@ -86,13 +83,13 @@ |
| 86 | 83 | if (CollectionUtils.isNotEmpty(riskLevelConfig)) { |
| 87 | 84 | for (BasicConfig config : riskLevelConfig) { |
| 88 | 85 | |
| 89 | - if (exportType == 1) | |
| 86 | + if (countRequest.getExportType() == 1) | |
| 90 | 87 | { |
| 91 | 88 | data.put("cityName", city == null ? "" : city.getName()); |
| 92 | 89 | data.put("areaName", area == null ? "" : area.getName()); |
| 93 | 90 | data.put("streetName", street == null ? "" : street.getName()); |
| 94 | 91 | } |
| 95 | - else if (exportType == 2) | |
| 92 | + else if (countRequest.getExportType() == 2) | |
| 96 | 93 | { |
| 97 | 94 | data.put("areaName", area == null ? "" : area.getName()); |
| 98 | 95 | data.put("streetName", street == null ? "" : street.getName()); |
| 99 | 96 | |
| ... | ... | @@ -103,9 +100,11 @@ |
| 103 | 100 | int riskPatientCount = 0; |
| 104 | 101 | PatientsQuery query1 = riskReportFacade.getRequestQuery(countRequest); |
| 105 | 102 | query1.setHospitalId(String.valueOf(organization.getId())); |
| 103 | + //高危等级 | |
| 104 | + query1.setrLevel(config.getId()); | |
| 106 | 105 | |
| 107 | 106 | |
| 108 | - if (exportType == 3) | |
| 107 | + if (countRequest.getExportType() == 3) | |
| 109 | 108 | { |
| 110 | 109 | List<Patients> patientses = patientsService.queryPatient(query1); |
| 111 | 110 | if (CollectionUtils.isNotEmpty(patientses)) |
| ... | ... | @@ -220,7 +219,7 @@ |
| 220 | 219 | } |
| 221 | 220 | } |
| 222 | 221 | |
| 223 | - if (exportType < 3) | |
| 222 | + if (countRequest.getExportType() < 3) | |
| 224 | 223 | { |
| 225 | 224 | data.put("highRiskPatTotal", highRiskPatTotal); |
| 226 | 225 | datas.add(data); |