segment2.0
linrf 2 years ago
parent 2b28c9c41a
commit f5745e4d66

@ -4,20 +4,27 @@ import com.docus.server.collect.infrastructure.enums.IIntegerEnum;
public enum CollectTypeEnum implements IIntegerEnum { public enum CollectTypeEnum implements IIntegerEnum {
WEBSERVICE_XML_DEPT(0, "WEBSERVICE_XML_DEPT"), WEBSERVICE_XML_DEPT(0, "WEBSERVICE_XML_DEPT", "科室信息"),
WEBSERVICE_XML_USER(1, "WEBSERVICE_XML_USER"), WEBSERVICE_XML_USER(1, "WEBSERVICE_XML_USER", "用户信息"),
WEBSERVICE_XML_BASIC(2, "WEBSERVICE_XML_BASIC"), WEBSERVICE_XML_BASIC(2, "WEBSERVICE_XML_BASIC", "新增/修改基础数据"),
WEBSERVICE_XML_SA_REPORT(3, "WEBSERVICE_XML_SA_REPORT"), WEBSERVICE_XML_SA_REPORT(3, "WEBSERVICE_XML_SA_REPORT", "手麻报告信息"),
WEBSERVICE_XML_ICU_REPORT(4, "WEBSERVICE_XML_ICU_REPORT"), WEBSERVICE_XML_ICU_REPORT(4, "WEBSERVICE_XML_ICU_REPORT", "重症报告信息"),
WEBSERVICE_XML_INSERT_INSPECTION_REPORT(5, "WEBSERVICE_XML_INSERT_INSPECTION_REPORT"), WEBSERVICE_XML_EXAMINATION_REPORT(5, "WEBSERVICE_XML_EXAMINATION_REPORT", "检验报告信息"),
WEBSERVICE_XML_UPDATE_INSPECTION_REPORT(6, "WEBSERVICE_XML_UPDATE_INSPECTION_REPORT"); WEBSERVICE_XML_INSERT_INSPECTION_REPORT(6, "WEBSERVICE_XML_INSERT_INSPECTION_REPORT", "新增检查报告的信息"),
WEBSERVICE_XML_UPDATE_INSPECTION_REPORT(7, "WEBSERVICE_XML_UPDATE_INSPECTION_REPORT", "更新检查报告的信息");
private Integer value; private Integer value;
private String display; private String display;
private String desc;
CollectTypeEnum(Integer value, String display) { CollectTypeEnum(Integer value, String display, String desc) {
this.value = value; this.value = value;
this.display = display; this.display = display;
this.desc = desc;
}
public String getDesc() {
return desc;
} }
@Override @Override
@ -30,8 +37,4 @@ public enum CollectTypeEnum implements IIntegerEnum {
return display; return display;
} }
public static CollectTypeEnum fromValue(Integer value) {
return IIntegerEnum.fromValue(CollectTypeEnum.class, value);
}
} }

@ -35,6 +35,10 @@ public class TaskOriginalMessage implements Serializable {
@TableField("name") @TableField("name")
private String name; private String name;
@ApiModelProperty(value = "采集描述")
@TableField("desc")
private String desc;
@ApiModelProperty(value = "采集类型") @ApiModelProperty(value = "采集类型")
@TableField("collect_type") @TableField("collect_type")
private CollectTypeEnum collectType; private CollectTypeEnum collectType;

@ -69,6 +69,7 @@ public class VisitorProcessor extends AbstractProcessor {
return wsResult.fail(params); return wsResult.fail(params);
} }
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e);
return wsResult.fail(params); return wsResult.fail(params);
} }
} }

