Commit b47593438ea654b934fedaf8466590ab9ee535ad

Authored by liquanyu
1 parent ef55802cfc

update

Showing 7 changed files with 63 additions and 15 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java View file @ b475934
... ... @@ -246,6 +246,7 @@
246 246 @RequestParam("page") Integer page,
247 247 @RequestParam("limit") Integer limit,
248 248 @RequestParam(value = "showDetail", defaultValue = "0") Integer showDetail,
  249 + @RequestParam(value = "isShowPhone", defaultValue = "0") Integer isShowPhone,
249 250 @RequestParam(value = "buildDoctor", required = false) String buildDoctor,
250 251 @RequestParam(value = "provinceId", required = false) String provinceId,
251 252 @RequestParam(value = "cityId", required = false) String cityId,
... ... @@ -283,6 +284,7 @@
283 284 request.setWeakSonInfos(weakSonInfos);
284 285 request.setHighRiskInfos(highRiskInfos);
285 286 request.setShowDetail(showDetail);
  287 + request.setIsShowPhone(isShowPhone);
286 288 request.setBuildDoctor(buildDoctor);
287 289 request.setQueryNo(queryNo);
288 290 request.setBcardNo(bcardNo);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ b475934
... ... @@ -2783,6 +2783,13 @@
2783 2783 result.setCompleteAddress(StringUtils.encryAddr(result.getCompleteAddress()));
2784 2784 }
2785 2785 }
  2786 +
  2787 + if (request.getIsShowPhone() == 1) {//隐藏姓名、地址
  2788 + for (BabyManageListResult result : list) {
  2789 + result.setMommnyPhone(StringUtils.encryPhone(result.getMommnyPhone()));
  2790 + }
  2791 + }
  2792 +
2786 2793 BaseListResponse objectResponse = new BaseListResponse();
2787 2794 objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
2788 2795 objectResponse.setData(list);
... ... @@ -3709,7 +3716,7 @@
3709 3716 BabyModelQuery babyQuery = new BabyModelQuery();
3710 3717 babyQuery.setHospitalId(String.valueOf(hospitalId));
3711 3718 List <BabyModel> ms = getBabayListByCondition(request, false, babyQuery);
3712   -
  3719 + final int isShowPhone = request.getIsShowPhone();
3713 3720 if (CollectionUtils.isNotEmpty(ms)) {
3714 3721  
3715 3722 int batchSize = 100;
... ... @@ -3766,7 +3773,15 @@
3766 3773 data.put("babyName", StringUtils.emptyDeal(model.getName()));
3767 3774 data.put("birthday", StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getBirth())));
3768 3775 data.put("mommyName", StringUtils.emptyDeal(model.getMname()));
3769   - data.put("mommnyPhone", StringUtils.emptyDeal(model.getMphone()));
  3776 + if (isShowPhone == 1)
  3777 + {
  3778 + data.put("mommnyPhone", StringUtils.encryPhone(model.getMphone()));
  3779 + }
  3780 + else
  3781 + {
  3782 + data.put("mommnyPhone", StringUtils.emptyDeal(model.getMphone()));
  3783 + }
  3784 +
3770 3785 data.put("serviceType", StringUtils.emptyDeal(model.getServiceType() == null ? "" : ServiceTypeEnums.getTitleById(model.getServiceType())));
3771 3786 data.put("serviceStatus", StringUtils.emptyDeal(model.getServiceStatus() == null ? "" : ServiceStatusEnums.getNameById(model.getServiceStatus())));
3772 3787 data.put("nextDate", StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getNextDate())));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java View file @ b475934
... ... @@ -83,9 +83,14 @@
83 83 //查询号
84 84 private String queryNo;
85 85  
86   - //1-需要隐藏姓名、电话、地址
  86 + //1-需要隐藏姓名、地址
87 87 private int showDetail;
88 88  
  89 +
  90 + //0 不需要隐藏 1 隐藏
  91 + private int isShowPhone;
  92 +
  93 +
89 94 private String vcCardNo;
90 95  
91 96 //居住类别
... ... @@ -106,6 +111,14 @@
106 111 private Integer dueWeekEnd;
107 112 private String lastCheckDoctor;
108 113 private String riskCode;
  114 +
  115 + public int getIsShowPhone() {
  116 + return isShowPhone;
  117 + }
  118 +
  119 + public void setIsShowPhone(int isShowPhone) {
  120 + this.isShowPhone = isShowPhone;
  121 + }
