|
@ -67,6 +67,53 @@ public class SynergyManageService extends BaseService {
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
public String updateWorkorder(String code,Integer type, String objectId, String serviceDate, Integer priority, String remark, String followupClass, String followupType) throws Exception {
|
|
|
String response = null;
|
|
|
JSONObject object = new JSONObject();
|
|
|
object.put("code",code);
|
|
|
object.put("serviceTime",serviceDate);
|
|
|
object.put("priority",priority);
|
|
|
object.put("remark",remark);
|
|
|
if (type == 3){
|
|
|
Followup followup = followUpDao.findOne(Long.parseLong(objectId));
|
|
|
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
String a = serviceDate+":00";
|
|
|
Date date = dateFormat.parse(serviceDate+":00");
|
|
|
followup.setFollowupDate(date);
|
|
|
followup.setFollowupType(followupType);
|
|
|
followup.setFollowupClass(followupClass);
|
|
|
followup = followUpDao.save(followup);
|
|
|
if (followupClass.equals("1")){
|
|
|
object.put("relationCodeName","高血压");
|
|
|
}else if (followupClass.equals("2")){
|
|
|
object.put("relationCodeName","糖尿病");
|
|
|
}else if (followupClass.equals("1,2")){
|
|
|
object.put("relationCodeName","高血压,糖尿病");
|
|
|
}
|
|
|
}
|
|
|
String url = customerUrl + "synergy/doctor/updateWorkorder";
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
params.put("workorder",object.toString());
|
|
|
response = httpClientUtil.httpPost(url,params);
|
|
|
com.alibaba.fastjson.JSONObject object1 = JSON.parseObject(response);
|
|
|
if (object1.getInteger("status")==200){
|
|
|
return response;
|
|
|
}else {
|
|
|
throw new Exception("请求客服系统服务失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public String getWorkorById(String code) throws Exception {
|
|
|
String response = null;
|
|
|
String url = customerUrl + "synergy/doctor/getWorkorderInfo?workorderCode="+code;
|
|
|
response = httpClientUtil.get(url,"UTF-8");
|
|
|
com.alibaba.fastjson.JSONObject object1 = JSON.parseObject(response);
|
|
|
if (object1.getInteger("status")==200){
|
|
|
return object1.getJSONObject("data").toString();
|
|
|
}else {
|
|
|
throw new Exception("请求客服系统服务失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public String createWorkorder(String doctor, Set<String> patientSet, Integer type, String objectId, String serviceDate, Integer priority, String remark, String followupClass, String followupType) throws Exception {
|
|
|
String response = null;
|
|
@ -134,8 +181,10 @@ public class SynergyManageService extends BaseService {
|
|
|
object.put("relationCode",followup.getId());
|
|
|
if (followupClass.equals("1")){
|
|
|
object.put("relationCodeName","高血压");
|
|
|
}else if (followupClass.equals("1")){
|
|
|
}else if (followupClass.equals("2")){
|
|
|
object.put("relationCodeName","糖尿病");
|
|
|
}else if (followupClass.equals("1,2")){
|
|
|
object.put("relationCodeName","高血压,糖尿病");
|
|
|
}
|
|
|
object.put("createUserRole",1);
|
|
|
}else if (type == 1){
|