获取发送和接受者

3.2.4.44
宇宙皮皮娃 2 years ago
parent 4efa8de2b8
commit 01bbcd0d82

@ -13,6 +13,8 @@ import lombok.Data;
@Data
public class TBasicDto {
private String serialId;
private String receive;
private String send;
private String jzh;
private String inpatientNo;
private String admissTimes;

@ -19,7 +19,7 @@ public class Result {
public static String success(String serialId){
public static String success(String serialId,String receive,String send){
String createTime= Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
@ -35,14 +35,14 @@ public class Result {
" <receiver typeCode=\"RCV\"> \n" +
" <device classCode=\"DEV\" determinerCode=\"INSTANCE\"> \n" +
" <id> \n" +
" <item extension=\"@111\"/> \n" +
" <item extension=\""+receive+"\"/> \n" +
" </id> \n" +
" </device> \n" +
" </receiver> \n" +
" <sender typeCode=\"SND\"> \n" +
" <device classCode=\"DEV\" determinerCode=\"INSTANCE\"> \n" +
" <id> \n" +
" <item extension=\"@222\"/> \n" +
" <item extension=\""+send+"\"/> \n" +
" </id> \n" +
" </device> \n" +
" </sender> \n" +
@ -57,7 +57,7 @@ public class Result {
" </acknowledgement> \n" +
"</MCCI_IN000002UV01>\n";
}
public static String failed(String serialId,String message){
public static String failed(String serialId,String message,String receive,String send){
String createTime= Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
@ -72,14 +72,14 @@ public class Result {
" <receiver typeCode=\"RCV\"> \n" +
" <device classCode=\"DEV\" determinerCode=\"INSTANCE\"> \n" +
" <id> \n" +
" <item extension=\"@111\"/> \n" +
" <item extension=\""+receive+"\"/> \n" +
" </id> \n" +
" </device> \n" +
" </receiver> \n" +
" <sender typeCode=\"SND\"> \n" +
" <device classCode=\"DEV\" determinerCode=\"INSTANCE\"> \n" +
" <id> \n" +
" <item extension=\"@222\"/> \n" +
" <item extension=\""+send+"\"/> \n" +
" </id> \n" +
" </device> \n" +
" </sender> \n" +

@ -44,7 +44,7 @@ public class TBasicServiceImpl implements TBasicService {
@Override
public String setTBasic(String body) {
if (Func.isEmpty(body)) {
return Result.failed(null,"参数为空");
return Result.failed(null,"参数为空",null,null);
}
//解析xml
TBasicDto tBasicDto = null;
@ -53,7 +53,7 @@ public class TBasicServiceImpl implements TBasicService {
//判断jzh是否重复
Integer num = tBasicMapper.selectOne(tBasicDto.getJzh());
if (num>0) {
return Result.failed(tBasicDto.getSerialId(),"记帐号已存在");
return Result.failed(tBasicDto.getSerialId(),"记帐号已存在",tBasicDto.getReceive(),tBasicDto.getSend());
}
long patientId = idService.getDateSeq();
@ -78,7 +78,7 @@ public class TBasicServiceImpl implements TBasicService {
e.printStackTrace();
log.error(e.getMessage(), e);
}
return Result.success(tBasicDto.getSerialId());
return Result.success(tBasicDto.getSerialId(),tBasicDto.getReceive(),tBasicDto.getSend());
}
@ -91,6 +91,16 @@ public class TBasicServiceImpl implements TBasicService {
if(Func.isNotEmpty(node)){
dto.setSerialId(node.getNodeValue());
}
//接受方
node = xml.getNode("/PRPA_HIP0032/receiver/device/id/item/@extension");
if(Func.isNotEmpty(node)){
dto.setReceive(node.getNodeValue());
}
//发送方
node = xml.getNode("/PRPA_HIP0032/sender/device/id/item/@extension");
if(Func.isNotEmpty(node)){
dto.setSend(node.getNodeValue());
}
//住院流水号
node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/item/@extension");
if(Func.isNotEmpty(node)){

Loading…
Cancel
Save