| | |
| | | |
| | | @Override |
| | | public List<MmPredictItemRespVO> getDoubleOutPutsByItemNos(List<String> itemNos) { |
| | | if (CollectionUtils.isEmpty(itemNos)) { |
| | | List<Integer> resultType = new ArrayList<Integer>(){{ |
| | | add(3); |
| | | }}; |
| | | return getOutPutsByItemNosAndResultType(itemNos,resultType); |
| | | } |
| | | |
| | | @Override |
| | | public List<MmPredictItemRespVO> getArrayOutPutsByItemNos(List<String> itemNos) { |
| | | List<Integer> resultType = new ArrayList<Integer>(){{ |
| | | add(1); |
| | | add(2); |
| | | }}; |
| | | return getOutPutsByItemNosAndResultType(itemNos,resultType); |
| | | } |
| | | |
| | | public List<MmPredictItemRespVO> getOutPutsByItemNosAndResultType(List<String> itemNos,List<Integer> resultType) { |
| | | if (CollectionUtils.isEmpty(itemNos) || CollectionUtils.isEmpty(resultType)) { |
| | | return new ArrayList<>(); |
| | | } |
| | | Map<String, Object> params = new HashMap(1); |
| | | params.put("itemNos", itemNos); |
| | | List<MmPredictItemRespVO> list = mmPredictItemDao.getDoubleOutPutsByItemNos(params); |
| | | params.put("resultType", resultType); |
| | | List<MmPredictItemRespVO> list = mmPredictItemDao.getOutPutsByItemNosAndResultType(params); |
| | | return list; |
| | | } |
| | | |
| | |
| | | entity.setPointid(mmPredictItemDto.getPointId()); |
| | | entity.setResultName(mmPredictItemDto.getMmPredictItem().getItemname()); |
| | | entity.setResultstr("result"); |
| | | //累计配置 |
| | | entity.setIscumulant(mmPredictItemDto.getIscumulant()); |
| | | entity.setCumuldivisor(mmPredictItemDto.getCumuldivisor()); |
| | | entity.setCumulpoint(mmPredictItemDto.getCumulpoint()); |
| | | mergeItemOutput.add(entity); |
| | | mmPredictItemDto.setMmItemOutputList(mergeItemOutput); |
| | | } |
| | |
| | | entity.setPointid(mmPredictItemDto.getPointId()); |
| | | entity.setResultName(mmPredictItemDto.getMmPredictItem().getItemname()); |
| | | entity.setResultstr("result"); |
| | | //累计配置 |
| | | entity.setIscumulant(mmPredictItemDto.getIscumulant()); |
| | | entity.setCumuldivisor(mmPredictItemDto.getCumuldivisor()); |
| | | entity.setCumulpoint(mmPredictItemDto.getCumulpoint()); |
| | | mmItemOutputList.add(entity); |
| | | mmPredictItemDto.setMmItemOutputList(mmItemOutputList); |
| | | } else { |
| | | mmPredictItemDto.getMmItemOutputList().forEach(e -> e.setPointid(mmPredictItemDto.getPointId())); |
| | | mmPredictItemDto.getMmItemOutputList().forEach(entity -> { |
| | | entity.setPointid(mmPredictItemDto.getPointId()); |
| | | //累计配置 |
| | | entity.setIscumulant(mmPredictItemDto.getIscumulant()); |
| | | entity.setCumuldivisor(mmPredictItemDto.getCumuldivisor()); |
| | | entity.setCumulpoint(mmPredictItemDto.getCumulpoint()); |
| | | }); |
| | | } |
| | | } |
| | | DmModuleItemEntity dmModuleItem = mmPredictItemDto.getDmModuleItem(); |
| | |
| | | mmPredictItemDto.setMmPredictMergeItem(mmPredictMergeItemService.getByItemid(id)); |
| | | if (!CollectionUtils.isEmpty(mmPredictItemDto.getMmItemOutputList())) { |
| | | mmPredictItemDto.setPointId(mmPredictItemDto.getMmItemOutputList().get(0).getPointid()); |
| | | //累计配置 |
| | | mmPredictItemDto.setIscumulant(mmPredictItemDto.getMmItemOutputList().get(0).getIscumulant()); |
| | | mmPredictItemDto.setCumuldivisor(mmPredictItemDto.getMmItemOutputList().get(0).getCumuldivisor()); |
| | | mmPredictItemDto.setCumulpoint(mmPredictItemDto.getMmItemOutputList().get(0).getCumulpoint()); |
| | | } |
| | | } |
| | | return mmPredictItemDto; |