|
@@ -26,8 +26,13 @@ public class MinusNode extends OperatorResultNode {
|
|
|
}else if(leftStr.contains(COLON)&&rightStr.contains(COLON)){
|
|
|
return fraction(leftStr)-fraction(rightStr);
|
|
|
}
|
|
|
- if (leftValue instanceof String && StringUtils.isNumber(leftValue)) {
|
|
|
- leftValue = new BigDecimal(leftValue.toString());
|
|
|
+ if (leftValue instanceof String ) {
|
|
|
+ if(StringUtils.isNumber(leftValue)){
|
|
|
+ leftValue = new BigDecimal(leftValue.toString());
|
|
|
+ }else if(leftStr.matches(DES_REG)){
|
|
|
+ /*设计值减去实测的情况:555/555-550*/
|
|
|
+ return CustomFunction.calculate(CustomFunction.dXd(leftValue, rightValue),-1, StringUtils.getScale(rightValue),3);
|
|
|
+ }
|
|
|
}
|
|
|
if (!(leftValue instanceof Number)) {
|
|
|
return null;
|