package com.ruoyi.cwgl.service.impl;
|
|
import java.util.List;
|
|
import com.ruoyi.common.utils.DateUtils;
|
import javax.annotation.Resource;
|
|
import com.ruoyi.cwgl.domain.InvoiceManage;
|
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.cwgl.mapper.InvoiceManageLogMapper;
|
import com.ruoyi.cwgl.domain.InvoiceManageLog;
|
import com.ruoyi.cwgl.service.IInvoiceManageLogService;
|
import com.ruoyi.common.core.text.Convert;
|
|
/**
|
* 发票管理日志Service业务层处理
|
*
|
* @author ruoyi
|
* @date 2026-01-05
|
*/
|
@Service
|
@Transactional(rollbackFor = Exception.class)
|
public class InvoiceManageLogServiceImpl extends BaseService<InvoiceManageLogMapper, InvoiceManageLog> implements IInvoiceManageLogService
|
{
|
protected final Logger logger = LoggerFactory.getLogger(getClass());
|
@Resource
|
private InvoiceManageLogMapper invoiceManageLogMapper;
|
|
|
/**
|
* 查询发票管理日志
|
*
|
* @param id 发票管理日志ID
|
* @return 发票管理日志
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public InvoiceManageLog selectInvoiceManageLogById(Integer id)
|
{
|
return invoiceManageLogMapper.selectInvoiceManageLogById(id);
|
}
|
|
/**
|
* 查询发票管理日志 记录数
|
*
|
* @param invoiceManageLog 发票管理日志
|
* @return 发票管理日志集合
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public int selectInvoiceManageLogCount(InvoiceManageLog invoiceManageLog)
|
{
|
return invoiceManageLogMapper.selectInvoiceManageLogCount(invoiceManageLog);
|
}
|
|
/**
|
* 查询发票管理日志列表
|
*
|
* @param invoiceManageLog 发票管理日志
|
* @return 发票管理日志
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Override
|
public List<InvoiceManageLog> selectInvoiceManageLogList(InvoiceManageLog invoiceManageLog)
|
{
|
return invoiceManageLogMapper.selectInvoiceManageLogList(invoiceManageLog);
|
}
|
|
/**
|
* 查询发票管理日志列表 异步 导出
|
*
|
* @param invoiceManageLog 发票管理日志
|
* @param exportKey 导出功能的唯一标识
|
* @return 发票管理日志集合
|
*/
|
@DataSource(DataSourceType.SLAVE)
|
@Async
|
@Override
|
public void export(InvoiceManageLog invoiceManageLog,String exportKey) {
|
|
super.export(InvoiceManageLog.class,exportKey,"invoiceManageLogData",(pageNum)->{
|
PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
|
return selectInvoiceManageLogList(invoiceManageLog);
|
});
|
}
|
|
|
/**
|
* 新增发票管理日志
|
*
|
* @param invoiceManageLog 发票管理日志
|
* @return 结果
|
*/
|
@Override
|
public int insertInvoiceManageLog(InvoiceManageLog invoiceManageLog)
|
{
|
invoiceManageLog.setCreateTime(DateUtils.getNowDate());
|
return invoiceManageLogMapper.insertInvoiceManageLog(invoiceManageLog);
|
}
|
|
/**
|
* 新增发票管理日志[批量]
|
*
|
* @param invoiceManageLogs 发票管理日志
|
* @return 结果
|
*/
|
@Override
|
public int insertInvoiceManageLogBatch(List<InvoiceManageLog> invoiceManageLogs)
|
{
|
int rows = invoiceManageLogMapper.insertInvoiceManageLogBatch(invoiceManageLogs);
|
return rows;
|
}
|
|
/**
|
* 修改发票管理日志
|
*
|
* @param invoiceManageLog 发票管理日志
|
* @return 结果
|
*/
|
@Override
|
public int updateInvoiceManageLog(InvoiceManageLog invoiceManageLog)
|
{
|
return invoiceManageLogMapper.updateInvoiceManageLog(invoiceManageLog);
|
}
|
|
/**
|
* 修改发票管理日志[批量]
|
*
|
* @param invoiceManageLogs 发票管理日志
|
* @return 结果
|
*/
|
@Override
|
public int updateInvoiceManageLogBatch(List<InvoiceManageLog> invoiceManageLogs){
|
return invoiceManageLogMapper.updateInvoiceManageLogBatch(invoiceManageLogs);
|
}
|
|
/**
|
* 删除发票管理日志对象
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteInvoiceManageLogByIds(String ids)
|
{
|
return deleteInvoiceManageLogByIds(Convert.toIntArray(ids));
|
}
|
|
/**
|
* 删除发票管理日志对象
|
*
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteInvoiceManageLogByIds(Integer[] ids)
|
{
|
return invoiceManageLogMapper.deleteInvoiceManageLogByIds(ids);
|
}
|
|
/**
|
* 删除发票管理日志信息
|
*
|
* @param id 发票管理日志ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteInvoiceManageLogById(Integer id)
|
{
|
return invoiceManageLogMapper.deleteInvoiceManageLogById(id);
|
}
|
}
|