|
@@ -1,11 +1,18 @@
|
|
package com.jkcredit.invoice.service.nocar.impl;
|
|
package com.jkcredit.invoice.service.nocar.impl;
|
|
|
|
|
|
-import cn.com.taiji.sdk.model.comm.protocol.eoms.company.*;
|
|
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyDetailAddRequest;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyDetailAddResponse;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.OperatorEditConfirmRequest;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.OperatorEditRequest;
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.OperatorEvidenceRequest;
|
|
import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.OperatorSendCodeRequest;
|
|
import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.OperatorSendCodeRequest;
|
|
import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.OperatorValidCodeRequest;
|
|
import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.OperatorValidCodeRequest;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
+import com.jkcredit.invoice.common.CommonConst;
|
|
import com.jkcredit.invoice.mapper.waybill.NoCarCompanyMangerMapper;
|
|
import com.jkcredit.invoice.mapper.waybill.NoCarCompanyMangerMapper;
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarCompanyManger;
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarCompanyManger;
|
|
import com.jkcredit.invoice.model.vo.OperatorEditConfirmVo;
|
|
import com.jkcredit.invoice.model.vo.OperatorEditConfirmVo;
|
|
@@ -35,7 +42,7 @@ public class NoCarCompanyMangerOperImpl extends ServiceImpl<NoCarCompanyMangerMa
|
|
@Override
|
|
@Override
|
|
public RespR companyDetailAdd(NoCarCompanyManger noCarCompanyManger) {
|
|
public RespR companyDetailAdd(NoCarCompanyManger noCarCompanyManger) {
|
|
QueryWrapper<NoCarCompanyManger> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<NoCarCompanyManger> queryWrapper = new QueryWrapper<>();
|
|
- queryWrapper.select("operatorMobile").eq("companyNum",noCarCompanyManger.getCompanyNum());
|
|
|
|
|
|
+ queryWrapper.select("operator_mobile").eq("company_num", noCarCompanyManger.getCompanyNum());
|
|
NoCarCompanyManger noCarCompanyMangerDb = noCarCompanyMangerMapper.selectOne(queryWrapper);
|
|
NoCarCompanyManger noCarCompanyMangerDb = noCarCompanyMangerMapper.selectOne(queryWrapper);
|
|
if(noCarCompanyMangerDb !=null){
|
|
if(noCarCompanyMangerDb !=null){
|
|
return new RespR(false,"已经上传企业开票人,无需重复上传");
|
|
return new RespR(false,"已经上传企业开票人,无需重复上传");
|
|
@@ -46,8 +53,9 @@ public class NoCarCompanyMangerOperImpl extends ServiceImpl<NoCarCompanyMangerMa
|
|
if(respR.getCode() == 1){
|
|
if(respR.getCode() == 1){
|
|
log.error("companyDetailAdd上传失败,失败原因:{}",respR.getMsg());
|
|
log.error("companyDetailAdd上传失败,失败原因:{}",respR.getMsg());
|
|
return new RespR(false,respR.getMsg());
|
|
return new RespR(false,respR.getMsg());
|
|
- }else{
|
|
|
|
- noCarCompanyManger.setStatus("1");
|
|
|
|
|
|
+ }else {
|
|
|
|
+ //开票经办人上传成功(管理端)
|
|
|
|
+ noCarCompanyManger.setStatus("3");
|
|
noCarCompanyMangerMapper.insert(noCarCompanyManger);
|
|
noCarCompanyMangerMapper.insert(noCarCompanyManger);
|
|
return new RespR("success");
|
|
return new RespR("success");
|
|
}
|
|
}
|
|
@@ -141,10 +149,52 @@ public class NoCarCompanyMangerOperImpl extends ServiceImpl<NoCarCompanyMangerMa
|
|
operatorValidCodeRequest.setCompanyNum(companyNum);
|
|
operatorValidCodeRequest.setCompanyNum(companyNum);
|
|
operatorValidCodeRequest.setValidCode(operatorSendCodeVo.getValidCode());
|
|
operatorValidCodeRequest.setValidCode(operatorSendCodeVo.getValidCode());
|
|
RespR respR = noCarInterface.operatorValidCode(operatorValidCodeRequest);
|
|
RespR respR = noCarInterface.operatorValidCode(operatorValidCodeRequest);
|
|
- if(respR.getCode()==1){
|
|
|
|
- return new RespR(false,respR.getMsg());
|
|
|
|
- }else {
|
|
|
|
|
|
+ if (respR.getCode() == 1) {
|
|
|
|
+ return new RespR(false, respR.getMsg());
|
|
|
|
+ } else {
|
|
|
|
+ return new RespR("success");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public IPage getCustomerCompanyManagerDetailPage(Page page, NoCarCompanyManger noCarCompanyManger) {
|
|
|
|
+
|
|
|
|
+ return baseMapper.selectAllCustomerCompanyManagerDetailPage(page, noCarCompanyManger);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public RespR operatorEvidenceAdd(NoCarCompanyManger noCarCompanyManger) {
|
|
|
|
+ log.info("开始上传证明文件:NoCarCompanyMangerOperImpl.operatorEvidenceAdd{}", noCarCompanyManger);
|
|
|
|
+ if (noCarCompanyManger.getStatus().equals(CommonConst.FOR)) {
|
|
|
|
+ return new RespR(false, "证明文件已上传,请误重复上传");
|
|
|
|
+ }
|
|
|
|
+ if (!noCarCompanyManger.getStatus().equals(CommonConst.THREE)) {
|
|
|
|
+ return new RespR(false, "无法上传证明文件,开票经办人未上传或者处于经办人调整过程中");
|
|
|
|
+ }
|
|
|
|
+ OperatorEvidenceRequest operatorEvidenceRequest = new OperatorEvidenceRequest();
|
|
|
|
+ operatorEvidenceRequest.setCompanyNum(noCarCompanyManger.getCompanyNum());
|
|
|
|
+ operatorEvidenceRequest.setOperatorMobile(noCarCompanyManger.getOperatorMobile());
|
|
|
|
+ operatorEvidenceRequest.setBase64Str(noCarCompanyManger.getOperatorEvidenceBase64Str());
|
|
|
|
+ operatorEvidenceRequest.setContractFileName(noCarCompanyManger.getOperatorEvidenceContractFileName());
|
|
|
|
+ RespR respR = noCarInterface.operatorEvidence(operatorEvidenceRequest);
|
|
|
|
+ if (respR.getCode() == 1) {
|
|
|
|
+ log.error("operatorEvidence失败,失败原因:{}", respR.getMsg());
|
|
|
|
+ return new RespR(false, respR.getMsg());
|
|
|
|
+ } else {
|
|
|
|
+ UpdateWrapper<NoCarCompanyManger> updateWrapper = new UpdateWrapper<>();
|
|
|
|
+ updateWrapper.eq("company_num", noCarCompanyManger.getCompanyNum());
|
|
|
|
+ updateWrapper.set("operator_evidence_base64_str", noCarCompanyManger.getOperatorEvidenceBase64Str());
|
|
|
|
+ updateWrapper.set("operator_evidence_contract_file_name", noCarCompanyManger.getOperatorEvidenceContractFileName());
|
|
|
|
+ updateWrapper.set("status", CommonConst.FOR);
|
|
|
|
+ // 4-证明附件上传成功(管理端)
|
|
|
|
+ noCarCompanyManger.setStatus("4");
|
|
|
|
+ noCarCompanyMangerMapper.update(noCarCompanyManger, updateWrapper);
|
|
return new RespR("success");
|
|
return new RespR("success");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public RespR noCarCompanyMangerQuery(NoCarCompanyManger noCarCompanyManger) {
|
|
|
|
+ return new RespR(noCarCompanyMangerMapper.selectBycompanyNumAndOr(noCarCompanyManger));
|
|
|
|
+ }
|
|
}
|
|
}
|