| | |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.thread.BarcodeThread; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | } |
| | | } |
| | | } |
| | | @Resource |
| | | private ConfigService configService; |
| | | |
| | | /** |
| | | * 出库 ===>> 库位到堆垛机站 |
| | |
| | | if (taskWrksInitial.size() == 0) { |
| | | return; |
| | | } |
| | | // 控制是否允许连续出库,不判断出库站点状态 |
| | | boolean crnAvailableOut = false; |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code","removeCrnAvailableOut")); |
| | | if (config != null && config.getStatus() == 1) { |
| | | crnAvailableOut = true; |
| | | } |
| | | |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnOutStn()) { |
| | | List<StaDesc> staDescs = staDescMapper.selectList(new EntityWrapper<StaDesc>().eq("crn_no", slave.getId()).eq("crn_stn", crnStn.getStaNo())); |
| | | for (StaDesc staDesc : staDescs) { |
| | |
| | | .eq("lev1", locMast.getLev1()).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | log.info(locMast.getLocNo() + "出深库位,浅库位有货"); |
| | | taskWrk.setMemo("浅库位有货"); |
| | | taskWrkService.updateById(taskWrk); |
| | | continue; |
| | | } |
| | | } else if (flag == 2) { |
| | |
| | | .eq("lev1", locMast.getLev1()).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | log.info(locMast.getLocNo() + "出深库位,浅库位有货"); |
| | | taskWrk.setMemo("浅库位有货"); |
| | | taskWrkService.updateById(taskWrk); |
| | | continue; |
| | | } |
| | | } |
| | |
| | | log.error("出库 ===>> 堆垛机站点在数据库不存在, 站点编号={}", crnStn.getStaNo()); |
| | | break; |
| | | } |
| | | // 只有205和210允许连续出库 |
| | | if (staProtocol.getSiteId() != 205 && staProtocol.getSiteId() != 210) { |
| | | crnAvailableOut = false; |
| | | } |
| | | |
| | | // 判断堆垛机出库站状态 |
| | | if (staProtocol.isAutoing() && (outloading || !staProtocol.isLoading()) && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") |
| | | && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) { |
| | | if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") |
| | | && (crnAvailableOut || !staProtocol.isLoading() && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable())) { |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | |
| | | // 堆垛机控制过滤 |