作者 庄敏学

导入

@@ -343,7 +343,6 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm @@ -343,7 +343,6 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
343 ItemName: strings.TrimSpace(v["itemName"]), 343 ItemName: strings.TrimSpace(v["itemName"]),
344 ChoiceId: choiceId, 344 ChoiceId: choiceId,
345 Text: strings.TrimSpace(v["text"]), 345 Text: strings.TrimSpace(v["text"]),
346 - Urls: []string{ossFile},  
347 Formula: strings.TrimSpace(v["formula"]), 346 Formula: strings.TrimSpace(v["formula"]),
348 ChargePersons: chargePersons, 347 ChargePersons: chargePersons,
349 Target: strings.TrimSpace(v["target"]), 348 Target: strings.TrimSpace(v["target"]),
@@ -355,6 +354,11 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm @@ -355,6 +354,11 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
355 YesterdayActual: strings.TrimSpace(v["yesterdayActual"]), 354 YesterdayActual: strings.TrimSpace(v["yesterdayActual"]),
356 Types: importCostCommand.Types, 355 Types: importCostCommand.Types,
357 } 356 }
  357 + if ossFile != "" {
  358 + item.Urls = []string{ossFile}
  359 + } else {
  360 + item.Urls = []string{}
  361 + }
358 createCostManagemant.CostManagemants = append(createCostManagemant.CostManagemants, item) 362 createCostManagemant.CostManagemants = append(createCostManagemant.CostManagemants, item)
359 } 363 }
360 result, err := cost_structured.NewHttpLibCostStructured(importDataCommand.Operator).BatchCreateCostManagemant(createCostManagemant) 364 result, err := cost_structured.NewHttpLibCostStructured(importDataCommand.Operator).BatchCreateCostManagemant(createCostManagemant)
@@ -17,7 +17,7 @@ type BatchCreateCostManagemant struct { @@ -17,7 +17,7 @@ type BatchCreateCostManagemant struct {
17 // 成本管理 17 // 成本管理
18 type CostManagemant struct { 18 type CostManagemant struct {
19 // 项目编码 19 // 项目编码
20 - ProjectCode string `json:"projectCode,string"` 20 + ProjectCode string `json:"projectCode"`
21 // 成本管理Id 21 // 成本管理Id
22 CostManagemantId int64 `json:"costManagemantId,string"` 22 CostManagemantId int64 `json:"costManagemantId,string"`
23 // 公式id 23 // 公式id