package com.jeesite.modules.mes.web;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.mes.erp.ErpPdaRespHelper;
import com.jeesite.modules.mes.erp.ErpStockPdaService;
import com.jeesite.modules.mes.resp.CommonResp;
import com.jeesite.modules.mes.service.MesLogService;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
/**
* ERP 仓库 / 仓位 PDA 公共接口(来料检、生产入库、直接调拨等统一调用,避免各模块重复与权限不一致)。
*
* 推荐 PDA 固定使用本 Controller,勿再按业务模块分别调 erpInStock / erpPrdInStock / erpTransferDirect 下的 stockList。
*/
@Controller
@RequestMapping(value = "${adminPath}/mes/erpStockPda")
public class ErpStockPdaController extends BaseController {
private final ErpStockPdaService erpStockPdaService;
private final MesLogService mesLogService;
public ErpStockPdaController(ErpStockPdaService erpStockPdaService, MesLogService mesLogService) {
this.erpStockPdaService = erpStockPdaService;
this.mesLogService = mesLogService;
}
/**
* 可用仓库列表。
*/
@RequiresPermissions(value = {
"mes:erpInStock:view",
"mes:erpPrdInStock:view",
"mes:erpTransferDirect:view"
}, logical = Logical.OR)
@RequestMapping(value = "stockList", method = {RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public CommonResp