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.PayableAuditLogMapper;
|
import com.ruoyi.tms.domain.PayableAuditLog;
|
import com.ruoyi.tms.service.IPayableAuditLogService;
|
import com.ruoyi.common.core.text.Convert;
|
|
/**
|
* 应付账单审核日志Service业务层处理
|
*
|
* @author ruoyi
|
* @date 2026-04-07
|
*/
|
@Service
|
@Transactional(rollbackFor = Exception.class)
|
public class PayableAuditLogServiceImpl extends BaseService<PayableAuditLogMapper, PayableAuditLog> implements IPayableAuditLogService
|
{
|
protected final Logger logger = LoggerFactory.getLogger(getClass());
|
@Resource
|
private PayableAuditLogMapper payableAuditLogMapper;
|
|
|
/**
|
* 查询应付账单审核日志
|
*
|
* @param id 应付账单审核日志ID
|
* @return 应付账单审核日志
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public PayableAuditLog selectPayableAuditLogById(Integer id)
|
{
|
return payableAuditLogMapper.selectPayableAuditLogById(id);
|
}
|
|
/**
|
* 查询应付账单审核日志 记录数
|
*
|
* @param payableAuditLog 应付账单审核日志
|
* @return 应付账单审核日志集合
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public int selectPayableAuditLogCount(PayableAuditLog payableAuditLog)
|
{
|
return payableAuditLogMapper.selectPayableAuditLogCount(payableAuditLog);
|
}
|
|
/**
|
* 查询应付账单审核日志列表
|
*
|
* @param payableAuditLog 应付账单审核日志
|
* @return 应付账单审核日志
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public List<PayableAuditLog> selectPayableAuditLogList(PayableAuditLog payableAuditLog)
|
{
|
return payableAuditLogMapper.selectPayableAuditLogList(payableAuditLog);
|
}
|
|
/**
|
* 查询应付账单审核日志列表 异步 导出
|
*
|
* @param payableAuditLog 应付账单审核日志
|
* @param exportKey 导出功能的唯一标识
|
* @return 应付账单审核日志集合
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Async
|
@Override
|
public void export(PayableAuditLog payableAuditLog,String exportKey) {
|
|
super.export(PayableAuditLog.class,exportKey,"payableAuditLogData",(pageNum)->{
|
PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
|
return selectPayableAuditLogList(payableAuditLog);
|
});
|
}
|
|
|
/**
|
* 新增应付账单审核日志
|
*
|
* @param payableAuditLog 应付账单审核日志
|
* @return 结果
|
*/
|
@Override
|
public int insertPayableAuditLog(PayableAuditLog payableAuditLog)
|
{
|
payableAuditLog.setCreateTime(DateUtils.getNowDate());
|
return payableAuditLogMapper.insertPayableAuditLog(payableAuditLog);
|
}
|
|
/**
|
* 新增应付账单审核日志[批量]
|
*
|
* @param payableAuditLogs 应付账单审核日志
|
* @return 结果
|
*/
|
@Override
|
public int insertPayableAuditLogBatch(List<PayableAuditLog> payableAuditLogs)
|
{
|
int rows = payableAuditLogMapper.insertPayableAuditLogBatch(payableAuditLogs);
|
return rows;
|
}
|
|
/**
|
* 修改应付账单审核日志
|
*
|
* @param payableAuditLog 应付账单审核日志
|
* @return 结果
|
*/
|
@Override
|
public int updatePayableAuditLog(PayableAuditLog payableAuditLog)
|
{
|
return payableAuditLogMapper.updatePayableAuditLog(payableAuditLog);
|
}
|
|
/**
|
* 修改应付账单审核日志[批量]
|
*
|
* @param payableAuditLogs 应付账单审核日志
|
* @return 结果
|
*/
|
@Override
|
public int updatePayableAuditLogBatch(List<PayableAuditLog> payableAuditLogs){
|
return payableAuditLogMapper.updatePayableAuditLogBatch(payableAuditLogs);
|
}
|
|
/**
|
* 删除应付账单审核日志对象
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
@Override
|
public int deletePayableAuditLogByIds(String ids)
|
{
|
return deletePayableAuditLogByIds(Convert.toIntArray(ids));
|
}
|
|
/**
|
* 删除应付账单审核日志对象
|
*
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
@Override
|
public int deletePayableAuditLogByIds(Integer[] ids)
|
{
|
return payableAuditLogMapper.deletePayableAuditLogByIds(ids);
|
}
|
|
/**
|
* 删除应付账单审核日志信息
|
*
|
* @param id 应付账单审核日志ID
|
* @return 结果
|
*/
|
@Override
|
public int deletePayableAuditLogById(Integer id)
|
{
|
return payableAuditLogMapper.deletePayableAuditLogById(id);
|
}
|
}
|