diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index 7752fd85..eb440093 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java index 881fc99f..c2299c58 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java @@ -1196,6 +1196,27 @@ public class CoEPALController { } + /** + * 流程手册单个下载 + * @param me + * @param params + * @return + * @throws Exception + */ + @Mapping("com.actionsoft.apps.coe.pal_outputreport_output_single_file_downLoad") + public String coePALProcessSingleFileDownload(UserContext me, RequestParams params) throws Exception { + UpfileWeb web = new UpfileWeb(me); + String fileId = params.get("fileId"); + return web.coePALProcessSingleFileDownload(fileId); + } + + @Mapping("com.actionsoft.apps.coe.pal_outputreport_output_query_manual_logdata") + public String coePALProcessManualLogData(UserContext me, RequestParams params) throws Exception { + UpfileWeb web = new UpfileWeb(me); + String ruuid = params.get("ruuid"); + return web.coePALProcessManualLogData(ruuid); + } + // 文件属性的单个 值 修改 diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/upfile/web/UpfileWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/upfile/web/UpfileWeb.java index 508c68ba..708a9bc7 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/upfile/web/UpfileWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/upfile/web/UpfileWeb.java @@ -26,6 +26,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyMod import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil; import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessLevelWeb; import com.actionsoft.apps.coe.pal.util.HighSecurityUtil; +import com.actionsoft.bpms.bo.engine.BO; import com.actionsoft.bpms.server.DispatcherRequest; import com.actionsoft.bpms.server.conf.server.AWSServerConf; import com.actionsoft.bpms.util.DBSql; @@ -600,13 +601,6 @@ public class UpfileWeb extends ActionWeb { } - - - - - - - UtilFile.zipCompress(targetDir, new File(targetDir + zipName)); File[] files = targetFileDir.listFiles(new FilenameFilter() @@ -642,6 +636,35 @@ public class UpfileWeb extends ActionWeb { + /** + * 单个附件下载 + * + * @param uuid + * @return + * @author zhaolei + */ + public String coePALProcessSingleFileDownload(String fileId) throws Exception { + ResponseObject ro = ResponseObject.newOkResponse(); + UpFileDao upfileDao = new UpFileDao(); + UpfileModel upfileModel = upfileDao.get(fileId); + DCContext dcContext = getDCContext(upfileModel); + + String downUrl=SDK.getConfAPI().getPortalUrl() + "/r/" + dcContext.getDownloadURL().replace("./", ""); + ro.put("url",downUrl); + return ro.toString(); + } + + public String coePALProcessManualLogData(String ruuid) throws Exception { + ResponseObject ro = ResponseObject.newOkResponse(); + BO outputreportBO=SDK.getBOAPI().query("BO_EU_PAL_OUTPUTREPORT").addQuery("PLID=",ruuid).addQuery("RESULT=","手册转换成功!").detail(); + if(outputreportBO!=null){ + Map map=new HashMap<>(); + map.put("taskId",outputreportBO.getString("TASKID")); + map.put("plname",outputreportBO.getString("PLNAME")); + ro.put("resultMap",map); + } + return ro.toString(); + } diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js index 2d5044e9..33b90c7a 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js @@ -1638,6 +1638,7 @@ function ProcessManual(obj) { }else if(methodId=="control.kpi"){ manualName="流程绩效文件 :"; } + $('#processFileDock').empty(); var t = ''; /*t += ''; @@ -1651,30 +1652,54 @@ function ProcessManual(obj) { t += ''; t += '
';*/ + var resultMap=getProcessManuallogData(); + var transitionflag; + if(resultMap!=null){ + transitionflag=true; + var gettaskId=resultMap["taskId"]; + var getplname=resultMap["plname"]; + t += '
'; + t +=''+manualName+''; + t += ''; + t +=''; + t += ''; + t += ''; + t += ''; + t +=''; + t += '
'; + t += '
'+ getplname +''; + t +=''; + t +='
'; + t += '
'; + t +='
'; - t += '
'; - t +=''+manualName+''; - t += ''; - t +=''; - t += ''; - t += ''; - t += ''; - t +=''; - t += '
'; - t += '
'+ fileName +''; - t +=''; + }else{ + transitionflag=false; + t += '
'; + t +=''+manualName+''; + t += ''; + t +=''; + t += ''; + t += ''; + t += ''; + t +=''; + t += '
'; + t += '
'+ fileName +''; + t +=''; + t +='
'; + t += '
'; + t +='
'; + } - t +='
'; - - t += '
'; - t +='
'; $('#processFileDock').append(t); //相关文件/相关附件 - initUpfileData(obj); + initUpfileData(obj,transitionflag); } @@ -1705,6 +1730,27 @@ function openOutputFile(taskId) { } + +function getProcessManuallogData() { + var resultData; + $.ajax({ + type : "POST", + url : "./jd?sid=" + sid + + "&cmd=com.actionsoft.apps.coe.pal_outputreport_output_query_manual_logdata", + data : { + ruuid : ruuid + }, + success : function(msg) { + if (msg.result.result == "ok") { + resultData=msg.result.result.resultMap; + } + } + }); + + return resultData; +} + + function downloadProcessFile(taskId) { $.ajax({ type : "POST", @@ -1725,6 +1771,22 @@ function downloadProcessFile(taskId) { } +function singleFileDownload(id) { + $.ajax({ + type : "POST", + url : "./jd?sid=" + sid + + "&cmd=com.actionsoft.apps.coe.pal_outputreport_output_single_file_downLoad", + data : { + fileId :id + }, + success : function(msg) { + if (msg.result == "ok") { + window.location.href = msg.data.url; + } + } + }); +} + /** * 相关文件/制度文件下载 * @param uuid @@ -1751,7 +1813,7 @@ function downloadZipFile(splitId,toolbarname) { // 初始化上传附件 -function initUpfileData(obj) { +function initUpfileData(obj,transitionflag) { $('#alertMessage').remove(); if (obj == undefined || obj == '0') { $('#portalFileDock').empty(); @@ -1769,7 +1831,6 @@ function initUpfileData(obj) { t += ''; t +='';*!/ t +=''; - }*/ t += '
'; @@ -1787,6 +1848,23 @@ function initUpfileData(obj) { t +=''; t += ''; splitId+=obj.id+','; + + + var spiltName=obj.name; + if(spiltName.substring(0,spiltName.lastIndexOf("."))==fileName && transitionflag==false){ + var s=''; + $("#manualDownload").empty(); + s += ''; + s += '
'+ obj.name+"替换后" +''; + s +=''; + s +='
'; + s += ''; + $("#manualDownload").append(s); + } + + } @@ -1817,7 +1895,6 @@ function initUpfileData(obj) { var obj = processShape[i]; t += ''; - t += ''; t += ''; t +='';