合同撤销流程查询放款申请已撤销的资料清单

This commit is contained in:
zhanglei 2020-12-10 17:58:36 +08:00
parent 86e27a1928
commit 4e37d776d6
2 changed files with 299 additions and 0 deletions

View File

@ -0,0 +1,254 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_simplelist.jspf"%>
<%@ page import="com.tenwa.doc.action.DocListInitAction" %>
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
<%@ page import="com.amarsoft.app.util.ProductParamUtil" %>
<%@ page import="jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT" %>
<%
/*
Author: undefined 2016-09-01
Content:
History Log:
*/
String objectno = CurPage.getParameter("FlowUnid");
String flowunid="";
String contractId = CurPage.getParameter("ContractId");
String projectId = CurPage.getParameter("ProjectId");
System.out.println("contractId=" + contractId);
//将空值转化为空字符串
BizObjectManager fbo = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME);
String sSql = " select ldl.flow_unid " +
" from LB_DOCLIBRARY ld " +
" LEFT JOIN LB_DOCRELATIVE ldl on ld.relative_id=ldl.id " +
" where ldl.proj_id='"+ projectId +"' and ldl.objecttype='FundPaymentCarFlow' and ldl.flow_unid <> '"+objectno+"' " +
" GROUP BY ldl.flow_unid ";
ASResultSet rs = null;
rs = Sqlca.getASResultSet(sSql);
while (rs.next()) {
flowunid = DataConvert.toString(rs.getString("flow_unid"));
}
rs.getStatement().close();
String flowstate=CurPage.getParameter("flowstate");
String CustomerType=CurPage.getParameter("CustomerType");
String carAttributes=CurPage.getParameter("carAttributes");//获取车类型
if(flowunid==""||flowunid==null){
flowunid="flowunid";
}
BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);//流程对象
String sObjectType = "FlowPayDocListDelete";//付款申请
String ishistory=CurPage.getParameter("IsHistory");
String nodeNo=CurPage.getParameter("NodeNo");
String RightType= "ReadOnly";
String username=CurUser.getUserName();
String phaseNo = CurPage.getParameter("PhaseNo");
String apply = CurPage.getParameter("ApplyType");
String type= "fundPay";
if(type==null)type="";
List<Object> list = ProductParamUtil.getProductDocInfo(CurPage.getParameter("ProductId"),"PRD0412");//方案类型
String types="";
String docList="";
for(int i=0;i<list.size();i++){
Map<String,Object> map=(Map<String,Object>)list.get(i);
if(sObjectType.equals(map.get("FLOW_INFO").toString())){
types=map.get("TYPE").toString();
if("SingleRow".equals(types)){
docList=map.get("DOCLIST").toString();
}else{
List l=(List)map.get("DOCCONFIG");
docList=l.toString();
}
}
}
String docClassItemno=docList;
String[] itemnos=docClassItemno.split(",");
String s="";
String classItemno ="";
for(int i=0;i<itemnos.length;i++){
s+="'"+itemnos[i]+"',";
}
if(s.length()>0){
s=s.substring(0, s.length()-1);
classItemno = s.replace(",", "@");
}
String compClientID = request.getParameter("CompClientID");
ASObjectModel doTemp = new ASObjectModel("FlowPayDocListDelete");
doTemp.setVisible("operation", false);
// String otherWhere = "and rela.proj_id='"+ projectId +"'and rela.flow_unid='"+ flowunid +"' and rela.objecttype='FundPaymentCarFlow'";
// String otherWhere = and rela.proj_id='4e0962e029a8473492f784732a004e2e' and (rela.contract_id='' or rela.contract_id is null or rela.contract_id='d6bd7d316ea24b7bbfad1bc9f83b2b56') ;
String otherWhere = "and rela.proj_id='"+ projectId +"' and rela.objecttype='FundPaymentCarFlow'";
doTemp.appendJboWhere(otherWhere);
doTemp.setLockCount(2);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1";//只读模式
isShowButton=false;
dwTemp.setPageSize(500);
dwTemp.genHTMLObjectWindow(flowunid);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] =null;
sButtons=new String[][]{
{"true","","Button","保存","保存所有修改","saveRecord()","","","",""},
{"true","","Button","批量下载","批量下载","downloadZipFile()","","","","btn_icon_down"},
};
%>
<script type="text/javascript">
var rowSpan="One_Classify";
</script>
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
window.onload=function(){
/* var RowCount = getRowCount(0);
for(var i=0;i<RowCount;i++){
if($("#INPUT_myiframe0_Doc_Nature_"+i+"_2").text()=="必备"){
$("#INPUT_myiframe0_Doc_Nature_"+i+"_2").attr("style","color:red");
}
} */
heping();
$("#DWTD").width( document.body.offsetWidth - 10);
$("#DWTD").width( document.body.offsetHeight - 20);
document.getElementById('DWTD').innerHTML = '<div style="width:'+(document.body.offsetWidth - 10)+'px;height:'+(document.body.offsetHeight - 40)+'px;overflow: scroll;">'+document.getElementById('DWTD').innerHTML+'</div>';
}
function heping(){
$("#TR_Right_myiframe0_0").attr("class","color_zebra1");
huanhang("Doc_Name");
}
function huanhang(col){
var tab=document.getElementById("myiframe0");
var a= getColIndex(0,col);
for(var i=0;i<tab.rows.length-1;i++){
$("#INPUT_myiframe0_"+col+"_"+i+"_"+a).parent().attr("style","white-space: pre-wrap;");
}
}
function selectFile(){
objectinfo={};
objectinfo.title="附件一览"
AsControl.OpenTab("/Tenwa/Comm/Document/LBDocumentList.jsp","ObjectNo=20170427000001",objectinfo);
}
function saveRecord(){
as_save("myiframe0","heping()");
location.reload();
}
//在加载完表格后调用
function afterSearch(){
var sRightType="<%=RightType%>";
var sObjectType="<%=sObjectType%>";//该流程类型
var isReview="<%=CurPage.getParameter("isReview")%>";
var username="<%=username%>";
for(var i=0;i<getRowCount(0);i++){
if(getObj(0,i,"operation")!=null&&getObj(0,i,"operation")!="null"){
getObj(0,i,"operation").innerHTML='<a class="box" onclick="upload(\''+getItemValue(0,i,"id")+'\')" style={color:#000;text-decoration:underline;}><font color="blue">上传</font></a>';
}
var filelist=getObj(0,i,"filelist").innerHTML;
var obj=eval('('+filelist+')');
var html="";
for(var file in obj){
html+='<a onclick=downloadFile(\''+obj[file]['id']+'\')><font color="blue">'+obj[file]['filename']+'</font></a>';
html+='【上传时间:'+obj[file]['inputtime']+'】';
html+='【上传人:'+obj[file]['inputuser']+'】';
// html+='【大小:'+Math.floor(obj[file]['FileSize']/1024*100)/100+'kb】<a class="btn_icon_detail" onclick="editOffice(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\',\''+sRightType+'\')">&nbsp;</a> ';
if(isReview!="true"&&sRightType!="ReadOnly"&&(sObjectType==obj[file]['objecttype'])&&username==obj[file]['inputuser']&&"ANYBACK"!="<%=flowstate%>"){
html+='<a class="btn_icon btn_icon_close" onclick="deleteFile(\''+obj[file]['id']+'\');">&nbsp;</a>';
}
if(obj[file]['image']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showImage(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
if(obj[file]['word']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showWord(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
if(obj[file]['pdf']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showPDF(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
html+='</br>';
}
getObj(0,i,"filelist").innerHTML=html;
getObj(0,i,"filelist").style["white-space"]="pre-wrap";
if($("#INPUT_myiframe0_Doc_Nature_"+i+"_2").text()=="必备"){
$("#INPUT_myiframe0_Doc_Nature_"+i+"_2").attr("style","color:red");
}
};
}
function showPDF(id,name){
var sUrl="/Tenwa/Comm/DocList/showPDF.jsp";
var param="attrid="+id;
AsControl.OpenPage(sUrl,param,"","");
}
function showWord(id,name){
var sUrl="/Tenwa/Comm/DocList/showWord.jsp";
var param="attrid="+id;
AsControl.OpenPage(sUrl,param,"","");
}
function showImage(id,name){
var sUrl="/Tenwa/Comm/DocList/showImage.jsp";
var param="attrid="+id+"&flowunid=<%=flowunid%>";
AsDialog.PopView(sUrl,param,"dialogWidth=1080px;dialogHeight=500px;",function(message){
},name);
}
function editOffice(id,filename){
var filetype=filename.substr(filename.indexOf(".")+1);
var status=2;
AsDialog.PopView("/Tenwa/Core/OfficeTemplate/OnlineOperation/online/editOfficeOnLine.jsp","filetype="+filetype+"&status="+status+"&id="+id+"&CompClientID=<%=compClientID%>","dialogWidth=1024px;dialogHeight=1000px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sPhaseInfo){
if(typeof(sPhaseInfo)=="undefined" || sPhaseInfo=="" || sPhaseInfo==null || sPhaseInfo=="null" || sPhaseInfo=="_CANCEL_") {
return;
}else if(sPhaseInfo == "Success" || sPhaseInfo == "success"){
alert("提交成功!");
reloadSelf();
}else{
alert("提交失败!");
}
},"编辑文档");
}
function upload(id){
//saveRecord();
var param="Library_id="+id + "&ObjectType=<%=sObjectType%>";
var sUrl="/Tenwa/Comm/DocList/DocListInfoNew.jsp";
AsDialog.PopView(sUrl,param,"dialogWidth=800px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(message){
var str=RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","updateBussinessCheck","library_id="+id+",BussinessCheck=DocCheck_0");
reloadSelf();
// location.reload();
heping();
},"上传附件");
}
function downloadFile(id){
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
}
function deleteFile(id){
var sParams="attId="+id+",BussinessCheck=DocCheck_2";
var sReturnInfo = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","deleteAttr",sParams);
reloadSelf();
heping();
}
function downloadZipFile(){
var objectType="<%=sObjectType%>";
var projectId="<%=projectId%>";
var classItemnos="<%=classItemno%>";
var sParams="projectId="+projectId+",classItemnos="+classItemnos+",objectType="+objectType;
var ids = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","getLibraryIds",sParams);
var filePath="<%=CurConfig.getConfigure("FileSavePath")%>";
var param="&flowunid=<%=flowunid%>&type=<%=type%>&ids="+ids+"&proj_id="+projectId;
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/docFlowDownloadZipServlet?CompClientID=<%=sCompClientID%>&filePath="+filePath+param, "downloadTemplate");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -13,6 +13,51 @@ import com.amarsoft.dict.als.manage.NameManager;
public class DocListCache {
public static String getDeleteFile(String libraryid) throws Exception{
@SuppressWarnings("unchecked")
List<BizObject> list=JBOFactory.getBizObjectManager("jbo.app.tenwa.doc.LB_DOCATTRIBUTE").createQuery("Library_Id=:libraryid ").setParameter("libraryid", libraryid).getResultList(false);
StringBuffer sb=new StringBuffer();
sb.append("{");
for(int i=0;i<list.size();i++){
BizObject bo=list.get(i);
sb.append("\"" +i+"\""+":{");
String type=bo.getAttribute("CONTENT_TYPE").getString();
if(type.indexOf("image")>=0){
sb.append("\"image\":\""+true+"\",");
}else{
sb.append("\"image\":\""+false+"\",");
}
if(type.indexOf("application/msword")>=0||type.indexOf("application/vnd.openxmlformats-officedocument.wordprocessingml.document")>=0||type.indexOf("application/vnd.ms-excel")>=0||type.indexOf("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")>=0){
sb.append("\"word\":\""+true+"\",");
}else{
sb.append("\"word\":\""+false+"\",");
}
if(type.indexOf("application/pdf")>=0){
sb.append("\"pdf\":\""+true+"\",");
}else{
sb.append("\"pdf\":\""+false+"\",");
}
sb.append("\"id\":\""+bo.getAttribute("id").getString()+"\",");
sb.append("\"objecttype\":\""+bo.getAttribute("objecttype").getString()+"\",");
sb.append("\"filename\":\""+bo.getAttribute("FileName").getString()+"\",");
sb.append("\"inputtime\":\""+bo.getAttribute("inputtime").getString()+"\",");
sb.append("\"inputuser\":\""+NameManager.getUserName(bo.getAttribute("InputUserId").getString())+"\",");
sb.append("\"content_type\":\""+bo.getAttribute("content_type").getString()+"\",");
sb.append("\"filepath\":\""+bo.getAttribute("filepath").getString()+"\",");
sb.append("\"FileSize\":\""+bo.getAttribute("FileSize").getString()+"\"");
sb.append("},");
}
if(sb.length()>1){
sb.deleteCharAt(sb.length() - 1);
}
sb.append("}");
return sb.toString();
}
public static String getFile(String libraryid) throws Exception{
@SuppressWarnings("unchecked")