This commit is contained in:
lihao 2026-02-26 14:38:26 +08:00
parent dc46fc4884
commit 139979a8bf
1 changed files with 10 additions and 8 deletions

View File

@ -196,7 +196,7 @@ public class AfterPickmRecalUpdateBuyingreqRule implements IRule<PMOAggVO> {
// <EFBFBD>끓땐데-구죕셕뺍-헝뭔데-꽃뭔북谿-꽃뭔땐데-돕새데
// 꿴璂헝뭔데
String buyingreqsql = "select b.pk_praybill,b.pk_praybill_b,b.nnum,p.creationtime from po_praybill_b b left join po_praybill p on b.pk_praybill=p.pk_praybill where b.csourcebid ='" + map.get("cpickm_bid") + "' and b.dr = 0 ORDER BY \n" +
" p.creationtime DESC";
" p.creationtime ASC";
List<Map<String, Object>> buyingreq = (List<Map<String, Object>>) dao.executeQuery(buyingreqsql, new MapListProcessor());
if(checkBuyingReq(new UFDouble(map.get("nplanoutnum").toString()),buyingreq)) {
continue;
@ -336,20 +336,22 @@ public class AfterPickmRecalUpdateBuyingreqRule implements IRule<PMOAggVO> {
for (Map<String, Object> req : buyingreq) {
if(nplanoutnum.compareTo(UFDouble.ZERO_DBL)==0){
req.put("nplanoutnum", nplanoutnum);
continue;
}
if(new UFDouble((BigDecimal) req.get("nnum")).compareTo(nplanoutnum)<=0){
req.put("nplanoutnum", req.get("nnum"));
req.put("nplanoutnum", new UFDouble((BigDecimal) req.get("nnum")));
nplanoutnum=nplanoutnum.sub(new UFDouble((BigDecimal) req.get("nnum")));
}else {
req.put("nplanoutnum", UFDouble.ZERO_DBL);
}
}
if(nplanoutnum.compareTo(UFDouble.ZERO_DBL)>0){
for (Map<String, Object> req : buyingreq) {
if(new UFDouble((BigDecimal) req.get("nnum")).compareTo(UFDouble.ZERO_DBL)==0){
req.put("nplanoutnum", nplanoutnum);
nplanoutnum=nplanoutnum.sub(nplanoutnum);
}
if(nplanoutnum.compareTo(UFDouble.ZERO_DBL)==0){
req.put("nplanoutnum", nplanoutnum);
if(new UFDouble((BigDecimal) req.get("nplanoutnum")).compareTo(UFDouble.ZERO_DBL)==0){
if(nplanoutnum.compareTo(UFDouble.ZERO_DBL)>0){
req.put("nplanoutnum", nplanoutnum);
nplanoutnum=nplanoutnum.sub(nplanoutnum);
}
}
}
}