作者 庄敏学

导入

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