Commit 07afd507d999fea88fb42611d11c47af18a3f0be

Authored by dongqin
1 parent 8d90579bb6

产后转介

Showing 8 changed files with 295 additions and 8 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/MaternalDeliverModel.java View file @ 07afd50
... ... @@ -181,6 +181,55 @@
181 181 */
182 182 private Date pushTime;
183 183  
  184 + /**
  185 + * 转介地
  186 + */
  187 + private String provinceZJId;
  188 + private String cityZJId;
  189 + private String areaZJId;
  190 + private String streetZJId;
  191 + private String addressZJ;
  192 +
  193 + public String getAddressZJ() {
  194 + return addressZJ;
  195 + }
  196 +
  197 + public void setAddressZJ(String addressZJ) {
  198 + this.addressZJ = addressZJ;
  199 + }
  200 +
  201 + public String getProvinceZJId() {
  202 + return provinceZJId;
  203 + }
  204 +
  205 + public void setProvinceZJId(String provinceZJId) {
  206 + this.provinceZJId = provinceZJId;
  207 + }
  208 +
  209 + public String getCityZJId() {
  210 + return cityZJId;
  211 + }
  212 +
  213 + public void setCityZJId(String cityZJId) {
  214 + this.cityZJId = cityZJId;
  215 + }
  216 +
  217 + public String getAreaZJId() {
  218 + return areaZJId;
  219 + }
  220 +
  221 + public void setAreaZJId(String areaZJId) {
  222 + this.areaZJId = areaZJId;
  223 + }
  224 +
  225 + public String getStreetZJId() {
  226 + return streetZJId;
  227 + }
  228 +
  229 + public void setStreetZJId(String streetZJId) {
  230 + this.streetZJId = streetZJId;
  231 + }
  232 +
184 233 public Date getPushTime() {
185 234 return pushTime;
186 235 }
platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java View file @ 07afd50
... ... @@ -175,6 +175,46 @@
175 175  
176 176 private String endPushTime;
177 177  
  178 + /**
  179 + * 转介地
  180 + */
  181 + private String provinceZJId;
  182 + private String cityZJId;
  183 + private String areaZJId;
  184 + private String streetZJId;
  185 +
  186 + public String getProvinceZJId() {
  187 + return provinceZJId;
  188 + }
  189 +
  190 + public void setProvinceZJId(String provinceZJId) {
  191 + this.provinceZJId = provinceZJId;
  192 + }
  193 +
  194 + public String getCityZJId() {
  195 + return cityZJId;
  196 + }
  197 +
  198 + public void setCityZJId(String cityZJId) {
  199 + this.cityZJId = cityZJId;
  200 + }
  201 +
  202 + public String getAreaZJId() {
  203 + return areaZJId;
  204 + }
  205 +
  206 + public void setAreaZJId(String areaZJId) {
  207 + this.areaZJId = areaZJId;
  208 + }
  209 +
  210 + public String getStreetZJId() {
  211 + return streetZJId;
  212 + }
  213 +
  214 + public void setStreetZJId(String streetZJId) {
  215 + this.streetZJId = streetZJId;
  216 + }
  217 +
