作者 yangfu

refactor: 成本导入增加字段

... ... @@ -271,6 +271,15 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
{EnName: "benchmark", CnName: "标杆值"},
{EnName: "highest", CnName: "历史最高值"},
{EnName: "yesterdayActual", CnName: "昨日实际值"},
{EnName: "desiredValue", CnName: "主干-理想值"},
{EnName: "indicatedValue", CnName: "主干-考核值"},
{EnName: "factoryPriceDesiredValue", CnName: "树桩-出厂价-理想值"},
{EnName: "factoryPriceIndicatedValue", CnName: "树桩-出厂价-考核值"},
{EnName: "factoryPriceActualValue", CnName: "树桩-出厂价-现状值"},
{EnName: "costPriceDesiredValue", CnName: "树桩-成本-理想值"},
{EnName: "costPriceIndicatedValue", CnName: "树桩-成本-考核值"},
{EnName: "costPriceActualValue", CnName: "树桩-成本-现状值"},
}
var buf bytes.Buffer
tee := io.TeeReader(importDataCommand.Reader, &buf)
... ... @@ -381,6 +390,15 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
Highest: strings.TrimSpace(v["highest"]),
YesterdayActual: strings.TrimSpace(v["yesterdayActual"]),
Types: importCostCommand.Types,
DesiredValue: strings.TrimSpace(v["desiredValue"]),
IndicatedValue: strings.TrimSpace(v["indicatedValue"]),
FactoryPriceDesiredValue: strings.TrimSpace(v["factoryPriceDesiredValue"]),
FactoryPriceIndicatedValue: strings.TrimSpace(v["factoryPriceIndicatedValue"]),
FactoryPriceActualValue: strings.TrimSpace(v["factoryPriceActualValue"]),
CostPriceDesiredValue: strings.TrimSpace(v["costPriceDesiredValue"]),
CostPriceIndicatedValue: strings.TrimSpace(v["costPriceIndicatedValue"]),
CostPriceActualValue: strings.TrimSpace(v["costPriceActualValue"]),
}
if len(ossFile) > 0 {
item.Urls = ossFile
... ... @@ -458,7 +476,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/test/20220318/object/1647587204_B5azRmr2TB73jRKWsnFyDe4yxXJWnrDT.xlsx",
domain.ImportCosts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/opportunity/dev_online/20220526/object/1653535826_mNh4tZkZpsTeRkYAnb3WSmCKs5SYM2Ps.xlsx",
}
var url string
var ok bool
... ...
... ... @@ -65,6 +65,35 @@ type CostManagemant struct {
Types int `json:"types"`
// 昨日实际值
YesterdayActual string `json:"yesterdayActual"`
// 出厂价-理想值
FactoryPriceDesiredValue string `json:"factoryPriceDesiredValue"`
// 成本-理想值
CostPriceDesiredValue string `json:"costPriceDesiredValue"`
// 毛利-理想值
ProfitPriceDesiredValue string `json:"profitPriceDesiredValue"`
// 毛利率-理想值
ProfitProportionDesiredValue string `json:"profitProportionDesiredValue"`
// 出厂价-考核值
FactoryPriceIndicatedValue string `json:"factoryPriceIndicatedValue"`
// 成本-考核值
CostPriceIndicatedValue string `json:"costPriceIndicatedValue"`
// 毛利-考核值
ProfitPriceIndicatedValue string `json:"profitPriceIndicatedValue"`
// 毛利率-考核值
ProfitProportionIndicatedValue string `json:"profitProportionIndicatedValue"`
// 出厂价-现状值
FactoryPriceActualValue string `json:"factoryPriceActualValue"`
// 成本-现状值
CostPriceActualValue string `json:"costPriceActualValue"`
// 毛利-现状值
ProfitPriceActualValue string `json:"profitPriceActualValue"`
// 毛利率-现状值
ProfitProportionActualValue string `json:"profitProportionActualValue"`
// 理想值
DesiredValue string `json:"desiredValue"`
// 考核值
IndicatedValue string `json:"indicatedValue"`
}
type NodeType struct {
... ... @@ -109,4 +138,4 @@ func GetTargetPeriod(targetPeriod string) int {
return 0
}
return -1
}
\ No newline at end of file
}
... ...