md
This commit is contained in:
parent
62c2204de3
commit
9fe8760a09
@ -14,6 +14,7 @@ import com.xdadan.erp.emis.service.EmisBaseService;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.xdadan.erp.emis.service.IEmisTmsSiteBatchMissService;
|
import com.xdadan.erp.emis.service.IEmisTmsSiteBatchMissService;
|
||||||
|
|
||||||
@ -119,6 +120,7 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
|
|||||||
return emisTmsSiteBatchMissMapper.deleteEmisTmsSiteBatchMissById(id);
|
return emisTmsSiteBatchMissMapper.deleteEmisTmsSiteBatchMissById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Async
|
||||||
@Override
|
@Override
|
||||||
public void autoScanSiteBatch() {
|
public void autoScanSiteBatch() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -111,6 +111,18 @@
|
|||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 按月统计-->
|
||||||
|
<select id="queryBillPayMonthList" parameterType="EmisSettleBill" resultType="map">
|
||||||
|
SELECT
|
||||||
|
bill_month as billMonth,
|
||||||
|
round(sum(rec_money),2) as recMoney,
|
||||||
|
round(sum(reced_money),2) as recedMoney,
|
||||||
|
(round(sum(rec_money),2)-round(sum(reced_money),2) ) as noRecedMoney
|
||||||
|
FROM emis_settle_bill
|
||||||
|
WHERE del_flag = '0'
|
||||||
|
GROUP BY bill_month
|
||||||
|
ORDER BY bill_month
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 收款统计-PMS需求:379-->
|
<!-- 收款统计-PMS需求:379-->
|
||||||
<select id="queryPayBackStatList" parameterType="EmisSettleBill" resultType="map">
|
<select id="queryPayBackStatList" parameterType="EmisSettleBill" resultType="map">
|
||||||
@ -187,6 +199,13 @@
|
|||||||
and espr.trade_date <![CDATA[ >= ]]> #{params.beginTradeDate}
|
and espr.trade_date <![CDATA[ >= ]]> #{params.beginTradeDate}
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.endTradeDate != null and params.endTradeDate != ''">
|
||||||
|
and exists (
|
||||||
|
select 1 from emis_settle_pay_record espr,emis_settle_pay_bill_rel espbr
|
||||||
|
where espr.del_flag='0' and espbr.del_flag='0' and a.settle_bill_no=espr.settle_bill_no and espr.pay_id = espbr.pay_id
|
||||||
|
and espr.trade_date <![CDATA[ <= ]]> #{params.endTradeDate}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
<if test="params.payCreateBy != null and params.payCreateBy != ''">
|
<if test="params.payCreateBy != null and params.payCreateBy != ''">
|
||||||
and exists (
|
and exists (
|
||||||
select 1 from emis_settle_pay_record espr,emis_settle_pay_bill_rel espbr
|
select 1 from emis_settle_pay_record espr,emis_settle_pay_bill_rel espbr
|
||||||
@ -194,13 +213,7 @@
|
|||||||
and espr.create_by = #{params.payCreateBy}
|
and espr.create_by = #{params.payCreateBy}
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="params.endTradeDate != null and params.endTradeDate != ''">
|
|
||||||
and exists (
|
|
||||||
select 1 from emis_settle_pay_record espr,emis_settle_pay_bill_rel espbr
|
|
||||||
where espr.del_flag='0' and espbr.del_flag='0' and a.settle_bill_no=espr.settle_bill_no and espr.pay_id = espbr.pay_id
|
|
||||||
and espr.trade_date <![CDATA[ <= ]]> #{params.endTradeDate}
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||||
and (
|
and (
|
||||||
a.salesmen=#{params.privEmpName}
|
a.salesmen=#{params.privEmpName}
|
||||||
@ -215,6 +228,7 @@
|
|||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT
|
SELECT
|
||||||
a.settle_bill_no,
|
a.settle_bill_no,
|
||||||
|
sum( b.pay_money) AS totalPayMoney,
|
||||||
sum( if( b.trade_date <![CDATA[ <= ]]> a.payment_due_date,b.pay_money,0) ) AS recdMoneyIn,
|
sum( if( b.trade_date <![CDATA[ <= ]]> a.payment_due_date,b.pay_money,0) ) AS recdMoneyIn,
|
||||||
sum( if(b.trade_date <![CDATA[ > ]]> a.payment_due_date and b.trade_date <![CDATA[ <= ]]> DATE_SUB( a.payment_due_date, INTERVAL - 30 DAY ),b.pay_money,0) ) AS recdPayMoney60D,
|
sum( if(b.trade_date <![CDATA[ > ]]> a.payment_due_date and b.trade_date <![CDATA[ <= ]]> DATE_SUB( a.payment_due_date, INTERVAL - 30 DAY ),b.pay_money,0) ) AS recdPayMoney60D,
|
||||||
sum( if(b.trade_date <![CDATA[ > ]]> DATE_SUB( a.payment_due_date, INTERVAL - 30 DAY ),b.pay_money,0) ) AS recdPayMoneyGreat60D
|
sum( if(b.trade_date <![CDATA[ > ]]> DATE_SUB( a.payment_due_date, INTERVAL - 30 DAY ),b.pay_money,0) ) AS recdPayMoneyGreat60D
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user