|
|
|
@ -287,12 +287,10 @@ |
|
|
|
from stocktaking st |
|
|
|
where 1 = 1 |
|
|
|
<if test='isDone == 0'> |
|
|
|
and (state = 3 and departmentManagerState = 3 and FIND_IN_SET(#{userId},st.departmentManager) != 0 ) |
|
|
|
or (state = 3 and departmentManagerState != 3 and #{userId} = st.originator) |
|
|
|
and (state = 3 and departmentManagerState = 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) |
|
|
|
</if> |
|
|
|
<if test='isDone == 1'> |
|
|
|
and (state != 3 and departmentManagerState != 3 and FIND_IN_SET(#{userId},st.departmentManager) != 0 ) |
|
|
|
or (state != 3 and departmentManagerState != 3 and #{userId} = st.originator) |
|
|
|
and (state != 3 and departmentManagerState != 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) |
|
|
|
</if> |
|
|
|
ORDER BY st.createTime desc |
|
|
|
<if test="begin != null and size != null"> |
|
|
|
@ -306,12 +304,12 @@ |
|
|
|
from stocktaking st |
|
|
|
where 1 = 1 |
|
|
|
<if test='isDone == 0'> |
|
|
|
and (state = 3 and departmentManagerState = 3 and FIND_IN_SET(#{userId},st.departmentManager) != 0 ) |
|
|
|
or (state = 3 and departmentManagerState != 3 and #{userId} = st.originator) |
|
|
|
and (state = 3 and departmentManagerState = 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) |
|
|
|
|
|
|
|
</if> |
|
|
|
<if test='isDone == 1'> |
|
|
|
and (state != 3 and departmentManagerState != 3 and FIND_IN_SET(#{userId},st.departmentManager) != 0 ) |
|
|
|
or (state != 3 and departmentManagerState != 3 and #{userId} = st.originator) |
|
|
|
and (state != 3 and departmentManagerState != 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
</select> |
|
|
|
|