package com.nationalelectric.greenH5;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.beans.factory.annotation.Autowired;
import com.nationalelectirc.Constant.Constant;
import com.nationalelectirc.utils.RestResult;
import com.nationalelectric.greenH5.bizc.BaseServiceImpl;
import com.nationalelectric.greenH5.utils.Base64Utils;
import com.sgcc.uap.persistence.IHibernateDao;
import net.sf.json.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.*;
import org.springframework.stereotype.Controller;
/**
* 概述:
* TODO
*
* 功能:
* TODO
*
* @author niguang
*/
@Controller
@RequestMapping("/greenDepartment")
public class GreenDepartmentController {
@Autowired
IHibernateDao hibernateDao;
@Autowired
private BaseServiceImpl baseService;
/**
* 查询所有的部门
*/
@SuppressWarnings("unchecked")
@RequestMapping(value = "/getAllDept", method = RequestMethod.POST)
public @ResponseBody RestResult getAllDept() {
try {
String queryAllDeptSql = "SELECT gd.id as \"id\",gd.name as \"name\" FROM GREEN_DEPARTMENT gd WHERE 1=1 AND gd.is_deleted='N' AND gd.dp_sort!=0 and gd.parent_id = '49' ORDER BY gd.seq ASC";
List