|
|
@ -27,7 +27,7 @@ import com.hnac.hzinfo.log.contants.BusinessType; |
|
|
|
import com.hnac.hzinfo.log.contants.Risk; |
|
|
|
import com.hnac.hzinfo.log.contants.Risk; |
|
|
|
import io.swagger.annotations.*; |
|
|
|
import io.swagger.annotations.*; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
|
|
|
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.mp.support.BladePage; |
|
|
|
import org.springblade.core.mp.support.BladePage; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
@ -114,7 +114,7 @@ public class WorkTicketInfoController { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 分页 |
|
|
|
* 分页 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/queryList") |
|
|
|
@PostMapping("/queryList") |
|
|
|
@ApiOperationSupport(order = 50) |
|
|
|
@ApiOperationSupport(order = 50) |
|
|
|
@ApiOperation(value = "分页") |
|
|
|
@ApiOperation(value = "分页") |
|
|
@ -131,7 +131,7 @@ public class WorkTicketInfoController { |
|
|
|
public void exportWorkTicketInfoPdf(@RequestParam Long id, HttpServletResponse response) { |
|
|
|
public void exportWorkTicketInfoPdf(@RequestParam Long id, HttpServletResponse response) { |
|
|
|
workTicketInfoService.exportWorkTicketInfoPdf(id, response); |
|
|
|
workTicketInfoService.exportWorkTicketInfoPdf(id, response); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/exportWorkTicket") |
|
|
|
@PostMapping("/exportWorkTicket") |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperation(value = "工作票导出") |
|
|
|
@ApiOperation(value = "工作票导出") |
|
|
@ -155,13 +155,11 @@ public class WorkTicketInfoController { |
|
|
|
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
|
|
|
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
|
|
|
List<WorkTicketExportVO> list = workTicketInfoService.exportWorkTicket(req); |
|
|
|
List<WorkTicketExportVO> list = workTicketInfoService.exportWorkTicket(req); |
|
|
|
if(list!=null && list.size()>0){ |
|
|
|
if(list!=null && list.size()>0){ |
|
|
|
System.out.println("---------------- size = " + list.size()); |
|
|
|
|
|
|
|
// 这里需要设置不关闭流
|
|
|
|
// 这里需要设置不关闭流
|
|
|
|
EasyExcel.write(response.getOutputStream(), WorkTicketExportVO.class).autoCloseStream(Boolean.FALSE).sheet("工作票统计报表") |
|
|
|
EasyExcel.write(response.getOutputStream(), WorkTicketExportVO.class).autoCloseStream(Boolean.FALSE).sheet("工作票统计报表") |
|
|
|
.doWrite(list); |
|
|
|
.doWrite(list); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
System.out.println("exportExcel = " + e); |
|
|
|
|
|
|
|
// 重置response
|
|
|
|
// 重置response
|
|
|
|
response.reset(); |
|
|
|
response.reset(); |
|
|
|
response.setContentType("application/json"); |
|
|
|
response.setContentType("application/json"); |
|
|
@ -214,7 +212,7 @@ public class WorkTicketInfoController { |
|
|
|
return workTicketInfoService.licenseOfflineTicket(req); |
|
|
|
return workTicketInfoService.licenseOfflineTicket(req); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/userListByRoleAlias") |
|
|
|
@GetMapping("/userListByRoleAlias") |
|
|
|
@ApiOperationSupport(order = 100) |
|
|
|
@ApiOperationSupport(order = 100) |
|
|
|
@ApiOperation(value = "获取某机构下角色的人员列表") |
|
|
|
@ApiOperation(value = "获取某机构下角色的人员列表") |
|
|
@ -258,7 +256,7 @@ public class WorkTicketInfoController { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获取工作票台账、 |
|
|
|
* 获取工作票台账、 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getWorkTicketBill") |
|
|
|
@GetMapping("/getWorkTicketBill") |
|
|
|
@ApiOperation(value = "获取工作票台账") |
|
|
|
@ApiOperation(value = "获取工作票台账") |
|
|
|
public R<List<WorkTicketBillVO>> getWorkTicketBill(String emCode, String startTime, String endTime) { |
|
|
|
public R<List<WorkTicketBillVO>> getWorkTicketBill(String emCode, String startTime, String endTime) { |
|
|
@ -272,7 +270,7 @@ public class WorkTicketInfoController { |
|
|
|
return R.data(workTicketInfoService.work(Condition.getPage(query),work)); |
|
|
|
return R.data(workTicketInfoService.work(Condition.getPage(query),work)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/cancel") |
|
|
|
@PostMapping("/cancel") |
|
|
|
@ApiOperationSupport(order = 50) |
|
|
|
@ApiOperationSupport(order = 50) |
|
|
|
@ApiOperation(value = "线下工作票作废") |
|
|
|
@ApiOperation(value = "线下工作票作废") |
|
|
|