|
楼主 |
发表于 2019-1-25 21:35:42
|
显示全部楼层
我前段是: Model.prototype.bizData1DataChange = function(event){
var inputData = this.comp("mainData");
// 构造参数
var params = new biz.Request.ActionParam();
// List参数
var listParam = new biz.Request.ListParam();
listParam.add(inputData.getValue("fXM"));
var b=listParam.add(inputData.getValue("fDZ"));
alert(b);
params.setList("param_list", listParam);
//var a = this.comp('fDZ').val();
//alert(a);
//var b = this.comp('fXM').val();
//alert(b);
biz.Request.sendBizRequest(
{
"context" : this.getContext(),
"action" : "newAction_0",
"parameters" : params,
"callback" : function(data) {
data.ignoreError = false;
if (data.state) {
justep.Util.hint("传入List参数调用成功");
// 输出返回结果
}
}
});
我在action里是这样的:
public static Table newAction_0(String concept,String idColumn,String select,String from,String condition,List<DataPermission> range,String filter,Boolean distinct,Integer offset,Integer limit,String columns,String orderBy,String aggregate,String aggregateColumns,Map<String,Object> variables,String dataModel,String fnModel,String data1,String aa,String bb,List<DataPermission> param_list ){
String ksql = "select SO_KHZL.fSXAP,(case when SO_KHZL.fSXAP = '第一家送' then '顺序被占用' end) AS fPDSX from SO_KHZL SO_KHZL where SO_KHZL.fXM = :p";//需要查询数据的ksql"
HashMap<String,Object>params=new HashMap<String,Object>();
params.put("p",param_list);
System.out.println(condition);
if (Utils.isNotEmptyString(condition)) {
ksql = ksql + " where " + condition;
}
System.out.println(ksql);
Table table = KSQL.select(ksql, params, "/songhuorenwu/songhuo/data", null);//调用平台提供的API执行sql,并返回table
return table;
}
我在页面拿的值,全在param_list里,但是where SO_KHZL.fXM = :p,查不出来值,请帮我改一下。
|
|