Browse Source

修改

pull/1/head
超级管理员 4 years ago
parent
commit
e8691dcdd4
  1. 27
      server/api/v1/examtestpage/healthreportstat.go

27
server/api/v1/examtestpage/healthreportstat.go

@ -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) {
d.mutext.Lock()
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)
var AdmDivStruct []commonus.AdministrativeDivision
var writeInfo []locationing.ReportAddress
@ -267,7 +273,7 @@ func (d *dataLockStatistics) getUserAnswerList(jobid, tadayTime string, page int
writeInfoUser.Userid = v.Userid
writeInfoUser.AddTime = time.Now().Unix()
writeInfoUser.Address = v_sun.Text
calCulTime := tadayTime + " 12:00:00"
writeInfoUser.CalCulTime = commonus.DateToTimeStamp(calCulTime)
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.UserTel = weChatUserCont.Mobile
// writeInfoUser.UserName = weChatUserCont.Name
// writeInfoUser.UserTel = weChatUserCont.Mobile
AdmDivMap["user_name"] = weChatUserCont.Name
AdmDivMap["user_tel"] = weChatUserCont.Name
// AdmDivMap["user_name"] = weChatUserCont.Name
// AdmDivMap["user_tel"] = weChatUserCont.Name
abnormalIsTrue := false
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
// if errDb != nil {
errDb := global.GVA_DB_HealthReport.Create(&writeInfo).Error
if errDb != nil {
// }
}
}
// fmt.Printf("%v切割地址%v-------------%v\n", page, jhs, len(AdmDivStruct))
myStatisWg.Done()
}

Loading…
Cancel
Save