| | |
| | | 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)) { |
| | |
| | | |
| | | public void callApiLogSaveLkDetTb(LkDetTb lkDetTb, String tableName, String response, Boolean bool) { |
| | | apiLogService.save("上报完结订单明细信息", tableName, "null", ip, |
| | | "订单号:" + lkDetTb.getBillNo() + "、品号:" + lkDetTb.getPrdNo() + "、货品特征:" + lkDetTb.getPrdMark() + "、状态:" + lkDetTb.getStatus(), |
| | | "订单号:" + lkDetTb.getBillNo() + "、品号:" + lkDetTb.getPrdNo() + "、货品特征:" + lkDetTb.getPrdMark() + "、状态:" + lkDetTb.getStatus$(), |
| | | response, bool); |
| | | } |
| | | |
| | | public void callApiLogSaveLkDetTbBak(LkDetTbBak lkDetTbBak, String tableName, String response, Boolean bool) { |
| | | apiLogService.save("上报完结订单明细信息", tableName, "null", ip, |
| | | "订单号:" + lkDetTbBak.getBillNo() + "、品号:" + lkDetTbBak.getPrdNo() + "、货品特征:" + lkDetTbBak.getPrdMark() + "、状态:" + lkDetTbBak.getStatus(), |
| | | "订单号:" + lkDetTbBak.getBillNo() + "、品号:" + lkDetTbBak.getPrdNo() + "、货品特征:" + lkDetTbBak.getPrdMark() + "、状态:" + lkDetTbBak.getStatus$(), |
| | | response, bool); |
| | | } |
| | | |