|
|
|
@ -94,6 +94,9 @@ public class MesYfReportServiceImpl implements IMesYfReportService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private IMesConfigService mesConfigService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private MesProductionRecordRepository mesProductionRecordRepository;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ListPager<MesDeviceDataQueryReportResultModel> queryMesDeviceDataByPager(MesDeviceDataQueryReportConditionModel queryReportModel, Pager pager) {
|
|
|
|
|
ListPager<MesDeviceDataQueryReportResultModel> mesDeviceDataQueryReportResultModelListPager =
|
|
|
|
@ -224,6 +227,56 @@ public class MesYfReportServiceImpl implements IMesYfReportService {
|
|
|
|
|
return mesTraceabilityReportModelList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ListPager<MesProduceSn> queryMesProduceSn(MesProduceSn mesProduceSn, Pager pager) {
|
|
|
|
|
DdlPackBean packBean = getMesProduceSnPackBean(mesProduceSn);
|
|
|
|
|
|
|
|
|
|
pager = PagerHelper.getPager(pager, mesProduceSnRDao.findByHqlWhereCount(packBean));
|
|
|
|
|
List<MesProduceSn> list = mesProduceSnRDao.findByHqlWherePage(packBean, pager);
|
|
|
|
|
return new ListPager<>(list, pager);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ListPager<MesProductionRecord> queryMesProductionRecord(MesProductionRecord mesProductionRecord, Pager pager) {
|
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(mesProductionRecord.getOrganizeCode());
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProductionRecord.getProductSn(), "productSn", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProductionRecord.getWorkOrderNo(), "workOrderNo", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProductionRecord.getWorkCenterCode(), "workCenterCode", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProductionRecord.getWorkCellCode(), "workCellCode", packBean);
|
|
|
|
|
DdlPreparedPack.getStringBiggerPack(mesProductionRecord.getCompleteDateTimeStart(), "completeDateTime", packBean);
|
|
|
|
|
DdlPreparedPack.getStringSmallerPack(mesProductionRecord.getCompleteDateTimeEnd(), "completeDateTime", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProductionRecord.getEquipmentCode(), "equipmentCode", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProductionRecord.getEquipmentCode(), "equipmentCode", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProductionRecord.getMouldNo(), "mouldNo", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProductionRecord.getShiftGroup(), "shiftGroup", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProductionRecord.getShiftCode(), "shiftCode", packBean);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(mesProductionRecord.getReportStatus(), "reportStatus", packBean);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(mesProductionRecord.getReportType(), "reportType", packBean);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(mesProductionRecord.getIsComplete(), "isComplete", packBean);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(mesProductionRecord.getIsTest(), "isTest", packBean);
|
|
|
|
|
pager = PagerHelper.getPager(pager, mesProductionRecordRepository.findByHqlWhereCount(packBean));
|
|
|
|
|
List<MesProductionRecord> list = mesProductionRecordRepository.findByHqlWherePage(packBean, pager);
|
|
|
|
|
return new ListPager<>(list, pager);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private DdlPackBean getMesProduceSnPackBean(MesProduceSn mesProduceSn) {
|
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(mesProduceSn.getOrganizeCode());
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProduceSn.getProductSn(), "productSn", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProduceSn.getWorkOrderNo(), "workOrderNo", packBean);
|
|
|
|
|
DdlPreparedPack.getStringBiggerPack(mesProduceSn.getCreateDateTimeStart(), "createDatetime", packBean);
|
|
|
|
|
DdlPreparedPack.getStringSmallerPack(mesProduceSn.getCreateDateTimeEnd(), "createDatetime", packBean);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(mesProduceSn.getSnStatus(), "snStatus", packBean);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(mesProduceSn.getQcStatus(), "qcStatus", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProduceSn.getPartNo(), "partNo", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProduceSn.getPartName(), "partName", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProduceSn.getWorkCenterCode(), "workCenterCode", packBean);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(mesProduceSn.getPrintCount(), "printCount", packBean);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(mesProduceSn.getPrintStatus(), "printStatus", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProduceSn.getWorkCellCode(), "workCellCode", packBean);
|
|
|
|
|
DdlPreparedPack.getStringLikerPack(mesProduceSn.getCreateUser(), "createUser", packBean);
|
|
|
|
|
return packBean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Map<String, List<MesEquipmentLogDetail>> getMesEquipmentLogDetailMap(String organizeCode, List<MesProductionRecord> productionRecordList) {
|
|
|
|
|
List<String> organizeCodeEquipList = getEquipList(organizeCode, productionRecordList);
|
|
|
|
|
//工艺加工参数
|
|
|
|
|