Browse Source

[日常费用账单][修改][添加空调费]

release_toaliyun_real
gongbiao 7 years ago
parent
commit
26dae20f4b
8 changed files with 64 additions and 6 deletions
  1. +2
    -0
      mallinkAdmin/src/main/resources/db/migration/V201904191340__UPDATE_BILL_DAILY.sql
  2. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java
  3. +1
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumBillDailyType.java
  4. +2
    -1
      mallinkService/src/main/java/com/iformall/enums/EnumBillType.java
  5. +2
    -1
      mallinkService/src/main/java/com/iformall/enums/EnumBillTypeParam.java
  6. +10
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  7. +33
    -0
      mallinkService/src/main/resources/mapper/WxBillAllMapper.xml
  8. +3
    -2
      mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml

+ 2
- 0
mallinkAdmin/src/main/resources/db/migration/V201904191340__UPDATE_BILL_DAILY.sql View File

@@ -0,0 +1,2 @@
alter table wx_bill_daily
add column `price_detail` json default null COMMENT '费用明细';

+ 11
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java View File

@@ -111,6 +111,17 @@ public class WxBillDaily implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay")
private Integer payWay; private Integer payWay;


@io.swagger.annotations.ApiModelProperty(value = "费用明细", name = "priceDetail")
private String priceDetail;

public String getPriceDetail() {
return priceDetail;
}

public void setPriceDetail(String priceDetail) {
this.priceDetail = priceDetail;
}

public Integer getPayWay() { public Integer getPayWay() {
return payWay; return payWay;
} }


+ 1
- 0
mallinkService/src/main/java/com/iformall/enums/EnumBillDailyType.java View File

