winter 1 год назад
Родитель
Сommit
7a899ae9cb
3 измененных файлов: 22 добавлений и 8 удалений
  1. +6
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxAllBill.java
  2. +6
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  3. +10
    -4
      mallinkService/src/main/resources/mapper/WxAllBillMapper.xml

+ 6
- 0
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;


+ 6
- 4
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<WxAllBill> childList = childMap.get(ub.getParentBillId());
List<WxAllBill> childList = childMap.get(ub.getParentVirtualComposeId());
if (null == childList) {
childList = new ArrayList<WxAllBill>();
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<WxAllBill> childList = childMap.get(ub.getId());
List<WxAllBill> 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);
}
}


+ 10
- 4
mallinkService/src/main/resources/mapper/WxAllBillMapper.xml Просмотреть файл

@@ -40,6 +40,8 @@
<result column="rent_contract_agile_fees_type" jdbcType="INTEGER" property="rentContractAgileFeesType"/>
<result column="property_contract_id" jdbcType="BIGINT" property="propertyContractId"/>
<result column="parent_bill_id" jdbcType="BIGINT" property="parentBillId"/>
<result column="virtual_compose_id" jdbcType="BIGINT" property="virtualComposeId"/>
<result column="parent_virtual_compose_id" jdbcType="BIGINT" property="parentVirtualComposeId"/>
<result column="energy_reading_calcuteId" jdbcType="BIGINT" property="energyReadingCalcuteId" />
<result column="energy_reading_id" jdbcType="BIGINT" property="energyReadingId" />
<result column="extra_create_from" jdbcType="INTEGER" property="extraCreateFrom" />
@@ -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`
</sql>

<sql id="dynamicWhereConditions">
@@ -71,6 +73,8 @@
<if test=" null != rentContractAgileFeesType ">and `rent_contract_agile_fees_type` = #{rentContractAgileFeesType}</if>
<if test=" null != propertyContractId ">and `property_contract_id` = #{propertyContractId}</if>
<if test=" null != parentBillId ">and `parent_bill_id` = #{parentBillId}</if>
<if test=" null != virtualComposeId ">and `virtual_compose_id` = #{virtualComposeId}</if>
<if test=" null != parentVirtualComposeId ">and `parent_virtual_compose_id` = #{parentVirtualComposeId}</if>
<if test=" null != isPreview ">and `is_preview` = #{isPreview}</if>
<if test=" null != starttime">and `starttime` &gt;= #{starttime}</if>
<if test=" null != endtime">and `endtime` &lt;= #{endtime}</if>
@@ -233,7 +237,8 @@
starttime,
endtime,
receive_date,
parent_bill_id
virtual_compose_id,
parent_virtual_compose_id
from wx_all_bill
<include refid="dynamicWhereConditions"/>
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}
)
</foreach>
</insert>


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