Compare commits
2 Commits
c7fa2723d3
...
6eba148319
Author | SHA1 | Date |
---|---|---|
|
6eba148319 | |
|
06e7bd7acb |
|
@ -12,6 +12,7 @@ import nc.vo.mmpac.pmo.pac0002.entity.PMOAggVO;
|
|||
import nc.vo.mmpac.pmo.pac0002.entity.PMOHeadVO;
|
||||
import nc.vo.mmpac.pmo.pac0002.entity.PMOItemVO;
|
||||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pub.lang.UFDouble;
|
||||
import nc.vo.so.m30.entity.SaleOrderBVO;
|
||||
import nccloud.baseapp.core.log.NCCForUAPLogger;
|
||||
|
||||
|
@ -84,9 +85,9 @@ public class saveBeforeCheckRule implements IRule<PMOAggVO> {
|
|||
String ntotaloutnums = (ntotaloutnumsObj != null) ? ntotaloutnumsObj.toString() : "";
|
||||
double ntotaloutnum = (ntotaloutnums.isEmpty()) ? 0 : Double.parseDouble(ntotaloutnums);// 累计生产数量
|
||||
double bdnum = itemvo.getNastnum().getDouble();
|
||||
if (sQty < (ntotaloutnum + bdnum)) {
|
||||
throw new BusinessException("生产订单明细" + (i + 1) + ",累计生产数量'" + (ntotaloutnum + bdnum)
|
||||
+ "'大于销售订单累计排产申请数量'" + sQty + "',无法保存!");
|
||||
if (new UFDouble(sQty).compareTo((new UFDouble(ntotaloutnum).add(new UFDouble(bdnum)))) <0) {
|
||||
throw new BusinessException("生产订单明细" + (i + 1) + ",累计生产数量'" + (new UFDouble(ntotaloutnum).add(new UFDouble(bdnum)).toString())
|
||||
+ "'大于销售订单累计排产申请数量'" + (new UFDouble(sQty)).toString() + "',无法保存!");
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
throw new BusinessException("累计排产申请数量转化数值失败" + e);
|
||||
|
|
Loading…
Reference in New Issue