From de4486fbca4f021b44532bbbd19d953bf9063f90 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期六, 25 五月 2024 17:42:12 +0800 Subject: [PATCH] 添加人员数据结构, 修复重传任务仅运行一个 --- service/resend.go | 8 ++++ vo/person.go | 99 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 0 deletions(-) diff --git a/service/resend.go b/service/resend.go index 8a55728..ade60a8 100644 --- a/service/resend.go +++ b/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) diff --git a/vo/person.go b/vo/person.go new file mode 100644 index 0000000..ca0a47b --- /dev/null +++ b/vo/person.go @@ -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"` +} -- Gitblit v1.8.0