This commit is contained in:
linfso 2024-07-18 00:36:12 +08:00
parent ecd92d52d1
commit cc38264fe0
12 changed files with 1113 additions and 0 deletions

View File

@ -15,18 +15,27 @@ import java.io.*;
import java.util.*;
import javax.validation.Valid;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONObject;
import com.xdadan.erp.oms.common.annotation.filter.jackson.JacksonFilter;
import com.xdadan.erp.oms.common.core.domain.entity.SysOmsUser;
import com.xdadan.erp.oms.common.utils.DateUtils;
import com.xdadan.erp.oms.common.utils.HTTPHelperV3;
import com.xdadan.erp.oms.common.utils.VerifyCodeUtil;
import com.xdadan.erp.oms.common.utils.spring.SpringUtils;
import com.xdadan.erp.oms.domain.EmisEmailSendRecord;
import com.xdadan.erp.oms.domain.EmisMonthpayUseApply;
import com.xdadan.erp.oms.domain.enumtype.EmisBizErrorType;
import com.xdadan.erp.oms.domain.exception.EmisBizError;
import com.xdadan.erp.oms.domain.vo.*;
import com.xdadan.erp.oms.domain.wms.WmsWarehouse;
import com.xdadan.erp.oms.framework.mq.MQSender;
import com.xdadan.erp.oms.service.*;
import com.xdadan.erp.oms.service.svc.IRpcWaybillSvc;
import com.xdadan.erp.oms.service.svc.IRpcWaybillSvc;
import com.xdadan.erp.oms.service.svc.IRpcWmsWarehouseSvc;
import com.xdadan.erp.oms.system.domain.SysOmsUserRole;
import com.xdadan.erp.oms.system.service.ISysOmsUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -55,6 +64,15 @@ public class Oms2cWaybillController extends BaseController
@Autowired
private IEmisWaybillService emisWaybillService;
@Autowired
private ISysOmsUserService sysOmsUserService;
@Autowired
private IEmisMonthpayUseApplyService emisMonthpayUseApplyService;
@Autowired
private IEmisEmailSendRecordService emisEmailSendRecordService;
@Autowired
private IRpcWaybillSvc iRpcWaybillSvc;
@ -232,5 +250,145 @@ public class Oms2cWaybillController extends BaseController
}
/**
* 绑定月结卡号
* @param monthPayCode
* @return
*/
@GetMapping("/bindMonthPayCode")
public AjaxResult bindMonthPayCode(String monthPayCode)
{
try {
if(StringUtils.isEmpty(monthPayCode)){
return AjaxResult.error("绑定失败,月结卡号必填!");
}
// 查询月结账号是否存在
SysOmsUser qParam = new SysOmsUser();
qParam.setMonthlyPayCode(monthPayCode);
List<SysOmsUser> omsUserList = sysOmsUserService.selectSysOmsUserList(qParam);
if(CollectionUtil.isEmpty(omsUserList)){
return AjaxResult.error("绑定失败,月结卡号不存在!");
}
SysOmsUser sysOmsUser0 = omsUserList.get(0);
String email = sysOmsUser0.getEmail();
if(StringUtils.isEmpty(email)){
return AjaxResult.error("月结卡号对应邮箱不存在,不支持绑定!");
}
// 生成流水号
String nowStr=DateUtils.parseDateToStr(DateUtils.YYYYMMDDHHMMSS,new Date());
String applySeqNo=nowStr+Math.round(Math.random() * 23 + 1000);
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());
emisMonthpayUseApplyService.insertEmisMonthpayUseApply(emisMonthpayUseApply);
//绑定
emisWaybillService.bindMonthPayCode(monthPayCode);
// 插入短信记录
EmisEmailSendRecord emisEmailSendRecord = new EmisEmailSendRecord();
emisEmailSendRecord.setEmail(email);
String sendMsg=getLoginUser().getUser().getCustomerName()+" 申请绑定月结账号:"+monthPayCode+",验证码是"+msgCode;
emisEmailSendRecord.setContent(sendMsg);
emisEmailSendRecordService.insertEmisEmailSendRecord(emisEmailSendRecord);
return AjaxResult.success("你已申请月结账号 "+monthPayCode+" 绑定,联系邮箱"+email+"收取验证码验证。");
}catch (Exception ex){
ex.printStackTrace();
// 返回子定义异常
if(ex instanceof EmisBizError){
return AjaxResult.error(ex.getMessage(),((EmisBizError)ex).getErrorCode());
}
return AjaxResult.error("服务器异常,联系客服");
}
}
/**
* 验证绑定月结卡号
* @param monthPayCode
* @return
*/
@GetMapping("/verifyBindMonthPayCode")
public AjaxResult verifyBindMonthPayCode(String monthPayCode,String code)
{
try {
if(StringUtils.isEmpty(monthPayCode)){
return AjaxResult.error("绑定失败,月结卡号必填!");
}
if(StringUtils.isEmpty(code)){
return AjaxResult.error("验证码必填!");
}
// 查询月结账号是否存在
SysOmsUser qParam = new SysOmsUser();
qParam.setMonthlyPayCode(monthPayCode);
List<SysOmsUser> omsUserList = sysOmsUserService.selectSysOmsUserList(qParam);
if(CollectionUtil.isEmpty(omsUserList)){
return AjaxResult.error("绑定失败,月结卡号不存在!");
}
SysOmsUser sysOmsUser0 = omsUserList.get(0);
String email = sysOmsUser0.getEmail();
if(StringUtils.isEmpty(email)){
return AjaxResult.error("月结卡号对应邮箱不存在,不支持绑定!");
}
// 生成流水号
String nowStr=DateUtils.parseDateToStr(DateUtils.YYYYMMDDHHMMSS,new Date());
String applySeqNo=nowStr+Math.round(Math.random() * 23 + 1000);
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());
emisMonthpayUseApplyService.insertEmisMonthpayUseApply(emisMonthpayUseApply);
// 发送有限发送短信
// SpringUtils.getBean(MQSender.class).sendCustomMessage("TANEX-OMS-OPLOG", JSONObject.toJSONString(operLog));
emisWaybillService.bindMonthPayCode(monthPayCode);
return AjaxResult.success("你已申请月结账号 "+monthPayCode+" 绑定,联系邮箱"+email+"收取验证码验证。");
}catch (Exception ex){
ex.printStackTrace();
// 返回子定义异常
if(ex instanceof EmisBizError){
return AjaxResult.error(ex.getMessage(),((EmisBizError)ex).getErrorCode());
}
return AjaxResult.error("服务器异常,联系客服");
}
}
}

