| | |
| | | @TableField("sign_type_other_boolean") |
| | | private String signTypeOtherBoolean; |
| | | |
| | | /** |
| | | * 其它标记类别(是否输送线互通) |
| | | */ |
| | | @ApiModelProperty(value= "入库站点集合") |
| | | @TableField("sta_no_list") |
| | | private String staNoList; |
| | | |
| | | public RowLastno() {} |
| | | |
| | | public RowLastno(String wrkMk,Integer currentRow,Integer sRow,Integer eRow,Integer crnQty,String memo,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Integer limintLoc) { |
| | |
| | | public void setLimintLoc(Integer limintLoc) { |
| | | this.limintLoc = limintLoc; |
| | | } |
| | | |
| | | public Integer getsCrnNo() { |
| | | return sCrnNo; |
| | | } |
| | |
| | | this.signTypeOtherBoolean = signTypeOtherBoolean; |
| | | } |
| | | |
| | | public String getStaNoList() { |
| | | return staNoList; |
| | | } |
| | | |
| | | public void setStaNoList(String StaNoList) { |
| | | this.staNoList = StaNoList; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.utils; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Arith; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | |
| | | // } |
| | | |
| | | public static Integer GetWhsType(Integer sourceStaNo) { |
| | | switch (sourceStaNo){ |
| | | case 104: |
| | | case 173: |
| | | case 174: |
| | | case 175: |
| | | case 130: |
| | | case 125: |
| | | return 5; |
| | | case 204: |
| | | case 273: |
| | | case 274: |
| | | case 275: |
| | | case 230: |
| | | case 225: |
| | | return 2; |
| | | default: |
| | | return 0; |
| | | RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class); |
| | | List<RowLastno> rowLastnos = rowLastnoService.selectList(new EntityWrapper<RowLastno>()); |
| | | for (RowLastno rowLastno:rowLastnos){ |
| | | String[] staNoList = rowLastno.getStaNoList().split(";"); |
| | | for (String staNo : staNoList){ |
| | | if (staNo.equals(sourceStaNo.toString())){ |
| | | return rowLastno.getWhsType(); |
| | | } |
| | | } |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | public static boolean BooleanWhsTypeStaIoType(Integer whsType) { //查询相似物料开关 |
| | | if (whsType == 1 || whsType==3 || whsType==4) { |
| | |
| | | }else { |
| | | staNo = basDevpService.selectById(staDesc.getCrnStn()); |
| | | if (!staNo.getAutoing().equals("Y")) { |
| | | log.error("目标站"+staDesc.getCrnStn()+"不可用"); |
| | | // throw new CoolException("目标站"+staDesc.getCrnStn()+"不可用"); |
| | | crnNo = 0; |
| | | } |
| | |
| | | |
| | | // 1.按规则查找库位 |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O").orderBy("lev1",true).orderBy("bay1",true)); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("loc_sts", "O") |
| | | .orderBy("lev1",true).orderBy("bay1",true)); |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | | } |
| | | if (Utils.BooleanWhsTypeStaIoType(whsType)){ |
| | | String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", shallowLoc).eq("loc_sts", "O")); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O")); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(whsType)){ |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | | } |
| | | if (Utils.BooleanWhsTypeStaIoType(whsType)){ |
| | | String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O")); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } else { |
| | | locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } else { |
| | | locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "D")); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!Cools.isEmpty(locMast) && !basCrnpService.checkSiteError(crnNo, true)) { |
| | |
| | | BasDevp sourceStaNo = basDevpService.checkSiteStatus(devpNo, true); |
| | | |
| | | // 检索库位 |
| | | List<KeyValueVo> list = waitPakins.stream().map(item-> new KeyValueVo(item.getMatnr(), item.getBatch())).distinct().collect(Collectors.toList()); |
| | | List<String> matNos = waitPakins.stream().map(WaitPakin::getMatnr).distinct().collect(Collectors.toList()); |
| | | StartupDto dto = commonService.getLocNo(1, 1, devpNo, matNos.get(0),null,null, locTypeDto); |
| | | List<String> matnrs = waitPakins.stream().map(WaitPakin::getMatnr).distinct().collect(Collectors.toList()); |
| | | List<String> batchs = waitPakins.stream().map(WaitPakin::getBatch).distinct().collect(Collectors.toList()); |
| | | StartupDto dto = commonService.getLocNo(1, 1, devpNo, matnrs.get(0),batchs.get(0),null, locTypeDto); |
| | | int workNo = dto.getWorkNo(); |
| | | Date now = new Date(); |
| | | // 生成工作档 |
| | |
| | | <result column="sign_type" property="signType" /> |
| | | <result column="sign_type_other" property="signTypeOther" /> |
| | | <result column="sign_type_other_boolean" property="signTypeOtherBoolean" /> |
| | | <result column="sta_no_list" property="staNoList" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | ,{field: 'sCrnNo', align: 'center',title: '起始堆垛机号'} |
| | | ,{field: 'eCrnNo', align: 'center',title: '终止堆垛机号'} |
| | | ,{field: 'crnQty', align: 'center',title: '堆垛机数量'} |
| | | ,{field: 'staNoList', align: 'center',title: '站点集合'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true} |
| | |
| | | currentRow: $('#currentRow').val(), |
| | | sRow: $('#sRow').val(), |
| | | eRow: $('#eRow').val(), |
| | | crnQty: $('#crnQty').val(), |
| | | sCrnNo: $('#sCrnNo').val(), |
| | | eCrnNo: $('#eCrnNo').val(), |
| | | crnQty: $('#crnQty').val(), |
| | | staNoList: $('#staNoList').val(), |
| | | memo: $('#memo').val(), |
| | | modiUser: $('#modiUser').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">堆垛机数量:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="crnQty" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">起始堆垛机号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="sCrnNo" class="layui-input" type="text"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">堆垛机数量:</label> |
| | | <label class="layui-form-label">站点集合(;):</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="crnQty" class="layui-input" type="text"> |
| | | <input id="staNoList" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/rowLastno/rowLastno.js" charset="utf-8"></script> |
| | | </html> |
| | | |