diff --git a/WebContent/Frame/page/js/as_control.js b/WebContent/Frame/page/js/as_control.js
index 1a9b1666b..40399ec3d 100644
--- a/WebContent/Frame/page/js/as_control.js
+++ b/WebContent/Frame/page/js/as_control.js
@@ -99,9 +99,24 @@ var AsControl = {
*/
randomNumber:function() {
return Math.abs(Math.sin(new Date().getTime())).toString().substr(2);
- }
-};
+ },
+};
+AsControl.postICMS = function(url,param){
+ let temp_form = document.createElement("form");
+ temp_form.action = url;
+ temp_form.target = "_blank";
+ temp_form.method = "post";
+ temp_form.style.display = "none";
+
+ let opt = document.createElement("textarea");
+ opt.name = 'data';
+ opt.value = param;
+ temp_form.appendChild(opt);
+
+ document.body.appendChild(temp_form);
+ temp_form.submit();
+};
/**
* 通过Mozilla 的PDF阅读器在web上预览PDF文件
*/
diff --git a/WebContent/Tenwa/Apzl/FileUpload/LBMailArchivingList.jsp b/WebContent/Tenwa/Apzl/FileUpload/LBMailArchivingList.jsp
new file mode 100644
index 000000000..b66f3ec23
--- /dev/null
+++ b/WebContent/Tenwa/Apzl/FileUpload/LBMailArchivingList.jsp
@@ -0,0 +1,81 @@
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
+ /*
+ Author: undefined 2019-07-11
+ Content:
+ History Log:
+ */
+ String flowunid = CurPage.getParameter("FlowUnid");
+ String PhaseNo = CurPage.getParameter("PhaseNo");
+ String projectNo = CurPage.getParameter("projectNo");
+ String contractId = CurPage.getParameter("contract_id");
+ String isHistory = CurPage.getParameter("IsHistory");
+ String model = "LBMailArchivingListTemp";
+ String params = flowunid+","+contractId;
+ if("true".equals(isHistory)){
+ model = "LBMailArchivingList";
+ params = contractId;
+ }
+ ASObjectModel doTemp = new ASObjectModel(model);
+ if("0010".equals(PhaseNo)){
+ doTemp.setVisible("HANDOVER_STATUS", false);
+ }
+ if("0020".equals(PhaseNo)){
+ doTemp.setReadOnly("MAIL_STATUS", true);
+ }
+// doTemp.setLockCount(2);
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
+ dwTemp.Style="1";
+ //--设置为Grid风格--
+ dwTemp.ReadOnly = "0"; //只读模式
+ dwTemp.setPageSize(10);
+ dwTemp.genHTMLObjectWindow(params);
+
+ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
+ String sButtons[][] = {
+ {"0010".equals(CurPage.getParameter("PhaseNo"))&&!"true".equals(isHistory)?"true":"false","","Button","保存","保存邮寄状态","saveMailStatus()","","","",""},
+ };
+%>
+<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Apzl/FileUpload/LBPlaceFileTempInfo.jsp b/WebContent/Tenwa/Apzl/FileUpload/LBPlaceFileTempInfo.jsp
index fabb48598..6325eac49 100644
--- a/WebContent/Tenwa/Apzl/FileUpload/LBPlaceFileTempInfo.jsp
+++ b/WebContent/Tenwa/Apzl/FileUpload/LBPlaceFileTempInfo.jsp
@@ -14,7 +14,7 @@
String sFlowNo= CurPage.getParameter("FlowNo");
String PhaseNo= CurPage.getParameter("PhaseNo");
String userName = CurUser.getUserName();
-
+ String isHistory = CurPage.getParameter("IsHistory");
sFlowNo = "MortgageFileMailFlow";
BizObject flow=GetFlowAction.getFlowBussinessObject(sFlowunid);
String product=CurPage.getParameter("productId");
@@ -49,13 +49,13 @@
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(CurPage.getParameter("id"));
- dwTemp.replaceColumn("placefile", "", CurPage.getObjectWindowOutput());
+ dwTemp.replaceColumn("placefile", "", CurPage.getObjectWindowOutput());
dwTemp.replaceColumn("opinion", "", CurPage.getObjectWindowOutput());
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","save()","","","",""},
{"false","All","Button","返回","返回列表","returnList()","","","",""},
- {"0020".equals(CurPage.getParameter("PhaseNo"))&&!"his".equals(type)?"true":"false","","Button","一键归档","一键归档","guidang()","","","",""},
+ {"0020".equals(CurPage.getParameter("PhaseNo"))&&!"true".equals(isHistory)?"true":"false","All","Button","一键归档","一键归档","guidang()","","","",""},
};
// sButtonPosition = "south";
@@ -79,11 +79,11 @@
}
//as_save(0,'frame_list.window.saveRecordForApprove()'); IE浏览器不起作用
- as_save(0,'$("#frame_list")[0].contentWindow.saveRecordForApprove();');
+ as_save(0,'$("#frame_list")[0].contentWindow.saveAcrhivingStatus();');
}
function guidang(){
- $("#frame_list")[0].contentWindow.guidang();
+ $("#frame_list")[0].contentWindow.doAcrhiving();
}
diff --git a/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp b/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp
index 1e0cfd6e2..575487c85 100644
--- a/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp
+++ b/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp
@@ -7,6 +7,7 @@
*/
String flowunid = CurPage.getParameter("ObjectNo");
String PhaseNo = CurPage.getParameter("PhaseNo");
+ String projectNo = CurPage.getParameter("projectNo");
ASObjectModel doTemp = new ASObjectModel("LBnotAllMailHndHandoverTempList");
if("0010".equals(PhaseNo)){
// doTemp.setVisible("ALLHANDOVERSTATUS", false);//显示归档状态
@@ -123,7 +124,7 @@
var contract_id=getItemValue(0, i, "contract_id");
var ProductId=getItemValue(0, i, "PRODUCT_ID");
var id=getItemValue(0, i, "id");
- var sUrl="/Tenwa/Apzl/FileUpload/DocMailListMain.jsp";
+ var sUrl="/Tenwa/Apzl/FileUpload/LBMailArchivingList.jsp";
if('0010'!='<%=PhaseNo%>'){
sUrl="/Tenwa/Apzl/FileUpload/LBPlaceFileTempInfo.jsp";
}
@@ -145,26 +146,8 @@
},"邮寄详情");
}
function viewOpinionFilelist(i){
- var contract_id=getItemValue(0, i, "PROJECT_ID");
- var ProductId=getItemValue(0, i, "PRODUCT_ID");
- var id=getItemValue(0, i, "id");
- var sUrl="/Tenwa/Apzl/FileUpload/PayDocMailList.jsp";
- AsDialog.PopView(sUrl,"contract_id="+contract_id+"&productId="+ProductId+"&FlowUnid=<%=flowunid%>&PhaseNo=<%=CurPage.getParameter("PhaseNo")%>&id="+id+"&type=his","dialogWidth=1200px;dialogHeight=600px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){reloadSelf();
- for(var i=0;i邮寄明细';
- }
- if(getObj(0,i,"opinion")!=null&&getObj(0,i,"opinion")!="null"){
- getObj(0,i,"opinion").innerHTML='签署意见';
- }
- if(getObj(0,i,"filelist")!=null&&getObj(0,i,"filelist")!="null"){
- getObj(0,i,"filelist").innerHTML='历史附件查看';
- }
- if(getObj(0,i,"BusinessConditions")!=null&&getObj(0,i,"BusinessConditions")!="null"){
- getObj(0,i,"BusinessConditions").innerHTML='商务条件';
- }
- }
- },"邮寄详情");
+ var projectId=getItemValue(0, i, "PROJECT_ID");
+ openFileList(projectId);
}
function viewBusinessConditions(i){
var contract_id=getItemValue(0, i, "PROJECT_ID");
@@ -218,6 +201,23 @@
}
}
}
+ function openFileList(projectId){
+ let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
+ let params = getRequestParam(projectId);
+ if(params=='error'){
+ alert('未找到对应的影像配置,请联系管理员');
+ return;
+ }
+ if(params!=null){
+ AsControl.postICMS(url,params);
+ }
+ }
+ function getRequestParam(projectId){
+ let code = 'ECM0002';
+ let param = RunJavaMethodTrans("com.ample.icms.service.ImageQueryService","getRequestParamByProjectIdJMT","projectId="+projectId+",code="+code);
+ return param;
+ }
+
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Apzl/FileUpload/LmApprovaloppinionDocTempList.jsp b/WebContent/Tenwa/Apzl/FileUpload/LmApprovaloppinionDocTempList.jsp
index 60f0911f7..6a42982d9 100644
--- a/WebContent/Tenwa/Apzl/FileUpload/LmApprovaloppinionDocTempList.jsp
+++ b/WebContent/Tenwa/Apzl/FileUpload/LmApprovaloppinionDocTempList.jsp
@@ -18,8 +18,8 @@
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
String sButtons[][] = {
{"0010".equals(PhaseNo)?"false":"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
- {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
- {"0010".equals(PhaseNo)?"false":"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
+ {"true","All","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
+ {"0010".equals(PhaseNo)?"false":"true","All","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorInfo.jsp b/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorInfo.jsp
index 54eb1df02..105b1b96c 100644
--- a/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorInfo.jsp
+++ b/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorInfo.jsp
@@ -8,6 +8,8 @@
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
String PhaseNo=CurPage.getParameter("PhaseNo");
String RightType=CurPage.getParameter("RightType");
+ String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号
+ String FlowNo = CurPage.getParameter("FlowNo");//流程编号
// String PhaseNo=CurPage.getParameter("PhaseNo");
// System.out.print("==============="+RightType);
if(sFlowUnid == null) sFlowUnid="";
@@ -54,7 +56,8 @@
temp="false";
};
String sButtons[][] = {
- {temp,"All","Button","保存","保存所有修改","save()","","","",""}
+ {temp,"All","Button","保存","保存所有修改","save()","","","",""},
+ {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""}
/* {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
*/ };
sButtonPosition = "north";
@@ -69,7 +72,7 @@ $(function(){
if(checkORGRight(businessLicenseNo)){
var sReturnInfo = RunJavaMethodTrans("com.tenwa.customer.controller.group.CustomerGroupCompanyController","checkBusinessLicenseNo","businessLicenseNo="+businessLicenseNo+",id="+getItemValue(0,0,'ID'));
if("false" ==sReturnInfo){
- setErrorTips("BUSINESS_LICENSE_NO","统一社会信用代码已存在!");;
+ setErrorTips("BUSINESS_LICENSE_NO","统一社会信用代码已存在!");
return false;
}else{
setErrorTips("BUSINESS_LICENSE_NO","");
@@ -295,5 +298,47 @@ $(function(){
},"请选择地区",'');
}
}
+function openFileList(){
+ let appInfo = getAppInfo();
+ let index = appInfo.indexOf("@");
+ if(index==-1){
+ alert(appInfo);
+ return;
+ }
+ let appCode = appInfo.substr(0,index);
+ let appName = appInfo.substr(index+1,appInfo.length);
+ if(appCode=='0000'){
+ alert(appName);
+ return;
+ }
+ openAppointFileList(appCode,appName);
+}
+function openAppointFileList(appCode,appName){
+ let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
+ let code = getCode();
+ let params = getRequestParam(appCode,appName,code);
+ if(params!=null){
+ AsControl.postICMS(url,params);
+ }
+}
+function getAppInfo(){
+ let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowNoRJM", "flowNo=<%=FlowNo%>");
+ return appInfo;
+}
+function getCode(){
+ let code = 'ECM0002';
+ if(
+ "<%=FlowNo%>"=="DistributorApprovalFlow"&&("<%=sPhaseNo%>"=="0010")||
+ "<%=FlowNo%>"=="DistributorChangeFlow"&&("<%=sPhaseNo%>"=="0010")
+ ){
+ code = 'ECM0001';
+ }
+ return code;
+}
+function getRequestParam(appCode,appName,code){
+ let busiNo = getItemValue(0,0,'DISTRIBUTOR_NO');
+ let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo);
+ return param;
+}
<%@ include file="/Frame/resources/include/include_end.jspf"%>
diff --git a/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorInfo.jsp b/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorInfo.jsp
index 4cc48399d..085fe3f72 100644
--- a/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorInfo.jsp
+++ b/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorInfo.jsp
@@ -8,7 +8,8 @@
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
String RightType=CurPage.getParameter("RightType");
if(sFlowUnid == null) sFlowUnid="";
-
+ String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号
+ String FlowNo = CurPage.getParameter("FlowNo");//流程编号
ASObjectModel temp = new ASObjectModel("LDistributorChangeInfoHis"); //获取法人原始信息
ASObjectWindow wtemp = new ASObjectWindow(CurPage, temp,request);
ASResultSet rs = Sqlca.getResultSet(new SqlObject(wtemp.getDataObject().getJboSql().replaceAll("v\\.", "").replaceAll("jbo\\.[\\w+\\.]+\\.","").replaceAll(" O ", " "+temp.getJboClass().replaceAll("jbo\\.[\\w+\\.]+\\.","")+" O ")).setParameter("FlowUnid", sFlowUnid));
@@ -49,7 +50,8 @@
dwTemp.replaceColumn("beforechange", "", CurPage.getObjectWindowOutput());
String sButtons[][] = {
- {"true","All","Button","保存","保存所有修改","save()","","","",""}
+ {"true","All","Button","保存","保存所有修改","save()","","","",""},
+ {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""}
/* {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
*/ };
sButtonPosition = "north";
@@ -211,6 +213,47 @@ function saveproj_name(){
setItemRequired(0,'LIMIT_END_DATE',true);
}
}
-
+function openFileList(){
+ let appInfo = getAppInfo();
+ let index = appInfo.indexOf("@");
+ if(index==-1){
+ alert(appInfo);
+ return;
+ }
+ let appCode = appInfo.substr(0,index);
+ let appName = appInfo.substr(index+1,appInfo.length);
+ if(appCode=='0000'){
+ alert(appName);
+ return;
+ }
+ openAppointFileList(appCode,appName);
+}
+function openAppointFileList(appCode,appName){
+ let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
+ let code = getCode();
+ let params = getRequestParam(appCode,appName,code);
+ if(params!=null){
+ AsControl.postICMS(url,params);
+ }
+}
+function getAppInfo(){
+ let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowNoRJM", "flowNo=<%=FlowNo%>");
+ return appInfo;
+}
+function getCode(){
+ let code = 'ECM0002';
+ if(
+ "<%=FlowNo%>"=="DistributorApprovalFlow"&&("<%=sPhaseNo%>"=="0010")||
+ "<%=FlowNo%>"=="DistributorChangeFlow"&&("<%=sPhaseNo%>"=="0010")
+ ){
+ code = 'ECM0001';
+ }
+ return code;
+}
+function getRequestParam(appCode,appName,code){
+ let busiNo = getItemValue(0,0,'DISTRIBUTOR_NO');
+ let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo);
+ return param;
+}
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp
index 99912da0d..007e377f8 100644
--- a/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp
@@ -8,10 +8,11 @@
String custtype = CurPage.getParameter("CustomerType");
String PhaseNo = CurPage.getParameter("PhaseNo");
String projectId = CurPage.getParameter("ProjectId");
-// String signStatus = CurPage.getParameter("SignStatus");
+ String ProjectNo = CurPage.getParameter("ProjectNo");
String contractNumber = CurPage.getParameter("ContractNumber");
String productId = CurPage.getParameter("ProductId");
String flowunid = CurPage.getParameter("FlowUnid");
+ String FlowNo=CurPage.getParameter("FlowNo");
String action = CurPage.getParameter("action");
String SubjectId=CurPage.getParameter("SubjectId");//获取主体ID
String operationType = CurPage.getParameter("operationType");
@@ -44,6 +45,7 @@
{btnflag,"","Button","查询签约结果","查询签约结果","getStatus()","","","","btn_icon_obtain",""},
{btnflag,"","Button","重新发送短信","重新发送短信","sendMessageAgain()","","","","btn_icon_refresh",""},
{signs,"","Button","公司盖章","公司盖章","sign()","","","","btn_icon_refresh",""},
+ {"true","","Button","上传合同","暂时测试上传用按钮","uploadContract()","","","","btn_icon_refresh",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBProject/LBProjectInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBProject/LBProjectInfo.jsp
index 6ca9ca668..2b5239cf3 100644
--- a/WebContent/Tenwa/Lease/Flow/Comm/LBProject/LBProjectInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Comm/LBProject/LBProjectInfo.jsp
@@ -9,7 +9,7 @@
Content: 项目基本信息详情页面
Input Param:
Output param:
- History Log:
+ History Log:
*/
%>
<%/*~END~*/%>
@@ -26,6 +26,8 @@
<%
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
String FlowNo = CurPage.getParameter("FlowNo");//流程编号
+ String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号
+ String projectNo=CurPage.getParameter("ProjectNo");//项目编号
if(sFlowUnid == null) sFlowUnid="";
String sTempletNo = CurPage.getParameter("TempletNo");//模板号
if(sTempletNo == null) sTempletNo = "LBProjectInfoTemp";
@@ -42,13 +44,13 @@
levelOrgId=orgid.substring(0, 9+(i+1)*4);
}
orgdeptname+=CurUser.getOrgName();
-
+
}else{
orgdeptname=CurUser.getOrgName();
orgidname=CurUser.getOrgName();
}
String userid = CurUser.getUserID();//用户id
- String useridname = CurUser.getUserName();//用户姓名
+ String useridname = CurUser.getUserName();//用户姓名
String today = StringFunction.getToday();
String RightType=CurPage.getParameter("RightType");
String ishistory=CurPage.getParameter("IsHistory");
@@ -56,13 +58,13 @@
String productId = CurPage.getParameter("ProductId");
%>
<%/*~END~*/%>
-
-
+
+
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info03;Describe=定义数据对象;]~*/%>
- <%
-
+ <%
+
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
-
+
if(null!=ishistory&&ishistory.equals("true") && !"ProjectApprovalFlow".equals(FlowNo)){
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataInfoHistory");//如果是历史则新显示历史数据
}
@@ -73,36 +75,40 @@
doTemp.setRequired("LEAS_FORM", false);
doTemp.setVisible("LEAS_FORM", false);
}
-
+
%>
<%@ include file="/Tenwa/Lease/Flow/Comm/baseShowFormal.jspf"%>
-<%
+<%
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
+ String ShowButton = "false";
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "-2";//只读模式
RightType="ReadOnly";
- isShowButton=false;
+ // isShowButton=false;
}else{
- isShowButton=true;
+ // isShowButton=true;
+ ShowButton = "true";
}
- if(isShowForaml.equals("true")){
+ if(isShowForaml.equals("true")){
dwTemp.genHTMLObjectWindow(sProjectId);
}else{
dwTemp.genHTMLObjectWindow(sFlowUnid);
}
-
+
CurPage.getCurComp().setAttribute("RightType",RightType);
%>
<%/*~END~*/%>
-
-
+
+
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%>
-<%
+<%
String sButtons[][] =null;
sButtons= new String[][]{
- {"true","All","Button","保存","保存所有修改","saveRecord()","","","",""}
+ {ShowButton,"All","Button","保存","保存所有修改","saveRecord()","","","",""},
+ {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""},
+ {"true","","Button","尽职信审报告","尽职信审报告","openAppointFileList('APZLCTYWXSCL','传统业务信审资料')","","","","btn_icon_saveNew",""}
};
%>
<%/*~END~*/%>
@@ -118,10 +124,10 @@
//---------------------定义按钮事件------------------------------------
/*~[Describe=保存记录;InputParam=无;OutPutParam=无;]~*/
function saveRecord(){
-
- as_save("myiframe0");
+
+ as_save("myiframe0");
}
-
+
<%/*~END~*/%>
@@ -142,7 +148,7 @@
//选择项目协办
function selectAssist(){
AsDialog.OpenSelector("SelectManager","orgid,<%=orgid%>","dialogWidth=" + parseInt(window.screen.width * 0.5) + "px dialogHeight=" + parseInt(window.screen.height * 0.3) + "px",function(sReturn){
-
+
if(!sReturn || sReturn == "_CANCEL_"||sReturn=="_NONE_"||sReturn=="_CLEAR_"){
return;
}
@@ -150,11 +156,11 @@
setItemValue(0,getRow(),"PROJECT_ASSIST_NAME",sReturn[1]);
setItemValue(0,getRow(),"PROJECT_ASSIST",sReturn[0]);
},"请选项目协办");
- }
+ }
<%/*~END~*/%>
-
-
+
+
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info08;Describe=页面装载时,进行初始化;]~*/%>
+
+
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>
diff --git a/WebContent/Tenwa/Lease/Flow/Contract/ContractApproval/ContractApprovalApplyList.jsp b/WebContent/Tenwa/Lease/Flow/Contract/ContractApproval/ContractApprovalApplyList.jsp
index 4582c8f1c..553286b99 100644
--- a/WebContent/Tenwa/Lease/Flow/Contract/ContractApproval/ContractApprovalApplyList.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Contract/ContractApproval/ContractApprovalApplyList.jsp
@@ -67,13 +67,14 @@
// 如果通过则可以发起,如果暂时没有结果,则提示;如果审批失败,则按顺序转换资金方,然后重新发起业务申请后的另外一个资方的调用接口;
// 如果都失败,最终转换为自有资金,将corpus_source字段设为AP(在接口平台实现此功能);
//project_id返回的是project_no字段,不是project_id
- var checkParam = 'projectId='+id;
- var checkResult = RunJavaMethod('com.ap.CorpusSourceCheck','corpusContractApplyCheck',checkParam);
- if(checkResult!='S'){
- alert(checkResult);
- return;
+ if(businessType=='1'){
+ var checkParam = 'projectId='+id;
+ var checkResult = RunJavaMethod('com.ap.CorpusSourceCheck','corpusContractApplyCheck',checkParam);
+ if(checkResult!='S'){
+ alert(checkResult);
+ return;
+ }
}
-
if(flowno=="BContractApproveApply"&&"03" == customertype){
if(""== signType||null == signType||"undefined" == signType){
alert("请在产品中配置签约方式!!!");
diff --git a/WebContent/Tenwa/Lease/Flow/FileManager/FileMailArching/FileMailArchivingList.jsp b/WebContent/Tenwa/Lease/Flow/FileManager/FileMailArching/FileMailArchivingList.jsp
new file mode 100644
index 000000000..26ef1fd5a
--- /dev/null
+++ b/WebContent/Tenwa/Lease/Flow/FileManager/FileMailArching/FileMailArchivingList.jsp
@@ -0,0 +1,30 @@
+
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
+ ASObjectModel doTemp = new ASObjectModel("LBFileArchivingList");
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
+ dwTemp.Style="1";
+ dwTemp.ReadOnly = "1";
+ dwTemp.setPageSize(10);
+ dwTemp.genHTMLObjectWindow("");
+
+ String sButtons[][] =new String[][] {
+ {"true","","Button","归档","归档","fileArchiving()","","","","btn_icon_edit"}
+ };
+
+%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp
index 256e9b61e..45102fcfd 100644
--- a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp
@@ -5,7 +5,13 @@
Content: 示例详情页面
History Log:
*/
+ String userId= CurUser.getUserID();
+ String userName = CurUser.getUserName();
String sPrevUrl = CurPage.getParameter("PrevUrl");
+ String sFlowUnid = CurPage.getParameter("FlowUnid");
+ String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号
+ String FlowNo=CurPage.getParameter("FlowNo");//流程名称
+ String isHistory=CurPage.getParameter("IsHistory");
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "LbContactInfo";//--模板号--
@@ -15,10 +21,12 @@
dwTemp.Style = "2";//freeform
dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid"));
-
+
String sButtons[][] = {
//{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
//{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
+ {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""},
+ {"0010".equals(sPhaseNo)?"false":"true","","Button","付款申请资料清单","资料清单","openPayFileList()","","","","btn_icon_saveNew",""},
};
//sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
@@ -38,5 +46,40 @@
function returnList(){
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
}
+ function openFileList(){
+ let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
+ let code = 'ECM0002';
+ if("<%=sPhaseNo%>"=="0010"&&"<%=isHistory%>"!="true"){
+ code = 'ECM0001';
+ }
+ let params = RunJavaMethod("com.ample.icms.service.ImageQueryService","getRequestParamByFlowUnidRJM","flowUnid=<%=sFlowUnid%>,code="+code+",userCode=<%=userId%>"+",userName=<%=userName%>");
+ if(params==null){
+ alert('获取影像参数失败,请联系管理员');
+ return;
+ }
+ if(params.indexOf("0000@")!=-1){
+ let result = params.split("@")[1];
+ alert(result);
+ return;
+ }
+ AsControl.postICMS(url,params);
+
+ }
+ function openPayFileList(){
+ let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
+ let params = RunJavaMethod("com.ample.icms.service.ImageQueryService","getRequestParamByFlowNoRJM","flowNo=FundPaymentCarFlow,code=ECM0002,flowUnid=<%=sFlowUnid%>");
+ if(params==null){
+ alert('获取影像参数失败,请联系管理员');
+ return;
+ }
+ if(params.indexOf("0000@")!=-1){
+ let result = params.split("@")[1];
+ alert(result);
+ return;
+ }
+ AsControl.postICMS(url,params);
+ }
+
+
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessChangeApplyList.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessChangeApplyList.jsp
index 037230ef7..90c344feb 100644
--- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessChangeApplyList.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessChangeApplyList.jsp
@@ -15,7 +15,7 @@
sReturn = sReturn.split("@");
var id=sReturn[0]
var product_id=sReturn[1];
- var project_id = sReturn[2];
+ var projectNo = sReturn[2];
var project_name = sReturn[3];
var CustomerType = sReturn[4];
var carAttributes = sReturn[5];
@@ -35,7 +35,7 @@
return ;
}
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
- sParams =sParams+",channel="+channel+",SubjectId="+SubjectId+",SubjectName="+SubjectName+",certtype="+certtype+",customertype="+CustomerType+",carAttributes="+carAttributes+",leasform="+leasehold+",operationType="+operationType+",ProjectId="+id+",ProductId="+product_id+",FlowKey="+project_id+",ProjectName="+project_name+",ApplyType=<%=sApplyType%>";
+ sParams =sParams+",channel="+channel+",SubjectId="+SubjectId+",SubjectName="+SubjectName+",certtype="+certtype+",customertype="+CustomerType+",carAttributes="+carAttributes+",leasform="+leasehold+",operationType="+operationType+",ProjectNo="+projectNo+",ProjectId="+id+",ProductId="+product_id+",FlowKey="+projectNo+",ProjectName="+project_name+",ApplyType=<%=sApplyType%>";
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",sParams);
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return;
var sReturnInfos=sReturnInfo.split("@");
diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp
index c6c5febaa..00d7d143b 100644
--- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp
@@ -7,16 +7,18 @@
Content: 示例详情页面
History Log:
*/
+ String userId= CurUser.getUserID();
+ String userName = CurUser.getUserName();
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号
String FlowNo=CurPage.getParameter("FlowNo");//流程名称
+ String projectNo=CurPage.getParameter("ProjectNo");//项目编号
String sPrevUrl = CurPage.getParameter("PrevUrl");
String operationType = CurPage.getParameter("operationType");//获取产品类型
if(sPrevUrl == null) sPrevUrl = "";
String compClientID = CurPage.getParameter("CompClientID");
String rightType = CurPage.getParameter("RightType");
String sTempletNo = "BusinessProjectTempInfo";//--模板号--
- BizObject bo=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT", "flow_unid=:flowunid").setParameter("flowunid",sFlowUnid).getSingleResult(false);
String custype = CurPage.getParameter("CustomerType");
String customertype = CurPage.getParameter("customertype");
String channel = CurPage.getParameter("channel");
@@ -58,7 +60,8 @@
dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid"));
dwTemp.replaceColumn("customer_info", "", CurPage.getObjectWindowOutput());
String sButtons[][] = {
- {"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存","save()","","","","btn_icon_saveNew",""}
+ {"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存","save()","","","","btn_icon_saveNew",""},
+ {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""}
};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
@@ -171,5 +174,41 @@
return true;
}
}
+
+ function openFileList(){
+ let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
+ let params = getRequestParam();
+ if(params!=null){
+ AsControl.postICMS(url,params);
+ }
+ }
+ function getRequestParam(){
+ let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
+ let index = appInfo.indexOf("@");
+ if(index==-1){
+ alert(appInfo);
+ return;
+ }
+ let appCode = appInfo.substr(0,index);
+ let appName = appInfo.substr(index+1,appInfo.length);
+ if(appCode=='0000'){
+ alert(appName);
+ return;
+ }
+ let code = 'ECM0002';
+ if(("<%=FlowNo%>"=="BusinessApplyFlow"||"<%=FlowNo%>"=="BusinessChangeFlow")&&"<%=sPhaseNo%>"=="0010"){
+ code = 'ECM0001';
+ }
+ let busiNo="<%=projectNo%>";
+ if(busiNo==null||busiNo==""||busiNo=="null"){
+ busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
+ }
+ let identity = $("#frame_list")[0].contentWindow.getIdentity();
+ let customerName = $("#frame_list")[0].contentWindow.getCustomerName();
+ let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo+",userCode=<%=userId%>"+",userName=<%=userName%>"+",identity="+identity+",customerName="+customerName);
+ return param;
+ }
+
+
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp
index 271182133..de5888cc2 100644
--- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp
@@ -693,7 +693,7 @@
}
function ValidityCheck(){
- if(<%=customerType%> == '03'){ //个人客户
+ if('<%=customerType%>' == '03'){ //个人客户
//校验证件类型为身份证或临时身份证时,出生日期是否同证件编号中的日期一致
var certType = getItemValue(0,getRow(),"CERTTYPE");
var certID = getItemValue(0,getRow(),"CERTID");
@@ -755,10 +755,12 @@
}
function setIdexpiry(){
+ var curDate = new Date();
+ ;
var date = document.getElementById("IDEXPIRY");
var dateValue = "";
dateValue = date.value;
- AsDialog.OpenCalender(date,"yyyy/MM/dd","1900/01/01","2100/12/31",function(dateValue){
+ AsDialog.OpenCalender(date,"yyyy/MM/dd",curDate.toLocaleDateString(),"2099/12/31",function(dateValue){
var myNewValue = "",myValue="";
myValue = this.dayValue;
if(typeof(myValue)!="undefined" && myValue!="undefined"){
@@ -896,5 +898,13 @@
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkCertIdAll",sParams);
return sReturnInfo;
}
+ function getIdentity(){
+ var certId = getItemValue(0,getRow(),"CERTID");
+ return certId;
+ }
+ function getCustomerName(){
+ var customerName = getItemValue(0,getRow(),"FULLNAME");
+ return customerName;
+ }
<%@ include file="/Frame/resources/include/include_end.jspf"%>
diff --git a/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp b/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp
index 05ca0d6df..54a4499d3 100644
--- a/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp
@@ -6,17 +6,20 @@
Content: 示例详情页面
History Log:
*/
+ String userId= CurUser.getUserID();
+ String userName = CurUser.getUserName();
String orgId = CurUser.getOrgID();
String ishistory = CurPage.getParameter("IsHistory");
String flowunid = CurPage.getParameter("FlowUnid");
+ String FlowNo=CurPage.getParameter("FlowNo");
String contractId = CurPage.getParameter("ContractId");
String compClientID = CurPage.getParameter("CompClientID");
String phaseNo = CurPage.getParameter("PhaseNo");
+ String projectNo=CurPage.getParameter("ProjectNo");//项目编号
String ProductId = CurPage.getParameter("ProductId");
//String corpusSource = Sqlca.getString("select corpus_source from LB_CONTRACT_INFO_TEMP where flowunid = '"+flowunid+"'");
String projectId = CurPage.getParameter("ProjectId");
String gpsVendor = Sqlca.getString("select cl.itemname from lb_project_info lpi left join LM_GPS_ORDER lgr on lgr.apply_no=lpi.project_no left join code_library cl on cl.itemno=lgr.source and cl.codeno='gpsVendor' where lpi.id='"+projectId+"'");
- String userId = CurUser.getUserID();
//gps来源 中瑞1 天易0
String source = Sqlca.getString("SELECT SOURCE from LM_GPS_ORDER where PROJECT_ID='"+projectId+"'");
String orderNo = Sqlca.getString("SELECT ORDER_NO from LM_GPS_ORDER where PROJECT_ID='"+projectId+"'");
@@ -51,6 +54,7 @@
String sButtons[][] ={
{"true","","Button","保存","保存所有修改","save()","","","","btn_icon_save"},
{"true","All","Button","查看GPS定位信息","查看GPS定位信息","queryOrder()","","","","",""},
+ {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""},
};
//sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
@@ -167,5 +171,38 @@ window.onload = function(){
$("#A_div_1038").attr("style","display:none;");
}
}
+
+ function openFileList(){
+ let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
+ let params = getRequestParam();
+ if(params!=null){
+ AsControl.postICMS(url,params);
+ }
+ }
+ function getRequestParam(){
+ let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowUnidRJM", "flowUnid=<%=flowunid%>");
+ let index = appInfo.indexOf("@");
+ if(index==-1){
+ alert(appInfo);
+ return;
+ }
+ let appCode = appInfo.substr(0,index);
+ let appName = appInfo.substr(index+1,appInfo.length);
+ if(appCode=='0000'){
+ alert(appName);
+ return;
+ }
+ let code = 'ECM0002';
+ if("<%=phaseNo%>"=="0010"){
+ code = 'ECM0001';
+ }
+ let busiNo = '<%=projectNo%>';
+ if(busiNo==null||busiNo==""||busiNo=="null"){
+ busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=flowunid%>");
+ }
+ let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo+",userCode=<%=userId%>"+",userName=<%=userName%>");
+ return param;
+ }
+
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_doc.xml b/WebContent/WEB-INF/etc/jbo/jbo_doc.xml
index 67578d710..54877cc05 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_doc.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_doc.xml
@@ -1,399 +1,443 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_oti.xml b/WebContent/WEB-INF/etc/jbo/jbo_oti.xml
index bc2262c33..1c4a634a6 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_oti.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_oti.xml
@@ -410,6 +410,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WebContent/WEB-INF/lib/sunecm-url-encode-1.1.jar b/WebContent/WEB-INF/lib/sunecm-url-encode-1.1.jar
new file mode 100644
index 000000000..fc1f20575
Binary files /dev/null and b/WebContent/WEB-INF/lib/sunecm-url-encode-1.1.jar differ
diff --git a/WebContent/WEB-INF/lib/sunecm_outer-1.3.jar b/WebContent/WEB-INF/lib/sunecm_outer-1.3.jar
new file mode 100644
index 000000000..20846b19b
Binary files /dev/null and b/WebContent/WEB-INF/lib/sunecm_outer-1.3.jar differ
diff --git a/config/icms.properties b/config/icms.properties
new file mode 100644
index 000000000..f90bfa037
--- /dev/null
+++ b/config/icms.properties
@@ -0,0 +1,11 @@
+url=http://192.168.7.72:8081/SunICMS/servlet/RouterServlet
+service_ip=192.168.7.72
+#\u94FE\u63A5\u6709\u6548\u65F6\u95F4\uFF0C\u5355\u4F4D\u4E3A\u79D2
+useful_life=360
+#\u4E1A\u52A1\u7CFB\u7EDF\u6388\u6743\u5BC6\u94A5
+secret_id=anpeng
+secret_key=IU2VHdejDpUFzhoeT7tUSII3
+#\u5F71\u50CF\u7B2C\u4E09\u65B9\u4E0A\u4F20\u65F6\u6253\u5305\u4E34\u65F6\u6587\u4EF6\u8DEF\u5F84
+fileSavePathTemp=/Users/simba/data/files/icmsFileTemp
+
+
diff --git a/src/com/ample/icms/bean/image/ImageAttr.java b/src/com/ample/icms/bean/image/ImageAttr.java
new file mode 100644
index 000000000..f37862156
--- /dev/null
+++ b/src/com/ample/icms/bean/image/ImageAttr.java
@@ -0,0 +1,127 @@
+package com.ample.icms.bean.image;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
+
+import java.util.List;
+
+@XStreamAlias("NODE")
+public class ImageAttr {
+
+ @XStreamAlias("ID")
+ @XStreamAsAttribute
+ private String id ;
+
+ //资料名称
+ @XStreamAlias("NAME")
+ @XStreamAsAttribute
+ private String name ;
+
+ //资料权限(CRUD)
+ @XStreamAlias("RIGHT")
+ @XStreamAsAttribute
+ private String right ;
+
+ //影像资料压缩大小像素 例如800*800 (非必填)
+ @XStreamAlias("RESEIZE")
+ @XStreamAsAttribute
+ private String reseize ;
+
+ //是否是子节点 1-是子节点、0-父节点
+ @XStreamAlias("CHILD_FLAG")
+ @XStreamAsAttribute
+ private String childFlag ;
+
+ //资料条码 用于系统区分资料类型自动归类 (非必填)
+ @XStreamAlias("BARCODE")
+ @XStreamAsAttribute
+ private String barcode ;
+
+ //资料最大上传数量
+ @XStreamAlias("MAXPAGES")
+ @XStreamAsAttribute
+ private String maxPages ;
+
+ //资料最小上传数量
+ @XStreamAlias("MINPAGES")
+ @XStreamAsAttribute
+ private String minPages ;
+
+ @XStreamAlias("NODE")
+ public List images ;
+
+ public ImageAttr() {
+
+ }
+ public ImageAttr(List images) {
+ this.images = images;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getRight() {
+ return right;
+ }
+
+ public void setRight(String right) {
+ this.right = right;
+ }
+
+ public String getReseize() {
+ return reseize;
+ }
+
+ public void setReseize(String reseize) {
+ this.reseize = reseize;
+ }
+
+ public String getChildFlag() {
+ return childFlag;
+ }
+
+ public void setChildFlag(String childFlag) {
+ this.childFlag = childFlag;
+ }
+
+ public String getBarcode() {
+ return barcode;
+ }
+
+ public void setBarcode(String barcode) {
+ this.barcode = barcode;
+ }
+
+ public String getMaxPages() {
+ return maxPages;
+ }
+
+ public void setMaxPages(String maxPages) {
+ this.maxPages = maxPages;
+ }
+
+ public String getMinPages() {
+ return minPages;
+ }
+
+ public void setMinPages(String minPages) {
+ this.minPages = minPages;
+ }
+
+
+
+
+}
diff --git a/src/com/ample/icms/bean/image/ImageBaseData.java b/src/com/ample/icms/bean/image/ImageBaseData.java
new file mode 100644
index 000000000..d749e534f
--- /dev/null
+++ b/src/com/ample/icms/bean/image/ImageBaseData.java
@@ -0,0 +1,109 @@
+package com.ample.icms.bean.image;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+
+@XStreamAlias("BASE_DATA")
+public class ImageBaseData {
+ //操作员代码
+ @XStreamAlias("USER_CODE")
+ private String userCode;
+ //操作员名称
+ @XStreamAlias("USER_NAME")
+ private String userName;
+ //机构代码
+ @XStreamAlias("ORG_CODE")
+ private String orgCode;
+ //缓存机构代码
+ @XStreamAlias("COM_CODE")
+ private String comCode;
+ //机构名称
+ @XStreamAlias("ORG_NAME")
+ private String orgName;
+ //操作员角色
+ @XStreamAlias("ROLE_CODE")
+ private String roleCode;
+ //批量扫描标记 0-批量,1-单笔
+ @XStreamAlias("ONE_BATCH")
+ private String oneBatch;
+ //操作类型 1新增,0修改
+ @XStreamAlias("NEW_BATCH")
+ private String newBatch;
+
+ @XStreamAlias("BIZ_INFO")
+ private ImageBizInfo bizInfo ;
+
+
+ public ImageBizInfo getBizInfo() {
+ return bizInfo;
+ }
+
+ public void setBizInfo(ImageBizInfo bizInfo) {
+ this.bizInfo = bizInfo;
+ }
+
+
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public String getOrgCode() {
+ return orgCode;
+ }
+
+ public void setOrgCode(String orgCode) {
+ this.orgCode = orgCode;
+ }
+
+ public String getOrgName() {
+ return orgName;
+ }
+
+ public void setOrgName(String orgName) {
+ this.orgName = orgName;
+ }
+
+ public String getRoleCode() {
+ return roleCode;
+ }
+
+ public void setRoleCode(String roleCode) {
+ this.roleCode = roleCode;
+ }
+
+ public String getComCode() {
+ return comCode;
+ }
+
+ public void setComCode(String comCode) {
+ this.comCode = comCode;
+ }
+
+
+ public String getOneBatch() {
+ return oneBatch;
+ }
+
+ public void setOneBatch(String oneBatch) {
+ this.oneBatch = oneBatch;
+ }
+
+ public String getNewBatch() {
+ return newBatch;
+ }
+
+ public void setNewBatch(String newBatch) {
+ this.newBatch = newBatch;
+ }
+}
diff --git a/src/com/ample/icms/bean/image/ImageBatch.java b/src/com/ample/icms/bean/image/ImageBatch.java
new file mode 100644
index 000000000..c56bfd85e
--- /dev/null
+++ b/src/com/ample/icms/bean/image/ImageBatch.java
@@ -0,0 +1,115 @@
+package com.ample.icms.bean.image;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+
+@XStreamAlias("BATCH")
+public class ImageBatch {
+
+ //业务类型代码
+ @XStreamAlias("APP_CODE")
+ private String appCode ;
+
+ //业务类型名称
+ @XStreamAlias("APP_NAME")
+ private String appName ;
+
+ //业务主索引
+ @XStreamAlias("BUSI_NO")
+ private String busiNo ;
+
+ //客户身份证号
+ @XStreamAlias("IDENTITY")
+ private String identity;
+ //客户名称
+
+ @XStreamAlias("CUSTOMER_NAME")
+ private String customerName;
+
+ //业务扩展索引(非必填)
+ @XStreamAlias("CARNO")
+ private String carNo ;
+
+ //
+ @XStreamAlias("START_TIME")
+ private String startTime ;
+
+ //
+ @XStreamAlias("END_TIME")
+ private String endTime;
+
+
+ @XStreamAlias("PAGES")
+ private ImagePages pages;
+
+
+ public String getAppCode() {
+ return appCode;
+ }
+
+ public void setAppCode(String appCode) {
+ this.appCode = appCode;
+ }
+
+ public String getAppName() {
+ return appName;
+ }
+
+ public void setAppName(String appName) {
+ this.appName = appName;
+ }
+
+ public String getBusiNo() {
+ return busiNo;
+ }
+
+ public void setBusiNo(String busiNo) {
+ this.busiNo = busiNo;
+ }
+
+ public String getCarNo() {
+ return carNo;
+ }
+
+ public void setCarNo(String carNo) {
+ this.carNo = carNo;
+ }
+
+ public String getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ public String getEndTime() {
+ return endTime;
+ }
+
+ public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+
+ public ImagePages getPages() {
+ return pages;
+ }
+
+ public void setPages(ImagePages pages) {
+ this.pages = pages;
+ }
+ public String getIdentity() {
+ return identity;
+ }
+
+ public void setIdentity(String identity) {
+ this.identity = identity;
+ }
+
+ public String getCustomerName() {
+ return customerName;
+ }
+
+ public void setCustomerName(String customerName) {
+ this.customerName = customerName;
+ }
+}
diff --git a/src/com/ample/icms/bean/image/ImageBizInfo.java b/src/com/ample/icms/bean/image/ImageBizInfo.java
new file mode 100644
index 000000000..b56929e51
--- /dev/null
+++ b/src/com/ample/icms/bean/image/ImageBizInfo.java
@@ -0,0 +1,14 @@
+package com.ample.icms.bean.image;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+
+
+@XStreamAlias("BIZ_INFO")
+public class ImageBizInfo {
+ @XStreamAlias("BIZ_TYPE")
+ ImageBizType bizType;
+
+ public ImageBizInfo(ImageBizType bizType){
+ this.bizType=bizType;
+ }
+}
diff --git a/src/com/ample/icms/bean/image/ImageBizType.java b/src/com/ample/icms/bean/image/ImageBizType.java
new file mode 100644
index 000000000..f7c6f48e1
--- /dev/null
+++ b/src/com/ample/icms/bean/image/ImageBizType.java
@@ -0,0 +1,22 @@
+package com.ample.icms.bean.image;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
+
+@XStreamAlias("BIZ_TYPE")
+public class ImageBizType {
+
+ @XStreamAlias("APP_CODE")
+ @XStreamAsAttribute
+ private String appCode;
+
+ @XStreamAlias("APP_NAME")
+ @XStreamAsAttribute
+ private String appName;
+
+ public ImageBizType(String appCode, String appName) {
+ this.appCode = appCode;
+ this.appName = appName;
+ }
+
+}
diff --git a/src/com/ample/icms/bean/image/ImageMetaData.java b/src/com/ample/icms/bean/image/ImageMetaData.java
new file mode 100644
index 000000000..db19469a0
--- /dev/null
+++ b/src/com/ample/icms/bean/image/ImageMetaData.java
@@ -0,0 +1,22 @@
+package com.ample.icms.bean.image;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamImplicit;
+
+import java.util.List;
+
+@XStreamAlias("META_DATA")
+public class ImageMetaData {
+
+ @XStreamImplicit
+ private List imageBatchs ;
+
+ public List getImageBatchs() {
+ return imageBatchs;
+ }
+
+ public void setImageBatchs(List imageBatchs) {
+ this.imageBatchs = imageBatchs;
+ }
+
+}
diff --git a/src/com/ample/icms/bean/image/ImageNode.java b/src/com/ample/icms/bean/image/ImageNode.java
new file mode 100644
index 000000000..4c149c964
--- /dev/null
+++ b/src/com/ample/icms/bean/image/ImageNode.java
@@ -0,0 +1,50 @@
+package com.ample.icms.bean.image;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
+import com.thoughtworks.xstream.annotations.XStreamImplicit;
+
+import java.util.List;
+@XStreamAlias("NODE")
+public class ImageNode {
+ //影像资料归类代码
+ @XStreamAlias("ID")
+ @XStreamAsAttribute
+ private String Id ;
+
+ /**
+ * ADD:为新增
+ * CLEAN_ADD:为整个资料分类下先删除再新增
+ * MOD_ID:为根据PAGEID替换文件
+ * DEL_ID:为根据PAGEID删除文件
+ */
+ @XStreamAlias("ACTION")
+ @XStreamAsAttribute
+ private String action ;
+ @XStreamImplicit
+ private List page;
+
+ public String getId() {
+ return Id;
+ }
+
+ public void setId(String id) {
+ Id = id;
+ }
+
+ public String getAction() {
+ return action;
+ }
+
+ public void setAction(String action) {
+ this.action = action;
+ }
+
+ public List getPage() {
+ return page;
+ }
+
+ public void setPage(List page) {
+ this.page = page;
+ }
+}
diff --git a/src/com/ample/icms/bean/image/ImagePage.java b/src/com/ample/icms/bean/image/ImagePage.java
new file mode 100644
index 000000000..4c59c9cc1
--- /dev/null
+++ b/src/com/ample/icms/bean/image/ImagePage.java
@@ -0,0 +1,124 @@
+package com.ample.icms.bean.image;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
+
+@XStreamAlias("PAGE")
+public class ImagePage {
+ //文件名称
+ @XStreamAlias("FILE_NAME")
+ @XStreamAsAttribute
+ private String fileName ;
+
+ //影像代码(在需要进行制定PAGEID删除和替换影像时需要传递)
+ @XStreamAlias("PAGEID")
+ @XStreamAsAttribute
+ private String pageId ;
+
+ //影像序号(第三方系统图像编号,用于返回时告诉业务系统编号)
+ @XStreamAlias("FILE_NO")
+ @XStreamAsAttribute
+ private String fileNo ;
+
+ //上传用户编号
+ @XStreamAlias("UP_USER")
+ @XStreamAsAttribute
+ private String upUser ;
+
+ //上传用户名称
+ @XStreamAlias("UP_USER_NAME")
+ @XStreamAsAttribute
+ private String upUserName ;
+
+ //上传用户机构编号
+ @XStreamAlias("UP_ORG")
+ @XStreamAsAttribute
+ private String upOrg ;
+
+ //上传用户机构名称
+ @XStreamAlias("UP_ORGNAME")
+ @XStreamAsAttribute
+ private String upOrgName ;
+
+ //上传时间
+ @XStreamAlias("UP_TIME")
+ @XStreamAsAttribute
+ private String upTime ;
+
+ //备注
+ @XStreamAlias("REMARK")
+ @XStreamAsAttribute
+ private String remark ;
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public String getPageId() {
+ return pageId;
+ }
+
+ public void setPageId(String pageId) {
+ this.pageId = pageId;
+ }
+
+ public String getFileNo() {
+ return fileNo;
+ }
+
+ public void setFileNo(String fileNo) {
+ this.fileNo = fileNo;
+ }
+
+ public String getUpUser() {
+ return upUser;
+ }
+
+ public void setUpUser(String upUser) {
+ this.upUser = upUser;
+ }
+
+ public String getUpUserName() {
+ return upUserName;
+ }
+
+ public void setUpUserName(String upUserName) {
+ this.upUserName = upUserName;
+ }
+
+ public String getUpOrg() {
+ return upOrg;
+ }
+
+ public void setUpOrg(String upOrg) {
+ this.upOrg = upOrg;
+ }
+
+ public String getUpOrgName() {
+ return upOrgName;
+ }
+
+ public void setUpOrgName(String upOrgName) {
+ this.upOrgName = upOrgName;
+ }
+
+ public String getUpTime() {
+ return upTime;
+ }
+
+ public void setUpTime(String upTime) {
+ this.upTime = upTime;
+ }
+
+ public String getRemark() {
+ return remark;
+ }
+
+ public void setRemark(String remark) {
+ this.remark = remark;
+ }
+}
diff --git a/src/com/ample/icms/bean/image/ImagePages.java b/src/com/ample/icms/bean/image/ImagePages.java
new file mode 100644
index 000000000..337480d4c
--- /dev/null
+++ b/src/com/ample/icms/bean/image/ImagePages.java
@@ -0,0 +1,20 @@
+package com.ample.icms.bean.image;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamImplicit;
+
+import java.util.List;
+
+@XStreamAlias("PAGES")
+public class ImagePages {
+ @XStreamImplicit
+ private List nodes;
+
+ public List getNodes() {
+ return nodes;
+ }
+
+ public void setNodes(List nodes) {
+ this.nodes = nodes;
+ }
+}
diff --git a/src/com/ample/icms/bean/image/ImageRoot.java b/src/com/ample/icms/bean/image/ImageRoot.java
new file mode 100644
index 000000000..c736dbb42
--- /dev/null
+++ b/src/com/ample/icms/bean/image/ImageRoot.java
@@ -0,0 +1,16 @@
+package com.ample.icms.bean.image;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+
+@XStreamAlias("root")
+public class ImageRoot {
+ @XStreamAlias("BASE_DATA")
+ private ImageBaseData imageBaseData;
+ @XStreamAlias("META_DATA")
+ private ImageMetaData imageMetaData;
+
+ public ImageRoot(ImageBaseData imageBaseData, ImageMetaData imageMetaData) {
+ this.imageBaseData = imageBaseData;
+ this.imageMetaData = imageMetaData;
+ }
+}
diff --git a/src/com/ample/icms/bean/image/ImageTree.java b/src/com/ample/icms/bean/image/ImageTree.java
new file mode 100644
index 000000000..43103650c
--- /dev/null
+++ b/src/com/ample/icms/bean/image/ImageTree.java
@@ -0,0 +1,25 @@
+package com.ample.icms.bean.image;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
+
+import java.util.List;
+
+@XStreamAlias("VTREE")
+public class ImageTree {
+
+ @XStreamAlias("APP_CODE")
+ @XStreamAsAttribute
+ private String appCode ;
+
+ @XStreamAlias("APP_NAME")
+ @XStreamAsAttribute
+ private String appName ;
+
+ private List images;
+
+ public ImageTree(List images) {
+ this.images = images;
+ }
+
+}
diff --git a/src/com/ample/icms/check/ImageCheck.java b/src/com/ample/icms/check/ImageCheck.java
new file mode 100644
index 000000000..9fa850a6a
--- /dev/null
+++ b/src/com/ample/icms/check/ImageCheck.java
@@ -0,0 +1,40 @@
+package com.ample.icms.check;
+
+import com.ample.icms.service.ImageService;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+
+public class ImageCheck extends ImageService {
+ public String getResult() throws DocumentException {
+ this.setCode("ECM0013");
+ String result = this.doPost();
+ return result;
+ }
+ public String resultAnalysis(String result) throws DocumentException {
+ String falg = "false";
+ String responseMsg = "";
+ if("0000".equals(result)){
+ responseMsg = "连接影像系统失败,请及时联系管理员!";
+ }else {
+ Document dom = DocumentHelper.parseText(result);
+ Element root = dom.getRootElement();
+ String responseCode = root.element("RESPONSE_CODE").getTextTrim();
+ String batchVer = root.element("BATCH_VER").getTextTrim();
+ if("200".equals(responseCode)){
+ falg = "true";
+ responseMsg = "资料已提交";
+ }
+ if("400".equals(responseCode)){
+ if("0".equals(batchVer)){
+ responseMsg = "资料未上传";
+ }else {
+ responseMsg = root.element("RESPONSE_MSG").getTextTrim();
+ }
+
+ }
+ }
+ return falg+"@"+responseMsg;
+ }
+}
diff --git a/src/com/ample/icms/init/IcmsRelationInit.java b/src/com/ample/icms/init/IcmsRelationInit.java
new file mode 100644
index 000000000..db3f8e840
--- /dev/null
+++ b/src/com/ample/icms/init/IcmsRelationInit.java
@@ -0,0 +1,31 @@
+package com.ample.icms.init;
+
+import com.amarsoft.are.jbo.BizObject;
+import com.amarsoft.are.jbo.JBOFactory;
+import com.amarsoft.are.jbo.JBOTransaction;
+import com.amarsoft.awe.util.ASResultSet;
+import com.amarsoft.awe.util.SqlObject;
+import com.amarsoft.awe.util.Transaction;
+import com.tenwa.flow.baseBussion.BaseBussiness;
+import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP;
+
+public class IcmsRelationInit extends BaseBussiness {
+ @Override
+ public Object run(Transaction Sqlca) throws Exception {
+ JBOTransaction tx = Sqlca.getTransaction();
+ BizObject boLPIT = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME,tx).createQuery("flowunid=:flowunid").setParameter("flowunid",this.getAttribute("ObjectNo").toString()).getSingleResult(false);
+ String projectNo = boLPIT.getAttribute("project_no").toString();
+ String productId = boLPIT.getAttribute("product_id").toString();
+ SqlObject sql_icms = new SqlObject("select flowno,app_code,app_name from icms_prd_rela where productid='"+productId+"' group by flowno,app_code");
+ ASResultSet rs = Sqlca.getASResultSet(sql_icms);
+ while (rs.next()){
+ String flowNo = rs.getString("flowno");
+ String appCode = rs.getString("app_code");
+ String appName = rs.getString("app_name");
+ SqlObject sql_rela = new SqlObject("insert into icms_rela (id,project_no,flow_no,app_code,app_name) values(REPLACE(UUID(), '-', ''),'"+projectNo+"','"+flowNo+"','"+appCode+"','"+appName+"')");
+ Sqlca.executeSQL(sql_rela);
+ }
+ String sMessage="true";
+ return sMessage;
+ }
+}
diff --git a/src/com/ample/icms/query/ImageCount.java b/src/com/ample/icms/query/ImageCount.java
new file mode 100644
index 000000000..8e6b59814
--- /dev/null
+++ b/src/com/ample/icms/query/ImageCount.java
@@ -0,0 +1,13 @@
+package com.ample.icms.query;
+
+import com.ample.icms.service.ImageService;
+
+public class ImageCount extends ImageService {
+
+ public String getResult(){
+ this.setCode("ECM0006");
+ String result = this.doPost();
+ return result;
+ }
+
+}
diff --git a/src/com/ample/icms/query/ImageInfo.java b/src/com/ample/icms/query/ImageInfo.java
new file mode 100644
index 000000000..056f0b14b
--- /dev/null
+++ b/src/com/ample/icms/query/ImageInfo.java
@@ -0,0 +1,13 @@
+package com.ample.icms.query;
+
+import com.ample.icms.service.ImageService;
+
+public class ImageInfo extends ImageService {
+
+ public String getResult(){
+ this.setCode("ECM0010");
+ String result = this.doPost();
+ return result;
+ }
+
+}
diff --git a/src/com/ample/icms/query/ImageQuery.java b/src/com/ample/icms/query/ImageQuery.java
new file mode 100644
index 000000000..de4079208
--- /dev/null
+++ b/src/com/ample/icms/query/ImageQuery.java
@@ -0,0 +1,59 @@
+package com.ample.icms.query;
+
+import com.alibaba.fastjson.JSONArray;
+import com.ample.icms.bean.image.ImageBatch;
+import com.ample.icms.bean.image.ImageMetaData;
+import com.ample.icms.bean.image.ImageRoot;
+import com.ample.icms.service.ImageService;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ImageQuery extends ImageService {
+ private String projectId;
+ private JSONArray allAppInfoJson;
+ @Override
+ public ImageRoot createData() throws Exception {
+ addBaseData();
+ List batchs = new ArrayList<>();
+ if(appCode==null){
+ if(allAppInfoJson.size()==0){
+ System.out.println("未找到对应的appCode信息");
+ return null;
+ }
+ for(int i=0;i copyFile() throws Exception {
+ List files = new ArrayList<>();
+ BizObjectManager bom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME);
+ List bos = bom.createQuery("sign_type='COMPLETE' and file_flag='yes' and project_id=:projectId and flow_unid=:flowUnid")
+ .setParameter("projectId",projectId).setParameter("flowUnid",flowUnid).getResultList(false);
+ for(BizObject bo : bos){
+ String filePath = bo.getAttribute("fullpath").toString();
+ File file = new File(filePath);
+ files.add(file);
+ }
+ //todo 加上xml文件
+ createXMl();
+ File fileXML = new File("xmlpath");
+ files.add(fileXML);
+ return files;
+ }
+ public void createXMl() throws Exception {
+ String appCode = "BQCW-000010";
+ String appName = "签约文件";
+ this.setAppCode(appCode);
+ this.setAppName(appName);
+ this.setBusiNo(flowUnid);
+ String xml = getRequestXML();
+ SAXReader saxReader = new SAXReader();
+ Document document;
+ try {
+ document = saxReader.read(new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8)));
+ OutputFormat format = OutputFormat.createPrettyPrint();
+ format.setEncoding("UTF-8");
+ XMLWriter writer = new XMLWriter(new FileWriter(new File(PropertiesUtil.get("fileSavePathTemp")+"/"+flowUnid+".xml")),format);
+ writer.write(document);
+ writer.close();
+ } catch (DocumentException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+}
diff --git a/src/com/ample/icms/scan/ImageOcr.java b/src/com/ample/icms/scan/ImageOcr.java
new file mode 100644
index 000000000..57c3165ad
--- /dev/null
+++ b/src/com/ample/icms/scan/ImageOcr.java
@@ -0,0 +1,163 @@
+package com.ample.icms.scan;
+
+import com.ample.icms.util.PropertiesUtil;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import sun.misc.BASE64Encoder;
+
+import java.io.*;
+import java.net.URL;
+
+public class ImageOcr {
+ public enum ocrType{
+ id_card,bank_card_ocr,vehicle_invoice_ocr
+ }
+ public String doPost(String fileUrl,ocrType ocrType) {
+ String responseResult = null;
+ //图像以base64编码传输方式
+ try {
+ responseResult = imagePostBybase64(PropertiesUtil.get("OcrUrl")+ocrType, fileUrl);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return responseResult;
+ }
+
+
+ public String imagePostBybase64(String httpUrl, String destFile) {
+ HttpPost httpPost = new HttpPost(httpUrl);
+ CloseableHttpClient httpclient = HttpClients.createDefault();
+ CloseableHttpResponse responseRes = null;
+ String resultStr = null;
+ try {
+ //image参数为在服务端获取的key通过image这个参数可以获取到传递的字节流,这里不一定就是image,你的服务端使用什么这里就对应给出什么参数即可
+ StringEntity stringEntity = new StringEntity("image=" + getImgStrByUrl(destFile,false));
+ stringEntity.setContentType("application/x-www-form-urlencoded");
+ httpPost.setEntity(stringEntity);
+ responseRes = httpclient.execute(httpPost);
+ int status = responseRes.getStatusLine().getStatusCode();
+ if (status == 200) {
+ byte[] content;
+ try {
+ content = getContent(responseRes);
+ resultStr = new String(content, "utf-8");
+ System.out.println("httpPost返回的结果==:" + resultStr);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ } catch (ClientProtocolException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ httpclient.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ if (resultStr != null) {
+ return resultStr;
+ } else {
+ return "";
+ }
+ }
+
+
+ /**
+ * 将图片转换成Base64编码
+ *
+ * @param imgFile 待处理图片
+ * @return
+ */
+ public String getImgStrByUrl(String imgFile,boolean isLocal) throws IOException {
+ //将图片文件转化为字节数组字符串,并对其进行Base64编码处理
+ InputStream in = null;
+ byte[] data = null;
+ if(isLocal){
+ data = getImageFromLocalByUrl(imgFile);
+ }else{
+ data = getImageFromNetByUrl(imgFile);
+ }
+ BASE64Encoder encoder = new BASE64Encoder();
+ return encoder.encode(data);
+ }
+
+ private byte[] getContent(HttpResponse response) throws IOException {
+ InputStream result = null;
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ try {
+ HttpEntity resEntity = response.getEntity();
+ if (resEntity != null) {
+ result = resEntity.getContent();
+ return readInputStream(result);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new IOException("getContent异常", e);
+ } finally {
+ out.close();
+ if (result != null) {
+ result.close();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * 根据地址获得数据的字节流
+ *
+ * @param strUrl
+ * 本地连接地址
+ * @return
+ */
+ public byte[] getImageFromLocalByUrl(String strUrl) throws IOException {
+ File imageFile = new File(strUrl);
+ InputStream inStream = new FileInputStream(imageFile);
+ byte[] btImg = readInputStream(inStream);//得到图片的二进制数据
+ return btImg;
+ }
+ /**
+ * 根据地址获得数据的字节流(相当于 URL.openStream()源码)
+ *
+ * @param strUrl
+ * 网络连接地址
+ * @return
+ */
+ public byte[] getImageFromNetByUrl(String strUrl) throws IOException {
+ URL url = new URL(strUrl);
+ /*HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+ conn.setRequestMethod("GET");
+ conn.setConnectTimeout(5 * 1000);
+ InputStream inStream = conn.getInputStream();// 通过输入流获取图片数据*/
+ InputStream inStream = url.openStream();
+ byte[] btImg = readInputStream(inStream);// 得到图片的二进制数据
+ return btImg;
+ }
+ /**
+ * 从输入流中获取数据
+ *
+ * @param inStream
+ * 输入流
+ * @return
+ * @throws Exception
+ */
+ public byte[] readInputStream(InputStream inStream) throws IOException {
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[10240];
+ int len = 0;
+ while ((len = inStream.read(buffer)) != -1) {
+ outStream.write(buffer, 0, len);
+ }
+ inStream.close();
+ return outStream.toByteArray();
+ }
+}
diff --git a/src/com/ample/icms/scan/ImageScan.java b/src/com/ample/icms/scan/ImageScan.java
new file mode 100644
index 000000000..f3e1865cc
--- /dev/null
+++ b/src/com/ample/icms/scan/ImageScan.java
@@ -0,0 +1,27 @@
+package com.ample.icms.scan;
+
+import com.ample.icms.bean.image.ImageBaseData;
+import com.ample.icms.service.ImageService;
+
+public class ImageScan extends ImageService {
+ private String oneBatch;
+ @Override
+ public void addBaseData(){
+ base = new ImageBaseData();
+ base.setUserCode("admin");
+ base.setUserName("admin");
+ base.setOrgCode("0005");
+ base.setComCode("0005");
+ base.setOrgName("安鹏国际融资租赁(深圳)有限公司");
+ base.setRoleCode("market");
+ base.setOneBatch(oneBatch);
+ }
+ public String getOneBatch() {
+ return oneBatch;
+ }
+
+ public void setOneBatch(String oneBatch) {
+ this.oneBatch = oneBatch;
+ }
+
+}
diff --git a/src/com/ample/icms/scan/ImageUpload.java b/src/com/ample/icms/scan/ImageUpload.java
new file mode 100644
index 000000000..0d86cdd4f
--- /dev/null
+++ b/src/com/ample/icms/scan/ImageUpload.java
@@ -0,0 +1,88 @@
+package com.ample.icms.scan;
+
+import com.ample.icms.bean.image.*;
+import com.ample.icms.service.ImageService;
+import com.ample.icms.util.PropertiesUtil;
+import com.sunyard.insurance.ecm.socket.client.AutoScanApi;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.SAXReader;
+import org.dom4j.io.XMLWriter;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ImageUpload extends ImageService {
+ private String nodeId;
+ private List pageList;
+ private static final String FileSavePath = PropertiesUtil.get("fileSavePathTemp");
+
+ public List addNodes(List pages) throws Exception {
+ ImageNode node = new ImageNode();
+ //融资租赁合同套系
+ node.setId(nodeId);
+ node.setAction("ADD");
+ node.setPage(pages);
+ List nodes = new ArrayList<>();
+ nodes.add(node);
+ return nodes;
+ }
+ public ImageRoot createData() throws Exception {
+ addBaseData();
+ ImagePages pages = addPages(addNodes(pageList));
+ List batchs = new ArrayList<>();
+ batchs.add(addBatch(appCode,appName,busiNo,pages));
+ ImageMetaData metaData = addMetaData(batchs);
+ ImageRoot root = new ImageRoot(base,metaData);
+ return root;
+ }
+ public String doUpload(String zipPath) throws Exception {
+ String result = "0";
+ AutoScanApi autoScanApi = new AutoScanApi(PropertiesUtil.get("service_ip"),8088,PropertiesUtil.get("secret_id")+"#"+PropertiesUtil.get("secret_key"));
+ result = autoScanApi.ScanImageFile(appCode, zipPath);
+ return result;
+ }
+
+ public String createXMl() throws Exception {
+ String xml = getRequestXML();
+ SAXReader saxReader = new SAXReader();
+ Document document;
+ try {
+ document = saxReader.read(new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8)));
+ OutputFormat format = OutputFormat.createPrettyPrint();
+ format.setEncoding("UTF-8");
+ XMLWriter writer = new XMLWriter(new FileWriter(new File(FileSavePath+"/busi.xml")),format);
+ writer.write(document);
+ writer.close();
+ return FileSavePath+"/busi.xml";
+ } catch (DocumentException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return "error";
+ }
+
+
+ public List getPageList() {
+ return pageList;
+ }
+
+ public void setPageList(List pageList) {
+ this.pageList = pageList;
+ }
+
+ public String getNodeId() {
+ return nodeId;
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+}
diff --git a/src/com/ample/icms/service/ImageInfoService.java b/src/com/ample/icms/service/ImageInfoService.java
new file mode 100644
index 000000000..cd6bef407
--- /dev/null
+++ b/src/com/ample/icms/service/ImageInfoService.java
@@ -0,0 +1,100 @@
+package com.ample.icms.service;
+
+import com.amarsoft.are.jbo.JBOException;
+import com.amarsoft.are.jbo.JBOTransaction;
+import com.ample.icms.query.ImageInfo;
+import com.ample.icms.util.GetInfoUtil;
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+
+import java.sql.SQLException;
+
+public class ImageInfoService {
+ private String projectId;
+ private String contractId;
+ private String projectNo;
+ private String flowNo;
+
+ public String getFileUrl(String folderNo ,JBOTransaction tx) throws Exception {
+ String result = this.getResponseResult(tx);
+ //APZLJJ000400 APZLJJ000060
+ String FileUrl = this.getFileUrlByResultAnalysis(result,folderNo);
+ return FileUrl;
+ }
+ public String getResponseResult(JBOTransaction tx) throws SQLException, JBOException {
+ GetInfoUtil gif = new GetInfoUtil();
+ this.setProjectNo(gif.getProjectNoByContractId(contractId,tx));
+ String appInfo = gif.getAppInfoByProjectNo(projectNo,flowNo,tx);
+ String[] app = appInfo.split("@");
+ String appCode= app[0];
+ String appName= app[1];
+
+ ImageInfo ii = new ImageInfo();
+ ii.setAppCode(appCode);
+ ii.setAppName(appName);
+ ii.setBusiNo(projectNo);
+ String result = ii.getResult();
+ return result;
+ }
+
+ public String getFileUrlByResultAnalysis(String result,String folderCode) throws Exception {
+ if("0000".equals(result)){
+ throw new Exception("连接影像系统失败,请及时联系管理员!");
+ }else {
+ Document dom = DocumentHelper.parseText(result);
+ Element root = dom.getRootElement();
+ Element node = (Element) root.selectSingleNode("//NODE[@ID='"+folderCode+"']");
+ /*List nodes = root.element("SYD").element("doc").element("VTREE").elements("NODE");
+ for (Iterator it = nodes.iterator(); it.hasNext();){
+ Element elm = (Element) it.next();
+ }*/
+ if(node==null){
+ throw new Exception("未找到对应的文件信息");
+ }
+ String pageId = node.element("LEAF").getTextTrim();
+ if("".equals(pageId)||pageId==null){
+ throw new Exception("未找到对应的图片信息");
+ }
+ Element page = (Element) root.selectSingleNode("//PAGE[@PAGEID='"+pageId+"']");
+ String pageUrl = page.attributeValue("PAGE_URL");
+ System.out.println("OCR文件路径:"+pageUrl);
+ return pageUrl;
+ }
+
+ }
+
+
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getProjectNo() {
+ return projectNo;
+ }
+
+ public void setProjectNo(String projectNo) {
+ this.projectNo = projectNo;
+ }
+
+ public String getFlowNo() {
+ return flowNo;
+ }
+
+ public void setFlowNo(String flowNo) {
+ this.flowNo = flowNo;
+ }
+
+ public String getContractId() {
+ return contractId;
+ }
+
+ public void setContractId(String contractId) {
+ this.contractId = contractId;
+ }
+}
diff --git a/src/com/ample/icms/service/ImageOcrService.java b/src/com/ample/icms/service/ImageOcrService.java
new file mode 100644
index 000000000..60122b998
--- /dev/null
+++ b/src/com/ample/icms/service/ImageOcrService.java
@@ -0,0 +1,58 @@
+package com.ample.icms.service;
+
+import com.amarsoft.are.jbo.JBOTransaction;
+import com.ample.icms.scan.ImageOcr;
+
+public class ImageOcrService {
+ private String projectId;
+ private String contractId;
+ private String projectNo;
+ private String flowNo;
+ public String invoiceOrcOfInvoice(JBOTransaction tx) throws Exception {
+
+ return this.invoiceOrc("APZLJJ000060",ImageOcr.ocrType.vehicle_invoice_ocr,tx);
+ }
+ public String invoiceOrc(String floder,ImageOcr.ocrType ocrType,JBOTransaction tx) throws Exception {
+ ImageInfoService iis = new ImageInfoService();
+ iis.setContractId(contractId);
+ iis.setFlowNo(flowNo);
+ String fileUrl = iis.getFileUrl(floder,tx);
+
+ ImageOcr io = new ImageOcr();
+ String result = io.doPost(fileUrl, ocrType);
+
+ return result;
+ }
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getProjectNo() {
+ return projectNo;
+ }
+
+ public void setProjectNo(String projectNo) {
+ this.projectNo = projectNo;
+ }
+
+ public String getFlowNo() {
+ return flowNo;
+ }
+
+ public void setFlowNo(String flowNo) {
+ this.flowNo = flowNo;
+ }
+
+ public String getContractId() {
+ return contractId;
+ }
+
+ public void setContractId(String contractId) {
+ this.contractId = contractId;
+ }
+
+}
diff --git a/src/com/ample/icms/service/ImageQueryService.java b/src/com/ample/icms/service/ImageQueryService.java
new file mode 100644
index 000000000..6c5482d51
--- /dev/null
+++ b/src/com/ample/icms/service/ImageQueryService.java
@@ -0,0 +1,120 @@
+package com.ample.icms.service;
+
+import com.alibaba.fastjson.JSONArray;
+import com.amarsoft.are.jbo.JBOTransaction;
+import com.amarsoft.awe.util.Transaction;
+import com.ample.icms.query.ImageQuery;
+import com.ample.icms.util.GetInfoUtil;
+
+public class ImageQueryService {
+ private String code;
+ private String projectId;
+ private String flowUnid;
+ private String userCode;
+ private String userName;
+ private String projectNo;
+ private String flowNo;
+ public String getRequestParamByFlowNoRJM() throws Exception {
+ GetInfoUtil gif = new GetInfoUtil();
+ String projectNo = gif.getProjectNoByFlowUnid(flowUnid);
+ String app = gif.getAppInfoByProjectNo(projectNo,flowNo);
+ String[] appInfo = app.split("@");
+ ImageQuery iq = new ImageQuery();
+ iq.setBusiNo(projectNo);
+ if("0000".equals(appInfo[0])){
+ return app;
+ }
+ iq.setAppCode(appInfo[0]);
+ iq.setAppName(appInfo[1]);
+ iq.setUserCode(userCode);
+ iq.setUserName(userName);
+ return iq.transformXMLtoParam(this.code,iq.getRequestXML());
+ }
+ public String getRequestParamByFlowUnidRJM() throws Exception {
+ GetInfoUtil gif = new GetInfoUtil();
+ String projectNo = gif.getProjectNoByFlowUnid(flowUnid);
+ String app = gif.getAppInfoByFlowUnid(flowUnid);
+ String[] appInfo = app.split("@");
+ ImageQuery iq = new ImageQuery();
+ iq.setBusiNo(projectNo);
+ if("0000".equals(appInfo[0])){
+ return app;
+ }
+ iq.setAppCode(appInfo[0]);
+ iq.setAppName(appInfo[1]);
+ iq.setUserCode(userCode);
+ iq.setUserName(userName);
+ return iq.transformXMLtoParam(this.code,iq.getRequestXML());
+ }
+ public String getRequestParamByProjectIdJMT(JBOTransaction tx) throws Exception {
+ Transaction Sqlca = Transaction.createTransaction(tx);
+ GetInfoUtil gif = new GetInfoUtil();
+ String projectNo = gif.getProjectNoByProjectId(projectId,Sqlca);
+ JSONArray ja = gif.getAllAppInfoJsonByProjectId(projectId,Sqlca);
+ if(ja==null){
+ return "error";
+ }
+ ImageQuery iq = new ImageQuery();
+ iq.setBusiNo(projectNo);
+ iq.setAllAppInfoJson(ja);
+ iq.setUserCode(userCode);
+ iq.setUserName(userName);
+ return iq.transformXMLtoParam(this.code,iq.getRequestXML());
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getFlowUnid() {
+ return flowUnid;
+ }
+
+ public void setFlowUnid(String flowUnid) {
+ this.flowUnid = flowUnid;
+ }
+
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public String getProjectNo() {
+ return projectNo;
+ }
+
+ public void setProjectNo(String projectNo) {
+ this.projectNo = projectNo;
+ }
+
+ public String getFlowNo() {
+ return flowNo;
+ }
+
+ public void setFlowNo(String flowNo) {
+ this.flowNo = flowNo;
+ }
+}
diff --git a/src/com/ample/icms/service/ImageService.java b/src/com/ample/icms/service/ImageService.java
new file mode 100644
index 000000000..2cc643002
--- /dev/null
+++ b/src/com/ample/icms/service/ImageService.java
@@ -0,0 +1,225 @@
+package com.ample.icms.service;
+
+import com.ample.icms.bean.image.*;
+import com.ample.icms.util.PropertiesUtil;
+import com.sunyard.insurance.encode.client.EncodeAccessParam;
+import com.thoughtworks.xstream.XStream;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.httpclient.SimpleHttpConnectionManager;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.log4j.Logger;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+public abstract class ImageService {
+ public Logger logger = Logger.getLogger(this.getClass());
+ protected String allAppInfo;
+ protected String userCode;
+ protected String userName;
+ protected String identity;
+ protected String customerName ;
+ protected String appCode;
+ protected String appName;
+ protected String code;
+ protected String busiNo;
+ protected ImageBaseData base;
+ protected ImageBatch batch;
+ protected ImageMetaData metaData;
+
+ public void addBaseData(){
+ base = new ImageBaseData();
+ if("".equals(userCode)||userCode==null){
+ userCode = "system";
+ userName = "system";
+ }
+ base.setUserCode(userCode);
+ base.setUserName(userName);
+ base.setOrgCode("0005");
+ base.setComCode("0005");
+ base.setOrgName("安鹏国际融资租赁(深圳)有限公司");
+ base.setRoleCode("market");
+ }
+
+ public void addNode(String id ,String action ,List page){
+ ImageNode node = new ImageNode();
+ node.setId(id);
+ node.setAction(action);
+ node.setPage(page);
+ }
+ public ImagePages addPages(List nodes){
+ ImagePages pages = new ImagePages();
+ pages.setNodes(nodes);
+ return pages;
+ }
+ public ImageBatch addBatch(String appCode, String appName, String busiNo, ImagePages pages) {
+ ImageBatch batch = new ImageBatch();
+ batch.setAppCode(appCode);
+ batch.setAppName(appName);
+ batch.setBusiNo(busiNo);
+ batch.setPages(pages);
+ return batch;
+ }
+ public ImageMetaData addMetaData(List batchs){
+ ImageMetaData metaData = new ImageMetaData();
+ metaData.setImageBatchs(batchs);
+ return metaData;
+ }
+ public ImageRoot createData() throws Exception {
+ addBaseData();
+ List batchs = new ArrayList<>();
+ batchs.add(addBatch(appCode,appName,busiNo,null));
+ ImageMetaData metaData = addMetaData(batchs);
+ ImageRoot root = new ImageRoot(base,metaData);
+ return root;
+ }
+ public String getRequestXML() throws Exception {
+ XStream xs = new XStream();
+ xs.processAnnotations(ImageRoot.class);
+ String xml = xs.toXML(createData());
+ //XStream的老毛病,转译会将_转成__,所以在这里转回来
+ xml = xml.replace("__","_");
+ xml = "\n" + xml;
+ logger.info("\n"+xml+"\n");
+ return xml;
+ }
+
+ public String transformXMLtoParam(String code ,String xml) throws Exception {
+ int time = Integer.parseInt(PropertiesUtil.get("useful_life"));
+ String secretKey = PropertiesUtil.get("secret_key");
+ String param = EncodeAccessParam.getEncodeParam("format=xml&code="+code+"&xml="+xml, time, secretKey);
+ return param;
+ }
+
+ public String doPost(){
+ String result="0000";
+ PostMethod postMethod = null;
+ HttpClient httpClient = null;
+ try {
+ postMethod = new PostMethod(PropertiesUtil.get("url"));
+ // 设置格式
+ postMethod.getParams().setContentCharset("UTF-8");
+ postMethod.setParameter("data", getRequestParam());
+ // ICMS影像系统通过referer来验证白名单,所以必须将ip填写在这里
+ //todo
+ postMethod.setRequestHeader("Referer", PropertiesUtil.get("license_ip"));
+ httpClient = new HttpClient();
+ // 执行postMethod
+ int statusCode = httpClient.executeMethod(postMethod);
+ System.out.println("结果状态码:"+statusCode);
+ if (statusCode == HttpStatus.SC_OK) {
+ byte[] bodydata = postMethod.getResponseBody();
+ //取得返回值
+ result = new String(bodydata, "UTF-8");
+ System.out.println("影像系统返回结果:" + result);
+ }
+ }catch (HttpException e) {
+ //协议发生异常,URL不合法请检查URL!
+ e.printStackTrace();
+ } catch (IOException e) {
+ //请检查网络是否通畅,检查网线是否插好!
+ e.printStackTrace();
+ } catch(Exception e){
+ e.printStackTrace();
+ }finally {
+ if (postMethod != null) {
+ try {
+ postMethod.releaseConnection();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ if (httpClient != null) {
+ try {
+ ((SimpleHttpConnectionManager) httpClient.getHttpConnectionManager()).shutdown();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ httpClient = null;
+ }
+ }
+ return result;
+ }
+
+ public String getRequestUrl(){
+ return PropertiesUtil.get("url");
+ }
+
+ public String getRequestParam() throws Exception {
+ return transformXMLtoParam(this.code,this.getRequestXML());
+ }
+
+ public String getAppCode() {
+ return appCode;
+ }
+
+ public void setAppCode(String appCode) {
+ this.appCode = appCode;
+ }
+
+ public String getAppName() {
+ return appName;
+ }
+
+ public void setAppName(String appName) {
+ this.appName = appName;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public String getBusiNo() {
+ return busiNo;
+ }
+
+ public void setBusiNo(String busiNo) {
+ this.busiNo = busiNo;
+ }
+ public String getAllAppInfo() {
+ return allAppInfo;
+ }
+
+ public void setAllAppInfo(String allAppInfo) {
+ this.allAppInfo = allAppInfo;
+ }
+
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public String getIdentity() {
+ return identity;
+ }
+
+ public void setIdentity(String identity) {
+ this.identity = identity;
+ }
+
+ public String getCustomerName() {
+ return customerName;
+ }
+
+ public void setCustomerName(String customerName) {
+ this.customerName = customerName;
+ }
+}
diff --git a/src/com/ample/icms/service/ImageUploadService.java b/src/com/ample/icms/service/ImageUploadService.java
new file mode 100644
index 000000000..e8ed7891b
--- /dev/null
+++ b/src/com/ample/icms/service/ImageUploadService.java
@@ -0,0 +1,209 @@
+package com.ample.icms.service;
+
+import com.amarsoft.are.jbo.*;
+import com.amarsoft.are.util.StringFunction;
+import com.amarsoft.dict.als.manage.NameManager;
+import com.ample.icms.bean.image.ImagePage;
+import com.ample.icms.query.ImageCount;
+import com.ample.icms.scan.ImageUpload;
+import com.ample.icms.util.GetInfoUtil;
+import com.ample.icms.util.PropertiesUtil;
+import com.tenwa.officetempalte.exportcallback.impl.ZipUtils;
+import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST;
+import org.apache.commons.io.FileUtils;
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ImageUploadService {
+ private String projectId;
+ private String flowUnid;
+ private String flowNo;
+ private String appCode;
+ private String appName;
+ private String projectNo;
+ private final String FILE_SAVE_PATH_TEMP = PropertiesUtil.get("fileSavePathTemp");
+ public List getFileBo(JBOTransaction tx) throws JBOException {
+ BizObjectManager bom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME,tx);
+ List bos = bom.createQuery("sign_type='COMPLETE' and file_flag='yes' and project_id=:projectId and flow_unid=:flowUnid")
+ .setParameter("projectId",projectId).setParameter("flowUnid",flowUnid).getResultList(false);
+ return bos;
+ }
+ public List getFile(List bos) throws Exception {
+ List files = new ArrayList<>();
+ for(BizObject bo : bos){
+ String fileName = bo.getAttribute("filename").toString();
+ String filePath = bo.getAttribute("fullpath").toString();
+
+ File srcFile = new File(filePath);
+ File destFile = new File(FILE_SAVE_PATH_TEMP+"/"+fileName);
+ if(!destFile.getParentFile().exists()){
+ destFile.getParentFile().mkdirs();
+ }
+ FileUtils.copyFile(srcFile, destFile, true);
+ files.add(destFile);
+ }
+ return files;
+ }
+ public List getPages(List bos) throws Exception {
+ List pages = new ArrayList<>();
+ for(BizObject bo : bos){
+ String fileName = bo.getAttribute("filename").toString();
+ String inputUserId = bo.getAttribute("inputuserid").toString();
+ String inputOrgId = bo.getAttribute("inputorgid").toString();
+
+ ImagePage page = new ImagePage();
+ page.setFileName(fileName);
+ page.setUpUser(inputUserId);
+ page.setUpUserName(NameManager.getUserName(inputUserId));
+ page.setUpOrg(inputOrgId);
+ page.setUpOrgName(NameManager.getOrgName(inputOrgId));
+ page.setUpTime(StringFunction.getTodayNow());
+ pages.add(page);
+ }
+ return pages;
+ }
+ public void getAppInfo(JBOTransaction tx) throws Exception {
+ GetInfoUtil gif = new GetInfoUtil();
+ String appInfo = gif.getAppInfoByProjectNo(projectNo,flowNo,tx);
+ String[] app = appInfo.split("@");
+ this.setAppCode(app[0]);
+ this.setAppName(app[1]);
+ }
+ public String upload(JBOTransaction tx) throws Exception {
+ /**
+ * 1.判断是否有合同套系这个文件分类
+ * 2.找到对应的文件,并复制过去
+ * 3.生成对应的xml
+ * 4.打包上传
+ * 5.删除复制文件和打包文件
+ */
+ this.getAppInfo(tx);
+ String fileCode = "APZLJJ000400";//APZLJJ000400为其它,APZLJJ000080为合同套系,在影像系统查找,核心系统已经没有对应信息
+ if(this.isHasContractFolder()){
+ fileCode = "APZLJJ000080";
+ }
+ ImageUpload imageUp = new ImageUpload();
+ imageUp.setAppCode(appCode);
+ imageUp.setAppName(appName);
+ imageUp.setBusiNo(projectNo);
+ imageUp.setNodeId(fileCode);
+ List boList = this.getFileBo(tx);
+ List files = this.getFile(boList);
+ List pageList = this.getPages(boList);
+ imageUp.setPageList(pageList);
+ String xmlUrl = imageUp.createXMl();
+
+ files.add(new File(xmlUrl));
+ String zipUrl = FILE_SAVE_PATH_TEMP+"/"+flowUnid+".zip";
+ FileOutputStream fos = new FileOutputStream(new File(zipUrl));
+ ZipUtils zdo = new ZipUtils();
+ zdo.toZip(files,fos);
+ String result = imageUp.doUpload(zipUrl);
+ String returnCode = result.substring(0,result.indexOf("@"));
+ String returnMsg = result.substring(result.indexOf("@")+1,result.length());
+ deleteTemp();
+ return returnMsg;
+ }
+ /**
+ * 上传成功后再删除
+ */
+ public void deleteTemp(){
+ File f = new File(FILE_SAVE_PATH_TEMP);
+ if(f.length()!=0){
+ ZipUtils zdo = new ZipUtils();
+ zdo.deleteFile(f,false);
+ }
+ }
+
+ public boolean isHasContractFolder() throws Exception {
+ ImageCount ic = new ImageCount();
+ ic.setAppCode(appCode);
+ ic.setAppName(appName);
+ ic.setBusiNo(projectNo);
+ String countResult = ic.getResult();
+ if("0000".equals(countResult)){
+ String responseMsg = "连接影像系统失败,请及时联系管理员!";
+ throw new Exception(responseMsg);
+ }
+ Document dom = DocumentHelper.parseText(countResult);
+ Element root = dom.getRootElement();
+ String responseCode = root.element("RESPONSE_CODE").getTextTrim();
+ if("400".equals(responseCode)){
+ String responseMsg = root.element("RESPONSE_MSG").getTextTrim();
+ throw new Exception(responseMsg);
+ }
+
+ if(root.toString().contains("APZLJJ000080")){
+ return true;
+ }
+ //todo
+ /* 以后再改良,先用上面的判断下
+ String fileCode = "APZLJJ000400";//APZLJJ000400为其它,APZLJJ000080为合同套系,在影像系统查找,核心系统已经没有对应信息
+ List nodes = root.element("ATREE_ALL").elements("NODE");
+ for (Iterator it = nodes.iterator(); it.hasNext();) {
+ Element elm = (Element) it.next();
+ String newFileCode = elm.element("DOC_CODE").getTextTrim();
+ String newFileName = elm.element("DOC_NAME").getTextTrim();
+ //APZLJJ000080为合同套系
+ if("APZLJJ000080".equals(newFileCode)||newFileName.contains("合同套系")){
+ fileCode = "APZLJJ000080";
+ break;
+ }
+ }
+ */
+ return false;
+ }
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getFlowUnid() {
+ return flowUnid;
+ }
+
+ public void setFlowUnid(String flowUnid) {
+ this.flowUnid = flowUnid;
+ }
+
+ public String getProjectNo() {
+ return projectNo;
+ }
+
+ public void setProjectNo(String projectNo) {
+ this.projectNo = projectNo;
+ }
+
+ public String getFlowNo() {
+ return flowNo;
+ }
+
+ public void setFlowNo(String flowNo) {
+ this.flowNo = flowNo;
+ }
+
+ public String getAppCode() {
+ return appCode;
+ }
+
+ public void setAppCode(String appCode) {
+ this.appCode = appCode;
+ }
+
+ public String getAppName() {
+ return appName;
+ }
+
+ public void setAppName(String appName) {
+ this.appName = appName;
+ }
+}
diff --git a/src/com/ample/icms/util/GetInfoUtil.java b/src/com/ample/icms/util/GetInfoUtil.java
new file mode 100644
index 000000000..8f08c402f
--- /dev/null
+++ b/src/com/ample/icms/util/GetInfoUtil.java
@@ -0,0 +1,392 @@
+package com.ample.icms.util;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.amarsoft.are.jbo.JBOException;
+import com.amarsoft.are.jbo.JBOTransaction;
+import com.amarsoft.awe.util.ASResultSet;
+import com.amarsoft.awe.util.SqlObject;
+import com.amarsoft.awe.util.Transaction;
+
+import java.sql.SQLException;
+
+public class GetInfoUtil {
+ private String flowUnid;
+ private String projectId;
+ private String projectNo;
+ private String contractId;
+ private String productId;
+ private String flowNo;
+ private String sTable;
+
+ /**
+ * 根据流程ID获取appCode和appName
+ *
+ * @return
+ * @throws Exception
+ */
+ public String getAppInfoByFlowUnidRJM() throws Exception {
+ return getAppInfoByFlowUnid(this.flowUnid);
+ }
+
+ public String getAppInfoByFlowUnid(String flowUnid) throws Exception {
+ Transaction Sqlca = Transaction.createTransaction("als");
+ String projectNo = this.getProjectNoByFlowUnid(flowUnid, Sqlca);
+ if (projectNo == null || "".equals(projectNo)) {
+ return "0000@未找到当前流程对应的项目编号";
+ }
+ String flowNo = this.getFlowNoByFlowUnid(flowUnid, Sqlca);
+ if (flowNo == null || "".equals(flowNo)) {
+ return "0000@未找到当前流程对应的流程编号";
+ }
+ String appInfo = getAppInfoByProjectNo(projectNo, flowNo, Sqlca);
+ if(appInfo==null||appInfo.contains("0000@")){
+ String productId = getProductIdByFlowUnid(flowUnid, Sqlca);
+ appInfo = this.getAppInfoByProductId(productId, flowNo, Sqlca);
+ }
+ if (Sqlca != null) {
+ Sqlca.commit();
+ }
+ return appInfo;
+ }
+
+ /**
+ * 根据项目编号和流程编号获取appCode和appName
+ *
+ * @return
+ * @throws SQLException
+ */
+ public String getAppInfoByProjectNoRJM() throws SQLException, JBOException {
+ return getAppInfoByProjectNo(this.projectNo, this.flowNo);
+ }
+
+ public String getAppInfoByProjectNo(String projectNo, String flowNo) throws SQLException, JBOException {
+ Transaction Sqlca = Transaction.createTransaction("als");
+ String appInfo = this.getAppInfoByProjectNo(projectNo, flowNo, Sqlca);
+ return appInfo;
+ }
+ public String getAppInfoByProjectNo(String projectNo,String flowNo,JBOTransaction tx) throws SQLException, JBOException {
+ Transaction Sqlca = Transaction.createTransaction(tx);
+ String appInfo = getAppInfoByProjectNo(projectNo,flowNo,Sqlca);
+ return appInfo;
+ }
+ public String getAppInfoByProjectNo(String projectNo, String flowNo, Transaction Sqlca) throws SQLException {
+ String sql = "select app_code,app_name from icms_rela where flow_no='" + flowNo + "' and project_no='" + projectNo + "'";
+ SqlObject sql_icms = new SqlObject(sql);
+ ASResultSet rs = Sqlca.getASResultSet(sql_icms);
+ String appCode = null;
+ String appName = null;
+ while (rs.next()) {
+ appCode = rs.getString("app_code");
+ appName = rs.getString("app_name");
+ }
+ String appInfo = appCode + "@" + appName;
+ if (appCode == null) {
+ String productId = getProductIdByProjectNo(projectNo,Sqlca);
+ appInfo = this.getAppInfoByProductId(productId, flowNo, Sqlca);
+ }
+
+ return appInfo;
+ }
+
+
+ public String getAllAppInfoByProjectIdRJMT(JBOTransaction tx) throws SQLException, JBOException {
+ return getAllAppInfoByProjectId(this.projectId,tx);
+ }
+ public String getAllAppInfoByProjectId(String projectId,JBOTransaction tx) throws SQLException, JBOException {
+ String projectNo = getProjectNoByProjectId(projectId,tx);
+ return getAllAppInfoByProjectNo(projectNo,tx);
+ }
+ public JSONArray getAllAppInfoJsonByProjectId(String projectId,JBOTransaction tx) throws SQLException, JBOException {
+ String projectNo = getProjectNoByProjectId(projectId,tx);
+ Transaction Sqlca = Transaction.createTransaction(tx);
+ return getAllAppInfoJsonByProjectNo(projectNo,Sqlca);
+ }
+ /**
+ * 根据项目编号和流程编号获取appCode和appName
+ *
+ * @return
+ * @throws SQLException
+ */
+ public String getAllAppInfoByProjectNoRJM() throws SQLException, JBOException {
+ return getAllAppInfoByProjectNo(this.projectNo);
+ }
+ public String getAllAppInfoByProjectNoRJMT(JBOTransaction tx) throws SQLException, JBOException {
+ return getAllAppInfoByProjectNo(this.projectNo,tx);
+ }
+ public String getAllAppInfoByProjectNo(String projectNo) throws SQLException, JBOException {
+ Transaction Sqlca = Transaction.createTransaction("als");
+ String appInfo = this.getAllAppInfoByProjectNo(projectNo, Sqlca);
+ return appInfo;
+ }
+ public String getAllAppInfoByProjectNo(String projectNo,JBOTransaction tx) throws SQLException, JBOException {
+ Transaction Sqlca = Transaction.createTransaction(tx);
+ String appInfo = this.getAllAppInfoByProjectNo(projectNo, Sqlca);
+ return appInfo;
+ }
+
+ public String getAllAppInfoByProjectNo(String projectNo, Transaction Sqlca) throws SQLException {
+ return getAllAppInfoJsonByProjectNo(projectNo,Sqlca).toJSONString();
+ }
+ public JSONArray getAllAppInfoJsonByProjectNo(String projectNo, Transaction Sqlca) throws SQLException {
+ String sql = "select app_code,app_name from icms_rela where project_no='" + projectNo + "' and flow_no<>'MortgageFileMailFlow' group by app_code";
+ SqlObject sql_icms = new SqlObject(sql);
+ ASResultSet rs = Sqlca.getASResultSet(sql_icms);
+ if(!rs.next()){
+ String productId = getProductIdByProjectNo(projectNo,Sqlca);
+ JSONArray ja = getAllAppInfoJsonByProductId(productId,Sqlca);
+ return ja;
+ }
+ String appCode = null;
+ String appName = null;
+ JSONArray ja = new JSONArray();
+ while (rs.next()) {
+ appCode = rs.getString("app_code");
+ appName = rs.getString("app_name");
+ JSONObject appInfo = new JSONObject();
+ appInfo.put("app_code",appCode);
+ appInfo.put("app_name",appName);
+ appInfo.put("project_no",projectNo);
+ ja.add(appInfo);
+ }
+ return ja;
+ }
+ public JSONArray getAllAppInfoJsonByProductId(String productId, Transaction Sqlca) throws SQLException {
+ String sql = "select app_code,app_name from icms_prd_rela where productid='" + productId + "' and flowno<>'MortgageFileMailFlow' group by app_code order by update_time desc";
+ SqlObject sql_icms = new SqlObject(sql);
+ ASResultSet rs = Sqlca.getASResultSet(sql_icms);
+ String appCode = null;
+ String appName = null;
+ JSONArray ja = new JSONArray();
+ while (rs.next()) {
+ appCode = rs.getString("app_code");
+ appName = rs.getString("app_name");
+ JSONObject appInfo = new JSONObject();
+ appInfo.put("app_code",appCode);
+ appInfo.put("app_name",appName);
+ ja.add(appInfo);
+ }
+ if (appCode == null) {
+ return null;
+ }
+ return ja;
+ }
+
+ /**
+ * 根据productId和流程编号获取appCode和appName
+ *
+ * @return
+ * @throws SQLException
+ */
+ public String getAppInfoByProductIdRJM() throws SQLException, JBOException {
+ return getAppInfoByProjectNo(this.productId, this.flowNo);
+ }
+
+ public String getAppInfoByProductId(String productId, String flowNo) throws SQLException, JBOException {
+ Transaction Sqlca = Transaction.createTransaction("als");
+ String appInfo = this.getAppInfoByProductId(productId, flowNo, Sqlca);
+ return appInfo;
+ }
+
+ public String getAppInfoByProductId(String productId, String flowNo, Transaction Sqlca) throws SQLException {
+ String sql = "select app_code,app_name from icms_prd_rela where flowno='" + flowNo + "' and productid='" + productId + "' order by update_time desc";
+ SqlObject sql_icms = new SqlObject(sql);
+ ASResultSet rs = Sqlca.getASResultSet(sql_icms);
+ String appCode = null;
+ String appName = null;
+ while (rs.next()) {
+ appCode = rs.getString("app_code");
+ appName = rs.getString("app_name");
+ }
+ if (appCode == null) {
+ return "0000@未找到初始化的影像信息配置,请联系管理员";
+ }
+ String appInfo = appCode + "@" + appName;
+ return appInfo;
+ }
+
+ /**
+ * 根据flowunid获取projectNo
+ *
+ * @return
+ * @throws SQLException
+ */
+ public String getProjectNoByFlowUnidRJM() throws SQLException, JBOException {
+ return getProjectNoByFlowUnid(this.flowUnid);
+ }
+
+ public String getProjectNoByFlowUnid(String flowUnid) throws SQLException, JBOException {
+ Transaction Sqlca = Transaction.createTransaction("als");
+ String projectNo = getProjectNoByFlowUnid(flowUnid, Sqlca);
+ if (Sqlca != null) {
+ Sqlca.commit();
+ }
+ return projectNo;
+ }
+
+ public String getProjectNoByFlowUnid(String flowUnid, Transaction Sqlca) throws SQLException {
+ String sql = "select PROJECT_NO from lb_project_info_temp where FLOWUNID='" + flowUnid + "'";
+ String projectNo = Sqlca.getString(new SqlObject(sql));
+ if (projectNo == null || "".equals(projectNo) || projectNo.length() == 0) {
+ sql = "select PROJECT_NO from lb_project_info where id=(select project_id from lb_contract_info_temp where FLOWUNID='" + flowUnid + "')";
+ projectNo = Sqlca.getString(new SqlObject(sql));
+ }
+ if (projectNo == null || "".equals(projectNo) || projectNo.length() == 0) {
+ return null;
+ }
+ return projectNo;
+ }
+ /**
+ * 根据项目编号
+ *
+ * @param tx
+ * @return
+ * @throws SQLException,JBOException
+ */
+ public String getProjectNoByProjectIdRJMT(JBOTransaction tx) throws SQLException, JBOException {
+ Transaction Sqlca = Transaction.createTransaction(tx);
+ String projectNo = getProjectNoByProjectId(projectId,Sqlca);
+ return projectNo;
+ }
+ public String getProjectNoByProjectId(String projectId, JBOTransaction tx) throws SQLException, JBOException {
+ Transaction Sqlca = Transaction.createTransaction(tx);
+ String projectNo = getProjectNoByProjectId(projectId,Sqlca);
+ return projectNo;
+ }
+ public String getProjectNoByProjectId(String projectId, Transaction Sqlca) throws SQLException {
+ String sql = "select project_no from lb_project_info where id='" + projectId + "'";
+ String projectNo = Sqlca.getString(new SqlObject(sql));
+ return projectNo;
+ }
+ public String getProjectNoByContractIdRJMT(JBOTransaction tx) throws SQLException, JBOException {
+ Transaction Sqlca = Transaction.createTransaction(tx);
+ String projectNo = getProjectNoByContractId(contractId,Sqlca);
+ return projectNo;
+ }
+ public String getProjectNoByContractId(String contractId, JBOTransaction tx) throws SQLException, JBOException {
+ Transaction Sqlca = Transaction.createTransaction(tx);
+ String projectNo = getProjectNoByContractId(contractId,Sqlca);
+ return projectNo;
+ }
+ public String getProjectNoByContractId(String contractId,Transaction Sqlca) throws SQLException {
+ String sql = "select project_no from lb_project_info where id=(select project_id from lb_contract_info where id='"+contractId+"')";
+ String projectNo = Sqlca.getString(new SqlObject(sql));
+ return projectNo;
+ }
+ public String getProjectIdByContractId(String contractId,Transaction Sqlca) throws SQLException {
+ String sql = "select project_id from lb_contract_info where id='"+contractId+"'";
+ String projectNo = Sqlca.getString(new SqlObject(sql));
+ return projectNo;
+ }
+ /**
+ * 根据流程编号
+ *
+ * @param flowUnid
+ * @param Sqlca
+ * @return
+ * @throws SQLException
+ */
+ public String getFlowNoByFlowUnid(String flowUnid, Transaction Sqlca) throws SQLException {
+ String sql = "select flowno from flow_object where objectno='" + flowUnid + "'";
+ String flowNo = Sqlca.getString(new SqlObject(sql));
+ return flowNo;
+ }
+
+ /**
+ * 根据flowunid获取productid
+ *
+ * @param flowUnid
+ * @param Sqlca
+ * @return
+ * @throws SQLException
+ */
+ public String getProductIdByFlowUnid(String flowUnid, Transaction Sqlca) throws SQLException {
+ String sql = "select productId from flow_bussiness_object where flow_unid='" + flowUnid + "'";
+ String productId = Sqlca.getString(new SqlObject(sql));
+ return productId;
+ }
+ public String getProductIdByProjectNo(String projectNo, Transaction Sqlca) throws SQLException {
+ String sql = "select product_id from lb_project_info where project_no='"+projectNo+"'";
+ String productId = Sqlca.getString(new SqlObject(sql));
+ return productId;
+ }
+ public String getAppInfoByFlowNoRJM() throws SQLException {
+ Transaction Sqlca = Transaction.createTransaction("als");
+ return getAppInfoByFlowNo(flowNo,Sqlca);
+ }
+ public String getAppInfoByFlowNo(String flowNo, Transaction Sqlca) throws SQLException {
+ String sql = "select app_code,app_name from icms_prd_rela where flowno='" + flowNo + "' order by update_time desc";
+ SqlObject sql_icms = new SqlObject(sql);
+ ASResultSet rs = Sqlca.getASResultSet(sql_icms);
+ String appCode = null;
+ String appName = null;
+ while (rs.next()) {
+ appCode = rs.getString("app_code");
+ appName = rs.getString("app_name");
+ }
+ if (appCode == null) {
+ return "0000@未找到初始化的影像信息配置,请联系管理员";
+ }
+ String appInfo = appCode + "@" + appName;
+ return appInfo;
+ }
+ public String getDistributorIdByFlowUnid(String flowUnid, Transaction Sqlca) throws SQLException {
+ String sql = "select distributor_no from distributor_info_temp where flowunid='" + flowUnid + "'";
+ String distributorNo = Sqlca.getString(new SqlObject(sql));
+ return distributorNo;
+ }
+ public String getFlowUnid() {
+ return flowUnid;
+ }
+
+ public void setFlowUnid(String flowUnid) {
+ this.flowUnid = flowUnid;
+ }
+
+ public String getProjectNo() {
+ return projectNo;
+ }
+
+ public void setProjectNo(String projectNo) {
+ this.projectNo = projectNo;
+ }
+
+ public String getFlowNo() {
+ return flowNo;
+ }
+
+ public void setFlowNo(String flowNo) {
+ this.flowNo = flowNo;
+ }
+
+ public String getsTable() {
+ return sTable;
+ }
+
+ public void setsTable(String sTable) {
+ this.sTable = sTable;
+ }
+
+ public String getProductId() {
+ return productId;
+ }
+
+ public void setProductId(String productId) {
+ this.productId = productId;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+ public String getContractId() {
+ return contractId;
+ }
+
+ public void setContractId(String contractId) {
+ this.contractId = contractId;
+ }
+}
diff --git a/src/com/ample/icms/util/PropertiesUtil.java b/src/com/ample/icms/util/PropertiesUtil.java
new file mode 100644
index 000000000..cace56276
--- /dev/null
+++ b/src/com/ample/icms/util/PropertiesUtil.java
@@ -0,0 +1,38 @@
+package com.ample.icms.util;
+
+import com.amarsoft.are.ARE;
+
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class PropertiesUtil {
+ private static Map attributes;
+
+ public static void load() {
+ attributes = new ConcurrentHashMap();
+ Properties prop = new Properties();
+ try {
+ prop.load(PropertiesUtil.class.getResourceAsStream("/icms.properties"));
+ for(Map.Entry