Prechádzať zdrojové kódy

销售发票抛异常

pancy 2 rokov pred
rodič
commit
e53df97122

+ 10 - 3
xh/so/src/private/nc/pubimpl/so/m32/pfxx/M32PfxxPlugin.java

@@ -9,6 +9,7 @@ import nc.pubimpl.so.pfxx.AbstractSOPfxxPlugin;
 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.scmpub.res.billtype.SOBillType;
 import nc.vo.so.m32.entity.SaleInvoiceVO;
 
@@ -19,15 +20,21 @@ public class M32PfxxPlugin extends AbstractSOPfxxPlugin
     {
     }
 
-    protected AggregatedValueObject insert(AggregatedValueObject vo) throws BusinessException
+    protected AggregatedValueObject insert(AggregatedValueObject vo)
     {
         SaleInvoiceVO insertvo[] = {
             (SaleInvoiceVO)vo
         };
         SaleInvoiceVO retvos[] = (SaleInvoiceVO[])(SaleInvoiceVO[])PfServiceScmUtil.processBatch("WRITE", SOBillType.Invoice.getCode(), insertvo, null, null);
         IPFBusiAction service = NCLocator.getInstance().lookup(IPFBusiAction.class);
-        service.processAction(IPFActionName.APPROVE,
-		        "F3", null, retvos[0], null, null);
+        try {
+			service.processAction(IPFActionName.APPROVE,
+			        "F3", null, retvos[0], null, null);
+		} catch (BusinessException e) {
+			// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
+			ExceptionUtils.wrappException(e);
+			return null;
+		}
 		if(null == retvos || retvos.length == 0)
             return null;
         else