|
@@ -64,11 +64,16 @@ func (this *SealApprovalCommon) List() {
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
+ //join表字段
|
|
|
+ joinCondition := " and a.curr_node_id=d.node_id"
|
|
|
//归属
|
|
|
if status == "待审批" {
|
|
|
condition += ` AND ((c.user_id = ? and a.start_node_id = a.curr_node_id) OR (d.approve_user_id = ? )) and d.status="待审批" `
|
|
|
//condition += ` AND (c.user_id = ? OR d.approve_user_id = ?) and (d.approve_user_id is null or d.approve_user_id = c.user_id)`
|
|
|
|
|
|
+ } else if status == "处理中" {
|
|
|
+ condition += ` AND ((c.user_id = ? and a.start_node_id != a.curr_node_id) OR (d.approve_user_id = ? )) and d.status="待审批" `
|
|
|
+ joinCondition = " and a.curr_node_id!=d.node_id"
|
|
|
} else {
|
|
|
condition += ` AND (c.user_id = ? or d.approve_user_id = ?)`
|
|
|
}
|
|
@@ -151,12 +156,6 @@ func (this *SealApprovalCommon) List() {
|
|
|
var total int
|
|
|
var list []*contract_approval.SealApprovalList
|
|
|
|
|
|
- //join表字段
|
|
|
- joinCondition := " and a.curr_node_id=d.node_id"
|
|
|
- if status == "处理中" {
|
|
|
- joinCondition = " and a.curr_node_id!=d.node_id"
|
|
|
- condition += ` AND a.curr_node_id !=a.start_node_id`
|
|
|
- }
|
|
|
if status != "待审批" && status != "处理中" {
|
|
|
tmpTotal, err := contract_approval.GetSealApprovalListCountV2(childCondition, condition, childPars, pars)
|
|
|
if err != nil {
|