Selaa lähdekoodia

Merge tag 'refs/tags/jenkins-back-end-3081' into release

develop
release_toaliyun_real
gongbiao 6 vuotta sitten
vanhempi
commit
3a3d41ccc0
19 muutettua tiedostoa jossa 55 lisäystä ja 38 poistoa
  1. +1
    -0
      mallinkAdmin/src/main/resources/db/migration/V201910241500__W_INVEST_ALTER.sql
  2. +3
    -1
      mallinkBApi/src/main/java/com/iformall/controller/WxMerchantSubsidyController.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxOrder.java
  4. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/invest/InvestTaskEntity.java
  5. +2
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java
  6. +3
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java
  7. +2
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java
  8. +2
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java
  9. +2
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java
  10. +2
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java
  11. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantSubsidyServiceImpl.java
  12. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  13. +5
    -4
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java
  14. +1
    -1
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestFollowRecordServiceImpl.java
  15. +2
    -2
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestTaskServiceImpl.java
  16. +16
    -16
      mallinkService/src/main/resources/mapper/WxBillAllMapper.xml
  17. +3
    -2
      mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
  18. +3
    -2
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml
  19. +3
    -2
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml

+ 1
- 0
mallinkAdmin/src/main/resources/db/migration/V201910241500__W_INVEST_ALTER.sql Näytä tiedosto

@@ -0,0 +1 @@
ALTER TABLE `invest_task` ADD COLUMN `last_time` datetime DEFAULT NULL COMMENT '最晚出租时间' AFTER `content`;

+ 3
- 1
mallinkBApi/src/main/java/com/iformall/controller/WxMerchantSubsidyController.java Näytä tiedosto

@@ -63,7 +63,9 @@ public class WxMerchantSubsidyController extends BaseController {
if (null == wxMerchantSubsidy) { if (null == wxMerchantSubsidy) {
wxMerchantSubsidy = new WxMerchantSubsidyVo(); wxMerchantSubsidy = new WxMerchantSubsidyVo();
} }
wxMerchantSubsidy.setTenantId(getTenantId());
WxMerchantBUser user = getUser();
wxMerchantSubsidy.setTenantId(user.getTenantId());
wxMerchantSubsidy.setMerchantId(user.getMerchantId());
Map<String, Long> data = wxMerchantSubsidyService.summary(wxMerchantSubsidy); Map<String, Long> data = wxMerchantSubsidyService.summary(wxMerchantSubsidy);
return new ResultData(data); return new ResultData(data);
} }


+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxOrder.java Näytä tiedosto

@@ -122,7 +122,7 @@ public class WxOrder extends BaseEntity {
} }


public String getPaymentStr() { public String getPaymentStr() {
return payment != null ? new BigDecimal(payment).divide(new BigDecimal(100)).toPlainString() : payStr;
return payment != null ? new BigDecimal(payment).divide(new BigDecimal(100)).toPlainString() : paymentStr;
} }


@Excel(name = "订单金额(元)", width = 20, orderNum = "6") @Excel(name = "订单金额(元)", width = 20, orderNum = "6")


+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/po/invest/InvestTaskEntity.java Näytä tiedosto

@@ -24,7 +24,7 @@ import java.util.Date;
public class InvestTaskEntity extends InvestBaseEntity { public class InvestTaskEntity extends InvestBaseEntity {


public static final String KEY_CONTRACT_ID = "contractId" ; public static final String KEY_CONTRACT_ID = "contractId" ;
public static final String KEY_CONTRACT_TYPE = "ContractType" ;
public static final String KEY_CONTRACT_TYPE = "contractType" ;


/** /**
* 负责人 * 负责人


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java Näytä tiedosto

@@ -85,6 +85,8 @@ public class WxBillDailyServiceImpl implements WxBillDailyService {
e.setServiceChargePay(servicePay.intValue()); e.setServiceChargePay(servicePay.intValue());
if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) {
e.setOwe(0L); e.setOwe(0L);
} else {
e.setOwe(realReceivePay - e.getPay());
} }
} }
} }


+ 3
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java Näytä tiedosto

@@ -50,13 +50,13 @@ public class WxBillDepositServiceImpl implements WxBillDepositService {


@Override @Override
public PageInfo<WxBillDeposit> listAsPage(WxBillDeposit record, Integer pageIndex, Integer pageSize) { public PageInfo<WxBillDeposit> listAsPage(WxBillDeposit record, Integer pageIndex, Integer pageSize) {
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(record.getTenantId());
//WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(record.getTenantId());
PageHelper.startPage(pageIndex, pageSize); PageHelper.startPage(pageIndex, pageSize);
List<WxBillDeposit> billDepositList = wxBillDepositMapper.queryBillDepositList(record); List<WxBillDeposit> billDepositList = wxBillDepositMapper.queryBillDepositList(record);
billDepositList.stream().forEach(e->{
/* billDepositList.stream().forEach(e->{
//手续费 = 合同应收+手续费+滞纳金 //手续费 = 合同应收+手续费+滞纳金
computeTotalMoney(wxPayAccountBill, e); computeTotalMoney(wxPayAccountBill, e);
});
});*/
PageInfo<WxBillDeposit> pageInfo = new PageInfo<>(billDepositList); PageInfo<WxBillDeposit> pageInfo = new PageInfo<>(billDepositList);
return pageInfo; return pageInfo;
} }


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java Näytä tiedosto

