| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.task.handler.AutomaticLibraryTransferHandler; |
| | | import com.zy.system.entity.Config; |
| | |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private AutomaticLibraryTransferHandler automaticLibraryTransferHandler; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | |
| | | if(WrkCount>0){ |
| | | return; |
| | | } |
| | | //自动出满托200 |
| | | Config configBoundShipment = configService.selectConfigByCode("AutomaticOutboundShipment"); |
| | | //自动出空板100 |
| | | Config configAutoEmpty = configService.selectConfigByCode("AutoEmpty"); |
| | | BasDevp basDevp100 = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no",100)); |
| | | BasDevp basDevp200 = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no",200)); |
| | | if((configAutoEmpty.getStatus()==1&&!basDevp100.getLoading().equals("Y"))||(configBoundShipment.getStatus()==1&&!basDevp200.getLoading().equals("Y"))){ |
| | | return; |
| | | } |
| | | if(config.getValue().equals("1")){ |
| | | automaticLibraryTransferHandler.startOne(); |
| | | }else if(config.getValue().equals("2")){ |