|
@@ -6,7 +6,6 @@ import (
|
|
|
"hongze/hz_crm_api/models/roadshow"
|
|
|
"hongze/hz_crm_api/services"
|
|
|
"hongze/hz_crm_api/utils"
|
|
|
- "strings"
|
|
|
)
|
|
|
|
|
|
// @Title 我的日历列表
|
|
@@ -61,6 +60,7 @@ func (this *CalendarController) CompanySearch() {
|
|
|
// @Param CompanyId query int true "公司id"
|
|
|
// @Param EnglishCompany query int true "是否为英文客户"
|
|
|
// @Param CompanyType query string true "客户类型:'ficc','权益',传空默认为ficc,"
|
|
|
+// @Param RsReportRecordId query int true "路演统计Id"
|
|
|
// @Success 200 {object} roadshow.CompanyDetailView
|
|
|
// @router /company/detail [get]
|
|
|
func (this *CalendarController) CompanyDetail() {
|
|
@@ -86,6 +86,7 @@ func (this *CalendarController) CompanyDetail() {
|
|
|
}
|
|
|
englishCompany, _ := this.GetInt("EnglishCompany")
|
|
|
companyType := this.GetString("CompanyType")
|
|
|
+ rsReportRecordId, _ := this.GetInt("RsReportRecordId")
|
|
|
productId := services.GetProductId(sysUser.RoleTypeCode)
|
|
|
if productId == 0 {
|
|
|
productId = 1
|
|
@@ -95,6 +96,14 @@ func (this *CalendarController) CompanyDetail() {
|
|
|
}
|
|
|
detailView := new(roadshow.CompanyDetailView)
|
|
|
if englishCompany == 0 {
|
|
|
+ //if rsReportRecordId > 0 {
|
|
|
+ rsReportRecordItem, err := roadshow.GetRsReportRecordDetailByRsReportRecordId(rsReportRecordId)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "路演信息不存在!"
|
|
|
+ br.ErrMsg = "路演信息不存在!Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //}
|
|
|
companyProductItem, err := company.GetCompanyProductByCompanyIdAndProductId(companyId, productId)
|
|
|
if err != nil {
|
|
|
if err.Error() == utils.ErrNoRow() {
|
|
@@ -117,10 +126,11 @@ func (this *CalendarController) CompanyDetail() {
|
|
|
}
|
|
|
detailView.CompanyId = companyProductItem.CompanyId
|
|
|
detailView.CompanyName = companyProductItem.CompanyName
|
|
|
- detailView.Status = companyProductItem.Status
|
|
|
+ detailView.Status = rsReportRecordItem.CompanyStatus
|
|
|
detailView.IndustryId = companyProductItem.IndustryId
|
|
|
detailView.IndustryName = companyProductItem.IndustryName
|
|
|
- detailView.PermissionName = strings.Join(permissionArr, "/")
|
|
|
+ //detailView.PermissionName = strings.Join(permissionArr, "/")
|
|
|
+ detailView.PermissionName = rsReportRecordItem.PermissionName
|
|
|
detailView.ReportReadTotal = companyProductItem.ViewTotal //ficc报告-累计阅读次数
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|