Commit 1f1cef0fea9c33acbee07ab802457e17bce432ac

Authored by wangbo
1 parent a8a25a1ed4

冲突解决

Showing 3 changed files with 75 additions and 76 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyNutritionController.java View file @ 1f1cef0
... ... @@ -142,7 +142,7 @@
142 142 @ResponseBody
143 143 @TokenRequired
144 144 public BaseResponse unSettleList(@Valid @RequestBody BabyNutritionSettleRequest request,
145   - HttpServletRequest httpServletRequest) {
  145 + HttpServletRequest httpServletRequest) {
146 146 return babyNutritionFacade.unSettleList(request, getUserId(httpServletRequest));
147 147 }
148 148  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ 1f1cef0
... ... @@ -140,9 +140,9 @@
140 140 bm.setModified(new Date());
141 141 if (request.getHighRisk() == null) {
142 142 bm.setLastHighRisk(0);
  143 + bm.setHighRiskInfo(request.getHighRiskInfo());
143 144 } else {
144 145 bm.setLastHighRisk(request.getHighRisk());
145   -
146 146 bm.setHighRiskInfo(request.getHighRiskInfo());
147 147 }
148 148 }
149 149  
150 150  
... ... @@ -416,11 +416,9 @@
416 416 value = request.getEyeGuideSuggestions();
417 417 value = StringUtils.isNotEmpty(value) ? value : "";
418 418 model.setEyeGuideSuggestions(value);
419   -
420   -
421 419 //新加字段
422   -
423 420  
  421 +
