This commit is contained in:
liuz 2018-06-16 17:49:58 +08:00
commit 537c10bb74
18 changed files with 389 additions and 213 deletions

View File

@ -260,7 +260,7 @@ function fDrawCal(iYear, iMonth, iCellWidth, iCellHeight, sDateTextSize, sDateTe
for (var w = 1; w < 7; w++) {
sReturn += ("<tr>");
for (var d = 0; d < 7; d++) {
tdClickEvent = " onClick=newTask("+myMonth[w][d][0]+","+myMonth[w][d][1]+","+myMonth[w][d][2]+") ";
// tdClickEvent = " onClick=newTask("+myMonth[w][d][0]+","+myMonth[w][d][1]+","+myMonth[w][d][2]+") ";
if(myMonth[w][d][0] == iYear&&myMonth[w][d][1] == iMonth){
gstype = 'CURSOR:Hand;FONT-FAMILY:Arial;COLOR:#000000;FONT-SIZE:" + sDateTextSize + ";FONT-WEIGHT:" + sDateTextWeight + "';
}else{

View File

@ -7,11 +7,11 @@
*/
ASObjectModel doTemp = new ASObjectModel("LM_DISTRIBUTOR_TO_PRODUCT");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
String distributorId = CurPage.getParameter("DISTRIBUTOR_ID");
String typeno = CurPage.getParameter("TYPENO");
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(10);
dwTemp.genHTMLObjectWindow(distributorId);
dwTemp.genHTMLObjectWindow(typeno);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
@ -20,17 +20,15 @@
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function newRecord(){
var Return = "<%=CurUser.getUserID()%>@~<%=CurUser.getOrgID()%>@~<%=StringFunction.getTodayNow()%>@~<%=distributorId%>@~";
AsDialog.OpenSelector("DistributeProductList","distributorid,<%=distributorId%>","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
function newRecord(){
var Return = "<%=CurUser.getUserID()%>@~<%=CurUser.getOrgID()%>@~<%=StringFunction.getTodayNow()%>@~<%=typeno%>@~";
AsDialog.OpenSelector("DistributeProductList","typeno,<%=typeno%>","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
//alert(sReturn);
Return =Return+sReturn;
sParams = "CarBrandId="+Return;
//alert(sParams);
/*
CarBrandId=admin@~
8009002@~
@ -44,7 +42,7 @@
}
reloadSelf();
},"请选择产品");
}
}
function viewAndEdit(){
var sUrl = "";
var sPara = getItemValue(0,getRow(0),'SerialNo');

View File

@ -1,20 +1,20 @@
<%@ page contentType="text/html; charset=GBK"%><%@
include file="/IncludeBegin.jsp"%><%
/*
页面说明: 示例上下联动框架页面
*/
String distributorId = CurPage.getParameter("distributorId");
%><%@include file="/Resources/CodeParts/Frame02.jsp"%>
<script type="text/javascript">
mytoptd.height=150;
OpenList();
OpenInfo();
function OpenList(){
AsControl.OpenView("/Tenwa/Apzl/PortalToCarType/LmDistributorInfo.jsp","distributorId=<%=distributorId%>","rightup");
}
function OpenInfo(){
AsControl.OpenView("/Tenwa/Apzl/PortalToCarType/LmDistributorToproductList.jsp", "DISTRIBUTOR_ID=<%=distributorId%>", "rightdown");
}
</script>
<%@ page contentType="text/html; charset=GBK"%><%@
include file="/IncludeBegin.jsp"%><%
/*
页面说明: 示例上下联动框架页面
*/
String TYPENO = CurPage.getParameter("TYPENO");
%><%@include file="/Resources/CodeParts/Frame02.jsp"%>
<script type="text/javascript">
mytoptd.height=300;
OpenList();
OpenInfo();
function OpenList(){
AsControl.OpenView("/Tenwa/Apzl/productCar/LmProductCarInfo.jsp","","rightup");
}
function OpenInfo(){
AsControl.OpenView("/Tenwa/Apzl/PortalToCarType/LmDistributorToproductList.jsp","TYPENO=<%=TYPENO%>", "rightdown");
}
</script>
<%@ include file="/IncludeEnd.jsp"%>

View File

@ -5,36 +5,55 @@
Content:
History Log:
*/
ASObjectModel doTemp = new ASObjectModel("LM_DISTRIBUTOR_LIST");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
String PG_TITLE ="汽车产品列表";
String TYPENO= CurPage.getParameter("TYPENO");
ASObjectModel doTemp = new ASObjectModel("LmProductCarList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(10);
dwTemp.genHTMLObjectWindow("");
dwTemp.genHTMLObjectWindow(TYPENO);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"false","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
{"false","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
{"false","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
//{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
//{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function newRecord(){
var sUrl = "";
var sUrl = "/Tenwa/Apzl/productCar/LmProductCarInfo.jsp";
AsControl.OpenView(sUrl,'','_self','');
}
function viewAndEdit(){
var sUrl = "/Tenwa/Apzl/productCar/LmProductUpAndDown.jsp";
var sPara = getItemValue(0,getRow(0),'TYPENO');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;
}
AsControl.OpenView(sUrl,'TYPENO=' +sPara ,'_self','');
}
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
if(getObj(0,i,"EDIT")!=null){
getObj(0,i,"EDIT").innerHTML='<a class="box" style="text-align:center;" onclick="showCar(\''+getItemValue(0,i,"ID")+'\')" style={color:#000;text-decoration:underline;}><font color="blue">&nbsp&nbsp&nbsp&nbsp&nbsp编辑</font></ a>';
if(getObj(0,i,"action")!=null){
getObj(0,i,"action").innerHTML='<a class="box" style="text-align:center;" onclick="showCar(\''+getItemValue(0,i,"TYPENO")+'\')" style={color:#000;text-decoration:underline;}><font color="blue">&nbsp&nbsp&nbsp&nbsp&nbsp编辑</font></ a>';
}
};
}
function showCar(id){
function showCar(TYPENO){
var sUrl="/Tenwa/Apzl/PortalToCarType/LmProductDistributorCar.jsp";
var param="distributorId="+id;
AsDialog.PopView(sUrl,param,"dialogWidth=800px;dialogHeight=480px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){reloadSelf();},"配置产品");
var sPara = "TYPENO="+TYPENO;
AsDialog.PopView(sUrl,sPara,"dialogWidth=1200px;dialogHeight=800px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){reloadSelf();},"配置车辆");
}
/*
function mySelectRow(){
var TYPENO = getItemValue(0,getRow(0),"TYPENO");
parent.OpenInfo(TYPENO);
//list 页面同步info页面的联动传至单击事件
}
*/
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,30 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2018-06-15
Content: 示例详情页面
History Log:
*/
String sPrevUrl = CurPage.getParameter("PrevUrl");
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "LPApplicationInfoTemp";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setColTips("", "");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid"));
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
};
sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function returnList(){
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -32,13 +32,13 @@
doTemp.setReadOnly("PROJECT_SOURCE", false);
}
String userll=null;
userll="/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp?CompClientID=";
if("01".equals(custype)){
userll="/Tenwa/Customer/Lessee/Person/LegalPersonApplicationInfo.jsp?CompClientID=";
userll="/Tenwa/Customer/Lessee/Person/LPApplicationInfoTemp.jsp?CompClientID=";
}
ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.setGroupHidden("0020");

View File

@ -39,6 +39,7 @@
<%
String sTempletNo = "BusnessApprovalApplyCreationInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setHtmlEvent("Customer_type", "onchange", "setCertType");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.genHTMLObjectWindow("");
@ -137,7 +138,6 @@
}
}
/*~[Describe=确认新增申请;InputParam=无;OutPutParam=无;]~*/
function doCreation()
{
@ -228,7 +228,6 @@
<%/*~[Describe=选择产品;]~*/%>
function selectBusinessType()
{
var carAttributes = getItemValue(0,getRow(),"carAttributes");
var leasehold = getItemValue(0,getRow(),"leasehold");
@ -241,7 +240,7 @@
return;
}
sReturn = sReturn.split("@");
// alert(sReturn);
// alert(sReturn);
setItemValue(0,0,"productId",sReturn[0]);
setItemValue(0,0,"productName",sReturn[1]);
},"请选择产品",'');
@ -254,12 +253,12 @@
return;
}
sReturn = sReturn.split("@");
// alert(sReturn);
// alert(sReturn);
setItemValue(0,0,"productId",sReturn[0]);
setItemValue(0,0,"productName",sReturn[1]);
},"请选择产品",'');
}
}
<%/*~[Describe=选择客户;]~*/%>
@ -276,9 +275,25 @@
// alert(sReturn[1]);
setItemValue(0,0,"CUSTOMERID",sReturn[0]);
setItemValue(0,0,"customername",sReturn[1]);
setCertType();
},"请选择客户",'');
}
function setCertType(){
debugger;
var customerType = getItemValue(0,0,"Customer_type");
if("01" == customerType){
// if(carType == "stock_car"){
// AsDebug.showMessage("提示","法人不允许做存量车业务","","",true);
// setItemValue(0,0,"CUSTOMERTYPE","");
// setItemValue(0,0,"CERTTYPE","");
// return;
// }
setItemValue(0,0,"certtype","Ent01");
}else if("03" == customerType){
setItemValue(0,0,"certtype","Ind01");
}
}
</script>
<%/*~END~*/%>

