This commit is contained in:
hexiaomou 2018-06-22 18:02:04 +08:00
commit 249631df2c
22 changed files with 937 additions and 762 deletions

View File

@ -23,14 +23,14 @@
var GROUP_NAME = "";
AsDialog.selectCatalogDialog(selName, "", "",
function(sReturn) {
if (typeof (sReturn) == "undefined" || sReturn.length == 0)
if (typeof (sReturn) == "undefined" || sReturn.length == 0 ||sReturn=="_CANCEL_"||sReturn=="")
return;
sReturn = sReturn.split("@");
GROUP_CODE = sReturn[0];
GROUP_NAME = sReturn[1];
var param = "GROUP_CODE="+GROUP_CODE;
alert(param);
//alert(param);
var sUrl = "/AppConfig/AppPage/AppNodeInfo.jsp";
AsDialog.PopView(sUrl, param, "dialogWidth=800px;dialogHeight=650px;",
function(message) {

View File

@ -1,14 +1,14 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2018-06-15
Author: undefined 2018-06-22
Content: ʾÀýÏêÇéÒ³Ãæ
History Log:
*/
String sPrevUrl = CurPage.getParameter("PrevUrl");
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "LPApplicationInfoTemp";//--模板号--
String sTempletNo = "CustomerCompanyTempInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setColTips("", "");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
@ -17,10 +17,10 @@
dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid"));
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
//{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
//{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
};
sButtonPosition = "south";
//sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function returnList(){

View File

@ -36,8 +36,42 @@
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function checkCertId(){
var certType = getItemValue(0,getRow(0),"CERTTYPE");
var certId = getItemValue(0,getRow(0),"CERTID");
if(certType==""){
alert("证件类型不能为空!");
}
if(certId==""){
alert("证件号不能为空!");
}
if(certType=="Ent02"){
if(checkORGRight1(certId)){
return true;
}else{
alert("组织机构代码格式不正确!");
return false;
}
}
if(certType=="Ind01"){
if(CheckLicense(certId)){
return true;
}else{
alert("身份证格式不正确!");
return false;
}
}
if(certType=="Ent03"){
return true;
}
}
function checkTel(){
var mobile =getItemValue(0,getRow(0),"mobile");
var mobile = getItemValue(0,getRow(0),"mobile");
if(mobile==""){
alert("手机号不能为空!");
}
if(CheckPhoneCode(mobile)){
return true;
}else{
@ -48,7 +82,7 @@
}
function save(){
if(checkTel()){
if(checkTel()==true&&checkCertId()==true){
as_save(0,"goBack()");
}
}

View File

@ -36,7 +36,7 @@
String userll=null;
userll="/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp?CompClientID=";
if("01".equals(custype)){
userll="/Tenwa/Customer/Lessee/Person/LPApplicationInfoTemp.jsp?CompClientID=";
userll="/Tenwa/Customer/Lessee/Person/CustomerCompanyTempInfo.jsp?CompClientID=";
}
ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request);
@ -64,7 +64,14 @@
function save(){
var leasfrom = getItemValue(0,getRow(),"LEAS_FORM");
var projectSource = getItemValue(0,getRow(),"PROJECT_SOURCE");
frame_list.window.saveRecord(leasfrom,projectSource);
var customerType = "<%=custype%>";
if(customerType=="01"){
as_save("myiframe0","frame_list.window.as_save(0);");
//as_save(0);
}
if(customerType=="03"){
frame_list.window.saveRecord(leasfrom,projectSource);
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -361,7 +361,7 @@
// setItemValue(0,0,"CERTTYPE","");
// return;
// }
setItemValue(0,0,"certtype","Ent01");
setItemValue(0,0,"certtype","Ent02");
}else if("03" == customerType){
setItemValue(0,0,"certtype","Ind01");
}
@ -380,9 +380,9 @@
return false;
}
}
if(certType =='Ent01'){
if(certType =='Ent02'){
if(!checkORGRight1(certid) ){
setErrorTips("certid","社会统一信用代码格式错误!");
setErrorTips("certid","组织机构代码格式错误!");
return false;
}
}

View File

@ -66,4 +66,6 @@ push.message.package.name=com.tenwa.test
#base.filter.user.role.id='800090001R00000004','800090001R00000005','099','299','399','800090001R00000010','800090002R00000001','800090002R00000003','800090002R00000045','800090001R00000006','800090001R00000007','800090001R00000008','800090001R00000009','800090001R00000013','800090001R00000014','800090001R00000022','800090001R00000019','800090001R00000020','800090001R00000015','800090001R00000025'
base.filter.user.role.id=none
base.filter.user.role.id=none
base.business.type=\u6C7D\u8F66\u4E1A\u52A1

View File

@ -410,6 +410,8 @@
<attribute name="CUSTOMER_TYPE" lable="客户类型" type="STRING" length="1000" />
<attribute name="CERTTYPE" lable="证件类型" type="STRING" length="1000" />
<attribute name="CERTID" lable="证件号" type="STRING" length="1000" />
<attribute name="versionId" lable="产品版本" type="STRING" length="1000" />
<attribute name="modelId" lable="汽车类型" type="STRING" length="1000" />
</attributes>
</class>
<!-- app流程页签配置 -->

View File

@ -110,67 +110,7 @@
</managerProperties>
</manager>
</class>
<class name="CUSTOMER_COMPANY" label="法人客户信息表" keyAttributes="id">
<attributes>
<attribute name="id" label="标识" type="STRING" length="32"/>
<attribute name="customerid" label="客户编号" type="STRING" length="40"/>
<attribute name="status" label="状态" type="STRING" length="20"/>
<attribute name="enterprisename" label="客户名称" type="STRING" length="200"/>
<attribute name="englishname" label="客户英文名" type="STRING" length="80"/>
<attribute name="custsource" label="客户来源" type="STRING" length="32"/>
<attribute name="custkind" label="内部行业" type="STRING" length="32"/>
<attribute name="certtype" label="证件类型" type="STRING" length="20"/>
<attribute name="certid" label="证件号" type="STRING" length="40"/>
<attribute name="countrycode" label="国家" type="STRING" length="18"/>
<attribute name="provincecode" label="省份" type="STRING" length="18"/>
<attribute name="citycode" label="城市" type="STRING" length="18"/>
<attribute name="districtcode" label="区县" type="STRING" length="80"/>
<attribute name="loancardno" label="贷款卡号" type="STRING" length="32"/>
<attribute name="loancardpassword" label="贷款卡密码" type="STRING" length="32"/>
<attribute name="countrytaxno" label="税务登记证号(国税)" type="STRING" length="32"/>
<attribute name="localtaxno" label="税务登记证号(地税)" type="STRING" length="32"/>
<attribute name="supercorpname" label="上级公司名称" type="STRING" length="80"/>
<attribute name="supercertid" label="上级公司组织机构代码" type="STRING" length="32"/>
<attribute name="economytype" label="经济类型" type="STRING" length="18"/>
<attribute name="scope" label="规模" type="STRING" length="18"/>
<attribute name="orgnature" label="机构类型" type="STRING" length="18"/>
<attribute name="orgnaturecategory" label="机构类别细分" type="STRING" length="18"/>
<attribute name="industrytype" label="行业分类" type="STRING" length="18"/>
<attribute name="rccurrency" label="注册资本币种" type="STRING" length="18"/>
<attribute name="registercapital" label="注册资本" type="DOUBLE" length="24" scale="6"/>
<attribute name="pccurrency" label="实收资本币种" type="STRING" length="18"/>
<attribute name="paiclupcapital" label="实收资本" type="DOUBLE" length="24" scale="6"/>
<attribute name="licensematurity" label="营业执照到期日" type="STRING" length="10"/>
<attribute name="operationperiod" label="营业期限(年)" type="STRING" length="10"/>
<attribute name="emailadd" label="公司E-Mail" type="STRING" length="80"/>
<attribute name="webadd" label="公司网址" type="STRING" length="80"/>
<attribute name="listingcorpornot" label="上市公司类型" type="STRING" length="32"/>
<attribute name="hasieright" label="有无进出口经营权" type="STRING" length="18"/>
<attribute name="financebelong" label="财务报表类型" type="STRING" length="18"/>
<attribute name="workfieldarea" label="经营场地面积" type="STRING" length="30"/>
<attribute name="employeenumber" label="职工人数" type="STRING" length="30"/>
<attribute name="workfieldfee" label="经营场地所有权" type="STRING" length="18"/>
<attribute name="mostbusiness" label="经营范围" type="STRING" length="1000"/>
<attribute name="manageinfo" label="合法经营情况" type="STRING" length="1000"/>
<attribute name="customerhistory" label="历史沿革、管理水平" type="STRING" length="1000"/>
<attribute name="mainproduction" label="主要产品情况" type="STRING" length="1000"/>
<attribute name="remark" label="备注" type="STRING" length="20000"/>
<attribute name="inputorgid" label="登记机构" type="STRING" length="32"/>
<attribute name="inputuserid" label="登记人" type="STRING" length="32"/>
<attribute name="updateorgid" label="更新机构" type="STRING" length="32"/>
<attribute name="updateuserid" label="更新人员" type="STRING" length="32"/>
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
<attribute name="updatetime" label="更新时间" type="STRING" length="32"/>
<attribute name="establish_date" label="成立日期" type="STRING" length="100"/>
<attribute name="fax" label="传真" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="customer_company" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="CUSTOMER_INFO" label="客户基本信息表" keyAttributes="customerid">
<attributes>
<attribute name="customerid" label="客户编号" type="STRING" length="40"/>
@ -1556,7 +1496,7 @@
<attribute name="WHOLESALE_BUSINESS" label="批售业务" type="STRING" length="32"/>
<attribute name="TYPE" label="类型" type="STRING" length="32"/>
<attribute name="ORGID" label="部门编号" type="STRING" length="32"/>
<attribute name="PROVINCES" label="省份" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
@ -2023,70 +1963,7 @@
</managerProperties>
</manager>
</class>
<class name="CUSTOMER_COMPANY_TEMP" label="法人注册信息流程表" keyAttributes="id">
<attributes>
<attribute name="flowunid" label="流程id" type="STRING" length="32"/>
<attribute name="id" label="标识" type="STRING" length="32"/>
<attribute name="customerid" label="客户编号" type="STRING" length="40"/>
<attribute name="status" label="状态" type="STRING" length="20"/>
<attribute name="custstatus" label="客户状态" type="STRING" length="32"/>
<attribute name="custtype" label="客户类别" type="STRING" length="32"/>
<attribute name="enterprisename" label="客户名称" type="STRING" length="200"/>
<attribute name="englishname" label="客户英文名" type="STRING" length="80"/>
<attribute name="custsource" label="客户来源" type="STRING" length="32"/>
<attribute name="custkind" label="内部行业" type="STRING" length="32"/>
<attribute name="certtype" label="证件类型" type="STRING" length="20"/>
<attribute name="certid" label="证件号" type="STRING" length="40"/>
<attribute name="countrycode" label="国家" type="STRING" length="18"/>
<attribute name="provincecode" label="省份" type="STRING" length="18"/>
<attribute name="citycode" label="城市" type="STRING" length="18"/>
<attribute name="districtcode" label="区县" type="STRING" length="80"/>
<attribute name="loancardno" label="贷款卡号" type="STRING" length="32"/>
<attribute name="loancardpassword" label="贷款卡密码" type="STRING" length="32"/>
<attribute name="countrytaxno" label="税务登记证号(国税)" type="STRING" length="32"/>
<attribute name="localtaxno" label="税务登记证号(地税)" type="STRING" length="32"/>
<attribute name="supercorpname" label="上级公司名称" type="STRING" length="80"/>
<attribute name="supercertid" label="上级公司组织机构代码" type="STRING" length="32"/>
<attribute name="economytype" label="经济类型" type="STRING" length="18"/>
<attribute name="scope" label="规模" type="STRING" length="18"/>
<attribute name="orgnature" label="机构类型" type="STRING" length="18"/>
<attribute name="orgnaturecategory" label="机构类别细分" type="STRING" length="18"/>
<attribute name="industrytype" label="行业分类" type="STRING" length="18"/>
<attribute name="rccurrency" label="注册资本币种" type="STRING" length="18"/>
<attribute name="registercapital" label="注册资本" type="DOUBLE" length="24" scale="6"/>
<attribute name="pccurrency" label="实收资本币种" type="STRING" length="18"/>
<attribute name="paiclupcapital" label="实收资本" type="DOUBLE" length="24" scale="6"/>
<attribute name="licensematurity" label="营业执照到期日" type="STRING" length="10"/>
<attribute name="operationperiod" label="营业期限(年)" type="STRING" length="10"/>
<attribute name="emailadd" label="公司E-Mail" type="STRING" length="80"/>
<attribute name="webadd" label="公司网址" type="STRING" length="80"/>
<attribute name="listingcorpornot" label="上市公司类型" type="STRING" length="32"/>
<attribute name="inputorgid" label="登记机构" type="STRING" length="32"/>
<attribute name="inputuserid" label="登记人" type="STRING" length="32"/>
<attribute name="updateorgid" label="更新机构" type="STRING" length="32"/>
<attribute name="updateuserid" label="更新人员" type="STRING" length="32"/>
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
<attribute name="updatetime" label="更新时间" type="STRING" length="32"/>
<attribute name="hasieright" label="有无进出口经营权" type="STRING" length="18"/>
<attribute name="financebelong" label="财务报表类型" type="STRING" length="18"/>
<attribute name="workfieldarea" label="经营场地面积" type="STRING" length="30"/>
<attribute name="employeenumber" label="职工人数" type="STRING" length="30"/>
<attribute name="workfieldfee" label="经营场地所有权" type="STRING" length="18"/>
<attribute name="mostbusiness" label="经营范围" type="STRING" length="1000"/>
<attribute name="manageinfo" label="合法经营情况" type="STRING" length="1000"/>
<attribute name="customerhistory" label="历史沿革、管理水平" type="STRING" length="1000"/>
<attribute name="mainproduction" label="主要产品情况" type="STRING" length="1000"/>
<attribute name="remark" label="备注" type="STRING" length="20000"/>
<attribute name="establish_date" label="成立日期" type="STRING" length="100"/>
<attribute name="fax" label="传真" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="customer_company_temp" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="CUSTOMER_INVOICE_TEMP" label="开票信息流程表" keyAttributes="id">
<attributes>
<attribute name="flowunid" label="流程id" type="STRING" length="32"/>
@ -2514,5 +2391,150 @@
</managerProperties>
</manager>
</class>
<class name="CUSTOMER_COMPANY" label="法人基本信息" keyAttributes="id">
<attributes>
<attribute name="id" label="标识" type="STRING" length="32"/>
<attribute name="customerid" label="客户编号" type="STRING" length="40"/>
<attribute name="status" label="状态" type="STRING" length="20"/>
<attribute name="custstatus" label="客户状态" type="STRING" length="32"/>
<attribute name="custtype" label="客户类别" type="STRING" length="32"/>
<attribute name="enterprisename" label="客户名称" type="STRING" length="200"/>
<attribute name="englishname" label="客户英文名" type="STRING" length="80"/>
<attribute name="custsource" label="客户来源" type="STRING" length="32"/>
<attribute name="custkind" label="内部行业" type="STRING" length="32"/>
<attribute name="certtype" label="证件类型" type="STRING" length="20"/>
<attribute name="certid" label="证件号" type="STRING" length="40"/>
<attribute name="countrycode" label="国家" type="STRING" length="18"/>
<attribute name="provincecode" label="省份" type="STRING" length="18"/>
<attribute name="citycode" label="城市" type="STRING" length="18"/>
<attribute name="districtcode" label="区县" type="STRING" length="80"/>
<attribute name="loancardno" label="贷款卡号" type="STRING" length="32"/>
<attribute name="loancardpassword" label="贷款卡密码" type="STRING" length="32"/>
<attribute name="countrytaxno" label="税务登记证号(国税)" type="STRING" length="32"/>
<attribute name="localtaxno" label="税务登记证号(地税)" type="STRING" length="32"/>
<attribute name="supercorpname" label="上级公司名称" type="STRING" length="80"/>
<attribute name="supercertid" label="上级公司组织机构代码" type="STRING" length="32"/>
<attribute name="economytype" label="经济类型" type="STRING" length="18"/>
<attribute name="scope" label="规模" type="STRING" length="18"/>
<attribute name="orgnature" label="机构类型" type="STRING" length="18"/>
<attribute name="orgnaturecategory" label="机构类别细分" type="STRING" length="18"/>
<attribute name="industrytype" label="行业分类" type="STRING" length="18"/>
<attribute name="rccurrency" label="注册资本币种" type="STRING" length="18"/>
<attribute name="registercapital" label="注册资本" type="DOUBLE" length="24" scale="6"/>
<attribute name="pccurrency" label="实收资本币种" type="STRING" length="18"/>
<attribute name="paiclupcapital" label="实收资本" type="DOUBLE" length="24" scale="6"/>
<attribute name="licensematurity" label="营业执照到期日" type="STRING" length="10"/>
<attribute name="operationperiod" label="营业期限(年)" type="STRING" length="10"/>
<attribute name="emailadd" label="公司E-Mail" type="STRING" length="80"/>
<attribute name="webadd" label="公司网址" type="STRING" length="80"/>
<attribute name="listingcorpornot" label="上市公司类型" type="STRING" length="32"/>
<attribute name="inputorgid" label="登记机构" type="STRING" length="32"/>
<attribute name="inputuserid" label="登记人" type="STRING" length="32"/>
<attribute name="updateorgid" label="更新机构" type="STRING" length="32"/>
<attribute name="updateuserid" label="更新人员" type="STRING" length="32"/>
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
<attribute name="updatetime" label="更新时间" type="STRING" length="32"/>
<attribute name="hasieright" label="有无进出口经营权" type="STRING" length="18"/>
<attribute name="financebelong" label="财务报表类型" type="STRING" length="18"/>
<attribute name="workfieldarea" label="经营场地面积" type="STRING" length="30"/>
<attribute name="employeenumber" label="职工人数" type="STRING" length="30"/>
<attribute name="workfieldfee" label="经营场地所有权" type="STRING" length="18"/>
<attribute name="mostbusiness" label="经营范围" type="STRING" length="1000"/>
<attribute name="manageinfo" label="合法经营情况" type="STRING" length="1000"/>
<attribute name="customerhistory" label="历史沿革、管理水平" type="STRING" length="1000"/>
<attribute name="mainproduction" label="主要产品情况" type="STRING" length="1000"/>
<attribute name="remark" label="备注" type="STRING" length="20000"/>
<attribute name="establish_date" label="成立日期" type="STRING" length="100"/>
<attribute name="fax" label="传真" type="STRING" length="32"/>
<attribute name="company_name" label="申请企业名称" type="STRING" length="100"/>
<attribute name="reg_address" label="注册地址" type="STRING" length="100"/>
<attribute name="operat_address" label="实际经营地址" type="STRING" length="100"/>
<attribute name="tel" label="法定代表人联系方式" type="STRING" length="100"/>
<attribute name="wealth_name" label="财务负责人姓名" type="STRING" length="100"/>
<attribute name="wealth_tel" label="财务负责人联系方式" type="STRING" length="100"/>
<attribute name="company_tel" label="公司固定电话" type="STRING" length="100"/>
<attribute name="business_income" label="企业年主营业务收入" type="STRING" length="100"/>
<attribute name="unit_properties" label="单位性质" type="STRING" length="100"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="customer_company" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="CUSTOMER_COMPANY_TEMP" label="法人基本信息临时" keyAttributes="id">
<attributes>
<attribute name="flowunid" label="流程id" type="STRING" length="32"/>
<attribute name="id" label="标识" type="STRING" length="32"/>
<attribute name="customerid" label="客户编号" type="STRING" length="40"/>
<attribute name="status" label="状态" type="STRING" length="20"/>
<attribute name="custstatus" label="客户状态" type="STRING" length="32"/>
<attribute name="custtype" label="客户类别" type="STRING" length="32"/>
<attribute name="enterprisename" label="客户名称" type="STRING" length="200"/>
<attribute name="englishname" label="客户英文名" type="STRING" length="80"/>
<attribute name="custsource" label="客户来源" type="STRING" length="32"/>
<attribute name="custkind" label="内部行业" type="STRING" length="32"/>
<attribute name="certtype" label="证件类型" type="STRING" length="20"/>
<attribute name="certid" label="证件号" type="STRING" length="40"/>
<attribute name="countrycode" label="国家" type="STRING" length="18"/>
<attribute name="provincecode" label="省份" type="STRING" length="18"/>
<attribute name="citycode" label="城市" type="STRING" length="18"/>
<attribute name="districtcode" label="区县" type="STRING" length="80"/>
<attribute name="loancardno" label="贷款卡号" type="STRING" length="32"/>
<attribute name="loancardpassword" label="贷款卡密码" type="STRING" length="32"/>
<attribute name="countrytaxno" label="税务登记证号(国税)" type="STRING" length="32"/>
<attribute name="localtaxno" label="税务登记证号(地税)" type="STRING" length="32"/>
<attribute name="supercorpname" label="上级公司名称" type="STRING" length="80"/>
<attribute name="supercertid" label="上级公司组织机构代码" type="STRING" length="32"/>
<attribute name="economytype" label="经济类型" type="STRING" length="18"/>
<attribute name="scope" label="规模" type="STRING" length="18"/>
<attribute name="orgnature" label="机构类型" type="STRING" length="18"/>
<attribute name="orgnaturecategory" label="机构类别细分" type="STRING" length="18"/>
<attribute name="industrytype" label="行业分类" type="STRING" length="18"/>
<attribute name="rccurrency" label="注册资本币种" type="STRING" length="18"/>
<attribute name="registercapital" label="注册资本" type="DOUBLE" length="24" scale="6"/>
<attribute name="pccurrency" label="实收资本币种" type="STRING" length="18"/>
<attribute name="paiclupcapital" label="实收资本" type="DOUBLE" length="24" scale="6"/>
<attribute name="licensematurity" label="营业执照到期日" type="STRING" length="10"/>
<attribute name="operationperiod" label="营业期限(年)" type="STRING" length="10"/>
<attribute name="emailadd" label="公司E-Mail" type="STRING" length="80"/>
<attribute name="webadd" label="公司网址" type="STRING" length="80"/>
<attribute name="listingcorpornot" label="上市公司类型" type="STRING" length="32"/>
<attribute name="inputorgid" label="登记机构" type="STRING" length="32"/>
<attribute name="inputuserid" label="登记人" type="STRING" length="32"/>
<attribute name="updateorgid" label="更新机构" type="STRING" length="32"/>
<attribute name="updateuserid" label="更新人员" type="STRING" length="32"/>
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
<attribute name="updatetime" label="更新时间" type="STRING" length="32"/>
<attribute name="hasieright" label="有无进出口经营权" type="STRING" length="18"/>
<attribute name="financebelong" label="财务报表类型" type="STRING" length="18"/>
<attribute name="workfieldarea" label="经营场地面积" type="STRING" length="30"/>
<attribute name="employeenumber" label="职工人数" type="STRING" length="30"/>
<attribute name="workfieldfee" label="经营场地所有权" type="STRING" length="18"/>
<attribute name="mostbusiness" label="经营范围" type="STRING" length="1000"/>
<attribute name="manageinfo" label="合法经营情况" type="STRING" length="1000"/>
<attribute name="customerhistory" label="历史沿革、管理水平" type="STRING" length="1000"/>
<attribute name="mainproduction" label="主要产品情况" type="STRING" length="1000"/>
<attribute name="remark" label="备注" type="STRING" length="20000"/>
<attribute name="establish_date" label="成立日期" type="STRING" length="100"/>
<attribute name="fax" label="传真" type="STRING" length="32"/>
<attribute name="company_name" label="申请企业名称" type="STRING" length="100"/>
<attribute name="reg_address" label="注册地址" type="STRING" length="100"/>
<attribute name="operat_address" label="实际经营地址" type="STRING" length="100"/>
<attribute name="tel" label="法定代表人联系方式" type="STRING" length="100"/>
<attribute name="wealth_name" label="财务负责人姓名" type="STRING" length="100"/>
<attribute name="wealth_tel" label="财务负责人联系方式" type="STRING" length="100"/>
<attribute name="company_tel" label="公司固定电话" type="STRING" length="100"/>
<attribute name="business_income" label="企业年主营业务收入" type="STRING" length="100"/>
<attribute name="unit_properties" label="单位性质" type="STRING" length="100"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="customer_company_temp" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>

View File

@ -3284,6 +3284,9 @@
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="contract_no" label="合同编号" type="STRING" length="100"/>
<attribute name="distributor_name" label="经销商名称" type="STRING" length="32"/>
<attribute name="customer_name" label="客户姓名" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>

View File

@ -4,6 +4,8 @@ import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import com.base.constant.RestfullConstant;
import net.sf.json.JSONObject;
@ -24,6 +26,10 @@ public class BusinessBO implements Serializable {
private String certtype; // 证件类型
private String certid; // 证件号码
private String businessType;
private String versionId;
private String modelId;
private String curUserId;
private String fixedFlowParam;
@ -61,6 +67,16 @@ public class BusinessBO implements Serializable {
this.curUserId = fieldMap.get("userid".toLowerCase()) == null ? ""
: fieldMap.get("userid".toLowerCase()).toString(); // 证件号
this.businessType = RestfullConstant.baseProperty
.get("BUSINESS_TYPE") == null ? ""
: RestfullConstant.baseProperty.get("BUSINESS_TYPE").toString(); // 业务类型
this.modelId = fieldMap.get("modelId".toLowerCase()) == null ? ""
: fieldMap.get("modelId".toLowerCase()).toString(); // 汽车类型
this.versionId = fieldMap.get("versionId".toLowerCase()) == null ? ""
: fieldMap.get("versionId".toLowerCase()).toString(); // 产品版本
Map<String, Object> map = new HashMap<String, Object>();
map.put("ProductId", productId);
@ -80,6 +96,10 @@ public class BusinessBO implements Serializable {
map.put("certtype", certtype);
map.put("custname", CUSTOMERNAME);
map.put("modelid", modelId);
map.put("versionid", versionId);
map.put("businessType", businessType);
JSONObject jsonObject = JSONObject.fromObject(map);
this.fixedFlowParam = jsonObject.toString();
}
@ -195,4 +215,28 @@ public class BusinessBO implements Serializable {
public void setCurUserId(String curUserId) {
this.curUserId = curUserId;
}
public String getBusinessType() {
return businessType;
}
public void setBusinessType(String businessType) {
this.businessType = businessType;
}
public String getVersionId() {
return versionId;
}
public void setVersionId(String versionId) {
this.versionId = versionId;
}
public String getModelId() {
return modelId;
}
public void setModelId(String modelId) {
this.modelId = modelId;
}
}

View File

@ -33,42 +33,48 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService
String uid = fieldMap.get("userid") == null ? "" : fieldMap.get(
"userid").toString();
BusinessApprovalStartAction BusinessApprovalStartAction = new BusinessApprovalStartAction();
BusinessApprovalStartAction.setApplyType(applyType);
BusinessApprovalStartAction.setCurUserID(uid);
BusinessApprovalStartAction.setFixedFlowParam(bo.getFixedFlowParam());
// 产品租赁信息
BusinessApprovalStartAction.setBusinessType(bo.getBusinessType());
BusinessApprovalStartAction.setVersionid(bo.getVersionId());
BusinessApprovalStartAction.setProductID(bo.getProductId());
BusinessApprovalStartAction.setProductId(bo.getProductId());
BusinessApprovalStartAction.setLeasehold(bo.getLeasehold());
// 车辆信息
BusinessApprovalStartAction.setModelid(bo.getModelId());
BusinessApprovalStartAction.setCarAttributes(bo.getCarAttributes());
BusinessApprovalStartAction.setProductModel(bo.getProductModel());
BusinessApprovalStartAction.setCarSystem(bo.getCarSystem());
BusinessApprovalStartAction.setCarSeries(bo.getCarSeries());
// 用户信息
BusinessApprovalStartAction.setCertid(bo.getCertid());
BusinessApprovalStartAction.setCerttype(bo.getCerttype());
BusinessApprovalStartAction.setCustname(bo.getCUSTOMERNAME());
BusinessApprovalStartAction.setCustomerType(bo.getCustomerType());
String sReturnInfo = BusinessApprovalStartAction.initFLow(tx);
if (sReturnInfo.startsWith("success")){
//获取当前申请的相关参数包含FlowUnid
Map<String,String> params = BusinessApprovalStartAction.getFlowParam();
//返回前台的数据
Map<String,Object> body = new HashMap<String,Object>();
body.put("flowUnid",params.get("FlowUnid"));
body.put("objectNo",params.get("FlowUnid"));
if (sReturnInfo.startsWith("success")) {
String serialNo = sReturnInfo.split("@")[1];
// 获取当前申请的相关参数包含FlowUnid
Map<String, String> params = BusinessApprovalStartAction
.getFlowParam();
// 返回前台的数据
Map<String, Object> body = new HashMap<String, Object>();
body.put("flowUnid", params.get("FlowUnid"));
body.put("objectNo", params.get("FlowUnid"));
body.put("taskNo", serialNo);
body.put("serialNo", serialNo);
ReturnMapUtil.setReturnMap(body,
RestfullConstant.baseProperty.get("success").toString(),
"发起成功");
}
else
"发起成功");
} else
ReturnMapUtil.setReturnMap(null,
RestfullConstant.baseProperty.get("FAIL").toString(),
"发起失败");

View File

@ -655,8 +655,8 @@ public abstract class AbstractAweDoQueryManage extends AbstractAweDoHandler {
}
String sSql = "SELECT " + sJboQuery + " ";
sSql += "FROM " + sJboFrom + this.sJboWhere + this.sJboOrder + " "
+ this.sJboGroup;
sSql += "FROM " + sJboFrom + this.sJboWhere + this.sJboGroup + " "
+ this.sJboOrder;
logger.debug("sql:" + sSql);
BizObjectManager classManage = JBOFactory
.getBizObjectManager(this.sJboClass);

View File

@ -63,15 +63,11 @@ public class AweDoSaveController {
FlowTask FlowTask = new FlowTask();
BizObject bo = FlowTask.queryFlowTask(request, sqlca, tx, fieldMap);
if (null != bo) {
if (null == bo.getAttribute("SERIALNO")) {
ReturnMapUtil.setReturnMap(null,
RestfullConstant.baseProperty.get("FAIL")
.toString(), "获取流程实例流水号失败!");
return ReturnMapUtil.getReturnMap();
}
String taskNo = fieldMap.get("SERIALNO") == bo
.getAttribute("SERIALNO").getValue().toString() ? ""
String taskNo = fieldMap.get("SERIALNO") == null ? "" : fieldMap
.get("SERIALNO").toString();
if (null != taskNo && null != bo && null == bo.getAttribute("SERIALNO")) {
taskNo = fieldMap.get("SERIALNO").equals(bo
.getAttribute("SERIALNO").getValue().toString()) ? ""
: fieldMap.get("SERIALNO").toString();
fieldMap.put("taskNo", taskNo);
fieldMap.put("taskNo".toLowerCase(), taskNo);

View File

@ -1,22 +1,24 @@
package apx.com.amarsoft.als.base.awe.execute.method;
import jbo.app.tenwa.customer.CUSTOMER_CERT;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
public class BusinessCustomerMethod {
public String getCustomerIdByCertId(String certId) throws JBOException {
BizObjectManager bom = JBOFactory
.getBizObjectManager(CUSTOMER_CERT.CLASS_NAME);
BizObject bo = bom.createQuery("certid=:certid and certtype='Ind01'")
.setParameter("certid", certId).getSingleResult(false);
if (null == bo)
return "";
return bo.getAttribute("customerid").toString();
}
}
package apx.com.amarsoft.als.base.awe.execute.method;
import jbo.app.tenwa.customer.CUSTOMER_CERT;
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.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
public class BusinessCustomerMethod {
public String getCustomerIdByCertId(String certId) throws JBOException {
BizObjectManager bom = JBOFactory
.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME);
BizObject bo = bom.createQuery("certid=:certid and certtype='Ind01'")
.setParameter("certid", certId).getSingleResult(false);
String customerid = bo.getAttribute("customerid").toString();
if (null == bo)
return "";
return bo.getAttribute("customerid").toString();
}
}

View File

@ -1,47 +1,47 @@
//package apx.com.amarsoft.als.business.action.submit.controller;
//
//import java.util.Map;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.ws.rs.POST;
//import javax.ws.rs.Path;
//import javax.ws.rs.core.Context;
//
//import apx.com.amarsoft.als.business.action.submit.service.FlowActionCommitService;
//import apx.com.amarsoft.als.business.action.submit.service.impl.FlowActionCommitServiceImpl;
//
//import com.amarsoft.are.ARE;
//import com.amarsoft.are.jbo.JBOTransaction;
//import com.amarsoft.awe.util.Transaction;
//import com.base.util.ReturnMapUtil;
//
//@Path("/flow/action")
//public class FlowActionCommitController {
// FlowActionCommitService service = new FlowActionCommitServiceImpl();
// /**
// * ͨÓÃÁ÷³ÌÌá½»
// *
// * @param request
// * @param sqlca
// * @param tx
// * @return
// * @throws Exception
// */
// @Path("/commit")
// @POST
// public Map<String, Object> commit(@Context HttpServletRequest request,
// @Context Transaction sqlca, @Context JBOTransaction tx)
// throws Exception {
// ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
// ARE.getLog()
// .info("[CONTROLLER] FlowActionCommitController run .................");
// ARE.getLog().info(
// "[Path] /flow/action/commit" + " run .................");
// try {
//
// return service.commit(request, sqlca, tx, ReturnMapUtil);
// } catch (Exception e) {
// return ReturnMapUtil.rollback(e);
// }
// }
//}
package apx.com.amarsoft.als.business.action.submit.controller;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import apx.com.amarsoft.als.business.action.submit.service.FlowActionCommitService;
import apx.com.amarsoft.als.business.action.submit.service.impl.FlowActionCommitServiceImpl;
import com.amarsoft.are.ARE;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.Transaction;
import com.base.util.ReturnMapUtil;
@Path("/flow/action")
public class FlowActionCommitController {
FlowActionCommitService service = new FlowActionCommitServiceImpl();
/**
* ͨÓÃÁ÷³ÌÌá½»
*
* @param request
* @param sqlca
* @param tx
* @return
* @throws Exception
*/
@Path("/commit")
@POST
public Map<String, Object> commit(@Context HttpServletRequest request,
@Context Transaction sqlca, @Context JBOTransaction tx)
throws Exception {
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
ARE.getLog()
.info("[CONTROLLER] FlowActionCommitController run .................");
ARE.getLog().info(
"[Path] /flow/action/commit" + " run .................");
try {
return service.commit(request, sqlca, tx, ReturnMapUtil);
} catch (Exception e) {
return ReturnMapUtil.rollback(e);
}
}
}

View File

@ -1,16 +1,16 @@
//package apx.com.amarsoft.als.business.action.submit.service;
//
//import java.util.Map;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.ws.rs.core.Context;
//
//import com.amarsoft.are.jbo.JBOTransaction;
//import com.amarsoft.awe.util.Transaction;
//import com.base.util.ReturnMapUtil;
//
//public interface FlowActionCommitService {
// Map<String, Object> commit(@Context HttpServletRequest request,
// @Context Transaction sqlca, @Context JBOTransaction tx,
// ReturnMapUtil ReturnMapUtil) throws Exception;
//}
package apx.com.amarsoft.als.business.action.submit.service;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Context;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.Transaction;
import com.base.util.ReturnMapUtil;
public interface FlowActionCommitService {
Map<String, Object> commit(@Context HttpServletRequest request,
@Context Transaction sqlca, @Context JBOTransaction tx,
ReturnMapUtil ReturnMapUtil) throws Exception;
}

View File

@ -1,255 +1,259 @@
//package apx.com.amarsoft.als.business.action.submit.service.impl;
//
//import java.util.Map;
//
//import javax.servlet.http.HttpServletRequest;
//
//import apx.com.amarsoft.als.base.flow.FlowTask;
//import apx.com.amarsoft.als.business.action.submit.service.FlowActionCommitService;
//
//import com.amarsoft.app.flow.FlowAction;
//import com.amarsoft.are.jbo.BizObject;
//import com.amarsoft.are.jbo.JBOTransaction;
//import com.amarsoft.are.lang.StringX;
//import com.amarsoft.awe.util.Transaction;
//import com.base.constant.RestfullConstant;
//import com.base.util.MultipartDataUtil;
//import com.base.util.ReturnMapUtil;
//
//public class FlowActionCommitServiceImpl implements FlowActionCommitService {
// private Map<String, Object> fieldMap;
//
// private String taskNo; // 流水号
//
// private String message;
// private String phaseOpinion;
// private String phaseAction;
// private String nextPhaseInfo;
// private String isPool;
//
// public Map<String, Object> endMeetingTask(Transaction sqlca,
// JBOTransaction tx, ReturnMapUtil ReturnMapUtil) throws Exception {
// FlowAction FlowAction = new FlowAction();
// FlowAction.setTaskNo(taskNo);
// FlowAction.endMeetingTask(tx);
// ReturnMapUtil.setReturnMap(null,
// RestfullConstant.baseProperty.get("SUCCESS").toString(), "");
// return ReturnMapUtil.getReturnMap();
// }
//
// public Map<String, Object> AssignedTaskNo(Transaction sqlca,
// JBOTransaction tx, ReturnMapUtil ReturnMapUtil) throws Exception {
// FlowAction FlowAction = new FlowAction();
// FlowAction.setTaskNo(taskNo);
// FlowAction.setPhaseOpinion("null");
// FlowAction.setPhaseAction("null");
// FlowAction.submit(tx);
// String returnValue = FlowAction.submit(tx);
//
// if (StringX.isSpace(returnValue) || "undefined".equals(returnValue)
// || "null".equals(returnValue) || "_CANCEL_".equals(returnValue)) {
// ReturnMapUtil.setReturnMap(null,
// RestfullConstant.baseProperty.get("SUCCESS").toString(),
// returnValue);
// return ReturnMapUtil.getReturnMap();
// } else if ("Success".toLowerCase().equals(returnValue.toLowerCase())) {
// ReturnMapUtil.setReturnMap(null,
// RestfullConstant.baseProperty.get("SUCCESS").toString(),
// returnValue);
// } else {
// ReturnMapUtil.setReturnMap(null,
// RestfullConstant.baseProperty.get("SUCCESS").toString(),
// returnValue);
// }
// return ReturnMapUtil.getReturnMap();
// }
//
// @SuppressWarnings("unchecked")
// @Override
// public Map<String, Object> commit(HttpServletRequest request,
// Transaction sqlca, JBOTransaction tx, ReturnMapUtil ReturnMapUtil)
// throws Exception {
//
// Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
// .readRequestParam(request, "UTF-8");
// this.fieldMap = (Map<String, Object>) testMap.get("fieldMap");
//
// String type = this.fieldMap.get("submittype") == null ? ""
// : this.fieldMap.get("submittype").toString();
//
// FlowTask FlowTask = new FlowTask();
// BizObject bo = FlowTask
// .queryFlowTask(request, sqlca, tx, this.fieldMap);
// if (null != bo) {
// this.taskNo = bo.getAttribute("SERIALNO") == null ? "" : bo
// .getAttribute("SERIALNO").toString();
// } else {
// ReturnMapUtil.setReturnMap(null,
// (String) RestfullConstant.baseProperty.get("FAIL"),
// "请选择一条有效流程!");
// return ReturnMapUtil.getReturnMap();
// }
// String endTime = bo.getAttribute("ENDTIME") == null ? "" : bo.getAttribute("ENDTIME").toString();
// if (!"".equals(endTime)) {
// message = "此流程任务已提交!";
// ReturnMapUtil.setReturnMap(null,
// RestfullConstant.baseProperty.get("FAIL").toString(),
// message);
// return ReturnMapUtil.getReturnMap();
// }
//
// switch (type) {
// case "1":
// return AssignedTaskNo(sqlca, tx, ReturnMapUtil);
// case "2":
// return endMeetingTask(sqlca, tx, ReturnMapUtil);
// }
//
// FlowAction FlowAction = new FlowAction();
// FlowAction.setTaskNo(this.taskNo);
// String isCommited = FlowAction.isCommited(tx);
//
// if ("yes".equals(isCommited)) {
// message = "此流程任务已提交!";
// } else {
// this.phaseOpinion = this.fieldMap.get("phaseopinion") == null ? ""
// : this.fieldMap.get("phaseopinion").toString();
//
// this.phaseAction = this.fieldMap.get("phaseaction") == null ? ""
// : this.fieldMap.get("phaseaction").toString();
// this.nextPhaseInfo = this.fieldMap.get("bodymessage") == null ? ""
// : this.fieldMap.get("bodymessage").toString();
// if (StringX.isSpace(phaseOpinion)) {
// message = "请选择提交动作!";
// } else {
// FlowAction.setPhaseOpinion(phaseOpinion);
// String nextPhaseAttrs = FlowAction.getNextPhaseAttr(tx);
//
// String[] nextPhases = nextPhaseAttrs.split("@");
//
// String phaseAction = "";
//
// phaseAction = getNextActionValue(nextPhases, FlowAction, tx);
// if (StringX.isSpace(phaseAction)) {
// message = "请选择提交用户信息!";
// } else {
// FlowAction.setPhaseAction(phaseAction);
// String joinNode = FlowAction.isJoinNode(tx);
//
// if ("1".equals(joinNode)) {// 如果是join节点
// String joinUserID = FlowAction.getJoinUser(tx);
// String curUserID = phaseAction.split(" ")[0];
// if ((!curUserID.equals(joinUserID) && (!""
// .equals(joinUserID)))) {
// message = "先前分支的提交人为" + joinUserID + ",请选择相同人员!";
// }
// }
// String commitPeopleTip = "";
// boolean bPool = Boolean.valueOf(isPool);
// if (bPool) {// 如果下一阶段是任务池则提示 可以挑选任务的用户
// String[] arr = phaseAction.split("@");
//
// for (int i = 0; i < arr.length; i++) {
// String userID = arr[i].split(" ")[0];
// if (userID.indexOf("|") > -1) {// 并行任务
// String[] phaseUser = userID.split("|");
// userID = "阶段:" + phaseUser[0] + "-用户:"
// + phaseUser[1];
// }
// commitPeopleTip = commitPeopleTip + userID + " ";
// }
// }
// String readUserIds = "";
//
// FlowAction.setTaskNo(this.taskNo);
// FlowAction.setPhaseOpinion(this.phaseOpinion);
// FlowAction.setPhaseAction(this.phaseAction);
// FlowAction.setNextPhaseInfo(nextPhaseInfo);
// FlowAction.setReadUserIds(readUserIds);
// FlowAction.setUserID(request.getSession()
// .getAttribute("userid").toString());
// String returnValue = FlowAction.submit(tx);
//
// if (StringX.isSpace(returnValue)
// || "undefined".equals(returnValue)
// || "null".equals(returnValue)
// || "_CANCEL_".equals(returnValue)) {
// ReturnMapUtil.setReturnMap(null,
// RestfullConstant.baseProperty.get("SUCCESS")
// .toString(), "");
// return ReturnMapUtil.getReturnMap();
// } else if ("Success".toLowerCase().equals(
// returnValue.toLowerCase())) {
// ReturnMapUtil.setReturnMap(null,
// RestfullConstant.baseProperty.get("SUCCESS")
// .toString(), "");
// return ReturnMapUtil.getReturnMap();
// } else {
// ReturnMapUtil.setReturnMap(null,
// RestfullConstant.baseProperty.get("FAIL")
// .toString(), "提交失败!");
// return ReturnMapUtil.getReturnMap();
// }
// }
// }
//
// }
//
// if (!StringX.isSpace(message)) {
// ReturnMapUtil.setReturnMap(null,
// RestfullConstant.baseProperty.get("FAIL").toString(),
// message);
// }
// return ReturnMapUtil.getReturnMap();
// }
//
// public String getNextActionValue(String[] nextPhases,
// FlowAction FlowAction, JBOTransaction tx) throws Exception {
// String phaseAction = "";
// if (nextPhases.length == 1) {
// String nextPhaseDes = "";
// nextPhaseDes = nextPhases[0].split(",")[2];
// if ("POOL".equals(nextPhaseDes) || "FORK&POOL".equals(nextPhaseDes)) {
// phaseAction = FlowAction.getActionList(tx);
// } else if ("END".equals(nextPhaseDes)) {
// phaseAction = "system";
// } else {
// phaseAction = this.phaseAction;
// }
// } else {
// String actionList = FlowAction.getActionList(tx);
// for (int i = 0; i < nextPhases.length; i++) {
// String mPhaseName = nextPhases[i].split(",")[1];
// String mPhaseNo = nextPhases[i].split(",")[0];
// String mPhaseDes = nextPhases[i].split(",")[2];
// String mPhaseAction = "";
// if ("POOL".equals(mPhaseDes) || "FORK&POOL".equals(mPhaseDes)) {
// for (int j = 0; j < actionList.split("@").length; j++) {
// String userIDStr = actionList.split("@")[j];
// String userID = userIDStr.split(" ")[0];
// if (userID.indexOf("|") > -1) {
// String phaseNo = userID.split("|")[0];
// if (mPhaseNo.equals(phaseNo)) {
// mPhaseAction = mPhaseAction + "@" + userIDStr;
// }
// }
// }
// if (mPhaseAction.indexOf("@") > -1)
// mPhaseAction = mPhaseAction.substring(1);
// phaseAction += "@" + mPhaseAction;
// } else {
// mPhaseAction = this.phaseAction;
// phaseAction += "@" + mPhaseNo + "|" + mPhaseAction;
// }
//
// if (StringX.isSpace(mPhaseAction)) {
// message = "请选择" + mPhaseName + "用户!";
// }
// }
// if (phaseAction.indexOf("@") > -1)
// phaseAction = phaseAction.substring(1);
//
// }
// return phaseAction;
// }
//}
package apx.com.amarsoft.als.business.action.submit.service.impl;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import apx.com.amarsoft.als.base.flow.FlowTask;
import apx.com.amarsoft.als.business.action.submit.service.FlowActionCommitService;
import com.amarsoft.app.flow.FlowAction;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.lang.StringX;
import com.amarsoft.awe.util.Transaction;
import com.base.constant.RestfullConstant;
import com.base.util.MultipartDataUtil;
import com.base.util.ReturnMapUtil;
public class FlowActionCommitServiceImpl implements FlowActionCommitService {
private Map<String, Object> fieldMap;
private String taskNo; // 流水号
private String message;
private String phaseOpinion;
private String phaseAction;
private String nodeType;
private String isPool;
public Map<String, Object> endMeetingTask(Transaction sqlca,
JBOTransaction tx, ReturnMapUtil ReturnMapUtil) throws Exception {
FlowAction FlowAction = new FlowAction();
FlowAction.setTaskNo(taskNo);
FlowAction.endMeetingTask(tx);
ReturnMapUtil.setReturnMap(null,
RestfullConstant.baseProperty.get("SUCCESS").toString(), "");
return ReturnMapUtil.getReturnMap();
}
public Map<String, Object> AssignedTaskNo(Transaction sqlca,
JBOTransaction tx, ReturnMapUtil ReturnMapUtil) throws Exception {
FlowAction FlowAction = new FlowAction();
FlowAction.setTaskNo(taskNo);
FlowAction.setPhaseOpinion("null");
FlowAction.setPhaseAction("null");
FlowAction.submit(tx);
String returnValue = FlowAction.submit(tx);
if (StringX.isSpace(returnValue) || "undefined".equals(returnValue)
|| "null".equals(returnValue) || "_CANCEL_".equals(returnValue)) {
ReturnMapUtil.setReturnMap(null,
RestfullConstant.baseProperty.get("SUCCESS").toString(),
returnValue);
return ReturnMapUtil.getReturnMap();
} else if ("Success".toLowerCase().equals(returnValue.toLowerCase())) {
ReturnMapUtil.setReturnMap(null,
RestfullConstant.baseProperty.get("SUCCESS").toString(),
returnValue);
} else {
ReturnMapUtil.setReturnMap(null,
RestfullConstant.baseProperty.get("SUCCESS").toString(),
returnValue);
}
return ReturnMapUtil.getReturnMap();
}
@SuppressWarnings("unchecked")
@Override
public Map<String, Object> commit(HttpServletRequest request,
Transaction sqlca, JBOTransaction tx, ReturnMapUtil ReturnMapUtil)
throws Exception {
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
.readRequestParam(request, "UTF-8");
this.fieldMap = (Map<String, Object>) testMap.get("fieldMap");
String type = this.fieldMap.get("submittype") == null ? ""
: this.fieldMap.get("submittype").toString();
FlowTask FlowTask = new FlowTask();
BizObject bo = FlowTask
.queryFlowTask(request, sqlca, tx, this.fieldMap);
if (null != bo) {
this.taskNo = bo.getAttribute("SERIALNO") == null ? "" : bo
.getAttribute("SERIALNO").toString();
} else {
ReturnMapUtil.setReturnMap(null,
(String) RestfullConstant.baseProperty.get("FAIL"),
"请选择一条有效流程!");
return ReturnMapUtil.getReturnMap();
}
String endTime = bo.getAttribute("ENDTIME") == null ? "" : bo
.getAttribute("ENDTIME").toString();
if (!"".equals(endTime)) {
message = "此流程任务已提交!";
ReturnMapUtil.setReturnMap(null,
RestfullConstant.baseProperty.get("FAIL").toString(),
message);
return ReturnMapUtil.getReturnMap();
}
switch (type) {
case "1":
return AssignedTaskNo(sqlca, tx, ReturnMapUtil);
case "2":
return endMeetingTask(sqlca, tx, ReturnMapUtil);
}
FlowAction FlowAction = new FlowAction();
FlowAction.setTaskNo(this.taskNo);
String isCommited = FlowAction.isCommited(tx);
if ("yes".equals(isCommited)) {
message = "此流程任务已提交!";
} else {
this.phaseOpinion = this.fieldMap.get("phaseopinion") == null ? ""
: this.fieldMap.get("phaseopinion").toString();
this.phaseAction = this.fieldMap.get("phaseaction") == null ? ""
: this.fieldMap.get("phaseaction").toString();
this.nodeType = this.fieldMap.get("nodetype") == null ? ""
: this.fieldMap.get("nodetype").toString();
if (StringX.isSpace(phaseOpinion)) {
message = "请选择提交动作!";
} else {
FlowAction.setPhaseOpinion(phaseOpinion);
String nextPhaseAttrs = FlowAction.getNextPhaseAttr(tx);
String[] nextPhases = nextPhaseAttrs.split("@");
String phaseAction = "";
phaseAction = getNextActionValue(nextPhases, FlowAction, tx);
if (StringX.isSpace(phaseAction)) {
message = "请选择提交用户信息!";
} else {
FlowAction.setPhaseAction(phaseAction);
String joinNode = FlowAction.isJoinNode(tx);
if ("1".equals(joinNode)) {// 如果是join节点
String joinUserID = FlowAction.getJoinUser(tx);
String curUserID = phaseAction.split(" ")[0];
if ((!curUserID.equals(joinUserID) && (!""
.equals(joinUserID)))) {
message = "先前分支的提交人为" + joinUserID + ",请选择相同人员!";
}
}
String commitPeopleTip = "";
boolean bPool = Boolean.valueOf(isPool);
if (bPool) {// 如果下一阶段是任务池则提示 可以挑选任务的用户
String[] arr = phaseAction.split("@");
for (int i = 0; i < arr.length; i++) {
String userID = arr[i].split(" ")[0];
if (userID.indexOf("|") > -1) {// 并行任务
String[] phaseUser = userID.split("|");
userID = "阶段:" + phaseUser[0] + "-用户:"
+ phaseUser[1];
}
commitPeopleTip = commitPeopleTip + userID + " ";
}
}
String readUserIds = "";
FlowAction.setTaskNo(this.taskNo);
FlowAction.setPhaseOpinion(this.phaseOpinion);
FlowAction.setPhaseAction(this.phaseAction);
FlowAction.setReadUserIds(readUserIds);
FlowAction.setUserID(request.getSession()
.getAttribute("userid").toString());
FlowAction.setNextNodeType(this.nodeType);
String returnValue = FlowAction.submit(tx);
if (StringX.isSpace(returnValue)
|| "undefined".equals(returnValue)
|| "null".equals(returnValue)
|| "_CANCEL_".equals(returnValue)) {
ReturnMapUtil.setReturnMap(null,
RestfullConstant.baseProperty.get("SUCCESS")
.toString(), "");
return ReturnMapUtil.getReturnMap();
} else if ("Success".toLowerCase().equals(
returnValue.toLowerCase())) {
ReturnMapUtil.setReturnMap(null,
RestfullConstant.baseProperty.get("SUCCESS")
.toString(), "");
return ReturnMapUtil.getReturnMap();
} else {
ReturnMapUtil.setReturnMap(null,
RestfullConstant.baseProperty.get("FAIL")
.toString(), "提交失败!");
return ReturnMapUtil.getReturnMap();
}
}
}
}
if (!StringX.isSpace(message)) {
ReturnMapUtil.setReturnMap(null,
RestfullConstant.baseProperty.get("FAIL").toString(),
message);
}
return ReturnMapUtil.getReturnMap();
}
public String getNextActionValue(String[] nextPhases,
FlowAction FlowAction, JBOTransaction tx) throws Exception {
String phaseAction = "";
if (nextPhases.length == 1) {
String nextPhaseDes = "";
nextPhaseDes = nextPhases[0].split(",")[2];
if ("POOL".equals(nextPhaseDes) || "FORK&POOL".equals(nextPhaseDes)) {
phaseAction = FlowAction.getActionList(tx);
} else if ("END".equals(nextPhaseDes)) {
phaseAction = "system";
} else {
phaseAction = this.phaseAction;
}
} else {
String actionList = FlowAction.getActionList(tx);
for (int i = 0; i < nextPhases.length; i++) {
String mPhaseName = nextPhases[i].split(",")[1];
String mPhaseNo = nextPhases[i].split(",")[0];
String mPhaseDes = nextPhases[i].split(",")[2];
String mPhaseAction = "";
if ("POOL".equals(mPhaseDes) || "FORK&POOL".equals(mPhaseDes)) {
for (int j = 0; j < actionList.split("@").length; j++) {
String userIDStr = actionList.split("@")[j];
String userID = userIDStr.split(" ")[0];
if (userID.indexOf("|") > -1) {
String phaseNo = userID.split("|")[0];
if (mPhaseNo.equals(phaseNo)) {
mPhaseAction = mPhaseAction + "@" + userIDStr;
}
}
}
if (mPhaseAction.indexOf("@") > -1)
mPhaseAction = mPhaseAction.substring(1);
phaseAction += "@" + mPhaseAction;
} else {
mPhaseAction = this.phaseAction;
phaseAction += "@" + mPhaseNo + "|" + mPhaseAction;
}
if (StringX.isSpace(mPhaseAction)) {
message = "请选择" + mPhaseName + "用户!";
}
}
if (phaseAction.indexOf("@") > -1)
phaseAction = phaseAction.substring(1);
}
return phaseAction;
}
}

View File

@ -30,7 +30,24 @@ public class SelectProductAttributeController {
ARE.getLog().info("[Path] /select/business/type run .................");
try {
return service
.selectBusinessType(request, sqlca, tx, ReturnMapUtil);
.selectBusinessTypeVersion(request, sqlca, tx, ReturnMapUtil);
} catch (Exception e) {
return ReturnMapUtil.rollback(e);
}
}
@Path("/business/type/version")
@POST
public Map<String, Object> selectBusinessTypeVersion(
@Context HttpServletRequest request, @Context Transaction sqlca,
@Context JBOTransaction tx) throws Exception {
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
ARE.getLog()
.info("[CONTROLLER] SelectProductAttributeController run .................");
ARE.getLog().info("[Path] /select/business/type/version run .................");
try {
return service
.selectBusinessTypeVersion(request, sqlca, tx, ReturnMapUtil);
} catch (Exception e) {
return ReturnMapUtil.rollback(e);
}

View File

@ -13,4 +13,9 @@ public interface SelectProductAttributeService {
Map<String, Object> selectBusinessType(@Context HttpServletRequest request,
@Context Transaction sqlca, @Context JBOTransaction tx,
ReturnMapUtil ReturnMapUtil) throws Exception;
Map<String, Object> selectBusinessTypeVersion(
@Context HttpServletRequest request, @Context Transaction sqlca,
@Context JBOTransaction tx, ReturnMapUtil ReturnMapUtil)
throws Exception;
}

View File

@ -8,6 +8,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import jbo.app.BUSINESS_TYPE;
import apx.com.amarsoft.als.base.awe.select.SelectCatalogWin;
import apx.com.amarsoft.als.currency.select.apzl.product.service.SelectProductAttributeService;
import com.amarsoft.are.jbo.BizObject;
@ -15,6 +16,7 @@ import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.context.ASUser;
import com.base.constant.RestfullConstant;
import com.base.util.MultipartDataUtil;
import com.base.util.ReturnMapUtil;
@ -185,10 +187,10 @@ public class SelectProductAttributeServiceImpl implements
ListLibrary.add(mapLibrary2);
ListLibrary.add(mapLibrary3);
// ×ÖÎÈë¼Ç¼ ¼Ç¼Ìí¼Ó¼¯ºÏ
row.put("row", ListLibrary);
rows.add(row);
}
// ×ÖśÎČëźÇÂź źÇÂźĚíźÓźŻşĎ
row.put("row", ListLibrary);
rows.add(row);
// map.put("product", rows);
// ListCatalog2.add(map);
@ -207,4 +209,20 @@ public class SelectProductAttributeServiceImpl implements
RestfullConstant.baseProperty.get("SUCCESS").toString(), "");
return ReturnMapUtil.getReturnMap();
}
@Override
public Map<String, Object> selectBusinessTypeVersion(
HttpServletRequest request, Transaction sqlca, JBOTransaction tx,
ReturnMapUtil ReturnMapUtil) throws Exception {
String sSelName = "selectProductVersionInfo";
SelectCatalogWin select = new SelectCatalogWin(sSelName, tx, sqlca,
request);
ASUser curUser = new ASUser((String) request.getSession().getAttribute(
"userid"), sqlca);
select.setParam("orgId", curUser.getOrgID());
Map<String, Object> body = select.execute(tx, sqlca, request);
ReturnMapUtil.setReturnMap(body,
(String) RestfullConstant.baseProperty.get("SUCCESS"), "");
return ReturnMapUtil.getReturnMap();
}
}

View File

@ -1,239 +1,251 @@
package com.base.constant;
import java.io.FileInputStream;
import java.net.URL;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import com.amarsoft.are.ARE;
import com.amarsoft.awe.Configure;
public class RestfullConstant {
/**
* KEY OF SESSION ================== parameter ============================
* PROPERTY_KEY_USER_ID. 用户ID PROPERTY_KEY_TOKEN. 访问令牌 PROPERTY_KEY_DEV_ID.
* 手机设备ID PROPERTY_KEY_DEV_OS. 手机设备类型 EY_EXPIRE. 到期时间 PROPERTY_KEY_WEB_API.
* 接口服务是否开启 . PROPERTY_KEY_REQ_URI. 请求访问路径.
*/
public static final String PROPERTY_KEY_USER_ID = "base.session.check.user.id";
public static final String PROPERTY_KEY_TOKEN = "base.session.check.token";
public static final String PROPERTY_KEY_DEV_ID = "base.session.check.dev.id";
public static final String PROPERTY_KEY_DEV_OS = "base.session.check.dev.os";
public static final String PROPERTY_KEY_EXPIRE = "base.session.check.expire";
public static final String PROPERTY_KEY_WEB_API = "base.session.web.api.page";
public static final String PROPERTY_KEY_REQ_URI = "base.session.req.uri";
/**
* KEY OF BASE ================== parameter ============================
* PROPERTY_KEY_TOKEN_HOLD_TIME. 令牌有效期 5分钟 PROPERTY_KEY_ENDCODING. 编码
* encoding PROPERTY_KEY_NO_FILETER. 免过滤请求路径 PROPERTY_KEY_DATA_ENCODING.
* 编码格式 GBK PROPERTY_KEY_FORCE_ENCODING. 返回编码设置 TRUE GBK FALSE 不设置
* PROPERTY_KEY_DATA_SOURCE. 数据来源 als PROPERTY_KEY_SERVICE_RETURN_TYPE_VOID.
* 接口返回类型 void. PROPERTY_KEY_SERVICE_RETURN_TYPE_APPATT. 接口返回类型 APP附件.
*
* PROPERTY_KEY_CODE_500. 异常返回 CODE PROPERTY_KEY_MSG_500. 异常返回信息
* PROPERTY_KEY_CODE_404. 接口不存在CODE PROPERTY_KEY_CODE_406. 令牌失效 CODE
* PROPERTY_KEY_MSG_406. 令牌失效信息 PROPERTY_KEY_RESULT_SUCCESS_CODE. 返回成功 CODE
* PROPERTY_KEY_RESULT_FAIL_CODE. 返回失败CODE
*
* 推送功能 配置 小米jar PROPERTY_KEY_PUSH_ENABLE. 推送是否开启
* PROPERTY_KEY_PUSH_SECRET_IOS. IOS推送秘钥 PROPERTY_KEY_PUSH_SECRET_ANDROID.
* 安卓推送秘钥 PROPERTY_KEY_PAGE_NAME. 包名 FAIL_SAVE. 保存失败 FAIL_EDIT. 编辑失败
* FAIL_DELETE. 删除失败 FAIL_INIT_DISPLAY. 加载页面失败 SUCCESS_SAVE.保存成功
* SUCCESS_EDIT.编辑成功 SUCCESS_DELETE. 删除成功 SUCCESS_INIT_DISPLAY.加载页面成功
* DES_SECRET_KEY_ONE. 加密参数1 DES_SECRET_KEY_TWO. 加密参数2 DES_SECRET_KEY_THREE.
* 加密参数3
*/
public static final String PROPERTY_KEY_TOKEN_HOLD_TIME = "base.param.key.hold.time";
public static final String PROPERTY_KEY_ENCODING = "base.param.key.encoding";
public static final String PROPERTY_KEY_NO_FILETER = "base.param.key.no.check.uri";
public final static String PROPERTY_KEY_DATA_ENCODING = "base.data.encoding";
public final static String PROPERTY_KEY_FORCE_ENCODING = "base.data.fource.encoding";
public final static String PROPERTY_KEY_DATA_SOURCE = "base.data.source";
public final static String PROPERTY_KEY_SERVICE_RETURN_TYPE_VOID = "base.return.type.void";
public final static String PROPERTY_KEY_SERVICE_RETURN_TYPE_APPATT = "base.return.type.app.att";
public final static String PROPERTY_KEY_CODE_500 = "base.return.code.500";
public final static String PROPERTY_KEY_MSG_500 = "base.return.msg.500";
public final static String PROPERTY_KEY_CODE_404 = "base.return.code.404";
public final static String PROPERTY_KEY_CODE_406 = "base.return.code.406";
public final static String PROPERTY_KEY_MSG_406 = "base.return.msg.406";
public final static String PROPERTY_KEY_RESULT_SUCCESS_CODE = "base.return.result.success.code";
public final static String PROPERTY_KEY_RESULT_FAIL_CODE = "base.return.result.fail.code";
public final static String PROPERTY_KEY_PUSH_ENABLE = "push.message.switch";
public final static String PROPERTY_KEY_PUSH_SECRET_IOS = "push.message.secret.key.ios";
public final static String PROPERTY_KEY_PUSH_SECRET_ANDROID = "push.message.secret.key.android";
public final static String PROPERTY_KEY_PACKAGE_NAME = "push.message.package.name";
public static final String FAIL_SAVE = "base.return.msg.save.fail";
public static final String FAIL_EDIT = "base.return.msg.edit.fail";
public static final String FAIL_DELETE = "base.return.msg.del.fail";
public static final String FAIL_INIT_DISPLAY = "base.return.msg.init.display.fail";
public static final String SUCCESS_SAVE = "base.return.msg.save.success";
public static final String SUCCESS_EDIT = "base.return.msg.edit.success";
public static final String SUCCESS_DELETE = "base.return.msg.del.success";
public static final String SUCCESS_INIT_DISPLAY = "base.return.msg.init.display.success";
public static final String DES_SECRET_KEY_ONE = "base.pwd.encryption.des.one";
public static final String DES_SECRET_KEY_TWO = "base.pwd.encryption.des.two";
public static final String DES_SECRET_KEY_THREE = "base.pwd.encryption.des.three";
public static final String CUSTOMER_TYPE_COMPANY = "base.customer.type.company";
public static final String CUSTOMER_TYPE_PERSON = "base.customer.type.person";
public static final String FILTER_USER_ROLE_ID = "base.filter.user.role.id";
/**
* APP SESSION 配置
*/
public static Map<String, Object> sessionProperty;
/**
* APP 基本配置
*/
public static Map<String, Object> baseProperty;
private static void setMap(Map<String, Object> objMap, String sKey,
String sValue) {
ARE.getLog().debug("Map >> key :" + sKey + ", value :" + sValue);
objMap.put(sKey.toLowerCase(), sValue);
objMap.put(sKey.toUpperCase(), sValue);
}
private static void loadBaseKey(Properties pro) {
baseProperty = new HashMap<String, Object>();
// base 令牌有效期
setMap(baseProperty, "TOKENHOLDTIME",
pro.getProperty(PROPERTY_KEY_TOKEN_HOLD_TIME));
// base : 编码
setMap(baseProperty, "ENCODING", pro.getProperty(PROPERTY_KEY_ENCODING));
// base : 免过滤地址
setMap(baseProperty, "NOFILETER",
pro.getProperty(PROPERTY_KEY_NO_FILETER));
// base : GBK
setMap(baseProperty, "DATAENCODING",
pro.getProperty(PROPERTY_KEY_DATA_ENCODING));
// base : response return value encoding enable true
// [setcharencoding=GBK] false [setcharencoding=default]
setMap(baseProperty, "FORCEENCODING",
pro.getProperty(PROPERTY_KEY_FORCE_ENCODING));
// base : transaction & JBOTransaction source = [als]
setMap(baseProperty, "DATASOURCE",
pro.getProperty(PROPERTY_KEY_DATA_SOURCE));
// base : response return type
setMap(baseProperty, "VOID",
pro.getProperty(PROPERTY_KEY_SERVICE_RETURN_TYPE_VOID));
setMap(baseProperty, "APPATT",
pro.getProperty(PROPERTY_KEY_SERVICE_RETURN_TYPE_APPATT));
// base : code & massage
setMap(baseProperty, "CODE500", pro.getProperty(PROPERTY_KEY_CODE_500));
setMap(baseProperty, "MSG500", pro.getProperty(PROPERTY_KEY_MSG_500));
setMap(baseProperty, "CODE404", pro.getProperty(PROPERTY_KEY_CODE_404));
setMap(baseProperty, "CODE406", pro.getProperty(PROPERTY_KEY_CODE_406));
setMap(baseProperty, "MSG406", pro.getProperty(PROPERTY_KEY_MSG_406));
setMap(baseProperty, "FAIL_SAVE", pro.getProperty(FAIL_SAVE));
setMap(baseProperty, "FAIL_EDIT", pro.getProperty(FAIL_EDIT));
setMap(baseProperty, "FAIL_DELETE", pro.getProperty(FAIL_DELETE));
setMap(baseProperty, "FAIL_INIT_DISPLAY",
pro.getProperty(FAIL_INIT_DISPLAY));
setMap(baseProperty, "SUCCESS_SAVE", pro.getProperty(SUCCESS_SAVE));
setMap(baseProperty, "SUCCESS_EDIT", pro.getProperty(SUCCESS_EDIT));
setMap(baseProperty, "SUCCESS_DELETE", pro.getProperty(SUCCESS_DELETE));
setMap(baseProperty, "SUCCESS_INIT_DISPLAY",
pro.getProperty(SUCCESS_INIT_DISPLAY));
setMap(baseProperty, "FILTER_USER_ROLE_ID",
pro.getProperty(FILTER_USER_ROLE_ID));
// base : result code
setMap(baseProperty, "SUCCESS",
pro.getProperty(PROPERTY_KEY_RESULT_SUCCESS_CODE));
setMap(baseProperty, "FAIL",
pro.getProperty(PROPERTY_KEY_RESULT_FAIL_CODE));
// base : application push massage config
setMap(baseProperty, "PUSHENABLE",
pro.getProperty(PROPERTY_KEY_PUSH_ENABLE));
setMap(baseProperty, "SECRETIOS",
pro.getProperty(PROPERTY_KEY_PUSH_SECRET_IOS));
setMap(baseProperty, "SECRETANDROID",
pro.getProperty(PROPERTY_KEY_PUSH_SECRET_ANDROID));
setMap(baseProperty, "PACKAGENAME",
pro.getProperty(PROPERTY_KEY_PACKAGE_NAME));
// DES
setMap(baseProperty, "DES_SECRET_KEY_ONE",
pro.getProperty(DES_SECRET_KEY_ONE));
setMap(baseProperty, "DES_SECRET_KEY_TWO",
pro.getProperty(DES_SECRET_KEY_TWO));
setMap(baseProperty, "DES_SECRET_KEY_THREE",
pro.getProperty(DES_SECRET_KEY_THREE));
// CUSTOMER TYPE 01
setMap(baseProperty, "CUSTOMER_TYPE_COMPANY",
pro.getProperty(CUSTOMER_TYPE_COMPANY));
// CUSTOMER TYPE 03
setMap(baseProperty, "CUSTOMER_TYPE_PERSON",
pro.getProperty(CUSTOMER_TYPE_PERSON));
}
private static void loadSessionKey(Properties pro) {
sessionProperty = new HashMap<String, Object>();
setMap(sessionProperty, "USERID", pro.getProperty(PROPERTY_KEY_USER_ID));
setMap(sessionProperty, "TOKEN", pro.getProperty(PROPERTY_KEY_TOKEN));
setMap(sessionProperty, "DEVID", pro.getProperty(PROPERTY_KEY_DEV_ID));
setMap(sessionProperty, "DEVOS", pro.getProperty(PROPERTY_KEY_DEV_OS));
setMap(sessionProperty, "EXPIRE", pro.getProperty(PROPERTY_KEY_EXPIRE));
setMap(sessionProperty, "WEBAPI", pro.getProperty(PROPERTY_KEY_WEB_API));
setMap(sessionProperty, "REQURI", pro.getProperty(PROPERTY_KEY_REQ_URI));
}
public static void initProperties() throws Exception {
ARE.getLog().debug("开启加载APP_CONFIG.PROPERTIES ");
@SuppressWarnings("deprecation")
Configure CurConfig = Configure.getInstance();
try {
// String path =
// request.getSession().getServletContext().getRealPath("/");
// String proRootPath = directory.getCanonicalPath();
URL url = RestfullConstant.class.getResource("/");
String sClassPath = url.getPath();
sClassPath = sClassPath.startsWith("/") ? sClassPath.substring(1,
sClassPath.indexOf("/WEB-INF") + 8) : sClassPath;
String fileName = sClassPath
+ CurConfig.getConfigure("AppConfigPath");
//String fileName = CurConfig.getConfigure("AppConfigPath");
ARE.getLog().debug("文件全路径:" + fileName);
Properties pro = new Properties();
FileInputStream in = new FileInputStream(fileName);
pro.load(in);
Iterator<String> it = pro.stringPropertyNames().iterator();
while (it.hasNext()) {
String sKey = it.next();
ARE.getLog().debug(
"key:" + sKey + " property:" + pro.getProperty(sKey));
}
loadSessionKey(pro);
loadBaseKey(pro);
in.close();
} catch (Exception e) {
ARE.getLog().error(e);
throw new Exception("加载APP配置文件失败" + e);
}
}
}
package com.base.constant;
import java.io.FileInputStream;
import java.net.URL;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import com.amarsoft.are.ARE;
import com.amarsoft.awe.Configure;
public class RestfullConstant {
/**
* KEY OF SESSION ================== parameter ============================
* PROPERTY_KEY_USER_ID. 用户ID PROPERTY_KEY_TOKEN. 访问令牌 PROPERTY_KEY_DEV_ID.
* 手机设备ID PROPERTY_KEY_DEV_OS. 手机设备类型 EY_EXPIRE. 到期时间 PROPERTY_KEY_WEB_API.
* 接口服务是否开启 . PROPERTY_KEY_REQ_URI. 请求访问路径.
*/
public static final String PROPERTY_KEY_USER_ID = "base.session.check.user.id";
public static final String PROPERTY_KEY_TOKEN = "base.session.check.token";
public static final String PROPERTY_KEY_DEV_ID = "base.session.check.dev.id";
public static final String PROPERTY_KEY_DEV_OS = "base.session.check.dev.os";
public static final String PROPERTY_KEY_EXPIRE = "base.session.check.expire";
public static final String PROPERTY_KEY_WEB_API = "base.session.web.api.page";
public static final String PROPERTY_KEY_REQ_URI = "base.session.req.uri";
/**
* KEY OF BASE ================== parameter ============================
* PROPERTY_KEY_TOKEN_HOLD_TIME. 令牌有效期 5分钟 PROPERTY_KEY_ENDCODING. 编码
* encoding PROPERTY_KEY_NO_FILETER. 免过滤请求路径 PROPERTY_KEY_DATA_ENCODING.
* 编码格式 GBK PROPERTY_KEY_FORCE_ENCODING. 返回编码设置 TRUE GBK FALSE 不设置
* PROPERTY_KEY_DATA_SOURCE. 数据来源 als PROPERTY_KEY_SERVICE_RETURN_TYPE_VOID.
* 接口返回类型 void. PROPERTY_KEY_SERVICE_RETURN_TYPE_APPATT. 接口返回类型 APP附件.
*
* PROPERTY_KEY_CODE_500. 异常返回 CODE PROPERTY_KEY_MSG_500. 异常返回信息
* PROPERTY_KEY_CODE_404. 接口不存在CODE PROPERTY_KEY_CODE_406. 令牌失效 CODE
* PROPERTY_KEY_MSG_406. 令牌失效信息 PROPERTY_KEY_RESULT_SUCCESS_CODE. 返回成功 CODE
* PROPERTY_KEY_RESULT_FAIL_CODE. 返回失败CODE
*
* 推送功能 配置 小米jar PROPERTY_KEY_PUSH_ENABLE. 推送是否开启
* PROPERTY_KEY_PUSH_SECRET_IOS. IOS推送秘钥 PROPERTY_KEY_PUSH_SECRET_ANDROID.
* 安卓推送秘钥 PROPERTY_KEY_PAGE_NAME. 包名 FAIL_SAVE. 保存失败 FAIL_EDIT. 编辑失败
* FAIL_DELETE. 删除失败 FAIL_INIT_DISPLAY. 加载页面失败 SUCCESS_SAVE.保存成功
* SUCCESS_EDIT.编辑成功 SUCCESS_DELETE. 删除成功 SUCCESS_INIT_DISPLAY.加载页面成功
* DES_SECRET_KEY_ONE. 加密参数1 DES_SECRET_KEY_TWO. 加密参数2 DES_SECRET_KEY_THREE.
* 加密参数3
*/
public static final String PROPERTY_KEY_TOKEN_HOLD_TIME = "base.param.key.hold.time";
public static final String PROPERTY_KEY_ENCODING = "base.param.key.encoding";
public static final String PROPERTY_KEY_NO_FILETER = "base.param.key.no.check.uri";
public final static String PROPERTY_KEY_DATA_ENCODING = "base.data.encoding";
public final static String PROPERTY_KEY_FORCE_ENCODING = "base.data.fource.encoding";
public final static String PROPERTY_KEY_DATA_SOURCE = "base.data.source";
public final static String PROPERTY_KEY_SERVICE_RETURN_TYPE_VOID = "base.return.type.void";
public final static String PROPERTY_KEY_SERVICE_RETURN_TYPE_APPATT = "base.return.type.app.att";
public final static String PROPERTY_KEY_CODE_500 = "base.return.code.500";
public final static String PROPERTY_KEY_MSG_500 = "base.return.msg.500";
public final static String PROPERTY_KEY_CODE_404 = "base.return.code.404";
public final static String PROPERTY_KEY_CODE_406 = "base.return.code.406";
public final static String PROPERTY_KEY_MSG_406 = "base.return.msg.406";
public final static String PROPERTY_KEY_RESULT_SUCCESS_CODE = "base.return.result.success.code";
public final static String PROPERTY_KEY_RESULT_FAIL_CODE = "base.return.result.fail.code";
public final static String BUSINESS_TYPE = "base.business.type";
public final static String PROPERTY_KEY_PUSH_ENABLE = "push.message.switch";
public final static String PROPERTY_KEY_PUSH_SECRET_IOS = "push.message.secret.key.ios";
public final static String PROPERTY_KEY_PUSH_SECRET_ANDROID = "push.message.secret.key.android";
public final static String PROPERTY_KEY_PACKAGE_NAME = "push.message.package.name";
public static final String FAIL_SAVE = "base.return.msg.save.fail";
public static final String FAIL_EDIT = "base.return.msg.edit.fail";
public static final String FAIL_DELETE = "base.return.msg.del.fail";
public static final String FAIL_INIT_DISPLAY = "base.return.msg.init.display.fail";
public static final String SUCCESS_SAVE = "base.return.msg.save.success";
public static final String SUCCESS_EDIT = "base.return.msg.edit.success";
public static final String SUCCESS_DELETE = "base.return.msg.del.success";
public static final String SUCCESS_INIT_DISPLAY = "base.return.msg.init.display.success";
public static final String DES_SECRET_KEY_ONE = "base.pwd.encryption.des.one";
public static final String DES_SECRET_KEY_TWO = "base.pwd.encryption.des.two";
public static final String DES_SECRET_KEY_THREE = "base.pwd.encryption.des.three";
public static final String CUSTOMER_TYPE_COMPANY = "base.customer.type.company";
public static final String CUSTOMER_TYPE_PERSON = "base.customer.type.person";
public static final String FILTER_USER_ROLE_ID = "base.filter.user.role.id";
/**
* APP SESSION 配置
*/
public static Map<String, Object> sessionProperty;
/**
* APP 基本配置
*/
public static Map<String, Object> baseProperty;
private static void setMap(Map<String, Object> objMap, String sKey,
String sValue) {
ARE.getLog().debug("Map >> key :" + sKey + ", value :" + sValue);
objMap.put(sKey.toLowerCase(), sValue);
objMap.put(sKey.toUpperCase(), sValue);
}
private static void loadBaseKey(Properties pro) {
baseProperty = new HashMap<String, Object>();
// base 令牌有效期
setMap(baseProperty, "TOKENHOLDTIME",
pro.getProperty(PROPERTY_KEY_TOKEN_HOLD_TIME));
// base : 编码
setMap(baseProperty, "ENCODING", pro.getProperty(PROPERTY_KEY_ENCODING));
// base : 免过滤地址
setMap(baseProperty, "NOFILETER",
pro.getProperty(PROPERTY_KEY_NO_FILETER));
// base : GBK
setMap(baseProperty, "DATAENCODING",
pro.getProperty(PROPERTY_KEY_DATA_ENCODING));
// base : response return value encoding enable true
// [setcharencoding=GBK] false [setcharencoding=default]
setMap(baseProperty, "FORCEENCODING",
pro.getProperty(PROPERTY_KEY_FORCE_ENCODING));
// base : transaction & JBOTransaction source = [als]
setMap(baseProperty, "DATASOURCE",
pro.getProperty(PROPERTY_KEY_DATA_SOURCE));
// base : response return type
setMap(baseProperty, "VOID",
pro.getProperty(PROPERTY_KEY_SERVICE_RETURN_TYPE_VOID));
setMap(baseProperty, "APPATT",
pro.getProperty(PROPERTY_KEY_SERVICE_RETURN_TYPE_APPATT));
// base : code & massage
setMap(baseProperty, "CODE500", pro.getProperty(PROPERTY_KEY_CODE_500));
setMap(baseProperty, "MSG500", pro.getProperty(PROPERTY_KEY_MSG_500));
setMap(baseProperty, "CODE404", pro.getProperty(PROPERTY_KEY_CODE_404));
setMap(baseProperty, "CODE406", pro.getProperty(PROPERTY_KEY_CODE_406));
setMap(baseProperty, "MSG406", pro.getProperty(PROPERTY_KEY_MSG_406));
setMap(baseProperty, "FAIL_SAVE", pro.getProperty(FAIL_SAVE));
setMap(baseProperty, "FAIL_EDIT", pro.getProperty(FAIL_EDIT));
setMap(baseProperty, "FAIL_DELETE", pro.getProperty(FAIL_DELETE));
setMap(baseProperty, "FAIL_INIT_DISPLAY",
pro.getProperty(FAIL_INIT_DISPLAY));
setMap(baseProperty, "SUCCESS_SAVE", pro.getProperty(SUCCESS_SAVE));
setMap(baseProperty, "SUCCESS_EDIT", pro.getProperty(SUCCESS_EDIT));
setMap(baseProperty, "SUCCESS_DELETE", pro.getProperty(SUCCESS_DELETE));
setMap(baseProperty, "SUCCESS_INIT_DISPLAY",
pro.getProperty(SUCCESS_INIT_DISPLAY));
setMap(baseProperty, "FILTER_USER_ROLE_ID",
pro.getProperty(FILTER_USER_ROLE_ID));
// base : result code
setMap(baseProperty, "SUCCESS",
pro.getProperty(PROPERTY_KEY_RESULT_SUCCESS_CODE));
setMap(baseProperty, "FAIL",
pro.getProperty(PROPERTY_KEY_RESULT_FAIL_CODE));
// base : application push massage config
setMap(baseProperty, "PUSHENABLE",
pro.getProperty(PROPERTY_KEY_PUSH_ENABLE));
setMap(baseProperty, "SECRETIOS",
pro.getProperty(PROPERTY_KEY_PUSH_SECRET_IOS));
setMap(baseProperty, "SECRETANDROID",
pro.getProperty(PROPERTY_KEY_PUSH_SECRET_ANDROID));
setMap(baseProperty, "PACKAGENAME",
pro.getProperty(PROPERTY_KEY_PACKAGE_NAME));
// DES
setMap(baseProperty, "DES_SECRET_KEY_ONE",
pro.getProperty(DES_SECRET_KEY_ONE));
setMap(baseProperty, "DES_SECRET_KEY_TWO",
pro.getProperty(DES_SECRET_KEY_TWO));
setMap(baseProperty, "DES_SECRET_KEY_THREE",
pro.getProperty(DES_SECRET_KEY_THREE));
// CUSTOMER TYPE 01
setMap(baseProperty, "CUSTOMER_TYPE_COMPANY",
pro.getProperty(CUSTOMER_TYPE_COMPANY));
// CUSTOMER TYPE 03
setMap(baseProperty, "CUSTOMER_TYPE_PERSON",
pro.getProperty(CUSTOMER_TYPE_PERSON));
// BUSINESS_TYPE
setMap(baseProperty, "BUSINESS_TYPE",
pro.getProperty(BUSINESS_TYPE));
}
private static void loadSessionKey(Properties pro) {
sessionProperty = new HashMap<String, Object>();
setMap(sessionProperty, "USERID", pro.getProperty(PROPERTY_KEY_USER_ID));
setMap(sessionProperty, "TOKEN", pro.getProperty(PROPERTY_KEY_TOKEN));
setMap(sessionProperty, "DEVID", pro.getProperty(PROPERTY_KEY_DEV_ID));
setMap(sessionProperty, "DEVOS", pro.getProperty(PROPERTY_KEY_DEV_OS));
setMap(sessionProperty, "EXPIRE", pro.getProperty(PROPERTY_KEY_EXPIRE));
setMap(sessionProperty, "WEBAPI", pro.getProperty(PROPERTY_KEY_WEB_API));
setMap(sessionProperty, "REQURI", pro.getProperty(PROPERTY_KEY_REQ_URI));
}
public static void initProperties() throws Exception {
ARE.getLog().debug("开启加载APP_CONFIG.PROPERTIES ");
@SuppressWarnings("deprecation")
Configure CurConfig = Configure.getInstance();
try {
// String path =
// request.getSession().getServletContext().getRealPath("/");
// String proRootPath = directory.getCanonicalPath();
URL url = RestfullConstant.class.getResource("/");
String sClassPath = url.getPath();
String os = System.getProperty("os.name");
if(os.toLowerCase().startsWith("win")){
sClassPath = sClassPath.startsWith("/") ? sClassPath.substring(1,
sClassPath.indexOf("/WEB-INF") + 8) : sClassPath;
}else {
sClassPath = sClassPath.startsWith("/") ? sClassPath.substring(0,
sClassPath.indexOf("/WEB-INF") + 8) : sClassPath;
}
String fileName = sClassPath
+ CurConfig.getConfigure("AppConfigPath");
//String fileName = CurConfig.getConfigure("AppConfigPath");
ARE.getLog().debug("文件全路径:" + fileName);
Properties pro = new Properties();
FileInputStream in = new FileInputStream(fileName);
pro.load(in);
Iterator<String> it = pro.stringPropertyNames().iterator();
while (it.hasNext()) {
String sKey = it.next();
ARE.getLog().debug(
"key:" + sKey + " property:" + pro.getProperty(sKey));
}
loadSessionKey(pro);
loadBaseKey(pro);
in.close();
} catch (Exception e) {
ARE.getLog().error(e);
throw new Exception("加载APP配置文件失败" + e);
}
}
}

View File

@ -1,6 +1,6 @@
package com.tenwa.lease.flow.project.commbusiness;
import jbo.app.lpapplication;
import jbo.app.tenwa.customer.CUSTOMER_COMPANY_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP;
import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR_TEMP;
@ -28,7 +28,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
BizObjectManager bm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME);
BizObjectManager bmCPT = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME,Sqlca); //顺便初始化客户信息
BizObjectManager bmLULT = JBOFactory.getBizObjectManager(LB_UNION_LESSEE_TEMP.CLASS_NAME,Sqlca);
BizObjectManager bmLPA = JBOFactory.getBizObjectManager(lpapplication.CLASS_NAME,Sqlca);
BizObjectManager bmCCT = JBOFactory.getBizObjectManager(CUSTOMER_COMPANY_TEMP.CLASS_NAME,Sqlca);
BizObjectManager bmLECT = JBOFactory.getBizObjectManager(LB_EQUIPMENT_CAR_TEMP.CLASS_NAME,Sqlca);
BizObjectManager bmLCIT = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO_TEMP.CLASS_NAME,Sqlca);
@ -38,7 +38,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
BizObject bo = bm.newObject();
BizObject boCRT = bmCPT.newObject();
BizObject boLULT = bmLULT.newObject();
BizObject bmLP = bmLPA.newObject();
BizObject bmCC = bmCCT.newObject();
BizObject bmLEC = bmLECT.newObject();
BizObject bmLCI = bmLCIT.newObject();
@ -74,12 +74,14 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
//根据客户类型设置参数
String certType = this.getAttribute("certtype").toString();
if(certType.equals("Ent01")){
bmLP.setAttributeValue("flowunid", this.getAttribute("FlowUnid"));
bmLP.setAttributeValue("customerid", customerId);
bmLP.setAttributeValue("enterprisename", this.getAttribute("custname"));
bmLP.setAttributeValue("certtype", this.getAttribute("certtype"));
bmLP.setAttributeValue("certid", this.getAttribute("certid"));
if(certType.equals("Ent02")){
bmCC.setAttributeValue("flowunid", this.getAttribute("FlowUnid"));
bmCC.setAttributeValue("customerid", customerId);
String custname = this.getAttribute("custname").toString();
String certid = this.getAttribute("certid").toString();
bmCC.setAttributeValue("enterprisename", this.getAttribute("custname"));
bmCC.setAttributeValue("certid", this.getAttribute("certid"));
bmCCT.saveObject(bmCC);
}
bmLEC.setAttributeValue("FLOWUNID", this.getAttribute("FlowUnid"));
@ -111,7 +113,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
bo.setAttributeValue("VERSIONID", this.getAttribute("versionid"));
bo.setAttributeValue("BUSINESSTYPE", this.getAttribute("businessType"));
bo.setAttributeValue("leas_form", this.getAttribute("leasehold"));//ĬÈÏ»Ø×â
bo.setAttributeValue("LEAS_FORM", this.getAttribute("leasehold"));//ĬÈÏ»Ø×â
bo.setAttributeValue("PRODUCT_ID",this.getAttribute("ProductId"));//业务品种编号
bo.setAttributeValue("PRODUCT_NAME",this.getAttribute("ProductName"));//业务品种名称
bo.setAttributeValue("PROJECT_STATUS","0");
@ -123,7 +125,6 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
bm.saveObject(bo);
bmCPT.saveObject(boCRT);
bmLULT.saveObject(boLULT);
bmLPA.saveObject(bmLP);
bmLECT.saveObject(bmLEC);
bmLCIT.saveObject(bmLCI);