Commit 2f947cc4176b75593f52e0be50cf63349f89c618

Authored by liquanyu
1 parent d5b25c6dd0

追访管理

Showing 8 changed files with 492 additions and 21 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/MaternalDeliverModel.java View file @ 2f947cc
... ... @@ -190,7 +190,55 @@
190 190 private String streetZJId;
191 191 private String addressZJ;
192 192  
  193 + /**
  194 + * 产后休养地
  195 + */
  196 + private String addressPostRest;
  197 + private String provincePostRestId;
  198 + private String cityPostRestId;
  199 + private String areaPostRestId;
  200 + private String streetRegisterId;
193 201 private String inHospitalNo;
  202 +
  203 + public String getAddressPostRest() {
  204 + return addressPostRest;
  205 + }
  206 +
  207 + public void setAddressPostRest(String addressPostRest) {
  208 + this.addressPostRest = addressPostRest;
  209 + }
  210 +
  211 + public String getStreetRegisterId() {
  212 + return streetRegisterId;
  213 + }
  214 +
  215 + public void setStreetRegisterId(String streetRegisterId) {
  216 + this.streetRegisterId = streetRegisterId;
  217 + }
  218 +
  219 + public String getCityPostRestId() {
  220 + return cityPostRestId;
  221 + }
  222 +
  223 + public void setCityPostRestId(String cityPostRestId) {
  224 + this.cityPostRestId = cityPostRestId;
  225 + }
  226 +
  227 + public String getAreaPostRestId() {
  228 + return areaPostRestId;
  229 + }
  230 +
  231 + public void setAreaPostRestId(String areaPostRestId) {
  232 + this.areaPostRestId = areaPostRestId;
  233 + }
  234 +
  235 + public String getProvincePostRestId() {
  236 + return provincePostRestId;
  237 + }
  238 +
  239 + public void setProvincePostRestId(String provincePostRestId) {
  240 + this.provincePostRestId = provincePostRestId;
  241 + }
194 242  
195 243 public String getInHospitalNo() {
196 244 return inHospitalNo;
platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java View file @ 2f947cc
... ... @@ -184,6 +184,38 @@
184 184 private String areaZJId;
185 185 private String streetZJId;
186 186  
  187 +
  188 + /**
  189 + * 产后休养地
  190 + */
  191 + private String provincePostRestId;
  192 + private String cityPostRestId;
  193 + private String areaPostRestId;
  194 +
  195 + public String getProvincePostRestId() {
  196 + return provincePostRestId;
  197 + }
  198 +
  199 + public void setProvincePostRestId(String provincePostRestId) {
  200 + this.provincePostRestId = provincePostRestId;
  201 + }
  202 +
  203 + public String getCityPostRestId() {
  204 + return cityPostRestId;
  205 + }
  206 +
  207 + public void setCityPostRestId(String cityPostRestId) {
  208 + this.cityPostRestId = cityPostRestId;
  209 + }
  210 +
  211 + public String getAreaPostRestId() {
  212 + return areaPostRestId;
  213 + }
  214 +
  215 + public void setAreaPostRestId(String areaPostRestId) {
  216 + this.areaPostRestId = areaPostRestId;
  217 + }
  218 +
187 219 public Boolean getIsQueryFsHospitalId() {
188 220 return isQueryFsHospitalId;
189 221 }
... ... @@ -383,6 +415,15 @@
383 415 }
384 416 }
385 417  
  418 + if (null != provincePostRestId) {
  419 + condition = condition.and("provincePostRestId", provincePostRestId, MongoOper.IS);
  420 + if (null != cityPostRestId) {
  421 + condition = condition.and("cityPostRestId", cityPostRestId, MongoOper.IS);
  422 + if (null != areaPostRestId) {
  423 + condition = condition.and("areaPostRestId", areaPostRestId, MongoOper.IS);
  424 + }
  425 + }
  426 + }
