Commit 9e821a91 authored by jianqian's avatar jianqian

修改待办

parent c2269b3d
...@@ -56,12 +56,14 @@ public class TWorkOrderController extends BaseController ...@@ -56,12 +56,14 @@ public class TWorkOrderController extends BaseController
* @throws Exception * @throws Exception
*/ */
@GetMapping("/waitinglist") @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(); startPage();
PageInfo<TWorkOrder> pageInfo; PageInfo<TWorkOrder> pageInfo;
try { try {
pageInfo = tWorkOrderService.selectWaitingWorkOrder(userId,type,searchStr); pageInfo = tWorkOrderService.selectWaitingWorkOrder(userId,type,searchStr,waitingtype);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new Exception("查询待办工单失败"); throw new Exception("查询待办工单失败");
......
...@@ -42,7 +42,10 @@ public interface TWorkOrderMapper ...@@ -42,7 +42,10 @@ public interface TWorkOrderMapper
* @param userId * @param userId
* @return * @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 ...@@ -50,7 +50,7 @@ public interface ITWorkOrderService
* @return * @return
* @throws Exception * @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 ...@@ -256,8 +256,8 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
* @return * @return
*/ */
@Override @Override
public PageInfo<TWorkOrder> selectWaitingWorkOrder(String userId,Integer type,String searchStr){ public PageInfo<TWorkOrder> selectWaitingWorkOrder(String userId,Integer type,String searchStr,Integer waitingtype){
List<TWorkOrder> workOrderList = tWorkOrderMapper.selectWaitingWorkOrder(userId,type,searchStr); List<TWorkOrder> workOrderList = tWorkOrderMapper.selectWaitingWorkOrder(userId,type,searchStr,waitingtype);
for(TWorkOrder t :workOrderList){ for(TWorkOrder t :workOrderList){
if(t.getOrderType().equals('3')){ if(t.getOrderType().equals('3')){
String address = tDeviceAlarmMapper.selectAddressByOrderId(t.getOrderId()); String address = tDeviceAlarmMapper.selectAddressByOrderId(t.getOrderId());
......
...@@ -51,7 +51,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -51,7 +51,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE WHERE
<choose> <choose>
<when test="type==1"> <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> </when>
<otherwise> <otherwise>
o.order_status > 0 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