| | |
| | | import com.zy.common.model.OrderMergeVo; |
| | | import com.zy.common.model.TaskDto; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | | import lombok.Synchronized; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | List<String> staNoList = agvBasDevpService.selectCacheShelvesStationCodeByLocType(agvLocMast.getLocType1()); |
| | | |
| | | |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "FOUR")); |
| | | if (config != null) { |
| | | if (config.getStatus().intValue() == 1) { |
| | | List<AgvWrkMast> agvWrkMasts = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>().eq("source_loc_no", locDto.getAgvStaNo())); |
| | | if (agvWrkMasts != null && !agvWrkMasts.isEmpty()) { |
| | | for (AgvWrkMast agvWrkMast : agvWrkMasts) { |
| | | if (agvWrkMast.getWrkSts() < 204) { |
| | | return R.error(locDto.getAgvStaNo() + "该站点已有任务,等任务完成或者货架搬走再叫料"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "FOUR")); |
| | | // if (config != null) { |
| | | // if (config.getStatus().intValue() == 1) { |
| | | // List<AgvWrkMast> agvWrkMasts = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>().eq("source_loc_no", locDto.getAgvStaNo())); |
| | | // if (agvWrkMasts != null && !agvWrkMasts.isEmpty()) { |
| | | // for (AgvWrkMast agvWrkMast : agvWrkMasts) { |
| | | // if (agvWrkMast.getWrkSts() < 204) { |
| | | // return R.error(locDto.getAgvStaNo() + "该站点已有任务,等任务完成或者货架搬走再叫料"); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | |
| | | if (!staNoList.contains(locDto.getAgvStaNo())) { |
| | | return R.error(locDto.getAgvStaNo() + "该站点已有出库任务,无法选择该站点出库"); |
| | | AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("loc_no", locDto.getAgvStaNo())); |
| | | if (Cools.isEmpty(agvWrkMast.getPdcType())) { |
| | | return R.error(locDto.getAgvStaNo() + "该站点已有出库任务,工作号:" + agvWrkMast.getWrkNo() + ",物料库位号:" + agvWrkMast.getSourceLocNo() + ",任务状态:" + agvWrkMast.getWrkSts$()); |
| | | } else { |
| | | return R.error(locDto.getAgvStaNo() + "该站点已有出库任务,工作号:" + agvWrkMast.getWrkNo() + ",物料库位号:" + agvWrkMast.getSourceLocNo() + ",任务状态:" + agvWrkMast.getWrkSts$() + ",小车编号:" + agvWrkMast.getPdcType()); |
| | | |
| | | } |
| | | } |
| | | } |
| | | //如果所有库都没有库存,则返回 |