|
楼主 |
发表于 2016-12-5 16:06:14
|
显示全部楼层
BIZ中action的ksql语句
select T_SUF_Barcode,T_SUF_Barcode.FInterID_EntryID as FInterID_EntryID,T_SUF_Barcode.FBarcodeRuleID as FBarcodeRuleID,T_SUF_Barcode.FFunctionalID as FFunctionalID,T_SUF_Barcode.FBarcode as FBarcode,T_SUF_Barcode.FItemID as FItemID,T_ICItem.FNumber as FNumber,T_ICItem.FName as FName,T_ICItem.FModel as FModel,T_SUF_Barcode.FBatchNo as FBatchNo,T_SUF_Barcode.FQty as FQty
from T_SUF_Barcode T_SUF_Barcode
optional join T_ICItem T_ICItem on T_SUF_Barcode.FItemID = T_ICItem.FItemID
optional join POOrderEntry POOrderEntry on T_SUF_Barcode.FDetailID = POOrderEntry
optional join POOrder POOrder on POOrder = POOrderEntry.FInterID
where T_ICItem.FNumber = :FNumber AND POOrder.FBillNo = :FBillNo
BIZ中action中的java代码
import java.util.Map;
import com.justep.message.CommonMessages;
import com.justep.model.ModelUtils;
import com.justep.system.data.KSQL;
import com.justep.system.data.Table;
import com.justep.util.Utils;
public class KSQLProcedure {
public static Table query(String ksql, Map<String, Object> variables, String dataModel, String fnModel) {
Utils.check(Utils.isNotEmptyString(ksql) && Utils.isNotEmptyString(dataModel),
CommonMessages.class, CommonMessages.PARAM_NULL1, "ksql, dataModel");
return KSQL.select(ksql, variables, dataModel, Utils.isEmptyString(fnModel) ? null : ModelUtils.getModel(fnModel));
}
}
|
|