...
|
...
|
@@ -11,6 +11,7 @@ import ( |
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/application/ecelData/command"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/application/factory"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/domainService"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/utils/converter"
|
|
|
)
|
|
|
|
...
|
...
|
@@ -114,6 +115,19 @@ func (srv ExcelDataService) BatchAddAttendance(operate domain.OperateInfo, param |
|
|
defer func() {
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
//获取当前操作人
|
|
|
userSrv := domainService.NewUserService()
|
|
|
operateUser, err := userSrv.User(operate.UserId)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "查询操作人数据失败。"+err.Error())
|
|
|
}
|
|
|
//获取当前操作人的组织
|
|
|
var org *domain.Org
|
|
|
org, err = userSrv.Organization(operate.OrgId)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
//车间数据
|
|
|
//生产班组 数据
|
|
|
productGroupRepo, _ := factory.CreateProductGroupRepository(map[string]interface{}{
|
...
|
...
|
@@ -267,6 +281,7 @@ func (srv ExcelDataService) BatchAddAttendance(operate domain.OperateInfo, param |
|
|
DeletedAt: time.Time{},
|
|
|
ProductDate: productDate,
|
|
|
Ext: &domain.Ext{
|
|
|
OrgName: org.OrgName,
|
|
|
DeviceExt: &domain.DeviceExt{},
|
|
|
ProductPlanExt: &domain.ProductPlanExt{},
|
|
|
AttendanceExt: &domain.ProductAttendanceRecordExt{},
|
...
|
...
|
|