commit | author | age
|
a18bfa
|
1 |
package cn.autoform.web.controller.process; |
Z |
2 |
|
|
3 |
import java.util.Map; |
|
4 |
|
|
5 |
import org.springframework.beans.factory.annotation.Autowired; |
|
6 |
import org.springframework.web.bind.annotation.RequestBody; |
|
7 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
8 |
import org.springframework.web.bind.annotation.RequestMethod; |
|
9 |
import org.springframework.web.bind.annotation.RestController; |
|
10 |
|
|
11 |
import cn.autoform.db.entity.ProcessApproval; |
|
12 |
import cn.autoform.db.entity.ProcessInstance; |
|
13 |
import cn.autoform.fw.exception.RestResult; |
|
14 |
import cn.autoform.fw.utility.RestResultGenerator; |
|
15 |
import cn.autoform.util.tool.JSONTool; |
|
16 |
import cn.autoform.web.service.process.ProcessInstanceService; |
|
17 |
|
|
18 |
@RestController |
|
19 |
public class ProcessInstanceController { |
|
20 |
|
|
21 |
|
|
22 |
@Autowired |
|
23 |
private ProcessInstanceService processInstanceService; |
|
24 |
|
|
25 |
|
|
26 |
@RequestMapping(value = "${request.processinst08}", method = RequestMethod.POST) |
|
27 |
public RestResult<ProcessInstance> getInstance(@RequestBody Map<String,String> pro){ |
|
28 |
System.out.println("请求参数:"+JSONTool.toJson(pro)); |
|
29 |
return RestResultGenerator.genSuccessResult(processInstanceService.select(pro.get("processInstId"))); |
|
30 |
} |
|
31 |
|
|
32 |
@RequestMapping(value = "process/selectInst", method = RequestMethod.POST) |
|
33 |
public RestResult<ProcessInstance> selectInst(@RequestBody Map<String,String> pro){ |
|
34 |
System.out.println("请求参数:"+JSONTool.toJson(pro)); |
|
35 |
ProcessInstance pros = new ProcessInstance(); |
|
36 |
pros.setFormID(pro.get("formID")); |
|
37 |
pros.setDataRowNum(Integer.parseInt(pro.get("dataRowNum"))); |
|
38 |
return RestResultGenerator.genSuccessResult(processInstanceService.selectInst(pros)); |
|
39 |
} |
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
} |