|
@ -2,8 +2,8 @@ package com.yihu.wlyy.web.doctor.synergy;
|
|
|
|
|
|
import com.yihu.wlyy.service.jimeiJkEdu.JMJkEduArticleService;
|
|
import com.yihu.wlyy.service.jimeiJkEdu.JMJkEduArticleService;
|
|
import com.yihu.wlyy.service.synergy.ManageSynergyService;
|
|
import com.yihu.wlyy.service.synergy.ManageSynergyService;
|
|
|
|
import com.yihu.wlyy.service.synergy.SynergyManageService;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import com.yihu.wlyy.web.third.gateway.vo.base.BaseResultModel;
|
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
@ -30,6 +30,8 @@ public class SynergyManageController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private ManageSynergyService manageSynergyService;
|
|
private ManageSynergyService manageSynergyService;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
private SynergyManageService synergyManageService;
|
|
|
|
@Autowired
|
|
private JMJkEduArticleService jmJkEduArticleService;
|
|
private JMJkEduArticleService jmJkEduArticleService;
|
|
|
|
|
|
@RequestMapping(value = "/getWorkOrderInfo", method = {RequestMethod.GET, RequestMethod.POST})
|
|
@RequestMapping(value = "/getWorkOrderInfo", method = {RequestMethod.GET, RequestMethod.POST})
|
|
@ -49,8 +51,8 @@ public class SynergyManageController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "doctorCreateSynergy", method = RequestMethod.POST)
|
|
@RequestMapping(value = "doctorCreateSynergy", method = RequestMethod.POST)
|
|
@ApiOperation("医生创建系统服务")
|
|
|
|
public BaseResultModel doctorSendArticleToPatients(
|
|
|
|
|
|
@ApiOperation("医生派发协同服务")
|
|
|
|
public String doctorSendArticleToPatients(
|
|
@RequestParam(value = "patient", required = false) String patient,
|
|
@RequestParam(value = "patient", required = false) String patient,
|
|
@RequestParam(value = "group", required = false) String group,
|
|
@RequestParam(value = "group", required = false) String group,
|
|
@RequestParam(value = "labelType", required = false) String labelType,
|
|
@RequestParam(value = "labelType", required = false) String labelType,
|
|
@ -67,7 +69,7 @@ public class SynergyManageController extends BaseController {
|
|
String[] patients = new String[]{};
|
|
String[] patients = new String[]{};
|
|
String[] groups = new String[]{};
|
|
String[] groups = new String[]{};
|
|
if (StringUtils.isEmpty(patient) && StringUtils.isEmpty(group)) {
|
|
if (StringUtils.isEmpty(patient) && StringUtils.isEmpty(group)) {
|
|
return new BaseResultModel("请至少选择一个患者!");
|
|
|
|
|
|
return write(200,"请至少选择一个患者!");
|
|
}else{
|
|
}else{
|
|
if(StringUtils.isNotBlank(patient)){
|
|
if(StringUtils.isNotBlank(patient)){
|
|
if(patient.contains(",")){
|
|
if(patient.contains(",")){
|
|
@ -85,19 +87,19 @@ public class SynergyManageController extends BaseController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (patients.length == 0 && groups.length == 0) {
|
|
if (patients.length == 0 && groups.length == 0) {
|
|
return new BaseResultModel("请至少选择一个患者!");
|
|
|
|
|
|
return write(200,"请至少选择一个患者!");
|
|
}
|
|
}
|
|
Set<String> patientSet = new HashSet<>(); //放入set中可以去重复
|
|
Set<String> patientSet = new HashSet<>(); //放入set中可以去重复
|
|
jmJkEduArticleService.initPatients(getUID(),groups, group,labelType,teamCode,patients,patientSet);
|
|
jmJkEduArticleService.initPatients(getUID(),groups, group,labelType,teamCode,patients,patientSet);
|
|
// jmJkEduArticleService.initPatient(getUID(),groups,group,labelType,teamCode,patients,patientSet);
|
|
// jmJkEduArticleService.initPatient(getUID(),groups,group,labelType,teamCode,patients,patientSet);
|
|
if (patientSet.size() == 0) {
|
|
if (patientSet.size() == 0) {
|
|
return new BaseResultModel("请至少选择一个患者!");
|
|
|
|
|
|
return write(200,"请至少选择一个患者!");
|
|
}
|
|
}
|
|
manageSynergyService.createWorkorder(getUID(),patientSet,type,objectId,serviceDate,priority,remark,followupClass,followupType);
|
|
|
|
return new BaseResultModel();
|
|
|
|
|
|
synergyManageService.createWorkorder(getUID(),patientSet,type,objectId,serviceDate,priority,remark,followupClass,followupType);
|
|
|
|
return write(200,"请求成功");
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
error(e);
|
|
error(e);
|
|
return new BaseResultModel(BaseResultModel.statusEm.opera_error.getCode(), BaseResultModel.statusEm.opera_error.getMessage() + ":" + e.getMessage());
|
|
|
|
|
|
return error(-1,"保存失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@ -148,4 +150,23 @@ public class SynergyManageController extends BaseController {
|
|
return error(-1, "请求失败");
|
|
return error(-1, "请求失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 居民列表
|
|
|
|
*
|
|
|
|
* @param workorderCode
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping(value = "selectByWorkorderCode", method = RequestMethod.POST)
|
|
|
|
@ApiOperation("医生端-居民列表")
|
|
|
|
public String selectByWorkorderCode(@ApiParam(name = "workorderCode", value = "工单code", required = false)
|
|
|
|
@RequestParam(value = "workorderCode", required = false)String workorderCode){
|
|
|
|
try {
|
|
|
|
return write(200, "请求成功","data",manageSynergyService.selectByWorkorderCode(workorderCode));
|
|
|
|
}catch (Exception e){
|
|
|
|
error(e);
|
|
|
|
return error(-1, "请求失败");
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|