| | |
| | | |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.life.modules.project.dao.EnvironDao; |
| | | import com.zt.life.modules.project.model.Environ; |
| | | import com.zt.life.modules.project.dto.SoftwareTestOrderDto; |
| | | import com.zt.life.modules.project.model.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import javax.annotation.Resource; |
| | |
| | | */ |
| | | @Service |
| | | public class EnvironService extends BaseService<EnvironDao, Environ> { |
| | | @Autowired |
| | | private SoftwareTestOrder softwareTestOrder; |
| | | |
| | | @Autowired |
| | | private EnvironSoftwareResourcesService environSoftwareResourcesService; |
| | | |
| | | @Autowired |
| | | private EnvironHardwareResourcesService environHardwareResourcesService; |
| | | |
| | | @Autowired |
| | | private SoftwareTestOrderService softwareTestOrderService; |
| | | |
| | | public SoftwareTestOrderDto getDto(Long orderId, Long environId) { |
| | | SoftwareTestOrderDto data = new SoftwareTestOrderDto(); |
| | | if (environId != null) { |
| | | data.setId(environId); |
| | | Environ environ = this.get(environId); |
| | | data.setEnviron(environ); |
| | | |
| | | orderId = softwareTestOrder.getId(); |
| | | |
| | | List<EnvironSoftwareResources> softwareResourcesList = environSoftwareResourcesService.getList(environId); |
| | | data.setSoftwareResourcesList(softwareResourcesList); |
| | | |
| | | List<EnvironHardwareResources> hardwareResourcesList = environHardwareResourcesService.getList(environId); |
| | | data.setHardwareResourcesList(hardwareResourcesList); |
| | | } else { |
| | | SoftwareTestOrder softwareTestOrder = softwareTestOrderService.get(orderId); |
| | | } |
| | | |
| | | if (orderId != null) { |
| | | data.setOrderId(orderId); |
| | | data.setSoftwareTestOrder(softwareTestOrderService.get(orderId)); |
| | | } |
| | | |
| | | return data; |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |