初始化
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.api.controller;
|
||||
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.api.service.ApiWcsService;
|
||||
import com.ruoyi.apiService.domain.ReMaterialParam;
|
||||
import com.ruoyi.apiService.domain.WmsJobRequest;
|
||||
import com.ruoyi.apiService.domain.wcs.WcsStockinReceive;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.log.domain.RequestLog;
|
||||
import com.ruoyi.log.service.IRequestLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/wmsService/wcs")
|
||||
public class WcsServiceController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
ApiWcsService apiWcsService;
|
||||
|
||||
@Autowired
|
||||
IRequestLogService requestLogService;
|
||||
|
||||
|
||||
/**
|
||||
* 请求生成入库作业
|
||||
*/
|
||||
@PostMapping("/requestMydoJobByTrayCode")
|
||||
public AjaxResult requestEnterByTrayCode(@RequestBody WcsStockinReceive wcsStockinReiceive) {
|
||||
AjaxResult ajaxResult = apiWcsService.requestMydoJobByTrayCode(wcsStockinReiceive);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(wcsStockinReiceive), "入库任务创建请求",ajaxResult);
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求补码作业
|
||||
*/
|
||||
@PostMapping("/requestMydoJobByNoTrayCode")
|
||||
public AjaxResult requestByNoTrayCode(@RequestBody WcsStockinReceive wcsStockinReiceive) {
|
||||
AjaxResult ajaxResult = apiWcsService.requestMydoJobManual(wcsStockinReiceive);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(wcsStockinReiceive), "请求补码作业",ajaxResult);
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库、出库 任务完成回传
|
||||
* Map<String, String>
|
||||
* "wmsType": "任务类型" 1-入库 2-出库 3-agv搬运,
|
||||
* taskNo:出库 入库任务号
|
||||
* trayCode:托盘码
|
||||
* positionCode1:起点
|
||||
* positionCode2:终点
|
||||
* containerCode:容器编码
|
||||
*
|
||||
*/
|
||||
@PostMapping("/jobFinish")
|
||||
public AjaxResult jobFinish(@RequestBody WmsJobRequest wmsJobRequest) {
|
||||
AjaxResult ajaxResult = apiWcsService.jobFinish(wmsJobRequest);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(wmsJobRequest), "wcs任务回传",ajaxResult);
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 放货有货,重新分配货位
|
||||
*/
|
||||
@PostMapping("/reAssign")
|
||||
public AjaxResult reAssign(@RequestBody ReMaterialParam reMaterialParam) {
|
||||
AjaxResult ajaxResult = apiWcsService.reAssign(reMaterialParam);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(reMaterialParam), "入库重分货位",ajaxResult);
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 取货无货,重新分配物料
|
||||
*/
|
||||
@PostMapping("/reMaterial")
|
||||
public AjaxResult reMaterial(@RequestBody ReMaterialParam reMaterialParam) {
|
||||
AjaxResult ajaxResult = apiWcsService.reMaterial(reMaterialParam);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(reMaterialParam), "取货无货重分物料",ajaxResult);
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user