Merge remote-tracking branch 'origin/ap007' into dailyfix

This commit is contained in:
yjf 2022-09-26 08:26:49 +08:00
commit 2e78a459b5
66 changed files with 4171 additions and 570 deletions

View File

@ -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文件
*/

View File

@ -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"%>
<script type="text/javascript">
function saveMailStatus(){
as_save(0);
reloadSelf();
alert("保存成功");
updateMailStatus();
}
function saveAcrhivingStatus(){
as_save(0);
reloadSelf();
alert("保存成功");
updateAcrhivingStatus();
}
function doAcrhiving(){
for(var i=0;i<getRowCount(0);i++){
$("#INPUT_myiframe0_HANDOVER_STATUS_"+i+"_3").val('all');//设置value为xx的option选项为默认选中
setItemValue(0,i,"HANDOVER_STATUS","all");
}
}
function updateMailStatus(){
var contractId = getItemValue(0,i,'CONTRACT_ID');
var str=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.DocMailAction","updateMailStatus","flowunid=<%=flowunid%>,contractid="+contractId);
}
function updateAcrhivingStatus(){
var contractId = getItemValue(0,i,'CONTRACT_ID');
var str=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.DocMailAction","updateAcrhivingStatus","flowunid=<%=flowunid%>,contractid="+contractId);
}
function checkfile(){
var fileName = "" ;
for(var k=0;k<getRowCount(0);k++){
var filelist = getItemValue(0,k,'HANDOVER_STATUS');
if(filelist!='all'){
fileName = fileName + getItemValue(0,k,'NEW_FILE_NAME')+";";
}
}
if(fileName.length > 0){
alert(fileName+"未归档,请检查!");
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"300px\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Apzl/FileUpload/PayDocMailList.jsp?CompClientID="+sCompClientID+"&docList="+docList+"\"></iframe>", CurPage.getObjectWindowOutput());
dwTemp.replaceColumn("placefile", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"300px\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Apzl/FileUpload/LBMailArchivingList.jsp?CompClientID="+sCompClientID+"&docList="+docList+"\"></iframe>", CurPage.getObjectWindowOutput());
dwTemp.replaceColumn("opinion", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"300px\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Apzl/FileUpload/LmApprovaloppinionDocTempList.jsp?CompClientID="+sCompClientID+"\"></iframe>", 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();
}
</script>

View File

@ -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<getRowCount(0);i++){
if(getObj(0,i,"action")!=null&&getObj(0,i,"action")!="null"){
getObj(0,i,"action").innerHTML='<a class="box" onclick="viewAllInfo(\''+i+'\')" style={color:#000;text-decoration:underline;}><font color="blue">邮寄明细</font></a>';
}
if(getObj(0,i,"opinion")!=null&&getObj(0,i,"opinion")!="null"){
getObj(0,i,"opinion").innerHTML='<a class="box" onclick="viewOpinionInfo(\''+i+'\')" style={color:#000;text-decoration:underline;}><font color="blue">签署意见</font></a>';
}
if(getObj(0,i,"filelist")!=null&&getObj(0,i,"filelist")!="null"){
getObj(0,i,"filelist").innerHTML='<a class="box" onclick="viewOpinionFilelist(\''+i+'\')" style={color:#000;text-decoration:underline;}><font color="blue">历史附件查看</font></a>';
}
if(getObj(0,i,"BusinessConditions")!=null&&getObj(0,i,"BusinessConditions")!="null"){
getObj(0,i,"BusinessConditions").innerHTML='<a class="box" onclick="viewBusinessConditions(\''+i+'\')" style={color:#000;text-decoration:underline;}><font color="blue">商务条件</font></a>';
}
}
},"邮寄详情");
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;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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"%>
<script type="text/javascript">

View File

@ -45,12 +45,36 @@
String sButtons[][] = {
{flag,"All","Button","保存","保存所有修改","save()","","","",""},
{"true","All","Button","·µ»Ø","·µ»ØÁбí","returnList()","","","",""}
{"true","All","Button","返回","返回列表","returnList()","","","",""},
{"true","","Button","识别发票","识别发票","invoiceOrcDo()","","","",""}
};
sButtonPosition = "north";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function invoiceOrcDo(){
let sResult = RunJavaMethodTrans("com.ample.icms.service.ImageOcrService","invoiceOrcOfInvoice","contractId=<%=ContractId%>,flowNo=FundPaymentCarFlow");
if(sResult!=null&&sResult.error_code==0&&sResult.result.发票号码!=''){
const resultList = sResult.result;
let Invoice_code = resultList.发票号码;
let Invoice_number = resultList.发票代码;
let Invoice_date = resultList.开票日期;
Invoice_date = Invoice_date.substr(0,4)+'/'+Invoice_date.substr(4,2)+'/'+Invoice_date.substr(6,2);
let Invoice_money = resultList.不含税价小写;
let tax_due = resultList.增值税税额;
let tax_rate = resultList.增值税税率或征收税率;
setItemValue(0,0,"Invoice_code", Invoice_code);
setItemValue(0,0,"Invoice_number", Invoice_number);
setItemValue(0,0,"Invoice_date", Invoice_date);
setItemValue(0,0,"Invoice_money", Invoice_money);
setItemValue(0,0,"tax_due", tax_due);
//setItemValue(0,0,"tax_rate", tax_rate);
alert('识别成功');
}else{
alert('识别失败');
}
}
//自动计算税金及开票金额合计
function checkInvoiceMoney(){
var Invoice_money = parseFloat(getItemValue(0,getRow(0),"Invoice_money"));

View File

@ -197,5 +197,13 @@
document.getElementById("NETCERTNAME").value = '';
}
}
function getIdentity(){
var certId = getItemValue(0,getRow(),"CERTID");
return certId;
}
function getCustomerName(){
var customerName = getItemValue(0,getRow(),"enterprisename");
return customerName;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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", "<iframe type='iframe' name=\"frame_list_invoice\" width=\"100%\" height=\"450\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorChangeInfoHis.jsp?CompClientID="+compClientID+"&FlowUnid="+sFlowUnid+"&DISTRIBUTOR_NO="+DISTRIBUTOR_NO+"\"></iframe>", 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;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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"%>
<style>
@ -52,7 +54,12 @@
}
</style>
<script type="text/javascript">
function uploadContract(){
//因为要传到付款阶段的合同套系所以这里的flowNo固定为FundPaymentCarFlow
var sParams="ProjectId=<%=projectId%>,flowUnid=<%=flowunid%>,projectNo=<%=ProjectNo%>,flowNo=FundPaymentCarFlow";
var sReturn = RunJavaMethodTrans("com.ample.icms.service.ImageUploadService","upload",sParams);
alert(sReturn);
}
//测试电子签约
function sign(){
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","sign","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>");
@ -116,7 +123,7 @@
}else if(eval(result)==4){
alert("word文件正在转换PDF文件格式");
}else if(eval(result)==5){
wordToPdf();
alert("word文件没有转换PDF文件格式");
@ -195,6 +202,9 @@
}else{
sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","contractSignStatus",sParams);
}
if(sReturn=='已完成'){
uploadContract();
}
AsDebug.showMessage("提示",sReturn,"","",true,'','','',function(){
<%-- var sReturns = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","downloadDoc","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>"); --%>
window.location.reload();

View File

@ -6,11 +6,14 @@
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 ishistory=CurPage.getParameter("IsHistory");
String isHistory=CurPage.getParameter("IsHistory");
String compClientID = request.getParameter("CompClientID");
String RightType = CurPage.getParameter("RightType");//页面是否 是只读
String custype = CurPage.getParameter("customertype");//获取客户类型
@ -18,13 +21,6 @@
if(sPrevUrl == null) sPrevUrl = "";
if((null!=sPhaseNo&&sPhaseNo.equals("0010")) && "BContractApproveFlow".equals(FlowNo)){
isShowButton=true;
}else{
isShowButton=false;
}
isShowButton=true;
String sTempletNo = "LBContractPersonBaseInfoTemp";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
if((null!=sPhaseNo&&sPhaseNo.equals("0010")) && "BContractApproveFlow".equals(FlowNo)){
@ -58,15 +54,14 @@
dwTemp.replaceColumn("BaseInfo", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"630px\" frameborder=\"0\" src=\""+sWebRootPath+userll+compClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
String sButtons[][] = null;
String flag = "false";
if(!"ContractOnhireCarChangeFlow".equals(FlowNo)&&!"BContractApproveFlow".equals(FlowNo)&&!"BContractChangeFlow".equals(FlowNo)){
sButtons = new String[][]{
{"true","","Button","保存","保存所有修改","saveRend()","","","",""},
};
}else{
sButtons = new String[][]{
{"false","","Button","保存","保存所有修改","saveRend()","","","",""},
};
flag = "true";
}
sButtons = new String[][]{
{flag,"","Button","괏닸","괏닸杰唐錦맣","saveRend()","","","",""},
{"true","","Button","栗죕헌데","栗죕헌데","openFileList()","","","","btn_icon_saveNew",""},
};
sButtonPosition = "north";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
@ -106,5 +101,37 @@
var contNum = getItemValue(0,getRow(),"CONTRACT_NUMBER");
setItemValue(0,getRow(),'CONTRACT_NO',contNum);
}
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%>"=="BContractApproveFlow"||"<%=FlowNo%>"=="BContractChangeFlow"||"<%=FlowNo%>"=="BContractSupportFlow"||"<%=FlowNo%>"=="ContractOnhireCarChangeFlow")&&"<%=sPhaseNo%>"=="0010"&&"<%=isHistory%>"!="true"){
code = 'ECM0001';
}
let busiNo= "<%=projectNo%>";
if(busiNo==null||busiNo==""||busiNo=="null"){
busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
}
let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo+",userCode=<%=userId%>"+",userName=<%=userName%>");
return param;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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");
}
</script>
<%/*~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]);
},"请选项目协办");
}
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info08;Describe=页面装载时,进行初始化;]~*/%>
<script type="text/javascript">
//初始化数据
@ -201,13 +207,62 @@ init();
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
sReturn = sReturn.split("@");
setItemValue(0,0,"subjectid",sReturn[0]);
setItemValue(0,0,"subjectname",sReturn[1]);
},"请选择主体",'');
}
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", "getAppInfoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
return appInfo;
}
function getCode(){
let code = 'ECM0002';
if(
"<%=FlowNo%>"=="ProjectApprovalFlow"&&("<%=sPhaseNo%>"=="0010"||"<%=sPhaseNo%>"=="0040"||"<%=sPhaseNo%>"=="0050")||
"<%=FlowNo%>"=="ProjectCreditFlow"&&("<%=sPhaseNo%>"=="0010"||"<%=sPhaseNo%>"=="0040")
){
code = 'ECM0001';
}
return code;
}
function getRequestParam(appCode,appName,code){
let busiNo = '<%=projectNo%>';
if(busiNo==null||busiNo==""||busiNo=="null"){
busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
}
let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo);
return param;
}
</script>
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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("请在产品中配置签约方式!!!");

View File

@ -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"%>
<script type="text/javascript">
function fileArchiving(){
var sUrl = "/Tenwa/Lease/Flow/FileManager/FileArchiving/FileArchivingInfoMain.jsp";
var id = getItemValue(0,getRow(0),'ID');
if(typeof(id)=="undefined" || id.length==0 ){
alert("请选择一条数据!");
return ;
}
var sParam='ID='+id;
AsDialog.PopView(sUrl,sParam,"",function(){
parent.reloadSelf();
},"档案归档");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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","마운<EBA788>헝栗죕헌데","栗죕헌데","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);
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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("@");

View File

@ -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", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"500px\" frameborder=\"0\" src=\""+sWebRootPath+userll+compClientID+"&sPhaseNo="+sPhaseNo+"\"></iframe>", 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;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -1,399 +1,443 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbo>
<package name="jbo.app.tenwa.doc" >
<class name="LB_DOCCONFIG" label="文件清单配置" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="SERIAL_NUM" label="序号" type="STRING" length="32"/>
<attribute name="DOC_NAME" label="名称" type="STRING" length="200"/>
<attribute name="ONE_CLASSIFY" label="一级分类" type="STRING" length="100"/>
<attribute name="TWO_CLASSIFY" label="二级分类" type="STRING" length="100"/>
<attribute name="THREE_CLASSIFY" label="三级分类" type="STRING" length="100"/>
<attribute name="FOUR_CLASSIFY" label="四级分类" type="STRING" length="100"/>
<attribute name="DOC_TYPE" label="资料类型" type="STRING" length="32"/>
<attribute name="DOC_NATURE" label="资料性质" type="STRING" length="32"/>
<attribute name="DOC_CLASS_ITEMNO" label="资料分类编号" type="STRING" length="32"/>
<attribute name="DOC_RELATION_ID" label="资料关联ID" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_DOCCONFIG" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_DOCRELATIVE" label="文档关联对象表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="OBJECTTYPE" label="对象类别" type="STRING" length="18" />
<attribute name="PROJ_ID" label="项目id" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同id" type="STRING" length="32"/>
<attribute name="PLAN_NUMBER" label="方案编号" type="STRING" length="32"/>
<attribute name="PLAN_LIST" label="期次" type="STRING" length="32"/>
<attribute name="CUST_ID" label="客户id" type="STRING" length="32"/>
<attribute name="FLOW_UNID" label="流程号" type="STRING" length="32"/>
<attribute name="TEMPLATE_ID" label="合同列表ID" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="创建人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="创建人所属部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="创建时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_DOCRELATIVE" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_DOCLIBRARY" label="资料清单" keyAttributes="ID">
<attributes>
<attribute name="ID" label="id主键" type="STRING" length="32"/>
<attribute name="SERIAL_NUM" label="序号" type="STRING" length="32"/>
<attribute name="DOC_NAME" label="资料名称" type="STRING" length="200"/>
<attribute name="DOC_NATURE" label="资料性质" type="STRING" length="64"/>
<attribute name="REMARK" label="备注" type="STRING" length="200"/>
<attribute name="BUSINESS_CHECK" label="业务检查" type="STRING" length="32"/>
<attribute name="IS_HANDOVER" label="档案交接" type="STRING" length="32"/>
<attribute name="OPERATE_CHECK" label="运营确认" type="STRING" length="32"/>
<attribute name="REVIEW_CHECK" label="评审复核" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="创建人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="创建人所属部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="创建时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
<attribute name="DOC_TYPE" label="资料类型" type="STRING" length="32"/>
<attribute name="ONE_CLASSIFY" label="一级分类" type="STRING" length="100"/>
<attribute name="TWO_CLASSIFY" label="二级分类" type="STRING" length="100"/>
<attribute name="THREE_CLASSIFY" label="三级分类" type="STRING" length="100"/>
<attribute name="FOUR_CLASSIFY" label="四级分类" type="STRING" length="100"/>
<attribute name="DOC_CLASS_ITEMNO" label="资料分类编号" type="STRING" length="32"/>
<attribute name="RELATIVE_ID" label="关联ID" type="STRING" length="32"/>
<attribute name="CONFIG_ID" label="资料清单配置ID" type="STRING" length="32"/>
<attribute name="IS_INIT" label="是否初始化过" type="STRING" length="10"/>
<attribute name="IS_FILE_LIST" label="是否文件清单" type="STRING" length="32"/>
<attribute name="IS_BORROWING" label="借阅状态" type="STRING" length="32"/>
<attribute name="BORROWID" label="借阅单流水号" type="STRING" length="32"/>
<attribute name="LIBCOPIES" label="份数" type="STRING" length="10"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_DOCLIBRARY" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_DOCATTRIBUTE" label="文档附件详情" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32" />
<attribute name="LIBRARY_ID" label="附件编号" type="STRING" length="32" />
<attribute name="FILEPATH" label="文档路径" type="STRING" length="500" />
<attribute name="FULLPATH" label="文档全路径" type="STRING" length="600" />
<attribute name="FILENAME" label="文件名" type="STRING" length="250" />
<attribute name="FILESIZE" label="内容长度" type="STRING" length="32" />
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32" />
<attribute name="INPUTORGID" label="登记单位" type="STRING" length="32" />
<attribute name="INPUTTIME" label="上传时间" type="STRING" length="32" />
<attribute name="REMARK" label="备注" type="STRING" length="200" />
<attribute name="OBJECTTYPE" label="对象类别" type="STRING" length="32" />
<attribute name="CONTENT_TYPE" label="文件格式" type="STRING" length="200" />
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
<attribute name="DELETEED" label="是否已删除" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="40"/>
</attributes>
<manager>
<managerProperties>
<property name="createKey" value="true" />
<property name="table" value="LB_DOCATTRIBUTE" />
</managerProperties>
</manager>
</class>
<class name="LB_DOC_CONTRACT_LIST" label="生成合同列表" keyAttributes="id">
<attributes>
<attribute name="id" label="标识" type="STRING" length="32"/>
<attribute name="contract_id" label="合同标识" type="STRING" length="32"/>
<attribute name="contract_no" label="业务合同号+后缀" type="STRING" length="250"/>
<attribute name="filename" label="文件名" type="STRING" length="250"/>
<attribute name="attribute_id" label="附件明细表标识" type="STRING" length="32"/>
<attribute name="file_type" label="文件类型" type="STRING" length="32"/>
<attribute name="file_flag" label="是否有效" type="STRING" length="32"/>
<attribute name="sign_type" label="签约状态" type="STRING" length="32"/>
<attribute name="project_id" label="项目标识" type="STRING" length="32"/>
<attribute name="prodect_id" label="产品标识" type="STRING" length="32"/>
<attribute name="library_id" label="资料清单标识" type="STRING" length="32"/>
<attribute name="doc_name" label="资料名称" type="STRING" length="64"/>
<attribute name="document_id" label="契约锁合同文件id" type="STRING" length="32"/>
<attribute name="customername" label="客户名称" type="STRING" length="64"/>
<attribute name="telephone" label="电话号码" type="STRING" length="32"/>
<attribute name="ids" label="客户id/担保人id" type="STRING" length="32"/>
<attribute name="filepath" label="文档路径" type="STRING" length="500"/>
<attribute name="fullpath" label="文档全路径文件名" type="STRING" length="600"/>
<attribute name="inputuserid" label="创建人" type="STRING" length="100"/>
<attribute name="inputorgid" label="创建人所属部门" type="STRING" length="100"/>
<attribute name="inputtime" label="创建时间" type="STRING" length="100"/>
<attribute name="updateuserid" label="修改人" type="STRING" length="100"/>
<attribute name="updateorgid" label="修改人所属部门" type="STRING" length="100"/>
<attribute name="updatetime" label="修改时间" type="STRING" length="100"/>
<attribute name="config_id" label="文件清单配置标识" type="STRING" length="100"/>
<attribute name="doc_class_itemno" label="资料分类编号" type="STRING" length="100"/>
<attribute name="singcontract_id" label="契约锁合同id" type="STRING" length="64"/>
<attribute name="content_type" label="文件格式" type="STRING" length="100"/>
<attribute name="flow_unid" label="流程id" type="STRING" length="32"/>
<attribute name="process" label="合同制作过程" type="STRING" length="32"/>
<attribute name="sendprocess" label="契约锁发送过程" type="STRING" length="32"/>
<attribute name="message" label="记录作废1、退回0、记录最后一次错误信息" type="STRING" length="200"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_doc_contract_list" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_ONEDIMENSIONALCODE" label="一维码表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="PROJECT_ID" label="项目ID" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="CONTRACT_NO" label="合同编号" type="STRING" length="32"/>
<attribute name="FILEPATH" label="文档路径" type="STRING" length="500"/>
<attribute name="FULLPATH" label="文档全路径文件名" type="STRING" length="600"/>
<attribute name="FILENAME" label="文件名" type="STRING" length="250"/>
<attribute name="FILESIZE" label="文件大小" type="STRING" length="10"/>
<attribute name="INPUTUSERID" label="上传人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="上传部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="上传时间" type="STRING" length="32"/>
<attribute name="REMARK" label="备注" type="STRING" length="200"/>
<attribute name="CONTENT_TYPE" label="文件格式" type="STRING" length="200"/>
<attribute name="DELETEED" label="是否已删除" type="STRING" length="32"/>
<attribute name="OBJECTTYPE" label="流程编号" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="40"/>
<attribute name="STANDBY" label="备用" type="STRING" length="40"/>
<attribute name="DESCRIBE" label="描述" type="STRING" length="40"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_onedimensionalcode" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LC_COPYFILE_LOG" label="文件拷贝日志表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_NO" label="合同编号" type="STRING" length="32"/>
<attribute name="BATCH_NO" label="批次号" type="STRING" length="32"/>
<attribute name="COPY_TYPE" label="拷贝类型" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="上传人" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="上传时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lc_copyfile_log" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_FILE_MAILARCHIVING_INFO" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="CONTRACT_NUMBER" label="合同编号" type="STRING" length="32"/>
<attribute name="ARCHIVING_PERSON" label="归档人" type="STRING" length="32"/>
<attribute name="ARCHIVING_TIME" label="归档时间" type="STRING" length="32"/>
<attribute name="ARCHIVING_CABINET_NO" label="档案柜号" type="STRING" length="32"/>
<attribute name="ALLSTATUS" label="总邮寄状态" type="STRING" length="32"/>
<attribute name="ALLHANDOVERSTATUS" label="总接收状态" type="STRING" length="32"/>
<attribute name="EXPCOMPANY" label="快递公司" type="STRING" length="32"/>
<attribute name="EXPNUMBER" label="快递单号" type="STRING" length="100"/>
<attribute name="DEMO" label="备注" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="FILE_NUMBER" label="档案编号" type="STRING" length="32"/>
<attribute name="REMARKS" label="备注" type="STRING" length="32"/>
<attribute name="opinion_comments" label="意见解释" type="STRING" length="255"/>
<attribute name="EXPSTRATDATE" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="EXPENDDATE" label="档案收到时间" type="STRING" length="32"/>
<attribute name="is_delay" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="delay_date" label="档案收到时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_file_mailarchiving_info" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_FILE_MAILARCHIVING_INFO_TEMP" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="CONTRACT_NUMBER" label="合同编号" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="FLOWUNID" type="STRING" length="32"/>
<attribute name="ARCHIVING_PERSON" label="归档人" type="STRING" length="32"/>
<attribute name="ARCHIVING_TIME" label="归档时间" type="STRING" length="32"/>
<attribute name="ARCHIVING_CABINET_NO" label="档案柜号" type="STRING" length="32"/>
<attribute name="ALLSTATUS" label="总邮寄状态" type="STRING" length="32"/>
<attribute name="ALLHANDOVERSTATUS" label="总接收状态" type="STRING" length="32"/>
<attribute name="EXPCOMPANY" label="快递公司" type="STRING" length="32"/>
<attribute name="EXPNUMBER" label="快递单号" type="STRING" length="100"/>
<attribute name="DEMO" label="备注" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="FILE_NUMBER" label="档案编号" type="STRING" length="32"/>
<attribute name="REMARKS" label="备注" type="STRING" length="32"/>
<attribute name="IS_FLOWING" label="是否在流程中" type="STRING" length="32"/>
<attribute name="opinion_comments" label="意见解释" type="STRING" length="255"/>
<attribute name="EXPSTRATDATE" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="EXPENDDATE" label="档案收到时间" type="STRING" length="32"/>
<attribute name="is_delay" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="delay_date" label="档案收到时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_file_mailarchiving_info_temp" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LM_MAILONLINE_DOC" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="MAIL_ID" label="合同编号" type="STRING" length="32"/>
<attribute name="LIBRARYID" label="文件id" type="STRING" length="32"/>
<attribute name="MAILSTATUS" label="邮寄状态" type="STRING" length="32"/>
<attribute name="HANDOVERSTATUS" label="接收状态" type="STRING" length="32"/>
<attribute name="DEMO" label="备注" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="ATTRIBUTE1" label="备用字段1" type="STRING" length="32"/>
<attribute name="ATTRIBUTE2" label="备用字段2" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lm_mailonline_doc" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LM_MAILONLINE_DOC_TEMP" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="MAIL_ID" label="合同编号" type="STRING" length="32"/>
<attribute name="LIBRARYID" label="文件id" type="STRING" length="32"/>
<attribute name="MAILSTATUS" label="邮寄状态" type="STRING" length="32"/>
<attribute name="HANDOVERSTATUS" label="接收状态" type="STRING" length="32"/>
<attribute name="DEMO" label="备注" type="STRING" length="1000"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="ATTRIBUTE1" label="备用字段1" type="STRING" length="32"/>
<attribute name="ATTRIBUTE2" label="备用字段2" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lm_mailonline_doc_temp" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LM_APPROVALOPINION_DOC" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="MAILSTATUS" label="邮寄状态" type="STRING" length="32"/>
<attribute name="HANDOVERSTATUS" label="接收状态" type="STRING" length="32"/>
<attribute name="DEMO" label="备注" type="STRING" length="2000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="ATTRIBUTE1" label="备用字段1" type="STRING" length="32"/>
<attribute name="ATTRIBUTE2" label="备用字段2" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lm_approvalopinion_doc" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LM_APPROVALOPINION_DOC_TEMP" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="MAILSTATUS" label="邮寄状态" type="STRING" length="32"/>
<attribute name="HANDOVERSTATUS" label="接收状态" type="STRING" length="32"/>
<attribute name="DEMO" label="备注" type="STRING" length="2000"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="ATTRIBUTE1" label="备用字段1" type="STRING" length="32"/>
<attribute name="ATTRIBUTE2" label="备用字段2" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lm_approvalopinion_doc_temp" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="REMINDER_LETTER" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="64"/>
<attribute name="TYPE" label="类型" type="STRING" length="4"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="reminder_letter" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>
<?xml version="1.0" encoding="UTF-8"?>
<jbo>
<package name="jbo.app.tenwa.doc" >
<class name="LB_DOCCONFIG" label="文件清单配置" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="SERIAL_NUM" label="序号" type="STRING" length="32"/>
<attribute name="DOC_NAME" label="名称" type="STRING" length="200"/>
<attribute name="ONE_CLASSIFY" label="一级分类" type="STRING" length="100"/>
<attribute name="TWO_CLASSIFY" label="二级分类" type="STRING" length="100"/>
<attribute name="THREE_CLASSIFY" label="三级分类" type="STRING" length="100"/>
<attribute name="FOUR_CLASSIFY" label="四级分类" type="STRING" length="100"/>
<attribute name="DOC_TYPE" label="资料类型" type="STRING" length="32"/>
<attribute name="DOC_NATURE" label="资料性质" type="STRING" length="32"/>
<attribute name="DOC_CLASS_ITEMNO" label="资料分类编号" type="STRING" length="32"/>
<attribute name="DOC_RELATION_ID" label="资料关联ID" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_DOCCONFIG" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_DOCRELATIVE" label="文档关联对象表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="OBJECTTYPE" label="对象类别" type="STRING" length="18" />
<attribute name="PROJ_ID" label="项目id" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同id" type="STRING" length="32"/>
<attribute name="PLAN_NUMBER" label="方案编号" type="STRING" length="32"/>
<attribute name="PLAN_LIST" label="期次" type="STRING" length="32"/>
<attribute name="CUST_ID" label="客户id" type="STRING" length="32"/>
<attribute name="FLOW_UNID" label="流程号" type="STRING" length="32"/>
<attribute name="TEMPLATE_ID" label="合同列表ID" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="创建人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="创建人所属部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="创建时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_DOCRELATIVE" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_DOCLIBRARY" label="资料清单" keyAttributes="ID">
<attributes>
<attribute name="ID" label="id主键" type="STRING" length="32"/>
<attribute name="SERIAL_NUM" label="序号" type="STRING" length="32"/>
<attribute name="DOC_NAME" label="资料名称" type="STRING" length="200"/>
<attribute name="DOC_NATURE" label="资料性质" type="STRING" length="64"/>
<attribute name="REMARK" label="备注" type="STRING" length="200"/>
<attribute name="BUSINESS_CHECK" label="业务检查" type="STRING" length="32"/>
<attribute name="IS_HANDOVER" label="档案交接" type="STRING" length="32"/>
<attribute name="OPERATE_CHECK" label="运营确认" type="STRING" length="32"/>
<attribute name="REVIEW_CHECK" label="评审复核" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="创建人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="创建人所属部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="创建时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
<attribute name="DOC_TYPE" label="资料类型" type="STRING" length="32"/>
<attribute name="ONE_CLASSIFY" label="一级分类" type="STRING" length="100"/>
<attribute name="TWO_CLASSIFY" label="二级分类" type="STRING" length="100"/>
<attribute name="THREE_CLASSIFY" label="三级分类" type="STRING" length="100"/>
<attribute name="FOUR_CLASSIFY" label="四级分类" type="STRING" length="100"/>
<attribute name="DOC_CLASS_ITEMNO" label="资料分类编号" type="STRING" length="32"/>
<attribute name="RELATIVE_ID" label="关联ID" type="STRING" length="32"/>
<attribute name="CONFIG_ID" label="资料清单配置ID" type="STRING" length="32"/>
<attribute name="IS_INIT" label="是否初始化过" type="STRING" length="10"/>
<attribute name="IS_FILE_LIST" label="是否文件清单" type="STRING" length="32"/>
<attribute name="IS_BORROWING" label="借阅状态" type="STRING" length="32"/>
<attribute name="BORROWID" label="借阅单流水号" type="STRING" length="32"/>
<attribute name="LIBCOPIES" label="份数" type="STRING" length="10"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_DOCLIBRARY" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_DOCATTRIBUTE" label="文档附件详情" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32" />
<attribute name="LIBRARY_ID" label="附件编号" type="STRING" length="32" />
<attribute name="FILEPATH" label="文档路径" type="STRING" length="500" />
<attribute name="FULLPATH" label="文档全路径" type="STRING" length="600" />
<attribute name="FILENAME" label="文件名" type="STRING" length="250" />
<attribute name="FILESIZE" label="内容长度" type="STRING" length="32" />
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32" />
<attribute name="INPUTORGID" label="登记单位" type="STRING" length="32" />
<attribute name="INPUTTIME" label="上传时间" type="STRING" length="32" />
<attribute name="REMARK" label="备注" type="STRING" length="200" />
<attribute name="OBJECTTYPE" label="对象类别" type="STRING" length="32" />
<attribute name="CONTENT_TYPE" label="文件格式" type="STRING" length="200" />
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
<attribute name="DELETEED" label="是否已删除" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="40"/>
</attributes>
<manager>
<managerProperties>
<property name="createKey" value="true" />
<property name="table" value="LB_DOCATTRIBUTE" />
</managerProperties>
</manager>
</class>
<class name="LB_DOC_CONTRACT_LIST" label="生成合同列表" keyAttributes="id">
<attributes>
<attribute name="id" label="标识" type="STRING" length="32"/>
<attribute name="contract_id" label="合同标识" type="STRING" length="32"/>
<attribute name="contract_no" label="业务合同号+后缀" type="STRING" length="250"/>
<attribute name="filename" label="文件名" type="STRING" length="250"/>
<attribute name="attribute_id" label="附件明细表标识" type="STRING" length="32"/>
<attribute name="file_type" label="文件类型" type="STRING" length="32"/>
<attribute name="file_flag" label="是否有效" type="STRING" length="32"/>
<attribute name="sign_type" label="签约状态" type="STRING" length="32"/>
<attribute name="project_id" label="项目标识" type="STRING" length="32"/>
<attribute name="prodect_id" label="产品标识" type="STRING" length="32"/>
<attribute name="library_id" label="资料清单标识" type="STRING" length="32"/>
<attribute name="doc_name" label="资料名称" type="STRING" length="64"/>
<attribute name="document_id" label="契约锁合同文件id" type="STRING" length="32"/>
<attribute name="customername" label="客户名称" type="STRING" length="64"/>
<attribute name="telephone" label="电话号码" type="STRING" length="32"/>
<attribute name="ids" label="客户id/担保人id" type="STRING" length="32"/>
<attribute name="filepath" label="文档路径" type="STRING" length="500"/>
<attribute name="fullpath" label="文档全路径文件名" type="STRING" length="600"/>
<attribute name="inputuserid" label="创建人" type="STRING" length="100"/>
<attribute name="inputorgid" label="创建人所属部门" type="STRING" length="100"/>
<attribute name="inputtime" label="创建时间" type="STRING" length="100"/>
<attribute name="updateuserid" label="修改人" type="STRING" length="100"/>
<attribute name="updateorgid" label="修改人所属部门" type="STRING" length="100"/>
<attribute name="updatetime" label="修改时间" type="STRING" length="100"/>
<attribute name="config_id" label="文件清单配置标识" type="STRING" length="100"/>
<attribute name="doc_class_itemno" label="资料分类编号" type="STRING" length="100"/>
<attribute name="singcontract_id" label="契约锁合同id" type="STRING" length="64"/>
<attribute name="content_type" label="文件格式" type="STRING" length="100"/>
<attribute name="flow_unid" label="流程id" type="STRING" length="32"/>
<attribute name="process" label="合同制作过程" type="STRING" length="32"/>
<attribute name="sendprocess" label="契约锁发送过程" type="STRING" length="32"/>
<attribute name="message" label="记录作废1、退回0、记录最后一次错误信息" type="STRING" length="200"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_doc_contract_list" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_ONEDIMENSIONALCODE" label="一维码表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="PROJECT_ID" label="项目ID" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="CONTRACT_NO" label="合同编号" type="STRING" length="32"/>
<attribute name="FILEPATH" label="文档路径" type="STRING" length="500"/>
<attribute name="FULLPATH" label="文档全路径文件名" type="STRING" length="600"/>
<attribute name="FILENAME" label="文件名" type="STRING" length="250"/>
<attribute name="FILESIZE" label="文件大小" type="STRING" length="10"/>
<attribute name="INPUTUSERID" label="上传人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="上传部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="上传时间" type="STRING" length="32"/>
<attribute name="REMARK" label="备注" type="STRING" length="200"/>
<attribute name="CONTENT_TYPE" label="文件格式" type="STRING" length="200"/>
<attribute name="DELETEED" label="是否已删除" type="STRING" length="32"/>
<attribute name="OBJECTTYPE" label="流程编号" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="40"/>
<attribute name="STANDBY" label="备用" type="STRING" length="40"/>
<attribute name="DESCRIBE" label="描述" type="STRING" length="40"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_onedimensionalcode" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LC_COPYFILE_LOG" label="文件拷贝日志表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_NO" label="合同编号" type="STRING" length="32"/>
<attribute name="BATCH_NO" label="批次号" type="STRING" length="32"/>
<attribute name="COPY_TYPE" label="拷贝类型" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="上传人" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="上传时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lc_copyfile_log" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_FILE_MAILARCHIVING_INFO" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="CONTRACT_NUMBER" label="合同编号" type="STRING" length="32"/>
<attribute name="ARCHIVING_PERSON" label="归档人" type="STRING" length="32"/>
<attribute name="ARCHIVING_TIME" label="归档时间" type="STRING" length="32"/>
<attribute name="ARCHIVING_CABINET_NO" label="档案柜号" type="STRING" length="32"/>
<attribute name="ALLSTATUS" label="总邮寄状态" type="STRING" length="32"/>
<attribute name="ALLHANDOVERSTATUS" label="总接收状态" type="STRING" length="32"/>
<attribute name="EXPCOMPANY" label="快递公司" type="STRING" length="32"/>
<attribute name="EXPNUMBER" label="快递单号" type="STRING" length="100"/>
<attribute name="DEMO" label="备注" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="FILE_NUMBER" label="档案编号" type="STRING" length="32"/>
<attribute name="REMARKS" label="备注" type="STRING" length="32"/>
<attribute name="opinion_comments" label="意见解释" type="STRING" length="255"/>
<attribute name="EXPSTRATDATE" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="EXPENDDATE" label="档案收到时间" type="STRING" length="32"/>
<attribute name="is_delay" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="delay_date" label="档案收到时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_file_mailarchiving_info" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_FILE_MAILARCHIVING_INFO_TEMP" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="CONTRACT_NUMBER" label="合同编号" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="FLOWUNID" type="STRING" length="32"/>
<attribute name="ARCHIVING_PERSON" label="归档人" type="STRING" length="32"/>
<attribute name="ARCHIVING_TIME" label="归档时间" type="STRING" length="32"/>
<attribute name="ARCHIVING_CABINET_NO" label="档案柜号" type="STRING" length="32"/>
<attribute name="ALLSTATUS" label="总邮寄状态" type="STRING" length="32"/>
<attribute name="ALLHANDOVERSTATUS" label="总接收状态" type="STRING" length="32"/>
<attribute name="EXPCOMPANY" label="快递公司" type="STRING" length="32"/>
<attribute name="EXPNUMBER" label="快递单号" type="STRING" length="100"/>
<attribute name="DEMO" label="备注" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="FILE_NUMBER" label="档案编号" type="STRING" length="32"/>
<attribute name="REMARKS" label="备注" type="STRING" length="32"/>
<attribute name="IS_FLOWING" label="是否在流程中" type="STRING" length="32"/>
<attribute name="opinion_comments" label="意见解释" type="STRING" length="255"/>
<attribute name="EXPSTRATDATE" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="EXPENDDATE" label="档案收到时间" type="STRING" length="32"/>
<attribute name="is_delay" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="delay_date" label="档案收到时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_file_mailarchiving_info_temp" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LM_MAILONLINE_DOC" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="MAIL_ID" label="合同编号" type="STRING" length="32"/>
<attribute name="LIBRARYID" label="文件id" type="STRING" length="32"/>
<attribute name="MAILSTATUS" label="邮寄状态" type="STRING" length="32"/>
<attribute name="HANDOVERSTATUS" label="接收状态" type="STRING" length="32"/>
<attribute name="DEMO" label="备注" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="ATTRIBUTE1" label="备用字段1" type="STRING" length="32"/>
<attribute name="ATTRIBUTE2" label="备用字段2" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lm_mailonline_doc" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LM_MAILONLINE_DOC_TEMP" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="MAIL_ID" label="合同编号" type="STRING" length="32"/>
<attribute name="LIBRARYID" label="文件id" type="STRING" length="32"/>
<attribute name="MAILSTATUS" label="邮寄状态" type="STRING" length="32"/>
<attribute name="HANDOVERSTATUS" label="接收状态" type="STRING" length="32"/>
<attribute name="DEMO" label="备注" type="STRING" length="1000"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="ATTRIBUTE1" label="备用字段1" type="STRING" length="32"/>
<attribute name="ATTRIBUTE2" label="备用字段2" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lm_mailonline_doc_temp" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_MAILARCHIVING_INFO_TEMP" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="PRODUCT_ID" label="产品ID" type="STRING" length="32"/>
<attribute name="PROJECT_NO" label="项目编号" type="STRING" length="32"/>
<attribute name="PROJECT_ID" label="项目ID" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="MAIL_STATUS" label="邮寄状态" type="STRING" length="32"/>
<attribute name="HANDOVER_STATUS" label="接收状态" type="STRING" length="32"/>
<attribute name="APP_CODE" label="影像编号" type="STRING" length="32"/>
<attribute name="APP_NAME" label="影像名称" type="STRING" length="100"/>
<attribute name="NEW_FILE_CODE" label="文件编号" type="STRING" length="32"/>
<attribute name="NEW_FILE_NAME" label="文件名称" type="STRING" length="32"/>
<attribute name="IS_MUST" label="是否必填" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_mailarchiving_info_temp" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_MAILARCHIVING_INFO" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="PRODUCT_ID" label="产品ID" type="STRING" length="32"/>
<attribute name="PROJECT_NO" label="项目编号" type="STRING" length="32"/>
<attribute name="PROJECT_ID" label="项目ID" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="MAIL_STATUS" label="邮寄状态" type="STRING" length="32"/>
<attribute name="HANDOVER_STATUS" label="接收状态" type="STRING" length="32"/>
<attribute name="APP_CODE" label="影像编号" type="STRING" length="32"/>
<attribute name="APP_NAME" label="影像名称" type="STRING" length="100"/>
<attribute name="NEW_FILE_CODE" label="文件编号" type="STRING" length="32"/>
<attribute name="NEW_FILE_NAME" label="文件名称" type="STRING" length="32"/>
<attribute name="IS_MUST" label="是否必填" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_mailarchiving_info" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LM_APPROVALOPINION_DOC" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="MAILSTATUS" label="邮寄状态" type="STRING" length="32"/>
<attribute name="HANDOVERSTATUS" label="接收状态" type="STRING" length="32"/>
<attribute name="DEMO" label="备注" type="STRING" length="2000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="ATTRIBUTE1" label="备用字段1" type="STRING" length="32"/>
<attribute name="ATTRIBUTE2" label="备用字段2" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lm_approvalopinion_doc" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LM_APPROVALOPINION_DOC_TEMP" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="32"/>
<attribute name="MAILSTATUS" label="邮寄状态" type="STRING" length="32"/>
<attribute name="HANDOVERSTATUS" label="接收状态" type="STRING" length="32"/>
<attribute name="DEMO" label="备注" type="STRING" length="2000"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="ATTRIBUTE1" label="备用字段1" type="STRING" length="32"/>
<attribute name="ATTRIBUTE2" label="备用字段2" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lm_approvalopinion_doc_temp" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="REMINDER_LETTER" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="64"/>
<attribute name="TYPE" label="类型" type="STRING" length="4"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="reminder_letter" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>

View File

@ -410,6 +410,35 @@
</managerProperties>
</manager>
</class>
<class name="FC_JJ_REPAY_PLAN" label="资方租金计划信息--九江" describe="资方租金计划信息--九江" keyAttributes="ID">
<attributes>
<attribute name="ID" label="唯一标识" type="STRING" length="32" />
<attribute name="FC_FILE_ID" label="资金渠道申请ID" type="STRING" length="32"/>
<attribute name="FC_PUSH_NAME" label="资金渠道申请ID" type="STRING" length="32"/>
<attribute name="FC_REQUEST_ID" label="资金渠道申请ID" type="STRING" length="32"/>
<attribute name="BSN_CNL_NO" label="业务渠道编号" type="STRING" length="32"/>
<attribute name="TECH_CNL_NO" label="技术渠道编号" type="STRING" length="32"/>
<attribute name="DUE_BILL_NO" label="借据号" type="STRING" length="32"/>
<attribute name="LOAN_INIT_PRIN" label="贷款总本金" type="STRING" length="32"/>
<attribute name="LOAN_INIT_TERM" label="分期总期数" type="STRING" length="32"/>
<attribute name="ALL_DISCOUNT_AMT" label="优惠总金额" type="STRING" length="32"/>
<attribute name="CURR_TERM" label="期次" type="STRING" length="32"/>
<attribute name="PMT_DUE_DATE" label="还款日期" type="STRING" length="32"/>
<attribute name="LOAN_TERM_PRIN" label="本金" type="STRING" length="32"/>
<attribute name="LOAN_TERM_INTEREST" label="利息" type="STRING" length="32"/>
<attribute name="LOAN_TERM_FEE" label="租金" type="STRING" length="32"/>
<attribute name="SUB_DUE_BILL_NO" label="子借据号" type="STRING" length="32"/>
<attribute name="DISCOUNT_AMT" label="优惠金额" type="STRING" length="32"/>
<attribute name="CREATE_TIME" label="创建时间" type="STRING" length="32"/>
<attribute name="UPDATE_TIME" label="修改时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="fc_jj_repay_plan"/>
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="FC_YC_PREPAY_QUERY" label="瓊품써헌桿炬쌈왯코휭" describe="瓊품써헌桿炬쌈왯코휭" keyAttributes="ID">
<attributes>
<attribute name="ID" label="顆寧깃街" type="STRING" length="32" />

Binary file not shown.

Binary file not shown.

11
config/icms.properties Normal file
View File

@ -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

View File

@ -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<ImageAttr> images ;
public ImageAttr() {
}
public ImageAttr(List<ImageAttr> 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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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<ImageBatch> imageBatchs ;
public List<ImageBatch> getImageBatchs() {
return imageBatchs;
}
public void setImageBatchs(List<ImageBatch> imageBatchs) {
this.imageBatchs = imageBatchs;
}
}

View File

@ -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<ImagePage> 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<ImagePage> getPage() {
return page;
}
public void setPage(List<ImagePage> page) {
this.page = page;
}
}

View File

@ -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;
}
}

View File

@ -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<ImageNode> nodes;
public List<ImageNode> getNodes() {
return nodes;
}
public void setNodes(List<ImageNode> nodes) {
this.nodes = nodes;
}
}

View File

@ -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;
}
}

View File

@ -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<ImageAttr> images;
public ImageTree(List<ImageAttr> images) {
this.images = images;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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<ImageBatch> batchs = new ArrayList<>();
if(appCode==null){
if(allAppInfoJson.size()==0){
System.out.println("δÕÒµ½¶ÔÓ¦µÄappCodeÐÅÏ¢");
return null;
}
for(int i=0;i<allAppInfoJson.size();i++){
String appCode = allAppInfoJson.getJSONObject(i).get("app_code").toString();
String appName = allAppInfoJson.getJSONObject(i).get("app_name").toString();
batchs.add(addBatch(appCode,appName,busiNo,null));
}
}else {
ImageBatch batch = new ImageBatch();
batch.setAppCode(appCode);
batch.setAppName(appName);
batch.setBusiNo(busiNo);
batch.setIdentity(identity);
batch.setCustomerName(customerName);
batchs.add(batch);
}
ImageMetaData metaData = addMetaData(batchs);
ImageRoot root = new ImageRoot(base,metaData);
return root;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public JSONArray getAllAppInfoJson() {
return allAppInfoJson;
}
public void setAllAppInfoJson(JSONArray allAppInfoJson) {
this.allAppInfoJson = allAppInfoJson;
}
}

