...
|
...
|
@@ -266,7 +266,7 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm |
|
|
{EnName: "chargePersons", CnName: "*负责人"},
|
|
|
{EnName: "target", CnName: "目标值"},
|
|
|
{EnName: "targetPeriod", CnName: "目标值期限"},
|
|
|
{EnName: "comparisonOperator", CnName: "比较符"},
|
|
|
{EnName: "calculationType", CnName: "计算类型"},
|
|
|
{EnName: "present", CnName: "现状值"},
|
|
|
{EnName: "schedulePlanPercent", CnName: "进度计划比"},
|
|
|
{EnName: "benchmark", CnName: "标杆值"},
|
...
|
...
|
@@ -373,6 +373,13 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm |
|
|
chargePersons = append(chargePersons, "0")
|
|
|
}
|
|
|
}
|
|
|
calculationType := strings.TrimSpace(v["calculationType"])
|
|
|
iCalculationType := 0
|
|
|
if calculationType == "高于目标值" {
|
|
|
iCalculationType = 1
|
|
|
} else if calculationType == "低于目标值" {
|
|
|
iCalculationType = 2
|
|
|
}
|
|
|
//目标值期限
|
|
|
targetPeriod := domain.GetTargetPeriod(v["targetPeriod"])
|
|
|
item := &domain.CostManagemant{
|
...
|
...
|
@@ -400,7 +407,7 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm |
|
|
CostPriceDesiredValue: strings.TrimSpace(v["costPriceDesiredValue"]),
|
|
|
CostPriceIndicatedValue: strings.TrimSpace(v["costPriceIndicatedValue"]),
|
|
|
CostPriceActualValue: strings.TrimSpace(v["costPriceActualValue"]),
|
|
|
ComparisonOperator: strings.TrimSpace(v["comparisonOperator"]),
|
|
|
CalculationType: iCalculationType,
|
|
|
}
|
|
|
if len(ossFile) > 0 {
|
|
|
item.Urls = ossFile
|
...
|
...
|
@@ -478,7 +485,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/opportunity/dev_online/20220615/object/1655280919_MKQhwQ7D72ZBsrRpraX3QJGxWt3KyCj5.xlsx",
|
|
|
domain.ImportCosts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/opportunity/dev_online/20220616/object/1655349687_CjpXGrjD4EH2jrw4SXJmHkaQZXKQcT56.xlsx",
|
|
|
}
|
|
|
var url string
|
|
|
var ok bool
|
...
|
...
|
|