Commit 9897347770cd073f890330b32d0ee7ee3ba3cf71
1 parent
0aba8dfb7b
Exists in
master
and in
7 other branches
bug
Showing 4 changed files with 29 additions and 5 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DischargeAbstractFacade.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/controller/MatDeliverController.java
View file @
9897347
| ... | ... | @@ -26,7 +26,10 @@ |
| 26 | 26 | import javax.servlet.http.HttpServletRequest; |
| 27 | 27 | import javax.servlet.http.HttpServletResponse; |
| 28 | 28 | import javax.validation.Valid; |
| 29 | -import java.util.*; | |
| 29 | +import java.util.ArrayList; | |
| 30 | +import java.util.LinkedHashMap; | |
| 31 | +import java.util.List; | |
| 32 | +import java.util.Map; | |
| 30 | 33 | |
| 31 | 34 | /** |
| 32 | 35 | * 产妇分娩记录 |
| 33 | 36 | |
| ... | ... | @@ -146,11 +149,16 @@ |
| 146 | 149 | List<Map<String, Object>> list = new ArrayList<>(); |
| 147 | 150 | for (ChildbirthManagerQueryModel childbirthManagerQueryModel : childbirthManagerQueryModelList) { |
| 148 | 151 | Map<String, Object> map = BeanUtils.objectToObjectMap(childbirthManagerQueryModel); |
| 152 | + for (String key : map.keySet()) { | |
| 153 | + if (StringUtils.isEmpty(String.valueOf(map.get(key)))) { | |
| 154 | + map.put(key, "-"); | |
| 155 | + } | |
| 156 | + } | |
| 149 | 157 | list.add(map); |
| 150 | 158 | } |
| 151 | 159 | Map<String, String> header = new LinkedHashMap<>(); |
| 152 | 160 | header.put("dueDate", "分娩日期"); |
| 153 | - header.put("username", "姓名"); | |
| 161 | + header.put("name", "姓名"); | |
| 154 | 162 | header.put("age", "年龄"); |
| 155 | 163 | header.put("cardNo", "证件号"); |
| 156 | 164 | header.put("dueWeek", "分娩孕周"); |
| ... | ... | @@ -180,7 +188,6 @@ |
| 180 | 188 | BaseListResponse baseListResponse; |
| 181 | 189 | try { |
| 182 | 190 | newBabyManagerRequest.setOperatorId(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()); |
| 183 | - newBabyManagerRequest.setExcel(true); | |
| 184 | 191 | NewBabyManagerResult newBabyManagerResult = matDeliverFacade.newBabyManager(newBabyManagerRequest); |
| 185 | 192 | if (newBabyManagerResult.getErrorcode() != ErrorCodeConstants.SUCCESS) { |
| 186 | 193 | baseListResponse = new BaseListResponse().setErrorcode(newBabyManagerResult.getErrorcode()).setErrormsg(newBabyManagerResult.getErrormsg()); |
| ... | ... | @@ -199,6 +206,7 @@ |
| 199 | 206 | public void newBabyManagerExcel(HttpServletRequest httpServletRequest, @RequestBody NewBabyManagerRequest newBabyManagerRequest, HttpServletResponse httpServletResponse) { |
| 200 | 207 | try { |
| 201 | 208 | newBabyManagerRequest.setOperatorId(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()); |
| 209 | + newBabyManagerRequest.setExcel(true); | |
| 202 | 210 | // 这里返回的结果必然是这个泛型,之所以query返回的结果集没有用泛型是为了更好的传递数据 |
| 203 | 211 | @SuppressWarnings("unchecked") |
| 204 | 212 | List<NewBabyManagerQueryModel> newBabyManagerQueryModelList = matDeliverFacade.newBabyManager(newBabyManagerRequest).getData(); |
| ... | ... | @@ -225,6 +233,11 @@ |
| 225 | 233 | } |
| 226 | 234 | if ("2".equals(dueType)) { |
| 227 | 235 | map.put("dueType", "剖宫产"); |
| 236 | + } | |
| 237 | + for (String key : map.keySet()) { | |
| 238 | + if (StringUtils.isEmpty(String.valueOf(map.get(key)))) { | |
| 239 | + map.put(key, "-"); | |
| 240 | + } | |
| 228 | 241 | } |
| 229 | 242 | list.add(map); |
| 230 | 243 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
9897347
| ... | ... | @@ -19,6 +19,7 @@ |
| 19 | 19 | import com.lyms.platform.operate.web.result.PatientManagerQueryModel; |
| 20 | 20 | import com.lyms.platform.operate.web.result.PatientManagerResult; |
| 21 | 21 | import org.apache.commons.collections.CollectionUtils; |
| 22 | +import org.apache.commons.lang.StringUtils; | |
| 22 | 23 | import org.springframework.beans.factory.annotation.Autowired; |
| 23 | 24 | import org.springframework.stereotype.Controller; |
| 24 | 25 | import org.springframework.web.bind.annotation.*; |
| ... | ... | @@ -299,6 +300,11 @@ |
| 299 | 300 | List<Map<String, Object>> list = new ArrayList<>(); |
| 300 | 301 | for (PatientManagerQueryModel patientManagerQueryModel : patientManagerQueryModelList) { |
| 301 | 302 | Map<String, Object> map = BeanUtils.objectToObjectMap(patientManagerQueryModel); |
| 303 | + for (String key : map.keySet()) { | |
| 304 | + if (StringUtils.isEmpty(String.valueOf(map.get(key)))) { | |
| 305 | + map.put(key, "-"); | |
| 306 | + } | |
| 307 | + } | |
| 302 | 308 | list.add(map); |
| 303 | 309 | } |
| 304 | 310 | Map<String, String> header = new LinkedHashMap<>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DischargeAbstractFacade.java
View file @
9897347
| 1 | 1 | package com.lyms.platform.operate.web.facade; |
| 2 | 2 | |
| 3 | -import com.lyms.platform.biz.service.*; | |
| 3 | +import com.lyms.platform.biz.service.BabyService; | |
| 4 | +import com.lyms.platform.biz.service.DischargeAbstractBabyService; | |
| 5 | +import com.lyms.platform.biz.service.DischargeAbstractMotherService; | |
| 6 | +import com.lyms.platform.biz.service.PatientsService; | |
| 4 | 7 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 5 | 8 | import com.lyms.platform.common.enums.RenShenJieJuEnums; |
| 6 | 9 | import com.lyms.platform.common.enums.YnEnums; |
| ... | ... | @@ -110,6 +113,7 @@ |
| 110 | 113 | List<Integer> typeList = new ArrayList<>(); |
| 111 | 114 | typeList.add(1); |
| 112 | 115 | typeList.add(3); |
| 116 | + patientsQuery.setBuildTypeNot(1); | |
| 113 | 117 | patientsQuery.setHospitalId(autoMatchFacade.getHospitalId(dischargeAbstractSaveRequest.getOperatorId())); |
| 114 | 118 | patientsQuery.setTypeList(typeList); |
| 115 | 119 | patientsQuery.setSort("lastMenses"); |
| ... | ... | @@ -157,7 +161,7 @@ |
| 157 | 161 | } |
| 158 | 162 | |
| 159 | 163 | dischargeAbstractQueryResult.setGestationalWeeks(PredictedStatisticsFacade.getGestationalWeeks(patients.getLastMenses(), patients.getType(), patients.getDueStatus())); |
| 160 | - dischargeAbstractQueryResult.setDueDate(new SimpleDateFormat("yyyy年MM月dd日").format(patients.getDueDate())); | |
| 164 | + dischargeAbstractQueryResult.setDueDate(patients.getDueDate() == null ? "" : new SimpleDateFormat("yyyy年MM月dd日").format(patients.getDueDate())); | |
| 161 | 165 | |
| 162 | 166 | // 查询母亲信息 |
| 163 | 167 | DischargeAbstractMotherQuery dischargeAbstractMotherQuery = new DischargeAbstractMotherQuery(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
9897347
| ... | ... | @@ -1321,6 +1321,7 @@ |
| 1321 | 1321 | newBabyManagerQueryModel.setMaternalDeliverId(maternalDeliverModel.getId()); |
| 1322 | 1322 | newBabyManagerQueryModel.setPatientId(maternalDeliverModel.getParentId()); |
| 1323 | 1323 | newBabyManagerQueryModel.setpId(maternalDeliverModel.getPid()); |
| 1324 | + newBabyManagerQueryModel.setBabyWeight(StringUtils.isEmpty(babyModel.getBabyWeight()) ? "-" : String.valueOf(Double.valueOf(babyModel.getBabyWeight()) * 1000)); | |
| 1324 | 1325 | |
| 1325 | 1326 | for (SexEnum sexEnum : SexEnum.values()) { |
| 1326 | 1327 | if (sexEnum.getId().equals(babyModel.getSex())) { |