|
@@ -417,36 +417,52 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
*/
|
|
*/
|
|
public void downLoadReceipt(IntentionalDeposit model, HttpServletResponse response) {
|
|
public void downLoadReceipt(IntentionalDeposit model, HttpServletResponse response) {
|
|
|
|
|
|
- // TODO: 2024/10/24 意向金收据暂无word文档
|
|
|
|
- String filePath = "/home/project/settleDown/tem/.docx";
|
|
|
|
|
|
+ IntentionalDeposit newRecord = selectByPrimaryKey(model.getId());
|
|
|
|
+ String filePath = "/home/project/settleDown/tem/receipt.docx";
|
|
String fileName = "意向金收据.docx";
|
|
String fileName = "意向金收据.docx";
|
|
- String customerManagementId = model.getCustomerManagementId();
|
|
|
|
|
|
+ String customerManagementId = newRecord.getCustomerManagementId();
|
|
BuyerExample buyerExample = new BuyerExample();
|
|
BuyerExample buyerExample = new BuyerExample();
|
|
buyerExample.setOrderByClause("order_num asc");
|
|
buyerExample.setOrderByClause("order_num asc");
|
|
buyerExample.createCriteria().andCustomerManagementIdEqualTo(customerManagementId);
|
|
buyerExample.createCriteria().andCustomerManagementIdEqualTo(customerManagementId);
|
|
List<Buyer> buyers = buyerService.selectByExample(buyerExample);
|
|
List<Buyer> buyers = buyerService.selectByExample(buyerExample);
|
|
- String name = "";
|
|
|
|
|
|
+ StringBuilder builder = new StringBuilder();
|
|
if (CollectionUtils.isNotEmpty(buyers)) {
|
|
if (CollectionUtils.isNotEmpty(buyers)) {
|
|
- Buyer buyer = buyers.get(0);
|
|
|
|
- name = buyer.getName();
|
|
|
|
|
|
+ for(Buyer buyer: buyers){
|
|
|
|
+ builder.append(buyer.getName()).append(",");
|
|
|
|
+ }
|
|
|
|
+ if(builder.length() > 0){
|
|
|
|
+ builder.deleteCharAt(builder.length()-1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ String fullName = "";
|
|
|
|
+ // 意向金只有选房后 才有houseId
|
|
|
|
+ if(StringUtils.isNotEmpty(newRecord.getHouseId())){
|
|
|
|
+ ParkRoomResponse roomResponse = roomExtendMapper.getFullName(newRecord.getHouseId());
|
|
|
|
+ fullName = roomResponse.getGroupName() + "-"
|
|
|
|
+ + roomResponse.getDiscName() + "-"
|
|
|
|
+ + roomResponse.getBuildName() + "-"
|
|
|
|
+ + roomResponse.getRoomNo();
|
|
}
|
|
}
|
|
- String collectionTime = DateUtils.parseDateToStr(DateUtils.DATE_CH, model.getCollectionTime());
|
|
|
|
- String content = "定金";
|
|
|
|
|
|
+ String serialNumber = newRecord.getSerialNumber();
|
|
|
|
+ String collectionTime = DateUtils.parseDateToStr(DateUtils.DATE_CH, newRecord.getCollectionTime());
|
|
|
|
+ String content = "意向金";
|
|
String paymentMethod = "";
|
|
String paymentMethod = "";
|
|
- String dictLabel = sysDictService.getDictLabel("COLLECTION_METHODS", model.getPaymentMethod().toString());
|
|
|
|
- if(StringUtils.isNotEmpty(dictLabel)){
|
|
|
|
|
|
+ String dictLabel = sysDictService.getDictLabel("COLLECTION_METHODS", newRecord.getPaymentMethod().toString());
|
|
|
|
+ if (StringUtils.isNotEmpty(dictLabel)) {
|
|
paymentMethod = dictLabel;
|
|
paymentMethod = dictLabel;
|
|
}
|
|
}
|
|
- String receivedAmount = model.getReceivedAmount().toString();
|
|
|
|
|
|
+ String receivedAmount = newRecord.getReceivedAmount().toString();
|
|
String capital = MoneyUtils.amountConversion(receivedAmount);
|
|
String capital = MoneyUtils.amountConversion(receivedAmount);
|
|
|
|
|
|
Map<String, Object> data = new HashMap<>();
|
|
Map<String, Object> data = new HashMap<>();
|
|
Map<String, Object> picData = new HashMap<>();
|
|
Map<String, Object> picData = new HashMap<>();
|
|
Map<String, Object> sealData = new HashMap<>();
|
|
Map<String, Object> sealData = new HashMap<>();
|
|
- data.put("${name}", name);
|
|
|
|
|
|
+ data.put("${serialNumber}", serialNumber);
|
|
|
|
+ data.put("${name}", builder.toString());
|
|
data.put("${collectionTime}", collectionTime);
|
|
data.put("${collectionTime}", collectionTime);
|
|
data.put("${content}", content);
|
|
data.put("${content}", content);
|
|
data.put("${paymentMethod}", paymentMethod);
|
|
data.put("${paymentMethod}", paymentMethod);
|
|
|
|
+ data.put("${fullName}", fullName);
|
|
data.put("${capital}", capital);
|
|
data.put("${capital}", capital);
|
|
data.put("${receivedAmount}", receivedAmount);
|
|
data.put("${receivedAmount}", receivedAmount);
|
|
|
|
|