1
zhang
昨天 912d09bc076272770a507517e71703078c8ae9d7
zy-asc-conveyor/src/main/java/com/zy/acs/conveyor/core/operation/handler/AppleLocOperationHandler.java
@@ -14,7 +14,6 @@
import com.zy.acs.conveyor.core.properties.SlaveProperties;
import com.zy.acs.conveyor.core.service.StationService;
import com.zy.acs.conveyor.entity.Job;
import com.zy.acs.conveyor.enums.WorkNoTypeType;
import com.zy.acs.conveyor.service.JobService;
import com.zy.acs.conveyor.service.WmsMainService;
import com.zy.acs.conveyor.service.WrkLastnoService;
@@ -89,6 +88,18 @@
                        News.error("{}:站点:{},无物", config.getMark(), staProtocol.getSiteId());
                        continue;
                    }
                    if (staProtocol.isWeightErr()) {
                        News.error("{}:站点:{},重量异常:{}", config.getMark(), staProtocol.getSiteId(), staProtocol.getWeight());
                        continue;
                    }
                    if (staProtocol.isBarcodeErr()) {
                        News.error("{}:站点:{},条码异常:{}", config.getMark(), staProtocol.getSiteId(), staProtocol.getBarcode());
                        continue;
                    }
                    if (staProtocol.isLoadErr()) {
                        News.error("{}:站点:{},入库时检测托盘上有无货物", config.getMark(), staProtocol.getSiteId());
                        continue;
                    }
                    String barcode = staProtocol.getBarcode();
                    if (Cools.isEmpty(barcode)) {
                        News.error("站点:{},未扫到码值:{}", staProtocol.getSiteId(), barcode);
@@ -108,13 +119,13 @@
                        continue;
                    }
                    ApplyInRepsonseDto locOfWms = wmsMainService.getLocOfWms(applyIn(barcode, inSta.getStaNo() + "", staProtocol));
                    ApplyInRepsonseDto locOfWms = wmsMainService.getLocOfWms(applyIn(job, barcode, inSta.getStaNo() + "", staProtocol));
                    if (locOfWms != null) {
                        staProtocol.setWorkNo(staProtocol.getWorkNo());
                        staProtocol.setStaNo(inSta.getTargetSta());
                        redis.push(RedisConveyorConstant.CONVEYOR_TASK_FLAG, staProtocol);
                        job.setLoc(locOfWms.getLocNo());
                        job.setStaNo(String.valueOf(inSta.getTargetSta()+1));
                        job.setStaNo(String.valueOf(inSta.getTargetSta() + 1));
                        job.setTaskNo(locOfWms.getTaskNo());
                        job.setBatchNo(locOfWms.getBatchNo());
                        job.setBarcode(barcode);
@@ -150,15 +161,12 @@
        return job;
    }
    private Integer getWorkNo() {
        return wrkLastnoService.nextWorkNo(WorkNoTypeType.WORK_NO_TYPE.type);
    }
    private ApplyInDto applyIn(String barcode, String staNo, StaProtocol staProtocol) {
    private ApplyInDto applyIn(Job job, String barcode, String staNo, StaProtocol staProtocol) {
        ApplyInDto applyInDto = new ApplyInDto();
        applyInDto.setStaNo(staNo);
        applyInDto.setBarcode(barcode);
        applyInDto.setFull(staProtocol.isFullPlt());
        applyInDto.setFull(Boolean.valueOf(job.getFull()));
        applyInDto.setWeight(staProtocol.getWeight());
        return applyInDto;
    }