增加合同正文下载模版
This commit is contained in:
parent
2f98c1ff72
commit
2a08379fa6
@ -3777,4 +3777,17 @@ public class CoEPALController {
|
||||
return web.createOutputPrReportsByEstimatePPTFile(me, fileId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载一个合同正文模版文件
|
||||
* @param me
|
||||
* @return
|
||||
*/
|
||||
@Mapping("com.actionsoft.apps.coe.pal.publisher_downloadTpmFile")
|
||||
public String downloadTpmFile(UserContext me) {
|
||||
DesignerRelationShapeWeb web = new DesignerRelationShapeWeb(me);
|
||||
return web.downloadTpmFile();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.constant.YiliWpsConst;
|
||||
import com.actionsoft.apps.coe.pal.pal.output.constant.OutputConst;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.upfile.web.UpfileWeb;
|
||||
import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext;
|
||||
@ -5098,5 +5099,23 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取模版附件下载地址
|
||||
* @return
|
||||
*/
|
||||
public String downloadTpmFile(){
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
//先获取附件模版
|
||||
System.out.println(" >>>>进入模版文件" );
|
||||
String repositoryName = "!form-ui-file-";
|
||||
BO bo = SDK.getBOAPI().query(YiliWpsConst.BO_EU_SYSTEM_DEMO_FILE).addQuery("FILESTATE=", true).detail();
|
||||
List<FormFile> files = SDK.getBOAPI().getFiles(bo.getId(), "SYSTEMFILE");
|
||||
FormFile formFile = files.get(0);
|
||||
DCContext sourceDc = SDK.getBOAPI().getFileDCContext(formFile, repositoryName);
|
||||
sourceDc.setSession(this.getContext());
|
||||
ro.put("url",sourceDc.getDownloadURL());
|
||||
return ro.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user