|
@@ -13,13 +13,19 @@ import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
|
|
import com.jkcredit.invoice.model.entity.customer.CustomerRec;
|
|
import com.jkcredit.invoice.model.entity.customer.CustomerRec;
|
|
import com.jkcredit.invoice.model.entity.invoice.BillInvoice;
|
|
import com.jkcredit.invoice.model.entity.invoice.BillInvoice;
|
|
import com.jkcredit.invoice.model.entity.manager.Param;
|
|
import com.jkcredit.invoice.model.entity.manager.Param;
|
|
|
|
+import com.jkcredit.invoice.model.entity.waybill.NoCarCompanyManger;
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarWayBillFileInfo;
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarWayBillFileInfo;
|
|
|
|
+import com.jkcredit.invoice.model.vo.OperatorEditConfirmVo;
|
|
|
|
+import com.jkcredit.invoice.model.vo.OperatorEditVo;
|
|
|
|
+import com.jkcredit.invoice.model.vo.OperatorEvidenceVo;
|
|
|
|
+import com.jkcredit.invoice.model.vo.OperatorSendCodeVo;
|
|
import com.jkcredit.invoice.service.customer.CustomerRecService;
|
|
import com.jkcredit.invoice.service.customer.CustomerRecService;
|
|
import com.jkcredit.invoice.service.lowerservice.NoCarService;
|
|
import com.jkcredit.invoice.service.lowerservice.NoCarService;
|
|
import com.jkcredit.invoice.service.lowerservice.vo.HcInvoiceQueryVo;
|
|
import com.jkcredit.invoice.service.lowerservice.vo.HcInvoiceQueryVo;
|
|
import com.jkcredit.invoice.service.manager.ParamService;
|
|
import com.jkcredit.invoice.service.manager.ParamService;
|
|
import com.jkcredit.invoice.service.nocar.NoCarBillWayImportService;
|
|
import com.jkcredit.invoice.service.nocar.NoCarBillWayImportService;
|
|
|
|
+import com.jkcredit.invoice.service.nocar.NoCarCompanyMangerOper;
|
|
import com.jkcredit.invoice.service.nocar.WayBillFileService;
|
|
import com.jkcredit.invoice.service.nocar.WayBillFileService;
|
|
import com.jkcredit.invoice.util.DateUtil;
|
|
import com.jkcredit.invoice.util.DateUtil;
|
|
import com.jkcredit.invoice.util.RespR;
|
|
import com.jkcredit.invoice.util.RespR;
|
|
@@ -1154,6 +1160,371 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
+ @Autowired
|
|
|
|
+ NoCarCompanyMangerOper noCarCompanyMangerOper;
|
|
|
|
+ @Override
|
|
|
|
+ public DataResult companyDetailAdd(String appKey, String api, String data, String requestid) {
|
|
|
|
+ long costtimestart = System.currentTimeMillis();
|
|
|
|
+
|
|
|
|
+ DataResult result = new DataResult();
|
|
|
|
+
|
|
|
|
+ result.setData(3);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setRequestid(requestid);
|
|
|
|
+ result.setMsg("无法认证");
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
|
+ if (StringUtils.isEmpty(data) || null == jsonObject) {
|
|
|
|
+ result.setMsg("有空的必填运单要素,请检查");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ //税号 必输
|
|
|
|
+ String taxplayerCode = jsonObject.getString("taxplayerCode");
|
|
|
|
+ String operatorName = jsonObject.getString("operatorName");
|
|
|
|
+ String operatorMobile = jsonObject.getString("operatorMobile");
|
|
|
|
+ String identificationId = jsonObject.getString("identificationId");
|
|
|
|
+ String contractFileName = jsonObject.getString("contractFileName");
|
|
|
|
+ String base64Str = jsonObject.getString("base64Str");
|
|
|
|
+ if(StringUtils.isEmpty(taxplayerCode) || StringUtils.isEmpty(operatorName)
|
|
|
|
+ ||StringUtils.isEmpty(operatorMobile) ||StringUtils.isEmpty(contractFileName)
|
|
|
|
+ ||StringUtils.isEmpty(base64Str) ){
|
|
|
|
+ result.setMsg("有空的必填运单要素,请检查");
|
|
|
|
+ }
|
|
|
|
+ CustomerRec customerRec = new CustomerRec();
|
|
|
|
+ customerRec.setCustomerName(appKey);
|
|
|
|
+ customerRec.setCompanyReferencenum(taxplayerCode);
|
|
|
|
+ customerRec = customerRecMapper.selectByCustomerNameAndCompanyReference(customerRec);
|
|
|
|
+ if (customerRec == null) {
|
|
|
|
+ result.setMsg("客户:" + appKey + ";税号" + taxplayerCode + "未在平台备案成功,请先做备案");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ log.info("[-NoCarInterServiceImpl.companyDetailAdd-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
|
+ NoCarCompanyManger noCarCompanyManger = new NoCarCompanyManger();
|
|
|
|
+ noCarCompanyManger.setCompanyNum(customerRec.getCompanyNum());
|
|
|
|
+ noCarCompanyManger.setOperatorName(operatorName);
|
|
|
|
+ noCarCompanyManger.setOperatorMobile(operatorMobile);
|
|
|
|
+ noCarCompanyManger.setIdentificationId(identificationId);
|
|
|
|
+ noCarCompanyManger.setContractFileName(contractFileName);
|
|
|
|
+ noCarCompanyManger.setBase64Str(base64Str);
|
|
|
|
+ RespR re = noCarCompanyMangerOper.companyDetailAdd(noCarCompanyManger);
|
|
|
|
+ long costtimeend = System.currentTimeMillis();
|
|
|
|
+ log.info("[-NoCarInterServiceImpl.companyDetailAdd-] result is "
|
|
|
|
+ + re.toString() + ", request is " + data + " ,costtime="
|
|
|
|
+ + (costtimeend - costtimestart));
|
|
|
|
+ if (null != re && re.getCode()==0) {
|
|
|
|
+ result.setData(1);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setMsg("success");
|
|
|
|
+ return result;
|
|
|
|
+ } else {
|
|
|
|
+ result.setData(3);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setMsg(re.getMsg());
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error("[-NoCarInterServiceImpl.companyDetailAdd-] get httpclient exception is "
|
|
|
|
+ + e + ", request is " + data);
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public DataResult operatorEdit(String appKey, String api, String data, String requestid) {
|
|
|
|
+ long costtimestart = System.currentTimeMillis();
|
|
|
|
+
|
|
|
|
+ DataResult result = new DataResult();
|
|
|
|
+
|
|
|
|
+ result.setData(3);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setRequestid(requestid);
|
|
|
|
+ result.setMsg("无法认证");
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
|
+ if (StringUtils.isEmpty(data) || null == jsonObject) {
|
|
|
|
+ result.setMsg("有空的必填运单要素,请检查");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ //税号 必输
|
|
|
|
+ String taxplayerCode = jsonObject.getString("taxplayerCode");
|
|
|
|
+ String sourceOperatorMobile = jsonObject.getString("sourceOperatorMobile");
|
|
|
|
+ String targetOperatorName = jsonObject.getString("targetOperatorName");
|
|
|
|
+ String targetOperatorMobile = jsonObject.getString("targetOperatorMobile");
|
|
|
|
+ String targetIdentificationId = jsonObject.getString("targetIdentificationId");
|
|
|
|
+ if(StringUtils.isEmpty(taxplayerCode) || StringUtils.isEmpty(targetOperatorName)
|
|
|
|
+ ||StringUtils.isEmpty(targetOperatorMobile) ||StringUtils.isEmpty(sourceOperatorMobile)){
|
|
|
|
+ result.setMsg("有空的必填运单要素,请检查");
|
|
|
|
+ }
|
|
|
|
+ CustomerRec customerRec = new CustomerRec();
|
|
|
|
+ customerRec.setCustomerName(appKey);
|
|
|
|
+ customerRec.setCompanyReferencenum(taxplayerCode);
|
|
|
|
+ customerRec = customerRecMapper.selectByCustomerNameAndCompanyReference(customerRec);
|
|
|
|
+ if (customerRec == null) {
|
|
|
|
+ result.setMsg("客户:" + appKey + ";税号" + taxplayerCode + "未在平台备案成功,请先做备案");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ log.info("[-NoCarInterServiceImpl.operatorEdit-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
|
+ OperatorEditVo operatorEditVo = new OperatorEditVo();
|
|
|
|
+ operatorEditVo.setCompanyNum(customerRec.getCompanyNum());
|
|
|
|
+ operatorEditVo.setSourceOperatorMobile(sourceOperatorMobile);
|
|
|
|
+ operatorEditVo.setTargetOperatorName(targetOperatorName);
|
|
|
|
+ operatorEditVo.setTargetOperatorMobile(targetOperatorMobile);
|
|
|
|
+ operatorEditVo.setTargetIdentificationId(targetIdentificationId);
|
|
|
|
+ RespR re = noCarCompanyMangerOper.operatorEdit(operatorEditVo);
|
|
|
|
+ long costtimeend = System.currentTimeMillis();
|
|
|
|
+ log.info("[-NoCarInterServiceImpl.operatorEdit-] result is "
|
|
|
|
+ + re.toString() + ", request is " + data + " ,costtime="
|
|
|
|
+ + (costtimeend - costtimestart));
|
|
|
|
+ if (null != re && re.getCode()==0) {
|
|
|
|
+ result.setData(1);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setMsg("success");
|
|
|
|
+ return result;
|
|
|
|
+ } else {
|
|
|
|
+ result.setData(3);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setMsg(re.getMsg());
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error("[-NoCarInterServiceImpl.operatorEdit-] get httpclient exception is "
|
|
|
|
+ + e + ", request is " + data);
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public DataResult operatorEditConfirm(String appKey, String api, String data, String requestid) {
|
|
|
|
+ long costtimestart = System.currentTimeMillis();
|
|
|
|
+
|
|
|
|
+ DataResult result = new DataResult();
|
|
|
|
+
|
|
|
|
+ result.setData(3);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setRequestid(requestid);
|
|
|
|
+ result.setMsg("无法认证");
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
|
+ if (StringUtils.isEmpty(data) || null == jsonObject) {
|
|
|
|
+ result.setMsg("有空的必填运单要素,请检查");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ //税号 必输
|
|
|
|
+ String taxplayerCode = jsonObject.getString("taxplayerCode");
|
|
|
|
+ String targetOperatorMobile = jsonObject.getString("targetOperatorMobile");
|
|
|
|
+ String validCode = jsonObject.getString("validCode");
|
|
|
|
+ if(StringUtils.isEmpty(taxplayerCode) || StringUtils.isEmpty(targetOperatorMobile)
|
|
|
|
+ ||StringUtils.isEmpty(validCode)){
|
|
|
|
+ result.setMsg("有空的必填运单要素,请检查");
|
|
|
|
+ }
|
|
|
|
+ CustomerRec customerRec = new CustomerRec();
|
|
|
|
+ customerRec.setCustomerName(appKey);
|
|
|
|
+ customerRec.setCompanyReferencenum(taxplayerCode);
|
|
|
|
+ customerRec = customerRecMapper.selectByCustomerNameAndCompanyReference(customerRec);
|
|
|
|
+ if (customerRec == null) {
|
|
|
|
+ result.setMsg("客户:" + appKey + ";税号" + taxplayerCode + "未在平台备案成功,请先做备案");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ log.info("[-NoCarInterServiceImpl.operatorEditConfirm-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
|
+ OperatorEditConfirmVo operatorEditConfirmVo = new OperatorEditConfirmVo();
|
|
|
|
+ operatorEditConfirmVo.setCompanyNum(customerRec.getCompanyNum());
|
|
|
|
+ operatorEditConfirmVo.setTargetOperatorMobile(targetOperatorMobile);
|
|
|
|
+ operatorEditConfirmVo.setValidCode(validCode);
|
|
|
|
+ RespR re = noCarCompanyMangerOper.operatorEditConfirm(operatorEditConfirmVo);
|
|
|
|
+ long costtimeend = System.currentTimeMillis();
|
|
|
|
+ log.info("[-NoCarInterServiceImpl.operatorEditConfirm-] result is "
|
|
|
|
+ + re.toString() + ", request is " + data + " ,costtime="
|
|
|
|
+ + (costtimeend - costtimestart));
|
|
|
|
+ if (null != re && re.getCode()==0) {
|
|
|
|
+ result.setData(1);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setMsg("success");
|
|
|
|
+ return result;
|
|
|
|
+ } else {
|
|
|
|
+ result.setData(3);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setMsg(re.getMsg());
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error("[-NoCarInterServiceImpl.operatorEditConfirm-] get httpclient exception is "
|
|
|
|
+ + e + ", request is " + data);
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public DataResult operatorEvidence(String appKey, String api, String data, String requestid) {
|
|
|
|
+ long costtimestart = System.currentTimeMillis();
|
|
|
|
+
|
|
|
|
+ DataResult result = new DataResult();
|
|
|
|
+
|
|
|
|
+ result.setData(3);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setRequestid(requestid);
|
|
|
|
+ result.setMsg("无法认证");
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
|
+ if (StringUtils.isEmpty(data) || null == jsonObject) {
|
|
|
|
+ result.setMsg("有空的必填运单要素,请检查");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ //税号 必输
|
|
|
|
+ String taxplayerCode = jsonObject.getString("taxplayerCode");
|
|
|
|
+ String operatorMobile = jsonObject.getString("operatorMobile");
|
|
|
|
+ String contractFileName = jsonObject.getString("contractFileName");
|
|
|
|
+ String base64Str = jsonObject.getString("base64Str");
|
|
|
|
+ if(StringUtils.isEmpty(taxplayerCode)
|
|
|
|
+ ||StringUtils.isEmpty(operatorMobile) ||StringUtils.isEmpty(contractFileName)
|
|
|
|
+ ||StringUtils.isEmpty(base64Str) ){
|
|
|
|
+ result.setMsg("有空的必填运单要素,请检查");
|
|
|
|
+ }
|
|
|
|
+ CustomerRec customerRec = new CustomerRec();
|
|
|
|
+ customerRec.setCustomerName(appKey);
|
|
|
|
+ customerRec.setCompanyReferencenum(taxplayerCode);
|
|
|
|
+ customerRec = customerRecMapper.selectByCustomerNameAndCompanyReference(customerRec);
|
|
|
|
+ if (customerRec == null) {
|
|
|
|
+ result.setMsg("客户:" + appKey + ";税号" + taxplayerCode + "未在平台备案成功,请先做备案");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ log.info("[-NoCarInterServiceImpl.operatorEvidence-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
|
+ OperatorEvidenceVo operatorEvidenceVo = new OperatorEvidenceVo();
|
|
|
|
+ operatorEvidenceVo.setCompanyNum(customerRec.getCompanyNum());
|
|
|
|
+ operatorEvidenceVo.setOperatorMobile(operatorMobile);
|
|
|
|
+ operatorEvidenceVo.setContractFileName(contractFileName);
|
|
|
|
+ operatorEvidenceVo.setBase64Str(base64Str);
|
|
|
|
+ RespR re = noCarCompanyMangerOper.operatorEvidence(operatorEvidenceVo);
|
|
|
|
+ long costtimeend = System.currentTimeMillis();
|
|
|
|
+ log.info("[-NoCarInterServiceImpl.operatorEvidence-] result is "
|
|
|
|
+ + re.toString() + ", request is " + data + " ,costtime="
|
|
|
|
+ + (costtimeend - costtimestart));
|
|
|
|
+ if (null != re && re.getCode()==0) {
|
|
|
|
+ result.setData(1);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setMsg("success");
|
|
|
|
+ return result;
|
|
|
|
+ } else {
|
|
|
|
+ result.setData(3);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setMsg(re.getMsg());
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error("[-NoCarInterServiceImpl.operatorEvidence-] get httpclient exception is "
|
|
|
|
+ + e + ", request is " + data);
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public DataResult operatorSendCode(String appKey, String api, String data, String requestid) {
|
|
|
|
+ long costtimestart = System.currentTimeMillis();
|
|
|
|
+
|
|
|
|
+ DataResult result = new DataResult();
|
|
|
|
+
|
|
|
|
+ result.setData(3);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setRequestid(requestid);
|
|
|
|
+ result.setMsg("无法认证");
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
|
+ if (StringUtils.isEmpty(data) || null == jsonObject) {
|
|
|
|
+ result.setMsg("有空的必填运单要素,请检查");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ //税号 必输
|
|
|
|
+ String taxplayerCode = jsonObject.getString("taxplayerCode");
|
|
|
|
+ if(StringUtils.isEmpty(taxplayerCode)){
|
|
|
|
+ result.setMsg("有空的必填运单要素,请检查");
|
|
|
|
+ }
|
|
|
|
+ CustomerRec customerRec = new CustomerRec();
|
|
|
|
+ customerRec.setCustomerName(appKey);
|
|
|
|
+ customerRec.setCompanyReferencenum(taxplayerCode);
|
|
|
|
+ customerRec = customerRecMapper.selectByCustomerNameAndCompanyReference(customerRec);
|
|
|
|
+ if (customerRec == null) {
|
|
|
|
+ result.setMsg("客户:" + appKey + ";税号" + taxplayerCode + "未在平台备案成功,请先做备案");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ log.info("[-NoCarInterServiceImpl.operatorSendCode-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
|
+ OperatorSendCodeVo operatorSendCodeVo = new OperatorSendCodeVo();
|
|
|
|
+ operatorSendCodeVo.setBuyerCode(taxplayerCode);
|
|
|
|
+ RespR re = noCarCompanyMangerOper.operatorSendCode(operatorSendCodeVo);
|
|
|
|
+ long costtimeend = System.currentTimeMillis();
|
|
|
|
+ log.info("[-NoCarInterServiceImpl.operatorSendCode-] result is "
|
|
|
|
+ + re.toString() + ", request is " + data + " ,costtime="
|
|
|
|
+ + (costtimeend - costtimestart));
|
|
|
|
+ if (null != re && re.getCode()==0) {
|
|
|
|
+ result.setData(1);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setMsg("success");
|
|
|
|
+ return result;
|
|
|
|
+ } else {
|
|
|
|
+ result.setData(3);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setMsg(re.getMsg());
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error("[-NoCarInterServiceImpl.operatorSendCode-] get httpclient exception is "
|
|
|
|
+ + e + ", request is " + data);
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public DataResult operatorValidCode(String appKey, String api, String data, String requestid) {
|
|
|
|
+ long costtimestart = System.currentTimeMillis();
|
|
|
|
+
|
|
|
|
+ DataResult result = new DataResult();
|
|
|
|
|
|
|
|
+ result.setData(3);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setRequestid(requestid);
|
|
|
|
+ result.setMsg("无法认证");
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
|
+ if (StringUtils.isEmpty(data) || null == jsonObject) {
|
|
|
|
+ result.setMsg("有空的必填运单要素,请检查");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ //税号 必输
|
|
|
|
+ String taxplayerCode = jsonObject.getString("taxplayerCode");
|
|
|
|
+ String validCode = jsonObject.getString("validCode");
|
|
|
|
+ if(StringUtils.isEmpty(taxplayerCode)||StringUtils.isEmpty(validCode)){
|
|
|
|
+ result.setMsg("有空的必填运单要素,请检查");
|
|
|
|
+ }
|
|
|
|
+ CustomerRec customerRec = new CustomerRec();
|
|
|
|
+ customerRec.setCustomerName(appKey);
|
|
|
|
+ customerRec.setCompanyReferencenum(taxplayerCode);
|
|
|
|
+ customerRec = customerRecMapper.selectByCustomerNameAndCompanyReference(customerRec);
|
|
|
|
+ if (customerRec == null) {
|
|
|
|
+ result.setMsg("客户:" + appKey + ";税号" + taxplayerCode + "未在平台备案成功,请先做备案");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ log.info("[-NoCarInterServiceImpl.operatorValidCode-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
|
+ OperatorSendCodeVo operatorSendCodeVo = new OperatorSendCodeVo();
|
|
|
|
+ operatorSendCodeVo.setBuyerCode(taxplayerCode);
|
|
|
|
+ operatorSendCodeVo.setValidCode(validCode);
|
|
|
|
+ RespR re = noCarCompanyMangerOper.operatorValidCode(operatorSendCodeVo);
|
|
|
|
+ long costtimeend = System.currentTimeMillis();
|
|
|
|
+ log.info("[-NoCarInterServiceImpl.operatorValidCode-] result is "
|
|
|
|
+ + re.toString() + ", request is " + data + " ,costtime="
|
|
|
|
+ + (costtimeend - costtimestart));
|
|
|
|
+ if (null != re && re.getCode()==0) {
|
|
|
|
+ result.setData(1);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setMsg("success");
|
|
|
|
+ return result;
|
|
|
|
+ } else {
|
|
|
|
+ result.setData(3);
|
|
|
|
+ result.setCode(200);
|
|
|
|
+ result.setMsg(re.getMsg());
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error("[-NoCarInterServiceImpl.operatorValidCode-] get httpclient exception is "
|
|
|
|
+ + e + ", request is " + data);
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
}
|
|
}
|