| | |
| | | import com.iailab.framework.common.page.PageData; |
| | | import com.iailab.framework.common.service.impl.BaseServiceImpl; |
| | | import com.iailab.module.model.mpk.dao.ChartDao; |
| | | import com.iailab.module.model.mpk.dao.ChartParamDao; |
| | | import com.iailab.module.model.mpk.dto.ChartDTO; |
| | | import com.iailab.module.model.mpk.dto.ChartParamDTO; |
| | | import com.iailab.module.model.mpk.entity.ChartEntity; |
| | | import com.iailab.module.model.mpk.entity.ChartParamEntity; |
| | | import com.iailab.module.model.mpk.service.ChartParamService; |
| | | import com.iailab.module.model.mpk.service.ChartService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @description: |
| | |
| | | @Slf4j |
| | | @Service |
| | | public class ChartServiceImpl extends BaseServiceImpl<ChartDao, ChartEntity> implements ChartService { |
| | | |
| | | @Autowired |
| | | private ChartParamService chartParamService; |
| | | |
| | | @Override |
| | | public PageData<ChartDTO> page(Map<String, Object> params) { |
| | |
| | | .like(StringUtils.isNotBlank(chartCode), "chart_code", chartCode); |
| | | return wrapper; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getByChartCode(String chartCode) { |
| | | Map<String, String> result = new HashMap<>(); |
| | | QueryWrapper<ChartEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("chart_code", chartCode); |
| | | ChartEntity entity = baseDao.selectOne(wrapper); |
| | | if (entity == null) { |
| | | return result; |
| | | } |
| | | return chartParamService.getByChartId(entity.getId()); |
| | | } |
| | | } |