|
@@ -164,10 +164,12 @@ func (this *ReportSelectionController) Detail() {
|
|
|
}
|
|
|
if v2.ThirdName != "" {
|
|
|
v2.ShowName = v2.ThirdName
|
|
|
- } else if v2.SubjectName == "" {
|
|
|
- v2.ShowName = v2.IndustrialManagementNames
|
|
|
} else {
|
|
|
- v2.ShowName = v2.SubjectName
|
|
|
+ if v2.SubjectName == "" {
|
|
|
+ v2.ShowName = v2.IndustrialManagementNames
|
|
|
+ } else {
|
|
|
+ v2.ShowName = v2.SubjectName
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
subjectItem := new(models.ReportSelectionChartLogSubjectName)
|
|
@@ -176,8 +178,13 @@ func (this *ReportSelectionController) Detail() {
|
|
|
subjectItem.IndustrialSubjectId = v2.IndustrialSubjectId
|
|
|
subjectItem.IndustrialManagementId, _ = strconv.Atoi(v2.IndustrialManagementId)
|
|
|
subjectItem.IndustrialManagementName = v2.IndustrialManagementNames
|
|
|
- if subjectItem.SubjectName == "" {
|
|
|
- subjectItem.SubjectName = subjectItem.IndustrialManagementName
|
|
|
+ subjectItem.ThirdId = v2.ThirdId
|
|
|
+ if v2.ThirdName != "" {
|
|
|
+ subjectItem.SubjectName = v2.ThirdName
|
|
|
+ } else {
|
|
|
+ if subjectItem.SubjectName == "" {
|
|
|
+ subjectItem.SubjectName = subjectItem.IndustrialManagementName
|
|
|
+ }
|
|
|
}
|
|
|
subjectItem.Md5String = utils.MD5(fmt.Sprint("IN_ID", v2.IndustrialManagementId, "S_ID", v2.IndustrialSubjectId, "T_ID", v2.ThirdId))
|
|
|
v2.Md5String = subjectItem.Md5String
|
|
@@ -195,27 +202,7 @@ func (this *ReportSelectionController) Detail() {
|
|
|
}
|
|
|
existMap[v.ChartPermissionId] = v.ChartPermissionId
|
|
|
}
|
|
|
- //historyRecord := new(models.CygxReportHistoryRecord)
|
|
|
- //historyRecord.UserId = uid
|
|
|
- //historyRecord.ArticleId = articleId
|
|
|
- //historyRecord.CreateTime = time.Now()
|
|
|
- //historyRecord.Mobile = user.Mobile
|
|
|
- //historyRecord.Email = user.Email
|
|
|
- //historyRecord.CompanyId = user.CompanyId
|
|
|
- //historyRecord.CompanyName = user.CompanyName
|
|
|
- //historyRecord.RegisterPlatform = utils.REGISTER_PLATFORM
|
|
|
- //historyRecord.ReportType = "bgjx"
|
|
|
- //sellerItem, err := models.GetSellerByCompanyIdCheckFicc(user.CompanyId, 2)
|
|
|
- //if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
- // br.Msg = "获取信息失败"
|
|
|
- // br.ErrMsg = "获取销售信息失败,Err:" + err.Error()
|
|
|
- // return
|
|
|
- //}
|
|
|
- //historyRecord.RealName = user.RealName
|
|
|
- //if sellerItem != nil {
|
|
|
- // historyRecord.SellerName = sellerItem.RealName
|
|
|
- //}
|
|
|
- //go services.AddCygxReportHistoryRecord(user, articleId, "bgjx")
|
|
|
+
|
|
|
resp.List = items
|
|
|
resp.ListPermissionSubject = itemsSubject
|
|
|
resp.Detail = detail
|