浏览代码

Merge branch 'hotfix/ppt_report_1127' into debug

hsun 4 月之前
父节点
当前提交
833f7d2c5e

+ 1 - 1
controllers/data_manage/cross_variety/variety.go

@@ -114,7 +114,7 @@ func (c *VarietyController) Edit() {
 		br.ErrMsg = "添加失败,Err:" + err.Error()
 		return
 	}
-	if item != nil && item.ChartVarietyId != req.ChartVarietyId {
+	if item != nil && item.ChartVarietyId > 0 && item.ChartVarietyId != req.ChartVarietyId {
 		br.Msg = "添加失败,品种名称不能重复"
 		br.IsSendEmail = false
 		return

+ 1 - 1
controllers/data_manage/supply_analysis/variety.go

@@ -224,7 +224,7 @@ func (this *VarietyController) Edit() {
 		br.ErrMsg = "添加失败,Err:" + err.Error()
 		return
 	}
-	if item != nil && item.VarietyId != req.VarietyId {
+	if item != nil && item.VarietyId > 0 && item.VarietyId != req.VarietyId {
 		br.Msg = "添加失败,品种名称不能重复"
 		br.IsSendEmail = false
 		return

+ 3 - 3
controllers/ppt_report.go

@@ -497,11 +497,11 @@ func (this *PptV2Controller) AuthList() {
 		return
 	}
 
-	// 查询自己创建的以及协作人包含自己的报告
+	// 查询自己创建的以及协作人包含自己的报告、以及外部已审批报告
 	var cond string
 	var pars []interface{}
-	cond += ` AND (admin_id = ? OR (admin_id <> ? AND FIND_IN_SET(?, collaborate_users)))`
-	pars = append(pars, sysUser.AdminId, sysUser.AdminId, sysUser.AdminId)
+	cond += ` AND (admin_id = ? OR (admin_id <> ? AND FIND_IN_SET(?, collaborate_users)) OR (report_source = ? AND state = ?))`
+	pars = append(pars, sysUser.AdminId, sysUser.AdminId, sysUser.AdminId, utils.ReportSourceOuter, models.ReportStatePass)
 	if classifyId > 0 {
 		cond += ` AND classify_id = ? `
 		pars = append(pars, classifyId)

+ 1 - 0
services/data/range_analysis/chart_info.go

@@ -644,6 +644,7 @@ func GetChartDataByEdbInfoListBySeries(chartInfoId int, dateType, startYear int,
 			edbInfoMappingList[k].MaxData = maxData
 		}
 	}
+
 	dataResp = data_manage.ChartRangeAnalysisDataResp{ChartRangeAnalysisExtraConf: req, SeriesId: seriesMappingItem.FactorEdbSeriesId}
 	// 查询配置关联关系
 	if req.MultipleGraphConfigId > 0 {