@@ -80,6 +80,8 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService
e.setServiceChargePay(servicePay.intValue()); e.setServiceChargePay(servicePay.intValue());
if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) {
e.setOwe(0L); e.setOwe(0L);
} else {
e.setOwe(realReceivePay - e.getPay());
} }
} }
} }


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java Näytä tiedosto

@@ -80,6 +80,8 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
e.setServiceChargePay(servicePay.intValue()); e.setServiceChargePay(servicePay.intValue());
if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) {
e.setOwe(0L); e.setOwe(0L);
} else {
e.setOwe(realReceivePay - e.getPay());
} }
} }
} }


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java Näytä tiedosto

@@ -87,6 +87,8 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
e.setServiceChargePay(servicePay.intValue()); e.setServiceChargePay(servicePay.intValue());
if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) {
e.setOwe(0L); e.setOwe(0L);
} else {
e.setOwe(realReceivePay - e.getPay());
} }
} }
} }


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java Näytä tiedosto

@@ -89,6 +89,8 @@ public class WxBillRentServiceImpl implements WxBillRentService {
rent.setServiceChargePay(servicePay.intValue()); rent.setServiceChargePay(servicePay.intValue());
if (!rent.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { if (!rent.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) {
rent.setOwe(0L); rent.setOwe(0L);
} else {
rent.setOwe(realReceivePay - rent.getPay());
} }
} }
} }


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantSubsidyServiceImpl.java Näytä tiedosto

