|
@@ -1,5 +1,6 @@
|
1
|
1
|
package com.liang.controller;
|
2
|
2
|
|
|
3
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
3
|
4
|
import com.github.pagehelper.PageHelper;
|
4
|
5
|
import com.github.pagehelper.PageInfo;
|
5
|
6
|
import com.liang.common.JsonTool;
|
|
@@ -1376,18 +1377,32 @@ public class StaBudgetapprovalController extends BaseController {
|
1376
|
1377
|
* @return
|
1377
|
1378
|
*/
|
1378
|
1379
|
@ResponseBody
|
1379
|
|
- @PostMapping("/unassociated")
|
1380
|
|
- public BaseResult unassociated(){
|
1381
|
|
- List<StaBudgetapproval> list = staBudgetapprovalService.unassociated();
|
1382
|
|
- PageInfo<StaBudgetapproval> pageinfo = new PageInfo<>(list);
|
1383
|
|
- //取出查询结果
|
1384
|
|
- List<StaBudgetapproval> rows = pageinfo.getList();
|
1385
|
|
- int total = (int) pageinfo.getTotal();
|
1386
|
|
- Map<String, Object> result = new HashMap<>();
|
1387
|
|
- result.put(RESULT_ROWS, rows);
|
1388
|
|
- result.put(RESULT_TOTAL, total);
|
1389
|
|
- return BaseResult.success(result);
|
1390
|
|
- }
|
|
1380
|
+ @PostMapping("/unassociated/{fromdata}")
|
|
1381
|
+ public BaseResult unassociated(@PathVariable String fromdata){
|
|
1382
|
+
|
|
1383
|
+ try {
|
|
1384
|
+ ObjectMapper objectMapper = new ObjectMapper();
|
|
1385
|
+ FormData formData = objectMapper.readValue(fromdata, FormData.class);
|
|
1386
|
+ Map<String, String> map = new HashMap<>();
|
|
1387
|
+ map.put("bh",formData.getBh());
|
|
1388
|
+ map.put("nf",formData.getNf());
|
|
1389
|
+ map.put("xmmc",formData.getXmmc());
|
|
1390
|
+ List<StaBudgetapproval> list = staBudgetapprovalService.unassociated(map);
|
|
1391
|
+ PageInfo<StaBudgetapproval> pageinfo = new PageInfo<>(list);
|
|
1392
|
+ //取出查询结果
|
|
1393
|
+ List<StaBudgetapproval> rows = pageinfo.getList();
|
|
1394
|
+ int total = (int) pageinfo.getTotal();
|
|
1395
|
+ Map<String, Object> result = new HashMap<>();
|
|
1396
|
+ result.put(RESULT_ROWS, rows);
|
|
1397
|
+ result.put(RESULT_TOTAL, total);
|
|
1398
|
+ return BaseResult.success(result);
|
|
1399
|
+ } catch (Exception e) {
|
|
1400
|
+ e.printStackTrace();
|
|
1401
|
+ return BaseResult.failure("处理转换异常");
|
|
1402
|
+ }
|
|
1403
|
+ }
|
|
1404
|
+
|
|
1405
|
+
|
1391
|
1406
|
/**
|
1392
|
1407
|
* 审批列表获取科研编号
|
1393
|
1408
|
* @return
|