作者 Your Name

更改导入

... ... @@ -61,11 +61,11 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import
//domain.ImportCooperationUser: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210926/object/1632635345_SbfzmkXjQHhCwPw4MB7zb5EBBtdp2MSE.xlsx",
//domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210927/object/1632743214_rNHm6ZBXZaC5xKTrsE7M4h45MY6n6Ff3.xlsx",
//二级品审核导入
"ImportProductRecordLevel2": "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/test/20221030/object/1667144411_R3h4nQxxcMJ7ympktMsYBBQ6bAcFC6xj.xlsx",
//"ImportProductRecordLevel2": "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/test/20221030/object/1667144411_R3h4nQxxcMJ7ympktMsYBBQ6bAcFC6xj.xlsx",
//工时管理导入
"ImportAttendance": "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/test/20221030/object/1667144523_w66QpzZTfxsmhbM5mmBrHjpytcydMNs2.xlsx",
//"ImportAttendance": "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/test/20221030/object/1667144523_w66QpzZTfxsmhbM5mmBrHjpytcydMNs2.xlsx",
//事故管理导入
"ImportProductTrouble": "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/test/20221030/object/1667144570_xYKYMrMnXWTyasDPnX2JNXEZHd3rJsWG.xlsx",
// "ImportProductTrouble": "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/test/20221030/object/1667144570_xYKYMrMnXWTyasDPnX2JNXEZHd3rJsWG.xlsx",
}
var url string
var ok bool
... ...
... ... @@ -62,7 +62,7 @@ func (data *importAttendance) validField() error {
// 导入生产计划
func (srv ExcelDataService) ImportDataAttendance(importDataCommand *command.ImportDataCommand) (interface{}, error) {
excelImport := excel.NewExcelImport()
excelImport.RowBegin = 2 //第二行开始读取
excelImport.RowBegin = 3 //第二行开始读取
excelImport.DataFields = []excel.DataField{
{EnName: "ProductDate", CnName: "日期"},
{EnName: "WorkshopName", CnName: "车间"},
... ... @@ -267,5 +267,5 @@ func (srv ExcelDataService) BatchAddAttendance(operate domain.OperateInfo, param
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
return nil, err
return nil, nil
}
... ...
... ... @@ -640,8 +640,8 @@ func (productRecordService *ProductRecordService) BatchAddProductRecord(operate
if err != nil {
e := fmt.Sprintf("【发送产量统计任务失败】 ProductRecordId=%d, %s", productRecordList[i].ProductRecordId, err.Error())
log.Logger.Error(e)
return failRows, err
return failRows, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
}
return failRows, err
return failRows, nil
}
... ...