作者 yangfu

refactor: 成本导入增加字段

@@ -271,6 +271,15 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm @@ -271,6 +271,15 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
271 {EnName: "benchmark", CnName: "标杆值"}, 271 {EnName: "benchmark", CnName: "标杆值"},
272 {EnName: "highest", CnName: "历史最高值"}, 272 {EnName: "highest", CnName: "历史最高值"},
273 {EnName: "yesterdayActual", CnName: "昨日实际值"}, 273 {EnName: "yesterdayActual", CnName: "昨日实际值"},
  274 +
  275 + {EnName: "desiredValue", CnName: "主干-理想值"},
  276 + {EnName: "indicatedValue", CnName: "主干-考核值"},
  277 + {EnName: "factoryPriceDesiredValue", CnName: "树桩-出厂价-理想值"},
  278 + {EnName: "factoryPriceIndicatedValue", CnName: "树桩-出厂价-考核值"},
  279 + {EnName: "factoryPriceActualValue", CnName: "树桩-出厂价-现状值"},
  280 + {EnName: "costPriceDesiredValue", CnName: "树桩-成本-理想值"},
  281 + {EnName: "costPriceIndicatedValue", CnName: "树桩-成本-考核值"},
  282 + {EnName: "costPriceActualValue", CnName: "树桩-成本-现状值"},
274 } 283 }
275 var buf bytes.Buffer 284 var buf bytes.Buffer
276 tee := io.TeeReader(importDataCommand.Reader, &buf) 285 tee := io.TeeReader(importDataCommand.Reader, &buf)
@@ -381,6 +390,15 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm @@ -381,6 +390,15 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
381 Highest: strings.TrimSpace(v["highest"]), 390 Highest: strings.TrimSpace(v["highest"]),
382 YesterdayActual: strings.TrimSpace(v["yesterdayActual"]), 391 YesterdayActual: strings.TrimSpace(v["yesterdayActual"]),
383 Types: importCostCommand.Types, 392 Types: importCostCommand.Types,
  393 +
  394 + DesiredValue: strings.TrimSpace(v["desiredValue"]),
  395 + IndicatedValue: strings.TrimSpace(v["indicatedValue"]),
  396 + FactoryPriceDesiredValue: strings.TrimSpace(v["factoryPriceDesiredValue"]),
  397 + FactoryPriceIndicatedValue: strings.TrimSpace(v["factoryPriceIndicatedValue"]),
  398 + FactoryPriceActualValue: strings.TrimSpace(v["factoryPriceActualValue"]),
  399 + CostPriceDesiredValue: strings.TrimSpace(v["costPriceDesiredValue"]),
  400 + CostPriceIndicatedValue: strings.TrimSpace(v["costPriceIndicatedValue"]),
  401 + CostPriceActualValue: strings.TrimSpace(v["costPriceActualValue"]),
384 } 402 }
385 if len(ossFile) > 0 { 403 if len(ossFile) > 0 {
386 item.Urls = ossFile 404 item.Urls = ossFile
@@ -458,7 +476,7 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import @@ -458,7 +476,7 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import
458 domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210927/object/1632743214_rNHm6ZBXZaC5xKTrsE7M4h45MY6n6Ff3.xlsx", 476 domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210927/object/1632743214_rNHm6ZBXZaC5xKTrsE7M4h45MY6n6Ff3.xlsx",
459 domain.ImportProducts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220120/object/1642670543_cbraNKjNPHcbN6RNBYQBrwhC7BXGbDWp.xlsx", 477 domain.ImportProducts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220120/object/1642670543_cbraNKjNPHcbN6RNBYQBrwhC7BXGbDWp.xlsx",
460 domain.ImportDevices: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220126/object/1643184320_hT6sY5BKHmBa4TynfSGSCGyZ2KTTtzkj.xlsx", 478 domain.ImportDevices: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220126/object/1643184320_hT6sY5BKHmBa4TynfSGSCGyZ2KTTtzkj.xlsx",
461 - domain.ImportCosts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/test/20220318/object/1647587204_B5azRmr2TB73jRKWsnFyDe4yxXJWnrDT.xlsx", 479 + domain.ImportCosts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/opportunity/dev_online/20220526/object/1653535826_mNh4tZkZpsTeRkYAnb3WSmCKs5SYM2Ps.xlsx",
462 } 480 }
463 var url string 481 var url string
464 var ok bool 482 var ok bool
@@ -65,6 +65,35 @@ type CostManagemant struct { @@ -65,6 +65,35 @@ type CostManagemant struct {
65 Types int `json:"types"` 65 Types int `json:"types"`
66 // 昨日实际值 66 // 昨日实际值
67 YesterdayActual string `json:"yesterdayActual"` 67 YesterdayActual string `json:"yesterdayActual"`
  68 +
  69 + // 出厂价-理想值
  70 + FactoryPriceDesiredValue string `json:"factoryPriceDesiredValue"`
  71 + // 成本-理想值
  72 + CostPriceDesiredValue string `json:"costPriceDesiredValue"`
  73 + // 毛利-理想值
  74 + ProfitPriceDesiredValue string `json:"profitPriceDesiredValue"`
  75 + // 毛利率-理想值
  76 + ProfitProportionDesiredValue string `json:"profitProportionDesiredValue"`
  77 + // 出厂价-考核值
  78 + FactoryPriceIndicatedValue string `json:"factoryPriceIndicatedValue"`
  79 + // 成本-考核值
  80 + CostPriceIndicatedValue string `json:"costPriceIndicatedValue"`
  81 + // 毛利-考核值
  82 + ProfitPriceIndicatedValue string `json:"profitPriceIndicatedValue"`
  83 + // 毛利率-考核值
  84 + ProfitProportionIndicatedValue string `json:"profitProportionIndicatedValue"`
  85 + // 出厂价-现状值
  86 + FactoryPriceActualValue string `json:"factoryPriceActualValue"`
  87 + // 成本-现状值
  88 + CostPriceActualValue string `json:"costPriceActualValue"`
  89 + // 毛利-现状值
  90 + ProfitPriceActualValue string `json:"profitPriceActualValue"`
  91 + // 毛利率-现状值
  92 + ProfitProportionActualValue string `json:"profitProportionActualValue"`
  93 + // 理想值
  94 + DesiredValue string `json:"desiredValue"`
  95 + // 考核值
  96 + IndicatedValue string `json:"indicatedValue"`
68 } 97 }
69 98
70 type NodeType struct { 99 type NodeType struct {