出库部分
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
package com.ruoyi.pda.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.pda.domain.TrayCodeMsg;
|
||||
import com.ruoyi.pda.service.PdaService;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.ruoyi.common.utils.PageUtils.startPage;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/pda")
|
||||
public class PdaController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private PdaService pdaService;
|
||||
@Autowired
|
||||
private IInStockinService inStockinService;
|
||||
|
||||
/**
|
||||
* 空托盘入库
|
||||
* @param trayCodeMsg
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/emptyTrayIn")
|
||||
@ResponseBody
|
||||
public AjaxResult emptyTrayIn(@RequestBody TrayCodeMsg trayCodeMsg) {
|
||||
AjaxResult ajaxResult = pdaService.emptyTrayIn(trayCodeMsg);
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 空料箱入库
|
||||
*/
|
||||
@RequestMapping("/emptyBoxIn")
|
||||
@ResponseBody
|
||||
public AjaxResult emptyBoxIn(@RequestBody TrayCodeMsg trayCodeMsg) {
|
||||
AjaxResult ajaxResult = pdaService.emptyBoxIn(trayCodeMsg);
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
@RequestMapping("/inorder/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo inoderList(InStockin stockin) {
|
||||
startPage();
|
||||
List<InStockin> stockins = inStockinService.selectInStockinList(stockin);
|
||||
return getDataTable(stockins);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.pda.domain;
|
||||
|
||||
public class TrayCodeMsg {
|
||||
|
||||
private String trayCode;
|
||||
|
||||
private String warehouseId;
|
||||
|
||||
private String quantity;
|
||||
|
||||
private String entranceId;
|
||||
|
||||
public String getEntranceId() {
|
||||
return entranceId;
|
||||
}
|
||||
|
||||
public void setEntranceId(String entranceId) {
|
||||
this.entranceId = entranceId;
|
||||
}
|
||||
|
||||
public String getTrayCode() {
|
||||
return trayCode;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode) {
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
|
||||
public String getWarehouseId() {
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId) {
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.ruoyi.pda.mapper;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public interface PdaMapper {
|
||||
|
||||
void emptyTrayIn(HashMap<String, Object> map);
|
||||
|
||||
void emptyBoxIn(HashMap<String, Object> map);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.ruoyi.pda.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.pda.domain.TrayCodeMsg;
|
||||
|
||||
public interface PdaService {
|
||||
|
||||
public AjaxResult emptyTrayIn(TrayCodeMsg trayCodeMsg);
|
||||
|
||||
public AjaxResult emptyBoxIn(TrayCodeMsg trayCodeMsg);
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.ruoyi.pda.service;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.pda.domain.TrayCodeMsg;
|
||||
import com.ruoyi.pda.mapper.PdaMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.HashMap;
|
||||
|
||||
@Service
|
||||
public class PdaServiceImp implements PdaService{
|
||||
@Autowired
|
||||
PdaMapper pdaMapper;
|
||||
@Autowired
|
||||
IBasCargoSpaceService basCargoSpaceService;
|
||||
|
||||
/**
|
||||
* 空托盘入库
|
||||
* @param trayCodeMsg
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult emptyTrayIn(TrayCodeMsg trayCodeMsg) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCodeMsg.getTrayCode());
|
||||
map.put("v_warehouse_id", trayCodeMsg.getWarehouseId());
|
||||
map.put("v_quantity", "1");
|
||||
pdaMapper.emptyTrayIn(map);
|
||||
String result = (String) map.get("v_result");
|
||||
String cargoSpaceId = map.get("v_cargo_space_id").toString();
|
||||
if(StrUtil.isNotEmpty(cargoSpaceId)){
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId);
|
||||
map.put("v_cargo_space_id", basCargoSpace.getCargoSpaceName());
|
||||
}
|
||||
if("10".equals(result)){
|
||||
return AjaxResult.success(map);
|
||||
}else{
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 空料箱入库
|
||||
* @param trayCodeMsg
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult emptyBoxIn(TrayCodeMsg trayCodeMsg) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCodeMsg.getTrayCode());
|
||||
map.put("v_entrance_id", trayCodeMsg.getEntranceId());
|
||||
pdaMapper.emptyBoxIn(map);
|
||||
String result = (String) map.get("v_result");
|
||||
if("10".equals(result)){
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
}else{
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user