package com.zy.asrs.entity.param; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.core.common.SnowflakeIdWorker; import com.core.common.SpringUtils; import com.zy.asrs.entity.BasAgvLocNo; import com.zy.asrs.entity.BasAgvMast; import com.zy.asrs.service.BasAgvLocNoService; import lombok.Data; import java.util.ArrayList; /* * Created by Monkey D. Luffy on 2025.09.09 * */ @Data public class AgvBindCtnrAndBinParam { private String reqCode; private String reqTime; private String clientCode; private String tokenCode; private String ctnrCode; private String ctnrTyp; private String stgBinCode; private String positionCode; private String indBind; public AgvBindCtnrAndBinParam() { } public AgvBindCtnrAndBinParam(BasAgvMast basAgvMast) { switch (basAgvMast.getIoType()){ case 0: getAgvTaskAssignmentParam0(basAgvMast); indBind = "1"; return; default: return; } } public void getAgvTaskAssignmentParam0(BasAgvMast basAgvMast) { BasAgvLocNoService basAgvLocNoService = SpringUtils.getBean(BasAgvLocNoService.class); this.reqCode = basAgvMast.getTaskNo() + "-" + System.currentTimeMillis(); BasAgvLocNo basAgvLocNoSou = basAgvLocNoService.selectOne( new EntityWrapper().eq("loc_no", basAgvMast.getSourceLocNo()) ); this.stgBinCode = basAgvLocNoSou != null ? basAgvLocNoSou.getAgvLocNo() : ""; } }