apzl_leasing/src_tenwa/com/tenwa/apzl/comm/CopyFileArchivingInfoTempToFormat.java
2020-03-16 10:06:47 +08:00

33 lines
1.3 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.tenwa.apzl.comm;
import java.util.HashMap;
import java.util.Map;
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;
public class CopyFileArchivingInfoTempToFormat extends BaseBussiness{
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String contract_id = this.getAttribute("ContractId").toString();
String flowunid = this.getAttribute("ObjectNo").toString();
String flowKey = this.getAttribute("FlowKey").toString();
Map<String,String> fromCondtion = new HashMap<String, String>();
fromCondtion.put("contract_id", contract_id);
fromCondtion.put("flowunid", flowunid);
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,REMARKS) values(REPLACE(UUID(),'-',''),'"+contract_id+"','"+flowKey+"','未保存归档信息流程id"+flowunid+"')"));
}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";
}
}