package com.bonus.gs.sub.evaluate.evaluate.controller;

import com.bonus.gs.sub.evaluate.evaluate.beans.EvaluateBean;
import com.bonus.gs.sub.evaluate.evaluate.beans.auditOutsourcerBean;
import com.bonus.gs.sub.evaluate.evaluate.service.AuditOfOutsourcerService;
import com.bonus.gs.sub.evaluate.manager.controller.BaseController;
import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes;
import com.bonus.gs.sub.evaluate.manager.utils.GlobalConst;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/backstage/auditOutsourcer/")
public class AuditOfOutsourcerController extends BaseController<EvaluateBean> {
	@Autowired
	private AuditOfOutsourcerService service;
	/**
	 * 外包商审批列表
	 * @param o auditOutsourcerBean
	 * @return AjaxRes
	 */
	@RequestMapping(path = "outsourcerEvaluateList", method = RequestMethod.GET)
	@ResponseBody
	public AjaxRes outsourcerEvaluateList(auditOutsourcerBean o) {
		AjaxRes ar = getAjaxRes();
		try {
			List<auditOutsourcerBean> list = service.getTeamEvaluateList(o);
			ar.setListSucceed(list);
		} catch (Exception e) {
			logger.error(e.toString(), e);
			ar.setFailMsg(GlobalConst.DATA_FAIL);
		}
		return ar;
	}




}
