班级考勤部分代码

This commit is contained in:
sk1551 2020-09-24 18:03:14 +08:00
parent 279f7b30e7
commit 3db6468b9c
2 changed files with 410 additions and 530 deletions

View File

@ -266,37 +266,290 @@ public class ByChild extends BaseEntity {
// 幼儿考勤系统属性 // 幼儿考勤系统属性
private String month; private String month;
private float day1; private String day1;
private float day2; private String day2;
private float day3; private String day3;
private float day4; private String day4;
private float day5; private String day5;
private float day6; private String day6;
private float day7; private String day7;
private float day8; private String day8;
private float day9; private String day9;
private float day10; private String day10;
private float day11; private String day11;
private float day12; private String day12;
private float day13; private String day13;
private float day14; private String day14;
private float day15; private String day15;
private float day16; private String day16;
private float day17; private String day17;
private float day18; private String day18;
private float day19; private String day19;
private float day20; private String day20;
private float day21; private String day21;
private float day22; private String day22;
private float day23; private String day23;
private float day24; private String day24;
private float day25; private String day25;
private float day26; private String day26;
private float day27; private String day27;
private float day28; private String day28;
private float day29; private String day29;
private float day30; private String day30;
private float day31; private String day31;
public String getDay1() {
return day1;
}
public void setDay1(String day1) {
this.day1 = day1;
}
public String getDay2() {
return day2;
}
public void setDay2(String day2) {
this.day2 = day2;
}
public String getDay3() {
return day3;
}
public void setDay3(String day3) {
this.day3 = day3;
}
public String getDay4() {
return day4;
}
public void setDay4(String day4) {
this.day4 = day4;
}
public String getDay5() {
return day5;
}
public void setDay5(String day5) {
this.day5 = day5;
}
public String getDay6() {
return day6;
}
public void setDay6(String day6) {
this.day6 = day6;
}
public String getDay7() {
return day7;
}
public void setDay7(String day7) {
this.day7 = day7;
}
public String getDay8() {
return day8;
}
public void setDay8(String day8) {
this.day8 = day8;
}
public String getDay9() {
return day9;
}
public void setDay9(String day9) {
this.day9 = day9;
}
public String getDay10() {
return day10;
}
public void setDay10(String day10) {
this.day10 = day10;
}
public String getDay11() {
return day11;
}
public void setDay11(String day11) {
this.day11 = day11;
}
public String getDay12() {
return day12;
}
public void setDay12(String day12) {
this.day12 = day12;
}
public String getDay13() {
return day13;
}
public void setDay13(String day13) {
this.day13 = day13;
}
public String getDay14() {
return day14;
}
public void setDay14(String day14) {
this.day14 = day14;
}
public String getDay15() {
return day15;
}
public void setDay15(String day15) {
this.day15 = day15;
}
public String getDay16() {
return day16;
}
public void setDay16(String day16) {
this.day16 = day16;
}
public String getDay17() {
return day17;
}
public void setDay17(String day17) {
this.day17 = day17;
}
public String getDay18() {
return day18;
}
public void setDay18(String day18) {
this.day18 = day18;
}
public String getDay19() {
return day19;
}
public void setDay19(String day19) {
this.day19 = day19;
}
public String getDay20() {
return day20;
}
public void setDay20(String day20) {
this.day20 = day20;
}
public String getDay21() {
return day21;
}
public void setDay21(String day21) {
this.day21 = day21;
}
public String getDay22() {
return day22;
}
public void setDay22(String day22) {
this.day22 = day22;
}
public String getDay23() {
return day23;
}
public void setDay23(String day23) {
this.day23 = day23;
}
public String getDay24() {
return day24;
}
public void setDay24(String day24) {
this.day24 = day24;
}
public String getDay25() {
return day25;
}
public void setDay25(String day25) {
this.day25 = day25;
}
public String getDay26() {
return day26;
}
public void setDay26(String day26) {
this.day26 = day26;
}
public String getDay27() {
return day27;
}
public void setDay27(String day27) {
this.day27 = day27;
}
public String getDay28() {
return day28;
}
public void setDay28(String day28) {
this.day28 = day28;
}
public String getDay29() {
return day29;
}
public void setDay29(String day29) {
this.day29 = day29;
}
public String getDay30() {
return day30;
}
public void setDay30(String day30) {
this.day30 = day30;
}
public String getDay31() {
return day31;
}
public void setDay31(String day31) {
this.day31 = day31;
}
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
@ -627,253 +880,6 @@ public class ByChild extends BaseEntity {
this.month = month; this.month = month;
} }
public float getDay1() {
return day1;
}
public void setDay1(float day1) {
this.day1 = day1;
}
public float getDay2() {
return day2;
}
public void setDay2(float day2) {
this.day2 = day2;
}
public float getDay3() {
return day3;
}
public void setDay3(float day3) {
this.day3 = day3;
}
public float getDay4() {
return day4;
}
public void setDay4(float day4) {
this.day4 = day4;
}
public float getDay5() {
return day5;
}
public void setDay5(float day5) {
this.day5 = day5;
}
public float getDay6() {
return day6;
}
public void setDay6(float day6) {
this.day6 = day6;
}
public float getDay7() {
return day7;
}
public void setDay7(float day7) {
this.day7 = day7;
}
public float getDay8() {
return day8;
}
public void setDay8(float day8) {
this.day8 = day8;
}
public float getDay9() {
return day9;
}
public void setDay9(float day9) {
this.day9 = day9;
}
public float getDay10() {
return day10;
}
public void setDay10(float day10) {
this.day10 = day10;
}
public float getDay11() {
return day11;
}
public void setDay11(float day11) {
this.day11 = day11;
}
public float getDay12() {
return day12;
}
public void setDay12(float day12) {
this.day12 = day12;
}
public float getDay13() {
return day13;
}
public void setDay13(float day13) {
this.day13 = day13;
}
public float getDay14() {
return day14;
}
public void setDay14(float day14) {
this.day14 = day14;
}
public float getDay15() {
return day15;
}
public void setDay15(float day15) {
this.day15 = day15;
}
public float getDay16() {
return day16;
}
public void setDay16(float day16) {
this.day16 = day16;
}
public float getDay17() {
return day17;
}
public void setDay17(float day17) {
this.day17 = day17;
}
public float getDay18() {
return day18;
}
public void setDay18(float day18) {
this.day18 = day18;
}
public float getDay19() {
return day19;
}
public void setDay19(float day19) {
this.day19 = day19;
}
public float getDay20() {
return day20;
}
public void setDay20(float day20) {
this.day20 = day20;
}
public float getDay21() {
return day21;
}
public void setDay21(float day21) {
this.day21 = day21;
}
public float getDay22() {
return day22;
}
public void setDay22(float day22) {
this.day22 = day22;
}
public float getDay23() {
return day23;
}
public void setDay23(float day23) {
this.day23 = day23;
}
public float getDay24() {
return day24;
}
public void setDay24(float day24) {
this.day24 = day24;
}
public float getDay25() {
return day25;
}
public void setDay25(float day25) {
this.day25 = day25;
}
public float getDay26() {
return day26;
}
public void setDay26(float day26) {
this.day26 = day26;
}
public float getDay27() {
return day27;
}
public void setDay27(float day27) {
this.day27 = day27;
}
public float getDay28() {
return day28;
}
public void setDay28(float day28) {
this.day28 = day28;
}
public float getDay29() {
return day29;
}
public void setDay29(float day29) {
this.day29 = day29;
}
public float getDay30() {
return day30;
}
public void setDay30(float day30) {
this.day30 = day30;
}
public float getDay31() {
return day31;
}
public void setDay31(float day31) {
this.day31 = day31;
}
@Override @Override
public String toString() { public String toString() {

View File

@ -412,283 +412,157 @@
<select id="selectststicstClassList" parameterType="ByChild" <select id="selectststicstClassList" parameterType="ByChild"
resultMap="ByChildResult"> resultMap="ByChildResult">
select c.id, c.classid, c.name, select c.id, c.classid, c.name,
((select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-01')
and type='01')/
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-01')
and type='01')) as day1,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-02') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-1')) as day1,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-02')
and type='01')) as day2,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-03') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-2')) as day2,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-03')
and type='01')) as day3,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-04') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-3')) as day3,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-04')
and type='01')) as day4,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-05') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-4')) as day4,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-05')
and type='01')) as day5,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-06') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-5')) as day5,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-06')
and type='01')) as day6,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-07') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-6')) as day6,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-07')
and type='01')) as day7,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-08') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-7')) as day7,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-08')
and type='01')) as day8,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-09') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-8')) as day8,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-09')
and type='01')) as day9,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-10') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-9')) as day9,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-10')
and type='01')) as day10,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-11') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-10')) as day10,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-11')
and type='01')) as day11,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-12') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-11')) as day11,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-12')
and type='01')) as day12,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-13') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-12')) as day12,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-13')
and type='01')) as day13,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-14') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-13')) as day13,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-14')
and type='01')) as day14,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-15') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-14')) as day14,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-15')
and type='01')) as day15,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-16') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-15')) as day15,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-16')
and type='01')) as day16,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-17') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-16')) as day16,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-17')
and type='01')) as day17,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-18') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-17')) as day17,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-18')
and type='01')) as day18,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-19') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-18')) as day18,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-19')
and type='01')) as day19,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-20') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-19')) as day19,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-20')
and type='01')) as day20,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-21') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-20')) as day20,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-21')
and type='01')) as day21,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-22') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-21')) as day21,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-22')
and type='01')) as day22,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-23') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-22')) as day22,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-23')
and type='01')) as day23,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-24') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-23')) as day23,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-24')
and type='01')) as day24,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-25') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-24')) as day24,
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-25')
and type='01')) as day25,
((select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-26') from by_child_checkin_detail where childid=c.id
and type='01')/ and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-25')) as day25,
(select count(*) from by_child_checkin_detail (select (select dict_label from sys_dict_data
where childid=c.id where dict_type='sys_dm_cqzt' and dict_value= type)
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-26') from by_child_checkin_detail where childid=c.id
and type='01')) as day26, and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-26')) as day26,
(select (select dict_label from sys_dict_data
((select count(*) from by_child_checkin_detail where dict_type='sys_dm_cqzt' and dict_value= type)
where childid=c.id from by_child_checkin_detail where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-27') and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-27')) as day27,
and type='01')/ (select (select dict_label from sys_dict_data
(select count(*) from by_child_checkin_detail where dict_type='sys_dm_cqzt' and dict_value= type)
where childid=c.id from by_child_checkin_detail where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-27') and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-28')) as day28,
and type='01')) as day27, (select (select dict_label from sys_dict_data
where dict_type='sys_dm_cqzt' and dict_value= type)
((select count(*) from by_child_checkin_detail from by_child_checkin_detail where childid=c.id
where childid=c.id and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-29')) as day29,
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-28') (select (select dict_label from sys_dict_data
and type='01')/ where dict_type='sys_dm_cqzt' and dict_value= type)
(select count(*) from by_child_checkin_detail from by_child_checkin_detail where childid=c.id
where childid=c.id and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-30')) as day30,
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-28') (select (select dict_label from sys_dict_data
and type='01')) as day28, where dict_type='sys_dm_cqzt' and dict_value= type)
((select count(*) from by_child_checkin_detail from by_child_checkin_detail where childid=c.id
where childid=c.id and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-31')) as day31
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-29')
and type='01')/
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-29')
and type='01')) as day29,
((select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-30')
and type='01')/
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-30')
and type='01')) as day30,
((select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-31')
and type='01')/
(select count(*) from by_child_checkin_detail
where childid=c.id
and date_format(create_time,'%Y-%m-%d')=concat(#{month},'-31')
and type='01')) as day31
from by_child c from by_child c
where c.status='0' and c.classid where c.status='0'
<if test="classid != null and classid != ''">and c.classid = #{classid}</if> <if test="classid != null and classid != ''">and c.classid = #{classid}</if>
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
-- ${dataScope} -- ${dataScope}