yangys
2024-11-15 d66fe6d46cdbaeb88e68ad96da6deb0b35cd131b
smart-man-boot/src/main/java/com/qianwen/smartman/modules/mdc/service/impl/ProcessParameterServiceImpl.java
@@ -68,7 +68,7 @@
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;
@@ -91,8 +91,8 @@
@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
@@ -221,7 +221,7 @@
        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();
@@ -233,8 +233,8 @@
            default:
                return new ProParamSheetVO();
        }
    }
    }*/
    /*
    @Override
    public BladeFile exportProcessParam(ProcessParamExcelVO vo) {
        try {
@@ -244,7 +244,7 @@
         throw new RuntimeException(e);
      }
    }
   */
    @Override
    public ShiftTimeVO getShiftTime(ProcessParameterSearchVO vo) {
        String workstationId = vo.getWorkstationId();
@@ -456,7 +456,7 @@
            return entityVO(parameterList, wcs, collectItemMap);
        }).orElse(new ProcessParameterResVO());
    }
    /*
    private ProParamSheetVO buildProcessHourSheet(ProcessParameterSearchVO vo, Boolean isFilterProcessParameter) {
        Date startTime = vo.getStartTime();
        Date endTime = vo.getEndTime();
@@ -483,8 +483,8 @@
            return new ProParamSheetVO();
        }
        return buildSheetVO(vos, dtoList, wcs, getWcsMap());
    }
    }*/
    /*
    private ProParamSheetVO buildProcessShiftSheet(ProcessParameterSearchVO vo, Boolean isFilterProcessParameter) {
        Integer shift = vo.getShift();
        LocalDate queryTime = vo.getQueryTime();
@@ -510,8 +510,8 @@
            return new ProParamSheetVO();
        }
        return buildSheetVO(vos, dtoList, wcs, getWcsMap());
    }
    }*/
    /*
    private BladeFile exportByHour(ProcessParamExcelVO vo) throws Exception {
        Date startTime = vo.getStartTime();
        Date endTime = vo.getEndTime();
@@ -524,7 +524,8 @@
        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()}));
@@ -539,7 +540,7 @@
            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 -> {
@@ -583,11 +584,11 @@
        }
        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()));
    }