Commit 5b184cd0 authored by suhuiguang's avatar suhuiguang

1.大屏-监管-业务办理时效新开发原有开发错误为了数量

parent bf241f13
......@@ -64,7 +64,7 @@ public interface JGStatisticsMapper {
List<CountDto> queryChangeAvgDayByReceiveCompany(@Param("dto") DPFilterParamDto dpFilterParamDto, @Param("orgCode") String orgCode);
List<CountDto> queryDisableAvgDayByReceiveCompany(DPFilterParamDto dpFilterParamDto, String orgCode);
List<CountDto> queryDisableAvgDayByReceiveCompany(@Param("dto") DPFilterParamDto dpFilterParamDto, @Param("orgCode") String orgCode);
List<CountDto> queryCancelAvgDayByReceiveCompany(DPFilterParamDto dpFilterParamDto, String orgCode);
List<CountDto> queryCancelAvgDayByReceiveCompany(@Param("dto") DPFilterParamDto dpFilterParamDto, @Param("orgCode") String orgCode);
}
......@@ -305,23 +305,6 @@
ORDER BY
ur.rec_date
</select>
<select id="useCountByOrgCodes" resultType="java.util.Map">
SELECT COUNT
( 1 ),
T.receive_company_org_code AS orgCode
FROM
tzs_jg_use_registration T
WHERE
T.audit_status = '已完成'
AND
<foreach collection="orgCodes" item="orgCode" separator="OR" open="(" close=")">
T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )
</foreach>
GROUP BY
T.receive_company_org_code
</select>
<select id="certificateCountByOrgCode" resultType="java.lang.Long">
SELECT COUNT
(1)
......@@ -607,6 +590,7 @@
tzs_jg_use_registration T
WHERE
T.audit_status = '已完成'
and T.receive_company_org_code like concat(#{orgCode}, '%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.reg_date as date),#{dto.beginDate})
</if>
......@@ -617,19 +601,21 @@
union all
SELECT
round(avg(T.audit_pass_date::date - T.reg_date::date + 1),1) as strValue,
T.receive_org_code AS keyStr
pc.org_code AS keyStr
FROM
tzs_jg_vehicle_information T
tzs_jg_vehicle_information T,
privilege_company pc
WHERE
T.status = '已完成'
and T.receive_org_code like(#{param1})
and t.receive_company_code = pc.company_code
and pc.org_code like concat(#{orgCode}, '%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.reg_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.reg_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_org_code
GROUP BY pc.org_code
</select>
<select id="queryChangeAvgDayByReceiveCompany" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
SELECT
......
......@@ -904,6 +904,9 @@ public class JGDPStatisticsServiceImpl {
private String avgAndSumDealDate(List<CountDto> collect) {
BigDecimal sum = collect.stream().map(c -> new BigDecimal(c.getStrValue())).reduce(BigDecimal.ZERO, BigDecimal::add);
if(collect.isEmpty()){
return "0";
}
return sum.divide(BigDecimal.valueOf(collect.size()), 1, RoundingMode.HALF_UP).toPlainString();
}
......
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