...
|
...
|
@@ -30,10 +30,10 @@ type SuplusApprove struct { |
|
|
}
|
|
|
|
|
|
//新增审批实例
|
|
|
func (s SuplusApprove) NewApproveInstance(header *protocol.RequestHeader, process []*models.AuditFlowProcess) (err error) {
|
|
|
func (s SuplusApprove) NewApproveInstance(header *protocol.RequestHeader, process []*models.AuditFlowProcess) (response NewApproveInstanceResponse, err error) {
|
|
|
var (
|
|
|
request NewApproveInstanceRequest
|
|
|
response NewApproveInstanceResponse
|
|
|
request NewApproveInstanceRequest
|
|
|
//response NewApproveInstanceResponse
|
|
|
mapApproves map[int]*Approve = make(map[int]*Approve)
|
|
|
relativeId int64
|
|
|
userCompany *models.UserCompany
|
...
|
...
|
@@ -85,8 +85,6 @@ func (s SuplusApprove) NewApproveInstance(header *protocol.RequestHeader, proces |
|
|
approve.ApproveUsers = append(approve.ApproveUsers, ApproveUsers{
|
|
|
Uid: item.Uid,
|
|
|
Name: approver.NickName,
|
|
|
//RoleId:5,
|
|
|
RoleId: 0,
|
|
|
})
|
|
|
}
|
|
|
request.RelativeId = relativeId
|
...
|
...
|
@@ -193,25 +191,42 @@ type NewApproveInstanceRequest struct { |
|
|
RelativeId int64 `json:"relativeId"` //关联id
|
|
|
|
|
|
}
|
|
|
type NewApproveInstanceResponse interface{}
|
|
|
type NewApproveInstanceResponse struct {
|
|
|
MessageData []MessageDataItem `json:"messageData"`
|
|
|
}
|
|
|
|
|
|
//审批节点
|
|
|
type Approve struct {
|
|
|
ApproveWay int `json:"approveWay"` //审批方式 1 会签 2 或签 3 发起人从角色成员中自选
|
|
|
ApproveType int `json:"approveType"` //审批类型 1 业务区域负责人 2 指定成员 3 角色
|
|
|
IsDefault int `json:"isDefault"` //1 是默认 0 不是
|
|
|
RoleName string `json:"roleName"` //角色名/负责人
|
|
|
RoleId int `json:"roleId"` //角色id
|
|
|
ApproveUsers []ApproveUsers `json:"approveUsers"` //审批人
|
|
|
}
|
|
|
|
|
|
//审批人
|
|
|
type ApproveUsers struct {
|
|
|
Uid int64 `json:"uid"` //用户id
|
|
|
Name string `json:"name"` //用户名
|
|
|
IsDefault int `json:"isDefault"` //1 是默认 0 不是
|
|
|
RoleName string `json:"roleName"` //角色名/负责人
|
|
|
RoleId int `json:"roleId"` //角色id
|
|
|
Uid int64 `json:"uid"` //用户id
|
|
|
Name string `json:"name"` //用户名
|
|
|
ParentIds []int `json:"parentIds"`
|
|
|
}
|
|
|
|
|
|
//审批 消息列表
|
|
|
type MessageDataItem struct {
|
|
|
MessageContent contentItem `json:"messageContent"`
|
|
|
ReceiverInfo receiverInfo `json:"receiverInfo"`
|
|
|
}
|
|
|
type contentItem struct {
|
|
|
ApproveInstanceId int `json:"approveInstanceId"` //审批实例-id
|
|
|
ApproveProcessId int `json:"approveProcessId"` //审批进程节点-id
|
|
|
RelativeId int `json:"relativeId"` //机会编号
|
|
|
}
|
|
|
type receiverInfo struct {
|
|
|
ReceiverUid int64 `json:"receiverUid"` //用户id
|
|
|
ReceiverName string `json:"receiverName"` //接收人
|
|
|
}
|
|
|
|
|
|
/*ApproveItem 审批操作*/
|
|
|
type ApproveItemRequest struct {
|
|
|
RelativeId int64 `json:"relativeId"` //关联id
|
...
|
...
|
|