fs-danaus
2021-10-09 366271c684a160f75ac72e49f8a298fca416f88d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
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);
}