View File

@ -29,6 +29,8 @@
<!--为满足程序和文档分开的需要,下面指定的文档保存、下载路径一般都为绝对路径 -->
<!--FileSavePath Remark 文件保存路径 在FileSaveMode为Disk指定如果指定目录不存在则保存在WEB-INF的Upload下 -->
<FileSavePath>d:/tmp/als/Upload</FileSavePath>
<!--接口代收文件送盘、回盘位置 -->
<InterfaceFileSavePath>d:/tmp/InterFace</InterfaceFileSavePath>
<!--文件模板位置 -->
<fileTemplatePath>fileTemplate</fileTemplatePath>
<!--WorkDocSavePath Remark 格式化文档保存路径如果指定目录不存在则保存在WEB-INF的WorkDoc下 -->
@ -89,7 +91,7 @@
<!-- =======车300接口===== -->
<CAR_TOKEN>ee450692cbd24e8bacb27b6f46b4d752</CAR_TOKEN>
<CAR_TOKEN>a6b83424b55410c36415178002f8415e</CAR_TOKEN>
<CAR_BRAND>http://api.che300.com/service/getCarBrandList</CAR_BRAND>
<CAR_BRAND_SERIES>http://api.che300.com/service/getCarSeriesList
</CAR_BRAND_SERIES>

