张延森 2 years ago
parent
commit
736b44c7c6

+ 4
- 1
src/main/java/com/njyunzhi/invoice/controller/TaInvoiceOrgController.java View File

6
 import com.njyunzhi.invoice.common.BaseController;
6
 import com.njyunzhi.invoice.common.BaseController;
7
 import com.njyunzhi.invoice.common.Constants;
7
 import com.njyunzhi.invoice.common.Constants;
8
 import com.njyunzhi.invoice.common.ResponseBean;
8
 import com.njyunzhi.invoice.common.ResponseBean;
9
+import com.njyunzhi.invoice.common.StringUtils;
9
 import io.swagger.annotations.Api;
10
 import io.swagger.annotations.Api;
10
 import io.swagger.annotations.ApiOperation;
11
 import io.swagger.annotations.ApiOperation;
11
 import io.swagger.annotations.ApiParam;
12
 import io.swagger.annotations.ApiParam;
51
     @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
52
     @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
52
     public ResponseBean taInvoiceOrgList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
53
     public ResponseBean taInvoiceOrgList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
53
                                          @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
54
                                          @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
54
-                                         @ApiParam("班级ID") @PathVariable(value ="invoiceId") String invoiceId) throws Exception{
55
+                                         @ApiParam("班级ID") @PathVariable(value ="invoiceId") String invoiceId,
56
+                                         @ApiParam("单位名称") @RequestParam(value ="name", required = false) String name) throws Exception{
55
 
57
 
56
         IPage<TaInvoiceOrg> pg = new Page<>(pageNum, pageSize);
58
         IPage<TaInvoiceOrg> pg = new Page<>(pageNum, pageSize);
57
         QueryWrapper<TaInvoiceOrg> queryWrapper = new QueryWrapper<>();
59
         QueryWrapper<TaInvoiceOrg> queryWrapper = new QueryWrapper<>();
58
         queryWrapper.gt("status", Constants.STATUS_DELETE);
60
         queryWrapper.gt("status", Constants.STATUS_DELETE);
61
+        queryWrapper.like(!StringUtils.isEmpty(name),"name", "%" + name + "%");
59
         queryWrapper.eq("invoice_id", invoiceId);
62
         queryWrapper.eq("invoice_id", invoiceId);
60
         queryWrapper.orderByDesc("create_date");
63
         queryWrapper.orderByDesc("create_date");
61
 
64
 

+ 3
- 1
src/main/java/com/njyunzhi/invoice/controller/TaInvoicePersonController.java View File

62
     public ResponseBean taInvoicePersonList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
62
     public ResponseBean taInvoicePersonList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
63
                                             @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
63
                                             @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
64
                                             @ApiParam("班级ID") @PathVariable(value ="invoiceId") String invoiceId,
64
                                             @ApiParam("班级ID") @PathVariable(value ="invoiceId") String invoiceId,
65
-                                            @ApiParam("所属单位") @RequestParam(value ="invoiceOrgId", required = false) String invoiceOrgId) throws Exception {
65
+                                            @ApiParam("所属单位") @RequestParam(value ="invoiceOrgId", required = false) String invoiceOrgId,
66
+                                            @ApiParam("人员名称") @RequestParam(value ="name", required = false) String name) throws Exception {
66
         IPage<TaInvoicePerson> pg = new Page<>(pageNum, pageSize);
67
         IPage<TaInvoicePerson> pg = new Page<>(pageNum, pageSize);
67
         QueryWrapper<TaInvoicePerson> queryWrapper = new QueryWrapper<>();
68
         QueryWrapper<TaInvoicePerson> queryWrapper = new QueryWrapper<>();
68
         queryWrapper.gt("status", Constants.STATUS_DELETE);
69
         queryWrapper.gt("status", Constants.STATUS_DELETE);
69
         queryWrapper.eq("invoice_id", invoiceId);
70
         queryWrapper.eq("invoice_id", invoiceId);
71
+        queryWrapper.like(!StringUtils.isEmpty(name),"name", "%" + name + "%");
70
         queryWrapper.eq(!StringUtils.isEmpty(invoiceOrgId), "invoice_org_id", invoiceOrgId);
72
         queryWrapper.eq(!StringUtils.isEmpty(invoiceOrgId), "invoice_org_id", invoiceOrgId);
71
         queryWrapper.orderByDesc("create_date");
73
         queryWrapper.orderByDesc("create_date");
72
         IPage<TaInvoicePerson> result = iTaInvoicePersonService.page(pg,queryWrapper);
74
         IPage<TaInvoicePerson> result = iTaInvoicePersonService.page(pg,queryWrapper);