|
@@ -7,9 +7,7 @@ import com.diagbot.dto.NodeNeoDTO;
|
|
|
import com.diagbot.util.CoreUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -26,8 +24,7 @@ public class LisRule {
|
|
|
* @param billNeoMaxDTO
|
|
|
* @return
|
|
|
*/
|
|
|
- public static BillMsg compareLisWithBill(List<Lis> inputLis, BillNeoMaxDTO billNeoMaxDTO) {
|
|
|
- List<String> msgList = new ArrayList<>();
|
|
|
+ public static void compareLisWithBill(List<Lis> inputLis, BillNeoMaxDTO billNeoMaxDTO, List<BillMsg> billMsgList) {
|
|
|
List<NodeNeoDTO> neoList = billNeoMaxDTO.getLis();
|
|
|
if(ListUtil.isNotEmpty(neoList) && ListUtil.isNotEmpty(inputLis)){
|
|
|
for (NodeNeoDTO neo : neoList) {
|
|
@@ -36,26 +33,27 @@ public class LisRule {
|
|
|
if (StringUtil.isNotBlank(val) && val.equals(neo.getName())) {
|
|
|
String val_name = lis.getDetailName();
|
|
|
// 如果有结果数据,就不用比较数值
|
|
|
+ String message = "";
|
|
|
+ boolean flag = false;
|
|
|
if (StringUtil.isNotBlank(lis.getResult())) {
|
|
|
- boolean flag = CoreUtil.compareStr(neo, lis.getResult());
|
|
|
+ flag = CoreUtil.compareStr(neo, lis.getResult());
|
|
|
if (flag) {
|
|
|
- msgList.add(CoreUtil.getStrMsg(neo, val_name, lis.getResult()));
|
|
|
+ message = CoreUtil.getStrMsg(neo, val_name, lis.getResult());
|
|
|
}
|
|
|
} else if (lis.getValue() != null) {
|
|
|
- boolean flag = CoreUtil.compareNum(neo, lis.getValue());
|
|
|
+ flag = CoreUtil.compareNum(neo, lis.getValue());
|
|
|
if (flag) {
|
|
|
- msgList.add(CoreUtil.getNumMsg(neo, val_name, lis.getValue(), lis.getUnits()));
|
|
|
+ message = CoreUtil.getNumMsg(neo, val_name, lis.getValue(), lis.getUnits());
|
|
|
}
|
|
|
}
|
|
|
+ if (flag) {
|
|
|
+ BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(),
|
|
|
+ billNeoMaxDTO.getOrderStandName(), message, message);
|
|
|
+ billMsgList.add(commonBillMsg);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (ListUtil.isNotEmpty(msgList)){
|
|
|
- String message = StringUtils.join(msgList, ",");
|
|
|
- BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(),billNeoMaxDTO.getOrderStandName(),message,null);
|
|
|
- return commonBillMsg;
|
|
|
- }
|
|
|
- return null;
|
|
|
}
|
|
|
}
|