123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- package com.sinosoft.am.team.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.team.dao.InTeamDao;
- import com.sinosoft.am.team.dao.OutTeamDao;
- import com.sinosoft.am.team.dao.TeamDao;
- import com.sinosoft.am.team.dao.TeamDaoJsc;
- @Path("/TeamService/")
- public class TeamService{
- /**
- * 队伍总汇总界面初始化调用地址
- * @param params
- * @return
- * @throws PersistenceException
- */
- @ProduceMime("application/json")
- @POST
- @Path("/getTeamInfo")
- public String getTeamInfo(String params) throws PersistenceException {
- String id=Utils.getParameter("id", params);
- //系统区分(内部队伍还是外部队伍)
- String sys=Utils.getParameter("sys", params);
- //队伍类型
- String treamType=Utils.getParameter("treamType", params);
- //队伍状态
- String treamSturts=Utils.getParameter("treamSturts", params);
- //所属单位
- String deptId=Utils.getParameter("deptId", params);
-
- TeamDao dao=new TeamDao();
- String json=dao.teamNumInit(id,sys,treamType,treamSturts,deptId);
- return json;
- }
-
-
- /**
- * 驾驶舱应急队伍人员统计
- * @param params
- * @return
- * @throws PersistenceException
- */
- @ProduceMime("application/json")
- @POST
- @Path("/getTeamInfoJsc")
- public String getTeamInfoJsc(String params) throws PersistenceException {
- String id=Utils.getParameter("id", params);
- //系统区分(内部队伍还是外部队伍)
- String sys=Utils.getParameter("sys", params);
- //队伍类型
- String treamType=Utils.getParameter("treamType", params);
- //队伍状态
- String treamSturts=Utils.getParameter("treamSturts", params);
- //所属单位
- String deptId=Utils.getParameter("deptId", params);
-
- TeamDaoJsc dao=new TeamDaoJsc();
- String json=dao.teamNumInit(id,sys,treamType,treamSturts,deptId);
- return json;
- }
-
-
- /**
- * 内部队伍界面初始化调用地址
- * @param params
- * @return
- * @throws PersistenceException
- */
- @ProduceMime("application/json")
- @POST
- @Path("/getInTeamInfo")
- public String getInTeamInfo(String params) throws PersistenceException {
- String id=com.sinosoft.lz.system.Utils.getParameter("id", params);
- InTeamDao dao=new InTeamDao();
- String json=dao.teamNumInit(id);
- return json;
- }
-
- /**
- * 外部队伍界面初始化调用地址
- * @param params
- * @return
- * @throws PersistenceException
- */
- @ProduceMime("application/json")
- @POST
- @Path("/getOutTeamInfo")
- public String getOutTeamInfo(String params) throws PersistenceException {
- String id=com.sinosoft.lz.system.Utils.getParameter("id", params);
- OutTeamDao dao=new OutTeamDao();
- String json=dao.teamNumInit(id);
- return json;
- }
- /**
- * 队伍状态
- * @param params
- * @return
- */
- @ProduceMime("application/json")
- @POST
- @Path("/TeamDiaoBo")
- public Msg TeamDiaoBo(String params){//发布 应急制度文件发布
- Msg m=new Msg();
- TeamDao dao=new TeamDao();
- String fd_id=Utils.getParameter("fd_id", params)==null?"":Utils.getParameter("fd_id", params);
- String num=Utils.getParameter("num", params)==null?"":Utils.getParameter("num", params);
-
- try {
- m=dao.getTeamDiaoBo(fd_id,num);
- } catch (ClassNotFoundException e) {
- m.setSucsess(new Boolean(false).toString());
- m.setInfo(Parameter.OPER_SUCSESS);
- e.printStackTrace();
- }
- return m;
- }
-
-
- //队伍移动
- @ProduceMime("application/json")
- @POST
- @Path("/getMove")
- public Msg getMove(String params) throws Exception{
- Msg m=new Msg();
- String tablename = Utils.getParameter("tableName", params) == null ? "" : Utils.getParameter(
- "tableName", params);
- String fd_id = Utils.getParameter("fd_id", params) == null ? "" : Utils.getParameter(
- "fd_id", params);
- String mv_id = Utils.getParameter("mv_id", params) == null ? "" : Utils.getParameter(
- "mv_id", params);
- String fd_sort = Utils.getParameter("fd_sort", params) == null ? "" : Utils.getParameter(
- "fd_sort", params);
- String mv_sort = Utils.getParameter("mv_sort", params) == null ? "" : Utils.getParameter(
- "mv_sort", params);
- if(!"".equals(fd_id)){
- TeamDao dao=new TeamDao();
- m=dao.getMove(tablename,fd_id,mv_id,fd_sort,mv_sort);
- }else{
- m.setSucsess(new Boolean(false).toString());
- m.setInfo(Parameter.CREATE_FAILURE);
- }
- return m;
- }
-
-
-
- }
|