zhangzengfei
2024-05-25 de4486fbca4f021b44532bbbd19d953bf9063f90
添加人员数据结构, 修复重传任务仅运行一个
1个文件已添加
1个文件已修改
107 ■■■■■ 已修改文件
service/resend.go 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vo/person.go 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/resend.go
@@ -9,7 +9,15 @@
    "gat1400Exchange/vo"
)
var resendTaskRunning bool
func ResendImageData() {
    if resendTaskRunning {
        return
    }
    resendTaskRunning = true
    defer func() { resendTaskRunning = false }()
    var cacheMod models.Cache
    total, _ := cacheMod.Count()
    logger.Debug("Start resend task. cache len:%d", total)
vo/person.go
New file
@@ -0,0 +1,99 @@
package vo
type PersonObject struct {
    PersonID                          string `json:"PersonID"`
    InfoKind                          string `json:"InfoKind"`
    SourceID                          string `json:"SourceID"`
    DeviceID                          string `json:"DeviceID"`
    LeftTopY                          string `json:"LeftTopY"`
    RightBtmX                         string `json:"RightBtmX"`
    RightBtmY                         string `json:"RightBtmY"`
    LocationMarkTime                  string `json:"LocationMarkTime"`
    PersonAppearTime                  string `json:"PersonAppearTime"`
    PersonDisAppearTime               string `json:"PersonDisAppearTime"`
    IDType                            string `json:"IDType"`
    IDNumber                          string `json:"IDNumber"`
    Name                              string `json:"Name"`
    UsedName                          string `json:"UsedName"`
    Alias                             string `json:"Alias"`
    GenderCode                        string `json:"GenderCode"`
    AgeUpLimit                        string `json:"AgeUpLimit"`
    AgeLowerLimit                     string `json:"AgeLowerLimit"`
    EthicCode                         string `json:"EthicCode"`
    NationalityCode                   string `json:"NationalityCode"`
    NativeCityCode                    string `json:"NativeCityCode"`
    ResidenceAdminDivision            string `json:"ResidenceAdminDivision"`
    ChineseAccentCode                 string `json:"ChineseAccentCode"`
    PersonOrg                         string `json:"PersonOrg"`
    JobCategory                       string `json:"JobCategory"`
    AccompanyNumber                   string `json:"AccompanyNumber"`
    HeightUpLimit                     string `json:"HeightUpLimit"`
    HeightLowerLimit                  string `json:"HeightLowerLimit"`
    BodyType                          string `json:"BodyType"`
    SkinColor                         string `json:"SkinColor"`
    HairStyle                         string `json:"HairStyle"`
    HairColor                         string `json:"HairColor"`
    Gesture                           string `json:"Gesture"`
    Status                            string `json:"Status"`
    FaceStyle                         string `json:"FaceStyle"`
    FacialFeature                     string `json:"FacialFeature"`
    PhysicalFeature                   string `json:"PhysicalFeature"`
    BodyFeature                       string `json:"BodyFeature"`
    HabitualMovement                  string `json:"HabitualMovement"`
    Behavior                          string `json:"Behavior"`
    BehaviorDescription               string `json:"BehaviorDescription"`
    Appendant                         string `json:"Appendant"`
    AppendantDescription              string `json:"AppendantDescription"`
    UmbrellaColor                     string `json:"UmbrellaColor"`
    RespiratorColor                   string `json:"RespiratorColor"`
    CapStyle                          string `json:"CapStyle"`
    CapColor                          string `json:"CapColor"`
    GlassStyle                        string `json:"GlassStyle"`
    GlassColor                        string `json:"GlassColor"`
    ScarfColor                        string `json:"ScarfColor"`
    BagStyle                          string `json:"BagStyle"`
    BagColor                          string `json:"BagColor"`
    CoatStyle                         string `json:"CoatStyle"`
    CoatLength                        string `json:"CoatLength"`
    CoatColor                         string `json:"CoatColor"`
    TrousersStyle                     string `json:"TrousersStyle"`
    TrousersColor                     string `json:"TrousersColor"`
    TrousersLen                       string `json:"TrousersLen"`
    ShoesStyle                        string `json:"ShoesStyle"`
    ShoesColor                        string `json:"ShoesColor"`
    IsDriver                          int    `json:"IsDriver"`
    IsForeigner                       int    `json:"IsForeigner"`
    PassportType                      string `json:"PassportType"`
    ImmigrantTypeCode                 string `json:"ImmigrantTypeCode"`
    IsSuspectedTerrorist              int    `json:"IsSuspectedTerrorist"`
    SuspectedTerroristNumber          string `json:"SuspectedTerroristNumber"`
    IsCriminalInvolved                int    `json:"IsCriminalInvolved"`
    CriminalInvolvedSpecilisationCode string `json:"CriminalInvolvedSpecilisationCode"`
    BodySpeciallMark                  string `json:"BodySpeciallMark"`
    CrimeMethod                       string `json:"CrimeMethod"`
    CrimeCharacterCode                string `json:"CrimeCharacterCode"`
    EscapedCriminalNumber             string `json:"EscapedCriminalNumber"`
    IsDetainees                       int    `json:"IsDetainees"`
    DetentionHouseCode                string `json:"DetentionHouseCode"`
    DetaineesIdentity                 string `json:"DetaineesIdentity"`
    DetaineesSpecialIdentity          string `json:"DetaineesSpecialIdentity"`
    MemberTypeCode                    string `json:"MemberTypeCode"`
    IsVictim                          int    `json:"IsVictim"`
    VictimType                        string `json:"VictimType"`
    InjuredDegree                     string `json:"InjuredDegree"`
    CorpseConditionCode               string `json:"CorpseConditionCode"`
    IsSuspiciousPerson                int    `json:"IsSuspiciousPerson"`
    SubImageList                      struct {
        SubImageInfoObject []SubImageInfoObject `json:"SubImageInfoObject"` // 子图像信息列表
    } `json:"SubImageList"` // 子图像列表
}
type RequestPersonList struct {
    PersonListObject struct {
        PersonObject []PersonObject `json:"PersonObject"`
    } `json:"PersonListObject"`
}
type NotificationPersonList struct {
    PersonObject []PersonObject `json:"PersonObject"`
}