#
lsh
2024-03-06 9c86cce3943842ed28f3acd48c33c76cb93b57e5
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -7,17 +7,17 @@
import com.core.common.R;
import com.core.exception.CoolException;
import com.zy.asrs.domain.enums.TaskStatusType;
import com.zy.asrs.domain.enums.WorkNoType;
import com.zy.asrs.entity.LocMast;
import com.zy.asrs.entity.StaDesc;
import com.zy.asrs.entity.TaskWrk;
import com.zy.asrs.entity.ToWmsDTO;
import com.zy.asrs.entity.param.TaskOverParam;
import com.zy.asrs.entity.param.WMSAndAGVInterfaceParam;
import com.zy.asrs.entity.param.TaskCreateParam;
import com.zy.asrs.service.ApiLogService;
import com.zy.asrs.service.OpenService;
import com.zy.asrs.service.StaDescService;
import com.zy.asrs.service.TaskWrkService;
import com.zy.asrs.service.*;
import com.zy.asrs.utils.Utils;
import com.zy.common.service.CommonService;
import com.zy.common.utils.HttpHandler;
import com.zy.core.DevpThread;
import com.zy.core.cache.MessageQueue;
@@ -46,6 +46,10 @@
    @Autowired
    private StaDescService staDescService;
    @Autowired
    private CommonService commonService;
    @Autowired
    private LocMastService locMastService;
@@ -70,13 +74,16 @@
        Date now = new Date();
        taskWrk = new TaskWrk();
        LocMast locMast=locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",param.getStartPoint()));
        int workNo1 = commonService.getWorkNo(WorkNoType.PAKOUT.type);//获取入库工作号
        taskWrk.setTaskNo(param.getTaskNo());//任务号
        taskWrk.setWrkNo(workNo1);
        taskWrk.setStatus(TaskStatusType.RECEIVE.id);//任务状态:接收
        taskWrk.setCreateTime(now);
        taskWrk.setIoType(param.getIoType());//任务类型
        taskWrk.setIoPri(param.getTaskPriority());//优先级
        taskWrk.setBarcode(param.getBarcode());//条码
        taskWrk.setCrnNo(param.getCrn());
        taskWrk.setCrnNo(locMast.getCrnNo());
        if(param.getIoType() == 1){
            taskWrk.setWrkSts(1);
            if (!Cools.isEmpty(param.getTargetPoint())) {
@@ -87,15 +94,15 @@
        } else if (param.getIoType() == 2) {
            taskWrk.setWrkSts(11);
            if (!Cools.isEmpty(param.getStartPoint())) {
                taskWrk.setStartPoint(Utils.getWcsLocNo(param.getStartPoint()));//起点
                taskWrk.setOriginStartPoint(param.getStartPoint());
                taskWrk.setStartPoint(param.getStartPoint());//起点
                taskWrk.setTargetPoint(param.getTargetPoint());
            }
            taskWrk.setTargetPoint(param.getTargetPoint());
        }else if (param.getIoType() == 3){
            taskWrk.setWrkSts(11);
            if (!Cools.isEmpty(param.getStartPoint())) {
                taskWrk.setStartPoint(param.getStartPoint());//起点
                taskWrk.setOriginStartPoint(param.getStartPoint());
                taskWrk.setTargetPoint(param.getTargetPoint());
            }
        }