817 lines
18 KiB
TypeScript
817 lines
18 KiB
TypeScript
import request from '@/utils/request';
|
||
import type { ApiResult } from '@/api';
|
||
import { MODULES_API_URL } from '@/config/setting';
|
||
|
||
/**
|
||
* 生成领导班子列表分析表
|
||
*/
|
||
export async function generateLeaderListTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent1/generateLeaderListTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出领导班子列表分析表到Excel
|
||
*/
|
||
export async function exportLeaderListTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent1/exportLeaderListTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
/**
|
||
* 生成支出情况表
|
||
*/
|
||
export async function generateExpenseTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent1/generateExpenseTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出支出情况表到Excel
|
||
*/
|
||
export async function exportExpenseTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent1/exportExpenseTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
/**
|
||
* 生成单位发展战略执行审计表
|
||
*/
|
||
export async function generateStrategyAuditTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent2/generateStrategyAuditTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出单位发展战略执行审计表到Excel
|
||
*/
|
||
export async function exportStrategyAuditTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent2/exportStrategyAuditTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
/**
|
||
* 生成八项规定对比分析表
|
||
*/
|
||
export async function generateEightRegTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent1/generateEightRegTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出八项规定对比分析表到Excel
|
||
*/
|
||
export async function exportEightRegTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent1/exportEightRegTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
/**
|
||
* 生成重大经济决策调查表
|
||
*/
|
||
export async function generateDecisionTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
data?: any;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent3/generateDecisionTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 生成三重一大制度对比分析表
|
||
*/
|
||
export async function generateTripleOneTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent3/generateTripleOneTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出三重一大制度对比分析表到Excel
|
||
*/
|
||
export async function exportTripleOneTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent3/exportTripleOneTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
/**
|
||
* 导出重大经济决策调查表到Excel
|
||
*/
|
||
export async function exportDecisionTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent3/exportDecisionTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
// =============== 审计内容4:目标完成情况 ===============
|
||
|
||
/**
|
||
* 生成目标责任完成情况表
|
||
*/
|
||
export async function generateTargetTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent4/generateTargetTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出目标责任完成情况表到Excel
|
||
*/
|
||
export async function exportTargetTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent4/exportTargetTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
// =============== 审计内容5:财务管理情况 ===============
|
||
|
||
/**
|
||
* 生成预算管理审计表
|
||
*/
|
||
export async function generateBudgetManageTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
data?: any;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent5/generateBudgetManageTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出预算管理审计表到Excel
|
||
*/
|
||
export async function exportBudgetManageTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent5/exportBudgetManageTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
/**
|
||
* 生成预算执行情况审计表
|
||
*/
|
||
export async function generateBudgetExecutionTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
data?: any;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent5/generateBudgetExecutionTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出预算执行情况审计表到Excel
|
||
*/
|
||
export async function exportBudgetExecutionTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent5/exportBudgetExecutionTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
// =============== 审计内容6:国资管理情况 ===============
|
||
|
||
/**
|
||
* 生成国有资产管理审计表
|
||
*/
|
||
export async function generateAssetsTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent6/generateAssetsTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出国有资产管理审计表到Excel
|
||
*/
|
||
export async function exportAssetsTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent6/exportAssetsTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
// =============== 审计内容7:重大投资情况 ===============
|
||
|
||
/**
|
||
* 生成重大投资情况审计表
|
||
*/
|
||
export async function generateInvestmentSituationTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent7/generateInvestmentSituationTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出重大投资情况审计表到Excel
|
||
*/
|
||
export async function exportInvestmentSituationTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent7/exportInvestmentSituationTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
// =============== 审计内容8:治理结构与内部控制 ===============
|
||
|
||
/**
|
||
* 生成内部控制测试表
|
||
*/
|
||
export async function generateInternalControlTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent8/generateInternalControlTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出内部控制测试表到Excel
|
||
*/
|
||
export async function exportInternalControlTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent8/exportInternalControlTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
// =============== 审计内容9:人员编制管理 ===============
|
||
|
||
/**
|
||
* 生成人员编制管理审计表
|
||
*/
|
||
export async function generatePersonnelTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent9/generatePersonnelTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出人员编制管理审计表到Excel
|
||
*/
|
||
export async function exportPersonnelTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent9/exportPersonnelTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
// =============== 审计内容10:廉政情况 ===============
|
||
|
||
/**
|
||
* 生成党风廉政建设责任制审计表
|
||
*/
|
||
export async function generatePartyConductTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent10/generatePartyConductTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出党风廉政建设责任制审计表到Excel
|
||
*/
|
||
export async function exportPartyConductTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent10/exportPartyConductTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
// =============== 审计内容11:历史审计问题整改 ===============
|
||
|
||
/**
|
||
* 生成历史审计问题整改表
|
||
*/
|
||
export async function generateHistoryTable(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent11/generateHistoryTable',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出历史审计问题整改表到Excel
|
||
*/
|
||
export async function exportHistoryTable(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent11/exportHistoryTable',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
// =============== 审计内容1:贯策决策部署情况 - 补充缺失的接口 ===============
|
||
|
||
/**
|
||
* 生成贯策决策部署表
|
||
*/
|
||
export async function generateDefault1Table(data: {
|
||
kbIds?: string;
|
||
libraryIds?: string;
|
||
projectLibrary?: string;
|
||
history?: string;
|
||
suggestion?: string;
|
||
docList?: any[];
|
||
fileList?: any[];
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditContent1/generateDefault1Table',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 导出贯策决策部署表到Excel
|
||
*/
|
||
export async function exportDefault1Table(data: {
|
||
data?: any[];
|
||
companyName?: string;
|
||
auditTime?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditContent1/exportDefault1Table',
|
||
data,
|
||
{
|
||
responseType: 'blob'
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('导出失败'));
|
||
}
|
||
|
||
/**
|
||
* 生成取证单
|
||
*/
|
||
export async function generateAuditEvidence(data: {
|
||
// 基础信息
|
||
caseIndex?: string; // 案引号
|
||
projectName?: string; // 项目名称
|
||
auditedTarget?: string; // 被审计单位或个人
|
||
auditMatter?: string; // 审计事项
|
||
summaryTitle?: string; // 标题
|
||
auditRecord?: string; // 审计记录
|
||
auditFinding?: string; // 审计发现
|
||
evidenceBasis?: string; // 定性依据
|
||
handling?: string; // 处理
|
||
suggestion?: string; // 建议
|
||
attachment?: string; // 附件
|
||
auditors?: string; // 审计人员
|
||
compileDate?: string; // 编制日期
|
||
providerOpinion?: string; // 证据提供单位意见
|
||
providerDate?: string; // 证据提供日期
|
||
attachmentPages?: string; // 附件页数
|
||
feedbackDeadline?: string; // 反馈期限
|
||
|
||
history?: string; // 历史内容(用于工作流生成)
|
||
}) {
|
||
const res = await request.post<ApiResult<any>>(
|
||
MODULES_API_URL + '/ai/auditEvidence/generate',
|
||
data
|
||
);
|
||
|
||
if (res.data.code === 0) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error(res.data.message));
|
||
}
|
||
|
||
/**
|
||
* 下载审计取证单Word文档
|
||
*/
|
||
export async function downloadAuditEvidence(data: {
|
||
caseIndex?: string;
|
||
pageIndex?: string;
|
||
pageTotal?: string;
|
||
projectName?: string;
|
||
auditedTarget?: string;
|
||
auditMatter?: string;
|
||
summaryTitle?: string;
|
||
auditRecord?: string;
|
||
auditFinding?: string;
|
||
evidenceBasis?: string;
|
||
handling?: string;
|
||
attachment?: string;
|
||
auditors?: string;
|
||
compileDate?: string;
|
||
providerOpinion?: string;
|
||
providerDate?: string;
|
||
attachmentPages?: string;
|
||
feedbackDeadline?: string;
|
||
}) {
|
||
const res = await request.post(
|
||
MODULES_API_URL + '/ai/auditEvidence/download',
|
||
data,
|
||
{
|
||
responseType: 'blob' // 处理二进制流响应
|
||
}
|
||
);
|
||
|
||
if (res.status === 200) {
|
||
return res.data;
|
||
}
|
||
return Promise.reject(new Error('文件下载失败'));
|
||
} |