...
|
...
|
@@ -105,11 +105,11 @@ func (attendanceService *AttendanceService) CreateAttendance(operateInfo *domain |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
var productGroup *domain.ProductGroup
|
|
|
_, productGroup, err = factory.FastPgProductGroup(transactionContext, cmd.ProductGroupId)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
// var productGroup *domain.ProductGroup
|
|
|
// _, productGroup, err = factory.FastPgProductGroup(transactionContext, cmd.ProductGroupId)
|
|
|
// if err != nil {
|
|
|
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
// }
|
|
|
|
|
|
//var workTime float64 = 0
|
|
|
//if cmd.WorkTime-cmd.BreakTime > 0 {
|
...
|
...
|
@@ -145,8 +145,8 @@ func (attendanceService *AttendanceService) CreateAttendance(operateInfo *domain |
|
|
CreatedAt: time.Now(),
|
|
|
UpdatedAt: time.Now(),
|
|
|
Ext: domain.NewExt(org.OrgName).WithAttendanceExt(&domain.ProductAttendanceRecordExt{
|
|
|
GroupName: productGroup.GroupName,
|
|
|
ProductGroupId: productGroup.ProductGroupId,
|
|
|
// GroupName: productGroup.GroupName,
|
|
|
// ProductGroupId: productGroup.ProductGroupId,
|
|
|
BreakTime: cmd.BreakTime,
|
|
|
}),
|
|
|
ProductDate: productDate,
|
...
|
...
|
|