| | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.flowable.engine.HistoryService; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | |
| | | @Tag(name = "现场编制导出", description = "现场编制导出") |
| | | public class ProgramOnMachineExportController { |
| | | |
| | | private FlowCommonService flowCommonService; |
| | | private ProgramOnMachineExportService programOnMachineService; |
| | | private final TaskDispatchService taskDispatchService; |
| | | private final HistoryService historyService; |
| | | |
| | | @GetMapping("/finished-page") |
| | | @ApiOperationSupport(order = 3) |
| | | @Operation(summary = "已审批列表", description = "已审批列表") |
| | | @Operation(summary = "现场编制待导出列表", description = "现场编制待导出列表") |
| | | public R<IPage<FlowVO>> finishedPage(ProgramOnMachineQueryVO queryVO) { |
| | | IPage<FlowVO> pages = programOnMachineService.finishedPage(Condition.getPage(queryVO), queryVO); |
| | | return R.data(pages); |
| | |
| | | excel.setMachineCode(Func.toStr(vars.get(FlowVariableConstant.MACHINE_CODE))); |
| | | excel.setProcessInstanceId(record.getProcessInstanceId()); |
| | | excel.setDeviation(Func.toStr(record.getVariables().get(FlowVariableConstant.DEVIATION))); |
| | | if(StringUtils.isNotBlank(excel.getDeviation())) { |
| | | excel.setDeviationSerial(taskDispatchService.getDeviationSerial(Func.toStr(vars.get(FlowVariableConstant.PROGRAM_NO))) + "");//更改单序号 |
| | | } |
| | | list.add(excel); |
| | | }); |
| | | ExcelUtil.export(response, "现场编制记录" + DateUtil.time(), "现场编制记录", list, ProgramOnMachineExcel.class); |