| 123456789101112131415161718192021222324252627282930313233343536373839 |
- package xin.glue.ui.Z;
- import xin.glue.ui.common.PosMultiSearch;
- import com.posdata.glue.biz.constants.PosBizControlConstants;
- import com.posdata.glue.context.PosContext;
- public class PosPrivSearch extends PosMultiSearch {
- public String runActivity(PosContext ctx) {
- int count = 1;
- if (getProperty("sqlkey-count") != null)
- count = Integer.parseInt(getProperty("sqlkey-count").trim());
- if (count == 0) return PosBizControlConstants.SUCCESS;
- if (ctx.get("ROOT_AMN_YN") != null &&
- ("Y".equals(((String[])ctx.get("ROOT_AMN_YN"))[0])))
- count--;
-
- Initialize("true".equalsIgnoreCase(getProperty("writeLog")));
- String resultkey = getProperty("resultkey");
- if (resultkey == null) {
- resultkey = "ListResult";
- for(int i = 0; i < count; i++) {
- String resultkeys = resultkey + "_" + i;
- setParamMap(ctx, "sqlkey" + i, "param" + i);
- Execute(resultkeys, ctx, "sqlkey" + i, "param" + i);
- }
- } else {
- String[] resultkeys = resultkey.split("\\|");
- int length = resultkeys.length;
- for(int i = 0; i < count; i++) {
- setParamMap(ctx, "sqlkey" + i, "param" + i);
- Execute((i<length)?resultkeys[i]:resultkeys[length-1], ctx, "sqlkey" + i, "param" + i);
- }
- }
- return PosBizControlConstants.SUCCESS;
- }
- }
|