自动化立体仓库 - WMS系统
zhangc
2025-01-09 a66b19e1c09201a922735c2325ca04df7fe544af
src/main/java/com/zy/asrs/controller/AgvBasDevpController.java
@@ -14,6 +14,7 @@
import com.zy.asrs.entity.*;
import com.zy.asrs.entity.param.LocMastInitParam;
import com.zy.asrs.service.*;
import com.zy.asrs.utils.CodeDetectionUtil;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -83,7 +84,7 @@
    @ManagerAuth(memo = "站点修改")
    public R update(AgvBasDevp basDevp){
        if (Cools.isEmpty(basDevp) || null==basDevp.getDevNo()){
            return R.error();
            return R.error("参数缺失");
        }
        basDevp.setModiUser(getUserId());
        basDevp.setModiTime(new Date());
@@ -96,7 +97,7 @@
    public R delete(@RequestParam String param){
        List<AgvBasDevp> list = JSONArray.parseArray(param, AgvBasDevp.class);
        if (Cools.isEmpty(list)){
            return R.error();
            return R.error("参数缺失");
        }
        for (AgvBasDevp entity : list){
            agvBasDevpService.delete(new EntityWrapper<>(entity));
@@ -108,7 +109,9 @@
    @ManagerAuth(memo = "站点解绑")
    public R unbind(@RequestParam String param){
        AgvBasDevp agvBasDevp = JSONArray.parseObject(param,AgvBasDevp.class);
        if (agvBasDevp==null){
            return R.error("参数缺失");
        }
        //若当前站点货位状态不为F.在库状态,则返回错误
        if(!agvBasDevp.getLocSts().equals("F")){
            return R.error("当前站点货位状态不为在库,无法解除绑定");
@@ -167,6 +170,9 @@
                               @RequestParam(defaultValue = "10")Integer limit,
                               @RequestParam Map<String, Object> param){
        String devNo = param.get("devNo").toString();
        if (Cools.isEmpty(devNo) || !CodeDetectionUtil.carCodeDetection(devNo)){
            throw new CoolException(devNo + "小车地码有误,请正确扫码!!!");
        }
        AgvBasDevp agvBasDevp = agvBasDevpService.selectById(devNo);
        if("F".equals(agvBasDevp.getLocSts()) || "R".equals(agvBasDevp.getLocSts())){
            //先去入库通知档找明细
@@ -226,11 +232,15 @@
        String barcode = map.get("barcode").toString();
        AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", barcode).eq("wrk_sts",205L));
        if (agvWrkMast == null){
            R.error("工作档不存在");
        }
        if(agvWrkMast.getIoType() != 101 && agvWrkMast.getIoType() != 110){
            throw new CoolException("工作号为" + agvWrkMast.getWrkNo() + "类型不为101.出库,无法执行货架离场任务,请重新选择站点。");
        }
        agvWrkMast.setWrkSts(206L);
        agvWrkMast.setModiTime(new Date());
        agvWrkMastService.updateById(agvWrkMast);
        return R.ok("货架离场成功");
@@ -245,11 +255,15 @@
        String barcode = map.get("barcode").toString();
        AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", barcode).eq("wrk_sts",205L));
        if (agvWrkMast == null){
            return R.error("工作档不存在");
        }
        if(agvWrkMast.getIoType() != 101 && agvWrkMast.getIoType() != 110){
            throw new CoolException("工作号为" + agvWrkMast.getWrkNo() + "类型不为101.出库,无法执行货架离场任务,请重新选择站点。");
        }
        agvWrkMast.setWrkSts(208L);
        agvWrkMast.setModiTime(new Date());
        agvWrkMastService.updateById(agvWrkMast);
        return R.ok("货架离场成功");