自动化立体仓库 - WMS系统
zwl
2026-01-15 2b80cfa1ea7b8f177cc53e1ed3299e4db3ecac1d
src/main/java/com/zy/asrs/controller/WaitPakinController.java
@@ -1,5 +1,6 @@
package com.zy.asrs.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
@@ -35,6 +36,8 @@
    private OrderDetlService orderDetlService;
    @Autowired
    private WrkMastService wrkMastService;
    @Autowired
    private MobileController mobileController;
    @RequestMapping(value = "/waitPakin/{id}/auth")
    @ManagerAuth
@@ -91,7 +94,7 @@
    @RequestMapping(value = "/waitPakin/delete/auth")
    @ManagerAuth
    @Transactional
//    @Transactional
    public R delete(@RequestParam String param){
        List<WaitPakin> list = JSONArray.parseArray(param, WaitPakin.class);
        if (Cools.isEmpty(list)){
@@ -102,12 +105,16 @@
            if(!Cools.isEmpty(wrkMasts) || wrkMasts.size() > 0){
                return R.error("条码已生成入库工作档,禁止删除");
            }
            waitPakinService.delete(new EntityWrapper<>(entity));
            waitPakinService.delete(new EntityWrapper<WaitPakin>().eq("zpallet", entity.getZpallet()).eq("batch", entity.getBatch()));
            //订单关联,修改订单作业数量
            if (!Cools.isEmpty(entity.getOrderNo())) {
                if (!orderDetlService.decrease(entity.getOrderNo(), entity.getMatnr(), entity.getBatch(), entity.getAnfme())) {
                    return R.error("订单数据回滚失败");
                }
            }
            //组托解绑后自动对该站点进行解绑
            if(!Cools.isEmpty(entity.getMemo())){
                R bind = mobileController.siteBindAndUnbind(entity.getMemo(),entity.getZpallet(), "UNBIND");
            }
        }
        return R.ok();
@@ -150,4 +157,6 @@
        return R.ok();
    }
}