|
@@ -339,6 +339,7 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm |
|
@@ -339,6 +339,7 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm |
339
|
targetPeriod := domain.GetTargetPeriod(v["targetPeriod"])
|
339
|
targetPeriod := domain.GetTargetPeriod(v["targetPeriod"])
|
340
|
item := &domain.CostManagemant{
|
340
|
item := &domain.CostManagemant{
|
341
|
ProjectCode: strings.TrimSpace(v["projectCode"]),
|
341
|
ProjectCode: strings.TrimSpace(v["projectCode"]),
|
|
|
342
|
+ ProjectName: importDataCommand.FileName,
|
342
|
ItemName: strings.TrimSpace(v["itemName"]),
|
343
|
ItemName: strings.TrimSpace(v["itemName"]),
|
343
|
ChoiceId: choiceId,
|
344
|
ChoiceId: choiceId,
|
344
|
Text: strings.TrimSpace(v["text"]),
|
345
|
Text: strings.TrimSpace(v["text"]),
|
|
@@ -364,9 +365,9 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm |
|
@@ -364,9 +365,9 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm |
364
|
if err != nil {
|
365
|
if err != nil {
|
365
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
366
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
366
|
}
|
367
|
}
|
367
|
- if result.Code != 0{
|
|
|
368
|
- return nil,application.ThrowError(application.BUSINESS_ERROR,result.Msg)
|
|
|
369
|
- }else {
|
368
|
+ if result.Code != 0 {
|
|
|
369
|
+ return nil, application.ThrowError(application.BUSINESS_ERROR, result.Msg)
|
|
|
370
|
+ } else {
|
370
|
return result.Data, nil
|
371
|
return result.Data, nil
|
371
|
}
|
372
|
}
|
372
|
}
|
373
|
}
|