123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- package com.sinosoft.am.filemanger.standard.service;
- import javax.ws.rs.POST;
- import javax.ws.rs.Path;
- import javax.ws.rs.ProduceMime;
- import com.formaction.Parameter;
- import com.formaction.Utils;
- import com.formaction.vo.Msg;
- import com.persistence.service.exception.PersistenceException;
- import com.sinosoft.am.filemanger.standard.dao.StandardDao;
- @Path("/StandardService/")
- public class StandardService{
- /**
- * 汇总界面初始化调用地址
- * @param params
- * @return
- * @throws PersistenceException
- */
- @ProduceMime("application/json")
- @POST
- @Path("/getStandard")
- public String getStandard(String params) throws PersistenceException {
- String id=com.sinosoft.lz.system.Utils.getParameter("id", params);
-
- String StartTime=Utils.getParameter("StartTime", params);
- String EndTime=Utils.getParameter("EndTime", params);
- String StartTime1=Utils.getParameter("StartTime1", params);
- String EndTime1=Utils.getParameter("EndTime1", params);
- String tempLevel=Utils.getParameter("tempLevel", params);
- String valueType=Utils.getParameter("valueType", params);
- String deptId = Utils.getParameter("deptId", params);
-
- StandardDao dao = new StandardDao();
- String json=dao.NumInit(id,StartTime,EndTime,StartTime1,EndTime1,tempLevel,valueType,deptId);
- return json;
- }
- /**
- * 发布
- * @param params
- * @return
- */
- @ProduceMime("application/json")
- @POST
- @Path("/StandardFabu")
- public Msg StandardFabu(String params){//发布 应急制度文件发布
- Msg m=new Msg();
- StandardDao dao = new StandardDao();
- // String comp_id=Utils.getParameter("comp_id", params)==null?"":Utils.getParameter("comp_id", params);
- String fd_id=Utils.getParameter("fd_id", params)==null?"":Utils.getParameter("fd_id", params);
-
- try {
- m=dao.getStandardFabu(fd_id);
- } catch (ClassNotFoundException e) {
- m.setSucsess(new Boolean(false).toString());
- m.setInfo(Parameter.OPER_SUCSESS);
- e.printStackTrace();
- }
- return m;
- }
-
- /**
- * 撤销发布
- * @param params
- * @return
- */
- @ProduceMime("application/json")
- @POST
- @Path("/noStandardFabu")
- public Msg noStandardFabu(String params){//发布 应急制度文件发布
- Msg m=new Msg();
- StandardDao dao = new StandardDao();
- // String comp_id=Utils.getParameter("comp_id", params)==null?"":Utils.getParameter("comp_id", params);
- String fd_id=Utils.getParameter("fd_id", params)==null?"":Utils.getParameter("fd_id", params);
-
- try {
- m=dao.getnoStandardFabu(fd_id);
- } catch (ClassNotFoundException e) {
- m.setSucsess(new Boolean(false).toString());
- m.setInfo(Parameter.OPER_SUCSESS);
- e.printStackTrace();
- }
- return m;
- }
-
-
- /**
- * 共享
- * @param params
- * @return
- */
- @ProduceMime("application/json")
- @POST
- @Path("/StandardShare")
- public Msg StandardShare(String params){//发布 应急制度文件发布
- Msg m=new Msg();
- StandardDao dao = new StandardDao();
- // String comp_id=Utils.getParameter("comp_id", params)==null?"":Utils.getParameter("comp_id", params);
- String fd_id=Utils.getParameter("fd_id", params)==null?"":Utils.getParameter("fd_id", params);
-
- try {
- m=dao.getStandardShare(fd_id);
- } catch (ClassNotFoundException e) {
- m.setSucsess(new Boolean(false).toString());
- m.setInfo(Parameter.OPER_SUCSESS);
- e.printStackTrace();
- }
- return m;
- }
-
- /**
- * 撤销共享
- * @param params
- * @return
- */
- @ProduceMime("application/json")
- @POST
- @Path("/noStandardShare")
- public Msg noStandardShare(String params){//发布 应急制度文件发布
- Msg m=new Msg();
- StandardDao dao = new StandardDao();
- // String comp_id=Utils.getParameter("comp_id", params)==null?"":Utils.getParameter("comp_id", params);
- String fd_id=Utils.getParameter("fd_id", params)==null?"":Utils.getParameter("fd_id", params);
-
- try {
- m=dao.getnoStandardShare(fd_id);
- } catch (ClassNotFoundException e) {
- m.setSucsess(new Boolean(false).toString());
- m.setInfo(Parameter.OPER_SUCSESS);
- e.printStackTrace();
- }
- return m;
- }
-
- }
|