178 218 public String getStartPushTime() {
179 219 return startPushTime;
180 220 }
... ... @@ -316,6 +356,22 @@
316 356 }
317 357 if (null != hospitalId) {
318 358 condition = condition.and("hospitalId", hospitalId, MongoOper.IS);
  359 + }
  360 +
  361 + // /**
  362 + // * 转介地
  363 + // */
  364 + if (null != provinceZJId) {
  365 + condition = condition.and("provinceZJId", provinceZJId, MongoOper.IS);
  366 + if (null != cityZJId) {
  367 + condition = condition.and("cityZJId", cityZJId, MongoOper.IS);
  368 + if (null != areaZJId) {
  369 + condition = condition.and("areaZJId", areaZJId, MongoOper.IS);
  370 + if (null != streetZJId) {
  371 + condition = condition.and("streetZJId", streetZJId, MongoOper.IS);
  372 + }
  373 + }
  374 + }
319 375 }
320 376  
321 377  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatdeliverFollowController.java View file @ 07afd50
... ... @@ -6,12 +6,10 @@
6 6 import com.lyms.platform.common.result.BaseListResponse;
7 7 import com.lyms.platform.common.result.BaseResponse;
8 8 import com.lyms.platform.operate.web.facade.MatdeliverFollowFacade;
9   -import com.lyms.platform.operate.web.request.MatDeliverFollowAddRequest;
10   -import com.lyms.platform.operate.web.request.MatdeliverFollowRequest;
11   -import com.lyms.platform.operate.web.request.QuestionnaireListRequest;
12   -import com.lyms.platform.operate.web.request.QuestionnairePushRequest;
  9 +import com.lyms.platform.operate.web.request.*;
13 10 import org.springframework.beans.factory.annotation.Autowired;
14 11 import org.springframework.stereotype.Controller;
  12 +import org.springframework.validation.annotation.Validated;
