作者 yangfu

ci : 增加报表系统配置

@@ -123,6 +123,8 @@ spec: @@ -123,6 +123,8 @@ spec:
123 value: "https://sms.fjmaimaimai.com:9897" 123 value: "https://sms.fjmaimaimai.com:9897"
124 - name: COST_STRUCTURED 124 - name: COST_STRUCTURED
125 value: "http://cost-structured-prd.fjmaimaimai.com" 125 value: "http://cost-structured-prd.fjmaimaimai.com"
  126 + - name: ALLIED_CREATION_REPORTING_SYSTEM
  127 + value: "https://allied-creation-reporting-system-prd.fjmaimaimai.com"
126 - name: MANUFACTURE_WEIGH_DEFAULT_COMPANYID 128 - name: MANUFACTURE_WEIGH_DEFAULT_COMPANYID
127 value: "4" 129 value: "4"
128 - name: MANUFACTURE_WEIGH_DEFAULT_ORGID 130 - name: MANUFACTURE_WEIGH_DEFAULT_ORGID
@@ -127,6 +127,8 @@ spec: @@ -127,6 +127,8 @@ spec:
127 value: "http://cost-structured-test.fjmaimaimai.com" 127 value: "http://cost-structured-test.fjmaimaimai.com"
128 - name: SUPLUS_SALE_APP 128 - name: SUPLUS_SALE_APP
129 value: "http://suplus-sale-app-gateway-test.fjmaimaimai.com" 129 value: "http://suplus-sale-app-gateway-test.fjmaimaimai.com"
  130 + - name: ALLIED_CREATION_REPORTING_SYSTEM
  131 + value: "https://allied-creation-reporting-system-test.fjmaimaimai.com"
130 - name: MANUFACTURE_WEIGH_DEFAULT_COMPANYID 132 - name: MANUFACTURE_WEIGH_DEFAULT_COMPANYID
131 value: "23" 133 value: "23"
132 - name: MANUFACTURE_WEIGH_DEFAULT_ORGID 134 - name: MANUFACTURE_WEIGH_DEFAULT_ORGID
@@ -46,8 +46,12 @@ var EnableBlockChain = true @@ -46,8 +46,12 @@ var EnableBlockChain = true
46 46
47 // 天联共创 成本结构化 47 // 天联共创 成本结构化
48 var COST_STRUCTURED = "http://cost-structured-dev.fjmaimaimai.com" 48 var COST_STRUCTURED = "http://cost-structured-dev.fjmaimaimai.com"
  49 +
49 //var COST_STRUCTURED = "http://localhost:8085" 50 //var COST_STRUCTURED = "http://localhost:8085"
50 51
  52 +// 天联共创 生产制造模块
  53 +var ALLIED_CREATION_REPORTING_SYSTEM = "https://allied-creation-reporting-system-test.fjmaimaimai.com"
  54 +
51 func init() { 55 func init() {
52 if os.Getenv("LOG_LEVEL") != "" { 56 if os.Getenv("LOG_LEVEL") != "" {
53 LOG_LEVEL = os.Getenv("LOG_LEVEL") 57 LOG_LEVEL = os.Getenv("LOG_LEVEL")
@@ -88,4 +92,7 @@ func init() { @@ -88,4 +92,7 @@ func init() {
88 if os.Getenv("COST_STRUCTURED") != "" { 92 if os.Getenv("COST_STRUCTURED") != "" {
89 COST_STRUCTURED = os.Getenv("COST_STRUCTURED") 93 COST_STRUCTURED = os.Getenv("COST_STRUCTURED")
90 } 94 }
  95 + if os.Getenv("ALLIED_CREATION_REPORTING_SYSTEM") != "" {
  96 + ALLIED_CREATION_REPORTING_SYSTEM = os.Getenv("ALLIED_CREATION_REPORTING_SYSTEM")
  97 + }
91 } 98 }
  1 +package chart_editor
  2 +
  3 +import (
  4 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant"
  5 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway"
  7 + "time"
  8 +)
  9 +
  10 +//HttpLibAlliedCreationManufacture 生产制造模块
  11 +type HttpLibAlliedChartEditor struct {
  12 + service_gateway.BaseServiceGateway
  13 + baseUrL string
  14 +}
  15 +
  16 +func NewHttpLibAlliedChartEditor(operator domain.Operator) *HttpLibAlliedChartEditor {
  17 + return &HttpLibAlliedChartEditor{
  18 + BaseServiceGateway: service_gateway.BaseServiceGateway{
  19 + ConnectTimeout: 100 * time.Second,
  20 + ReadWriteTimeout: 100 * time.Second,
  21 + CompanyId: operator.CompanyId,
  22 + OrgId: operator.OrgId,
  23 + InOrgIds: operator.OrgIds,
  24 + UserId: operator.UserId,
  25 + UserBaseId: operator.UserBaseId,
  26 + },
  27 + baseUrL: constant.ALLIED_CREATION_REPORTING_SYSTEM,
  28 + }
  29 +
  30 +}
  31 +
  32 +func (gateway HttpLibAlliedChartEditor) BaseUrl() string {
  33 + return gateway.baseUrL
  34 +}
@@ -4,6 +4,7 @@ import ( @@ -4,6 +4,7 @@ import (
4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
5 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_manufacture" 5 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_manufacture"
6 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" 6 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
  7 + chart_editor "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/chart-editor"
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/cost_structured" 8 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/cost_structured"
8 "net/http" 9 "net/http"
9 "os" 10 "os"
@@ -70,6 +71,8 @@ func init() { @@ -70,6 +71,8 @@ func init() {
70 web.InsertFilter("/v1/manufacture/*", web.BeforeRouter, middleware.RedirectInternalService("/v1/manufacture", allied_creation_manufacture.NewHttpLibAlliedCreationManufacture(domain.Operator{}))) 71 web.InsertFilter("/v1/manufacture/*", web.BeforeRouter, middleware.RedirectInternalService("/v1/manufacture", allied_creation_manufacture.NewHttpLibAlliedCreationManufacture(domain.Operator{})))
71 web.InsertFilter("/v1/cost/*", web.BeforeRouter, middleware.CheckAccessToken()) 72 web.InsertFilter("/v1/cost/*", web.BeforeRouter, middleware.CheckAccessToken())
72 web.InsertFilter("/v1/cost/*", web.BeforeRouter, middleware.RedirectInternalService("/v1/cost", cost_structured.NewHttpLibCostStructured(domain.Operator{}))) 73 web.InsertFilter("/v1/cost/*", web.BeforeRouter, middleware.RedirectInternalService("/v1/cost", cost_structured.NewHttpLibCostStructured(domain.Operator{})))
  74 + web.InsertFilter("/v1/chart-editor/*", web.BeforeRouter, middleware.CheckAccessToken())
  75 + web.InsertFilter("/v1/chart-editor/*", web.BeforeRouter, middleware.RedirectInternalService("/chart-editor", chart_editor.NewHttpLibAlliedChartEditor(domain.Operator{})))
73 } 76 }
74 77
75 func AllowCors() func(ctx *context.Context) { 78 func AllowCors() func(ctx *context.Context) {