@@ -83,7 +83,7 @@ public class WxMerchantSubsidyServiceImpl implements WxMerchantSubsidyService {
Long subsidy = summary.get("subsidy"); Long subsidy = summary.get("subsidy");
String subsidyStr = new BigDecimal(subsidy).divide(new BigDecimal(100)).toPlainString(); String subsidyStr = new BigDecimal(subsidy).divide(new BigDecimal(100)).toPlainString();
WxMerchantSubsidyVo merchantSubsidy = new WxMerchantSubsidyVo(); WxMerchantSubsidyVo merchantSubsidy = new WxMerchantSubsidyVo();
merchantSubsidy.setSubsidyStr(subsidyStr);
merchantSubsidy.setSubsidyStr("承付总金额(元): " + subsidyStr);
merchantSubsidy.setSource(-1); merchantSubsidy.setSource(-1);
merchantSubsidy.setType(-1); merchantSubsidy.setType(-1);
merchantSubsidy.setFreeze(-1); merchantSubsidy.setFreeze(-1);


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java Näytä tiedosto

@@ -1058,8 +1058,8 @@ public class WxOrderServiceImpl implements WxOrderService {
String paymentStr = new BigDecimal(payment).divide(new BigDecimal(100)).toPlainString(); String paymentStr = new BigDecimal(payment).divide(new BigDecimal(100)).toPlainString();
String payStr = new BigDecimal(pay).divide(new BigDecimal(100)).toPlainString(); String payStr = new BigDecimal(pay).divide(new BigDecimal(100)).toPlainString();
WxOrder order = new WxOrder(); WxOrder order = new WxOrder();
order.setPayStr(payStr);
order.setPaymentStr(paymentStr);
order.setPayStr("支付总金额(元): " + payStr);
order.setPaymentStr("订单总金额(元): " + paymentStr);
order.setOrderStatus(-1); order.setOrderStatus(-1);
order.setAttribute(-1); order.setAttribute(-1);
list.add(order); list.add(order);


+ 5
- 4
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java Näytä tiedosto

@@ -92,6 +92,8 @@ public class InvestBizServiceImpl implements InvestBizService {
} }
List<InvestDemandEntity> demandList = demandService.list(new LambdaQueryWrapper<>(demandParams)); List<InvestDemandEntity> demandList = demandService.list(new LambdaQueryWrapper<>(demandParams));
LambdaQueryWrapper<InvestCustomerEntity> queryWrapperCustomer = new LambdaQueryWrapper<>(customerParams); LambdaQueryWrapper<InvestCustomerEntity> queryWrapperCustomer = new LambdaQueryWrapper<>(customerParams);
queryWrapperCustomer.like(StringUtils.isNotBlank(params.getCustomerNo()), InvestCustomerEntity::getCustomerNo, params.getCustomerNo());

if (Objects.isNull(InvestUserContext.getDataUser())) { if (Objects.isNull(InvestUserContext.getDataUser())) {
if (CollectionUtils.isEmpty(demandList) && Objects.nonNull(params.getDemandOwner())) { if (CollectionUtils.isEmpty(demandList) && Objects.nonNull(params.getDemandOwner())) {
return investPage; return investPage;
@@ -105,7 +107,7 @@ public class InvestBizServiceImpl implements InvestBizService {
queryWrapperCustomer.in(CollectionUtils.isNotEmpty(demandList),InvestCustomerEntity::getId, getIds(demandList, InvestDemandEntity::getCustomerId)); queryWrapperCustomer.in(CollectionUtils.isNotEmpty(demandList),InvestCustomerEntity::getId, getIds(demandList, InvestDemandEntity::getCustomerId));
} }
} }
queryWrapperCustomer.like(StringUtils.isNotBlank(params.getCustomerNo()), InvestCustomerEntity::getCustomerNo, params.getCustomerNo());
queryWrapperCustomer.orderByDesc(InvestCustomerEntity::getCreateDate); queryWrapperCustomer.orderByDesc(InvestCustomerEntity::getCreateDate);
InvestPageResult<InvestCustomerEntity> customers = customerService.queryPage(buildPageQuery(params, null), queryWrapperCustomer); InvestPageResult<InvestCustomerEntity> customers = customerService.queryPage(buildPageQuery(params, null), queryWrapperCustomer);
List<InvestDemandVo> resultList = getTargeInfoList(demandList, customers.getRecords()); List<InvestDemandVo> resultList = getTargeInfoList(demandList, customers.getRecords());
@@ -325,7 +327,7 @@ public class InvestBizServiceImpl implements InvestBizService {
InvestDemandDto customerBase = convetCustomer(customer, brandMap, businesseMap, shopMap, customerMap); InvestDemandDto customerBase = convetCustomer(customer, brandMap, businesseMap, shopMap, customerMap);
if (customerBase == null) { if (customerBase == null) {
stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1);
log.error("userBasenull");
log.error("customerBase null");
} }
saveCustomerAndDemand(customerBase) ; saveCustomerAndDemand(customerBase) ;
}); });
@@ -421,9 +423,8 @@ public class InvestBizServiceImpl implements InvestBizService {


private InvestDemandDto doConvertDemand(InvestDemandQuery params) { private InvestDemandDto doConvertDemand(InvestDemandQuery params) {
InvestCustomerEntity customerEntity = null; InvestCustomerEntity customerEntity = null;
if (ObjectUtils.anyNotNull(params.getCustomerNo(), params.getCustomerType(), params.getBusinessId())) {
if (ObjectUtils.anyNotNull(params.getCustomerType(), params.getBusinessId())) {
customerEntity = new InvestCustomerEntity(); customerEntity = new InvestCustomerEntity();
customerEntity.setCustomerNo(params.getCustomerNo());
customerEntity.setType(params.getCustomerType()); customerEntity.setType(params.getCustomerType());
customerEntity.setBusinessId(params.getBusinessId()); customerEntity.setBusinessId(params.getBusinessId());
} }


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestFollowRecordServiceImpl.java Näytä tiedosto

@@ -33,7 +33,7 @@ public class InvestFollowRecordServiceImpl extends InvestBaseServiceImpl<InvestF
InvestFollowRecordEntity queryData = params.getQueryData(); InvestFollowRecordEntity queryData = params.getQueryData();
InvestHelper.notNull(queryData); InvestHelper.notNull(queryData);
//InvestHelper.notNull(queryData.getFollowId(), "followId"); //InvestHelper.notNull(queryData.getFollowId(), "followId");
InvestHelper.notNull(queryData.getType(), "type");
//InvestHelper.notNull(queryData.getType(), "type");
return super.queryPage(params); return super.queryPage(params);
} }




+ 2
- 2
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestTaskServiceImpl.java Näytä tiedosto

@@ -35,7 +35,7 @@ public class InvestTaskServiceImpl extends InvestBaseServiceImpl<InvestTaskMappe
return true; return true;
} }


