| 
															
																@ -1,6 +1,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																package com.yihu.iot.controller.device; 
															 | 
															
															 | 
															
																package com.yihu.iot.controller.device; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.iot.service.device.IotDeviceInventoryService; 
															 | 
															
															 | 
															
																import com.yihu.iot.service.device.IotDeviceInventoryService; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import com.yihu.jw.restmodel.iot.device.IotDeviceInventoryLogVO; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.restmodel.iot.device.IotDeviceVO; 
															 | 
															
															 | 
															
																import com.yihu.jw.restmodel.iot.device.IotDeviceVO; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.restmodel.web.MixEnvelop; 
															 | 
															
															 | 
															
																import com.yihu.jw.restmodel.web.MixEnvelop; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint; 
															 | 
															
															 | 
															
																import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -11,7 +12,6 @@ import io.swagger.annotations.ApiParam; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.beans.factory.annotation.Autowired; 
															 | 
															
															 | 
															
																import org.springframework.beans.factory.annotation.Autowired; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.web.bind.annotation.*; 
															 | 
															
															 | 
															
																import org.springframework.web.bind.annotation.*; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																/** 
															 | 
															
															 | 
															
																/** 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 * @author humingfen on 2020.4.29 
															 | 
															
															 | 
															
																 * @author humingfen on 2020.4.29 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 */ 
															 | 
															
															 | 
															
																 */ 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -26,15 +26,15 @@ public class IotDeviceInventoryController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @GetMapping(value = IotRequestMapping.Device.getDeviceInventoryList) 
															 | 
															
															 | 
															
																    @GetMapping(value = IotRequestMapping.Device.getDeviceInventoryList) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @ApiOperation(value = "获取设备库存列表", notes = "获取设备库存列表") 
															 | 
															
															 | 
															
																    @ApiOperation(value = "获取设备库存列表", notes = "获取设备库存列表") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    public MixEnvelop<IotDeviceVO, IotDeviceVO> getDeviceInventoryList(@ApiParam(name = "name", value = "设备名称") 
															 | 
															
															 | 
															
																    public MixEnvelop<IotDeviceVO, IotDeviceVO> getDeviceInventoryList(@ApiParam(name = "name", value = "设备名称") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                           @RequestParam(value = "name", required = false) String name, 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                       @RequestParam(value = "name", required = false) String name, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                                       @ApiParam(name = "categoryCode", value = "设备类型标识") 
															 | 
															
															 | 
															
																                                                                       @ApiParam(name = "categoryCode", value = "设备类型标识") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                                       @RequestParam(value = "categoryCode", required = false) String categoryCode, 
															 | 
															
															 | 
															
																                                                                       @RequestParam(value = "categoryCode", required = false) String categoryCode, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                                       @ApiParam(name = "hospitalName", value = "单位名称") 
															 | 
															
															 | 
															
																                                                                       @ApiParam(name = "hospitalName", value = "单位名称") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                                           @RequestParam(value = "hospitalName", required = false) String hospitalName, 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                       @RequestParam(value = "hospitalName", required = false) String hospitalName, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                                       @ApiParam(name = "page", value = "第几页", defaultValue = "1") 
															 | 
															
															 | 
															
																                                                                       @ApiParam(name = "page", value = "第几页", defaultValue = "1") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                                           @RequestParam(value = "page", required = false) Integer page, 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                       @RequestParam(value = "page", required = false) Integer page, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                                       @ApiParam(name = "pageSize", value = "每页记录数") 
															 | 
															
															 | 
															
																                                                                       @ApiParam(name = "pageSize", value = "每页记录数") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                                           @RequestParam(value = "pageSize", required = false) Integer pageSize) { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                       @RequestParam(value = "pageSize", required = false) Integer pageSize) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        try { 
															 | 
															
															 | 
															
																        try { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            return deviceInventoryService.getDeviceInventoryList(name, categoryCode, hospitalName, page, pageSize); 
															 | 
															
															 | 
															
																            return deviceInventoryService.getDeviceInventoryList(name, categoryCode, hospitalName, page, pageSize); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } catch (Exception e) { 
															 | 
															
															 | 
															
																        } catch (Exception e) { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -45,8 +45,8 @@ public class IotDeviceInventoryController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @PostMapping(value = IotRequestMapping.Device.updateInventory) 
															 | 
															
															 | 
															
																    @PostMapping(value = IotRequestMapping.Device.updateInventory) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @ApiOperation(value = "设备库存出入库", notes = "设备库存出入库") 
															 | 
															
															 | 
															
																    @ApiOperation(value = "设备库存出入库", notes = "设备库存出入库") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    public MixEnvelop<IotDeviceVO, IotDeviceVO> updateInventory(@ApiParam(name = "jsonData", value = "设备出入库json",defaultValue = "") 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                                       @RequestParam(value = "jsonData", required = true) String jsonData) { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    public MixEnvelop<IotDeviceVO, IotDeviceVO> updateInventory(@ApiParam(name = "jsonData", value = "设备出入库json", defaultValue = "") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                @RequestParam(value = "jsonData", required = true) String jsonData) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        try { 
															 | 
															
															 | 
															
																        try { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            Integer count = deviceInventoryService.updateInventory(jsonData); 
															 | 
															
															 | 
															
																            Integer count = deviceInventoryService.updateInventory(jsonData); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            return MixEnvelop.getSuccess(IotRequestMapping.Device.message_success_updateInventory, count); 
															 | 
															
															 | 
															
																            return MixEnvelop.getSuccess(IotRequestMapping.Device.message_success_updateInventory, count); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -55,4 +55,37 @@ public class IotDeviceInventoryController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            return MixEnvelop.getError(e.getMessage()); 
															 | 
															
															 | 
															
																            return MixEnvelop.getError(e.getMessage()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    } 
															 | 
															
															 | 
															
																    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    @GetMapping(value = IotRequestMapping.Device.getDeviceInventoryLog) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    @ApiOperation(value = "获取设备出入库记录", notes = "获取设备出入库记录") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    public MixEnvelop<IotDeviceInventoryLogVO, IotDeviceInventoryLogVO> getDeviceInventoryLog(@ApiParam(name = "name", value = "设备名称") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                                              @RequestParam(value = "name", required = false) String name, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                                              @ApiParam(name = "categoryCode", value = "设备类型标识") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                                              @RequestParam(value = "categoryCode", required = false) String categoryCode, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                                              @ApiParam(name = "type", value = "调拨类型(1入库 2设备调拨出库 3核销出库)") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                                              @RequestParam(value = "type", required = false) Integer type, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                                              @ApiParam(name = "page", value = "第几页", defaultValue = "1") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                                              @RequestParam(value = "page", required = false) Integer page, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                                              @ApiParam(name = "pageSize", value = "每页记录数") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                                              @RequestParam(value = "pageSize", required = false) Integer pageSize) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        try { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            return deviceInventoryService.getDeviceInventoryLog(name, categoryCode, type, page, pageSize); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        } catch (Exception e) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            e.printStackTrace(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            return MixEnvelop.getError(e.getMessage()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    @GetMapping(value = IotRequestMapping.Device.getDeviceInventoryLogDetail) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    @ApiOperation(value = "获取设备出入库记录详情", notes = "获取设备出入库记录详情") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    public MixEnvelop<IotDeviceInventoryLogVO, IotDeviceInventoryLogVO> getDeviceInventoryLogDetail(@ApiParam(name = "id", value = "出入库记录id") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                                                                              @RequestParam(value = "id", required = true) String id) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        try { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            IotDeviceInventoryLogVO deviceInventoryLogVO = deviceInventoryService.getDeviceInventoryLogDetail(id); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find, deviceInventoryLogVO); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        } catch (Exception e) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            e.printStackTrace(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            return MixEnvelop.getError(e.getMessage()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																} 
															 | 
															
															 | 
															
																} 
															 |