1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- package com.sinosoft.am.resource.resources.external.service;
- import javax.servlet.http.HttpServletRequest;
- import javax.ws.rs.POST;
- import javax.ws.rs.Path;
- import javax.ws.rs.ProduceMime;
- import org.springframework.web.context.request.RequestContextHolder;
- import org.springframework.web.context.request.ServletRequestAttributes;
- import com.formaction.Utils;
- import com.persistence.service.exception.PersistenceException;
- import com.sinosoft.am.resource.resources.external.dao.ExternalDao;
- @Path("/ExternalService/")
- public class ExternalService {
- /**
- * 界面初始化调用地址
- * @param params
- * @return
- * @throws PersistenceException
- */
- @ProduceMime("application/json")
- @POST
- @Path("/getExternalInfo")
- public String getExternalInfo(String params) throws PersistenceException {
- String id= Utils.getParameter("id", params);
- //分类
- String externaltype = Utils.getParameter("valueType", params);
- //所属单位
- String deptId = Utils.getParameter("deptId", params);
- ExternalDao dao = new ExternalDao();
- String json= dao.externalNumInit(id,externaltype,deptId);
- return json;
- }
- /**
- * 点击表格中有子节点的节点+,调用地址
- * @return
- * @throws PersistenceException
- */
- // @ProduceMime("application/json")
- // @POST
- // @Path("/getExternalInfoList")
- // public String getExternalInfoList() throws PersistenceException {
- // HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
- // String id = request.getParameter("deptId");
- // ExternalDao dao = new ExternalDao();
- // String json=dao.externalNum(id);
- // return json;
- //
- // }
- }
|