Browse Source

fix: 修复系统故障高优先级问题 - 数据统计与考勤模块

本次更新修复了9个系统故障问题:

高优先级修复:
- 问题6: 修复人才端本月出勤数据初始状态,使用Mock数据生成
- 问题9: 修复人才端出勤率计算,改为固定值(22天,100%)

中优先级修复:
- 问题1: 订单管理薪资改为可手动输入(后端API + 前端Input组件)
- 问题3: 订单详情打卡数据显示固定值100%
- 问题5: 远程打卡提示改为"已打卡成功"

低优先级修复:
- 问题4: 企业端首页人才库跳转使用switchTab
- 问题7: 薪资记录查询改为上个月数据
- 问题8: 移除人才端首页通知模块

验证状态:
- 问题2: 企业端数据统计模块已验证(使用正确账号13800013800后正常显示)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname 18 hours ago
parent
commit
4186ab053d

+ 14 - 13
_bmad-output/implementation-artifacts/tech-spec-system-faults-high-priority-fix.md

@@ -2,8 +2,8 @@
 title: '系统故障高优先级修复 - 数据统计与考勤模块'
 slug: 'system-faults-high-priority-fix'
 created: '2026-03-06T12:30:00Z'
-status: 'ready-for-dev'
-stepsCompleted: [1, 2, 3, 4]
+status: 'implementation-complete'
+stepsCompleted: [1, 2, 3, 4, 5]
 adversarialReviewCompleted: true
 adversarialReviewFindings: 18
 adversarialReviewApplied: true
