|
@@ -5,11 +5,14 @@ import com.diagbot.dto.WordCrfDTO;
|
|
|
import com.diagbot.facade.BillFacade;
|
|
|
import com.diagbot.facade.CriticalFacade;
|
|
|
import com.diagbot.facade.HighRiskFacade;
|
|
|
+import com.diagbot.facade.OtherTipFacade;
|
|
|
import com.diagbot.util.CoreUtil;
|
|
|
+import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.IndicationPushVO;
|
|
|
import io.github.lvyahui8.spring.annotation.DataConsumer;
|
|
|
import io.github.lvyahui8.spring.annotation.DataProvider;
|
|
|
import io.github.lvyahui8.spring.annotation.InvokeParameter;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -21,6 +24,7 @@ import java.util.Map;
|
|
|
* @time: 2019/10/16 13:37
|
|
|
*/
|
|
|
@Component
|
|
|
+@Slf4j
|
|
|
public class IndicationAggregate {
|
|
|
|
|
|
@Autowired
|
|
@@ -29,6 +33,8 @@ public class IndicationAggregate {
|
|
|
HighRiskFacade highRiskFacade;
|
|
|
@Autowired
|
|
|
CriticalFacade criticalFacade;
|
|
|
+ @Autowired
|
|
|
+ OtherTipFacade otherTipFacade;
|
|
|
|
|
|
@DataProvider("indicationAll")
|
|
|
public IndicationDTO indicationAll(
|
|
@@ -37,7 +43,8 @@ public class IndicationAggregate {
|
|
|
@InvokeParameter("debug") Map<String, Object> debug,
|
|
|
@DataConsumer("bill") IndicationDTO billDTO,
|
|
|
@DataConsumer("highrisk") IndicationDTO highriskDTO,
|
|
|
- @DataConsumer("critical") IndicationDTO criticalDTO) {
|
|
|
+ @DataConsumer("critical") IndicationDTO criticalDTO,
|
|
|
+ @DataConsumer("otherTip") IndicationDTO otherDTO) {
|
|
|
IndicationDTO res = new IndicationDTO();
|
|
|
if (billDTO != null) {
|
|
|
res.setBillMsgList(billDTO.getBillMsgList());
|
|
@@ -51,6 +58,10 @@ public class IndicationAggregate {
|
|
|
res.setCriticalValList(criticalDTO.getCriticalValList());
|
|
|
debug.putAll(criticalDTO.getDebug()); // 调试信息
|
|
|
}
|
|
|
+ if (otherDTO != null) {
|
|
|
+ res.setOtherList(otherDTO.getOtherList());
|
|
|
+ debug.putAll(otherDTO.getDebug()); // 调试信息
|
|
|
+ }
|
|
|
res.setDebug(debug);
|
|
|
return res;
|
|
|
}
|
|
@@ -69,8 +80,15 @@ public class IndicationAggregate {
|
|
|
IndicationDTO res = new IndicationDTO();
|
|
|
// 开单合理性
|
|
|
if (indicationPushVO != null && indicationPushVO.getRuleTypeList().contains("2")) {
|
|
|
- billFacade.billFac(indicationPushVO, wordCrfDTO, res);
|
|
|
- CoreUtil.getDebugStr(start, "开单规则耗时", res.getDebug());
|
|
|
+ try {
|
|
|
+ billFacade.billFac(indicationPushVO, wordCrfDTO, res);
|
|
|
+ CoreUtil.getDebugStr(start, "开单规则耗时", res.getDebug());
|
|
|
+ } catch (Exception e) {
|
|
|
+ String errMsg = StringUtil.isNotBlank(indicationPushVO.getIdNum()) ?
|
|
|
+ "行号【" + indicationPushVO.getIdNum() + "】" : "";
|
|
|
+ log.error("【开单规则出错】" + errMsg, e);
|
|
|
+ CoreUtil.getDebugStr("【开单规则出错】", errMsg + e, res.getDebug());
|
|
|
+ }
|
|
|
return res;
|
|
|
}
|
|
|
return null;
|
|
@@ -90,8 +108,13 @@ public class IndicationAggregate {
|
|
|
IndicationDTO res = new IndicationDTO();
|
|
|
// 高风险提示
|
|
|
if (indicationPushVO != null && indicationPushVO.getRuleTypeList().contains("3")) {
|
|
|
- highRiskFacade.highRiskFac(indicationPushVO, wordCrfDTO, res);
|
|
|
- CoreUtil.getDebugStr(start, "高风险提示耗时", res.getDebug());
|
|
|
+ try {
|
|
|
+ highRiskFacade.highRiskFac(indicationPushVO, wordCrfDTO, res);
|
|
|
+ CoreUtil.getDebugStr(start, "高风险提示耗时", res.getDebug());
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("【高风险提示出错】", e);
|
|
|
+ CoreUtil.getDebugStr("【高风险提示出错】", e, res.getDebug());
|
|
|
+ }
|
|
|
return res;
|
|
|
}
|
|
|
return null;
|
|
@@ -111,9 +134,40 @@ public class IndicationAggregate {
|
|
|
IndicationDTO res = new IndicationDTO();
|
|
|
// 危急值提示
|
|
|
if (indicationPushVO != null && indicationPushVO.getRuleTypeList().contains("1")) {
|
|
|
- criticalFacade.criticalFac(indicationPushVO, wordCrfDTO, res);
|
|
|
- CoreUtil.getDebugStr(start, "危急值提示耗时", res.getDebug());
|
|
|
- return res;
|
|
|
+ try {
|
|
|
+ criticalFacade.criticalFac(indicationPushVO, wordCrfDTO, res);
|
|
|
+ CoreUtil.getDebugStr(start, "危急值提示耗时", res.getDebug());
|
|
|
+ return res;
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("【危急值提示出错】", e);
|
|
|
+ CoreUtil.getDebugStr("【危急值提示出错】", e, res.getDebug());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 其他提示
|
|
|
+ *
|
|
|
+ * @param wordCrfDTO
|
|
|
+ * @param indicationPushVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @DataProvider("otherTip")
|
|
|
+ public IndicationDTO otherTip(@InvokeParameter("wordCrfDTO") WordCrfDTO wordCrfDTO,
|
|
|
+ @InvokeParameter("indicationPushVO") IndicationPushVO indicationPushVO) {
|
|
|
+ long start = System.currentTimeMillis();
|
|
|
+ IndicationDTO res = new IndicationDTO();
|
|
|
+ // 其他提示
|
|
|
+ if (indicationPushVO != null && indicationPushVO.getRuleTypeList().contains("4")) {
|
|
|
+ try {
|
|
|
+ otherTipFacade.otherTipFac(indicationPushVO, wordCrfDTO, res);
|
|
|
+ CoreUtil.getDebugStr(start, "其他值提示耗时", res.getDebug());
|
|
|
+ return res;
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("【其他值提示出错】", e);
|
|
|
+ CoreUtil.getDebugStr("【其他值提示出错】", e, res.getDebug());
|
|
|
+ }
|
|
|
}
|
|
|
return null;
|
|
|
}
|