Commit 31e4dbbc authored by mlchun's avatar mlchun

1.服务人员订单接口

2.老人/子女订单接口(状态调整)
3.机构订单接口(未完成)
4.Constant静态类(状态调整)
parent 1c07feb6
......@@ -209,7 +209,7 @@ public class PensionOrderController {
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = "status", value = "订单状态: 0未接单 1已接单未派发 2已完成 3已取消 5已派发", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = "status", value = "订单状态: 0未接单 1已派发 2已完成 3已取消 5已接单未派发", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
......@@ -225,11 +225,11 @@ public class PensionOrderController {
*/
@Login
@GetMapping("elderFamily")
@ApiOperation("全部/根据状态返回订单(老人/子女)")
@ApiOperation(value = "全部/根据状态返回订单(老人/子女)", notes = "老人、子女的待完成实际是机构处的已派发未接单+已接单")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = "status", value = "订单状态: 0未接单 1待完成 3已取消 4待评价 留空全部", paramType = "query", dataType="int") ,
@ApiImplicitParam(name = "status", value = "订单状态: 0未接单 6待完成 3已取消 4待评价 留空全部", paramType = "query", dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
......
......@@ -17,6 +17,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -102,7 +103,15 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
@Override
public PageData<PensionOrderDTO> getElderAllOrderOrByStatusPage(Map<String, Object> params, Long creator, Integer status) {
IPage<PensionOrderEntity> page = getPage(params, Constant.CREATE_DATE, false);
List<PensionOrderDTO> list = pensionOrderDao.getElderAllOrderOrByStatusList(params, creator, status);
List<PensionOrderDTO> list = new ArrayList<>();
if (status != 6) {
list = pensionOrderDao.getElderAllOrderOrByStatusList(params, creator, status);
}else {
List<PensionOrderDTO> list1 = pensionOrderDao.getElderAllOrderOrByStatusList(params, creator, 1);
List<PensionOrderDTO> list2 = pensionOrderDao.getElderAllOrderOrByStatusList(params, creator, 5);
list.addAll(list1);
list.addAll(list2);
}
page.setTotal(list.size());
return getPageData(list, page.getTotal(), PensionOrderDTO.class);
}
......
......@@ -188,9 +188,9 @@ public interface Constant {
BOOKED(0,"未接单"),
/**
* 已接单/待完成/已接单未派发
* 已派发/待完成/已接单
*/
ORDER(1,"已接单"),
ORDER(1,"已派发"),
/**
* 已完成
*/
......@@ -204,9 +204,9 @@ public interface Constant {
*/
WAIT_EVALUATE(4,"待评价"),
/**
* 已派发
* 已接单未派发
*/
HAND_OUT(5,"已派发");
HAND_OUT(5,"已接单未派发");
private int status;
......
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