| | |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <finalName>htwms</finalName> |
| | | <finalName>awdwms</finalName> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.TagService; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.kingdee.handler.LoginAuthenticationHandler; |
| | | import com.zy.asrs.utils.MatExcelListener; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.config.AdminInterceptor; |
| | |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | @Autowired |
| | | private LoginAuthenticationHandler loginAuthenticationHandler; |
| | | |
| | | @RequestMapping(value = "/mat/auto/matnr/auth") |
| | | public R autoMatnr() { |
| | |
| | | mat.setStatus(1); |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("添加失败,请联系管理员"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/KingDeeadd/auth") |
| | | @ManagerAuth |
| | | public R KingDeeadd() { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | //登录金蝶 |
| | | ReturnT<String> start = loginAuthenticationHandler.start(); |
| | | |
| | | InFormIdParam inFormIdParam = new InFormIdParam(); |
| | | inFormIdParam.setFormId("BD_MATERIAL"); |
| | | inFormIdParam.setLimit(10000000); |
| | | inFormIdParam.setStartRow("0"); |
| | | String FDocumentStatus = "C"; |
| | | |
| | | // 获取当前日期 |
| | | LocalDate currentDate = LocalDate.now(); |
| | | // 获取前一个月的同一天 |
| | | LocalDate previousMonthDate = currentDate.minusMonths(1); |
| | | |
| | | // 格式化日期为 "yyyyMMdd" 格式 |
| | | DateTimeFormatter formatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | String formattedDate2 = previousMonthDate.format(formatter1); |
| | | |
| | | //条件和需要获得的结果拼接 |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("FormId", inFormIdParam.getFormId()); |
| | | jsonObject.put("Limit", inFormIdParam.getLimit()); |
| | | jsonObject.put("StartRow", inFormIdParam.getStartRow()); |
| | | jsonObject.put("FilterString", "FCreateDate>'" + formattedDate2 + "' and FDocumentStatus='" + FDocumentStatus + "' and FUseOrgId .FNumber='201'"); |
| | | jsonObject.put("FieldKeys", "FName,FNumber,FCreateDate,FSpecification,FDocumentStatus,FTuhao"); |
| | | // FName : 物料名称 ; |
| | | // FNumber :物料编号; |
| | | // FCreateDate :物料创建时间; |
| | | // FSpecification :物料规格; |
| | | // FDocumentStatus :物料状态 |
| | | JSONObject jsonObject1 = new JSONObject(); |
| | | jsonObject1.put("data", jsonObject); |
| | | String add = jsonObject1.toJSONString(); |
| | | //上报 |
| | | String response = ""; |
| | | boolean success = false; |
| | | try { |
| | | //获取Cookie值 |
| | | HashMap<String, Object> headers = new HashMap<>(); |
| | | headers.put("Cookie", start.getContent()); |
| | | response = new HttpHandler.Builder() |
| | | .setHeaders(headers) |
| | | .setUri(URL) |
| | | .setPath(inaddress) |
| | | .setJson(add) |
| | | .build() |
| | | .doPost(); |
| | | JSONArray data = JSON.parseArray(response); |
| | | int i = 0; |
| | | if (data.size() > 0) { |
| | | if (data.getJSONArray(0).get(0).toString().length() < 20) { |
| | | if (i == 0) { |
| | | for (int j = 0; j < data.size(); j++) { |
| | | JSONArray jsonArray = data.getJSONArray(j); |
| | | //生成商品档案 |
| | | //商品编号 |
| | | Mat mat = matService.selectByMatnr(jsonArray.get(1).toString()); |
| | | if (mat == null) { |
| | | mat = new Mat(); |
| | | Tag tag = new Tag(); |
| | | mat.setMatnr(jsonArray.get(1).toString()); |
| | | mat.setMaktx(jsonArray.get(0).toString()); |
| | | mat.setSpecs(jsonArray.get(3).toString());//规格 |
| | | mat.setModel(jsonArray.get(5).toString());//图号 |
| | | mat.setTagId(20L); |
| | | //对美国时间进行转换 |
| | | DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS"); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME; |
| | | LocalDateTime dateTime = LocalDateTime.parse(jsonArray.get(2).toString(), formatter); |
| | | String format = dateFormat.format(dateTime); |
| | | Date date = sdf.parse(format); |
| | | mat.setCreateTime(date);//商品创建时间 |
| | | mat.setUpdateTime(new Date()); |
| | | mat.setStatus(1); |
| | | //最新抓取商品时间 |
| | | tag.setCreateTime(date); |
| | | tagService.update(tag, new EntityWrapper<Tag>().eq("id", 20)); |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } else { |
| | | log.info("同步新物料[商品编号:{}]", mat.getMatnr()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // if (data.getJSONArray(0).get(0).toString().length() < 20) { |
| | | // success = true; |
| | | // JSONArray jsonArray = data.getJSONArray(0); |
| | | // //生成商品档案 |
| | | // //商品编号 |
| | | // mat = matService.selectByMatnr(jsonArray.get(1).toString()); |
| | | // if (mat == null) { |
| | | // mat = new Mat(); |
| | | // Tag tag = new Tag(); |
| | | // mat.setMatnr(jsonArray.get(1).toString()); |
| | | // mat.setMaktx(jsonArray.get(0).toString()); |
| | | // mat.setSpecs(jsonArray.get(3).toString());//规格 |
| | | // mat.setTagId(20L); |
| | | // //对美国时间进行转换 |
| | | // DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS"); |
| | | // DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME; |
| | | // LocalDateTime dateTime = LocalDateTime.parse(jsonArray.get(2).toString(), formatter); |
| | | // String format = dateFormat.format(dateTime); |
| | | // Date date = sdf.parse(format); |
| | | // mat.setCreateTime(date);//商品创建时间 |
| | | // mat.setUpdateTime(new Date()); |
| | | // mat.setStatus(1); |
| | | // //最新抓取商品时间 |
| | | // tag.setCreateTime(date); |
| | | // tagService.update(tag, new EntityWrapper<Tag>().eq("id", 20)); |
| | | // if (!matService.insert(mat)) { |
| | | // throw new CoolException("服务器内部错误,请联系管理员"); |
| | | // } else { |
| | | // log.info("同步新物料[商品编号:{}]", mat.getMatnr()); |
| | | // } |
| | | // } |
| | | // } else { |
| | | // throw new CoolException("没有找到指定物料档案,请联系管理员"); |
| | | // } |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | } finally { |
| | | try { |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "轮询数据", |
| | | URL + inaddress, |
| | | null, |
| | | "127.0.0.1", |
| | | add, |
| | | response, |
| | | success |
| | | ); |
| | | } catch (Exception e) { |
| | | log.error("", e); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | import com.zy.asrs.entity.param.OrderDomainParam; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.kingdee.handler.LoginAuthenticationHandler; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.web.BaseController; |
| | |
| | | |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | |
| | | @Autowired |
| | | private LoginAuthenticationHandler loginAuthenticationHandler; |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | |
| | | } |
| | | return R.ok("订单添加成功"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/order/form/KingDeeadd/authtest") |
| | | @ManagerAuth(memo = "根据订单类型和订单码添加") |
| | | @Transactional |
| | | public R KingDeeformAddTest(@RequestBody OrderDomainParam param){ |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | //登录金蝶 |
| | | ReturnT<String> start = loginAuthenticationHandler.start(); |
| | | InFormIdParam inFormIdParam = new InFormIdParam(); |
| | | //数量字段ncompatible types. Found: 'java.lang.Long', required: 'char, byte, short, int, Character, Byte, Short, Integer, String, or an enum' |
| | | String anfme =null; |
| | | int i=Long.valueOf(param.getDocType()).intValue(); |
| | | switch (i){ |
| | | //采购入库 |
| | | case 13 : inFormIdParam.setFormId("STK_InStock");anfme ="FRealQty"; break; |
| | | //采购退料 |
| | | case 21 : inFormIdParam.setFormId("PUR_MRB");anfme ="FRMREALQTY"; break; |
| | | //生产领料 |
| | | case 22 : inFormIdParam.setFormId("PRD_PickMtrl");anfme ="FActualQty"; break; |
| | | //生产退料 |
| | | case 24 : inFormIdParam.setFormId("PRD_ReturnMtrl");anfme ="FQty"; break; |
| | | //生产补料 |
| | | case 25 : inFormIdParam.setFormId("PRD_FeedMtrl");anfme ="FActualQty"; break; |
| | | //直接调拨单 |
| | | case 26 : inFormIdParam.setFormId("STK_TransferDirect");anfme ="FQty"; break; |
| | | //盘盈单 |
| | | case 28 : inFormIdParam.setFormId("STK_StockCountGain");anfme ="FGainQty"; break; |
| | | //盘亏单 |
| | | case 29 : inFormIdParam.setFormId("STK_StockCountLoss");anfme ="FLossQty"; break; |
| | | //其他出库 |
| | | case 30 : inFormIdParam.setFormId("STK_MisDelivery");anfme ="FQty"; break; |
| | | //简单生产领料 |
| | | case 31 : inFormIdParam.setFormId("SP_PickMtrl");anfme ="FActualQty"; break; |
| | | //简单生产退料 |
| | | case 32 : inFormIdParam.setFormId("SP_ReturnMtrl");anfme ="FQty"; break; |
| | | //销售出库 |
| | | case 14 : inFormIdParam.setFormId("SAL_OUTSTOCK");anfme ="FRealQty"; break; |
| | | //销售退货 |
| | | case 33 : inFormIdParam.setFormId("SAL_RETURNSTOCK");anfme ="FRealQty"; break; |
| | | } |
| | | inFormIdParam.setLimit(100); |
| | | inFormIdParam.setStartRow("0"); |
| | | String FDocumentStatus = "B"; |
| | | |
| | | //条件和需要获得的结果拼接 |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("FormId", inFormIdParam.getFormId()); |
| | | jsonObject.put("Limit", inFormIdParam.getLimit()); |
| | | jsonObject.put("StartRow", inFormIdParam.getStartRow()); |
| | | //单据状态 |
| | | FDocumentStatus="B"; |
| | | //订单码 |
| | | String orderNo= param.getOrderNo(); |
| | | jsonObject.put("FilterString", "FBillNo='"+orderNo+"'and FStockId.Fname='立库'"+" and FDocumentStatus='"+FDocumentStatus+"'"); |
| | | jsonObject.put("FieldKeys", "FBillNo,FCreateDate,FMaterialId.FNumber,FMaterialId.FName,FMaterialId.FSpecification,"+anfme+",FDocumentStatus"); |
| | | // FBillNo :单据编号; |
| | | // FCreateDate :单据创建时间; |
| | | // FMaterialId.FNumber : 物料编码; |
| | | // FMaterialName :物料名称; |
| | | // FMaterialId.FSpecification:物料规格 |
| | | // anfme : 物料数量 |
| | | // FDocumentStatus :单据状态; |
| | | JSONObject jsonObject1 = new JSONObject(); |
| | | jsonObject1.put("data", jsonObject); |
| | | String add = jsonObject1.toJSONString(); |
| | | |
| | | //上报 |
| | | String response = ""; |
| | | boolean success = false; |
| | | try { |
| | | //获取Cookie值 |
| | | HashMap<String, Object> headers = new HashMap<>(); |
| | | headers.put("Cookie", start.getContent()); |
| | | response = new HttpHandler.Builder() |
| | | .setHeaders(headers) |
| | | .setUri(URL) |
| | | .setPath(inaddress) |
| | | .setJson(add) |
| | | .build() |
| | | .doPost(); |
| | | JSONArray data = JSON.parseArray(response); |
| | | if(data.getJSONArray(0).get(0).toString().length()<20){ |
| | | success = true; |
| | | for (int j = 0; j < data.size(); j++) { |
| | | JSONArray jsonArray = data.getJSONArray(j); |
| | | Order order = orderService.selectByNo(jsonArray.get(0).toString()); |
| | | if (Cools.isEmpty(order)) { |
| | | DocType docType = docTypeService.selectById(param.getDocType()); |
| | | Date now = new Date(); |
| | | // 单据主档 |
| | | order = new Order( |
| | | String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | | jsonArray.get(0).toString(), // 订单编号 |
| | | DateUtils.convert(now), // 单据日期 |
| | | docType.getDocId(), // 单据类型 |
| | | null, // 项目编号 |
| | | null, // |
| | | null, // 调拨项目编号 |
| | | null, // 初始票据号 |
| | | null, // 票据号 |
| | | null, // 客户编号 |
| | | null, // 客户 |
| | | null, // 联系方式 |
| | | null, // 操作人员 |
| | | null, // 合计金额 |
| | | null, // 优惠率 |
| | | null, // 优惠金额 |
| | | null, // 销售或采购费用合计 |
| | | null, // 实付金额 |
| | | null, // 付款类型 |
| | | null, // 业务员 |
| | | null, // 结算天数 |
| | | null, // 邮费支付类型 |
| | | null, // 邮费 |
| | | null, // 付款时间 |
| | | null, // 发货时间 |
| | | null, // 物流名称 |
| | | null, // 物流单号 |
| | | 1L, // 订单状态 |
| | | 1, // 状态 |
| | | 9527L, // 添加人员 |
| | | now, // 添加时间 |
| | | 9527L, // 修改人员 |
| | | now, // 修改时间 |
| | | null // 备注 |
| | | ); |
| | | //对美国时间进行转换 |
| | | DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS"); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME; |
| | | LocalDateTime dateTime = LocalDateTime.parse(jsonArray.get(1).toString(), formatter); |
| | | String format = dateFormat.format(dateTime); |
| | | Date date = sdf.parse(format); |
| | | //最新抓取时间 |
| | | docType.setCreateTime(date); |
| | | docTypeService.update(docType, new EntityWrapper<DocType>().eq("doc_id", param.getDocType())); |
| | | if (!orderService.insert(order)) { |
| | | throw new CoolException("生成单据主档失败,请联系管理员"); |
| | | } |
| | | } |
| | | //物料编码 |
| | | Mat mat = matService.selectByMatnr(jsonArray.get(2).toString()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(jsonArray.get(2).toString() + "编号商品检索失败,请先添加商品"); |
| | | } |
| | | OrderDetl orderDetl1 = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("order_no", jsonArray.get(0).toString()).eq("matnr", jsonArray.get(2).toString())); |
| | | if (!Cools.isEmpty(orderDetl1)) { |
| | | continue; |
| | | } |
| | | DocType docType = docTypeService.selectById(param.getDocType()); |
| | | OrderDetl orderDetl = new OrderDetl(); |
| | | orderDetl.sync(mat); |
| | | orderDetl.setBatch(null); |
| | | orderDetl.setAnfme(Double.parseDouble(jsonArray.get(5).toString())); |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setOrderNo(order.getOrderNo()); |
| | | orderDetl.setCreateBy(9527L); |
| | | orderDetl.setCreateTime(new Date()); |
| | | orderDetl.setUpdateBy(9527L); |
| | | orderDetl.setUpdateTime(new Date()); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setQty(0.0D); |
| | | DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS"); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME; |
| | | LocalDateTime dateTime = LocalDateTime.parse(jsonArray.get(1).toString(), formatter); |
| | | String format = dateFormat.format(dateTime); |
| | | Date date = sdf.parse(format); |
| | | //最新抓取时间 |
| | | docType.setCreateTime(date); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | | throw new CoolException("生成单据明细失败,请联系管理员"); |
| | | } |
| | | } |
| | | }else{ |
| | | throw new CoolException("没有找到指定订单,请联系管理员"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | } finally { |
| | | try { |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "轮询数据", |
| | | URL + inaddress, |
| | | null, |
| | | "127.0.0.1", |
| | | add, |
| | | response, |
| | | success |
| | | ); |
| | | } catch (Exception e) { |
| | | log.error("", e); |
| | | } |
| | | } |
| | | return R.ok("订单添加成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @Update("update asr_loc_detl set loc_no = #{newLocNo}, modi_time=getDate() where loc_no = #{oldLocNo}") |
| | | int updateLocNo(String newLocNo, String oldLocNo); |
| | | |
| | | @Select("SELECT ld.loc_no FROM asr_loc_detl ld LEFT JOIN asr_loc_mast lm ON ld.loc_no = lm.loc_no WHERE (1 = 1 AND ld.matnr = #{matnr} AND lm.bay1 >= 10 AND lm.bay1 <=20 AND (lm.row1 >= #{start} AND lm.row1 <= #{end}) AND lm.loc_sts = 'F' AND DateDiff(dd, ld.appe_time, getdate()) = 0) ORDER BY ld.appe_time ASC") |
| | | @Select("SELECT ld.loc_no FROM asr_loc_detl ld LEFT JOIN asr_loc_mast lm ON ld.loc_no = lm.loc_no WHERE (1 = 1 AND ld.matnr = #{matnr} AND (lm.row1 >= #{start} AND lm.row1 <= #{end}) AND lm.loc_sts = 'F' AND DateDiff(dd, ld.appe_time, getdate()) = 0) ORDER BY ld.appe_time ASC") |
| | | List<String> selectSameDetlToday(@Param("matnr") String matnr, @Param("start") Integer start, @Param("end") Integer end); |
| | | |
| | | List<LocDetl> getStockStatis(Map<String, Object> map); |
| | |
| | | */ |
| | | public static boolean isShallowLoc(SlaveProperties slaveProperties, Integer row){ |
| | | if (slaveProperties.isDoubleDeep()) { |
| | | if(row == 1||row == 2){ |
| | | return false; |
| | | } |
| | | return !slaveProperties.getDoubleLocs().contains(row); |
| | | } else { |
| | | return false; |
| | |
| | | public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) { |
| | | int row = getRow(deepLoc); |
| | | int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int shallowRow = remainder == 1 ? (row + 1) : (row - 1); |
| | | int shallowRow = remainder == 3 ? (row + 1) : (row - 1); |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | } |
| | | |
| | |
| | | public static Integer getDeepRow(SlaveProperties slaveProperties, Integer shallowRow) { |
| | | int remainder = (int) Arith.remainder(shallowRow, slaveProperties.getGroupCount()); |
| | | int targetRow; |
| | | if (remainder == 2) { |
| | | if (remainder == 0) { |
| | | targetRow = shallowRow - 1; |
| | | } else if (remainder == 3) { |
| | | } else if (remainder == 1) { |
| | | targetRow = shallowRow + 1; |
| | | } else { |
| | | throw new RuntimeException(shallowRow + "不是浅库位排,系统繁忙"); |
| | |
| | | |
| | | // 生成激活码 |
| | | public static void main(String[] args) { |
| | | String timeStr = "2021-08-01 17:48:35"; |
| | | String timeStr = "2026-08-05 13:48:35"; |
| | | Date exprTime = DateUtils.convert(timeStr); |
| | | String code = AesUtils.encrypt(DateUtils.convert(exprTime, DateUtils.yyyyMMddHHmmss), SystemProperties.SALT); |
| | | System.out.println("激活码:"+code); |
| | |
| | | // } else if (sourceStaNo > 399){ |
| | | // whsType = 4; |
| | | // } |
| | | |
| | | if (sourceStaNo ==101||sourceStaNo==103){ |
| | | whsType = 1; |
| | | } else if (sourceStaNo ==105||sourceStaNo==107){ |
| | | // 目标堆垛机号 |
| | | int crnNo = 0; |
| | | if (sourceStaNo ==102) { |
| | | whsType = 3; |
| | | crnNo = 3; |
| | | }else if (sourceStaNo ==104) { |
| | | whsType = 2; |
| | | } else{ |
| | | crnNo = 2; |
| | | }else if(sourceStaNo ==106) { |
| | | whsType = 1; |
| | | crnNo = 1; |
| | | }else |
| | | throw new CoolException("站点数据异常,请联系管理员"); |
| | | } |
| | | |
| | | |
| | | RowLastno rowLastno = rowLastnoService.selectById(whsType); |
| | | if (Cools.isEmpty(rowLastno)) { |
| | |
| | | int eRow = rowLastno.geteRow(); |
| | | int crn_qty = rowLastno.getCrnQty(); |
| | | int rowCount = eRow - sRow + 1; |
| | | // 目标堆垛机号 |
| | | int crnNo = 0; |
| | | |
| | | // 目标库位 |
| | | LocMast locMast = null; |
| | | |
| | |
| | | |
| | | // 如果没有相近物料,则按规则轮询货架 |
| | | if (null == locMast) { |
| | | if(crnNo>1) { |
| | | curRow = curRow -2; |
| | | } |
| | | Shelves shelves = new Shelves(rowCount, crn_qty); |
| | | int divides = (int) Arith.divides(1, curRow - 1, 4); |
| | | curRow = (int) Arith.remainder(curRow, 4); |
| | |
| | | if (curRow < 0) { |
| | | throw new CoolException("检索库位失败,请联系管理员"); |
| | | } |
| | | Integer crnNo1 = shelves.get(curRow); |
| | | crnNo1 = crnNo1 + divides*1; |
| | | if (basCrnpService.checkSiteError(crnNo1, true)) { |
| | | crnNo = crnNo1; |
| | | if (basCrnpService.checkSiteError(crnNo, true)) { |
| | | curRow = curRow + divides*4; |
| | | break; |
| | | } |
| | | } |
| | | if(crnNo>1) { |
| | | curRow = curRow +2; |
| | | } |
| | | } |
| | | |
| | |
| | | if (!locMastService.checkEmptyCount(locMast)) { |
| | | locMast = null; |
| | | } |
| | | // 目标库位 ===>> 浅库位, 则校验其深库位是否为 F D X |
| | | 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; |
| | | if(curRow >2){ |
| | | // 目标库位 ===>> 浅库位, 则校验其深库位是否为 F D X |
| | | 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 && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) { |
| | | LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo())); |
| | | if (!shallowLoc.getLocSts().equals("O")) { |
| | | locMast = null; |
| | | // 目标库位 ===>> 深库位, 则校验其浅库位是否为 O |
| | | if (null != locMast && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) { |
| | | LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo())); |
| | | if (!shallowLoc.getLocSts().equals("O")) { |
| | | locMast = null; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=tzhtasrs |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=ycawdasrs |
| | | username: sa |
| | | password: sa@123 |
| | | mvc: |
| | |
| | | # 双深 |
| | | doubleDeep: true |
| | | # 双深库位排号 |
| | | doubleLocs: 1,4,5,8 |
| | | doubleLocs: 3,6,7,10 |
| | | # 一个堆垛机负责的货架排数 |
| | | groupCount: 4 |
| | | |
| | |
| | | var baseUrl = "/htwms"; |
| | | var baseUrl = "/awdwms"; |
| | | |
| | | // 详情窗口-高度 |
| | | var detailHeight = '80%'; |