From ad9ef818a740f7752341225bdc367131a908ff31 Mon Sep 17 00:00:00 2001 From: zhanglipeng <chinazhanglipeng@qq.com> Date: Fri, 30 Jul 2021 12:02:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E6=97=A5=E6=B5=81=E7=A8=8B=E8=AF=84?= =?UTF-8?q?=E4=BC=B0=20=E7=8F=AD=E7=BA=A7=E5=B9=B3=E5=9D=87=E5=88=86=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../benyi/ByDayflowassessmentMapper.xml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml index b732530c1..245334b93 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByDayflowassessmentMapper.xml @@ -128,7 +128,23 @@ </select> <select id="selectByDayflowassessmentPjf" parameterType="ByDayflowassessment" resultMap="ByDayflowassessmentResult"> - select t.classid,e.bjmc,t.ny,avg(t.zzdf) as bjpjf,avg(t.zjjd) as zjjdpjf,avg(t.yc) as ycpjf,avg(t.zjzq) as zjzqpjf,avg(t.fzjx) as fzjxpjf,avg(t.dxsj) as dxsjpjf,avg(t.rcxsys) as rcxsyspjf,avg(t.hdgd) as hdgdpjf,avg(t.hwhd) as hwhdpjf,avg(t.ws) as wspjf,avg(t.lyzj) as lyzjpjf,avg(t.aq) as aqpjf,avg(t.zyhd) as zyhdpjf,avg(t.gzyjlys) as gzyjlyspjf,avg(t.wxkc) as wxkcpjf,avg(t.qkc) as qkcpjf from ( + select t.classid,e.bjmc,t.ny, + sum(t.zzdf)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as bjpjf, + sum(t.zjjd)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as zjjdpjf, + sum(t.yc)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as ycpjf, + sum(t.zjzq)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as zjzqpjf, + sum(t.fzjx)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as fzjxpjf, + sum(t.dxsj)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as dxsjpjf, + sum(t.rcxsys)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as rcxsyspjf, + sum(t.hdgd)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as hdgdpjf, + sum(t.hwhd)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as hwhdpjf, + sum(t.ws)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as wspjf, + sum(t.lyzj)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as lyzjpjf, + sum(t.aq)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as aqpjf, + sum(t.zyhd)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as zyhdpjf, + sum(t.gzyjlys)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as gzyjlyspjf, + sum(t.wxkc)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as wxkcpjf, + sum(t.qkc)/(select ifnull(ifnull(zbjs,0)/zbjs,0)+ifnull(ifnull(pbjs,0)/pbjs,0)+ifnull(ifnull(zljs,0)/zljs,0) from by_class where bjbh=t.classid) as qkcpjf from ( select a.classid,a.zzdf,a.create_time,date_format(a.create_time,'%Y-%m') as 'ny', (select sum(b.value) from by_dayflowassessmentitem b where a.id=b.pid and b.item in (select id from by_day_flow where name='早间接待')) as zjjd, (select sum(b.value) from by_dayflowassessmentitem b where a.id=b.pid and b.item in (select id from by_day_flow where name='用餐')) as yc,