多个参数选择时,有一个参数一选就查不到值了



不选权利类型这个参数的话数据查询就没问题,

但是选上这个参数的话就查不到数据了,有大佬知道是怎么回事吗?。。。
sql单独到数据库执行也没问题。。。




编辑于 2018-5-26 18:50  
FineReport18291776824 发布于 2018-5-26 18:39
悬赏:2 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共10回答
最佳回答
0
liboyu420949524发布于2018-5-26 18:39(编辑于 2023-9-6 09:34)
555
  • 18291776824 18291776824(提问者) 权力类型哪个参数不选的话是正常的,单元格都没做什么过滤。。。
    回复
    2018-05-26 19:10 
  • liboyu420949524 liboyu420949524 回复 18291776824 :加个qq 420949524远程帮你看一下
    回复
    2018-05-26 19:32 
最佳回答
0
zsh331发布于2018-5-26 18:46(编辑于 2023-9-6 09:34)
555
最佳回答
0
zsh331发布于2018-5-26 18:53(编辑于 2023-9-6 09:34)
555
  • 18291776824 18291776824(提问者) 那这个一般是什么问题呢。。。我就多加了权力类型这个参数就出现这个问题了,看了下日志,另外几个字段也有死循环这个报错,但是就这个不行。。
    回复
    2018-05-26 19:08 