424 422 return model;
425 423 }
426 424  
... ... @@ -1507,7 +1505,7 @@
1507 1505 model.setEyeDioptroscopy(checkModel.getEyeDioptroscopy());
1508 1506 String eyeAdvice = checkModel.getEyeAdvice();
1509 1507 String eyeAdviceName = "";
1510   - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(eyeAdvice)){
  1508 + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(eyeAdvice)) {
1511 1509 eyeAdviceName = EyeExaminationEnums.getNameById(Integer.parseInt(eyeAdvice));
1512 1510 }
1513 1511 model.setEyeAdvice(eyeAdvice);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java View file @ 1f1cef0
... ... @@ -195,7 +195,6 @@
195 195 }
196 196  
197 197 /**
198   - *
199 198 * @param page
200 199 * @param limit
201 200 * @param queryNo
202 201  
... ... @@ -204,11 +203,11 @@
204 203 * @param userId
205 204 * @param recordTime
206 205 * @param interpretDoctorId 报告解读人
207   - * @param settleStatus 结算状态
  206 + * @param settleStatus 结算状态
208 207 * @return
209 208 */
210 209 public BaseResponse queryBabyNutritionList(Integer page, Integer limit, String queryNo, String vcCardNo,
211   - String babyName,Integer userId,String recordTime, String interpretDoctorId, String settleStatus) {
  210 + String babyName, Integer userId, String recordTime, String interpretDoctorId, String settleStatus) {
212 211 String hospitalId = autoMatchFacade.getHospitalId(userId);
213 212 List<Map> list = new ArrayList<>();
214 213 List<String> babyIds = new ArrayList<>();
215 214  
216 215  
217 216  
... ... @@ -255,22 +254,24 @@
255 254  
256 255 if (CollectionUtils.isNotEmpty(models)) {
257 256 for (BabyNutritionModel model : models) {
258   - Map map = new HashMap();
  257 + Integer currentSettleStatus = getSettleStatus(model);
  258 + if (settleStatus != null) {
  259 + if (currentSettleStatus != null && (currentSettleStatus == Integer.parseInt(settleStatus))) {
  260 + Map map = new HashMap();
  261 + map.put("id", model.getId());
  262 + map.put("babyId", model.getBabyId());
259 263  
260   - map.put("id", model.getId());
261   - map.put("babyId", model.getBabyId());
  264 + BabyModel baby = babyBookbuildingService.queryBabyBuildById(model.getBabyId());
  265 + map.put("babyName", baby.getName());
  266 + map.put("babySex", SexEnum.getTextById(baby.getSex()));
  267 + map.put("monthAge", StringUtils.emptyDeal(DateUtil.getBabyMonthAge(baby.getBirth(), new Date())));
  268 + map.put("motherName", baby.getMname());
  269 + map.put("phone", baby.getMphone());
  270 + map.put("vcCardNo", baby.getVcCardNo());
262 271  
263   - BabyModel baby = babyBookbuildingService.queryBabyBuildById(model.getBabyId());
264   - map.put("babyName", baby.getName());
265   - map.put("babySex", SexEnum.getTextById(baby.getSex()));
266   - map.put("monthAge", StringUtils.emptyDeal(DateUtil.getBabyMonthAge(baby.getBirth(), new Date())));
267   - map.put("motherName", baby.getMname());
268   - map.put("phone", baby.getMphone());
269   - map.put("vcCardNo", baby.getVcCardNo());
  272 + String highRiskInfos = basicConfigFacade.queryBaseInfoByStr(baby.getHighRiskInfo());
  273 + map.put("highRiskInfos", highRiskInfos);
270 274  
271   - String highRiskInfos = basicConfigFacade.queryBaseInfoByStr(baby.getHighRiskInfo());
272   - map.put("highRiskInfos", highRiskInfos);
273   -
274 275 String diagnose = "";
275 276 if (StringUtils.isNotEmpty(baby.getPid())) {
276 277 List diagList = babyCheckFacade.getBabyLastDiagnose(baby.getPid());
277 278  
... ... @@ -293,9 +294,9 @@
293 294 // 新增报表解读人和结算状态
294 295 String currInterpretDoctorId = model.getInterpretDoctorId();
295 296 String interpretDoctorName = "";
296   - if (StringUtils.isNotEmpty(currInterpretDoctorId)){
  297 + if (StringUtils.isNotEmpty(currInterpretDoctorId)) {
297 298 Users users = usersService.getUsers(Integer.parseInt(currInterpretDoctorId));
298   - if (users != null){
  299 + if (users != null) {
299 300 interpretDoctorName = users.getName();
300 301 }
301 302 }
... ... @@ -317,7 +318,6 @@
317 318 return objectResponse;
318 319 }
319 320  
320   - public BaseObjectResponse queryBabyNutritionReport(String id, Integer userId) {
321 321 /**
322 322 * 获取结算状态
323 323 *
324 324  
... ... @@ -328,14 +328,14 @@
328 328 HealthChargeQuery healthChargeQuery = new HealthChargeQuery();
329 329 healthChargeQuery.setBabyForeignId(model.getId());
330 330 List<HealthChargeModel> healthChargeModelList = healthChargeService.queryHealthChargeList(healthChargeQuery);
331   - if (CollectionUtils.isNotEmpty(healthChargeModelList)){
  331 + if (CollectionUtils.isNotEmpty(healthChargeModelList)) {
332 332 HealthChargeModel healthChargeModel = healthChargeModelList.get(0);
333 333 return healthChargeModel.getStatus();
334 334 }
335 335 return null;
336 336 }
337 337  
338   - public BaseObjectResponse queryBabyNutritionReport(String id,Integer userId) {
  338 + public BaseObjectResponse queryBabyNutritionReport(String id, Integer userId) {
339 339  
340 340  
341 341 Map data = new HashMap();
342 342  
... ... @@ -893,43 +893,7 @@
893 893 return kaupEvaluate;
894 894 }
895 895  
896   - public BaseObjectResponse queryBabyDietReport(String id, Integer userId) {
897   - Map data = new HashMap();
898 896  
899   - BabyNutritionQuery babyQuery = new BabyNutritionQuery();
900   - String hospitalId = autoMatchFacade.getHospitalId(userId);
901   - babyQuery.setHospitalId(hospitalId);
902   - babyQuery.setId(id);
903   -
904   - List<BabyNutritionModel> models = babyNutritionService.queryBabyNutritions(babyQuery);
905   - if (CollectionUtils.isNotEmpty(models)) {
906   - BabyNutritionModel model = models.get(0);
907   - BabyModel baby = babyBookbuildingService.queryBabyBuildById(model.getBabyId());
908   -
909   - Map map = new HashMap();
910   - map.put("id", model.getId());
911   - map.put("babyId", model.getBabyId());
912   - map.put("babyName", baby.getName());
913   - map.put("babySex", SexEnum.getTextById(baby.getSex()));
914   - map.put("monthAge", StringUtils.emptyDeal(DateUtil.getBabyMonthAge(baby.getBirth(), new Date())));
915   - map.put("motherName", baby.getMname());
916   - map.put("phone", baby.getMphone());
917   - map.put("vcCardNo", baby.getVcCardNo());
918   - map.put("weight", model.getWeight());
919   - map.put("height", model.getHeight());
920   - Organization org = organizationService.getOrganization(Integer.parseInt(hospitalId));
921   - map.put("hospitalName", org.getName());
922   - map.put("reportMonthAge", StringUtils.emptyDeal(DateUtil.getBabyMonthAge(baby.getBirth(), model.getNutritiTime())));
923   - data.put("userInfo", map);
924   - }
925   -
926   - BaseObjectResponse objectResponse = new BaseObjectResponse();
927   - objectResponse.setData(data);
928   - objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
929   - objectResponse.setErrormsg("成功");
930   - return objectResponse;
931   - }
932   -
933 897 /**
934 898 * 未结算列表
935 899 *
... ... @@ -938,7 +902,7 @@
938 902 * @return
939 903 */
940 904 public BaseResponse unSettleList(BabyNutritionSettleRequest request, Integer userId) {
941   - HealthChargeQuery healthChargeQuery = new HealthChargeQuery();
  905 + HealthChargeQuery healthChargeQuery = new HealthChargeQuery();
942 906 healthChargeQuery.setPage(request.getPage());
943 907 healthChargeQuery.setLimit(request.getLimit());
944 908 healthChargeQuery.setNeed("true");
... ... @@ -950,7 +914,7 @@
950 914 Date startDate = areaCountFacade.getStartDate();
951 915 healthChargeQuery.setCreatedStart(startDate);
952 916 healthChargeQuery.setCreatedEnd(new Date());
953   - if (request.getStartTime() != null){
  917 + if (request.getStartTime() != null) {
954 918 healthChargeQuery.setCreatedStart(request.getStartTime());
955 919 healthChargeQuery.setCreatedEnd(request.getEndTime());
956 920 }
957 921  
958 922  
959 923  
960 924  
961 925  
962 926  
963 927  
... ... @@ -959,36 +923,36 @@
959 923  
960 924 List<HealthChargeModel> list = healthChargeService.queryHealthChargeList(healthChargeQuery);
961 925 List<HealthChargeModel> resultList = new LinkedList<>();
962   - if (CollectionUtils.isNotEmpty(list)){
963   - for (HealthChargeModel model: list){
  926 + if (CollectionUtils.isNotEmpty(list)) {
  927 + for (HealthChargeModel model : list) {
964 928 String babyForeignId = model.getBabyForeignId();
965 929  
966   - if (StringUtils.isNotEmpty(findNo) && StringUtils.isNotEmpty(keyword)){
  930 + if (StringUtils.isNotEmpty(findNo) && StringUtils.isNotEmpty(keyword)) {
967 931 List<BabyModel> babyModels = getBabyModels(findNo, babyForeignId);
968   - if (CollectionUtils.isNotEmpty(babyModels)){
  932 + if (CollectionUtils.isNotEmpty(babyModels)) {
969 933 BabyModel babyModel = babyModels.get(0);
970 934 String name = babyModel.getName();
971   - if (name.contains(keyword)){
  935 + if (name.contains(keyword)) {
972 936 resultList.add(model);
973 937 }
974 938 }
975 939 }
976 940  
977   - if (StringUtils.isNotEmpty(findNo)){
  941 + if (StringUtils.isNotEmpty(findNo)) {
978 942 List<BabyModel> babyModels = getBabyModels(findNo, babyForeignId);
979   - if (CollectionUtils.isNotEmpty(babyModels)){
  943 + if (CollectionUtils.isNotEmpty(babyModels)) {
980 944 resultList.add(model);
981 945 }
982 946 }
983 947  
984   - if (StringUtils.isNotEmpty(keyword)){
  948 + if (StringUtils.isNotEmpty(keyword)) {
985 949 BabyModelQuery babyQuery = new BabyModelQuery();
986 950 babyQuery.setId(babyForeignId);
987 951 babyQuery.setQueryNo(findNo);
988 952 babyQuery.setYn(YnEnums.YES.getId());
989 953 }
990 954  
991   - if (StringUtils.isEmpty(findNo) && StringUtils.isEmpty(keyword)){
  955 + if (StringUtils.isEmpty(findNo) && StringUtils.isEmpty(keyword)) {
992 956 resultList.add(model);
993 957 }
994 958 }
... ... @@ -1014,6 +978,43 @@
1014 978 babyQuery.setQueryNo(findNo);
1015 979 babyQuery.setYn(YnEnums.YES.getId());
1016 980 return babyBookbuildingService.queryBabyBuildByCond(babyQuery);
  981 + }
  982 +
  983 + public BaseObjectResponse queryBabyDietReport(String id, Integer userId) {
  984 + Map data = new HashMap();
  985 +
  986 + BabyNutritionQuery babyQuery = new BabyNutritionQuery();
  987 + String hospitalId = autoMatchFacade.getHospitalId(userId);
  988 + babyQuery.setHospitalId(hospitalId);
  989 + babyQuery.setId(id);
  990 +
  991 + List<BabyNutritionModel> models = babyNutritionService.queryBabyNutritions(babyQuery);
  992 + if (CollectionUtils.isNotEmpty(models)) {
  993 + BabyNutritionModel model = models.get(0);
  994 + BabyModel baby = babyBookbuildingService.queryBabyBuildById(model.getBabyId());
  995 +
  996 + Map map = new HashMap();
  997 + map.put("id", model.getId());
  998 + map.put("babyId", model.getBabyId());
  999 + map.put("babyName", baby.getName());
  1000 + map.put("babySex", SexEnum.getTextById(baby.getSex()));
  1001 + map.put("monthAge", StringUtils.emptyDeal(DateUtil.getBabyMonthAge(baby.getBirth(), new Date())));
  1002 + map.put("motherName", baby.getMname());
  1003 + map.put("phone", baby.getMphone());
  1004 + map.put("vcCardNo", baby.getVcCardNo());
  1005 + map.put("weight", model.getWeight());
  1006 + map.put("height", model.getHeight());
  1007 + Organization org = organizationService.getOrganization(Integer.parseInt(hospitalId));
  1008 + map.put("hospitalName", org.getName());
  1009 + map.put("reportMonthAge", StringUtils.emptyDeal(DateUtil.getBabyMonthAge(baby.getBirth(), model.getNutritiTime())));
  1010 + data.put("userInfo", map);
  1011 + }
  1012 +
  1013 + BaseObjectResponse objectResponse = new BaseObjectResponse();
  1014 + objectResponse.setData(data);
  1015 + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
  1016 + objectResponse.setErrormsg("成功");
  1017 + return objectResponse;
1017 1018 }
1018 1019 }