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

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

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
2e657cb9ae
5 измененных файлов: 34 добавлений и 22 удалений
  1. +5
    -3
      mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/enums/EnumBillType.java
  3. +14
    -13
      mallinkService/src/main/java/com/iformall/enums/EnumBillTypeStr.java
  4. +7
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java
  5. +7
    -0
      mallinkService/src/main/resources/mapper/WxBillAllMapper.xml

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

@@ -1,5 +1,7 @@
package com.iformall.domain.vo; package com.iformall.domain.vo;


import io.swagger.models.auth.In;

import java.util.List; import java.util.List;


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


private List<String> billTypeList;
private List<Integer> billTypeList;


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


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




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

@@ -13,7 +13,7 @@ public enum EnumBillType {
WATER(4, "水费"), WATER(4, "水费"),
POWER(5, "电费"), POWER(5, "电费"),
ROUTINE(6, "其他"), ROUTINE(6, "其他"),
AIR_CONDITIONING(7, "空调费"),
AIR_CONDITIONING(7, "空调费")
; ;


public static EnumBillType getEnum(Integer code) { public static EnumBillType getEnum(Integer code) {


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

@@ -1,22 +1,23 @@
package com.iformall.enums; package com.iformall.enums;



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


RENT("租金", "租金"),
RENT_D("租赁押金", "租赁押金"),
PROPERTY("物业费","物业费"),
PROPERTY_D("物业押金", "物业押金"),
W("水费", "水费"),
D("电费", "电费"),
K("空调费", "空调费"),
O("其他", "其他"),
O_D("其他押金", "其他押金"),
RENT(1, "租金"),
RENT_D(2, "租赁押金"),
PROPERTY(3,"物业费"),
PROPERTY_D(4, "物业押金"),
W(5, "水费"),
D(6, "电费"),
K(9, "空调费"),
O(7, "其他"),
O_D(8, "其他押金"),
; ;


public static EnumBillTypeStr getEnum(String code) {
public static EnumBillTypeStr getEnum(Integer code) {
for (EnumBillTypeStr value : values()) { for (EnumBillTypeStr value : values()) {
if (value.getCode().equals(code)) { if (value.getCode().equals(code)) {
return value; return value;
@@ -25,15 +26,15 @@ public enum EnumBillTypeStr {
return null; return null;
} }


private String code;
private Integer code;
private String message; private String message;


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


public String getCode() {
public Integer getCode() {
return code; return code;
} }




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

@@ -2404,12 +2404,13 @@ public class WxChartServiceImpl implements WxChartDataService {
WxBillAll wxBillAll = new WxBillAll(); WxBillAll wxBillAll = new WxBillAll();
wxBillAll.setTenantId(tenantId); wxBillAll.setTenantId(tenantId);
wxBillAll.setMonth(new SimpleDateFormat("yyyy-MM").format(startDate)); wxBillAll.setMonth(new SimpleDateFormat("yyyy-MM").format(startDate));
List<String> billTypeList = new ArrayList<>();
wxBillAll.setStatus(EnumBillRentStatus.NOT_PAID.getCode());
List<Integer> billTypeList = new ArrayList<>();
billTypeList.add(EnumBillTypeStr.RENT.getCode()); billTypeList.add(EnumBillTypeStr.RENT.getCode());
wxBillAll.setBillTypeList(billTypeList); wxBillAll.setBillTypeList(billTypeList);
payinfo = wxBillAllMapper.queryOweInfo(wxBillAll); payinfo = wxBillAllMapper.queryOweInfo(wxBillAll);
if (payinfo != null) { if (payinfo != null) {
BigDecimal owe = (BigDecimal) payinfo.get("owe");
BigDecimal owe = ((BigDecimal) payinfo.get("owe")).divide(new BigDecimal(100));
totalOwe = totalOwe.add(owe); totalOwe = totalOwe.add(owe);
datamap.put("rentOwe", owe); datamap.put("rentOwe", owe);
} else { } else {
@@ -2421,7 +2422,7 @@ public class WxChartServiceImpl implements WxChartDataService {
wxBillAll.setBillTypeList(billTypeList); wxBillAll.setBillTypeList(billTypeList);
payinfo = wxBillAllMapper.queryOweInfo(wxBillAll); payinfo = wxBillAllMapper.queryOweInfo(wxBillAll);
if (payinfo != null) { if (payinfo != null) {
BigDecimal owe = (BigDecimal) payinfo.get("owe");
BigDecimal owe = ((BigDecimal) payinfo.get("owe")).divide(new BigDecimal(100));
totalOwe = totalOwe.add(owe); totalOwe = totalOwe.add(owe);
datamap.put("propertyOwe", owe); datamap.put("propertyOwe", owe);
} else { } else {
@@ -2435,7 +2436,7 @@ public class WxChartServiceImpl implements WxChartDataService {
wxBillAll.setBillTypeList(billTypeList); wxBillAll.setBillTypeList(billTypeList);
payinfo = wxBillAllMapper.queryOweInfo(wxBillAll); payinfo = wxBillAllMapper.queryOweInfo(wxBillAll);
if (payinfo != null) { if (payinfo != null) {
BigDecimal owe = (BigDecimal) payinfo.get("owe");
BigDecimal owe = ((BigDecimal) payinfo.get("owe")).divide(new BigDecimal(100));
totalOwe = totalOwe.add(owe); totalOwe = totalOwe.add(owe);
datamap.put("depositOwe", owe); datamap.put("depositOwe", owe);
} else { } else {
@@ -2447,9 +2448,10 @@ public class WxChartServiceImpl implements WxChartDataService {
billTypeList.add(EnumBillTypeStr.W.getCode()); billTypeList.add(EnumBillTypeStr.W.getCode());
billTypeList.add(EnumBillTypeStr.K.getCode()); billTypeList.add(EnumBillTypeStr.K.getCode());
billTypeList.add(EnumBillTypeStr.O.getCode()); billTypeList.add(EnumBillTypeStr.O.getCode());
wxBillAll.setBillTypeList(billTypeList);
payinfo = wxBillAllMapper.queryOweInfo(wxBillAll); payinfo = wxBillAllMapper.queryOweInfo(wxBillAll);
if (payinfo != null) { if (payinfo != null) {
BigDecimal owe = (BigDecimal) payinfo.get("owe");
BigDecimal owe = ((BigDecimal) payinfo.get("owe")).divide(new BigDecimal(100));
totalOwe = totalOwe.add(owe); totalOwe = totalOwe.add(owe);
datamap.put("otherOwe", owe); datamap.put("otherOwe", owe);
} else { } else {


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

@@ -153,6 +153,13 @@
<if test=" null != rentShopType "> <if test=" null != rentShopType ">
and bill.rent_shop_type = #{rentShopType} and bill.rent_shop_type = #{rentShopType}
</if> </if>
<if test=" null != billTypeList ">
and bill.bill_type_value in
<foreach collection="billTypeList" index="index" item="type" open="(" separator="," close=")">
#{type}
</foreach>
</if>

</select> </select>
<select id="queryPaidInfo" parameterType="com.iformall.domain.vo.WxBillAll" resultType="hashmap"> <select id="queryPaidInfo" parameterType="com.iformall.domain.vo.WxBillAll" resultType="hashmap">


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