|
@@ -1,6 +1,15 @@
|
|
package com.jkcredit.invoice.service.customer.impl;
|
|
package com.jkcredit.invoice.service.customer.impl;
|
|
|
|
|
|
-import cn.com.taiji.sdk.model.comm.protocol.eoms.company.*;
|
|
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.B2bContractAddRequest;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.B2bContractAddResponse;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyAddRequest;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyAddResponse;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyEditRequest;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyEditResponse;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyQueryRequest;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyQueryResponse;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.ConfirmContractAddRequest;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.ConfirmContractAddResponse;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -20,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.REC_STATUS_SUC;
|
|
import static com.jkcredit.invoice.common.CommonConst.REC_STATUS_UN;
|
|
import static com.jkcredit.invoice.common.CommonConst.REC_STATUS_UN;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -196,6 +206,27 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
+ public RespR customerRecEditMail(CustomerRec customerRec) {
|
|
|
|
+ log.info("开始更新备案邮箱:CustomerServiceImpl.customerRecEditMail{}", customerRec);
|
|
|
|
+ CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompany(customerRec);
|
|
|
|
+ if (customerRec1.getRecStatus().intValue() != REC_STATUS_SUC) {
|
|
|
|
+ return new RespR(false, "无法更新邮箱,未备案成功");
|
|
|
|
+ }
|
|
|
|
+ CompanyEditRequest companyEditRequest = new CompanyEditRequest();
|
|
|
|
+ companyEditRequest.setCompanyNum(customerRec.getCompanyNum());
|
|
|
|
+ companyEditRequest.setInvoiceEmail(customerRec.getInvoiceMail());
|
|
|
|
+ RespR<CompanyEditResponse> responseRespR = commInterFace.editEmail(companyEditRequest);
|
|
|
|
+ if (responseRespR.getCode() == 1) {
|
|
|
|
+ log.info("更新备案邮箱失败:CustomerServiceImpl.customerRecEditMail{}---msg{}", customerRec, responseRespR.getMsg());
|
|
|
|
+ return new RespR(false, responseRespR.getMsg());
|
|
|
|
+ } else {
|
|
|
|
+ log.info("更新备案邮箱成功:CustomerServiceImpl.customerRecEditMail");
|
|
|
|
+ customerRecMapper.updateInvoiceMail(customerRec);
|
|
|
|
+ return new RespR("更新备案邮箱成功");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
public RespR contractDownload(String id) {
|
|
public RespR contractDownload(String id) {
|
|
CustomerRec customerRec = customerRecMapper.selectByPrimaryKeyHasBase64(Integer.valueOf(id));
|
|
CustomerRec customerRec = customerRecMapper.selectByPrimaryKeyHasBase64(Integer.valueOf(id));
|
|
return new RespR(customerRec);
|
|
return new RespR(customerRec);
|