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

[物业合同][修改][批量插入预账单]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
37b361e5b6
3 измененных файлов: 39 добавлений и 2 удалений
  1. +4
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java
  2. +3
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  3. +32
    -0
      mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml

+ 4
- 0
mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java Просмотреть файл

@@ -38,4 +38,8 @@ public interface WxBillPropertyMapper extends CommonMapper<WxBillProperty, Long>

Long oweBillCount(Long contractId);

void updateBills(List<WxBillProperty> resultList);

void insertBills(List<WxBillProperty> resultList);

}

+ 3
- 2
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;


+ 32
- 0
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}
</select>
<insert id="insertBills" parameterType="java.util.List">
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
<foreach collection="list" item="item" index="index" separator=",">
(
#{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}
)
</foreach>
</insert>
<update id="updateBills" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update wx_bill_rent
<set>
<if test=" null != item.receivePay ">updatetime = now(),receive_pay = #{item.receivePay},</if>
<if test=" null != item.comments ">comments = #{item.comments},</if>
<if test=" null != item.receiveDate ">receive_date = #{item.receiveDate},</if>
<if test="0 == item.receivePay or 0l == item.receivePay">status = 3,pay_date=now()</if>
</set>
where id = #{item.id}
</foreach>
</update>

</mapper>


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