@@ -9,6 +9,7 @@ public enum EnumBillDailyType {


WATER(1,"水费"), WATER(1,"水费"),
POWER(2,"电费"), POWER(2,"电费"),
AIR_CONDITIONING(3, "空调费"),
; ;


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


+ 2
- 1
mallinkService/src/main/java/com/iformall/enums/EnumBillType.java View File

@@ -12,7 +12,8 @@ public enum EnumBillType {
PROPERTY(3,"物业"), PROPERTY(3,"物业"),
WATER(4, "水费"), WATER(4, "水费"),
POWER(5, "电费"), POWER(5, "电费"),
ROUTINE(6,"其他")
ROUTINE(6, "其他"),
AIR_CONDITIONING(7, "空调费"),
; ;


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


+ 2
- 1
mallinkService/src/main/java/com/iformall/enums/EnumBillTypeParam.java View File

@@ -14,7 +14,8 @@ public enum EnumBillTypeParam {
WATER(5, "水费"), WATER(5, "水费"),
POWER(6, "电费"), POWER(6, "电费"),
ROUTINE(7, "其他费用"), ROUTINE(7, "其他费用"),
ATHER_DEPOSIT(8, "其他押金")
ATHER_DEPOSIT(8, "其他押金"),
AIR_CONDITIONING(9, "空调费")
; ;


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


+ 10
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java View File

@@ -140,6 +140,8 @@ public class WxBillAllServiceImpl implements WxBillAllService {
wxBillAll.setBillTypeValue(EnumBillTypeParam.POWER.getCode()); wxBillAll.setBillTypeValue(EnumBillTypeParam.POWER.getCode());
} else if (wxBillAll.getBillTypeValue().equals(EnumBillType.ROUTINE.getCode())) { } else if (wxBillAll.getBillTypeValue().equals(EnumBillType.ROUTINE.getCode())) {
wxBillAll.setBillTypeValue(EnumBillTypeParam.ROUTINE.getCode()); wxBillAll.setBillTypeValue(EnumBillTypeParam.ROUTINE.getCode());
} else if (wxBillAll.getBillTypeValue().equals(EnumBillType.AIR_CONDITIONING.getCode())) {
wxBillAll.setBillTypeValue(EnumBillTypeParam.AIR_CONDITIONING.getCode());
} else { } else {
logger.info("账单不存在"); logger.info("账单不存在");
return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND);
@@ -195,14 +197,20 @@ public class WxBillAllServiceImpl implements WxBillAllService {
if(wxBillDaily!=null && !wxBillDaily.getStatus().equals(EnumBillRentStatus.PAID.getCode())){ if(wxBillDaily!=null && !wxBillDaily.getStatus().equals(EnumBillRentStatus.PAID.getCode())){
updateBillDaily(bill); updateBillDaily(bill);
} }
} else if (billTypeValue == EnumBillTypeParam.AIR_CONDITIONING.getCode().intValue()) {
//更新空调费账单
WxBillDaily wxBillDaily = wxBillDailyMapper.selectByPrimaryKey(bill.get("id"));
if (wxBillDaily != null && !wxBillDaily.getStatus().equals(EnumBillRentStatus.PAID.getCode())) {
updateBillDaily(bill);
}
} else if (billTypeValue==EnumBillTypeParam.ROUTINE.getCode().intValue()) { } else if (billTypeValue==EnumBillTypeParam.ROUTINE.getCode().intValue()) {
//更新其他账单 //更新其他账单
WxBillOther wxBillOther = wxBillOtherMapper.selectByPrimaryKey(bill.get("id")); WxBillOther wxBillOther = wxBillOtherMapper.selectByPrimaryKey(bill.get("id"));
if(wxBillOther!=null && !wxBillOther.getStatus().equals(EnumBillRentStatus.PAID.getCode())){ if(wxBillOther!=null && !wxBillOther.getStatus().equals(EnumBillRentStatus.PAID.getCode())){
updateBillOther(bill); updateBillOther(bill);
} }
} else if (billTypeValue == EnumBillTypeParam.ROUTINE.getCode().intValue()) {
//更新其他账单
} else if (billTypeValue == EnumBillTypeParam.ATHER_DEPOSIT.getCode().intValue()) {
//更新其他押金账单
WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectByPrimaryKey(bill.get("id")); WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectByPrimaryKey(bill.get("id"));
if (wxBillOtherDeposit != null && !wxBillOtherDeposit.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { if (wxBillOtherDeposit != null && !wxBillOtherDeposit.getStatus().equals(EnumBillRentStatus.PAID.getCode())) {
updateBillOtherDeposit(bill); updateBillOtherDeposit(bill);


+ 33
- 0
mallinkService/src/main/resources/mapper/WxBillAllMapper.xml View File

@@ -72,6 +72,11 @@
rent_shop_type,'[]' shop_info rent_shop_type,'[]' shop_info
from wx_bill_daily where type=2 from wx_bill_daily where type=2
union union
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 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,'[]' shop_info
from wx_bill_daily where type=3
union
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as 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, need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,
rent_shop_type,'[]' shop_info rent_shop_type,'[]' shop_info
@@ -128,6 +133,10 @@
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where
type=2 type=2
union union
select id,merchant_id,shop_id,tenant_id,9 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_daily where
type=3
union
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as 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 need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other
union union
@@ -172,6 +181,10 @@
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where
type=2 type=2
union union
select id,merchant_id,shop_id,tenant_id,9 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_daily where
type=3
union
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as 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 need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other
union union
@@ -224,6 +237,10 @@
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=2 from wx_bill_daily where type=2
union union
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 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_daily where type=3
union
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_vaue,'其他' bill_type,0 as select id,merchant_id,shop_id,tenant_id,name,7 bill_type_vaue,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other from wx_bill_other
@@ -301,6 +318,10 @@
select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'电费' name,6 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 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_daily where type=2 from wx_bill_daily where type=2
union
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 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_daily where type=3
union union
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as 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 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
@@ -345,6 +366,10 @@
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 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_daily where type=2 from wx_bill_daily where type=2
union union
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 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_daily where type=3
union
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as 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 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 from wx_bill_other
@@ -388,6 +413,10 @@
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 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_daily where type=2 from wx_bill_daily where type=2
union union
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 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_daily where type=3
union
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as 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 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 from wx_bill_other
@@ -434,6 +463,10 @@
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 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_daily where type=2 from wx_bill_daily where type=2
union union
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 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_daily where type=3
union
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as 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 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 from wx_bill_other


+ 3
- 2
mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml View File

@@ -20,13 +20,14 @@
<result column="type" jdbcType="INTEGER" property="type" /> <result column="type" jdbcType="INTEGER" property="type" />
<result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/> <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/>
<result column="pay_way" jdbcType="INTEGER" property="payWay"/> <result column="pay_way" jdbcType="INTEGER" property="payWay"/>
<result column="price_detail" jdbcType="VARCHAR" property="priceDetail"/>
</resultMap> </resultMap>
<sql id="allColumns"> <sql id="allColumns">
`id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`, `id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,
`tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`type`, `tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`type`,
`rent_shop_type`,`pay_way`
`rent_shop_type`,`pay_way`,`price_detail`
</sql> </sql>


<sql id="dynamicWhereConditions"> <sql id="dynamicWhereConditions">
@@ -67,7 +68,7 @@
select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate, 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`, br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`,
m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,br.`merchant_id` merchantId, m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,br.`merchant_id` merchantId,
br.shop_id shopId,br.type,br.`rent_shop_type` rentShopType,br.pay_way payWay
br.shop_id shopId,br.type,br.`rent_shop_type` rentShopType,br.pay_way payWay,br.price_detail priceDetail
from wx_bill_daily br left join wx_merchant m on br.merchant_id=m.id from wx_bill_daily br left join wx_merchant m on br.merchant_id=m.id
left join wx_shop s on br.shop_id=s.id left join wx_shop s on br.shop_id=s.id
<where> <where>


Loading…
Cancel
Save