急求解决办法 没人答就吃不上饭了
有这样一个树形的表
名字 学院编号 专业编号 学科编号
-学院 01
-----专业 01 05
---------学科 01 05 10
他们都有对应的编号,树形表作为选择项,字符数组gstrSecchiCd,gstrGakubuCd,gstrGakkaCd分别存储学院、专业、学科的编号。如果选择了学院,则gstrSecchiCd(0)=01,gstrGakubuCd(0)=null,gstrGakkaCd(0)=null.
对应的后台处理SQL是
For i = 1 To UBound(gstrSecchiCd)
If gstrSecchiCd(i) <> "" Then
If flg = False Then
strSql = strSql & " and (TaishoShozoku.SecchiKbnCd = '" & gstrSecchiCd(i) & "'"
If gstrGakubuCd(i) <> "" Then
strSql = strSql & " and TaishoShozoku.GakubuCd = '" & gstrGakubuCd(i) & "'"
If gstrGakkaCd(i) <> "" Then
strSql = strSql & " and TaishoShozoku.GakkaCd = '" & gstrGakkaCd(i) & "'"
End If
End If
flg = True
Else
strSql = strSql & " or (TaishoShozoku.SecchiKbnCd = '" & gstrSecchiCd(i) & "'"
If gstrGakubuCd(i) <> "" Then
strSql = strSql & " and TaishoShozoku.GakubuCd = '" & gstrGakubuCd(i) & "'"
If gstrGakkaCd(i) <> "" Then
strSql = strSql & " and TaishoShozoku.GakkaCd = '" & gstrGakkaCd(i) & "'"
End If
End If
strSql = strSql & " ) "
End If
End If
Next i
If flg = True Then
strSql = strSql & " )"
End If
现在要把后台的SQL转为web service,前台选择以后,调用web service并传递选择的编号数组。数组参数是3个1维的好还是用一个2维的
对应后台的.XML的SQL语句应该怎么写??
用<iterate prepend="AND" conjunction="or" property="chikuCode">
<isNotEmpty property="chikuCode[]">
RE_KYUJINCHIKI.CHIKIKBN = #chikuCode[]#
</isNotEmpty>
</iterate>这种方式可以实现吗?
还是在LOGIC里面实现循环调用.XML里面写的SQL??
请各位指点啊,今天是最后一天 再搞不出来就不能吃饭睡觉了