| | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | @ApiModelProperty(value= "设备号") |
| | | @TableField("device_no") |
| | | private Integer deviceNo; |
| | | |
| | | /** |
| | | * 堆垛机站点 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机站点") |
| | | private Integer crnStn; |
| | | @ApiModelProperty(value= "设备站点") |
| | | private Integer deviceStn; |
| | | |
| | | /** |
| | | * 备注 |
| | |
| | | |
| | | public StaDesc() {} |
| | | |
| | | public StaDesc(Integer typeNo,String typeDesc,Integer stnNo,String stnDesc,Integer crnNo,Integer crnStn,String memo,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Long hostId) { |
| | | public StaDesc(Integer typeNo,String typeDesc,Integer stnNo,String stnDesc,Integer deviceNo,Integer deviceStn,String memo,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Long hostId) { |
| | | this.typeNo = typeNo; |
| | | this.typeDesc = typeDesc; |
| | | this.stnNo = stnNo; |
| | | this.stnDesc = stnDesc; |
| | | this.crnNo = crnNo; |
| | | this.crnStn = crnStn; |
| | | this.deviceNo = deviceNo; |
| | | this.deviceStn = deviceStn; |
| | | this.memo = memo; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | |
| | | return null; |
| | | } |
| | | |
| | | public String getCrnStn$(){ |
| | | public String getDeviceStn$(){ |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.getById(this.crnStn); |
| | | BasDevp basDevp = service.getById(this.deviceStn); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 检索库位号 |
| | | * |
| | | * @param whsType 类型 1:双深式货架 |
| | | * @param staDescId 路径ID |
| | | * @param sourceStaNo 源站 |
| | | * @param matnr 物料号集合 |
| | | * @return locNo 检索到的库位号 |
| | | */ |
| | | @Transactional |
| | | public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { |
| | | public StartupDto getLocNo(Integer staDescId, Integer sourceStaNo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { |
| | | // 目标库位 |
| | | LocMast locMast = null; |
| | | |
| | |
| | | List<LocMast> locMasts = locMastService.list(new LambdaQueryWrapper<LocMast>() |
| | | .eq(LocMast::getLocSts, "O") |
| | | .eq(LocMast::getLocType1, 1) |
| | | .eq(LocMast::getCrnNo, staDesc.getCrnNo()) |
| | | .eq(LocMast::getCrnNo, staDesc.getDeviceNo()) |
| | | .orderByAsc(LocMast::getLev1, LocMast::getBay1, LocMast::getRow1)); |
| | | if (!locMasts.isEmpty()) { |
| | | for (LocMast loc : locMasts) { |
| | |
| | | // 获取目标站 |
| | | LambdaQueryWrapper<StaDesc> wrapper = new LambdaQueryWrapper<StaDesc>() |
| | | .eq(StaDesc::getTypeNo, staDescId) |
| | | .eq(StaDesc::getStnNo, sourceStaNo) |
| | | .eq(StaDesc::getCrnNo,locMast.getCrnNo()); |
| | | .eq(StaDesc::getStnNo, sourceStaNo); |
| | | StaDesc staDesc = staDescService.getOne(wrapper); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | log.error("入库路径不存在, staDescId={}, sourceStaNo={}", staDescId, sourceStaNo); |
| | |
| | | } |
| | | |
| | | // 检测目标站 |
| | | BasDevp staNo = basDevpService.getById(staDesc.getCrnStn()); |
| | | BasDevp staNo = basDevpService.getById(staDesc.getDeviceNo()); |
| | | if (!staNo.getAutoing().equals("Y")) { |
| | | throw new CoolException("目标站" + staDesc.getCrnStn() + "不可用"); |
| | | throw new CoolException("目标站" + staDesc.getDeviceNo() + "不可用"); |
| | | } |
| | | |
| | | // 生成工作号 |
| | |
| | | startupDto.setSourceStaNo(sourceStaNo); |
| | | startupDto.setStaNo(staNo.getDevNo()); |
| | | startupDto.setLocNo(locMast.getLocNo()); |
| | | startupDto.setCrnNo(staDesc.getCrnNo()); |
| | | return startupDto; |
| | | } |
| | | } |
| | |
| | | @Service |
| | | public class WorkServiceImpl implements WorkService { |
| | | |
| | | // 库位排号分配默认类别 |
| | | private static final int DEFAULT_ROW_NO_TYPE = 1; |
| | | |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | | Date now = new Date(); |
| | | // // 源站点状态检测 |
| | | // BasDevp sourceStaNo = basDevpService.checkSiteStatus(param.getDevpNo(), true); |
| | | // // 检索库位 |
| | | // LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo); |
| | | LocTypeDto locTypeDto = new LocTypeDto(); |
| | | StartupDto dto = commonService.getLocNo(DEFAULT_ROW_NO_TYPE, 1, param.getDevpNo(), null, locTypeDto, 0); |
| | | StartupDto dto = commonService.getLocNo(1, param.getDevpNo(), null, locTypeDto, 0); |
| | | // 生成工作号 |
| | | int workNo = dto.getWorkNo(); |
| | | // 生成工作档 |
| | | WrkMast wrkMast = new WrkMast(); |
| | | wrkMast.setWrkNo(workNo); |
| | | wrkMast.setIoTime(new Date()); |
| | | // wrkMast.setWrkSts(1L); // 工作状态:生成入库ID |
| | | // wrkMast.setIoType(1); // 入出库状态:1.入库 |
| | | // wrkMast.setIoPri(13D); // 优先级:13 |
| | | // wrkMast.setCrnNo(dto.getCrnNo()); |
| | | // wrkMast.setSourceStaNo(dto.getSourceStaNo()); |
| | | // wrkMast.setStaNo(dto.getStaNo()); |
| | | // wrkMast.setLocNo(dto.getLocNo()); |
| | | // wrkMast.setBarcode(param.getBarcode()); // 托盘码 |
| | | // wrkMast.setFullPlt("Y"); // 满板:Y |
| | | // wrkMast.setPicking("N"); // 拣料 |
| | | // wrkMast.setExitMk("N"); // 退出 |
| | | // wrkMast.setEmptyMk("N"); // 空板 |
| | | // wrkMast.setCtnType(sourceStaNo.getCtnType()); // 容器类型 |
| | | // wrkMast.setAppeUser(String.valueOf(userId)); |
| | | // wrkMast.setAppeTime(now); |
| | | // wrkMast.setModiUser(String.valueOf(userId)); |
| | | // wrkMast.setModiTime(now); |
| | | wrkMast.setIoTime(now); |
| | | wrkMast.setWrkSts(1L); // 工作状态:生成入库 |
| | | wrkMast.setIoType(1); // 入出库状态:1.入库 |
| | | wrkMast.setIoPri(13D); // 优先级:13 |
| | | wrkMast.setCrnNo(dto.getCrnNo()); |
| | | wrkMast.setSourceStaNo(dto.getSourceStaNo()); |
| | | wrkMast.setStaNo(dto.getStaNo()); |
| | | wrkMast.setLocNo(dto.getLocNo()); |
| | | wrkMast.setBarcode(param.getBarcode()); // 托盘码 |
| | | wrkMast.setFullPlt("Y"); // 满板:Y |
| | | wrkMast.setPicking("N"); // 拣料 |
| | | wrkMast.setExitMk("N"); // 退出 |
| | | wrkMast.setEmptyMk("N"); // 空板 |
| | | wrkMast.setAppeUser(String.valueOf(userId)); |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(String.valueOf(userId)); |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setHostId(hostId); |
| | | if (!wrkMastService.save(wrkMast)) { |
| | | throw new CoolException("保存工作档失败"); |
| | |
| | | // ,{field: 'typeDesc', align: 'center',title: '作业类型'} |
| | | ,{field: 'stnNo$', align: 'center',title: '作业站点'} |
| | | ,{field: 'stnDesc', align: 'center',title: '站点名称', edit:'text'} |
| | | ,{field: 'crnNo', align: 'center',title: '堆垛机号'} |
| | | ,{field: 'crnStn$', align: 'center',title: '堆垛机站点'} |
| | | ,{field: 'deviceNo', align: 'center',title: '设备号'} |
| | | ,{field: 'deviceStn$', align: 'center',title: '设备站点'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true} |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="crn_no" placeholder="堆垛机号" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="crn_no" placeholder="设备号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="crn_stn" placeholder="堆垛机站点" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="crn_stn" placeholder="设备站点" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-inline">--> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:80%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>堆垛机号:</label> |
| | | <label class="layui-form-label"><span class="not-null">*</span>设备号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="crnNo" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:80%;"> |
| | | <label class="layui-form-label">堆垛机站点:</label> |
| | | <label class="layui-form-label">设备站点:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="crnStn" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="crnStn$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |