关闭

jQuery Ajax JSON数据方式接收Spring MVC Map方式传值举例

标签: springjquerymvcajaxjsoninteger
9074人阅读 评论(0) 收藏 举报
分类:
 
@ResponseBody
	@RequestMapping(value = "process/adjustInstance.do")
	public Map<String, Object> adjustInstance(ExtProcessInstance bo,
			Integer[] extTaskInstanceIds, String[] taskIds,
			String[] taskTitles, String[] recipientIds,
			Integer[] recipientTypes, Integer[] estimatedMinutes, Model model) {
		Map<String, Object> msg = new HashMap<String, Object>();

		try {

			List<ExtTaskInstance> taskInstances = new ArrayList<ExtTaskInstance>();
			ExtTaskInstance taskInstance;
			for (int i = 0; i < extTaskInstanceIds.length; i++) {
				taskInstance = new ExtTaskInstance();
				taskInstance.setId(extTaskInstanceIds[i]);
				taskInstance.setRecipientId(recipientIds[i]);
				taskInstance.setRecipientType(1);
				taskInstance.setTaskName(taskTitles[i]);

				taskInstances.add(taskInstance);
			}
			bo.setExtTaskInstances(taskInstances);

			bo = processInstanceService.adjustTask(bo, taskInstances);

			StringBuffer info = new StringBuffer();
			info.append("流程实例[").append(bo.getName()).append("]任务执行人已调整");

			msg.put("succ", true);
			msg.put("info", info);

		} catch (Exception e) {
			e.printStackTrace();
			msg.put("succ", false);
			msg.put("info", e.getMessage());
		}

		return msg;
	}


1
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:1764276次
    • 积分:17871
    • 等级:
    • 排名:第526名
    • 原创:331篇
    • 转载:18篇
    • 译文:0篇
    • 评论:744条
    座右铭
    思想决定高度,
    态度决定成败!
    博客专栏