Commit 9e821a91 authored by jianqian's avatar jianqian

修改待办

parent c2269b3d
......@@ -56,12 +56,14 @@ public class TWorkOrderController extends BaseController
* @throws Exception
*/
@GetMapping("/waitinglist")
public TableDataInfo waitinglist(String userId,@RequestParam(value = "type", defaultValue = "1")Integer type,String searchStr) throws Exception
public TableDataInfo waitinglist(String userId,@RequestParam(value = "type", defaultValue = "1")Integer type,
@RequestParam(value = "waitingtype", defaultValue = "0")Integer waitingtype,
String searchStr) throws Exception
{
startPage();
PageInfo<TWorkOrder> pageInfo;
try {
pageInfo = tWorkOrderService.selectWaitingWorkOrder(userId,type,searchStr);
pageInfo = tWorkOrderService.selectWaitingWorkOrder(userId,type,searchStr,waitingtype);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("查询待办工单失败");
......
......@@ -42,7 +42,10 @@ public interface TWorkOrderMapper
* @param userId
* @return
*/
public List<TWorkOrder> selectWaitingWorkOrder(@Param("userId") String userId,@Param("type") Integer type,@Param("searchStr") String searchStr);
public List<TWorkOrder> selectWaitingWorkOrder(@Param("userId") String userId,
@Param("type") Integer type,
@Param("searchStr") String searchStr,
@Param("waitingtype")Integer waitingtype);
/**
* 新增工单基础信息
......
......@@ -50,7 +50,7 @@ public interface ITWorkOrderService
* @return
* @throws Exception
*/
public PageInfo<TWorkOrder> selectWaitingWorkOrder(String userId,Integer type,String searchStr)throws Exception;
public PageInfo<TWorkOrder> selectWaitingWorkOrder(String userId,Integer type,String searchStr,Integer waitingtype)throws Exception;
/**
* 新增工单基础信息
......
......@@ -256,8 +256,8 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
* @return
*/
@Override
public PageInfo<TWorkOrder> selectWaitingWorkOrder(String userId,Integer type,String searchStr){
List<TWorkOrder> workOrderList = tWorkOrderMapper.selectWaitingWorkOrder(userId,type,searchStr);
public PageInfo<TWorkOrder> selectWaitingWorkOrder(String userId,Integer type,String searchStr,Integer waitingtype){
List<TWorkOrder> workOrderList = tWorkOrderMapper.selectWaitingWorkOrder(userId,type,searchStr,waitingtype);
for(TWorkOrder t :workOrderList){
if(t.getOrderType().equals('3')){
String address = tDeviceAlarmMapper.selectAddressByOrderId(t.getOrderId());
......
......@@ -51,7 +51,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
<choose>
<when test="type==1">
o.order_status &lt; 2
<choose>
<when test="waitingtype==0">
o.order_status &lt; 2
</when>
<when test="waitingtype==1">
o.order_status = 0
</when>
<otherwise>
o.order_status = 1
</otherwise>
</choose>
</when>
<otherwise>
o.order_status > 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment