feat:佛山三院接收消息统一接口
parent
6211f5d57c
commit
39ecb05c69
@ -0,0 +1,12 @@
|
|||||||
|
package com.docus.server.message.service;
|
||||||
|
|
||||||
|
import javax.jws.WebService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author WYBDEV
|
||||||
|
*/
|
||||||
|
@WebService
|
||||||
|
public interface FsSyWebServiceUnifyMessageService {
|
||||||
|
|
||||||
|
String pushInformation(String message);
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.docus.server.message.service;
|
||||||
|
|
||||||
|
import com.docus.server.message.consts.HospitalWsMethod;
|
||||||
|
import com.docus.server.message.util.XmlUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.w3c.dom.Node;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author WYBDEV
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class FsSyWebServiceUnifyMessageServiceImpl implements FsSyWebServiceUnifyMessageService{
|
||||||
|
|
||||||
|
private UnifyMessageService unifyMessageService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setUnifyMessageService(UnifyMessageService unifyMessageService) {
|
||||||
|
this.unifyMessageService = unifyMessageService;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String pushInformation(String message) {
|
||||||
|
String methodNamePath="/Request/Header/MethodName";
|
||||||
|
String methodName;
|
||||||
|
try {
|
||||||
|
XmlUtil xmlUtil = XmlUtil.of(message);
|
||||||
|
Node node = xmlUtil.getNode(methodNamePath);
|
||||||
|
methodName = node.getTextContent();
|
||||||
|
}catch (Exception ex){
|
||||||
|
return "获取方法名出错:"+methodNamePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
if("AddDepts".equals(methodName)){
|
||||||
|
return unifyMessageService.pushInformation(HospitalWsMethod.WS_FSSY_DEPT,message);
|
||||||
|
}
|
||||||
|
if("AddUsers".equals(methodName)){
|
||||||
|
return unifyMessageService.pushInformation(HospitalWsMethod.WS_FSSY_USER,message);
|
||||||
|
}
|
||||||
|
return "未对接方法"+methodName+",请联系开发人员!";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,8 +1,6 @@
|
|||||||
package com.docus.server.message.service.impl;
|
package com.docus.server.message.service;
|
||||||
|
|
||||||
import com.docus.server.message.consts.HospitalWsMethod;
|
import com.docus.server.message.consts.HospitalWsMethod;
|
||||||
import com.docus.server.message.service.SdWebServiceUnifyMessageService;
|
|
||||||
import com.docus.server.message.service.UnifyMessageService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
Loading…
Reference in New Issue