12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- package com.sinosoft.lz.system.positiontab.service;
- import java.util.ArrayList;
- import java.util.List;
- import java.util.Map;
- import javax.ws.rs.POST;
- import javax.ws.rs.Path;
- import javax.ws.rs.ProduceMime;
- import net.sf.json.JSONArray;
- import org.apache.log4j.Logger;
- import com.formaction.Utils;
- import com.persistence.service.JDBCHelper;
- import com.persistence.service.PersistenceFactory;
- import com.persistence.service.SysPersistence;
- import com.persistence.service.exception.PersistenceException;
- import com.sinosoft.common.vo.TreeNode;
- import com.sinosoft.common.vo.TreeNodes;
- import com.sinosoft.em.alert.report.manage.service.QueryReportProgrammeServiceImpl;
- import com.sinosoft.lz.system.positiontab.dao.PositionTabDao;
- import com.sysmodel.datamodel.xmlmodel.ModelFactory;
- import com.sysmodel.datamodel.xmlmodel.able.MdpDataSource;
- import com.sysmodel.datamodel.xmlmodel.able.SysModel;
- @Path("/PositionTabService/")
- public class PositionTabService{
- private final static Logger log = Logger.getLogger(QueryReportProgrammeServiceImpl.class);
-
- /**
- * 根据菜单id和用户id查询页签数据:
- *
- * @param node
- * @return
- */
- @ProduceMime("application/json")
- @POST
- @Path("/getTabById")
- public String getTabById(String params) {
- String menuId = Utils.getParameter("menuId", params) == null ? "" : Utils
- .getParameter("menuId", params);
- String userId = Utils.getParameter("userId", params) == null ? "" : Utils
- .getParameter("userId", params);
- String frmsrc = Utils.getParameter("frmsrc", params) == null ? "" : Utils
- .getParameter("frmsrc", params);
- PositionTabDao dao = new PositionTabDao();
- List<Map<String, String>> list = dao.getTabById(menuId,userId,frmsrc);
- return JSONArray.fromObject(list).toString();
- }
- /**
- * 根据菜单id和用户id查询页签数据:
- *
- * @param node
- * @return
- */
- @ProduceMime("application/json")
- @POST
- @Path("/addOrUpdateTab")
- public String addOrUpdateTab(String params) {
- String menuId = Utils.getParameter("menuId", params) == null ? "" : Utils
- .getParameter("menuId", params);
- String userId = Utils.getParameter("userId", params) == null ? "" : Utils
- .getParameter("userId", params);
- /* String yqparams = Utils.getParameter("yqparams", params) == null ? "" : Utils
- .getParameter("yqparams", params);*/
- String tabId = Utils.getParameter("tabId", params) == null ? "" : Utils
- .getParameter("tabId", params);
- PositionTabDao dao = new PositionTabDao();
- String result = "";
- try {
- result = dao.addOrUpdateTab(menuId,userId,tabId);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return result;
- }
- }
|