机具费用推送修改
This commit is contained in:
parent
0864b70fb1
commit
3eefc8bbc5
|
|
@ -727,7 +727,7 @@ public class IwsCostPushServiceImpl implements IwsCostPushService {
|
|||
List<IwsCostPushBean> list = getMonthCosts(proIdsBean);
|
||||
if(CollectionUtils.isNotEmpty(list)){
|
||||
//分段推送
|
||||
forHttpYouer(list,proIdsBean);
|
||||
// forHttpYouer(list,proIdsBean);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
slt_agreement_details sad
|
||||
left join slt_agreement_apply saa on sad.apply_id = saa.id
|
||||
LEFT JOIN bm_agreement_info bma ON bma.agreement_id = saa.agreement_id
|
||||
WHERE LEFT(saa.create_time,7) = #{month} AND sad.slt_type = 2
|
||||
WHERE LEFT(saa.audit_time,7) = #{month} AND sad.slt_type = 2
|
||||
GROUP BY bma.agreement_id
|
||||
|
||||
UNION
|
||||
|
|
@ -88,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
slt_agreement_details sad
|
||||
left join slt_agreement_apply saa on sad.apply_id = saa.id
|
||||
LEFT JOIN bm_agreement_info bma ON bma.agreement_id = saa.agreement_id
|
||||
WHERE LEFT(saa.create_time,7) = #{month} AND sad.slt_type = 3 and sad.is_charge = 1
|
||||
WHERE LEFT(saa.audit_time,7) = #{month} AND sad.slt_type = 3 and sad.is_charge = 1
|
||||
GROUP BY bma.agreement_id
|
||||
|
||||
UNION
|
||||
|
|
@ -100,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
slt_agreement_details sad
|
||||
left join slt_agreement_apply saa on sad.apply_id = saa.id
|
||||
LEFT JOIN bm_agreement_info bma ON bma.agreement_id = saa.agreement_id
|
||||
WHERE LEFT(saa.create_time,7) = #{month} AND sad.slt_type = 4 and sad.is_charge = 1
|
||||
WHERE LEFT(saa.audit_time,7) = #{month} AND sad.slt_type = 4 and sad.is_charge = 1
|
||||
GROUP BY bma.agreement_id
|
||||
) a ON
|
||||
pmc.AGREEMENT_ID = a.agreementId
|
||||
|
|
@ -558,7 +558,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sad.num as num,
|
||||
sad.price as leasePrice,
|
||||
sad.money as money,
|
||||
#{type} as type,
|
||||
case when sad.slt_type = 1 then 1
|
||||
when sad.slt_type = 2 then 2
|
||||
when sad.slt_type = 3 then 4
|
||||
when sad.slt_type = 4 then 5
|
||||
else null
|
||||
end as type,
|
||||
1 as category,
|
||||
#{submitUser} as submitUser,
|
||||
#{month} as month
|
||||
|
|
@ -582,6 +587,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="type != null and (type == 1 or type ==2)">
|
||||
and sad.slt_type = #{type}
|
||||
</if>
|
||||
<if test="month != null and month != ''">
|
||||
and LEFT(saa.audit_time,7) = #{month}
|
||||
</if>
|
||||
<if test="settlementType != null">
|
||||
and saa.settlement_type = #{settlementType}
|
||||
</if>
|
||||
|
|
@ -681,7 +689,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sad.num as num,
|
||||
sad.price as leasePrice,
|
||||
sad.money as money,
|
||||
#{type} as type,
|
||||
case when sad.slt_type = 1 then 1
|
||||
when sad.slt_type = 2 then 2
|
||||
when sad.slt_type = 3 then 4
|
||||
when sad.slt_type = 4 then 5
|
||||
else null
|
||||
end as type,
|
||||
2 as category,
|
||||
#{submitUser} as submitUser,
|
||||
#{month} as month
|
||||
|
|
@ -699,9 +712,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<foreach collection="agreementIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="type != null">
|
||||
<if test="type != null and type !=4">
|
||||
and sad.slt_type = #{type}
|
||||
</if>
|
||||
<if test="type != null and type ==4">
|
||||
and sad.slt_type = #{type} and saa.is_charge = 1
|
||||
</if>
|
||||
<if test="month != null and month != ''">
|
||||
and LEFT(saa.audit_time,7) = #{month}
|
||||
</if>
|
||||
<if test="settlementType != null">
|
||||
and saa.settlement_type = #{settlementType}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
pmc.LOST_MONEY as lostMoney,
|
||||
pmc.SCRAP_MONEY as scrapMoney,
|
||||
pmc.REPAIR_MONEY as repairMoney,
|
||||
pmia.push_status as pushStatus,
|
||||
pmia.push_remark as pushRemark,
|
||||
a.pushStatus as pushStatus,
|
||||
a.pushRemark as pushRemark,
|
||||
ROUND(ifnull(pmc.LEASE_MONEY,0)+ifnull(pmc.LOST_MONEY,0)+ifnull(pmc.SCRAP_MONEY,0),2) as money,
|
||||
pmc.CHECK_STATUS as checkStatus
|
||||
from
|
||||
|
|
@ -32,28 +32,45 @@
|
|||
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
pmi.agreementId,
|
||||
pmi.taskId,
|
||||
pmi.push_status,
|
||||
pmi.push_remark,
|
||||
bai.unit_id,
|
||||
bai.project_id
|
||||
pmi.agreementId,pmi.id,pmi.push_status as pushStatus,
|
||||
pmi.push_remark as pushRemark
|
||||
FROM calc_project_month cpm
|
||||
LEFT JOIN project_month_info pmi ON pmi.taskId = cpm.id
|
||||
WHERE cpm.`MONTH` = #{month} and pmi.jiju_type = 2 GROUP BY pmi.agreementId
|
||||
|
||||
UNION
|
||||
SELECT
|
||||
bma.agreement_id AS agreementId,
|
||||
sad.id,sad.push_status as pushStatus,
|
||||
sad.push_remark as pushRemark
|
||||
FROM
|
||||
project_month_info pmi
|
||||
LEFT JOIN bm_agreement_info bai ON pmi.agreementId = bai.agreement_id
|
||||
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
||||
LEFT JOIN calc_project_month cpm ON pmi.taskId = cpm.ID
|
||||
where pmi.jiju_type = 2
|
||||
GROUP BY
|
||||
pmi.agreementId
|
||||
) pmia on bai.project_id = pmia.project_id and pmc.task_id=pmia.taskId and pmia.agreementId=pmc.AGREEMENT_ID
|
||||
slt_agreement_details sad
|
||||
left join slt_agreement_apply saa on sad.apply_id = saa.id
|
||||
LEFT JOIN bm_agreement_info bma ON bma.agreement_id = saa.agreement_id
|
||||
WHERE LEFT(saa.audit_time,7) = #{month} AND sad.slt_type = 2
|
||||
GROUP BY bma.agreement_id
|
||||
|
||||
UNION
|
||||
SELECT
|
||||
bma.agreement_id AS agreementId,
|
||||
sad.id,sad.push_status as pushStatus,
|
||||
sad.push_remark as pushRemark
|
||||
FROM
|
||||
slt_agreement_details sad
|
||||
left join slt_agreement_apply saa on sad.apply_id = saa.id
|
||||
LEFT JOIN bm_agreement_info bma ON bma.agreement_id = saa.agreement_id
|
||||
WHERE LEFT(saa.audit_time,7) = #{month} AND sad.slt_type = 4 and sad.is_charge = 1
|
||||
GROUP BY bma.agreement_id
|
||||
|
||||
) a ON
|
||||
pmc.AGREEMENT_ID = a.agreementId
|
||||
where
|
||||
bp.pro_id is not null and pmc.type = 2
|
||||
and
|
||||
(pmc.LEASE_MONEY > 0 or pmc.LOST_MONEY > 0 or pmc.REPAIR_MONEY > 0 or pmc.SCRAP_MONEY > 0)
|
||||
and (pmc.CONSUME_MONEY = 0 or pmc.CONSUME_MONEY is null)
|
||||
<if test="status != null">
|
||||
AND pmia.push_status = #{status}
|
||||
AND a.pushStatus = #{status}
|
||||
</if>
|
||||
<if test="month != null">
|
||||
AND cpm.month = #{month}
|
||||
|
|
@ -64,8 +81,8 @@
|
|||
<if test="unitId != null and unitId != ''">
|
||||
AND bai.unit_id = #{unitId}
|
||||
</if>
|
||||
GROUP BY bai.project_id,bai.unit_id
|
||||
order by pmia.push_status
|
||||
GROUP BY bai.agreement_id
|
||||
order by a.pushStatus
|
||||
</select>
|
||||
|
||||
<!-- 获取消耗费用推送审核数据 -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue