Browse Source

修改库存盘点展示

lwx_dev
erdanergou 3 years ago
parent
commit
f59ade744d
  1. 2
      src/main/java/com/dreamchaser/depository_manage/controller/StockTakingController.java
  2. 14
      src/main/java/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml

2
src/main/java/com/dreamchaser/depository_manage/controller/StockTakingController.java

@ -206,7 +206,7 @@ public class StockTakingController {
@GetMapping("/myTask")
public RestResponse myTask(@RequestParam Map<String,Object> map,HttpServletRequest request) {
UserByPort userToken= (UserByPort) request.getAttribute("userToken");
map.put("userId",userToken.getId());
map.put("departmentHead",userToken.getNumber());
List<SimpleStockTakingP> myTask = stockTakingService.findMyTask(map, request);
return new RestResponse(myTask,stockTakingService.findMyTaskCount(map),200);
}

14
src/main/java/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml

@ -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>

Loading…
Cancel
Save