Commit f79aca5a1910aac35eee6b2e3c1af429815cc549

Authored by yangfei
1 parent 31b53d0741

回院提醒统计数量

Showing 7 changed files with 58 additions and 31 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientMarkHospitalController.java View file @ f79aca5
... ... @@ -56,7 +56,7 @@
56 56 }
57 57  
58 58 /**
59   - * 回院提统计
  59 + * 回院提统计
60 60 * @param request
61 61 * @return
62 62 */
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientServiceController.java View file @ f79aca5
... ... @@ -8,14 +8,11 @@
8 8 import com.lyms.platform.common.result.BaseResponse;
9 9 import com.lyms.platform.common.utils.StringUtils;
10 10 import com.lyms.platform.operate.web.facade.PatientServiceFacade;
11   -import com.lyms.platform.operate.web.facade.SysBaseFacade;
12 11 import com.lyms.platform.operate.web.request.BasePageQueryRequest;
13 12 import com.lyms.platform.permission.model.PatientService;
14 13 import org.springframework.beans.factory.annotation.Autowired;
15 14 import org.springframework.stereotype.Controller;
16 15 import org.springframework.web.bind.annotation.*;
17   -import org.springframework.web.context.ContextLoader;
18   -import org.springframework.web.context.WebApplicationContext;
19 16  
20 17 import javax.servlet.http.HttpServletRequest;
21 18 import java.util.Date;
... ... @@ -30,20 +27,6 @@
30 27  
31 28 @Autowired
32 29 private PatientServiceFacade patientServiceFacade;
33   -
34   - /**
35   - * 小程序同步数据接口
36   - *
37   - * @return
38   - */
39   - @ResponseBody
40   - @RequestMapping(value = "/patSer/sysnPatientSer", method = RequestMethod.POST)
41   - public BaseResponse sysnPatientSer(){
42   - String action = "patientServiceSysFacade";
43   - WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();
44   - SysBaseFacade sysBaseFacade = (SysBaseFacade)webApplicationContext.getBean(action);
45   - return sysBaseFacade.sysData();
46   - }
47 30  
48 31 /**
49 32 * 初始化接口
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SyncDataController.java View file @ f79aca5
... ... @@ -2,9 +2,14 @@
2 2  
3 3 import com.lyms.platform.biz.service.SyncDataService;
4 4 import com.lyms.platform.common.base.BaseController;
  5 +import com.lyms.platform.common.constants.ErrorCodeConstants;
5 6 import com.lyms.platform.common.pojo.SyncDataModel;
6   -import com.lyms.platform.common.utils.*;
7   -import com.lyms.platform.operate.web.request.BabyCheckRequest;
  7 +import com.lyms.platform.common.result.BaseResponse;
  8 +import com.lyms.platform.common.utils.Config;
  9 +import com.lyms.platform.common.utils.ExceptionUtils;
  10 +import com.lyms.platform.common.utils.JsonUtil;
  11 +import com.lyms.platform.common.utils.LymsEncodeUtil;
  12 +import com.lyms.platform.operate.web.facade.SysBaseFacade;
8 13 import com.lyms.platform.operate.web.request.SqlRequest;
9 14 import com.lyms.platform.permission.service.OrganizationService;
10 15 import com.lyms.platform.query.SyncDataQuery;
... ... @@ -12,10 +17,9 @@
12 17 import org.apache.commons.lang.StringUtils;
13 18 import org.springframework.beans.factory.annotation.Autowired;
14 19 import org.springframework.stereotype.Controller;
15   -import org.springframework.web.bind.annotation.RequestBody;
16   -import org.springframework.web.bind.annotation.RequestHeader;
17   -import org.springframework.web.bind.annotation.RequestMapping;
18   -import org.springframework.web.bind.annotation.RequestMethod;
  20 +import org.springframework.web.bind.annotation.*;
  21 +import org.springframework.web.context.ContextLoader;
  22 +import org.springframework.web.context.WebApplicationContext;
19 23  
20 24 import javax.servlet.http.HttpServletRequest;
21 25 import javax.servlet.http.HttpServletResponse;
... ... @@ -36,6 +40,30 @@
36 40 private OrganizationService organizationService;
37 41  
38 42 public static String mongo_crypto_key = Config.getItem("mongo_crypto_key", "0");
  43 +
  44 + /**
  45 + * 小程序同步数据接口
  46 + *
  47 + * @return
  48 + */
  49 + @ResponseBody
  50 + @RequestMapping(value = "/sysnDataSer", method = RequestMethod.POST)
  51 + public BaseResponse sysnDataSer(
  52 + @RequestParam(value = "action", required = true) String action,
  53 + @RequestParam(value = "synForm", required = true) String synForm
  54 + ){
  55 + try{
  56 + WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();
  57 + SysBaseFacade sysBaseFacade = (SysBaseFacade)webApplicationContext.getBean(action);
  58 + return sysBaseFacade.sysData(synForm);
  59 + }catch (Exception e){
  60 + BaseResponse baseResponse = new BaseResponse();
  61 + baseResponse.setObject(e.getMessage());
  62 + baseResponse.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR);
  63 + baseResponse.setErrormsg(ErrorCodeConstants.SYSTEM_ERROR_DESCRIPTION);
  64 + return baseResponse;
  65 + }
  66 + }
