| | |
| | | //} |
| | | if (Cools.isEmpty(locMast)) { |
| | | locMast = locMastService.queryFreeLocMast(curRow, locTypeDto.getLocType1()); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", curRow) |
| | | .eq("loc_sts", "O") |
| | | .orderBy("lev1", true).orderBy("bay1", true)); |
| | | for(LocMast locMast1 :locMasts){ |
| | | // 目标库位 ===>> 浅库位, 则校验其深库位是否为 F D X |
| | | if (null != locMast1 && Integer.parseInt(locMast1.getLocNo().substring(0, 2)) == 2) { |
| | | LocMast deepLoc = locMastService.selectById(zerofill(String.valueOf(3), 2) + locMast1.getLocNo().substring(2)); |
| | | if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X") && !deepLoc.getLocSts().equals("P")) { |
| | | locMast = null; |
| | | }else { |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 目标库位 ===>> 深库位, 则校验其浅库位是否为 O |
| | | if (null != locMast1 && Integer.parseInt(locMast1.getLocNo().substring(0, 2)) == 3) { |
| | | LocMast shallowLoc = locMastService.selectById(zerofill(String.valueOf(2), 2) + locMast1.getLocNo().substring(2)); |
| | | if (!Cools.isEmpty(shallowLoc)) { |
| | | if (!shallowLoc.getLocSts().equals("O")) { |
| | | locMast = null; |
| | | }else { |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 因库位移转、需预留空库位 |
| | | if (!locMastService.checkEmptyCount(locMast)) { |
| | | locMast = null; |
| | | } |
| | | // 目标库位 ===>> 浅库位, 则校验其深库位是否为 F D X |
| | | if (null != locMast && Integer.parseInt(locMast.getLocNo().substring(0, 2)) == 2) { |
| | | LocMast deepLoc = locMastService.selectById(zerofill(String.valueOf(3), 2) + locMast.getLocNo().substring(2)); |
| | | if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) { |
| | | locMast = null; |
| | | } |
| | | } |
| | | //if (null != locMast && Utils.isShallowLoc(slaveProperties, locMast.getLocNo())) { |
| | | // LocMast deepLoc = locMastService.selectById(Utils.getDeepLoc(slaveProperties, locMast.getLocNo())); |
| | | // if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) { |
| | | // locMast = null; |
| | | // } |
| | | //} |
| | | // 目标库位 ===>> 深库位, 则校验其浅库位是否为 O |
| | | if (null != locMast && Integer.parseInt(locMast.getLocNo().substring(0, 2)) == 3) { |
| | | LocMast shallowLoc = locMastService.selectById(zerofill(String.valueOf(2), 2) + locMast.getLocNo().substring(2)); |
| | | if (!Cools.isEmpty(shallowLoc)) { |
| | | if (!shallowLoc.getLocSts().equals("O")) { |
| | | locMast = null; |
| | | } |
| | | } |
| | | } |
| | | //if (null != locMast && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) { |
| | | // LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo())); |
| | | // if (!Cools.isEmpty(shallowLoc)) { |
| | | // if (!shallowLoc.getLocSts().equals("O")) { |
| | | // locMast = null; |
| | | // } |
| | | // } |
| | | // |
| | | // |
| | | //} |
| | | // // 目标库位 ===>> 浅库位, 则校验其深库位是否为 F D X |
| | | // if (null != locMast && Integer.parseInt(locMast.getLocNo().substring(0, 2)) == 2) { |
| | | // LocMast deepLoc = locMastService.selectById(zerofill(String.valueOf(3), 2) + locMast.getLocNo().substring(2)); |
| | | // if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X") && !deepLoc.getLocSts().equals("P")) { |
| | | // locMast = null; |
| | | // } |
| | | // } |
| | | // |
| | | // // 目标库位 ===>> 深库位, 则校验其浅库位是否为 O |
| | | // if (null != locMast && Integer.parseInt(locMast.getLocNo().substring(0, 2)) == 3) { |
| | | // LocMast shallowLoc = locMastService.selectById(zerofill(String.valueOf(2), 2) + locMast.getLocNo().substring(2)); |
| | | // if (!Cools.isEmpty(shallowLoc)) { |
| | | // if (!shallowLoc.getLocSts().equals("O")) { |
| | | // locMast = null; |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | } |
| | | |
| | | // 2.库位当前所属尺寸无空库位时,调整尺寸参数,向上兼容检索库位 |
| | | if (Cools.isEmpty(locMast)) { |
| | | // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归 |
| | | if (times < rowCount) { |
| | | if (times < 4) { |
| | | times = times + 1; |
| | | if(locTypeDto.getLocType1() == 1 && times == 3){ |
| | | if(locTypeDto.getLocType1() == 1 && times == 2){ |
| | | locTypeDto.setLocType1((short) 2); |
| | | } |
| | | return getLocNo(1, staDescId, sourceStaNo, matNos, locTypeDto, times); |
| | |
| | | */ |
| | | @Override |
| | | public InputStream getStream() throws IOException { |
| | | // final InputStream in = this.getClass().getClassLoader().getResourceAsStream(storePath); |
| | | final InputStream in = new FileInputStream(new File(storePath)); |
| | | if (null == in) { |
| | | throw new FileNotFoundException(storePath); |
| | |
| | | param.setStorePass(storePass); |
| | | param.setLicensePath(licensePathFile.getPath()); |
| | | param.setPublicKeysStorePath(publicKeysStoreFile.getPath()); |
| | | // param.setLicensePath(licensePath); |
| | | // param.setPublicKeysStorePath(publicKeysStorePath); |
| | | |
| | | LicenseVerify licenseVerify = new LicenseVerify(); |
| | | //安装证书 |
| | | LicenseContent install = licenseVerify.install(param); |
| | | |
| | | logger.info("++++++++ 许可证加载结束 ++++++++"); |
| | | |
| | | // if(install != null){ |
| | | // Date start = new Date(); |
| | | // Date end = install.getNotAfter(); |
| | | // Long starTime = start.getTime(); |
| | | // Long endTime = end.getTime(); |
| | | // Long num = endTime - starTime;//时间戳相差的毫秒数 |
| | | // int day = (int) (num / 24 / 60 / 60 / 1000); |
| | | // licenseTimer.setLicenseDays(day); |
| | | // } |
| | | return install != null; |
| | | } catch (Exception e) { |
| | | return false; |
| | |
| | | import de.schlichtherle.license.*; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | import sun.misc.IOUtils; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileOutputStream; |
| | | import java.io.InputStream; |
| | | import java.text.DateFormat; |
| | | import java.text.MessageFormat; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | try{ |
| | | LicenseManager licenseManager = LicenseManagerHolder.getInstance(initLicenseParam(param)); |
| | | licenseManager.uninstall(); |
| | | |
| | | // InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(param.getLicensePath()); |
| | | // File file = new File(param.getLicensePath()); |
| | | // try(FileOutputStream out = new FileOutputStream(file)){ |
| | | // IOUtils.copy(inputStream, out); |
| | | // } |
| | | result = licenseManager.install(new File(param.getLicensePath())); |
| | | logger.info(MessageFormat.format("许可证加载成功,许可证有效期:{0} - {1}",format.format(result.getNotBefore()),format.format(result.getNotAfter()))); |
| | | }catch (Exception e){ |
| | |
| | | |
| | | #License相关配置 |
| | | license: |
| | | subject: pswms |
| | | subject: flsbwms |
| | | publicAlias: publicCert |
| | | storePass: public_zhongyang_123456789 |
| | | licensePath: license.lic |
| | |
| | | var pageCurr; |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'locNo$', align: 'center',title: '库位号'}, |
| | | {field: 'locNo', align: 'center',title: '库位号',sort: true}, |
| | | {field: 'matnr', align: 'center',title: '品号', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '品名', sort:true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: true} |
| | | ,{field: 'batch', align: 'center',title: '批号', hide: true} |
| | | ,{field: 'anfme', align: 'center',title: '数量', sort:true} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码',sort:true} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'model', align: 'center',title: '代码', hide: true} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |