|
@@ -69,6 +69,9 @@ public class DoctorController extends AppBaseController {
|
|
|
private OpenIMService openIMService;
|
|
private OpenIMService openIMService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private SmsService smsService;
|
|
private SmsService smsService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IFsPrescribeService fsPrescribeService;
|
|
|
@ApiOperation("登录")
|
|
@ApiOperation("登录")
|
|
|
@PostMapping("/login")
|
|
@PostMapping("/login")
|
|
|
public R login(@Validated @RequestBody DoctorLoginParam param) {
|
|
public R login(@Validated @RequestBody DoctorLoginParam param) {
|
|
@@ -249,11 +252,20 @@ public class DoctorController extends AppBaseController {
|
|
|
FsDoctor doctor=doctorService.selectFsDoctorByDoctorId(Long.parseLong(getDoctorId()));
|
|
FsDoctor doctor=doctorService.selectFsDoctorByDoctorId(Long.parseLong(getDoctorId()));
|
|
|
FsHospital hospital=hospitalService.selectFsHospitalByHospitalId(doctor.getHospitalId());
|
|
FsHospital hospital=hospitalService.selectFsHospitalByHospitalId(doctor.getHospitalId());
|
|
|
FsDepartment department=departmentService.selectFsDepartmentByDeptId(doctor.getDeptId());
|
|
FsDepartment department=departmentService.selectFsDepartmentByDeptId(doctor.getDeptId());
|
|
|
|
|
+ //获取医生平均操作时间
|
|
|
|
|
+ Long avgOperateTime = fsPrescribeService.selectDoctorAvgOperateTime(Long.parseLong(getDoctorId()));
|
|
|
|
|
+ String time = null;
|
|
|
|
|
+ if (avgOperateTime != null) {
|
|
|
|
|
|
|
|
|
|
+ long minutes = TimeUnit.SECONDS.toMinutes(avgOperateTime);
|
|
|
|
|
+ long seconds = avgOperateTime - TimeUnit.MINUTES.toSeconds(minutes);
|
|
|
|
|
+ time = minutes + "分" + seconds + "秒";
|
|
|
|
|
+ }
|
|
|
Map<String,Object> map=new HashMap<>();
|
|
Map<String,Object> map=new HashMap<>();
|
|
|
map.put("doctor",doctor);
|
|
map.put("doctor",doctor);
|
|
|
map.put("hospital",hospital);
|
|
map.put("hospital",hospital);
|
|
|
map.put("department",department);
|
|
map.put("department",department);
|
|
|
|
|
+ map.put("time",time);
|
|
|
return R.ok(map);
|
|
return R.ok(map);
|
|
|
} catch (Exception e){
|
|
} catch (Exception e){
|
|
|
return R.error("操作异常");
|
|
return R.error("操作异常");
|