Просмотр исходного кода

[账单][修改][查询]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
e55cd16aa3
4 измененных файлов: 35 добавлений и 5 удалений
  1. +9
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  2. +24
    -2
      mallinkService/src/main/resources/mapper/WxBillAllMapper.xml
  3. +1
    -1
      mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml
  4. +1
    -1
      mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml

+ 9
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java Просмотреть файл

@@ -57,6 +57,9 @@ public class WxBillAllServiceImpl implements WxBillAllService {
@Autowired
WxBillOtherService wxBillOtherService;

@Autowired
WxBillOtherDepositService wxBillOtherDepositService;

@Autowired
WxBillDailyMapper wxBillDailyMapper;

@@ -75,6 +78,8 @@ public class WxBillAllServiceImpl implements WxBillAllService {
@Autowired
WxBillOtherMapper wxBillOtherMapper;

@Autowired
WxBillOtherDepositMapper wxBillOtherDepositMapper;

@Override
public Map<String, Object> listAsPage(WxBillAll record, Integer pageIndex, Integer pageSize) {
@@ -462,8 +467,11 @@ public class WxBillAllServiceImpl implements WxBillAllService {

private void updateBillStatus(WxBillAll record) {
logger.info("更新各账单状态开始");
//更新其他押金账单
WxBillOtherDeposit wxBillOtherDeposit = new WxBillOtherDeposit();
wxBillOtherDeposit.setTenantId(record.getTenantId());
wxBillOtherDepositService.updateBillStatus(wxBillOtherDeposit);
//更新其他账单
//
WxBillOther wxBillOther = new WxBillOther();
wxBillOther.setTenantId(record.getTenantId());
wxBillOtherService.updateBillStatus(wxBillOther);


+ 24
- 2
mallinkService/src/main/resources/mapper/WxBillAllMapper.xml Просмотреть файл

@@ -35,6 +35,10 @@
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other
union
select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other_deposit
) bill
left join wx_merchant m on bill.merchant_id=m.id
left join wx_shop s on bill.shop_id=s.id
@@ -81,6 +85,9 @@
union
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other
union
select id,merchant_id,shop_id,tenant_id,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other_deposit
) bill
where bill.tenant_id=#{tenantId} and bill.status=#{status}
<if test=" null != starttime and null!= endtime ">
@@ -122,6 +129,9 @@
union
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other
union
select id,merchant_id,shop_id,tenant_id,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other_deposit
) bill
where bill.tenant_id=#{tenantId} and bill.status=#{status}
<if test=" null != starttime and null!= endtime ">
@@ -169,6 +179,10 @@
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other
union
select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other_deposit
) bill
left join wx_merchant m on bill.merchant_id=m.id
left join wx_shop s on bill.shop_id=s.id
@@ -244,8 +258,12 @@ select bill.tenant_id,bill.merchant_id,bill.receive_date,ifnull(sum(need_pay),0)
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other
union
select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other_deposit
) bill
where DATEDIFF(bill.receive_date,now())=3 and bill.status!=3
where DATEDIFF(bill.receive_date,now())=3 and bill.status!=3 and bill.status!=5
group by bill.tenant_id,bill.merchant_id,bill.receive_date) bill
left join wx_merchant m on bill.merchant_id=m.id
left join (select tenant_id,`name` appname from wx_appinfo app where type=1) app on bill.tenant_id=app.tenant_id
@@ -283,8 +301,12 @@ select bill.tenant_id,bill.merchant_id,bill.receive_date,ifnull(sum(need_pay),0)
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other
union
select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other_deposit
) bill
where DATEDIFF(bill.receive_date,now())&lt;0 and bill.status!=3
where DATEDIFF(bill.receive_date,now())&lt;0 and bill.status!=3 and bill.status!=5
group by bill.tenant_id,bill.merchant_id) bill
left join wx_merchant m on bill.merchant_id=m.id
left join (select tenant_id,`name` appname from wx_appinfo app where type=1) app on bill.tenant_id=app.tenant_id


+ 1
- 1
mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml Просмотреть файл

@@ -102,7 +102,7 @@
update wx_bill_rent_deposit set status=#{waitPay} where id in(
select a.id from (select br.id,rc.receive_period,br.rent_contract_id,br.receive_date from wx_bill_rent_deposit br
left join wx_rent_contract rc on br.rent_contract_id=rc.id
where br.tenant_id=#{tenantId} and br.status!=#{paid} and status!=5 and now() &lt; br.receive_date
where br.tenant_id=#{tenantId} and br.status!=#{paid} and br.status!=5 and now() &lt; br.receive_date
and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a)
</update>



+ 1
- 1
mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml Просмотреть файл

@@ -100,7 +100,7 @@
update wx_bill_property_deposit set status=#{waitPay} where id in(
select a.id from (select br.id,rc.receive_period,br.property_contract_id,br.receive_date from wx_bill_property_deposit br
left join wx_property_contract rc on br.property_contract_id=rc.id
where br.tenant_id=#{tenantId} and br.status!=#{paid} and status!=5 and now() &lt; br.receive_date
where br.tenant_id=#{tenantId} and br.status!=#{paid} and br.status!=5 and now() &lt; br.receive_date
and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a)
</update>



Загрузка…
Отмена
Сохранить