自动化立体仓库 - WMS系统
zyx
2024-01-16 c26270ef459e2ccf15bb019a05ac6d3934e2ad57
src/main/java/com/zy/asrs/controller/MobileController.java
@@ -2,7 +2,6 @@
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
import com.core.common.Cools;
@@ -16,10 +15,9 @@
import com.zy.asrs.entity.result.MobileAdjustResult;
import com.zy.asrs.mapper.ManLocDetlMapper;
import com.zy.asrs.service.*;
import com.zy.common.model.LocDto;
import com.zy.common.model.TaskDto;
import com.zy.common.model.WrkDto;
import com.zy.common.web.BaseController;
import com.zy.system.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
@@ -385,4 +383,104 @@
        return mobileService.manDetlInBarcode(json,getUser());
    }
    @RequestMapping("/manDetl/in/origin")
    @ManagerAuth(memo = "平库上架")
    public R manDetlIn(@RequestBody JSONObject json){
        if (json == null){
            return R.error("传入数据为空");
        }
        return mobileService.manDetlOrigin(json,getUser());
    }
    @RequestMapping("/manDetl/in/no/origin")
    @ManagerAuth(memo = "平库上架")
    public R manDetlInNo(@RequestBody JSONObject json){
        if (json == null){
            return R.error("传入数据为空");
        }
        return mobileService.manDetlOrigInNo(json,getUser());
    }
//    @RequestMapping("/manDetl/out/origin")
//    @ManagerAuth(memo = "平库下架")
//    public R manDetlout(@RequestBody JSONObject json){
//        if (json == null){
//            return R.error("传入数据为空");
//        }
//        return mobileService.manDetlOriginOut(json,getUser());
//    }
    @RequestMapping("/manDetl/out/origin")
    @ManagerAuth(memo = "平库下架")
    public R manDetlout2(@RequestBody JSONObject json){
        if (json == null){
            return R.error("传入数据为空");
        }
        return mobileService.manDetlOriginOut(json,getUser());
    }
    @RequestMapping("/plaDetl/packin/v1")
    //@ManagerAuth(memo="pla入库")
    public R plaPackIn(@RequestBody JSONObject json){
        String locNo = json.get("locNo").toString();
        String batch = json.get("batch").toString();
        String packageNo = json.get("packageNo").toString();
        if(Cools.isEmpty(locNo) || Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){
            return R.error("有参数为空,无法入库");
        }
        //测试
        if(true){
            User user = new User();
            user.setUsername("test");
            mobileService.plaPakin(locNo,batch,packageNo,user);
            return R.ok();
        }
        mobileService.plaPakin(locNo,batch,packageNo,getUser());
        return R.ok();
    }
    @RequestMapping("/plaDetl/packout1/v1")
//    @ManagerAuth(memo="pla出库")
    public R plaPackOut1(@RequestBody JSONObject json){
        String locNo = json.get("locNo").toString();
        String batch = json.get("batch").toString();
        String packageNo = json.get("packageNo").toString();
        String orderNo = json.get("orderNo").toString();
        String orderDetlId = json.get("orderDetlId").toString();
        String wrkNo = json.get("wrkNo").toString();
        Double anfme = Double.parseDouble(json.get("anfme").toString());
        if(Cools.isEmpty(locNo) || Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){
            return R.error("有参数为空,无法入库");
        }
        mobileService.plaPakout(locNo,batch,packageNo,orderNo,orderDetlId,wrkNo,anfme);
        return R.ok();
    }
    @RequestMapping("/plaDetl/packout/v1")
//    @ManagerAuth(memo="pla出库")
    public R plaPackOut(@RequestBody JSONObject json){
        String locNo = json.get("locNo").toString();
        String batch = json.get("batch").toString();
        String packageNo = json.get("packageNo").toString();
        String orderNo = json.get("orderNo").toString();
        String orderDetlId = json.get("orderDetlId").toString();
        String wrkNo = json.get("wrkNo").toString();
        Double anfme = Double.parseDouble(json.get("anfme").toString());
        if(Cools.isEmpty(locNo) || Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){
            return R.error("有参数为空,无法入库");
        }
        mobileService.plaPakout(locNo,batch,packageNo,orderNo,orderDetlId,wrkNo,anfme);
        return R.ok();
    }
    public static void main(String[] args) {
        String aa = "aabb";
        String[] ccs = aa.split("cc");
        System.out.println(ccs[0]);
    }
}