修复工作人员作业预检状态与提示

This commit is contained in:
czl231
2026-09-05 20:17:07 +08:00
parent 1670d5880f
commit cec02c8887
8 changed files with 191 additions and 12 deletions

View File

@@ -602,6 +602,15 @@ func seedAdditionalCoreScenarios(database *gorm.DB, passwordHash string, now tim
return err
}
// 为每组模拟工作人员补齐独立有效资质,保证预检数据与在岗状态一致。
credential := models.StaffCredential{
Entity: entity(sequence+21, common.StatusEnable), StaffAccountID: staff.ID,
CredentialType: "delivery", CredentialNo: "MOCK-CERT-" + suffix, ExpiredAt: &nextYear,
}
if err := put(database, &credential); err != nil {
return err
}
user := models.UserAccount{
Entity: entity(sequence+4, common.StatusEnable), Username: "mock_customer_" + suffix,
PasswordHash: passwordHash, Name: fmt.Sprintf("示例客户%d", scenario), Phone: "138" + phoneSuffix,