View File

@ -0,0 +1,59 @@
/**
* @Project: emis
* @Title: EmisEmailSendRecord.java
* @author linfso
* @date 2024-07-17 16:24:44
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 短信发送记录表 实体类 </p>
*/
package com.xdadan.erp.oms.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xdadan.erp.oms.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
* @ClassName EmisEmailSendRecord
* @Description 邮件发送记录表
* @author linfso
* @date 2024-07-17 16:24:44
*/
@Data
public class EmisEmailSendRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/* id */
private Long id;
/* 单号 */
private String orderNo;
/* 类型 1-月结验证码 */
private String sendType;
/* emial */
private String email;
/* 内容 */
private String content;
/* 发送渠道 */
private String smsChannel;
/* 发送时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date sendDate;
/* 渠道发送状态 0-未发送 1-已发送 -1 发送错误 */
private String sendStatus;
/* 渠道错误代码 */
private String errCode;
/* 渠道错误信息 */
private String errMsg;
/* 任务处理时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date taskDate;
}

View File

@ -0,0 +1,57 @@
/**
* @Project: emis
* @Title: EmisMonthpayUseApply.java
* @author linfso
* @date 2024-04-24 05:05:23
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 月结账号使用申请关联 实体类 </p>
*/
package com.xdadan.erp.oms.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xdadan.erp.oms.common.core.domain.BaseEntity;
import lombok.Data;
import java.util.Date;
/**
* @ClassName EmisMonthpayUseApply
* @Description 月结账号使用申请关联
* @author linfso
* @date 2024-04-24 05:05:23
*/
@Data
public class EmisMonthpayUseApply extends BaseEntity
{
private static final long serialVersionUID = 1L;
/* id */
private Long id;
/* 月结编号 */
private String custNo;
/* 申请客户编码 */
private String customerCode;
/* 申请序号 */
private String applySeq;
/* 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyDate;
/* 物料名称:电子面单 */
private String applyName;
/* 审核时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date auditDate;
/* 审核状态 0-待审核 1-通过 2-审核拒绝 */
private Integer auditStatus;
/* 审核原因 */
private String auditReson;
/* 审核人编号 */
private String auditBy;
/* 审核验证码 */
private String msgCode;
}

