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

[合同][修改][开发结算单]

release_toaliyun_real
luozukai 6 лет назад
Родитель
Сommit
0bbee774bf
5 измененных файлов: 40 добавлений и 18 удалений
  1. +11
    -7
      mallinkAdmin/src/test/java/com/iformall/service/test/Test.java
  2. +5
    -1
      mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java
  3. +5
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java
  4. +9
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  5. +10
    -9
      mallinkService/src/main/resources/mapper/WxBillAllMapper.xml

+ 11
- 7
mallinkAdmin/src/test/java/com/iformall/service/test/Test.java Просмотреть файл

@@ -2,10 +2,8 @@ package com.iformall.service.test;

import com.alibaba.fastjson.JSON;
import com.iformall.domain.po.*;
import com.iformall.service.WxBillSettleService;
import com.iformall.service.WxCouponSendService;
import com.iformall.service.WxLevelConfigService;
import com.iformall.service.WxScoreRulesService;
import com.iformall.domain.vo.WxBillAll;
import com.iformall.service.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.UsernamePasswordToken;
@@ -61,7 +59,8 @@ public class Test {

@Autowired
private WxBillSettleService wxBillSettleService;

@Autowired
private WxBillAllService wxBillAllService;

@Before
public void setUp() {
@@ -86,8 +85,13 @@ public class Test {

@org.junit.Test
public void levelList() {
WxBillSettle settle = wxBillSettleService.getById(328411851323572224l);
log.debug("data:{}", JSON.toJSONString(settle));
// WxBillSettle settle = wxBillSettleService.getById(328411851323572224l);
// log.debug("data:{}", JSON.toJSONString(settle));
WxBillAll wxBillAll = new WxBillAll();
wxBillAll.setMerchantId(326957139157024768l);
wxBillAll.setTenantId("456");
wxBillAll.setBillTypeValue(10);
log.debug("data:{}", JSON.toJSONString( wxBillAllService.listBill(wxBillAll)));
}




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

@@ -122,7 +122,6 @@ public class WxBillAll extends BaseEntity {
private String payDate;



@Transient
@io.swagger.annotations.ApiModelProperty(value = "过滤已收金额1过滤", name = "filterHasPay")
private Integer filterHasPay;
@@ -146,6 +145,11 @@ public class WxBillAll extends BaseEntity {
@Transient
private Integer balance;


@Transient
@io.swagger.annotations.ApiModelProperty(value = "冻结状态0正常1冻结", name = "freeze")
private Integer freeze;

@io.swagger.annotations.ApiModelProperty(value = "多个类型", name = "typeStr")
private String typeStr;



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

@@ -12,6 +12,7 @@ import com.iformall.service.ExcelService;
import com.iformall.service.WxBillSettleService;
import com.iformall.service.WxFlowService;
import com.iformall.utils.DateUtils;
import org.apache.commons.collections.CollectionUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -152,6 +153,10 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
@Transactional
public ResultData saveOrUpdate(WxBillSettle record, MallUserInfo userInfo) {
final IdWorker idWorker = IdWorker.get();

if (record.getFlowParams() == null || record.getFlowParams().size() == 0) {
record.setStatus(EnumSettleStatus.NOT_FINISH.getCode());
}
if (record.getId() == null) {
record.setId(idWorker.nextId());
wxBillSettleMapper.insertSelective(record);


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

@@ -203,9 +203,9 @@ public class WxFlowServiceImpl implements WxFlowService {
wxPropertyContractMapper.updateApplyStatus(wxPropertyContract);
}
} else if (EnumFlowKey.BILL.getCode().equals(flowType) || EnumFlowKey.NEW_BILL_CHANGE.getCode().equals(flowType)) {
Integer billType = getIngeter(getVariableByKey(variables, "billType"));
if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) {
//账单审批
Integer billType = getIngeter(getVariableByKey(variables, "billType"));
MallUserInfo user = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute("userSession");
Integer billUpdateType = getIngeter(getVariableByKey(variables, "billUpdateType"));
Long oldPrice = Long.parseLong(getVariableByKey(variables, "oldPrice").toString());
@@ -221,6 +221,14 @@ public class WxFlowServiceImpl implements WxFlowService {
wxBillAll.setNewPrice(newPrice);
}
wxBillAllService.updateReceivePay(wxBillAll, user);
}else{
//账单修改金额,冻结
List<WxBillSettleBill> billList = new ArrayList<>();
WxBillSettleBill settleBill = new WxBillSettleBill();
settleBill.setBillType(billType);
settleBill.setBillId(businessId);
billList.add(settleBill);
wxBillSettleService.updateFreeze(billList,EnumFreezeType.YES.getCode());
}
} else if (EnumFlowKey.NEW_COUPON_UPLINE.getCode().equals(flowType)
|| EnumFlowKey.NEW_CARD_UPLINE.getCode().equals(flowType)


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

@@ -53,46 +53,46 @@
bill.pay_date payDate,expired_day expiredDay,bill.status,bill.starttime,
bill.endtime,bill.name,bill.rent_shop_type rentShopType,m.name merchantName,
s.shop_number shopNumber, s.manager, s.manager_phone managerPhone,bill.shop_info
shopInfo,bill.comments,bill.price_detail,updatetime
shopInfo,bill.comments,bill.price_detail,updatetime,bill.freeze
from (
select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments,''
price_detail,updatetime
price_detail,updatetime,freeze
from wx_bill_rent where tenant_id=#{tenantId} and is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime from wx_bill_rent_deposit where
endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze from wx_bill_rent_deposit where
tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments,''
price_detail,updatetime
price_detail,updatetime,freeze
from wx_bill_property where tenant_id=#{tenantId} and is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime from wx_bill_property_deposit where
endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze from wx_bill_property_deposit where
tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name,
case when type=1 then 5 when type=2 then 6 else 9 end bill_type_value,
case when type=1 then '水费' when type=2 then '电费' else '空调费' end bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,
rent_shop_type,'[]' shop_info, NULL comments,price_detail,updatetime
rent_shop_type,'[]' shop_info, NULL comments,price_detail,updatetime,freeze
from wx_bill_daily where tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,concat('其他费用-',name) as bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,
rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime
rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze
from wx_bill_other where tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,concat('其他押金-',comments) as
bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,
rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime
rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze
from wx_bill_other_deposit where tenant_id=#{tenantId}
) bill
left join wx_merchant m on bill.merchant_id=m.id
@@ -127,7 +127,8 @@
#{type}
</foreach>
</if>
<if test=" null != freeze ">and bill.freeze = #{freeze}</if>

<if test=" null != sortColumns"> order by ${sortColumns} </if>
<if test=" null == sortColumns"> order by bill.receive_date,bill.id desc,bill.merchant_id,bill.status</if>



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