diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxAllBill.java b/mallinkService/src/main/java/com/iformall/domain/po/WxAllBill.java index f3cc89df5..0d079818f 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxAllBill.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxAllBill.java @@ -281,6 +281,12 @@ public class WxAllBill extends TenantEntity { @io.swagger.annotations.ApiModelProperty(value="主物账单ID(针对合同里面的自定义科目账单)",name="parentBillId") public Long parentBillId; + @io.swagger.annotations.ApiModelProperty(value="虚拟组合ID(针对店铺拆分用)",name="virtualComposeId") + public Long virtualComposeId; + + @io.swagger.annotations.ApiModelProperty(value="父虚拟组合ID(针对店铺拆分,自定义科目账单用)",name="parentVirtualComposeId") + public Long parentVirtualComposeId; + @io.swagger.annotations.ApiModelProperty(value = "能源抄表计算ID", name = "energyReadingCalcuteId") private Long energyReadingCalcuteId; 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 b6ce2913b..dd109c442 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -306,10 +306,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService for (int i = 0 ; i < unFixedList.size(); i++) { WxAllBill ub = unFixedList.get(i); if (null != ub) { - List childList = childMap.get(ub.getParentBillId()); + List childList = childMap.get(ub.getParentVirtualComposeId()); if (null == childList) { childList = new ArrayList(); - childMap.put(ub.getParentBillId(), childList); + childMap.put(ub.getParentVirtualComposeId(), childList); } ub.setFeesStandarsId(ub.getEnergyFeesId()); childList.add(ub); @@ -319,7 +319,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService if (null != childMap ) { for (int i = 0 ; i < retList.size(); i ++) { WxAllBill ub = retList.get(i); - List childList = childMap.get(ub.getId()); + List childList = childMap.get(ub.getVirtualComposeId()); ub.setChildList(childList); } } @@ -1011,7 +1011,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService WxAllBill property = generateBillPropertyByBillStandards(null,wxPayAccountBill,wxPropertyContract,isPreview,user,svo,billcount,shopInfo); fixedResultList.add(property); } - } + } //批量生成预账单 if(saveDb) { @@ -1031,6 +1031,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService Long sid = shopIdList.get(g); WxAllBill rs = new WxAllBill(); setNewsBills(wxPropertyContract, rs, rb, sid, shopAreaRateMap,shopUserMap); + rs.setVirtualComposeId(rb.getId()); shopAllBillList.add(rs); //其他周期的费用账单也需要拆分,并关联parentBillId @@ -1040,6 +1041,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService WxAllBill ufbn = new WxAllBill(); setNewsBills(wxPropertyContract, ufbn, ufb, sid, shopAreaRateMap,shopUserMap); ufbn.setParentBillId(rs.getId()); + ufbn.setParentVirtualComposeId(rb.getId()); shopAllBillList.add(rs); } } diff --git a/mallinkService/src/main/resources/mapper/WxAllBillMapper.xml b/mallinkService/src/main/resources/mapper/WxAllBillMapper.xml index a1ee63c42..e96058468 100644 --- a/mallinkService/src/main/resources/mapper/WxAllBillMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxAllBillMapper.xml @@ -40,6 +40,8 @@ + + @@ -52,8 +54,8 @@ `id`,`tenant_id`,`parent_tenant_id`,`shop_id`,`createtime`,`create_by`,`create_by_name`,`updatetime`,`update_by`,`update_by_name`, `price_detail`,`need_pay`,`receive_pay`,`pay`,`bill_type`,`pay_way`,`pay_date`,`set_off`,`use_money`,`starttime`,`endtime`,`status`,`energy_fees_id`,`return_pay`, `bill_remark`,`last_owe_call_time`,`last_owe_call_user`,`bussiness_manage_fee_need_pay`,`operating_manage_fee_need_pay`,`receive_date`,`period`, - `is_preview`,`shop_info`,`rent_contract_id`,`rent_contract_agile_fees_type`,`property_contract_id`,`parent_bill_id`,`energy_reading_calcuteId`,`energy_reading_id`,`extra_create_from`,`rent_area`, - `can_edit`,`cus_name` + `is_preview`,`shop_info`,`rent_contract_id`,`rent_contract_agile_fees_type`,`property_contract_id`,`parent_bill_id`,`virtual_compose_id`,`parent_virtual_compose_id`, + `energy_reading_calcuteId`,`energy_reading_id`,`extra_create_from`,`rent_area`,`can_edit`,`cus_name` @@ -71,6 +73,8 @@ and `rent_contract_agile_fees_type` = #{rentContractAgileFeesType} and `property_contract_id` = #{propertyContractId} and `parent_bill_id` = #{parentBillId} + and `virtual_compose_id` = #{virtualComposeId} + and `parent_virtual_compose_id` = #{parentVirtualComposeId} and `is_preview` = #{isPreview} and `starttime` >= #{starttime} and `endtime` <= #{endtime} @@ -233,7 +237,8 @@ starttime, endtime, receive_date, - parent_bill_id + virtual_compose_id, + parent_virtual_compose_id from wx_all_bill group by starttime,endtime @@ -391,7 +396,8 @@ #{item.starttime},#{item.endtime},#{item.status},#{item.energyFeesId},#{item.returnPay},#{item.billRemark}, #{item.lastOweCallTime},#{item.lastOweCallUser},#{item.bussinessManageFeeNeedPay},#{item.operatingManageFeeNeedPay}, #{item.receiveDate},#{item.period},#{item.isPreview},#{item.shopInfo},#{item.rentContractId},#{item.rentContractAgileFeesType},#{item.propertyContractId}, - #{item.parentBillId},#{item.energyReadingCalcuteId},#{item.energyReadingId},#{item.extraCreateFrom},#{item.rentArea},#{item.canEdit},#{item.cusName} + #{item.parentBillId},#{item.virtualComposeId},#{item.parentVirtualComposeId},#{item.energyReadingCalcuteId}, + #{item.energyReadingId},#{item.extraCreateFrom},#{item.rentArea},#{item.canEdit},#{item.cusName} )