Merge branch 'develop' of http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into zhangbb_apzl
This commit is contained in:
commit
eaa0533fe4
@ -1,15 +1,21 @@
|
||||
package com.tenwa.apzl.discount;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.amarsoft.context.ASUser;
|
||||
import com.tenwa.comm.exception.BusinessException;
|
||||
import com.tenwa.officetempalte.importcallback.impl.BaseImportExcelCallBack;
|
||||
|
||||
import jbo.app.tenwa.calc.LC_EBANK;
|
||||
import jbo.app.tenwa.customer.LB_CARDATA_COMMERCIAL_SERIES;
|
||||
|
||||
public class ModelLibraryImport extends BaseImportExcelCallBack{
|
||||
|
||||
@Override
|
||||
@ -17,10 +23,48 @@ public class ModelLibraryImport extends BaseImportExcelCallBack{
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void runAfter(ASUser CurUser, Map<String, String> model, List<BizObject> importObjects, JBOTransaction tx,
|
||||
Transaction Sqlca) throws Exception {
|
||||
// 商用车车型导入配置
|
||||
Sqlca.executeSQL(new SqlObject("{call proc_insert_shangyongche()}"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runBefore(ASUser CurUser, Map<String, String> model, List<BizObject> importObjects, JBOTransaction tx,Transaction Sqlca) throws Exception {
|
||||
/**
|
||||
* 校验本次Excel是否有重复的
|
||||
*/
|
||||
|
||||
/**
|
||||
* 校验本次导入数据在导入表是否以有
|
||||
*/
|
||||
|
||||
/**
|
||||
* 校验本次导入的数据是否以有
|
||||
*/
|
||||
Map<String,String> Ebank_Map =new HashMap<String,String>();
|
||||
List<BizObject> list=JBOFactory.createBizObjectQuery(LB_CARDATA_COMMERCIAL_SERIES.CLASS_NAME,null).getResultList(false);
|
||||
for(int i=0;i<list.size();i++) {
|
||||
Ebank_Map.put(list.get(i).getAttribute("series_name").getString(),list.get(i).getAttribute("brand_name").getString());
|
||||
}
|
||||
/*for(BizObject bo:importObjects){
|
||||
// 获取
|
||||
String ebankSn = bo.getAttribute("brand").getString();
|
||||
if(!Ebank_Map.containsKey(ebankSn)){
|
||||
error+=",【"+ebankSn+"】";
|
||||
flag=true;
|
||||
}
|
||||
}
|
||||
if(flag) {
|
||||
error = error.substring(1);
|
||||
throw new BusinessException("网银: "+error+"不存在!");
|
||||
}*/
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void runAfter(ASUser CurUser, Map<String, String> model, List<BizObject> importObjects, JBOTransaction tx,
|
||||
Transaction Sqlca) throws Exception {
|
||||
// 错误描述
|
||||
String error="";
|
||||
// 用于判断是否错
|
||||
boolean flag = false;
|
||||
// 商用车车型导入配置
|
||||
Sqlca.executeSQL(new SqlObject("{call proc_insert_shangyongche()}"));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user