diff --git a/WebContent/Tenwa/beforeApplication/BeforeApplicationConfigInfo.jsp b/WebContent/Tenwa/beforeApplication/BeforeApplicationConfigInfo.jsp index d89b34b3f..de618a5e5 100644 --- a/WebContent/Tenwa/beforeApplication/BeforeApplicationConfigInfo.jsp +++ b/WebContent/Tenwa/beforeApplication/BeforeApplicationConfigInfo.jsp @@ -10,6 +10,7 @@ ASObjectModel doTemp = new ASObjectModel(sTempletNo); doTemp.setHtmlEvent("IS_MILE","onChange","changeMile"); doTemp.setHtmlEvent("IS_AGE_LIMIT","onChange","changeAgeLimit"); + doTemp.setHtmlEvent("IS_PENGYUAN","onChange","changePengyuanDay"); //doTemp.setColTips("", "测试"); ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); dwTemp.Style = "2";//freeform @@ -17,12 +18,15 @@ dwTemp.genHTMLObjectWindow(CurPage.getParameter("id")); String sButtons[][] = { - {"true","All","Button","保存","保存所有修改","as_save(0)","","","",""}, + {"true","All","Button","保存","保存所有修改","save()","","","",""}, {"true","All","Button","返回","返回列表","returnList()","","","",""} }; //sButtonPosition = "south"; %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_comm.xml b/WebContent/WEB-INF/etc/jbo/jbo_comm.xml index d7f055de4..f18a45924 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_comm.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_comm.xml @@ -157,7 +157,8 @@ - + + @@ -172,6 +173,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/data/service/impl/BusinessDataServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/data/service/impl/BusinessDataServiceImpl.java index 8a66ea1e8..0bac2eaa6 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/data/service/impl/BusinessDataServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/data/service/impl/BusinessDataServiceImpl.java @@ -8,12 +8,15 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import jbo.com.tenwa.entity.comm.serialutil.LB_BEFORE_APPLICATION; import jbo.com.tenwa.entity.comm.serialutil.LB_BEFORE_APPLICATION_CONFIG; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.lang.DataElement; +import com.amarsoft.are.util.StringFunction; import com.amarsoft.awe.util.Transaction; import com.amarsoft.context.ASUser; import com.base.constant.RestfullConstant; @@ -111,6 +114,7 @@ public class BusinessDataServiceImpl implements BusinessDataService { String liter = fieldMap.get("liter") == null ? "" : fieldMap.get("liter").toString(); String geartype = fieldMap.get("geartype") == null ? "" : fieldMap.get("geartype").toString(); String userid = fieldMap.get("userid") == null ? "" : fieldMap.get("userid").toString(); + Map body = new HashMap(); ASUser asUser = new ASUser(userid); BizObjectManager lbacm = JBOFactory.getBizObjectManager(LB_BEFORE_APPLICATION_CONFIG.CLASS_NAME); @@ -148,18 +152,62 @@ public class BusinessDataServiceImpl implements BusinessDataService { if(message==null && "Y".equals(isCard)){ //message = BeforeApplicationCheckUtil.checkCertid(fullname, fullcertid, subjectid, message); } + //保存数据 + BizObjectManager lbam = JBOFactory.getBizObjectManager(LB_BEFORE_APPLICATION.CLASS_NAME); + BizObject lba = lbam.newObject(); //鹏元接口校验 String isPengyuan = lbac.getAttribute("is_pengyuan").getString(); if(message==null && "Y".equals(isPengyuan)){ - //message = BeforeApplicationCheckUtil.checkPengYuan(fullname, fullcertid,fullphone, subjectid,asUser,null,sqlca,tx); + String pengyuanday = lbac.getAttribute("pengyuanday").getString(); + BizObject lbat = lbam.createQuery(" fullcertid=:fullcertid and ispengyuan='Y' and v.TIMESTAMPDIFF(v.DAY ,pengyuantime,v.NOW())<:pengyuanday") + .setParameter("fullcertid", fullcertid).setParameter("pengyuanday", pengyuanday).getSingleResult(false); + if(lbat == null){ + message = BeforeApplicationCheckUtil.checkPengYuan(fullname, fullcertid,fullphone, subjectid,asUser,null,sqlca,tx); + lba.setAttributeValue("ispengyuan", "Y"); + lba.setAttributeValue("pengyuantime", StringFunction.getTodayNow()); + if(message==null){ + lba.setAttributeValue("pengyuanresult", "Y"); + }else{ + lba.setAttributeValue("pengyuanresult", "N"); + lba.setAttributeValue("pengyuanreason", message); + } + }else{ + String pengyuanresult = lbat.getAttribute("pengyuanresult").getString(); + if("N".equals(pengyuanresult)){ + message = lbat.getAttribute("pengyuanrreason").getString(); + } + } + } + if(message==null){ body.put("status", "Y"); body.put("message", ""); + lba.setAttributeValue("result", "Y"); }else{ body.put("status", "N"); body.put("message", message); + lba.setAttributeValue("result", "N"); + lba.setAttributeValue("reason", message); } + lba.setAttributeValue("fullname", fullname); + lba.setAttributeValue("fullcertid", fullcertid); + lba.setAttributeValue("fullphone",fullphone ); + lba.setAttributeValue("fullsex", fullsex); + lba.setAttributeValue("brand",brand ); + lba.setAttributeValue("model", model); + lba.setAttributeValue("modelId", modelId); + lba.setAttributeValue("carseries", carseries); + lba.setAttributeValue("mile", mile); + lba.setAttributeValue("frame_number", age_limit); + lba.setAttributeValue("price", price); + lba.setAttributeValue("carattributes", carattributes); + lba.setAttributeValue("liter", liter); + lba.setAttributeValue("geartype", geartype); + lba.setAttributeValue("inputuserid",userid ); + lba.setAttributeValue("inputorgid", asUser.getOrgID() ); + lba.setAttributeValue("inputtime", StringFunction.getTodayNow()); + lbam.saveObject(lba); ReturnMapUtil.setReturnMap(body, RestfullConstant.baseProperty.get("success").toString(), ""); return ReturnMapUtil.getReturnMap(); diff --git a/src_jbo/jbo/com/tenwa/entity/comm/serialutil/LB_BEFORE_APPLICATION.java b/src_jbo/jbo/com/tenwa/entity/comm/serialutil/LB_BEFORE_APPLICATION.java new file mode 100644 index 000000000..4897dc2cf --- /dev/null +++ b/src_jbo/jbo/com/tenwa/entity/comm/serialutil/LB_BEFORE_APPLICATION.java @@ -0,0 +1,136 @@ +package jbo.com.tenwa.entity.comm.serialutil; + +import java.lang.String; + +/** +* 预审批表 - JBO命名常量类

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LB_BEFORE_APPLICATION{ + /** + * 预审批表

+ * 代表本类映射的BizObjectClass + */ + public static final String CLASS_NAME = "jbo.com.tenwa.entity.comm.serialutil.LB_BEFORE_APPLICATION"; + /** + * 唯一标识 STRING(32)
+ */ + public static final String id = "id"; + /** + * 承租人姓名 STRING(32)
+ */ + public static final String fullname = "fullname"; + /** + * 承租人身份证号 STRING(32)
+ */ + public static final String fullcertid = "fullcertid"; + /** + * 承租人电话号 STRING(32)
+ */ + public static final String fullphone = "fullphone"; + /** + * 承租人性别:1标识男。2标识女 STRING(32)
+ */ + public static final String fullsex = "fullsex"; + /** + * 车品牌 STRING(32)
+ */ + public static final String brand = "brand"; + /** + * 车型 STRING(32)
+ */ + public static final String model = "model"; + /** + * 车型ID STRING(32)
+ */ + public static final String modelId = "modelId"; + /** + * 车系 STRING(32)
+ */ + public static final String carseries = "carseries"; + /** + * 公里数 STRING(32)
+ */ + public static final String mile = "mile"; + /** + * 车架号 STRING(100)
+ */ + public static final String frame_number = "frame_number"; + /** + * 年限 STRING(8)
+ */ + public static final String age_limit = "age_limit"; + /** + * 车辆指导价 STRING(16)
+ */ + public static final String price = "price"; + /** + * 租赁类型:new_car标识新车,used_car二手车 STRING(10)
+ */ + public static final String carattributes = "carattributes"; + /** + * 排量 STRING(32)
+ */ + public static final String liter = "liter"; + /** + * 档位 STRING(32)
+ */ + public static final String geartype = "geartype"; + /** + * 文件1 STRING(200)
+ */ + public static final String attributeid1 = "attributeid1"; + /** + * 文件1 STRING(200)
+ */ + public static final String attributeid2 = "attributeid2"; + /** + * 结果 STRING(32)
+ */ + public static final String result = "result"; + /** + * 原因 STRING(200)
+ */ + public static final String reason = "reason"; + /** + * 鹏元数据是否调用 STRING(2)
+ */ + public static final String ispengyuan = "ispengyuan"; + /** + * 鹏元结果 STRING(10)
+ */ + public static final String pengyuanresult = "pengyuanresult"; + /** + * 鹏元原因 STRING(200)
+ */ + public static final String pengyuanreason = "pengyuanreason"; + /** + * 鹏元查询时间 STRING(100)
+ */ + public static final String pengyuantime = "pengyuantime"; + /** + * 登记人 STRING(100)
+ */ + public static final String inputuserid = "inputuserid"; + /** + * 登记部门 STRING(100)
+ */ + public static final String inputorgid = "inputorgid"; + /** + * 登记时间 STRING(100)
+ */ + public static final String inputtime = "inputtime"; + /** + * 登记人 STRING(100)
+ */ + public static final String updateuserid = "updateuserid"; + /** + * 登记部门 STRING(100)
+ */ + public static final String updateorgid = "updateorgid"; + /** + * 登记时间 STRING(100)
+ */ + public static final String updatetime = "updatetime"; +} \ No newline at end of file diff --git a/src_jbo/jbo/com/tenwa/entity/comm/serialutil/LB_BEFORE_APPLICATION_CONFIG.java b/src_jbo/jbo/com/tenwa/entity/comm/serialutil/LB_BEFORE_APPLICATION_CONFIG.java index a6f424896..fa787c359 100644 --- a/src_jbo/jbo/com/tenwa/entity/comm/serialutil/LB_BEFORE_APPLICATION_CONFIG.java +++ b/src_jbo/jbo/com/tenwa/entity/comm/serialutil/LB_BEFORE_APPLICATION_CONFIG.java @@ -46,6 +46,10 @@ public interface LB_BEFORE_APPLICATION_CONFIG{ */ public static final String is_pengyuan = "is_pengyuan"; /** + * 重新查询天数 STRING(8)
+ */ + public static final String pengyuanday = "pengyuanday"; + /** * 登记人 STRING(100)
*/ public static final String inputuserid = "inputuserid"; diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java index 900bcfeaa..5cbecccf9 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java @@ -15,6 +15,7 @@ import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP; import jbo.app.tenwa.customer.CUSTOMER_TYPE; import jbo.app.tenwa.customer.CUSTOMER_TYPE_TEMP; import jbo.app.tenwa.customer.DISTRIBUTOR_INFO; +import jbo.com.tenwa.entity.comm.serialutil.LB_BEFORE_APPLICATION; import jbo.com.tenwa.lease.carbrand.BUSINESS_STATUS; import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR_TEMP; import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO; @@ -22,13 +23,16 @@ import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP; import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE; import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP; import jbo.prd.PRD_SPECIFIC_LIBRARY; + import java.util.*; + 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.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; import com.amarsoft.context.ASUser; import com.tenwa.comm.util.jboutil.DataOperatorUtil; @@ -49,9 +53,23 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { if(this.getAttribute("serial")!=null) serial = this.getAttribute("serial").toString(); ASUser asUser=new ASUser(this.getAttribute("CurUserID").toString()); - return initBusinessApply(Sqlca,asUser); + + String certId = this.getAttribute("certid").toString(); + String ProjectId = this.getAttribute("ProjectId").toString(); + String custname = this.getAttribute("custname").toString(); + BizObjectManager lbam = JBOFactory.getBizObjectManager(LB_BEFORE_APPLICATION.CLASS_NAME); + BizObject lbat = lbam.createQuery("select * from O where O.fullcertid=:fullcertid and O.inputtime=(SELECT MAX(lba.inputtime) FROM jbo.com.tenwa.entity.comm.serialutil.LB_BEFORE_APPLICATION lba WHERE lba.fullcertid=O.fullcertid)").setParameter("fullcertid", certId).getSingleResult(false); + if(lbat!=null){ + String ispengyuan = lbat.getAttribute("ispengyuan").getString(); + if("Y".equals(ispengyuan)){ + SqlObject sql = new SqlObject("UPDATE bigdata_pengyuan_af SET keyword1='"+ProjectId+"' WHERE fullname='"+custname+"' AND fullcertId='"+certId+"'"); + Sqlca.executeSQL(sql); + } + } + + return initBusinessApply(Sqlca,asUser,lbat); } - public String initBusinessApply(JBOTransaction tx,ASUser asUser) throws Exception { + public String initBusinessApply(JBOTransaction tx,ASUser asUser,BizObject lbat) throws Exception { String className = ""; String colName = ""; String certId = this.getAttribute("certid").toString(); @@ -64,6 +82,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { className = CUSTOMER_COMPANY_TEMP.CLASS_NAME; colName = "company_name"; } + BizObjectManager bmCTT =JBOFactory.getBizObjectManager(CUSTOMER_TYPE_TEMP.CLASS_NAME,tx); BizObjectManager bomC = JBOFactory.getBizObjectManager(className); //自然人表或者法人信息表 BizObjectManager bm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME,tx); @@ -157,7 +176,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { //无论是不是存量客户都在 项目表 和 客户和项目关联表 中都新增一条数据,客户和项目是一对多的 this.saveProjInfo(bm, tx, asUser,distributoIid,lpi == null ? null : lpi.getAttribute("is_netcar").toString()); - this.saveEquipmentCar(bmLECT, tx, asUser,vndrName); //车辆租赁物信息表 + this.saveEquipmentCar(bmLECT, tx, asUser,vndrName,lbat); //车辆租赁物信息表 this.saveUnionLessee(bmLULT,tx,customerId,asUser); this.saveBusinessStatus(bsbom, tx, asUser);//项目进度表 }else{ @@ -176,8 +195,8 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { BizObject bmC = this.saveCustomerInfo(bmCI, tx, asUser,distributoIid);//新增主表客户信息 customerId = bmC.getAttribute("customerid").getString(); this.saveCustomerType(bmCTT, tx, customerId,asUser);//证件类型临时表 - this.savePersonOrCompany(bomC, tx, colName,customerId,asUser);//自然人||法人 - this.saveEquipmentCar(bmLECT, tx, asUser,vndrName); //车辆租赁物信息表 + this.savePersonOrCompany(bomC, tx, colName,customerId,asUser,lbat);//自然人||法人 + this.saveEquipmentCar(bmLECT, tx, asUser,vndrName,lbat); //车辆租赁物信息表 this.saveUnionLessee(bmLULT, tx, customerId, asUser);//union表 this.saveProjInfo(bm, tx, asUser,distributoIid,null);//保存项目信息表 this.saveBusinessStatus(bsbom, tx, asUser);//项目进度表 @@ -215,7 +234,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { } return bmC; } - private void savePersonOrCompany(BizObjectManager bomC,JBOTransaction tx,String colName,String customerId,ASUser asUser)throws JBOException{ + private void savePersonOrCompany(BizObjectManager bomC,JBOTransaction tx,String colName,String customerId,ASUser asUser,BizObject lbat)throws JBOException{ BizObject boCRT = bomC.newObject();//新建自然人||法人 try { boCRT.setAttributeValue("flowunid", this.getAttribute("FlowUnid"));//流程ID @@ -228,6 +247,9 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { boCRT.setAttributeValue("inputtime", StringFunction.getTodayNow());//登记时间,系统当前时间 if("03".equals(this.getAttribute("CustomerType"))){ boCRT.setAttributeValue("BALANCESHEET", "申请人"); + if(lbat != null){ + boCRT.setAttributeValue("mobile", lbat.getAttribute("fullphone")+""); + } } bomC.saveObject(boCRT); } catch (Exception e) { @@ -255,7 +277,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { e.printStackTrace(); } } - private void saveEquipmentCar(BizObjectManager bomCI,JBOTransaction tx,ASUser asUser,String vndrName)throws JBOException{ + private void saveEquipmentCar(BizObjectManager bomCI,JBOTransaction tx,ASUser asUser,String vndrName,BizObject lbat)throws JBOException{ BizObject bmLEC = bomCI.newObject();//保存客户信息 try { //客户信息表 @@ -273,6 +295,10 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { bmLEC.setAttributeValue("INPUTUSERID", asUser.getUserID());//登记人 bmLEC.setAttributeValue("INPUTORGID", asUser.getOrgID());//登记部门 bmLEC.setAttributeValue("INPUTTIME", StringFunction.getTodayNow());//登记时间,系统当前时间 + if(lbat!=null){ + bmLEC.setAttributeValue("FRAME_NUMBER", lbat.getAttribute("frame_number")+"");//车架号 + bmLEC.setAttributeValue("mile", lbat.getAttribute("mile")+"");//公里数 + } bomCI.saveObject(bmLEC); } catch (Exception e) { tx.rollback(); diff --git a/src_tenwa/com/tenwa/util/BeforeApplicationCheckUtil.java b/src_tenwa/com/tenwa/util/BeforeApplicationCheckUtil.java index f5e79d17f..10f026028 100644 --- a/src_tenwa/com/tenwa/util/BeforeApplicationCheckUtil.java +++ b/src_tenwa/com/tenwa/util/BeforeApplicationCheckUtil.java @@ -217,7 +217,7 @@ public class BeforeApplicationCheckUtil { StringBuffer keyword = new StringBuffer(); StringBuffer keywordValue = new StringBuffer(); - /* for(int i = 1; i <= 5; i ++) { + /*for(int i = 1; i <= 5; i ++) { String key = BigDataPropertiesUtil.get("keyword" + i); String keyValue = CurPage.getParameter(key); if(key == null || keyValue == null) { @@ -234,8 +234,8 @@ public class BeforeApplicationCheckUtil { keyword.append(",keyword3"); keywordValue.append(",'"+FlowNo+"'"); }*/ - SqlObject sql = new SqlObject(("insert into bigdata_pengyuan_af (id," + keyword.toString() + ",xml_data,html_data," - + "inputuserid,inputorgid,inputtime,fullName,fullcertId,fullphone,fullcardNo) values('" + applyId + "'," + keywordValue.toString() + ",'" + SqlObject sql = new SqlObject(("insert into bigdata_pengyuan_af (id,keyword1,xml_data,html_data," + + "inputuserid,inputorgid,inputtime,fullName,fullcertId,fullphone,fullcardNo) values('" + applyId + "','','" + xmlResult + "','" + htmlFile.split("@")[1] + "','" +asUser.getUserID() + "','" + asUser.getOrgID()+ "','" + StringFunction.getTodayNow() +"','" +fullname+"','"+fullcertid+"','"+fullPhone+"','"+fullcardNo+"')").replaceAll(":", "△")); sql.setDebugSql(sql.getDebugSql().replaceAll("△", ":")); @@ -304,7 +304,7 @@ public class BeforeApplicationCheckUtil { String message = null ; System.out.println("执行"); SAXReader reader = new SAXReader(); - File file = new File("xmlPath"); + File file = new File(xmlPath); try { Document document = reader.read(file); Element root = document.getRootElement();