From f18cbd40354eb0eff44667ab99ec94b2cd271840 Mon Sep 17 00:00:00 2001 From: lixuebo Date: Tue, 12 Nov 2019 14:48:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=BE=E6=AC=BE=E5=90=8E?= =?UTF-8?q?=E7=9D=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comm/CopyFileArchivingInfoTempToFormat.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src_tenwa/com/tenwa/apzl/comm/CopyFileArchivingInfoTempToFormat.java b/src_tenwa/com/tenwa/apzl/comm/CopyFileArchivingInfoTempToFormat.java index 86a7d4717..4841f18b5 100644 --- a/src_tenwa/com/tenwa/apzl/comm/CopyFileArchivingInfoTempToFormat.java +++ b/src_tenwa/com/tenwa/apzl/comm/CopyFileArchivingInfoTempToFormat.java @@ -2,14 +2,8 @@ package com.tenwa.apzl.comm; import java.util.HashMap; import java.util.Map; -import java.util.UUID; -import jbo.app.LB_FILE_ARCHIVING_INFO_TEMP; -import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; - -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; import com.tenwa.comm.util.jboutil.DataOperatorUtil; import com.tenwa.flow.baseBussion.BaseBussiness; @@ -20,12 +14,19 @@ public class CopyFileArchivingInfoTempToFormat extends BaseBussiness{ this.initBussinessParam(Sqlca); String contract_id = this.getAttribute("ContractId").toString(); String flowunid = this.getAttribute("ObjectNo").toString(); + String flowKey = this.getAttribute("FlowKey").toString(); Map fromCondtion = new HashMap(); fromCondtion.put("contract_id", contract_id); fromCondtion.put("flowunid", flowunid); - DataOperatorUtil.copySingleJBO("jbo.app.LB_FILE_ARCHIVING_INFO_TEMP", fromCondtion, "jbo.com.tenwa.lease.comm.LB_FILE_ARCHIVING_INFO", null, null, Sqlca); + + int num = Integer.valueOf(Sqlca.getString("select count(1) from LB_FILE_ARCHIVING_INFO_TEMP where FLOWUNID ='"+flowunid+"'")); + if(num==0){ + Sqlca.executeSQL(new SqlObject("insert into LB_FILE_ARCHIVING_INFO(ID,CONTRACT_ID,CONTRACT_NUMBER) values(REPLACE(UUID(),'-',''),'"+contract_id+"','"+flowKey+"')")); + }else{ + DataOperatorUtil.copySingleJBO("jbo.app.LB_FILE_ARCHIVING_INFO_TEMP", fromCondtion, "jbo.com.tenwa.lease.comm.LB_FILE_ARCHIVING_INFO", null, null, Sqlca); + } return "true"; } }