ccde50c0fd9db57cdfeaa16365874f368f223425.svn-base 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package com.sinosoft.am.resource.resources.external.service;
  2. import javax.servlet.http.HttpServletRequest;
  3. import javax.ws.rs.POST;
  4. import javax.ws.rs.Path;
  5. import javax.ws.rs.ProduceMime;
  6. import org.springframework.web.context.request.RequestContextHolder;
  7. import org.springframework.web.context.request.ServletRequestAttributes;
  8. import com.formaction.Utils;
  9. import com.persistence.service.exception.PersistenceException;
  10. import com.sinosoft.am.resource.resources.external.dao.ExternalDao;
  11. @Path("/ExternalService/")
  12. public class ExternalService {
  13. /**
  14. * 界面初始化调用地址
  15. * @param params
  16. * @return
  17. * @throws PersistenceException
  18. */
  19. @ProduceMime("application/json")
  20. @POST
  21. @Path("/getExternalInfo")
  22. public String getExternalInfo(String params) throws PersistenceException {
  23. String id= Utils.getParameter("id", params);
  24. //分类
  25. String externaltype = Utils.getParameter("valueType", params);
  26. //所属单位
  27. String deptId = Utils.getParameter("deptId", params);
  28. ExternalDao dao = new ExternalDao();
  29. String json= dao.externalNumInit(id,externaltype,deptId);
  30. return json;
  31. }
  32. /**
  33. * 点击表格中有子节点的节点+,调用地址
  34. * @return
  35. * @throws PersistenceException
  36. */
  37. // @ProduceMime("application/json")
  38. // @POST
  39. // @Path("/getExternalInfoList")
  40. // public String getExternalInfoList() throws PersistenceException {
  41. // HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
  42. // String id = request.getParameter("deptId");
  43. // ExternalDao dao = new ExternalDao();
  44. // String json=dao.externalNum(id);
  45. // return json;
  46. //
  47. // }
  48. }