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

[首页统计][修改][修改统计]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
8b31fc4a85
7 измененных файлов: 97 добавлений и 18 удалений
  1. +9
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java
  2. +43
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumBillTypeStr.java
  3. +31
    -10
      mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java
  4. +4
    -4
      mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml
  5. +8
    -2
      mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml
  6. +1
    -1
      mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
  7. +1
    -1
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml

+ 9
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java Просмотреть файл

@@ -65,6 +65,15 @@ public class WxBillAll {
@io.swagger.annotations.ApiModelProperty(value = "欠缴总额", name = "totalOwe")
private Integer totalOwe;

private List<String> billTypeList;

public List<String> getBillTypeList() {
return billTypeList;
}

public void setBillTypeList(List<String> billTypeList) {
this.billTypeList = billTypeList;
}

public Integer getRentOwe() {
return rentOwe;


+ 43
- 0
mallinkService/src/main/java/com/iformall/enums/EnumBillTypeStr.java Просмотреть файл

@@ -0,0 +1,43 @@
package com.iformall.enums;

/**
* Created by Stormeye on 2018/08/09.
*/
public enum EnumBillTypeStr {

RENT("租金", "租金"),
RENT_D("租赁押金", "租赁押金"),
PROPERTY("物业费","物业费"),
PROPERTY_D("物业押金", "物业押金"),
W("水费", "水费"),
D("电费", "电费"),
K("空调费", "空调费"),
O("其他", "其他"),
O_D("其他押金", "其他押金"),
;

public static EnumBillTypeStr getEnum(String code) {
for (EnumBillTypeStr value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

private String code;
private String message;

EnumBillTypeStr(String String, String message) {
this.code = code;
this.message = message;
}

public String getCode() {
return code;
}

public String getMessage() {
return message;
}
}

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

@@ -71,6 +71,8 @@ public class WxChartServiceImpl implements WxChartDataService {
@Autowired
WxBillOtherMapper wxBillOtherMapper;
@Autowired
WxBillAllMapper wxBillAllMapper;
@Autowired
MarkingDataReportService markingDataReportService;

@Override
@@ -2397,9 +2399,15 @@ public class WxChartServiceImpl implements WxChartDataService {
datamap.put("otherzjsjl", 0);
}

//欠缴数据
//==========欠缴数据=========
BigDecimal totalOwe = new BigDecimal(0);
payinfo = wxBillRentMapper.queryOweInfo(params);
WxBillAll wxBillAll = new WxBillAll();
wxBillAll.setTenantId(tenantId);
wxBillAll.setMonth(new SimpleDateFormat("yyyy-MM").format(startDate));
List<String> billTypeList = new ArrayList<>();
billTypeList.add(EnumBillTypeStr.RENT.getCode());
wxBillAll.setBillTypeList(billTypeList);
payinfo = wxBillAllMapper.queryOweInfo(wxBillAll);
if (payinfo != null) {
BigDecimal owe = (BigDecimal) payinfo.get("owe");
totalOwe = totalOwe.add(owe);
@@ -2408,7 +2416,10 @@ public class WxChartServiceImpl implements WxChartDataService {
datamap.put("rentOwe", 0);
}

payinfo = wxBillPropertyMapper.queryOweInfo(params);
billTypeList = new ArrayList<>();
billTypeList.add(EnumBillTypeStr.PROPERTY.getCode());
wxBillAll.setBillTypeList(billTypeList);
payinfo = wxBillAllMapper.queryOweInfo(wxBillAll);
if (payinfo != null) {
BigDecimal owe = (BigDecimal) payinfo.get("owe");
totalOwe = totalOwe.add(owe);
@@ -2417,25 +2428,35 @@ public class WxChartServiceImpl implements WxChartDataService {
datamap.put("propertyOwe", 0);
}

payinfo = wxBillOtherMapper.queryOweInfo(params);
billTypeList = new ArrayList<>();
billTypeList.add(EnumBillTypeStr.O_D.getCode());
billTypeList.add(EnumBillTypeStr.PROPERTY_D.getCode());
billTypeList.add(EnumBillTypeStr.RENT_D.getCode());
wxBillAll.setBillTypeList(billTypeList);
payinfo = wxBillAllMapper.queryOweInfo(wxBillAll);
if (payinfo != null) {
BigDecimal owe = (BigDecimal) payinfo.get("owe");
totalOwe = totalOwe.add(owe);
datamap.put("otherOwe", owe);
datamap.put("depositOwe", owe);
} else {
datamap.put("otherOwe", 0);
datamap.put("depositOwe", 0);
}

payinfo = wxBillDepositMapper.queryOweInfoAll(params);
billTypeList = new ArrayList<>();
billTypeList.add(EnumBillTypeStr.D.getCode());
billTypeList.add(EnumBillTypeStr.W.getCode());
billTypeList.add(EnumBillTypeStr.K.getCode());
billTypeList.add(EnumBillTypeStr.O.getCode());
payinfo = wxBillAllMapper.queryOweInfo(wxBillAll);
if (payinfo != null) {
BigDecimal owe = (BigDecimal) payinfo.get("owe");
totalOwe = totalOwe.add(owe);
datamap.put("totalOwe", owe);
datamap.put("otherOwe", owe);
} else {
datamap.put("totalOwe", 0);
datamap.put("otherOwe", 0);
}
datamap.put("totalOwe", totalOwe);

datamap.put("totalOwe", totalOwe);
return new ResultData(datamap);
}



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

@@ -98,7 +98,7 @@
</select>

<select id="queryPayInfoAllTotal" resultType="hashmap" parameterType="hashmap">
select sum(res.receivepay) receivepay,sum(res.pay) pay,res.tenant_id from
select round(sum(res.receivepay)/100,2),round(sum(res.pay)/100,2) pay,res.tenant_id from
(
select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_rent_deposit
where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate}
@@ -115,13 +115,13 @@
select IFNULL(round(sum(res.owe)/100,2),0) owe,res.tenant_id from
(
select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_rent_deposit
where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate}
where status = 1 and tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate}
union all
select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_property_deposit
where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate}
where status = 1 and tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate}
union all
select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_other_deposit
where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate}
where status = 1 and tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate}
) res
</select>



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

@@ -111,8 +111,14 @@


<select id="queryOweInfo" resultType="hashmap" parameterType="hashmap">
select IFNULL(round(sum(owe)/100,2),0) owe,tenant_id from wx_bill_other
where status = 1 and tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate}
select IFNULL(round(sum(res.owe)/100,2),0) owe,res.tenant_id from
(
select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_daily
where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and status = 1
union all
select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_daily
where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and status = 1
) res
</select>

</mapper>


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

@@ -122,7 +122,7 @@


<select id="queryPayInfoTotal" resultType="hashmap" parameterType="hashmap">
select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_property
select round(sum(receive_pay)/100,2) receivepay,round(sum(pay)/100,2) pay,tenant_id from wx_bill_property
where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and is_preview = 0
</select>



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

@@ -125,7 +125,7 @@
</select>

<select id="queryPayInfoTotal" resultType="hashmap" parameterType="hashmap">
select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_rent
select round(sum(receive_pay)/100,2) receivepay,round(sum(pay)/100,2) pay,tenant_id from wx_bill_rent
where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and is_preview = 0
</select>



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