Question: ublic EditCompleteResultDto editComplete ( String model, String version, String process, Long rev, UUID allocId, String revDescription, List jobEditRequest, String userName, String employeeId, String completeFlag )

ublic EditCompleteResultDto editComplete(String model, String version, String process, Long rev, UUID allocId, String revDescription, List jobEditRequest, String userName, String employeeId, String completeFlag){ List validationList = new ArrayList(); Set completedPositions = new HashSet<>(); saveJob(model, version, process, rev, allocId, revDescription, jobEditRequest, userName, employeeId, completeFlag); Optional allocRevision = allocPlanRevisionRepository .findById(AllocPlanRevisionKey.builder().allocId(allocId).revNumber(rev).build()); if(allocRevision.isPresent()){ AllocPlan allocPlan = allocRevision.get().getAllocPlan(); List distinctAlocPlans = allocPositionRepository .findAllDistinctByAllocPlanAndRevNumberOrderByPositionAsc(allocPlan, allocRevision.get()); for (AllocPosition ap : distinctAlocPlans){ log.info("Edit Complete started for Position: {}",ap.getPosition()); if (ap.getPosition()==999L){ log.info("Edit Complete skipped for Position: {}", ap.getPosition()); continue; } List positionValidationList = new ArrayList(); List jobInfoList = customJobInfoRepo.searchJobWithAllocIdAndRevAndPosition(rev, ap.getPosition(), allocId); for (JobInfo jobInfo : jobInfoList){ Job job = jobInfo.getJob(); log.info("Started Processing Job num: {}", job.getJobNumber()); String jobNumber = jobInfo.getJob().getJobNumber(); if (CommonConstants.MIO.equals(job.getJobType())|| CommonConstants.OA.equals(job.getJobType()) && null == jobInfo.getRepJob()){ RepJobKey repJobKey = new RepJobKey(); repJobKey.setAllocId(jobInfo.getAllocPlan().getAllocId()); repJobKey.setRepresentativeJobNumber(jobNumber); repJobKey.setRevNumber(jobInfo.getRevNumber().getRevNumber()); Optional repJobOptional = repJobRepository.findById(repJobKey); if(!repJobOptional.isPresent()){ repJobOptional = Optional.of(RepJob.builder().allocPlan(allocPlan).repJobKey(repJobKey).representativeJob(job).representativeJobBlock(jobInfo.getJobBlock()).representativeJobCategory(jobInfo.getJobCategory()).revNumber(allocRevision.get()).build()); repJobRepository.save(repJobOptional.get()); } RepJob repJob = repJobOptional.get(); log.info("RepJob created with repJobNumber: {}", repJob.getRepJobKey().getRepresentativeJobNumber()); repJob.setRepresentativeJobClass("AN"); jobInfo.setRepJob(repJob); } if (jobInfo.getKitSupply()== null){ jobInfo.setKitSupply(CommonConstants.FALSE); } if (jobInfo.getNeighborCheck()== null){ jobInfo.setNeighborCheck(CommonConstants.FALSE); } if (jobInfo.getPairJob()== null){ jobInfo.setPairJob(CommonConstants.FALSE); } jobInfoRepository.save(jobInfo); RepJob repJob = jobInfo.getRepJob(); String postionName = jobInfo.getPosition().getPositionName(); Long subOrderNumber = jobInfo.getAllocSubOrder(); String errorMessage = CommonConstants.EDIT_COMPLETE_ERROR_MESSAGE; boolean doRepJobExist = null != repJob; if (!doRepJobExist || null == repJob.getRepresentativeJob()|| repJob.getRepresentativeJob().getJobNumber()== null){ positionValidationList.add(new EditCompleteValidationDto(postionName, subOrderNumber, CommonConstants.REPRESENTATIVE_OPERATION_NUMBER, errorMessage, jobNumber)); } if (jobInfo.getJobBlock()== null){ positionValidationList.add(new EditCompleteValidationDto(postionName, subOrderNumber, CommonConstants.JOB_BLOCK_NUMBER, errorMessage, jobNumber)); } if (!doRepJobExist || repJob.getRepresentativeJobBlock()== null){ positionValidationList.add(new EditCompleteValidationDto(postionName, subOrderNumber, CommonConstants.REPRESENTATIVE_JOB_BLOCK, errorMessage, jobNumber)); } if (jobInfo.getJobCategory()== null){ positionValidationList.add(new EditCompleteValidationDto(postionName, subOrderNumber, CommonConstants.JOBCATEGORY, errorMessage, jobNumber)); } if (!doRepJobExist || repJob.getRepresentativeJobCategory()== null){ positionValidationList.add(new EditCompleteValidationDto(postionName, subOrderNumber, CommonConstants.REPRESENTATIVE_JOBCATEGORY, errorMessage, jobNumber)); } if (!doRepJobExist || repJob.getRepresentativeJobClass()== null){ positionValidationList.add(new EditCompleteValidationDto(postionName, subOrderNumber, CommonConstants.REPRESENTATIVE_JOBCLASS, errorMessage, jobNumber)); } completedPositions.add(ap.getPositionName()); validationList.add i want to convert this implementation as webflex

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!