示例为下拨申请到下拨申请核准附件流转功能:
- 在模块下找个upm建接口类,也可自己新写一个
package nc.itf.sf.allocateapply;
import java.util.List;
import nc.bs.dao.DAOException;
import nc.vo.pub.filesystem.NCFileVO;
public abstract interface IAllocateApplyFileTransferService
{
//根据主键查当前单据的附件
public abstract List<NCFileVO> queryFile(List<String> srcpks)
throws DAOException;
//附件转换
public abstract void fileTransfer(String pk, List<NCFileVO> list);
//根据单据编码查Pk
public abstract List<String> getAgreePks(String code) throws DAOException;
}
- 写接口实现类
package nc.impl.sf.allocateapply;
import java.util.List;
import nc.bs.dao.BaseDAO;
import nc.bs.dao.DAOException;
import nc.bs.framework.common.InvocationInfoProxy;
import nc.impl.pub.filesystem.FileSpaceDAO;
import nc.itf.sf.allocateapply.IAllocateApplyFileTransferService;
import nc.jdbc.framework.processor.ColumnListProcessor;
import nc.vo.erm.NCFileVOResultSetProcessor;
import nc.vo.pub.filesystem.NCFileVO;
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
import nc.vo.pubapp.pattern.pub.SqlBuilder;
public class AllocateApplyFileTransferServiceImpl
implements IAllocateApplyFileTransferService
{
@Override
public List<NCFileVO> queryFile(List<String> srcpks) throws DAOException {
// TODO Auto-generated method stub
BaseDAO bd = new BaseDAO();
SqlBuilder sql = new SqlBuilder();
sql.append("select pk, filepath, creator,isfolder,lasttime,filelength,isdoc,pk_doc,modifier,filedesc,scantimes,modifytime,filetype from sm_pub_filesystem where pk_doc is not null and isnull(dr,0)=0 and ");
for (int i = 0; i < srcpks.size(); i++) {
if (i == 0) {
sql.append("filepath lik