@@ -11,10 +11,10 @@ tech_stack: ['React', 'TypeScript', 'Taro', 'React Query', 'RPC Client']
 files_to_modify: [
   'allin-packages/order-module/src/routes/order-custom.routes.ts',
   'allin-packages/order-module/src/services/order.service.ts',
+  'allin-packages/order-module/src/schemas/order.schema.ts',
   'allin-packages/order-management-ui/src/components/OrderDetailModal.tsx',
   'mini-ui-packages/yongren-dashboard-ui/src/pages/Dashboard/Dashboard.tsx',
   'mini-ui-packages/yongren-order-management-ui/src/pages/OrderDetail/OrderDetail.tsx',
-  'mini-ui-packages/yongren-statistics-ui/src/pages/Statistics/Statistics.tsx',
   'mini-ui-packages/rencai-attendance-ui/src/pages/AttendancePage/AttendancePage.tsx',
   'mini-ui-packages/rencai-attendance-ui/src/utils/mockAttendanceData.ts',
   'mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx',
@@ -27,6 +27,7 @@ test_patterns: ['Vitest', 'React Testing Library']
 # Tech-Spec: 系统故障高优先级修复 - 数据统计与考勤模块
 
 **Created:** 2026-03-06
+**Completed:** 2026-03-06
 
 ## Overview
 
@@ -270,7 +271,7 @@ test_patterns: ['Vitest', 'React Testing Library']
   - **文件**:`mini-ui-packages/rencai-attendance-ui/src/pages/AttendancePage/AttendancePage.tsx`
   - **问题位置**:第37-43行,初始状态 `normalDays: 0`
 
-- [ ] **任务 6.1:修复初始状态**
+- [x] **任务 6.1:修复初始状态**
   - 文件:`mini-ui-packages/rencai-attendance-ui/src/pages/AttendancePage/AttendancePage.tsx` 第37-43行
   - 修改前:
     ```typescript
@@ -298,7 +299,7 @@ test_patterns: ['Vitest', 'React Testing Library']
   - **问题位置**:第51-75行 `calculateAttendanceStats` 函数
   - **根本原因**:`normalDays` 从所有记录统计,包含周末的 NORMAL 状态
 
-- [ ] **任务 9.1:修复 normalDays 计算逻辑**
+- [x] **任务 9.1:修复 normalDays 计算逻辑**
   - 文件:`mini-ui-packages/rencai-attendance-ui/src/utils/mockAttendanceData.ts` 第58行
   - 修改前:
     ```typescript
@@ -310,7 +311,7 @@ test_patterns: ['Vitest', 'React Testing Library']
     ```
   - 说明:只从工作日(`workDays`)中统计 NORMAL 状态,排除周末
 
-- [ ] **任务 9.2:改为固定值(展示层修复)**
+- [x] **任务 9.2:改为固定值(展示层修复)**
   - 文件:`mini-ui-packages/rencai-attendance-ui/src/utils/mockAttendanceData.ts` 第133-135行
   - 动作:修改 `generateMockAttendanceData` 函数返回值
   - 修改:
@@ -334,7 +335,7 @@ test_patterns: ['Vitest', 'React Testing Library']
   - **薪资字段位置**:第888行
   - **后端文件**:`allin-packages/order-module/src/routes/order-custom.routes.ts`
 
-- [ ] **任务 1.0:新增后端薪资更新 API**
+- [x] **任务 1.0:新增后端薪资更新 API**
   - 文件:`allin-packages/order-module/src/routes/order-custom.routes.ts`
   - 动作:添加新的路由 `PUT /persons/salary`
   - 参考现有路由:`PUT /persons/work-status`、`PUT /persons/dates`
@@ -361,7 +362,7 @@ test_patterns: ['Vitest', 'React Testing Library']
     ```
   - 服务方法:在 `OrderService` 中添加 `updatePersonSalary` 方法
 
-- [ ] **任务 1.1:添加前端薪资编辑功能**
+- [x] **任务 1.1:添加前端薪资编辑功能**
   - 文件:`allin-packages/order-management-ui/src/components/OrderDetailModal.tsx`
   - 位置1:第251行后 - 添加薪资更新 mutation
   - 位置2:第501行后 - 添加 `handleUpdateSalary` 处理函数
@@ -393,7 +394,7 @@ test_patterns: ['Vitest', 'React Testing Library']
   - **文件**:`mini-ui-packages/yongren-order-management-ui/src/pages/OrderDetail/OrderDetail.tsx`
   - **API端点**:`/api/v1/yongren/order/company-orders/:id/stats`
 
-- [ ] **任务 3.1:修改打卡数据显示为固定值**
+- [x] **任务 3.1:修改打卡数据显示为固定值**
   - 文件:`mini-ui-packages/yongren-order-management-ui/src/pages/OrderDetail/OrderDetail.tsx`
   - **位置1**:第540行 - 打卡完成率
   - **位置2**:第547行 - 工资视频百分比
@@ -418,7 +419,7 @@ test_patterns: ['Vitest', 'React Testing Library']
   - **文件**:`mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx`
   - **位置**:第151行 `handleClockIn` 函数
 
-- [ ] **任务 5.1:修改远程打卡提示文案**
+- [x] **任务 5.1:修改远程打卡提示文案**
   - 文件:`mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx` 第151行
   - 修改前:
     ```typescript
@@ -443,7 +444,7 @@ test_patterns: ['Vitest', 'React Testing Library']
   - **问题根源**:使用了 `Taro.navigateTo` 而非 `Taro.switchTab`
   - **原因**:人才库页面是 tabBar 页面,`navigateTo` 无法跳转
 
-- [ ] **任务 4.1:修复跳转方法**
+- [x] **任务 4.1:修复跳转方法**
   - 文件:`mini-ui-packages/yongren-dashboard-ui/src/pages/Dashboard/Dashboard.tsx` 第130行
   - 修改前:
     ```typescript
@@ -469,7 +470,7 @@ test_patterns: ['Vitest', 'React Testing Library']
   - **当前行为**:显示所有薪资记录中最近的 3 条
   - **后端支持**:已支持 `month` 参数过滤
 
-- [ ] **任务 7.1:修改薪资查询时间范围**
+- [x] **任务 7.1:修改薪资查询时间范围**
   - 文件:`mini-ui-packages/rencai-employment-ui/src/pages/EmploymentPage/EmploymentPage.tsx` 第60-72行
   - 修改前:
     ```typescript
@@ -496,7 +497,7 @@ test_patterns: ['Vitest', 'React Testing Library']
   - **⚠️ 重要说明**:问题标题说"企业端",但截图实际是**人才端首页**
   - **通知模块位置**:第307-343行
 
-- [ ] **任务 8.1:移除最新通知模块**
+- [x] **任务 8.1:移除最新通知模块**
   - 文件:`mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx`
   - **位置1**:第44-51行 - 删除 `Notification` 接口定义
   - **位置2**:第71-77行 - 删除 `notifications` 常量数组

+ 50 - 1
allin-packages/order-management-ui/src/components/OrderDetailModal.tsx

@@ -84,6 +84,8 @@ const OrderDetailModal: React.FC<OrderDetailModalProps> = ({
   const [isAttendanceModalOpen, setIsAttendanceModalOpen] = useState(false);
   const [isActionLoading, setIsActionLoading] = useState(false);
   const [pendingPersons, setPendingPersons] = useState<PendingPerson[]>([]);
+  // 用于跟踪正在编辑的薪资值 (personId -> salary)
+  const [editingSalaries, setEditingSalaries] = useState<Record<number, number>>({});
 
   // 查询订单详情
   const {
@@ -250,6 +252,31 @@ const OrderDetailModal: React.FC<OrderDetailModalProps> = ({
     },
   });
 
+  // 更新人员薪资
+  const updateSalaryMutation = useMutation({
+    mutationFn: async ({ personId, salaryDetail }: { personId: number; salaryDetail: number }) => {
+      if (!orderId) throw new Error("订单ID不能为空");
+      const orderClient = orderClientManager.get();
+      const response = await orderClient.persons.salary.$put({
+        json: { orderId, personId, salaryDetail }
+      });
+
+      if (!response.ok) {
+        const error = await response.json();
+        throw new Error(error.message || "更新薪资失败");
+      }
+
+      return await response.json();
+    },
+    onSuccess: () => {
+      toast.success("薪资更新成功");
+      refetch();
+    },
+    onError: (error) => {
+      toast.error(error.message || "更新薪资失败");
+    },
+  });
+
   // 批量添加人员
   const batchAddPersonsMutation = useMutation({
     mutationFn: async (persons: PendingPerson[]) => {
@@ -885,7 +912,29 @@ const OrderDetailModal: React.FC<OrderDetailModalProps> = ({
                                   </SelectContent>
                                 </Select>
                               </TableCell>
-                              <TableCell>¥{person.salaryDetail || 0}</TableCell>
+                              <TableCell>
+                                <Input
+                                  type="number"
+                                  value={editingSalaries[person.personId] ?? (person.salaryDetail || 0)}
+                                  onChange={(e) => {
+                                    const value = parseFloat(e.target.value);
+                                    setEditingSalaries(prev => ({ ...prev, [person.personId]: isNaN(value) ? 0 : value }));
+                                  }}
+                                  onBlur={(e) => {
+                                    const value = parseFloat(e.target.value);
+                                    if (!updateSalaryMutation.isPending && !isNaN(value) && value !== (person.salaryDetail || 0)) {
+                                      updateSalaryMutation.mutate({
+                                        personId: person.personId,
+                                        salaryDetail: value
+                                      });
+                                    }
+                                  }}
+                                  className="w-24"
+                                  min="0"
+                                  step="0.01"
+                                  data-testid={`order-detail-salary-input-${person.personId}`}
+                                />
+                              </TableCell>
                             </TableRow>
                           ))}
                         </TableBody>

+ 87 - 0
allin-packages/order-module/src/routes/order-custom.routes.ts

@@ -16,6 +16,7 @@ import {
   QueryOrderPersonAssetSchema,
   UpdatePersonWorkStatusSchema,
   UpdatePersonDatesSchema,
+  UpdatePersonSalarySchema,
   CheckinStatisticsResponseSchema,
   VideoStatisticsResponseSchema,
   CompanyOrdersQuerySchema,
@@ -619,6 +620,50 @@ const updatePersonDatesRoute = createRoute({
 });
 
 
+// 更新订单人员薪资路由
+const updatePersonSalaryRoute = createRoute({
+  method: 'put',
+  path: '/persons/salary',
+  middleware: [authMiddleware],
+  request: {
+    body: {
+      content: {
+        'application/json': { schema: UpdatePersonSalarySchema }
+      }
+    }
+  },
+  responses: {
+    200: {
+      description: '更新薪资成功',
+      content: {
+        'application/json': {
+          schema: z.object({
+            success: z.boolean().openapi({ description: '是否成功' }),
+            message: z.string().openapi({ description: '操作结果消息' })
+          })
+        }
+      }
+    },
+    400: {
+      description: '参数错误',
+      content: { 'application/json': { schema: ErrorSchema } }
+    },
+    401: {
+      description: '认证失败',
+      content: { 'application/json': { schema: ErrorSchema } }
+    },
+    404: {
+      description: '订单或人员不存在',
+      content: { 'application/json': { schema: ErrorSchema } }
+    },
+    500: {
+      description: '更新薪资失败',
+      content: { 'application/json': { schema: ErrorSchema } }
+    }
+  }
+});
+
+
 // 打卡数据统计路由
 const checkinStatisticsRoute = createRoute({
   method: 'get',
@@ -1425,6 +1470,48 @@ const orderCustomRoutes = new OpenAPIHono<AuthContext>()
         message: error instanceof Error ? error.message : '更新日期失败'
       }, 500);
     }
+  })
+  // 更新订单人员薪资
+  .openapi(updatePersonSalaryRoute, async (c) => {
+    try {
+      const data = c.req.valid('json');
+      const orderService = new OrderService(AppDataSource);
+
+      const result = await orderService.updatePersonSalary(
+        data.orderId,
+        data.personId,
+        data.salaryDetail
+      );
+
+      // 使用 parseWithAwait 验证和转换数据
+      const validatedResult = await parseWithAwait(
+        z.object({
+          success: z.boolean(),
+          message: z.string()
+        }),
+        result
+      );
+      return c.json(validatedResult, 200);
+    } catch (error) {
+      if (error instanceof Error && error.message.includes('订单ID')) {
+        return c.json({
+          code: 404,
+          message: error.message
+        }, 404);
+      }
+
+      if (error instanceof Error && error.message.includes('人员ID')) {
+        return c.json({
+          code: 404,
+          message: error.message
+        }, 404);
+      }
+
+      return c.json({
+        code: 500,
+        message: error instanceof Error ? error.message : '更新薪资失败'
+      }, 500);
+    }
   });
 
 // 企业专用订单自定义路由

+ 17 - 0
allin-packages/order-module/src/schemas/order.schema.ts

@@ -394,6 +394,7 @@ export type DeleteOrderPersonDto = z.infer<typeof DeleteOrderPersonSchema>;
 export type DeleteOrderPersonAssetDto = z.infer<typeof DeleteOrderPersonAssetSchema>;
 export type UpdatePersonWorkStatusDto = z.infer<typeof UpdatePersonWorkStatusSchema>;
 export type UpdatePersonDatesDto = z.infer<typeof UpdatePersonDatesSchema>;
+export type UpdatePersonSalaryDto = z.infer<typeof UpdatePersonSalarySchema>;
 
 // 查询订单参数Schema
 export const QueryOrderSchema = z.object({
@@ -509,6 +510,22 @@ export const UpdatePersonDatesSchema = z.object({
   })
 });
 
+// 更新订单人员薪资DTO
+export const UpdatePersonSalarySchema = z.object({
+  orderId: z.coerce.number().int().positive().openapi({
+    description: '订单ID',
+    example: 1
+  }),
+  personId: z.coerce.number().int().positive().openapi({
+    description: '人员ID',
+    example: 1
+  }),
+  salaryDetail: z.coerce.number().nonnegative().openapi({
+    description: '薪资详情(金额)',
+    example: 5000
+  })
+});
+
 // 打卡数据统计响应Schema
 export const CheckinStatisticsResponseSchema = z.object({
   companyId: z.number().int().positive().openapi({

+ 39 - 0
allin-packages/order-module/src/services/order.service.ts

@@ -632,6 +632,45 @@ export class OrderService extends GenericCrudService<EmploymentOrder> {
     };
   }
 
+  /**
+   * 更新订单人员薪资
+   * @param orderId 订单ID
+   * @param personId 人员ID
+   * @param salaryDetail 薪资金额
+   */
+  async updatePersonSalary(
+    orderId: number,
+    personId: number,
+    salaryDetail: number
+  ): Promise<{ success: boolean; message: string }> {
+    // 验证订单是否存在
+    const order = await this.repository.findOne({
+      where: { id: orderId }
+    });
+
+    if (!order) {
+      throw new Error(`订单ID ${orderId} 不存在`);
+    }
+
+    // 查找订单人员关联
+    const orderPerson = await this.orderPersonRepository.findOne({
+      where: { orderId, personId }
+    });
+
+    if (!orderPerson) {
+      throw new Error(`人员ID ${personId} 不在订单ID ${orderId} 中`);
+    }
+
+    // 更新薪资
+    orderPerson.salaryDetail = salaryDetail;
+    await this.orderPersonRepository.save(orderPerson);
+
+    return {
+      success: true,
+      message: `成功更新人员 ${personId} 的薪资信息`
+    };
+  }
+
   /**
    * 获取企业打卡视频统计
    * @param companyId 企业ID

+ 4 - 7
mini-ui-packages/rencai-attendance-ui/src/pages/AttendancePage/AttendancePage.tsx

@@ -34,13 +34,10 @@ const AttendancePage: React.FC = () => {
   // 状态管理
   const [currentYear, setCurrentYear] = useState<number>(() => getCurrentYearMonth().year)
   const [currentMonth, setCurrentMonth] = useState<number>(() => getCurrentYearMonth().month)
-  const [stats, setStats] = useState<AttendanceStatsType>(() => ({
-    attendanceRate: 100,
-    normalDays: 0,
-    lateCount: 0,
-    earlyLeaveCount: 0,
-    absentCount: 0
-  }))
+  const [stats, setStats] = useState<AttendanceStatsType>(() => {
+    const { year, month } = getCurrentYearMonth()
+    return generateMockAttendanceData(year, month).stats
+  })
   const [records, setRecords] = useState<AttendanceRecord[]>([])
 
   // 加载指定月份的考勤数据

+ 9 - 30
mini-ui-packages/rencai-attendance-ui/src/utils/mockAttendanceData.ts

@@ -45,37 +45,9 @@ function isWeekend(date: Date): boolean {
   return day === 0 || day === 6
 }
 
-/**
- * 计算考勤统计数据
- */
-function calculateAttendanceStats(records: AttendanceRecord[]): AttendanceStats {
-  // 筛选出工作日(排除周末)
-  const workDays = records.filter(r => {
-    const weekday = r.weekday
-    return weekday !== '星期六' && weekday !== '星期日'
-  })
-
-  const normalDays = records.filter(r => r.status === AttendanceStatus.NORMAL).length
-  const lateCount = records.filter(r => r.status === AttendanceStatus.LATE).length
-  const earlyLeaveCount = records.filter(r => r.status === AttendanceStatus.EARLY_LEAVE).length
-  const absentCount = records.filter(r => r.status === AttendanceStatus.ABSENT).length
-
-  // 出勤率 = 正常出勤天数 / 工作日总数 * 100
-  const attendanceRate = workDays.length > 0
-    ? Math.round((normalDays / workDays.length) * 100)
-    : 0
-
-  return {
-    attendanceRate,
-    normalDays,
-    lateCount,
-    earlyLeaveCount,
-    absentCount
-  }
-}
-
 /**
  * 生成指定月份的模拟考勤数据
+ * 注:使用固定值作为展示层修复(业务需求:22天,100%)
  * @param year 年份
  * @param month 月份 (1-12)
  * @returns 考勤统计数据和打卡记录
@@ -130,7 +102,14 @@ export function generateMockAttendanceData(year: number, month: number): {
     }
   }
 
-  const stats = calculateAttendanceStats(records)
+  // 使用固定值作为展示层修复(业务需求:22天,100%)
+  const stats: AttendanceStats = {
+    attendanceRate: 100,
+    normalDays: 22,
+    lateCount: 0,
+    earlyLeaveCount: 0,
+    absentCount: 0
+  }
 
   return { stats, records }
 }

+ 9 - 65
mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx

@@ -41,19 +41,10 @@ const formatCurrentDate = (): string => {
   return `${year}年${month}月${date}日 星期${weekday}`
 }
 
-// 模拟通知数据
-interface Notification {
-  id: number
-  iconClass: string
-  iconColor: 'blue' | 'green' | 'yellow' | 'red'
-  title: string
-  subtitle: string
-}
-
 const Dashboard: React.FC = () => {
   const { user, refreshUser } = useAuth()
-  const [personalInfo, setPersonalInfo] = React.useState<PersonalInfoResponse | null>(null)
-  const [loading, setLoading] = React.useState(true)
+  const [_personalInfo, _setPersonalInfo] = React.useState<PersonalInfoResponse | null>(null)
+  const [_loading, _setLoading] = React.useState(true)
 
   // 添加认证保护
   useRequireAuth()
@@ -67,15 +58,6 @@ const Dashboard: React.FC = () => {
     date: formatCurrentDate()
   }
 
-  // 模拟通知数据
-  const notifications: Notification[] = [
-    { id: 1, iconClass: 'i-heroicons-check-circle-20-solid', iconColor: 'green', title: '薪资发放通知', subtitle: '11月薪资已发放,请查收' },
-    { id: 2, iconClass: 'i-heroicons-exclamation-circle-20-solid', iconColor: 'blue', title: '考勤异常提醒', subtitle: '11月20日考勤异常,请及时处理' },
-    { id: 3, iconClass: 'i-heroicons-building-office-2-20-solid', iconColor: 'yellow', title: '企业通知', subtitle: '下周培训安排已更新' },
-    { id: 4, iconClass: 'i-heroicons-wrench-screwdriver-20-solid', iconColor: 'red', title: '系统维护通知', subtitle: '系统将于12月1日维护' },
-    { id: 5, iconClass: 'i-heroicons-document-text-20-solid', iconColor: 'blue', title: '福利政策更新', subtitle: '最新福利政策已发布' }
-  ]
-
   // 加载个人信息
   useEffect(() => {
     loadPersonalInfo()
@@ -83,26 +65,26 @@ const Dashboard: React.FC = () => {
 
   const loadPersonalInfo = async () => {
     try {
-      setLoading(true)
+      _setLoading(true)
       const response = await talentDashboardClient.personal.info.$get()
 
       if (response.ok) {
         const data = await response.json()
-        setPersonalInfo(data)
+        _setPersonalInfo(data)
       } else {
         Taro.showToast({
           title: '加载个人信息失败',
           icon: 'none'
         })
       }
-    } catch (error) {
-      console.error('加载个人信息失败:', error)
+    } catch (_error) {
+      console.error('加载个人信息失败:', _error)
       Taro.showToast({
         title: '加载个人信息失败',
         icon: 'none'
       })
     } finally {
-      setLoading(false)
+      _setLoading(false)
     }
   }
 
@@ -114,7 +96,7 @@ const Dashboard: React.FC = () => {
         loadPersonalInfo()
       ])
       Taro.showToast({ title: '刷新成功', icon: 'success' })
-    } catch (error) {
+    } catch (_error) {
       Taro.showToast({ title: '刷新失败', icon: 'none' })
     }
   }
@@ -148,7 +130,7 @@ const Dashboard: React.FC = () => {
 
   // 远程打卡处理(占位功能)
   const handleClockIn = () => {
-    Taro.showToast({ title: '远程打卡功能开发中', icon: 'none' })
+    Taro.showToast({ title: '已打卡成功', icon: 'success' })
   }
 
   return (
@@ -303,44 +285,6 @@ const Dashboard: React.FC = () => {
               <Text className="text-xs text-gray-700">企业信息</Text>
             </View>
           </View>
-
-          {/* 最新通知列表 */}
-          <View className="bg-white rounded-2xl p-4 shadow-sm">
-            <Text className="font-semibold text-gray-700 block mb-3">最新通知</Text>
-
-            <View className="space-y-3">
-              {notifications.map((notification) => {
-                const iconBgClass = {
-                  blue: 'bg-blue-100',
-                  green: 'bg-green-100',
-                  yellow: 'bg-yellow-100',
-                  red: 'bg-red-100'
-                }[notification.iconColor] || 'bg-gray-100'
-
-                const iconColorClass = {
-                  blue: 'text-blue-500',
-                  green: 'text-green-500',
-                  yellow: 'text-yellow-600',
-                  red: 'text-red-500'
-                }[notification.iconColor] || 'text-gray-500'
-
-                return (
-                  <View
-                    key={notification.id}
-                    className="flex items-start"
-                  >
-                    <View className={`w-8 h-8 rounded-full ${iconBgClass} flex items-center justify-center mr-3 mt-1 flex-shrink-0`}>
-                      <View className={`${notification.iconClass} ${iconColorClass} text-sm`} />
-                    </View>
-                    <View className="flex-1">
-                      <Text className="text-gray-800 text-sm font-medium block mb-1">{notification.title}</Text>
-                      <Text className="text-gray-500 text-xs">{notification.subtitle}</Text>
-                    </View>
-                  </View>
-                )
-              })}
-            </View>
-          </View>
         </View>
       </ScrollView>
     </RencaiTabBarLayout>

+ 6 - 1
mini-ui-packages/rencai-employment-ui/src/pages/EmploymentPage/EmploymentPage.tsx

@@ -60,8 +60,13 @@ const EmploymentPage: React.FC = () => {
   const { data: salaryRecordsData, isLoading: salaryLoading, error: salaryError } = useQuery({
     queryKey: ['salary-records'],
     queryFn: async () => {
+      // 计算上个月份(用于查询上个月的薪资记录)
+      const now = new Date()
+      const lastMonth = new Date(now.getFullYear(), now.getMonth() - 1, 1)
+      const monthStr = `${lastMonth.getFullYear()}-${String(lastMonth.getMonth() + 1).padStart(2, '0')}`
+
       const res = await talentEmploymentClient.employment['salary-records'].$get({
-        query: { take: 3 }
+        query: { month: monthStr, take: 3 }
       })
       if (!res.ok) {
         throw new Error('获取薪资记录失败')

+ 1 - 1
mini-ui-packages/yongren-dashboard-ui/src/pages/Dashboard/Dashboard.tsx

@@ -127,7 +127,7 @@ const Dashboard: React.FC = () => {
   const handleQuickActionClick = (action: string) => {
     switch (action) {
       case 'talentPool':
-        Taro.navigateTo({
+        Taro.switchTab({
           url: '/pages/yongren/talent/list/index'
         })
         break

+ 3 - 3
mini-ui-packages/yongren-order-management-ui/src/pages/OrderDetail/OrderDetail.tsx

@@ -537,21 +537,21 @@ const OrderDetail: React.FC = () => {
               <Text className="text-sm font-bold text-gray-800">
                 {statistics?.checkinStats.current || 0}/{statistics?.checkinStats.total || 0}
               </Text>
-              <Text className="text-xs text-gray-500">{statistics?.checkinStats.percentage || 0}%</Text>
+              <Text className="text-xs text-gray-500">100%</Text>
             </View>
             <View className="bg-green-50 rounded-lg p-2 text-center flex flex-col">
               <Text className="text-xs text-gray-600">工资视频</Text>
               <Text className="text-sm font-bold text-gray-800">
                 {statistics?.salaryVideoStats.current || 0}/{statistics?.salaryVideoStats.total || 0}
               </Text>
-              <Text className="text-xs text-gray-500">{statistics?.salaryVideoStats.percentage || 0}%</Text>
+              <Text className="text-xs text-gray-500">100%</Text>
             </View>
             <View className="bg-purple-50 rounded-lg p-2 text-center flex flex-col">
               <Text className="text-xs text-gray-600">个税视频</Text>
               <Text className="text-sm font-bold text-gray-800">
                 {statistics?.taxVideoStats.current || 0}/{statistics?.taxVideoStats.total || 0}
               </Text>
-              <Text className="text-xs text-gray-500">{statistics?.taxVideoStats.percentage || 0}%</Text>
+              <Text className="text-xs text-gray-500">100%</Text>
             </View>
           </View>
           <View className="flex items-center text-blue-500 text-sm" onClick={handleViewCheckinDetails}>