文件上传,切换人脸,打卡,状态编辑,下载资料模板

This commit is contained in:
Teo
2025-04-02 18:31:01 +08:00
parent 6373b97e75
commit c8a8d64127
7 changed files with 709 additions and 19 deletions

View File

@ -1,6 +1,16 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ConstructionUserForm, ConstructionUserQuery, ConstructionUserVO, skipType } from '@/api/project/constructionUser/types';
import {
ConstructionUserForm,
ConstructionUserQuery,
ConstructionUserVO,
skipType,
ConstructionUserStatusForm,
ConstructionUserPlayCardForm,
ConstructionUserSalaryForm,
ConstructionUserExitForm,
ConstructionUserTemplateForm
} from '@/api/project/constructionUser/types';
/**
* 查询施工人员列表
@ -83,3 +93,75 @@ export const delConstructionUser = (id: string | number | Array<string | number>
method: 'delete'
});
};
/**
* 修改施工人员在职状态
* @param data
*/
export const updateConstructionUserStatus = (data: ConstructionUserStatusForm) => {
return request({
url: '/project/constructionUser/batch/status',
method: 'put',
data: data
});
};
/**
* 根据项目id批量修改施工人员打卡状态
* @param data
*/
export const updateConstructionUserPlayCardStatus = (data: ConstructionUserPlayCardForm) => {
return request({
url: '/project/constructionUser/batch/clock',
method: 'put',
data: data
});
};
/**
* 修改施工人员打卡状态
* @param data
*/
export const updateConstructionUserPlayCardOneStatus = (data: ConstructionUserPlayCardForm) => {
return request({
url: '/project/constructionUser/clock',
method: 'put',
data: data
});
};
/**
* 修改施工人员工资
* @param data
*/
export const updateConstructionUserSalary = (data: ConstructionUserSalaryForm) => {
return request({
url: '/project/constructionUser/salary',
method: 'put',
data: data
});
};
/**
* 查询施工人员入退场记录
* @param query
*/
export const getConstructionUserExit = (query: ConstructionUserExitForm) => {
return request({
url: '/project/constructionUserExit/list',
method: 'get',
params: query
});
};
/**
* 下载施工人员文件存储模板
* @param query
*/
export const dowloadConstructionUserTemplate = (query: ConstructionUserTemplateForm) => {
return request({
url: '/project/constructionUserFile/exportFileTemplate',
method: 'get',
params: query
});
};

View File

@ -1,5 +1,6 @@
import { ContractorVO } from '@/api/project/contractor/types';
import { ProjectTeamVO } from '@/api/project/projectTeam/types';
import { S } from 'node_modules/vite/dist/node/types.d-aGj9QkWt';
export interface ConstructionUserVO {
/**
@ -196,6 +197,47 @@ export interface skipType {
id: string | number;
}
export interface ConstructionUserTemplateForm {
/**
* 项目id
*/
projectId: string | number;
}
export interface ConstructionUserExitForm {
/**
* userId
*/
userId: number | string;
}
export interface ConstructionUserSalaryForm {
/**
* 列表
*/
id: number | string;
/**
* 工资
*/
salary?: number | string;
}
export interface ConstructionUserPlayCardForm {
/**
* 项目
*/
projectId?: string | number;
/**
* 用户id
*/
id?: string | number;
/**
* 打卡状态
*/
clock: number | string;
}
export interface skipOptionType {
/**
* 名称
@ -385,6 +427,11 @@ export interface ConstructionUserForm extends BaseEntity {
remark?: string;
}
export interface ConstructionUserStatusForm {
status: number | string;
idList: Array<string | number>;
}
export interface ConstructionUserQuery extends PageQuery {
/**
* 微信id

View File

@ -0,0 +1,40 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ConstructionUserFileVO, ConstructionUserFileForm, ConstructionUserFileQuery } from '@/api/project/constructionUserFile/types';
/**
* 查询施工人员文件存储列表
* @param query
* @returns {*}
*/
export const listConstructionUserFile = (query?: ConstructionUserFileQuery): AxiosPromise<ConstructionUserFileVO[]> => {
return request({
url: '/project/constructionUserFile/list',
method: 'get',
params: query
});
};
/**
* 查询施工人员文件存储详细
* @param data
*/
export const setConstructionUserFile = (data: ConstructionUserFileForm): AxiosPromise<string | number> => {
return request({
url: '/project/constructionUserFile/save',
method: 'post',
data
});
};
/**
* 删除施工人员文件存储
* @param id
*/
export const delConstructionUserFile = (id: string | number | Array<string | number>) => {
return request({
url: '/project/constructionUserFile/' + id,
method: 'delete'
});
};

View File

@ -0,0 +1,133 @@
export interface ConstructionUserFileVO {
/**
* 主键id
*/
id: string | number;
/**
* 用户id
*/
userId: string | number;
/**
* 文件类型
*/
fileType: string;
/**
* 文件名称
*/
fileName: string;
/**
* 文件路径
*/
path: string;
/**
* 备注
*/
remark: string;
}
export interface ConstructionUserExitVO {
/**
* 主键id
*/
id: string | number;
/**
* 用户id
*/
userId: string | number;
/**
* 身份证号码
*/
sfzNumber: string;
/**
* 项目id
*/
projectId: string;
/**
* 班组id
*/
teamId: string;
/**
* 入场时间
*/
entryDate: string;
/**
* 退场时间
*/
leaveDate: string;
/**
* 退场文件
*/
path: string;
/**
* 备注
*/
remark: string;
}
export interface ConstructionUserFileForm extends BaseEntity {
/**
* 用户id
*/
userId?: string | number;
/**
* 文件类型
*/
fileList?: Array<fileListType>;
}
interface fileListType {
fileId: string | number;
fileType: string | number;
}
export interface ConstructionUserFileQuery {
/**
* 主键id
*/
id?: string | number;
/**
* 用户id
*/
userId?: string | number;
/**
* 文件类型
*/
fileType?: string;
/**
* 文件名称
*/
fileName?: string;
/**
* 文件路径
*/
path?: string;
/**
* 备注
*/
remark?: string;
/**
* 日期范围参数
*/
params?: any;
}