8b6b416002eb76da7a4e6eecfbe0bbffdfa3a01c.svn-base 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. package com.sinosoft.am.filemanger.standard.service;
  2. import javax.ws.rs.POST;
  3. import javax.ws.rs.Path;
  4. import javax.ws.rs.ProduceMime;
  5. import com.formaction.Parameter;
  6. import com.formaction.Utils;
  7. import com.formaction.vo.Msg;
  8. import com.persistence.service.exception.PersistenceException;
  9. import com.sinosoft.am.filemanger.standard.dao.StandardDao;
  10. @Path("/StandardService/")
  11. public class StandardService{
  12. /**
  13. * 汇总界面初始化调用地址
  14. * @param params
  15. * @return
  16. * @throws PersistenceException
  17. */
  18. @ProduceMime("application/json")
  19. @POST
  20. @Path("/getStandard")
  21. public String getStandard(String params) throws PersistenceException {
  22. String id=com.sinosoft.lz.system.Utils.getParameter("id", params);
  23. String StartTime=Utils.getParameter("StartTime", params);
  24. String EndTime=Utils.getParameter("EndTime", params);
  25. String StartTime1=Utils.getParameter("StartTime1", params);
  26. String EndTime1=Utils.getParameter("EndTime1", params);
  27. String tempLevel=Utils.getParameter("tempLevel", params);
  28. String valueType=Utils.getParameter("valueType", params);
  29. String deptId = Utils.getParameter("deptId", params);
  30. StandardDao dao = new StandardDao();
  31. String json=dao.NumInit(id,StartTime,EndTime,StartTime1,EndTime1,tempLevel,valueType,deptId);
  32. return json;
  33. }
  34. /**
  35. * 发布
  36. * @param params
  37. * @return
  38. */
  39. @ProduceMime("application/json")
  40. @POST
  41. @Path("/StandardFabu")
  42. public Msg StandardFabu(String params){//发布 应急制度文件发布
  43. Msg m=new Msg();
  44. StandardDao dao = new StandardDao();
  45. // String comp_id=Utils.getParameter("comp_id", params)==null?"":Utils.getParameter("comp_id", params);
  46. String fd_id=Utils.getParameter("fd_id", params)==null?"":Utils.getParameter("fd_id", params);
  47. try {
  48. m=dao.getStandardFabu(fd_id);
  49. } catch (ClassNotFoundException e) {
  50. m.setSucsess(new Boolean(false).toString());
  51. m.setInfo(Parameter.OPER_SUCSESS);
  52. e.printStackTrace();
  53. }
  54. return m;
  55. }
  56. /**
  57. * 撤销发布
  58. * @param params
  59. * @return
  60. */
  61. @ProduceMime("application/json")
  62. @POST
  63. @Path("/noStandardFabu")
  64. public Msg noStandardFabu(String params){//发布 应急制度文件发布
  65. Msg m=new Msg();
  66. StandardDao dao = new StandardDao();
  67. // String comp_id=Utils.getParameter("comp_id", params)==null?"":Utils.getParameter("comp_id", params);
  68. String fd_id=Utils.getParameter("fd_id", params)==null?"":Utils.getParameter("fd_id", params);
  69. try {
  70. m=dao.getnoStandardFabu(fd_id);
  71. } catch (ClassNotFoundException e) {
  72. m.setSucsess(new Boolean(false).toString());
  73. m.setInfo(Parameter.OPER_SUCSESS);
  74. e.printStackTrace();
  75. }
  76. return m;
  77. }
  78. /**
  79. * 共享
  80. * @param params
  81. * @return
  82. */
  83. @ProduceMime("application/json")
  84. @POST
  85. @Path("/StandardShare")
  86. public Msg StandardShare(String params){//发布 应急制度文件发布
  87. Msg m=new Msg();
  88. StandardDao dao = new StandardDao();
  89. // String comp_id=Utils.getParameter("comp_id", params)==null?"":Utils.getParameter("comp_id", params);
  90. String fd_id=Utils.getParameter("fd_id", params)==null?"":Utils.getParameter("fd_id", params);
  91. try {
  92. m=dao.getStandardShare(fd_id);
  93. } catch (ClassNotFoundException e) {
  94. m.setSucsess(new Boolean(false).toString());
  95. m.setInfo(Parameter.OPER_SUCSESS);
  96. e.printStackTrace();
  97. }
  98. return m;
  99. }
  100. /**
  101. * 撤销共享
  102. * @param params
  103. * @return
  104. */
  105. @ProduceMime("application/json")
  106. @POST
  107. @Path("/noStandardShare")
  108. public Msg noStandardShare(String params){//发布 应急制度文件发布
  109. Msg m=new Msg();
  110. StandardDao dao = new StandardDao();
  111. // String comp_id=Utils.getParameter("comp_id", params)==null?"":Utils.getParameter("comp_id", params);
  112. String fd_id=Utils.getParameter("fd_id", params)==null?"":Utils.getParameter("fd_id", params);
  113. try {
  114. m=dao.getnoStandardShare(fd_id);
  115. } catch (ClassNotFoundException e) {
  116. m.setSucsess(new Boolean(false).toString());
  117. m.setInfo(Parameter.OPER_SUCSESS);
  118. e.printStackTrace();
  119. }
  120. return m;
  121. }
  122. }