查询增加持证人数比例
This commit is contained in:
parent
1a68dc0a00
commit
9fcd7b03e5
@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.worker.entity.vo;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -68,6 +69,8 @@ public class WorkerManageStatisticsVo {
|
|||||||
private Integer age60;
|
private Integer age60;
|
||||||
@ApiModelProperty(value = "证书总数")
|
@ApiModelProperty(value = "证书总数")
|
||||||
private Integer certificateTotal;
|
private Integer certificateTotal;
|
||||||
|
@ApiModelProperty(value = "持证人数比例")
|
||||||
|
private BigDecimal certificateRate;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -240,6 +240,7 @@
|
|||||||
ELSE 0 END)),
|
ELSE 0 END)),
|
||||||
0) certificate_person_total,
|
0) certificate_person_total,
|
||||||
SUM(wc.num) certificate_total,
|
SUM(wc.num) certificate_total,
|
||||||
|
round(SUM(wc.num)/COUNT(1)*100,2) certificate_rate,
|
||||||
IFNULL(AVG(IFNULL(TIMESTAMPDIFF(YEAR, w1.birthday, CURDATE()), 0)), 0) avgage,
|
IFNULL(AVG(IFNULL(TIMESTAMPDIFF(YEAR, w1.birthday, CURDATE()), 0)), 0) avgage,
|
||||||
IFNULL(sum((CASE WHEN IFNULL(TIMESTAMPDIFF(YEAR, w1.birthday, CURDATE()), 0) < 18 then 1 ELSE 0 END)),
|
IFNULL(sum((CASE WHEN IFNULL(TIMESTAMPDIFF(YEAR, w1.birthday, CURDATE()), 0) < 18 then 1 ELSE 0 END)),
|
||||||
0) age18,
|
0) age18,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user