| | |
| | | |
| | | import com.iailab.framework.common.util.object.ConvertUtils; |
| | | import com.iailab.module.data.api.plan.dto.ApiPlanDataDTO; |
| | | import com.iailab.module.data.api.plan.dto.ApiPlanItemDTO; |
| | | import com.iailab.module.data.common.ApiDataQueryDTO; |
| | | import com.iailab.module.data.common.ApiDataValueDTO; |
| | | import com.iailab.module.data.plan.item.collection.PlanItemCollector; |
| | | import com.iailab.module.data.plan.item.entity.PlanItemEntity; |
| | | import com.iailab.module.data.plan.item.service.PlanItemService; |
| | | import com.iailab.module.data.plan.item.vo.PlanItemDataVO; |
| | | import com.iailab.module.data.plan.item.vo.PlanItemValueVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.LinkedHashMap; |
| | |
| | | @Autowired |
| | | private PlanItemCollector planItemCollector; |
| | | |
| | | @Autowired |
| | | private PlanItemService planItemService; |
| | | |
| | | @Override |
| | | public List<ApiDataValueDTO> queryPlanItemHistoryValue(ApiDataQueryDTO dto) { |
| | | List<PlanItemValueVO> list = planItemCollector.queryValue(dto.getItemNo(), dto.getStart(), dto.getEnd()); |
| | | return ConvertUtils.sourceToTarget(list, ApiDataValueDTO.class); |
| | | } |
| | | |
| | | @Override |
| | | public LinkedHashMap<String, List<ApiPlanDataDTO>> queryPlanItemRecordValue(ApiDataQueryDTO dto) { |
| | | LinkedHashMap<String, List<ApiPlanDataDTO>> result = new LinkedHashMap<>(); |
| | | if (CollectionUtils.isEmpty(dto.getItemNos())) { |
| | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public ApiPlanItemDTO getInfoByNo(String itemNo){ |
| | | PlanItemEntity entity = planItemService.getInfoByNo(itemNo); |
| | | return ConvertUtils.sourceToTarget(entity, ApiPlanItemDTO.class); |
| | | } |
| | | |
| | | } |