|
@@ -14,6 +14,7 @@ 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.common.CommonConst;
|
|
import com.jkcredit.invoice.mapper.waybill.NoCarCompanyMangerMapper;
|
|
import com.jkcredit.invoice.mapper.waybill.NoCarCompanyMangerMapper;
|
|
|
|
+import com.jkcredit.invoice.model.entity.customer.CustomerRec;
|
|
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;
|
|
import com.jkcredit.invoice.model.vo.OperatorEditVo;
|
|
import com.jkcredit.invoice.model.vo.OperatorEditVo;
|
|
@@ -129,21 +130,39 @@ public class NoCarCompanyMangerOperImpl extends ServiceImpl<NoCarCompanyMangerMa
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public RespR operatorSendCode(OperatorSendCodeVo operatorSendCodeVo) {
|
|
|
|
|
|
+ public RespR operatorSendCode(OperatorSendCodeVo operatorSendCodeVo, CustomerRec customerRec) {
|
|
|
|
+ NoCarCompanyManger noCarCompanyManger = new NoCarCompanyManger();
|
|
|
|
+ noCarCompanyManger.setCompanyNum(customerRec.getCompanyNum());
|
|
|
|
+ QueryWrapper<NoCarCompanyManger> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.select("operator_mobile").eq("company_num", noCarCompanyManger.getCompanyNum());
|
|
|
|
+ NoCarCompanyManger noCarCompanyMangerDb = noCarCompanyMangerMapper.selectOne(queryWrapper);
|
|
|
|
+ if (noCarCompanyMangerDb == null) {
|
|
|
|
+ return new RespR(false, "未上传开票经办人,请联系管理员上传");
|
|
|
|
+ }
|
|
|
|
+
|
|
OperatorSendCodeRequest operatorSendCodeRequest = new OperatorSendCodeRequest();
|
|
OperatorSendCodeRequest operatorSendCodeRequest = new OperatorSendCodeRequest();
|
|
operatorSendCodeRequest.setBuyerCode(operatorSendCodeVo.getBuyerCode());
|
|
operatorSendCodeRequest.setBuyerCode(operatorSendCodeVo.getBuyerCode());
|
|
String companyNum = paramService.getParamsByParamName("REQUEST_COMPANY_NUM").getParamValue();
|
|
String companyNum = paramService.getParamsByParamName("REQUEST_COMPANY_NUM").getParamValue();
|
|
operatorSendCodeRequest.setCompanyNum(companyNum);
|
|
operatorSendCodeRequest.setCompanyNum(companyNum);
|
|
RespR respR = noCarInterface.operatorSendCode(operatorSendCodeRequest);
|
|
RespR respR = noCarInterface.operatorSendCode(operatorSendCodeRequest);
|
|
- 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");
|
|
return new RespR("success");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public RespR operatorValidCode(OperatorSendCodeVo operatorSendCodeVo) {
|
|
|
|
|
|
+ public RespR operatorValidCode(OperatorSendCodeVo operatorSendCodeVo, CustomerRec customerRec) {
|
|
|
|
+ NoCarCompanyManger noCarCompanyManger = new NoCarCompanyManger();
|
|
|
|
+ noCarCompanyManger.setCompanyNum(customerRec.getCompanyNum());
|
|
|
|
+ QueryWrapper<NoCarCompanyManger> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.select("operator_mobile").eq("company_num", noCarCompanyManger.getCompanyNum());
|
|
|
|
+ NoCarCompanyManger noCarCompanyMangerDb = noCarCompanyMangerMapper.selectOne(queryWrapper);
|
|
|
|
+ if (noCarCompanyMangerDb == null) {
|
|
|
|
+ return new RespR(false, "未上传开票经办人,请联系管理员上传");
|
|
|
|
+ }
|
|
|
|
+
|
|
OperatorValidCodeRequest operatorValidCodeRequest = new OperatorValidCodeRequest();
|
|
OperatorValidCodeRequest operatorValidCodeRequest = new OperatorValidCodeRequest();
|
|
operatorValidCodeRequest.setBuyerCode(operatorSendCodeVo.getBuyerCode());
|
|
operatorValidCodeRequest.setBuyerCode(operatorSendCodeVo.getBuyerCode());
|
|
String companyNum = paramService.getParamsByParamName("REQUEST_COMPANY_NUM").getParamValue();
|
|
String companyNum = paramService.getParamsByParamName("REQUEST_COMPANY_NUM").getParamValue();
|