|
@ -1,5 +1,6 @@
|
|
|
package com.yihu.wlyy.web.doctor.account;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@ -15,6 +16,7 @@ import com.yihu.wlyy.repository.demographic.TblBasicDao;
|
|
|
import com.yihu.wlyy.service.app.account.PatientInfoService;
|
|
|
import com.yihu.wlyy.service.app.consult.ConsultTeamService;
|
|
|
import com.yihu.wlyy.service.app.hospital.HospitalDeptService;
|
|
|
import com.yihu.wlyy.service.app.scheduling.DoctorWorkTimeService;
|
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
|
import com.yihu.wlyy.util.*;
|
|
|
import io.swagger.annotations.Api;
|
|
@ -77,6 +79,8 @@ public class DoctorController extends BaseController {
|
|
|
private TblBasicDao tblBasicDao;
|
|
|
@Autowired
|
|
|
private HospitalDeptService hospitalDeptService;
|
|
|
@Autowired
|
|
|
private DoctorWorkTimeService workTimeService;
|
|
|
|
|
|
/**
|
|
|
* 社区医院下医生列表查询接口 没分页
|
|
@ -1170,8 +1174,20 @@ public class DoctorController extends BaseController {
|
|
|
try {
|
|
|
Map<String, Object> doctorList = doctorInfoService.getDoctor1ByParient(consultCode, parientCode, page, pageSize);
|
|
|
JSONObject jo = new JSONObject();
|
|
|
List<JSONObject> doctors = doctorList.get("doctors") != null ? (List<JSONObject>) doctorList.get("doctors") : new ArrayList<>();
|
|
|
|
|
|
for (JSONObject obj : doctors) {
|
|
|
JSONObject iswork = workTimeService.isDoctorWorking(obj.getString("code"));
|
|
|
|
|
|
if (iswork.getString("status").equals("1")) {
|
|
|
obj.put("isworking", 1);
|
|
|
} else {
|
|
|
obj.put("isworking", 0);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
jo.put("totalPage", doctorList.get("totalPage"));
|
|
|
jo.put("doctors", doctorList.get("doctors"));
|
|
|
jo.put("doctors", doctors);
|
|
|
return write(200, "查询成功!", "data", jo);
|
|
|
} catch (Exception ex) {
|
|
|
error(ex);
|
|
@ -1505,7 +1521,7 @@ public class DoctorController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping("/is_mobile_register")
|
|
|
@ResponseBody
|
|
|
public String isMobileRegister(String mobile){
|
|
|
public String isMobileRegister(String mobile) {
|
|
|
try {
|
|
|
if (StringUtils.isEmpty(mobile)) {
|
|
|
return error(-1, "手机号码不能为空");
|
|
@ -1514,7 +1530,7 @@ public class DoctorController extends BaseController {
|
|
|
int result = doctorInfoService.isMobileRegister(mobile);
|
|
|
|
|
|
|
|
|
return write(200, "查询成功","data",result);
|
|
|
return write(200, "查询成功", "data", result);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return error(-1, "查询失败");
|
|
@ -1537,12 +1553,12 @@ public class DoctorController extends BaseController {
|
|
|
String oldPassword,
|
|
|
String doctorCode) {
|
|
|
try {
|
|
|
newPassword1=RSAUtils.getInstance(doctorInfoService).decryptString(newPassword1);
|
|
|
newPassword2=RSAUtils.getInstance(doctorInfoService).decryptString(newPassword2);
|
|
|
oldPassword=RSAUtils.getInstance(doctorInfoService).decryptString(oldPassword);
|
|
|
newPassword1=StringUtils.reverse(newPassword1);
|
|
|
newPassword2=StringUtils.reverse(newPassword2);
|
|
|
oldPassword=StringUtils.reverse(oldPassword);
|
|
|
newPassword1 = RSAUtils.getInstance(doctorInfoService).decryptString(newPassword1);
|
|
|
newPassword2 = RSAUtils.getInstance(doctorInfoService).decryptString(newPassword2);
|
|
|
oldPassword = RSAUtils.getInstance(doctorInfoService).decryptString(oldPassword);
|
|
|
newPassword1 = StringUtils.reverse(newPassword1);
|
|
|
newPassword2 = StringUtils.reverse(newPassword2);
|
|
|
oldPassword = StringUtils.reverse(oldPassword);
|
|
|
|
|
|
doctorInfoService.updatePassword(newPassword1, newPassword2, oldPassword, doctorCode);
|
|
|
return write(200, "更新成功");
|
|
@ -1577,6 +1593,7 @@ public class DoctorController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 心跳接口
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/islive")
|