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));
|
}
|
|
|
|
|
}
|