|
|
|
@ -155,25 +155,6 @@ public class EquipmentLedgerController extends DafController { |
|
|
|
|
public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
|
return this.approve(2,ids); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 导出 |
|
|
|
|
*/ |
|
|
|
|
@SneakyThrows |
|
|
|
|
@GetMapping("export") |
|
|
|
|
@ApiOperationSupport(order = 13) |
|
|
|
|
@ApiOperation(value = "导出", notes = "传入") |
|
|
|
|
@ApiLog |
|
|
|
|
public void exportUser(@ApiIgnore @RequestParam Map<String, Object> entity, HttpServletResponse response) { |
|
|
|
|
QueryWrapper<EquipmentLedger> queryWrapper = Condition.getQueryWrapper(entity, EquipmentLedger.class); |
|
|
|
|
queryWrapper.lambda().eq(EquipmentLedger::getIsDeleted, DafConstant.DB_NOT_DELETED); |
|
|
|
|
List<EquipmentLedgerExcel> list = equipmentLedgerService.export(queryWrapper); |
|
|
|
|
response.setContentType("application/vnd.ms-excel"); |
|
|
|
|
response.setCharacterEncoding(Charsets.UTF_8.name()); |
|
|
|
|
String fileName = URLEncoder.encode("数据导出", Charsets.UTF_8.name()); |
|
|
|
|
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
|
|
|
|
EasyExcel.write(response.getOutputStream(), EquipmentLedgerExcel.class).sheet("数据表").doWrite(list); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 驳回 设备台账编码一览 |
|
|
|
@ -198,4 +179,23 @@ public class EquipmentLedgerController extends DafController { |
|
|
|
|
} |
|
|
|
|
return R.status(equipmentLedgerService.updateBatchById(list)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 导出 |
|
|
|
|
*/ |
|
|
|
|
@SneakyThrows |
|
|
|
|
@GetMapping("export") |
|
|
|
|
@ApiOperationSupport(order = 10) |
|
|
|
|
@ApiOperation(value = "导出", notes = "传入") |
|
|
|
|
@ApiLog |
|
|
|
|
public void exportUser(@ApiIgnore @RequestParam Map<String, Object> entity, HttpServletResponse response) { |
|
|
|
|
QueryWrapper<EquipmentLedger> queryWrapper = Condition.getQueryWrapper(entity, EquipmentLedger.class); |
|
|
|
|
queryWrapper.lambda().eq(EquipmentLedger::getIsDeleted, DafConstant.DB_NOT_DELETED); |
|
|
|
|
List<EquipmentLedgerExcel> list = equipmentLedgerService.export(queryWrapper); |
|
|
|
|
response.setContentType("application/vnd.ms-excel"); |
|
|
|
|
response.setCharacterEncoding(Charsets.UTF_8.name()); |
|
|
|
|
String fileName = URLEncoder.encode("静态台账数据导出", Charsets.UTF_8.name()); |
|
|
|
|
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
|
|
|
|
EasyExcel.write(response.getOutputStream(), EquipmentLedgerExcel.class).sheet("静态台账").doWrite(list); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|