View File

@ -0,0 +1,170 @@
package com.ample.icms.scan;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.ample.icms.service.ImageService;
import com.ample.icms.util.PropertiesUtil;
import com.sunyard.insurance.ecm.socket.client.AutoScanApi;
import com.sunyard.insurance.encode.client.EncodeAccessParam;
import com.tenwa.officetempalte.exportcallback.impl.ZipUtils;
import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST;
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.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.SAXReader;
import org.dom4j.io.XMLWriter;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
public class ImageDownload extends ImageService {
private String zipPath ;
private String projectId;
private String flowUnid;
private String fileSavePath;
public static String testBatchDownload () throws Exception {
//准备参数
StringBuilder sb = new StringBuilder("xml=交互参数xml字符串&code=ECM0009&format=xml");
String param = EncodeAccessParam.getEncodeParam(sb.toString(),300, PropertiesUtil.get("secret_key"));
String result="";
PostMethod postMethod = null;
HttpClient httpClient = null;
try{
postMethod = new PostMethod(PropertiesUtil.get("url"));
// 设置格式
postMethod.getParams().setContentCharset("UTF-8");
postMethod.setParameter("data", param);
postMethod.setRequestHeader("Referer", "http://172.16.20.212/imaging");
httpClient = new HttpClient();
// 执行postMethod
int statusCode = httpClient.executeMethod(postMethod);
if(statusCode== HttpStatus.SC_OK){
byte[] bodydata = postMethod.getResponseBody();
//取得返回值
result = new String(bodydata, "UTF-8");
}else{
}
}catch (HttpException e) {
//协议发生异常URL不合法请检查URL
} catch (IOException e) {
//请检查网络是否通畅检查网线是否插好
} catch(Exception e){
}finally {
if (postMethod != null) {
try {
postMethod.releaseConnection();
} catch (Exception e) {
}
}
if (httpClient != null) {
try {
((SimpleHttpConnectionManager) httpClient.getHttpConnectionManager()).shutdown();
} catch (Exception e) {
}
httpClient = null;
}
}
return result;
}
public void doUpload(){
// String zipPath = "C:/Users/ivanl/Desktop/影像系统/ECM4.0Demo/ECM4.0Demo/第三方上传/1111.zip";
String zipPath = PropertiesUtil.get("fileSavePathTemp")+"/"+flowUnid+".zip";
try {
AutoScanApi autoScanApi = new AutoScanApi(PropertiesUtil.get("service_ip"),8088,PropertiesUtil.get("secret_id")+"#"+PropertiesUtil.get("secret_key"));
String result = autoScanApi.ScanImageFile(appCode, zipPath);
String returnCode = result.substring(0,result.indexOf("@"));
String returnMsg = result.substring(result.indexOf("@")+1,result.length()+1);
intoLog(returnCode,returnMsg);
} catch (Exception e) {
e.printStackTrace();
}
}
public void intoLog(String code ,String msg) {
Transaction transaction = null;
Transaction.createTransaction("als");
SqlObject so = null;
try {
so = new SqlObject("insert into icms_upload_log (id,flowunid,path,code,msg,inputtime) values ()");
transaction.executeSQL(so);
transaction.commit();
} catch (Exception e) {
e.printStackTrace();
}
}
public void upload() throws Exception {
/**
* 1.找出需要上传的影像
* 3.在指定路径添加对应xml文件
* 4.打包上传
* 5.删除复制文件和打包文件
*/
FileOutputStream fos = new FileOutputStream(new File(PropertiesUtil.get("fileSavePathTemp")+"/"+flowUnid+".zip"));
ZipUtils zdo = new ZipUtils();
zdo.toZip(copyFile(),fos);
}
/**
* 上传成功后再删除
*/
public void deleteTemp(){
File f = new File(PropertiesUtil.get("fileSavePathTemp"));
if(f.length()!=0){
ZipUtils zdo = new ZipUtils();
zdo.deleteFile(f,false);
}
}
public List<File> copyFile() throws Exception {
List<File> files = new ArrayList<>();
BizObjectManager bom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME);
List<BizObject> 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();
}
}
}

View File

@ -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();
}
}

View File

@ -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;
}
}

View File

@ -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<ImagePage> pageList;
private static final String FileSavePath = PropertiesUtil.get("fileSavePathTemp");
public List<ImageNode> addNodes(List<ImagePage> pages) throws Exception {
ImageNode node = new ImageNode();
//ÈÚ×Ê×âÁÞºÏͬÌ×ϵ
node.setId(nodeId);
node.setAction("ADD");
node.setPage(pages);
List<ImageNode> nodes = new ArrayList<>();
nodes.add(node);
return nodes;
}
public ImageRoot createData() throws Exception {
addBaseData();
ImagePages pages = addPages(addNodes(pageList));
List<ImageBatch> 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<ImagePage> getPageList() {
return pageList;
}
public void setPageList(List<ImagePage> pageList) {
this.pageList = pageList;
}
public String getNodeId() {
return nodeId;
}
public void setNodeId(String nodeId) {
this.nodeId = nodeId;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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<ImagePage> page){
ImageNode node = new ImageNode();
node.setId(id);
node.setAction(action);
node.setPage(page);
}
public ImagePages addPages(List<ImageNode> 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<ImageBatch> batchs){
ImageMetaData metaData = new ImageMetaData();
metaData.setImageBatchs(batchs);
return metaData;
}
public ImageRoot createData() throws Exception {
addBaseData();
List<ImageBatch> 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 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\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;
}
}

View File

@ -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<BizObject> getFileBo(JBOTransaction tx) throws JBOException {
BizObjectManager bom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME,tx);
List<BizObject> 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<File> getFile(List<BizObject> bos) throws Exception {
List<File> 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<ImagePage> getPages(List<BizObject> bos) throws Exception {
List<ImagePage> 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<BizObject> boList = this.getFileBo(tx);
List<File> files = this.getFile(boList);
List<ImagePage> 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;
}
}

View File

@ -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;
}
}

View File

@ -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<String, String> attributes;
public static void load() {
attributes = new ConcurrentHashMap<String, String>();
Properties prop = new Properties();
try {
prop.load(PropertiesUtil.class.getResourceAsStream("/icms.properties"));
for(Map.Entry<Object, Object> entry : prop.entrySet()) {
if(entry.getKey() == null || entry.getValue() == null) {
continue;
}
attributes.put(entry.getKey().toString(), entry.getValue().toString());
}
} catch (IOException e) {
e.printStackTrace();
}
}
public static void destroy() {
if(attributes != null) attributes.clear();
}
public static String get(String propName) {
if(attributes == null) load();
return attributes.get(propName);
}
}

View File

@ -582,22 +582,16 @@ public class CmbToPayController extends BaseFlowStartAction {
for(int i = 0; i < c.length; i ++){
//二进制超过8位则为汉字
String len = Integer.toBinaryString(c[i]);
if(ChineseFlag){
if(len.length() > 8){
count=count+2;
if(len.length() > 8){
if(!ChineseFlag){
count=count+4;
ChineseFlag = true;
}else{
count ++;
ChineseFlag = false;
count=count+2;
}
}else{
if(len.length() > 8){
count=count+2+2;
ChineseFlag = true;
}else{
count ++;
ChineseFlag = false;
}
count ++;
ChineseFlag = false;
}
if(count==length){
str = str.substring(0,i+1);

View File

@ -114,7 +114,7 @@ public class FlowTaskViewTab {
BizObjectManager bm = null;
BizObjectQuery bq = null;
bm = JBOFactory.getFactory().getManager(OBJECTTYPE_RELA.CLASS_NAME);
bq = bm.createQuery("O.OBJECTTYPE=:OBJECTTYPE order by O.sortno ").setParameter("OBJECTTYPE", this.getObjectType());
bq = bm.createQuery("O.OBJECTTYPE=:OBJECTTYPE and isinuse='Y' order by O.sortno ").setParameter("OBJECTTYPE", this.getObjectType());
this.viewTabItemList=bq.getResultList(true);

View File

@ -2,9 +2,9 @@ package com.tenwa.officetempalte.exportcallback.impl;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@ -46,20 +46,27 @@ public class ZipUtils {
}
}
public void toZip(List<File> srcFiles, OutputStream out) throws RuntimeException {
//有些地方需要将文件转换为gbk编码为了之前别的引用可以继续用默认设为utf-8原ZipOutputStream(OutputStream out)构造方法默认就是utf-8
this.toZip(srcFiles,out,Charset.forName("UTF-8"));
}
/**
* 压缩成ZIP 方法2
* @param srcFiles
* 需要压缩的文件列表
* @param out
* 压缩文件输出流
* @param cs
* 编码格式
* @throws RuntimeException
* 压缩失败会抛出运行时异常
*/
public void toZip(List<File> srcFiles, OutputStream out) throws RuntimeException {
public void toZip(List<File> srcFiles, OutputStream out,Charset cs) throws RuntimeException {
long start = System.currentTimeMillis();
ZipOutputStream zos = null;
try {
zos = new ZipOutputStream(out);
zos = new ZipOutputStream(out,cs);
for (File srcFile : srcFiles) {
byte[] buf = new byte[BUFFER_SIZE];
zos.putNextEntry(new ZipEntry(srcFile.getName()));
@ -154,5 +161,24 @@ public class ZipUtils {
}
f.delete();//最后删除该目录中所有文件后就删除该目录
}
/**
*
* @param f
* @param deleteRoot true连当前目录一块删除false只删除当前目录下面的文件
*/
public void deleteFile(File f ,boolean deleteRoot){
File [] b = f.listFiles();//获取包含file对象对应的子目录或者文件
for(int i =0;i<b.length;i++){
if(b[i].isFile()){//判断是否为文件
b[i].delete();//如果是就删除
}else{
deleteFile(b[i]);//否则重新递归到方法中
}
}
if(deleteRoot){
f.delete();//最后删除该目录中所有文件后就删除该目录
}
}
}

View File

@ -1,31 +1,133 @@
package com.tenwa.util;
import com.tenwa.flow.treeview.action.BaseInitTreeView;
import com.ample.icms.query.*;
import com.sunyard.insurance.ecm.socket.client.AutoScanApi;
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.dom4j.Attribute;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import jbo.app.tenwa.doc.LB_DOCATTRIBUTE;
import jbo.app.tenwa.doc.LB_DOCRELATIVE;
import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
public class test {
public static void main(String[] args){
String zipPath = "C:/Users/ivanl/Desktop/11111.zip";
try {
// " sunyard#licenseKey" sunyard为接入系统IDlicenseKey为接入系统授权密钥
AutoScanApi autoScanApi = new AutoScanApi("192.168.7.71",8088,"anpeng#IU2VHdejDpUFzhoeT7tUSII3");
// // "10I" : 业务类型
// // zipPath 要上传批次文件的zip包的路径
// // returnMsg 第三方上传的返回状态
String returnMsg = autoScanApi.ScanImageFile("BQCW-000010", zipPath);
System.out.println(returnMsg);
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main1(String[] args) {
ImageQuery query = new ImageQuery();
query.setAppCode("BQCW-000010");
query.setAppName("业务申请");
query.setBusiNo("FBO2022031100000001");
query.setCode("ECM0013");
public static void main(String[] args) {
String sql = "select se.seriesid,se.seriesname from ("
+ "SELECT seriesid,max(seriesname) seriesname,max(brandid) brandid FROM vi_car_data where 1=1 group by seriesid"
+ ") se WHERE se.seriesname IS NOT NULL AND se.brandid='#brandid' ORDER BY se.seriesname DESC";
System.out.println(sql.substring(sql.toUpperCase().lastIndexOf("WHERE"), sql.length()));
System.out.println(sql.substring(0, sql.toLowerCase().lastIndexOf("where")));
sql = "SELECT DISTINCT O.ID, O.DOC_NAME,r.id " + "FROM O, "
+ LB_DOCRELATIVE.CLASS_NAME + " R "
+ "WHERE O.RELATIVE_ID = R.ID "
+ "AND O.ID NOT IN (SELECT A.LIBRARY_ID FROM "
+ LB_DOCATTRIBUTE.CLASS_NAME + " A) "
+ "AND R.ObjectType='BusinessApplyFlow' and R.proj_id=:projid " + "AND o.DOC_NATURE='01' "
+ "ORDER BY SERIAL_NUM";
System.out.println(sql);
String result="";
PostMethod postMethod = null;
HttpClient httpClient = null;
try {
String param =query.getRequestParam();
System.out.println("加密后数据:"+param);
postMethod = new PostMethod("http://192.168.7.71:8081/SunICMS/servlet/RouterServlet");
// 设置格式
postMethod.getParams().setContentCharset("UTF-8");
postMethod.setParameter("data", param);
postMethod.setRequestHeader("Referer", "http://172.16.20.212/imaging");
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);
} else {
}
}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;
}
}
}
// private static ArrayList<Book> bookList = new ArrayList<Book>();
public static void dom4j() {
// 解析books.xml文件
// 创建SAXReader的对象reader
SAXReader reader = new SAXReader();
try {
// 通过reader对象的read方法加载books.xml文件,获取docuemnt对象
Document document = reader.read(new File("src/res/books.xml"));
// 通过document对象获取根节点bookstore
Element bookStore = document.getRootElement();
// 通过element对象的elementIterator方法获取迭代器
Iterator it = bookStore.elementIterator();
// 遍历迭代器获取根节点中的信息书籍
while (it.hasNext()) {
System.out.println("=====开始遍历某一本书=====");
Element book = (Element) it.next();
// 获取book的属性名以及 属性值
List<Attribute> bookAttrs = book.attributes();
for (Attribute attr : bookAttrs) {
System.out.println("属性名:" + attr.getName() + "--属性值:"
+ attr.getValue());
}
Iterator itt = book.elementIterator();
while (itt.hasNext()) {
Element bookChild = (Element) itt.next();
System.out.println("节点名:" + bookChild.getName() + "--节点值:" + bookChild.getStringValue());
}
System.out.println("=====结束遍历某一本书=====");
}
} catch (DocumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,76 @@
package com.tenwa.voucher.serviceImp;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.dict.als.cache.CacheLoaderFactory;
import java.util.Map;
public class FundIncomeVoucherJJCCB extends FundIncomeVoucherInfoServiceImpl {
@Override
public void run() {
Transaction Sqlca =null;
try {
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
//todo 头上线将生产环境的编号放进来
setVoucherConfigNo("PZ2021101200000035");
setCorpusChannelNo("JJCCB");
generateVoucher(Sqlca);
} catch (JBOException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}finally {
try {
if(Sqlca!=null){
Sqlca.disConnect();
Sqlca = null;
}
} catch (JBOException e) {
e.printStackTrace();
try {
Sqlca.rollback();
} catch (JBOException jboException) {
jboException.printStackTrace();
}
}
}
}
/**
* 每条凭证各自差异数据放到参数List
* @param param
* @throws Exception
*/
@Override
public void addRespectiveParam(Map<String,String> param) throws Exception {
String money = "";
//100202为九江银行
if("100202".equals(param.get("subjectsCode"))){
money=param.get("TRANS_AMT");
param.put("contractNo","");
param.put("customerNo","");
param.put("customerName","");
//应财务要求九江银行填固定值一般编码为银行的都是11213分内部外部
param.put("cashFlow","11213");
}
//长期应收款\回租\汽车\本金
if("1531020101".equals(param.get("subjectsCode"))){
money=param.get("TRANS_AMT");
}
//未实现融资收益\回租\汽车 长期应收款\回租\汽车\利息
if("15320201".equals(param.get("subjectsCode"))||"1531020102".equals(param.get("subjectsCode"))){
money=this.getInterestTotalByContractId(param.get("contractId"));
}
//debit:credit:
if("1".equals(param.get("entrydc"))) {
param.put("debitMoney",money);
param.put("creditMoney","0.00");
}else{
param.put("debitMoney","0.00");
param.put("creditMoney",money);
}
}
}

View File

@ -0,0 +1,64 @@
package jbo.app.tenwa.doc;
import java.lang.String;
/**
* - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface LB_MAILARCHIVING_INFO{
/**
* <br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.app.tenwa.doc.LB_MAILARCHIVING_INFO";
/**
* 主键 STRING(32)<br>
*/
public static final String ID = "ID";
/**
* 产品ID STRING(32)<br>
*/
public static final String PRODUCT_ID = "PRODUCT_ID";
/**
* 项目编号 STRING(32)<br>
*/
public static final String PROJECT_NO = "PROJECT_NO";
/**
* 项目ID STRING(32)<br>
*/
public static final String PROJECT_ID = "PROJECT_ID";
/**
* 合同ID STRING(32)<br>
*/
public static final String CONTRACT_ID = "CONTRACT_ID";
/**
* 邮寄状态 STRING(32)<br>
*/
public static final String MAIL_STATUS = "MAIL_STATUS";
/**
* 接收状态 STRING(32)<br>
*/
public static final String HANDOVER_STATUS = "HANDOVER_STATUS";
/**
* 影像编号 STRING(32)<br>
*/
public static final String APP_CODE = "APP_CODE";
/**
* 影像名称 STRING(32)<br>
*/
public static final String APP_NAME = "APP_NAME";
/**
* 文件编号 STRING(32)<br>
*/
public static final String NEW_FILE_CODE = "NEW_FILE_CODE";
/**
* 文件名称 STRING(32)<br>
*/
public static final String NEW_FILE_NAME = "NEW_FILE_NAME";
/**
* 是否必填 STRING(32)<br>
*/
public static final String IS_MUST = "IS_MUST";
}

View File

@ -0,0 +1,68 @@
package jbo.app.tenwa.doc;
import java.lang.String;
/**
* - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface LB_MAILARCHIVING_INFO_TEMP{
/**
* <br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.app.tenwa.doc.LB_MAILARCHIVING_INFO_TEMP";
/**
* 主键 STRING(32)<br>
*/
public static final String ID = "ID";
/**
* 产品ID STRING(32)<br>
*/
public static final String PRODUCT_ID = "PRODUCT_ID";
/**
* 项目编号 STRING(32)<br>
*/
public static final String PROJECT_NO = "PROJECT_NO";
/**
* 项目ID STRING(32)<br>
*/
public static final String PROJECT_ID = "PROJECT_ID";
/**
* 合同ID STRING(32)<br>
*/
public static final String CONTRACT_ID = "CONTRACT_ID";
/**
* 邮寄状态 STRING(32)<br>
*/
public static final String MAIL_STATUS = "MAIL_STATUS";
/**
* 接收状态 STRING(32)<br>
*/
public static final String HANDOVER_STATUS = "HANDOVER_STATUS";
/**
* 影像编号 STRING(32)<br>
*/
public static final String APP_CODE = "APP_CODE";
/**
* 影像名称 STRING(32)<br>
*/
public static final String APP_NAME = "APP_NAME";
/**
* 文件编号 STRING(32)<br>
*/
public static final String NEW_FILE_CODE = "NEW_FILE_CODE";
/**
* 文件名称 STRING(32)<br>
*/
public static final String NEW_FILE_NAME = "NEW_FILE_NAME";
/**
* 是否必填 STRING(32)<br>
*/
public static final String IS_MUST = "IS_MUST";
/**
* 流程编号 STRING(32)<br>
*/
public static final String FLOWUNID = "FLOWUNID";
}

View File

@ -36,12 +36,13 @@ public class CorpusSourceFileCopy {
private String contractId;
private String fileType;
private String channelNo;
public void doCopy(JBOTransaction tx) throws Exception {
BizObjectManager ffpBom = null;
ffpBom = JBOFactory.getBizObjectManager(FC_FILE_PUSH.CLASS_NAME,tx);
//todo 添加渠道商的选择哪些需要拷表哪些不需要
String fileSql = "select ID,FILE_STS from O where FILE_TYPE='"+fileType+"' and FILE_STS='2'";
String fileSql = "select ID,FILE_STS from O where FILE_TYPE='"+fileType+"' and CHANNEL_NO ='"+channelNo+"' and FILE_STS='2'";
List<BizObject> ffpBoList = ffpBom.createQuery(fileSql).getResultList(true);
if(ffpBoList.size()==0){
ARE.getLog().info("暂时没有需要拷表的资方文件");
@ -685,5 +686,12 @@ public class CorpusSourceFileCopy {
public String getFileType() { return fileType; }
public void setFileType(String fileType) { this.fileType = fileType; }
public String getChannelNo() {
return channelNo;
}
public void setChannelNo(String channelNo) {
this.channelNo = channelNo;
}
}

View File

@ -28,6 +28,7 @@ public class CorpusSourceRentPlanCopy extends CorpusSourceFileCopy implements Jo
try {
tx = JBOFactory.createJBOTransaction();
setFileType("RepayPlan");
setChannelNo("PSBC");
doCopy(tx);
tx.commit();
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CorpusSourceRentPlanCopy", "success", "³É¹¦", curUserId);

View File

@ -0,0 +1,146 @@
package com.tenwa.lease.app.quartzmession;
import com.amarsoft.are.ARE;
import com.amarsoft.are.jbo.*;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.Transaction;
import com.base.util.QuartzUtil;
import jbo.app.tenwa.calc.LC_RENT_PLAN;
import jbo.oti.FC_FILE_PUSH;
import jbo.oti.FC_YC_FILE_REPAY_PLAN;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 资方租金计划拷贝
*/
public class CorpusSourceRentPlanJJCCB extends CorpusSourceFileCopy implements Job {
private String fileType;
private String channelNo;
public String getFileType() { return fileType; }
public void setFileType(String fileType) { this.fileType = fileType; }
public String getChannelNo() {
return channelNo;
}
public void setChannelNo(String channelNo) {
this.channelNo = channelNo;
}
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
String startime = StringFunction.getTodayNow();
Object userId = jobExecutionContext.getTrigger().getJobDataMap().get("CurUserId");
String curUserId = userId == null? "system" : userId.toString();
JBOTransaction tx = null;
try {
tx = JBOFactory.createJBOTransaction();
setFileType("RepayPlan");
setChannelNo("JJCCB");
this.doCopy(tx);
tx.commit();
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CorpusSourceRentPlanCopy", "success", "成功", curUserId);
} catch (Exception e) {
e.printStackTrace();
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CorpusSourceRentPlanCopy", "error", "失败", curUserId);
try {
if (tx != null) {
tx.rollback();
}
} catch (JBOException e1) {
e1.printStackTrace();
}
throw new JobExecutionException(e);
}
}
/**
* 执行自己类所需的操作
* @param fyfrpBoList
* @param tx
* @throws Exception
*/
public void respectiveDo(List<BizObject> fyfrpBoList , JBOTransaction tx) throws Exception {
//获取对应的合同
Map<String,String> contractMap = getContractIdMap(fyfrpBoList);
if(contractMap.size()==0){
String fcFileId = fyfrpBoList.get(0).getAttribute("FC_REQUEST_ID").toString();
ARE.getLog().error("未找到FC_REQUEST_ID: "+fcFileId+" 对应的合同ID");
throw new Exception("未找到FC_REQUEST_ID: "+fcFileId+" 对应的合同ID");
}
Transaction Sqlca = Transaction.createTransaction(tx);
//===顺序不能错===
//0.将租金计划拷贝到历史表
copyRentPlanFormatToHis(contractMap,"安鹏原正式租金计划",tx);
//1.更新租金计划表直接文件每条信息更新不需要遍历
updateRentPlan(fyfrpBoList,tx);
for(Map.Entry<String,String> entry : contractMap.entrySet()){
String contractId = entry.getKey();
Map<String ,String > param = getParamByContractId(contractId,tx);
//2.更新剩余本金
updateAllRemainCorpus(contractId,Sqlca);
//3.更新SP分润计划
updateSplitSP(param,Sqlca);
//4.插入分润计划
insertProfitPlan(param,tx);
//5.拷贝现金流到历史表
copyCashFlowFormatToHis(contractId,"安鹏原正式现金流",tx);
//6.生成新的现金流
createCashFlowByContractId(contractId,Sqlca);
//7.测算IRR
calcIRR(param,tx);
}
}
/**
* 根据文件ID获取租金计划信息
* @param fcFileId
* @return
* @throws Exception
*/
public List<BizObject> getFileInfoByFileId(String fcFileId) throws Exception {
String sql = "select fr.CONTRACT_ID,O.FC_REQUEST_ID,O.LEND_TERM,O.ANS_REPAYMENT_DATE,O.ANS_PRINCIPAL,O.ANS_INTEREST,ANS_REPAYMENT_MONEY from O left join jbo.oti.FC_REQUEST fr on O.FC_REQUEST_ID=fr.ID where fr.DEL_FLAG='0' and O.FC_FILE_ID=:fcFileId";
BizObjectManager fyfrpBom = JBOFactory.getBizObjectManager("FC_JJ_REPAY_PLAN.CLASS_NAME");
List<BizObject> fyfrpBoList = fyfrpBom.createQuery(sql).setParameter("fcFileId",fcFileId).getResultList(false);
if(fyfrpBoList.size()==0){
ARE.getLog().error("未找到FC_REQUEST_ID: "+fcFileId+" 对应的资方还款计划");
throw new Exception("未找到FC_REQUEST_ID: "+fcFileId+" 对应的资方还款计划");
}
return fyfrpBoList;
}
public void updateRentPlan(List<BizObject> fyfrpBoList,JBOTransaction tx) throws JBOException, ParseException {
BizObjectManager lrpBom = null;
lrpBom = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME,tx);
//更新租金计划表
for(BizObject bo : fyfrpBoList){
//获取参数
String contractId = bo.getAttribute("CONTRACT_ID").toString();
String lendTerm = bo.getAttribute("CURR_TERM").toString();
String principal = bo.getAttribute("LOAN_TERM_PRIN").toString();
String interest = bo.getAttribute("LOAN_TERM_INTEREST").toString();
String rent = bo.getAttribute("LOAN_TERM_FEE").toString();
String repaymentDate = bo.getAttribute("PMT_DUE_DATE").toString();
//转换日期格式
Date date = new SimpleDateFormat("yyyyMMdd").parse(repaymentDate);
repaymentDate = new SimpleDateFormat("yyyy/MM/dd").format(date);
//更新租金计划表
BizObject lrpBo = lrpBom.createQuery("CONTRACT_ID=:contractId and PLAN_LIST=:lendTerm").setParameter("contractId",contractId).setParameter("lendTerm",lendTerm).getSingleResult(true);
lrpBo.setAttributeValue("RENT",rent);
lrpBo.setAttributeValue("CORPUS",principal);
lrpBo.setAttributeValue("INTEREST",interest);
lrpBo.setAttributeValue("CORPUS_BUSINESS",principal);
lrpBo.setAttributeValue("INTEREST_BUSINESS",interest);
lrpBo.setAttributeValue("PLAN_DATE",repaymentDate);
lrpBom.saveObject(lrpBo);
}
}
}

View File

@ -31,6 +31,7 @@ public class CorpusSourceRentResultCopy extends CorpusSourceFileCopy implements
try {
tx = JBOFactory.createJBOTransaction();
setFileType("RepayResult");
setChannelNo("PSBC");
doCopy(tx);
tx.commit();
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CorpusSourceRentPlanCopy", "success", "³É¹¦", curUserId);

View File

@ -1,25 +1,24 @@
package com.tenwa.lease.flow.project.businessapply;
import com.amarsoft.are.jbo.*;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.Transaction;
import com.ample.icms.query.ImageCount;
import com.ample.icms.util.GetInfoUtil;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import jbo.app.tenwa.doc.*;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import com.amarsoft.awe.util.Transaction;
import jbo.app.tenwa.doc.LB_FILE_MAILARCHIVING_INFO;
import jbo.app.tenwa.doc.LB_FILE_MAILARCHIVING_INFO_TEMP;
import jbo.app.tenwa.doc.LM_APPROVALOPINION_DOC;
import jbo.app.tenwa.doc.LM_APPROVALOPINION_DOC_TEMP;
import jbo.app.tenwa.doc.LM_MAILONLINE_DOC_TEMP;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.util.StringFunction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
public class DocMailAction {
private String userid;
@ -42,6 +41,10 @@ public class DocMailAction {
String [] contractlist = contractid.split("@");
Transaction Sqlca = Transaction.createTransaction(tx);
for(String contractId:contractlist){
String icmsResult = getDocList(contractId,tx);
if(!"sucess".equals(icmsResult)){
return icmsResult;
}
//ÓʼÄ״̬
String ALLSTATUS = "none";
//×ܽÓÊÕ״̬
@ -76,6 +79,7 @@ public class DocMailAction {
bo.setAttributeValue(LB_FILE_MAILARCHIVING_INFO_TEMP.opinion_comments, result);
}
lfmitBom.saveObject(bo);
fromCondtion.put("contract_id", contractId);
otherProperty.put("flowunid", flowunid);
DataOperatorUtil.copyJBOSet(LM_APPROVALOPINION_DOC.CLASS_NAME, fromCondtion,LM_APPROVALOPINION_DOC_TEMP.CLASS_NAME, null, otherProperty,null, tx);
@ -85,13 +89,14 @@ public class DocMailAction {
}
public String deleteReadyMailList(JBOTransaction tx) throws JBOException{
BizObjectManager lfmitBom = JBOFactory.getBizObjectManager(LB_FILE_MAILARCHIVING_INFO_TEMP.CLASS_NAME, tx);
BizObjectManager lmdtBom = JBOFactory.getBizObjectManager(LM_MAILONLINE_DOC_TEMP.CLASS_NAME, tx);
//BizObjectManager lmdtBom = JBOFactory.getBizObjectManager(LM_MAILONLINE_DOC_TEMP.CLASS_NAME, tx);
BizObjectManager lmaitBom = JBOFactory.getBizObjectManager(LB_MAILARCHIVING_INFO_TEMP.CLASS_NAME, tx);
BizObjectManager ladtBom = JBOFactory.getBizObjectManager(LM_APPROVALOPINION_DOC_TEMP.CLASS_NAME, tx);
String [] contractlist = contractid.split("@");
for(String contractId:contractlist){
lfmitBom.createQuery("delete from O where contract_id = '"+contractId+"' and flowunid='"+flowunid+"'").executeUpdate();
lmdtBom.createQuery("delete from O where contract_id = '"+contractId+"' and flowunid='"+flowunid+"'").executeUpdate();
lmaitBom.createQuery("delete from O where contract_id = '"+contractId+"' and flowunid='"+flowunid+"'").executeUpdate();
ladtBom.createQuery("delete from O where contract_id = '"+contractId+"' and flowunid='"+flowunid+"'").executeUpdate();
}
return "success";
@ -123,6 +128,38 @@ public class DocMailAction {
lfmiBom.createQuery(sql+"' where flowunid='"+flowunid+"' and contract_id='"+contractid+"'").executeUpdate();
return "success";
}
public String updateMailStatus(JBOTransaction tx) throws JBOException{
BizObjectManager lmaitBom = JBOFactory.getBizObjectManager(LB_MAILARCHIVING_INFO_TEMP.CLASS_NAME);
BizObjectManager lfmitBom = JBOFactory.getBizObjectManager(LB_FILE_MAILARCHIVING_INFO_TEMP.CLASS_NAME);
int allCount = lmaitBom.createQuery(" flowunid=:flowunid and contract_id=:contractId and MAIL_STATUS='all'").setParameter("flowunid", flowunid).setParameter("contractId", contractid).getTotalCount();
int totalCount = lmaitBom.createQuery(" flowunid=:flowunid and contract_id=:contractId ").setParameter("flowunid", flowunid).setParameter("contractId", contractid).getTotalCount();
//跟上面方法不一样是为了考虑状态为null的情况
String allStatus = "none";
if(allCount>0&&allCount==totalCount){
allStatus = "all";
}else if(allCount>0&&totalCount>allCount){
allStatus = "part";
}
lfmitBom.createQuery("update O set allstatus=:allStatus where flowunid=:flowUnid and contract_id=:contractId")
.setParameter("allStatus",allStatus).setParameter("flowUnid",flowunid).setParameter("contractId",contractid).executeUpdate();
return "success";
}
public String updateAcrhivingStatus(JBOTransaction tx) throws JBOException{
BizObjectManager lmaitBom = JBOFactory.getBizObjectManager(LB_MAILARCHIVING_INFO_TEMP.CLASS_NAME, tx);
BizObjectManager lfmitBom = JBOFactory.getBizObjectManager(LB_FILE_MAILARCHIVING_INFO_TEMP.CLASS_NAME, tx);
int allCount = lmaitBom.createQuery(" flowunid=:flowunid and contract_id=:contractId and HANDOVER_STATUS='all'").setParameter("flowunid", flowunid).setParameter("contractId", contractid).getTotalCount();
int totalCount = lmaitBom.createQuery(" flowunid=:flowunid and contract_id=:contractId ").setParameter("flowunid", flowunid).setParameter("contractId", contractid).getTotalCount();
//跟上面方法不一样是为了考虑状态为null的情况
String allStatus = "none";
if(allCount>0&&allCount==totalCount){
allStatus = "all";
}else if(allCount>0&&totalCount>allCount){
allStatus = "part";
}
lfmitBom.createQuery("update O set ALLHANDOVERSTATUS=:allStatus where flowunid=:flowUnid and contract_id=:contractId")
.setParameter("allStatus",allStatus).setParameter("flowUnid",flowunid).setParameter("contractId",contractid).executeUpdate();
return "success";
}
public String asSaveHandOverStatus(JBOTransaction tx) throws JBOException{
BizObjectManager lfmitBom = JBOFactory.getBizObjectManager(LM_MAILONLINE_DOC_TEMP.CLASS_NAME, tx);
//BizObjectManager lfmiBom = JBOFactory.getBizObjectManager(LB_FILE_MAILARCHIVING_INFO_TEMP.CLASS_NAME, tx);
@ -178,6 +215,62 @@ public class DocMailAction {
fboManage.saveObject(fbo);
return "success";
}
public String getDocList(String contractid,JBOTransaction tx) throws SQLException, JBOException, DocumentException {
Transaction Sqlca = Transaction.createTransaction(tx);
String responseCode = "";
String responseMsg = "sucess";
GetInfoUtil giu = new GetInfoUtil();
String projectNo = giu.getProjectNoByContractId(contractid,tx);
String app = giu.getAppInfoByProjectNo(projectNo,"MortgageFileMailFlow",tx);
String [] appInfo = app.split("@");
String appCode = appInfo[0];
String appName = appInfo[1];
if("0000".equals(appCode)){
responseMsg = appName;
return responseMsg;
}
ImageCount ic = new ImageCount();
ic.setAppCode(appCode);
ic.setAppName(appName);
ic.setBusiNo(projectNo);
String result = ic.getResult();
if("0000".equals(result)){
responseMsg = "连接影像系统失败,请及时联系管理员!";
return responseMsg;
}else {
BizObjectManager lfmitBom = JBOFactory.getBizObjectManager(LB_MAILARCHIVING_INFO_TEMP.CLASS_NAME, tx);
Document dom = DocumentHelper.parseText(result);
Element root = dom.getRootElement();
responseCode = root.element("RESPONSE_CODE").getTextTrim();
if("400".equals(responseCode)){
responseMsg = root.element("RESPONSE_MSG").getTextTrim();
return responseMsg;
}
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();
String isMust = elm.element("IS_MUST").getTextTrim();
BizObject bo = lfmitBom.newObject();
bo.setAttributeValue("PRODUCT_ID",giu.getProductIdByProjectNo(projectNo,Sqlca));
bo.setAttributeValue("PROJECT_NO",projectNo);
bo.setAttributeValue("PROJECT_ID",giu.getProjectIdByContractId(contractid,Sqlca));
bo.setAttributeValue("CONTRACT_ID",contractid);
bo.setAttributeValue("MAIL_STATUS","all");
bo.setAttributeValue("HANDOVER_STATUS","none");
bo.setAttributeValue("APP_CODE",appCode);
bo.setAttributeValue("APP_NAME",appName);
bo.setAttributeValue("NEW_FILE_CODE",newFileCode);
bo.setAttributeValue("NEW_FILE_NAME",newFileName);
bo.setAttributeValue("IS_MUST",isMust);
bo.setAttributeValue("FLOWUNID",flowunid);
lfmitBom.saveObject(bo);
}
}
return responseMsg;
}
public String getUserid() {
return userid;

View File

@ -1,28 +1,16 @@
package com.tenwa.lease.flow.project.commbusiness;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.app.tenwa.calc.LC_RENT_PLAN;
import jbo.app.tenwa.calc.LC_RENT_PLAN_HIS;
import jbo.app.tenwa.doc.LB_FILE_MAILARCHIVING_INFO;
import jbo.app.tenwa.doc.LB_FILE_MAILARCHIVING_INFO_TEMP;
import jbo.app.tenwa.doc.LM_APPROVALOPINION_DOC;
import jbo.app.tenwa.doc.LM_APPROVALOPINION_DOC_TEMP;
import jbo.app.tenwa.doc.LM_MAILONLINE_DOC;
import jbo.app.tenwa.doc.LM_MAILONLINE_DOC_TEMP;
import com.amarsoft.app.lc.workflow.action.GetFlowAction;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService;
import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum;
import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp;
import jbo.app.tenwa.doc.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class LBFileMailTempToFormal extends BaseBussiness {
@ -35,10 +23,12 @@ public class LBFileMailTempToFormal extends BaseBussiness {
Map<String,String>otherProperty=new HashMap<String, String>();
//»ñÈ¡ËùÓÐÓʼĵĺÏͬ
BizObjectManager lfmiBom = JBOFactory.getBizObjectManager(LB_FILE_MAILARCHIVING_INFO_TEMP.CLASS_NAME, Sqlca);
BizObjectManager lmdtBom = JBOFactory.getBizObjectManager(LM_MAILONLINE_DOC_TEMP.CLASS_NAME, Sqlca);
//BizObjectManager lmdtBom = JBOFactory.getBizObjectManager(LM_MAILONLINE_DOC_TEMP.CLASS_NAME, Sqlca);
BizObjectManager lmatBom = JBOFactory.getBizObjectManager(LB_MAILARCHIVING_INFO_TEMP.CLASS_NAME, Sqlca);
List<BizObject> lfmitlist = lfmiBom.createQuery("flowunid =:flowunid").setParameter("flowunid", flowUnid).getResultList(true);
fromCondtion.put("flowunid", flowUnid);
DataOperatorUtil.copyJBOSet(LM_APPROVALOPINION_DOC_TEMP.CLASS_NAME, fromCondtion, LM_APPROVALOPINION_DOC.CLASS_NAME, null, null, null, Sqlca);
DataOperatorUtil.copyJBOSet(LB_MAILARCHIVING_INFO_TEMP.CLASS_NAME, fromCondtion, LB_MAILARCHIVING_INFO.CLASS_NAME, null, null, null, Sqlca);
for(BizObject bo:lfmitlist){
fromCondtion.put("flowunid", flowUnid);
fromCondtion.put("contract_id", bo.getAttribute("contract_id").getString());
@ -46,12 +36,12 @@ public class LBFileMailTempToFormal extends BaseBussiness {
bo.setAttributeValue("is_flowing", "1");
lfmiBom.saveObject(bo);
DataOperatorUtil.copySingleJBO(LB_FILE_MAILARCHIVING_INFO_TEMP.CLASS_NAME, fromCondtion, LB_FILE_MAILARCHIVING_INFO.CLASS_NAME,toCondtion, null, Sqlca);
List<BizObject> lmdtlist = lmdtBom.createQuery("flowunid=:flowunid and contract_id =:contract_id").setParameter("flowunid", flowUnid).setParameter("contract_id", bo.getAttribute("contract_id").getString()).getResultList(false);
/*List<BizObject> lmdtlist = lmatBom.createQuery("flowunid=:flowunid and contract_id =:contract_id").setParameter("flowunid", flowUnid).setParameter("contract_id", bo.getAttribute("contract_id").getString()).getResultList(false);
for(BizObject bo1:lmdtlist){
fromCondtion.put("libraryid", bo1.getAttribute("libraryid").getString());
toCondtion.put("libraryid", bo1.getAttribute("libraryid").getString());
DataOperatorUtil.copySingleJBO(LM_MAILONLINE_DOC_TEMP.CLASS_NAME, fromCondtion, LM_MAILONLINE_DOC.CLASS_NAME,toCondtion, null,Sqlca);
}
}*/
fromCondtion.clear();
toCondtion.clear();
otherProperty.clear();

View File

@ -0,0 +1,47 @@
package com.tenwa.lease.flow.project.commcheck;
import com.amarsoft.app.alarm.AlarmBiz;
import com.amarsoft.awe.util.Transaction;
import com.ample.icms.check.ImageCheck;
import com.ample.icms.util.GetInfoUtil;
/**
* 资料清单检查
* @author 20170524
*
*/
public class IcmsDocListCheck extends AlarmBiz {
@Override
public Object run(Transaction Sqlca) throws Exception {
String flowUnid = this.getAttribute("ObjectNo").toString();
GetInfoUtil gif = new GetInfoUtil();
String projectNo = gif.getProjectNoByFlowUnid(flowUnid);
if(projectNo==null){
setPass(false);
putMsg("未找到匹配的项目编号,请联系管理员!");
return null;
}
String app = gif.getAppInfoByFlowUnid(flowUnid);
String [] appInfo = app.split("@");
String appCode = appInfo[0];
String appName = appInfo[1];
if("0000".equals(appCode)){
setPass(false);
putMsg(appName);
return null;
}
ImageCheck ic= new ImageCheck();
ic.setAppCode(appCode);
ic.setAppName(appName);
ic.setBusiNo(projectNo);
String result =ic.resultAnalysis(ic.getResult());
String[] resultInfo = result.split("@");
if("true".equals(resultInfo[0])){
setPass(true);
}else{
setPass(false);
}
putMsg(resultInfo[1]);
return null;
}
}

View File

@ -0,0 +1,43 @@
package com.tenwa.lease.flow.project.commcheck;
import com.amarsoft.app.alarm.AlarmBiz;
import com.amarsoft.awe.util.Transaction;
import com.ample.icms.check.ImageCheck;
import com.ample.icms.util.GetInfoUtil;
/**
* ×ÊÁÏÇåµ¥¼ì²é
* @author 20170524
*
*/
public class IcmsDocListCheckOfDistributor extends AlarmBiz {
@Override
public Object run(Transaction Sqlca) throws Exception {
String flowUnid = this.getAttribute("ObjectNo").toString();
GetInfoUtil gif = new GetInfoUtil();
String busiNo = gif.getDistributorIdByFlowUnid(flowUnid,Sqlca);
String flowNo = gif.getFlowNoByFlowUnid(flowUnid,Sqlca);
String app = gif.getAppInfoByFlowNo(flowNo,Sqlca);
String [] appInfo = app.split("@");
String appCode = appInfo[0];
String appName = appInfo[1];
if("0000".equals(appCode)){
setPass(false);
putMsg(appName);
return null;
}
ImageCheck ic= new ImageCheck();
ic.setAppCode(appCode);
ic.setAppName(appName);
ic.setBusiNo(busiNo);
String result =ic.resultAnalysis(ic.getResult());
String[] resultInfo = result.split("@");
if("true".equals(resultInfo[0])){
setPass(true);
}else{
setPass(false);
}
putMsg(resultInfo[1]);
return null;
}
}