@TableLog
//@TableLog
@Override @Override
public boolean update(InvestTaskEntity entity, Wrapper<InvestTaskEntity> updateWrapper) { public boolean update(InvestTaskEntity entity, Wrapper<InvestTaskEntity> updateWrapper) {
super.updateActon(entity, updateWrapper, this::checkBeforeSaveOrUpdate); super.updateActon(entity, updateWrapper, this::checkBeforeSaveOrUpdate);
@@ -43,7 +43,7 @@ public class InvestTaskServiceImpl extends InvestBaseServiceImpl<InvestTaskMappe
return true; return true;
} }


@TableLog
//@TableLog
@Override @Override
public boolean updateById(InvestTaskEntity entity) { public boolean updateById(InvestTaskEntity entity) {
super.updateByIdAction(entity, this::checkBeforeSaveOrUpdate); super.updateByIdAction(entity, this::checkBeforeSaveOrUpdate);


+ 16
- 16
mallinkService/src/main/resources/mapper/WxBillAllMapper.xml Näytä tiedosto

@@ -65,7 +65,7 @@
select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' 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, 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,freeze,0 endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze,0
late_pay_price,service_charge_pay
late_pay_price,0 service_charge_pay
from wx_bill_rent_deposit where tenant_id=#{tenantId} from wx_bill_rent_deposit where tenant_id=#{tenantId}
union all union all
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
@@ -77,7 +77,7 @@
select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' 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, 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,freeze,0 endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze,0
late_pay_price,service_charge_pay from wx_bill_property_deposit where
late_pay_price,0 service_charge_pay from wx_bill_property_deposit where
tenant_id=#{tenantId} tenant_id=#{tenantId}
union all union all
select id,merchant_id,shop_id,tenant_id,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name, select id,merchant_id,shop_id,tenant_id,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name,
@@ -259,9 +259,9 @@
(2,3,4)) (2,3,4))
union all union all
select '' settle_number,id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' select '' settle_number,id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay-pay)
bill_type,need_pay,receive_pay,pay,(receive_pay-pay)
owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,'' owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,''
price_detail,freeze,0 late_pay_price,service_charge_pay
price_detail,freeze,0 late_pay_price,0 service_charge_pay
from wx_bill_rent_deposit where tenant_id=#{tenantId} and rent_contract_id in (select id from wx_rent_contract from wx_bill_rent_deposit where tenant_id=#{tenantId} and rent_contract_id in (select id from wx_rent_contract
where status in (2,3,4)) where status in (2,3,4))
union all union all
@@ -274,9 +274,9 @@
where status in(2,3,4)) where status in(2,3,4))
union all union all
select '' settle_number,id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' select '' settle_number,id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay-pay)
bill_type,need_pay,receive_pay,pay,(receive_pay-pay)
owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,'' owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,''
price_detail,freeze,0 late_pay_price,service_charge_pay
price_detail,freeze,0 late_pay_price,0 service_charge_pay
from wx_bill_property_deposit where tenant_id=#{tenantId} and property_contract_id in (select id from from wx_bill_property_deposit where tenant_id=#{tenantId} and property_contract_id in (select id from
wx_property_contract where status in wx_property_contract where status in
(2,3,4)) (2,3,4))
@@ -308,7 +308,7 @@
owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0 owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0
union all union all
select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay-pay)
bill_type,need_pay,receive_pay,pay,(receive_pay-pay)
owe,receive_date,pay_date,expired_day,status,rent_shop_type from owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_rent_deposit wx_bill_rent_deposit
union all union all
@@ -318,7 +318,7 @@
wx_bill_property where is_preview = 0 wx_bill_property where is_preview = 0
union all union all
select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay-pay)
bill_type,need_pay,receive_pay,pay,(receive_pay-pay)
owe,receive_date,pay_date,expired_day,status,rent_shop_type from owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_property_deposit wx_bill_property_deposit
union all union all
@@ -356,7 +356,7 @@
owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0 owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0
union all union all
select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay-pay)
bill_type,need_pay,receive_pay,pay,(receive_pay-pay)
owe,receive_date,pay_date,expired_day,status,rent_shop_type from owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_rent_deposit wx_bill_rent_deposit
union all union all
@@ -366,7 +366,7 @@
wx_bill_property where is_preview = 0 wx_bill_property where is_preview = 0
union all union all
select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay-pay)
bill_type,need_pay,receive_pay,pay,(receive_pay-pay)
owe,receive_date,pay_date,expired_day,status,rent_shop_type from owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_property_deposit wx_bill_property_deposit
union all union all
@@ -745,7 +745,7 @@
select res.id,res.merchant_id,res.shop_id,res.tenant_id,res.name,res.bill_type_value,res.bill_type,res.need_pay, select res.id,res.merchant_id,res.shop_id,res.tenant_id,res.name,res.bill_type_value,res.bill_type,res.need_pay,
res.receive_pay,res.pay,res.owe res.receive_pay,res.pay,res.owe
owe,res.receive_date,res.pay_date,res.expired_day,res.status,res.starttime,res.endtime,res.rent_shop_type,0 owe,res.receive_date,res.pay_date,res.expired_day,res.status,res.starttime,res.endtime,res.rent_shop_type,0
late_pay_price,service_charge_pay from(
late_pay_price,0 service_charge_pay from(
select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,2 bill_type_value,'欠缴押金' select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,2 bill_type_value,'欠缴押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_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,service_charge_pay from wx_bill_rent_deposit where tenant_id = #{tenantId} endtime,rent_shop_type,service_charge_pay from wx_bill_rent_deposit where tenant_id = #{tenantId}
@@ -753,7 +753,7 @@
union all union all
select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,4 bill_type_value,'欠缴押金' select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,4 bill_type_value,'欠缴押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_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,service_charge_pay from wx_bill_property_deposit where tenant_id = #{tenantId}
endtime,rent_shop_type,0 service_charge_pay from wx_bill_property_deposit where tenant_id = #{tenantId}
<include refid="getOweBillAsPageConditions"/> <include refid="getOweBillAsPageConditions"/>
union all union all
select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,8 bill_type_value,'欠缴押金' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,8 bill_type_value,'欠缴押金' bill_type,0 as
@@ -804,13 +804,13 @@
select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,late_pay_price from select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,late_pay_price from
wx_bill_rent where is_preview = 0 and status not in(3,6) wx_bill_rent where is_preview = 0 and status not in(3,6)
union all union all
select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from
select merchant_id,receive_pay,0 receivePay,0 late_pay_price from
wx_bill_rent_deposit where status not in(3,6) wx_bill_rent_deposit where status not in(3,6)
union all union all
select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,late_pay_price from select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,late_pay_price from
wx_bill_property where is_preview = 0 and status not in(3,6) wx_bill_property where is_preview = 0 and status not in(3,6)
union all union all
select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from
select merchant_id,receive_pay,0 receivePay,0 late_pay_price from
wx_bill_property_deposit where status not in(3,6) wx_bill_property_deposit where status not in(3,6)
union all union all
select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from
@@ -849,13 +849,13 @@
wx_bill_rent wx_bill_rent
where is_preview = 0 and status not in(3,6) where is_preview = 0 and status not in(3,6)
union all union all
select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from
select merchant_id,receive_pay,0 receivePay,0 late_pay_price from
wx_bill_rent_deposit where status not in(3,6) wx_bill_rent_deposit where status not in(3,6)
union all union all
select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,late_pay_price from select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,late_pay_price from
wx_bill_property where is_preview = 0 and status not in(3,6) wx_bill_property where is_preview = 0 and status not in(3,6)
union all union all
select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from
select merchant_id,receive_pay,0 receivePay,0 late_pay_price from
wx_bill_property_deposit where status not in(3,6) wx_bill_property_deposit where status not in(3,6)
union all union all
select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from


+ 3
- 2
mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml Näytä tiedosto

@@ -181,7 +181,8 @@
</update> </update>


<update id="updatePreviewStatus" parameterType="com.iformall.domain.po.WxBillProperty"> <update id="updatePreviewStatus" parameterType="com.iformall.domain.po.WxBillProperty">
update wx_bill_property set is_preview = #{isPreview},merchant_id = #{merchantId},need_pay = receive_pay,owe=receive_pay
update wx_bill_property set is_preview = #{isPreview},merchant_id = #{merchantId},need_pay = receive_pay,
owe=receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay
where property_contract_id = #{propertyContractId} where property_contract_id = #{propertyContractId}
</update> </update>


@@ -270,7 +271,7 @@
</update> </update>
<update id="updateServiceCharge" parameterType="com.iformall.domain.po.WxPayAccountBill"> <update id="updateServiceCharge" parameterType="com.iformall.domain.po.WxPayAccountBill">
update wx_bill_property set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000) where tenant_id=#{tenantId} and service_charge_pay=0 and status in(1,2,4)
update wx_bill_property set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000),owe=receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay where tenant_id=#{tenantId} and service_charge_pay=0 and status in(1,2,4)
</update> </update>
<update id="updateOwe"> <update id="updateOwe">


