出库部分
This commit is contained in:
@@ -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