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