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