Kaynağa Gözat

feat(system): 添加成绩明细API接口

新增成绩明细相关的API接口,包括查询、新增、修改、删除等操作,
同时定义了相应的类型接口用于成绩明细的数据传输和查询。
zhou 3 hafta önce
ebeveyn
işleme
3afab91274

+ 63 - 0
src/api/system/scoreDetail/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ScoreDetailVO, ScoreDetailForm, ScoreDetailQuery } from '@/api/system/scoreDetail/types';
+
+/**
+ * 查询成绩明细列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listScoreDetail = (query?: ScoreDetailQuery): AxiosPromise<ScoreDetailVO[]> => {
+  return request({
+    url: '/system/scoreDetail/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询成绩明细详细
+ * @param detailId
+ */
+export const getScoreDetail = (detailId: string | number): AxiosPromise<ScoreDetailVO> => {
+  return request({
+    url: '/system/scoreDetail/' + detailId,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增成绩明细
+ * @param data
+ */
+export const addScoreDetail = (data: ScoreDetailForm) => {
+  return request({
+    url: '/system/scoreDetail',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改成绩明细
+ * @param data
+ */
+export const updateScoreDetail = (data: ScoreDetailForm) => {
+  return request({
+    url: '/system/scoreDetail',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除成绩明细
+ * @param detailId
+ */
+export const delScoreDetail = (detailId: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/scoreDetail/' + detailId,
+    method: 'delete'
+  });
+};

+ 126 - 0
src/api/system/scoreDetail/types.ts

@@ -0,0 +1,126 @@
+export interface ScoreDetailVO {
+  /**
+   * 明细主键
+   */
+  detailId: string | number;
+
+  /**
+   * 关联主表score_id
+   */
+  scoreId: string | number;
+
+  /**
+   * 轮次/尝试序号(如1,2,3表示第1,2,3次)
+   */
+  attemptIndex: number;
+
+  /**
+   * 单次原始成绩
+   */
+  performanceValue: number;
+
+  /**
+   * 单次失误次数A
+   */
+  faultA: number;
+
+  /**
+   * 单次失误次数B
+   */
+  faultB: number;
+
+  /**
+   * 是否有效(0有效 1犯规/无效)
+   */
+  isValid: string | number;
+
+  /**
+   * 单次备注(如:踩线)
+   */
+  remark: string;
+
+}
+
+export interface ScoreDetailForm extends BaseEntity {
+  /**
+   * 明细主键
+   */
+  detailId?: string | number;
+
+  /**
+   * 关联主表score_id
+   */
+  scoreId?: string | number;
+
+  /**
+   * 轮次/尝试序号(如1,2,3表示第1,2,3次)
+   */
+  attemptIndex?: number;
+
+  /**
+   * 单次原始成绩
+   */
+  performanceValue?: number;
+
+  /**
+   * 单次失误次数A
+   */
+  faultA?: number;
+
+  /**
+   * 单次失误次数B
+   */
+  faultB?: number;
+
+  /**
+   * 是否有效(0有效 1犯规/无效)
+   */
+  isValid?: string | number;
+
+  /**
+   * 单次备注(如:踩线)
+   */
+  remark?: string;
+
+}
+
+export interface ScoreDetailQuery extends PageQuery {
+
+  /**
+   * 关联主表score_id
+   */
+  scoreId?: string | number;
+
+  /**
+   * 轮次/尝试序号(如1,2,3表示第1,2,3次)
+   */
+  attemptIndex?: number;
+
+  /**
+   * 单次原始成绩
+   */
+  performanceValue?: number;
+
+  /**
+   * 单次失误次数A
+   */
+  faultA?: number;
+
+  /**
+   * 单次失误次数B
+   */
+  faultB?: number;
+
+  /**
+   * 是否有效(0有效 1犯规/无效)
+   */
+  isValid?: string | number;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+