Browse Source

modified by pcy 形态转换、销售发票审批

pancy 2 years ago
parent
commit
4310e7ce84

+ 65 - 0
xh/so/src/private/nc/pubimpl/so/m32/pfxx/M32PfxxPlugin.java

@@ -0,0 +1,65 @@
+/*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
+
+package nc.pubimpl.so.m32.pfxx;
+
+import nc.bs.framework.common.NCLocator;
+import nc.itf.scmpub.reference.uap.pf.PfServiceScmUtil;
+import nc.itf.uap.pf.IPFBusiAction;
+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.scmpub.res.billtype.SOBillType;
+import nc.vo.so.m32.entity.SaleInvoiceVO;
+
+public class M32PfxxPlugin extends AbstractSOPfxxPlugin
+{
+
+    public M32PfxxPlugin()
+    {
+    }
+
+    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);
+        try {
+			service.processAction(IPFActionName.APPROVE,
+			        "F3", null, retvos[0], null, null);
+		} catch (BusinessException e) {
+			// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
+			e.printStackTrace();
+			return null;
+		}
+		if(null == retvos || retvos.length == 0)
+            return null;
+        else
+            return retvos[0];
+    }
+
+    protected AggregatedValueObject update(AggregatedValueObject vo, String vopk)
+    {
+        SaleInvoiceVO updatevo[] = {
+            (SaleInvoiceVO)vo
+        };
+        SaleInvoiceVO retvos[] = (SaleInvoiceVO[])(SaleInvoiceVO[])PfServiceScmUtil.processBatch("WRITE", SOBillType.Invoice.getCode(), updatevo, null, null);
+        if(null == retvos || retvos.length == 0)
+            return null;
+        else
+            return retvos[0];
+    }
+}
+
+
+/*
+	DECOMPILATION REPORT
+
+	Decompiled from: D:\xinhe\homebak\NC65\modules\so\META-INF\lib\so_saleinvoice.jar
+	Total time: 18 ms
+	Jad reported messages/errors:
+	Exit status: 0
+	Caught exceptions:
+*/

BIN
xh/xh/classes/nc/bs/xh/impl/TransformAddImpl.class


+ 7 - 1
xh/xh/src/private/nc/bs/xh/impl/TransformAddImpl.java

@@ -18,6 +18,7 @@ import nc.bs.servlet.service.BaseServlet;
 import nc.itf.ic.m4n.ITransformMaitain;
 import nc.itf.pu.m21.IOrderMaintain;
 import nc.itf.uap.IUAPQueryBS;
+import nc.itf.uap.pf.IPFBusiAction;
 import nc.jdbc.framework.processor.ColumnProcessor;
 import nc.log.NcLog;
 import nc.vo.ic.m4n.entity.TransformHeadVO;
@@ -47,6 +48,8 @@ public class TransformAddImpl extends BaseServlet implements IHttpServletAdaptor
 			PrintWriter out = resp.getWriter();
 			vbillcode = json.getString("vbillcode");
 			checkJson(json);//·Ç¿ÕÅжÏ
+			
+			
 			InvocationInfoProxy.getInstance().setGroupId(SqlexecuteQuery("pk_group", "org_group", "code", json.getString("pk_group")));
 			InvocationInfoProxy.getInstance().setUserId(SqlexecuteQuery("cuserid", "sm_user", "user_code", json.getString("creator")));
 			
@@ -106,7 +109,10 @@ public class TransformAddImpl extends BaseServlet implements IHttpServletAdaptor
 			
 			ITransformMaitain itransform=(ITransformMaitain)NCLocator.getInstance().lookup(ITransformMaitain.class);
 			itransform.insert(transformvos);
-			out.print(formatRSJsonData("³É¹¦","",vbillcode));
+			IPFBusiAction service = NCLocator.getInstance().lookup(IPFBusiAction.class);
+			service.processAction("APPROVE",
+	                "4N", null, transformvos[0], null, null);
+			out.print(formatRSJsonData("³É¹¦","",vbillcode)); 
 			
 		} catch (Exception e) {
 			// TODO Auto-generated catch block