15 13 import org.springframework.web.bind.annotation.*;
16 14  
17 15 import javax.servlet.http.HttpServletRequest;
... ... @@ -120,6 +118,20 @@
120 118 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
121 119 matdeliverFollowRequest.setNeed("need");
122 120 return matdeliverFollowFacade.getPostpartumFollowMake(matdeliverFollowRequest, loginState.getId());
  121 + }
  122 +
  123 + /**
  124 + * 产后转介
  125 + * @param param
  126 + * @param request
  127 + * @return
  128 + */
  129 + @ResponseBody
  130 + @TokenRequired
  131 + @RequestMapping(value = "/status", method = RequestMethod.POST)
  132 + public BaseListResponse matdeliverFollowMakeStatus(@RequestBody @Validated MatdeliverFollowStatusRequest param, HttpServletRequest request) {
  133 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  134 + return matdeliverFollowFacade.matdeliverFollowMakeStatus(param, loginState.getId());
123 135 }
124 136  
125 137 /**
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 07afd50
... ... @@ -1942,6 +1942,14 @@
1942 1942 errorPercentage = new BigDecimal(100.00).subtract(new BigDecimal(okPercentage)).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
1943 1943 }
1944 1944 matDeliverQuery.setVisitResult(matdeliverFollowRequest.getVisitResult());
  1945 +
  1946 +
  1947 + // 转介地址
  1948 + matDeliverQuery.setProvinceZJId(matdeliverFollowRequest.getProvinceZJId());
  1949 + matDeliverQuery.setCityZJId(matdeliverFollowRequest.getCityZJId());
  1950 + matDeliverQuery.setAreaZJId(matdeliverFollowRequest.getAreaZJId());
  1951 + matDeliverQuery.setStreetZJId(matdeliverFollowRequest.getStreetZJId());
  1952 +
1945 1953 if (StringUtils.isNotEmpty(matdeliverFollowRequest.getNeed())) {//是否分页
1946 1954 matDeliverQuery.setNeed("need");
1947 1955 matDeliverQuery.setLimit(matdeliverFollowRequest.getLimit());
1948 1956  
... ... @@ -1981,8 +1989,11 @@
1981 1989 matdeliverFollowListResult.setName(patients.getUsername());
1982 1990 // 年龄
1983 1991 matdeliverFollowListResult.setAge(DateUtil.getAge(patients.getBirth()));
  1992 +
1984 1993 //放入map,进行下一步数据整合
1985 1994 patientsMap.put(patients.getId(), matdeliverFollowListResult);
  1995 +
  1996 +
1986 1997 }
1987 1998  
1988 1999  
... ... @@ -1992,6 +2003,17 @@
1992 2003 if (matdeliverFollowListResult == null) {
1993 2004 continue;
1994 2005 }
  2006 + // 转介地
  2007 + String provinceZJId = deliverModel.getProvinceZJId();
  2008 + String cityZJId = deliverModel.getCityZJId();
  2009 + String areaZJId = deliverModel.getAreaZJId();
  2010 + String streetZJId = deliverModel.getStreetZJId();
  2011 + if (StringUtils.isNotEmpty(provinceZJId) && StringUtils.isNotEmpty(cityZJId) && StringUtils.isNotEmpty(areaZJId) && StringUtils.isNotEmpty(streetZJId)) {
  2012 + matdeliverFollowListResult.setAddressZJ(CommonsHelper.getResidence(provinceZJId, cityZJId, areaZJId, streetZJId, deliverModel.getAddressZJ(), basicConfigService));
  2013 + } else {
  2014 + matdeliverFollowListResult.setAddressZJ("");
  2015 + }
  2016 +
1995 2017 //最后一次随访Id
1996 2018 matdeliverFollowListResult.setMatFollowId(deliverModel.getMatFollowId());
1997 2019 matdeliverFollowListResult.setDueDate(deliverModel.getDueDate());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatdeliverFollowFacade.java View file @ 07afd50
... ... @@ -11,10 +11,7 @@
11 11 import com.lyms.platform.common.result.BaseResponse;
12 12 import com.lyms.platform.common.utils.BeanUtils;
13 13 import com.lyms.platform.common.utils.DateUtil;
14   -import com.lyms.platform.operate.web.request.MatDeliverFollowAddRequest;
15   -import com.lyms.platform.operate.web.request.MatdeliverFollowRequest;
16   -import com.lyms.platform.operate.web.request.QuestionnaireListRequest;
17   -import com.lyms.platform.operate.web.request.QuestionnairePushRequest;
  14 +import com.lyms.platform.operate.web.request.*;
18 15 import com.lyms.platform.operate.web.result.MatdeliverFollowListResult;
19 16 import com.lyms.platform.operate.web.result.MatdeliverFollowResult;
20 17 import com.lyms.platform.operate.web.service.ITrackDownService;
... ... @@ -29,6 +26,7 @@
29 26 import com.lyms.platform.query.MatDeliverFollowQuery;
30 27 import com.lyms.platform.query.PersonModelQuery;
31 28 import com.lyms.platform.query.TrackDownRecordQuery;
  29 +import com.mongodb.WriteResult;
32 30 import jxl.Workbook;
33 31 import jxl.format.Alignment;
34 32 import jxl.format.Colour;
... ... @@ -933,6 +931,25 @@
933 931 baseListResponse.setPageInfo(param.getPageInfo());
934 932 baseListResponse.setData(mapList);
935 933 return baseListResponse;
  934 + }
  935 +
  936 + /**
  937 + * 产后转介处理
  938 + *
  939 + * @param param
  940 + * @param userId
  941 + * @return
  942 + */
  943 + public BaseListResponse matdeliverFollowMakeStatus(MatdeliverFollowStatusRequest param, Integer userId) {
  944 + Update update = new Update();
  945 + update.set("provinceZJId", param.getProvinceZJId());
  946 + update.set("cityZJId", param.getCityZJId());
  947 + update.set("areaZJId", param.getAreaZJId());
  948 + update.set("streetZJId", param.getStreetZJId());
  949 + update.set("addressZJ", param.getAddressZJ());
  950 + update.unset("fsHospital");
  951 + mongoTemplate.updateFirst(Query.query(Criteria.where("_id").is(param.getId())), update, MaternalDeliverModel.class);
  952 + return new BaseListResponse();
936 953 }
937 954 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/MatdeliverFollowRequest.java View file @ 07afd50
... ... @@ -130,6 +130,46 @@
130 130  
131 131 private String endPushTime;
132 132  
  133 + /**
  134 + * 转介地
  135 + */
  136 + private String provinceZJId;
  137 + private String cityZJId;
  138 + private String areaZJId;
  139 + private String streetZJId;
  140 +
  141 + public String getProvinceZJId() {
  142 + return provinceZJId;
  143 + }
  144 +
  145 + public void setProvinceZJId(String provinceZJId) {
  146 + this.provinceZJId = provinceZJId;
  147 + }
  148 +
  149 + public String getCityZJId() {
  150 + return cityZJId;
  151 + }
  152 +
  153 + public void setCityZJId(String cityZJId) {
  154 + this.cityZJId = cityZJId;
  155 + }
  156 +
  157 + public String getAreaZJId() {
  158 + return areaZJId;
  159 + }
  160 +
  161 + public void setAreaZJId(String areaZJId) {
  162 + this.areaZJId = areaZJId;
  163 + }
  164 +
  165 + public String getStreetZJId() {
  166 + return streetZJId;
  167 + }
  168 +
  169 + public void setStreetZJId(String streetZJId) {
  170 + this.streetZJId = streetZJId;
  171 + }
  172 +
