作者 Administrator

合并分支 'test' 到 'master'

Test



查看合并请求 !31
... ... @@ -266,6 +266,7 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
{EnName: "chargePersons", CnName: "*负责人"},
{EnName: "target", CnName: "目标值"},
{EnName: "targetPeriod", CnName: "目标值期限"},
{EnName: "calculationType", CnName: "计算类型"},
{EnName: "present", CnName: "现状值"},
{EnName: "schedulePlanPercent", CnName: "进度计划比"},
{EnName: "benchmark", CnName: "标杆值"},
... ... @@ -372,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{
... ... @@ -399,6 +407,7 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
CostPriceDesiredValue: strings.TrimSpace(v["costPriceDesiredValue"]),
CostPriceIndicatedValue: strings.TrimSpace(v["costPriceIndicatedValue"]),
CostPriceActualValue: strings.TrimSpace(v["costPriceActualValue"]),
CalculationType: iCalculationType,
}
if len(ossFile) > 0 {
item.Urls = ossFile
... ... @@ -476,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/20220526/object/1653555125_NGNbjmKpxCyks5CwztFsfj2dBNWerks5.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
... ...
... ... @@ -94,6 +94,8 @@ type CostManagemant struct {
DesiredValue string `json:"desiredValue"`
// 考核值
IndicatedValue string `json:"indicatedValue"`
// 比较运算符号 > <
CalculationType int `json:"calculationType"`
}
type NodeType struct {
... ...