Ver código fonte

固定资产档案 印章档案 通过状态查询

xieyn 1 ano atrás
pai
commit
05d6f781f3

+ 30 - 6
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/AssetController.java

@@ -49,7 +49,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
 public class AssetController extends JeecgController<Asset, IAssetService> {
 	@Autowired
 	private IAssetService assetService;
-	
+
 	/**
 	 * 分页列表查询
 	 *
@@ -71,7 +71,7 @@ public class AssetController extends JeecgController<Asset, IAssetService> {
 		IPage<Asset> pageList = assetService.page(page, queryWrapper);
 		return Result.ok(pageList);
 	}
-	
+
 	/**
 	 *   添加
 	 *
@@ -85,7 +85,7 @@ public class AssetController extends JeecgController<Asset, IAssetService> {
 		assetService.save(asset);
 		return Result.ok("添加成功!");
 	}
-	
+
 	/**
 	 *  编辑
 	 *
@@ -99,7 +99,7 @@ public class AssetController extends JeecgController<Asset, IAssetService> {
 		assetService.updateById(asset);
 		return Result.ok("编辑成功!");
 	}
-	
+
 	/**
 	 *   通过id删除
 	 *
@@ -113,7 +113,7 @@ public class AssetController extends JeecgController<Asset, IAssetService> {
 		assetService.removeById(id);
 		return Result.ok("删除成功!");
 	}
-	
+
 	/**
 	 *  批量删除
 	 *
@@ -127,7 +127,7 @@ public class AssetController extends JeecgController<Asset, IAssetService> {
 		this.assetService.removeByIds(Arrays.asList(ids.split(",")));
 		return Result.ok("批量删除成功!");
 	}
-	
+
 	/**
 	 * 通过id查询
 	 *
@@ -168,4 +168,28 @@ public class AssetController extends JeecgController<Asset, IAssetService> {
         return super.importExcel(request, response, Asset.class);
     }
 
+
+	 /**
+	  * 分页列表查询通过状态正在使用和闲置
+	  *
+	  * @param asset
+	  * @param pageNo
+	  * @param pageSize
+	  * @param req
+	  * @return
+	  */
+	 @AutoLog(value = "固定资产-分页列表查询")
+	 @ApiOperation(value="固定资产-分页列表查询", notes="固定资产-分页列表查询")
+	 @GetMapping(value = "/listByStatus")
+	 public Result<?> queryPageListByStatus(Asset asset,
+									@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+									@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+									HttpServletRequest req) {
+		 QueryWrapper<Asset> queryWrapper = QueryGenerator.initQueryWrapper(asset, req.getParameterMap());
+		 queryWrapper.eq("state","正在使用").or().eq("state","闲置");
+		 Page<Asset> page = new Page<Asset>(pageNo, pageSize);
+		 IPage<Asset> pageList = assetService.page(page, queryWrapper);
+		 return Result.ok(pageList);
+	 }
+
 }

+ 24 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/SealArchivesController.java

@@ -169,4 +169,28 @@ public class SealArchivesController extends JeecgController<SealArchives, ISealA
         return super.importExcel(request, response, SealArchives.class);
     }
 
+
+	 /**
+	  * 分页列表查询通过状态正在使用
+	  *
+	  * @param sealArchives
+	  * @param pageNo
+	  * @param pageSize
+	  * @param req
+	  * @return
+	  */
+	 @AutoLog(value = "印章档案-分页列表查询")
+	 @ApiOperation(value="印章档案-分页列表查询", notes="印章档案-分页列表查询")
+	 @GetMapping(value = "/listByState")
+	 public Result<?> queryPageListByState(SealArchives sealArchives,
+									@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+									@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+									HttpServletRequest req) {
+		 QueryWrapper<SealArchives> queryWrapper = QueryGenerator.initQueryWrapper(sealArchives, req.getParameterMap());
+		 queryWrapper.eq("seal_status","正在使用");
+		 Page<SealArchives> page = new Page<SealArchives>(pageNo, pageSize);
+		 IPage<SealArchives> pageList = sealArchivesService.page(page, queryWrapper);
+		 return Result.ok(pageList);
+	 }
+
 }