Merge branch 'develop' of http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into develop
This commit is contained in:
commit
d4c674dcff
@ -13,9 +13,11 @@
|
||||
String sTempletNo = "DDepositReturn_TempInfo";//--Ä£°åºÅ--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
/* doTemp.setColTips("", "²âÊÔ"); */
|
||||
doTemp.setHtmlEvent("CAUTION_MONEY", "onblur", "selectBalance");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//Ö»¶Áģʽ
|
||||
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
|
||||
|
||||
String sButtons[][] = {
|
||||
@ -26,7 +28,7 @@
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
var sFlowUnid = "<%=sFlowUnid%>";
|
||||
setItemValue(0,0,"MONEY_TYPE","ÍË¿î");
|
||||
setItemValue(0,0,"MONEY_TYPE","±£Ö¤½ðÍË¿î");
|
||||
setItemValue(0,0,"REFUND_PERSON","<%=ProjectName%>");
|
||||
setItemValue(0,0,"InputUserID","<%=CurUser.getUserName()%>");
|
||||
setItemValue(0,0,"InputOrgID","<%=CurUser.getOrgName()%>");
|
||||
@ -42,5 +44,9 @@
|
||||
function returnList(){
|
||||
AsControl.OpenView("/DealerDeposit/DDepositReturn_TempList.jsp", "FlowUnid="+sFlowUnid,"_self","");
|
||||
}
|
||||
function selectBalance(){
|
||||
AsControl.RunJavaMethod(ClassName,MethodName, Args);
|
||||
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -9,7 +9,8 @@
|
||||
String sPrevUrl = CurPage.getParameter("ID");
|
||||
//String ProjectName = CurPage.getParameter("ProjectName");
|
||||
/* if(sPrevUrl == null) sPrevUrl = "/DealerDeposit/DMarginChargeInfo_TempList.jsp"; */
|
||||
|
||||
BizObject flow=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT","flow_unid=:flowunid").setParameter("flowunid", sFlowUnid).getSingleResult(false);
|
||||
String DISTRIBUTOR_NO=flow.getAttribute("Flow_Key").getString();
|
||||
String sTempletNo = "DMarginChargeInfo_Temp";//--Ä£°åºÅ--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
/* doTemp.setColTips("", "²âÊÔ"); */
|
||||
@ -25,7 +26,9 @@
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
var sFlowUnid = "<%=sFlowUnid%>";
|
||||
setItemValue(0,0,"MONEY_TYPE","±£Ö¤½ðÊÕ¿î");
|
||||
setItemValue(0,0,"MONEY_TYPE","ÊÕ¿î");
|
||||
setItemValue(0,0,"DISTRIBUTOR_ID","<%=DISTRIBUTOR_NO%>");
|
||||
setItemValue(0,0,"PAYER","<%=CurPage.getParameter("ProjectName")%>");
|
||||
setItemValue(0,0,"InputUserID","<%=CurUser.getUserName()%>");
|
||||
setItemValue(0,0,"InputOrgID","<%=CurUser.getOrgName()%>");
|
||||
@ -42,4 +45,4 @@
|
||||
AsControl.OpenView("/DealerDeposit/DMarginChargeInfo_TempList.jsp", "FlowUnid="+sFlowUnid,"_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("ID");
|
||||
String docClassItemno = CurPage.getParameter("docClassItemno");
|
||||
String custid = CurPage.getParameter("custid");
|
||||
/* String docClassItemno = CurPage.getParameter("docClassItemno");
|
||||
String custid = CurPage.getParameter("custid"); */
|
||||
/* if(sPrevUrl == null) sPrevUrl = ""; */
|
||||
|
||||
String sTempletNo = "CustomerDoc_Info";//--模板号--
|
||||
@ -17,8 +17,8 @@
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
//dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
|
||||
//dwTemp.genHTMLObjectWindow("");
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","save()","","","",""},
|
||||
@ -28,8 +28,8 @@
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function save(){
|
||||
setItemValue(0,0,"doc_Class_Itemno","<%=docClassItemno%>");
|
||||
setItemValue(0,0,"cust_id","<%=custid%>");
|
||||
<%-- setItemValue(0,0,"doc_Class_Itemno","<%=docClassItemno%>");
|
||||
setItemValue(0,0,"cust_id","<%=custid%>"); --%>
|
||||
as_save("myiframe0","returnList()");
|
||||
}
|
||||
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
String custid=CurPage.getParameter("customerid");//客户ID
|
||||
String mainType= CurPage.getParameter("mainType");
|
||||
String docClassItemno="";
|
||||
if(mainType.equals("Customer")){
|
||||
if("Customer".equals(mainType)){
|
||||
docClassItemno="001001";
|
||||
}else if(mainType.equals("Guarantee")){
|
||||
}else if("Guarantee".equals(mainType)){
|
||||
docClassItemno="001002";
|
||||
}
|
||||
String compClientID = request.getParameter("CompClientID");
|
||||
@ -49,6 +49,9 @@
|
||||
String sButtons[][] =null;
|
||||
|
||||
sButtons=new String[][]{
|
||||
{"true","All","Button","新增","新增","newRecord()","","","",""},
|
||||
{"true","All","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit"},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
|
||||
};
|
||||
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
@ -58,8 +61,19 @@ window.onload=function(){
|
||||
$("#DWTD").width( document.body.offsetHeight - 20);
|
||||
document.getElementById('DWTD').innerHTML = '<div style="width:'+(document.body.offsetWidth - 10)+'px;height:'+(document.body.offsetHeight - 40)+'px;overflow: scroll;">'+document.getElementById('DWTD').innerHTML+'</div>';
|
||||
}
|
||||
function saveRecord(){
|
||||
as_save("myiframe0");
|
||||
function newRecord(){
|
||||
//debugger;
|
||||
var sUrl = "/Tenwa/Comm/CustomerDoc/CustomerDoc_Info.jsp";
|
||||
AsControl.OpenView(sUrl,'','_self','');<%-- "docClassItemno="+<%=docClassItemno%>+"&custid="+<%=custid%> --%>
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Comm/CustomerDoc/CustomerDoc_Info.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'ID');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'ID=' +sPara ,'_self','');
|
||||
}
|
||||
//在加载完表格后调用
|
||||
function afterSearch(){
|
||||
@ -104,7 +118,7 @@ function showWord(id,name){
|
||||
var param="attrid="+id;
|
||||
AsControl.OpenPage(sUrl,param,"","");
|
||||
}
|
||||
//在线编辑
|
||||
<%-- //在线编辑
|
||||
function editOffice(id,filename,sRightType){
|
||||
var filetype=filename.substr(filename.indexOf(".")+1);
|
||||
var status=2;
|
||||
@ -121,7 +135,7 @@ function editOffice(id,filename,sRightType){
|
||||
alert("提交失败!");
|
||||
}
|
||||
},"编辑文档");
|
||||
}
|
||||
} --%>
|
||||
function showImage(id,name){
|
||||
var sUrl="/Tenwa/Comm/DocList/showImage.jsp";
|
||||
var param="attrid="+id;
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Core/SystemConfig/OwnConfig/BOwnAccount/BOwnAccount.jsp";
|
||||
AsDialog.PopView(sUrl,'',"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
|
||||
AsDialog.PopView(sUrl,'',"resizable=yes;dialogWidth=800px;dialogHeight=400px;center:yes;status:no;statusbar:no",function(){
|
||||
reloadSelf();
|
||||
},"新增本方信息");
|
||||
}
|
||||
@ -76,7 +76,7 @@ function view(){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
AsDialog.PopView(sUrl,'id='+id+'&rightType=ReadOnly',"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
|
||||
AsDialog.PopView(sUrl,'id='+id+'&rightType=ReadOnly',"resizable=yes;dialogWidth=800px;dialogHeight=400px;center:yes;status:no;statusbar:no",function(){
|
||||
reloadSelf();
|
||||
},"本方信息详情");
|
||||
}
|
||||
@ -89,7 +89,7 @@ function edit(){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
AsDialog.PopView(sUrl,'id='+id,"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
|
||||
AsDialog.PopView(sUrl,'id='+id,"resizable=yes;dialogWidth=800px;dialogHeight=400px;center:yes;status:no;statusbar:no",function(){
|
||||
reloadSelf();
|
||||
},"修改本方信息");
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
AsControl.OpenView(pUrl, "vouid=<%=vouid%>&owned=<%=owned%>","_self","");
|
||||
}
|
||||
function selectLoanSubject(){
|
||||
AsDialog.OpenSelector("SelectLoanSubject","owned,<%=owned%>","dialogWidth=" + parseInt(window.screen.width * 0.5) + "px dialogHeight=" + parseInt(window.screen.height * 0.3) + "px",function(sReturn){
|
||||
AsDialog.OpenSelector("SelectLoanSubject","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
if(!sReturn || sReturn == "_CANCEL_"||sReturn=="_NONE_"||sReturn=="_CLEAR_"){
|
||||
return;
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ function saveproj_name(){
|
||||
}
|
||||
|
||||
//省市
|
||||
function selectRegionCode(){
|
||||
/* 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){
|
||||
//增加清空功能的判断
|
||||
@ -103,6 +103,43 @@ function saveproj_name(){
|
||||
}
|
||||
}
|
||||
},'请选择省市');
|
||||
} */
|
||||
|
||||
var province="";//定义一个全局变量
|
||||
// 选择省份
|
||||
function selectProvinceCode(){
|
||||
AsDialog.OpenSelector("selectProvinceCode","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
|
||||
function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""){
|
||||
//alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
// alert(sReturn[1]);
|
||||
setItemValue(0,0,"provinces",sReturn[1]);
|
||||
province=sReturn[0];
|
||||
setCertType();
|
||||
},"请选择省份",'');
|
||||
}
|
||||
// 选择市区
|
||||
function selectCityCode(){
|
||||
//alert("参数:"+province);
|
||||
if(province=="" || province==null){
|
||||
alert("请先选择省份。");
|
||||
return;
|
||||
}else{
|
||||
AsDialog.OpenSelector("selectCityCode","province,"+province,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
|
||||
function(sReturn){
|
||||
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""){
|
||||
//alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
setItemValue(0,0,"DISTRIBUTOR_ADDRESS",sReturn[0]);//地区区号
|
||||
setItemValue(0,0,"DISTRIBUTOR_ADDRESSNAME",sReturn[1]);//地区
|
||||
},"请选择地区",'');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -33,6 +33,7 @@
|
||||
setItemValue(0,getRow(),"UPDATEUSERID","<%=inputusername%>");
|
||||
setItemValue(0,getRow(),"INPUTORGID","<%=inputorgname%>");
|
||||
setItemValue(0,getRow(),"UPDATEORGID","<%=inputorgname%>");
|
||||
setItemValue(0,getRow(),"SERVER","<%=inputusername%>");
|
||||
var date = new Date();
|
||||
var updatetime = date.toJSON().substring(0,10).replace(/-/g,"/")+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
|
||||
var inputtime = date.toJSON().substring(0,10).replace(/-/g,"/")+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
|
||||
|
||||
@ -23,7 +23,8 @@
|
||||
String carSystem = CurPage.getParameter("carSystem");
|
||||
String productModel = CurPage.getParameter("productModel");
|
||||
String custype = CurPage.getParameter("CustomerType");
|
||||
String certid =CurPage.getParameter("certid");
|
||||
String certid = CurPage.getParameter("certid");
|
||||
String leasform = CurPage.getParameter("LEAS_FORM");
|
||||
//String sTempletNo = "BusinessProjectTempInfo_temp";//--Ä£°åºÅ--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
//×âÁÞÐÎʽsetÖ»¶Á
|
||||
|
||||
@ -22,12 +22,13 @@
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function save(){
|
||||
debugger;
|
||||
var name = getItemValue(0,0,"name");
|
||||
var certid = getItemValue(0,0,"certid");
|
||||
var tel = getItemValue(0,0,"tel");
|
||||
var suname = getItemValue(0,0,"suname");
|
||||
if(name.length > 0){
|
||||
if(certid.length > 0){
|
||||
debugger;
|
||||
if(CheckLicense(certid)){
|
||||
setItemValue(0,0,"certid",certid);
|
||||
//setItemUnit(0,0,"certid","");
|
||||
@ -57,7 +58,7 @@
|
||||
}
|
||||
}
|
||||
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","saveCustomerFamily",
|
||||
"relative=01,status=valid,customerid=<%=customerid%>,flowunid=<%=flowunid%>,certid="+getItemValue(0,0,"certid")+",name="+getItemValue(0,0,"name")+",tel="+getItemValue(0,0,"tel"));
|
||||
"relative=01,status=valid,customerid=<%=customerid%>,flowunid=<%=flowunid%>,certid="+getItemValue(0,0,"certid")+",name="+getItemValue(0,0,"name")+",tel="+getItemValue(0,0,"tel")+",suname="+getItemValue(0,0,"suname"));
|
||||
if(sResult == "SUCCESS"){
|
||||
reloadSelf();
|
||||
}
|
||||
|
||||
@ -1,435 +1,444 @@
|
||||
<%@page import="com.sun.org.apache.xalan.internal.xsltc.compiler.sym"%>
|
||||
<%@page import="jbo.app.tenwa.customer.CUSTOMER_TYPE"%>
|
||||
<%@page import="jbo.app.tenwa.customer.CUSTOMER_INFO"%>
|
||||
<%@page import="java.util.Date"%>
|
||||
<%@page import="java.text.SimpleDateFormat"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
|
||||
Date curdate = new Date();
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd");
|
||||
String dateString = formatter.format(curdate);
|
||||
|
||||
String flowunid = CurPage.getParameter("FlowUnid");
|
||||
String customerid = Sqlca.getString("select customer_id from lb_union_lessee_temp where flowunid='"+flowunid+"'");
|
||||
String sTempletNo = "BusinessCustomerInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
String custname=CurPage.getParameter("custname");
|
||||
doTemp.setHtmlEvent("CERTID","onChange","changeCertid");
|
||||
doTemp.setHtmlEvent("MARRIAGE","onChange","changeChildrensNumber");
|
||||
String rightType = CurPage.getParameter("RightType");//页面只读与否
|
||||
if(rightType==null)rightType="";
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
doTemp.setDefaultValue("CERTTYPE", "Ind01");
|
||||
if(rightType.equals("ReadOnly")){
|
||||
doTemp.setColInnerBtEvent("fulladdress", "");//设置地址按钮
|
||||
}
|
||||
dwTemp.Style = "2";//freeform
|
||||
dwTemp.genHTMLObjectWindow(flowunid + "," + customerid);
|
||||
CurPage.getCurComp().setAttribute("RightType", rightType);
|
||||
if(rightType.equals("ReadOnly")){
|
||||
dwTemp.ReadOnly = "1";//只读模式
|
||||
}
|
||||
String customerType = "03";
|
||||
String compClientID = request.getParameter("CompClientID");
|
||||
//自然人标识
|
||||
String person = "person";
|
||||
dwTemp.replaceColumn("family", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"200px\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp?CompClientID="+compClientID+"&customerid="+customerid+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
String sButtons[][] = {
|
||||
};
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
function changeChildrensNumber(){
|
||||
var marriage = getItemValue(0,0,"MARRIAGE");
|
||||
if("02" == marriage){
|
||||
setItemValue(0,0,"childrens_number","");
|
||||
$("#CHILDRENS_NUMBER").attr("ReadOnly","true");
|
||||
// hideItem(0,'family');
|
||||
$("#A_Group_0030").attr("style","display:none;");
|
||||
}else{
|
||||
$("#CHILDRENS_NUMBER").removeAttr("ReadOnly");
|
||||
$("#A_Group_0030").attr("style","display:block;");
|
||||
}
|
||||
}
|
||||
|
||||
if(getItemValue(0,0,"CERTTYPE") == null || getItemValue(0,0,"CERTTYPE") == ""){
|
||||
setItemValue(0,0,"CERTTYPE","Ind01");
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
//init();
|
||||
$("#FULLADDRESS").css("width",$("#FULLADDRESS").parent().parent().parent().parent()[0].clientWidth/2+200+"px");
|
||||
$("#FULLADDRESS").attr("ReadOnly","true");
|
||||
$("#ENTRYTIME").attr("ReadOnly","true");
|
||||
$("#WORKCORP")[0].width = $("#WORKCORP").parent().parent().parent()[0].clientWidth/2+200;
|
||||
$("#WORKADD")[0].width = $("#WORKADD").parent().parent().parent()[0].clientWidth/2+200;
|
||||
$("#WORKTEL")[0].width = $("#WORKTEL").parent().parent().parent()[0].clientWidth/2+200;
|
||||
if("ReadOnly" != "<%=rightType%>"){
|
||||
checkDriver();
|
||||
//ValidityCheck();
|
||||
}
|
||||
//changeOtherRequired();
|
||||
})
|
||||
var flag=false;//标记是否复制过客户
|
||||
function changeCertid(){
|
||||
var certid=getItemValue(0,0,"CERTID");
|
||||
var result=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","checkCustomerByCertID",'certid='+certid);
|
||||
if(result.length>0){
|
||||
var newInput='<input type="button" id="copyCust" value="复制" onclick="copyCustomer(\''+result+'\',\'<%=flowunid%>\')"/>';
|
||||
$("#CERTID").parent().append(newInput);
|
||||
}else{
|
||||
$("#copyCust").remove();
|
||||
}
|
||||
//判断是否承租人租赁车辆数量
|
||||
var res0=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","checkCustomerCarByCertid",'certid='+certid);
|
||||
if(res0 != "0"){
|
||||
alert(res0);
|
||||
}
|
||||
|
||||
}
|
||||
function copyCustomer(custid,flowunid){
|
||||
RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","copyCustomerInfo",'customerid='+custid+',flowunid='+flowunid);
|
||||
alert("复制成功!");
|
||||
reloadSelf();
|
||||
}
|
||||
function init(){
|
||||
var status = getItemValue(0, getRow(), "status");
|
||||
var certtype=getItemValue(0, getRow(), "certtype");
|
||||
var certid=getItemValue(0, getRow(), "certid");
|
||||
if(status!='status02'){
|
||||
setItemRequired(0,"certtype",false);
|
||||
setItemRequired(0,"certid",false);
|
||||
}
|
||||
var custtypes = $("input[name='CUSTTYPE']").length;
|
||||
for(var i=0;i<custtypes;i++){
|
||||
$("input[name='CUSTTYPE']").get(i).checked=true;
|
||||
}
|
||||
}
|
||||
function changeOtherRequired(){
|
||||
var status = getItemValue(0,getRow(),"status");
|
||||
var country = getItemValue(0,getRow(),"COUNTRY");
|
||||
if(status == "status02"){
|
||||
setItemRequired(0,"CUSTSOURCE",true);//客户来源
|
||||
setItemRequired(0,"CUSTKIND",true);//内部行业
|
||||
setItemRequired(0,"BIRTHDAY",true);//出生日期
|
||||
setItemRequired(0,"MARRIAGE",true);//婚姻状况
|
||||
setItemRequired(0,"OCCUPATION",true);//职业
|
||||
setItemRequired(0,"UNITKIND",true);//单位所属行业
|
||||
setItemRequired(0,"HEADSHIP",true);//职务
|
||||
setItemRequired(0,"title",true);//职称
|
||||
setItemRequired(0,"WORKCORP",true);//单位名称
|
||||
setItemRequired(0,"certtype",true);
|
||||
setItemRequired(0,"certid",true);
|
||||
}else{
|
||||
setItemRequired(0,"CUSTSOURCE",false);
|
||||
setItemRequired(0,"CUSTKIND",false);
|
||||
setItemRequired(0,"BIRTHDAY",false);
|
||||
setItemRequired(0,"MARRIAGE",false);
|
||||
setItemRequired(0,"OCCUPATION",false);
|
||||
setItemRequired(0,"UNITKIND",false);
|
||||
setItemRequired(0,"HEADSHIP",false);
|
||||
setItemRequired(0,"title",false);
|
||||
setItemRequired(0,"WORKCORP",false);
|
||||
setItemRequired(0,"certtype",false);
|
||||
setItemRequired(0,"certid",false);
|
||||
}
|
||||
if(status == "status02" && country=='CHN'){
|
||||
setItemRequired(0,"provincename",true);
|
||||
setItemRequired(0,"cityname",true);
|
||||
}else{
|
||||
setItemRequired(0,"provincename",false);
|
||||
setItemRequired(0,"cityname",false);
|
||||
}
|
||||
}
|
||||
|
||||
function CheckDate(){
|
||||
var idexpiry=getItemValue(0,getRow(),"IDEXPIRY");
|
||||
var date1 = "<%=dateString%>";
|
||||
|
||||
if(date1>=idexpiry){
|
||||
setErrorTips("IDEXPIRY","证件到期日必须晚于当前日期!");
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("IDEXPIRY","");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function saveRecord(leasfrom,projectSource){
|
||||
//as_save("myiframe0","frame_list.window.as_save(0);");
|
||||
<%-- var idexpiry=getItemValue(0,getRow(),"IDEXPIRY");
|
||||
var date1 = "<%=dateString%>";
|
||||
if(date1>=idexpiry){
|
||||
alert("基本信息中的证件到期日的日期必须晚于当前日期");
|
||||
return false;
|
||||
} --%>
|
||||
var idexpiry=getItemValue(0,getRow(),"IDEXPIRY");
|
||||
if(idexpiry!=undefined&&idexpiry!=null&&idexpiry!=""){
|
||||
if(!CheckDate()){
|
||||
return;
|
||||
}
|
||||
}
|
||||
ValidityCheck();
|
||||
setItemValue(0,0,"flowunid","<%=flowunid%>");
|
||||
if(!checkCertInfo(true)) return ;
|
||||
if(frame_list.window.save()){
|
||||
var certid=getItemValue(0,0,"CERTID");
|
||||
var customerid=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","updateCustomerId",'certid='+certid+',flowunid=<%=flowunid%>');
|
||||
setItemValue(0,0,"customerid",customerid);
|
||||
as_save("0","saveCertInfo("+leasfrom+",'"+projectSource+"')");
|
||||
};
|
||||
}
|
||||
|
||||
function saveCertInfo(leasfrom,projectSource){
|
||||
|
||||
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","saveCertInfo",'project_source='+projectSource+',leas_from='+leasfrom+',idexpiry='+getItemValue(0,0,"idexpiry")+',certtype='+getItemValue(0,0,"certtype")+',customerid='+getItemValue(0,0,"customerid")+',flowunid=<%=flowunid%>,certid='+getItemValue(0,0,"certid")+',name='+getItemValue(0,0,"name")+',userid=<%=CurUser.getUserID()%>,orgid=<%=CurUser.getOrgID()%>');
|
||||
if(sResult == "SUCCESS"){
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
|
||||
function selectHomeAddress(){
|
||||
if(getItemValue(0,0,"fulladdress") == ""){
|
||||
newRecord();
|
||||
}else{
|
||||
edit();
|
||||
}
|
||||
}
|
||||
|
||||
//新增
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerAddress.jsp";
|
||||
var fulladdress = getItemValue(0,getRow(0),'fulladdress');
|
||||
var country = getItemValue(0,getRow(0),'country');
|
||||
var province = getItemValue(0,getRow(0),'province');
|
||||
var dressdetail = getItemValue(0,getRow(0),'dressdetail');
|
||||
var zipcode = getItemValue(0,getRow(0),'zipcode');
|
||||
var provincename = getItemValue(0,getRow(0),'provincename');
|
||||
AsDialog.PopView(sUrl,'customer_id='+getItemValue(0,0,"ASSUROR")+"&flowunid=<%=flowunid%>&fulladdress="+fulladdress+"&country="+country+"&province="+province+"&dressdetail="+dressdetail+"&zipcode="+zipcode+"&provincename="+provincename,"resizable=yes;dialogWidth=600px;dialogHeight=355px;center:yes;status:no;statusbar:no",function(result){
|
||||
if(result == "cancel"){
|
||||
return;
|
||||
}
|
||||
if(result !== ""){
|
||||
setItemValue(0,0,"addressid",result.split("@")[0]);
|
||||
setItemValue(0,0,"fulladdress",result.split("@")[1]);
|
||||
setItemValue(0,0,"country",result.split("@")[2]);
|
||||
setItemValue(0,0,"province",result.split("@")[3]);
|
||||
setItemValue(0,0,"dressdetail",result.split("@")[4]);
|
||||
setItemValue(0,0,"zipcode",result.split("@")[5]);
|
||||
setItemValue(0,0,"provincename",result.split("@")[6]);
|
||||
}
|
||||
},"新增地址信息");
|
||||
}
|
||||
//详情
|
||||
function view(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerAddress.jsp";
|
||||
var id = getItemValue(0,getRow(0),'addressid');
|
||||
if(typeof(id)=="undefined" || id.length==0 ){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
AsDialog.PopView(sUrl,'id=' +id+'&rightType=ReadOnly&flowunid=<%=flowunid%>',"resizable=yes;dialogWidth=600px;dialogHeight=355px;center:yes;status:no;statusbar:no",function(result){
|
||||
if(result == "cancel"){
|
||||
return;
|
||||
}
|
||||
if(result !== ""){
|
||||
setItemValue(0,0,"addressid",result.split("@")[0]);
|
||||
setItemValue(0,0,"fulladdress",result.split("@")[1]);
|
||||
setItemValue(0,0,"country",result.split("@")[2]);
|
||||
setItemValue(0,0,"province",result.split("@")[3]);
|
||||
setItemValue(0,0,"dressdetail",result.split("@")[4]);
|
||||
setItemValue(0,0,"zipcode",result.split("@")[5]);
|
||||
setItemValue(0,0,"provincename",result.split("@")[6]);
|
||||
}
|
||||
},"地址详细信息");
|
||||
}
|
||||
//修改
|
||||
function edit(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerAddress.jsp";
|
||||
var id = getItemValue(0,getRow(0),'addressid');
|
||||
var fulladdress = getItemValue(0,getRow(0),'fulladdress');
|
||||
var country = getItemValue(0,getRow(0),'country');
|
||||
var province = getItemValue(0,getRow(0),'province');
|
||||
var dressdetail = getItemValue(0,getRow(0),'dressdetail');
|
||||
var zipcode = getItemValue(0,getRow(0),'zipcode');
|
||||
var provincename = getItemValue(0,getRow(0),'provincename');
|
||||
var flag = "edit";
|
||||
if(typeof(id)=="undefined" || id.length==0){
|
||||
if(fulladdress.length == 0){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
}
|
||||
AsDialog.PopView(sUrl,"id="+id+"&customer_id="+getItemValue(0,0,"ASSUROR")+"&flowunid=<%=flowunid%>"+"&flag="+flag+"&fulladdress="+fulladdress+"&country="+country+"&province="+province+"&dressdetail="+dressdetail+"&zipcode="+zipcode+"&provincename="+provincename,"resizable=yes;dialogWidth=600px;dialogHeight=355px;center:yes;status:no;statusbar:no",function(result){
|
||||
if(result == "cancel"){
|
||||
return;
|
||||
}
|
||||
if(result !== ""){
|
||||
setItemValue(0,0,"addressid",result.split("@")[0]);
|
||||
setItemValue(0,0,"fulladdress",result.split("@")[1]);
|
||||
setItemValue(0,0,"country",result.split("@")[2]);
|
||||
setItemValue(0,0,"province",result.split("@")[3]);
|
||||
setItemValue(0,0,"dressdetail",result.split("@")[4]);
|
||||
setItemValue(0,0,"zipcode",result.split("@")[5]);
|
||||
setItemValue(0,0,"provincename",result.split("@")[6]);
|
||||
}
|
||||
},"修改地址信息");
|
||||
}
|
||||
|
||||
function selectProviceCode(){//选择省份
|
||||
var countrycode = getItemValue(0,getRow(),"country");
|
||||
if(typeof(countrycode)!=undefined && countrycode == 'CHN'){
|
||||
var provincecode = getItemValue(0,getRow(),"province");
|
||||
var provincecodename = getItemValue(0,getRow(),"provincename");
|
||||
AsDialog.SetTreeValue("SelectProvice", "__0000", "province=itemno@provincename=itemname","itemno","itemname", [provincecode,provincecodename], false, true,"",function(sReturn){
|
||||
sReturn = sReturn.split("@");
|
||||
if(sReturn[0]!=provincecode){
|
||||
setItemValue(0,getRow(),"city","");
|
||||
setItemValue(0,getRow(),"cityname","");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function selectCityCode(){//选择城市
|
||||
var provincecode = getItemValue(0,getRow(),"province");
|
||||
if(typeof(provincecode)!=undefined && provincecode != ''){
|
||||
var citycode = getItemValue(0,getRow(),"city");
|
||||
var citycodename = getItemValue(0,getRow(),"cityname");
|
||||
var param = provincecode.substr(0,2);
|
||||
AsDialog.SetTreeValue("SelectCity", param+'0000,'+param+'__00', "city=itemno@cityname=itemname","itemno","itemname", [citycode,citycodename], false, true);
|
||||
}
|
||||
}
|
||||
function selectOrgnature(){//选择机构类型
|
||||
var orgnature = getItemValue(0,getRow(),"orgnature");
|
||||
var orgnaturename = getItemValue(0,getRow(),"orgnaturename");
|
||||
AsDialog.SetTreeValue("SelectOrgnature", '_0', "orgnature=itemno@orgnaturename=itemname","itemno","itemname", [orgnature,orgnaturename], false, true);
|
||||
}
|
||||
function ValidityCheck(){
|
||||
|
||||
if(<%=customerType%> == '03'){ //个人客户
|
||||
//校验证件类型为身份证或临时身份证时,出生日期是否同证件编号中的日期一致
|
||||
var certType = getItemValue(0,getRow(),"CERTTYPE");
|
||||
var certID = getItemValue(0,getRow(),"CERTID");
|
||||
|
||||
if(certType == 'Ind01' || certType == 'Ind08'){
|
||||
|
||||
//将身份证中的日期自动赋给出生日期,把身份证中的性别赋给性别
|
||||
if(certID.length == 15){
|
||||
sex = certID.substring(14);
|
||||
sex = parseInt(sex);
|
||||
certID = certID.substring(6,12);
|
||||
certID = "19"+certID.substring(0,2)+"/"+certID.substring(2,4)+"/"+certID.substring(4,6);
|
||||
setItemValue(0,getRow(),"BIRTHDAY",certID);
|
||||
if(sex%2==0){//奇男偶女
|
||||
setItemValue(0,getRow(),"SEX","2");
|
||||
|
||||
}else{
|
||||
setItemValue(0,getRow(),"SEX","1");
|
||||
|
||||
}
|
||||
}
|
||||
if(certID.length == 18){
|
||||
sex = certID.substring(16,17);
|
||||
sex = parseInt(sex);
|
||||
certID = certID.substring(6,14);
|
||||
certID = certID.substring(0,4)+"/"+certID.substring(4,6)+"/"+certID.substring(6,8);
|
||||
setItemValue(0,getRow(),"BIRTHDAY",certID);
|
||||
if(sex%2==0){//奇男偶女
|
||||
setItemValue(0,getRow(),"SEX","2");
|
||||
|
||||
|
||||
}else{
|
||||
setItemValue(0,getRow(),"SEX","1");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* function setErrorTips(colName,tips){
|
||||
if(tips==""){
|
||||
setItemUnit(0,getRow(),colName,"");
|
||||
return ;
|
||||
}
|
||||
setItemUnit(0,getRow(),colName,"<font color=red>"+tips+"</font>");
|
||||
} */
|
||||
|
||||
//校验驾驶证(是/否)
|
||||
function checkDriver(){
|
||||
var driverLicense = getItemValue(0,getRow(),"DRIVERLICENSE");
|
||||
if(driverLicense=='2'){
|
||||
setItemValue(0,getRow(),"LICENSENAME","");
|
||||
setItemReadOnly(0, getRow(), "LICENSENAME", true);
|
||||
setItemRequired(0, "LICENSENAME", false);
|
||||
}else{
|
||||
setItemReadOnly(0, getRow(), "LICENSENAME", false);
|
||||
setItemRequired(0, "LICENSENAME", true);
|
||||
}
|
||||
}
|
||||
|
||||
function setIdexpiry(){
|
||||
var date = document.getElementById("IDEXPIRY");
|
||||
var dateValue = "";
|
||||
dateValue = date.value;
|
||||
AsDialog.OpenCalender(date,"yyyy/MM/dd","1900/01/01","2100/12/31",function(dateValue){
|
||||
var myNewValue = "",myValue="";
|
||||
myValue = this.dayValue;
|
||||
if(typeof(myValue)!="undefined" && myValue!="undefined"){
|
||||
myNewValue = myValue;
|
||||
if(dateValue!=amarsoft2Real(myNewValue)){
|
||||
date.value = amarsoft2Real(myNewValue);
|
||||
setItemValue(0,getRow(0),"idexpiry",date.value);
|
||||
}
|
||||
}
|
||||
},0,document.getElementById("DWTR").offsetTop);
|
||||
}
|
||||
|
||||
function checkCertInfo(flag){
|
||||
if(typeof(flag)=="undefined") flag=false;
|
||||
var certType = getItemValue(0,getRow(),"certtype");
|
||||
var certid = getItemValue(0,getRow(),"certid");
|
||||
|
||||
//检查自然人证件
|
||||
if(certType == 'Ind01'){
|
||||
if (!checkIdCard(certid)){
|
||||
setErrorTips("certid",getBusinessMessage('156'));
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("certid","");
|
||||
}
|
||||
}
|
||||
// 护照验证
|
||||
if(certType == 'Ind03'){
|
||||
if (!checkCard(certid)){
|
||||
setErrorTips("certid","护照格式有误!");
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("certid","");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// 护照验证
|
||||
function checkCard(value) {
|
||||
var re1 = /^[a-zA-Z]{5,17}$/;
|
||||
var re2 = /^[a-zA-Z0-9]{5,17}$/;
|
||||
return (re2.test(value)) || re1.test(value);
|
||||
}
|
||||
|
||||
function checkIdCard(value) {
|
||||
var re = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
|
||||
return re.test(value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
<%@page import="com.sun.org.apache.xalan.internal.xsltc.compiler.sym"%>
|
||||
<%@page import="jbo.app.tenwa.customer.CUSTOMER_TYPE"%>
|
||||
<%@page import="jbo.app.tenwa.customer.CUSTOMER_INFO"%>
|
||||
<%@page import="java.util.Date"%>
|
||||
<%@page import="java.text.SimpleDateFormat"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
|
||||
Date curdate = new Date();
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd");
|
||||
String dateString = formatter.format(curdate);
|
||||
|
||||
String flowunid = CurPage.getParameter("FlowUnid");
|
||||
String customerid = Sqlca.getString("select customer_id from lb_union_lessee_temp where flowunid='"+flowunid+"'");
|
||||
String sTempletNo = "BusinessCustomerInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
String custname=CurPage.getParameter("custname");
|
||||
System.out.print(custname+"=====================");
|
||||
doTemp.setHtmlEvent("CERTID","onChange","changeCertid");
|
||||
doTemp.setHtmlEvent("MARRIAGE","onChange","changeChildrensNumber");
|
||||
String rightType = CurPage.getParameter("RightType");//页面只读与否
|
||||
if(rightType==null)rightType="";
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
doTemp.setDefaultValue("CERTTYPE", "Ind01");
|
||||
if(rightType.equals("ReadOnly")){
|
||||
doTemp.setColInnerBtEvent("fulladdress", "");//设置地址按钮
|
||||
}
|
||||
dwTemp.Style = "2";//freeform
|
||||
dwTemp.genHTMLObjectWindow(flowunid + "," + customerid);
|
||||
CurPage.getCurComp().setAttribute("RightType", rightType);
|
||||
if(rightType.equals("ReadOnly")){
|
||||
dwTemp.ReadOnly = "1";//只读模式
|
||||
}
|
||||
String customerType = "03";
|
||||
String compClientID = request.getParameter("CompClientID");
|
||||
//自然人标识
|
||||
String person = "person";
|
||||
dwTemp.replaceColumn("family", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"200px\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp?CompClientID="+compClientID+"&customerid="+customerid+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
String sButtons[][] = {
|
||||
{"true","","Button","身份校验","身份校验","identityVerification()","","","","btn_icon_check",""}
|
||||
};
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function identityVerification(){
|
||||
var id = getItemValue(0,0,'ID');
|
||||
var result=RunJavaMethodTrans("com.tenwa.lease.flow.project.validate.IdentityVerification","doIdentityVerification",'id='+id);
|
||||
if(result == 'ERROR'){
|
||||
alert('验证失败');
|
||||
}else{
|
||||
alert(result);
|
||||
}
|
||||
}
|
||||
function changeChildrensNumber(){
|
||||
var marriage = getItemValue(0,0,"MARRIAGE");
|
||||
if("02" == marriage){
|
||||
setItemValue(0,0,"childrens_number","");
|
||||
$("#CHILDRENS_NUMBER").attr("ReadOnly","true");
|
||||
// hideItem(0,'family');
|
||||
$("#A_Group_0030").attr("style","display:none;");
|
||||
}else{
|
||||
$("#CHILDRENS_NUMBER").removeAttr("ReadOnly");
|
||||
$("#A_Group_0030").attr("style","display:block;");
|
||||
}
|
||||
}
|
||||
|
||||
if(getItemValue(0,0,"CERTTYPE") == null || getItemValue(0,0,"CERTTYPE") == ""){
|
||||
setItemValue(0,0,"CERTTYPE","Ind01");
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
//init();
|
||||
$("#FULLADDRESS").css("width",$("#FULLADDRESS").parent().parent().parent().parent()[0].clientWidth/2+200+"px");
|
||||
$("#FULLADDRESS").attr("ReadOnly","true");
|
||||
$("#ENTRYTIME").attr("ReadOnly","true");
|
||||
$("#WORKCORP")[0].width = $("#WORKCORP").parent().parent().parent()[0].clientWidth/2+200;
|
||||
$("#WORKADD")[0].width = $("#WORKADD").parent().parent().parent()[0].clientWidth/2+200;
|
||||
$("#WORKTEL")[0].width = $("#WORKTEL").parent().parent().parent()[0].clientWidth/2+200;
|
||||
if("ReadOnly" != "<%=rightType%>"){
|
||||
checkDriver();
|
||||
//ValidityCheck();
|
||||
}
|
||||
//changeOtherRequired();
|
||||
})
|
||||
var flag=false;//标记是否复制过客户
|
||||
function changeCertid(){
|
||||
var certid=getItemValue(0,0,"CERTID");
|
||||
var result=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","checkCustomerByCertID",'certid='+certid);
|
||||
if(result.length>0){
|
||||
var newInput='<input type="button" id="copyCust" value="复制" onclick="copyCustomer(\''+result+'\',\'<%=flowunid%>\')"/>';
|
||||
$("#CERTID").parent().append(newInput);
|
||||
}else{
|
||||
$("#copyCust").remove();
|
||||
}
|
||||
//判断是否承租人租赁车辆数量
|
||||
var res0=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","checkCustomerCarByCertid",'certid='+certid);
|
||||
if(res0 != "0"){
|
||||
alert(res0);
|
||||
}
|
||||
|
||||
}
|
||||
function copyCustomer(custid,flowunid){
|
||||
RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","copyCustomerInfo",'customerid='+custid+',flowunid='+flowunid);
|
||||
alert("复制成功!");
|
||||
reloadSelf();
|
||||
}
|
||||
function init(){
|
||||
var status = getItemValue(0, getRow(), "status");
|
||||
var certtype=getItemValue(0, getRow(), "certtype");
|
||||
var certid=getItemValue(0, getRow(), "certid");
|
||||
if(status!='status02'){
|
||||
setItemRequired(0,"certtype",false);
|
||||
setItemRequired(0,"certid",false);
|
||||
}
|
||||
var custtypes = $("input[name='CUSTTYPE']").length;
|
||||
for(var i=0;i<custtypes;i++){
|
||||
$("input[name='CUSTTYPE']").get(i).checked=true;
|
||||
}
|
||||
}
|
||||
function changeOtherRequired(){
|
||||
var status = getItemValue(0,getRow(),"status");
|
||||
var country = getItemValue(0,getRow(),"COUNTRY");
|
||||
if(status == "status02"){
|
||||
setItemRequired(0,"CUSTSOURCE",true);//客户来源
|
||||
setItemRequired(0,"CUSTKIND",true);//内部行业
|
||||
setItemRequired(0,"BIRTHDAY",true);//出生日期
|
||||
setItemRequired(0,"MARRIAGE",true);//婚姻状况
|
||||
setItemRequired(0,"OCCUPATION",true);//职业
|
||||
setItemRequired(0,"UNITKIND",true);//单位所属行业
|
||||
setItemRequired(0,"HEADSHIP",true);//职务
|
||||
setItemRequired(0,"title",true);//职称
|
||||
setItemRequired(0,"WORKCORP",true);//单位名称
|
||||
setItemRequired(0,"certtype",true);
|
||||
setItemRequired(0,"certid",true);
|
||||
}else{
|
||||
setItemRequired(0,"CUSTSOURCE",false);
|
||||
setItemRequired(0,"CUSTKIND",false);
|
||||
setItemRequired(0,"BIRTHDAY",false);
|
||||
setItemRequired(0,"MARRIAGE",false);
|
||||
setItemRequired(0,"OCCUPATION",false);
|
||||
setItemRequired(0,"UNITKIND",false);
|
||||
setItemRequired(0,"HEADSHIP",false);
|
||||
setItemRequired(0,"title",false);
|
||||
setItemRequired(0,"WORKCORP",false);
|
||||
setItemRequired(0,"certtype",false);
|
||||
setItemRequired(0,"certid",false);
|
||||
}
|
||||
if(status == "status02" && country=='CHN'){
|
||||
setItemRequired(0,"provincename",true);
|
||||
setItemRequired(0,"cityname",true);
|
||||
}else{
|
||||
setItemRequired(0,"provincename",false);
|
||||
setItemRequired(0,"cityname",false);
|
||||
}
|
||||
}
|
||||
|
||||
function CheckDate(){
|
||||
var idexpiry=getItemValue(0,getRow(),"IDEXPIRY");
|
||||
var date1 = "<%=dateString%>";
|
||||
|
||||
if(date1>=idexpiry){
|
||||
setErrorTips("IDEXPIRY","证件到期日必须晚于当前日期!");
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("IDEXPIRY","");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function saveRecord(leasfrom,projectSource){
|
||||
<%-- var idexpiry=getItemValue(0,getRow(),"IDEXPIRY");
|
||||
var date1 = "<%=dateString%>";
|
||||
if(date1>=idexpiry){
|
||||
alert("基本信息中的证件到期日的日期必须晚于当前日期");
|
||||
return false;
|
||||
} --%>
|
||||
var idexpiry=getItemValue(0,getRow(),"IDEXPIRY");
|
||||
if(idexpiry!=undefined&&idexpiry!=null&&idexpiry!=""){
|
||||
if(!CheckDate()){
|
||||
return;
|
||||
}
|
||||
}
|
||||
ValidityCheck();
|
||||
setItemValue(0,0,"flowunid","<%=flowunid%>");
|
||||
if(!checkCertInfo(true)) return ;
|
||||
if(frame_list.window.save()){
|
||||
var certid=getItemValue(0,0,"CERTID");
|
||||
var customerid=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","updateCustomerId",'certid='+certid+',flowunid=<%=flowunid%>');
|
||||
setItemValue(0,0,"customerid",customerid);
|
||||
as_save("0","saveCertInfo("+leasfrom+",'"+projectSource+"')");
|
||||
};
|
||||
}
|
||||
|
||||
function saveCertInfo(leasfrom,projectSource){
|
||||
|
||||
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","saveCertInfo",'project_source='+projectSource+',leas_from='+leasfrom+',idexpiry='+getItemValue(0,0,"idexpiry")+',certtype='+getItemValue(0,0,"certtype")+',customerid='+getItemValue(0,0,"customerid")+',flowunid=<%=flowunid%>,certid='+getItemValue(0,0,"certid")+',name='+getItemValue(0,0,"name")+',userid=<%=CurUser.getUserID()%>,orgid=<%=CurUser.getOrgID()%>');
|
||||
if(sResult == "SUCCESS"){
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
|
||||
function selectHomeAddress(){
|
||||
if(getItemValue(0,0,"fulladdress") == ""){
|
||||
newRecord();
|
||||
}else{
|
||||
edit();
|
||||
}
|
||||
}
|
||||
|
||||
//新增
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerAddress.jsp";
|
||||
var fulladdress = getItemValue(0,getRow(0),'fulladdress');
|
||||
var country = getItemValue(0,getRow(0),'country');
|
||||
var province = getItemValue(0,getRow(0),'province');
|
||||
var dressdetail = getItemValue(0,getRow(0),'dressdetail');
|
||||
var zipcode = getItemValue(0,getRow(0),'zipcode');
|
||||
var provincename = getItemValue(0,getRow(0),'provincename');
|
||||
AsDialog.PopView(sUrl,'customer_id='+getItemValue(0,0,"ASSUROR")+"&flowunid=<%=flowunid%>&fulladdress="+fulladdress+"&country="+country+"&province="+province+"&dressdetail="+dressdetail+"&zipcode="+zipcode+"&provincename="+provincename,"resizable=yes;dialogWidth=600px;dialogHeight=355px;center:yes;status:no;statusbar:no",function(result){
|
||||
if(result == "cancel"){
|
||||
return;
|
||||
}
|
||||
if(result !== ""){
|
||||
setItemValue(0,0,"addressid",result.split("@")[0]);
|
||||
setItemValue(0,0,"fulladdress",result.split("@")[1]);
|
||||
setItemValue(0,0,"country",result.split("@")[2]);
|
||||
setItemValue(0,0,"province",result.split("@")[3]);
|
||||
setItemValue(0,0,"dressdetail",result.split("@")[4]);
|
||||
setItemValue(0,0,"zipcode",result.split("@")[5]);
|
||||
setItemValue(0,0,"provincename",result.split("@")[6]);
|
||||
}
|
||||
},"新增地址信息");
|
||||
}
|
||||
//详情
|
||||
function view(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerAddress.jsp";
|
||||
var id = getItemValue(0,getRow(0),'addressid');
|
||||
if(typeof(id)=="undefined" || id.length==0 ){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
AsDialog.PopView(sUrl,'id=' +id+'&rightType=ReadOnly&flowunid=<%=flowunid%>',"resizable=yes;dialogWidth=600px;dialogHeight=355px;center:yes;status:no;statusbar:no",function(result){
|
||||
if(result == "cancel"){
|
||||
return;
|
||||
}
|
||||
if(result !== ""){
|
||||
setItemValue(0,0,"addressid",result.split("@")[0]);
|
||||
setItemValue(0,0,"fulladdress",result.split("@")[1]);
|
||||
setItemValue(0,0,"country",result.split("@")[2]);
|
||||
setItemValue(0,0,"province",result.split("@")[3]);
|
||||
setItemValue(0,0,"dressdetail",result.split("@")[4]);
|
||||
setItemValue(0,0,"zipcode",result.split("@")[5]);
|
||||
setItemValue(0,0,"provincename",result.split("@")[6]);
|
||||
}
|
||||
},"地址详细信息");
|
||||
}
|
||||
//修改
|
||||
function edit(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerAddress.jsp";
|
||||
var id = getItemValue(0,getRow(0),'addressid');
|
||||
var fulladdress = getItemValue(0,getRow(0),'fulladdress');
|
||||
var country = getItemValue(0,getRow(0),'country');
|
||||
var province = getItemValue(0,getRow(0),'province');
|
||||
var dressdetail = getItemValue(0,getRow(0),'dressdetail');
|
||||
var zipcode = getItemValue(0,getRow(0),'zipcode');
|
||||
var provincename = getItemValue(0,getRow(0),'provincename');
|
||||
var flag = "edit";
|
||||
if(typeof(id)=="undefined" || id.length==0){
|
||||
if(fulladdress.length == 0){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
}
|
||||
AsDialog.PopView(sUrl,"id="+id+"&customer_id="+getItemValue(0,0,"ASSUROR")+"&flowunid=<%=flowunid%>"+"&flag="+flag+"&fulladdress="+fulladdress+"&country="+country+"&province="+province+"&dressdetail="+dressdetail+"&zipcode="+zipcode+"&provincename="+provincename,"resizable=yes;dialogWidth=600px;dialogHeight=355px;center:yes;status:no;statusbar:no",function(result){
|
||||
if(result == "cancel"){
|
||||
return;
|
||||
}
|
||||
if(result !== ""){
|
||||
setItemValue(0,0,"addressid",result.split("@")[0]);
|
||||
setItemValue(0,0,"fulladdress",result.split("@")[1]);
|
||||
setItemValue(0,0,"country",result.split("@")[2]);
|
||||
setItemValue(0,0,"province",result.split("@")[3]);
|
||||
setItemValue(0,0,"dressdetail",result.split("@")[4]);
|
||||
setItemValue(0,0,"zipcode",result.split("@")[5]);
|
||||
setItemValue(0,0,"provincename",result.split("@")[6]);
|
||||
}
|
||||
},"修改地址信息");
|
||||
}
|
||||
|
||||
function selectProviceCode(){//选择省份
|
||||
var countrycode = getItemValue(0,getRow(),"country");
|
||||
if(typeof(countrycode)!=undefined && countrycode == 'CHN'){
|
||||
var provincecode = getItemValue(0,getRow(),"province");
|
||||
var provincecodename = getItemValue(0,getRow(),"provincename");
|
||||
AsDialog.SetTreeValue("SelectProvice", "__0000", "province=itemno@provincename=itemname","itemno","itemname", [provincecode,provincecodename], false, true,"",function(sReturn){
|
||||
sReturn = sReturn.split("@");
|
||||
if(sReturn[0]!=provincecode){
|
||||
setItemValue(0,getRow(),"city","");
|
||||
setItemValue(0,getRow(),"cityname","");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function selectCityCode(){//选择城市
|
||||
var provincecode = getItemValue(0,getRow(),"province");
|
||||
if(typeof(provincecode)!=undefined && provincecode != ''){
|
||||
var citycode = getItemValue(0,getRow(),"city");
|
||||
var citycodename = getItemValue(0,getRow(),"cityname");
|
||||
var param = provincecode.substr(0,2);
|
||||
AsDialog.SetTreeValue("SelectCity", param+'0000,'+param+'__00', "city=itemno@cityname=itemname","itemno","itemname", [citycode,citycodename], false, true);
|
||||
}
|
||||
}
|
||||
function selectOrgnature(){//选择机构类型
|
||||
var orgnature = getItemValue(0,getRow(),"orgnature");
|
||||
var orgnaturename = getItemValue(0,getRow(),"orgnaturename");
|
||||
AsDialog.SetTreeValue("SelectOrgnature", '_0', "orgnature=itemno@orgnaturename=itemname","itemno","itemname", [orgnature,orgnaturename], false, true);
|
||||
}
|
||||
function ValidityCheck(){
|
||||
|
||||
if(<%=customerType%> == '03'){ //个人客户
|
||||
//校验证件类型为身份证或临时身份证时,出生日期是否同证件编号中的日期一致
|
||||
var certType = getItemValue(0,getRow(),"CERTTYPE");
|
||||
var certID = getItemValue(0,getRow(),"CERTID");
|
||||
|
||||
if(certType == 'Ind01' || certType == 'Ind08'){
|
||||
|
||||
//将身份证中的日期自动赋给出生日期,把身份证中的性别赋给性别
|
||||
if(certID.length == 15){
|
||||
sex = certID.substring(14);
|
||||
sex = parseInt(sex);
|
||||
certID = certID.substring(6,12);
|
||||
certID = "19"+certID.substring(0,2)+"/"+certID.substring(2,4)+"/"+certID.substring(4,6);
|
||||
setItemValue(0,getRow(),"BIRTHDAY",certID);
|
||||
if(sex%2==0){//奇男偶女
|
||||
setItemValue(0,getRow(),"SEX","2");
|
||||
|
||||
}else{
|
||||
setItemValue(0,getRow(),"SEX","1");
|
||||
|
||||
}
|
||||
}
|
||||
if(certID.length == 18){
|
||||
sex = certID.substring(16,17);
|
||||
sex = parseInt(sex);
|
||||
certID = certID.substring(6,14);
|
||||
certID = certID.substring(0,4)+"/"+certID.substring(4,6)+"/"+certID.substring(6,8);
|
||||
setItemValue(0,getRow(),"BIRTHDAY",certID);
|
||||
if(sex%2==0){//奇男偶女
|
||||
setItemValue(0,getRow(),"SEX","2");
|
||||
|
||||
|
||||
}else{
|
||||
setItemValue(0,getRow(),"SEX","1");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* function setErrorTips(colName,tips){
|
||||
if(tips==""){
|
||||
setItemUnit(0,getRow(),colName,"");
|
||||
return ;
|
||||
}
|
||||
setItemUnit(0,getRow(),colName,"<font color=red>"+tips+"</font>");
|
||||
} */
|
||||
|
||||
//校验驾驶证(是/否)
|
||||
function checkDriver(){
|
||||
var driverLicense = getItemValue(0,getRow(),"DRIVERLICENSE");
|
||||
if(driverLicense=='2'){
|
||||
setItemValue(0,getRow(),"LICENSENAME","");
|
||||
setItemReadOnly(0, getRow(), "LICENSENAME", true);
|
||||
setItemRequired(0, "LICENSENAME", false);
|
||||
}else{
|
||||
setItemReadOnly(0, getRow(), "LICENSENAME", false);
|
||||
setItemRequired(0, "LICENSENAME", true);
|
||||
}
|
||||
}
|
||||
|
||||
function setIdexpiry(){
|
||||
var date = document.getElementById("IDEXPIRY");
|
||||
var dateValue = "";
|
||||
dateValue = date.value;
|
||||
AsDialog.OpenCalender(date,"yyyy/MM/dd","1900/01/01","2100/12/31",function(dateValue){
|
||||
var myNewValue = "",myValue="";
|
||||
myValue = this.dayValue;
|
||||
if(typeof(myValue)!="undefined" && myValue!="undefined"){
|
||||
myNewValue = myValue;
|
||||
if(dateValue!=amarsoft2Real(myNewValue)){
|
||||
date.value = amarsoft2Real(myNewValue);
|
||||
setItemValue(0,getRow(0),"idexpiry",date.value);
|
||||
}
|
||||
}
|
||||
},0,document.getElementById("DWTR").offsetTop);
|
||||
}
|
||||
|
||||
function checkCertInfo(flag){
|
||||
if(typeof(flag)=="undefined") flag=false;
|
||||
var certType = getItemValue(0,getRow(),"certtype");
|
||||
var certid = getItemValue(0,getRow(),"certid");
|
||||
|
||||
//检查自然人证件
|
||||
if(certType == 'Ind01'){
|
||||
if (!checkIdCard(certid)){
|
||||
setErrorTips("certid",getBusinessMessage('156'));
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("certid","");
|
||||
}
|
||||
}
|
||||
// 护照验证
|
||||
if(certType == 'Ind03'){
|
||||
if (!checkCard(certid)){
|
||||
setErrorTips("certid","护照格式有误!");
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("certid","");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// 护照验证
|
||||
function checkCard(value) {
|
||||
var re1 = /^[a-zA-Z]{5,17}$/;
|
||||
var re2 = /^[a-zA-Z0-9]{5,17}$/;
|
||||
return (re2.test(value)) || re1.test(value);
|
||||
}
|
||||
|
||||
function checkIdCard(value) {
|
||||
var re = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
|
||||
return re.test(value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
|
||||
@ -280,9 +280,11 @@
|
||||
lease = true;
|
||||
}
|
||||
var modelid="";
|
||||
var CurOrgID=<%=CurOrg.getOrgID()%>;
|
||||
var YesNo="Y";
|
||||
if(MyOjbect.modelid&&carAttr==true&&lease==true){
|
||||
modelid=MyOjbect.modelid;
|
||||
AsDialog.OpenSelector("selectProductVersionInfo","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
|
||||
AsDialog.OpenSelector("selectProductVersionInfo","carAttributes,"+carAttributes+",leasehold,"+leasehold+",modelid,"+MyOjbect.modelid+",CurOrgID,"+CurOrgID+",YesNo,"+YesNo,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
|
||||
function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""||sReturn=="_NONE_")
|
||||
{
|
||||
|
||||
@ -494,92 +494,7 @@
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="CUSTOMER_PERSON_HIS" label="客户信息历史表" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="标识" type="STRING" length="40"/>
|
||||
<attribute name="CUSTOMERID" label="客户编号" type="STRING" length="40"/>
|
||||
<attribute name="STATUS" label="状态" type="STRING" length="20"/>
|
||||
<attribute name="FULLNAME" label="姓名" type="STRING" length="80"/>
|
||||
<attribute name="SEX" label="性别" type="STRING" length="18"/>
|
||||
<attribute name="mobile" label="手机号" type="STRING" length="32"/>
|
||||
<attribute name="BIRTHDAY" label="出生日期" type="STRING" length="10"/>
|
||||
<attribute name="CERTTYPE" label="证件类型" type="STRING" length="18"/>
|
||||
<attribute name="CERTID" label="证件号码" type="STRING" length="32"/>
|
||||
<attribute name="SINO" label="社会保险号" type="STRING" length="32"/>
|
||||
<attribute name="COUNTRY" label="国家" type="STRING" length="18"/>
|
||||
<attribute name="province" label="省份" type="STRING" length="18"/>
|
||||
<attribute name="city" label="城市" type="STRING" length="18"/>
|
||||
<attribute name="county" label="区县" type="STRING" length="18"/>
|
||||
<attribute name="NATIONALITY" label="民族" type="STRING" length="18"/>
|
||||
<attribute name="NATIVEPLACE" label="户籍地址" type="STRING" length="200"/>
|
||||
<attribute name="POLITICALFACE" label="政治面貌" type="STRING" length="18"/>
|
||||
<attribute name="MARRIAGE" label="婚姻状况" type="STRING" length="18"/>
|
||||
<attribute name="UNITKIND" label="单位所属行业" type="STRING" length="18"/>
|
||||
<attribute name="WORKCORP" label="单位名称" type="STRING" length="80"/>
|
||||
<attribute name="WORKADD" label="单位地址" type="STRING" length="200"/>
|
||||
<attribute name="WORKTEL" label="单位电话" type="STRING" length="32"/>
|
||||
<attribute name="ENTRYTIME" label="入职时间" type="STRING" length="32"/>
|
||||
<attribute name="FORMALEMP" label="正式员工" type="STRING" length="32"/>
|
||||
<attribute name="OCCUPATION" label="职业" type="STRING" length="18"/>
|
||||
<attribute name="title" label="职称" type="STRING" length="18"/>
|
||||
<attribute name="EMPLOYRECORD" label="工作履历" type="STRING" length="200"/>
|
||||
<attribute name="EDURECORD" label="毕业学校(取得最高学历)" type="STRING" length="200"/>
|
||||
<attribute name="EDUEXPERIENCE" label="最高学历" type="STRING" length="18"/>
|
||||
<attribute name="EDUDEGREE" label="最高学位" type="STRING" length="18"/>
|
||||
<attribute name="GRADUATEYEAR" label="毕业年份" type="STRING" length="10"/>
|
||||
<attribute name="CREDITLEVEL" label="信用等级" type="STRING" length="18"/>
|
||||
<attribute name="EVALUATEDATE" label="评估日期" type="STRING" length="10"/>
|
||||
<attribute name="BALANCESHEET" label="待扩展字段" type="STRING" length="200"/>
|
||||
<attribute name="INTRO" label="个人情况简介" type="STRING" length="200"/>
|
||||
<attribute name="SELFMONTHINCOME" label="个人月收入" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="FAMILYMONTHINCOME" label="家庭月收入" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="INCOMESOURCE" label="收入来源" type="STRING" length="200"/>
|
||||
<attribute name="POPULATION" label="家庭人口数" type="INT" length="10"/>
|
||||
<attribute name="LOANCARDNO" label="贷款卡号" type="STRING" length="32"/>
|
||||
<attribute name="LOANCARDINSYEAR" label="贷款卡最新年审年份" type="STRING" length="10"/>
|
||||
<attribute name="FARMERSORT" label="农户分类" type="STRING" length="18"/>
|
||||
<attribute name="REGIONALISM" label="所属行政区域" type="STRING" length="18"/>
|
||||
<attribute name="draft" label="是否草稿" type="STRING" length="18"/>
|
||||
<attribute name="INPUTORGID" label="登记单位" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="REMARK" label="备注" type="STRING" length="500"/>
|
||||
<attribute name="UPDATEORGID" label="更新机构编号" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEUSERID" label="更新用户编号" type="STRING" length="32"/>
|
||||
<attribute name="COMMADD" label="通讯地址" type="STRING" length="200"/>
|
||||
<attribute name="COMMZIP" label="通讯地址邮编" type="STRING" length="10"/>
|
||||
<attribute name="NATIVEADD" label="户籍地址" type="STRING" length="200"/>
|
||||
<attribute name="WORKZIP" label="单位地址邮编" type="STRING" length="10"/>
|
||||
<attribute name="HEADSHIP" label="职务" type="STRING" length="18"/>
|
||||
<attribute name="WORKBEGINDATE" label="本单位工作起始日" type="STRING" length="10"/>
|
||||
<attribute name="YEARINCOME" label="个人年收入" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="PAYACCOUNT" label="工资帐号" type="STRING" length="32"/>
|
||||
<attribute name="PAYACCOUNTBANK" label="工资帐号开户银行" type="STRING" length="200"/>
|
||||
<attribute name="FAMILYSTATUS" label="居住状况" type="STRING" length="18"/>
|
||||
<attribute name="TEMPSAVEFLAG" label="暂存标志" type="STRING" length="18"/>
|
||||
<attribute name="CUSTSOURCE" label="客户来源" type="STRING" length="32"/>
|
||||
<attribute name="CUSTKIND" label="内部行业" type="STRING" length="32"/>
|
||||
<attribute name="invalid" label="是否废弃" type="STRING" length="10"/>
|
||||
<attribute name="flowunid" label="流程标识" type="STRING" length="32"/>
|
||||
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
|
||||
<attribute name="updatetime" label="更新时间" type="STRING" length="32"/>
|
||||
<attribute name="mobile" label="手机号" type="STRING" length="32"/>
|
||||
<attribute name="DRIVERLICENSE" label="驾驶证" type="STRING" length="32"/>
|
||||
<attribute name="LICENSENAME" label="驾驶证姓名" type="STRING" length="200"/>
|
||||
<attribute name="CountryName" label="国家" type="STRING" length="200"/>
|
||||
<attribute name="ProvinceName" label="省份" type="STRING" length="200"/>
|
||||
<attribute name="CityName" label="城市" type="STRING" length="200"/>
|
||||
<attribute name="EMERGENCY_CONTACT_PERSON" label="紧急联系人" type="STRING" length="32"/>
|
||||
<attribute name="EMERGENCY_CONTACT_TEL" label="紧急联系电话" type="STRING" length="32"/>
|
||||
<attribute name="ENTRYTIME" label="入职时间" type="STRING" length="32"/>
|
||||
<attribute name="FORMALEMP" label="正式员工" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="customer_person_his" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
|
||||
<class name="CUSTOMER_CERT_HIS" label="证件历史表" keyAttributes="id">
|
||||
<attributes>
|
||||
<attribute name="id" label="标识" type="STRING" length="32"/>
|
||||
@ -2647,5 +2562,107 @@
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="CUSTOMER_PERSON_HIS" label="客户信息历史表" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="标识" type="STRING" length="40"/>
|
||||
<attribute name="CUSTOMERID" label="客户编号" type="STRING" length="40"/>
|
||||
<attribute name="STATUS" label="状态" type="STRING" length="20"/>
|
||||
<attribute name="FULLNAME" label="姓名" type="STRING" length="80"/>
|
||||
<attribute name="SEX" label="性别" type="STRING" length="18"/>
|
||||
<attribute name="BIRTHDAY" label="出生日期" type="STRING" length="10"/>
|
||||
<attribute name="CERTTYPE" label="证件类型" type="STRING" length="18"/>
|
||||
<attribute name="CERTID" label="证件号码" type="STRING" length="32"/>
|
||||
<attribute name="SINO" label="社会保险号" type="STRING" length="32"/>
|
||||
<attribute name="COUNTRY" label="国家" type="STRING" length="18"/>
|
||||
<attribute name="province" label="省份" type="STRING" length="18"/>
|
||||
<attribute name="city" label="城市" type="STRING" length="18"/>
|
||||
<attribute name="county" label="区县" type="STRING" length="18"/>
|
||||
<attribute name="NATIONALITY" label="民族" type="STRING" length="18"/>
|
||||
<attribute name="NATIVEPLACE" label="户籍地址" type="STRING" length="200"/>
|
||||
<attribute name="POLITICALFACE" label="政治面貌" type="STRING" length="18"/>
|
||||
<attribute name="MARRIAGE" label="婚姻状况" type="STRING" length="18"/>
|
||||
<attribute name="UNITKIND" label="单位所属行业" type="STRING" length="18"/>
|
||||
<attribute name="WORKCORP" label="单位名称" type="STRING" length="80"/>
|
||||
<attribute name="WORKADD" label="单位地址" type="STRING" length="200"/>
|
||||
<attribute name="WORKTEL" label="单位电话" type="STRING" length="32"/>
|
||||
<attribute name="OCCUPATION" label="职业" type="STRING" length="18"/>
|
||||
<attribute name="title" label="职称" type="STRING" length="18"/>
|
||||
<attribute name="EMPLOYRECORD" label="工作履历" type="STRING" length="200"/>
|
||||
<attribute name="EDURECORD" label="毕业学校(取得最高学历)" type="STRING" length="200"/>
|
||||
<attribute name="EDUEXPERIENCE" label="最高学历" type="STRING" length="18"/>
|
||||
<attribute name="EDUDEGREE" label="最高学位" type="STRING" length="18"/>
|
||||
<attribute name="GRADUATEYEAR" label="毕业年份" type="STRING" length="10"/>
|
||||
<attribute name="CREDITLEVEL" label="信用等级" type="STRING" length="18"/>
|
||||
<attribute name="EVALUATEDATE" label="评估日期" type="STRING" length="10"/>
|
||||
<attribute name="BALANCESHEET" label="待扩展字段" type="STRING" length="200"/>
|
||||
<attribute name="INTRO" label="个人情况简介" type="STRING" length="200"/>
|
||||
<attribute name="SELFMONTHINCOME" label="个人月收入" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="FAMILYMONTHINCOME" label="家庭月收入" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="INCOMESOURCE" label="收入来源" type="STRING" length="200"/>
|
||||
<attribute name="POPULATION" label="家庭人口数" type="INT" length="10"/>
|
||||
<attribute name="LOANCARDNO" label="贷款卡号" type="STRING" length="32"/>
|
||||
<attribute name="LOANCARDINSYEAR" label="贷款卡最新年审年份" type="STRING" length="10"/>
|
||||
<attribute name="FARMERSORT" label="农户分类" type="STRING" length="18"/>
|
||||
<attribute name="REGIONALISM" label="所属行政区域" type="STRING" length="18"/>
|
||||
<attribute name="draft" label="是否草稿" type="STRING" length="18"/>
|
||||
<attribute name="INPUTORGID" label="登记单位" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="REMARK" label="备注" type="STRING" length="500"/>
|
||||
<attribute name="UPDATEORGID" label="更新机构编号" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEUSERID" label="更新用户编号" type="STRING" length="32"/>
|
||||
<attribute name="COMMADD" label="通讯地址" type="STRING" length="200"/>
|
||||
<attribute name="COMMZIP" label="通讯地址邮编" type="STRING" length="10"/>
|
||||
<attribute name="NATIVEADD" label="户籍地址" type="STRING" length="200"/>
|
||||
<attribute name="WORKZIP" label="单位地址邮编" type="STRING" length="10"/>
|
||||
<attribute name="HEADSHIP" label="职务" type="STRING" length="18"/>
|
||||
<attribute name="WORKBEGINDATE" label="本单位工作起始日" type="STRING" length="10"/>
|
||||
<attribute name="YEARINCOME" label="个人年收入" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="PAYACCOUNT" label="工资帐号" type="STRING" length="32"/>
|
||||
<attribute name="PAYACCOUNTBANK" label="工资帐号开户银行" type="STRING" length="200"/>
|
||||
<attribute name="FAMILYSTATUS" label="居住状况" type="STRING" length="18"/>
|
||||
<attribute name="TEMPSAVEFLAG" label="暂存标志" type="STRING" length="18"/>
|
||||
<attribute name="CUSTSOURCE" label="客户来源" type="STRING" length="32"/>
|
||||
<attribute name="CUSTKIND" label="内部行业" type="STRING" length="32"/>
|
||||
<attribute name="invalid" label="是否废弃" type="STRING" length="10"/>
|
||||
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
|
||||
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
|
||||
<attribute name="updatetime" label="更新时间" type="STRING" length="32"/>
|
||||
<attribute name="DRIVERLICENSE" label="驾驶证" type="STRING" length="32"/>
|
||||
<attribute name="LICENSENAME" label="驾驶证姓名" type="STRING" length="200"/>
|
||||
<attribute name="COUNTRYNAME" label="国家" type="STRING" length="200"/>
|
||||
<attribute name="PROVINCENAME" label="省份" type="STRING" length="200"/>
|
||||
<attribute name="CITYNAME" label="城市" type="STRING" length="200"/>
|
||||
<attribute name="EMERGENCY_CONTACT_PERSON" label="紧急联系人" type="STRING" length="32"/>
|
||||
<attribute name="EMERGENCY_CONTACT_TEL" label="紧急联系电话" type="STRING" length="32"/>
|
||||
<attribute name="mobile" label="手机号" type="STRING" length="32"/>
|
||||
<attribute name="ENTRYTIME" label="入职时间" type="STRING" length="32"/>
|
||||
<attribute name="FORMALEMP" label="正式员工" type="STRING" length="32"/>
|
||||
<attribute name="childrens_number" label="子女人数" type="STRING" length="32"/>
|
||||
<attribute name="family_address" label="居住地址" type="STRING" length="200"/>
|
||||
<attribute name="telephone" label="固定电话" type="STRING" length="32"/>
|
||||
<attribute name="living_life" label="居住年限" type="STRING" length="32"/>
|
||||
<attribute name="Mailing_Address" label="邮寄地址" type="STRING" length="200"/>
|
||||
<attribute name="Property_type" label="房产类型" type="STRING" length="32"/>
|
||||
<attribute name="Unit_nature" label="单位性质" type="STRING" length="32"/>
|
||||
<attribute name="before_unit_name" label="前工作单位名称" type="STRING" length="60"/>
|
||||
<attribute name="main_income" label="主要收入" type="STRING" length="32"/>
|
||||
<attribute name="other_income" label="其他收入" type="DOUBLE" length="22" scale="2"/>
|
||||
<attribute name="Partner_" label="作为共同申请人-配偶" type="STRING" length="32"/>
|
||||
<attribute name="spouse_name" label="配偶姓名-配偶" type="STRING" length="32"/>
|
||||
<attribute name="spouse_hukou" label="户口-配偶" type="STRING" length="32"/>
|
||||
<attribute name="sIdentNumber" label="证件号码-配偶" type="STRING" length="64"/>
|
||||
<attribute name="suname" label="单位名称-配偶" type="STRING" length="60"/>
|
||||
<attribute name="suphone" label="单位电话-配偶" type="STRING" length="32"/>
|
||||
<attribute name="sposition" label="职位—配偶" type="STRING" length="32"/>
|
||||
<attribute name="spnumber" label="手机号——配偶" type="STRING" length="32"/>
|
||||
<attribute name="smincome" label="月收入——配偶" type="DOUBLE" length="22" scale="2"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="customer_person_his" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
</package>
|
||||
</jbo>
|
||||
|
||||
@ -3480,6 +3480,7 @@
|
||||
<attribute name="PAY_ID" label="PAY_ID" type="STRING" length="32"/>
|
||||
<attribute name="CONTRACT_ID" label="合同号" type="STRING" length="32"/>
|
||||
<attribute name="PAYMENT_NUMBER" label="投放编号" type="STRING" length="32"/>
|
||||
<attribute name="PLAN_ID" label="计划ID" type="STRING" length="100"/>
|
||||
<attribute name="PLAN_LIST" label="计划期次" type="STRING" length="32"/>
|
||||
<attribute name="FLOWUNID" label="流程号" type="STRING" length="32"/>
|
||||
<attribute name="PAY_TYPE" label="收付方向" type="STRING" length="32"/>
|
||||
@ -3557,6 +3558,7 @@
|
||||
<attribute name="PAY_ID" label="PAY_ID" type="STRING" length="32"/>
|
||||
<attribute name="CONTRACT_ID" label="合同号" type="STRING" length="32"/>
|
||||
<attribute name="PAYMENT_NUMBER" label="投放编号" type="STRING" length="32"/>
|
||||
<attribute name="PLAN_ID" label="计划ID" type="STRING" length="100"/>
|
||||
<attribute name="PLAN_LIST" label="计划期次" type="STRING" length="32"/>
|
||||
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
|
||||
<attribute name="PAY_TYPE" label="收付方向" type="STRING" length="32"/>
|
||||
|
||||
@ -72,6 +72,11 @@
|
||||
<attribute name="EFFECTIVEDATE" label="生效日期" type="STRING" length="10"/>
|
||||
<attribute name="EXPIFYDATE" label="失效日期" type="STRING" length="10"/>
|
||||
<attribute name="CONFIGFILE" label="配置文件" type="STRING" length="100"/>
|
||||
<attribute name="LeasForm" label="租赁类型" type="STRING" length="20"/>
|
||||
<attribute name="equip_type" label="租赁物类型" type="STRING" length="20"/>
|
||||
<attribute name="IS_ALL_DEALER" label="产品适用所有经销商" type="STRING" length="10"/>
|
||||
<attribute name="IS_ALL_DEALER_GROUP" label="产品适用所经销商集团" type="STRING" length="10"/>
|
||||
<attribute name="IS_ALL_AREA" label="产品适用所有区域" type="STRING" length="10"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
|
||||
BIN
WebContent/WEB-INF/lib/commons-discovery-0.2.jar
Normal file
BIN
WebContent/WEB-INF/lib/commons-discovery-0.2.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/jaxen-1.1-beta-9.jar
Normal file
BIN
WebContent/WEB-INF/lib/jaxen-1.1-beta-9.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/wsdl4j.jar
Normal file
BIN
WebContent/WEB-INF/lib/wsdl4j.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/wstx-asl-3.2.0.jar
Normal file
BIN
WebContent/WEB-INF/lib/wstx-asl-3.2.0.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/xfire-all-1.2.6.jar
Normal file
BIN
WebContent/WEB-INF/lib/xfire-all-1.2.6.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/xfire-ws-security-1.2.6.jar
Normal file
BIN
WebContent/WEB-INF/lib/xfire-ws-security-1.2.6.jar
Normal file
Binary file not shown.
BIN
WebContent/WEB-INF/lib/xml-apis.jar
Normal file
BIN
WebContent/WEB-INF/lib/xml-apis.jar
Normal file
Binary file not shown.
@ -3,9 +3,14 @@ package com.tenwa.flow;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP;
|
||||
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO_TEMP;
|
||||
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO;
|
||||
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO_TEMP;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import com.tenwa.flow.baseBussion.BaseBussiness;
|
||||
@ -20,6 +25,14 @@ public class CopyDReturnTempToFormal extends BaseBussiness {
|
||||
fromCondtion.put("FLOWUNID", flowunid);
|
||||
Map<String,String> otherProperty = new HashMap<String,String>();
|
||||
otherProperty.put("ID", id);
|
||||
|
||||
BizObject dst= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, Sqlca);
|
||||
String disStatus = dst.getAttribute("id").toString();
|
||||
BizObjectManager dit = JBOFactory.getBizObjectManager(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME,Sqlca);
|
||||
BizObject deit = dit.createQuery("select * from O where FLOWUNID=:flowUnid").setParameter("flowUnid", flowunid).getSingleResult(true);
|
||||
deit.setAttributeValue("DISTRIBUTOR_ID", disStatus);
|
||||
dit.saveObject(deit);
|
||||
|
||||
DataOperatorUtil.copySingleJBO(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITRETURN_INFO.CLASS_NAME, null, otherProperty, Sqlca);
|
||||
return "true";
|
||||
}
|
||||
|
||||
78
calc/com/tenwa/flow/CopyInfoTempToFormal.java
Normal file
78
calc/com/tenwa/flow/CopyInfoTempToFormal.java
Normal file
@ -0,0 +1,78 @@
|
||||
package com.tenwa.flow;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP;
|
||||
|
||||
import com.amarsoft.app.util.ASOrgObject;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.amarsoft.context.ASUser;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import com.tenwa.flow.baseBussion.BaseBussiness;
|
||||
import com.tenwa.lease.flow.project.businessapply.DistributorCompare;
|
||||
|
||||
public class CopyInfoTempToFormal extends BaseBussiness{
|
||||
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
this.initBussinessParam(Sqlca);
|
||||
String orgid=this.saveOrgInfo(Sqlca);
|
||||
Map<String,String>fromCondtion=new HashMap<String, String>();
|
||||
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
|
||||
BizObject dst= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, Sqlca);
|
||||
String disStatus = dst.getAttribute("distributor_status").toString();
|
||||
dst.setAttributeValue("orgid",orgid );
|
||||
BizObjectManager dit = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME,Sqlca);
|
||||
if("distributor_status08".equals(disStatus)){
|
||||
dst.setAttributeValue("distributor_status", "distributor_status09");
|
||||
}
|
||||
dit.saveObject(dst);
|
||||
Map<String,String>toCondtion=new HashMap<String, String>();
|
||||
DistributorCompare dc=new DistributorCompare();
|
||||
fromCondtion.clear();
|
||||
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
|
||||
toCondtion.clear();
|
||||
toCondtion.put("distributor_no", dst.getAttribute("distributor_no").getString());
|
||||
|
||||
DataOperatorUtil.copyJBOSet(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, DISTRIBUTOR_INFO.CLASS_NAME, toCondtion, null, dc, Sqlca);
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
}
|
||||
/**
|
||||
* 保存渠道信息
|
||||
* @author 2018-06-10
|
||||
*/
|
||||
private String saveOrgInfo(Transaction Sqlca) throws Exception {
|
||||
ASOrgObject orgObject= new ASOrgObject("8006");//默认为安鹏向下的渠道信息
|
||||
Map<String,String> mapOrgInfo=orgObject.nextLevalOrgNo(Sqlca);
|
||||
BizObjectManager manager = JBOFactory.getFactory().getManager("jbo.sys.ORG_INFO");
|
||||
BizObject bo=null;
|
||||
BizObjectManager PM=JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME);
|
||||
BizObject partnerInfo=PM.createQuery(" select * from O where O.flowUnid=:flowUnid").setParameter("flowUnid", this.getAttribute("FlowUnid").toString()).getSingleResult(true);
|
||||
if(!mapOrgInfo.isEmpty()){
|
||||
ASUser asUser=new ASUser(this.getAttribute("CurUserID").toString());
|
||||
bo=manager.newObject();
|
||||
bo.setAttributeValue("ORGID", mapOrgInfo.get("orgno"));
|
||||
bo.setAttributeValue("SORTNO", mapOrgInfo.get("sortno"));
|
||||
bo.setAttributeValue("TREESORTNO", mapOrgInfo.get("sortno"));
|
||||
bo.setAttributeValue("ORGLEVEL", "9");//默认渠道
|
||||
bo.setAttributeValue("STATUS", "1");//默认启用
|
||||
if(partnerInfo!=null){
|
||||
bo.setAttributeValue("RELATIVEORGID", "8006");
|
||||
bo.setAttributeValue("BELONGORGID", "8006");
|
||||
bo.setAttributeValue("ORGNAME", partnerInfo.getAttribute("distributor_name").toString());
|
||||
bo.setAttributeValue("INPUTORG", asUser.getOrgID());
|
||||
bo.setAttributeValue("InputUser", asUser.getUserID());
|
||||
bo.setAttributeValue("InputTime", StringFunction.getTodayNow());
|
||||
}
|
||||
manager.saveObject(bo);
|
||||
}
|
||||
return bo.getAttribute("ORGID").toString();
|
||||
}
|
||||
}
|
||||
78
calc/com/tenwa/flow/CopyReturnInfoTempToFormal.java
Normal file
78
calc/com/tenwa/flow/CopyReturnInfoTempToFormal.java
Normal file
@ -0,0 +1,78 @@
|
||||
package com.tenwa.flow;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP;
|
||||
|
||||
import com.amarsoft.app.util.ASOrgObject;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.amarsoft.context.ASUser;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import com.tenwa.flow.baseBussion.BaseBussiness;
|
||||
import com.tenwa.lease.flow.project.businessapply.DistributorCompare;
|
||||
|
||||
public class CopyReturnInfoTempToFormal extends BaseBussiness{
|
||||
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
this.initBussinessParam(Sqlca);
|
||||
String orgid=this.saveOrgInfo(Sqlca);
|
||||
Map<String,String>fromCondtion=new HashMap<String, String>();
|
||||
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
|
||||
BizObject dst= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, Sqlca);
|
||||
String disStatus = dst.getAttribute("distributor_status").toString();
|
||||
dst.setAttributeValue("orgid",orgid );
|
||||
BizObjectManager dit = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME,Sqlca);
|
||||
if("distributor_status06".equals(disStatus)){
|
||||
dst.setAttributeValue("distributor_status", "distributor_status10");
|
||||
}
|
||||
dit.saveObject(dst);
|
||||
Map<String,String>toCondtion=new HashMap<String, String>();
|
||||
DistributorCompare dc=new DistributorCompare();
|
||||
fromCondtion.clear();
|
||||
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
|
||||
toCondtion.clear();
|
||||
toCondtion.put("distributor_no", dst.getAttribute("distributor_no").getString());
|
||||
|
||||
DataOperatorUtil.copyJBOSet(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, DISTRIBUTOR_INFO.CLASS_NAME, toCondtion, null, dc, Sqlca);
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
}
|
||||
/**
|
||||
* 保存渠道信息
|
||||
* @author 2018-06-10
|
||||
*/
|
||||
private String saveOrgInfo(Transaction Sqlca) throws Exception {
|
||||
ASOrgObject orgObject= new ASOrgObject("8006");//默认为安鹏向下的渠道信息
|
||||
Map<String,String> mapOrgInfo=orgObject.nextLevalOrgNo(Sqlca);
|
||||
BizObjectManager manager = JBOFactory.getFactory().getManager("jbo.sys.ORG_INFO");
|
||||
BizObject bo=null;
|
||||
BizObjectManager PM=JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME);
|
||||
BizObject partnerInfo=PM.createQuery(" select * from O where O.flowUnid=:flowUnid").setParameter("flowUnid", this.getAttribute("FlowUnid").toString()).getSingleResult(true);
|
||||
if(!mapOrgInfo.isEmpty()){
|
||||
ASUser asUser=new ASUser(this.getAttribute("CurUserID").toString());
|
||||
bo=manager.newObject();
|
||||
bo.setAttributeValue("ORGID", mapOrgInfo.get("orgno"));
|
||||
bo.setAttributeValue("SORTNO", mapOrgInfo.get("sortno"));
|
||||
bo.setAttributeValue("TREESORTNO", mapOrgInfo.get("sortno"));
|
||||
bo.setAttributeValue("ORGLEVEL", "9");//默认渠道
|
||||
bo.setAttributeValue("STATUS", "1");//默认启用
|
||||
if(partnerInfo!=null){
|
||||
bo.setAttributeValue("RELATIVEORGID", "8006");
|
||||
bo.setAttributeValue("BELONGORGID", "8006");
|
||||
bo.setAttributeValue("ORGNAME", partnerInfo.getAttribute("distributor_name").toString());
|
||||
bo.setAttributeValue("INPUTORG", asUser.getOrgID());
|
||||
bo.setAttributeValue("InputUser", asUser.getUserID());
|
||||
bo.setAttributeValue("InputTime", StringFunction.getTodayNow());
|
||||
}
|
||||
manager.saveObject(bo);
|
||||
}
|
||||
return bo.getAttribute("ORGID").toString();
|
||||
}
|
||||
}
|
||||
1
config/license.properties
Normal file
1
config/license.properties
Normal file
@ -0,0 +1 @@
|
||||
key=JTNGdiUzRnpVJTNEJTVDWCU1Q1olM0YlNUIlNUM5ZHgrJTI0JTVDJTIwMyUyM0IlM0RLNCUzRmMlM0ZvJTNGZyUzRmslM0ZoJTNGb2JTN19SS0gwY2Q3JTI5MSUyNUQ5RyU1RCUzRmMlM0ZvYjRLL1J0ZEUlM0Z6JTNGeCUyNi0lM0Z2JTVDakAvUmthM0piJTYwVkR4JTNGeCUzRnZNciU1Q2glNUJwR3FVaSU1QnFFdkBoJTNGeCUzRnYlNUR3Tm1PbU0vL2slM0ZnKnklM0ZkJTNBcyUzRnM2ZyUzRnYlMjYvJTVCaiU1QiUzQkdnQm0lM0Z4JTNGdk93Tm1JekpnJTNGeDViKnklM0ZkJTNGZiUzRmQyYSUzRnYyb1h4RWZPbU9zJTNGeCUzRnZKal9lTWJjNiUzRnhVQiUzQVVBNSU1QlhGLSU1RCUyMFQlNjAvQS9yJTNGZCUzRC4lM0ZnJTNEZjluMm9VaFRpYjBacCUyNnIlM0Z2TnAlNjAlNUNZYSU1RGdUdk1jT29EeiUzRnhNdiUzRmclM0ZnJTNGZyUzRmclM0ZnJTNGdi54TnBPZyU1RGclNUVmVnhQJTVCTmklNjAzJTNGeCUzRnZJelkvNnQlM0Z4JTNGdiUzRmpOdWNaJTVCcCU1Qi8lNUNxTnpJaCU1RWslM0Z4JTNGdmNaJTYwNCU1Q2dWeiU1Q3FBY0tnVWlZZVNxJTYwJTIwMWglM0Z2RnpIJTVCQS5HdiUzRng3diUzRG4lM0YvJTNGcyUzRnYlM0ZqJTVCb015ViU1QmI1JTNGeCUzRnYlM0ZqQCUzQmI2UXZHa0ZoQHZfeVolM0JUeUJiUCU1QiUzRnhkJTI1JTNGaiU2MC0lNUVlTGhWJTNCQ2ZhQ2I2JTNGeA==
|
||||
@ -339,7 +339,7 @@ public class PayController extends BaseFlowStartAction {
|
||||
for (String income_id : income_ids) {
|
||||
String date = df.format(new Date());
|
||||
pay_detail = new SDKDcPayReqxVO();
|
||||
infoOne = bankBo.createQuery("select o.PROJECT_ID,o.FEE_TYPE,o.PAY_TYPE,o.BANK_SQRNBR,o.BANK_PAY_ID,o.BANK_REQNBR,o.FACT_MONEY,o.memo,o.CONTRACT_ID,o.PAYMENT_NUMBER,o.PLAN_LIST,FLOWUNID,contract_info.CONTRACT_NO,distributor.acc_number,distributor.open_bank,distributor.account,distributor.district,distributor.provinceInfo from o left join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO contract_info on o.CONTRACT_ID = contract_info.id left join jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT distributor on contract_info.distributor_id = distributor.distributor_id and distributor.is_main='Y' where o.id=:id and o.PAY_TYPE = 'pay_type_out' ").setParameter("id", income_id).getSingleResult(false);
|
||||
infoOne = bankBo.createQuery("select o.PROJECT_ID,o.FEE_TYPE,o.PLAN_ID,o.PAY_TYPE,o.BANK_SQRNBR,o.BANK_PAY_ID,o.BANK_REQNBR,o.FACT_MONEY,o.memo,o.CONTRACT_ID,o.PAYMENT_NUMBER,o.PLAN_LIST,FLOWUNID,contract_info.CONTRACT_NO,distributor.acc_number,distributor.open_bank,distributor.account,distributor.district,distributor.provinceInfo from o left join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO contract_info on o.CONTRACT_ID = contract_info.id left join jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT distributor on contract_info.distributor_id = distributor.distributor_id and distributor.is_main='Y' where o.id=:id and o.PAY_TYPE = 'pay_type_out' ").setParameter("id", income_id).getSingleResult(false);
|
||||
if(infoOne==null) {
|
||||
map.put("code", "1") ;
|
||||
map.put("msg", "第["+index+"]笔数据不存在,请检查") ;
|
||||
@ -353,6 +353,7 @@ public class PayController extends BaseFlowStartAction {
|
||||
String PLAN_LIST = infoOne.getAttribute("PLAN_LIST").toString();
|
||||
String FLOWUNID = this.FLOWUNID ;
|
||||
String FEE_TYPE = infoOne.getAttribute("FEE_TYPE").toString();
|
||||
String PLAN_ID = infoOne.getAttribute("PLAN_ID").toString();
|
||||
String PAY_TYPE = infoOne.getAttribute("PAY_TYPE").toString();
|
||||
String CONTRACT_NO = infoOne.getAttribute("CONTRACT_NO").toString();
|
||||
String CRTACC = infoOne.getAttribute("acc_number").toString();
|
||||
@ -369,7 +370,7 @@ public class PayController extends BaseFlowStartAction {
|
||||
* 检查 当前付款信息 是否存在 开始
|
||||
*/
|
||||
if(BANK_PAY_ID!=null && BANK_PAY_ID!="" && !"".equals(BANK_PAY_ID)) {
|
||||
String temp_sql = "select * from o where CONTRACT_ID=:CONTRACT_ID and PAYMENT_NUMBER=:PAYMENT_NUMBER and PLAN_LIST=:PLAN_LIST and FLOWUNID=:FLOWUNID and PAY_TYPE=:PAY_TYPE and FEE_TYPE =:FEE_TYPE " ;
|
||||
String temp_sql = "select * from o where CONTRACT_ID=:CONTRACT_ID and PAYMENT_NUMBER=:PAYMENT_NUMBER and PLAN_LIST=:PLAN_LIST and FLOWUNID=:FLOWUNID and PAY_TYPE=:PAY_TYPE and FEE_TYPE =:FEE_TYPE and PLAN_ID=:PLAN_ID " ;
|
||||
if(BANK_YURREF!=null && BANK_YURREF!="" && !"".equals(BANK_YURREF))
|
||||
temp_sql = temp_sql + " and YURREF=:BANK_YURREF";
|
||||
if(BANK_SQRNBR!=null && BANK_SQRNBR!="" && !"".equals(BANK_SQRNBR))
|
||||
@ -386,6 +387,7 @@ public class PayController extends BaseFlowStartAction {
|
||||
call_back_detail_boo.setParameter("FLOWUNID",FLOWUNID) ;
|
||||
call_back_detail_boo.setParameter("PAY_TYPE",PAY_TYPE) ;
|
||||
call_back_detail_boo.setParameter("FEE_TYPE",FEE_TYPE) ;
|
||||
call_back_detail_boo.setParameter("PLAN_ID",PLAN_ID) ;
|
||||
|
||||
if(BANK_YURREF!=null && BANK_YURREF!="" && !"".equals(BANK_YURREF))
|
||||
call_back_detail_boo.setParameter("BANK_YURREF",BANK_YURREF) ;
|
||||
@ -421,6 +423,7 @@ public class PayController extends BaseFlowStartAction {
|
||||
|| BANK_NAME==null || "".equals( BANK_NAME )
|
||||
|| PAY_TYPE==null || "".equals( PAY_TYPE )
|
||||
|| FEE_TYPE==null || "".equals( FEE_TYPE )
|
||||
|| PLAN_ID==null || "".equals( PLAN_ID )
|
||||
|| CRTNAM==null || "".equals( CRTNAM )
|
||||
|| CRTPVC==null || "".equals( CRTPVC )
|
||||
|| CRTCTY==null || "".equals( CRTCTY )
|
||||
@ -472,6 +475,7 @@ public class PayController extends BaseFlowStartAction {
|
||||
pay_detail_bo.setAttributeValue("CONTRACT_ID", CONTRACT_ID);
|
||||
pay_detail_bo.setAttributeValue("PAYMENT_NUMBER", PAYMENT_NUMBER);
|
||||
pay_detail_bo.setAttributeValue("PLAN_LIST", PLAN_LIST);
|
||||
pay_detail_bo.setAttributeValue("PLAN_ID", PLAN_ID);
|
||||
pay_detail_bo.setAttributeValue("FLOWUNID", FLOWUNID);
|
||||
pay_detail_bo.setAttributeValue("PAY_TYPE", PAY_TYPE);
|
||||
pay_detail_bo.setAttributeValue("FEE_TYPE", FEE_TYPE);
|
||||
@ -546,13 +550,14 @@ public class PayController extends BaseFlowStartAction {
|
||||
|
||||
if(pay_detail_list!=null && pay_detail_list.size()>0)
|
||||
for (BizObject pay_detail_one : pay_detail_list) {
|
||||
BizObjectQuery income_boo= income_bom.createQuery("select * from o where CONTRACT_ID=:CONTRACT_ID and PAYMENT_NUMBER=:PAYMENT_NUMBER and PLAN_LIST=:PLAN_LIST and FLOWUNID=:FLOWUNID and PAY_TYPE=:PAY_TYPE and FEE_TYPE=:FEE_TYPE ");
|
||||
BizObjectQuery income_boo= income_bom.createQuery("select * from o where CONTRACT_ID=:CONTRACT_ID and PAYMENT_NUMBER=:PAYMENT_NUMBER and PLAN_LIST=:PLAN_LIST and FLOWUNID=:FLOWUNID and PAY_TYPE=:PAY_TYPE and FEE_TYPE=:FEE_TYPE and PLAN_ID=:PLAN_ID ");
|
||||
income_boo.setParameter("CONTRACT_ID",pay_detail_one.getAttribute("CONTRACT_ID").toString()) ;
|
||||
income_boo.setParameter("PAYMENT_NUMBER",pay_detail_one.getAttribute("PAYMENT_NUMBER").toString()) ;
|
||||
income_boo.setParameter("PLAN_LIST",pay_detail_one.getAttribute("PLAN_LIST").toString()) ;
|
||||
income_boo.setParameter("FLOWUNID",pay_detail_one.getAttribute("FLOWUNID").toString()) ;
|
||||
income_boo.setParameter("PAY_TYPE",pay_detail_one.getAttribute("PAY_TYPE").toString()) ;
|
||||
income_boo.setParameter("FEE_TYPE",pay_detail_one.getAttribute("FEE_TYPE").toString()) ;
|
||||
income_boo.setParameter("PLAN_ID",pay_detail_one.getAttribute("PLAN_ID").toString()) ;
|
||||
income_bo = income_boo.getSingleResult(true) ;
|
||||
income_bo.setAttributeValue("BANK_PAY_ID",pay_detail_one.getAttribute("PAY_ID").toString());
|
||||
income_bo.setAttributeValue("BANK_YURREF",pay_detail_one.getAttribute("YURREF").toString());
|
||||
@ -640,7 +645,7 @@ public class PayController extends BaseFlowStartAction {
|
||||
BizObjectManager income_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME);
|
||||
BizObject income_bo = null ;
|
||||
tx.join(income_bom);
|
||||
BizObjectQuery income_boo= income_bom.createQuery("select * from o where CONTRACT_ID=:CONTRACT_ID and PAYMENT_NUMBER=:PAYMENT_NUMBER and PLAN_LIST=:PLAN_LIST and FLOWUNID=:FLOWUNID and PAY_TYPE=:PAY_TYPE and FEE_TYPE=:FEE_TYPE ");
|
||||
BizObjectQuery income_boo= income_bom.createQuery("select * from o where CONTRACT_ID=:CONTRACT_ID and PAYMENT_NUMBER=:PAYMENT_NUMBER and PLAN_LIST=:PLAN_LIST and FLOWUNID=:FLOWUNID and PAY_TYPE=:PAY_TYPE and FEE_TYPE=:FEE_TYPE and PLAN_ID=:PLAN_ID ");
|
||||
for (BizObject pay_detail_one : pay_detail_list) {
|
||||
if(DETAIL_YURREF.equals( pay_detail_one.getAttribute("YURREF").toString() )) {
|
||||
|
||||
@ -650,6 +655,7 @@ public class PayController extends BaseFlowStartAction {
|
||||
income_boo.setParameter("FLOWUNID",pay_detail_one.getAttribute("FLOWUNID").toString()) ;
|
||||
income_boo.setParameter("PAY_TYPE",pay_detail_one.getAttribute("PAY_TYPE").toString()) ;
|
||||
income_boo.setParameter("FEE_TYPE",pay_detail_one.getAttribute("FEE_TYPE").toString()) ;
|
||||
income_boo.setParameter("PLAN_ID",pay_detail_one.getAttribute("PLAN_ID").toString()) ;
|
||||
income_bo = income_boo.getSingleResult(true) ;
|
||||
income_bo.setAttributeValue("BANK_SQRNBR",detail.getSQRNBR());
|
||||
income_bo.setAttributeValue("BANK_REQNBR",detail.getREQNBR());
|
||||
@ -662,6 +668,7 @@ public class PayController extends BaseFlowStartAction {
|
||||
callback_detail_bo.setAttributeValue("FLOWUNID",pay_detail_one.getAttribute("FLOWUNID").toString());
|
||||
callback_detail_bo.setAttributeValue("PAY_TYPE",pay_detail_one.getAttribute("PAY_TYPE").toString());
|
||||
callback_detail_bo.setAttributeValue("FEE_TYPE",pay_detail_one.getAttribute("FEE_TYPE").toString());
|
||||
callback_detail_bo.setAttributeValue("PLAN_ID",pay_detail_one.getAttribute("PLAN_ID").toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,73 +1,117 @@
|
||||
package com.tenwa.util;
|
||||
import java.security.Key;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.SecureRandom;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.KeyGenerator;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import sun.misc.BASE64Decoder;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
public class SecurityUtil {
|
||||
|
||||
public static String DES = "AES"; // optional value AES/DES/DESede
|
||||
|
||||
public static String CIPHER_ALGORITHM = "AES"; // optional value AES/DES/DESede
|
||||
|
||||
|
||||
public static Key getSecretKey(String key) throws Exception{
|
||||
try {
|
||||
if(key==null){
|
||||
key="";
|
||||
}
|
||||
KeyGenerator _generator = KeyGenerator.getInstance( "AES" );
|
||||
SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG" );
|
||||
secureRandom.setSeed(key.getBytes());
|
||||
_generator.init(128,secureRandom);
|
||||
return _generator.generateKey();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException( " ³õʼ»¯ÃÜÔ¿³öÏÖÒì³£?" );
|
||||
}
|
||||
}
|
||||
|
||||
public static String encrypt(String data,String key) throws Exception {
|
||||
if (key == null) {
|
||||
key = "";
|
||||
}
|
||||
//SecureRandom sr = new SecureRandom();
|
||||
SecureRandom sr =SecureRandom.getInstance("SHA1PRNG");
|
||||
sr.setSeed(key.getBytes("UTF-8"));
|
||||
Key securekey = getSecretKey(key);
|
||||
Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);
|
||||
cipher.init(Cipher.ENCRYPT_MODE, securekey, sr);
|
||||
byte[] bt = cipher.doFinal(data.getBytes());
|
||||
String strs = new BASE64Encoder().encode(bt);
|
||||
return strs;
|
||||
}
|
||||
|
||||
|
||||
public static String detrypt(String message,String key) throws Exception{
|
||||
// SecureRandom sr = new SecureRandom();
|
||||
SecureRandom sr =SecureRandom.getInstance("SHA1PRNG");
|
||||
sr.setSeed(key.getBytes("UTF-8"));
|
||||
Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);
|
||||
Key securekey = getSecretKey(key);
|
||||
cipher.init(Cipher.DECRYPT_MODE, securekey,sr);
|
||||
byte[] res = new BASE64Decoder().decodeBuffer(message);
|
||||
res = cipher.doFinal(res);
|
||||
return new String(res);
|
||||
}
|
||||
|
||||
public static void main(String[] args)throws Exception{
|
||||
String message = "apzl@2018";
|
||||
String key = "";
|
||||
String entryptedMsg = encrypt(message,key);
|
||||
System.out.println("encrypted message is below :");
|
||||
System.out.println(entryptedMsg);
|
||||
|
||||
String decryptedMsg = detrypt(entryptedMsg,key);
|
||||
System.out.println("decrypted message is below :");
|
||||
System.out.println(decryptedMsg);
|
||||
}
|
||||
public class SecurityUtil {
|
||||
/**
|
||||
* 将二进制转换成16进制 加密
|
||||
*/
|
||||
public static String parseByte2HexStr(byte buf[]) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (int i = 0; i < buf.length; i++) {
|
||||
String hex = Integer.toHexString(buf[i] & 0xFF);
|
||||
if (hex.length() == 1) {
|
||||
hex = '0' + hex;
|
||||
}
|
||||
sb.append(hex.toUpperCase());
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static String encrypt(String content, String password) throws Exception {
|
||||
try {
|
||||
SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
|
||||
random.setSeed(password.getBytes());
|
||||
KeyGenerator kgen = KeyGenerator.getInstance("AES");
|
||||
kgen.init(128, random);
|
||||
SecretKey secretKey = kgen.generateKey();
|
||||
byte[] enCodeFormat = secretKey.getEncoded();
|
||||
SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");
|
||||
Cipher cipher = Cipher.getInstance("AES");// 创建密码器
|
||||
byte[] byteContent = content.getBytes("utf-8");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, key);// 初始化
|
||||
byte[] result = cipher.doFinal(byteContent);
|
||||
return parseByte2HexStr(result); // 加密
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String detrypt(String content, String password) throws Exception {
|
||||
try {
|
||||
byte[] accountFrom = parseHexStr2Byte(content);
|
||||
SecureRandom random = null;
|
||||
random = SecureRandom.getInstance("SHA1PRNG");
|
||||
random.setSeed(password.getBytes());
|
||||
KeyGenerator kgen = KeyGenerator.getInstance("AES");
|
||||
kgen.init(128, random);
|
||||
SecretKey secretKey = kgen.generateKey();
|
||||
byte[] enCodeFormat = secretKey.getEncoded();
|
||||
SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");
|
||||
Cipher cipher = Cipher.getInstance("AES");// 创建密码器
|
||||
cipher.init(Cipher.DECRYPT_MODE, key);// 初始化
|
||||
byte[] result = cipher.doFinal(accountFrom);
|
||||
return new String(result); // 加密
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将16进制转换为二进制
|
||||
*/
|
||||
public static byte[] parseHexStr2Byte(String hexStr) {
|
||||
if (hexStr == null || hexStr.length() < 1)
|
||||
return null;
|
||||
byte[] result = new byte[hexStr.length() / 2];
|
||||
for (int i = 0; i < hexStr.length() / 2; i++) {
|
||||
int high = Integer.parseInt(hexStr.substring(i * 2, i * 2 + 1), 16);
|
||||
int low = Integer.parseInt(hexStr.substring(i * 2 + 1, i * 2 + 2), 16);
|
||||
result[i] = (byte) (high * 16 + low);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String md5(String inStr) {
|
||||
MessageDigest md5 = null;
|
||||
try {
|
||||
md5 = MessageDigest.getInstance("MD5");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "";
|
||||
}
|
||||
char[] charArray = inStr.toCharArray();
|
||||
byte[] byteArray = new byte[charArray.length];
|
||||
|
||||
for (int i = 0; i < charArray.length; i++)
|
||||
byteArray[i] = (byte) charArray[i];
|
||||
byte[] md5Bytes = md5.digest(byteArray);
|
||||
StringBuffer hexValue = new StringBuffer();
|
||||
for (int i = 0; i < md5Bytes.length; i++) {
|
||||
int val = ((int) md5Bytes[i]) & 0xff;
|
||||
if (val < 16)
|
||||
hexValue.append("0");
|
||||
hexValue.append(Integer.toHexString(val));
|
||||
}
|
||||
return hexValue.toString();
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String message = "apzl", key = "";
|
||||
String entryptedMsg = encrypt(message, key);
|
||||
System.out.println("encrypted message is below :");
|
||||
System.out.println(entryptedMsg);
|
||||
|
||||
String decryptedMsg = detrypt(entryptedMsg, key);
|
||||
System.out.println("decrypted message is below :");
|
||||
System.out.println(decryptedMsg);
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,21 @@
|
||||
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
|
||||
|
||||
public class FinancialLeasCar {
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.tenwa.comm.exception.BusinessException;
|
||||
import com.tenwa.voucher.service.VoucherJavaParamService;
|
||||
|
||||
public class FinancialLeasCar implements VoucherJavaParamService{
|
||||
|
||||
@Override
|
||||
public Map<String, String> getJavaParam(JBOTransaction tx,
|
||||
Map<String, String> param) throws BusinessException {
|
||||
Map<String,String>returnValue=new HashMap<String,String>();
|
||||
returnValue.putAll(param);
|
||||
returnValue.put("MONEY",param.get("FACT_MONEY"));
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.tenwa.comm.exception.BusinessException;
|
||||
import com.tenwa.voucher.service.VoucherJavaParamService;
|
||||
|
||||
public class ReceiveDealerMarginForLoan implements VoucherJavaParamService {
|
||||
|
||||
@Override
|
||||
public Map<String, String> getJavaParam(JBOTransaction tx,
|
||||
Map<String, String> param) throws BusinessException {
|
||||
Map<String,String>returnValue=new HashMap<String,String>();
|
||||
returnValue.putAll(param);
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
@ -10,7 +10,7 @@ import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import com.tenwa.flow.baseBussion.BaseBussiness;
|
||||
import com.tenwa.leasing.serviceImpl.voucher.CreateVoucherServiceImpl;
|
||||
import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl;
|
||||
|
||||
public class CreateVoucherLoanDistributor extends BaseBussiness{
|
||||
@Override
|
||||
@ -25,7 +25,6 @@ public class CreateVoucherLoanDistributor extends BaseBussiness{
|
||||
String CONTRACT_NUMBER=null;
|
||||
String PROJECT_NAME=null;
|
||||
String leas_form=null;
|
||||
String CONSTARTNUM=null;
|
||||
String ORGNAME=null;
|
||||
String ORGID=null;
|
||||
String MONEY=null;
|
||||
@ -35,11 +34,11 @@ public class CreateVoucherLoanDistributor extends BaseBussiness{
|
||||
String FlowUnid=this.getAttribute("FlowUnid").toString();
|
||||
param.clear();
|
||||
map.put("FlowUnid", FlowUnid);
|
||||
map.put("FEE_TYPE", "feetype16");
|
||||
map.put("FEE_TYPE", "feetype10");
|
||||
String sql=
|
||||
" SELECT LFIT.FACT_MONEY AS MONEY,LFIT.ACCOUNTING_DATE AS ACCOUNT_DATE, "
|
||||
+" LFIT.FACT_DATE,LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER, "
|
||||
+" LCI.PROJECT_NAME,LCI.LEAS_FORM,nvl(LFIT.acc_number,'122905168210604') as ACCOUNTNO,CASE WHEN LCI.CONSTARTNUM IS NULL THEN '000000000000' ELSE LCI.CONSTARTNUM END AS CONSTARTNUM, "
|
||||
+" LCI.PROJECT_NAME,LCI.LEAS_FORM,IFNULL(LFIT.acc_number,'000000000000000') as ACCOUNTNO, "
|
||||
+" ORG.ORGNAME,ORG.ORGID,LESS.CUSTOMER_ID as CUSTOMERID,LESS.CUSTOMER_NAME AS CUSTOMERNAME "
|
||||
+" FROM LC_FUND_INCOME_TEMP LFIT "
|
||||
+" LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID "
|
||||
@ -59,7 +58,6 @@ public class CreateVoucherLoanDistributor extends BaseBussiness{
|
||||
CONTRACT_NUMBER=dataList.get(i).get("CONTRACT_NUMBER").toString();
|
||||
PROJECT_NAME=dataList.get(i).get("PROJECT_NAME").toString();
|
||||
leas_form=dataList.get(i).get("LEAS_FORM").toString();
|
||||
CONSTARTNUM=dataList.get(i).get("CONSTARTNUM").toString();
|
||||
ORGNAME=dataList.get(i).get("ORGNAME").toString();
|
||||
ORGID=dataList.get(i).get("ORGID").toString();
|
||||
MONEY=dataList.get(i).get("MONEY").toString();
|
||||
@ -71,7 +69,6 @@ public class CreateVoucherLoanDistributor extends BaseBussiness{
|
||||
param.put("CONTRACT_ID",CONTRACT_ID);
|
||||
param.put("CONTRACT_NUMBER",CONTRACT_NUMBER);
|
||||
param.put("PROJECT_NAME",PROJECT_NAME);
|
||||
param.put("CONSTARTNUM",CONSTARTNUM);
|
||||
param.put("ORGNAME",ORGNAME);
|
||||
param.put("ORGID",ORGID);
|
||||
param.put("LEAS_FORM",leas_form);
|
||||
@ -82,52 +79,20 @@ public class CreateVoucherLoanDistributor extends BaseBussiness{
|
||||
param.put("CUSTOMERNAME",CUSTOMERNAME);
|
||||
map.clear();
|
||||
map.put("PROJ_TYPE", leas_form);
|
||||
map.put("MODULAR_NUMBER", "·çÏÕµÖѺ½ðµÖ¿Û×â½ð");
|
||||
map.put("MODULAR_NUMBER", "给经销商放款-车款全款");
|
||||
BizObject vouch=DataOperatorUtil.getSingleJBO(LV_VOUCHER_CONFIG.CLASS_NAME, map, Sqlca);
|
||||
|
||||
if(vouch!=null){
|
||||
//vs.createVoucher("·çÏÕµÖѺ½ðµÖ¿Û×â½ð", vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca);
|
||||
vs.createVoucher("给经销商放款-车款全款", vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca);
|
||||
}
|
||||
}
|
||||
|
||||
// ×â½ð²¿·Ö
|
||||
map.clear();
|
||||
map.put("FlowUnid", FlowUnid);
|
||||
String rentIncomeSql="select ID,PLAN_ID,RENT,CORPUS,INTEREST,nvl(PENALTY,'0.00') as PENALTY,HIRE_DATE as FACT_DATE,ACCOUNTING_DATE as ACCOUNT_DATE,CONTRACT_ID,PLAN_LIST, "
|
||||
+ "own_number as ACCOUNTNO from LC_RENT_INCOME_TEMP where FLOWUNID=:FlowUnid ";
|
||||
List<Map<String,String>> RentdataList=DataOperatorUtil.getDataBySql(Sqlca, rentIncomeSql, map);
|
||||
|
||||
for (int i=0;i<RentdataList.size();i++){
|
||||
String ID=RentdataList.get(i).get("ID").toString();
|
||||
String PLAN_ID=RentdataList.get(i).get("PLAN_ID").toString();
|
||||
String RENT=RentdataList.get(i).get("RENT").toString();
|
||||
String CORPUS=RentdataList.get(i).get("CORPUS").toString();
|
||||
String INTEREST=RentdataList.get(i).get("INTEREST").toString();
|
||||
String PENALTY=RentdataList.get(i).get("PENALTY").toString();
|
||||
String PLAN_LIST=RentdataList.get(i).get("PLAN_LIST").toString();
|
||||
CONTRACT_ID=RentdataList.get(i).get("CONTRACT_ID").toString();
|
||||
String ACCOUNTNORent=RentdataList.get(i).get("ACCOUNTNO").toString();
|
||||
param.put("ID",ID);
|
||||
param.put("PLAN_ID",PLAN_ID);
|
||||
param.put("RENT", RENT);
|
||||
param.put("CORPUS",CORPUS);
|
||||
param.put("INTEREST",INTEREST);
|
||||
param.put("PENALTY",PENALTY);
|
||||
param.put("FACT_DATE",FACT_DATE);
|
||||
param.put("ACCOUNT_DATE", ACCOUNT_DATE);
|
||||
param.put("ACCOUNTNO", ACCOUNTNORent);
|
||||
|
||||
//createVoucherRentIncome createVoucherRentIncome=new createVoucherRentIncome();
|
||||
String Vparams=ID+","+PLAN_ID+","+RENT+","+CORPUS+","+INTEREST+","+PENALTY+","+CONTRACT_ID+","+FACT_DATE+","+ACCOUNT_DATE+","+"admin"+","+PLAN_LIST;
|
||||
//createVoucherRentIncome.setVparams(Vparams);
|
||||
//createVoucherRentIncome.createVoucher(Sqlca);
|
||||
|
||||
}
|
||||
if(Sqlca!=null){
|
||||
Sqlca.commit();
|
||||
}
|
||||
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
return new Exception();
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,68 @@
|
||||
package com.tenwa.voucher.CreateVoucherProcess;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.voucher.LV_VOUCHER_CONFIG;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import com.tenwa.flow.baseBussion.BaseBussiness;
|
||||
import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl;
|
||||
|
||||
public class CreateVoucherReceiveDealerMargin extends BaseBussiness{
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
this.initBussinessParam(Sqlca);
|
||||
|
||||
Map<String,String> map=new HashMap<String, String>();
|
||||
Map<String,String> param=new HashMap<String, String>();
|
||||
String MONEY=null;
|
||||
String ACCOUNTING_DATE=null;
|
||||
String FACT_DATE=null;
|
||||
String LEAS_FORM=null;
|
||||
String DISTRIBUTOR_NO=null;
|
||||
String DISTRIBUTOR_NAME=null;
|
||||
String FlowUnid=this.getAttribute("FlowUnid").toString();
|
||||
map.put("FlowUnid", FlowUnid);
|
||||
String sql="SELECT DDIT.CAUTION_MONEY AS MONEY,DDIT.COLLECT_TIME AS ACCOUNTING_DATE,"
|
||||
+ "DDIT.COLLECT_TIME AS FACT_DATE ,'02' AS LEAS_FORM ,DIF.DISTRIBUTOR_NO,"
|
||||
+ "DIF.DISTRIBUTOR_NAME FROM D_DEPOSITCHARGE_INFO_TEMP DDIT LEFT JOIN "
|
||||
+ "DISTRIBUTOR_INFO DIF ON DDIT.DISTRIBUTOR_ID=DIF.ID WHERE DDIT.FLOWUNID=:FLOWUNID";
|
||||
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
|
||||
|
||||
CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl();
|
||||
String VOUCHER_TYPE="1";// 凭证分类 金蝶
|
||||
String userid ="admin";
|
||||
|
||||
for(Map<String,String> ma:dataList){
|
||||
MONEY=ma.get("MONEY");
|
||||
ACCOUNTING_DATE=ma.get("ACCOUNTING_DATE");
|
||||
FACT_DATE=ma.get("FACT_DATE");
|
||||
LEAS_FORM=ma.get("LEAS_FORM");
|
||||
DISTRIBUTOR_NO=ma.get("DISTRIBUTOR_NO");
|
||||
DISTRIBUTOR_NAME=ma.get("DISTRIBUTOR_NAME");
|
||||
|
||||
param.put("MONEY", MONEY);
|
||||
param.put("ACCOUNTING_DATE", ACCOUNTING_DATE);
|
||||
param.put("FACT_DATE", FACT_DATE);
|
||||
param.put("LEAS_FORM", LEAS_FORM);
|
||||
param.put("DISTRIBUTOR_NO", DISTRIBUTOR_NO);
|
||||
param.put("DISTRIBUTOR_NAME", DISTRIBUTOR_NAME);
|
||||
|
||||
map.clear();
|
||||
map.put("PROJ_TYPE", LEAS_FORM);
|
||||
map.put("MODULAR_NUMBER", "记录经销商保证金");
|
||||
BizObject vouch=DataOperatorUtil.getSingleJBO(LV_VOUCHER_CONFIG.CLASS_NAME, map, Sqlca);
|
||||
|
||||
if(vouch!=null){
|
||||
vs.createVoucher("记录经销商保证金", vouch.getAttribute("OWNED_COMPANY").getString(), LEAS_FORM, VOUCHER_TYPE, userid,param, Sqlca);
|
||||
}
|
||||
}
|
||||
return "true";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
package com.tenwa.voucher.CreateVoucherProcess;
|
||||
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.flow.baseBussion.BaseBussiness;
|
||||
|
||||
public class createVoucherLoanDistributor extends BaseBussiness{
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
|
||||
|
||||
|
||||
return super.run(Sqlca);
|
||||
}
|
||||
}
|
||||
@ -45,12 +45,18 @@ public class VoucherToV8Impl implements VoucherService {
|
||||
*/
|
||||
private static final String moduleName_value = "网银导入";
|
||||
|
||||
|
||||
/**
|
||||
* 欧力士特殊生成凭证模块
|
||||
* 因根据合同号都会把凭证归属在合同对应所属公司下,这样不满足欧力士现业务需求
|
||||
*/
|
||||
private static final String SPECIAL_MODULENAME = "代收深圳款";
|
||||
|
||||
/**
|
||||
* 经销商保证金收取使用的参考变量
|
||||
*
|
||||
*/
|
||||
private static final String Receive_Dealer_Margin="记录经销商保证金";
|
||||
|
||||
public String saveMessage(List<Map<String,String>> list,Map<String,String> param,BizObject user,JBOTransaction tx) throws Exception{
|
||||
try{
|
||||
@ -79,13 +85,13 @@ public class VoucherToV8Impl implements VoucherService {
|
||||
String contracid=list.get(i).get("CONTRACT_ID");//合同号
|
||||
String modularNumber=param.get("MODULAR_NUMBER");//凭证编号
|
||||
//网银导入、代收租金 的凭证不需要合同号
|
||||
if(!moduleName_value.equals(modularNumber) && !SPECIAL_MODULENAME.equals(modularNumber) && Tools.isNullOrEmpty(contracid)){
|
||||
if(!Receive_Dealer_Margin.equals(modularNumber)&&!moduleName_value.equals(modularNumber) && !SPECIAL_MODULENAME.equals(modularNumber) && Tools.isNullOrEmpty(contracid)){
|
||||
log.error("合同号为空,无法构建对应的凭证信息!");
|
||||
return null;
|
||||
}
|
||||
|
||||
//检查合同ID是否是正确的
|
||||
if(!moduleName_value.equals(modularNumber) && !SPECIAL_MODULENAME.equals(modularNumber)){
|
||||
if(!Receive_Dealer_Margin.equals(modularNumber)&&!moduleName_value.equals(modularNumber) && !SPECIAL_MODULENAME.equals(modularNumber)){
|
||||
|
||||
BizObject contract=JBOFactory.createBizObjectQuery(LB_CONTRACT_INFO.CLASS_NAME, "id=:id").setParameter("id", contracid).getSingleResult(false);
|
||||
if(contract==null){
|
||||
|
||||
@ -30,7 +30,16 @@ public class CustomerInfoManage {
|
||||
private String leas_from;
|
||||
private String idexpiry;
|
||||
private String project_source;
|
||||
private String suname;
|
||||
|
||||
public String getSuname() {
|
||||
return suname;
|
||||
}
|
||||
|
||||
public void setSuname(String suname) {
|
||||
this.suname = suname;
|
||||
}
|
||||
|
||||
public String getProject_source() {
|
||||
return project_source;
|
||||
}
|
||||
@ -169,6 +178,7 @@ public class CustomerInfoManage {
|
||||
bo.setAttributeValue("certid", certid);
|
||||
bo.setAttributeValue("name", name);
|
||||
bo.setAttributeValue("tel", tel);
|
||||
bo.setAttributeValue("suname", suname);
|
||||
}else{
|
||||
bo = bom.newObject();
|
||||
bo.setAttributeValue("flowunid", flowunid);
|
||||
@ -179,6 +189,7 @@ public class CustomerInfoManage {
|
||||
bo.setAttributeValue("certtype", "Ind01");
|
||||
bo.setAttributeValue("name", name);
|
||||
bo.setAttributeValue("tel", tel);
|
||||
bo.setAttributeValue("suname", suname);
|
||||
}
|
||||
bom.saveObject(bo);
|
||||
}catch(Exception e){
|
||||
|
||||
@ -46,7 +46,6 @@ public class DistributorInfoTempToFormalBusiness extends BaseBussiness {
|
||||
dst.setAttributeValue("orgid",orgid );
|
||||
BizObjectManager dit = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME,Sqlca);
|
||||
if(null==disStatus || disStatus.length()<=0){
|
||||
dst.setAttributeValue("distributor_status", "distributor_status04");
|
||||
dst.setAttributeValue("distributor_status", "distributor_status08");
|
||||
}
|
||||
dit.saveObject(dst);
|
||||
|
||||
@ -196,7 +196,7 @@ public class LBCustomerTempToFormalBusiness extends BaseBussiness {
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_CERT.CLASS_NAME, fromCondition, CUSTOMER_CERT_HIS.CLASS_NAME, null, other, null, Sqlca);
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY.CLASS_NAME, fromCondition, CUSTOMER_FAMILY_HIS.CLASS_NAME, null, other, null, Sqlca);
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_ADDRESS.CLASS_NAME, fromCondition, CUSTOMER_ADDRESS_HIS.CLASS_NAME, null, other, null, Sqlca);
|
||||
other.put("proj_id", union.getAttribute("PROJECT_ID").getString());
|
||||
//other.put("proj_id", union.getAttribute("PROJECT_ID").getString());
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_INFO.CLASS_NAME, fromCondition, CUSTOMER_INFO_HIS.CLASS_NAME, null, other, null, Sqlca);
|
||||
|
||||
}
|
||||
@ -218,7 +218,7 @@ public class LBCustomerTempToFormalBusiness extends BaseBussiness {
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_CERT.CLASS_NAME, fromCondition, CUSTOMER_CERT_HIS.CLASS_NAME, null, other, null, Sqlca);
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY.CLASS_NAME, fromCondition, CUSTOMER_FAMILY_HIS.CLASS_NAME, null, other, null, Sqlca);
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_ADDRESS.CLASS_NAME, fromCondition, CUSTOMER_ADDRESS_HIS.CLASS_NAME, null, other, null, Sqlca);
|
||||
other.put("proj_id", unit.getAttribute("PROJECT_ID").getString());
|
||||
//other.put("proj_id", unit.getAttribute("PROJECT_ID").getString());
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_INFO.CLASS_NAME, fromCondition, CUSTOMER_INFO_HIS.CLASS_NAME, null, other, null, Sqlca);
|
||||
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
|
||||
bo.setAttributeValue("BUSINESSTYPE", this.getAttribute("businessType"));
|
||||
bo.setAttributeValue("LEAS_FORM", this.getAttribute("leasehold"));//租赁方式
|
||||
bo.setAttributeValue("PRODUCT_ID",this.getAttribute("ProductId"));//业务品种编号
|
||||
bo.setAttributeValue("PRODUCT_NAME",this.getAttribute("ProductName"));//业务品种名称
|
||||
bo.setAttributeValue("PRODUCT_NAME",this.getAttribute("carAttributes"));//业务品种名称
|
||||
bo.setAttributeValue("PROJECT_STATUS","0");
|
||||
bo.setAttributeValue("Is_Flow","inFlow");//在流程中-inFlow,流程结束-outFlow
|
||||
bo.setAttributeValue("InputOrgID", asUser.getOrgID());
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
package com.tenwa.lease.flow.project.validate;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class FileObjectSetPhone implements Serializable {
|
||||
|
||||
//授权文件内容
|
||||
private String license=null;
|
||||
//上传的条件excel文件
|
||||
private byte[] file=null;
|
||||
//接收信息
|
||||
private String info=null;
|
||||
//文件类型:xls
|
||||
private String type=null;
|
||||
|
||||
public FileObjectSetPhone() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getLicense() {
|
||||
return license;
|
||||
}
|
||||
|
||||
public void setLicense(String license) {
|
||||
this.license = license;
|
||||
}
|
||||
|
||||
public byte[] getFile() {
|
||||
return file;
|
||||
}
|
||||
|
||||
public void setFile(byte[] file) {
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package com.tenwa.lease.flow.project.validate;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentHelper;
|
||||
import org.dom4j.Element;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
|
||||
public class IdentityVerification {
|
||||
|
||||
private String id;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String doIdentityVerification(JBOTransaction tx){
|
||||
try {
|
||||
BizObjectManager bom1 = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME,tx);
|
||||
BizObject identityObject = bom1.createQuery("ID=:id").setParameter("id", id).getSingleResult(false);
|
||||
//读取授权文件,因为其他方法都读取不到,只能通过此方法
|
||||
Properties prop = new Properties();
|
||||
InputStream in= IdentityVerification.class.getClassLoader().getResourceAsStream("license.properties");
|
||||
prop.load(in);
|
||||
String property = prop.getProperty("key");
|
||||
Base64 base64 = new Base64();
|
||||
String msg = new String(base64.decode(property.getBytes("utf-8")),"utf-8");
|
||||
String decode = URLDecoder.decode(msg,"utf-8");
|
||||
char[] charArray = decode.toCharArray();
|
||||
charArray[16]='+';
|
||||
decode = new String(charArray);
|
||||
String inConditions = SoapRequest.XMLConfiguration(identityObject.getAttribute("CERTID").getString(),identityObject.getAttribute("FULLNAME").getString());
|
||||
String result = NciicClient.executeClient("NciicServices",decode,inConditions);
|
||||
Document document = DocumentHelper.parseText(result);
|
||||
Element rootElement = document.getRootElement();
|
||||
String finalResult = "";
|
||||
StringBuffer sb = new StringBuffer();
|
||||
if("RESPONSE".equals(rootElement.getName())){
|
||||
Element rowElement = rootElement.element("ROWS").element("ROW");
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Element> elements = rowElement.elements();
|
||||
for(Element element:elements){
|
||||
sb.append(element.getText()+",");
|
||||
}
|
||||
String message = sb.toString().split(",")[1];
|
||||
finalResult = "验证失败:"+message;
|
||||
}else if("ROWS".equals(rootElement.getName())){
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Element> itemElement = rootElement.element("ROW").element("OUTPUT").elements("ITEM");
|
||||
@SuppressWarnings("unchecked")
|
||||
List <Element>resultElement1 = itemElement.get(0).elements();
|
||||
@SuppressWarnings("unchecked")
|
||||
List <Element>resultElement2= itemElement.get(1).elements();
|
||||
if("errormesage".equals(resultElement1.get(0).getName())){
|
||||
finalResult = "错误信息:"+ resultElement1.get(0).getText()+",错误字段:"
|
||||
+ resultElement2.get(0).getText();
|
||||
}else if("gmsfhm".equals(resultElement1.get(0).getName())){
|
||||
finalResult = "身份证号码对比结果:"+ resultElement1.get(1).getText()+",姓名对比结果:"
|
||||
+ resultElement2.get(1).getText();
|
||||
}
|
||||
}
|
||||
return finalResult;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "ERROR";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package com.tenwa.lease.flow.project.validate;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.net.MalformedURLException;
|
||||
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
import org.codehaus.xfire.client.Client;
|
||||
import org.codehaus.xfire.client.XFireProxy;
|
||||
import org.codehaus.xfire.client.XFireProxyFactory;
|
||||
import org.codehaus.xfire.service.Service;
|
||||
import org.codehaus.xfire.service.binding.ObjectServiceFactory;
|
||||
import org.codehaus.xfire.transport.http.CommonsHttpMessageSender;
|
||||
import org.codehaus.xfire.transport.http.EasySSLProtocolSocketFactory;
|
||||
import org.codehaus.xfire.util.dom.DOMOutHandler;
|
||||
|
||||
public class NciicClient {
|
||||
|
||||
public static final String SERVICE_URL = "https://ws.nciic.org.cn/nciic_ws/services/";
|
||||
/*public NciicClient() {
|
||||
}*/
|
||||
public static void main(String[] args) throws MalformedURLException {
|
||||
|
||||
try{
|
||||
|
||||
String IDNo = "140225199408171330";
|
||||
|
||||
String username = "张磊";
|
||||
|
||||
String license = ReadFile.ReadLine("D://app//license.txt");
|
||||
System.out.println(license);
|
||||
String inConditions = SoapRequest.XMLConfiguration(IDNo, username);
|
||||
|
||||
new NciicClient().executeClient("NciicServices", license , inConditions);
|
||||
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public static String executeClient(String serviceName, String license, String condition)
|
||||
throws MalformedURLException {
|
||||
long time = System.currentTimeMillis();
|
||||
//调用生产环境接口时,需要采用https
|
||||
ProtocolSocketFactory easy = new EasySSLProtocolSocketFactory();
|
||||
Protocol protocol = new Protocol("https", easy, 443);
|
||||
Protocol.registerProtocol("https", protocol);
|
||||
//--核心服务NciicServices
|
||||
Service serviceModel = new ObjectServiceFactory().create(ServiceInf.class, serviceName, null, null);
|
||||
ServiceInf service = (ServiceInf) new XFireProxyFactory().create(serviceModel, SERVICE_URL + serviceName);
|
||||
Client client = ((XFireProxy) Proxy.getInvocationHandler(service)).getClient();
|
||||
client.addOutHandler(new DOMOutHandler());
|
||||
client.setProperty(CommonsHttpMessageSender.GZIP_ENABLED, Boolean.TRUE);
|
||||
// 忽略超时
|
||||
client.setProperty(CommonsHttpMessageSender.HTTP_TIMEOUT, "0");
|
||||
String result = null;
|
||||
try {
|
||||
|
||||
/**
|
||||
* 调用方法,针对不同的方法记得修改此处。否则报错
|
||||
*/
|
||||
result = service.nciicCheck(license, condition);
|
||||
|
||||
System.out.println( result);
|
||||
} catch (FileNotFoundException e){
|
||||
e.printStackTrace();
|
||||
} catch (IOException e){
|
||||
e.printStackTrace();
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
time = System.currentTimeMillis() - time;
|
||||
System.out.println("------out time -----"+time);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
112
src_tenwa/com/tenwa/lease/flow/project/validate/ServLtVO.java
Normal file
112
src_tenwa/com/tenwa/lease/flow/project/validate/ServLtVO.java
Normal file
@ -0,0 +1,112 @@
|
||||
package com.tenwa.lease.flow.project.validate;
|
||||
/**
|
||||
*
|
||||
* 属性类
|
||||
* @author zhangjieying
|
||||
*
|
||||
*/
|
||||
public class ServLtVO {
|
||||
/**
|
||||
* 任务序列号
|
||||
*/
|
||||
private String xlh;
|
||||
/**
|
||||
* 条件文件或结果文件
|
||||
*/
|
||||
private byte[] fileBytes;
|
||||
/**
|
||||
* 文件状态
|
||||
*/
|
||||
private String wjzt;
|
||||
|
||||
String bh = null;//原编号
|
||||
String mc = null;//原单位名称
|
||||
String dz = null;//原地址
|
||||
String dh = null;//原电话
|
||||
String dwmc = null;//单位名称
|
||||
String dwdz = null;//单位地址
|
||||
String ppbz = null;//匹配标志
|
||||
String dhbz = null;//电话标志
|
||||
String xltbz = null;//小灵通标志
|
||||
String xsmc = null;//显示名称
|
||||
|
||||
public byte[] getFileBytes() {
|
||||
return fileBytes;
|
||||
}
|
||||
public void setFileBytes(byte[] fileBytes) {
|
||||
this.fileBytes = fileBytes;
|
||||
}
|
||||
public String getWjzt() {
|
||||
return wjzt;
|
||||
}
|
||||
public void setWjzt(String wjzt) {
|
||||
this.wjzt = wjzt;
|
||||
}
|
||||
public String getXlh() {
|
||||
return xlh;
|
||||
}
|
||||
public void setXlh(String xlh) {
|
||||
this.xlh = xlh;
|
||||
}
|
||||
public String getBh() {
|
||||
return bh;
|
||||
}
|
||||
public void setBh(String bh) {
|
||||
this.bh = bh;
|
||||
}
|
||||
public String getMc() {
|
||||
return mc;
|
||||
}
|
||||
public void setMc(String mc) {
|
||||
this.mc = mc;
|
||||
}
|
||||
public String getDz() {
|
||||
return dz;
|
||||
}
|
||||
public void setDz(String dz) {
|
||||
this.dz = dz;
|
||||
}
|
||||
public String getDh() {
|
||||
return dh;
|
||||
}
|
||||
public void setDh(String dh) {
|
||||
this.dh = dh;
|
||||
}
|
||||
public String getDwmc() {
|
||||
return dwmc;
|
||||
}
|
||||
public void setDwmc(String dwmc) {
|
||||
this.dwmc = dwmc;
|
||||
}
|
||||
public String getDwdz() {
|
||||
return dwdz;
|
||||
}
|
||||
public void setDwdz(String dwdz) {
|
||||
this.dwdz = dwdz;
|
||||
}
|
||||
public String getPpbz() {
|
||||
return ppbz;
|
||||
}
|
||||
public void setPpbz(String ppbz) {
|
||||
this.ppbz = ppbz;
|
||||
}
|
||||
public String getDhbz() {
|
||||
return dhbz;
|
||||
}
|
||||
public void setDhbz(String dhbz) {
|
||||
this.dhbz = dhbz;
|
||||
}
|
||||
public String getXltbz() {
|
||||
return xltbz;
|
||||
}
|
||||
public void setXltbz(String xltbz) {
|
||||
this.xltbz = xltbz;
|
||||
}
|
||||
public String getXsmc() {
|
||||
return xsmc;
|
||||
}
|
||||
public void setXsmc(String xsmc) {
|
||||
this.xsmc = xsmc;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package com.tenwa.lease.flow.project.validate;
|
||||
|
||||
import javax.tools.FileObject;
|
||||
/**
|
||||
* <p>
|
||||
* Title: 核心服务web service 接口
|
||||
* </p>
|
||||
* <p>
|
||||
* Description: 升级改造项目
|
||||
* </p>
|
||||
* <p>
|
||||
* Copyright: 2008-2010
|
||||
* </p>
|
||||
* <p>
|
||||
* Company: NCIIC
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* @author ZJS
|
||||
* @version 2008年
|
||||
*/
|
||||
public interface ServiceInf {
|
||||
//住址模糊截取
|
||||
public String nciicAddrExactSearch(String inLicense, String inConditions)throws Exception;
|
||||
|
||||
// 核查
|
||||
public String nciicCheck(String inLicense, String inConditions)throws Exception;
|
||||
|
||||
// 比对
|
||||
public String nciicCompare(String inLicense, String inConditions)throws Exception;
|
||||
|
||||
// 组合查询
|
||||
public String nciicExactSearch(String inLicense, String inConditions)throws Exception;
|
||||
/*“nciicCourt” 组合多项核查方法,主要是高法院的姓名批量查询,根据需要的查询年限范围,大于1年时,则调用此方法。
|
||||
*目前未使用此方法,因为高法院的协议查询年限范围是1年,年限范围可以登录nciic系统【服务管理】——>【系统参数】——>【姓名多项核查出生日期年限范围】代码07
|
||||
*/
|
||||
public String nciicCourt(String inLicense,String inConditions) throws Exception;
|
||||
// 精确查询
|
||||
public String nciicCombineSearch(String inLicense, String inConditions)throws Exception;
|
||||
|
||||
// 统计分析
|
||||
public String nciicStat(String inLicense, String inConditions)throws Exception;
|
||||
|
||||
// 二代证读卡器调用方法
|
||||
public String nciicDiscern(String inLicense, String inConditions)throws Exception;
|
||||
|
||||
// 取得条件文件模板
|
||||
public String nciicGetCondition(String inLicense) throws Exception;
|
||||
|
||||
//中国银行--流水号
|
||||
public String nciicCheckChina(String inLicense, String inConditions)throws Exception;
|
||||
|
||||
// 天创旅客身份核查
|
||||
public String nciicCheckHotel(String inLicense, String inConditions)throws Exception;
|
||||
|
||||
//籍贯比对
|
||||
public String nciicBirthplaceCompare(String inLicense, String inConditions) throws Exception;
|
||||
|
||||
// 网闸特殊接口
|
||||
public String nciicCheckFile(FileObject fileObject) throws Exception;
|
||||
// 网闸特殊接口获取结果文件接口
|
||||
public FileObject nciicGetFile(String inLicense, String id) throws Exception;
|
||||
|
||||
//同名同性
|
||||
public String tmtx(java.lang.String licensecode, java.lang.String condition) throws Exception;
|
||||
|
||||
//--天创便携式手机核查
|
||||
public String nciicCheckMobile(String inLicense, String inConditions)throws Exception;
|
||||
|
||||
//网民认证
|
||||
public String wmrzCheck(String inLicense, String inConditions)throws Exception;
|
||||
|
||||
// 联通数据特殊接口
|
||||
public FileObjectSetPhone nciicCheckSetPhone(FileObjectSetPhone fileObject) throws Exception;
|
||||
public FileObjectSetPhone nciicCheckGetPhone(String inLicense, String id) throws Exception;
|
||||
|
||||
//扫描仪
|
||||
public String nciicCheckScan(String inLicense, String inConditions,String keys)throws Exception;
|
||||
|
||||
public ServLtVO chinaUnicomGetPhone(ServLtVO vo) throws Exception;
|
||||
|
||||
public String faceProxy(int compressFlag,String galleryBase64Image,
|
||||
int galleryMaxHeight,int galleryMaxSize,
|
||||
String probeBase64Image,int probeImgType,
|
||||
int probeMaxHeight,int probeMaxSize)throws Exception;
|
||||
|
||||
public String nciicDateCollection(String inLicense, String inConditions)throws Exception;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package com.tenwa.lease.flow.project.validate;
|
||||
|
||||
public class SoapRequest {
|
||||
|
||||
public static String XMLConfiguration(String IDNo,String username) throws Exception {
|
||||
//WebService接口地址?
|
||||
//String wsdl = "https://ws.nciic.org.cn/nciic_ws/services/NciicServices";
|
||||
//int timeout = 10000;
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
//拼接soap请求的xml
|
||||
//sb.append("<![CDATA[");
|
||||
//sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
|
||||
/*sb.append("<soapenv:Envelope "
|
||||
+ "xmlns:nci='https://api.nciic.org.cn/NciicServices' "
|
||||
+ "xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>");
|
||||
sb.append("<soapenv:Header>");
|
||||
sb.append("<soapenv:Body>");
|
||||
sb.append("<nci:nciicCompare>");
|
||||
sb.append("<nci:inLicense><![CDATA[");
|
||||
//入参授权文件
|
||||
sb.append(inLicense);
|
||||
sb.append("]]></nci:inLicense>");*/
|
||||
//sb.append("<![CDATA[");
|
||||
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='000000' YWLX='身份认证'>");
|
||||
//入参身份证号码
|
||||
sb.append("<GMSFHM>"+IDNo+"</GMSFHM>");
|
||||
//入参姓名
|
||||
sb.append("<XM>"+username+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
sb.append("</ROWS>");
|
||||
//sb.append("]]>");
|
||||
/* sb.append("</nci:nciicCompare>");
|
||||
sb.append("</soapenv:Body>");
|
||||
sb.append("</soapenv:Envelope>");*/
|
||||
|
||||
//System.out.println(sb);
|
||||
//HttpClient发送SOAP请求
|
||||
System.out.println("HttpClient 发送SOAP请求");
|
||||
|
||||
String xmldata = sb.toString();
|
||||
//System.out.println(xmldata);
|
||||
return xmldata;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user