Parcourir la source

小区按机构查询

lin il y a 4 ans
Parent
commit
d7d27edc86

+ 3 - 1
src/main/java/com/zoniot/ccrc/controller/system/CommunityManagerController.java

@@ -43,7 +43,8 @@ public class CommunityManagerController {
 			@ApiParam(value = "省", required = false) @RequestParam(required = false) Integer province,
 			@ApiParam(value = "市", required = false) @RequestParam(required = false) Integer city,
 			@ApiParam(value = "区", required = false) @RequestParam(required = false) Integer region,
-			@ApiParam(value = "小区", required = false) @RequestParam(required = false) Integer communityId) {
+			@ApiParam(value = "小区", required = false) @RequestParam(required = false) Integer communityId,
+			@ApiParam(value = "机构", required = false) @RequestParam(required = false) Integer orgId) {
 		// 1,判断用户的站点信息
         LoginUser loginUser = UserUtil.getCurrentUser();
         Community param = new Community();
@@ -57,6 +58,7 @@ public class CommunityManagerController {
         if(StringUtils.isNotBlank(name)) {
         	param.setName("%"+name+"%");
         }
+		param.setOrgId(orgId);
         List<CommunityDto> list = communityService.queryCommunity(param);
         
         return new AjaxMessage<>(ResultStatus.OK, list);

+ 2 - 0
src/main/java/com/zoniot/ccrc/entity/Community.java

@@ -64,4 +64,6 @@ public class Community implements Serializable {
 
     @ApiModelProperty(value="更新人", hidden = true)
     private String updateBy;
+
+    private Integer orgId;
 }

+ 1 - 0
src/main/resources/mapper/CommunityMapper.xml

@@ -392,6 +392,7 @@
         <if test="param.city != null"> and sc.city = #{param.city} </if>
         <if test="param.region != null"> and sc.region = #{param.region} </if>
         <if test="param.id != null"> and sc.id = #{param.id}</if>
+        <if test="param.orgId != null"> and sc.org_id = #{param.orgId}</if>
         <if test="param.name != null and param.name != '' "> and sc.name like #{param.name}</if>
         <if test="customerIds != null and customerIds.size() != 0">
             and sc.customer_id in <foreach collection="customerIds" item="item" open="(" separator="," close=")">#{item}</foreach>