developrelease_toaliyun_real
| @@ -0,0 +1 @@ | |||
| ALTER TABLE `invest_task` ADD COLUMN `last_time` datetime DEFAULT NULL COMMENT '最晚出租时间' AFTER `content`; | |||
| @@ -63,7 +63,9 @@ public class WxMerchantSubsidyController extends BaseController { | |||
| if (null == wxMerchantSubsidy) { | |||
| wxMerchantSubsidy = new WxMerchantSubsidyVo(); | |||
| } | |||
| wxMerchantSubsidy.setTenantId(getTenantId()); | |||
| WxMerchantBUser user = getUser(); | |||
| wxMerchantSubsidy.setTenantId(user.getTenantId()); | |||
| wxMerchantSubsidy.setMerchantId(user.getMerchantId()); | |||
| Map<String, Long> data = wxMerchantSubsidyService.summary(wxMerchantSubsidy); | |||
| return new ResultData(data); | |||
| } | |||
| @@ -122,7 +122,7 @@ public class WxOrder extends BaseEntity { | |||
| } | |||
| 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") | |||
| @@ -24,7 +24,7 @@ import java.util.Date; | |||
| public class InvestTaskEntity extends InvestBaseEntity { | |||
| public static final String KEY_CONTRACT_ID = "contractId" ; | |||
| public static final String KEY_CONTRACT_TYPE = "ContractType" ; | |||
| public static final String KEY_CONTRACT_TYPE = "contractType" ; | |||
| /** | |||
| * 负责人 | |||
| @@ -85,6 +85,8 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||
| e.setServiceChargePay(servicePay.intValue()); | |||
| if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { | |||
| e.setOwe(0L); | |||
| } else { | |||
| e.setOwe(realReceivePay - e.getPay()); | |||
| } | |||
| } | |||
| } | |||
| @@ -50,13 +50,13 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||
| @Override | |||
| 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); | |||
| List<WxBillDeposit> billDepositList = wxBillDepositMapper.queryBillDepositList(record); | |||
| billDepositList.stream().forEach(e->{ | |||
| /* billDepositList.stream().forEach(e->{ | |||
| //手续费 = 合同应收+手续费+滞纳金 | |||
| computeTotalMoney(wxPayAccountBill, e); | |||
| }); | |||
| });*/ | |||
| PageInfo<WxBillDeposit> pageInfo = new PageInfo<>(billDepositList); | |||
| return pageInfo; | |||
| } | |||
| @@ -80,6 +80,8 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| e.setServiceChargePay(servicePay.intValue()); | |||
| if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { | |||
| e.setOwe(0L); | |||
| } else { | |||
| e.setOwe(realReceivePay - e.getPay()); | |||
| } | |||
| } | |||
| } | |||
| @@ -80,6 +80,8 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||
| e.setServiceChargePay(servicePay.intValue()); | |||
| if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { | |||
| e.setOwe(0L); | |||
| } else { | |||
| e.setOwe(realReceivePay - e.getPay()); | |||
| } | |||
| } | |||
| } | |||
| @@ -87,6 +87,8 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| e.setServiceChargePay(servicePay.intValue()); | |||
| if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { | |||
| e.setOwe(0L); | |||
| } else { | |||
| e.setOwe(realReceivePay - e.getPay()); | |||
| } | |||
| } | |||
| } | |||
| @@ -89,6 +89,8 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| rent.setServiceChargePay(servicePay.intValue()); | |||
| if (!rent.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { | |||
| rent.setOwe(0L); | |||
| } else { | |||
| rent.setOwe(realReceivePay - rent.getPay()); | |||
| } | |||
| } | |||
| } | |||
| @@ -83,7 +83,7 @@ public class WxMerchantSubsidyServiceImpl implements WxMerchantSubsidyService { | |||
| Long subsidy = summary.get("subsidy"); | |||
| String subsidyStr = new BigDecimal(subsidy).divide(new BigDecimal(100)).toPlainString(); | |||
| WxMerchantSubsidyVo merchantSubsidy = new WxMerchantSubsidyVo(); | |||
| merchantSubsidy.setSubsidyStr(subsidyStr); | |||
| merchantSubsidy.setSubsidyStr("承付总金额(元): " + subsidyStr); | |||
| merchantSubsidy.setSource(-1); | |||
| merchantSubsidy.setType(-1); | |||
| merchantSubsidy.setFreeze(-1); | |||
| @@ -1058,8 +1058,8 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| String paymentStr = new BigDecimal(payment).divide(new BigDecimal(100)).toPlainString(); | |||
| String payStr = new BigDecimal(pay).divide(new BigDecimal(100)).toPlainString(); | |||
| WxOrder order = new WxOrder(); | |||
| order.setPayStr(payStr); | |||
| order.setPaymentStr(paymentStr); | |||
| order.setPayStr("支付总金额(元): " + payStr); | |||
| order.setPaymentStr("订单总金额(元): " + paymentStr); | |||
| order.setOrderStatus(-1); | |||
| order.setAttribute(-1); | |||
| list.add(order); | |||
| @@ -92,6 +92,8 @@ public class InvestBizServiceImpl implements InvestBizService { | |||
| } | |||
| List<InvestDemandEntity> demandList = demandService.list(new LambdaQueryWrapper<>(demandParams)); | |||
| LambdaQueryWrapper<InvestCustomerEntity> queryWrapperCustomer = new LambdaQueryWrapper<>(customerParams); | |||
| queryWrapperCustomer.like(StringUtils.isNotBlank(params.getCustomerNo()), InvestCustomerEntity::getCustomerNo, params.getCustomerNo()); | |||
| if (Objects.isNull(InvestUserContext.getDataUser())) { | |||
| if (CollectionUtils.isEmpty(demandList) && Objects.nonNull(params.getDemandOwner())) { | |||
| return investPage; | |||
| @@ -105,7 +107,7 @@ public class InvestBizServiceImpl implements InvestBizService { | |||
| 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); | |||
| InvestPageResult<InvestCustomerEntity> customers = customerService.queryPage(buildPageQuery(params, null), queryWrapperCustomer); | |||
| List<InvestDemandVo> resultList = getTargeInfoList(demandList, customers.getRecords()); | |||
| @@ -325,7 +327,7 @@ public class InvestBizServiceImpl implements InvestBizService { | |||
| InvestDemandDto customerBase = convetCustomer(customer, brandMap, businesseMap, shopMap, customerMap); | |||
| if (customerBase == null) { | |||
| stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); | |||
| log.error("userBasenull"); | |||
| log.error("customerBase null"); | |||
| } | |||
| saveCustomerAndDemand(customerBase) ; | |||
| }); | |||
| @@ -421,9 +423,8 @@ public class InvestBizServiceImpl implements InvestBizService { | |||
| private InvestDemandDto doConvertDemand(InvestDemandQuery params) { | |||
| InvestCustomerEntity customerEntity = null; | |||
| if (ObjectUtils.anyNotNull(params.getCustomerNo(), params.getCustomerType(), params.getBusinessId())) { | |||
| if (ObjectUtils.anyNotNull(params.getCustomerType(), params.getBusinessId())) { | |||
| customerEntity = new InvestCustomerEntity(); | |||
| customerEntity.setCustomerNo(params.getCustomerNo()); | |||
| customerEntity.setType(params.getCustomerType()); | |||
| customerEntity.setBusinessId(params.getBusinessId()); | |||
| } | |||
| @@ -33,7 +33,7 @@ public class InvestFollowRecordServiceImpl extends InvestBaseServiceImpl<InvestF | |||
| InvestFollowRecordEntity queryData = params.getQueryData(); | |||
| InvestHelper.notNull(queryData); | |||
| //InvestHelper.notNull(queryData.getFollowId(), "followId"); | |||
| InvestHelper.notNull(queryData.getType(), "type"); | |||
| //InvestHelper.notNull(queryData.getType(), "type"); | |||
| return super.queryPage(params); | |||
| } | |||
| @@ -35,7 +35,7 @@ public class InvestTaskServiceImpl extends InvestBaseServiceImpl<InvestTaskMappe | |||
| return true; | |||
| } | |||
| @TableLog | |||
| //@TableLog | |||
| @Override | |||
| public boolean update(InvestTaskEntity entity, Wrapper<InvestTaskEntity> updateWrapper) { | |||
| super.updateActon(entity, updateWrapper, this::checkBeforeSaveOrUpdate); | |||
| @@ -43,7 +43,7 @@ public class InvestTaskServiceImpl extends InvestBaseServiceImpl<InvestTaskMappe | |||
| return true; | |||
| } | |||
| @TableLog | |||
| //@TableLog | |||
| @Override | |||
| public boolean updateById(InvestTaskEntity entity) { | |||
| super.updateByIdAction(entity, this::checkBeforeSaveOrUpdate); | |||
| @@ -65,7 +65,7 @@ | |||
| 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,freeze,0 | |||
| late_pay_price,service_charge_pay | |||
| late_pay_price,0 service_charge_pay | |||
| from wx_bill_rent_deposit where tenant_id=#{tenantId} | |||
| union all | |||
| 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,'物业押金' | |||
| 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 | |||
| 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} | |||
| union all | |||
| 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)) | |||
| union all | |||
| 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,'' | |||
| 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 | |||
| where status in (2,3,4)) | |||
| union all | |||
| @@ -274,9 +274,9 @@ | |||
| where status in(2,3,4)) | |||
| union all | |||
| 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,'' | |||
| 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 | |||
| wx_property_contract where status in | |||
| (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 | |||
| union all | |||
| 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 | |||
| wx_bill_rent_deposit | |||
| union all | |||
| @@ -318,7 +318,7 @@ | |||
| wx_bill_property where is_preview = 0 | |||
| union all | |||
| 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 | |||
| wx_bill_property_deposit | |||
| 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 | |||
| union all | |||
| 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 | |||
| wx_bill_rent_deposit | |||
| union all | |||
| @@ -366,7 +366,7 @@ | |||
| wx_bill_property where is_preview = 0 | |||
| union all | |||
| 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 | |||
| wx_bill_property_deposit | |||
| 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, | |||
| 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 | |||
| 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,'欠缴押金' | |||
| 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} | |||
| @@ -753,7 +753,7 @@ | |||
| union all | |||
| 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,'' | |||
| 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"/> | |||
| union all | |||
| 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 | |||
| wx_bill_rent where is_preview = 0 and status not in(3,6) | |||
| 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) | |||
| union all | |||
| 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) | |||
| 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) | |||
| union all | |||
| select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from | |||
| @@ -849,13 +849,13 @@ | |||
| wx_bill_rent | |||
| where is_preview = 0 and status not in(3,6) | |||
| 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) | |||
| union all | |||
| 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) | |||
| 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) | |||
| union all | |||
| select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from | |||
| @@ -181,7 +181,8 @@ | |||
| </update> | |||
| <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} | |||
| </update> | |||
| @@ -270,7 +271,7 @@ | |||
| </update> | |||
| <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 id="updateOwe"> | |||
| @@ -188,7 +188,8 @@ | |||
| </update> | |||
| <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} | |||
| </update> | |||
| @@ -276,7 +277,7 @@ | |||
| </update> | |||
| <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 id="updateOwe"> | |||
| @@ -560,6 +560,7 @@ | |||
| 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 | |||
| 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 | |||
| 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 | |||
| @@ -567,7 +568,7 @@ | |||
| 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_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 | |||
| 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 | |||
| @@ -576,7 +577,7 @@ | |||
| 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_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 | |||
| <where> | |||
| <if test="tenantId!=null"> | |||