+ 3
- 2
mallinkService/src/main/resources/mapper/WxBillRentMapper.xml Näytä tiedosto

@@ -188,7 +188,8 @@
</update> </update>


<update id="updatePreviewStatus" parameterType="com.iformall.domain.po.WxBillRent"> <update id="updatePreviewStatus" parameterType="com.iformall.domain.po.WxBillRent">
update wx_bill_rent set is_preview = #{isPreview},merchant_id = #{merchantId},need_pay = receive_pay,owe=receive_pay
update wx_bill_rent set is_preview = #{isPreview},merchant_id = #{merchantId},need_pay = receive_pay,
owe=receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay
where rent_contract_id = #{rentContractId} where rent_contract_id = #{rentContractId}
</update> </update>


@@ -276,7 +277,7 @@
</update> </update>
<update id="updateServiceCharge" parameterType="com.iformall.domain.po.WxPayAccountBill"> <update id="updateServiceCharge" parameterType="com.iformall.domain.po.WxPayAccountBill">
update wx_bill_rent set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000) where tenant_id=#{tenantId} and service_charge_pay=0 and status in(1,2,4)
update wx_bill_rent set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000),owe=receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay where tenant_id=#{tenantId} and service_charge_pay=0 and status in(1,2,4)
</update> </update>
<update id="updateOwe"> <update id="updateOwe">


