作者 Your Name

更新

... ... @@ -213,7 +213,7 @@ func (srv ExcelDataService) BatchAddAttendance(operate domain.OperateInfo, param
}
//检查工位
var workStation *domain.WorkStation
workStationName := param[i].WorkerName + "/" + param[i].LineName + "/" + param[i].SectionName
workStationName := param[i].WorkshopName + "/" + param[i].LineName + "/" + param[i].SectionName
if v, ok := workStationMap[workStationName]; ok {
workStation = v
} else {
... ...
... ... @@ -428,7 +428,7 @@ func (srv *ProductRecordService) BatchAddProductCapacities(operate *domain.Opera
}
//检查工位
var workStation *domain.WorkStation
workStationName := dataList[i].WorkerName + "/" + dataList[i].LineName + "/" + dataList[i].SectionName
workStationName := dataList[i].WorkshopName + "/" + dataList[i].LineName + "/" + dataList[i].SectionName
if v, ok := workStationMap[workStationName]; ok {
workStation = v
} else {
... ...
... ... @@ -110,7 +110,13 @@ func (srv ProductTroubleService) SaveProductTrouble(operateInfo *domain.OperateI
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if param.SaveAndApprove {
summaryServe, _ := domainService.NewPGRewardSummaryStaticService(transactionContext.(*pgTransaction.TransactionContext))
err = summaryServe.CreateRewardSummaryByProductTrouble(troubleData)
if err != nil {
return nil, application.ThrowError(application.ARG_ERROR, "计算功过奖惩明细失败,"+err.Error())
}
}
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
... ... @@ -385,7 +391,7 @@ func (srv ProductTroubleService) BatchAddProductTrouble(operateInfo *domain.Oper
}
//检查工位
var workStation *domain.WorkStation
workStationName := param[i].WorkerName + "/" + param[i].LineName + "/" + param[i].SectionName
workStationName := param[i].WorkshopName + "/" + param[i].LineName + "/" + param[i].SectionName
if v, ok := workStationMap[workStationName]; ok {
workStation = v
} else {
... ...
... ... @@ -250,7 +250,14 @@ func (ptr *PGProductRecordService) personalProductStatics(productPlan *domain.Pr
if employeeProductRecord, err = employeeProductRecordRepository.Save(employeeProductRecord); err != nil {
log.Logger.Error(fmt.Sprintf("生产记录:[%v] 员工:[%v] 处理异常:%v", productRecord.ProductRecordId, productRecord.ProductWorker.UserId, err.Error()))
}
//TODO 记录奖惩明细
rewardSummarySrv, _ := NewPGRewardSummaryStaticService(ptr.transactionContext)
err = rewardSummarySrv.CreateRewardSummaryByEmployeeProductRecord(employeeProductRecord)
if err != nil {
log.Logger.Error(fmt.Sprintf("记录奖惩明细,生产记录:[%v] 员工:[%v] 处理异常:%v", productRecord.ProductRecordId, productRecord.ProductWorker.UserId, err.Error()))
}
return nil, nil
}
... ...