From e3f724c9fd36995c207a6ed173849c20aaa2e3d7 Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期二, 17 十二月 2024 13:06:22 +0800
Subject: [PATCH] update

---
 jrj/xframe/vbusiness/vutil/publiccode.vutil.vbusiness.hpp |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/jrj/xframe/vbusiness/vutil/publiccode.vutil.vbusiness.hpp b/jrj/xframe/vbusiness/vutil/publiccode.vutil.vbusiness.hpp
index fb10202..5d151dd 100644
--- a/jrj/xframe/vbusiness/vutil/publiccode.vutil.vbusiness.hpp
+++ b/jrj/xframe/vbusiness/vutil/publiccode.vutil.vbusiness.hpp
@@ -2,7 +2,7 @@
 
 #include <wobject/xwin.hpp>
 #include <wobject/xurl.hpp>
-
+#include <memory.h>
 struct PUser
 {
 	string id;
@@ -46,7 +46,7 @@
 	}
 
 	//取当前用户
-	static PUser GetUser(xstring id)
+	static PUser& GetUser(xstring id)
 	{
 		string userno = xaserver::GetUserNo();
 		//trace(userno);
@@ -61,6 +61,7 @@
 		//trace(L"---%s",x.GetXml());
 		KXMLDOMElement e = x.documentElement();
 		PUser& p = *(new PUser);
+		::memset(&p, 0,sizeof(PUser));
 		if (e)
 		{
 			if (e.selectSingleNode(L"任职"))	p.id = e.selectSingleNode(L"任职").text();
@@ -91,7 +92,7 @@
 		}
 		return p;
 	}
-	static PUser GetUser()
+	static PUser& GetUser()
 	{
 		return GetUser(L"");
 	}
@@ -101,7 +102,7 @@
 	{
 		/*
 		if (sOrgID == "") return "4.2";
-		xml x = new xml;
+		xml 
 		x.setNativePointer(xml::CreateInstance());
 		xaserverarg args=new xaserverarg;
 		args.setNativePointer(args.CreateInstance());
@@ -235,10 +236,10 @@
 
 	static KXMLDOMDocument getAssignment(string sguid, KXMLDOMDocument x)
 	{
-		//xml x = new xml;
+		//xml 
 		//x.setNativePointer(xml::CreateInstance());		
 		xaserverarg arg;
-		arg.setNativePointer(arg.CreateInstance());
+		
 		arg.AddArg(L"AssignmentID", sguid);
 		if (xaserver::ExecXQuery(L"", L"[getAssignment.xq]", arg.GetString(), x) == 1)
 		{

--
Gitblit v1.9.3