二手车车型收集

This commit is contained in:
张磊 2018-06-08 09:47:45 +08:00
parent f046b62e81
commit f5d90791e1
5 changed files with 642 additions and 43 deletions

View File

@ -3295,9 +3295,30 @@
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</class>
<class name="LB_CLEAR_FILE_RECORD" label="清算文件存盘表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识编号" type="STRING" length="32"/>
<attribute name="filepath" label="文档路径" type="STRING" length="500"/>
<attribute name="fullpath" label="文档绝对路径" type="STRING" length="500"/>
<attribute name="filename" label="文件名" type="STRING" length="250"/>
<attribute name="cleardate" label="清算日期" type="STRING" length="32"/>
<attribute name="remark" label="备注" type="STRING" length="600"/>
<attribute name="inputuserid" label="登记人" type="STRING" length="32"/>
<attribute name="inputorgid" label="登记部门" type="STRING" length="32"/>
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
<attribute name="updateuserid" label="更新人" type="STRING" length="32"/>
<attribute name="updateorgid" label="更新部门" type="STRING" length="32"/>
<attribute name="updatetime" label="更新时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_clear_file_record" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
<package name="jbo.com.tenwa.lease.carbrand" >
<class name="LB_CLAIMS_BOOK_DETAIL" label="索赔申请书详情表" keyAttributes="ID">
<attributes>
@ -3364,61 +3385,109 @@
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</class>
</package>
<package name="jbo.com.tenwa.lease.carbrand" >
<class name="LB_CAR_BRAND" label="车品牌" keyAttributes="ID">
<class name="LB_CARDATA_BRAND" label="二手车品牌" keyAttributes="ID">
<attributes>
<attribute name="ID" label="品牌ID" type="STRING" length="32"/>
<attribute name="NAME" label="品牌名称" type="STRING" length="100"/>
<attribute name="INITIALA" label="品牌首字母" type="STRING" length="2"/>
<attribute name="SORTNO" label="排序号" type="STRING" length="10"/>
<attribute name="ISSHOW" label="是否显示" type="STRING" length="10"/>
<attribute name="INTERFACTID" label="第三方ID" type="STRING" length="32"/>
<attribute name="CARIMAGE" label="图标" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="ID" label="标识编号" type="STRING" length="32"/>
<attribute name="brandid" label="品牌ID" type="STRING" length="32"/>
<attribute name="brandname" label="品牌名称" type="STRING" length="100"/>
<attribute name="brandinitial" label="品牌首字母" type="STRING" length="100"/>
<attribute name="opertype" label="操作类型" type="STRING" length="100"/>
<attribute name="modeltimestamp" label="车型时间戳" type="STRING" length="100"/>
<attribute name="seriestimestamp" label="车系时间戳" type="STRING" length="100"/>
<attribute name="brandtimestamp" label="品牌时间戳" type="STRING" length="100"/>
<attribute name="currentversion" label="当前版本号" type="STRING" length="100"/>
<attribute name="initialversion" label="最初版本号" type="STRING" length="100"/>
<attribute name="retainfield1" label="保留字段1" type="STRING" length="100"/>
<attribute name="retainfield2" label="保留字段2" type="STRING" length="100"/>
<attribute name="retainfield3" label="保留字段3" type="STRING" length="100"/>
<attribute name="inputuserid" label="登记人" type="STRING" length="32"/>
<attribute name="inputorgid" label="登记部门" type="STRING" length="32"/>
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
<attribute name="updateuserid" label="更新人" type="STRING" length="32"/>
<attribute name="updateorgid" label="更新部门" type="STRING" length="32"/>
<attribute name="updatetime" label="更新时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_CAR_BRAND" />
<property name="table" value="lb_cardata_brand" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_CARDATA_SERIES" label="二手车车系表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识编号" type="STRING" length="32"/>
<attribute name="brandid" label="品牌ID" type="STRING" length="32"/>
<attribute name="brandname" label="品牌名称" type="STRING" length="100"/>
<attribute name="seriesid" label="车系ID" type="STRING" length="32"/>
<attribute name="seriesname" label="车系名称" type="STRING" length="100"/>
<attribute name="seriesgroupname" label="车系组名" type="STRING" length="100"/>
<attribute name="levelname" label="汽车品种" type="STRING" length="100"/>
<attribute name="makertype" label="制造商类型" type="STRING" length="100"/>
<attribute name="opertype" label="操作类型" type="STRING" length="100"/>
<attribute name="modeltimestamp" label="车型时间戳" type="STRING" length="100"/>
<attribute name="seriestimestamp" label="车系时间戳" type="STRING" length="100"/>
<attribute name="brandtimestamp" label="品牌时间戳" type="STRING" length="100"/>
<attribute name="currentversion" label="当前版本号" type="STRING" length="100"/>
<attribute name="initialversion" label="最初版本号" type="STRING" length="100"/>
<attribute name="retainfield1" label="保留字段1" type="STRING" length="100"/>
<attribute name="retainfield2" label="保留字段2" type="STRING" length="100"/>
<attribute name="retainfield3" label="保留字段3" type="STRING" length="100"/>
<attribute name="inputuserid" label="登记人" type="STRING" length="32"/>
<attribute name="inputorgid" label="登记部门" type="STRING" length="32"/>
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
<attribute name="updateuserid" label="更新人" type="STRING" length="32"/>
<attribute name="updateorgid" label="更新部门" type="STRING" length="32"/>
<attribute name="updatetime" label="更新时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_cardata_series" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_CAR_BRANDSE" label="车系列表" keyAttributes="ID">
<class name="LB_CARDATA_MODEL" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="编号" type="STRING" length="32"/>
<attribute name="BRANDID" label="品牌ID" type="STRING" length="32"/>
<attribute name="SERIESNAME" label="系列名称" type="STRING" length="100"/>
<attribute name="ISSHOW" label="是否显示" type="STRING" length="2"/>
<attribute name="SORTNO" label="排序号" type="STRING" length="32"/>
<attribute name="INTERFACEID" label="第三方ID" type="STRING" length="100"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="YEAR" label="年款" type="STRING" length="100"/>
<attribute name="DISPLACEMENT" label="排量" type="STRING" length="100"/>
<attribute name="DYNAMICTYPE" label="动力类型" type="STRING" length="100"/>
<attribute name="TRANSMISSION" label="变速器" type="STRING" length="100"/>
<attribute name="DRIVE" label="驱动" type="STRING" length="100"/>
<attribute name="CONFIGURE" label="配置" type="STRING" length="100"/>
<attribute name="REDBLUELABEL" label="红蓝标" type="STRING" length="100"/>
<attribute name="GUIDANCEPRICE" label="指导价" type="STRING" length="100"/>
<attribute name="ASSETCODING" label="资产编码" type="STRING" length="100"/>
<attribute name="ASSETNAME" label="资产名称" type="STRING" length="100"/>
<attribute name="ID" label="标识编号" type="STRING" length="32"/>
<attribute name="brandid" label="品牌ID" type="STRING" length="32"/>
<attribute name="brandname" label="品牌名称" type="STRING" length="100"/>
<attribute name="seriesid" label="车系ID" type="STRING" length="32"/>
<attribute name="seriesname" label="车系名称" type="STRING" length="100"/>
<attribute name="seriesgroupname" label="车系组名" type="STRING" length="100"/>
<attribute name="modelid" label="车型ID" type="STRING" length="32"/>
<attribute name="modelname" label="车型名称" type="STRING" length="100"/>
<attribute name="price" label="指导价" type="STRING" length="100"/>
<attribute name="liter" label="排量" type="STRING" length="100"/>
<attribute name="geartype" label="变速箱" type="STRING" length="100"/>
<attribute name="modelyear" label="年款" type="STRING" length="100"/>
<attribute name="makertype" label="制造商类型" type="STRING" length="100"/>
<attribute name="dischargestandard" label="排放标准" type="STRING" length="100"/>
<attribute name="seatnumber" label="座位数" type="STRING" length="100"/>
<attribute name="minregyear" label="最小上牌年份" type="STRING" length="100"/>
<attribute name="maxregyear" label="最大上牌年份" type="STRING" length="100"/>
<attribute name="opertype" label="操作类型" type="STRING" length="100"/>
<attribute name="modeltimestamp" label="车型时间戳" type="STRING" length="100"/>
<attribute name="seriestimestamp" label="车系时间戳" type="STRING" length="100"/>
<attribute name="brandtimestamp" label="品牌时间戳" type="STRING" length="100"/>
<attribute name="currentversion" label="当前版本号" type="STRING" length="100"/>
<attribute name="initialversion" label="最初版本号" type="STRING" length="100"/>
<attribute name="retainfield1" label="保留字段1" type="STRING" length="100"/>
<attribute name="retainfield2" label="保留字段2" type="STRING" length="100"/>
<attribute name="retainfield3" label="保留字段3" type="STRING" length="100"/>
<attribute name="inputuserid" label="登记人" type="STRING" length="100"/>
<attribute name="inputorgid" label="登记部门" type="STRING" length="100"/>
<attribute name="inputtime" label="登记时间" type="STRING" length="100"/>
<attribute name="updateuserid" label="更新人" type="STRING" length="100"/>
<attribute name="updateorgid" label="更新部门" type="STRING" length="100"/>
<attribute name="updatetime" label="更新时间" type="STRING" length="100"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_CAR_BRANDSE" />
<property name="table" value="lb_cardata_model" />
<property name="createKey" value="true" />
</managerProperties>
</manager>

