| | |
| | | jsonObject.put("FormId", inFormIdParam.getFormId()); |
| | | jsonObject.put("Limit", inFormIdParam.getLimit()); |
| | | jsonObject.put("StartRow", inFormIdParam.getStartRow()); |
| | | // 获取当前日期 |
| | | LocalDate currentDate = LocalDate.now(); |
| | | // 获取前一个月的同一天 |
| | | LocalDate previousMonthDate = currentDate.minusMonths(1); |
| | | |
| | | // 格式化日期为 "yyyyMMdd" 格式 |
| | | DateTimeFormatter formatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | String formattedDate2 = previousMonthDate.format(formatter1); |
| | | //物料档案查询 |
| | | if (i == 0) { |
| | | // 获取当前日期 |
| | | LocalDate currentDate = LocalDate.now(); |
| | | // 获取前一个月的同一天 |
| | | LocalDate previousMonthDate = currentDate.minusMonths(1); |
| | | |
| | | // 格式化日期为 "yyyyMMdd" 格式 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | String formattedDate2 = previousMonthDate.format(formatter); |
| | | |
| | | |
| | | //物料状态 FUseOrgId .FNumber |
| | | FDocumentStatus = "C"; |
| | | jsonObject.put("FilterString", "FCreateDate>'" + formattedDate2 + "' and FDocumentStatus='" + FDocumentStatus + "' and FUseOrgId .FNumber='201'"); |
| | |
| | | DocType docType = docTypeService.selectById(docName); |
| | | //单据状态 |
| | | FDocumentStatus = "B"; |
| | | jsonObject.put("FilterString", "FCreateDate>'" + sdf.format(docType.getCreateTime()) + "' and FStockId.Fname='立库'" + " and FDocumentStatus='" + FDocumentStatus + "'"); |
| | | jsonObject.put("FilterString", "FCreateDate>'" + formattedDate2 + "' and FStockId.Fname='立库'" + " and FDocumentStatus='" + FDocumentStatus + "'"); |
| | | jsonObject.put("FieldKeys", "FBillNo,FCreateDate,FMaterialId.FNumber,FMaterialId.FName,FMaterialId.FSpecification," + anfme + ",FDocumentStatus"); |
| | | // FBillNo :单据编号; |
| | | // FCreateDate :单据创建时间; |