|
|
|
@ -95,13 +95,10 @@ public class QualityDispatchNumberServiceImpl implements QualityDispatchNumberSe
|
|
|
|
|
if(StrUtil.isNotEmpty(planNum)){ |
|
|
|
|
// 计算 ((planNum-exceptionNum)/planNum)*100 保留两位小数
|
|
|
|
|
int planNumInt = Convert.toInt(planNum); |
|
|
|
|
log.info("planNumInt:"+planNumInt); |
|
|
|
|
if (planNumInt > 0) { |
|
|
|
|
BigDecimal div = NumberUtil.div(NumberUtil.sub(planNum, exceptionNum), new BigDecimal(planNum), 2); |
|
|
|
|
BigDecimal div = NumberUtil.div(NumberUtil.mul(NumberUtil.sub(planNum, exceptionNum), 100), new BigDecimal(planNum), 2); |
|
|
|
|
String str = Convert.toStr(div); |
|
|
|
|
log.info("div:"+div); |
|
|
|
|
String s = str.replaceAll(".00", ""); |
|
|
|
|
log.info("s:"+s); |
|
|
|
|
qualityDispatchTaskVO.setPlanAccuracy(s +"%"); |
|
|
|
|
} else { |
|
|
|
|
qualityDispatchTaskVO.setPlanAccuracy("0%"); |
|
|
|
|