package com.yc.service.grid;
|
|
|
|
import com.yc.action.grid.Grid;
|
import com.yc.action.grid.SqlInfo;
|
import com.yc.entity.TableColumnsDataTypeEntity;
|
import com.yc.utils.Page;
|
import org.json.JSONException;
|
import org.springframework.dao.DataAccessException;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.support.rowset.SqlRowSet;
|
import org.springframework.jdbc.support.rowset.SqlRowSetMetaData;
|
|
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpSession;
|
import java.io.UnsupportedEncodingException;
|
import java.sql.SQLException;
|
import java.util.List;
|
import java.util.Map;
|
|
|
|
/**
|
* gt-grid表格管理业务层
|
* @author 邓文峰
|
* 2010-3-22
|
* */
|
@SuppressWarnings("all")
|
public interface GridServiceIfc {
|
public int getColumnInfo(String tableName,String col);
|
public JdbcTemplate getSimpleJdbcTemplate();
|
public Map doSave(String sql) throws DataAccessException;
|
public void doSaveNoResult(String sql) throws DataAccessException;
|
public List<TranBean> getTranList(int groupid);
|
public JdbcTemplate getJdbcTemplate();
|
public List<String> getProcString(String str);
|
public List<String> getString(String str);
|
public String replaceStr2(String s,String count);
|
public String getGET_GFORM();
|
public String getGET_GFIELD();
|
public String getGET_GFIELD9();
|
/**
|
* 取得与树设置有关的字段名
|
* **/
|
public String getTableKeyFields(String table);
|
/**
|
*
|
* 取得三表设置的相关联信息,9825
|
* */
|
public List getThreeTableInfo(int formid);
|
public List getGfiledByFormID9(int formID,int flag);
|
/**
|
* 根据功能号ID查找gfiled功能字段信息
|
* @param formID 功能号
|
* @return SqlRowSet 记录集
|
* */
|
public SqlRowSet getGfiledByFormID(int formID);
|
/**
|
* 根据功能号ID查找gform功能信息
|
* @param formID 功能号
|
* @return SqlRowSet 记录集
|
* */
|
public List getColumnsTypeInfo(String tableName);
|
public SqlRowSet getGformByFormID(int formID);
|
/**
|
* 分页显示信息
|
* @return Page --分页类
|
* */
|
public Page loadAll(Page page);
|
public Page loadAlls(Page page,String statisid,int formid);
|
public Page loaddata(Page page,int formid);
|
/**
|
* 根据表名取得表的元数据
|
* @param String tableName 表名
|
* @return List<String> 主键list
|
* @throws SQLException
|
* */
|
public SqlRowSetMetaData getMetaData(String tableName);
|
/**
|
* 批量更新,新增,删除数据
|
* @param actoin 表明当前动作是新单还是已有单号了
|
* @param List<String> list sql语句
|
* @param List<String> proc1 ---单据保存需执行的存储过程
|
* @param List<String> proc2 ----单据保存需执行的存储过程调用的参数值
|
* @param String str -------保存时执行
|
* @param List<String> del sql语句(删除)
|
* @param List<String> delproc1 ---删除前需执行的存储过程名称
|
* @param List<String> delproc2 ----删除前需执行的存储过程的参数值
|
* @throws JSONException
|
* @throws UnsupportedEncodingException
|
* */
|
public SqlInfo doExecute(DoExecuteParameter parameterObject,HttpServletRequest request,HttpServletResponse response,List<String> picList,Grid grid,String formid,String docPram,int cont) throws DataAccessException;
|
/**
|
* 查找功能号所属的窗体类型
|
* @param int formID 功能号
|
* @return int 窗体类型
|
* */
|
public int getWindowTypeByGform(int formID);
|
/**
|
* 查找参数值
|
* @param int ft 参数号
|
* @return SqlRowSet 参数值列表
|
* */
|
public SqlRowSet getFTData(int ft);
|
|
/**
|
* 3类型窗体ajax取数据
|
* @param String tabName 表名
|
* @param String fields 列名
|
* @return SqlRowSet 参数值列表
|
* */
|
public List getDataByAjax(String tabName,String fields,String where)throws DataAccessException;
|
public List getDataByAjaxBy42(String tabName, String fields, String where, int limit, int page,String orderBy)throws DataAccessException;
|
/**
|
* 通过调用用户定义函数返回内容
|
* @return Page --分页类
|
* where后面参数形式:where=field1='22',field2='33'.....
|
* */
|
public Page loadAllByFunc(Page page, Map<String, String> env,boolean flg);
|
public Page loadAllByFunc_for(Page page);
|
/**
|
* 通过调用存储过程返回内容
|
* @return Page --分页类
|
* */
|
public Page loadAllByPROC(Page page,Map<String, String> env,boolean flg);
|
|
|
|
/**
|
* 根据表名取得表中docitem的最大值,针对9类型窗体
|
* **/
|
public long getMaxID(String tableName,String doccode);
|
/**
|
* 取rowid
|
* **/
|
public String getRowID();
|
/**
|
*
|
* 取得单据保存时需要执行的存储过程名称列表
|
* **/
|
public List<Map<String,Object>> getSaveProcGroup(int groupid);
|
/**
|
*
|
* 取得删除前需要执行的存储过程名称列表
|
* **/
|
public List<String> getDelProcGroup(int groupid);
|
|
|
/**
|
* 执行过账类型,业务逻辑功能
|
* @param tranid --业务号
|
* **/
|
public String doTarnType(int tranid,String doccode,String tableName,int formid,String postCode,String postname,HttpSession session,List<SqlInfo> sqlInfo);
|
/**
|
* 取得表中所有计算列字段
|
*
|
* **/
|
public List<String> getComputedColumns(String tableName);
|
|
|
public List<Map<String, Object>> getComputedHelp(String formid);
|
/**
|
*
|
* 取得自动编号 ---1类型
|
* @param formid --------功能号
|
* @param type ---------自动编号类型,取值=1
|
* @param field --------哪个字段需要自动编号
|
* @param length -------长度
|
* @param perc -------前缀字符
|
* **/
|
public String getAutoCode(int formid,int type,String field,int length,String perc);
|
/**
|
* 根据表名取得表主键名
|
* @param String tableName 表名
|
* @return List<String> 主键list
|
* @throws SQLException
|
* */
|
public List<String> getPrimaryKey(String tableName) throws SQLException;
|
/**
|
*
|
* 取得自动编号---2类型
|
* **/
|
public String getAutoCode2(String rowid,int length,String percode,String perc,String table);
|
/**
|
*
|
* 取得periodID
|
* **/
|
public String getPeriodID(int formid,String companyid ,String docdate);
|
/**
|
*
|
* 取得3类型树引用的表名
|
* **/
|
public String getTreeTable(int formid);
|
|
/**
|
* 根据功能号取得主从表名称 -----9801信息---增加新窗体类型都需要增加相应判断
|
* **/
|
public String getTableName(int formid,String winType);
|
/**
|
* 取得功能号的过账类型号
|
* **/
|
public int getTranID(int formid);
|
/**
|
* 取得7类型功能号的过滤条件
|
* **/
|
public List<Map<String,Object>> getFilter7(int formid);
|
/**
|
* 取得功能号的保存时执行及保存时执行存储过程组
|
* **/
|
public Map<String, Object> getDealAfterDocSave(int formid);
|
public String getTableName3(int formid,String table);
|
/**
|
* 取得功能号的保存时执行及保存时执行存储过程组
|
* **/
|
public String getByProc(String num);
|
|
/**
|
* 根据当前会计科目查出对应的会计辅助核算信息
|
* **/
|
public List<Map<String,Object>> getGlfiledInfo(String s);
|
/**
|
* 根据类型号,得到当前功能号是什么类型
|
*
|
* **/
|
public int getwinType(int type);
|
public List getFunLinkPro(String links);
|
public List<Map<String,Object>> getDataGroupInfo(int formid,String usercode,int flag);
|
|
/**
|
*
|
* 根据功能号查出所有字段,以,分隔返回。是为了给淘宝接口fileds调用
|
* ***/
|
public String getFileds(String formid);
|
|
/**
|
* 根据父节点查询下一节点的rowid
|
* @param parentrowid
|
* @param tablename
|
* @return
|
*/
|
public List<Map<String, Object>> getTreeRowid(String parentrowid,String tablename);
|
|
public List<Integer> getGlfiledInfoCheck(String s);
|
|
public String getImportExcelProc(int formID);
|
|
String getTypeLengthInfo(String tableName);
|
|
public Page loadAllNoPage(Page page);
|
|
public List<TableColumnsDataTypeEntity> getTableColumnsDataTypes(int formid, int isDetailTable, String fieldids);
|
public List<String> getParm(String sql, List<String> temp, SqlRowSet row);
|
public String[] prossParm(SqlRowSet row, String temp, List<String> sq, int index, Map<String, String> map, Map<String, String> sessionClone, String tableName, int type);
|
public String proccTbCols(Page page);
|
|
String getTableNameByType(SqlRowSet gform, String winType);
|
|
/**
|
* 获取表字段的元数据(名称,数据类型,长度,是否为计算列)
|
* @param tableName
|
* @return
|
*/
|
Map<String,TableMetaData> getTableMetaData(String tableName);
|
|
void doNewTran(Integer formid, String docCode,String userCode,String userName);
|
}
|