File diff suppressed because one or more lines are too long

View File

@ -178,7 +178,7 @@
<Parameter CODESCRIPT="AssureRelation" CODESOURCE="Code" COMPONENTTYPE="PRD0386" DATATYPE="4" METHODTYPE="Nothing" OPERATOR="VALUE" PARAMETERID="Relationship" PARAMETERNAME="关系" SELECTTYPE="04" STATUS="1"/>
<Parameter COMPONENTTYPE="PRD0386" DATATYPE="1" METHODTYPE="Nothing" OPERATOR="VALUE" PARAMETERID="SigningAddress" PARAMETERNAME="签约地点" STATUS="1"/>
<Parameter CODESCRIPT="InputType" CODESOURCE="Code" COMPONENTTYPE="PRD0315,PRD0380" DATATYPE="4" METHODTYPE="Nothing" OPERATOR="VALUE" PARAMETERID="InputType" PARAMETERNAME="残值输入方式" SELECTTYPE="04" STATUS="1"/>
<Parameter COMPONENTTYPE="PRD0350" DATATYPE="6" METHODTYPE="Nothing" OPERATOR="MINIMUMVALUE" PARAMETERID="IRR" PARAMETERNAME="IRR" STATUS="1"/>
<Parameter COMPONENTTYPE="PRD0350" DATATYPE="6" METHODTYPE="Nothing" OPERATOR="MINIMUMVALUE,VALUE" PARAMETERID="IRR" PARAMETERNAME="IRR" STATUS="1"/>
<Parameter COMPONENTTYPE="PRD0350" DATATYPE="2" METHODTYPE="Nothing" OPERATOR="VALUE" PARAMETERID="MoneyUpLimits" PARAMETERNAME="贷款比例上限" STATUS="1"/>
<Parameter COMPONENTTYPE="PRD0350" DATATYPE="2" METHODTYPE="Nothing" OPERATOR="VALUE" PARAMETERID="MoneyLowLimits" PARAMETERNAME="融资额下限" STATUS="1"/>
<Parameter COMPONENTTYPE="PRD0350" DATATYPE="2" METHODTYPE="Nothing" OPERATOR="VALUE" PARAMETERID="EquipUplimpits" PARAMETERNAME="融资额上限" STATUS="1"/>

