| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.IvrLibaTargetMapper; |
| | | import com.smartor.mapper.IvrLibaTargetTagMapper; |
| | |
| | | //获取该指标的选项 |
| | | List<IvrLibaTargetoption> ivrLibaTargetoptions = ivrLibaTargetoptionMapper.selectIvrLibaTargetoptionList(ivrLibaTargetoption); |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTargetoptions)) { |
| | | for (IvrLibaTargetoption ivrLibaTargetoption1 : ivrLibaTargetoptions) { |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | try { |
| | | if (StringUtils.isNotEmpty(ivrLibaTargetoption1.getDynamiccruxsJson())) |
| | | ivrLibaTargetoption1.setDynamiccruxs(objectMapper.readValue(ivrLibaTargetoption1.getDynamiccruxsJson(), List.class)); |
| | | if (StringUtils.isNotEmpty(ivrLibaTargetoption1.getNodynamiccruxsJson())) |
| | | ivrLibaTargetoption1.setNodynamiccruxs(objectMapper.readValue(ivrLibaTargetoption1.getNodynamiccruxsJson(), List.class)); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | ivrLibaTarget1.setTargetoptionList(ivrLibaTargetoptions); |
| | | } |
| | | //获取该指标的标签 |
| | |
| | | } |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTargetVO.getTargetoptionList())) { |
| | | for (IvrLibaTargetoption ivrLibaTargetoption : ivrLibaTargetVO.getTargetoptionList()) { |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTargetoption.getNodynamiccruxs())) { |
| | | ivrLibaTargetoption.setNodynamiccruxsJson(new Gson().toJson(ivrLibaTargetoption.getNodynamiccruxs())); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTargetoption.getDynamiccruxs())) { |
| | | ivrLibaTargetoption.setDynamiccruxsJson(new Gson().toJson(ivrLibaTargetoption.getDynamiccruxs())); |
| | | } |
| | | |
| | | if (ivrLibaTargetoption.getIsoperation() != null && ivrLibaTargetoption.getIsoperation() == 1) { |
| | | //新增 |
| | | ivrLibaTargetoption.setTargetid(ivrLibaTarget.getId()); |
| | |
| | | /** |
| | | * 批量删除指标选项库 |
| | | * |
| | | * @param targetIDs 需要删除的指标选项库主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | |
| | | /** |
| | | * 删除指标选项库信息 |
| | | * |
| | | * @param targetID 指标选项库主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |