|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
5
|
5
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
6
|
6
|
import com.njyunzhi.invoice.common.BaseController;
|
7
|
7
|
import com.njyunzhi.invoice.common.ResponseBean;
|
|
8
|
+import com.njyunzhi.invoice.common.StringUtils;
|
8
|
9
|
import io.swagger.annotations.Api;
|
9
|
10
|
import io.swagger.annotations.ApiOperation;
|
10
|
11
|
import io.swagger.annotations.ApiParam;
|
|
@@ -46,17 +47,21 @@ public class SysOrgController extends BaseController {
|
46
|
47
|
* @param pageSize
|
47
|
48
|
* @return
|
48
|
49
|
*/
|
49
|
|
- @RequestMapping(value="/sysOrg",method= RequestMethod.GET)
|
|
50
|
+ @RequestMapping(value="/h5/org",method= RequestMethod.GET)
|
50
|
51
|
@ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
|
51
|
52
|
public ResponseBean sysOrgList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
52
|
|
- @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
|
|
53
|
+ @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
|
54
|
+ @ApiParam("是否系统内置") @RequestParam(value ="isSystem", required = false) Boolean isSystem,
|
|
55
|
+ @ApiParam("单位名称") @RequestParam(value ="name", required = false) String name) throws Exception{
|
53
|
56
|
|
54
|
|
- IPage<SysOrg> pg = new Page<>(pageNum, pageSize);
|
55
|
|
- QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<>();
|
56
|
|
- queryWrapper.orderByDesc("create_date");
|
|
57
|
+ IPage<SysOrg> pg = new Page<>(pageNum, pageSize);
|
|
58
|
+ QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<>();
|
|
59
|
+ queryWrapper.like(StringUtils.isEmpty(name),"name", "%"+name+"%");
|
|
60
|
+ queryWrapper.eq(isSystem != null,"is_system", isSystem);
|
|
61
|
+ queryWrapper.orderByDesc("create_date");
|
57
|
62
|
|
58
|
|
- IPage<SysOrg> result = iSysOrgService.page(pg, queryWrapper);
|
59
|
|
- return ResponseBean.success(result);
|
|
63
|
+ IPage<SysOrg> result = iSysOrgService.page(pg, queryWrapper);
|
|
64
|
+ return ResponseBean.success(result);
|
60
|
65
|
}
|
61
|
66
|
|
62
|
67
|
/**
|