zhangc
2025-03-13 426c2fbeaf634d21db08fc996b433ddd7da43881
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -35,7 +35,7 @@
import com.zy.core.model.command.CrnCommand;
import com.zy.core.model.protocol.CrnProtocol;
import com.zy.core.model.protocol.StaProtocol;
import com.zy.core.properties.SlaveProperties;
import com.zy.core.properties.SlaveProductProperties;
import com.zy.core.thread.BarcodeThread;
import com.zy.core.thread.SiemensDevpThread;
import com.zy.system.entity.Config;
@@ -65,7 +65,7 @@
    public static final long COMMAND_TIMEOUT = 5 * 1000;
    @Autowired
    private SlaveProperties slaveProperties;
    private SlaveProductProperties slaveProductProperties;
    @Autowired
    private WrkMastMapper wrkMastMapper;
    @Autowired
@@ -116,7 +116,7 @@
    public void generateStoreWrkFile1() throws IOException, InterruptedException {
        try {
            // 根据输送线plc遍历
            for (DevpSlave devp : slaveProperties.getDevp()) {
            for (DevpSlave devp : slaveProductProperties.getDevp()) {
                // 遍历入库口
                for (DevpSlave.Sta inSta : devp.getInSta()) {
                    StorageEscalationParam storageEscalationParam = new StorageEscalationParam();
@@ -300,7 +300,7 @@
    public void generateStoreWrkFile() throws IOException, InterruptedException {
        try {
            // 根据输送线plc遍历
            for (DevpSlave devp : slaveProperties.getDevp()) {
            for (DevpSlave devp : slaveProductProperties.getDevp()) {
                // 遍历入库口
                for (DevpSlave.Sta inSta : devp.getInSta()) {
                    // 获取入库站信息
@@ -575,7 +575,7 @@
     * 堆垛机站出库到出库站
     */
    public void crnStnToOutStn() {
        for (CrnSlave crnSlave : slaveProperties.getCrn()) {
        for (CrnSlave crnSlave : slaveProductProperties.getCrn()) {
            // 遍历堆垛机出库站
            for (CrnSlave.CrnStn crnStn : crnSlave.getCrnOutStn()) {
                List<StaDesc> staDescs = staDescMapper.selectList(new EntityWrapper<StaDesc>().eq("crn_no", crnSlave.getId()).eq("crn_stn", crnStn.getStaNo()));
@@ -631,7 +631,7 @@
     * 入出库  ===>>  堆垛机入出库作业下发
     */
    public synchronized void crnIoExecute() throws IOException {
        for (CrnSlave crn : slaveProperties.getCrn()) {
        for (CrnSlave crn : slaveProductProperties.getCrn()) {
            // 获取堆垛机信息
            CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId());
            CrnProtocol crnProtocol = crnThread.getCrnProtocol();
@@ -944,8 +944,8 @@
            for (TaskWrk taskWrk : taskWrks) {
                // 双深库位且浅库位有货,则需先对浅库位进行库位移转
//                if (Utils.isDeepLoc(slaveProperties, taskWrk.getStartPoint())) {
//                    String shallowLocNo = Utils.getShallowLoc(slaveProperties, taskWrk.getStartPoint());
//                if (Utils.isDeepLoc(slaveProductProperties, taskWrk.getStartPoint())) {
//                    String shallowLocNo = Utils.getShallowLoc(slaveProductProperties, taskWrk.getStartPoint());
//                    TaskWrk hallowLocNoTask = taskWrkMapper.selectByStartPoint(shallowLocNo);
//                    if (!Cools.isEmpty(hallowLocNoTask)){
//                        continue;
@@ -1033,7 +1033,7 @@
     * 执行对工作档的完成操作
     */
//    public void storeFinished() {
//        for (CrnSlave crn : slaveProperties.getCrn()) {
//        for (CrnSlave crn : slaveProductProperties.getCrn()) {
//            // 获取堆垛机信息
//            CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId());
//            CrnProtocol crnProtocol = crnThread.getCrnProtocol();
@@ -1081,7 +1081,7 @@
     * 执行对工作档的完成操作
     */
    public void storeFinished() throws InterruptedException {
        for (CrnSlave crn : slaveProperties.getCrn()) {
        for (CrnSlave crn : slaveProductProperties.getCrn()) {
            // 获取堆垛机信息
            CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId());
            CrnProtocol crnProtocol = crnThread.getCrnProtocol();
@@ -1156,7 +1156,7 @@
     */
    public void recCrnErr() {
        Date now = new Date();
        for (CrnSlave crn : slaveProperties.getCrn()) {
        for (CrnSlave crn : slaveProductProperties.getCrn()) {
            // 获取堆垛机信息
            CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId());
            CrnProtocol crnProtocol = crnThread.getCrnProtocol();