View File

@ -437,6 +437,8 @@
<attribute name="FACTORY_ACCESSORIES_FINA" label="原厂配件费是否参与融资" type="STRING" length="32"/>
<attribute name="CORPUS" label="期限内本金" type="DOUBLE" length="22" scale="2"/>
<attribute name="CORPUS_RATIO" label="期限内本金比例" type="DOUBLE" length="22" scale="6"/>
<attribute name="DISCOUNT" label="贴息" type="DOUBLE" length="22" scale="6"/>
<attribute name="deposit" label="承租人风险抵押金" type="DOUBLE" length="22" scale="6"/>
</attributes>
<manager>
<managerProperties>

View File

@ -0,0 +1,14 @@
#che300 prefix
com.tenwa.zhanglei.prefix=testapi
#che300 token
#test environment
com.tenwa.zhanglei.token=a6b83424b55410c36415178002f8415e
#formal environment
#com.tenwa.zhanglei.token=0685c8275534d8d391cdaa5a5cf48c73
#che300 operationType
com.tenwa.zhanglei.oper=exportModel
#che300 initiallversion
com.tenwa.zhanglei.version=3.4.548

View File

@ -0,0 +1,31 @@
package com.amarsoft.app.awe.config;
import javax.servlet.http.HttpServlet;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.WebApplicationContext;
/**
* @author ÕÅÀÚ
* @date 2018Äê6ÔÂ14ÈÕ
*/
public class InitSecondHandCarConfig extends HttpServlet {
private static final long serialVersionUID = 1L;
public static final String PREFIX;
public static final String TOKEN;
public static final String OPER;
public static final String VERSION;
static {
WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext();
SecondHandCarProperties secondHandCarProperties = wac.getBean("secondHandCarConfig",SecondHandCarProperties.class);
TOKEN = secondHandCarProperties.getToken();
OPER = secondHandCarProperties.getOper();
PREFIX = secondHandCarProperties.getPrefix();
VERSION = secondHandCarProperties.getVersion();
}
}

View File

