|
@ -2,19 +2,19 @@ package com.yihu.jw.care.endpoint.doorCoach;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.jw.care.endpoint.BaseController;
|
|
|
|
|
|
import com.yihu.jw.care.service.consult.ConsultTeamService;
|
|
|
import com.yihu.jw.care.service.doorCoach.DoctorDoorCoachOrderService;
|
|
|
import com.yihu.jw.care.service.doorCoach.PatientDoorCoachOrderService;
|
|
|
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
|
|
|
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachConclusionDO;
|
|
|
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachOrderDO;
|
|
|
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
|
|
|
import com.yihu.jw.im.service.ImService;
|
|
|
import com.yihu.jw.restmodel.ResponseContant;
|
|
|
import com.yihu.jw.restmodel.web.Envelop;
|
|
|
import com.yihu.jw.restmodel.web.ObjEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
|
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
@ -26,10 +26,7 @@ import org.springframework.http.MediaType;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
/**
|
|
@ -39,7 +36,7 @@ import java.util.Map;
|
|
|
@RestController
|
|
|
@RequestMapping(value = "/doctor/doorCoach/serviceOrder", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
@Api(description = "医生端-上门辅导")
|
|
|
public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
public class DoctorDoorCoachOrderController extends EnvelopRestEndpoint {
|
|
|
|
|
|
@Autowired
|
|
|
private PatientDoorCoachOrderService patientDoorCoachOrderService;
|
|
@ -49,6 +46,7 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
private ImService imService;
|
|
|
@Autowired
|
|
|
private ConsultTeamService consultTeamService;
|
|
|
private BaseController baseController = new BaseController();
|
|
|
|
|
|
@PostMapping(value = "proxyCreate")
|
|
|
@ApiOperation(value = "创建上门预约咨询--医生代预约")
|
|
@ -56,12 +54,11 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
try{
|
|
|
JSONObject result = patientDoorCoachOrderService.proxyCreate(jsonData,getUID());
|
|
|
if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
|
|
|
return error(-1, result.getString(ResponseContant.resultMsg));
|
|
|
return baseController.error(-1, result.getString(ResponseContant.resultMsg));
|
|
|
}
|
|
|
return write(200, "提交成功!","orderId",result.getString("orderId"));
|
|
|
return baseController.write(200, "提交成功!","orderId",result.getString("orderId"));
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return error(-1, e.getMessage());
|
|
|
return baseController.error(-1, e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -71,10 +68,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
@ApiParam(name = "doctor", value = "医生codedoctor")
|
|
|
@RequestParam(value = "doctor", required = true) String doctor) {
|
|
|
try {
|
|
|
return write(200, "获取成功", "data",doctorDoorCoachOrderService.getDoorOrderNum(doctor));
|
|
|
return baseController.write(200, "获取成功", "data",doctorDoorCoachOrderService.getDoorOrderNum(doctor));
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "获取失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "获取失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
|
|
|
}
|
|
@ -89,7 +85,7 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
doctorDoorCoachOrderService.initDoorStatus(hospital);
|
|
|
JSONObject result = patientDoorCoachOrderService.queryDoctorListWithNotStopped(hospital,page, size);
|
|
|
if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
|
|
|
return error(-1,result.getString(ResponseContant.resultMsg));
|
|
|
return baseController.error(-1,result.getString(ResponseContant.resultMsg));
|
|
|
}
|
|
|
int count = result.getIntValue(ResponseContant.count);
|
|
|
JSONObject object = new JSONObject();
|
|
@ -97,11 +93,11 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
object.put("detailModelList",result.get(ResponseContant.resultMsg));
|
|
|
object.put("currPage",page);
|
|
|
object.put("pageSize",size);
|
|
|
return write(200,"查询成功","data",object);
|
|
|
return baseController.write(200,"查询成功","data",object);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return baseController.error(-1,"查询失败",e);
|
|
|
}
|
|
|
return error(-1,"查询失败");
|
|
|
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "sendOrderToDoctor")
|
|
@ -117,13 +113,12 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
try{
|
|
|
JSONObject result = patientDoorCoachOrderService.sendOrderToDoctor(orderId, remark,dispatcher,dispathcherName, doctor, doctorName ,doctorJobName);
|
|
|
if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
|
|
|
return error( -1,result.getString(ResponseContant.resultMsg));
|
|
|
return baseController.error( -1,result.getString(ResponseContant.resultMsg));
|
|
|
}
|
|
|
return write(200,"派单成功","data",result.get(ResponseContant.resultMsg));
|
|
|
return baseController.write(200,"派单成功","data",result.get(ResponseContant.resultMsg));
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return baseController.error(-1,"查询失败",e);
|
|
|
}
|
|
|
return error(-1,"派单失败");
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "transferOrder")
|
|
@ -139,12 +134,11 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
try{
|
|
|
JSONObject result = patientDoorCoachOrderService.transferOrder(orderId, remark,dispatcher,dispathcherName, doctor, doctorName ,doctorJobName);
|
|
|
if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
|
|
|
return error( -1,result.getString(ResponseContant.resultMsg));
|
|
|
return baseController.error( -1,result.getString(ResponseContant.resultMsg));
|
|
|
}
|
|
|
return write(200,"派单成功","data",result.get(ResponseContant.resultMsg));
|
|
|
return baseController.write(200,"派单成功","data",result.get(ResponseContant.resultMsg));
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return error(-1, "派单失败!");
|
|
|
return baseController.error(-1, "派单失败!",e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -157,10 +151,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
@ApiParam(value = "医院级别", name = "hospitalLevel", required = false) @RequestParam(value = "hospitalLevel",defaultValue = "4",required = false) int hospitalLevel) {
|
|
|
try {
|
|
|
doctorDoorCoachOrderService.acceptOrder(orderId,jobCode,jobCodeName,hospitalLevel);
|
|
|
return write(200, "操作成功");
|
|
|
return baseController.write(200, "操作成功");
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "操作失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "操作失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -173,10 +166,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
@RequestParam(value = "reason", required = false) String reason) {
|
|
|
try {
|
|
|
doctorDoorCoachOrderService.refuseOrder(getUID(),orderId, reason);
|
|
|
return write(200, "操作成功");
|
|
|
return baseController.write(200, "操作成功");
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "操作失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "操作失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -191,13 +183,13 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
try{
|
|
|
JSONObject result = patientDoorCoachOrderService.cancelOrder(orderId, type, reason,dispatcher,dispatcherName);
|
|
|
if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
|
|
|
return error(-1,result.getString(ResponseContant.resultMsg));
|
|
|
return baseController.error(-1,result.getString(ResponseContant.resultMsg));
|
|
|
}
|
|
|
return write(200,"取消成功","data",result.get(ResponseContant.resultMsg));
|
|
|
return baseController.write(200,"取消成功","data",result.get(ResponseContant.resultMsg));
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return baseController.error(-1,"取消失败",e);
|
|
|
}
|
|
|
return error(-1,"取消失败");
|
|
|
|
|
|
}
|
|
|
|
|
|
@PostMapping("signIn")
|
|
@ -218,13 +210,12 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
try {
|
|
|
BaseDoorCoachOrderDO baseDoorCoachOrderDO = doctorDoorCoachOrderService.signIn(orderId, signTime, signWay, signLocation, signImg,twoDimensionalCode,getUID());
|
|
|
if (baseDoorCoachOrderDO != null){
|
|
|
return write(200, "操作成功", "data", baseDoorCoachOrderDO);
|
|
|
return baseController.write(200, "操作成功", "data", baseDoorCoachOrderDO);
|
|
|
}else {
|
|
|
return error(-1,"扫码签到失败");
|
|
|
return baseController.error(-1,"扫码签到失败");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "操作失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "操作失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -241,10 +232,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
@RequestParam(value = "conclusionStatus", required = false,defaultValue = "2") Integer conclusionStatus) {
|
|
|
try {
|
|
|
BaseDoorCoachConclusionDO doorConclusion = doctorDoorCoachOrderService.updateDoorConclusion(orderId,conclusion,conclusionImg,conclusionStatus);
|
|
|
return write(200, "保存成功", "data", doorConclusion);
|
|
|
return baseController.write(200, "保存成功", "data", doorConclusion);
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "保存失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "保存失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -261,15 +251,14 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
if (StringUtils.isEmpty(orderId)) {
|
|
|
orderId = doctorDoorCoachOrderService.getOrderIdByDoctor(doctor);
|
|
|
if (StringUtils.isBlank(orderId)) {
|
|
|
return error(-1, "获取失败,该医生暂无工单" );
|
|
|
return baseController.error(-1, "获取失败,该医生暂无工单" );
|
|
|
}
|
|
|
}
|
|
|
// 根据orderId查询工单小结表
|
|
|
BaseDoorCoachConclusionDO doorConclusion = doctorDoorCoachOrderService.getDoorConclusion(orderId);
|
|
|
return write(200, "获取成功", "data", doorConclusion);
|
|
|
return baseController.write(200, "获取成功", "data", doorConclusion);
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "获取失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "获取失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -283,10 +272,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
@ApiParam(value = "确认结束服务照片", name = "finishImg")
|
|
|
@RequestParam(value = "finishImg", required = false) String finishImg) {
|
|
|
try {
|
|
|
return write(200, "获取成功", "data", doctorDoorCoachOrderService.saveOrderFinishByDoctor(orderId, finishWay, finishImg));
|
|
|
return baseController.write(200, "获取成功", "data", doctorDoorCoachOrderService.saveOrderFinishByDoctor(orderId, finishWay, finishImg));
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "获取失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "获取失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -299,10 +287,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
@RequestParam(value = "arrivingTime", required = true) String arrivingTime) {
|
|
|
try {
|
|
|
BaseDoorCoachOrderDO baseDoorCoachOrderDO = doctorDoorCoachOrderService.updateArrivingTime(orderId, arrivingTime);
|
|
|
return write(200, "修改成功", "data", baseDoorCoachOrderDO);
|
|
|
return baseController.write(200, "修改成功", "data", baseDoorCoachOrderDO);
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "修改失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "修改失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -313,10 +300,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
@RequestParam(value = "doctor", required = true) String doctor) {
|
|
|
try {
|
|
|
Map<String, Integer> map = doctorDoorCoachOrderService.getNumGroupByStatus(doctor);
|
|
|
return write(200, "获取成功", "data", map);
|
|
|
return baseController.write(200, "获取成功", "data", map);
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "获取失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "获取失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -349,10 +335,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
message1.setReceiver(getUID());
|
|
|
try {
|
|
|
org.json.JSONObject waitingMessages = doctorDoorCoachOrderService.getWaitingMessages(message1, types, Integer.valueOf(page), Integer.valueOf(pageSize));
|
|
|
return write(200, "查询成功","data",waitingMessages);
|
|
|
return baseController.write(200, "查询成功","data",waitingMessages);
|
|
|
}catch (Exception e){
|
|
|
error(e);
|
|
|
return error( -1, "查询失败!");
|
|
|
return baseController.error( -1, "查询失败!",e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -387,7 +372,7 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
@RequestParam(value = "pageSize", required = true) Integer pageSize) {
|
|
|
try {
|
|
|
if(StringUtils.isEmpty(isManage)){
|
|
|
isManage = getCurrentRoleIsManange();
|
|
|
isManage = baseController.getCurrentRoleIsManange();
|
|
|
}
|
|
|
if("0".equals(isManage)){
|
|
|
if(StringUtils.isEmpty(doctorCode)){
|
|
@ -395,8 +380,8 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
}
|
|
|
}else if ("1".equals(isManage) && StringUtils.isBlank(hospitalCode)){
|
|
|
//如果是管理员并且未筛选机构,就默认展示其管理下所有机构
|
|
|
String level = getCurrentRoleLevel();
|
|
|
String currentRoleCode = getCurrentRoleCode();
|
|
|
String level = baseController.getCurrentRoleLevel();
|
|
|
String currentRoleCode = baseController.getCurrentRoleCode();
|
|
|
if(level.equals("2")) {
|
|
|
//市管理员
|
|
|
hospitalCode = currentRoleCode.substring(0, currentRoleCode.length() - 2) + "%";
|
|
@ -424,10 +409,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
}
|
|
|
JSONObject result = doctorDoorCoachOrderService.getDoorOrderList(orderId,patientName,patientPhone,hospitalCode,
|
|
|
ss,createTimeStart,createTimeEnd,serverDoctorName,doctorCode,page,pageSize, type);
|
|
|
return write(200, "获取成功","data",result);
|
|
|
return baseController.write(200, "获取成功","data",result);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return error(-1, "获取失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "获取失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -446,7 +430,7 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
try{
|
|
|
JSONObject result = doctorDoorCoachOrderService.queryBriefList(dispatcher,hospital, orderNumber, patientName, phone, status,patientType, page, size);
|
|
|
if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
|
|
|
return error(-1,result.getString(ResponseContant.resultMsg));
|
|
|
return baseController.error(-1,result.getString(ResponseContant.resultMsg));
|
|
|
}
|
|
|
int count = result.getIntValue(ResponseContant.count);
|
|
|
JSONObject object = new JSONObject();
|
|
@ -454,11 +438,11 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
object.put("detailModelList",result.get(ResponseContant.resultMsg));
|
|
|
object.put("currPage",page);
|
|
|
object.put("pageSize",size);
|
|
|
return write(200,"查询成功","data",object);
|
|
|
return baseController.write(200,"查询成功","data",object);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return baseController.error(-1,"查询失败",e);
|
|
|
}
|
|
|
return error(-1,"查询失败");
|
|
|
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "queryDoctorList")
|
|
@ -474,7 +458,7 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
doctorDoorCoachOrderService.initDoorStatus(hospital);
|
|
|
JSONObject result = doctorDoorCoachOrderService.queryDoctorList(patient,hospital, doctorName, status, page, size);
|
|
|
if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
|
|
|
return error(-1,result.getString(ResponseContant.resultMsg));
|
|
|
return baseController.error(-1,result.getString(ResponseContant.resultMsg));
|
|
|
}
|
|
|
int count = result.getIntValue(ResponseContant.count);
|
|
|
JSONObject object = new JSONObject();
|
|
@ -487,11 +471,11 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
}
|
|
|
object.put("currPage",page);
|
|
|
object.put("pageSize",size);
|
|
|
return write(200,"查询成功","data",object);
|
|
|
return baseController.write(200,"查询成功","data",object);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return baseController.error(-1,"查询失败",e);
|
|
|
}
|
|
|
return error(-1,"查询失败");
|
|
|
|
|
|
}
|
|
|
|
|
|
@GetMapping("getByOrderId")
|
|
@ -507,15 +491,14 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
// 根据接单医生code获取最近一次服务orderId
|
|
|
orderId = doctorDoorCoachOrderService.getOrderIdByDoctor(doctor);
|
|
|
if (StringUtils.isBlank(orderId)) {
|
|
|
return error(-1, "获取失败, 该医生暂无工单" );
|
|
|
return baseController.error(-1, "获取失败, 该医生暂无工单" );
|
|
|
}
|
|
|
}
|
|
|
// 根据orderId获取工单信息
|
|
|
BaseDoorCoachOrderDO baseDoorCoachOrderDO = doctorDoorCoachOrderService.getDoorServiceOrderById(orderId);
|
|
|
return write(200, "获取成功", "data", baseDoorCoachOrderDO);
|
|
|
return baseController.write(200, "获取成功", "data", baseDoorCoachOrderDO);
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "获取失败, 该医生暂无工单!" + e.getMessage());
|
|
|
return baseController.error(-1, "获取失败, 该医生暂无工单!" + e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -528,8 +511,7 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
try {
|
|
|
return ObjEnvelop.getSuccess("操作成功",doctorDoorCoachOrderService.payOrder(orderId, payWay));
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return ObjEnvelop.getError("查询成功");
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -548,10 +530,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
@RequestParam(value = "serverItemName", required = false) String serverItemName) {
|
|
|
try {
|
|
|
|
|
|
return write(200, "获取成功","dara",patientDoorCoachOrderService.selectItemsByHospital(hospital,serverItemName));
|
|
|
return baseController.write(200, "获取成功","dara",patientDoorCoachOrderService.selectItemsByHospital(hospital,serverItemName));
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "获取失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "获取失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -560,10 +541,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
public String initDoorStatus() {
|
|
|
try {
|
|
|
doctorDoorCoachOrderService.initDoorStatus(null);
|
|
|
return success("成功");
|
|
|
return baseController.success("成功");
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "获取失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "获取失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
|
|
|
}
|
|
@ -575,10 +555,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
@RequestParam(value = "doctor", required = true) String doctor) {
|
|
|
try {
|
|
|
String status = doctorDoorCoachOrderService.findDispatchStatusByDoctor(doctor);
|
|
|
return write(200, "获取成功", "data", status);
|
|
|
return baseController.write(200, "获取成功", "data", status);
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "获取失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "获取失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
|
|
|
}
|
|
@ -592,10 +571,9 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
@RequestParam(value = "value", required = true) Integer value) {
|
|
|
try {
|
|
|
doctorDoorCoachOrderService.updateDispatchStatusByDoctor(doctor, value);
|
|
|
return write(200, "修改成功");
|
|
|
return baseController.write(200, "修改成功");
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "修改失败!" + e.getMessage());
|
|
|
return baseController.error(-1, "修改失败!" + e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -614,9 +592,8 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
}
|
|
|
return ObjEnvelop.getSuccess("转接成功",result.get(ResponseContant.resultMsg));
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
return ObjEnvelop.getError("转接失败");
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/urlAnalysis",produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
|
|
@ -625,12 +602,11 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
public String urlAnalysis(@ApiParam(name = "url", value = "地址解析", defaultValue = "")
|
|
|
@RequestParam(value = "url", required = true)String url)throws Exception {
|
|
|
try {
|
|
|
return write(200, "操作成功!","data",doctorDoorCoachOrderService.urlAnalysis(url));
|
|
|
return baseController.write(200, "操作成功!","data",doctorDoorCoachOrderService.urlAnalysis(url));
|
|
|
}catch (Exception e){
|
|
|
//日志文件中记录异常信息
|
|
|
error(e);
|
|
|
//返回接口异常信息处理结果
|
|
|
return error(-1, "操作失败!");
|
|
|
return baseController.error(-1, "操作失败!",e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -640,8 +616,13 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
@ApiParam(name = "consult", value = "咨询CODE")
|
|
|
@RequestParam(value = "consult",required = false) String consult,
|
|
|
@ApiParam(name = "patientCode", value = "居民COEE")
|
|
|
@RequestParam(value = "patientCode",required = false) String patientCode)throws Exception {
|
|
|
return ObjEnvelop.getSuccess("请求成功", imService.getConsultInfoAndPatientInfo(consult, patientCode));
|
|
|
@RequestParam(value = "patientCode",required = false) String patientCode){
|
|
|
try {
|
|
|
return ObjEnvelop.getSuccess("请求成功", imService.getConsultInfoAndPatientInfo(consult, patientCode));
|
|
|
}catch (Exception e){
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "queryByConsultCode",method = RequestMethod.GET)
|
|
@ -652,8 +633,7 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
JSONObject detail = consultTeamService.queryByConsultCode(code,type);
|
|
|
return ObjEnvelop.getSuccess("查询成功", detail.get("data"));
|
|
|
}catch (Exception e){
|
|
|
error(e);
|
|
|
return ObjEnvelop.getError("查询失败");
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -664,12 +644,13 @@ public class DoctorDoorCoachOrderController extends BaseController {
|
|
|
try{
|
|
|
JSONObject result = patientDoorCoachOrderService.updateOrderCardInfo(jsonData);
|
|
|
if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
|
|
|
return error(-1,result.getString(ResponseContant.resultMsg));
|
|
|
return baseController.error(-1,result.getString(ResponseContant.resultMsg));
|
|
|
}
|
|
|
return write(200,"保存成功","data",result.get(ResponseContant.resultMsg));
|
|
|
return baseController.write(200,"保存成功","data",result.get(ResponseContant.resultMsg));
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return baseController.error(-1,"保存失败",e);
|
|
|
}
|
|
|
return error(-1,"保存失败");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|