|
|
@ -31,11 +31,11 @@ |
|
|
|
customerName AS `name`, |
|
|
|
currentReceivableMoney AS receivable, |
|
|
|
contractSid, |
|
|
|
<!--currentReceivableMoney AS confirmMoney,--> |
|
|
|
VIN AS vin, |
|
|
|
furd.busVinSid, |
|
|
|
furd.payType, |
|
|
|
furd.payTypeKey |
|
|
|
<!--currentReceivableMoney AS confirmMoney,--> |
|
|
|
VIN AS vin, |
|
|
|
furd.busVinSid, |
|
|
|
furd.payType, |
|
|
|
furd.payTypeKey |
|
|
|
FROM fin_uncollected_receivables_detailed furd |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
@ -56,31 +56,31 @@ |
|
|
|
<select id="getPaymentList" |
|
|
|
resultType="com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.AppFinUncollectedReceivablesDetailedVo"> |
|
|
|
SELECT sid, |
|
|
|
contractNo AS contractId, |
|
|
|
receivablesName AS projectName, |
|
|
|
customerPhone AS mobile, |
|
|
|
customerName AS `name`, |
|
|
|
currentReceivableMoney AS receivable, |
|
|
|
contractSid, |
|
|
|
VIN AS vin, |
|
|
|
furd.busVinSid, |
|
|
|
furd.payType, |
|
|
|
furd.payTypeKey, |
|
|
|
furd.customerSid, |
|
|
|
furd.useOrgSid |
|
|
|
contractNo AS contractId, |
|
|
|
receivablesName AS projectName, |
|
|
|
customerPhone AS mobile, |
|
|
|
customerName AS `name`, |
|
|
|
currentReceivableMoney AS receivable, |
|
|
|
contractSid, |
|
|
|
VIN AS vin, |
|
|
|
furd.busVinSid, |
|
|
|
furd.payType, |
|
|
|
furd.payTypeKey, |
|
|
|
furd.customerSid, |
|
|
|
furd.useOrgSid |
|
|
|
FROM fin_uncollected_receivables_detailed furd |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
<if test="name != null and name != ''"> |
|
|
|
and concat(IFNULL(furd.customerName |
|
|
|
, '') |
|
|
|
, ifnull(furd.contractNo |
|
|
|
, '')) LIKE concat('%' |
|
|
|
, #{name} |
|
|
|
, '%') |
|
|
|
, '') |
|
|
|
, ifnull(furd.contractNo |
|
|
|
, '')) LIKE concat('%' |
|
|
|
, #{name} |
|
|
|
, '%') |
|
|
|
</if> |
|
|
|
and length(furd.busVinSid) |
|
|
|
>0 |
|
|
|
>0 |
|
|
|
</where> |
|
|
|
order by furd.contractNo desc |
|
|
|
</select> |
|
|
@ -147,7 +147,7 @@ |
|
|
|
resultType="com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailedVo"> |
|
|
|
select fd.* |
|
|
|
from fin_selected_receivables_detailed fd |
|
|
|
left join fin_uncollected_receivables_detailed fud on fud.sid = fd.receivablesSid |
|
|
|
left join fin_uncollected_receivables_detailed fud on fud.sid = fd.receivablesSid |
|
|
|
where fd.contractNo = #{contractNo} |
|
|
|
and fud.busVinSid = #{busVinSid} |
|
|
|
and fd.auditState = #{state} |
|
|
@ -173,6 +173,17 @@ |
|
|
|
group by concat(customerName, customerPhone) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="fetchByAuditState1_1_1" |
|
|
|
resultType="com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailedVo"> |
|
|
|
select *, sum(subscriptionMoney) as sumAll |
|
|
|
from fin_selected_receivables_detailed |
|
|
|
where collSid = #{sid} |
|
|
|
and auditState = #{state} |
|
|
|
and receivablesName = #{type} |
|
|
|
and payTypeKey = #{payTypeKey} |
|
|
|
group by contractNo |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="fetchByAuditState1_1" |
|
|
|
resultType="com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailedVo"> |
|
|
|
select * |
|
|
@ -213,6 +224,28 @@ |
|
|
|
and length(VIN) > 0 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectVinListVo_1" |
|
|
|
resultType="com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailedVo"> |
|
|
|
select * |
|
|
|
from fin_selected_receivables_detailed |
|
|
|
where collSid = #{sid} |
|
|
|
and auditState = #{state} |
|
|
|
and receivablesName = #{type} |
|
|
|
and contractNo = #{contractNo} |
|
|
|
and length(VIN) > 0 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="fetchByAuditStateV_1" |
|
|
|
resultType="com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailedVo"> |
|
|
|
select *, sum(subscriptionMoney) as sumAll |
|
|
|
from fin_selected_receivables_detailed |
|
|
|
where collSid = #{sid} |
|
|
|
and auditState = #{state} |
|
|
|
and receivablesName = #{type} |
|
|
|
and contractNo = #{contractNo} |
|
|
|
and length(VIN) = 0 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="fetchByAuditStateV" |
|
|
|
resultType="com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailedVo"> |
|
|
|
select *, sum(subscriptionMoney) as sumAll |
|
|
@ -226,8 +259,10 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectByVinSid" resultType="java.lang.String"> |
|
|
|
select sum(fd.subscriptionMoney) from fin_selected_receivables_detailed fd |
|
|
|
left join fin_uncollected_receivables_detailed ff on ff.sid = fd.receivablesSid |
|
|
|
where ff.busVinSid = #{busVinSid} and fd.auditState = 3 |
|
|
|
select sum(fd.subscriptionMoney) |
|
|
|
from fin_selected_receivables_detailed fd |
|
|
|
left join fin_uncollected_receivables_detailed ff on ff.sid = fd.receivablesSid |
|
|
|
where ff.busVinSid = #{busVinSid} |
|
|
|
and fd.auditState = 3 |
|
|
|
</select> |
|
|
|
</mapper> |