Giter VIP home page Giter VIP logo

Comments (6)

uuc33 avatar uuc33 commented on May 14, 2024

F12看传参,应该是前端给截取错了

from jimureport.

uuc33 avatar uuc33 commented on May 14, 2024

sql:
select tmp1.busDeptName as '中心',count(tmp1.emplId) as '中心总人数',
tmp3.courseNum as '应学课程数据',
sum(if(tmp2.isLook>0,1,0)) as '参与人数',
sum(if(tmp2.totalCnt=courseNum,1,0)) as '完成人数'
from
(select post.emplId,post.deptId,busDept.busDeptId ,busDeptName
from post
JOIN (
select CONCAT(deptId,'') deptId,CONCAT(deptId,'') as busDeptId,descr as busDeptName from dept_node dn where setId=10000 and deptId in (1000000027, 1000000028, 1000000031, 1000000033, 1000000118, 1000000124, 1000000138, 1000000164, 1000000174, 1000000179, 1000000184, 1000000185, 1000000186) and effStatus='A'
union all
select CONCAT(deptId,'') deptId,dn.node2 as busDeptId,node2Descr as busDeptName from dept_node dn where setId=10000 and node2 in ('1000000027', '1000000028', '1000000031', '1000000033', '1000000118', '1000000124', '1000000138', '1000000164', '1000000174', '1000000179', '1000000184', '1000000185', '1000000186') and effStatus='A'
union all
select CONCAT(deptId,'') deptId,dn.node3 as busDeptId ,node3Descr as busDeptName from dept_node dn where setId=10000 and node3 in ('1000000027', '1000000028', '1000000031', '1000000033', '1000000118', '1000000124', '1000000138', '1000000164', '1000000174', '1000000179', '1000000184', '1000000185', '1000000186') and effStatus='A'
union all
select CONCAT(deptId,'')deptId,dn.node4 as busDeptId,node4Descr as busDeptName from dept_node dn where setId=10000 and node4 in ('1000000027', '1000000028', '1000000031', '1000000033', '1000000118', '1000000124', '1000000138', '1000000164', '1000000174', '1000000179', '1000000184', '1000000185', '1000000186') and effStatus='A'
) busDept on post.deptId=busDept.deptId
where post.setidDept='10000' and hrStatus='A')tmp1
LEFT JOIN
( select a.emplId,a.emplName,a.setId,a.deptId,
sum(if(a.sectionCount=a.lookCnt,1,0)) totalCnt,
if(a.isLook>0,1,0) isLook
from
(
select user.id userId,user.emplId,user.emplName,user.setId,user.deptId,
cs.sectionCount,
sum(if(cr.watchFullState=1,1,0)) lookCnt,
sum(if(cr.id is not null,1,0)) isLook
from
course cs
LEFT JOIN course_record cr on cs.id=cr.courseId and cr.state=1
LEFT JOIN user on user.id=cr.userId
where cs.id in (select home_label_link.relationId from home_label
LEFT JOIN home_label_link on home_label_link.labelId=home_label.id and home_label_link.state=1
where ownCity='10000' and contentType=0)
and user.userType=2 and user.setId=10000
GROUP BY userid,cs.id) a
GROUP BY a.userId ) tmp2 on tmp1.emplId=CONCAT(tmp2.emplId,'')
LEFT JOIN (select count(1) courseNum from home_label
LEFT JOIN home_label_link on home_label_link.labelId=home_label.id and home_label_link.state=1
where ownCity='10000' and contentType=0) tmp3 on 1=1
GROUP BY tmp1.busDeptId

后台日志
image
前端传值
image
sql: select tmp1.busDeptName as '中心',count(tmp1.emplId) as '中心总人数',
tmp3.courseNum as '应学课程数据',
sum(if(tmp2.isLook>0,1,0)) as '参与人数',
sum(if(tmp2.totalCnt=courseNum,1,0)) as '完成人数'
from
(select post.emplId,post.deptId,busDept.busDeptId ,busDeptName
from post
JOIN (
select CONCAT(deptId,'') deptId,CONCAT(deptId,'') as busDeptId,descr as busDeptName from dept_node dn

from jimureport.

zhangdaiscott avatar zhangdaiscott commented on May 14, 2024

收录,待分析

from jimureport.

tygithub1 avatar tygithub1 commented on May 14, 2024

已修复 版本1.1.05++发布

from jimureport.

uuc33 avatar uuc33 commented on May 14, 2024

后台也有问题 ,通过where截取数据后sql就有问题了。 比如select * from (select * from b where b.id=123) a

from jimureport.

uuc33 avatar uuc33 commented on May 14, 2024

@tygithub1

from jimureport.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.