39 67  
40 68 @RequestMapping(value = "/findSyncData", method = RequestMethod.POST)
41 69 public void findSyncData(HttpServletResponse response) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ f79aca5
... ... @@ -1326,6 +1326,12 @@
1326 1326 {
1327 1327 if(org.apache.commons.lang.math.NumberUtils.isNumber(model.getDeliverOrg())){
1328 1328 Organization org = organizationService.getOrganization(Integer.parseInt(model.getDeliverOrg()));
  1329 + try{
  1330 +
  1331 + }catch (Exception e){
  1332 +
  1333 + }
  1334 +
1329 1335 if (org != null)
1330 1336 {
1331 1337 result.setDeliverOrg(org.getName());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientMarkHospServiceFacade.java View file @ f79aca5
... ... @@ -120,6 +120,13 @@
120 120 //根据用户id获取医院ID
121 121 String hospitalId = autoMatchFacade.getHospitalId(id);
122 122 PatientMarkHospitalQuery patientMarkHospQuery = new PatientMarkHospitalQuery();
  123 +
  124 + //住院预约总数
  125 + int count = patientMarkHospitalService.queryPatientMarkHospitalCount(patientMarkHospQuery);
  126 + patientMarkHospQuery.setBackStatus(1);
  127 + //回院待提醒数
  128 + int waitCount = patientMarkHospitalService.queryPatientMarkHospitalCount(patientMarkHospQuery);
  129 +
123 130 patientMarkHospQuery.setHospitalId(hospitalId);
124 131 patientMarkHospQuery.setBackStartDate(patientMarkRequest.getMakeStartDate());
125 132 patientMarkHospQuery.setBackEndDate(patientMarkRequest.getMakeEndDate());
... ... @@ -137,11 +144,7 @@
137 144  
138 145 //统计数据
139 146 List<ReportMakeHosptail> reportMakeHosptails = patientMarkHospitalService.reportPatMarkHospByBackDoctor(patientMarkHospQuery);
140   - //住院预约总数
141   - int count = patientMarkHospitalService.queryPatientMarkHospitalCount(patientMarkHospQuery);
142   - patientMarkHospQuery.setBackStatus(1);
143   - //回院待提醒数
144   - int waitCount = patientMarkHospitalService.queryPatientMarkHospitalCount(patientMarkHospQuery);
  147 +
145 148 //列数据
146 149 List<String> legendData = new ArrayList<>();
147 150 List<Map<String, Object>> serData = new ArrayList<>();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceSysFacade.java View file @ f79aca5
1 1 package com.lyms.platform.operate.web.facade;
2 2  
3 3 import com.lyms.platform.common.result.BaseResponse;
  4 +import com.lyms.platform.permission.model.PatientService;
  5 +import net.sf.json.JSONObject;
4 6 import org.springframework.stereotype.Component;
5 7  
6 8 /**
7 9  
... ... @@ -11,10 +13,15 @@
11 13 @Component
12 14 public class PatientServiceSysFacade implements SysBaseFacade{
13 15 @Override
14   - public BaseResponse sysData() {
  16 + public BaseResponse sysData(String synForm) {
  17 + JSONObject jsonObject = JSONObject.fromObject(synForm);
  18 + PatientService patientService = (PatientService)JSONObject.toBean(jsonObject, PatientService.class);
  19 +
  20 +
15 21 System.out.println("同步数据方法");
16 22 BaseResponse baseResponse = new BaseResponse();
17 23 baseResponse.setErrorcode(0);
  24 + baseResponse.setObject(synForm);
18 25 baseResponse.setErrormsg("成功");
19 26 return baseResponse;
20 27 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SysBaseFacade.java View file @ f79aca5
... ... @@ -8,6 +8,6 @@
8 8 * @discription
9 9 */
10 10 public interface SysBaseFacade {
11   - public BaseResponse sysData();
  11 + public BaseResponse sysData(String synForm);
12 12 }