...
|
...
|
@@ -19,7 +19,7 @@ func (srv ExcelDataService) ImportProductRecord(importDataCommand *command.Impor |
|
|
{EnName: "lineName", CnName: "线别"},
|
|
|
{EnName: "sectionName", CnName: "工段"},
|
|
|
{EnName: "workerName", CnName: "姓名"},
|
|
|
{EnName: "productGroupName", CnName: "班组"},
|
|
|
{EnName: "batchNumber", CnName: "批次号"},
|
|
|
{EnName: "weigh", CnName: "二级品重量"},
|
|
|
}
|
|
|
excelData, err := converter.OpenImportFileFromIoReader(excelImport, importDataCommand.Reader, importDataCommand.FileExt) //excelImport.OpenExcelFromIoReader(importDataCommand.Reader)
|
...
|
...
|
@@ -30,15 +30,14 @@ func (srv ExcelDataService) ImportProductRecord(importDataCommand *command.Impor |
|
|
item := productRecordCommand.BatchAddProductRecordCommand{}
|
|
|
for _, v := range excelData {
|
|
|
item = productRecordCommand.BatchAddProductRecordCommand{
|
|
|
CreatedDate: v["createdDate"],
|
|
|
WorkshopName: v["workshopName"],
|
|
|
LineName: v["lineName"],
|
|
|
SectionName: v["sectionName"],
|
|
|
WorkerName: v["workerName"],
|
|
|
BatchNumber: v["batchNumber"],
|
|
|
ProductGroupName: v["productGroupName"],
|
|
|
Weigh: v["weigh"],
|
|
|
FailReason: "",
|
|
|
CreatedDate: v["createdDate"],
|
|
|
WorkshopName: v["workshopName"],
|
|
|
LineName: v["lineName"],
|
|
|
SectionName: v["sectionName"],
|
|
|
WorkerName: v["workerName"],
|
|
|
BatchNumber: v["batchNumber"],
|
|
|
Weigh: v["weigh"],
|
|
|
FailReason: "",
|
|
|
}
|
|
|
items = append(items, item)
|
|
|
}
|
...
|
...
|
|