...
|
...
|
@@ -17,6 +17,7 @@ import ( |
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/query"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/dao"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/xredis"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/log"
|
|
|
)
|
|
|
|
...
|
...
|
@@ -1008,6 +1009,14 @@ func (srv *StaffAssessServeice) getStaffDescrip(transactionContext application.T |
|
|
|
|
|
// 提交评估数据
|
|
|
func (srv StaffAssessServeice) SaveAssessInfo(param *command.SaveAssessInfoCommand) (map[string]interface{}, error) {
|
|
|
lock := xredis.NewLockStaffAssess(param.AssessId)
|
|
|
err := lock.Lock()
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "未能完全提交评估内容")
|
|
|
}
|
|
|
defer func() {
|
|
|
lock.UnLock()
|
|
|
}()
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
...
|
...
|
@@ -1135,6 +1144,14 @@ func (srv StaffAssessServeice) SaveAssessInfo(param *command.SaveAssessInfoComma |
|
|
|
|
|
// SaveSelfAssess 提交自评评估内容
|
|
|
func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) (map[string]interface{}, error) {
|
|
|
lock := xredis.NewLockStaffAssess(in.AssessId)
|
|
|
err := lock.Lock()
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "未能完全提交评估内容")
|
|
|
}
|
|
|
defer func() {
|
|
|
lock.UnLock()
|
|
|
}()
|
|
|
transactionContext, err := factory.ValidateStartTransaction(in)
|
|
|
if err != nil {
|
|
|
return nil, err
|
...
|
...
|
|