Commit 83f7e9b2 by wangli

新增派工台和排班结果列表接口

1 parent 304b7c6e
package com.alibaba.cloud.integration.order.controller;
import com.alibaba.cloud.integration.common.BusinessException;
import com.alibaba.cloud.integration.common.Result;
import com.alibaba.cloud.integration.order.service.DispatchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/pea-order")
public class DispatchController {
@Autowired
private DispatchService dispatchService;
@GetMapping("/dispatch/order/list")
public Result<?> getDispatchOrderList(@RequestParam String date, @RequestParam String groupId) {
// 获取派工台待派订单列表
Result<?> res = null;
try {
res = dispatchService.getDispatchOrderList(date, groupId);
}catch (BusinessException e) {
Result.failed(e.getMessage());
}
return res;
}
@GetMapping("/dispatch/engineer/order/list")
public Result<?> getDispatchEngineerOrderList(@RequestParam String date) {
// 获取派工台工程师已派订单列表
Result<?> res = null;
try {
res = dispatchService.getDispatchEngineerOrderList(date);
}catch (BusinessException e) {
Result.failed(e.getMessage());
}
return res;
}
@PostMapping("/disptach/order/confirm")
public Result<?> dispatchOrderConfirm(@RequestBody String orderId, @RequestBody String engineerCode) {
// 派工台确认派单
Result<?> res = null;
try {
res = dispatchService.dispatchOrderConfirm(orderId, engineerCode);
}catch (BusinessException e){
Result.failed(e.getMessage());
}
return res;
}
}
package com.alibaba.cloud.integration.order.controller;
import com.alibaba.cloud.integration.common.BusinessException;
import com.alibaba.cloud.integration.common.Result;
import com.alibaba.cloud.integration.order.service.ScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/pea-order")
public class ScheduleController {
@Autowired
private ScheduleService scheduleService;
@GetMapping("/schedule/overview")
public Result<?> getScheduleOverview(@RequestParam long page, @RequestParam long size, @RequestParam String date,
@RequestParam String levelType, @RequestParam("levelId") List<String> levelIds) {
Result<?> res = null;
try{
res = scheduleService.getScheduleOverview(page, size, date, levelType, levelIds);
} catch (BusinessException e) {
Result.failed(e.getMessage());
}
return res;
}
@GetMapping("/schedule/engineer/overview")
public Result<?> getScheduleEngineerOverview(@RequestParam String date, @RequestParam String engineerCode) {
Result<?> res = null;
try {
res = scheduleService.getScheduleEngineerOverview(date, engineerCode);
} catch (BusinessException e) {
Result.failed(e.getMessage());
}
return res;
}
}
package com.alibaba.cloud.integration.order.service;
import com.alibaba.cloud.integration.common.Result;
import org.springframework.web.bind.annotation.RequestParam;
public interface DispatchService {
Result<?> getDispatchOrderList(String date, String groupId);
Result<?> getDispatchEngineerOrderList(String date);
Result<?> dispatchOrderConfirm(String orderId, String engineerCode);
}
package com.alibaba.cloud.integration.order.service;
import com.alibaba.cloud.integration.common.Result;
import java.util.List;
public interface ScheduleService {
Result<?> getScheduleOverview(long page, long size, String date, String levelType, List<String> levelIds);
Result<?> getScheduleEngineerOverview(String date, String engineerCode);
}
package com.alibaba.cloud.integration.order.service.impl;
import com.alibaba.cloud.integration.common.Result;
import com.alibaba.cloud.integration.order.service.DispatchService;
import org.springframework.stereotype.Service;
@Service
public class DispatchServiceImpl implements DispatchService {
@Override
public Result<?> getDispatchOrderList(String date, String groupId) {
return null;
}
@Override
public Result<?> getDispatchEngineerOrderList(String date) {
return null;
}
@Override
public Result<?> dispatchOrderConfirm(String orderId, String engineerCode) {
return null;
}
}
package com.alibaba.cloud.integration.order.service.impl;
import com.alibaba.cloud.integration.common.Result;
import com.alibaba.cloud.integration.order.service.ScheduleService;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ScheduleServiceImpl implements ScheduleService {
@Override
public Result<?> getScheduleOverview(long page, long size, String date, String levelType, List<String> levelIds) {
return null;
}
@Override
public Result<?> getScheduleEngineerOverview(String date, String engineerCode) {
return null;
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!