|
@ -1,5 +1,6 @@
|
|
|
package com.yihu.wlyy.web.patient.consult;
|
|
|
|
|
|
import com.yihu.wlyy.aop.ObserverRequired;
|
|
|
import com.yihu.wlyy.entity.consult.Consult;
|
|
|
import com.yihu.wlyy.entity.consult.ConsultTeam;
|
|
|
import com.yihu.wlyy.entity.consult.ConsultTeamLog;
|
|
@ -13,7 +14,6 @@ import com.yihu.wlyy.repository.consult.ConsultTeamDao;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorDao;
|
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
|
import com.yihu.wlyy.repository.patient.SignFamilyDao;
|
|
|
import com.yihu.wlyy.repository.patient.SignFamilyServerDao;
|
|
|
import com.yihu.wlyy.repository.prescription.PrescriptionDao;
|
|
|
import com.yihu.wlyy.service.app.consult.ConsultTeamService;
|
|
|
import com.yihu.wlyy.service.app.consult.DoctorCommentService;
|
|
@ -162,7 +162,7 @@ public class ConsultController extends WeixinBaseController {
|
|
|
|
|
|
return write(200, "查询成功!", "data", result);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
error(e);
|
|
|
return error(-1, "查询失败!");
|
|
|
}
|
|
|
}
|
|
@ -181,7 +181,7 @@ public class ConsultController extends WeixinBaseController {
|
|
|
|
|
|
return write(200, "查询成功!", "data", result);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
error(e);
|
|
|
return error(-1, "查询失败!");
|
|
|
}
|
|
|
}
|
|
@ -199,7 +199,7 @@ public class ConsultController extends WeixinBaseController {
|
|
|
JSONObject result = doctorWorkTimeService.isDoctorWorking(doctor);
|
|
|
return write(200, result.getString("msg"), "data", result.getString("status"));
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
error(e);
|
|
|
return error(-1, "查询失败");
|
|
|
}
|
|
|
}
|
|
@ -217,7 +217,7 @@ public class ConsultController extends WeixinBaseController {
|
|
|
JSONObject result = doctorWorkTimeService.isFamousDoctorWorking(doctor);
|
|
|
return write(200, result.getString("msg"), "data", result.getString("status"));
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
error(e);
|
|
|
return error(-1, "查询失败");
|
|
|
}
|
|
|
}
|
|
@ -235,7 +235,7 @@ public class ConsultController extends WeixinBaseController {
|
|
|
int result = doctorWorkTimeService.getDoctorConsultTimesRemain(doctor);
|
|
|
return write(200, "查询成功", "data", result);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
error(e);
|
|
|
return error(-1, "查询失败");
|
|
|
}
|
|
|
}
|
|
@ -254,7 +254,7 @@ public class ConsultController extends WeixinBaseController {
|
|
|
JSONArray result = new JSONArray(unfinishedConsult);
|
|
|
return write(200, "查询成功!", "data", result);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
error(e);
|
|
|
return error(-1, "查询失败!");
|
|
|
}
|
|
|
}
|
|
@ -278,7 +278,7 @@ public class ConsultController extends WeixinBaseController {
|
|
|
return write(200, "查询成功", "data", "");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
error(e);
|
|
|
return error(-1, "查询失败");
|
|
|
}
|
|
|
}
|
|
@ -920,6 +920,7 @@ public class ConsultController extends WeixinBaseController {
|
|
|
try{
|
|
|
return success(ImUtill.getTopic(consult).get("data").toString());
|
|
|
}catch (Exception e){
|
|
|
error(e);
|
|
|
return error(-1,e.getMessage());
|
|
|
}
|
|
|
}
|
|
@ -930,6 +931,7 @@ public class ConsultController extends WeixinBaseController {
|
|
|
ConsultTeam consultTeam = consultTeamService.findByConsultCode(consult);
|
|
|
return write(200, "查询成功", "data", consultTeam);
|
|
|
}catch (Exception e){
|
|
|
error(e);
|
|
|
return error(-1,e.getMessage());
|
|
|
}
|
|
|
}
|
|
@ -940,7 +942,7 @@ public class ConsultController extends WeixinBaseController {
|
|
|
@RequestMapping(value = "isPrescriptionConsult",method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
@ApiOperation("是否可以续方咨询")
|
|
|
public String isPrescriptConsult(String patient){
|
|
|
public String isPrescriptConsult(@ApiParam(name = "patient", value = "居民code") @RequestParam(value = "patient", required = true)String patient){
|
|
|
try{
|
|
|
SignFamily signFamily = signFamilyDao.findByPatient(patient);
|
|
|
if(signFamily==null){
|
|
@ -968,6 +970,7 @@ public class ConsultController extends WeixinBaseController {
|
|
|
|
|
|
@RequestMapping(value = "addPrescriptionConsult",method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
@ObserverRequired
|
|
|
@ApiOperation("添加续方咨询")
|
|
|
public String addPrescriptionConsult(@ApiParam(name = "jwCode", value = "基位处方code", defaultValue = "10")
|
|
|
@RequestParam(value = "jwCode", required = true) String jwCode,
|
|
@ -982,8 +985,8 @@ public class ConsultController extends WeixinBaseController {
|
|
|
consult.setType(8);//续方咨询
|
|
|
consult.setAdminTeamId(adminTeamId);
|
|
|
// 保存到数据库
|
|
|
int res = consultTeamService.addPrescriptionConsult(jwCode, "a663d0cf7f8c4d38a8327cedc921e65f","a663d0cf7f8c4d38a8327cedc921e65f",doctor,consult,reason);
|
|
|
// int res = consultTeamService.addPrescriptionConsult(jwCode, getRepUID(),getUID(),doctor,consult,reason);
|
|
|
// int res = consultTeamService.addPrescriptionConsult(jwCode, "a663d0cf7f8c4d38a8327cedc921e65f","a663d0cf7f8c4d38a8327cedc921e65f",doctor,consult,reason);
|
|
|
int res = consultTeamService.addPrescriptionConsult(jwCode, getRepUID(),getUID(),doctor,consult,reason);
|
|
|
if (res == -1) {
|
|
|
return error(-1, "该处方存在未审核的续方,无法进行续方咨询!");
|
|
|
}
|
|
@ -1008,12 +1011,13 @@ public class ConsultController extends WeixinBaseController {
|
|
|
@RequestMapping(value = "getPreConsultList",method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
@ApiOperation("获取续方咨询列表")
|
|
|
public String getPreConsultList(@RequestParam(required = false) String title,
|
|
|
@RequestParam(required = true) long id,@RequestParam(required = true) int pagesize){
|
|
|
public String getPreConsultList(@ApiParam(name = "title", value = "咨询标题") @RequestParam(required = false) String title,
|
|
|
@ApiParam(name = "id", value = "第几页") @RequestParam(required = true) long id,
|
|
|
@ApiParam(name = "pagesize", value = "页面大小") @RequestParam(required = true) int pagesize){
|
|
|
try {
|
|
|
JSONArray array = new JSONArray();
|
|
|
Page<Object> data = consultTeamService.findConsultRecordByType("a663d0cf7f8c4d38a8327cedc921e65f", id, pagesize,8, title);//8表示续方咨询
|
|
|
// Page<Object> data = consultTeamService.findConsultRecordByType(getRepUID(), id, pagesize,8, title);//8表示续方咨询
|
|
|
// Page<Object> data = consultTeamService.findConsultRecordByType("a663d0cf7f8c4d38a8327cedc921e65f", id, pagesize,8, title);//8表示续方咨询
|
|
|
Page<Object> data = consultTeamService.findConsultRecordByType(getRepUID(), id, pagesize,8, title);//8表示续方咨询
|
|
|
if (data != null) {
|
|
|
for (Object consult : data.getContent()) {
|
|
|
if (consult == null) {
|
|
@ -1055,7 +1059,7 @@ public class ConsultController extends WeixinBaseController {
|
|
|
@RequestMapping(value = "prescriptionDetail",method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
@ApiOperation("获取续方信息")
|
|
|
public String prescriptionDetail(@RequestParam(required = true) String consult){
|
|
|
public String prescriptionDetail(@ApiParam(name = "consult", value = "咨询code") @RequestParam(required = true) String consult){
|
|
|
try {
|
|
|
JSONObject json = new JSONObject();
|
|
|
|