From 37b361e5b6805005dac47beb873d1f34192dda18 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 13 Jun 2019 14:43:02 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=89=A9=E4=B8=9A=E5=90=88=E5=90=8C][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=89=B9=E9=87=8F=E6=8F=92=E5=85=A5?= =?UTF-8?q?=E9=A2=84=E8=B4=A6=E5=8D=95]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/mapper/WxBillPropertyMapper.java | 4 +++ .../impl/WxPropertyContractServiceImpl.java | 5 +-- .../resources/mapper/WxBillPropertyMapper.xml | 32 +++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java index a9cf66e7c..6d8151db0 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java @@ -38,4 +38,8 @@ public interface WxBillPropertyMapper extends CommonMapper Long oweBillCount(Long contractId); + void updateBills(List resultList); + + void insertBills(List resultList); + } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index 907a3dd2b..f8bd2eb23 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -625,10 +625,11 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService if (shopInfo != null) { wxBillProperty.setShopInfo(JSONObject.toJSONString(shopInfo)); } - wxBillPropertyMapper.insertSelective(wxBillProperty); + //wxBillPropertyMapper.insertSelective(wxBillProperty); resultList.add(wxBillProperty); } - + //批量生成预账单 + wxBillPropertyMapper.insertBills(resultList); resultMap.put("billcount",billcount); resultMap.put("billList",resultList); return resultMap; diff --git a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml index 6a290b7d7..3851a40cb 100644 --- a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml @@ -183,5 +183,37 @@ select count(br.id) from wx_bill_property br,wx_property_contract c where c.id = br.property_contract_id and br.status = 1 and c.id = #{contractId} + + + INSERT INTO wx_bill_property (id,property_contract_id, receive_pay, pay, receive_date, pay_date, createtime, + expired_day, + tenant_id, owe, status, is_del, need_pay, merchant_id, user_id, shop_id, updatetime, starttime, endtime, + rent_shop_type, revenue, late_pay_ratio, late_pay_time, late_pay_price, period, is_preview, shop_info, + pay_way, late_pay_status, comments) + VALUES + + ( + #{item.id},#{item.propertyContractId},#{item.receivePay},#{item.pay},#{item.receiveDate},#{item.payDate},#{item.createtime}, + #{item.expiredDay},#{item.tenantId},#{item.owe},#{item.status},#{item.isDel},#{item.needPay},#{item.merchantId}, + #{item.userId},#{item.shopId},#{item.updatetime},#{item.starttime},#{item.endtime},#{item.rentShopType},#{item.revenue}, + #{item.latePayRatio},#{item.latePayTime},#{item.latePayPrice},#{item.period},#{item.isPreview},#{item.shopInfo}, + #{item.payWay},#{item.latePayStatus},#{item.comments} + ) + + + + + + update wx_bill_rent + + updatetime = now(),receive_pay = #{item.receivePay}, + comments = #{item.comments}, + receive_date = #{item.receiveDate}, + status = 3,pay_date=now() + + where id = #{item.id} + + +