From c5c284896ce6428cffc5092e9cdef4fefc23409f Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期五, 18 九月 2026 17:12:49 +0800
Subject: [PATCH] feat: 石煤机客商产品查询处理 合同推送新增选商方式和是否关联交易
---
platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractServiceImpl.java | 65 +++++++++++++++++++++++++++++++-
1 files changed, 63 insertions(+), 2 deletions(-)
diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractServiceImpl.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractServiceImpl.java
index de4258f..c14554a 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractServiceImpl.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractServiceImpl.java
@@ -489,7 +489,16 @@
Contract contract = baseMapper.selectById(id);
+ BusinessCustomer customer = businessCustomerMapper.selectById(contract.getPartyAId());
+ if (ObjUtil.isNull(customer)){
+ return R.failed("瀹㈡埛鏌ヨ寮傚父");
+ }
+ R<SysDept> r = remoteDeptService.getById(SecurityUtils.getUser().getCompId());
+ if (!r.isOk()){
+ return R.failed("淇℃伅鏌ヨ寮傚父");
+ }
+ SysDept comp = r.getData();
//绠�鏄撳悎鍚屾棤娉曠户缁悗缁搷浣�
if (StrUtil.equals(contract.getContractCategory(), "simple")) {
return R.failed("璇疯ˉ鍏呮爣鐨勭墿鍜屾敹娆鹃樁娈靛悗鍐嶈繘琛屾搷浣滐紒");
@@ -498,8 +507,8 @@
eq(ContractSubjectMatter::getContractId,contract.getId()));
//鍚堝悓涓績瀹℃牳
JSONObject requestApply = new JSONObject();
- requestApply.put("fd_selectionmethod", "鍏紑鎷涙爣");
- requestApply.put("fd_isrelated", "鏄�");
+ requestApply.put("fd_selectionmethod", contract.getSelectionMethod());
+ requestApply.put("fd_isrelated", contract.getIsRelated());
requestApply.put("fd_bizId", contract.getId());
requestApply.put("fd_remark", contract.getRemark());
requestApply.put("fd_MainContent", "");
@@ -539,6 +548,26 @@
requestApply.put("fd_customerName", contract.getPartyA());
requestApply.put("fd_systemSource", "闈炵叅閿�鍞郴缁�");
requestApply.put("fd_type", "00");
+ JSONArray signList = new JSONArray();
+ JSONObject j = new JSONObject();
+ j.put("fd_standing","鐢�");
+ j.put("fd_Iden",customer.getCreditCode());
+ j.put("fd_signMain","2");
+ signList.add(j);
+ JSONObject y = new JSONObject();
+ y.put("fd_standing","鐢�");
+ y.put("fd_Iden",comp.getOrgCode());
+ y.put("fd_signMain","1");
+ signList.add(y);
+ requestApply.put("fd_signList", signList);
+ JSONArray attList = new JSONArray();
+ JSONObject att = new JSONObject();
+ att.put("fd_attNum","1");
+ att.put("fd_attName",contract.getAttachmentName());
+ att.put("fd_attQuality","00");
+ att.put("fd_attcontent",NetworkFileToBase64.convertNetworkFileToBase64("https://zbjt.res.jzeg.cn/api" + contract.getAttachmentUrl()));
+ attList.add(att);
+ requestApply.put("attList", att);
log.info("鍚堝悓涓績鍚堝悓璧疯崏鎺ュ彛鍏ュ弬锛歿}", requestApply.toJSONString());
String respApply = HttpUtil.post("https://oa.res.jzeg.cn/ekp/api/km-agreement/kmAgreementWebService/addSupplyContractApply", requestApply.toJSONString());
log.info("鍚堝悓涓績鍚堝悓璧疯崏鎺ュ彛鍥炲弬锛歿}", respApply);
@@ -2344,6 +2373,18 @@
@Override
public R pushCenter(Long id) {
Contract contract = baseMapper.selectById(id);
+
+ BusinessCustomer customer = businessCustomerMapper.selectById(contract.getPartyAId());
+ if (ObjUtil.isNull(customer)){
+ return R.failed("瀹㈡埛鏌ヨ寮傚父");
+ }
+
+ R<SysDept> r = remoteDeptService.getById(SecurityUtils.getUser().getCompId());
+ if (!r.isOk()){
+ return R.failed("淇℃伅鏌ヨ寮傚父");
+ }
+ SysDept comp = r.getData();
+
List<ContractSubjectMatter> subjectMatterList = contractSubjectMatterMapper.selectList(Wrappers.<ContractSubjectMatter>lambdaQuery()
.eq(ContractSubjectMatter::getContractId, id));
JSONObject requestApply = new JSONObject();
@@ -2386,6 +2427,26 @@
requestApply.put("fd_customerName", contract.getPartyA());
requestApply.put("fd_systemSource", "闈炵叅閿�鍞郴缁�");
requestApply.put("fd_type", "00");
+ JSONArray signList = new JSONArray();
+ JSONObject j = new JSONObject();
+ j.put("fd_standing","鐢�");
+ j.put("fd_Iden",customer.getCreditCode());
+ j.put("fd_signMain","2");
+ signList.add(j);
+ JSONObject y = new JSONObject();
+ y.put("fd_standing","鐢�");
+ y.put("fd_Iden",comp.getOrgCode());
+ y.put("fd_signMain","1");
+ signList.add(y);
+ requestApply.put("fd_signList", signList);
+ JSONArray attList = new JSONArray();
+ JSONObject att = new JSONObject();
+ att.put("fd_attNum","1");
+ att.put("fd_attName",contract.getAttachmentName());
+ att.put("fd_attQuality","00");
+ att.put("fd_attcontent",NetworkFileToBase64.convertNetworkFileToBase64("https://zbjt.res.jzeg.cn/api" + contract.getAttachmentUrl()));
+ attList.add(att);
+ requestApply.put("attList", att);
log.info("鍚堝悓涓績鍚堝悓璧疯崏鎺ュ彛鍏ュ弬锛歿}", requestApply.toJSONString());
String respApply = HttpUtil.post("https://oa.res.jzeg.cn/ekp/api/km-agreement/kmAgreementWebService/addSupplyContractApply", requestApply.toJSONString());
log.info("鍚堝悓涓績鍚堝悓璧疯崏鎺ュ彛鍥炲弬锛歿}", respApply);
--
Gitblit v1.9.1