Commit 93c1e74b5c29ed53290edb4ecf3fb762f54829bb

Authored by wtt
1 parent b6be7f08c4

update

Showing 1 changed file with 27 additions and 29 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 93c1e74
... ... @@ -3728,21 +3728,15 @@
3728 3728  
3729 3729 ReferralApplyOrderQuery referralApplyOrderQuery = new ReferralApplyOrderQuery();
3730 3730 referralApplyOrderQuery.setParentId(model.getId());
3731   - List<ReferralApplyOrderModel> list = applyOrderService.queryReferralApplyOrderWithQuery(referralApplyOrderQuery);
  3731 + List <ReferralApplyOrderModel> list = applyOrderService.queryReferralApplyOrderWithQuery(referralApplyOrderQuery);
3732 3732  
3733   - if (CollectionUtils.isNotEmpty(list))
3734   - {
  3733 + if (CollectionUtils.isNotEmpty(list)) {
3735 3734 //ApplyOrderStatusEnums
3736   - if (list.get(0).getStatus() == 1)
3737   - {
  3735 + if (list.get(0).getStatus() == 1) {
3738 3736 status = "已转诊";
3739   - }
3740   - else if (list.get(0).getStatus() == 2)
3741   - {
  3737 + } else if (list.get(0).getStatus() == 2) {
3742 3738 status = "已转诊 已接收";
3743   - }
3744   - else if (list.get(0).getStatus() == 5)
3745   - {
  3739 + } else if (list.get(0).getStatus() == 5) {
3746 3740 status = "已转诊 已接收 已转回";
3747 3741 }
3748 3742 }
3749 3743  
... ... @@ -3751,12 +3745,12 @@
3751 3745 String hospitalAddress = "";
3752 3746 if (org.apache.commons.lang.StringUtils.isNotEmpty(model.getHospitalId())) {
3753 3747 Organization organization = organizationService.getOrganization(Integer.parseInt(model.getHospitalId()));
3754   - hospitalAddress = CommonsHelper.getResidence(organization.getProvinceId(), organization.getCityId(),
3755   - organization.getAreaId(), organization.getStreetId(),"",
3756   - basicConfigService);
  3748 + hospitalAddress = CommonsHelper.getResidence(organization.getProvinceId(), organization.getCityId(),
  3749 + organization.getAreaId(), organization.getStreetId(), "",
  3750 + basicConfigService);
3757 3751 }
3758   - data.put("status",status);
3759   - data.put("hospitalAddress",hospitalAddress);
  3752 + data.put("status", status);
  3753 + data.put("hospitalAddress", hospitalAddress);
3760 3754 data.put("sex", model.getSex() == null ? "" : StringUtils.emptyDeal(SexEnum.getTextById(model.getSex())));
3761 3755 data.put("babyName", StringUtils.emptyDeal(model.getName()));
3762 3756 data.put("birthday", StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getBirth())));
3763 3757  
3764 3758  
3765 3759  
... ... @@ -3997,19 +3991,19 @@
3997 3991 GrowthCountQhdTask task = new GrowthCountQhdTask(groups, babyQuery, babyCheckService, key);
3998 3992 result.addAll(task.getResults());
3999 3993 }
4000   - Integer scCount=0;
4001   - Integer tzCount=0;
4002   - Integer scbtzCount=0;
  3994 + Integer scCount = 0;
  3995 + Integer tzCount = 0;
  3996 + Integer scbtzCount = 0;
4003 3997  
4004 3998 for (int i = 0; i < result.size(); i++) {
4005 3999 try {
4006 4000 BabyGrowthCountResult babyResult = result.get(i);
4007 4001 if ("身长".equals(babyResult.getTypeName())) {
4008   - scCount += Integer.parseInt(babyResult.getCount()) ;
  4002 + scCount += Integer.parseInt(babyResult.getCount());
4009 4003 } else if ("体重".equals(babyResult.getTypeName())) {
4010   - tzCount += Integer.parseInt(babyResult.getCount()) ;
  4004 + tzCount += Integer.parseInt(babyResult.getCount());
4011 4005 } else if ("身长别体重".equals(babyResult.getTypeName())) {
4012   - scbtzCount += Integer.parseInt(babyResult.getCount()) ;
  4006 + scbtzCount += Integer.parseInt(babyResult.getCount());
4013 4007 }
4014 4008 } catch (NumberFormatException e) {
4015 4009 e.printStackTrace();
4016 4010  
4017 4011  
... ... @@ -4022,20 +4016,20 @@
4022 4016 if ("身长".equals(babyResult.getTypeName())) {
4023 4017 babyResult.setFslCount(scCount);
4024 4018 Integer sc = Integer.parseInt(babyResult.getCount());
4025   - BigDecimal b = new BigDecimal((float)sc/scCount);
4026   - babyResult.setFsl(new DecimalFormat("0.00").format(b)+"%");
  4019 + BigDecimal b = new BigDecimal((float) sc / scCount);
  4020 + babyResult.setFsl(new DecimalFormat("0.00").format(b) + "%");
4027 4021  
4028 4022 } else if ("体重".equals(babyResult.getTypeName())) {
4029 4023 babyResult.setFslCount(tzCount);
4030 4024 Integer sc = Integer.parseInt(babyResult.getCount());
4031   - BigDecimal b = new BigDecimal((float)sc/tzCount);
4032   - babyResult.setFsl(new DecimalFormat("0.00").format(b)+"%");
  4025 + BigDecimal b = new BigDecimal((float) sc / tzCount);
  4026 + babyResult.setFsl(new DecimalFormat("0.00").format(b) + "%");
4033 4027  
4034 4028 } else if ("身长别体重".equals(babyResult.getTypeName())) {
4035 4029 babyResult.setFslCount(scbtzCount);
4036 4030 Integer sc = Integer.parseInt(babyResult.getCount());
4037   - BigDecimal b = new BigDecimal((float)sc/scbtzCount);
4038   - babyResult.setFsl(new DecimalFormat("0.00").format(b)+"%");
  4031 + BigDecimal b = new BigDecimal((float) sc / scbtzCount);
  4032 + babyResult.setFsl(new DecimalFormat("0.00").format(b) + "%");
4039 4033 }
4040 4034 }
4041 4035 } catch (NumberFormatException e) {
4042 4036  
... ... @@ -4117,8 +4111,12 @@
4117 4111 List <Map <String, String>> list = new ArrayList <>();
4118 4112 if (CollectionUtils.isNotEmpty(checkModels)) {
4119 4113 for (BabyCheckModel checkModel : checkModels) {
  4114 +
4120 4115 if (StringUtils.isNotEmpty(checkModel.getBuildId())) {
4121 4116 BabyModel model = getBabyModelById(checkModel.getBuildId());
  4117 + if (model == null) {
  4118 + continue;
  4119 + }
4122 4120 Map <String, String> map = new HashMap <>();
4123 4121 map.put("id", model.getId()); //儿童主键
4124 4122 map.put("checkId", checkModel.getId()); //检查主键
... ... @@ -4166,7 +4164,7 @@
4166 4164 if (CollectionUtils.isNotEmpty(futures)) {
4167 4165 for (Future f : futures) {
4168 4166 try {
4169   - results.addAll((List) f.get(30, TimeUnit.SECONDS));
  4167 + results.addAll((List) f.get(300, TimeUnit.SECONDS));
4170 4168 } catch (Exception e) {
4171 4169 ExceptionUtils.catchException(e, "baby check list");
4172 4170 }