最佳回答
0
葛智发布于2018-5-27 09:26(编辑于 2023-9-6 09:34)
555
  • 18291776824 18291776824(提问者) select * from (
      With temp As (
      Select  qxmc,decode(djxl,\'GF\',\'房屋登记\',\'G0\',\'土地登记\',\'J0\',\'土地登记\',\'Z0\',\'土地登记\') djxl,djdlmc,ywmc,fwzl_mc,
         decode(sactivityname,\'窗口受理\',\'收件\',\'缮证登簿\',\'缮证\',\'打证\',\'缮证\',\'注销登簿\',\'缮证\',sactivityname) sactivityname,
         count(sdata1) numb  From sa_task a Inner Join t_ywslb b
         On (a.sdata1 = b.fbizrecid)
         where  ywdm in (\'GF100\',\'GF200\',\'GF300\',\'GF400\',\'GF500\')
          and b.slsj >= TO_DATE(\'${starttime}\', \'yyyy-MM-dd\')
          And b.slsj < TO_DATE(\'${endtime}\', \'yyyy-MM-dd\')
         ${if(len(qxmc)==0,\"\",\"and qxmc=\'\"+qxmc+\"\'\")}
         ${if(len(fwzl_mc)==0,\"\",\"and fwzl_mc=\'\"+fwzl_mc+\"\'\")}
         ${if(len(djdlmc)==0,\"\",\"and djdlmc=\'\"+djdlmc+\"\'\")}
         ${if(len(ywmc)==0,\"\",\"and ywmc=\'\"+ywmc+\"\'\")}
         And a.sactivityname In(\'收件\',\'窗口受理\',\'初审\',\'复审\',\'缮证\',\'缮证登簿\',\'打证\')
         And a.sstatusid = \'tesFinished\' And sexecutorfid Is Not Null  And ssourceid Is Null
         Group By qxmc,
         decode(djxl,\'GF\',\'房屋登记\',\'G0\',\'土地登记\',\'J0\',\'土地登记\',\'Z0\',\'土地登记\'),
         djdlmc,b.ywmc,fwzl_mc,
         decode(sactivityname,\'窗口受理\',\'收件\',\'缮证登簿\',\'缮证\',\'打证\',\'缮证\',\'注销登簿\',\'缮证\',sactivityname)  
       )

    Select  a.qxmc,a.djxl,a.djdlmc,a.ywmc,a.fwzl_mc,b.numb As 收件量, c.numb As 初审量, d.numb As 复审量, e.numb As 缮证量
         From  (Select qxmc,djxl,djdlmc,ywmc,fwzl_mc From temp  Group By qxmc,djxl,djdlmc,ywmc,fwzl_mc) a
       Left Join
         (Select qxmc,djxl,djdlmc,ywmc,fwzl_mc, Sum(numb) numb  From temp Where sactivityname= \'收件\' Group By qxmc,djxl,djdlmc,ywmc,fwzl_mc) b
         On a.qxmc = b.qxmc And a.fwzl_mc = b.fwzl_mc
       Left Join
         (Select qxmc,djxl,djdlmc,ywmc,fwzl_mc, Sum(numb) numb  From temp Where sactivityname= \'初审\' Group By qxmc,djxl,djdlmc,ywmc,fwzl_mc) c
         On a.qxmc = c.qxmc And a.fwzl_mc = c.fwzl_mc
       Left Join
         (Select qxmc,djxl,djdlmc,ywmc,fwzl_mc, Sum(numb) numb  From temp Where sactivityname= \'复审\' Group By qxmc,djxl,djdlmc,ywmc,fwzl_mc) d
         On a.qxmc = d.qxmc And a.fwzl_mc = d.fwzl_mc
       Left Join
         (Select qxmc,djxl,djdlmc,ywmc,fwzl_mc, Sum(numb) numb  From temp Where sactivityname= \'缮证\' Group By qxmc,djxl,djdlmc,ywmc,fwzl_mc ) e
         On a.qxmc = e.qxmc And a.fwzl_mc = e.fwzl_mc
         Order By a.qxmc ,a.djdlmc,a.fwzl_mc ) m1     

    UNION ALL
      ----2.土地登记业务
    select * from (
    With temp As (
      Select  qxmc,decode(djxl,\'GF\',\'房屋登记\',\'G0\',\'土地登记\',\'J0\',\'土地登记\',\'Z0\',\'土地登记\') djxl,djdlmc,ywmc,fwzl_mc,
         decode(sactivityname,\'窗口受理\',\'收件\',\'缮证登簿\',\'缮证\',\'打证\',\'缮证\',\'注销登簿\',\'缮证\',sactivityname) sactivityname,
         count(sdata1) numb  From sa_task a Inner Join t_ywslb b
         On (a.sdata1 = b.fbizrecid)
         where  ywdm in (\'G0100\',\'G0200\',\'G0300\',\'G0400\',\'G0500\')
        and b.slsj >= TO_DATE(\'${starttime}\', \'yyyy-MM-dd\')
        And b.slsj < TO_DATE(\'${endtime}\', \'yyyy-MM-dd\')
        ${if(len(qxmc)==0,\"\",\"and qxmc=\'\"+qxmc+\"\'\")}
        ${if(len(fwzl_mc)==0,\"\",\"and fwzl_mc=\'\"+fwzl_mc+\"\'\")}
        ${if(len(djdlmc)==0,\"\",\"and djdlmc=\'\"+djdlmc+\"\'\")}
        ${if(len(ywmc)==0,\"\",\"and ywmc=\'\"+ywmc+\"\'\")}
         And a.sactivityname In(\'收件\',\'窗口受理\',\'初审\',\'复审\',\'缮证\',\'缮证登簿\',\'打证\')
         And a.sstatusid = \'tesFinished\' And sexecutorfid Is Not Null  And ssourceid Is Null
         Group By qxmc,
         decode(djxl,\'GF\',\'房屋登记\',\'G0\',\'土地登记\',\'J0\',\'土地登记\',\'Z0\',\'土地登记\'),
         djxl,djdlmc,b.ywmc,fwzl_mc,
         decode(sactivityname,\'窗口受理\',\'收件\',\'缮证登簿\',\'缮证\',\'打证\',\'缮证\',\'注销登簿\',\'缮证\',sactivityname)  
       )

    Select  a.qxmc,a.djxl,a.djdlmc,a.ywmc,a.fwzl_mc,b.numb As 收件量, c.numb As 初审量, d.numb As 复审量, e.numb As 缮证量
         From  (Select qxmc,djxl,djdlmc,ywmc,fwzl_mc From temp  Group By qxmc,djxl,djdlmc,ywmc,fwzl_mc) a
       Left Join
         (Select qxmc,djxl,djdlmc,ywmc,fwzl_mc, Sum(numb) numb  From temp Where sactivityname= \'收件\' Group By qxmc,djxl,djdlmc,ywmc,fwzl_mc) b
         On a.qxmc = b.qxmc
       Left Join
         (Select qxmc,djxl,djdlmc,ywmc,fwzl_mc, Sum(numb) numb  From temp Where sactivityname= \'初审\' Group By qxmc,djxl,djdlmc,ywmc,fwzl_mc) c
         On a.qxmc = c.qxmc
       Left Join
         (Select qxmc,djxl,djdlmc,ywmc,fwzl_mc, Sum(numb) numb  From temp Where sactivityname= \'复审\' Group By qxmc,djxl,djdlmc,ywmc,fwzl_mc) d
         On a.qxmc = d.qxmc
       Left Join
         (Select qxmc,djxl,djdlmc,ywmc,fwzl_mc, Sum(numb) numb  From temp Where sactivityname= \'缮证\' Group By qxmc,djxl,djdlmc,ywmc,fwzl_mc ) e
         On a.qxmc = e.qxmc
         Order By a.qxmc,a.djdlmc,a.fwzl_mc ) m2
    回复
    2018-05-27 13:08 
  • 0关注人数
  • 719浏览人数
  • 最后回答于:2018-5-27 13:08
    活动推荐 更多
    热门课程 更多
    返回顶部