|
@@ -11,6 +11,7 @@ import ( |
|
@@ -11,6 +11,7 @@ import ( |
11
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/application/ecelData/command"
|
11
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/application/ecelData/command"
|
12
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/application/factory"
|
12
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/application/factory"
|
13
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/domain"
|
13
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/domain"
|
|
|
14
|
+ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/domainService"
|
14
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/utils/converter"
|
15
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/utils/converter"
|
15
|
)
|
16
|
)
|
16
|
|
17
|
|
|
@@ -114,6 +115,19 @@ func (srv ExcelDataService) BatchAddAttendance(operate domain.OperateInfo, param |
|
@@ -114,6 +115,19 @@ func (srv ExcelDataService) BatchAddAttendance(operate domain.OperateInfo, param |
114
|
defer func() {
|
115
|
defer func() {
|
115
|
transactionContext.RollbackTransaction()
|
116
|
transactionContext.RollbackTransaction()
|
116
|
}()
|
117
|
}()
|
|
|
118
|
+ //获取当前操作人
|
|
|
119
|
+ userSrv := domainService.NewUserService()
|
|
|
120
|
+ operateUser, err := userSrv.User(operate.UserId)
|
|
|
121
|
+ if err != nil {
|
|
|
122
|
+ return nil, application.ThrowError(application.TRANSACTION_ERROR, "查询操作人数据失败。"+err.Error())
|
|
|
123
|
+ }
|
|
|
124
|
+ //获取当前操作人的组织
|
|
|
125
|
+ var org *domain.Org
|
|
|
126
|
+ org, err = userSrv.Organization(operate.OrgId)
|
|
|
127
|
+ if err != nil {
|
|
|
128
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
129
|
+ }
|
|
|
130
|
+
|
117
|
//车间数据
|
131
|
//车间数据
|
118
|
//生产班组 数据
|
132
|
//生产班组 数据
|
119
|
productGroupRepo, _ := factory.CreateProductGroupRepository(map[string]interface{}{
|
133
|
productGroupRepo, _ := factory.CreateProductGroupRepository(map[string]interface{}{
|
|
@@ -267,6 +281,7 @@ func (srv ExcelDataService) BatchAddAttendance(operate domain.OperateInfo, param |
|
@@ -267,6 +281,7 @@ func (srv ExcelDataService) BatchAddAttendance(operate domain.OperateInfo, param |
267
|
DeletedAt: time.Time{},
|
281
|
DeletedAt: time.Time{},
|
268
|
ProductDate: productDate,
|
282
|
ProductDate: productDate,
|
269
|
Ext: &domain.Ext{
|
283
|
Ext: &domain.Ext{
|
|
|
284
|
+ OrgName: org.OrgName,
|
270
|
DeviceExt: &domain.DeviceExt{},
|
285
|
DeviceExt: &domain.DeviceExt{},
|
271
|
ProductPlanExt: &domain.ProductPlanExt{},
|
286
|
ProductPlanExt: &domain.ProductPlanExt{},
|
272
|
AttendanceExt: &domain.ProductAttendanceRecordExt{},
|
287
|
AttendanceExt: &domain.ProductAttendanceRecordExt{},
|