|
|
@ -252,6 +252,12 @@ func (h *HealthReportStat) PostReportAnswerListAll(c *gin.Context) { |
|
|
func (d *dataLockStatistics) getUserAnswerList(jobid, tadayTime string, page int, pageSize int64, legalAreaList []locationing.LegalArea) { |
|
|
func (d *dataLockStatistics) getUserAnswerList(jobid, tadayTime string, page int, pageSize int64, legalAreaList []locationing.LegalArea) { |
|
|
d.mutext.Lock() |
|
|
d.mutext.Lock() |
|
|
defer d.mutext.Unlock() |
|
|
defer d.mutext.Unlock() |
|
|
|
|
|
calCulTime := tadayTime + " 12:00:00" |
|
|
|
|
|
timeStamp := commonus.DateToTimeStamp(calCulTime) |
|
|
|
|
|
var judgeWriteInfoUser locationing.ReportAddress |
|
|
|
|
|
getReportAddressErr := global.GVA_DB_HealthReport.Where("calcultime = ?", timeStamp).Take(&judgeWriteInfoUser).Error |
|
|
|
|
|
if getReportAddressErr != nil { |
|
|
|
|
|
|
|
|
_, reportAnswerInfoList, _, _ := commonus.GetUserWriteAnswer(jobid, tadayTime, page, pageSize) |
|
|
_, reportAnswerInfoList, _, _ := commonus.GetUserWriteAnswer(jobid, tadayTime, page, pageSize) |
|
|
var AdmDivStruct []commonus.AdministrativeDivision |
|
|
var AdmDivStruct []commonus.AdministrativeDivision |
|
|
var writeInfo []locationing.ReportAddress |
|
|
var writeInfo []locationing.ReportAddress |
|
|
@ -267,7 +273,7 @@ func (d *dataLockStatistics) getUserAnswerList(jobid, tadayTime string, page int |
|
|
writeInfoUser.Userid = v.Userid |
|
|
writeInfoUser.Userid = v.Userid |
|
|
writeInfoUser.AddTime = time.Now().Unix() |
|
|
writeInfoUser.AddTime = time.Now().Unix() |
|
|
writeInfoUser.Address = v_sun.Text |
|
|
writeInfoUser.Address = v_sun.Text |
|
|
calCulTime := tadayTime + " 12:00:00" |
|
|
|
|
|
writeInfoUser.CalCulTime = commonus.DateToTimeStamp(calCulTime) |
|
|
writeInfoUser.CalCulTime = commonus.DateToTimeStamp(calCulTime) |
|
|
|
|
|
|
|
|
AdmDiv.Userid = v.Userid |
|
|
AdmDiv.Userid = v.Userid |
|
|
@ -310,14 +316,14 @@ func (d *dataLockStatistics) getUserAnswerList(jobid, tadayTime string, page int |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//获取个人信息
|
|
|
// //获取个人信息
|
|
|
weChatUserCont := getWechatUserInfo(v.Userid) |
|
|
// weChatUserCont := getWechatUserInfo(v.Userid)
|
|
|
|
|
|
|
|
|
writeInfoUser.UserName = weChatUserCont.Name |
|
|
// writeInfoUser.UserName = weChatUserCont.Name
|
|
|
writeInfoUser.UserTel = weChatUserCont.Mobile |
|
|
// writeInfoUser.UserTel = weChatUserCont.Mobile
|
|
|
|
|
|
|
|
|
AdmDivMap["user_name"] = weChatUserCont.Name |
|
|
// AdmDivMap["user_name"] = weChatUserCont.Name
|
|
|
AdmDivMap["user_tel"] = weChatUserCont.Name |
|
|
// AdmDivMap["user_tel"] = weChatUserCont.Name
|
|
|
|
|
|
|
|
|
abnormalIsTrue := false |
|
|
abnormalIsTrue := false |
|
|
for _, expVal := range legalAreaList { |
|
|
for _, expVal := range legalAreaList { |
|
|
@ -345,10 +351,11 @@ func (d *dataLockStatistics) getUserAnswerList(jobid, tadayTime string, page int |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// errDb := global.GVA_DB_HealthReport.Create(&writeInfo).Error
|
|
|
errDb := global.GVA_DB_HealthReport.Create(&writeInfo).Error |
|
|
// if errDb != nil {
|
|
|
if errDb != nil { |
|
|
|
|
|
|
|
|
// }
|
|
|
} |
|
|
|
|
|
} |
|
|
// fmt.Printf("%v切割地址%v-------------%v\n", page, jhs, len(AdmDivStruct))
|
|
|
// fmt.Printf("%v切割地址%v-------------%v\n", page, jhs, len(AdmDivStruct))
|
|
|
myStatisWg.Done() |
|
|
myStatisWg.Done() |
|
|
} |
|
|
} |
|
|
|