200155da44d9339e20a9b74f048e8e4ccc1c5a36.svn-base 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package com.sinosoft.em.baobiao.rcbb.service;
  2. import javax.ws.rs.POST;
  3. import javax.ws.rs.Path;
  4. import javax.ws.rs.ProduceMime;
  5. import com.formaction.Utils;
  6. import com.sinosoft.em.baobiao.rcbb.dao.RcBaoBiaoDao;
  7. @Path("/RcBaoBiaoService/")
  8. public class RcBaoBiaoService {
  9. private RcBaoBiaoDao dao = null;
  10. public RcBaoBiaoService(){
  11. this.dao = new RcBaoBiaoDao();
  12. }
  13. @ProduceMime("application/json")
  14. @POST
  15. @Path("/getHuiZongData")
  16. public String getHuiZongData(String params){
  17. String compId=Utils.getParameter("compId", params)==null?"":Utils.getParameter("compId", params);
  18. String report_type=Utils.getParameter("report_type", params)==null?"":Utils.getParameter("report_type", params);
  19. String compName=Utils.getParameter("compName", params)==null?"":Utils.getParameter("compName", params);
  20. String year=Utils.getParameter("year", params)==null?"":Utils.getParameter("year", params);
  21. String season=Utils.getParameter("season", params)==null?"":Utils.getParameter("season", params);
  22. String reporter_id=Utils.getParameter("reporter_id", params)==null?"":Utils.getParameter("reporter_id", params);
  23. return dao.getHuiZongData(report_type,season,year,compId,compName,reporter_id);
  24. }
  25. @ProduceMime("application/json")
  26. @POST
  27. @Path("/RollBack")
  28. public String RollBack(String params){
  29. String fdId=Utils.getParameter("fdId", params)==null?"":Utils.getParameter("fdId", params);
  30. String reason=Utils.getParameter("reason", params)==null?"":Utils.getParameter("reason", params);
  31. return dao.rollBack(fdId, reason);
  32. }
  33. @ProduceMime("application/json")
  34. @POST
  35. @Path("/getRollStat")
  36. public String getRollStat(String params){
  37. String fdId=Utils.getParameter("fdId", params)==null?"":Utils.getParameter("fdId", params);
  38. return dao.getRollStat(fdId);
  39. }
  40. @ProduceMime("application/json")
  41. @POST
  42. @Path("/getRollBackTip")
  43. public String getRollBackTip(String params){
  44. String fdId=Utils.getParameter("fdId", params)==null?"":Utils.getParameter("fdId", params);
  45. return dao.getRollBackTip(fdId);
  46. }
  47. @ProduceMime("application/json")
  48. @POST
  49. @Path("/updateRollStat")
  50. public String updateRollStat(String params){
  51. String fdId=Utils.getParameter("fd_id", params)==null?"":Utils.getParameter("fd_id", params);
  52. String stat=Utils.getParameter("stat", params)==null?"0":Utils.getParameter("stat", params);
  53. return dao.updateRollStat(fdId,stat);
  54. }
  55. @ProduceMime("application/text")
  56. @POST
  57. @Path("/getSaveReport")
  58. public String getSaveReport(String params){
  59. String year=Utils.getParameter("year", params)==null?"":Utils.getParameter("year", params);
  60. String quary = Utils.getParameter("quary", params)==null?"":Utils.getParameter("quary", params);
  61. String comp_id = Utils.getParameter("comp_id", params)==null?"":Utils.getParameter("comp_id", params);
  62. String user_id = Utils.getParameter("user_id", params)==null?"":Utils.getParameter("user_id", params);
  63. String report_type = Utils.getParameter("report_type", params)==null?"":Utils.getParameter("report_type", params);
  64. String fd_objectid= dao.getSaveReport(year, quary, report_type, comp_id, user_id);
  65. return fd_objectid;
  66. }
  67. }