Commit 412052f3 by leialin

Merge branch 'lal' into 'develop'

提交

See merge request 8timerv2/8timerapiv200!495
parents a6f3da11 b7ae1391
......@@ -311,117 +311,125 @@
IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') as attpbfs,
IFNULL((select kqz.id from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') as attid,
(CASE WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 1
THEN (IFNULL((select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
THEN (IFNULL((select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times}
),(select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
and zh.type = (select CASE WHEN DAYNAME(#{param.times}) = 'Monday' THEN '1'
WHEN DAYNAME(#{param.times}) = 'Tuesday' THEN '2'
WHEN DAYNAME(#{param.times}) = 'Wednesday' THEN '3'
WHEN DAYNAME(#{param.times}) = 'Thursday' THEN '4'
WHEN DAYNAME(#{param.times}) = 'Friday' THEN '5'
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END)),(select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times})))
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END))))
WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 2
THEN (select pb.bcid from kqgl_asso_pbmx pb where pb.userid = sum.num
and pb.`data` = #{param.times} and pb.kqzid = sum.att_group) ELSE '' END) as bcszid,
IFNULL((select bc.name from kqgl_asso_bcsz bc where bc.id = ((CASE WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 1
THEN (IFNULL((select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
THEN (IFNULL((select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times}
),(select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
and zh.type = (select CASE WHEN DAYNAME(#{param.times}) = 'Monday' THEN '1'
WHEN DAYNAME(#{param.times}) = 'Tuesday' THEN '2'
WHEN DAYNAME(#{param.times}) = 'Wednesday' THEN '3'
WHEN DAYNAME(#{param.times}) = 'Thursday' THEN '4'
WHEN DAYNAME(#{param.times}) = 'Friday' THEN '5'
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END)),(select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times})))
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END))))
WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 2
THEN (select pb.bcid from kqgl_asso_pbmx pb where pb.userid = sum.num
and pb.`data` = #{param.times} and pb.kqzid = sum.att_group) ELSE '' END))),'') as bcname,
IFNULL((select bc.sbdk1 from kqgl_asso_bcsz bc where bc.id = ((CASE WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 1
THEN (IFNULL((select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
THEN (IFNULL((select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times}
),(select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
and zh.type = (select CASE WHEN DAYNAME(#{param.times}) = 'Monday' THEN '1'
WHEN DAYNAME(#{param.times}) = 'Tuesday' THEN '2'
WHEN DAYNAME(#{param.times}) = 'Wednesday' THEN '3'
WHEN DAYNAME(#{param.times}) = 'Thursday' THEN '4'
WHEN DAYNAME(#{param.times}) = 'Friday' THEN '5'
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END)),(select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times})))
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END))))
WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 2
THEN (select pb.bcid from kqgl_asso_pbmx pb where pb.userid = sum.num
and pb.`data` = #{param.times} and pb.kqzid = sum.att_group) ELSE '' END))),'') as bcsbdk1,
IFNULL((select bc.xbdk1 from kqgl_asso_bcsz bc where bc.id = ((CASE WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 1
THEN (IFNULL((select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
THEN (IFNULL((select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times}
),(select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
and zh.type = (select CASE WHEN DAYNAME(#{param.times}) = 'Monday' THEN '1'
WHEN DAYNAME(#{param.times}) = 'Tuesday' THEN '2'
WHEN DAYNAME(#{param.times}) = 'Wednesday' THEN '3'
WHEN DAYNAME(#{param.times}) = 'Thursday' THEN '4'
WHEN DAYNAME(#{param.times}) = 'Friday' THEN '5'
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END)),(select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times})))
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END))))
WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 2
THEN (select pb.bcid from kqgl_asso_pbmx pb where pb.userid = sum.num
and pb.`data` = #{param.times} and pb.kqzid = sum.att_group) ELSE '' END))),'') as bcxbdk1,
IFNULL((select bc.sbdk2 from kqgl_asso_bcsz bc where bc.id = ((CASE WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 1
THEN (IFNULL((select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
THEN (IFNULL((select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times}
),(select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
and zh.type = (select CASE WHEN DAYNAME(#{param.times}) = 'Monday' THEN '1'
WHEN DAYNAME(#{param.times}) = 'Tuesday' THEN '2'
WHEN DAYNAME(#{param.times}) = 'Wednesday' THEN '3'
WHEN DAYNAME(#{param.times}) = 'Thursday' THEN '4'
WHEN DAYNAME(#{param.times}) = 'Friday' THEN '5'
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END)),(select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times})))
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END))))
WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 2
THEN (select pb.bcid from kqgl_asso_pbmx pb where pb.userid = sum.num
and pb.`data` = #{param.times} and pb.kqzid = sum.att_group) ELSE '' END))),'') as bcsbdk2,
IFNULL((select bc.xbdk2 from kqgl_asso_bcsz bc where bc.id = ((CASE WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 1
THEN (IFNULL((select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
THEN (IFNULL((select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times}
),(select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
and zh.type = (select CASE WHEN DAYNAME(#{param.times}) = 'Monday' THEN '1'
WHEN DAYNAME(#{param.times}) = 'Tuesday' THEN '2'
WHEN DAYNAME(#{param.times}) = 'Wednesday' THEN '3'
WHEN DAYNAME(#{param.times}) = 'Thursday' THEN '4'
WHEN DAYNAME(#{param.times}) = 'Friday' THEN '5'
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END)),(select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times})))
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END))))
WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 2
THEN (select pb.bcid from kqgl_asso_pbmx pb where pb.userid = sum.num
and pb.`data` = #{param.times} and pb.kqzid = sum.att_group) ELSE '' END))),'') as bcxbdk2,
IFNULL((select bc.sbdk3 from kqgl_asso_bcsz bc where bc.id = ((CASE WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 1
THEN (IFNULL((select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
THEN (IFNULL((select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times}
),(select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
and zh.type = (select CASE WHEN DAYNAME(#{param.times}) = 'Monday' THEN '1'
WHEN DAYNAME(#{param.times}) = 'Tuesday' THEN '2'
WHEN DAYNAME(#{param.times}) = 'Wednesday' THEN '3'
WHEN DAYNAME(#{param.times}) = 'Thursday' THEN '4'
WHEN DAYNAME(#{param.times}) = 'Friday' THEN '5'
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END)),(select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times})))
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END))))
WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 2
THEN (select pb.bcid from kqgl_asso_pbmx pb where pb.userid = sum.num
and pb.`data` = #{param.times} and pb.kqzid = sum.att_group) ELSE '' END))),'') as bcsbdk3,
IFNULL((select bc.xbdk3 from kqgl_asso_bcsz bc where bc.id = ((CASE WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 1
THEN (IFNULL((select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
THEN (IFNULL((select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times}
),(select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
and zh.type = (select CASE WHEN DAYNAME(#{param.times}) = 'Monday' THEN '1'
WHEN DAYNAME(#{param.times}) = 'Tuesday' THEN '2'
WHEN DAYNAME(#{param.times}) = 'Wednesday' THEN '3'
WHEN DAYNAME(#{param.times}) = 'Thursday' THEN '4'
WHEN DAYNAME(#{param.times}) = 'Friday' THEN '5'
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END)),(select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times})))
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END))))
WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 2
THEN (select pb.bcid from kqgl_asso_pbmx pb where pb.userid = sum.num
and pb.`data` = #{param.times} and pb.kqzid = sum.att_group) ELSE '' END))),'') as bcxbdk3,
IFNULL((select (bc.sxbcs * 2) from kqgl_asso_bcsz bc where bc.id = ((CASE WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 1
THEN (IFNULL((select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
THEN (IFNULL((select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times}
),(select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
and zh.type = (select CASE WHEN DAYNAME(#{param.times}) = 'Monday' THEN '1'
WHEN DAYNAME(#{param.times}) = 'Tuesday' THEN '2'
WHEN DAYNAME(#{param.times}) = 'Wednesday' THEN '3'
WHEN DAYNAME(#{param.times}) = 'Thursday' THEN '4'
WHEN DAYNAME(#{param.times}) = 'Friday' THEN '5'
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END)),(select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times})))
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END))))
WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 2
THEN (select pb.bcid from kqgl_asso_pbmx pb where pb.userid = sum.num
and pb.`data` = #{param.times} and pb.kqzid = sum.att_group) ELSE '' END))),'') as ydkcs,
IFNULL((select bc.is_xbdk from kqgl_asso_bcsz bc where bc.id = ((CASE WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 1
THEN (IFNULL((select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
THEN (IFNULL((select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times}
), (select zh.bcid from kqgl_asso_zhoupaiban zh where zh.kqzid = sum.att_group
and zh.type = (select CASE WHEN DAYNAME(#{param.times}) = 'Monday' THEN '1'
WHEN DAYNAME(#{param.times}) = 'Tuesday' THEN '2'
WHEN DAYNAME(#{param.times}) = 'Wednesday' THEN '3'
WHEN DAYNAME(#{param.times}) = 'Thursday' THEN '4'
WHEN DAYNAME(#{param.times}) = 'Friday' THEN '5'
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END)), (select te.bcid from kqgl_asso_teshu te where te.kqzid = sum.att_group and te.tsrq = #{param.times})))
WHEN DAYNAME(#{param.times}) = 'Saturday' THEN '6' ELSE '7' END))))
WHEN IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') = 2
THEN (select pb.bcid from kqgl_asso_pbmx pb where pb.userid = sum.num
and pb.`data` = #{param.times} and pb.kqzid = sum.att_group) ELSE '' END))),'') as isxbdk,
'' address,'' remarks,'' cardtype,'' macaddress,'' macname,
IFNULL(rtj.attdate, '') attdate,IFNULL(rtj.userid,'') userid,
#{param.times} data,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment