| | |
| | | package com.zy.asrs.wms.apis.wcs.controller; |
| | | |
| | | import com.mysql.cj.util.StringUtils; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | import com.zy.asrs.wms.apis.wcs.entity.request.RfidSingalRequest; |
| | | import com.zy.asrs.wms.apis.wcs.entity.response.CommonReponse; |
| | | import com.zy.asrs.wms.apis.wcs.services.WaveManagentService; |
| | | import com.zy.asrs.wms.asrs.entity.param.WaveSeedReviewParam; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 大屏操作基本功能 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/wave") |
| | | public class WaveManagentController extends BaseController { |
| | |
| | | */ |
| | | @GetMapping("/sow/task/detl/{taskNo}") |
| | | public R getTaskDetl(@PathVariable String taskNo) { |
| | | if (StringUtils.isNullOrEmpty(taskNo)) { |
| | | throw new CoolException("任务编码不能为空!!"); |
| | | } |
| | | return waveManagentService.getTaskDetl(taskNo); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 大屏获取任务明细 |
| | | * 获取当前播种中具体任务明细 |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @PostMapping("/task/detl/qutify") |
| | | public R getTaskDetlQutify(@RequestBody Map<String, Object> param) { |
| | | return waveManagentService.getTaskDetlQutify(param); |
| | | if (Objects.isNull(param)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | if (Objects.isNull(param.get("taskNo"))) { |
| | | throw new CoolException("请求参数:任务编码不能为空!!"); |
| | | } |
| | | String taskNoStr = (String) param.get("taskNo"); |
| | | // Long matnr = Long.valueOf(taskNo.get("matnr").toString()); |
| | | |
| | | return waveManagentService.getTaskDetlQutify(taskNoStr); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前播种墙库位信息 |
| | | * @return |
| | | */ |
| | | @GetMapping("/seed/locs") |
| | | public R getSeedLoc() { |
| | | return waveManagentService.AllSeedLocs(); |
| | | } |
| | | |
| | | /*** |
| | | * 获取出库列表 |
| | | * 大屏获取出库列表 |
| | | * 获取当前播种中执行数据 |
| | | * @return |
| | | */ |
| | | @GetMapping("/sow/tasks") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 审核播种状态任务 |
| | | * 波次播种 |
| | | * 播种明细数量修改 |
| | | * @param reviewParam |
| | | * @return |
| | | */ |
| | | @PostMapping("/sow/review") |
| | | public R reviewSeeds(@RequestBody WaveSeedReviewParam reviewParam) { |
| | | if (Objects.isNull(reviewParam)) { |
| | | return R.error("播种参数不能为空!!"); |
| | | } |
| | | if (Objects.isNull(reviewParam.getReviewNum())) { |
| | | return R.error("播种数量不能为空!!"); |
| | | } |
| | | if (Objects.isNull(reviewParam.getWaveSeedId())) { |
| | | return R.error("播种明细标识不能为空!!"); |
| | | } |
| | | return waveManagentService.reviewSeeds(reviewParam); |
| | | } |
| | | |
| | |
| | | return R.error("删除失败!!"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 大屏获取波次所有订单信息 |
| | | * @param waveNo |
| | | * @return |
| | | */ |
| | | @GetMapping("/orders/{waveNo}") |
| | | public R getWaveOrders(@PathVariable String waveNo) { |
| | | if (StringUtils.isNullOrEmpty(waveNo)) { |
| | | return R.error("波次编码不能为空!!!"); |
| | | } |
| | | return waveManagentService.getAllOrders(waveNo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |