| | |
| | | import com.qianwen.smartman.modules.mdc.dto.StatusDTO; |
| | | import com.qianwen.smartman.modules.mdc.entity.WorkstationCollectData; |
| | | import com.qianwen.smartman.modules.mdc.enums.ProcessParamEnum; |
| | | import com.qianwen.smartman.modules.mdc.mapper.SuperCollectJsonMapper; |
| | | //import com.qianwen.smartman.modules.mdc.mapper.SuperCollectJsonMapper; |
| | | import com.qianwen.smartman.modules.mdc.mapper.SuperProcessParameterMapper; |
| | | import com.qianwen.smartman.modules.mdc.service.IProcessParameterService; |
| | | import com.qianwen.smartman.modules.mdc.service.ProcessParameterHelperService; |
| | |
| | | @Service |
| | | public class ProcessParameterServiceImpl implements IProcessParameterService { |
| | | private static final Logger log = LoggerFactory.getLogger(ProcessParameterServiceImpl.class); |
| | | @Autowired |
| | | private SuperCollectJsonMapper collectJsonMapper; |
| | | //@Autowired |
| | | //private SuperCollectJsonMapper collectJsonMapper; |
| | | @Autowired |
| | | private IWorkstationService workstationService; |
| | | @Autowired |
| | |
| | | return list.stream().filter(dp -> dp.getIsProcessParam()!=null && dp.getIsProcessParam()).collect(Collectors.toList()); |
| | | |
| | | } |
| | | |
| | | /* |
| | | @Override |
| | | public ProParamSheetVO queryProcessParameterSheet(ProcessParameterSearchVO vo, Boolean isFilterProcessParameter) { |
| | | ProcessParamEnum methodEnum = vo.getMethodEnum(); |
| | |
| | | default: |
| | | return new ProParamSheetVO(); |
| | | } |
| | | } |
| | | |
| | | }*/ |
| | | /* |
| | | @Override |
| | | public BladeFile exportProcessParam(ProcessParamExcelVO vo) { |
| | | try { |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | */ |
| | | @Override |
| | | public ShiftTimeVO getShiftTime(ProcessParameterSearchVO vo) { |
| | | String workstationId = vo.getWorkstationId(); |
| | |
| | | return entityVO(parameterList, wcs, collectItemMap); |
| | | }).orElse(new ProcessParameterResVO()); |
| | | } |
| | | |
| | | /* |
| | | private ProParamSheetVO buildProcessHourSheet(ProcessParameterSearchVO vo, Boolean isFilterProcessParameter) { |
| | | Date startTime = vo.getStartTime(); |
| | | Date endTime = vo.getEndTime(); |
| | |
| | | return new ProParamSheetVO(); |
| | | } |
| | | return buildSheetVO(vos, dtoList, wcs, getWcsMap()); |
| | | } |
| | | |
| | | }*/ |
| | | /* |
| | | private ProParamSheetVO buildProcessShiftSheet(ProcessParameterSearchVO vo, Boolean isFilterProcessParameter) { |
| | | Integer shift = vo.getShift(); |
| | | LocalDate queryTime = vo.getQueryTime(); |
| | |
| | | return new ProParamSheetVO(); |
| | | } |
| | | return buildSheetVO(vos, dtoList, wcs, getWcsMap()); |
| | | } |
| | | |
| | | }*/ |
| | | /* |
| | | private BladeFile exportByHour(ProcessParamExcelVO vo) throws Exception { |
| | | Date startTime = vo.getStartTime(); |
| | | Date endTime = vo.getEndTime(); |
| | |
| | | MultipartFile multipartFile = ExcelStrategyUtil.customerStyleExport(fileName, ExcelConstant.SHEET, head, content); |
| | | return this.ossBuilder.tempTemplate().putFile(multipartFile.getOriginalFilename(), multipartFile); |
| | | } |
| | | |
| | | */ |
| | | /* |
| | | private List<List<Object>> buildExcelContentByHour(Long workstationId, List<WorkstationWcsDmpDTO> collectItem, Date startTime, Date endTime) { |
| | | Workstation workstation = (Workstation) this.workstationService.getById(workstationId); |
| | | Map<Long, GroupWorkDTO> groupWorkMap = this.workstationService.queryGroupWorkStation(Lists.newArrayList(new Long[]{workstation.getId()})); |
| | |
| | | return Lists.newArrayList(); |
| | | } |
| | | return buildExcelContentByHour(collectItem, parameterList, wcs, workstation, groupName, timeShiftAll); |
| | | } |
| | | }*/ |
| | | |
| | | private List<List<Object>> buildExcelContentByHour(List<WorkstationWcsDmpDTO> collectItem, List<NewParamDTO> parameterList, WorkstationWcsDmpDTO wcs, Workstation workstation, String groupName, List<CalendarShiftDTO> timeShiftAll) { |
| | | List<Tuple> times = timeShiftAll.stream().map(calendarShiftDTO -> { |
| | |
| | | } |
| | | return head; |
| | | } |
| | | |
| | | /* |
| | | private List<NewParamDTO> processParameterList(Date startTime, Date endTime, String workstationId) { |
| | | return this.collectJsonMapper.queryProcessParameter(workstationId, Long.valueOf(startTime.getTime()), Long.valueOf(endTime.getTime())); |
| | | } |
| | | |
| | | */ |
| | | private List<ProcessParameterVO> oldProcessParameterList(Date startTime, Date endTime, List<String> collectItems, String workstationId) { |
| | | return this.parameterMapper.queryProcessParameter(workstationId, collectItems, Long.valueOf(startTime.getTime()), Long.valueOf(endTime.getTime())); |
| | | } |