shiyunteng
2026-09-18 c5c284896ce6428cffc5092e9cdef4fefc23409f
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);