| | |
| | | NcNode curedProgramPackage = null; |
| | | if(!startVO.isTemporaryFlow() && !startVO.isDeviationFlow()) { |
| | | //正常流程(非临时流程) 且不是 偏离单,才匹配固化程序 |
| | | curedProgramPackage = ncNodeService.getCuredProgramPackage(programPkgName,startVO.getProcessEdition(), startVO.getMachineCode()); |
| | | curedProgramPackage = ncNodeService.getLastCuredProgramPackageWithoutProcessEdition(programPkgName,startVO.getMachineCode()); |
| | | //设置是否有固化程序标记 |
| | | vars.put(FlowContants.HAS_CURED_PROGRAM, curedProgramPackage != null ? FlowContants.Y : FlowContants.N); |
| | | //工序版次是否一致,是否在有效期内 |
| | | if (curedProgramPackage != null && Func.isBlank(startVO.getDeviation())) {//偏离单优先,如果有偏离单,那么找到固化程序的也不算固化了 |
| | | if (curedProgramPackage != null) { |
| | | vars.put(FlowContants.CURED_NODE_ID, curedProgramPackage.getId()); |
| | | vars.put(FlowContants.CURED_LOCKED, curedProgramPackage.hasLocked()?FlowContants.Y:FlowContants.N); |
| | | vars.put(FlowContants.IS_PROCESS_EDITION_SAME, StringUtils.equals(curedProgramPackage.getProcessEdition(), startVO.getProcessEdition()) ? "Y" : "N"); |
| | | vars.put(FlowContants.IS_PROCESS_EDITION_SAME, StringUtils.equals(curedProgramPackage.getProcessEdition(), startVO.getProcessEdition()) ? FlowContants.Y : FlowContants.N); |
| | | vars.put("curedProcessEdition", curedProgramPackage.getProcessEdition()); |
| | | vars.put(FlowContants.VALIDITY_PERIOD, curedProgramPackage.withinValidityPeriod() ? FlowContants.Y : FlowContants.N); |
| | | } else { |
| | | vars.put(FlowContants.IS_PROCESS_EDITION_SAME, FlowContants.Y); |
| | |
| | | } |
| | | |
| | | }else{ |
| | | //临时流程/骗你但,不匹配固化程序 |
| | | //临时流程/偏离单,不匹配固化程序 |
| | | vars.put(FlowContants.HAS_CURED_PROGRAM,FlowContants.N); |
| | | } |
| | | String myProcessName = "试切下发流程"; |
| | |
| | | curedProgramPackage.setProcessInstanceId(inst.getProcessInstanceId()); |
| | | ncNodeService.updateById(curedProgramPackage); |
| | | } |
| | | |
| | | |
| | | return inst.getProcessInstanceId(); |
| | | } |