|
|
@@ -137,7 +137,34 @@ public class PatientController extends BaseController {
|
|
137
|
137
|
}
|
|
138
|
138
|
|
|
139
|
139
|
|
|
|
140
|
+ @ApiOperation("根据phone查patient,")
|
|
|
141
|
+ @Log(title = "根据phone查patient",businessType = BusinessType.QUERY)
|
|
|
142
|
+ @GetMapping("/getdetailbyphone/{phone}")
|
|
|
143
|
+ public AjaxResult getdetailbyphone(@PathVariable String phone) {
|
|
|
144
|
+ String aesnumber= SecretHelper.AesEncrypt(phone);
|
|
|
145
|
+ LambdaQueryWrapper<Patient> pqw=new LambdaQueryWrapper<>();
|
|
|
146
|
+ pqw.eq(Patient::getPhoneNumber,aesnumber);
|
|
|
147
|
+ List<Patient> ptlist=patientService.getList(pqw);//.findFirst();
|
|
|
148
|
+
|
|
|
149
|
+ Patient pt=new Patient();
|
|
|
150
|
+ if (ptlist!=null && (long) ptlist.size() >0){
|
|
|
151
|
+ pt=ptlist.stream().findFirst().get();
|
|
|
152
|
+ }
|
|
|
153
|
+ else{
|
|
|
154
|
+ return Success("成功", pt);
|
|
|
155
|
+ }
|
|
|
156
|
+ PatientView pv = JSON.parseObject(JSON.toJSONString(pt), PatientView.class);
|
|
140
|
157
|
|
|
|
158
|
+ LambdaQueryWrapper<PatientLabel> qw = new LambdaQueryWrapper();
|
|
|
159
|
+ qw.eq(PatientLabel::getPatientId,pt.getPatientId());
|
|
|
160
|
+ qw.eq(PatientLabel::getIsDelete,0);
|
|
|
161
|
+ qw.orderByDesc(PatientLabel::getCreateTime);
|
|
|
162
|
+ List<PatientLabel> pl=patientlabelService.getList(qw);
|
|
|
163
|
+
|
|
|
164
|
+ pv.setLabellist(pl);
|
|
|
165
|
+
|
|
|
166
|
+ return Success("成功", pv);
|
|
|
167
|
+ }
|
|
141
|
168
|
@ApiOperation("新增")
|
|
142
|
169
|
@Log(title = "新增p_patient",businessType = BusinessType.INSERT)
|
|
143
|
170
|
@PostMapping
|