| | |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.DateImageUtil; |
| | | import com.ruoyi.common.utils.IfsApiUtils; |
| | | import com.ruoyi.common.utils.api.IfsApiUtils; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.IfsStockQueryDTO; |
| | |
| | | |
| | | public Result getIfsStockReport(IfsStockQueryDTO ifsStockQueryDTO) { |
| | | JSONObject jresult = new JSONObject(); |
| | | jresult.put("total", 0); |
| | | jresult.put("count", 0); |
| | | jresult.put("data", new JSONArray()); |
| | | JSONObject jsonObject = new JSONObject(); |
| | |
| | | } |
| | | //获取总数量 |
| | | int count = data.getIntValue("TOTAL_RECORD"); |
| | | //获取页数 |
| | | int total = (int) Math.ceil((double) count / (double) ifsStockQueryDTO.getLimit()); |
| | | jresult.put("total", total); |
| | | jresult.put("count", count); |
| | | jresult.put("data", array); |
| | | } |
| | |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导出失败"); |
| | |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | inputStream.close(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |