|
|
@@ -228,4 +228,39 @@ public class StorageDeviceInputController {
|
|
228
|
228
|
returnMap.put("useCount", useCount);
|
|
229
|
229
|
return returnMap;
|
|
230
|
230
|
}
|
|
|
231
|
+
|
|
|
232
|
+
|
|
|
233
|
+ /**
|
|
|
234
|
+ * 分页获取器材设备信息
|
|
|
235
|
+ * @throws Exception
|
|
|
236
|
+ */
|
|
|
237
|
+ @RequestMapping(value = "/getDeviceAccountList",produces = MediaType.APPLICATION_JSON_VALUE,method=RequestMethod.GET)
|
|
|
238
|
+ @ApiOperation(value="查询入库设备信息", notes = "查询入库设备列表,支持分页")
|
|
|
239
|
+ @ApiImplicitParams({
|
|
|
240
|
+ @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
|
|
|
241
|
+ @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
|
|
|
242
|
+ @ApiImplicitParam(name = "orgName", value = "当前登录人组织名称", paramType = "query")
|
|
|
243
|
+ })
|
|
|
244
|
+ public PageInfo<StorageDeviceinput> getDeviceAccountList(HttpServletRequest request,Integer pageNum, Integer pageSize, Integer deviceType ,String orgName) throws Exception{
|
|
|
245
|
+ StorageDeviceinputExample storageDeviceinputExample=new StorageDeviceinputExample();
|
|
|
246
|
+ StorageDeviceinputExample.Criteria criteria=storageDeviceinputExample.createCriteria();
|
|
|
247
|
+ if(ParameterUtil.isnotnull(deviceType)){
|
|
|
248
|
+ criteria.andDeviceTypeEqualTo(deviceType);
|
|
|
249
|
+ }
|
|
|
250
|
+ //排序
|
|
|
251
|
+ storageDeviceinputExample.setOrderByClause("FIELD(status,0,1),input_time desc,id desc");
|
|
|
252
|
+
|
|
|
253
|
+ if (pageNum!=null && pageSize!=null) {
|
|
|
254
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
255
|
+ }
|
|
|
256
|
+
|
|
|
257
|
+ List<StorageDeviceinput> list = deviceInputService.queryDeviceAccount(storageDeviceinputExample);
|
|
|
258
|
+ for (StorageDeviceinput storageDeviceinput : list) {
|
|
|
259
|
+ if(orgName!=null){
|
|
|
260
|
+ storageDeviceinput.setOrgName(orgName);
|
|
|
261
|
+ }
|
|
|
262
|
+ }
|
|
|
263
|
+ PageInfo<StorageDeviceinput> pageInfo = new PageInfo<StorageDeviceinput>(list);
|
|
|
264
|
+ return pageInfo;
|
|
|
265
|
+ }
|
|
231
|
266
|
}
|