|
@@ -38,7 +38,10 @@ import com.idea.paymentManagement.model.PayLog;
|
|
|
import com.idea.paymentManagement.model.PayLogExample;
|
|
|
import com.idea.paymentManagement.model.RefundDetail;
|
|
|
import com.idea.paymentManagement.model.RefundManage;
|
|
|
+import com.idea.transactionRecordManage.mapper.CollectionRecordMapper;
|
|
|
import com.idea.transactionRecordManage.mapper.ConvertRecordMapper;
|
|
|
+import com.idea.transactionRecordManage.model.CollectionRecord;
|
|
|
+import com.idea.transactionRecordManage.model.CollectionRecordExample;
|
|
|
import com.idea.transactionRecordManage.model.ConvertRecord;
|
|
|
import com.idea.transactionRecordManage.model.ConvertRecordExample;
|
|
|
import com.idea.util.DateUtils;
|
|
@@ -108,6 +111,8 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
private PayLogExtendMapper payLogExtendMapper;
|
|
|
@Autowired
|
|
|
private ConvertRecordMapper convertRecordMapper;
|
|
|
+ @Autowired
|
|
|
+ private CollectionRecordMapper collectionRecordMapper;
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -259,7 +264,8 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
|
|
|
// 收款记录 新增一条记录
|
|
|
PayLog payLog = new PayLog();
|
|
|
- payLog.setId(IdUtil.simpleUUID());
|
|
|
+ String payLogId = IdUtil.simpleUUID();
|
|
|
+ payLog.setId(payLogId);
|
|
|
payLog.setHouseId(null);
|
|
|
payLog.setContractId(null);
|
|
|
payLog.setCustomerManagementId(model.getCustomerManagementId());
|
|
@@ -282,6 +288,20 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
payLog.setBankNumber(model.getBankNumber());
|
|
|
payLogMapper.insertSelective(payLog);
|
|
|
|
|
|
+ // TODO: 2025/1/3 具体操作待定
|
|
|
+// // nc收款记录新增一条记录
|
|
|
+// CollectionRecord collectionRecord = new CollectionRecord();
|
|
|
+// BeanUtil.copyProperties(payLog, collectionRecord);
|
|
|
+// collectionRecord.setId(IdUtil.simpleUUID());
|
|
|
+// collectionRecord.setGroupId(customerManagement.getGroupId());
|
|
|
+// collectionRecord.setDiscId(customerManagement.getDiscId());
|
|
|
+// collectionRecord.setBusinessId(payLogId);
|
|
|
+// collectionRecord.setBusinessType("pay_log");
|
|
|
+// collectionRecord.setCreatedAt(new Date());
|
|
|
+// collectionRecord.setCreatedBy(ShiroUtils.getUserId());
|
|
|
+// collectionRecord.setNcSubmitStatus(0);
|
|
|
+// collectionRecordMapper.insertSelective(collectionRecord);
|
|
|
+
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -318,7 +338,7 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
|
|
|
// 收款记录 修改一条记录
|
|
|
PayLogExample payLogExample = new PayLogExample();
|
|
|
- payLogExample.createCriteria().andCustomerManagementIdEqualTo(model.getCustomerManagementId());
|
|
|
+ payLogExample.createCriteria().andBusinessIdEqualTo(model.getId()).andPayTypeEqualTo(7);
|
|
|
List<PayLog> payLogs = payLogMapper.selectByExample(payLogExample);
|
|
|
if(CollectionUtils.isNotEmpty(payLogs)){
|
|
|
PayLog payLog = payLogs.get(0);
|
|
@@ -326,6 +346,21 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
payLog.setUpdatedAt(new Date());
|
|
|
payLog.setUpdatedBy(userId);
|
|
|
payLogMapper.updateByPrimaryKeySelective(payLog);
|
|
|
+
|
|
|
+ // TODO: 2025/1/3 具体操作待定
|
|
|
+// // nc收款记录修改一条记录
|
|
|
+// CollectionRecordExample collectionRecordExample = new CollectionRecordExample();
|
|
|
+// collectionRecordExample.createCriteria().andBusinessIdEqualTo(payLog.getId());
|
|
|
+// List<CollectionRecord> collectionRecords = collectionRecordMapper.selectByExample(collectionRecordExample);
|
|
|
+// if(CollectionUtils.isNotEmpty(collectionRecords)){
|
|
|
+// CollectionRecord collectionRecord = collectionRecords.get(0);
|
|
|
+// collectionRecord.setPayMoney(model.getReceivedAmount());
|
|
|
+// collectionRecord.setUpdatedAt(new Date());
|
|
|
+// collectionRecord.setUpdatedBy(userId);
|
|
|
+// collectionRecordMapper.updateByExampleSelective(collectionRecord,collectionRecordExample);
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return result;
|
|
@@ -540,7 +575,7 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
receiptManageService.updateByPrimaryKeySelective(manage);
|
|
|
}
|
|
|
|
|
|
- // 转换记录新增一条记录
|
|
|
+ // nc转换记录新增一条记录
|
|
|
ConvertRecord convertRecord = new ConvertRecord();
|
|
|
BeanUtil.copyProperties(model, convertRecord);
|
|
|
convertRecord.setId(IdUtil.simpleUUID());
|
|
@@ -551,8 +586,23 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
convertRecord.setConvertType(1);
|
|
|
convertRecord.setCreatedAt(new Date());
|
|
|
convertRecord.setCreatedBy(ShiroUtils.getUserId());
|
|
|
+ convertRecord.setNcSubmitStatus(0);
|
|
|
convertRecordMapper.insertSelective(convertRecord);
|
|
|
|
|
|
+ // TODO: 2025/1/3 具体操作待定
|
|
|
+// // nc收款记录新增一条记录
|
|
|
+// CollectionRecord collectionRecord = new CollectionRecord();
|
|
|
+// BeanUtil.copyProperties(payLog, collectionRecord);
|
|
|
+// collectionRecord.setId(IdUtil.simpleUUID());
|
|
|
+// collectionRecord.setGroupId(response.getGroupId());
|
|
|
+// collectionRecord.setDiscId(response.getDiscId());
|
|
|
+// collectionRecord.setBusinessId(payLogId);
|
|
|
+// collectionRecord.setBusinessType("pay_log");
|
|
|
+// collectionRecord.setCreatedAt(new Date());
|
|
|
+// collectionRecord.setCreatedBy(ShiroUtils.getUserId());
|
|
|
+// collectionRecord.setNcSubmitStatus(0);
|
|
|
+// collectionRecordMapper.insertSelective(collectionRecord);
|
|
|
+
|
|
|
|
|
|
// 转定金
|
|
|
model.setStatus(2);
|
|
@@ -738,142 +788,6 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
|
|
|
}
|
|
|
|
|
|
-// /**
|
|
|
-// * 收诚意金 凭证推送
|
|
|
-// *
|
|
|
-// * @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 id
|
|
|
-// * @return
|
|
|
-// */
|
|
|
-// public AjaxResult sendToDepositVoucher(String id) {
|
|
|
-//
|
|
|
-// IntentionalDeposit intentionalDeposit = selectByPrimaryKey(id);
|
|
|
-// 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(id);
|
|
|
-// 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.setNcJson(result);
|
|
|
-// updateByPrimaryKeySelective(intentionalDeposit);
|
|
|
-// }
|
|
|
-//
|
|
|
-// } catch (Exception e) {
|
|
|
-// log.error("诚意金转定金凭证推送报错", e);
|
|
|
-// return AjaxResult.error(e.getMessage());
|
|
|
-// }
|
|
|
-// return AjaxResult.success();
|
|
|
-//
|
|
|
-// }
|
|
|
|
|
|
|
|
|
}
|