View File

@ -0,0 +1,92 @@
package jbo.com.tenwa.lease.carbrand;
import java.lang.String;
/**
* 二手车品牌表 - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface LB_CARDATA_BRAND{
/**
* 二手车品牌表<br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.com.tenwa.lease.carbrand.LB_CARDATA_BRAND";
/**
* 标识编号 STRING(32)<br>
*/
public static final String ID = "ID";
/**
* 品牌ID STRING(32)<br>
*/
public static final String brandid = "brandid";
/**
* 品牌名称 STRING(100)<br>
*/
public static final String brandname = "brandname";
/**
* 品牌首字母 STRING(100)<br>
*/
public static final String brandinitial = "brandinitial";
/**
* 操作类型 STRING(100)<br>
*/
public static final String opertype = "opertype";
/**
* 车型时间戳 STRING(100)<br>
*/
public static final String modeltimestamp = "modeltimestamp";
/**
* 车系时间戳 STRING(100)<br>
*/
public static final String seriestimestamp = "seriestimestamp";
/**
* 品牌时间戳 STRING(100)<br>
*/
public static final String brandtimestamp = "brandtimestamp";
/**
* 当前版本号 STRING(100)<br>
*/
public static final String currentversion = "currentversion";
/**
* 最初版本号 STRING(100)<br>
*/
public static final String initialversion = "initialversion";
/**
* 保留字段1 STRING(100)<br>
*/
public static final String retainfield1 = "retainfield1";
/**
* 保留字段2 STRING(100)<br>
*/
public static final String retainfield2 = "retainfield2";
/**
* 保留字段3 STRING(100)<br>
*/
public static final String retainfield3 = "retainfield3";
/**
* 登记人 STRING(32)<br>
*/
public static final String inputuserid = "inputuserid";
/**
* 登记部门 STRING(32)<br>
*/
public static final String inputorgid = "inputorgid";
/**
* 登记时间 STRING(32)<br>
*/
public static final String inputtime = "inputtime";
/**
* 更新人 STRING(32)<br>
*/
public static final String updateuserid = "updateuserid";
/**
* 更新部门 STRING(32)<br>
*/
public static final String updateorgid = "updateorgid";
/**
* 更新时间 STRING(32)<br>
*/
public static final String updatetime = "updatetime";
}