386 427  
387 428 if (null != contactResult) {
388 429 condition = condition.and("contactResult", contactResult, MongoOper.IS);
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/JDBCUtil.java View file @ 2f947cc
  1 +package com.lyms.hospitalapi.qhdfy;
  2 +
  3 +
  4 +
  5 +import java.sql.*;
  6 +import java.util.ArrayList;
  7 +import java.util.HashMap;
  8 +import java.util.List;
  9 +import java.util.Map;
  10 +
  11 +/**
  12 + * Created by Administrator on 2016/10/13.
  13 + */
  14 +public class JDBCUtil {
  15 +
  16 + static String oracle_url = "jdbc:oracle:thin:@168.254.0.159:1521:prmi";
  17 + static String oracle_name = "LYMS_QHD_ORG";
  18 + static String oracle_pwd = "LYMS_QHD_ORG";
  19 +// static String oracle_url = "jdbc:oracle:thin:@119.90.57.26:1522:orcl";
  20 +// static String oracle_name = "LYMS_ODS";
  21 +// static String oracle_pwd = "Welcome1";
  22 +
  23 + static String mysql_url = "jdbc:mysql://168.254.0.109:3306/platform_cert?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8";
  24 + static String mysql_name = "root";
  25 + static String mysql_pwd = "Lyms@2020";
  26 +
  27 + public static Connection getOracleConnection() {
  28 + Connection con = null;
  29 + try {
  30 + Class.forName("oracle.jdbc.driver.OracleDriver");
  31 + String url = oracle_url;
  32 + String userName = oracle_name;
  33 + String pwd = oracle_pwd;
  34 + con = DriverManager.getConnection(url, userName, pwd);
  35 + } catch (Exception e) {
  36 + e.printStackTrace();
  37 + }
  38 + return con;
  39 + }
  40 +
  41 + public static Connection getMysqlConnection() {
  42 + Connection con = null;
  43 + try {
  44 + Class.forName("com.mysql.jdbc.Driver");
  45 + String url = mysql_url;
  46 + String userName = mysql_name;
  47 + String pwd = mysql_pwd;
  48 + con = DriverManager.getConnection(url, userName, pwd);
  49 + } catch (Exception e) {
  50 + e.printStackTrace();
  51 + }
  52 + return con;
  53 + }
  54 +
  55 + public static void closeConnection(Connection connection, Statement ps, ResultSet rs) {
  56 + try {
  57 + if (rs != null) {
  58 + rs.close();
  59 + }
  60 + if (ps != null) {
  61 + ps.close();
  62 + }
  63 + if (null != connection) {
  64 + connection.close();
  65 + }
  66 + } catch (SQLException e) {
  67 + }
  68 + }
  69 +
  70 + /**
  71 + * @param sql
  72 + * @return
  73 + */
  74 + public static List<Map<String, Object>> getOracleListDataBySql(String sql) {
  75 + Connection conn = getOracleConnection();
  76 + PreparedStatement pst = null;
  77 + ResultSet rs = null;
  78 + List<Map<String, Object>> list = new ArrayList<>();
  79 + try {
  80 + pst = conn.prepareStatement(sql);
  81 + rs = pst.executeQuery();
  82 + int count = rs.getMetaData().getColumnCount();
  83 + while (rs.next()) {
  84 + Map<String, Object> maps = new HashMap<>();
  85 + for (int i = 1; i <= count; i++) {
  86 + ResultSetMetaData resultSetMetaData = rs.getMetaData();
  87 + String columnName = resultSetMetaData.getColumnName(i);
  88 + Integer typeId = resultSetMetaData.getColumnType(i);
  89 + Object obj = (typeId != null && Types.DATE == typeId) ? rs.getTimestamp(columnName) : rs.getObject(columnName);
  90 + if (obj != null) {
  91 + maps.put(columnName, obj);
  92 + } else {
  93 + maps.put(columnName, null);
  94 + }
  95 + }
  96 + list.add(maps);
  97 + }
  98 + } catch (Exception e) {
  99 + e.printStackTrace();
  100 + } finally {
  101 + closeConnection(conn, pst, rs);
  102 + }
  103 + return list;
  104 + }
  105 +
  106 +// public static void main(String[] args) {
  107 +// List<Map<String, Object>> list = getOracleListDataBySql("select last_login_time from USERS t where t.id=1");
  108 +// System.out.println(DateUtil.gety_m_dhm(HsDataUtil.getDate(list.get(0).get("LAST_LOGIN_TIME"))));
  109 +// }
  110 +
  111 +
  112 + public static List<Map<String, Object>> getMysqlListDataBySql(String sql) {
  113 + Connection conn = getMysqlConnection();
  114 + PreparedStatement pst = null;
  115 + ResultSet rs = null;
  116 + List<Map<String, Object>> list = new ArrayList<>();
  117 + try {
  118 + pst = conn.prepareStatement(sql);
  119 + rs = pst.executeQuery();
  120 + int count = rs.getMetaData().getColumnCount();
  121 + while (rs.next()) {
  122 + Map<String, Object> maps = new HashMap<>();
  123 + for (int i = 1; i <= count; i++) {
  124 + String columnName = rs.getMetaData().getColumnName(i);
  125 + Object obj = rs.getObject(columnName);
  126 + if (obj != null) {
  127 + maps.put(columnName, obj);
  128 + } else {
  129 + maps.put(columnName, null);
  130 + }
  131 + }
  132 + list.add(maps);
  133 + }
  134 + } catch (Exception e) {
  135 + e.printStackTrace();
  136 + } finally {
  137 + closeConnection(conn, pst, rs);
  138 + }
  139 + return list;
  140 + }
  141 +
  142 +
  143 +
  144 +
  145 + public static int mysqlUpdate(String sql) {
  146 + Connection conn = getMysqlConnection();
  147 + Statement pst = null;
  148 + ResultSet rs = null;
  149 + List<Map<String, Object>> list = new ArrayList<>();
  150 + try {
  151 + pst = conn.createStatement();
  152 + return pst.executeUpdate(sql);
  153 + } catch (Exception e) {
  154 + e.printStackTrace();
  155 + } finally {
  156 + closeConnection(conn, pst, rs);
  157 + }
  158 + return 0;
  159 + }
  160 +
  161 + public static Object getOralceSingleObjBySql(String sql) {
  162 + Connection conn = getOracleConnection();
  163 + PreparedStatement pst = null;
  164 + ResultSet rs = null;
  165 + try {
  166 + pst = conn.prepareStatement(sql);
  167 + rs = pst.executeQuery();
  168 + int count = rs.getMetaData().getColumnCount();
  169 + for (int i = 1; i <= count; i++) {
  170 + String columnName = rs.getMetaData().getColumnName(i);
  171 + while (rs.next()) {
  172 + return rs.getObject(columnName);
  173 + }
  174 +
  175 + }
  176 + } catch (Exception e) {
  177 + e.printStackTrace();
  178 + } finally {
  179 + closeConnection(conn, pst, rs);
  180 + }
  181 + return null;
  182 + }
  183 +
  184 +
  185 + public static Object getMysqlSingleObjBySql(String sql) {
  186 + Connection conn = getMysqlConnection();
  187 + PreparedStatement pst = null;
  188 + ResultSet rs = null;
  189 + try {
  190 + pst = conn.prepareStatement(sql);
  191 + rs = pst.executeQuery();
  192 + int count = rs.getMetaData().getColumnCount();
  193 + for (int i = 1; i <= count; i++) {
  194 + String columnName = rs.getMetaData().getColumnName(i);
  195 + while (rs.next()) {
  196 + return rs.getObject(columnName);
  197 + }
  198 + }
  199 + } catch (Exception e) {
  200 + e.printStackTrace();
  201 + } finally {
  202 + closeConnection(conn, pst, rs);
  203 + }
  204 + return null;
  205 + }
  206 +}
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/SyncQhdBaseInfoService.java View file @ 2f947cc
  1 +package com.lyms.hospitalapi.qhdfy;
  2 +
  3 +import com.lyms.hospitalapi.hs.HsDataUtil;
  4 +import com.lyms.platform.biz.service.BasicConfigService;
  5 +import com.lyms.platform.common.utils.DateUtil;
  6 +import com.lyms.platform.permission.service.OrganizationService;
  7 +import com.lyms.platform.permission.service.UsersService;
  8 +import org.apache.commons.collections.CollectionUtils;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.beans.factory.annotation.Qualifier;
  11 +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
  12 +import org.springframework.stereotype.Service;
  13 +
  14 +import java.util.Date;
  15 +import java.util.List;
  16 +import java.util.Map;
  17 +import java.util.concurrent.CountDownLatch;
  18 +
  19 +/**
  20 + * Created by Administrator on 2020-04-10.
  21 + */
  22 +@Service("syncQhdBaseInfoService")
  23 +public class SyncQhdBaseInfoService {
  24 +
  25 + @Autowired
  26 + OrganizationService organizationService;
  27 + @Autowired
  28 + @Qualifier("commonThreadPool")
  29 + private ThreadPoolTaskExecutor commonThreadPool;
  30 +
  31 +
  32 +
  33 + public static String getString(Object obj) {
  34 + return obj == null ? null : String.valueOf(obj);
  35 + }
  36 +
  37 + private static final int BATCH_SIZE = 20;
  38 + public void doHandleBirth(String ckNo1,String ckPrefix1)
  39 + {
  40 + int page = 0;
  41 +
  42 + //查询孕妇档案
  43 + do {
  44 + String sql1 = "SELECT ck_no,ck_prefix from cert_birthnocheck ORDER BY ck_opertime desc limit "+(page * 100)+",100";
  45 + System.out.println(sql1);
  46 + List<Map<String, Object>> list = JDBCUtil.getMysqlListDataBySql(sql1);
  47 + if (CollectionUtils.isEmpty(list))
  48 + {
  49 + System.out.println("查询数据完成");
  50 + break;
  51 + }
  52 + int batchSize = BATCH_SIZE;
  53 + int end = 0;
  54 +
  55 + //线程数
  56 + int threadCount = list.size() % BATCH_SIZE == 0 ? list.size() / BATCH_SIZE : list.size() / BATCH_SIZE + 1;
  57 +
  58 + final CountDownLatch countDownLatch = new CountDownLatch(threadCount);
  59 +
  60 + for (int i = 0; i < list.size(); i += batchSize) {
  61 + end = (end + batchSize);
  62 + if (end > list.size()) {
  63 + end = list.size();
  64 + }
  65 + System.out.println("start:" + i + ",end:" + end);
  66 + final List<Map<String, Object>> tempList = list.subList(i, end);
  67 + commonThreadPool.execute(new Runnable() {
  68 + @Override
  69 + public void run() {
  70 + if (CollectionUtils.isNotEmpty(tempList))
  71 + {
  72 + for(Map<String, Object> data : tempList)
  73 + {
  74 + String ckNo = getString(data.get("ck_no"));
  75 + String ckPrefix = getString(data.get("ck_prefix"));
  76 +
  77 + String sql = "SELECT M.CK_NO,M.CK_PREGDAY,M.CK_BABBYBIRTHDAY,M.CK_PREFIX FROM MOMMY_BIRTHNOCHECK M WHERE M.CK_NO='"+ckNo+"' AND M.CK_PREFIX='"+ckPrefix+"'";
  78 +
  79 + List<Map<String, Object>> list1 = JDBCUtil.getOracleListDataBySql(sql);
  80 + if (CollectionUtils.isNotEmpty(list1))
  81 + {
  82 + Map<String, Object> obj = list1.get(0);
  83 + Date birth = HsDataUtil.getDate(obj.get("CK_BABBYBIRTHDAY"));
  84 + String day = HsDataUtil.getString(obj.get("CK_PREGDAY"));
  85 + System.out.println(DateUtil.getyyyy_MM_dd_hms(birth));
  86 + int count = JDBCUtil.mysqlUpdate(" update cert_birthnocheck set ck_pregday=" + day + ",ck_babbybirthday='" + DateUtil.getyyyy_MM_dd_hms(birth) + "' where ck_no='" + ckNo + "' and ck_prefix='" + ckPrefix + "'");
  87 + System.out.println("update count "+count);
  88 +
  89 + }
  90 + }
  91 + }
  92 + countDownLatch.countDown();
  93 + }
  94 + });
  95 + }
  96 + page++;
  97 + try {
  98 + countDownLatch.await();
  99 + Thread.sleep(5000);
  100 + } catch (InterruptedException e) {
  101 + }
  102 + }while (true);
  103 + }
  104 +
  105 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java View file @ 2f947cc
1 1 //package com.lyms.platform.operate.web;
2 2 //
3   -//import org.apache.commons.lang.StringUtils;
4 3 //import org.apache.http.HttpEntity;
5 4 //import org.apache.http.client.ClientProtocolException;
6 5 //import org.apache.http.client.config.RequestConfig;
... ... @@ -30,7 +29,7 @@
30 29 // File[] files = dir.listFiles();
31 30 // for (File file : files)
32 31 // {
33   -// upload("https://cert-chengde-api.healthbaby.com.cn:12356/cp/common/importSignature", file, file.getName());
  32 +// upload("https://cert-qhd-api.healthbaby.com.cn:18020/cp/common/importSignature", file, file.getName());
34 33 // Thread.sleep(TIME);
35 34 // }
36 35 // }
... ... @@ -46,7 +45,7 @@
46 45 // StringBody comment = new StringBody(filename, ContentType.TEXT_PLAIN);
47 46 // HttpEntity reqEntity = MultipartEntityBuilder.create().addPart("file", bin).addPart("filename", comment).build();
48 47 // httppost.setEntity(reqEntity);
49   -// httppost.setHeader("Authorization","b625adb730344cb5967f88e5e9ea8ad3");
  48 +// httppost.setHeader("Authorization","18674e5b23b200f86a6210ea2f1006a8");
50 49 // CloseableHttpResponse response = httpclient.execute(httppost);
51 50 // try {
52 51 // System.out.println(response.getStatusLine());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java View file @ 2f947cc
... ... @@ -4,10 +4,9 @@
4 4 import com.lyms.hospitalapi.Cdfy.CdGwInterface;
5 5 import com.lyms.hospitalapi.Cdfy.CdfyHisService;
6 6 import com.lyms.hospitalapi.dzfy.DzfyFmService;
7   -import com.lyms.hospitalapi.lcdcf.LcdcfFmService;
8   -import com.lyms.hospitalapi.llfy.LlfyFmService;
9 7 import com.lyms.hospitalapi.qhdfy.QhdfyFmService;
10 8 import com.lyms.hospitalapi.qhdfy.QhdfyHisService;
  9 +import com.lyms.hospitalapi.qhdfy.SyncQhdBaseInfoService;
11 10 import com.lyms.hospitalapi.rcfy.RcGlxtService;
12 11 import com.lyms.hospitalapi.zcfy.ZcPrenatalService;
13 12 import com.lyms.platform.biz.JdbcUtil;
14 13  
... ... @@ -27,10 +26,7 @@
27 26 import com.lyms.platform.operate.web.result.MaternalDeliverResult;
28 27 import com.lyms.platform.operate.web.service.IBloodPressureService;
29 28 import com.lyms.platform.operate.web.service.SyncDataTaskService;
30   -import com.lyms.platform.operate.web.utils.CommonsHelper;
31   -import com.lyms.platform.operate.web.utils.QhdvcCardNoUtils;
32 29 import com.lyms.platform.operate.web.worker.*;
33   -import com.lyms.platform.permission.dao.master.CouponMapper;
34 30 import com.lyms.platform.permission.model.*;
35 31 import com.lyms.platform.permission.service.*;
36 32 import com.lyms.platform.pojo.*;
... ... @@ -39,7 +35,6 @@
39 35 import org.apache.commons.collections.CollectionUtils;
40 36 import org.apache.commons.io.FileUtils;
41 37 import org.apache.commons.lang.StringUtils;
42   -import org.apache.commons.lang3.time.DateUtils;
43 38 import org.springframework.beans.factory.annotation.Autowired;
44 39 import org.springframework.beans.factory.annotation.Qualifier;
45 40 import org.springframework.data.authentication.UserCredentials;
46 41  
... ... @@ -57,12 +52,7 @@
57 52 import javax.validation.Valid;
58 53 import java.io.File;
59 54 import java.io.IOException;
60   -import java.io.UnsupportedEncodingException;
61   -import java.net.URLDecoder;
62   -import java.net.URLEncoder;
63 55 import java.util.*;
64   -import java.util.concurrent.Callable;
65   -import java.util.concurrent.Future;
66 56  
67 57 /**
68 58 * Created by Zhang.Rui on 2016/4/8.
... ... @@ -125,6 +115,8 @@
125 115  
126 116 @Autowired
127 117 private QhdfyFmService qhdfyFmService;
  118 + @Autowired
  119 + private SyncQhdBaseInfoService syncQhdBaseInfoService;
128 120  
129 121 @Autowired
130 122 private DzfyFmService dzfyFmService;
... ... @@ -1525,6 +1517,15 @@
1525 1517 public String syncFmData(@RequestParam(required = true) String start, @RequestParam(required = true) String end) {
1526 1518 qhdfyFmService.syncWorker(start, end);
1527 1519 return "syncFmData finish";
  1520 + }
  1521 +
  1522 +
  1523 +
  1524 + @RequestMapping(value = "/setQhdbabyBirth", method = RequestMethod.GET)
  1525 + @ResponseBody
  1526 + public String setQhdbabyBirth(@RequestParam(required = true) String start, @RequestParam(required = true) String end) {
  1527 + syncQhdBaseInfoService.doHandleBirth(start, end);
  1528 + return "setQhdbabyBirth finish";
1528 1529 }
1529 1530  
1530 1531 @RequestMapping(value = "/syncFmBySyxh", method = RequestMethod.GET)
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 2f947cc
... ... @@ -325,11 +325,21 @@
325 325 maternalDeliverModel.setFsHospital(postHosptial);
326 326 }
327 327 }*/
  328 +
  329 + //访视机构
328 330 String townOrgId = patients2.getTownOrgId();
329 331 if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(townOrgId)) {
330 332 maternalDeliverModel.setFsHospital(townOrgId);
331 333 }
332 334  
  335 + //设置产后访视的地址
  336 + maternalDeliverModel.setProvincePostRestId(patients2.getProvincePostRestId() != null ? patients2.getProvincePostRestId() : patients2.getProvinceRegisterId());
  337 + maternalDeliverModel.setCityPostRestId(patients2.getCityPostRestId() != null ? patients2.getCityPostRestId() : patients2.getCityRegisterId());
  338 + maternalDeliverModel.setAreaPostRestId(patients2.getAreaPostRestId() != null ? patients2.getAreaPostRestId() : patients2.getAreaRegisterId());
  339 + maternalDeliverModel.setStreetRegisterId(patients2.getStreetPostRestId() != null ? patients2.getStreetPostRestId() : patients2.getStreetRegisterId());
  340 + maternalDeliverModel.setAddressPostRest(patients2.getAddressPostRest() != null ? patients2.getAddressPostRest() : patients2.getAddressRegister());
  341 +
  342 +
333 343 matDeliverQuery.setDueDate(deliverAddRequest.getDueDate());
334 344 matDeliverQuery.setParentId(null);
335 345 matDeliverQuery.setPid(patients2.getPid());
336 346  
... ... @@ -1939,15 +1949,25 @@
1939 1949 // 访视列表无需加上分娩医院,因此注释
1940 1950 //matDeliverQuery.setFmHospitalList(hospitalList);
1941 1951  
1942   - matDeliverQuery.setFsHospitalId(hospitalId);
1943   - if (StringUtils.isNotEmpty(matdeliverFollowRequest.getIsArea())) {
1944   - if (StringUtils.isNotEmpty(matdeliverFollowRequest.getFsHospitalId())) {
1945   - matDeliverQuery.setIsQueryFsHospitalId(true);
1946   - matDeliverQuery.setFsHospitalId(matdeliverFollowRequest.getFsHospitalId());
  1952 +
  1953 +
  1954 + if (matdeliverFollowRequest.getFlag() != null)
  1955 + {
  1956 + matDeliverQuery.setProvincePostRestId(matdeliverFollowRequest.getProvincePostRestId());
  1957 + matDeliverQuery.setCityPostRestId(matdeliverFollowRequest.getCityPostRestId());
  1958 + matDeliverQuery.setAreaPostRestId(matdeliverFollowRequest.getAreaPostRestId());
  1959 + }
  1960 + else
  1961 + {
  1962 + matDeliverQuery.setFsHospitalId(hospitalId);
  1963 + if (StringUtils.isNotEmpty(matdeliverFollowRequest.getIsArea())) {
  1964 + if (StringUtils.isNotEmpty(matdeliverFollowRequest.getFsHospitalId())) {
  1965 + matDeliverQuery.setIsQueryFsHospitalId(true);
  1966 + matDeliverQuery.setFsHospitalId(matdeliverFollowRequest.getFsHospitalId());
  1967 + }
1947 1968 }
1948 1969 }
1949 1970  
1950   -
1951 1971 matDeliverQuery.setContactResult(matdeliverFollowRequest.getContactResult());
1952 1972 if (matdeliverFollowRequest.getContactReason() != null) {
1953 1973 matDeliverQuery.setContactResult(PostpartumFollowMakeEnums.ResultEnum.SB.getId());
... ... @@ -2052,7 +2072,17 @@
2052 2072 matdeliverFollowListResult.setPostViewDay(DateUtil.daysBetween(patients.getFmDate(), new Date()) + "天");
2053 2073  
2054 2074 // 居住地
2055   - matdeliverFollowListResult.setAddress(CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService));
  2075 + if (matdeliverFollowRequest.getFlag() == null)
  2076 + {
  2077 + matdeliverFollowListResult.setAddress(CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService));
  2078 + }
  2079 + else
  2080 + {
  2081 + //产后休养地
  2082 + matdeliverFollowListResult.setPostpartumAddress(CommonsHelper.getResidence(patients.getProvincePostRestId(), patients.getCityPostRestId(), patients.getAreaPostRestId(), patients.getStreetPostRestId(), patients.getAddressPostRest(), basicConfigService));
  2083 + }
  2084 +
  2085 +
2056 2086 // 电话转换
2057 2087 matdeliverFollowListResult.setPhone(patients.getPhone());
2058 2088 //姓名
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/MatdeliverFollowRequest.java View file @ 2f947cc
... ... @@ -138,6 +138,47 @@
138 138 private String areaZJId;
139 139 private String streetZJId;
140 140  
  141 +
  142 + //产后休养地址
  143 + private String provincePostRestId;
  144 + private String cityPostRestId;
  145 + private String areaPostRestId;
  146 +
  147 + //空表示查询的是原来的追访模式,即根据建档选择的访视机构来访视,1,市, 2 区
  148 + private Integer flag;
  149 +
  150 + public String getProvincePostRestId() {
  151 + return provincePostRestId;
  152 + }
  153 +
  154 + public void setProvincePostRestId(String provincePostRestId) {
  155 + this.provincePostRestId = provincePostRestId;
  156 + }
  157 +
  158 + public String getCityPostRestId() {
  159 + return cityPostRestId;
  160 + }
  161 +
  162 + public void setCityPostRestId(String cityPostRestId) {
  163 + this.cityPostRestId = cityPostRestId;
  164 + }
  165 +
  166 + public Integer getFlag() {
  167 + return flag;
  168 + }
  169 +
  170 + public void setFlag(Integer flag) {
  171 + this.flag = flag;
  172 + }
  173 +
  174 + public String getAreaPostRestId() {
  175 + return areaPostRestId;
  176 + }
  177 +
  178 + public void setAreaPostRestId(String areaPostRestId) {
  179 + this.areaPostRestId = areaPostRestId;
  180 + }
  181 +
141 182 public String getProvinceZJId() {
142 183 return provinceZJId;
143 184 }