fs-danaus
2023-12-01 a1f55f46e1e61a2587a938d6423ace9216fe6b7e
提交 | 用户 | age
a6a76f 1 package com.yc.service.grid;
F 2
3
4
5 import com.yc.action.grid.Grid;
2b4227 6 import com.yc.action.grid.PicEntity;
a6a76f 7 import com.yc.action.grid.SqlInfo;
a1f55f 8 import com.yc.app.v2.entity.GformEntity;
a6a76f 9 import com.yc.entity.TableColumnsDataTypeEntity;
F 10 import com.yc.utils.Page;
11 import org.json.JSONException;
12 import org.springframework.dao.DataAccessException;
13 import org.springframework.jdbc.core.JdbcTemplate;
14 import org.springframework.jdbc.support.rowset.SqlRowSet;
15 import org.springframework.jdbc.support.rowset.SqlRowSetMetaData;
16
17 import javax.servlet.http.HttpServletRequest;
18 import javax.servlet.http.HttpServletResponse;
19 import javax.servlet.http.HttpSession;
20 import java.io.UnsupportedEncodingException;
21 import java.sql.SQLException;
22 import java.util.List;
23 import java.util.Map;
24
25
26
27 /**
28  * gt-grid表格管理业务层
29  * @author 邓文峰
30  * 2010-3-22
31  * */
32 @SuppressWarnings("all")
33 public interface GridServiceIfc {
34     public int getColumnInfo(String tableName,String col);
35     public JdbcTemplate getSimpleJdbcTemplate();
36     public  Map doSave(String sql) throws DataAccessException;
37     public void doSaveNoResult(String sql) throws DataAccessException;
38     public List<TranBean> getTranList(int groupid);
39     public JdbcTemplate getJdbcTemplate();
40     public List<String> getProcString(String str);
41     public List<String> getString(String str);
42     public String replaceStr2(String s,String count);
43     public String getGET_GFORM();
44     public String getGET_GFIELD();
45     public String getGET_GFIELD9();
46     /**
47      * 取得与树设置有关的字段名
48      * **/
49     public String getTableKeyFields(String table);
50     /**
51      * 
52      * 取得三表设置的相关联信息,9825
53      * */
54     public List getThreeTableInfo(int formid);
55     public List getGfiledByFormID9(int formID,int flag);
56     /**
57      * 根据功能号ID查找gfiled功能字段信息
58      * @param formID 功能号
59      * @return SqlRowSet 记录集
60      * */
61     public SqlRowSet getGfiledByFormID(int formID);
62     /**
63      * 根据功能号ID查找gform功能信息
64      * @param formID 功能号
65      * @return SqlRowSet 记录集
66      * */
67     public List getColumnsTypeInfo(String tableName);
68     public SqlRowSet getGformByFormID(int formID);
69     /**
70      * 分页显示信息
71      * @return Page --分页类
72      * */
73     public Page loadAll(Page page);
74     public Page loadAlls(Page page,String statisid,int formid);
75     public Page loaddata(Page page,int formid);
76     /**
77      * 根据表名取得表的元数据
78      * @param String tableName 表名
79      * @return List<String> 主键list 
80      * @throws SQLException 
81      * */
82     public SqlRowSetMetaData  getMetaData(String tableName);
83     /**
84      * 批量更新,新增,删除数据
85      * @param actoin 表明当前动作是新单还是已有单号了
86      * @param List<String> list sql语句
87      * @param List<String> proc1 ---单据保存需执行的存储过程
88      * @param List<String> proc2  ----单据保存需执行的存储过程调用的参数值
89      * @param String str -------保存时执行
90      * @param List<String> del sql语句(删除)
91      * @param List<String> delproc1 ---删除前需执行的存储过程名称
92      * @param List<String> delproc2  ----删除前需执行的存储过程的参数值
93      * @throws JSONException 
94      * @throws UnsupportedEncodingException 
95      * */
795f4b 96     public SqlInfo doExecute(DoExecuteParameter parameterObject, HttpServletRequest request, HttpServletResponse response, List<PicEntity> picList, Grid grid, String formid, String docPram) throws DataAccessException;
a6a76f 97     /**
F 98      * 查找功能号所属的窗体类型
99      * @param int formID 功能号
100      * @return int 窗体类型
101      * */    
102     public int getWindowTypeByGform(int formID);
103     /**
104      * 查找参数值
105      * @param int ft 参数号
106      * @return SqlRowSet 参数值列表
107      * */
108     public SqlRowSet getFTData(int ft);
109      
110     /**
111      * 3类型窗体ajax取数据
112      * @param String tabName 表名
113      * @param  String fields 列名
114      * @return SqlRowSet 参数值列表
115      * */
116     public List getDataByAjax(String tabName,String fields,String where)throws DataAccessException;
10a3d7 117     public List getDataByAjaxBy42(String tabName, String fields, String where, int limit, int page,String orderBy)throws DataAccessException;
a6a76f 118     /**
F 119      * 通过调用用户定义函数返回内容
120      * @return Page --分页类
121      * where后面参数形式:where=field1='22',field2='33'.....
122      * */
123     public Page loadAllByFunc(Page page, Map<String, String> env,boolean flg);
124     public Page loadAllByFunc_for(Page page);
125     /**
126      * 通过调用存储过程返回内容
127      * @return Page --分页类
128      * */
129     public Page loadAllByPROC(Page page,Map<String, String> env,boolean flg);
130
131
132
133 /**
134  * 根据表名取得表中docitem的最大值,针对9类型窗体
135  * **/
136 public long getMaxID(String tableName,String doccode);
137 /**
138  * 取rowid
139  * **/
140 public String getRowID();
141 /**
142  * 
143  * 取得单据保存时需要执行的存储过程名称列表
144  * **/
145 public List<Map<String,Object>> getSaveProcGroup(int groupid);
146 /**
147  * 
148  * 取得删除前需要执行的存储过程名称列表
149  * **/
150 public List<String> getDelProcGroup(int groupid);
151
152
153 /**
154  * 执行过账类型,业务逻辑功能
155  * @param tranid --业务号
156  * **/
157 public String doTarnType(int tranid,String doccode,String tableName,int formid,String postCode,String postname,HttpSession session,List<SqlInfo> sqlInfo);
158 /** 
159 * 取得表中所有计算列字段
160
161 * **/
162 public List<String> getComputedColumns(String tableName);
163
164
165 public List<Map<String, Object>> getComputedHelp(String formid);
166 /**
167  * 
168  * 取得自动编号 ---1类型
169  * @param formid --------功能号
170  * @param type  ---------自动编号类型,取值=1
171  * **/
7edaee 172 public String getAutoCode(int formid,int type,String field);
a6a76f 173 /**
F 174  * 根据表名取得表主键名
175  * @param String tableName 表名
176  * @return List<String> 主键list 
177  * @throws SQLException 
178  * */    
179 public List<String> getPrimaryKey(String tableName) throws SQLException;
180 /**
181  * 
182  * 取得自动编号---2类型
183  * **/
184 public String getAutoCode2(String rowid,int length,String percode,String perc,String table);
185 /**
186  * 
187  * 取得periodID
188  * **/
189 public String getPeriodID(int formid,String companyid ,String docdate);
190 /**
191  * 
192  * 取得3类型树引用的表名
193  * **/
194 public String getTreeTable(int formid);
195
196 /**
197  * 根据功能号取得主从表名称 -----9801信息---增加新窗体类型都需要增加相应判断
198  * **/
199 public String getTableName(int formid,String winType);
1a8ee6 200 public String getTableNameV2(SqlRowSet gform,String winType);
F 201 public String getExcludeTablesWhenSaving(int formid);
a6a76f 202 /**
F 203  * 取得功能号的过账类型号
204  * **/
205 public int getTranID(int formid);
206 /**
207  * 取得7类型功能号的过滤条件
208  * **/
209 public List<Map<String,Object>> getFilter7(int formid);
210 /**
211  * 取得功能号的保存时执行及保存时执行存储过程组
212  * **/
213 public Map<String, Object> getDealAfterDocSave(int formid);
214 public String getTableName3(int formid,String table);
215 /**
216  * 取得功能号的保存时执行及保存时执行存储过程组
217  * **/
218 public String getByProc(String num);
219
220 /**
221  * 根据当前会计科目查出对应的会计辅助核算信息
222  * **/
223 public List<Map<String,Object>> getGlfiledInfo(String s);
224 /**
225  * 根据类型号,得到当前功能号是什么类型
226  * 
227  * **/    
228 public int getwinType(int type);
229 public  List getFunLinkPro(String links);
230 public List<Map<String,Object>> getDataGroupInfo(int formid,String usercode,int flag);
231
232 /**
233  * 
234  * 根据功能号查出所有字段,以,分隔返回。是为了给淘宝接口fileds调用
235  * ***/
236 public String getFileds(String formid);
237
238 /**
239  * 根据父节点查询下一节点的rowid
240  * @param parentrowid
241  * @param tablename
242  * @return
243  */
244 public List<Map<String, Object>> getTreeRowid(String parentrowid,String tablename);
245
246 public List<Integer> getGlfiledInfoCheck(String s);
247
248 public String getImportExcelProc(int formID);
249
250 String getTypeLengthInfo(String tableName);
251
252 public Page loadAllNoPage(Page page);
253
254 public List<TableColumnsDataTypeEntity> getTableColumnsDataTypes(int formid, int isDetailTable, String fieldids);
255     public List<String> getParm(String sql, List<String> temp, SqlRowSet row);
795f4b 256     public String[] prossParm(SqlRowSet row, String temp, List<String> sq, String index, Map<String, String> map, Map<String, String> sessionClone, String tableName, int type);
a6a76f 257     public String proccTbCols(Page page);
F 258
a1f55f 259     String getTableNameByType(GformEntity gformEntity, String winType);
a6a76f 260
F 261     /**
262      * 获取表字段的元数据(名称,数据类型,长度,是否为计算列)
263      * @param tableName
264      * @return
265      */
266     Map<String,TableMetaData> getTableMetaData(String tableName);
366271 267
F 268     void doNewTran(Integer formid, String docCode,String userCode,String userName);
d5c2f7 269     public String getFunctionParm(String st, String parms, Map<String, String> env);
a6a76f 270 }