View File

@ -0,0 +1,144 @@
package jbo.com.tenwa.lease.carbrand;
import java.lang.String;
/**
* - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface LB_CARDATA_MODEL{
/**
* <br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.com.tenwa.lease.carbrand.LB_CARDATA_MODEL";
/**
* 标识编号 STRING(32)<br>
*/
public static final String ID = "ID";
/**
* 品牌ID STRING(32)<br>
*/
public static final String brandid = "brandid";
/**
* 品牌名称 STRING(100)<br>
*/
public static final String brandname = "brandname";
/**
* 车系ID STRING(32)<br>
*/
public static final String seriesid = "seriesid";
/**
* 车系名称 STRING(100)<br>
*/
public static final String seriesname = "seriesname";
/**
* 车系组名 STRING(100)<br>
*/
public static final String seriesgroupname = "seriesgroupname";
/**
* 车型ID STRING(32)<br>
*/
public static final String modelid = "modelid";
/**
* 车型名称 STRING(100)<br>
*/
public static final String modelname = "modelname";
/**
* 指导价 STRING(100)<br>
*/
public static final String price = "price";
/**
* 排量 STRING(100)<br>
*/
public static final String liter = "liter";
/**
* 变速箱 STRING(100)<br>
*/
public static final String geartype = "geartype";
/**
* 年款 STRING(100)<br>
*/
public static final String modelyear = "modelyear";
/**
* 制造商类型 STRING(100)<br>
*/
public static final String makertype = "makertype";
/**
* 排放标准 STRING(100)<br>
*/
public static final String dischargestandard = "dischargestandard";
/**
* 座位数 STRING(100)<br>
*/
public static final String seatnumber = "seatnumber";
/**
* 最小上牌年份 STRING(100)<br>
*/
public static final String minregyear = "minregyear";
/**
* 最大上牌年份 STRING(100)<br>
*/
public static final String maxregyear = "maxregyear";
/**
* 操作类型 STRING(100)<br>
*/
public static final String opertype = "opertype";
/**
* 车型时间戳 STRING(100)<br>
*/
public static final String modeltimestamp = "modeltimestamp";
/**
* 车系时间戳 STRING(100)<br>
*/
public static final String seriestimestamp = "seriestimestamp";
/**
* 品牌时间戳 STRING(100)<br>
*/
public static final String brandtimestamp = "brandtimestamp";
/**
* 当前版本号 STRING(100)<br>
*/
public static final String currentversion = "currentversion";
/**
* 最初版本号 STRING(100)<br>
*/
public static final String initialversion = "initialversion";
/**
* 保留字段1 STRING(100)<br>
*/
public static final String retainfield1 = "retainfield1";
/**
* 保留字段2 STRING(100)<br>
*/
public static final String retainfield2 = "retainfield2";
/**
* 保留字段3 STRING(100)<br>
*/
public static final String retainfield3 = "retainfield3";
/**
* 登记人 STRING(100)<br>
*/
public static final String inputuserid = "inputuserid";
/**
* 登记部门 STRING(100)<br>
*/
public static final String inputorgid = "inputorgid";
/**
* 登记时间 STRING(100)<br>
*/
public static final String inputtime = "inputtime";
/**
* 更新人 STRING(100)<br>
*/
public static final String updateuserid = "updateuserid";
/**
* 更新部门 STRING(100)<br>
*/
public static final String updateorgid = "updateorgid";
/**
* 更新时间 STRING(100)<br>
*/
public static final String updatetime = "updatetime";
}

