Browse Source

销售订单抛异常

pancy 2 years ago
parent
commit
e01170a1b2

+ 10 - 3
xh/so/src/private/nc/pubimpl/so/m30/pfxx/M30PfxxPlugin.java

@@ -18,6 +18,7 @@ import nc.pubimpl.so.pfxx.check.WriteBackInfoCheckRule;
 import nc.vo.pub.AggregatedValueObject;
 import nc.vo.pub.BusinessException;
 import nc.vo.pub.pf.workflow.IPFActionName;
+import nc.vo.pubapp.pattern.exception.ExceptionUtils;
 import nc.vo.so.m30.entity.SaleOrderVO;
 
 public class M30PfxxPlugin extends AbstractSOPfxxPlugin {
@@ -33,13 +34,19 @@ public class M30PfxxPlugin extends AbstractSOPfxxPlugin {
 		return rules;
 	}
 
-	protected AggregatedValueObject insert(AggregatedValueObject vo) throws BusinessException {
+	protected AggregatedValueObject insert(AggregatedValueObject vo) {
 		SaleOrderVO[] insertvo = new SaleOrderVO[]{(SaleOrderVO) vo};
 		InsertSaleOrderAction insertact = new InsertSaleOrderAction();
 		SaleOrderVO[] retvos = insertact.insert(insertvo);
 	    IPFBusiAction service = NCLocator.getInstance().lookup(IPFBusiAction.class);
-	    service.processAction(IPFActionName.APPROVE,
-			     "30", null, retvos[0], null, null);
+	    try {
+			service.processAction(IPFActionName.APPROVE,
+				     "30", null, retvos[0], null, null);
+		} catch (BusinessException e) {
+			// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
+			ExceptionUtils.wrappException(e);
+			return null;
+		}
 		return null != retvos && retvos.length != 0 ? retvos[0] : null;
 	}
 

+ 0 - 84
xh/so/src/public/nc/pubimpl/so/pfxx/AbstractSOPfxxPlugin.java

@@ -1,84 +0,0 @@
-/*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
-
-package nc.pubimpl.so.pfxx;
-
-import java.util.Iterator;
-import java.util.List;
-import nc.bs.pfxx.ISwapContext;
-import nc.bs.pfxx.plugin.AbstractPfxxPlugin;
-import nc.impl.pubapp.pattern.rule.IRule;
-import nc.vo.pfxx.auxiliary.AggxsysregisterVO;
-import nc.vo.pfxx.util.PfxxPluginUtils;
-import nc.vo.pub.*;
-import nc.vo.pubapp.pattern.pub.PubAppTool;
-
-public abstract class AbstractSOPfxxPlugin extends AbstractPfxxPlugin
-{
-
-    public AbstractSOPfxxPlugin()
-    {
-    }
-
-    public List getCheckers()
-    {
-        return checkers;
-    }
-
-    protected Object processBill(Object vo, ISwapContext swapContext, AggxsysregisterVO aggxsysvo)
-        throws BusinessException
-    {
-        AggregatedValueObject resvo = (AggregatedValueObject)vo;
-        String vopk = PfxxPluginUtils.queryBillPKBeforeSaveOrUpdate(swapContext.getBilltype(), swapContext.getDocID());
-        AggregatedValueObject returnVO = null;
-        checkBill(resvo);
-        if(PubAppTool.isNull(vopk))
-        {
-            resvo.getParentVO().setStatus(2);
-            CircularlyAccessibleValueObject arr$[] = resvo.getChildrenVO();
-            int len$ = arr$.length;
-            for(int i$ = 0; i$ < len$; i$++)
-            {
-                CircularlyAccessibleValueObject bvo = arr$[i$];
-                bvo.setStatus(2);
-            }
-
-            returnVO = insert(resvo);
-        } else
-        {
-            returnVO = update(resvo, vopk);
-        }
-        vopk = returnVO.getParentVO().getPrimaryKey();
-        PfxxPluginUtils.addDocIDVsPKContrast(swapContext.getBilltype(), swapContext.getDocID(), vopk);
-        return vopk;
-    }
-
-    protected abstract AggregatedValueObject insert(AggregatedValueObject aggregatedvalueobject) throws BusinessException;
-
-    protected abstract AggregatedValueObject update(AggregatedValueObject aggregatedvalueobject, String s);
-
-    private void checkBill(AggregatedValueObject vo)
-    {
-        if(getCheckers() != null)
-        {
-            IRule checker;
-            for(Iterator i$ = getCheckers().iterator(); i$.hasNext(); checker.process(new AggregatedValueObject[] {
-    vo
-}))
-                checker = (IRule)i$.next();
-
-        }
-    }
-
-    private List checkers;
-}
-
-
-/*
-	DECOMPILATION REPORT
-
-	Decompiled from: D:\xinhe\homebak\NC65\modules\so\lib\pubso_pub.jar
-	Total time: 18 ms
-	Jad reported messages/errors:
-	Exit status: 0
-	Caught exceptions:
-*/