|
@@ -26,6 +26,20 @@ public class InvoiceInfoController {
|
|
|
|
|
|
@Autowired
|
|
|
private InvoiceInfoService invoiceInfoService;
|
|
|
+
|
|
|
+ @ApiOperation(value="创建空记录")
|
|
|
+ @GetMapping("create/{invoiceId}")
|
|
|
+ public MessageResult<InvoiceInfo> create(@PathVariable("invoiceId") String invoiceId){
|
|
|
+ MessageResult<InvoiceInfo> msgResult = new MessageResult<>();
|
|
|
+
|
|
|
+ InvoiceInfo invoiceInfo = new InvoiceInfo();
|
|
|
+ invoiceInfo.setInvoiceId(invoiceId);
|
|
|
+
|
|
|
+ msgResult.setData(invoiceInfo);
|
|
|
+ msgResult.setResult(true);
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
|
|
|
@ApiOperation(value="添加信息")
|
|
|
@PostMapping("add")
|
|
@@ -146,22 +160,18 @@ public class InvoiceInfoController {
|
|
|
|
|
|
@ApiOperation(value="列表")
|
|
|
@RequestMapping(value = "pageList",method = RequestMethod.POST)
|
|
|
- public MessageResult<Map> pageList(
|
|
|
- String id,
|
|
|
- @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
- @RequestParam(value="pageSize",defaultValue="20") int pageSize){
|
|
|
+ public MessageResult<Map> pageList(String invoiceId, @RequestAttribute String subject){
|
|
|
MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
|
|
|
Map<String,Object> searchParams = new HashMap<>();
|
|
|
+ if (StringUtils.isNotEmpty(invoiceId)) {
|
|
|
+ searchParams.put("invoiceId",invoiceId);
|
|
|
+ }
|
|
|
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("id_","asc"));
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(id)) {
|
|
|
- searchParams.put("id","%" + id + "%");
|
|
|
- }
|
|
|
-
|
|
|
- Page<InvoiceInfo> page = invoiceInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
+ Page<InvoiceInfo> page = invoiceInfoService.pageSearch(searchParams,1,1000,false,sortList);
|
|
|
|
|
|
msgResult.setResult(true);
|
|
|
msgResult.setData(PojoUtils.pageWrapper(page));
|