+ 3
- 2
mallinkService/src/main/resources/mapper/WxOrderMapper.xml Näytä tiedosto

@@ -560,6 +560,7 @@
left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id
left join wx_coupon c on o.product_id=c.id left join wx_coupon c on o.product_id=c.id
where o.tenant_id=#{tenantId} and c.type!=100 and o.order_status in(0,1,2,3,4,5) where o.tenant_id=#{tenantId} and c.type!=100 and o.order_status in(0,1,2,3,4,5)
and ifnull(press_current_num,0)=0 and ifnull(order_group_id)=0
union all union all
select o.id,o.order_number,o.tenant_id,o.product_id,o.payment, select o.id,o.order_number,o.tenant_id,o.product_id,o.payment,
case o.order_status when 6 then 0 when 7 then 0 case o.order_status when 6 then 0 when 7 then 0
@@ -567,7 +568,7 @@
c.title,cubi.`name` c_user_name,cubi.phone,o.create_date,3 attribute from wx_order o c.title,cubi.`name` c_user_name,cubi.phone,o.create_date,3 attribute from wx_order o
left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id
left join wx_coupon c on o.product_id=c.id left join wx_coupon c on o.product_id=c.id
where o.tenant_id=#{tenantId} and c.type=8 and o.payment=c.sale_price
where o.tenant_id=#{tenantId} and c.type=8 and press_current_num>0
union all union all
select o.id,o.order_number,o.tenant_id,o.product_id,o.payment, select o.id,o.order_number,o.tenant_id,o.product_id,o.payment,
case o.order_status when 10 then 1 when 11 then 1 case o.order_status when 10 then 1 when 11 then 1
@@ -576,7 +577,7 @@
c.title,cubi.`name` c_user_name,cubi.phone,o.create_date,4 attribute from wx_order o c.title,cubi.`name` c_user_name,cubi.phone,o.create_date,4 attribute from wx_order o
left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id
left join wx_coupon c on o.product_id=c.id left join wx_coupon c on o.product_id=c.id
where o.tenant_id=#{tenantId} and c.type=9 and o.payment=c.sale_price
where o.tenant_id=#{tenantId} and c.type=9 and order_group_id>0
) o ) o
<where> <where>
<if test="tenantId!=null"> <if test="tenantId!=null">


Ladataan…
Peruuta
Tallenna