Commit 783de6779d1818619cbe3a7e371b7504a6c71cb0
1 parent
70c2379add
Exists in
master
and in
6 other branches
威海体重
Showing 4 changed files with 32 additions and 14 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/PatientWeight.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
platform-dal/src/main/java/com/lyms/platform/pojo/PatientWeight.java
View file @
783de67
| ... | ... | @@ -123,8 +123,6 @@ |
| 123 | 123 | |
| 124 | 124 | private boolean isShow; |
| 125 | 125 | |
| 126 | - //异常次数 | |
| 127 | - private Integer exceptionCount; | |
| 128 | 126 | |
| 129 | 127 | //0 未推送 1已经推送 |
| 130 | 128 | private Integer exceptionSend; |
| ... | ... | @@ -148,13 +146,6 @@ |
| 148 | 146 | this.sevenSend = sevenSend; |
| 149 | 147 | } |
| 150 | 148 | |
| 151 | - public Integer getExceptionCount() { | |
| 152 | - return exceptionCount; | |
| 153 | - } | |
| 154 | - | |
| 155 | - public void setExceptionCount(Integer exceptionCount) { | |
| 156 | - this.exceptionCount = exceptionCount; | |
| 157 | - } | |
| 158 | 149 | |
| 159 | 150 | public boolean isShow() { |
| 160 | 151 | return isShow; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java
View file @
783de67
| ... | ... | @@ -243,8 +243,8 @@ |
| 243 | 243 | */ |
| 244 | 244 | @ResponseBody |
| 245 | 245 | @RequestMapping(value = "/getWeights/{doctorId}/{type}/{status}", method = RequestMethod.GET) |
| 246 | - public BaseResponse getWeights(@PathVariable String doctorId,@PathVariable Integer type,@PathVariable Integer status) { | |
| 247 | - return patientWeightService.getWeights(doctorId,type,status); | |
| 246 | + public BaseResponse getWeights(@PathVariable String doctorId,@PathVariable Integer type,@PathVariable Integer status,@RequestParam(required = false) String keyword) { | |
| 247 | + return patientWeightService.getWeights(doctorId,type,status,keyword); | |
| 248 | 248 | } |
| 249 | 249 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java
View file @
783de67
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
783de67
| ... | ... | @@ -25,6 +25,7 @@ |
| 25 | 25 | import com.lyms.platform.permission.service.PatientServiceService; |
| 26 | 26 | import com.lyms.platform.permission.service.UsersService; |
| 27 | 27 | import com.lyms.platform.pojo.*; |
| 28 | +import com.lyms.platform.query.PatientsQuery; | |
| 28 | 29 | import com.lyms.platform.query.SmsConfigQuery; |
| 29 | 30 | import net.sf.json.JSONArray; |
| 30 | 31 | import net.sf.json.JSONObject; |
| 31 | 32 | |
| 32 | 33 | |
| ... | ... | @@ -1857,14 +1858,40 @@ |
| 1857 | 1858 | } |
| 1858 | 1859 | |
| 1859 | 1860 | @Override |
| 1860 | - public BaseResponse getWeights(String doctorId,Integer type,Integer status) { | |
| 1861 | + public BaseResponse getWeights(String doctorId,Integer type,Integer status,String keyword) { | |
| 1862 | + List<Map> datas = new ArrayList<>(); | |
| 1863 | + List<String> pids = new ArrayList<>(); | |
| 1864 | + if (StringUtils.isNotEmpty(keyword)) | |
| 1865 | + { | |
| 1866 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 1867 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 1868 | + patientsQuery.setQueryNo(keyword); | |
| 1869 | + patientsQuery.setType(1); | |
| 1870 | + List<Patients> pats = patientsService.queryPatient(patientsQuery); | |
| 1871 | + if (CollectionUtils.isNotEmpty(pats)) | |
| 1872 | + { | |
| 1873 | + for (Patients pat : pats) | |
| 1874 | + { | |
| 1875 | + pids.add(pat.getId()); | |
| 1876 | + } | |
| 1877 | + } | |
| 1878 | + else | |
| 1879 | + { | |
| 1880 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(datas); | |
| 1881 | + } | |
| 1882 | + } | |
| 1883 | + | |
| 1861 | 1884 | PatientServiceQuery patientQuery = new PatientServiceQuery(); |
| 1862 | 1885 | patientQuery.setSerDoct(doctorId); |
| 1863 | 1886 | patientQuery.setSerType(PatientSerEnums.SerTypeEnums.tz.getId()); |
| 1864 | 1887 | patientQuery.setSerStatus(1); |
| 1888 | + if (CollectionUtils.isNotEmpty(pids)) | |
| 1889 | + { | |
| 1890 | + patientQuery.setParentIds((String[]) pids.toArray(new String[pids.size()])); | |
| 1891 | + } | |
| 1865 | 1892 | List<PatientService> list = patientServiceService.queryPatientService(patientQuery); |
| 1866 | 1893 | List<String> patientIds = new ArrayList<>(); |
| 1867 | - List<Map> datas = new ArrayList<>(); | |
| 1894 | + | |
| 1868 | 1895 | if (CollectionUtils.isNotEmpty(list)) |
| 1869 | 1896 | { |
| 1870 | 1897 | for (PatientService ps : list) |