| | |
| | | import io.swagger.annotations.*; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入equipment") |
| | | public R<IPage<EquipmentVO>> page(EquipmentVO equipment, Query query,String pid, HttpServletResponse response) { |
| | | public R<List<EquipmentVO>> page(EquipmentVO equipment, Query query, String pid, HttpServletResponse response) { |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials","true"); |
| | | IPage<EquipmentVO> pages; |
| | | List<EquipmentVO> pages; |
| | | if (pid==null){ |
| | | pages = equipmentService.selectEquipmentPage(Condition.getPage(query), equipment); |
| | | } |
| | | else { |
| | | pages = equipmentService.selectEquipmentPage(equipment.getDeviceName(), equipment.getAddvcd(), equipment.getDtype(), equipment.getDevicestate()); |
| | | } else { |
| | | String s = catalogService.selectCatalogEqNUmber(pid); |
| | | if(s==null){ |
| | | pages = equipmentService.selectEquipmentPage(Condition.getPage(query), equipment); |
| | | pages = equipmentService.selectEquipmentPage(equipment.getDeviceName(), equipment.getAddvcd(), equipment.getDtype(), equipment.getDevicestate()); |
| | | }else{ |
| | | String[] split = s.split(","); |
| | | String strArrays=""; |
| | |
| | | } |
| | | String substring = strArrays.substring(0,strArrays.length()-1); |
| | | equipment.setDeviceNumber(substring); |
| | | pages = equipmentService.selectEquipmentPage(Condition.getPage(query), equipment); |
| | | pages = equipmentService.selectEquipmentPage(equipment.getDeviceName(), equipment.getAddvcd(), equipment.getDtype(), equipment.getDevicestate()); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * 设备列表 |
| | | * |
| | | * @param deviceType 设备类型 |
| | | * @return |
| | | */ |