资产导出修改

main
dongdingding 1 week ago
parent c059da1f28
commit c8fa0ca06f

@ -41,15 +41,15 @@ public class AssetdwHcResponse {
/** /**
* *
*/ */
@Excel(name = "待核查") @Excel(name = "待核查数量")
@ApiModelProperty("待核查") @ApiModelProperty("待核查数量")
private Integer notChecked; private Integer notChecked;
/** /**
* *
*/ */
@Excel(name = "待审批") @Excel(name = "待审批数量")
@ApiModelProperty("待审批") @ApiModelProperty("待审批数量")
private Integer dsp; private Integer dsp;
/** /**
* *

@ -586,6 +586,8 @@
b.task_deadline, b.task_deadline,
SUM(s.total) AS total, SUM(s.total) AS total,
SUM(s.checked) AS checked, SUM(s.checked) AS checked,
SUM( s.notChecked ) AS notChecked,
SUM( s.dsp ) AS dsp,
COALESCE(SUM(s.returned), 0) AS shthcs, COALESCE(SUM(s.returned), 0) AS shthcs,
ROUND( ROUND(
CASE CASE
@ -624,6 +626,7 @@
task_id, task_id,
MAX(create_time) AS latest_create_time, MAX(create_time) AS latest_create_time,
SUM(CASE WHEN STATUS = 0 THEN 1 ELSE 0 END) AS notChecked, SUM(CASE WHEN STATUS = 0 THEN 1 ELSE 0 END) AS notChecked,
SUM( CASE WHEN STATUS = 1 THEN 1 ELSE 0 END ) AS dsp,
SUM(CASE WHEN STATUS = 3 OR STATUS = 5 THEN 1 ELSE 0 END) AS checked, SUM(CASE WHEN STATUS = 3 OR STATUS = 5 THEN 1 ELSE 0 END) AS checked,
SUM(count) AS returned SUM(count) AS returned
FROM FROM
@ -647,13 +650,14 @@
task_id, task_id,
MAX(create_time) AS latest_create_time, MAX(create_time) AS latest_create_time,
SUM(CASE WHEN STATUS = 0 THEN 1 ELSE 0 END) AS notChecked, SUM(CASE WHEN STATUS = 0 THEN 1 ELSE 0 END) AS notChecked,
SUM( CASE WHEN STATUS = 1 THEN 1 ELSE 0 END ) AS dsp,
SUM(CASE WHEN STATUS = 3 OR STATUS = 5 THEN 1 ELSE 0 END) AS checked, SUM(CASE WHEN STATUS = 3 OR STATUS = 5 THEN 1 ELSE 0 END) AS checked,
SUM(count) AS returned SUM(count) AS returned
FROM FROM
asset_mini_programs_cp asset_mini_programs_cp
<where> <where>
<if test="req.dwmc!=null and req.dwmc!='' "> <if test="req.dwmc!=null and req.dwmc!='' ">
and ssdw like concat('%',#{req.ssdw},'%') and ssdw like concat('%',#{req.dwmc},'%')
</if> </if>
<if test="req.taskId!=null and req.taskId!='' "> <if test="req.taskId!=null and req.taskId!='' ">
@ -670,13 +674,14 @@
task_id, task_id,
MAX(create_time) AS latest_create_time, MAX(create_time) AS latest_create_time,
SUM(CASE WHEN STATUS = 0 THEN 1 ELSE 0 END) AS notChecked, SUM(CASE WHEN STATUS = 0 THEN 1 ELSE 0 END) AS notChecked,
SUM( CASE WHEN STATUS = 1 THEN 1 ELSE 0 END ) AS dsp,
SUM(CASE WHEN STATUS = 3 OR STATUS = 5 THEN 1 ELSE 0 END) AS checked, SUM(CASE WHEN STATUS = 3 OR STATUS = 5 THEN 1 ELSE 0 END) AS checked,
SUM(count) AS returned SUM(count) AS returned
FROM FROM
asset_app_cp asset_app_cp
<where> <where>
<if test="req.dwmc!=null and req.dwmc!='' "> <if test="req.dwmc!=null and req.dwmc!='' ">
and ssdw like concat('%',#{req.ssdw},'%') and ssdw like concat('%',#{req.dwmc},'%')
</if> </if>
<if test="req.taskId!=null and req.taskId!='' "> <if test="req.taskId!=null and req.taskId!='' ">
@ -684,21 +689,21 @@
</if> </if>
</where> </where>
GROUP BY GROUP BY
ssdw , ssdw ,task_id
task_id
UNION ALL UNION ALL
SELECT ssdw AS dwmc, SELECT ssdw AS dwmc,
COUNT(*) AS total, COUNT(*) AS total,
task_id, task_id,
MAX(create_time) AS latest_create_time, MAX(create_time) AS latest_create_time,
SUM(CASE WHEN STATUS = 0 THEN 1 ELSE 0 END) AS notChecked, SUM(CASE WHEN STATUS = 0 THEN 1 ELSE 0 END) AS notChecked,
SUM( CASE WHEN STATUS = 1 THEN 1 ELSE 0 END ) AS dsp,
SUM(CASE WHEN STATUS = 3 OR STATUS = 5 THEN 1 ELSE 0 END) AS checked, SUM(CASE WHEN STATUS = 3 OR STATUS = 5 THEN 1 ELSE 0 END) AS checked,
SUM(count) AS returned SUM(count) AS returned
FROM FROM
asset_official_account_cp asset_official_account_cp
<where> <where>
<if test="req.dwmc!=null and req.dwmc!='' "> <if test="req.dwmc!=null and req.dwmc!='' ">
and ssdw like concat('%',#{req.ssdw},'%') and ssdw like concat('%',#{req.dwmc},'%')
</if> </if>
<if test="req.taskId!=null and req.taskId!='' "> <if test="req.taskId!=null and req.taskId!='' ">
@ -715,13 +720,14 @@
task_id, task_id,
MAX(create_time) AS latest_create_time, MAX(create_time) AS latest_create_time,
SUM(CASE WHEN STATUS = 0 THEN 1 ELSE 0 END) AS notChecked, SUM(CASE WHEN STATUS = 0 THEN 1 ELSE 0 END) AS notChecked,
SUM( CASE WHEN STATUS = 1 THEN 1 ELSE 0 END ) AS dsp,
SUM(CASE WHEN STATUS = 3 OR STATUS = 5 THEN 1 ELSE 0 END) AS checked, SUM(CASE WHEN STATUS = 3 OR STATUS = 5 THEN 1 ELSE 0 END) AS checked,
SUM(count) AS returned SUM(count) AS returned
FROM FROM
asset_email_cp asset_email_cp
<where> <where>
<if test="req.dwmc!=null and req.dwmc!='' "> <if test="req.dwmc!=null and req.dwmc!='' ">
and ssdw like concat('%',#{req.ssdw},'%') and ssdw like concat('%',#{req.dwmc},'%')
</if> </if>
<if test="req.taskId!=null and req.taskId!='' "> <if test="req.taskId!=null and req.taskId!='' ">
@ -739,8 +745,7 @@
</where> </where>
GROUP BY GROUP BY
s.dwmc , s.dwmc ,
s.task_id, s.task_id
s.latest_create_time
</select> </select>
<select id="dwHcBl" resultType="com.ruoyi.tc.entity.response.AssetdwHcBlResponse" <select id="dwHcBl" resultType="com.ruoyi.tc.entity.response.AssetdwHcBlResponse"
parameterType="com.ruoyi.tc.entity.request.AssetdwHcRequest"> parameterType="com.ruoyi.tc.entity.request.AssetdwHcRequest">

Loading…
Cancel
Save