|
@ -1,5 +1,6 @@
|
|
package com.yihu.wlyy.web.common.util;
|
|
package com.yihu.wlyy.web.common.util;
|
|
|
|
|
|
|
|
import com.yihu.wlyy.service.third.guahao.GuahaoXMService;
|
|
import com.yihu.wlyy.util.HttpUtil;
|
|
import com.yihu.wlyy.util.HttpUtil;
|
|
import com.yihu.wlyy.util.SystemConf;
|
|
import com.yihu.wlyy.util.SystemConf;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
@ -10,6 +11,7 @@ import org.dom4j.Document;
|
|
import org.dom4j.DocumentHelper;
|
|
import org.dom4j.DocumentHelper;
|
|
import org.dom4j.Element;
|
|
import org.dom4j.Element;
|
|
import org.json.JSONObject;
|
|
import org.json.JSONObject;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
@ -25,7 +27,8 @@ import java.util.*;
|
|
@RequestMapping(value = "/wlyy_service")
|
|
@RequestMapping(value = "/wlyy_service")
|
|
@Api(description = "卫计委签约接口调试")
|
|
@Api(description = "卫计委签约接口调试")
|
|
public class WlyySerivceController extends BaseController{
|
|
public class WlyySerivceController extends BaseController{
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private GuahaoXMService guahaoXM;
|
|
/**
|
|
/**
|
|
* 检查是否签约
|
|
* 检查是否签约
|
|
*
|
|
*
|
|
@ -202,13 +205,20 @@ public class WlyySerivceController extends BaseController{
|
|
String strEnd = sm.format(tenDateAfter);
|
|
String strEnd = sm.format(tenDateAfter);
|
|
String checkUrl = SystemConf.getInstance().getSystemProperties().getProperty("sign_check_upload");
|
|
String checkUrl = SystemConf.getInstance().getSystemProperties().getProperty("sign_check_upload");
|
|
String param = "?OrgCode="+OrgCode+"&DeptCode="+DeptCode+"&strStart="+strStart+"&strEnd="+strEnd+"&DocCode="+DocCode;
|
|
String param = "?OrgCode="+OrgCode+"&DeptCode="+DeptCode+"&strStart="+strStart+"&strEnd="+strEnd+"&DocCode="+DocCode;
|
|
String jsonString = HttpUtil.sendPost(checkUrl + "/third/smjk/RegDeptSpeDoctorSectionList"+param,"" );
|
|
|
|
if(StringUtils.isEmpty(jsonString)){
|
|
|
|
return write(-1,"医生排班时间获取失败");
|
|
|
|
}else{
|
|
|
|
JSONObject myJsonObject = new JSONObject(jsonString);
|
|
|
|
return write(200,"医生排班时间获取成功","data",parseXmlForSpe(myJsonObject.get("data").toString()));
|
|
|
|
|
|
/*****modify by linz 暂时把号源转换成普通号源****/
|
|
|
|
List<Map<String,Object>> list = guahaoXM.GetDoctorArrange(OrgCode,DeptCode,DocCode);
|
|
|
|
//String jsonString = HttpUtil.sendPost(checkUrl + "/third/smjk/RegDeptSpeDoctorSectionList"+param,"" );
|
|
|
|
//if(StringUtils.isEmpty(jsonString)){
|
|
|
|
// return write(-1,"医生排班时间获取失败");
|
|
|
|
//}else{
|
|
|
|
// JSONObject myJsonObject = new JSONObject(jsonString);
|
|
|
|
// return write(200,"医生排班时间获取成功","data",parseXmlForSpe(myJsonObject.get("data").toString()));
|
|
|
|
//}
|
|
|
|
for(Map map :list){
|
|
|
|
String date = (String)map.get("date");
|
|
|
|
map.put("date",date.replaceAll("-","/"));
|
|
}
|
|
}
|
|
|
|
return write(200, "获取医生排班成功!", "data", list);
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
return error(-1,"医生排班时间获取失败");
|
|
return error(-1,"医生排班时间获取失败");
|