@ -0,0 +1,42 @@
package com.amarsoft.app.awe.config;
/**
* 二手车配置文件类
* @author 张磊
* @date 2018年6月14日
*/
public class SecondHandCarProperties {
private String prefix;
private String token;
private String oper;
private String version;
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getOper() {
return oper;
}
public void setOper(String oper) {
this.oper = oper;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}

View File

@ -132,25 +132,25 @@ public String getCarBrandId() {
String updateUserID = params[0];
String updateOrgId = params[1];
String updateTime = params[2];
String distributorId = params[3];
String productid=params[4];
String typeno = params[3];
//String productid=params[4];
int lle=0;
BizObjectManager Lmcheck = JBOFactory.getBizObjectManager(LM_DISTRIBUTOR_TO_PRODUCT.CLASS_NAME,tx);
BizObject obcheck=Lmcheck.createQuery("DISTRIBUTOR_ID=:DISTRIBUTOR_ID and PRODUCT_ID=:PRODUCT_ID")
.setParameter("DISTRIBUTOR_ID", distributorId).setParameter("PRODUCT_ID",productid).getSingleResult(false);
if(obcheck!=null){
return "error";
}
int i;
try{
for(i=4;i<params.length;i++){
BizObjectManager Lmcheck = JBOFactory.getBizObjectManager(LM_DISTRIBUTOR_TO_PRODUCT.CLASS_NAME,tx);
for(i=3;i<params.length;i++){
String brandid = params[i];
BizObject obcheck=Lmcheck.createQuery("DISTRIBUTOR_ID=:DISTRIBUTOR_ID and PRODUCT_ID=:PRODUCT_ID")
.setParameter("DISTRIBUTOR_ID", brandid).setParameter("PRODUCT_ID",typeno).getSingleResult(false);
if(obcheck!=null){
return "error";
}
String PortalToCarId=UUID.randomUUID().toString().replaceAll("-", "");
String brandid = params[i];
BizObjectManager Lmpc = JBOFactory.getBizObjectManager(LM_DISTRIBUTOR_TO_PRODUCT.CLASS_NAME,tx);
BizObject NewLmpc = Lmpc.newObject();
NewLmpc.setAttributeValue("id", PortalToCarId);
NewLmpc.setAttributeValue("product_id", brandid);
NewLmpc.setAttributeValue("distributor_id", distributorId);
NewLmpc.setAttributeValue("product_id", typeno);
NewLmpc.setAttributeValue("distributor_id", brandid);
NewLmpc.setAttributeValue("inputUserID", updateUserID);
NewLmpc.setAttributeValue("inputOrgId", updateOrgId);
NewLmpc.setAttributeValue("inputTime", updateTime);

View File

@ -3,19 +3,25 @@ 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 jbo.com.tenwa.lease.carbrand.LB_CARDATA_VERSION;
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.app.awe.config.InitSecondHandCarConfig;
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;
import com.tenwa.lease.util.VehicleAppraisementUtil;
public class QueryVehicleModeListAction implements Job{
@ -27,12 +33,25 @@ public class QueryVehicleModeListAction implements Job{
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("此处待接口通了之后再导入接口返回的JSON字符串");
BizObjectManager bm4 = JBOFactory.getBizObjectManager(LB_CARDATA_VERSION.CLASS_NAME, tx);
//接口url中的fromVersion参数
String fromVersion = null;
//开关作用是若判断为第一次调用接口保存版本信息到Version表而不是第一次调用时则将这个值变为true则更新版本表
boolean versionflag = true;
//查询二手车版本表,若为空则说明是第一次调用二手车车型库接口
BizObject versionResult = bm4.createQuery("select O.currentversion,O.initialversion from O").getSingleResult(false);
if(versionResult == null){
versionflag = false;
fromVersion = InitSecondHandCarConfig.VERSION;
}else{
fromVersion = versionResult.getAttribute("currentversion").toString();
}
String url = "http://"+InitSecondHandCarConfig.PREFIX+".che300.com/service/common/eval?fromVersion="
+fromVersion+"&token="+InitSecondHandCarConfig.TOKEN+"";
String responseResult = VehicleAppraisementUtil.getResponseResult(url);
//使用fastjson解析接口返回的json数据
JSONObject object = JSONObject.parseObject(responseResult);
JSONObject dataObject = (JSONObject) object.get("data");
@SuppressWarnings("rawtypes")
List<HashMap> brandList = JSON.parseArray(JSON.toJSONString(dataObject.get("brand")), HashMap.class);
@ -47,146 +66,146 @@ public class QueryVehicleModeListAction implements Job{
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=:BRANDNAME,brandinitial=:BRANDINITIAL"
+",opertype=:OPERTYPE,modeltimestamp=:MODELTIMESTAMP"
+",seriestimestamp=:SERIESTIMESTAMP,brandtimestamp=:BRANDTIMESTAMP"
+",currentversion=:CURRENTVERSION,initialversion=:INITIALVERSION"
+"where brandid=:BRANDID")
.setParameter("BRANDNAME", brandList.get(i).get("brand_name").toString())
.setParameter("BRANDINITIAL", brandList.get(i).get("brand_initial").toString())
.setParameter("OPERTYPE", brandList.get(i).get("oper_type").toString())
.setParameter("MODELTIMESTAMP", brandList.get(i).get("ModelTimestamp").toString())
.setParameter("SERIESTIMESTAMP", brandList.get(i).get("SeriesTimestamp").toString())
.setParameter("BRANDTIMESTAMP",brandList.get(i).get("BrandTimestamp").toString())
.setParameter("CURRENTVERSION", brandList.get(i).get("CurrentVersion").toString())
.setParameter("INITIALVERSION",brandList.get(i).get("InitialVersion").toString())
.setParameter("BRANDID", brandList.get(i).get("brand_id").toString()).executeUpdate();
}else{
continue;
}
//判断解析出的brandList是否为空,若不为空则执行
if(!brandList.isEmpty()){
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("brandtimestamp", map.get("BrandTimestamp"));
brandObject.setAttributeValue("initialversion", map.get("InitialVersion"));
bm1.saveObject(brandObject);
}else if("更新".equals(brandList.get(i).get("oper_type"))){
//更新的操作
bm1.createQuery("update O set brandname=:BRANDNAME"
+ ",brandinitial=:BRANDINITIAL"
+",opertype=:OPERTYPE"
+",brandtimestamp=:BRANDTIMESTAMP"
+",initialversion=:INITIALVERSION"
+"where brandid=:BRANDID")
.setParameter("BRANDNAME", brandList.get(i).get("brand_name").toString())
.setParameter("BRANDINITIAL", brandList.get(i).get("brand_initial").toString())
.setParameter("OPERTYPE", brandList.get(i).get("oper_type").toString())
.setParameter("BRANDTIMESTAMP",map.get("BrandTimestamp").toString())
.setParameter("INITIALVERSION",map.get("InitialVersion").toString())
.setParameter("BRANDID", brandList.get(i).get("brand_id").toString()).executeUpdate();
}else{
continue;
}
}
}
//同上理
if(!seriesList.isEmpty()){
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("seriestimestamp", map.get("SeriesTimestamp"));
seriesObject.setAttributeValue("initialversion", map.get("InitialVersion"));
bm2.saveObject(seriesObject);
}else if("更新".equals(seriesList.get(i).get("oper_type"))){
//更新的操作
bm2.createQuery("update O set brandname=:BRANDNAME"
+",brandid=:BRANDID,seriesname=:SERIESNAME,seriesgroupname=:SERIESGROUPNAME"
+",levelname=:LEVELNAME,makertype=:MAKERTYPE"
+",opertype=:OPERTYPE,seriestimestamp=:SERIESTIMESTAMP"
+",initialversion=:INITIALVERSION"
+"where seriesid=:SERIESID")
.setParameter("BRANDNAME", seriesList.get(i).get("brand_name").toString())
.setParameter("BRANDID", seriesList.get(i).get("brand_id").toString())
.setParameter("SERIESNAME", seriesList.get(i).get("series_name").toString())
.setParameter("SERIESGROUPNAME", seriesList.get(i).get("series_group_name").toString())
.setParameter("LEVELNAME", seriesList.get(i).get("level_name").toString())
.setParameter("MAKERTYPE", seriesList.get(i).get("maker_type").toString())
.setParameter("OPERTYPE", seriesList.get(i).get("oper_type").toString())
.setParameter("SERIESTIMESTAMP", map.get("SeriesTimestamp").toString())
.setParameter("INITIALVERSION",map.get("InitialVersion").toString())
.setParameter("SERIESID", seriesList.get(i).get("series_id").toString()).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=:BRANDNAME"
+",brandid=:BRANDID,seriesname=:SERIESNAME,seriesgroupname=:SERIESGROUPNAME"
+",levelname=:LEVELNAME,makertype=:MAKERTYPE"
+",opertype=:OPERTYPE,modeltimestamp=:MODELTIMESTAMP"
+",seriestimestamp=:SERIESTIMESTAMP,brandtimestamp=:BRANDTIMESTAMP"
+",currentversion=:CURRENTVERSION,initialversion=:INITIALVERSION"
+"where seriesid=:SERIESID")
.setParameter("BRANDNAME", seriesList.get(i).get("brand_name").toString())
.setParameter("BRANDID", seriesList.get(i).get("brand_id").toString())
.setParameter("SERIESNAME", seriesList.get(i).get("series_name").toString())
.setParameter("SERIESGROUPNAME", seriesList.get(i).get("series_group_name").toString())
.setParameter("LEVELNAME", seriesList.get(i).get("level_name").toString())
.setParameter("MAKERTYPE", seriesList.get(i).get("maker_type").toString())
.setParameter("OPERTYPE", seriesList.get(i).get("oper_type").toString())
.setParameter("MODELTIMESTAMP", seriesList.get(i).get("ModelTimestamp").toString())
.setParameter("SERIESTIMESTAMP", seriesList.get(i).get("SeriesTimestamp").toString())
.setParameter("BRANDTIMESTAMP",seriesList.get(i).get("BrandTimestamp").toString())
.setParameter("CURRENTVERSION", seriesList.get(i).get("CurrentVersion").toString())
.setParameter("INITIALVERSION",seriesList.get(i).get("InitialVersion").toString())
.setParameter("SERIESID", seriesList.get(i).get("series_id").toString()).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=:BRANDNAME"
+",brandid=:BRANDID,seriesid=:SERIESID"
+ ",seriesname=:SERIESNAME,seriesgroupname=:SERIESGROUPNAME"
+",modelname=:MODELNAME,price=:PRICE"
+",liter=:LITER,geartype=:GEARTYPE,modelyear=:MODELYEAR"
+",makertype=:MAKERTYPE,dischargestandard=:DISCHARGESTANDARD"
+",seatnumber=:SEATNUMBER,minregyear=:MINREGYEAR,maxregyear=:MAXREGYEAR"
+",opertype=:OPERTYPE,modeltimestamp=:MODELTIMESTAMP"
+",seriestimestamp=:SERIESTIMESTAMP,brandtimestamp=:BRANDTIMESTAMP"
+",currentversion=:CURRENTVERSION,initialversion=:INITIALVERSION"
+"where modelid=:MODELID")
.setParameter("BRANDNAME", modelList.get(i).get("brand_name").toString())
.setParameter("BRANDID", modelList.get(i).get("brand_id").toString())
.setParameter("SERIESID", modelList.get(i).get("series_id").toString())
.setParameter("SERIESNAME", modelList.get(i).get("series_name").toString())
.setParameter("SERIESGROUPNAME", modelList.get(i).get("series_group_name").toString())
.setParameter("MODELNAME", modelList.get(i).get("model_name").toString())
.setParameter("PRICE", modelList.get(i).get("price").toString())
.setParameter("LITER", modelList.get(i).get("liter").toString())
.setParameter("GEARTYPE", modelList.get(i).get("gear_type").toString())
.setParameter("MODELYEAR", modelList.get(i).get("model_year").toString())
.setParameter("MAKERTYPE", modelList.get(i).get("maker_type").toString())
.setParameter("DISCHARGESTANDARD", modelList.get(i).get("discharge_standard").toString())
.setParameter("SEATNUMBER", modelList.get(i).get("seat_number").toString())
.setParameter("MINREGYEAR", modelList.get(i).get("min_reg_year").toString())
.setParameter("MAXREGYEAR", modelList.get(i).get("max_reg_year").toString())
.setParameter("OPERTYPE", modelList.get(i).get("oper_type").toString())
.setParameter("MODELTIMESTAMP", modelList.get(i).get("ModelTimestamp").toString())
.setParameter("SERIESTIMESTAMP", modelList.get(i).get("SeriesTimestamp").toString())
.setParameter("BRANDTIMESTAMP",modelList.get(i).get("BrandTimestamp").toString())
.setParameter("CURRENTVERSION", modelList.get(i).get("CurrentVersion").toString())
.setParameter("INITIALVERSION",modelList.get(i).get("InitialVersion").toString())
.setParameter("MODELID", modelList.get(i).get("model_id").toString()).executeUpdate();
}else{
continue;
}
}
//同上理
if(!modelList.isEmpty()){
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("initialversion", map.get("InitialVersion"));
bm3.saveObject(modelObject);
}else if("更新".equals(modelList.get(i).get("oper_type"))){
bm3.createQuery("update O set brandname=:BRANDNAME"
+",brandid=:BRANDID,seriesid=:SERIESID"
+ ",seriesname=:SERIESNAME,seriesgroupname=:SERIESGROUPNAME"
+",modelname=:MODELNAME,price=:PRICE"
+",liter=:LITER,geartype=:GEARTYPE,modelyear=:MODELYEAR"
+",makertype=:MAKERTYPE,dischargestandard=:DISCHARGESTANDARD"
+",seatnumber=:SEATNUMBER,minregyear=:MINREGYEAR,maxregyear=:MAXREGYEAR"
+",opertype=:OPERTYPE,modeltimestamp=:MODELTIMESTAMP"
+",initialversion=:INITIALVERSION"
+"where modelid=:MODELID")
.setParameter("BRANDNAME", modelList.get(i).get("brand_name").toString())
.setParameter("BRANDID", modelList.get(i).get("brand_id").toString())
.setParameter("SERIESID", modelList.get(i).get("series_id").toString())
.setParameter("SERIESNAME", modelList.get(i).get("series_name").toString())
.setParameter("SERIESGROUPNAME", modelList.get(i).get("series_group_name").toString())
.setParameter("MODELNAME", modelList.get(i).get("model_name").toString())
.setParameter("PRICE", modelList.get(i).get("price").toString())
.setParameter("LITER", modelList.get(i).get("liter").toString())
.setParameter("GEARTYPE", modelList.get(i).get("gear_type").toString())
.setParameter("MODELYEAR", modelList.get(i).get("model_year").toString())
.setParameter("MAKERTYPE", modelList.get(i).get("maker_type").toString())
.setParameter("DISCHARGESTANDARD", modelList.get(i).get("discharge_standard").toString())
.setParameter("SEATNUMBER", modelList.get(i).get("seat_number").toString())
.setParameter("MINREGYEAR", modelList.get(i).get("min_reg_year").toString())
.setParameter("MAXREGYEAR", modelList.get(i).get("max_reg_year").toString())
.setParameter("OPERTYPE", modelList.get(i).get("oper_type").toString())
.setParameter("MODELTIMESTAMP", map.get("ModelTimestamp").toString())
.setParameter("INITIALVERSION",map.get("InitialVersion").toString())
.setParameter("MODELID", modelList.get(i).get("model_id").toString()).executeUpdate();
}else{
continue;
}
}
}
if(versionflag == false){
BizObject versionObject = bm4.newObject();
versionObject.setAttributeValue("currentversion",map.get("CurrentVersion").toString());
versionObject.setAttributeValue("initialversion",map.get("InitialVersion").toString());
bm4.saveObject(versionObject);
}else{
bm4.createQuery("update O set currentversion=:CURRENTVERSION,initialversion=:INITIALVERSION")
.setParameter("CURRENTVERSION",map.get("CurrentVersion").toString())
.setParameter("INITIALVERSION",map.get("InitialVersion").toString()).executeUpdate();
}
} catch (Exception e) {
try {
if(null != tx){

View File

@ -17,6 +17,7 @@ import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE;
import com.amarsoft.app.util.ProductParamUtil;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.BizObjectQuery;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
@ -61,6 +62,7 @@ public class BusinessApprovalStartAction extends BaseFlowStartAction{
this.FlowParam.put("carSeries", getCarSeries());
}
public String getProductModel() {
return productModel;
}

View File

@ -5,11 +5,13 @@ import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import com.amarsoft.app.awe.config.InitSecondHandCarConfig;
public class VehicleAppraisementUtil {
public static String getVehicleAppraisementResponse(String modelId,String zone,String regDate,String mile){
String urlStr = "https://api.che300.com/service/getUsedCarPrice?"
+"token=ee450692cbd24e8bacb27b6f46b4d752&modelId="+modelId
String urlStr = "http://"+InitSecondHandCarConfig.PREFIX+".che300.com/service/getUsedCarPrice?"
+"token="+InitSecondHandCarConfig.TOKEN+"&modelId="+modelId
+"&regDate="+regDate+"&mile="+mile+"&zone="+zone+"";
String result = VehicleAppraisementUtil.getResponseResult(urlStr);
return result;