| | |
| | | import org.springblade.mdm.basesetting.producedivision.entity.MdmDept; |
| | | import org.springblade.mdm.basesetting.producedivision.service.MdmDeptService; |
| | | import org.springblade.mdm.commons.service.UserCommonService; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | | import org.springblade.mdm.flow.constants.FlowConstant; |
| | | import org.springblade.mdm.flow.constants.FlowVariableConstant; |
| | | import org.springblade.mdm.flow.service.FlowCommonService; |
| | | import org.springblade.mdm.flow.service.FlowProgramProperties; |
| | | import org.springblade.mdm.statreport.vo.CuredProgramQueryVO; |
| | |
| | | |
| | | public IPage<CuredProgramVO> pageQuery(CuredProgramQueryVO queryVO) { |
| | | //固化里路村官 |
| | | HistoricProcessInstanceQuery query = this.historyService.createHistoricProcessInstanceQuery().finished().processDefinitionKey(FlowContants.CURE_PROCESS_KEY).includeProcessVariables(); |
| | | HistoricProcessInstanceQuery query = this.historyService.createHistoricProcessInstanceQuery().finished().processDefinitionKey(FlowConstant.CURE_PROCESS_KEY).includeProcessVariables(); |
| | | //.finished() // 只查询已完成的流程.unfinished() // 查询未完成的流程 |
| | | query.variableNotExists(FlowContants.EXCEPTION);//非异常流程 |
| | | query.variableNotExists(FlowVariableConstant.EXCEPTION);//非异常流程 |
| | | if(queryVO.getEndMonth()!=null){ |
| | | queryVO.setEndTimeBegin(queryVO.getEndMonth().withDayOfMonth(1)); |
| | | queryVO.setEndTimeEnd(queryVO.getEndMonth().with(TemporalAdjusters.lastDayOfMonth())); |
| | |
| | | if(!machines.isEmpty()) { |
| | | query.or(); |
| | | for(Machine machine : machines){ |
| | | query.variableValueEquals(FlowContants.MACHINE_CODE, machine.getCode()); |
| | | query.variableValueEquals(FlowVariableConstant.MACHINE_CODE, machine.getCode()); |
| | | } |
| | | |
| | | query.endOr(); |
| | | }else{ |
| | | //没找到机床,就应该查不到数据 |
| | | query.variableNotExists(FlowContants.MACHINE_CODE); |
| | | query.variableNotExists(FlowVariableConstant.MACHINE_CODE); |
| | | } |
| | | } |
| | | query.orderByProcessInstanceEndTime().desc(); // 按结束时间降序排列 |