Browse Source

接口

git-svn-id: https://192.168.57.71/svn/lyggkj@105 1a6f6e3a-4066-fe46-b609-79c204482ece
ld_liufl 9 years ago
parent
commit
cd1a8b6c4e

+ 0 - 4
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/check/DcZxjcEntity.java

@@ -106,7 +106,6 @@ public class DcZxjcEntity extends BaseEntity<Long> implements Cloneable {
 	}
 
 	@Transient
-	@XmlTransient
 	public Integer getYhs() {
 		return yhs;
 	}
@@ -116,7 +115,6 @@ public class DcZxjcEntity extends BaseEntity<Long> implements Cloneable {
 	}
 
 	@Transient
-	@XmlTransient
 	public Integer getZgs() {
 		return zgs;
 	}
@@ -126,7 +124,6 @@ public class DcZxjcEntity extends BaseEntity<Long> implements Cloneable {
 	}
 
 	@Transient
-	@XmlTransient
 	public String getZgl() {
 		return zgl;
 	}
@@ -136,7 +133,6 @@ public class DcZxjcEntity extends BaseEntity<Long> implements Cloneable {
 	}
 
 	@Transient
-	@XmlTransient
 	public Double getZgzj() {
 		return zgzj;
 	}

+ 338 - 43
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/yjgl/YjglWebService.java

@@ -1,5 +1,6 @@
 package com.jtgh.yjpt.webService.yjgl;
 
+import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -10,15 +11,20 @@ import javax.jws.WebService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.jpa.domain.Specification;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 import org.springframework.stereotype.Service;
 
+import com.jtgh.yjpt.client.yjzyxxgl.sgalgl.SgalglWebService;
+import com.jtgh.yjpt.common.Constants;
 import com.jtgh.yjpt.common.PredicateModel;
 import com.jtgh.yjpt.common.PredicateModel.Operator;
+import com.jtgh.yjpt.common.GlobalData;
 import com.jtgh.yjpt.common.SinglePageRequest;
 import com.jtgh.yjpt.common.SpecificationCreater;
 import com.jtgh.yjpt.common.Utils;
 import com.jtgh.yjpt.controller.BaseController;
 import com.jtgh.yjpt.entity.BaseEntity;
+import com.jtgh.yjpt.entity.auth.UserEntity;
 import com.jtgh.yjpt.entity.sgalgl.SgalglEntity;
 import com.jtgh.yjpt.entity.sgalgl.SgalglwzddEntity;
 import com.jtgh.yjpt.entity.yjgl.YjpxEntity;
@@ -40,9 +46,10 @@ import com.jtgh.yjpt.webService.WsResult;
  */
 @Service
 @WebService(targetNamespace = "http://webService.yjpt.com/", serviceName = "yjglService")
