| | |
| | | Report entity = ReportForm.getEntityByForm(form, null); |
| | | entity.setSerialNumber(point.getSerialNumber()); |
| | | entity.setStatus(0); |
| | | entity.setIdentify(IdUtils.randomNO()); |
| | | Date now = new Date(); |
| | | entity.setCreateTime(now); |
| | | entity.setUpdateTime(now); |
| | | entity.setIdentify(IdUtils.randomNO(now)); |
| | | baseMapper.insert(entity); |
| | | List<ReportErrorType> errorTypeList = form.getErrorTypeList().stream().map(item -> { |
| | | ReportErrorType reportErrorType = new ReportErrorType(); |
| | |
| | | // 读取excel数据 |
| | | ExcelUtil<ReportImportDTO> excelUtil = new ExcelUtil<>(ReportImportDTO.class); |
| | | List<ReportImportDTO> list = excelUtil.importExcel(form.getImportPointId().getInputStream()); |
| | | Date now = DateUtils.getNowDate(); |
| | | // 批量插入 |
| | | String pid = IdUtils.randomNO(); |
| | | String pid = IdUtils.randomNO(now); |
| | | Integer success = 0; |
| | | for (ReportImportDTO item : list) { |
| | | if ("事前报备".equals(form.getReportType())) { |
| | |
| | | entity.setImportBatchNumber(pid); |
| | | entity.setSerialNumber(item.getSerialNumber()); |
| | | entity.setStatus(0); |
| | | entity.setIdentify(IdUtils.randomNO()); |
| | | Date now = DateUtils.getNowDate(); |
| | | entity.setIdentify(IdUtils.randomNO(now)); |
| | | entity.setCreateTime(now); |
| | | entity.setUpdateTime(now); |
| | | baseMapper.insert(entity); |
| | |
| | | @Override |
| | | public Result page(ReportQuery query) { |
| | | IPage<ReportVO> page = PageUtil.getPage(query, ReportVO.class); |
| | | query.setUnitId(SecurityUtils.getUnitId()); |
| | | baseMapper.page(page, query); |
| | | List<SysDictData> errorTypeList = dictTypeService.selectDictDataByType("report_error_type"); |
| | | Map<String, String> dictMap = errorTypeList.stream().collect(Collectors.toMap(SysDictData::getDictValue, SysDictData::getDictLabel)); |
| | |
| | | public List<ReportVO> export(ReportQuery query) { |
| | | IPage<ReportVO> page = PageUtil.getPage(query, ReportVO.class); |
| | | page.setSize(-1); |
| | | query.setUnitId(SecurityUtils.getUnitId()); |
| | | baseMapper.page(page, query); |
| | | List<SysDictData> errorTypeList = dictTypeService.selectDictDataByType("report_error_type"); |
| | | Map<String, String> dictMap = errorTypeList.stream().collect(Collectors.toMap(SysDictData::getDictValue, SysDictData::getDictLabel)); |