作者 陈志颖

fix:重置申请查询条件

... ... @@ -17,9 +17,9 @@ type OneClickApprovalCooperationApplicationCommand struct {
// 菜单编码,APP端必须
Code string `cname:"菜单编码" json:"code" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
UserId int64 `cname:"用户ID" json:"userId" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"`
// 审核动作,1同意,2拒绝
Action int32 `cname:"审核动作" json:"action" valid:"Required"`
// 审核状态
... ...
... ... @@ -445,7 +445,7 @@ func (cooperationApplicationService *CooperationApplicationService) OneClickAppr
// 获取审核人
var verifier *domain.User
if data, err := userService.UserFrom(oneClickApprovalCooperationApplicationCommand.CompanyId, oneClickApprovalCooperationApplicationCommand.OrgId, oneClickApprovalCooperationApplicationCommand.UserId); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取申请人失败")
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取审核人失败")
} else {
verifier = data
}
... ... @@ -454,6 +454,9 @@ func (cooperationApplicationService *CooperationApplicationService) OneClickAppr
oneClickApprovalCooperationApplicationCommand.CooperationApplicationStatus = 1 // 待审核
oneClickApprovalCooperationApplicationCommand.OffsetLimit = false
oneClickApprovalCooperationApplicationCommand.IsCanceled = int32(1)
oneClickApprovalCooperationApplicationCommand.UserBaseId = 0
oneClickApprovalCooperationApplicationCommand.UserId = 0
if count, cooperationApplications, err := cooperationApplicationRepository.Find(tool_funs.SimpleStructToMap(oneClickApprovalCooperationApplicationCommand)); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
... ...
... ... @@ -72,8 +72,8 @@ func (controller *CooperationApplicationController) OneClickApprovalCooperationA
header := controller.GetRequestHeader(controller.Ctx)
oneClickApprovalCooperationApplicationCommand.CompanyId = header.CompanyId
oneClickApprovalCooperationApplicationCommand.OrgId = header.OrgId
//oneClickApprovalCooperationApplicationCommand.UserId = header.UserId
//oneClickApprovalCooperationApplicationCommand.UserBaseId = header.UserBaseId
oneClickApprovalCooperationApplicationCommand.UserId = header.UserId
oneClickApprovalCooperationApplicationCommand.UserBaseId = header.UserBaseId
data, err := cooperationApplicationService.OneClickApprovalCooperationApplication(oneClickApprovalCooperationApplicationCommand)
controller.Response(data, err)
}
... ...