|
|
|
@@ -644,7 +644,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantInfo(wxPropertyContract); |
|
|
|
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
Map<String,Object> resultMap = new HashedMap(); |
|
|
|
List<WxBillProperty> resultList = new ArrayList<>(); |
|
|
|
List<WxBillProperty> propertyResultList = new ArrayList<>(); |
|
|
|
List<WxBillProperty> allResultList = new ArrayList<>(); |
|
|
|
|
|
|
|
Date endDate = null; |
|
|
|
if(yearList.size() > 1){ |
|
|
|
@@ -736,36 +737,41 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
WxBillProperty wxBillProperty = generateBillProperty(wxPayAccountBill,wxPropertyContract,isPreview,billTimeVo.getStartDate(),billTimeVo.getEndDate(),billTimeVo.getReceiveDate(),needpay,userId,billcount,shopInfo,standarsTotal,"",null,null); |
|
|
|
//非一次性账单 |
|
|
|
wxBillProperty.setUnFixedbillFeesStandardsList(unFixedList); |
|
|
|
List<WxBillProperty> childList = null; |
|
|
|
//每个非从一次性都要创建账单 |
|
|
|
if (null != unFixedList) { |
|
|
|
if (null != unFixedList && unFixedList.size() > 0 ) { |
|
|
|
childList = new ArrayList<WxBillProperty>(); |
|
|
|
for (int j = 0 ; j < unFixedList.size(); j ++ ) { |
|
|
|
WxBillFeesStandardsListVo svo = unFixedList.get(j); |
|
|
|
svo.setParentBillId(wxBillProperty.getId()); |
|
|
|
WxBillProperty property = generateBillPropertyByBillStandards(wxPayAccountBill,wxPropertyContract,isPreview,userId,svo,billcount,shopInfo); |
|
|
|
resultList.add(property); |
|
|
|
allResultList.add(property); |
|
|
|
childList.add(property); |
|
|
|
} |
|
|
|
} |
|
|
|
wxBillProperty.setChildList(childList); |
|
|
|
//主账单列表 |
|
|
|
resultList.add(wxBillProperty); |
|
|
|
propertyResultList.add(wxBillProperty); |
|
|
|
allResultList.add(wxBillProperty); |
|
|
|
} |
|
|
|
|
|
|
|
if (null != fixedList) { |
|
|
|
if (null != fixedList && fixedList.size() > 0 ) { |
|
|
|
for (int i = 0 ; i < fixedList.size(); i ++ ) { |
|
|
|
WxBillFeesStandardsListVo svo = fixedList.get(i); |
|
|
|
WxBillProperty property = generateBillPropertyByBillStandards(wxPayAccountBill,wxPropertyContract,isPreview,userId,svo,billcount,shopInfo); |
|
|
|
resultList.add(property); |
|
|
|
allResultList.add(property); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//批量生成预账单 |
|
|
|
if(saveDb && resultList.size() > 0 ) { |
|
|
|
wxBillPropertyMapper.insertBills(wxPropertyContract.getTenantId() ,resultList); |
|
|
|
if(saveDb && allResultList.size() > 0 ) { |
|
|
|
wxBillPropertyMapper.insertBills(wxPropertyContract.getTenantId() ,allResultList); |
|
|
|
//for (int i = 0 ; i < resultList.size() ; i++) { |
|
|
|
// wxBillPropertyMapper.insert(resultList.get(i)); |
|
|
|
//} |
|
|
|
} |
|
|
|
resultMap.put("billcount",billcount); |
|
|
|
resultMap.put("billList",resultList); |
|
|
|
resultMap.put("billList",propertyResultList); |
|
|
|
return resultMap; |
|
|
|
} |
|
|
|
|
|
|
|
|