-@HandlerChain(file="handle-chain.xml")
+@HandlerChain(file = "handle-chain.xml")
 public class YjglWebService extends BaseController {
-
+	@Autowired
+	private ThreadPoolTaskExecutor threadPool;
 	@Autowired
 	private YjpxService yjpxService;
 	@Autowired
@@ -53,19 +60,19 @@ public class YjglWebService extends BaseController {
 	private SgalglService sgalglService;
 	@Autowired
 	private YjwzFlxxService yjwzFlxxService;
-	
 
 	/**
 	 * 保存应急培训
+	 * 
 	 * @param entity
 	 * @return
 	 */
 	public YjpxEntity saveYjpx(YjpxEntity entity) {
-		if(entity.getId()==null || entity.getId().equals(0l)){
+		if (entity.getId() == null || entity.getId().equals(0l)) {
 			entity.setAddDate(new Date());
 			entity.setAddUser(Utils.getWebServiceUser());
 			entity.setRecordCode("90");
-		}else {
+		} else {
 			YjpxEntity vo = yjpxService.findOne(entity.getId());
 			entity.setAddDate(vo.getAddDate());
 			entity.setAddUser(vo.getAddUser());
@@ -81,45 +88,108 @@ public class YjglWebService extends BaseController {
 		entity = yjpxService.saveEntity(entity);
 		return entity;
 	}
-	
-	
+
 	/**
 	 * 删除应急培训
+	 * 
 	 * @param entities
 	 */
-	public WsResult deleteYjpx(YjpxEntity entity){	
+	public WsResult deleteYjpx(YjpxEntity entity) {
 		WsResult ws = new WsResult();
 		try {
-			if(entity.getId()!=null)
+			if (entity.getId() != null)
 				yjpxService.logicDeleteEntity(entity);
 			ws.setResultCode(WsResult.SUCCESS);
 		} catch (Exception e) {
 			e.printStackTrace();
 			ws.setResultCode(WsResult.FAILURE);
 		}
-		return ws;	
+		return ws;
 	}
-	
+
 	/**
 	 * 查询应急培训详细信息
+	 * 
 	 * @param id
 	 * @return
 	 */
-	public YjpxEntity findYjpxById(Long id){
+	public YjpxEntity findYjpxById(Long id) {
 		YjpxEntity entity = yjpxService.findOne(id);
-		return  entity;		
+		return entity;
 	}
+
+	/**
+	 * 应急培训的分页列表
+	 * 
+	 * @param pxmc
+	 * @param beginDate
+	 * @param endDate
+	 * @param szd
+	 * @param gq
+	 * @param lb
+	 * @return
+	 */
+	public List<YjpxEntity> getYjpxPageListByParam(String pxmc, String qymc,
+			String pxdd, Date beginDate, Date endDate, Long szd, Long gq,
+			String lb, int n, int pageCount) {
+		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
+		// 根据培训名称过滤
+		addNotEmptyModel(filterList, "pxmc", pxmc, Operator.LIKE);
+		// 所在地
+		addNotEmptyModel(filterList, "szd.id", szd, Operator.LIKE_R);
+		// 根据机构名称
+		addNotEmptyModel(filterList, "qymc.gkjyr", qymc, Operator.LIKE);
+		// 培训地点
+		addNotEmptyModel(filterList, "pxdd", pxdd, Operator.LIKE);
+
+		addNotEmptyModel(filterList, "byzd1", lb, Operator.EQ);
+		// 港区
+		addNotEmptyModel(filterList, "gq", gq, Operator.EQ);
+		// 开始时间
+		addNotEmptyModel(filterList, "pxsj", Utils.getDateFirstTime(beginDate),
+				Operator.GTE);
+		// 结束时间
+		addNotEmptyModel(filterList, "pxsj", Utils.getDateLastTime(endDate),
+				Operator.LTE);
+		// 只检索非删除状态记录
+		addNotEmptyModel(filterList, "recordStatus",
+				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+		// 根据当前登录用户的经营人信息判断它是否为经营人
+		if (Utils.getWebServiceUser() != null) {
+			UserEntity user = Utils.getWebServiceUser();
+			// 经营人只能查自己的
+			if (Constants.YES.equals(user.getSfjyr())
+					&& user.getJyrjcxx() != null) {
+				addNotEmptyModel(filterList, "qymc", user.getJyrjcxx(),
+						Operator.EQ);
+			} else {
+				// 行政人员根据权限过滤(培训列表菜单ID=15)
+				addRecordCodeFilter(15l, filterList);
+			}
+		}
+		Specification<YjpxEntity> spec = SpecificationCreater
+				.searchByPredicateModels(filterList);
+		SinglePageRequest pageable = new SinglePageRequest(pageCount, n,
+				"desc", "id");
+		Page<YjpxEntity> list = yjpxService.findAll(spec, pageable);
+		if (list == null || list.getTotalPages() <= pageCount) {
+			return new ArrayList<YjpxEntity>();
+		}
+		return list.getContent();
+	}
+
 	/**
 	 * 保存应急演习
+	 * 
 	 * @param entity
 	 * @return
 	 */
 	public YjyxEntity saveYjyx(YjyxEntity entity) {
-		if(entity.getId()==null || entity.getId().equals(0l)){
+		if (entity.getId() == null || entity.getId().equals(0l)) {
 			entity.setAddDate(new Date());
 			entity.setAddUser(Utils.getWebServiceUser());
 			entity.setRecordCode("90");
-		}else {
+		} else {
 			YjyxEntity vo = yjyxService.findById(entity.getId());
 			entity.setAddDate(vo.getAddDate());
 			entity.setAddUser(vo.getAddUser());
@@ -135,45 +205,108 @@ public class YjglWebService extends BaseController {
 		entity = yjyxService.saveEntity(entity);
 		return entity;
 	}
-	
-	
+
 	/**
 	 * 删除应急演习
+	 * 
 	 * @param entities
 	 */
-	public WsResult deleteYjyx(YjyxEntity entity){	
+	public WsResult deleteYjyx(YjyxEntity entity) {
 		WsResult ws = new WsResult();
 		try {
-			if(entity.getId()!=null)
+			if (entity.getId() != null)
 				yjyxService.logicDeleteEntity(entity);
 			ws.setResultCode(WsResult.SUCCESS);
 		} catch (Exception e) {
 			e.printStackTrace();
 			ws.setResultCode(WsResult.FAILURE);
 		}
-		return ws;	
+		return ws;
 	}
-	
+
 	/**
 	 * 查询应急演习详细信息
+	 * 
 	 * @param id
 	 * @return
 	 */
-	public YjyxEntity findYjyxById(Long id){
+	public YjyxEntity findYjyxById(Long id) {
 		YjyxEntity entity = yjyxService.findById(id);
-		return  entity;		
+		return entity;
 	}
+
+	/**
+	 * 应急演习分页查询
+	 * 
+	 * @param yxmc
+	 * @param qymc
+	 * @param yxdd
+	 * @param beginDate
+	 * @param endDate
+	 * @param szd
+	 * @param gq
+	 * @param n
+	 * @param pageCount
+	 * @return
+	 */
+	public List<YjyxEntity> getYjyxPageListByParam(String yxmc, String qymc,
+			String yxdd, Date beginDate, Date endDate, Long szd, Long gq,
+			int n, int pageCount) {
+		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
+		// 根据演习名称过滤
+		addNotEmptyModel(filterList, "yxmc", yxmc, Operator.LIKE);
+		// 根据机构名称
+		addNotEmptyModel(filterList, "qymc.gkjyr", qymc, Operator.LIKE);
+		// 演习地点
+		addNotEmptyModel(filterList, "yxdd", yxdd, Operator.LIKE);
+		// 所在地
+		addNotEmptyModel(filterList, "szd.id", szd, Operator.LIKE_R);
+		// 港区
+		addNotEmptyModel(filterList, "gq", gq, Operator.EQ);
+		// 开始时间
+		addNotEmptyModel(filterList, "yxsj", Utils.getDateFirstTime(beginDate),
+				Operator.GTE);
+		// 结束时间
+		addNotEmptyModel(filterList, "yxsj", Utils.getDateLastTime(endDate),
+				Operator.LTE);
+		// 只检索非删除状态记录
+		addNotEmptyModel(filterList, "recordStatus",
+				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+		if (Utils.getWebServiceUser() != null) {
+			UserEntity user = Utils.getWebServiceUser();
+			// 经营人只能查自己的
+			if (Constants.YES.equals(user.getSfjyr())
+					&& user.getJyrjcxx() != null) {
+				addNotEmptyModel(filterList, "qymc", user.getJyrjcxx(),
+						Operator.EQ);
+			} else {
+				// 行政人员根据权限过滤(演习列表菜单ID=16)
+				addRecordCodeFilter(16l, filterList);
+			}
+		}
+		Specification<YjyxEntity> spec = SpecificationCreater
+				.searchByPredicateModels(filterList);
+		SinglePageRequest pageable = new SinglePageRequest(pageCount, n,
+				"desc", "id");
+		Page<YjyxEntity> list = yjyxService.findAll(spec, pageable);
+		if (list == null || list.getTotalPages() <= pageCount) {
+			return new ArrayList<YjyxEntity>();
+		}
+		return list.getContent();
+	}
+
 	/**
 	 * 保存应急演练
+	 * 
 	 * @param entity
 	 * @return
 	 */
 	public YjylEntity saveYjyl(YjylEntity entity) {
-		if(entity.getId()==null || entity.getId().equals(0l)){
+		if (entity.getId() == null || entity.getId().equals(0l)) {
 			entity.setAddDate(new Date());
 			entity.setAddUser(Utils.getWebServiceUser());
 			entity.setRecordCode("90");
-		}else {
+		} else {
 			YjylEntity vo = yjylService.findById(entity.getId());
 			entity.setAddDate(vo.getAddDate());
 			entity.setAddUser(vo.getAddUser());
@@ -189,47 +322,108 @@ public class YjglWebService extends BaseController {
 		entity = yjylService.saveEntity(entity);
 		return entity;
 	}
+
 	
-	
+
 	/**
+	 * 查询应急演练详细信息/**
 	 * 删除应急演练
+	 * 
 	 * @param entities
 	 */
-	public WsResult deleteYjyl(YjylEntity entity){	
+	public WsResult deleteYjyl(YjylEntity entity) {
 		WsResult ws = new WsResult();
 		try {
-			if(entity.getId()!=null)
+			if (entity.getId() != null)
 				yjylService.logicDeleteEntity(entity);
 			ws.setResultCode(WsResult.SUCCESS);
 		} catch (Exception e) {
 			e.printStackTrace();
 			ws.setResultCode(WsResult.FAILURE);
 		}
-		return ws;	
+		return ws;
 	}
 	
-	/**
-	 * 查询应急演练详细信息
+	/* * 
 	 * @param id
 	 * @return
 	 */
-	public YjylEntity findYjylById(Long id){
+	public YjylEntity findYjylById(Long id) {
 		YjylEntity entity = yjylService.findById(id);
-		return  entity;		
+		return entity;
 	}
-	
+
+	/**
+	 * 应急演练分页查询
+	 * 
+	 * @param ylmc
+	 * @param beginDate
+	 * @param endDate
+	 * @param szd
+	 * @param gq
+	 * @param n
+	 * @param pageCount
+	 * @return
+	 */
+	public List<YjylEntity> getYjylPageListByParam(String ylmc, String qymc,
+			String yldd, Date beginDate, Date endDate, Long szd, Long gq,
+			int n, int pageCount) {
+		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
+		// 根据演练名称过滤
+		addNotEmptyModel(filterList, "ylmc", ylmc, Operator.LIKE);
+		addNotEmptyModel(filterList, "szd.id", szd, Operator.LIKE_R);
+		// 根据机构名称
+		addNotEmptyModel(filterList, "qymc.gkjyr", qymc, Operator.LIKE);
+		// 演练地点
+		addNotEmptyModel(filterList, "yldd", yldd, Operator.LIKE);
+		// 港区
+		addNotEmptyModel(filterList, "gq", gq, Operator.EQ);
+		// 开始时间
+		addNotEmptyModel(filterList, "ylsj", Utils.getDateFirstTime(beginDate),
+				Operator.GTE);
+		// 结束时间
+		addNotEmptyModel(filterList, "ylsj", Utils.getDateLastTime(endDate),
+				Operator.LTE);
+		// 只检索非删除状态记录
+		addNotEmptyModel(filterList, "recordStatus",
+				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+		if (Utils.getWebServiceUser() != null) {
+			UserEntity user = Utils.getWebServiceUser();
+			// 经营人只能查自己的
+			if (Constants.YES.equals(user.getSfjyr())
+					&& user.getJyrjcxx() != null) {
+				addNotEmptyModel(filterList, "qymc", user.getJyrjcxx(),
+						Operator.EQ);
+			} else {
+				// 行政人员根据权限过滤(演练列表菜单ID=17)
+				addRecordCodeFilter(17l, filterList);
+			}
+		}
+		Specification<YjylEntity> spec = SpecificationCreater
+				.searchByPredicateModels(filterList);
+		SinglePageRequest pageable = new SinglePageRequest(pageCount, n,
+				"desc", "id");
+		Page<YjylEntity> list = yjylService.findAll(spec, pageable);
+		if (list == null || list.getTotalPages() <= pageCount) {
+			return new ArrayList<YjylEntity>();
+		}
+		return list.getContent();
+	}
+
 	/**
 	 * 保存事故案例
+	 * 
 	 * @param entity
 	 * @param saveList
 	 * @return
 	 */
-	public SgalglEntity saveSgal(SgalglEntity entity,List<SgalglwzddEntity> saveList){
-		if(entity.getId()==null || entity.getId().equals(0l)){
+	public SgalglEntity saveSgal(SgalglEntity entity,
+			List<SgalglwzddEntity> saveList) {
+		if (entity.getId() == null || entity.getId().equals(0l)) {
 			entity.setAddDate(new Date());
 			entity.setAddUser(Utils.getWebServiceUser());
 			entity.setRecordCode("90");
-		}else {
+		} else {
 			SgalglEntity vo = sgalglService.findOne(entity.getId());
 			entity.setAddDate(vo.getAddDate());
 			entity.setAddUser(vo.getAddUser());
@@ -245,10 +439,111 @@ public class YjglWebService extends BaseController {
 		entity = sgalglService.save(entity, saveList);
 		return entity;
 	}
+
+	/**
+	 * 获取事故案例 详细 信息
+	 * 
+	 * @param id
+	 * @return
+	 */
+	public SgalglEntity findSgalById(Long id) {
+		return sgalglService.findOne(id);
+	}
+
+	/**
+	 * 获取应急事故的分页列表
+	 * 
+	 * @param sglx
+	 * @param sgdj
+	 * @param szd
+	 * @param gq
+	 * @param dwmc
+	 * @param fzr
+	 * @param n
+	 * @param pageCount
+	 * @return
+	 * @throws ParseException
+	 */
+	public List<SgalglEntity> getSgalPageListByParam(Long sglx, Long sgdj,
+			Long szd, Long gq, Long dwmc, String fzr, int n, int pageCount) {
+		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
+		// 根据事故类别过滤
+		addNotEmptyModel(filterList, "sglx", sglx, Operator.EQ);
+		// 根据事故等级过滤
+		addNotEmptyModel(filterList, "sgdj", sgdj, Operator.EQ);
+		addNotEmptyModel(filterList, "szd.id", szd, Operator.LIKE_R);
+		addNotEmptyModel(filterList, "gq", gq, Operator.EQ);
+		addNotEmptyModel(filterList, "sgdwmc.id", dwmc, Operator.EQ);
+		addNotEmptyModel(filterList, "chargeman", fzr, Operator.LIKE);
+		addNotEmptyModel(filterList, "recordStatus",
+				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+		if (Utils.getWebServiceUser() != null) {
+			UserEntity user = Utils.getWebServiceUser();
+			// 经营人只能查自己的
+			if (Constants.YES.equals(user.getSfjyr())
+					&& user.getJyrjcxx() != null) {
+				addNotEmptyModel(filterList, "sgdwmc", user.getJyrjcxx(),
+						Operator.EQ);
+			} else {
+				// 行政人员根据权限过滤(事故案例列表菜单ID=18)
+				addRecordCodeFilter(18l, filterList);
+			}
+		}
+		Specification<SgalglEntity> spec = SpecificationCreater
+				.searchByPredicateModels(filterList);
+		SinglePageRequest pageable = new SinglePageRequest(pageCount, n,
+				"desc", "id");
+		Page<SgalglEntity> pageList = sgalglService.findAll(spec, pageable);
+		if (pageList == null || pageList.getTotalPages() <= pageCount) {
+			return new ArrayList<SgalglEntity>();
+		}
+		return pageList.getContent();
+
+	}
 	
-	
+	/**
+	 * 删除事故案例
+	 * 
+	 * @param entities
+	 */
+	public WsResult deleteSgal(final SgalglEntity entity) {
+		WsResult ws = new WsResult();
+		try {
+			if (entity.getId() != null)
+			{
+				sgalglService.logicDelete(entity.getId());
+				// 数据同步
+				if (Constants.DEPLOY_MODE_CITY.equals(GlobalData.DEPLOY_MODE)
+						&& Constants.YES.equals(GlobalData.JAXWS_SYNC)) {
+					Thread thread = new Thread(new Runnable() {
+						@Override
+						public void run() {
+							SgalglWebService webService = sgalglService
+									.getWebService();
+							if (webService != null) {
+									webService.delete(entity);
+									entity.setTbzt(Constants.YES);
+									sgalglService.save(entity);
+							} else {
+									entity.setTbzt(Constants.NO);
+									sgalglService.save(entity);
+							}
+						}
+					});
+					threadPool.execute(thread);
+				}
+			}
+			ws.setResultCode(WsResult.SUCCESS);
+		} catch (Exception e) {
+			e.printStackTrace();
+			ws.setResultCode(WsResult.FAILURE);
+		}
+		return ws;
+	}
+
 	/**
 	 * 获取应急物资分页列表
+	 * 
 	 * @param gkdw
 	 * @param dw
 	 * @param ssmc
@@ -256,8 +551,8 @@ public class YjglWebService extends BaseController {
 	 * @param pageCount
 	 * @return
 	 */
-	public List<YjwzFlxxEntity> queryWzzz(Long gkdw, String dw,
-			String ssmc,int n,int pageCount) {
+	public List<YjwzFlxxEntity> queryWzzz(Long gkdw, String dw, String ssmc,
+			int n, int pageCount) {
 		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
 		// 根据事故类别过滤
 		if (0l != gkdw) {
@@ -273,10 +568,10 @@ public class YjglWebService extends BaseController {
 				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
 		Specification<YjwzFlxxEntity> spec = SpecificationCreater
 				.searchByPredicateModels(filterList);
-		SinglePageRequest pageable = new SinglePageRequest(pageCount, n, "desc",
-				"id");
+		SinglePageRequest pageable = new SinglePageRequest(pageCount, n,
+				"desc", "id");
 		Page<YjwzFlxxEntity> list = yjwzFlxxService.findAll(spec, pageable);
-		if(list==null || list.getTotalPages()<=pageCount){
+		if (list == null || list.getTotalPages() <= pageCount) {
 			return new ArrayList<YjwzFlxxEntity>();
 		}
 		return list.getContent();

+ 111 - 1
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/yjzyxxgl/YjzyxxglWebService.java

@@ -1,6 +1,7 @@
 package com.jtgh.yjpt.webService.yjzyxxgl;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 
@@ -10,9 +11,12 @@ import javax.jws.WebService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.jpa.domain.Specification;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 import org.springframework.stereotype.Service;
 
+import com.jtgh.yjpt.client.yjzyxxgl.yjzjk.YjzjkWebService;
 import com.jtgh.yjpt.common.Constants;
+import com.jtgh.yjpt.common.GlobalData;
 import com.jtgh.yjpt.common.PredicateModel;
 import com.jtgh.yjpt.common.PredicateModel.Operator;
 import com.jtgh.yjpt.common.SinglePageRequest;
@@ -38,6 +42,7 @@ import com.jtgh.yjpt.service.yjzyxxgl.YjwzFlxxService;
 import com.jtgh.yjpt.service.yjzyxxgl.YjwzxxService;
 import com.jtgh.yjpt.service.yjzyxxgl.YjzjkService;
 import com.jtgh.yjpt.service.yjzyxxgl.ZyyjjydwService;
+import com.jtgh.yjpt.webService.WsResult;
 
 /**
  * 应急资源WebService
@@ -49,7 +54,8 @@ import com.jtgh.yjpt.service.yjzyxxgl.ZyyjjydwService;
 @WebService(targetNamespace = "http://webService.yjpt.com/", serviceName = "yjzyxxglService")
 @HandlerChain(file = "handle-chain.xml")
 public class YjzyxxglWebService extends BaseController {
-
+	@Autowired
+	private ThreadPoolTaskExecutor threadPool;
 	@Autowired
 	private YjwzFlxxService yjwzFlxxService;
 	@Autowired
@@ -165,6 +171,51 @@ public class YjzyxxglWebService extends BaseController {
 		}
 		return entity;
 	}
+	
+	/**
+	 * 删除应急队伍
+	 * 
+	 * @param entitie
+	 */
+	public WsResult deleteYjzjk(final YjzjkEntity entity) {
+		WsResult ws = new WsResult();
+		try {
+			if (entity.getId() != null){
+				yjzjkService.logicDeleteEntity(entity);
+				entity.setRecordStatus(BaseEntity.RECORD_STATE_DELETE);
+				if (Constants.DEPLOY_MODE_CITY.equals(GlobalData.DEPLOY_MODE)
+						&& Constants.YES.equals(GlobalData.JAXWS_SYNC)) {
+					Thread thread = new Thread(new Runnable() {
+						@Override
+						public void run() {
+							try {
+								YjzjkWebService webService = yjzjkService
+										.getWebService();
+								if (null != webService) {
+									webService.logicDelete(entity);
+									entity.setTbzt(Constants.YES);
+									yjzjkService.save(entity);
+								} else {
+									entity.setTbzt(Constants.NO);
+									yjzjkService.save(entity);
+								}
+							} catch (Exception e) {
+								e.printStackTrace();
+								entity.setTbzt(Constants.NO);
+								yjzjkService.save(entity);
+							}
+						}
+					});
+					threadPool.execute(thread);
+				}
+			}		
+			ws.setResultCode(WsResult.SUCCESS);
+		} catch (Exception e) {
+			e.printStackTrace();
+			ws.setResultCode(WsResult.FAILURE);
+		}
+		return ws;
+	}
 
 	/**
 	 * 获取应急物资分页信息
@@ -255,6 +306,25 @@ public class YjzyxxglWebService extends BaseController {
 		}
 		return entity;
 	}
+	
+	/**
+	 * 删除应急队伍
+	 * 
+	 * @param entitie
+	 */
+	public WsResult deleteYjwz(YjwzxxEntity entity) {
+		WsResult ws = new WsResult();
+		try {
+			if (entity.getId() != null){
+				yjwzxxService.logicDeleteEntity(entity);
+			}		
+			ws.setResultCode(WsResult.SUCCESS);
+		} catch (Exception e) {
+			e.printStackTrace();
+			ws.setResultCode(WsResult.FAILURE);
+		}
+		return ws;
+	}
 
 	/**
 	 * 根据应急物资获取应急物资设施详细信息列表
@@ -371,6 +441,27 @@ public class YjzyxxglWebService extends BaseController {
 		ZyyjjydwEntity entity = zyjjydwService.findOne(id);
 		return entity;
 	}
+	
+	/**
+	 * 删除应急队伍
+	 * 
+	 * @param entitie
+	 */
+	public WsResult deleteYjdw(ZyyjjydwEntity entity) {
+		WsResult ws = new WsResult();
+		try {
+			if (entity.getId() != null){
+				List<ZyyjjydwryhzEntity> zylist =zyrylist(entity.getId());
+				List<JzyjjydwryhzEntity> jzlist =jzrylist(entity.getId());
+				zyjjydwService.logicDeleteEntity(entity, zylist, jzlist);
+			}		
+			ws.setResultCode(WsResult.SUCCESS);
+		} catch (Exception e) {
+			e.printStackTrace();
+			ws.setResultCode(WsResult.FAILURE);
+		}
+		return ws;
+	}
 
 	/**
 	 * 根据应急队伍查询专业应急队伍人员
@@ -469,6 +560,25 @@ public class YjzyxxglWebService extends BaseController {
 	}
 
 	/**
+	 * 删除应急网络
+	 * 
+	 * @param entitie
+	 */
+	public WsResult deleteYjwl(YjwlEntity entity) {
+		WsResult ws = new WsResult();
+		try {
+			if (entity.getId() != null)
+				yjwlService.logicDelete(Collections.singletonList(entity));
+			ws.setResultCode(WsResult.SUCCESS);
+		} catch (Exception e) {
+			e.printStackTrace();
+			ws.setResultCode(WsResult.FAILURE);
+		}
+		return ws;
+	}
+	
+	
+	/**
 	 * 获取应急预案分页信息
 	 * 
 	 * @param szd

+ 6 - 10
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/zcdc/dc/JdjcWebService.java

@@ -475,14 +475,10 @@ public class JdjcWebService extends BaseController {
 			return new ArrayList<DcZxjcEntity>();
 		}
 		for (DcZxjcEntity dcZxjcEntity : page) {
-			if (dcZxjcEntity.getDcList() != null
-					&& dcZxjcEntity.getDcList().size() > 0) {
-				dcZxjcEntity.getDcList().get(0);
-			}
 			int zgs = 0;
 			double zgzj = 0.0;
-			List<DcEntity> dclist = dcZxjcEntity.getDcList();
-			for (DcEntity dcEntity : dclist) {
+			List<DcEntity> dcList = listByZxjc(dcZxjcEntity);
+			for (DcEntity dcEntity : dcList) {
 				if (dcEntity.getMqzt().equals("1")) {
 					zgs += 1;
 				}
@@ -490,16 +486,16 @@ public class JdjcWebService extends BaseController {
 						.getZgtrzj());
 			}
 			String zgl = "";
-			if (dcZxjcEntity.getDcList() == null
-					|| dcZxjcEntity.getDcList().size() <= 0) {
+			if (dcList == null
+					|| dcList.size() <= 0) {
 
 			} else {
 				BigDecimal bg = new BigDecimal((double) zgs
-						/ dcZxjcEntity.getDcList().size());
+						/ dcList.size());
 				zgl = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()
 						* 100 + "%";
 			}
-			dcZxjcEntity.setYhs(dcZxjcEntity.getDcList().size());
+			dcZxjcEntity.setYhs(dcList==null?0:dcList.size());
 			dcZxjcEntity.setZgs(zgs);
 			dcZxjcEntity.setZgl(zgl);
 			dcZxjcEntity.setZgzj(zgzj);