View File

@ -0,0 +1,108 @@
package jbo.com.tenwa.lease.carbrand;
import java.lang.String;
/**
* 二手车车系表 - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface LB_CARDATA_SERIES{
/**
* 二手车车系表<br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.com.tenwa.lease.carbrand.LB_CARDATA_SERIES";
/**
* 标识编号 STRING(32)<br>
*/
public static final String ID = "ID";
/**
* 品牌ID STRING(32)<br>
*/
public static final String brandid = "brandid";
/**
* 品牌名称 STRING(100)<br>
*/
public static final String brandname = "brandname";
/**
* 车系ID STRING(32)<br>
*/
public static final String seriesid = "seriesid";
/**
* 车系名称 STRING(100)<br>
*/
public static final String seriesname = "seriesname";
/**
* 车系组名 STRING(100)<br>
*/
public static final String seriesgroupname = "seriesgroupname";
/**
* 汽车品种 STRING(100)<br>
*/
public static final String levelname = "levelname";
/**
* 制造商类型 STRING(100)<br>
*/
public static final String makertype = "makertype";
/**
* 操作类型 STRING(100)<br>
*/
public static final String opertype = "opertype";
/**
* 车型时间戳 STRING(100)<br>
*/
public static final String modeltimestamp = "modeltimestamp";
/**
* 车系时间戳 STRING(100)<br>
*/
public static final String seriestimestamp = "seriestimestamp";
/**
* 品牌时间戳 STRING(100)<br>
*/
public static final String brandtimestamp = "brandtimestamp";
/**
* 当前版本号 STRING(100)<br>
*/
public static final String currentversion = "currentversion";
/**
* 最初版本号 STRING(100)<br>
*/
public static final String initialversion = "initialversion";
/**
* 保留字段1 STRING(100)<br>
*/
public static final String retainfield1 = "retainfield1";
/**
* 保留字段2 STRING(100)<br>
*/
public static final String retainfield2 = "retainfield2";
/**
* 保留字段3 STRING(100)<br>
*/
public static final String retainfield3 = "retainfield3";
/**
* 登记人 STRING(32)<br>
*/
public static final String inputuserid = "inputuserid";
/**
* 登记部门 STRING(32)<br>
*/
public static final String inputorgid = "inputorgid";
/**
* 登记时间 STRING(32)<br>
*/
public static final String inputtime = "inputtime";
/**
* 更新人 STRING(32)<br>
*/
public static final String updateuserid = "updateuserid";
/**
* 更新部门 STRING(32)<br>
*/
public static final String updateorgid = "updateorgid";
/**
* 更新时间 STRING(32)<br>
*/
public static final String updatetime = "updatetime";
}