View File

@ -0,0 +1,81 @@
/**
* @Project: emis
* @Title: EmisEmailSendRecordMapper.java
* @author linfso
* @date 2024-07-17 16:24:44
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
* @version v1.0
* @Description: <p> 短信发送记录表 Mapper 接口 </p>
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
*/
package com.xdadan.erp.oms.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xdadan.erp.oms.domain.EmisEmailSendRecord;
/**
* @ClassName EmisEmailSendRecordMapper
* @Description <p> 短信发送记录表 Mapper 接口 </p>
* @author linfso
* @date 2024-07-17 16:24:44
*/
public interface EmisEmailSendRecordMapper extends BaseMapper<EmisEmailSendRecord>
{
/**
* 主键查询
* @param id
* @return
*/
public EmisEmailSendRecord selectEmisEmailSendRecordById(Long id);
/**
* 查询列表
*
* @param emisEmailSendRecord
* @return 集合
*/
public List<EmisEmailSendRecord> selectEmisEmailSendRecordList(EmisEmailSendRecord emisEmailSendRecord);
/**
* 检查是否重复
*
* @param emisEmailSendRecord
* @return 数量
*/
public int checkUnique(EmisEmailSendRecord emisEmailSendRecord);
/**
* 新增
*
* @param emisEmailSendRecord
* @return
*/
public int insertEmisEmailSendRecord(EmisEmailSendRecord emisEmailSendRecord);
/**
* 修改
*
* @param emisEmailSendRecord
* @return
*/
public int updateEmisEmailSendRecord(EmisEmailSendRecord emisEmailSendRecord);
/**
* 删除
*
* @param id 主键
* @return 结果
*/
public int deleteEmisEmailSendRecordById(Long id);
/**
* 批量删除
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmisEmailSendRecordByIds(Long[] ids);
}

View File

@ -0,0 +1,72 @@
/**
* @Project: emis
* @Title: EmisMonthpayUseApplyMapper.java
* @author linfso
* @date 2024-04-24 05:05:23
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
* @version v1.0
* @Description: <p> 月结账号使用申请关联 Mapper 接口 </p>
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
*/
package com.xdadan.erp.oms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xdadan.erp.oms.domain.EmisMonthpayUseApply;
import java.util.List;
/**
* @ClassName EmisMonthpayUseApplyMapper
* @Description <p> 月结账号使用申请关联 Mapper 接口 </p>
* @author linfso
* @date 2024-04-24 05:05:23
*/
public interface EmisMonthpayUseApplyMapper extends BaseMapper<EmisMonthpayUseApply>
{
/**
* 主键查询
* @param id
* @return
*/
public EmisMonthpayUseApply selectEmisMonthpayUseApplyById(Long id);
/**
* 查询列表
*
* @param emisMonthpayUseApply
* @return 集合
*/
public List<EmisMonthpayUseApply> selectEmisMonthpayUseApplyList(EmisMonthpayUseApply emisMonthpayUseApply);
/**
* 新增
*
* @param emisMonthpayUseApply
* @return
*/
public int insertEmisMonthpayUseApply(EmisMonthpayUseApply emisMonthpayUseApply);
/**
* 修改
*
* @param emisMonthpayUseApply
* @return
*/
public int updateEmisMonthpayUseApply(EmisMonthpayUseApply emisMonthpayUseApply);
/**
* 删除
*
* @param id 主键
* @return 结果
*/
public int deleteEmisMonthpayUseApplyById(Long id);
/**
* 批量删除
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmisMonthpayUseApplyByIds(Long[] ids);
}

View File

@ -0,0 +1,117 @@
/**
* @Project: emis
* @Title: EmisEmailSendRecordServiceImpl.java
* @author linfso
* @date 2024-07-17 16:24:44
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 短信发送记录表 实体类 </p>
*/
package com.xdadan.erp.oms.service;
import java.util.List;
import com.xdadan.erp.oms.domain.EmisEmailSendRecord;
import com.xdadan.erp.oms.mapper.EmisEmailSendRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 短信发送记录表Service业务层处理
*
* @author linfso
* @date 2024-07-17 16:24:44
*/
@Service
public class EmisEmailSendRecordServiceImpl implements IEmisEmailSendRecordService
{
@Autowired
private EmisEmailSendRecordMapper emisEmailSendRecordMapper;
/**
* 查询短信发送记录表
*
* @param id 短信发送记录表主键
* @return 短信发送记录表
*/
@Override
public EmisEmailSendRecord selectEmisEmailSendRecordById(Long id)
{
return emisEmailSendRecordMapper.selectEmisEmailSendRecordById(id);
}
/**
* 查询短信发送记录表列表
*
* @param emisEmailSendRecord 短信发送记录表
* @return 短信发送记录表
*/
@Override
public List<EmisEmailSendRecord> selectEmisEmailSendRecordList(EmisEmailSendRecord emisEmailSendRecord)
{
return emisEmailSendRecordMapper.selectEmisEmailSendRecordList(emisEmailSendRecord);
}
/**
* 检查是否重复
*
* @param emisEmailSendRecord
* @return 数量
*/
@Override
public int checkUnique(EmisEmailSendRecord emisEmailSendRecord)
{
return emisEmailSendRecordMapper.checkUnique(emisEmailSendRecord);
}
/**
* 新增短信发送记录表
*
* @param emisEmailSendRecord 短信发送记录表
* @return 结果
*/
@Override
public int insertEmisEmailSendRecord(EmisEmailSendRecord emisEmailSendRecord)
{
return emisEmailSendRecordMapper.insertEmisEmailSendRecord(emisEmailSendRecord);
}
/**
* 修改短信发送记录表
*
* @param emisEmailSendRecord 短信发送记录表
* @return 结果
*/
@Override
public int updateEmisEmailSendRecord(EmisEmailSendRecord emisEmailSendRecord)
{
return emisEmailSendRecordMapper.updateEmisEmailSendRecord(emisEmailSendRecord);
}
/**
* 批量删除短信发送记录表
*
* @param ids 需要删除的短信发送记录表主键
* @return 结果
*/
@Override
public int deleteEmisEmailSendRecordByIds(Long[] ids)
{
return emisEmailSendRecordMapper.deleteEmisEmailSendRecordByIds(ids);
}
/**
* 删除短信发送记录表信息
*
* @param id 短信发送记录表主键
* @return 结果
*/
@Override
public int deleteEmisEmailSendRecordById(Long id)
{
return emisEmailSendRecordMapper.deleteEmisEmailSendRecordById(id);
}
}

View File

@ -0,0 +1,79 @@
/**
* @Project: emis
* @Title: EmisEmailSendRecordService.java
* @author linfso
* @date 2024-07-17 16:24:44
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 短信发送记录表 服务类接口 </p>
*/
package com.xdadan.erp.oms.service;
import com.xdadan.erp.oms.domain.EmisEmailSendRecord;
import java.util.List;
/**
* @ClassName EmisEmailSendRecordService
* @Description 短信发送记录表
* @author linfso
* @date 2024-07-17 16:24:44
*/
public interface IEmisEmailSendRecordService
{
/**
* 主键查询
* @param id
* @return
*/
public EmisEmailSendRecord selectEmisEmailSendRecordById(Long id);
/**
* 查询短信发送记录表列表
*
* @param emisEmailSendRecord 短信发送记录表
* @return 短信发送记录表集合
*/
public List<EmisEmailSendRecord> selectEmisEmailSendRecordList(EmisEmailSendRecord emisEmailSendRecord);
/**
* 检查是否重复
*
* @param emisEmailSendRecord
* @return 数量
*/
public int checkUnique(EmisEmailSendRecord emisEmailSendRecord);
/**
* 新增短信发送记录表
*
* @param emisEmailSendRecord 短信发送记录表
* @return 结果
*/
public int insertEmisEmailSendRecord(EmisEmailSendRecord emisEmailSendRecord);
/**
* 修改短信发送记录表
*
* @param emisEmailSendRecord 短信发送记录表
* @return 结果
*/
public int updateEmisEmailSendRecord(EmisEmailSendRecord emisEmailSendRecord);
/**
* 批量删除短信发送记录表
*
* @param ids 需要删除的短信发送记录表主键集合
* @return 结果
*/
public int deleteEmisEmailSendRecordByIds(Long[] ids);
/**
* 删除短信发送记录表信息
*
* @param id 短信发送记录表主键
* @return 结果
*/
public int deleteEmisEmailSendRecordById(Long id);
}

View File

@ -0,0 +1,71 @@
/**
* @Project: emis
* @Title: EmisMonthpayUseApplyService.java
* @author linfso
* @date 2024-04-24 05:05:23
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 月结账号使用申请关联 服务类接口 </p>
*/
package com.xdadan.erp.oms.service;
import com.xdadan.erp.oms.domain.EmisMonthpayUseApply;
import java.util.List;
/**
* @ClassName EmisMonthpayUseApplyService
* @Description 月结账号使用申请关联
* @author linfso
* @date 2024-04-24 05:05:23
*/
public interface IEmisMonthpayUseApplyService
{
/**
* 主键查询
* @param id
* @return
*/
public EmisMonthpayUseApply selectEmisMonthpayUseApplyById(Long id);
/**
* 查询月结账号使用申请关联列表
*
* @param emisMonthpayUseApply 月结账号使用申请关联
* @return 月结账号使用申请关联集合
*/
public List<EmisMonthpayUseApply> selectEmisMonthpayUseApplyList(EmisMonthpayUseApply emisMonthpayUseApply);
/**
* 新增月结账号使用申请关联
*
* @param emisMonthpayUseApply 月结账号使用申请关联
* @return 结果
*/
public int insertEmisMonthpayUseApply(EmisMonthpayUseApply emisMonthpayUseApply);
/**
* 修改月结账号使用申请关联
*
* @param emisMonthpayUseApply 月结账号使用申请关联
* @return 结果
*/
public int updateEmisMonthpayUseApply(EmisMonthpayUseApply emisMonthpayUseApply);
/**
* 批量删除月结账号使用申请关联
*
* @param ids 需要删除的月结账号使用申请关联主键集合
* @return 结果
*/
public int deleteEmisMonthpayUseApplyByIds(Long[] ids);
/**
* 删除月结账号使用申请关联信息
*
* @param id 月结账号使用申请关联主键
* @return 结果
*/
public int deleteEmisMonthpayUseApplyById(Long id);
}

View File

@ -36,6 +36,8 @@ public interface IEmisWaybillService
public int bindSalesmen(String empCode) throws EmisBizError;
public int bindMonthPayCode(String monthPayCode) throws EmisBizError;

View File

@ -0,0 +1,105 @@
/**
* @Project: emis
* @Title: EmisMonthpayUseApplyServiceImpl.java
* @author linfso
* @date 2024-04-24 05:05:23
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 月结账号使用申请关联 实体类 </p>
*/
package com.xdadan.erp.oms.service.impl;
import com.xdadan.erp.oms.domain.EmisMonthpayUseApply;
import com.xdadan.erp.oms.mapper.EmisMonthpayUseApplyMapper;
import com.xdadan.erp.oms.service.IEmisMonthpayUseApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 月结账号使用申请关联Service业务层处理
*
* @author linfso
* @date 2024-04-24 05:05:23
*/
@Service
public class EmisMonthpayUseApplyServiceImpl implements IEmisMonthpayUseApplyService
{
@Autowired
private EmisMonthpayUseApplyMapper emisMonthpayUseApplyMapper;
/**
* 查询月结账号使用申请关联
*
* @param id 月结账号使用申请关联主键
* @return 月结账号使用申请关联
*/
@Override
public EmisMonthpayUseApply selectEmisMonthpayUseApplyById(Long id)
{
return emisMonthpayUseApplyMapper.selectEmisMonthpayUseApplyById(id);
}
/**
* 查询月结账号使用申请关联列表
*
* @param emisMonthpayUseApply 月结账号使用申请关联
* @return 月结账号使用申请关联
*/
@Override
public List<EmisMonthpayUseApply> selectEmisMonthpayUseApplyList(EmisMonthpayUseApply emisMonthpayUseApply)
{
return emisMonthpayUseApplyMapper.selectEmisMonthpayUseApplyList(emisMonthpayUseApply);
}
/**
* 新增月结账号使用申请关联
*
* @param emisMonthpayUseApply 月结账号使用申请关联
* @return 结果
*/
@Override
public int insertEmisMonthpayUseApply(EmisMonthpayUseApply emisMonthpayUseApply)
{
return emisMonthpayUseApplyMapper.insertEmisMonthpayUseApply(emisMonthpayUseApply);
}
/**
* 修改月结账号使用申请关联
*
* @param emisMonthpayUseApply 月结账号使用申请关联
* @return 结果
*/
@Override
public int updateEmisMonthpayUseApply(EmisMonthpayUseApply emisMonthpayUseApply)
{
return emisMonthpayUseApplyMapper.updateEmisMonthpayUseApply(emisMonthpayUseApply);
}
/**
* 批量删除月结账号使用申请关联
*
* @param ids 需要删除的月结账号使用申请关联主键
* @return 结果
*/
@Override
public int deleteEmisMonthpayUseApplyByIds(Long[] ids)
{
return emisMonthpayUseApplyMapper.deleteEmisMonthpayUseApplyByIds(ids);
}
/**
* 删除月结账号使用申请关联信息
*
* @param id 月结账号使用申请关联主键
* @return 结果
*/
@Override
public int deleteEmisMonthpayUseApplyById(Long id)
{
return emisMonthpayUseApplyMapper.deleteEmisMonthpayUseApplyById(id);
}
}

View File

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xdadan.erp.oms.mapper.EmisEmailSendRecordMapper">
<resultMap type="EmisEmailSendRecord" id="EmisEmailSendRecordResult">
<result property="id" column="id" />
<result property="orderNo" column="order_no" />
<result property="sendType" column="send_type" />
<result property="email" column="email" />
<result property="content" column="content" />
<result property="smsChannel" column="sms_channel" />
<result property="sendDate" column="send_date" />
<result property="sendStatus" column="send_status" />
<result property="errCode" column="err_code" />
<result property="errMsg" column="err_msg" />
<result property="taskDate" column="task_date" />
</resultMap>
<sql id="selectEmisEmailSendRecordVo">
select id, order_no, send_type, email, content, sms_channel, send_date, send_status, err_code, err_msg, task_date, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_email_send_record
</sql>
<select id="selectEmisEmailSendRecordList" parameterType="EmisEmailSendRecord" resultMap="EmisEmailSendRecordResult">
<include refid="selectEmisEmailSendRecordVo"/>
<where>
del_flag='0'
<if test="id != null "> and id = #{id}</if>
<if test="orderNo != null and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
<if test="sendType != null and sendType != ''"> and send_type like concat('%', #{sendType}, '%')</if>
<if test="email != null and email != ''"> and email like concat('%', #{email}, '%')</if>
<if test="content != null and content != ''"> and content like concat('%', #{content}, '%')</if>
<if test="smsChannel != null and smsChannel != ''"> and sms_channel like concat('%', #{smsChannel}, '%')</if>
<if test="sendDate != null "> and send_date = #{sendDate}</if>
<if test="sendStatus != null and sendStatus != ''"> and send_status like concat('%', #{sendStatus}, '%')</if>
<if test="errCode != null and errCode != ''"> and err_code like concat('%', #{errCode}, '%')</if>
<if test="errMsg != null and errMsg != ''"> and err_msg like concat('%', #{errMsg}, '%')</if>
<if test="taskDate != null "> and task_date = #{taskDate}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
</where>
order by create_time desc
</select>
<select id="checkUnique" parameterType="EmisEmailSendRecord" resultType="int">
select count(1) from emis_email_send_record
where del_flag='0'
and id = #{id}
and order_no = #{orderNo}
and send_type = #{sendType}
and email = #{email}
and content = #{content}
and sms_channel = #{smsChannel}
and send_date = #{sendDate}
and send_status = #{sendStatus}
and err_code = #{errCode}
and err_msg = #{errMsg}
and task_date = #{taskDate}
and remark = #{remark}
and tenant_id = #{tenantId}
and del_flag = #{delFlag}
and create_by = #{createBy}
and create_time = #{createTime}
and update_by = #{updateBy}
and update_time = #{updateTime}
and create_site = #{createSite}
and update_site = #{updateSite}
limit 1
</select>
<select id="selectEmisEmailSendRecordById" parameterType="Long" resultMap="EmisEmailSendRecordResult">
select id, order_no, send_type, email, content, sms_channel, send_date, send_status, err_code, err_msg, task_date, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_email_send_record a
where a.id = #{id}
</select>
<insert id="insertEmisEmailSendRecord" parameterType="EmisEmailSendRecord" useGeneratedKeys="true" keyProperty="id">
insert into emis_email_send_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="orderNo != null and orderNo != ''">order_no,</if>
<if test="sendType != null and sendType != ''">send_type,</if>
<if test="email != null and email != ''">email,</if>
<if test="content != null and content != ''">content,</if>
<if test="smsChannel != null and smsChannel != ''">sms_channel,</if>
<if test="sendDate != null">send_date,</if>
<if test="sendStatus != null and sendStatus != ''">send_status,</if>
<if test="errCode != null and errCode != ''">err_code,</if>
<if test="errMsg != null and errMsg != ''">err_msg,</if>
<if test="taskDate != null">task_date,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
<if test="sendType != null and sendType != ''">#{sendType},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="content != null and content != ''">#{content},</if>
<if test="smsChannel != null and smsChannel != ''">#{smsChannel},</if>
<if test="sendDate != null">#{sendDate},</if>
<if test="sendStatus != null and sendStatus != ''">#{sendStatus},</if>
<if test="errCode != null and errCode != ''">#{errCode},</if>
<if test="errMsg != null and errMsg != ''">#{errMsg},</if>
<if test="taskDate != null">#{taskDate},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</insert>
<update id="updateEmisEmailSendRecord" parameterType="EmisEmailSendRecord">
update emis_email_send_record
<trim prefix="SET" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
<if test="sendType != null and sendType != ''">send_type = #{sendType},</if>
<if test="email != null and email != ''">email = #{email},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="smsChannel != null and smsChannel != ''">sms_channel = #{smsChannel},</if>
<if test="sendDate != null">send_date = #{sendDate},</if>
<if test="sendStatus != null and sendStatus != ''">send_status = #{sendStatus},</if>
<if test="errCode != null and errCode != ''">err_code = #{errCode},</if>
<if test="errMsg != null and errMsg != ''">err_msg = #{errMsg},</if>
<if test="taskDate != null">task_date = #{taskDate},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmisEmailSendRecordById" parameterType="Long">
delete from emis_email_send_record where id = #{id}
</delete>
<delete id="deleteEmisEmailSendRecordByIds" parameterType="String">
delete from emis_email_send_record where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xdadan.erp.oms.mapper.EmisMonthpayUseApplyMapper">
<resultMap type="EmisMonthpayUseApply" id="EmisMonthpayUseApplyResult" >
<result property="id" column="id" />
<result property="custNo" column="cust_no" />
<result property="customerCode" column="customer_code" />
<result property="applySeq" column="apply_seq" />
<result property="applyDate" column="apply_date" />
<result property="applyName" column="apply_name" />
<result property="auditDate" column="audit_date" />
<result property="auditStatus" column="audit_status" />
<result property="auditReson" column="audit_reson" />
<result property="auditBy" column="audit_by" />
<result property="msgCode" column="msg_code" />
</resultMap>
<sql id="selectEmisMonthpayUseApplyVo">
select id, cust_no, customer_code, apply_seq, apply_date, apply_name, audit_date, audit_status, audit_reson, audit_by, msg_code, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_monthpay_use_apply
</sql>
<select id="selectEmisMonthpayUseApplyList" parameterType="EmisMonthpayUseApply" resultMap="EmisMonthpayUseApplyResult">
<include refid="selectEmisMonthpayUseApplyVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="custNo != null and custNo != ''"> and cust_no= #{custNo}</if>
<if test="customerCode != null and customerCode != ''"> and customer_code=#{customerCode}</if>
<if test="applySeq != null and applySeq != ''"> and apply_seq like concat('%', #{applySeq}, '%')</if>
<if test="applyDate != null "> and apply_date = #{applyDate}</if>
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
<if test="auditDate != null "> and audit_date = #{auditDate}</if>
<if test="auditStatus != null "> and audit_status = #{auditStatus}</if>
<if test="auditReson != null and auditReson != ''"> and audit_reson like concat('%', #{auditReson}, '%')</if>
<if test="auditBy != null and auditBy != ''"> and audit_by=#{auditBy}</if>
<if test="msgCode != null and msgCode != ''"> and msg_code=#{msgCode}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
</where>
order by create_time desc
</select>
<select id="selectEmisMonthpayUseApplyById" parameterType="Long" resultMap="EmisMonthpayUseApplyResult">
select id, cust_no, customer_code, apply_seq, apply_date, apply_name, audit_date, audit_status, audit_reson, audit_by, msg_code, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_monthpay_use_apply a
where a.id = #{id}
</select>
<insert id="insertEmisMonthpayUseApply" parameterType="EmisMonthpayUseApply">
insert into emis_monthpay_use_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="custNo != null and custNo != ''">cust_no,</if>
<if test="customerCode != null and customerCode != ''">customer_code,</if>
<if test="applySeq != null and applySeq != ''">apply_seq,</if>
<if test="applyDate != null">apply_date,</if>
<if test="applyName != null and applyName != ''">apply_name,</if>
<if test="auditDate != null">audit_date,</if>
<if test="auditStatus != null">audit_status,</if>
<if test="auditReson != null and auditReson != ''">audit_reson,</if>
<if test="auditBy != null and auditBy != ''">audit_by,</if>
<if test="msgCode != null and msgCode != ''">msg_code,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="custNo != null and custNo != ''">#{custNo},</if>
<if test="customerCode != null and customerCode != ''">#{customerCode},</if>
<if test="applySeq != null and applySeq != ''">#{applySeq},</if>
<if test="applyDate != null">#{applyDate},</if>
<if test="applyName != null and applyName != ''">#{applyName},</if>
<if test="auditDate != null">#{auditDate},</if>
<if test="auditStatus != null">#{auditStatus},</if>
<if test="auditReson != null and auditReson != ''">#{auditReson},</if>
<if test="auditBy != null and auditBy != ''">#{auditBy},</if>
<if test="msgCode != null and msgCode != ''">#{msgCode},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</insert>
<update id="updateEmisMonthpayUseApply" parameterType="EmisMonthpayUseApply">
update emis_monthpay_use_apply
<trim prefix="SET" suffixOverrides=",">
<if test="custNo != null and custNo != ''">cust_no = #{custNo},</if>
<if test="customerCode != null and customerCode != ''">customer_code = #{customerCode},</if>
<if test="applySeq != null and applySeq != ''">apply_seq = #{applySeq},</if>
<if test="applyDate != null">apply_date = #{applyDate},</if>
<if test="applyName != null and applyName != ''">apply_name = #{applyName},</if>
<if test="auditDate != null">audit_date = #{auditDate},</if>
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
<if test="auditReson != null and auditReson != ''">audit_reson = #{auditReson},</if>
<if test="auditBy != null and auditBy != ''">audit_by = #{auditBy},</if>
<if test="msgCode != null and msgCode != ''">msg_code = #{msgCode},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmisMonthpayUseApplyById" parameterType="Long">
delete from emis_monthpay_use_apply where id = #{id}
</delete>
<delete id="deleteEmisMonthpayUseApplyByIds" parameterType="String">
delete from emis_monthpay_use_apply where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>