| | |
| | | List<Order> orders = orderService.selectList(new EntityWrapper<Order>().eq("settle", 4L)); |
| | | if (orders.size() > 0) { |
| | | for (Order order : orders) { |
| | | |
| | | List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | if (!Cools.isEmpty(orderDetls)) { |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | String orderNo = orderDetl.getOrderNo().split("---")[0]; |
| | | Integer itm = Integer.getInteger(orderDetl.getOrderNo().split("---")[1]); |
| | | Date now = new Date(); |
| | | List<LkDetTb> lkDetTbs = erpSqlServer.select(sqlSelectLkDetTb + |
| | | " and bill_no='" + orderDetl.getOrderNo() + "'" + |
| | | " and bill_no='" + orderNo + "'" + |
| | | " and prd_no='" + orderDetl.getMatnr() + "'" + |
| | | " and ITM='" + itm + "'" + |
| | | " and prd_mark='" + orderDetl.getBatch() + "'" |
| | | , LkDetTb.class); |
| | | List<LkDetTbBak> lkDetTbBaks = erpSqlServer.select(sqlSelectLkDetTbBak + |
| | | " and bill_no='" + orderDetl.getOrderNo() + "'" + |
| | | " and bill_no='" + orderNo + "'" + |
| | | " and prd_no='" + orderDetl.getMatnr() + "'" + |
| | | " and ITM='" + itm + "'" + |
| | | " and prd_mark='" + orderDetl.getBatch() + "'" |
| | | , LkDetTbBak.class); |
| | | if (lkDetTbs.size() == 1) { |
| | |
| | | } else { |
| | | String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(now); |
| | | HashMap<String, Object> condition = new HashMap<>(); |
| | | condition.put("bill_no", "'" + orderDetl.getOrderNo() + "'"); |
| | | condition.put("bill_no", "'" + orderNo + "'"); |
| | | condition.put("prd_no", "'" + orderDetl.getMatnr() + "'"); |
| | | condition.put("itm", "'" + itm + "'"); |
| | | |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | if (!Cools.isEmpty(docType)) { |