2
0

2 Ревизии a5efd92c7b ... 77ace812a0

Автор SHA1 Съобщение Дата
  13873907256 77ace812a0 Merge branch 'master' of http://183.56.220.107:50005/WYNCC/BGYFW_NCC_CLIENT.git преди 3 години
  wenfx 7a150978b3 应收,收款中台boss重量端接口代码提交 преди 3 години

+ 9 - 0
arap_patch/META-INF/bossxt_nc_server_2022_04_13.upm

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="gb2312"?>
+<module name="arap_EJB">
+	<public>
+		<component priority="0" singleton="true" remote="true" tx="CMT" supportAlias="true">
+			<interface>nc.bs.uap.boss.process.BossWriteGatherBillInfo</interface>
+			<implementation>nc.bs.uap.twxt.process.BossWriteGatherBillInfoProcess</implementation>
+		</component>
+	</public>
+</module>

+ 9 - 0
arap_patch/META-INF/bosszt_nc_server_2022_04_15.upm

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="gb2312"?>
+<module name="arap_EJB">
+	<public>
+		<component priority="0" singleton="true" remote="true" tx="CMT" supportAlias="true">
+			<interface>nc.bs.uap.boss.process.BossWriteRecBIllInfo</interface>
+			<implementation>nc.bs.uap.twxt.process.BossWriteRecBillInfoProcess</implementation>
+		</component>
+	</public>
+</module>

+ 28 - 18
arap_patch/src/private/nc/bs/tianwen/wuye/TWGatherBillServelet.java

@@ -11,20 +11,22 @@ import javax.servlet.ServletInputStream;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import nc.bcmanage.bs.IBusiCenterManageService;
+import com.alibaba.fastjson.JSONObject;
+
 import nc.bs.framework.common.InvocationInfoProxy;
 import nc.bs.framework.common.NCLocator;
 import nc.bs.framework.comn.NetStreamContext;
 import nc.bs.framework.server.ISecurityTokenCallback;
+import nc.bs.uap.boss.process.BossWriteGatherBillInfo;
+import nc.bs.uap.twxt.process.BossWriteGatherBillInfoProcess;
 import nc.net.servlet.IReturnStatus;
 import nc.net.servlet.SapToNcEsbJsonServlet;
-import nc.pub.sap.constant.SapConstants;
 import nc.pubitf.para.SysInitQuery;
+import nc.ui.fa.newasset.view.newasset_config;
 import nc.util.uap.twxt.WYTwxtUtil;
 import nc.vo.esb.ResultEsbVO;
 import nc.vo.esb.ResultVO;
 import nc.vo.pub.BusinessException;
-import uap.json.JSONObject;
 
 /**
  * @Description: 收款单
@@ -37,8 +39,7 @@ import uap.json.JSONObject;
 public class TWGatherBillServelet extends SapToNcEsbJsonServlet {
 
 	@Override
-	public void execFunction(HttpServletRequest request,
-			HttpServletResponse response) {
+	public void execFunction(HttpServletRequest request, HttpServletResponse response) {
 		JSONObject jsonobj = null;
 		try {
 			this.initInvocationInfo();
@@ -54,8 +55,23 @@ public class TWGatherBillServelet extends SapToNcEsbJsonServlet {
 				esb.setResultInfo(result);
 				sendResponse(response, esb);
 			} else {
-				String jsondata = WYTwxtUtil.getIWuYeTwxtBusiService().writeGatherBillInfo(jsonobj);
-				sendResponse(response, jsondata);
+				JSONObject requestInfo = (JSONObject) jsonobj.get("requestInfo");
+				JSONObject head = requestInfo.getJSONObject("Header");
+				if (head.containsKey("bossid")) {
+					BossWriteGatherBillInfo bosspro=NCLocator.getInstance().lookup(BossWriteGatherBillInfo.class);
+					String jsondata =bosspro.writeGatherBillInfo(jsonobj);//boss系统分支
+					sendResponse(response, jsondata);
+				} else if (head.containsKey("ztId")) {
+					BossWriteGatherBillInfo bosspro=NCLocator.getInstance().lookup(BossWriteGatherBillInfo.class);
+					String jsondata =bosspro.writeGatherBillInfo2(jsonobj);//中台系统分支
+					sendResponse(response, jsondata);
+
+				} else {
+					String jsondata = WYTwxtUtil.getIWuYeTwxtBusiService().writeGatherBillInfo((
+							new uap.json.JSONObject(jsonobj.toString())
+							));
+					sendResponse(response, jsondata);
+				}
 			}
 		} catch (Exception e) {
 			ResultVO result = new ResultVO();
@@ -87,8 +103,7 @@ public class TWGatherBillServelet extends SapToNcEsbJsonServlet {
 		PrintWriter out = null;
 		try {
 			response.setHeader("Content-type", "application/json;charset=UTF-8");
-			out = new PrintWriter(new OutputStreamWriter(
-					response.getOutputStream(), "UTF-8"));
+			out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), "UTF-8"));
 			out.write(jsondata);
 			out.flush();
 		} catch (IOException e) {
@@ -107,18 +122,16 @@ public class TWGatherBillServelet extends SapToNcEsbJsonServlet {
 	 * @return
 	 * @throws Exception
 	 */
-	private JSONObject findPostJsonValue(final HttpServletRequest request)
-			throws Exception {
+	private JSONObject findPostJsonValue(final HttpServletRequest request) throws Exception {
 		BufferedReader br = null;
 		try {
-			br = new BufferedReader(new InputStreamReader(
-					(ServletInputStream) request.getInputStream(), "utf-8"));
+			br = new BufferedReader(new InputStreamReader((ServletInputStream) request.getInputStream(), "utf-8"));
 			StringBuffer sb = new StringBuffer();
 			String temp = null;
 			while ((temp = br.readLine()) != null) {
 				sb.append(temp);
 			}
-			return new JSONObject(sb.toString());
+			return JSONObject.parseObject(sb.toString());
 		} catch (Exception e) {
 			throw e;
 		} finally {
@@ -132,12 +145,9 @@ public class TWGatherBillServelet extends SapToNcEsbJsonServlet {
 	}
 
 	private void initInvocationInfo() throws BusinessException {
-		IBusiCenterManageService busiCenterManageService=NCLocator.getInstance().lookup(IBusiCenterManageService.class);
-		InvocationInfoProxy.getInstance().setUserDataSource(busiCenterManageService.getAvailableBusiCenterDsNames()[0]);
 		InvocationInfoProxy.getInstance().setGroupId(SysInitQuery.getParaString("GLOBLE00000000000000", "GROUP"));
 		InvocationInfoProxy.getInstance().setUserId(SysInitQuery.getParaString("GLOBLE00000000000000", "ITFUSER"));
-		ISecurityTokenCallback tc = NCLocator.getInstance().lookup(
-				ISecurityTokenCallback.class);
+		ISecurityTokenCallback tc = NCLocator.getInstance().lookup(ISecurityTokenCallback.class);
 		byte[] token = tc.token("__system".getBytes(), "NC".getBytes());
 		NetStreamContext.setToken(token);
 	}

+ 26 - 18
arap_patch/src/private/nc/bs/tianwen/wuye/TWRecBillServelet.java

@@ -11,20 +11,20 @@ import javax.servlet.ServletInputStream;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import nc.bcmanage.bs.IBusiCenterManageService;
+import com.alibaba.fastjson.JSONObject;
+
 import nc.bs.framework.common.InvocationInfoProxy;
 import nc.bs.framework.common.NCLocator;
 import nc.bs.framework.comn.NetStreamContext;
 import nc.bs.framework.server.ISecurityTokenCallback;
+import nc.bs.uap.boss.process.BossWriteRecBIllInfo;
 import nc.net.servlet.IReturnStatus;
 import nc.net.servlet.SapToNcEsbJsonServlet;
-import nc.pub.sap.constant.SapConstants;
 import nc.pubitf.para.SysInitQuery;
 import nc.util.uap.twxt.WYTwxtUtil;
 import nc.vo.esb.ResultEsbVO;
 import nc.vo.esb.ResultVO;
 import nc.vo.pub.BusinessException;
-import uap.json.JSONObject;
 
 /**
  * @Description: 应收单
@@ -37,8 +37,7 @@ import uap.json.JSONObject;
 public class TWRecBillServelet extends SapToNcEsbJsonServlet {
 
 	@Override
-	public void execFunction(HttpServletRequest request,
-			HttpServletResponse response) {
+	public void execFunction(HttpServletRequest request, HttpServletResponse response) {
 		JSONObject jsonobj = null;
 		try {
 			initInvocationInfo();
@@ -54,8 +53,23 @@ public class TWRecBillServelet extends SapToNcEsbJsonServlet {
 				esb.setResultInfo(result);
 				sendResponse(response, esb);
 			} else {
-				String jsondata =WYTwxtUtil.getIWuYeTwxtBusiService().writeRecbillInfo(jsonobj);
-				sendResponse(response,jsondata);
+				JSONObject requestInfo = jsonobj.getJSONObject("requestInfo");
+				JSONObject head = requestInfo.getJSONObject("Header");
+				if (head.containsKey("bossid")) {
+					BossWriteRecBIllInfo bosspro=NCLocator.getInstance().lookup(BossWriteRecBIllInfo.class);
+					String jsondata =bosspro.writeRecBillInfo(jsonobj);//boss系统分支
+					sendResponse(response, jsondata);
+					
+				} else if (head.containsKey("ztId")) {
+					BossWriteRecBIllInfo bosspro=NCLocator.getInstance().lookup(BossWriteRecBIllInfo.class);
+					String jsondata =bosspro.writeRecBillInfo2(jsonobj);//中台系统分支
+					sendResponse(response, jsondata);
+					
+				} else {
+					String jsondata = WYTwxtUtil.getIWuYeTwxtBusiService().writeRecbillInfo(
+							new uap.json.JSONObject(jsonobj.toString()));
+					sendResponse(response, jsondata);
+				}
 			}
 		} catch (Exception e) {
 			ResultVO result = new ResultVO();
@@ -87,8 +101,7 @@ public class TWRecBillServelet extends SapToNcEsbJsonServlet {
 		PrintWriter out = null;
 		try {
 			response.setHeader("Content-type", "application/json;charset=UTF-8");
-			out = new PrintWriter(new OutputStreamWriter(
-					response.getOutputStream(), "UTF-8"));
+			out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), "UTF-8"));
 			out.write(jsondata);
 			out.flush();
 		} catch (IOException e) {
@@ -107,18 +120,16 @@ public class TWRecBillServelet extends SapToNcEsbJsonServlet {
 	 * @return
 	 * @throws Exception
 	 */
-	private JSONObject findPostJsonValue(final HttpServletRequest request)
-			throws Exception {
+	private JSONObject findPostJsonValue(final HttpServletRequest request) throws Exception {
 		BufferedReader br = null;
 		try {
-			br = new BufferedReader(new InputStreamReader(
-					(ServletInputStream) request.getInputStream(),"utf-8"));
+			br = new BufferedReader(new InputStreamReader((ServletInputStream) request.getInputStream(), "utf-8"));
 			StringBuffer sb = new StringBuffer();
 			String temp = null;
 			while ((temp = br.readLine()) != null) {
 				sb.append(temp);
 			}
-			return new JSONObject(sb.toString());
+			return JSONObject.parseObject(sb.toString());
 		} catch (Exception e) {
 			throw e;
 		} finally {
@@ -132,12 +143,9 @@ public class TWRecBillServelet extends SapToNcEsbJsonServlet {
 	}
 
 	private void initInvocationInfo() throws BusinessException {
-		IBusiCenterManageService busiCenterManageService=NCLocator.getInstance().lookup(IBusiCenterManageService.class);
-		InvocationInfoProxy.getInstance().setUserDataSource(busiCenterManageService.getAvailableBusiCenterDsNames()[0]);
 		InvocationInfoProxy.getInstance().setGroupId(SysInitQuery.getParaString("GLOBLE00000000000000", "GROUP"));
 		InvocationInfoProxy.getInstance().setUserId(SysInitQuery.getParaString("GLOBLE00000000000000", "ITFUSER"));
-		ISecurityTokenCallback tc = NCLocator.getInstance().lookup(
-				ISecurityTokenCallback.class);
+		ISecurityTokenCallback tc = NCLocator.getInstance().lookup(ISecurityTokenCallback.class);
 		byte[] token = tc.token("__system".getBytes(), "NC".getBytes());
 		NetStreamContext.setToken(token);
 	}

+ 243 - 0
arap_patch/src/private/nc/bs/uap/twxt/process/BossWriteGatherBillInfoProcess.java

@@ -0,0 +1,243 @@
+package nc.bs.uap.twxt.process;
+
+import com.alibaba.fastjson.JSONObject;
+
+import nc.bs.dao.BaseDAO;
+import nc.bs.framework.common.InvocationInfoProxy;
+import nc.bs.uap.boss.process.BossWriteGatherBillInfo;
+import nc.jdbc.framework.processor.ColumnProcessor;
+import nc.net.servlet.IReturnStatus;
+import nc.pubitf.para.SysInitQuery;
+import nc.util.uap.twxt.WYTwxtUtil;
+import nc.vo.arap.gathering.AggGatheringBillVO;
+import nc.vo.arap.gathering.GatheringBillItemVO;
+import nc.vo.arap.gathering.GatheringBillVO;
+import nc.vo.baseapp.jsontool.JsonTransfVOUtil;
+import nc.vo.baseapp.jsontool.ParamVO;
+import nc.vo.esb.ResultEsbVO;
+import nc.vo.esb.ResultVO;
+import nc.vo.pub.BusinessException;
+import nc.vo.pubapp.pattern.data.ValueUtils;
+import nc.vo.pubapp.pattern.exception.ExceptionUtils;
+import nc.vo.twxt.log.WYTwxtLogVO;
+
+/**
+ * @Description: boss系统,中台系统->NC
+ * @author xuy
+ * @date 2022-04-13
+ */
+public class BossWriteGatherBillInfoProcess implements BossWriteGatherBillInfo {
+	/**
+	 * boss系统收款单接收流程
+	 * */
+	@SuppressWarnings("unchecked")
+	public String writeGatherBillInfo(JSONObject jsonobj) throws BusinessException {
+		String rsdata = null;
+		Object pk_bill=null;
+		Object bossid=null;
+		String pk_tradetype = null;
+		ResultVO result = new ResultVO();
+		result.setResult("");
+		ResultEsbVO<ResultVO> esb = new ResultEsbVO<ResultVO>();
+		esb.setResultInfo(result);
+		try {
+			if (jsonobj == null || "".equals(jsonobj.toString())) {// 无Post提交值
+				result.setCode(IReturnStatus.FAILING);// 失败
+				result.setMessage("Post所提交请求Json格式错误或者无值!");
+				WYTwxtUtil.createResultEsbVO(esb);
+				esb.getEsbInfo().setReturnStatus(IReturnStatus.ESB_FAILING);
+				esb.getEsbInfo().setReturnMsg("失败");
+				esb.setResultInfo(result);
+			} else {
+				JSONObject requestInfo = (JSONObject) jsonobj.get("requestInfo");
+				if(requestInfo == null){
+					throw new Exception("收款单信息不能为空!");
+				}
+				InvocationInfoProxy.getInstance().setGroupId(SysInitQuery.getParaString("GLOBLE00000000000000", "GROUP"));
+				InvocationInfoProxy.getInstance().setUserId(SysInitQuery.getParaString("GLOBLE00000000000000", "ITFUSER"));
+				JSONObject headerJsonObject =requestInfo.getJSONObject("Header");
+				bossid =headerJsonObject.get("bossid");
+
+				String sql="select count(def1) from ar_gatherbill where def1 = '"+bossid+"' and nvl(dr, 0) = 0";
+
+				BaseDAO baseDAO=new BaseDAO();
+				Object count=baseDAO.executeQuery(sql, new ColumnProcessor());
+
+				if(ValueUtils.getInt(count)>0){
+					result.setCode(IReturnStatus.SUCCEED);// 成功
+					result.setMessage("Boss系统同步收款单成功");
+					com.alibaba.fastjson.JSONObject resJsonObject=new com.alibaba.fastjson.JSONObject();
+					resJsonObject.put("billno", null);
+					result.setResult(resJsonObject);
+					WYTwxtUtil.createResultEsbVO(esb);
+					esb.setResultInfo(result);
+					rsdata =com.alibaba.fastjson.JSONObject.toJSONString(esb);
+					return rsdata;
+				}
+
+				ParamVO paramVO=new ParamVO();
+				paramVO.setAggVOClass(AggGatheringBillVO.class);
+				paramVO.setHeadVOClass(GatheringBillVO.class);
+				paramVO.setBodyVOClass(GatheringBillItemVO.class);
+				paramVO.setBilldata(requestInfo.toString());
+				paramVO.sethCfgCode("bossF2_HEAD");//bossF2_HEAD
+				paramVO.setBfgCode("bossF2_BODY");//bossF2_BODY
+				
+				AggGatheringBillVO aggGatheringBillVO=JsonTransfVOUtil.json2AggVO(paramVO);
+				
+				// 转换前非空校验、执行公式、翻译后各项非空校验
+				JsonTransfVOUtil.notNullCheckAndExFormula("bossF2_HEAD", "bossF2_BODY", aggGatheringBillVO);
+				pk_tradetype=aggGatheringBillVO.getHeadVO().getPk_tradetype();
+				aggGatheringBillVO.getHeadVO().setDef1(null==bossid?null:bossid.toString());//设置bossid到def1
+				//保存应收计提单
+				Object saveObject=WYTwxtUtil.getIPFBusiAction().processAction("SAVE", aggGatheringBillVO.getHeadVO().getPk_tradetype(), null, aggGatheringBillVO, null, null);
+				pk_bill=aggGatheringBillVO.getPrimaryKey();
+//				InvocationInfoProxy.getInstance().setUserId(SysInitQuery.getParaString("GLOBLE00000000000000", "ITFUSER"));
+				aggGatheringBillVO.getHeadVO().setApprovedated(aggGatheringBillVO.getHeadVO().getBilldate());
+				InvocationInfoProxy.getInstance().setBizDateTime(aggGatheringBillVO.getHeadVO().getBilldate().getMillis());
+				WYTwxtUtil.getIPFBusiAction().processAction("APPROVE", aggGatheringBillVO.getHeadVO().getPk_tradetype(), null, aggGatheringBillVO, null, null);
+				result.setCode(IReturnStatus.SUCCEED);// 成功
+				result.setMessage("Boss系统同步收款单成功");
+				com.alibaba.fastjson.JSONObject resJsonObject=new com.alibaba.fastjson.JSONObject();
+				resJsonObject.put("billno", aggGatheringBillVO.getHeadVO().getBillno());
+				result.setResult(resJsonObject);
+				WYTwxtUtil.createResultEsbVO(esb);
+				esb.setResultInfo(result);
+				
+			}
+		} catch (Exception e) {
+			result.setCode(IReturnStatus.ERROR);// 异常
+			result.setError(WYTwxtUtil.getExceptionDetail(e));
+			result.setMessage(null == bossid ? null : bossid.toString()+":"+e.getMessage());
+			WYTwxtUtil.createResultEsbVO(esb);// 初始化响应对象
+			esb.getEsbInfo().setReturnStatus(IReturnStatus.ESB_ERROR);
+			esb.getEsbInfo().setReturnMsg("异常");
+			esb.setResultInfo(result);// 设置响应内容
+			ExceptionUtils.marsh(e);
+		} finally {
+			rsdata =com.alibaba.fastjson.JSONObject.toJSONString(esb);
+			WYTwxtLogVO logVO=new WYTwxtLogVO();
+			
+			logVO.setNc_id(pk_bill+"");
+			logVO.setOther_id(bossid +"");
+			logVO.setBillno("");
+			logVO.setTranstypecode(pk_tradetype+"");
+			logVO.setItfcode("BO-NC-FI-002");
+			logVO.setItfname("【物业Boss接口】新增收款单");
+			logVO.setBilldata(jsonobj == null ? "" : jsonobj.toString());
+			logVO.setRsdata(rsdata);
+			logVO.setMsg(null);
+			logVO.setIssuccess(IReturnStatus.SUCCEED.equals(result.getCode()) ? "Y" : "N");
+
+			WYTwxtUtil.getIWuYeTwxtLogService().insertLog_RequiresNew(logVO);
+		}
+		return rsdata;
+	}
+	/**
+	    * 中台系统收款单接收流程
+	 * */
+	@SuppressWarnings("unchecked")
+	public String writeGatherBillInfo2(JSONObject jsonobj) throws BusinessException {
+		String rsdata = null;
+		Object pk_bill=null;
+		Object ztid=null;
+		String def19=null;
+		String pk_tradetype = null;
+		ResultVO result = new ResultVO();
+		result.setResult("");
+		ResultEsbVO<ResultVO> esb = new ResultEsbVO<ResultVO>();
+		esb.setResultInfo(result);
+		try {
+			if (jsonobj == null || "".equals(jsonobj.toString())) {// 无Post提交值
+				result.setCode(IReturnStatus.FAILING);// 失败
+				result.setMessage("Post所提交请求Json格式错误或者无值!");
+				WYTwxtUtil.createResultEsbVO(esb);
+				esb.getEsbInfo().setReturnStatus(IReturnStatus.ESB_FAILING);
+				esb.getEsbInfo().setReturnMsg("失败");
+				esb.setResultInfo(result);
+			} else {
+				JSONObject requestInfo = (JSONObject) jsonobj.get("requestInfo");
+				if(requestInfo == null){
+					throw new Exception("收款单信息不能为空!");
+				}
+				InvocationInfoProxy.getInstance().setGroupId(SysInitQuery.getParaString("GLOBLE00000000000000", "GROUP"));
+				InvocationInfoProxy.getInstance().setUserId(SysInitQuery.getParaString("GLOBLE00000000000000", "ITFZTUSER"));
+				JSONObject headerJsonObject =requestInfo.getJSONObject("Header");
+				ztid =headerJsonObject.get("ztId");
+				def19=headerJsonObject.getString("def19");
+				String sql="select count(def1) from ar_gatherbill where def1 = '"+ztid+"' and nvl(dr, 0) = 0";
+
+				BaseDAO baseDAO=new BaseDAO();
+				Object count=baseDAO.executeQuery(sql, new ColumnProcessor());
+
+				if(ValueUtils.getInt(count)>0){
+					result.setCode(IReturnStatus.SUCCEED);// 成功
+					result.setMessage("中台系统同步收款单成功");
+					com.alibaba.fastjson.JSONObject resJsonObject=new com.alibaba.fastjson.JSONObject();
+					resJsonObject.put("billno", null);
+					result.setResult(resJsonObject);
+					WYTwxtUtil.createResultEsbVO(esb);
+					esb.setResultInfo(result);
+					rsdata =com.alibaba.fastjson.JSONObject.toJSONString(esb);
+					return rsdata;
+				}
+
+				ParamVO paramVO=new ParamVO();
+				paramVO.setAggVOClass(AggGatheringBillVO.class);
+				paramVO.setHeadVOClass(GatheringBillVO.class);
+				paramVO.setBodyVOClass(GatheringBillItemVO.class);
+				paramVO.setBilldata(requestInfo.toString());
+				paramVO.sethCfgCode("ZTF2_HEAD");
+				paramVO.setBfgCode("ZTF2_BODY");
+				
+				AggGatheringBillVO aggGatheringBillVO=JsonTransfVOUtil.json2AggVO(paramVO);
+				
+				// 转换前非空校验、执行公式、翻译后各项非空校验
+				JsonTransfVOUtil.notNullCheckAndExFormula("ZTF2_HEAD", "ZTF2_BODY", aggGatheringBillVO);
+				pk_tradetype=aggGatheringBillVO.getHeadVO().getPk_tradetype();
+				aggGatheringBillVO.getHeadVO().setDef1(null==ztid?null:ztid.toString());//设置ztid到def1
+				//保存应收计提单
+				Object saveObject=WYTwxtUtil.getIPFBusiAction().processAction("SAVE", aggGatheringBillVO.getHeadVO().getPk_tradetype(), null, aggGatheringBillVO, null, null);
+				pk_bill=aggGatheringBillVO.getPrimaryKey();
+//				InvocationInfoProxy.getInstance().setUserId(SysInitQuery.getParaString("GLOBLE00000000000000", "ITFUSER"));
+				aggGatheringBillVO.getHeadVO().setApprovedated(aggGatheringBillVO.getHeadVO().getBilldate());
+				InvocationInfoProxy.getInstance().setBizDateTime(aggGatheringBillVO.getHeadVO().getBilldate().getMillis());
+				WYTwxtUtil.getIPFBusiAction().processAction("APPROVE", aggGatheringBillVO.getHeadVO().getPk_tradetype(), null, aggGatheringBillVO, null, null);
+				result.setCode(IReturnStatus.SUCCEED);// 成功
+				result.setMessage("中台系统同步收款单成功");
+				com.alibaba.fastjson.JSONObject resJsonObject=new com.alibaba.fastjson.JSONObject();
+				resJsonObject.put("billno", aggGatheringBillVO.getHeadVO().getBillno());
+				result.setResult(resJsonObject);
+				WYTwxtUtil.createResultEsbVO(esb);
+				esb.setResultInfo(result);
+				
+			}
+		} catch (Exception e) {
+			result.setCode(IReturnStatus.ERROR);// 异常
+			result.setError(WYTwxtUtil.getExceptionDetail(e));
+			result.setMessage(null == def19 ? null : def19.toString()+":"+e.getMessage());
+			WYTwxtUtil.createResultEsbVO(esb);// 初始化响应对象
+			esb.getEsbInfo().setReturnStatus(IReturnStatus.ESB_ERROR);
+			esb.getEsbInfo().setReturnMsg("异常");
+			esb.setResultInfo(result);// 设置响应内容
+		} finally {
+			rsdata =com.alibaba.fastjson.JSONObject.toJSONString(esb);
+			WYTwxtLogVO logVO=new WYTwxtLogVO();
+			
+			logVO.setNc_id(pk_bill+"");
+			logVO.setOther_id(ztid +"");
+			logVO.setBillno("");
+			logVO.setTranstypecode(pk_tradetype+"");
+			logVO.setItfcode("ZT-NC-FI-002");
+			logVO.setItfname("【物业中台Boss接口】新增收款单");
+			logVO.setBilldata(jsonobj == null ? "" : jsonobj.toString());
+			logVO.setRsdata(rsdata);
+			logVO.setMsg(null);
+			logVO.setIssuccess(IReturnStatus.SUCCEED.equals(result.getCode()) ? "Y" : "N");
+
+			WYTwxtUtil.getIWuYeTwxtLogService().insertLog_RequiresNew(logVO);
+		}
+		return rsdata;
+	}
+
+}

+ 291 - 0
arap_patch/src/private/nc/bs/uap/twxt/process/BossWriteRecBillInfoProcess.java

@@ -0,0 +1,291 @@
+package nc.bs.uap.twxt.process;
+
+import com.alibaba.fastjson.JSONObject;
+
+import nc.bs.dao.BaseDAO;
+import nc.bs.framework.common.InvocationInfoProxy;
+import nc.bs.framework.common.NCLocator;
+import nc.bs.resa.sql.SqlUtil;
+import nc.bs.uap.boss.process.BossWriteRecBIllInfo;
+import nc.bs.uap.lock.PKLock;
+import nc.impl.pubapp.env.BSContext;
+import nc.jdbc.framework.processor.ColumnProcessor;
+import nc.net.servlet.IReturnStatus;
+import nc.pubitf.arap.receivable.IArapReceivableBillPubQueryService;
+import nc.pubitf.para.SysInitQuery;
+import nc.util.mmf.framework.base.MMVOUtil;
+import nc.util.mmf.framework.base.MMValueConvert;
+import nc.util.uap.twxt.WYTwxtUtil;
+import nc.vo.arap.receivable.AggReceivableBillVO;
+import nc.vo.arap.receivable.ReceivableBillItemVO;
+import nc.vo.arap.receivable.ReceivableBillVO;
+import nc.vo.baseapp.jsontool.JsonTransfVOUtil;
+import nc.vo.baseapp.jsontool.ParamVO;
+import nc.vo.esb.ResultEsbVO;
+import nc.vo.esb.ResultVO;
+import nc.vo.pub.BusinessException;
+import nc.vo.pubapp.pattern.data.ValueUtils;
+import nc.vo.pubapp.pattern.exception.ExceptionUtils;
+import nc.vo.twxt.log.WYTwxtLogVO;
+
+/**
+ * 中台,boss系统应收单写入实现
+ * 
+ * @author xuy
+ * @date 2022-04-15
+ * 
+ */
+public class BossWriteRecBillInfoProcess implements BossWriteRecBIllInfo {
+
+	/**
+	 * 
+	 * Boss系统实现
+	 */
+	public String writeRecBillInfo(JSONObject jsonobj) throws BusinessException {
+		String rsdata = null;
+		ResultVO result = new ResultVO();
+		// result.setResult("");
+		ResultEsbVO<ResultVO> esb = new ResultEsbVO<ResultVO>();
+		esb.setResultInfo(result);
+		Object pk_bill = null;// 唯一标识
+		AggReceivableBillVO aggVO = null;
+		String pk_tradetype = null;
+		Object bossid = null;
+		try {
+			if (jsonobj == null || "".equals(jsonobj.toString())) {// 无Post提交值
+				result.setCode(IReturnStatus.FAILING);// 失败
+				result.setMessage("Post所提交请求Json格式错误或者无值!");
+				WYTwxtUtil.createResultEsbVO(esb);
+				esb.getEsbInfo().setReturnStatus(IReturnStatus.ESB_FAILING);
+				esb.getEsbInfo().setReturnMsg("失败");
+				esb.setResultInfo(result);
+			} else {
+				jsonobj.toString().getBytes("utf-8");
+				JSONObject requestInfo = (JSONObject) jsonobj.get("requestInfo");
+				if (requestInfo == null) {
+					throw new Exception("应收单信息不能为空!");
+				}
+				JSONObject headerJsonObject = requestInfo.getJSONObject("Header");
+				bossid = headerJsonObject.get("bossid");
+
+				String sql = "select count(def1) from ar_recbill where def1 = '" + bossid + "' and nvl(dr, 0) = 0";
+
+				BaseDAO baseDAO = new BaseDAO();
+				Object count = baseDAO.executeQuery(sql, new ColumnProcessor());
+
+				if (ValueUtils.getInt(count) > 0) {
+					result.setCode(IReturnStatus.SUCCEED);// 成功
+					com.alibaba.fastjson.JSONObject resJsonObject = new com.alibaba.fastjson.JSONObject();
+					resJsonObject.put("billno", null);
+					result.setResult(resJsonObject);
+					result.setMessage("Boss系统同步NCC应收单成功");
+					WYTwxtUtil.createResultEsbVO(esb);
+					esb.setResultInfo(result);
+					rsdata = com.alibaba.fastjson.JSONObject.toJSONString(esb);
+					return rsdata;
+				}
+
+				ParamVO paramVO = new ParamVO();
+				paramVO.setAggVOClass(AggReceivableBillVO.class);
+				paramVO.setHeadVOClass(ReceivableBillVO.class);
+				paramVO.setBodyVOClass(ReceivableBillItemVO.class);
+				paramVO.setBilldata(requestInfo.toString());
+				paramVO.sethCfgCode("bossF0_HEAD");
+				paramVO.setBfgCode("bossF0_BODY");
+
+				AggReceivableBillVO receivableBillVO = JsonTransfVOUtil.json2AggVO(paramVO);
+				// 转换前非空校验、执行公式、翻译后各项非空校验
+				JsonTransfVOUtil.notNullCheckAndExFormula("bossF0_HEAD", "bossF0_BODY", receivableBillVO);
+				pk_tradetype = receivableBillVO.getHeadVO().getPk_tradetype();
+				receivableBillVO.getHeadVO().setDef1(null == bossid ? null : bossid.toString());// 设置ztid到def1
+				String actionName = "SAVE";
+				sql = "select o.def13 from bd_customer cust inner join org_orgs o on cust.code=o.code where o.isbusinessunit='Y' and  "
+						+ SqlUtil.buildInSql("cust.pk_customer",
+								MMVOUtil.getStrValue(receivableBillVO.getBodyVOs(), "customer"), true);
+				Object isonlinesap = baseDAO.executeQuery(sql, new ColumnProcessor());
+				if ("F0-Cxx-D38".equals(pk_tradetype) && MMValueConvert.toUFBoolean(isonlinesap).booleanValue()) {
+					BSContext.getInstance().setSession("issapconfirm", "Y");
+					InvocationInfoProxy.getInstance().setProperty("issapconfirm", "Y");
+				}
+				WYTwxtUtil.getIPFBusiAction().processAction(actionName, receivableBillVO.getHeadVO().getPk_tradetype(),
+						null, receivableBillVO, null, null);
+
+				pk_bill = receivableBillVO.getPrimaryKey();
+				PKLock.getInstance().releaseDynamicLocks();
+				PKLock.getInstance().releaseLock(pk_bill.toString(), InvocationInfoProxy.getInstance().getUserId(),
+						InvocationInfoProxy.getInstance().getUserDataSource());
+				IArapReceivableBillPubQueryService service = NCLocator.getInstance()
+						.lookup(IArapReceivableBillPubQueryService.class);
+				receivableBillVO = service.findBillByPrimaryKey(new String[] { pk_bill.toString() })[0];
+				PKLock.getInstance().releaseLock(pk_bill.toString(), InvocationInfoProxy.getInstance().getUserId(),
+						InvocationInfoProxy.getInstance().getUserDataSource());
+				receivableBillVO.getHeadVO().setApprovedated(receivableBillVO.getHeadVO().getBilldate());
+				InvocationInfoProxy.getInstance()
+						.setBizDateTime(receivableBillVO.getHeadVO().getBilldate().getMillis());
+				WYTwxtUtil.getIPFBusiAction().processAction("APPROVE", receivableBillVO.getHeadVO().getPk_tradetype(),
+						null, receivableBillVO, null, null);
+
+				result.setCode(IReturnStatus.SUCCEED);// 成功
+				com.alibaba.fastjson.JSONObject resJsonObject = new com.alibaba.fastjson.JSONObject();
+				resJsonObject.put("billno", receivableBillVO.getHeadVO().getBillno());
+				result.setResult(resJsonObject);
+				result.setMessage("Boss系统同步NCC应收单成功");
+				WYTwxtUtil.createResultEsbVO(esb);
+				esb.setResultInfo(result);
+			}
+		} catch (Exception e) {
+			result.setCode(IReturnStatus.ERROR);// 异常
+			result.setError(WYTwxtUtil.getExceptionDetail(e));
+			result.setMessage(null == bossid ? null : bossid.toString()+":"+e.getMessage());
+			WYTwxtUtil.createResultEsbVO(esb);// 初始化响应对象
+			esb.getEsbInfo().setReturnStatus(IReturnStatus.ESB_ERROR);
+			esb.getEsbInfo().setReturnMsg("异常");
+			esb.setResultInfo(result);// 设置响应内容
+//			ExceptionUtils.marsh(e);
+		} finally {
+			rsdata = com.alibaba.fastjson.JSONObject.toJSONString(esb);
+			WYTwxtLogVO logVO = new WYTwxtLogVO();
+
+			logVO.setNc_id(pk_bill + "");
+			logVO.setOther_id(bossid + "");
+			logVO.setBillno("");
+			logVO.setTranstypecode(pk_tradetype);
+			logVO.setItfcode("BO-NC-FI-001");
+			logVO.setItfname("【物业Boss接口】新增应收计提/应收单");
+			logVO.setBilldata(jsonobj == null ? "" : jsonobj.toString());
+			logVO.setRsdata(rsdata);
+			logVO.setMsg(null);
+			logVO.setIssuccess(IReturnStatus.SUCCEED.equals(result.getCode()) ? "Y" : "N");
+			WYTwxtUtil.getIWuYeTwxtLogService().insertLog_RequiresNew(logVO);
+		}
+		return rsdata;
+	}
+
+	/**
+	 * 
+	 * 中台系统实现
+	 */
+	public String writeRecBillInfo2(JSONObject jsonobj) throws BusinessException {
+		String rsdata = null;
+		ResultVO result = new ResultVO();
+		// result.setResult("");
+		ResultEsbVO<ResultVO> esb = new ResultEsbVO<ResultVO>();
+		esb.setResultInfo(result);
+		Object pk_bill = null;// 唯一标识
+		AggReceivableBillVO aggVO = null;
+		String pk_tradetype = null;
+		Object ztid = null;
+		String def28=null;
+		try {
+			if (jsonobj == null || "".equals(jsonobj.toString())) {// 无Post提交值
+				result.setCode(IReturnStatus.FAILING);// 失败
+				result.setMessage("Post所提交请求Json格式错误或者无值!");
+				WYTwxtUtil.createResultEsbVO(esb);
+				esb.getEsbInfo().setReturnStatus(IReturnStatus.ESB_FAILING);
+				esb.getEsbInfo().setReturnMsg("失败");
+				esb.setResultInfo(result);
+			} else {
+				jsonobj.toString().getBytes("utf-8");
+				JSONObject requestInfo = jsonobj.getJSONObject("requestInfo");
+				if (requestInfo == null) {
+					throw new Exception("应收单信息不能为空!");
+				}
+				InvocationInfoProxy.getInstance().setGroupId(SysInitQuery.getParaString("GLOBLE00000000000000", "GROUP"));
+				InvocationInfoProxy.getInstance().setUserId(SysInitQuery.getParaString("GLOBLE00000000000000", "ITFZTUSER"));
+				JSONObject headerJsonObject = requestInfo.getJSONObject("Header");
+				ztid = headerJsonObject.get("ztId");
+				def28=headerJsonObject.getString("def28");
+				String sql = "select count(def1) from ar_recbill where def1 = '" + ztid + "' and nvl(dr, 0) = 0";
+
+				BaseDAO baseDAO = new BaseDAO();
+				Object count = baseDAO.executeQuery(sql, new ColumnProcessor());
+
+				if (ValueUtils.getInt(count) > 0) {
+					result.setCode(IReturnStatus.SUCCEED);// 成功
+					com.alibaba.fastjson.JSONObject resJsonObject = new com.alibaba.fastjson.JSONObject();
+					resJsonObject.put("billno", null);
+					result.setResult(resJsonObject);
+					result.setMessage("中台系统同步NCC应收单成功");
+					WYTwxtUtil.createResultEsbVO(esb);
+					esb.setResultInfo(result);
+					rsdata = com.alibaba.fastjson.JSONObject.toJSONString(esb);
+					return rsdata;
+				}
+
+				ParamVO paramVO = new ParamVO();
+				paramVO.setAggVOClass(AggReceivableBillVO.class);
+				paramVO.setHeadVOClass(ReceivableBillVO.class);
+				paramVO.setBodyVOClass(ReceivableBillItemVO.class);
+				paramVO.setBilldata(requestInfo.toString());
+				paramVO.sethCfgCode("ZTF0_HEAD");
+				paramVO.setBfgCode("ZTF0_BODY");
+
+				AggReceivableBillVO receivableBillVO = JsonTransfVOUtil.json2AggVO(paramVO);
+				// 转换前非空校验、执行公式、翻译后各项非空校验
+				JsonTransfVOUtil.notNullCheckAndExFormula("ZTF0_HEAD", "ZTF0_BODY", receivableBillVO);
+				pk_tradetype = receivableBillVO.getHeadVO().getPk_tradetype();
+				receivableBillVO.getHeadVO().setDef1(null == ztid ? null : ztid.toString());// 设置ztid到def1
+				String actionName = "SAVE";
+				sql = "select o.def13 from bd_customer cust inner join org_orgs o on cust.code=o.code where o.isbusinessunit='Y' and  "
+						+ SqlUtil.buildInSql("cust.pk_customer",
+								MMVOUtil.getStrValue(receivableBillVO.getBodyVOs(), "customer"), true);
+				Object isonlinesap = baseDAO.executeQuery(sql, new ColumnProcessor());
+				if ("F0-Cxx-D38".equals(pk_tradetype) && MMValueConvert.toUFBoolean(isonlinesap).booleanValue()) {
+					BSContext.getInstance().setSession("issapconfirm", "Y");
+					InvocationInfoProxy.getInstance().setProperty("issapconfirm", "Y");
+				}
+				WYTwxtUtil.getIPFBusiAction().processAction(actionName, receivableBillVO.getHeadVO().getPk_tradetype(),
+						null, receivableBillVO, null, null);
+
+				pk_bill = receivableBillVO.getPrimaryKey();
+				PKLock.getInstance().releaseDynamicLocks();
+				PKLock.getInstance().releaseLock(pk_bill.toString(), InvocationInfoProxy.getInstance().getUserId(),
+						InvocationInfoProxy.getInstance().getUserDataSource());
+				IArapReceivableBillPubQueryService service = NCLocator.getInstance()
+						.lookup(IArapReceivableBillPubQueryService.class);
+				receivableBillVO = service.findBillByPrimaryKey(new String[] { pk_bill.toString() })[0];
+				PKLock.getInstance().releaseLock(pk_bill.toString(), InvocationInfoProxy.getInstance().getUserId(),
+						InvocationInfoProxy.getInstance().getUserDataSource());
+				receivableBillVO.getHeadVO().setApprovedated(receivableBillVO.getHeadVO().getBilldate());
+				InvocationInfoProxy.getInstance()
+						.setBizDateTime(receivableBillVO.getHeadVO().getBilldate().getMillis());
+				WYTwxtUtil.getIPFBusiAction().processAction("APPROVE", receivableBillVO.getHeadVO().getPk_tradetype(),
+						null, receivableBillVO, null, null);
+
+				result.setCode(IReturnStatus.SUCCEED);// 成功
+				com.alibaba.fastjson.JSONObject resJsonObject = new com.alibaba.fastjson.JSONObject();
+				resJsonObject.put("billno", receivableBillVO.getHeadVO().getBillno());
+				result.setResult(resJsonObject);
+				result.setMessage("中台系统同步NCC应收单成功");
+				WYTwxtUtil.createResultEsbVO(esb);
+				esb.setResultInfo(result);
+			}
+		} catch (Exception e) {
+			result.setCode(IReturnStatus.ERROR);// 异常
+			result.setError(WYTwxtUtil.getExceptionDetail(e));
+			result.setMessage(null == def28 ? null : def28.toString()+":"+e.getMessage());
+			WYTwxtUtil.createResultEsbVO(esb);// 初始化响应对象
+			esb.getEsbInfo().setReturnStatus(IReturnStatus.ESB_ERROR);
+			esb.getEsbInfo().setReturnMsg("异常");
+			esb.setResultInfo(result);// 设置响应内容
+//			ExceptionUtils.marsh(e);
+		} finally {
+			rsdata = com.alibaba.fastjson.JSONObject.toJSONString(esb);
+			WYTwxtLogVO logVO = new WYTwxtLogVO();
+
+			logVO.setNc_id(pk_bill + "");
+			logVO.setOther_id(ztid + "");
+			logVO.setBillno("");
+			logVO.setTranstypecode(pk_tradetype);
+			logVO.setItfcode("ZT-NC-FI-001");
+			logVO.setItfname("【物业中台接口】新增应收计提/应收单");
+			logVO.setBilldata(jsonobj == null ? "" : jsonobj.toString());
+			logVO.setRsdata(rsdata);
+			logVO.setMsg(null);
+			logVO.setIssuccess(IReturnStatus.SUCCEED.equals(result.getCode()) ? "Y" : "N");
+			WYTwxtUtil.getIWuYeTwxtLogService().insertLog_RequiresNew(logVO);
+		}
+		return rsdata;
+	}
+
+}

+ 14 - 0
arap_patch/src/public/nc/bs/uap/boss/process/BossWriteGatherBillInfo.java

@@ -0,0 +1,14 @@
+package nc.bs.uap.boss.process;
+
+import com.alibaba.fastjson.JSONObject;
+
+import nc.vo.pub.BusinessException;
+/**
+ * @Description: bossϵͳ,ÖÐ̨ϵͳ->NC
+ * @author xuy
+ * @date 2022-04-13
+ */
+public interface BossWriteGatherBillInfo {
+	public String writeGatherBillInfo(JSONObject jsonobj) throws BusinessException;
+	public String writeGatherBillInfo2(JSONObject jsonobj) throws BusinessException;
+}

+ 12 - 0
arap_patch/src/public/nc/bs/uap/boss/process/BossWriteRecBIllInfo.java

@@ -0,0 +1,12 @@
+package nc.bs.uap.boss.process;
+
+import com.alibaba.fastjson.JSONObject;
+
+import nc.vo.pub.BusinessException;
+/**
+ * bossÖÐ̨Á÷³Ì½Ó¿Ú
+ * */
+public interface BossWriteRecBIllInfo {
+	public String writeRecBillInfo(JSONObject jsonobj) throws BusinessException;
+	public String writeRecBillInfo2(JSONObject jsonobj) throws BusinessException;
+}

+ 22 - 12
arap_patch/src/public/nc/vo/baseapp/jsontool/JsonTransfVOUtil.java

@@ -14,6 +14,10 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+
 import nc.bs.framework.common.NCLocator;
 import nc.bs.uap.tools.formula.ExtFormulaParser;
 import nc.itf.uap.IUAPQueryBS;
@@ -35,13 +39,12 @@ import nc.vo.pubapp.pattern.data.ValueUtils;
 import nc.vo.sap.syproconfig.SyProConfigBVO;
 import nccloud.commons.lang.ArrayUtils;
 import nccloud.commons.lang.StringUtils;
-import uap.json.JSONArray;
-import uap.json.JSONObject;
+
 
 public class JsonTransfVOUtil {
 	public static <T extends AggregatedValueObject> T json2AggVO(ParamVO paramVO) throws Exception {
 		String billdata = paramVO.getBilldata();
-		JSONObject data = new JSONObject(billdata);
+		JSONObject data =  JSONObject.parseObject(billdata);
 		if(data == null||MMStringUtil.isEmpty(data.toString())) {
 			return null;
 		}
@@ -65,13 +68,14 @@ public class JsonTransfVOUtil {
 		
 		String hval=null;
 		for(String wbcode:hsap_code){
-			if(!headJsonObject.has(wbcode.toLowerCase())){
+			if(!headJsonObject.containsKey(wbcode.toLowerCase())){
 				continue;
 			}
 			hval=headJsonObject.get(wbcode.toLowerCase())+"";
 			transfMap.put(htranNCcodeMap.get(wbcode),hval);
 		}
-		JSONObject headJson = new JSONObject(transfMap);
+		String json = JSON.toJSONString(transfMap);
+		JSONObject headJson = JSONObject.parseObject(json);
 		JSONArray bodyitems = (JSONArray) data.get("Items");
 		if (headJson == null || bodyitems == null) {
 			return null;
@@ -79,19 +83,21 @@ public class JsonTransfVOUtil {
 		//±íÍ·ÉèÖµ
 		setValue(headVO,headJson);
 		//±íÌåVO
-		bodyVOs =(CircularlyAccessibleValueObject[]) Array.newInstance(bodyVOClass,bodyitems.length());
-		for (int j = 0; j < bodyitems.length(); j++) {
+		bodyVOs =(CircularlyAccessibleValueObject[]) Array.newInstance(bodyVOClass,bodyitems.size());
+		for (int j = 0; j < bodyitems.size(); j++) {
 			transfMap=new HashMap<String,String>();
 			bodyJsonObj = (JSONObject) bodyitems.get(j);
 			String value=null;
 			for(String wbcode:bsap_code){
-				if(!bodyJsonObj.has(wbcode.toLowerCase())){
+				if(!bodyJsonObj.containsKey(wbcode.toLowerCase())){
 					continue;
 				}
 				value=bodyJsonObj.get(wbcode.toLowerCase())+"";
 				transfMap.put(btranNCcodeMap.get(wbcode),value);
 			}
-			bodyJsonObj=new JSONObject(transfMap);
+
+			String jsonbody = JSON.toJSONString(transfMap);
+			bodyJsonObj = JSONObject.parseObject(jsonbody);
 			
 			if (bodyJsonObj == null) {
 				continue;
@@ -121,7 +127,11 @@ public class JsonTransfVOUtil {
 		String attributeName;
 		String type;
 		Object value;
-		Iterator<String> it = (Iterator<String>) jaonObject.keys();
+		Iterator<String> it =null;
+		
+		Set itSet=jaonObject.keySet();
+		it=itSet.iterator();
+		
 		while (it.hasNext()) {
 			attributeName = it.next();
 			if (MMStringUtil.isEmpty(attributeName)) {
@@ -138,7 +148,7 @@ public class JsonTransfVOUtil {
 			if(type==null){
 				vo.setAttributeValue(attributeName, value);
 			}else if ("Integer".equals(type)) {
-					value=jaonObject.optInt(attributeName);
+					value=jaonObject.getInteger(attributeName);
 				for(int m=0;m<methods.length;m++){
 					if(methods[m].getName().toLowerCase().equals("set"+attributeName)){
 						vo.getClass().getMethod(methods[m].getName(),methods[m].getParameterTypes()[0]).invoke(vo, new Object[]{Integer.parseInt(value.toString())});
@@ -146,7 +156,7 @@ public class JsonTransfVOUtil {
 					}
 				}
 			} else if ("UFDouble".equals(type)) {
-				vo.setAttributeValue(attributeName, new UFDouble(jaonObject.optDouble(attributeName)));
+				vo.setAttributeValue(attributeName, new UFDouble(jaonObject.getDouble(attributeName)));
 			} else if ("UFBoolean".equals(type)) {
 				vo.setAttributeValue(attributeName, new UFBoolean(value.toString()));
 			} else if ("UFDate".equals(type)) {