package com.ruoyi.tms.service.impl;
|
|
import java.util.List;
|
|
import com.ruoyi.common.utils.DateUtils;
|
import javax.annotation.Resource;
|
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.stereotype.Service;
|
import org.springframework.scheduling.annotation.Async;
|
import org.slf4j.Logger;
|
import org.slf4j.LoggerFactory;
|
import com.ruoyi.common.utils.PageUtils;
|
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.annotation.DataSource;
|
import com.ruoyi.common.enums.DataSourceType;
|
import com.ruoyi.common.core.service.BaseService;
|
|
import com.ruoyi.tms.mapper.ReceivableAuditLogMapper;
|
import com.ruoyi.tms.domain.ReceivableAuditLog;
|
import com.ruoyi.tms.service.IReceivableAuditLogService;
|
import com.ruoyi.common.core.text.Convert;
|
|
/**
|
* 应收账单审核日志Service业务层处理
|
*
|
* @author ruoyi
|
* @date 2026-04-07
|
*/
|
@Service
|
@Transactional(rollbackFor = Exception.class)
|
public class ReceivableAuditLogServiceImpl extends BaseService<ReceivableAuditLogMapper, ReceivableAuditLog> implements IReceivableAuditLogService
|
{
|
protected final Logger logger = LoggerFactory.getLogger(getClass());
|
@Resource
|
private ReceivableAuditLogMapper receivableAuditLogMapper;
|
|
|
/**
|
* 查询应收账单审核日志
|
*
|
* @param id 应收账单审核日志ID
|
* @return 应收账单审核日志
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public ReceivableAuditLog selectReceivableAuditLogById(Integer id)
|
{
|
return receivableAuditLogMapper.selectReceivableAuditLogById(id);
|
}
|
|
/**
|
* 查询应收账单审核日志 记录数
|
*
|
* @param receivableAuditLog 应收账单审核日志
|
* @return 应收账单审核日志集合
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public int selectReceivableAuditLogCount(ReceivableAuditLog receivableAuditLog)
|
{
|
return receivableAuditLogMapper.selectReceivableAuditLogCount(receivableAuditLog);
|
}
|
|
/**
|
* 查询应收账单审核日志列表
|
*
|
* @param receivableAuditLog 应收账单审核日志
|
* @return 应收账单审核日志
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public List<ReceivableAuditLog> selectReceivableAuditLogList(ReceivableAuditLog receivableAuditLog)
|
{
|
return receivableAuditLogMapper.selectReceivableAuditLogList(receivableAuditLog);
|
}
|
|
/**
|
* 查询应收账单审核日志列表 异步 导出
|
*
|
* @param receivableAuditLog 应收账单审核日志
|
* @param exportKey 导出功能的唯一标识
|
* @return 应收账单审核日志集合
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Async
|
@Override
|
public void export(ReceivableAuditLog receivableAuditLog,String exportKey) {
|
|
super.export(ReceivableAuditLog.class,exportKey,"receivableAuditLogData",(pageNum)->{
|
PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
|
return selectReceivableAuditLogList(receivableAuditLog);
|
});
|
}
|
|
|
/**
|
* 新增应收账单审核日志
|
*
|
* @param receivableAuditLog 应收账单审核日志
|
* @return 结果
|
*/
|
@Override
|
public int insertReceivableAuditLog(ReceivableAuditLog receivableAuditLog)
|
{
|
receivableAuditLog.setCreateTime(DateUtils.getNowDate());
|
return receivableAuditLogMapper.insertReceivableAuditLog(receivableAuditLog);
|
}
|
|
/**
|
* 新增应收账单审核日志[批量]
|
*
|
* @param receivableAuditLogs 应收账单审核日志
|
* @return 结果
|
*/
|
@Override
|
public int insertReceivableAuditLogBatch(List<ReceivableAuditLog> receivableAuditLogs)
|
{
|
int rows = receivableAuditLogMapper.insertReceivableAuditLogBatch(receivableAuditLogs);
|
return rows;
|
}
|
|
/**
|
* 修改应收账单审核日志
|
*
|
* @param receivableAuditLog 应收账单审核日志
|
* @return 结果
|
*/
|
@Override
|
public int updateReceivableAuditLog(ReceivableAuditLog receivableAuditLog)
|
{
|
return receivableAuditLogMapper.updateReceivableAuditLog(receivableAuditLog);
|
}
|
|
/**
|
* 修改应收账单审核日志[批量]
|
*
|
* @param receivableAuditLogs 应收账单审核日志
|
* @return 结果
|
*/
|
@Override
|
public int updateReceivableAuditLogBatch(List<ReceivableAuditLog> receivableAuditLogs){
|
return receivableAuditLogMapper.updateReceivableAuditLogBatch(receivableAuditLogs);
|
}
|
|
/**
|
* 删除应收账单审核日志对象
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteReceivableAuditLogByIds(String ids)
|
{
|
return deleteReceivableAuditLogByIds(Convert.toIntArray(ids));
|
}
|
|
/**
|
* 删除应收账单审核日志对象
|
*
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteReceivableAuditLogByIds(Integer[] ids)
|
{
|
return receivableAuditLogMapper.deleteReceivableAuditLogByIds(ids);
|
}
|
|
/**
|
* 删除应收账单审核日志信息
|
*
|
* @param id 应收账单审核日志ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteReceivableAuditLogById(Integer id)
|
{
|
return receivableAuditLogMapper.deleteReceivableAuditLogById(id);
|
}
|
}
|