作者 Your Name

调整产能审核

... ... @@ -30,7 +30,7 @@ func (attendanceService *AttendanceService) WorkshopWorkTimeRecordStatics(cmd *c
log.Logger.Error(err.Error())
return nil, err
}
//TODO 添加功过统计
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
... ...
... ... @@ -131,6 +131,9 @@ func (productRecordService *ProductRecordService) SaveProductCapacities(operateI
if err != nil {
return nil, application.ThrowError(application.ARG_ERROR, "保存员工生产记录失败"+err.Error())
}
if param.SaveAndApprove {
_ = domainService.SendProductRecordStaticsJob(epRecord)
}
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
... ... @@ -332,6 +335,7 @@ func (productRecordService *ProductRecordService) ApproveProductCapacities(opera
if err != nil {
return nil, application.ThrowError(application.ARG_ERROR, "保存数据错误,"+err.Error())
}
_ = domainService.SendProductRecordStaticsJob(recordData)
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
... ... @@ -661,6 +665,9 @@ func (productRecordService *ProductRecordService) CreateProductCapacities(operat
if err != nil {
return nil, application.ThrowError(application.ARG_ERROR, "保存员工生产记录失败"+err.Error())
}
if param.SaveAndApprove {
_ = domainService.SendProductRecordStaticsJob(epRecord)
}
productRecordIds = append(productRecordIds, epRecord.ProductRecordId)
}
if err := transactionContext.CommitTransaction(); err != nil {
... ...