diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java
index e4bc84f64..0ae1743cd 100644
--- a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java
+++ b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java
@@ -2399,7 +2399,7 @@ public class WxChartServiceImpl implements WxChartDataService {
}
} else {
datamap.put("otherysje", 0);
- datamap.put("otheryssje", 0);
+ datamap.put("otherssje", 0);
datamap.put("otherzjsjl", 0);
}
@@ -2408,7 +2408,7 @@ public class WxChartServiceImpl implements WxChartDataService {
payinfo = wxBillRentMapper.queryOweInfo(params);
if (payinfo != null) {
BigDecimal owe = (BigDecimal) payinfo.get("owe");
- totalOwe.add(owe);
+ totalOwe = totalOwe.add(owe);
datamap.put("rentOwe", owe);
} else {
datamap.put("rentOwe", 0);
@@ -2417,7 +2417,7 @@ public class WxChartServiceImpl implements WxChartDataService {
payinfo = wxBillPropertyMapper.queryOweInfo(params);
if (payinfo != null) {
BigDecimal owe = (BigDecimal) payinfo.get("owe");
- totalOwe.add(owe);
+ totalOwe = totalOwe.add(owe);
datamap.put("propertyOwe", owe);
} else {
datamap.put("propertyOwe", 0);
@@ -2426,7 +2426,7 @@ public class WxChartServiceImpl implements WxChartDataService {
payinfo = wxBillOtherMapper.queryOweInfo(params);
if (payinfo != null) {
BigDecimal owe = (BigDecimal) payinfo.get("owe");
- totalOwe.add(owe);
+ totalOwe = totalOwe.add(owe);
datamap.put("otherOwe", owe);
} else {
datamap.put("otherOwe", 0);
@@ -2435,10 +2435,10 @@ public class WxChartServiceImpl implements WxChartDataService {
payinfo = wxBillDepositMapper.queryOweInfoAll(params);
if (payinfo != null) {
BigDecimal owe = (BigDecimal) payinfo.get("owe");
- totalOwe.add(owe);
- datamap.put("depositOwe", owe);
+ totalOwe = totalOwe.add(owe);
+ datamap.put("totalOwe", owe);
} else {
- datamap.put("depositOwe", 0);
+ datamap.put("totalOwe", 0);
}
datamap.put("totalOwe", totalOwe);
@@ -2504,3 +2504,4 @@ public class WxChartServiceImpl implements WxChartDataService {
}
}
+
diff --git a/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml b/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml
index e89f25808..74e79294e 100644
--- a/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml
@@ -22,9 +22,9 @@
-
+
-
+
`id`,`rent_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,
`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,
@@ -32,42 +32,42 @@
- where 1 = 1
- and `id` = #{id}
- and `rent_contract_id` = #{rentContractId}
- and `receive_pay` = #{receivePay}
- and `pay` = #{pay}
- and `receive_date` = #{receiveDate}
- and `pay_date` = #{payDate}
- and `createtime` = #{createtime}
- and `expired_day` = #{expiredDay}
- and `tenant_id` = #{tenantId}
- and `owe` = #{owe}
- and `status` = #{status}
- and `is_del` = #{isDel}
- and `need_pay` = #{needPay}
- and `merchant_id` = #{merchantId}
- and `user_id` = #{userId}
+ where 1 = 1
+ and `id` = #{id}
+ and `rent_contract_id` = #{rentContractId}
+ and `receive_pay` = #{receivePay}
+ and `pay` = #{pay}
+ and `receive_date` = #{receiveDate}
+ and `pay_date` = #{payDate}
+ and `createtime` = #{createtime}
+ and `expired_day` = #{expiredDay}
+ and `tenant_id` = #{tenantId}
+ and `owe` = #{owe}
+ and `status` = #{status}
+ and `is_del` = #{isDel}
+ and `need_pay` = #{needPay}
+ and `merchant_id` = #{merchantId}
+ and `user_id` = #{userId}
and `shop_id` = #{shopId}
and `updatetime` = #{updatetime}
and `rent_shop_type` = #{rentShopType}
and `pay_way` = #{payWay}
-
+
- and id in
+ and id in
- #{idItem}
+ #{idItem}
-
+
order by ${sortColumns}
-
+
-
-
+
+
-
+
update wx_bill_rent_deposit set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date)
where tenant_id=#{tenantId} and status!=#{paid} and status!=5 and DATEDIFF(now(),receive_date)>0
-
+
- 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
+ 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 br.status!=5 and now() < br.receive_date
and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a)
@@ -144,5 +142,6 @@
select count(*) c from wx_rent_contract r,wx_bill_rent_deposit b
where b.rent_contract_id = r.id and b.status = 1 and r.id = #{id}
-
+
+
diff --git a/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml b/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml
index 5b3e22327..10acfc640 100644
--- a/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml
@@ -21,9 +21,9 @@
-
+
-
+
`id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,
`tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`name`,`comments`,
@@ -31,40 +31,40 @@
- where 1 = 1
- and `id` = #{id}
- and `receive_pay` = #{receivePay}
- and `pay` = #{pay}
- and `receive_date` = #{receiveDate}
- and `pay_date` = #{payDate}
- and `createtime` = #{createtime}
- and `expired_day` = #{expiredDay}
- and `tenant_id` = #{tenantId}
- and `owe` = #{owe}
- and `status` = #{status}
- and `is_del` = #{isDel}
- and `merchant_id` = #{merchantId}
- and `user_id` = #{userId}
- and `shop_id` = #{shopId}
+ where 1 = 1
+ and `id` = #{id}
+ and `receive_pay` = #{receivePay}
+ and `pay` = #{pay}
+ and `receive_date` = #{receiveDate}
+ and `pay_date` = #{payDate}
+ and `createtime` = #{createtime}
+ and `expired_day` = #{expiredDay}
+ and `tenant_id` = #{tenantId}
+ and `owe` = #{owe}
+ and `status` = #{status}
+ and `is_del` = #{isDel}
+ and `merchant_id` = #{merchantId}
+ and `user_id` = #{userId}
+ and `shop_id` = #{shopId}
and `updatetime` = #{updatetime}
and `name` = #{name}
and `rent_shop_type` = #{rentShopType}
and `pay_way` = #{payWay}
-
+
- and id in
+ and id in
- #{idItem}
+ #{idItem}
-
+
order by ${sortColumns}
-
+
-
+
-
+
update wx_bill_other set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date)
where tenant_id=#{tenantId} and status!=#{paid} and DATEDIFF(now(),receive_date)>0
-
+
update wx_bill_other set status=#{waitPay} where tenant_id=#{tenantId}
and status!=#{paid} and DATEDIFF(now(),receive_date) <=0
@@ -99,23 +99,21 @@
-
+
+
diff --git a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
index cdc4932fa..ea8656d46 100644
--- a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
@@ -30,9 +30,9 @@
-
+
-
+
`id`,`property_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,
`createtime`,`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`,
@@ -43,21 +43,21 @@
where 1=1
- and `id` = #{id}
+ and `id` = #{id}
and `property_contract_id` = #{propertyContractId}
- and `receive_pay` = #{receivePay}
- and `pay` = #{pay}
- and `receive_date` = #{receiveDate}
- and `pay_date` = #{payDate}
- and `createtime` = #{createtime}
- and `expired_day` = #{expiredDay}
- and `tenant_id` = #{tenantId}
- and `owe` = #{owe}
- and `status` = #{status}
- and `is_del` = #{isDel}
- and `need_pay` = #{needPay}
- and `merchant_id` = #{merchantId}
- and `user_id` = #{userId}
+ and `receive_pay` = #{receivePay}
+ and `pay` = #{pay}
+ and `receive_date` = #{receiveDate}
+ and `pay_date` = #{payDate}
+ and `createtime` = #{createtime}
+ and `expired_day` = #{expiredDay}
+ and `tenant_id` = #{tenantId}
+ and `owe` = #{owe}
+ and `status` = #{status}
+ and `is_del` = #{isDel}
+ and `need_pay` = #{needPay}
+ and `merchant_id` = #{merchantId}
+ and `user_id` = #{userId}
and `shop_id` = #{shopId}
and `updatetime` = #{updatetime}
and `rent_shop_type` = #{rentShopType}
@@ -67,19 +67,19 @@
and `late_pay_status` = #{latePayStatus}
- and id in
+ and id in
- #{idItem}
+ #{idItem}
-
+
order by ${sortColumns}
-
+
-
+
-
+
+
diff --git a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml
index 6eef85903..97cc826bb 100644
--- a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml
@@ -30,9 +30,9 @@
-
+
-
+
`id`,`rent_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,
`createtime`,`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`,
@@ -40,7 +40,7 @@
`revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info`,
`pay_way`,`late_pay_status`,`comments`
-
+
where 1=1
and `id` = #{id}
@@ -74,15 +74,15 @@
order by ${sortColumns}
-
+
select
from wx_bill_rent
-
-
+
+
select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate,
br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`,
@@ -113,11 +113,11 @@
and br.`rent_contract_id` = #{rentContractId}
and br.`pay_way` = #{payWay}
and br.`late_pay_status` = #{latePayStatus}
-
+
order by br.${sortColumns}
-
+
select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_rent
where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and is_preview = 0
@@ -131,19 +131,18 @@
- select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_rent
+ select IFNULL(round(sum(owe)/100,2),0) owe,tenant_id from wx_bill_rent
where status = 1 and tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and is_preview = 0
- group by tenant_id
-
+
update wx_bill_rent set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date)
where tenant_id=#{tenantId} and status!=#{paid} and status!=6 and DATEDIFF(now(),receive_date)>0
- update wx_bill_rent 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 br
+ update wx_bill_rent 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 br
left join wx_rent_contract rc on br.rent_contract_id=rc.id
where br.tenant_id=#{tenantId} and br.status!=#{paid} and br.status!=6 and now() < br.receive_date
and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a)
@@ -179,3 +178,4 @@
+