md
This commit is contained in:
parent
0e71fcf497
commit
862a225e42
@ -392,20 +392,30 @@ public class Oms2cWaybillController extends BaseController
|
|||||||
return AjaxResult.error("绑定失败,月结卡号必填!");
|
return AjaxResult.error("绑定失败,月结卡号必填!");
|
||||||
}
|
}
|
||||||
// 查询月结账号是否存在
|
// 查询月结账号是否存在
|
||||||
SysOmsUser qParam = new SysOmsUser();
|
SysOmsUser sysOmsUser0=null;
|
||||||
qParam.setMonthlyPayCode(monthPayCode);
|
|
||||||
|
|
||||||
|
SysOmsUser qParam = new SysOmsUser();
|
||||||
|
qParam.setCustomerType("2");
|
||||||
|
qParam.setMonthlyPayCode(monthPayCode);
|
||||||
List<SysOmsUser> omsUserList = sysOmsUserService.selectSysOmsUserList(qParam);
|
List<SysOmsUser> omsUserList = sysOmsUserService.selectSysOmsUserList(qParam);
|
||||||
if(CollectionUtil.isEmpty(omsUserList)){
|
if(CollectionUtil.isEmpty(omsUserList)){
|
||||||
return AjaxResult.error("绑定失败,月结卡号不存在!");
|
//根据公司名称查询
|
||||||
|
SysOmsUser qParam2 = new SysOmsUser();
|
||||||
|
qParam2.setCustomerName(monthPayCode);
|
||||||
|
qParam2.setCustomerType("2");
|
||||||
|
List<SysOmsUser> omsUserListCompany = sysOmsUserService.selectSysOmsUserList(qParam2);
|
||||||
|
if(CollectionUtil.isEmpty(omsUserListCompany)){
|
||||||
|
return AjaxResult.error("绑定失败,月结卡号不存在!");
|
||||||
|
}
|
||||||
|
|
||||||
|
sysOmsUser0 = omsUserListCompany.get(0);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
sysOmsUser0 = omsUserList.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
SysOmsUser sysOmsUser0 = omsUserList.get(0);
|
monthPayCode = sysOmsUser0.getMonthlyPayCode();
|
||||||
|
|
||||||
String email = sysOmsUser0.getEmail();
|
|
||||||
if(StringUtils.isEmpty(email)){
|
|
||||||
// return AjaxResult.error("月结卡号对应邮箱不存在,不支持绑定!");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 已绑定无需再绑定
|
// 已绑定无需再绑定
|
||||||
EmisMonthpayUseApply applayQuery=new EmisMonthpayUseApply();
|
EmisMonthpayUseApply applayQuery=new EmisMonthpayUseApply();
|
||||||
@ -421,37 +431,21 @@ public class Oms2cWaybillController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 生成流水号
|
// 生成流水号
|
||||||
// String nowStr = DateUtils.parseDateToStr(DateUtils.YYYYMMDDHHMMSS, new Date());
|
String applySeqNo = DBUtil.getSeqNoByLen(8);
|
||||||
// String applySeqNo = nowStr + Math.round(Math.random() * 23 + 1000);
|
String msgCode = VerifyCodeUtil.generateTextCode(VerifyCodeUtil.TYPE_NUM_ONLY, 4, null);
|
||||||
String applySeqNo = DBUtil.getSeqNoByLen(8);
|
|
||||||
|
|
||||||
String msgCode = VerifyCodeUtil.generateTextCode(VerifyCodeUtil.TYPE_NUM_ONLY, 4, null);
|
|
||||||
|
|
||||||
EmisMonthpayUseApply emisMonthpayUseApply = new EmisMonthpayUseApply();
|
|
||||||
emisMonthpayUseApply.setCustomerCode(getLoginUser().getUser().getCustomerCode());
|
|
||||||
emisMonthpayUseApply.setCustNo(monthPayCode);
|
|
||||||
emisMonthpayUseApply.setApplySeq(applySeqNo);
|
|
||||||
emisMonthpayUseApply.setApplyName("月结卡号绑定申请");
|
|
||||||
emisMonthpayUseApply.setMsgCode(msgCode);
|
|
||||||
emisMonthpayUseApply.setApplyDate(new Date());
|
|
||||||
emisMonthpayUseApply.setAuditStatus(0);
|
|
||||||
emisMonthpayUseApplyService.insertEmisMonthpayUseApply(emisMonthpayUseApply);
|
|
||||||
|
|
||||||
//绑定
|
|
||||||
// emisWaybillService.bindMonthPayCode(monthPayCode);
|
|
||||||
|
|
||||||
// 插入短信记录
|
|
||||||
// EmisEmailSendRecord emisEmailSendRecord = new EmisEmailSendRecord();
|
|
||||||
// emisEmailSendRecord.setEmail(email);
|
|
||||||
//// String sendMsg=getLoginUser().getUser().getCustomerName()+" 申请绑定月结账号:"+monthPayCode+",验证码是"+msgCode;
|
|
||||||
// String sendMsg=getLoginUser().getUser().getCustomerName()+" 申请绑定月结账号:"+monthPayCode+",输入月结密码完成绑定。";
|
|
||||||
// emisEmailSendRecord.setContent(sendMsg);
|
|
||||||
// emisEmailSendRecordService.insertEmisEmailSendRecord(emisEmailSendRecord);
|
|
||||||
// return AjaxResult.success("你已申请月结账号 "+monthPayCode+" 绑定,联系邮箱"+email+"收取验证码验证。");
|
|
||||||
return AjaxResult.success("你已申请月结账号 "+monthPayCode+" 绑定,输入月结密码完成绑定。");
|
|
||||||
|
|
||||||
|
EmisMonthpayUseApply emisMonthpayUseApply = new EmisMonthpayUseApply();
|
||||||
|
emisMonthpayUseApply.setCustomerCode(getLoginUser().getUser().getCustomerCode());
|
||||||
|
emisMonthpayUseApply.setCustNo(monthPayCode);
|
||||||
|
emisMonthpayUseApply.setApplySeq(applySeqNo);
|
||||||
|
emisMonthpayUseApply.setApplyName("月结卡号绑定申请");
|
||||||
|
emisMonthpayUseApply.setMsgCode(msgCode);
|
||||||
|
emisMonthpayUseApply.setApplyDate(new Date());
|
||||||
|
emisMonthpayUseApply.setAuditStatus(0);
|
||||||
|
emisMonthpayUseApplyService.insertEmisMonthpayUseApply(emisMonthpayUseApply);
|
||||||
|
|
||||||
|
return AjaxResult.success("已申请月结账号 "+monthPayCode+" 绑定,输入密码完成绑定。");
|
||||||
|
|
||||||
}catch (Exception ex){
|
}catch (Exception ex){
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user