This commit is contained in:
zhouyahui 2018-07-20 17:46:00 +08:00
commit d7a6de5c5f
11 changed files with 491 additions and 203 deletions

View File

@ -48,6 +48,7 @@
sButtonPosition = "north";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
//组织机构验证码的的校验
function Checkfield(){
var businessLicenseNo = getItemValue(0,getRow(0),"BUSINESS_LICENSE_NO");
// if(businessLicenseNo==""){
@ -57,14 +58,11 @@
if(checkORGRight1(businessLicenseNo)){
return true;
}else{
setErrorTips("BUSINESS_LICENSE_NO","组织机构代码格式不正确!");
//setErrorTips("BUSINESS_LICENSE_NO","组织机构代码格式不正确!");
alert("组织机构代码格式不正确!");
return false;
}
}
//校验经销商编号是否唯一
function Uniquenesscheck(){
var DISTRIBUTOR_CODING = getItemValue(0,0,'DISTRIBUTOR_CODING');
@ -76,15 +74,14 @@
return true;
}
}
<%-- $(function(){
if("<%=PhaseNo%>"=="0020"){
setItemRequired(0, "RETAIL_OPEN_DATE", true);
$("#RETAIL_OPEN_DATE")
}
}) --%>
<%-- function Uniquenesscheck(){
var flowunid = "<%=sFlowUnid%>"
var DISTRIBUTOR_CODING = getItemValue(0,0,'DISTRIBUTOR_CODING');
var sReturnInfo = RunJavaMethodTrans("com.tenwa.customer.controller.group.CustomerGroupCompanyController","distributor_basicS","flowunid="+flowunid);
if("distributor_coding".equals(sReturnInfo)){
return true;
}
} --%>
function save() {
var result = false;
var distributor_coding = getItemValue(0,0,'DISTRIBUTOR_CODING');
@ -93,7 +90,6 @@
}else{
result = Uniquenesscheck();
}
// result = Uniquenesscheck();
var result1 = Checkfield();
//if(result==true){
if(result==true && result1==true){
@ -101,9 +97,6 @@
}
}
function saveproj_name(){
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businesspply.CustomerInfoManage","saveDistributorInfo","flowunid=<%=sFlowUnid%>");
@ -150,29 +143,6 @@
setItemValue(0,getRow(),"SUBSIDIARY_COMPANY",sReturn[0]);//向页面的框中添加数据
},"请选择经销商");
}
//省市
/* function selectRegionCode(){
var area_code = getItemValue(0,getRow(),"DISTRIBUTOR_ADDRESS");
AsDialog.PopView("/Common/ToolsA/AreaVFrame.jsp","AreaCode="+area_code,"dialogWidth=850px;dialogHeight=450px;center:yes;status:no;statusbar:no",function(sAreaCodeInfo){
//增加清空功能的判断
if( sAreaCodeInfo == '_CANCEL_'){
return;
}
if(sAreaCodeInfo == "NO" || sAreaCodeInfo == '_CLEAR_'){
setItemValue(0,getRow(),"DISTRIBUTOR_ADDRESS","");
setItemValue(0,getRow(),"DISTRIBUTOR_ADDRESSNAME","");
}else{
if(typeof(sAreaCodeInfo) != "undefined" && sAreaCodeInfo != ""){
sAreaCodeInfo = sAreaCodeInfo.split('@');
sAreaCodeValue = sAreaCodeInfo[0];//-- 行政区划代码
sAreaCodeName = sAreaCodeInfo[1];//--行政区划名称
setItemValue(0,getRow(),"DISTRIBUTOR_ADDRESS",sAreaCodeValue);
setItemValue(0,getRow(),"DISTRIBUTOR_ADDRESSNAME",sAreaCodeName);
}
}
},'请选择省市');
} */
var province="";//定义一个全局变量
// 选择省份
function selectProvinceCode(){
@ -212,4 +182,4 @@
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -1013,6 +1013,7 @@
<attribute name="ORGID" label="部门编号" type="STRING" length="32"/>
<attribute name="PROVINCES" label="省份" type="STRING" length="32"/>
<attribute name="DISTRIBUTOR_CODING" label="经销商编号" type="STRING" length="32"/>
<attribute name="TOTAL" label="总额" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
@ -1304,6 +1305,7 @@
<attribute name="ORGID" label="部门编号" type="STRING" length="32"/>
<attribute name="PROVINCES" label="省份" type="STRING" length="32"/>
<attribute name="DISTRIBUTOR_CODING" label="经销商编码" type="STRING" length="32"/>
<attribute name="TOTAL" label="总额" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
@ -2680,90 +2682,93 @@
</manager>
</class>
<class name="LB_CARDATA_COMMERCIAL_BRAND" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识编号" type="STRING" length="32"/>
<attribute name="brand_id" label="品牌ID" type="STRING" length="100"/>
<attribute name="brand_name" label="品牌名称" type="STRING" length="100"/>
<attribute name="brand_initial" label="品牌首字母" type="STRING" length="100"/>
<attribute name="initialversion" label="初始版本号" 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_cardata_commercial_brand" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
<class name="LB_CARDATA_COMMERCIAL_BRAND" label="商用车品牌表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识编号" type="STRING" length="32"/>
<attribute name="brand_id" label="品牌ID" type="STRING" length="100"/>
<attribute name="brand_name" label="品牌名称" type="STRING" length="100"/>
<attribute name="brand_initial" label="品牌首字母" type="STRING" length="100"/>
<attribute name="initialversion" label="初始版本号" 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_cardata_commercial_brand" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_CARDATA_COMMERCIAL_MODEL" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识编号" type="STRING" length="32"/>
<attribute name="model_id" label="车型编号" type="STRING" length="100"/>
<attribute name="model_name" label="车型名称" type="STRING" length="100"/>
<attribute name="series_id" label="车系编号" type="STRING" length="100"/>
<attribute name="series_name" label="车系名称" type="STRING" length="100"/>
<attribute name="brand_id" label="品牌编号" type="STRING" length="100"/>
<attribute name="brand_name" label="品牌名称" type="STRING" length="100"/>
<attribute name="price" label="新车指导价" type="STRING" length="100"/>
<attribute name="liter" label="排量" type="STRING" length="100"/>
<attribute name="vehicle_type" label="车辆类型" type="STRING" length="100"/>
<attribute name="level" label="级别" type="STRING" length="100"/>
<attribute name="initialversion" label="初始版本号" 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_cardata_commercial_model" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
<class name="LB_CARDATA_COMMERCIAL_MODEL" label="商用车车型表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识编号" type="STRING" length="32"/>
<attribute name="model_id" label="车型编号" type="STRING" length="100"/>
<attribute name="model_name" label="车型名称" type="STRING" length="100"/>
<attribute name="series_id" label="车系编号" type="STRING" length="100"/>
<attribute name="series_name" label="车系名称" type="STRING" length="100"/>
<attribute name="brand_id" label="品牌编号" type="STRING" length="100"/>
<attribute name="brand_name" label="品牌名称" type="STRING" length="100"/>
<attribute name="price" label="新车指导价" type="STRING" length="100"/>
<attribute name="liter" label="排量" type="STRING" length="100"/>
<attribute name="vehicle_type" label="车辆类型" type="STRING" length="100"/>
<attribute name="level" label="级别" type="STRING" length="100"/>
<attribute name="initialversion" label="初始版本号" 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_cardata_commercial_model" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_CARDATA_COMMERCIAL_SERIES" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识编号" type="STRING" length="32"/>
<attribute name="series_id" label="车系编号" type="STRING" length="100"/>
<attribute name="series_name" label="车系名称" type="STRING" length="100"/>
<attribute name="brand_id" label="品牌编号" type="STRING" length="100"/>
<attribute name="brand_name" label="品牌名称" type="STRING" length="100"/>
<attribute name="car_type" label="车辆类型" type="STRING" length="100"/>
<attribute name="initialversion" label="初始版本号" 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_cardata_commercial_series" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
<class name="LB_CARDATA_COMMERCIAL_SERIES" label="商用车车系表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识编号" type="STRING" length="32"/>
<attribute name="series_id" label="车系编号" type="STRING" length="100"/>
<attribute name="series_name" label="车系名称" type="STRING" length="100"/>
<attribute name="brand_id" label="品牌编号" type="STRING" length="100"/>
<attribute name="brand_name" label="品牌名称" type="STRING" length="100"/>
<attribute name="car_type" label="车辆类型" type="STRING" length="100"/>
<attribute name="initialversion" label="初始版本号" 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_cardata_commercial_series" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_CARDATA_COMMERCIAL_VERSION" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="ID" type="STRING" length="32"/>
<attribute name="initialversion" label="初始版本号" type="STRING" length="100"/>
<attribute name="currentversion" label="当前版本号" type="STRING" length="100"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_cardata_commercial_version" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
<class name="LB_CARDATA_COMMERCIAL_VERSION" label="商用车版本表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="ID" type="STRING" length="32"/>
<attribute name="initialversion" label="初始版本号" type="STRING" length="100"/>
<attribute name="currentversion" label="当前版本号" type="STRING" length="100"/>
<attribute name="series_version_time" label="车系版本更新时间" type="STRING" length="100"/>
<attribute name="brand_version_time" label="品牌版本更新时间" type="STRING" length="100"/>
<attribute name="model_version_time" label="车型版本更新时间" type="STRING" length="100"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_cardata_commercial_version" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>

View File

@ -88,10 +88,14 @@ public class CreditBodyGuardAction {
//将查询到的结果放入一个List中
List<BizObject> personList = new ArrayList<>();
personList.add(borrowerResult);
personList.add(coborrowerResult);
for(BizObject biz : guarantorResultList){
personList.add(biz);
if(coborrowerResult != null){
personList.add(coborrowerResult);
}
if(guarantorResultList.size()>0){
for(BizObject biz : guarantorResultList){
personList.add(biz);
}
}
//遍历这个List并组装成字符串
for(int r = 0;r<personList.size();r++){
if("".equals(personArr)){

View File

@ -18,6 +18,15 @@ public class CustomerGroupCompanyController {
private String group_name = "";
private String group_no = "";
private String DISTRIBUTOR_CODING = "";
private String flowunid;
public String getFlowunid() {
return flowunid;
}
public void setFlowunid(String flowunid) {
this.flowunid = flowunid;
}
public String getDISTRIBUTOR_CODING() {
return DISTRIBUTOR_CODING;
@ -156,7 +165,13 @@ public class CustomerGroupCompanyController {
return "false";
}
}
//判断经销商编码是否是当前页面
/*public String distributor_basicS(JBOTransaction tx) throws Exception{
BizObjectManager dgcm = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME);
BizObject dgc = dgcm.createQuery("flowunid=:flowunid").setParameter("flowunid", this.flowunid).getSingleResult(true);
String distributor_coding = dgc.getAttribute("DISTRIBUTOR_CODING").toString();
return distributor_coding;
}*/
public String getNewId(JBOTransaction tx) throws Exception{
String id="";
BizObjectManager dgcm = JBOFactory.getBizObjectManager(DISTRIBUTOR_GROUP_COMPANY.CLASS_NAME);

View File

@ -0,0 +1,203 @@
package com.tenwa.lease.app.quartzmession;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.app.tenwa.customer.LB_CARDATA_COMMERCIAL_BRAND;
import jbo.app.tenwa.customer.LB_CARDATA_COMMERCIAL_MODEL;
import jbo.app.tenwa.customer.LB_CARDATA_COMMERCIAL_SERIES;
import jbo.app.tenwa.customer.LB_CARDATA_COMMERCIAL_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.app.util.StringUtil;
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 QueryCommercialVehicleModeListAction implements Job{
@Override
public void execute(JobExecutionContext arg0) throws JobExecutionException {
JBOTransaction tx = null;
try {
tx = JBOFactory.createJBOTransaction();
BizObjectManager bm1 = JBOFactory.getBizObjectManager(LB_CARDATA_COMMERCIAL_BRAND.CLASS_NAME, tx);
BizObjectManager bm2 = JBOFactory.getBizObjectManager(LB_CARDATA_COMMERCIAL_SERIES.CLASS_NAME, tx);
BizObjectManager bm3 = JBOFactory.getBizObjectManager(LB_CARDATA_COMMERCIAL_MODEL.CLASS_NAME, tx);
BizObjectManager bm4 = JBOFactory.getBizObjectManager(LB_CARDATA_COMMERCIAL_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.COMVERSION;
}else{
fromVersion = versionResult.getAttribute("currentversion").toString();
}
String url = "http://"+InitSecondHandCarConfig.PREFIX+".che300.com/service/common/eval?fromVersion="
+fromVersion+"&oper=exportCommercialModel"+"&token="+InitSecondHandCarConfig.TOKEN+"";
String responseResult = VehicleAppraisementUtil.getResponseResult(url);
//使用fastjson解析接口返回的json数据
JSONObject object = JSONObject.parseObject(responseResult);
//
if("0".equals(object.get("status").toString())){
return;
}
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());
JSONObject versionListObject = (JSONObject) dataObject.get("version");
//判断解析出的brandList是否为空,若不为空则执行
if(!brandList.isEmpty()){
for(int i=0;i<brandList.size();i++){
if("新增".equals(brandList.get(i).get("operation_type"))){
BizObject brandObject = bm1.newObject();
brandObject.setAttributeValue("brand_name",brandList.get(i).get("brand_name"));
brandObject.setAttributeValue("brand_id",brandList.get(i).get("brand_id"));
brandObject.setAttributeValue("brand_initial",brandList.get(i).get("brand_initial"));
brandObject.setAttributeValue("initialversion", versionListObject.get("from_version"));
bm1.saveObject(brandObject);
}else if("更新".equals(brandList.get(i).get("operation_type"))){
//更新的操作
bm1.createQuery("update O set brand_name=:BRANDNAME"
+ ",brand_initial=:BRANDINITIAL,initialversion=:INITIALVERSION"
+" where brand_id=:BRANDID") //此处Sql拼接要注意,一定要在where前后留空格,否则执行报错,下面同理
.setParameter("BRANDNAME", StringUtil.nullToString(brandList.get(i).get("brand_name"),""))
.setParameter("BRANDINITIAL", StringUtil.nullToString(brandList.get(i).get("brand_initial"),""))
.setParameter("INITIALVERSION", StringUtil.nullToString(versionListObject.get("from_version"),""))
.setParameter("BRANDID", StringUtil.nullToString(brandList.get(i).get("brand_id"),"")).executeUpdate();
}else{
continue;
}
}
}
//同上理
if(!seriesList.isEmpty()){
for(int i=0;i<seriesList.size();i++){
if("新增".equals(seriesList.get(i).get("operation_type"))){
BizObject seriesObject = bm2.newObject();
seriesObject.setAttributeValue("brand_id",seriesList.get(i).get("brand_id"));
seriesObject.setAttributeValue("brand_name",seriesList.get(i).get("brand_name"));
seriesObject.setAttributeValue("series_name",seriesList.get(i).get("series_name"));
seriesObject.setAttributeValue("car_type", seriesList.get(i).get("car_type"));
seriesObject.setAttributeValue("initialversion", versionListObject.get("from_version"));
bm2.saveObject(seriesObject);
}else if("更新".equals(seriesList.get(i).get("operation_type"))){
//更新的操作
bm2.createQuery("update O set brand_name=:BRANDNAME"
+",series_name=:SERIESNAME,car_type=:CARTYPE"
+",initialversion=:INITIALVERSION,brand_id=:BRANDID"
+" where seriesid=:SERIESID")
.setParameter("BRANDNAME", StringUtil.nullToString(seriesList.get(i).get("brand_name"),""))
.setParameter("BRANDID", StringUtil.nullToString(seriesList.get(i).get("brand_id"),""))
.setParameter("SERIESNAME", StringUtil.nullToString(seriesList.get(i).get("series_name"),""))
.setParameter("CARTYPE",StringUtil.nullToString(seriesList.get(i).get("series_name"),""))
.setParameter("INITIALVERSION",StringUtil.nullToString(versionListObject.get("from_version"),""))
.setParameter("SERIESID", StringUtil.nullToString(seriesList.get(i).get("series_id"),"")).executeUpdate();
}else{
continue;
}
}
}
//同上理
if(!modelList.isEmpty()){
for(int i=0;i<modelList.size();i++){
if("新增".equals(modelList.get(i).get("operation_type"))){
BizObject modelObject = bm3.newObject();
modelObject.setAttributeValue("model_id",modelList.get(i).get("model_id"));
modelObject.setAttributeValue("model_name",modelList.get(i).get("model_name"));
modelObject.setAttributeValue("series_id",modelList.get(i).get("series_id"));
modelObject.setAttributeValue("series_name",modelList.get(i).get("series_name"));
modelObject.setAttributeValue("brand_id", modelList.get(i).get("brand_id"));
modelObject.setAttributeValue("brand_name",modelList.get(i).get("brand_name"));
modelObject.setAttributeValue("price",modelList.get(i).get("price"));
modelObject.setAttributeValue("liter",modelList.get(i).get("liter"));
modelObject.setAttributeValue("vehicle_type",modelList.get(i).get("vehicle_type"));
modelObject.setAttributeValue("level",modelList.get(i).get("level"));
modelObject.setAttributeValue("initialversion", versionListObject.get("from_version"));
bm3.saveObject(modelObject);
}else if("更新".equals(modelList.get(i).get("operation_type"))){
bm3.createQuery("update O set "
+ "model_name=:MODELNAME,series_id=:SERIESID"
+ ",series_name=:SERIESNAME,brand_id=:BRANDID"
+",brand_name=:BRANDNAME,price=:PRICE"
+",liter=:LITER,vehicle_type=:VEHICLETYPE"
+ ",level=:LEVEL"
+",initialversion=:INITIALVERSION"
+" where model_id=:MODELID")
.setParameter("MODELNAME", StringUtil.nullToString(modelList.get(i).get("model_name"),""))
.setParameter("SERIESID", StringUtil.nullToString(modelList.get(i).get("series_id"),""))
.setParameter("SERIESNAME", StringUtil.nullToString(modelList.get(i).get("series_name"),""))
.setParameter("BRANDID", StringUtil.nullToString(modelList.get(i).get("brand_id"),""))
.setParameter("BRANDNAME", StringUtil.nullToString(modelList.get(i).get("brand_name"),""))
.setParameter("PRICE", StringUtil.nullToString(modelList.get(i).get("price"),""))
.setParameter("LITER", StringUtil.nullToString(modelList.get(i).get("liter"),""))
.setParameter("VEHICLETYPE", StringUtil.nullToString(modelList.get(i).get("vehicle_type"),""))
.setParameter("LEVEL", StringUtil.nullToString(modelList.get(i).get("level"),""))
.setParameter("INITIALVERSION",StringUtil.nullToString(versionListObject.get("from_version"),""))
.setParameter("MODELID", StringUtil.nullToString(modelList.get(i).get("model_id"),"")).executeUpdate();
}else{
continue;
}
}
}
if(versionflag == false){
BizObject versionObject = bm4.newObject();
versionObject.setAttributeValue("currentversion",StringUtil.nullToString(versionListObject.get("current_version"),""));
versionObject.setAttributeValue("initialversion",StringUtil.nullToString(versionListObject.get("from_version"),""));
versionObject.setAttributeValue("series_version_time",StringUtil.nullToString(versionListObject.get("series_version_time"),""));
versionObject.setAttributeValue("brand_version_time",StringUtil.nullToString(versionListObject.get("brand_version_time"),""));
versionObject.setAttributeValue("model_version_time",StringUtil.nullToString(versionListObject.get("model_version_time"),""));
bm4.saveObject(versionObject);
}else{
bm4.createQuery("update O set currentversion=:CURRENTVERSION,"
+ "series_version_time=:SERIESVERSIONTIME,brand_version_time=:BRANDVERSIONTIME,"
+ "model_version_time=:MODELVERSIONTIME "
+ " where initialversion=:INITIALVERSION")
.setParameter("CURRENTVERSION",StringUtil.nullToString(versionListObject.get("current_version"),""))
.setParameter("SERIESVERSIONTIME",StringUtil.nullToString(versionListObject.get("series_version_time"),""))
.setParameter("BRANDVERSIONTIME",StringUtil.nullToString(versionListObject.get("brand_version_time"),""))
.setParameter("MODELVERSIONTIME",StringUtil.nullToString(versionListObject.get("model_version_time"),""))
.setParameter("INITIALVERSION",StringUtil.nullToString(versionListObject.get("from_version"),"")).executeUpdate();
}
} 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();
}
}
}
}

View File

@ -17,6 +17,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.amarsoft.app.awe.config.InitCollectConfig;
import com.amarsoft.app.awe.config.InitSecondHandCarConfig;
import com.amarsoft.app.util.StringUtil;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
@ -91,12 +92,12 @@ public class QueryPassengerVehicleModeListAction implements Job{
+",brandtimestamp=:BRANDTIMESTAMP"
+",initialversion=:INITIALVERSION"
+" where brandid=:BRANDID") //此处Sql拼接要注意,一定要在where前后留空格,否则执行报错,下面同理
.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();
.setParameter("BRANDNAME", StringUtil.nullToString(brandList.get(i).get("brand_name"),""))
.setParameter("BRANDINITIAL", StringUtil.nullToString(brandList.get(i).get("brand_initial"),""))
.setParameter("OPERTYPE", StringUtil.nullToString(brandList.get(i).get("oper_type"),""))
.setParameter("BRANDTIMESTAMP",StringUtil.nullToString(map.get("BrandTimestamp"),""))
.setParameter("INITIALVERSION",StringUtil.nullToString(map.get("InitialVersion"),""))
.setParameter("BRANDID", StringUtil.nullToString(brandList.get(i).get("brand_id"),"")).executeUpdate();
}else{
continue;
}
@ -126,16 +127,16 @@ public class QueryPassengerVehicleModeListAction implements Job{
+",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();
.setParameter("BRANDNAME", StringUtil.nullToString(seriesList.get(i).get("brand_name"),""))
.setParameter("BRANDID", StringUtil.nullToString(seriesList.get(i).get("brand_id"),""))
.setParameter("SERIESNAME", StringUtil.nullToString(seriesList.get(i).get("series_name"),""))
.setParameter("SERIESGROUPNAME", StringUtil.nullToString(seriesList.get(i).get("series_group_name"),""))
.setParameter("LEVELNAME", StringUtil.nullToString(seriesList.get(i).get("level_name"),""))
.setParameter("MAKERTYPE", StringUtil.nullToString(seriesList.get(i).get("maker_type"),""))
.setParameter("OPERTYPE", StringUtil.nullToString(seriesList.get(i).get("oper_type"),""))
.setParameter("SERIESTIMESTAMP", StringUtil.nullToString(map.get("SeriesTimestamp"),""))
.setParameter("INITIALVERSION",StringUtil.nullToString(map.get("InitialVersion"),""))
.setParameter("SERIESID", StringUtil.nullToString(seriesList.get(i).get("series_id"),"")).executeUpdate();
}else{
continue;
}
@ -177,25 +178,25 @@ public class QueryPassengerVehicleModeListAction implements Job{
+",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();
.setParameter("BRANDNAME", StringUtil.nullToString(modelList.get(i).get("brand_name"),""))
.setParameter("BRANDID", StringUtil.nullToString(modelList.get(i).get("brand_id"),""))
.setParameter("SERIESID", StringUtil.nullToString(modelList.get(i).get("series_id"),""))
.setParameter("SERIESNAME", StringUtil.nullToString(modelList.get(i).get("series_name"),""))
.setParameter("SERIESGROUPNAME", StringUtil.nullToString(modelList.get(i).get("series_group_name"),""))
.setParameter("MODELNAME", StringUtil.nullToString(modelList.get(i).get("model_name"),""))
.setParameter("PRICE", StringUtil.nullToString(modelList.get(i).get("price"),""))
.setParameter("LITER", StringUtil.nullToString(modelList.get(i).get("liter"),""))
.setParameter("GEARTYPE", StringUtil.nullToString(modelList.get(i).get("gear_type"),""))
.setParameter("MODELYEAR", StringUtil.nullToString(modelList.get(i).get("model_year"),""))
.setParameter("MAKERTYPE", StringUtil.nullToString(modelList.get(i).get("maker_type"),""))
.setParameter("DISCHARGESTANDARD", StringUtil.nullToString(modelList.get(i).get("discharge_standard"),""))
.setParameter("SEATNUMBER", StringUtil.nullToString(modelList.get(i).get("seat_number"),""))
.setParameter("MINREGYEAR", StringUtil.nullToString(modelList.get(i).get("min_reg_year"),""))
.setParameter("MAXREGYEAR", StringUtil.nullToString(modelList.get(i).get("max_reg_year"),""))
.setParameter("OPERTYPE", StringUtil.nullToString(modelList.get(i).get("oper_type"),""))
.setParameter("MODELTIMESTAMP", StringUtil.nullToString(map.get("ModelTimestamp"),""))
.setParameter("INITIALVERSION",StringUtil.nullToString(map.get("InitialVersion"),""))
.setParameter("MODELID", StringUtil.nullToString(modelList.get(i).get("model_id"),"")).executeUpdate();
}else{
continue;
}
@ -203,14 +204,16 @@ public class QueryPassengerVehicleModeListAction implements Job{
}
if(versionflag == false){
BizObject versionObject = bm4.newObject();
versionObject.setAttributeValue("currentversion",map.get("CurrentVersion").toString());
versionObject.setAttributeValue("initialversion",map.get("InitialVersion").toString());
versionObject.setAttributeValue("currentversion",StringUtil.nullToString(map.get("CurrentVersion"),""));
versionObject.setAttributeValue("initialversion",StringUtil.nullToString(map.get("InitialVersion"),""));
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();
}
bm4.createQuery("update O set currentversion=:CURRENTVERSION "
+ " where initialversion=:INITIALVERSION")
.setParameter("CURRENTVERSION",StringUtil.nullToString(map.get("CurrentVersion"),""))
.setParameter("INITIALVERSION",StringUtil.nullToString(map.get("InitialVersion"),"")).executeUpdate();
}
System.out.println("³ËÓóµ³µÐÍ¿â¸üÐÂÍê±Ï!");
} catch (Exception e) {
try {
if(null != tx){

View File

@ -7,6 +7,7 @@ import java.util.Set;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT_TEMP;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
@ -17,7 +18,25 @@ import com.amarsoft.are.jbo.JBOTransaction;
public class AccountInfoManage {
private String flowunid;
private String id;
private String DISTRIBUTOR_NO;
public String getDISTRIBUTOR_NO() {
return DISTRIBUTOR_NO;
}
public void setDISTRIBUTOR_NO(String dISTRIBUTOR_NO) {
DISTRIBUTOR_NO = dISTRIBUTOR_NO;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String CheckPartnerInfo(JBOTransaction tx) throws JBOException{
BizObjectManager bm = JBOFactory.getBizObjectManager(DISTRIBUTOR_ACCOUNT_TEMP.CLASS_NAME,tx);
List<BizObject> bos = bm.createQuery("flowunid=:flowunid").setParameter("flowunid",this.flowunid).getResultList(false);
@ -48,5 +67,17 @@ public class AccountInfoManage {
public void setFlowunid(String flowunid) {
this.flowunid = flowunid;
}
//´øÖµ
public String Checkbasicinfo(JBOTransaction tx) throws JBOException{
BizObjectManager bs = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME,tx);
BizObject dgc = bs.createQuery("flowunid=:flowunid").setParameter("flowunid", this.getFlowunid()).getSingleResult(false);
String distributorName = dgc.getAttribute("DISTRIBUTOR_NAME").toString();
/*BizObjectManager bms = JBOFactory.getBizObjectManager(DISTRIBUTOR_ACCOUNT_TEMP.CLASS_NAME,tx);
BizObject account = bms.newObject();
account.setAttributeValue("ACCOUNT", distributorName);
bms.saveObject(account);*/
return distributorName;
}
}

View File

@ -5,10 +5,13 @@ import jbo.app.tenwa.customer.CUSTOMER_CERT_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP;
import org.bouncycastle.crypto.tls.AlertDescription;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
@ -17,6 +20,8 @@ import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.util.StringFunction;
public class CustomerInfoManage {
private String F_I_TYPE;
private String DISTRIBUTOR_STATUS;
private String flowunid;
private String status;
private String relative;
@ -37,14 +42,21 @@ public class CustomerInfoManage {
private String smincome;
private String shukou;
private String projectId;
private String workunit;
public String getWorkunit() {
return workunit;
public String getF_I_TYPE() {
return F_I_TYPE;
}
public void setWorkunit(String workunit) {
this.workunit = workunit;
public void setF_I_TYPE(String f_I_TYPE) {
F_I_TYPE = f_I_TYPE;
}
public String getDISTRIBUTOR_STATUS() {
return DISTRIBUTOR_STATUS;
}
public void setDISTRIBUTOR_STATUS(String dISTRIBUTOR_STATUS) {
DISTRIBUTOR_STATUS = dISTRIBUTOR_STATUS;
}
public String getProjectId() {
@ -249,7 +261,6 @@ public class CustomerInfoManage {
bo.setAttributeValue("shukou", shukou);
bo.setAttributeValue("Spouse_", "Y");
bo.setAttributeValue("PROJECT_ID", projectId);
bo.setAttributeValue("workunit", workunit);
}else{
bo = bom.newObject();
bo.setAttributeValue("flowunid", flowunid);
@ -268,7 +279,6 @@ public class CustomerInfoManage {
bo.setAttributeValue("shukou", shukou);
bo.setAttributeValue("Spouse_", "Y");
bo.setAttributeValue("PROJECT_ID", projectId);
bo.setAttributeValue("workunit", workunit);
}
bom.saveObject(bo);
}catch(Exception e){
@ -367,4 +377,14 @@ public class CustomerInfoManage {
return "SUCCESS";
}
/* public String SelectGroup(JBOTransaction tx){
if(this.F_I_TYPE=="f_i_type02" && this.DISTRIBUTOR_STATUS=="distributor_status04"){
return "true";
}
return "false";
}*/
}

View File

@ -13,6 +13,7 @@ import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_PERSON;
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE;
import com.amarsoft.are.jbo.BizObject;
@ -43,6 +44,11 @@ public class LBCustomerRelaFormalToTempBusiness extends BaseBussiness {
DataOperatorUtil.copyJBOSet(CUSTOMER_ADDRESS.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS_TEMP.CLASS_NAME, null, other, null, Sqlca);
}
for(BizObject unit:unitList){
//担保人从正式表到临时表
fromCondtion.clear();
fromCondtion.put("id", unit.getAttribute("id").getString());
DataOperatorUtil.copySingleJBO(LB_GUARANTEE_UNIT.CLASS_NAME, fromCondtion, LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, null, other, Sqlca);
fromCondtion.clear();
fromCondtion.put("customerid", unit.getAttribute("ASSUROR").getString());
DataOperatorUtil.copyJBOSet(CUSTOMER_PERSON.CLASS_NAME, fromCondtion, CUSTOMER_PERSON_TEMP.CLASS_NAME, null, other, null, Sqlca);

View File

@ -90,9 +90,6 @@ public class IdentityVerification {
//读取授权文件
String license =ValidatePropertiesUtil.get("key");
String decode = new String(new BASE64Decoder().decodeBuffer(license));
if(coborrowerResult == null || guarantorResultList == null){
return "请完善共同申请人与担保人信息!";
}
//将申请人,共同申请人,担保人等信息传入该类构建xml入参参数
String inConditions = SoapRequest.XMLConfiguration(borrowerResult,coborrowerResult,guarantorResultList);
String result = NciicClient.executeClient("NciicServices",decode,inConditions);

View File

@ -7,39 +7,73 @@ public class SoapRequest {
public static String XMLConfiguration(BizObject biz1,BizObject biz2,List<BizObject> bizList) throws Exception {
StringBuffer sb = new StringBuffer("");
sb.append("<?xml version='1.0' encoding='UTF-8'?>");
sb.append("<ROWS>");
sb.append("<INFO>");
sb.append("<SBM>安鹏国际融资租赁有限公司</SBM>");
sb.append("</INFO>");
sb.append("<ROW>");
sb.append("<GMSFHM>公民身份号码</GMSFHM>");
sb.append("<XM>姓名</XM>");
sb.append("</ROW>");
sb.append("<ROW FSD='000001' YWLX='安鹏国际'>");
//入参申请人身份证号码
sb.append("<GMSFHM>"+biz1.getAttribute("CERTID").getString()+"</GMSFHM>");
//入参申请人姓名
sb.append("<XM>"+biz1.getAttribute("FULLNAME").getString()+"</XM>");
sb.append("</ROW>");
sb.append("<ROW FSD='000001' YWLX='安鹏国际'>");
//入参共同申请人身份证号码
sb.append("<GMSFHM>"+biz2.getAttribute("certid").getString()+"</GMSFHM>");
//入参共同申请人姓名
sb.append("<XM>"+biz2.getAttribute("name").getString()+"</XM>");
sb.append("</ROW>");
for(int i=0;i<bizList.size();i++){
sb.append("<ROW FSD='000001' YWLX='安鹏国际'>");
if(bizList.size()>0 && biz2 != null){
sb.append(BaseXMLConfiguration(biz1));
sb.append("<ROW FSD='000001' YWLX='安鹏国际'>");
//入参共同申请人身份证号码
sb.append("<GMSFHM>"+bizList.get(i).getAttribute("CERTID").getString()+"</GMSFHM>");
sb.append("<GMSFHM>"+biz2.getAttribute("certid").getString()+"</GMSFHM>");
//入参共同申请人姓名
sb.append("<XM>"+bizList.get(i).getAttribute("FULLNAME").getString()+"</XM>");
sb.append("<XM>"+biz2.getAttribute("name").getString()+"</XM>");
sb.append("</ROW>");
for(int i=0;i<bizList.size();i++){
sb.append("<ROW FSD='000001' YWLX='安鹏国际'>");
//入参共同申请人身份证号码
sb.append("<GMSFHM>"+bizList.get(i).getAttribute("CERTID").getString()+"</GMSFHM>");
//入参共同申请人姓名
sb.append("<XM>"+bizList.get(i).getAttribute("FULLNAME").getString()+"</XM>");
sb.append("</ROW>");
}
sb.append("</ROWS>");
}else if(biz2 == null && bizList.size()>0){
sb.append(BaseXMLConfiguration(biz1));
for(int i=0;i<bizList.size();i++){
sb.append("<ROW FSD='000001' YWLX='安鹏国际'>");
//入参共同申请人身份证号码
sb.append("<GMSFHM>"+bizList.get(i).getAttribute("CERTID").getString()+"</GMSFHM>");
//入参共同申请人姓名
sb.append("<XM>"+bizList.get(i).getAttribute("FULLNAME").getString()+"</XM>");
sb.append("</ROW>");
}
sb.append("</ROWS>");
}else if(biz2 != null && bizList.size()<=0){
sb.append(BaseXMLConfiguration(biz1));
sb.append("<ROW FSD='000001' YWLX='安鹏国际'>");
//入参共同申请人身份证号码
sb.append("<GMSFHM>"+biz2.getAttribute("certid").getString()+"</GMSFHM>");
//入参共同申请人姓名
sb.append("<XM>"+biz2.getAttribute("name").getString()+"</XM>");
sb.append("</ROW>");
sb.append("</ROWS>");
}else{
sb.append(BaseXMLConfiguration(biz1));
}
sb.append("</ROWS>");
System.out.println("HttpClient 发送SOAP请求");
String xmldata = sb.toString();
System.out.println(xmldata);
return xmldata;
}
public static String BaseXMLConfiguration(BizObject biz1){
try {
StringBuffer sb = new StringBuffer("");
sb.append("<?xml version='1.0' encoding='UTF-8'?>");
sb.append("<ROWS>");
sb.append("<INFO>");
sb.append("<SBM>安鹏国际融资租赁有限公司</SBM>");
sb.append("</INFO>");
sb.append("<ROW>");
sb.append("<GMSFHM>公民身份号码</GMSFHM>");
sb.append("<XM>姓名</XM>");
sb.append("</ROW>");
sb.append("<ROW FSD='000001' YWLX='安鹏国际'>");
//入参申请人身份证号码
sb.append("<GMSFHM>"+biz1.getAttribute("CERTID").getString()+"</GMSFHM>");
//入参申请人姓名
sb.append("<XM>"+biz1.getAttribute("FULLNAME").getString()+"</XM>");
sb.append("</ROW>");
return sb.toString();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}