作者 yangfu

refactor: 成本模板变更

@@ -266,7 +266,7 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm @@ -266,7 +266,7 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
266 {EnName: "chargePersons", CnName: "*负责人"}, 266 {EnName: "chargePersons", CnName: "*负责人"},
267 {EnName: "target", CnName: "目标值"}, 267 {EnName: "target", CnName: "目标值"},
268 {EnName: "targetPeriod", CnName: "目标值期限"}, 268 {EnName: "targetPeriod", CnName: "目标值期限"},
269 - {EnName: "comparisonOperator", CnName: "比较符"}, 269 + {EnName: "calculationType", CnName: "计算类型"},
270 {EnName: "present", CnName: "现状值"}, 270 {EnName: "present", CnName: "现状值"},
271 {EnName: "schedulePlanPercent", CnName: "进度计划比"}, 271 {EnName: "schedulePlanPercent", CnName: "进度计划比"},
272 {EnName: "benchmark", CnName: "标杆值"}, 272 {EnName: "benchmark", CnName: "标杆值"},
@@ -373,6 +373,13 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm @@ -373,6 +373,13 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
373 chargePersons = append(chargePersons, "0") 373 chargePersons = append(chargePersons, "0")
374 } 374 }
375 } 375 }
  376 + calculationType := strings.TrimSpace(v["calculationType"])
  377 + iCalculationType := 0
  378 + if calculationType == "高于目标值" {
  379 + iCalculationType = 1
  380 + } else if calculationType == "低于目标值" {
  381 + iCalculationType = 2
  382 + }
376 //目标值期限 383 //目标值期限
377 targetPeriod := domain.GetTargetPeriod(v["targetPeriod"]) 384 targetPeriod := domain.GetTargetPeriod(v["targetPeriod"])
378 item := &domain.CostManagemant{ 385 item := &domain.CostManagemant{
@@ -400,7 +407,7 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm @@ -400,7 +407,7 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
400 CostPriceDesiredValue: strings.TrimSpace(v["costPriceDesiredValue"]), 407 CostPriceDesiredValue: strings.TrimSpace(v["costPriceDesiredValue"]),
401 CostPriceIndicatedValue: strings.TrimSpace(v["costPriceIndicatedValue"]), 408 CostPriceIndicatedValue: strings.TrimSpace(v["costPriceIndicatedValue"]),
402 CostPriceActualValue: strings.TrimSpace(v["costPriceActualValue"]), 409 CostPriceActualValue: strings.TrimSpace(v["costPriceActualValue"]),
403 - ComparisonOperator: strings.TrimSpace(v["comparisonOperator"]), 410 + CalculationType: iCalculationType,
404 } 411 }
405 if len(ossFile) > 0 { 412 if len(ossFile) > 0 {
406 item.Urls = ossFile 413 item.Urls = ossFile
@@ -478,7 +485,7 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import @@ -478,7 +485,7 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import
478 domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210927/object/1632743214_rNHm6ZBXZaC5xKTrsE7M4h45MY6n6Ff3.xlsx", 485 domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210927/object/1632743214_rNHm6ZBXZaC5xKTrsE7M4h45MY6n6Ff3.xlsx",
479 domain.ImportProducts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220120/object/1642670543_cbraNKjNPHcbN6RNBYQBrwhC7BXGbDWp.xlsx", 486 domain.ImportProducts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220120/object/1642670543_cbraNKjNPHcbN6RNBYQBrwhC7BXGbDWp.xlsx",
480 domain.ImportDevices: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220126/object/1643184320_hT6sY5BKHmBa4TynfSGSCGyZ2KTTtzkj.xlsx", 487 domain.ImportDevices: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220126/object/1643184320_hT6sY5BKHmBa4TynfSGSCGyZ2KTTtzkj.xlsx",
481 - domain.ImportCosts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/opportunity/dev_online/20220615/object/1655280919_MKQhwQ7D72ZBsrRpraX3QJGxWt3KyCj5.xlsx", 488 + domain.ImportCosts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/opportunity/dev_online/20220616/object/1655349687_CjpXGrjD4EH2jrw4SXJmHkaQZXKQcT56.xlsx",
482 } 489 }
483 var url string 490 var url string
484 var ok bool 491 var ok bool
@@ -95,7 +95,7 @@ type CostManagemant struct { @@ -95,7 +95,7 @@ type CostManagemant struct {
95 // 考核值 95 // 考核值
96 IndicatedValue string `json:"indicatedValue"` 96 IndicatedValue string `json:"indicatedValue"`
97 // 比较运算符号 > < 97 // 比较运算符号 > <
98 - ComparisonOperator string `json:"comparisonOperator"` 98 + CalculationType int `json:"calculationType"`
99 } 99 }
100 100
101 type NodeType struct { 101 type NodeType struct {