自动化立体仓库 - WMS系统
#
LSH
2022-08-13 30eec1f6c7424fa5864b7f04abc55683071133e7
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -4,6 +4,7 @@
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.*;
import com.core.exception.CoolException;
import com.zy.asrs.entity.*;
@@ -11,6 +12,8 @@
import com.zy.asrs.entity.param.MobileAdjustParam;
import com.zy.asrs.entity.param.OpenOrderPakinParam;
import com.zy.asrs.service.*;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.WorkLogHandler;
import com.zy.asrs.utils.MatUtils;
import com.zy.common.CodeRes;
import com.zy.common.constant.MesConstant;
@@ -23,6 +26,8 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.ArrayList;
import java.util.Date;
@@ -73,6 +78,10 @@
    private NodeService nodeService;
    @Autowired
    private ManLocDetlService manLocDetlService;
    @Autowired
    private TestMastService testMastService;
    @Autowired
    private WorkLogHandler workLogHandler;
    @Override
@@ -592,4 +601,47 @@
            throw new CoolException(locDetl.getLocNo() + "库位不是在库状态");
        }
    }
    /*...........................赣州新增..............以下.............赣州新增...........................*/
    @Override
    @Transactional
    public void startUpTestPACK(TestMast testMast) {
        //启动测试请求
        ReturnT<String> result=workLogHandler.startUpTestPACK(testMast);
        if (!result.isSuccess()) {
            log.error("测试申请失败", testMast.getBarcode());
        }
        LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", testMast.getLocNo()));
        if (Cools.isEmpty(locMast)) {
            throw new CoolException(BaseRes.PARAM);
        }
        Date date1;
        try {
            date1 = new Date();
        }catch (Exception e){
            throw new CoolException("获取时间失败");
        }
        testMast.setChannel(1);
        testMast.setStatus(1);
        testMast.setModiTime(date1);
        testMast.setAppeTime(date1);
        if (!testMastService.insert(testMast)){
            throw new CoolException("添加testMast失败");
        }
        locMast.setPackStatus(2);
        locMast.setModiTime(date1);
        if (!locMastService.update(locMast,new EntityWrapper<LocMast>().eq("loc_no", testMast.getLocNo()))){
            throw new CoolException("申请测试失败");
        }
    }
    @Override
    @Transactional
    public void suspendTestPACK() {
        ReturnT<String> result=workLogHandler.suspendTestPACK();
        if (!result.isSuccess()) {
            log.error("测试申请失败");
        }
    }
    /*...........................赣州新增..............以上.............赣州新增...........................*/
}