|
@@ -278,9 +278,9 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm |
|
@@ -278,9 +278,9 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm |
278
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
278
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
279
|
}
|
279
|
}
|
280
|
importCostCommand := &command.ImportCostDataCommand{}
|
280
|
importCostCommand := &command.ImportCostDataCommand{}
|
281
|
- err = json.Unmarshal([]byte(importDataCommand.Where),importCostCommand)
|
281
|
+ err = json.Unmarshal([]byte(importDataCommand.Where), importCostCommand)
|
282
|
if err != nil {
|
282
|
if err != nil {
|
283
|
- return nil,application.ThrowError(application.ARG_ERROR,"风险类型不能为空")
|
283
|
+ return nil, application.ThrowError(application.ARG_ERROR, "风险类型不能为空")
|
284
|
}
|
284
|
}
|
285
|
if importCostCommand.Types <= 0 {
|
285
|
if importCostCommand.Types <= 0 {
|
286
|
return nil, application.ThrowError(application.ARG_ERROR, "风险类型不能为空")
|
286
|
return nil, application.ThrowError(application.ARG_ERROR, "风险类型不能为空")
|
|
@@ -323,10 +323,8 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm |
|
@@ -323,10 +323,8 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm |
323
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "上传图片失败")
|
323
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "上传图片失败")
|
324
|
}
|
324
|
}
|
325
|
}
|
325
|
}
|
326
|
- choiceId, err := strconv.Atoi(v["choiceId"])
|
|
|
327
|
- if err != nil {
|
|
|
328
|
- return nil, application.ThrowError(application.ARG_ERROR, "节点类型非数字类型")
|
|
|
329
|
- }
|
326
|
+ //choiceId, err := strconv.Atoi(v["choiceId"])
|
|
|
327
|
+ choiceId := domain.NodeType{}.GetIdByName(strings.TrimSpace(v["choiceId"]))
|
330
|
// 负责人
|
328
|
// 负责人
|
331
|
chargePersons := make([]string, 0)
|
329
|
chargePersons := make([]string, 0)
|
332
|
names := strings.Split(strings.TrimSpace(v["chargePersons"]), " ")
|
330
|
names := strings.Split(strings.TrimSpace(v["chargePersons"]), " ")
|
|
@@ -410,6 +408,7 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import |
|
@@ -410,6 +408,7 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import |
410
|
domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210927/object/1632743214_rNHm6ZBXZaC5xKTrsE7M4h45MY6n6Ff3.xlsx",
|
408
|
domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210927/object/1632743214_rNHm6ZBXZaC5xKTrsE7M4h45MY6n6Ff3.xlsx",
|
411
|
domain.ImportProducts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220120/object/1642670543_cbraNKjNPHcbN6RNBYQBrwhC7BXGbDWp.xlsx",
|
409
|
domain.ImportProducts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220120/object/1642670543_cbraNKjNPHcbN6RNBYQBrwhC7BXGbDWp.xlsx",
|
412
|
domain.ImportDevices: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220126/object/1643184320_hT6sY5BKHmBa4TynfSGSCGyZ2KTTtzkj.xlsx",
|
410
|
domain.ImportDevices: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220126/object/1643184320_hT6sY5BKHmBa4TynfSGSCGyZ2KTTtzkj.xlsx",
|
|
|
411
|
+ domain.ImportCosts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220311/object/1646977166_ATAD4tJbBDp4WhNFABatTZzkJDeZWB3K.xlsx",
|
413
|
}
|
412
|
}
|
414
|
var url string
|
413
|
var url string
|
415
|
var ok bool
|
414
|
var ok bool
|