View File

@ -0,0 +1,186 @@
package com.tenwa.lease.app.quartzmession;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.com.tenwa.lease.carbrand.LB_CARDATA_BRAND;
import jbo.com.tenwa.lease.carbrand.LB_CARDATA_MODEL;
import jbo.com.tenwa.lease.carbrand.LB_CARDATA_SERIES;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
public class QueryVehicleModeListAction implements Job{
@Override
public void execute(JobExecutionContext arg0) throws JobExecutionException {
JBOTransaction tx = null;
try {
tx = JBOFactory.createJBOTransaction();
BizObjectManager bm1 = JBOFactory.getBizObjectManager(LB_CARDATA_BRAND.CLASS_NAME, tx);
BizObjectManager bm2 = JBOFactory.getBizObjectManager(LB_CARDATA_SERIES.CLASS_NAME, tx);
BizObjectManager bm3 = JBOFactory.getBizObjectManager(LB_CARDATA_MODEL.CLASS_NAME, tx);
//url未知
/*String url = "http://api.che300.com/service/getCarModelList?token=8192047c7ab1a654eda8fbce470062f0&seriesId=";
String responseResult = VehicleAppraisementUtil.getResponseResult(url);*/
String filePath = "D://che300yasuo.txt";
String readFile = ReadJSON.ReadFile(filePath);
JSONObject object = JSONObject.parseObject(readFile);
JSONObject dataObject = (JSONObject) object.get("data");
@SuppressWarnings("rawtypes")
List<HashMap> brandList = JSON.parseArray(JSON.toJSONString(dataObject.get("brand")), HashMap.class);
System.out.println("品牌大小:"+brandList.size());
@SuppressWarnings("rawtypes")
List<HashMap> seriesList = JSON.parseArray(JSON.toJSONString(dataObject.get("series")), HashMap.class);
System.out.println("车系大小:"+seriesList.size());
@SuppressWarnings("rawtypes")
List<HashMap> modelList = JSON.parseArray(JSON.toJSONString(dataObject.get("model")), HashMap.class);
System.out.println("车型大小:"+modelList.size());
@SuppressWarnings("rawtypes")
List<HashMap> versionList = JSON.parseArray(JSON.toJSONString(dataObject.get("version")), HashMap.class);
@SuppressWarnings("unchecked")
Map<String,Object> map = versionList.get(0);
for(int i=0;i<brandList.size();i++){
if("新增".equals(brandList.get(i).get("oper_type"))){
BizObject brandObject = bm1.newObject();
brandObject.setAttributeValue("brandid",brandList.get(i).get("brand_id"));
brandObject.setAttributeValue("brandname",brandList.get(i).get("brand_name"));
brandObject.setAttributeValue("brandinitial",brandList.get(i).get("brand_initial"));
brandObject.setAttributeValue("opertype",brandList.get(i).get("oper_type"));
brandObject.setAttributeValue("modeltimestamp",map.get("ModelTimestamp"));
brandObject.setAttributeValue("seriestimestamp", map.get("SeriesTimestamp"));
brandObject.setAttributeValue("brandtimestamp", map.get("BrandTimestamp"));
brandObject.setAttributeValue("currentversion", map.get("CurrentVersion"));
brandObject.setAttributeValue("initialversion", map.get("InitialVersion"));
bm1.saveObject(brandObject);
}else if("更新".equals(brandList.get(i).get("oper_type"))){
//更新的操作
bm1.createQuery("update O set brandname="+brandList.get(i).get("brand_name")
+",brandinitial="+brandList.get(i).get("brand_initial")
+",opertype="+brandList.get(i).get("oper_type")
+",modeltimestamp="+brandList.get(i).get("ModelTimestamp")
+",seriestimestamp="+brandList.get(i).get("SeriesTimestamp")
+",brandtimestamp="+brandList.get(i).get("BrandTimestamp")
+",currentversion="+brandList.get(i).get("CurrentVersion")
+",initialversion="+brandList.get(i).get("InitialVersion")
+"where brandid="+brandList.get(i).get("brand_id")).executeUpdate();
}else{
continue;
}
}
for(int i=0;i<seriesList.size();i++){
if("新增".equals(seriesList.get(i).get("oper_type"))){
BizObject seriesObject = bm2.newObject();
seriesObject.setAttributeValue("brandid",seriesList.get(i).get("brand_id"));
seriesObject.setAttributeValue("brandname",seriesList.get(i).get("brand_name"));
seriesObject.setAttributeValue("seriesid",seriesList.get(i).get("series_id"));
seriesObject.setAttributeValue("seriesname",seriesList.get(i).get("series_name"));
seriesObject.setAttributeValue("seriesgroupname", seriesList.get(i).get("series_group_name"));
seriesObject.setAttributeValue("levelname",seriesList.get(i).get("level_name"));
seriesObject.setAttributeValue("makertype", seriesList.get(i).get("maker_type"));
seriesObject.setAttributeValue("opertype",seriesList.get(i).get("oper_type"));
seriesObject.setAttributeValue("modeltimestamp",map.get("ModelTimestamp"));
seriesObject.setAttributeValue("seriestimestamp", map.get("SeriesTimestamp"));
seriesObject.setAttributeValue("brandtimestamp", map.get("BrandTimestamp"));
seriesObject.setAttributeValue("currentversion", map.get("CurrentVersion"));
seriesObject.setAttributeValue("initialversion", map.get("InitialVersion"));
bm2.saveObject(seriesObject);
}else if("更新".equals(seriesList.get(i).get("oper_type"))){
//更新的操作
bm2.createQuery("update O set brandname="+seriesList.get(i).get("brand_name")
+",brandid="+seriesList.get(i).get("brand_id")
+",seriesname="+seriesList.get(i).get("series_name")
+",seriesgroupname="+seriesList.get(i).get("series_group_name")
+",levelname="+seriesList.get(i).get("level_name")
+",makertype="+seriesList.get(i).get("maker_type")
+",opertype="+seriesList.get(i).get("oper_type")
+",modeltimestamp="+seriesList.get(i).get("ModelTimestamp")
+",seriestimestamp="+seriesList.get(i).get("SeriesTimestamp")
+",brandtimestamp="+seriesList.get(i).get("BrandTimestamp")
+",currentversion="+seriesList.get(i).get("CurrentVersion")
+",initialversion="+seriesList.get(i).get("InitialVersion")
+"where seriesid="+seriesList.get(i).get("series_id")).executeUpdate();
}else{
continue;
}
}
for(int i=0;i<modelList.size();i++){
if("新增".equals(modelList.get(i).get("oper_type"))){
BizObject modelObject = bm3.newObject();
modelObject.setAttributeValue("brandid",modelList.get(i).get("brand_id"));
modelObject.setAttributeValue("brandname",modelList.get(i).get("brand_name"));
modelObject.setAttributeValue("seriesid",modelList.get(i).get("series_id"));
modelObject.setAttributeValue("seriesname",modelList.get(i).get("series_name"));
modelObject.setAttributeValue("seriesgroupname", modelList.get(i).get("series_group_name"));
modelObject.setAttributeValue("modelid",modelList.get(i).get("model_id"));
modelObject.setAttributeValue("modelname",modelList.get(i).get("model_name"));
modelObject.setAttributeValue("price",modelList.get(i).get("price"));
modelObject.setAttributeValue("liter",modelList.get(i).get("liter"));
modelObject.setAttributeValue("geartype",modelList.get(i).get("gear_type"));
modelObject.setAttributeValue("modelyear",modelList.get(i).get("model_year"));
modelObject.setAttributeValue("makertype", modelList.get(i).get("maker_type"));
modelObject.setAttributeValue("dischargestandard",modelList.get(i).get("discharge_standard"));
modelObject.setAttributeValue("seatnumber",modelList.get(i).get("seat_number"));
modelObject.setAttributeValue("minregyear",modelList.get(i).get("min_reg_year"));
modelObject.setAttributeValue("maxregyear",modelList.get(i).get("max_reg_year"));
modelObject.setAttributeValue("opertype",modelList.get(i).get("oper_type"));
modelObject.setAttributeValue("modeltimestamp",map.get("ModelTimestamp"));
modelObject.setAttributeValue("seriestimestamp", map.get("SeriesTimestamp"));
modelObject.setAttributeValue("brandtimestamp", map.get("BrandTimestamp"));
modelObject.setAttributeValue("currentversion", map.get("CurrentVersion"));
modelObject.setAttributeValue("initialversion", map.get("InitialVersion"));
bm3.saveObject(modelObject);
}else if("更新".equals(modelList.get(i).get("oper_type"))){
bm3.createQuery("update O set brandname="+modelList.get(i).get("brand_name")
+",brandid="+modelList.get(i).get("brand_id")
+",seriesid="+modelList.get(i).get("series_id")
+",seriesname="+modelList.get(i).get("series_name")
+",seriesgroupname="+modelList.get(i).get("series_group_name")
+",modelname="+modelList.get(i).get("model_name")
+",price="+modelList.get(i).get("price")
+",liter="+modelList.get(i).get("liter")
+",geartype="+modelList.get(i).get("gear_type")
+",modelyear="+modelList.get(i).get("model_year")
+",makertype="+modelList.get(i).get("maker_type")
+",dischargestandard="+modelList.get(i).get("discharge_standard")
+",seatnumber="+modelList.get(i).get("seat_number")
+",minregyear="+modelList.get(i).get("min_reg_year")
+",maxregyear="+modelList.get(i).get("max_reg_year")
+",opertype="+modelList.get(i).get("oper_type")
+",modeltimestamp="+modelList.get(i).get("ModelTimestamp")
+",seriestimestamp="+modelList.get(i).get("SeriesTimestamp")
+",brandtimestamp="+modelList.get(i).get("BrandTimestamp")
+",currentversion="+modelList.get(i).get("CurrentVersion")
+",initialversion="+modelList.get(i).get("InitialVersion")
+"where modelid="+modelList.get(i).get("model_id")).executeUpdate();
}else{
continue;
}
}
} catch (Exception e) {
try {
if(null != tx){
tx.rollback();
}
} catch (JBOException e1) {
e1.printStackTrace();
}
e.printStackTrace();
} finally {
try {
if(null != tx){
tx.commit();
}
} catch (JBOException e) {
e.printStackTrace();
}
}
}
}