@ -10,6 +10,7 @@ import javax.jws.WebService;
public interface IReportServer { public interface IReportServer {
/** /**
* *
*
* @param saReportMessage * @param saReportMessage
* @return * @return
*/ */
@ -17,13 +18,23 @@ public interface IReportServer {
/** /**
* *
*
* @param icuReportMessage * @param icuReportMessage
* @return * @return
*/ */
String pushICUReport(String icuReportMessage); String pushICUReport(String icuReportMessage);
/**
*
*
* @param examinationReportMessage
* @return
*/
String pushExaminationReport(String examinationReportMessage);
/** /**
* - * -
*
* @param inspectionReportMessage - * @param inspectionReportMessage -
* @return * @return
*/ */
@ -31,6 +42,7 @@ public interface IReportServer {
/** /**
* - * -
*
* @param inspectionReportMessage - * @param inspectionReportMessage -
* @return * @return
*/ */

@ -2,7 +2,7 @@ package com.docus.server.ws;
import javax.jws.WebService; import javax.jws.WebService;
@WebService(targetNamespace = "http://impl.webservice.collection.server.docus.com/") @WebService
public interface IWebServiceServer { public interface IWebServiceServer {
/** /**

@ -18,6 +18,7 @@ public class TaskOriginalMessageConverter {
TaskOriginalMessage taskOriginalMessage = new TaskOriginalMessage(); TaskOriginalMessage taskOriginalMessage = new TaskOriginalMessage();
taskOriginalMessage.setId(idService.getDateSeq()); taskOriginalMessage.setId(idService.getDateSeq());
taskOriginalMessage.setName(collectType.name()); taskOriginalMessage.setName(collectType.name());
taskOriginalMessage.setDesc(collectType.getDesc());
taskOriginalMessage.setCollectType(collectType); taskOriginalMessage.setCollectType(collectType);
taskOriginalMessage.setJsonStr(json); taskOriginalMessage.setJsonStr(json);
taskOriginalMessage.setSource(xml); taskOriginalMessage.setSource(xml);

@ -28,7 +28,7 @@ public class BasicServiceImpl implements IBasicService {
@Override @Override
@TrackGroup( @TrackGroup(
group = "WEBSERVICE_XML_BASIC", desc = "新增基础数据", group = "WEBSERVICE_XML_BASIC",
beanNames = {"tBasicConverter", "wsBasicResultImpl"}, beanNames = {"tBasicConverter", "wsBasicResultImpl"},
processor = VisitorProcessor.class) processor = VisitorProcessor.class)
public String setTBasic(String message) { public String setTBasic(String message) {
@ -46,7 +46,7 @@ public class BasicServiceImpl implements IBasicService {
*/ */
@Override @Override
@TrackGroup( @TrackGroup(
group = "WEBSERVICE_XML_BASIC", desc = "更新基础数据", group = "WEBSERVICE_XML_BASIC",
beanNames = {"tBasicConverter", "wsBasicResultImpl"}, beanNames = {"tBasicConverter", "wsBasicResultImpl"},
processor = VisitorProcessor.class) processor = VisitorProcessor.class)
public String updateTBasic(String message) { public String updateTBasic(String message) {

@ -31,7 +31,7 @@ public class DeptServerImpl implements IDeptServer {
*/ */
@Override @Override
@TrackGroup( @TrackGroup(
group = "WEBSERVICE_XML_DEPT", desc = "接收科室信息", group = "WEBSERVICE_XML_DEPT",
beanNames = {"powerDeptConverter", "wsDeptResultImpl"}, beanNames = {"powerDeptConverter", "wsDeptResultImpl"},
processor = VisitorProcessor.class) processor = VisitorProcessor.class)
public String deptModify(String message) { public String deptModify(String message) {

@ -3,7 +3,7 @@ package com.docus.server.ws.impl;
import com.docus.core.util.json.JSON; import com.docus.core.util.json.JSON;
import com.docus.log.annotation.TrackGroup; import com.docus.log.annotation.TrackGroup;
import com.docus.log.context.TrackHelper; import com.docus.log.context.TrackHelper;
import com.docus.server.collect.infrastructure.pojo.dto.ReportDTO; import com.docus.server.archivefile.pojo.dto.ReportDTO;
import com.docus.server.visitor.VisitorProcessor; import com.docus.server.visitor.VisitorProcessor;
import com.docus.server.ws.IReportServer; import com.docus.server.ws.IReportServer;
import com.docus.server.ws.IReportService; import com.docus.server.ws.IReportService;
@ -22,36 +22,61 @@ public class ReportServerImpl implements IReportServer {
@Resource @Resource
private IReportService reportService; private IReportService reportService;
/**
* @param message
* @see com.docus.server.collect.infrastructure.dao.CollectTypeEnum
* @see com.docus.server.ws.convert.IConverter
* @see com.docus.server.ws.IWsResult
* @see VisitorProcessor
*/
@Override @Override
@TrackGroup( @TrackGroup(
group = "WEBSERVICE_XML_SA_REPORT", desc = "接收手麻报告信息", group = "WEBSERVICE_XML_SA_REPORT",
beanNames = {"reportConverter", "wsReportResultImpl"}, beanNames = {"reportConverter", "wsReportResultImpl"},
processor = VisitorProcessor.class) processor = VisitorProcessor.class)
public String pushSAReport(String message) { public String pushSAReport(String message) {
log.info("收到手麻消息:{}", message); report();
reportService.report(JSON.fromJSON((String) TrackHelper.getValue("jsonStr"), ReportDTO.class));
return null; return null;
} }
@Override @Override
public String pushICUReport(String icuReportMessage) { @TrackGroup(
group = "WEBSERVICE_XML_ICU_REPORT",
beanNames = {"reportConverter", "wsReportResultImpl"},
processor = VisitorProcessor.class)
public String pushICUReport(String message) {
log.info("收到重症消息:{}", message);
report();
return null;
}
@Override
@TrackGroup(
group = "WEBSERVICE_XML_EXAMINATION_REPORT",
beanNames = {"reportConverter", "wsReportResultImpl"},
processor = VisitorProcessor.class)
public String pushExaminationReport(String message) {
log.info("收到检验报告消息:{}", message);
report();
return null; return null;
} }
@Override @Override
public String pushAddInspectionReport(String inspectionReportMessage) { @TrackGroup(
group = "WEBSERVICE_XML_INSERT_INSPECTION_REPORT",
beanNames = {"reportConverter", "wsReportResultImpl"},
processor = VisitorProcessor.class)
public String pushAddInspectionReport(String message) {
log.info("收到检查报告新增消息:{}", message);
report();
return null; return null;
} }
@Override @Override
public String pushUpdateInspectionReport(String inspectionReportMessage) { @TrackGroup(
group = "WEBSERVICE_XML_UPDATE_INSPECTION_REPORT",
beanNames = {"reportConverter", "wsReportResultImpl"},
processor = VisitorProcessor.class)
public String pushUpdateInspectionReport(String message) {
log.info("收到检查报告更新消息:{}", message);
report();
return null; return null;
} }
private void report() {
reportService.report(JSON.fromJSON((String) TrackHelper.getValue("jsonStr"), ReportDTO.class));
}
} }

@ -31,7 +31,7 @@ public class UserServerImpl implements IUserServer {
*/ */
@Override @Override
@TrackGroup( @TrackGroup(
group = "WEBSERVICE_XML_USER", desc = "接收用户信息", group = "WEBSERVICE_XML_USER",
beanNames = {"powerUserConverter", "wsUserResultImpl"}, beanNames = {"powerUserConverter", "wsUserResultImpl"},
processor = VisitorProcessor.class) processor = VisitorProcessor.class)
public String userModify(String message) { public String userModify(String message) {

@ -7,11 +7,11 @@ import com.docus.core.util.Func;
import com.docus.infrastructure.web.api.CommonResult; import com.docus.infrastructure.web.api.CommonResult;
import com.docus.infrastructure.web.api.ResultCode; import com.docus.infrastructure.web.api.ResultCode;
import com.docus.server.archivefile.mapper.AfReportRecordMapper; import com.docus.server.archivefile.mapper.AfReportRecordMapper;
import com.docus.server.archivefile.pojo.dto.ReportDTO;
import com.docus.server.archivefile.pojo.dto.ReportDownDTO;
import com.docus.server.archivefile.pojo.dto.ReportDownPatientDTO;
import com.docus.server.archivefile.pojo.dto.ReportDownScanFileDTO;
import com.docus.server.archivefile.pojo.entity.AfReportRecord; import com.docus.server.archivefile.pojo.entity.AfReportRecord;
import com.docus.server.collect.infrastructure.pojo.dto.ReportDTO;
import com.docus.server.collect.infrastructure.pojo.dto.ReportDownDTO;
import com.docus.server.collect.infrastructure.pojo.dto.ReportDownPatientDTO;
import com.docus.server.collect.infrastructure.pojo.dto.ReportDownScanFileDTO;
import com.docus.server.ws.event.TaskConsumptionReportDownEvent; import com.docus.server.ws.event.TaskConsumptionReportDownEvent;
import com.docus.server.ws.event.ThreePartyPushReportDownEvent; import com.docus.server.ws.event.ThreePartyPushReportDownEvent;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -80,7 +80,7 @@ public class ReportDownListener {
@EventListener @EventListener
@Async("threadPoolExecutor") @Async("threadPoolExecutor")
public void taskConsumptionReporDown(TaskConsumptionReportDownEvent taskConsumptionReportDownEvent) { public void taskConsumptionReporDown(TaskConsumptionReportDownEvent taskConsumptionReportDownEvent) {
ReportDTO reportDto = taskConsumptionReportDownEvent.ReportDTO(); ReportDTO reportDto = taskConsumptionReportDownEvent.getReportDTO();
// 组织基础信息数据 // 组织基础信息数据
ReportDownPatientDTO reportDownPatientDto = new ReportDownPatientDTO(reportDto); ReportDownPatientDTO reportDownPatientDto = new ReportDownPatientDTO(reportDto);

Loading…
Cancel
Save