109 122  
110 123 public String getRiskCode() {
111 124 return riskCode;
platform-transfer/src/main/java/com/lyms/platform/comm/GlobalExceptionHandler.java View file @ b475934
  1 +package com.lyms.platform.comm;
  2 +
  3 +import org.slf4j.Logger;
  4 +import org.slf4j.LoggerFactory;
  5 +import org.springframework.web.bind.annotation.ControllerAdvice;
  6 +import org.springframework.web.bind.annotation.ExceptionHandler;
  7 +import org.springframework.web.bind.annotation.ResponseBody;
  8 +
  9 +import javax.servlet.http.HttpServletRequest;
  10 +
  11 +/**
  12 + * Created by Administrator on 2021-08-18.
  13 + */
  14 +@ControllerAdvice
  15 +public class GlobalExceptionHandler {
  16 + private static final Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
  17 + @ExceptionHandler(value =Exception.class)
  18 + @ResponseBody
  19 + public void exceptionHandler(HttpServletRequest req, Exception e){
  20 + logger.error("未知异常!原因是:",e);
  21 + }
  22 +}
platform-transfer/src/main/java/com/lyms/platform/conn/inf/BaseConnection.java View file @ b475934
1 1 package com.lyms.platform.conn.inf;
2 2  
  3 +import org.slf4j.Logger;
  4 +import org.slf4j.LoggerFactory;
  5 +
3 6 import java.sql.*;
4 7  
5 8 /**
6 9 * Created by Administrator on 2020-03-06.
7 10 */
8 11 public abstract class BaseConnection implements IConnection{
  12 + private static final Logger logger = LoggerFactory.getLogger(BaseConnection.class);
9 13  
10   -
11 14 @Override
12 15 public abstract Connection getConnection();
13 16  
... ... @@ -29,7 +32,7 @@
29 32 conn.close();
30 33 }
31 34 } catch (SQLException e) {
32   - e.printStackTrace();
  35 + logger.error("BaseConnection error."+e.toString());
33 36 }
34 37 }
35 38  
platform-transfer/src/main/java/com/lyms/platform/worker/BoneTransferWorker.java View file @ b475934
... ... @@ -30,14 +30,13 @@
30 30 @Override
31 31 public void doTransfer() {
32 32 logger.info("getBoneRecords start");
33   - System.out.println("getBoneRecords start");
34 33 Connection conn = null;
35 34 Statement sta = null;
36 35 ResultSet rst = null;
37 36 ConnectionFactoryMethod factoryMethod = new BoneConnectionFactory();
38   - IConnection iConnection = factoryMethod.createConnection(properties.getDataPath());
  37 + IConnection iConnection = null;
39 38 try {
40   -
  39 + iConnection = factoryMethod.createConnection(properties.getDataPath());
41 40 conn = iConnection.getConnection();
42 41 sta = conn.createStatement();
43 42 String sql = "select PatientID,ZScore,TScore,dbSos,dbBqi,dbRrf,dbEoa,YoungAdult,ageMatched,dbAge,PartDisplayName,PatientName from PatientInfo where status is null and DayTimeOfSave > "+ DateUtil.formatDate(new Date(),"yyyy-MM-dd");
... ... @@ -97,12 +96,7 @@
97 96 }
98 97 }
99 98 } catch (Exception e) {
100   - logger.error("getBoneRecords Exception.",e.toString());
101   - try {
102   - conn.rollback();
103   - } catch (SQLException e1) {
104   - logger.error("getBoneRecords error.",e1.toString());
105   - }
  99 + logger.error("getBoneRecords Exception. "+e.toString());
106 100 }
107 101 finally {
108 102 iConnection.close(conn, sta,rst);
platform-transfer/src/main/java/com/lyms/platform/worker/TransferAbstract.java View file @ b475934
... ... @@ -21,7 +21,6 @@
21 21 String json = JsonUtil.obj2Str(data);
22 22 logger.info("http json= " + json);
23 23 String result = HttpClientUtil.doPostSSL(path, json);
24   - System.out.println("http result= "+result);
25 24 logger.info("http result= "+result);
26 25 return result;
27 26 }