|
@@ -131,6 +131,9 @@ func (productRecordService *ProductRecordService) SaveProductCapacities(operateI |
|
@@ -131,6 +131,9 @@ func (productRecordService *ProductRecordService) SaveProductCapacities(operateI |
131
|
if err != nil {
|
131
|
if err != nil {
|
132
|
return nil, application.ThrowError(application.ARG_ERROR, "保存员工生产记录失败"+err.Error())
|
132
|
return nil, application.ThrowError(application.ARG_ERROR, "保存员工生产记录失败"+err.Error())
|
133
|
}
|
133
|
}
|
|
|
134
|
+ if param.SaveAndApprove {
|
|
|
135
|
+ _ = domainService.SendProductRecordStaticsJob(epRecord)
|
|
|
136
|
+ }
|
134
|
if err := transactionContext.CommitTransaction(); err != nil {
|
137
|
if err := transactionContext.CommitTransaction(); err != nil {
|
135
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
138
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
136
|
}
|
139
|
}
|
|
@@ -332,6 +335,7 @@ func (productRecordService *ProductRecordService) ApproveProductCapacities(opera |
|
@@ -332,6 +335,7 @@ func (productRecordService *ProductRecordService) ApproveProductCapacities(opera |
332
|
if err != nil {
|
335
|
if err != nil {
|
333
|
return nil, application.ThrowError(application.ARG_ERROR, "保存数据错误,"+err.Error())
|
336
|
return nil, application.ThrowError(application.ARG_ERROR, "保存数据错误,"+err.Error())
|
334
|
}
|
337
|
}
|
|
|
338
|
+ _ = domainService.SendProductRecordStaticsJob(recordData)
|
335
|
if err := transactionContext.CommitTransaction(); err != nil {
|
339
|
if err := transactionContext.CommitTransaction(); err != nil {
|
336
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
340
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
337
|
}
|
341
|
}
|
|
@@ -661,6 +665,9 @@ func (productRecordService *ProductRecordService) CreateProductCapacities(operat |
|
@@ -661,6 +665,9 @@ func (productRecordService *ProductRecordService) CreateProductCapacities(operat |
661
|
if err != nil {
|
665
|
if err != nil {
|
662
|
return nil, application.ThrowError(application.ARG_ERROR, "保存员工生产记录失败"+err.Error())
|
666
|
return nil, application.ThrowError(application.ARG_ERROR, "保存员工生产记录失败"+err.Error())
|
663
|
}
|
667
|
}
|
|
|
668
|
+ if param.SaveAndApprove {
|
|
|
669
|
+ _ = domainService.SendProductRecordStaticsJob(epRecord)
|
|
|
670
|
+ }
|
664
|
productRecordIds = append(productRecordIds, epRecord.ProductRecordId)
|
671
|
productRecordIds = append(productRecordIds, epRecord.ProductRecordId)
|
665
|
}
|
672
|
}
|
666
|
if err := transactionContext.CommitTransaction(); err != nil {
|
673
|
if err := transactionContext.CommitTransaction(); err != nil {
|