133 173 public String getStartPushTime() {
134 174 return startPushTime;
135 175 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/MatdeliverFollowStatusRequest.java View file @ 07afd50
  1 +package com.lyms.platform.operate.web.request;
  2 +
  3 +import org.hibernate.validator.constraints.Length;
  4 +
  5 +import java.io.Serializable;
  6 +
  7 +/**
  8 + * @author dongqin
  9 + * @description
  10 + * @date 11:29 2019/9/17
  11 + **/
  12 +public class MatdeliverFollowStatusRequest implements Serializable {
  13 +
  14 +
  15 + /**
  16 + * 转介地
  17 + */
  18 + @Length(min = 1, max = 32)
  19 + private String id;
  20 + @Length(min = 1, max = 32)
  21 + private String provinceZJId;
  22 + @Length(min = 1, max = 32)
  23 + private String cityZJId;
  24 + @Length(min = 1, max = 32)
  25 + private String areaZJId;
  26 + @Length(min = 1, max = 32)
  27 + private String streetZJId;
  28 + @Length(min = 1, max = 1024)
  29 + private String addressZJ;
  30 +
  31 + public String getId() {
  32 + return id;
  33 + }
  34 +
  35 + public void setId(String id) {
  36 + this.id = id;
  37 + }
  38 +
  39 + public String getProvinceZJId() {
  40 + return provinceZJId;
  41 + }
  42 +
  43 + public void setProvinceZJId(String provinceZJId) {
  44 + this.provinceZJId = provinceZJId;
  45 + }
  46 +
  47 + public String getCityZJId() {
  48 + return cityZJId;
  49 + }
  50 +
  51 + public void setCityZJId(String cityZJId) {
  52 + this.cityZJId = cityZJId;
  53 + }
  54 +
  55 + public String getAreaZJId() {
  56 + return areaZJId;
  57 + }
  58 +
  59 + public void setAreaZJId(String areaZJId) {
  60 + this.areaZJId = areaZJId;
  61 + }
  62 +
  63 + public String getStreetZJId() {
  64 + return streetZJId;
  65 + }
  66 +
  67 + public void setStreetZJId(String streetZJId) {
  68 + this.streetZJId = streetZJId;
  69 + }
  70 +
  71 + public String getAddressZJ() {
  72 + return addressZJ;
  73 + }
  74 +
  75 + public void setAddressZJ(String addressZJ) {
  76 + this.addressZJ = addressZJ;
  77 + }
  78 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MatdeliverFollowListResult.java View file @ 07afd50
... ... @@ -160,6 +160,19 @@
160 160 */
161 161 private String pushTime;
162 162  
  163 + /**
  164 + * @discription 转介地
  165 + */
  166 + private String addressZJ;
  167 +
  168 + public String getAddressZJ() {
  169 + return addressZJ;
  170 + }
  171 +
  172 + public void setAddressZJ(String addressZJ) {
  173 + this.addressZJ = addressZJ;
  174 + }
  175 +
163 176 public String getPushTime() {
164 177 return pushTime;
165 178 }