|
@@ -3,6 +3,8 @@ package com.idea.customerManagement.service;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.idea.buildManage.mapper.ParkFloorDiscMapper;
|
|
@@ -24,19 +26,25 @@ import com.idea.customerManagement.model.*;
|
|
|
import com.idea.invoice.model.ReceiptManage;
|
|
|
import com.idea.invoice.model.ReceiptManageExample;
|
|
|
import com.idea.invoice.service.ReceiptManageService;
|
|
|
+import com.idea.invoice.util.InvoiceConstant;
|
|
|
+import com.idea.invoice.util.InvoiceUtil;
|
|
|
import com.idea.paymentManagement.mapper.PayLogMapper;
|
|
|
import com.idea.paymentManagement.model.PayLog;
|
|
|
import com.idea.util.DateUtils;
|
|
|
import com.idea.util.MoneyUtils;
|
|
|
import com.idea.util.ReplaceWord;
|
|
|
import com.rockstar.common.base.BaseService;
|
|
|
+import com.rockstar.common.domain.AjaxResult;
|
|
|
import com.rockstar.frame.model.FrameUser;
|
|
|
import com.rockstar.frame.model.extend.DateTrans;
|
|
|
import com.rockstar.frame.model.extend.Tablepar;
|
|
|
import com.rockstar.frame.service.FrameUserService;
|
|
|
import com.rockstar.shiro.util.ShiroUtils;
|
|
|
import com.rockstar.system.service.SysDictService;
|
|
|
+import com.rockstar.util.MD5Util;
|
|
|
+import com.rockstar.util.SnowflakeIdWorker;
|
|
|
import com.rockstar.util.StringUtils;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -45,6 +53,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.*;
|
|
|
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class IntentionalDepositService implements BaseService<IntentionalDeposit, IntentionalDepositExample> {
|
|
|
|
|
@@ -105,12 +114,12 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
|
|
|
@Override
|
|
|
public int updateByExampleSelective(IntentionalDeposit intentionalDeposit, IntentionalDepositExample intentionalDepositExample) {
|
|
|
- return modelMapper.updateByExampleSelective(intentionalDeposit,intentionalDepositExample);
|
|
|
+ return modelMapper.updateByExampleSelective(intentionalDeposit, intentionalDepositExample);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public int updateByExample(IntentionalDeposit intentionalDeposit, IntentionalDepositExample intentionalDepositExample) {
|
|
|
- return modelMapper.updateByExample(intentionalDeposit,intentionalDepositExample);
|
|
|
+ return modelMapper.updateByExample(intentionalDeposit, intentionalDepositExample);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -130,10 +139,11 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
|
|
|
/**
|
|
|
* 获取收据流水号(意向金编号)
|
|
|
+ *
|
|
|
* @param customerManagementId
|
|
|
* @return
|
|
|
*/
|
|
|
- public String getSerialNumber(String customerManagementId){
|
|
|
+ public String getSerialNumber(String customerManagementId) {
|
|
|
CustomerManagement customerManagement = customerManagementMapper.selectByPrimaryKey(customerManagementId);
|
|
|
String groupId = customerManagement.getGroupId();
|
|
|
String discId = customerManagement.getDiscId();
|
|
@@ -142,24 +152,25 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
example.createCriteria().andGroupIdEqualTo(groupId);
|
|
|
Long count = countByExample(example);
|
|
|
String number = "";
|
|
|
- if(count.doubleValue() == 0){
|
|
|
+ if (count.doubleValue() == 0) {
|
|
|
number = "00001";
|
|
|
- }else {
|
|
|
- count ++;
|
|
|
+ } else {
|
|
|
+ count++;
|
|
|
number = String.format("%05d", count);
|
|
|
}
|
|
|
ParkInfo parkInfo = parkInfoMapper.selectByPrimaryKey(groupId);
|
|
|
ParkFloorDisc parkFloorDisc = parkFloorDiscMapper.selectByPrimaryKey(discId);
|
|
|
- String serialNumber = parkInfo.getGroupName()+ parkFloorDisc.getName() + "-YXJ" + number;
|
|
|
+ String serialNumber = parkInfo.getGroupName() + parkFloorDisc.getName() + "-YXJ" + number;
|
|
|
return serialNumber;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取收据流水号(定金编号)
|
|
|
+ *
|
|
|
* @param id
|
|
|
* @return
|
|
|
*/
|
|
|
- public String getDepositSerialNumber(String id){
|
|
|
+ public String getDepositSerialNumber(String id) {
|
|
|
|
|
|
IntentionalDeposit deposit = selectByPrimaryKey(id);
|
|
|
String groupId = deposit.getGroupId();
|
|
@@ -171,23 +182,24 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
example.createCriteria().andGroupIdEqualTo(groupId).andStatusEqualTo(2);
|
|
|
Long count = roomSelectionInfoMapper.countByExample(example);
|
|
|
String number = "";
|
|
|
- if(count.doubleValue() == 0){
|
|
|
+ if (count.doubleValue() == 0) {
|
|
|
number = "00001";
|
|
|
- }else {
|
|
|
- count ++;
|
|
|
+ } else {
|
|
|
+ count++;
|
|
|
number = String.format("%05d", count);
|
|
|
}
|
|
|
- String serialNumber = parkInfo.getGroupName()+ parkFloorDisc.getName() + "-DJ" + number;
|
|
|
+ String serialNumber = parkInfo.getGroupName() + parkFloorDisc.getName() + "-DJ" + number;
|
|
|
return serialNumber;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 意向金登记
|
|
|
+ *
|
|
|
* @param model
|
|
|
* @return
|
|
|
*/
|
|
|
- public int add(IntentionalDeposit model){
|
|
|
+ public int add(IntentionalDeposit model) {
|
|
|
|
|
|
CustomerManagement customerManagement = customerManagementMapper.selectByPrimaryKey(model.getCustomerManagementId());
|
|
|
String id = IdUtil.simpleUUID();
|
|
@@ -216,10 +228,11 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
|
|
|
/**
|
|
|
* 意向金修改
|
|
|
+ *
|
|
|
* @param model
|
|
|
* @return
|
|
|
*/
|
|
|
- public int edit(IntentionalDeposit model){
|
|
|
+ public int edit(IntentionalDeposit model) {
|
|
|
|
|
|
CustomerManagement customerManagement = customerManagementMapper.selectByPrimaryKey(model.getCustomerManagementId());
|
|
|
model.setGroupId(customerManagement.getGroupId());
|
|
@@ -231,20 +244,21 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
|
|
|
/**
|
|
|
* 根据客户id查找意向金
|
|
|
+ *
|
|
|
* @param customerManagementId
|
|
|
* @return
|
|
|
*/
|
|
|
- public IntentionalDepositDto getByCustomerManagementId(String customerManagementId){
|
|
|
+ public IntentionalDepositDto getByCustomerManagementId(String customerManagementId) {
|
|
|
|
|
|
IntentionalDepositExample example = new IntentionalDepositExample();
|
|
|
example.createCriteria().andCustomerManagementIdEqualTo(customerManagementId);
|
|
|
List<IntentionalDeposit> intentionalDeposits = modelMapper.selectByExampleWithBLOBs(example);
|
|
|
- if(CollectionUtils.isNotEmpty(intentionalDeposits)){
|
|
|
+ if (CollectionUtils.isNotEmpty(intentionalDeposits)) {
|
|
|
IntentionalDepositDto result = new IntentionalDepositDto();
|
|
|
IntentionalDeposit intentionalDeposit = intentionalDeposits.get(0);
|
|
|
- BeanUtil.copyProperties(intentionalDeposit,result);
|
|
|
+ BeanUtil.copyProperties(intentionalDeposit, result);
|
|
|
FrameUser frameUser = frameUserService.selectByPrimaryKey(intentionalDeposit.getCreatedId());
|
|
|
- if(ObjectUtil.isNotNull(frameUser)){
|
|
|
+ if (ObjectUtil.isNotNull(frameUser)) {
|
|
|
result.setCreatedName(frameUser.getTruename());
|
|
|
}
|
|
|
return result;
|
|
@@ -255,6 +269,7 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
|
|
|
/**
|
|
|
* 分页
|
|
|
+ *
|
|
|
* @param tablepar
|
|
|
* @param model
|
|
|
* @param dt
|
|
@@ -269,6 +284,7 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
|
|
|
/**
|
|
|
* 意向金转定金
|
|
|
+ *
|
|
|
* @param model
|
|
|
* @return
|
|
|
*/
|
|
@@ -322,7 +338,7 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
|
|
|
// 转定金后生产合同
|
|
|
String contractId = IdUtil.simpleUUID();
|
|
|
- contractManageService.addContract(roomSelectionInfo,contractId);
|
|
|
+ contractManageService.addContract(roomSelectionInfo, contractId);
|
|
|
|
|
|
// 新增一条定金收款记录
|
|
|
PayLog payLog = new PayLog();
|
|
@@ -369,7 +385,7 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
ReceiptManageExample receiptManageExample = new ReceiptManageExample();
|
|
|
receiptManageExample.createCriteria().andBusinessIdEqualTo(model.getId());
|
|
|
List<ReceiptManage> receiptManages = receiptManageService.selectByExample(receiptManageExample);
|
|
|
- if(CollectionUtils.isNotEmpty(receiptManages)){
|
|
|
+ if (CollectionUtils.isNotEmpty(receiptManages)) {
|
|
|
ReceiptManage manage = receiptManages.get(0);
|
|
|
manage.setAssociationNumber(model.getDepositSerialNumber());
|
|
|
// 已换票
|
|
@@ -378,17 +394,17 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
return result;
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 退意向金
|
|
|
+ *
|
|
|
* @param model
|
|
|
* @return
|
|
|
*/
|
|
|
- public int refund(IntentionalDeposit model){
|
|
|
+ public int refund(IntentionalDeposit model) {
|
|
|
|
|
|
// 退意向金
|
|
|
model.setStatus(3);
|
|
@@ -402,17 +418,18 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
IntentionalDeposit intentionalDeposit = modelMapper.selectByPrimaryKey(id);
|
|
|
IntentionalDepositDto intentionalDepositDto = new IntentionalDepositDto();
|
|
|
String handleName = "";
|
|
|
- if(StringUtils.isNotEmpty(intentionalDeposit.getHandleId())){
|
|
|
+ if (StringUtils.isNotEmpty(intentionalDeposit.getHandleId())) {
|
|
|
FrameUser frameUser = frameUserService.selectByPrimaryKey(intentionalDeposit.getHandleId());
|
|
|
handleName = frameUser == null ? "" : frameUser.getTruename();
|
|
|
}
|
|
|
- BeanUtil.copyProperties(intentionalDeposit,intentionalDepositDto);
|
|
|
+ BeanUtil.copyProperties(intentionalDeposit, intentionalDepositDto);
|
|
|
intentionalDepositDto.setHandleName(handleName);
|
|
|
return intentionalDepositDto;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 意向金收据
|
|
|
+ *
|
|
|
* @param model
|
|
|
* @param response
|
|
|
*/
|
|
@@ -429,16 +446,16 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
List<Buyer> buyers = buyerService.selectByExample(buyerExample);
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
if (CollectionUtils.isNotEmpty(buyers)) {
|
|
|
- for(Buyer buyer: buyers){
|
|
|
+ for (Buyer buyer : buyers) {
|
|
|
builder.append(buyer.getName()).append(",");
|
|
|
}
|
|
|
- if(builder.length() > 0){
|
|
|
- builder.deleteCharAt(builder.length()-1);
|
|
|
+ if (builder.length() > 0) {
|
|
|
+ builder.deleteCharAt(builder.length() - 1);
|
|
|
}
|
|
|
}
|
|
|
String fullName = "(未选房)";
|
|
|
// 意向金只有选房后 才有houseId
|
|
|
- if(StringUtils.isNotEmpty(newRecord.getHouseId())){
|
|
|
+ if (StringUtils.isNotEmpty(newRecord.getHouseId())) {
|
|
|
ParkRoomResponse roomResponse = roomExtendMapper.getFullName(newRecord.getHouseId());
|
|
|
fullName = roomResponse.getGroupName() + "-"
|
|
|
+ roomResponse.getDiscName() + "-"
|
|
@@ -474,13 +491,148 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
settingInfoData = new HashMap<>();
|
|
|
settingInfoData.put("leftOffset", "50");
|
|
|
settingInfoData.put("topOffset", "0");
|
|
|
- settingData.put("${seal}",settingInfoData);
|
|
|
+ settingData.put("${seal}", settingInfoData);
|
|
|
|
|
|
ReplaceWord.operateWord(response, filePath, fileName, data, picData, sealData, settingData);
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 收诚意金 凭证推送
|
|
|
+ *
|
|
|
+ * @param model
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public AjaxResult sendVoucher(IntentionalDepositDto model) {
|
|
|
+
|
|
|
+ // 银行流水id
|
|
|
+ String pkInformerId = model.getPkInformerId();
|
|
|
+ IntentionalDeposit intentionalDeposit = selectByPrimaryKey(model.getId());
|
|
|
+ CustomerManagement customerManagement = customerManagementMapper.selectByPrimaryKey(intentionalDeposit.getCustomerManagementId());
|
|
|
+ BuyerExample buyerExample = new BuyerExample();
|
|
|
+ buyerExample.setOrderByClause("order_num");
|
|
|
+ buyerExample.createCriteria().andCustomerManagementIdEqualTo(customerManagement.getId());
|
|
|
+ List<Buyer> buyers = buyerService.selectByExample(buyerExample);
|
|
|
+ Buyer buyer = buyers.get(0);
|
|
|
+
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ JSONObject ar_gatherbill = new JSONObject();
|
|
|
+ String srcsystemid = model.getId();
|
|
|
+ String billdate = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
|
|
|
+ ar_gatherbill.put("srcsystemid", srcsystemid); //外系统标识,必选
|
|
|
+ ar_gatherbill.put("pk_tradetype", InvoiceConstant.INVOICE_BUSINESS_F2_Cxx_06); //交易类型,必选
|
|
|
+ ar_gatherbill.put("pk_org", InvoiceUtil.pk_org); //组织编码,必选
|
|
|
+ ar_gatherbill.put("billdate", billdate); //单据日期
|
|
|
+ ar_gatherbill.put("def2", srcsystemid); //外系统单据号,必填,
|
|
|
+ json.put("ar_gatherbill", ar_gatherbill);
|
|
|
+
|
|
|
+ JSONArray ar_gatheritem = new JSONArray();
|
|
|
+ JSONObject ar_gatheritemJson = new JSONObject();
|
|
|
+ ar_gatheritemJson.put("srcsystemid", srcsystemid); //外系统子表标识
|
|
|
+ ar_gatheritemJson.put("objtype", "0"); //0=客户,1=供应商--判断customer和supplier是否必填,必选
|
|
|
+ ar_gatheritemJson.put("customer", buyer.getIdentityCard()); //客商的纳税人识别号
|
|
|
+ ar_gatheritemJson.put("money_cr", intentionalDeposit.getReceivedAmount()); //金额,必选
|
|
|
+ ar_gatheritemJson.put("taxrate", "10"); //税率,必选,数字——3/10/6````
|
|
|
+ ar_gatheritemJson.put("pk_balatype", "0"); //结算方式,必选,看云文档结算方式
|
|
|
+ ar_gatheritemJson.put("pk_recpaytype", "001"); //付款业务类型传默认值“001”
|
|
|
+ ar_gatheritemJson.put("prepay", "0"); //收款性质应收款时传"0",收款性质预收款时传"1"
|
|
|
+ ar_gatheritemJson.put("recaccount", InvoiceUtil.bank_number); //收款银行账号,必填
|
|
|
+// ar_gatheritemJson.put("invoiceno","fphm"); //发票号码,非必选
|
|
|
+ ar_gatheritemJson.put("scomment", buyer.getName()); //客户名称,必选
|
|
|
+ ar_gatheritemJson.put("pk_subjcode", InvoiceConstant.INVOICE_PAYMENT_TYPE_AJ026); //收款类型
|
|
|
+ ar_gatheritemJson.put("checktype", InvoiceConstant.INVOICE_RECEIPT_TYPE_3); //票据类型,必选,看云文档票据类型
|
|
|
+ ar_gatheritemJson.put("checkno", intentionalDeposit.getSerialNumber()); //票据号,必选
|
|
|
+ ar_gatheritemJson.put("def9", InvoiceConstant.INVOICE_BUSINESS_FORMAT_001); //业态,必选,看云文档业态
|
|
|
+// ar_gatheritemJson.put("def11", ""); //转出前房号编码,收除了诚意金之外的首期等需要选
|
|
|
+ // TODO: 2024/11/14 具体编码应该是根据小区来的
|
|
|
+ ar_gatheritemJson.put("def10", InvoiceConstant.INVOICE_MATERIAL_djjy); //项目档案编码,看云文档项目档案对照
|
|
|
+ ar_gatheritemJson.put("top_billid", pkInformerId); //到账通知生单时,(银行流水中返回的id,见5.2.10到账通知认领查询pk_informer字段)
|
|
|
+ ar_gatheritem.add(ar_gatheritemJson);
|
|
|
+ json.put("ar_gatheritem", ar_gatheritem);
|
|
|
+
|
|
|
+ try {
|
|
|
+ String result = InvoiceUtil.gatheringbillAdd(json);
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
+ if(jsonObject.getString("success").equals("true")){
|
|
|
+ intentionalDeposit.setNcJson(result);
|
|
|
+ updateByPrimaryKeySelective(intentionalDeposit);
|
|
|
+ }
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("收诚意金凭证推送报错",e);
|
|
|
+ return AjaxResult.error(e.getMessage());
|
|
|
+ }
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 诚意金转定金 凭证推送
|
|
|
+ * @param model
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public AjaxResult sendToDepositVoucher(IntentionalDepositDto model){
|
|
|
+
|
|
|
+ IntentionalDeposit intentionalDeposit = selectByPrimaryKey(model.getId());
|
|
|
+ CustomerManagement customerManagement = customerManagementMapper.selectByPrimaryKey(intentionalDeposit.getCustomerManagementId());
|
|
|
+ BuyerExample buyerExample = new BuyerExample();
|
|
|
+ buyerExample.setOrderByClause("order_num");
|
|
|
+ buyerExample.createCriteria().andCustomerManagementIdEqualTo(customerManagement.getId());
|
|
|
+ List<Buyer> buyers = buyerService.selectByExample(buyerExample);
|
|
|
+ Buyer buyer = buyers.get(0);
|
|
|
+
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ JSONObject ar_gatherbill = new JSONObject();
|
|
|
+ String srcsystemid = MD5Util.encode(model.getId());
|
|
|
+ String billdate = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
|
|
|
+ ar_gatherbill.put("srcsystemid", srcsystemid); //外系统标识,必选
|
|
|
+ ar_gatherbill.put("pk_tradetype", InvoiceConstant.INVOICE_BUSINESS_F2_Cxx_07); //交易类型,必选
|
|
|
+ ar_gatherbill.put("pk_org", InvoiceUtil.pk_org); //组织编码,必选
|
|
|
+ ar_gatherbill.put("billdate", billdate); //单据日期
|
|
|
+ ar_gatherbill.put("def2", srcsystemid); //外系统单据号,必填,
|
|
|
+ json.put("ar_gatherbill", ar_gatherbill);
|
|
|
+
|
|
|
+ JSONArray ar_gatheritem = new JSONArray();
|
|
|
+ JSONObject ar_gatheritemJson = new JSONObject();
|
|
|
+ ar_gatheritemJson.put("srcsystemid", srcsystemid); //外系统子表标识
|
|
|
+ ar_gatheritemJson.put("objtype", "0"); //0=客户,1=供应商--判断customer和supplier是否必填,必选
|
|
|
+ ar_gatheritemJson.put("customer", buyer.getIdentityCard()); //客商的纳税人识别号
|
|
|
+ ar_gatheritemJson.put("money_cr", intentionalDeposit.getReceivedAmount()); //金额,必选
|
|
|
+ ar_gatheritemJson.put("taxrate", "10"); //税率,必选,数字——3/10/6````
|
|
|
+ ar_gatheritemJson.put("pk_balatype", "0"); //结算方式,必选,看云文档结算方式
|
|
|
+ ar_gatheritemJson.put("pk_recpaytype", "001"); //付款业务类型传默认值“001”
|
|
|
+ ar_gatheritemJson.put("prepay", "0"); //收款性质应收款时传"0",收款性质预收款时传"1"
|
|
|
+ ar_gatheritemJson.put("recaccount", InvoiceUtil.bank_number); //收款银行账号,必填
|
|
|
+// ar_gatheritemJson.put("invoiceno","fphm"); //发票号码,非必选
|
|
|
+ ar_gatheritemJson.put("scomment", buyer.getName()); //客户名称,必选
|
|
|
+ ar_gatheritemJson.put("pk_subjcode", InvoiceConstant.INVOICE_PAYMENT_TYPE_AJ001); //收支项目编码,必选,看云文档收支项目对照
|
|
|
+ ar_gatheritemJson.put("def11", customerManagement.getHouseId()); //转出前房号编码,必选
|
|
|
+ ar_gatheritemJson.put("def9", InvoiceConstant.INVOICE_BUSINESS_FORMAT_001); //业态,必选,看云文档业态
|
|
|
+// ar_gatheritemJson.put("def12", ""); //转出后房号编码,换房业务时要选
|
|
|
+ ar_gatheritemJson.put("def14", InvoiceConstant.INVOICE_PAYMENT_TYPE_AJ026); //原收支项目编码,定金转违约金项目时 必选
|
|
|
+// ar_gatheritemJson.put("def13", ""); //换票后票据号,换房业务必选
|
|
|
+ ar_gatheritemJson.put("checktype", InvoiceConstant.INVOICE_RECEIPT_TYPE_3); //票据类型,必选,看云文档票据类型
|
|
|
+ ar_gatheritemJson.put("checkno", intentionalDeposit.getDepositSerialNumber()); //票据号,必选
|
|
|
+ // TODO: 2024/11/14 具体编码 未定
|
|
|
+ ar_gatheritemJson.put("def10", InvoiceConstant.INVOICE_MATERIAL_djjy); //项目档案编码,看云文档项目档案对照
|
|
|
+ ar_gatheritem.add(ar_gatheritemJson);
|
|
|
+ json.put("ar_gatheritem", ar_gatheritem);
|
|
|
+
|
|
|
+ try {
|
|
|
+ String result = InvoiceUtil.gatheringbillTurn(json);
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
+ if(jsonObject.getString("success").equals("true")){
|
|
|
+ intentionalDeposit.setTurnNcJson(result);
|
|
|
+ updateByPrimaryKeySelective(intentionalDeposit);
|
|
|
+ }
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("诚意金转定金凭证推送报错",e);
|
|
|
+ return AjaxResult.error(e.getMessage());
|
|
|
+ }
|
|
|
+ return AjaxResult.success();
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|