MobileTaskForASRSController.java 1.71 KB
package com.huaheng.mobile.shipment;

import com.alibaba.fastjson.JSONException;
import com.huaheng.framework.aspectj.lang.annotation.Log;
import com.huaheng.framework.aspectj.lang.constant.BusinessType;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.config.material.service.MaterialService;
import com.huaheng.pc.task.taskDetail.service.TaskDetailService;
import com.huaheng.pc.task.taskHeader.service.TaskHeaderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 *
 * @author Enzo Cotter
 * @date 2019/12/16
 */
@CrossOrigin
@RestController
@RequestMapping("/mobile/task/taskForASRS")
@Api(tags = {"手机立体库任务拣货相关"}, value = "手机立体库任务拣货相关MobileTaskForASRSController")
public class MobileTaskForASRSController {


    @Resource
    private TaskHeaderService taskHeaderService;
    @Resource
    private TaskDetailService taskDetailService;
    @Resource
    private MaterialService materialService;

    @PostMapping("/getMaterialForecast")
    @ApiOperation("获得物料联想词")
    @Log(title = "获得物料联想词", action = BusinessType.OTHER)
    public AjaxResult getMaterialForecast(@RequestBody @ApiParam(value="物料号") Map<String, String> param) {
        if  (param.get("code") == null || param.get("code").trim().length() < 1) {
            throw new JSONException("容器号(code)不能为空");
        }
        List<Materialforecast> forecasts = materialService.getMaterialForecast(param.get("code"));
        return AjaxResult.success("");
    }
}