Browse Source

git-svn-id: https://192.168.57.71/svn/lyggkj@113 1a6f6e3a-4066-fe46-b609-79c204482ece

ld_liufl 8 years ago
parent
commit
9c80e9a087
18 changed files with 878 additions and 116 deletions
  1. 1 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/common/Constants.java
  2. 100 42
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/controller/jyr/JyrController.java
  3. 20 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/dao/jyr/CgqDao.java
  4. 18 1
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/jyr/BwEntity.java
  5. 238 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/jyr/CgqEntity.java
  6. 17 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/yjgl/zdwxyfb/CgEntity.java
  7. 27 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/jyr/CgqServiceImpl.java
  8. 115 14
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/jyr/JyrServiceImpl.java
  9. 26 6
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/zysqbp/ZysqbpServiceImpl.java
  10. 51 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/jyr/CgqService.java
  11. 20 10
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/jyr/JyrService.java
  12. 2 6
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/bagl/BaglWebService.java
  13. 66 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/jyr/JyrxxglWebService.java
  14. 4 5
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/yjgl/cg/CgxxglWebService.java
  15. 77 1
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/yjzyxxgl/YjzyxxglWebService.java
  16. 24 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/zcdc/dc/JdjcWebService.java
  17. 70 31
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/zcdc/zc/ZczbWebService.java
  18. 2 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/zysqbp/WhsqbpWebService.java

+ 1 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/common/Constants.java

@@ -188,6 +188,7 @@ public class Constants {
 	public static final String SEQ_YJPT_JYRXX_SNB = "SEQ_YJPT_JYRXX_SNB";
 	/** 重大危险源 **/
 	public static final String SEQ_T_YJPT_CG = "SEQ_T_YJPT_CG";
+	public static final String SEQ_T_YJPT_CGQ = "SEQ_T_YJPT_CGQ";
 	public static final String SEQ_T_YJPT_CGZT = "SEQ_T_YJPT_CGZT";
 	public static final String SEQ_T_YJPT_CGSY = "SEQ_T_YJPT_CGSY";
 	public static final String SEQ_T_YJPT_ZBHJJBQK = "SEQ_T_YJPT_ZBHJJBQK";

+ 100 - 42
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/controller/jyr/JyrController.java

@@ -59,6 +59,7 @@ import com.jtgh.yjpt.entity.common.CodeEntity;
 import com.jtgh.yjpt.entity.gkgq.GqEntity;
 import com.jtgh.yjpt.entity.gkgq.MtEntity;
 import com.jtgh.yjpt.entity.jyr.BwEntity;
+import com.jtgh.yjpt.entity.jyr.CgqEntity;
 import com.jtgh.yjpt.entity.jyr.GkwhccssEntity;
 import com.jtgh.yjpt.entity.jyr.GkwhqyCountEntity;
 import com.jtgh.yjpt.entity.jyr.JyrCountEntity;
@@ -74,6 +75,7 @@ import com.jtgh.yjpt.entity.jyrxxgl.JyrtzqkEntity;
 import com.jtgh.yjpt.entity.yjgl.zdwxyfb.CgEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
 import com.jtgh.yjpt.service.common.CodeService;
+import com.jtgh.yjpt.service.jyr.CgqService;
 import com.jtgh.yjpt.service.jyr.JyrNsService;
 import com.jtgh.yjpt.service.jyr.JyrService;
 
@@ -99,6 +101,8 @@ public class JyrController extends BaseController {
 	private CodeService codeService;
 	@Autowired
 	private JyrNsService nsService;
+	@Autowired
+	private CgqService cgqService;
 
 	/**
 	 * 页面一览查询
@@ -174,17 +178,17 @@ public class JyrController extends BaseController {
 					}
 					list.add(cb.like(root.get("gkjyr").as(String.class), "%"
 							+ gkjyr + "%"));
-					if (sfwhqy != null
-							&& StringUtils.isNotEmpty(sfwhqy.trim())) {
-						if("YW".equals(sfwhqy)) {
+					if (sfwhqy != null && StringUtils.isNotEmpty(sfwhqy.trim())) {
+						if ("YW".equals(sfwhqy)) {
 							list.add(cb.or(new Predicate[] {
-									cb.equal(root.get("sfwhqy").as(String.class),
-											"Y"),cb.equal(root.get("sfwhqy").as(String.class),
-													"W")
-							}));
+									cb.equal(root.get("sfwhqy")
+											.as(String.class), "Y"),
+									cb.equal(root.get("sfwhqy")
+											.as(String.class), "W") }));
 						} else {
-							list.add(cb.equal(root.get("sfwhqy").as(String.class),
-									sfwhqy));
+							list.add(cb
+									.equal(root.get("sfwhqy").as(String.class),
+											sfwhqy));
 						}
 					}
 					if (StringUtils.isNotEmpty(szqy)) {
@@ -252,7 +256,7 @@ public class JyrController extends BaseController {
 	@Log(Type.QUERY)
 	public BusinessContext doSearch(Long functionId,
 			SinglePageRequest pageRequest, String gkjyr, CodeEntity szd,
-			GqEntity szgq ,String sfzdsp) {
+			GqEntity szgq, String sfzdsp) {
 
 		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
 		addNotEmptyModel(filterList, "gkjyr", gkjyr.trim(), Operator.LIKE);
@@ -346,9 +350,11 @@ public class JyrController extends BaseController {
 	public BusinessContext doAdd(Long functionId, JyrEntity jyrEntity,
 			List<JyrdcxxEntity> dc_add_list, List<JyrdcxxEntity> dc_del_list,
 			List<BwEntity> bw_add_list, List<BwEntity> bw_del_list,
-			List<JyrckxxEntity> ckList, List<JyrckxxEntity> delCkList) {
+			List<JyrckxxEntity> ckList, List<JyrckxxEntity> delCkList,
+			List<CgqEntity> cgq_add_list, List<CgqEntity> cgq_del_list) {
 		return save(functionId, jyrEntity, dc_add_list, dc_del_list,
-				bw_add_list, bw_del_list, ckList, delCkList);
+				bw_add_list, bw_del_list, ckList, delCkList, cgq_add_list,
+				cgq_del_list);
 	}
 
 	/**
@@ -370,9 +376,11 @@ public class JyrController extends BaseController {
 	public BusinessContext doEdit(Long functionId, JyrEntity jyrEntity,
 			List<JyrdcxxEntity> dc_add_list, List<JyrdcxxEntity> dc_del_list,
 			List<BwEntity> bw_add_list, List<BwEntity> bw_del_list,
-			List<JyrckxxEntity> ckList, List<JyrckxxEntity> delCkList) {
+			List<JyrckxxEntity> ckList, List<JyrckxxEntity> delCkList,
+			List<CgqEntity> cgq_add_list, List<CgqEntity> cgq_del_list) {
 		return save(functionId, jyrEntity, dc_add_list, dc_del_list,
-				bw_add_list, bw_del_list, ckList, delCkList);
+				bw_add_list, bw_del_list, ckList, delCkList, cgq_add_list,
+				cgq_del_list);
 	}
 
 	/**
@@ -391,7 +399,8 @@ public class JyrController extends BaseController {
 	private BusinessContext save(Long functionId, JyrEntity jyrEntity,
 			List<JyrdcxxEntity> dc_add_list, List<JyrdcxxEntity> dc_del_list,
 			List<BwEntity> bw_add_list, List<BwEntity> bw_del_list,
-			List<JyrckxxEntity> ckList, List<JyrckxxEntity> delCkList) {
+			List<JyrckxxEntity> ckList, List<JyrckxxEntity> delCkList,
+			List<CgqEntity> cgq_add_list, List<CgqEntity> cgq_del_list) {
 		BusinessContext bContext = new BusinessContext();
 		if (jyrEntity.getId() == null) {
 			jyrEntity.setAddDate(new Date());
@@ -412,7 +421,8 @@ public class JyrController extends BaseController {
 			}
 		}
 		jyrEntity = service.save(jyrEntity, dc_add_list, dc_del_list,
-				bw_add_list, bw_del_list, ckList, delCkList);
+				bw_add_list, bw_del_list, ckList, delCkList, cgq_add_list,
+				cgq_del_list);
 		// 同步
 		try {
 			service.tbWebService(jyrEntity, dc_add_list, dc_del_list,
@@ -553,7 +563,7 @@ public class JyrController extends BaseController {
 			Specification<JyrEntity> spec = SpecificationCreater
 					.searchByPredicateModels(filterList);
 			Sort sort2 = new Sort(Direction.ASC, "gkjyr");
-			list.addAll(service.findAll(spec,sort2)) ;
+			list.addAll(service.findAll(spec, sort2));
 		}
 		bc.setResult(list);
 		return bc;
@@ -579,7 +589,7 @@ public class JyrController extends BaseController {
 		Specification<JyrEntity> spec = SpecificationCreater
 				.searchByPredicateModels(filterList);
 		Sort sort2 = new Sort(Direction.ASC, "gkjyr");
-		list.addAll(service.findAll(spec,sort2)) ;
+		list.addAll(service.findAll(spec, sort2));
 		bc.setResult(list);
 		return bc;
 	}
@@ -605,7 +615,7 @@ public class JyrController extends BaseController {
 			Specification<JyrEntity> spec = SpecificationCreater
 					.searchByPredicateModels(filterList);
 			Sort sort2 = new Sort(Direction.ASC, "gkjyr");
-			list.addAll(service.findAll(spec,sort2)) ;
+			list.addAll(service.findAll(spec, sort2));
 		}
 		bc.setResult(list);
 		return bc;
@@ -635,7 +645,7 @@ public class JyrController extends BaseController {
 			Specification<JyrEntity> spec = SpecificationCreater
 					.searchByPredicateModels(filterList);
 			Sort sort2 = new Sort(Direction.ASC, "gkjyr");
-			list.addAll(service.findAll(spec,sort2)) ;
+			list.addAll(service.findAll(spec, sort2));
 		}
 		bc.setResult(list);
 		return bc;
@@ -671,7 +681,7 @@ public class JyrController extends BaseController {
 				.searchByPredicateModels(filterList);
 		List<JyrEntity> list = new ArrayList<JyrEntity>();
 		Sort sort2 = new Sort(Direction.ASC, "gkjyr");
-		list.addAll(service.findAll(spec,sort2)) ;
+		list.addAll(service.findAll(spec, sort2));
 		bc.setResult(list);
 		return bc;
 	}
@@ -695,7 +705,7 @@ public class JyrController extends BaseController {
 				.searchByPredicateModels(filterList);
 		List<JyrEntity> list = new ArrayList<JyrEntity>();
 		Sort sort2 = new Sort(Direction.ASC, "gkjyr");
-		list.addAll(service.findAll(spec,sort2)) ;
+		list.addAll(service.findAll(spec, sort2));
 		bc.setResult(list);
 		return bc;
 	}
@@ -1043,15 +1053,16 @@ public class JyrController extends BaseController {
 							+ param.get(0).toString() + "%"));
 					if (null != param.get(3)
 							&& !"null".equals(param.get(3).toString())) {
-						if("YW".equals(param.get(3).toString())) {
+						if ("YW".equals(param.get(3).toString())) {
 							list.add(cb.or(new Predicate[] {
-									cb.equal(root.get("sfwhqy").as(String.class),
-											"Y"),cb.equal(root.get("sfwhqy").as(String.class),
-													"W")
-							}));
+									cb.equal(root.get("sfwhqy")
+											.as(String.class), "Y"),
+									cb.equal(root.get("sfwhqy")
+											.as(String.class), "W") }));
 						} else {
-							list.add(cb.equal(root.get("sfwhqy").as(String.class),
-									param.get(3).toString()));
+							list.add(cb.equal(
+									root.get("sfwhqy").as(String.class), param
+											.get(3).toString()));
 						}
 					}
 					if (null != param.get(5)
@@ -1443,7 +1454,6 @@ public class JyrController extends BaseController {
 		}
 	}
 
-	
 	/**
 	 * 自动设置一览
 	 * 
@@ -1452,24 +1462,23 @@ public class JyrController extends BaseController {
 	 * @return
 	 */
 	@Log(Type.QUERY)
-	public BusinessContext saveZdspsj(  CodeEntity szd,
-			GqEntity szgq ,String gkjyr,Date zdspsjq,Date zdspsjz) {
-		BusinessContext bContext=new BusinessContext();
+	public BusinessContext saveZdspsj(CodeEntity szd, GqEntity szgq,
+			String gkjyr, Date zdspsjq, Date zdspsjz) {
+		BusinessContext bContext = new BusinessContext();
 		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
 		addNotEmptyModel(filterList, "gkjyr", gkjyr.trim(), Operator.LIKE);
 		if (szd != null)
 			addNotEmptyModel(filterList, "szd.id", szd.getId(), Operator.LIKE_R);
 		addNotEmptyModel(filterList, "szgq", szgq, Operator.EQ);
-		addNotEmptyModel(filterList, "sfzdsp",
-				"Y", Operator.EQ);
+		addNotEmptyModel(filterList, "sfzdsp", "Y", Operator.EQ);
 		addNotEmptyModel(filterList, "recordStatus",
 				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
 		addNotEmptyModel(filterList, "recordStatus",
 				BaseEntity.RECORD_STATE_DRAFT, Operator.NEQ);
 		Specification<JyrEntity> spec = SpecificationCreater
 				.searchByPredicateModels(filterList);
-		 List<JyrEntity> list = service.findAll(spec);
-		 for (JyrEntity entity:list) {
+		List<JyrEntity> list = service.findAll(spec);
+		for (JyrEntity entity : list) {
 			entity.setZdspsjq(zdspsjq);
 			entity.setZdspsjz(zdspsjz);
 			entity = service.save(entity);
@@ -1480,10 +1489,10 @@ public class JyrController extends BaseController {
 				e.printStackTrace();
 			}
 		}
-		 bContext.addMsg("save.success", "common", MsgLevel.INFO);
+		bContext.addMsg("save.success", "common", MsgLevel.INFO);
 		return bContext;
 	}
-	
+
 	/**
 	 * 公告一览表
 	 * 
@@ -1494,8 +1503,7 @@ public class JyrController extends BaseController {
 	@Log(Type.QUERY)
 	public BusinessContext listForGg(final Long functionId,
 			SinglePageRequest pageRequest, final String gkjyr,
-			final CodeEntity szd, final GqEntity szgq,
-			final String fddbr) {
+			final CodeEntity szd, final GqEntity szgq, final String fddbr) {
 		try {
 			Specification<JyrEntity> spec = new Specification<JyrEntity>() {
 
@@ -1521,7 +1529,7 @@ public class JyrController extends BaseController {
 					}
 					list.add(cb.like(root.get("gkjyr").as(String.class), "%"
 							+ gkjyr + "%"));
-					
+
 					list.add(cb.like(root.get("fddbr").as(String.class), "%"
 							+ fddbr + "%"));
 					list = Utils.setWorkflowSpec(list, cb, query, root, null);
@@ -1535,4 +1543,54 @@ public class JyrController extends BaseController {
 		}
 		return null;
 	}
+
+	/**
+	 * 获取所有储罐区
+	 * 
+	 * @return
+	 */
+	public BusinessContext listAllCgq() {
+		BusinessContext bc = createBusinessContext();
+		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
+		addNotEmptyModel(filterList, "recordStatus",
+				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+		addNotEmptyModel(filterList, "recordStatus",
+				BaseEntity.RECORD_STATE_DRAFT, Operator.NEQ);
+		List<CgqEntity> list = new ArrayList<CgqEntity>();
+		// 经营人只能查询自己的记录
+		if (Constants.YES.equals(Utils.getCurrentUser().getSfjyr())
+				&& Utils.getCurrentUser().getJyrjcxx() != null) {
+			addNotEmptyModel(filterList, "dwmc", Utils.getCurrentUser()
+					.getJyrjcxx(), Operator.EQ);
+		} else {
+			Specification<CgqEntity> spec = SpecificationCreater
+					.searchByPredicateModels(filterList);
+			Sort sort2 = new Sort(Direction.ASC, "cgqmc");
+			list.addAll(cgqService.findAll(spec, sort2));
+		}
+		bc.setResult(list);
+		return bc;
+	}
+
+	/**
+	 * 获取所有储罐区
+	 * 
+	 * @return
+	 */
+	public BusinessContext listAllCgq(JyrEntity jyr) {
+		BusinessContext bc = createBusinessContext();
+		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
+		addNotEmptyModel(filterList, "recordStatus",
+				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+		addNotEmptyModel(filterList, "recordStatus",
+				BaseEntity.RECORD_STATE_DRAFT, Operator.NEQ);
+		List<CgqEntity> list = new ArrayList<CgqEntity>();
+		addNotEmptyModel(filterList, "dwmc", jyr, Operator.EQ);
+		Specification<CgqEntity> spec = SpecificationCreater
+				.searchByPredicateModels(filterList);
+		Sort sort2 = new Sort(Direction.ASC, "cgqmc");
+		list.addAll(cgqService.findAll(spec, sort2));
+		bc.setResult(list);
+		return bc;
+	}
 }

+ 20 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/dao/jyr/CgqDao.java

@@ -0,0 +1,20 @@
+package com.jtgh.yjpt.dao.jyr;
+
+import java.util.List;
+
+import org.springframework.data.jpa.repository.Query;
+
+import com.jtgh.yjpt.dao.common.MyRepository;
+import com.jtgh.yjpt.entity.jyr.CgqEntity;
+import com.jtgh.yjpt.entity.jyr.JyrEntity;
+
+/**
+ * 经营人泊位信息管理Dao
+ * @author chenkf
+ * 2014-2021
+ */
+public interface CgqDao extends MyRepository<CgqEntity, Long> {
+	@Query("from CgqEntity where dwmc = ?1 and recordStatus <> 9")
+	public List<CgqEntity> findByQymc(JyrEntity jyr);
+	
+}

+ 18 - 1
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/jyr/BwEntity.java

@@ -76,6 +76,7 @@ public class BwEntity extends BaseEntity<Long> implements Cloneable {
 	 * @pdOid 140b2adb-d269-48b1-a33d-d3b0cb86928b
 	 */
 	private CodeEntity fwlx;
+
 	/**
 	 * 投产年份
 	 * 
@@ -89,6 +90,11 @@ public class BwEntity extends BaseEntity<Long> implements Cloneable {
 	 */
 	private CodeEntity jgxs;
 	/**
+	 * 结构型式2
+	 * 
+	 */
+	private CodeEntity jgxs2;
+	/**
 	 * 生产类型
 	 * 
 	 * @pdOid 5fac023e-7a54-4d2c-8254-747061e99ab9
@@ -467,10 +473,21 @@ public class BwEntity extends BaseEntity<Long> implements Cloneable {
 		return jgysnf;
 	}
 
+	@ManyToOne(fetch = FetchType.EAGER, targetEntity = CodeEntity.class)
+	@JoinColumn(name = "jgxs2")
+	@RemotingExclude
+	public CodeEntity getJgxs2() {
+		return jgxs2;
+	}
+
+	public void setJgxs2(CodeEntity jgxs2) {
+		this.jgxs2 = jgxs2;
+	}
 	@Override
 	protected BwEntity clone() throws CloneNotSupportedException {
-		// TODO Auto-generated method stub
 		return (BwEntity) super.clone();
 	}
 
+
+
 }

+ 238 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/jyr/CgqEntity.java

@@ -0,0 +1,238 @@
+package com.jtgh.yjpt.entity.jyr;
+
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.springframework.flex.remoting.RemotingExclude;
+
+import com.jtgh.yjpt.common.Constants;
+import com.jtgh.yjpt.entity.BaseEntity;
+import com.jtgh.yjpt.entity.common.AccessoryEntity;
+import com.jtgh.yjpt.entity.gkgq.GqEntity;
+
+@Entity
+@Table(name = "T_YJPT_CGQ")
+public class CgqEntity extends BaseEntity<Long> implements Cloneable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -3809893063772145299L;
+
+	private Long id;
+	/**
+	 * 单位名称
+	 */
+	private JyrEntity dwmc;
+
+	/**
+	 * 储罐区名称
+	 */
+	private String cgqmc;
+	/**
+	 * 具体位置
+	 */
+	private String jtwz;
+	/**
+	 * 储罐区面积
+	 */
+	private Double cgqmj;
+	/**
+	 * 储罐个数
+	 */
+	private Integer cggs;
+	/**
+	 * 罐间最小距离
+	 */
+	private Double glzxjl;
+	/**
+	 * 储罐容积
+	 */
+	private Double cgrj;
+	/**
+	 * 填表人
+	 */
+	private String tbr;
+	/**
+	 * 联系电话
+	 */
+	private String lxdh;
+	/**
+	 * 填表时间
+	 */
+	private Date tbsj;
+	/**
+	 * 所在港区
+	 */
+	private GqEntity gq;
+	/**
+	 * 重大危险源储罐个数
+	 */
+	private Integer zdwxycggs;
+	/**
+	 * 重大危险源储罐容量
+	 */
+	private Double zdwxycgrl;
+
+	/** 附件 */
+	private AccessoryEntity accessory;
+
+	@Transient
+	@XmlTransient
+	public AccessoryEntity getAccessory() {
+		return accessory;
+	}
+
+	public void setAccessory(AccessoryEntity accessory) {
+		this.accessory = accessory;
+	}
+
+	@Transient
+	public String getSequenceName() {
+		return Constants.SEQ_T_YJPT_CGQ;
+	}
+
+
+	@Id
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+	
+	public String getCgqmc() {
+		return cgqmc;
+	}
+
+	public void setCgqmc(String cgqmc) {
+		this.cgqmc = cgqmc;
+	}	
+
+	@ManyToOne(fetch = FetchType.EAGER, targetEntity = JyrEntity.class)
+	@JoinColumn(name = "dwmc")
+	@RemotingExclude
+	public JyrEntity getDwmc() {
+		return dwmc;
+	}
+
+	public void setDwmc(JyrEntity dwmc) {
+		this.dwmc = dwmc;
+	}
+
+	public Double getCgqmj() {
+		return cgqmj;
+	}
+
+	public void setCgqmj(Double cgqmj) {
+		this.cgqmj = cgqmj;
+	}
+
+	public Integer getCggs() {
+		return cggs;
+	}
+
+	public void setCggs(Integer cggs) {
+		this.cggs = cggs;
+	}
+
+	@Column(name = "GJZXJL")
+	public Double getGlzxjl() {
+		return glzxjl;
+	}
+
+	public void setGlzxjl(Double glzxjl) {
+		this.glzxjl = glzxjl;
+	}
+
+
+	public Double getCgrj() {
+		return cgrj;
+	}
+
+	public void setCgrj(Double cgrj) {
+		this.cgrj = cgrj;
+	}
+
+	public String getTbr() {
+		return tbr;
+	}
+
+	public void setTbr(String tbr) {
+		this.tbr = tbr;
+	}
+
+	public String getLxdh() {
+		return lxdh;
+	}
+
+	public void setLxdh(String lxdh) {
+		this.lxdh = lxdh;
+	}
+
+	public Date getTbsj() {
+		return tbsj;
+	}
+
+	public void setTbsj(Date tbsj) {
+		this.tbsj = tbsj;
+	}
+
+	@ManyToOne(fetch = FetchType.EAGER, targetEntity = GqEntity.class)
+	@JoinColumn(name = "gq")
+	@RemotingExclude
+	public GqEntity getGq() {
+		return gq;
+	}
+
+	public void setGq(GqEntity gq) {
+		this.gq = gq;
+	}
+
+	public Integer getZdwxycggs() {
+		return zdwxycggs;
+	}
+
+	public void setZdwxycggs(Integer zdwxycggs) {
+		this.zdwxycggs = zdwxycggs;
+	}
+
+	public Double getZdwxycgrl() {
+		return zdwxycgrl;
+	}
+
+	public void setZdwxycgrl(Double zdwxycgrl) {
+		this.zdwxycgrl = zdwxycgrl;
+	}
+
+	public CgqEntity clone() {
+		try {
+			return (CgqEntity) super.clone();
+		} catch (CloneNotSupportedException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	public String getJtwz() {
+		return jtwz;
+	}
+
+	public void setJtwz(String jtwz) {
+		this.jtwz = jtwz;
+	}
+	
+
+
+
+}

+ 17 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/yjgl/zdwxyfb/CgEntity.java

@@ -19,6 +19,7 @@ import com.jtgh.yjpt.entity.BaseEntity;
 import com.jtgh.yjpt.entity.common.AccessoryEntity;
 import com.jtgh.yjpt.entity.common.CodeEntity;
 import com.jtgh.yjpt.entity.gkgq.GqEntity;
+import com.jtgh.yjpt.entity.jyr.CgqEntity;
 import com.jtgh.yjpt.entity.jyr.JyrEntity;
 
 @Entity
@@ -79,6 +80,11 @@ public class CgEntity extends BaseEntity<Long> implements Cloneable {
 	 * 储罐坐标
 	 */
 	private String cgzb;
+	
+	/**
+	 * 储罐
+	 */
+	private CgqEntity cgq;
 	/**
 	 * 储罐区面积
 	 */
@@ -737,6 +743,17 @@ public class CgEntity extends BaseEntity<Long> implements Cloneable {
 	public CgsyEntity getCgsy() {
 		return cgsy;
 	}
+	
+	@ManyToOne(fetch = FetchType.EAGER, targetEntity = CgqEntity.class)
+	@JoinColumn(name = "cgq")
+	@RemotingExclude
+	public CgqEntity getCgq() {
+		return cgq;
+	}
+
+	public void setCgq(CgqEntity cgq) {
+		this.cgq = cgq;
+	}
 
 	public void setCgsy(CgsyEntity cgsy) {
 		this.cgsy = cgsy;

+ 27 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/jyr/CgqServiceImpl.java

@@ -0,0 +1,27 @@
+package com.jtgh.yjpt.service.impl.jyr;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.jtgh.yjpt.dao.common.MyRepository;
+import com.jtgh.yjpt.dao.jyr.CgqDao;
+import com.jtgh.yjpt.entity.jyr.CgqEntity;
+import com.jtgh.yjpt.service.BaseService;
+import com.jtgh.yjpt.service.jyr.CgqService;
+@Service
+public class CgqServiceImpl extends BaseService<CgqEntity, Long> implements CgqService {
+
+	@Autowired
+	private CgqDao cgqDao;
+	
+	@Override
+	public CgqEntity findByTbdyid(Long tbdyid) {
+		return null;
+	}
+
+	@Override
+	protected MyRepository<CgqEntity, Long> getDao() {
+		return cgqDao;
+	}
+
+}

+ 115 - 14
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/jyr/JyrServiceImpl.java

@@ -32,6 +32,7 @@ import com.jtgh.yjpt.dao.bagl.yjyaba.YjyabaDao;
 import com.jtgh.yjpt.dao.common.MyRepository;
 import com.jtgh.yjpt.dao.gkgq.MtDao;
 import com.jtgh.yjpt.dao.jyr.BwDao;
+import com.jtgh.yjpt.dao.jyr.CgqDao;
 import com.jtgh.yjpt.dao.jyr.JyrDao;
 import com.jtgh.yjpt.dao.jyr.WxhwpmDao;
 import com.jtgh.yjpt.dao.jyrxxgl.JyrShxxDao;
@@ -48,6 +49,7 @@ import com.jtgh.yjpt.entity.common.CodeEntity;
 import com.jtgh.yjpt.entity.common.MemEntity;
 import com.jtgh.yjpt.entity.gkgq.MtEntity;
 import com.jtgh.yjpt.entity.jyr.BwEntity;
+import com.jtgh.yjpt.entity.jyr.CgqEntity;
 import com.jtgh.yjpt.entity.jyr.GkwhccssEntity;
 import com.jtgh.yjpt.entity.jyr.GkwhqyCountEntity;
 import com.jtgh.yjpt.entity.jyr.JyrCountEntity;
@@ -76,6 +78,9 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 	private BwDao jyrbwxxDao;
 
 	@Autowired
+	private CgqDao jyrcgqDao;
+
+	@Autowired
 	private JyrtzqkDao jyrtzqkDao;
 
 	@Autowired
@@ -231,6 +236,96 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 		return jyrEntity;
 	}
 
+	public JyrEntity save(JyrEntity jyrEntity,
+			List<JyrdcxxEntity> dcxxeditlist,
+			List<JyrdcxxEntity> dcxxdeletelist, List<BwEntity> bw_add_list,
+			List<BwEntity> bw_del_list, List<JyrckxxEntity> ckList,
+			List<JyrckxxEntity> delCkList, List<CgqEntity> cgq_add_list,
+			List<CgqEntity> cgq_del_list) {
+		jyrEntity = jyrDao.save(jyrEntity);
+		// 对泊位信
+		if (bw_add_list != null && bw_add_list.size() > 0) {
+			for (BwEntity jyrbwxxEntity : bw_add_list) {
+				jyrbwxxEntity.setQymc(jyrEntity);
+				jyrbwxxEntity.setSzd(jyrEntity.getSzd());
+				jyrbwxxEntity.setSzgq(jyrEntity.getSzgq());
+				if (jyrbwxxEntity.getId() == null) {
+					jyrbwxxEntity.setAddDate(new Date());
+					jyrbwxxEntity.setAddUser(Utils.getCurrentUser());
+				}
+
+			}
+			// 对泊位信息insert/update操作
+			jyrbwxxDao.save(bw_add_list);
+		}
+
+		if (bw_del_list != null && bw_del_list.size() > 0) {
+			for (BwEntity str : bw_del_list) {
+				// 对泊位信息进行删除
+				jyrbwxxDao.logicDelete(str);
+			}
+		}
+		if (dcxxeditlist != null && dcxxeditlist.size() > 0) {
+			for (JyrdcxxEntity jyrdcxxEntity : dcxxeditlist) {
+				jyrdcxxEntity.setQymc(jyrEntity);
+				jyrdcxxEntity.setSzd(jyrEntity.getSzd());
+				jyrdcxxEntity.setSzgq(jyrEntity.getSzgq());
+				if (jyrdcxxEntity.getId() == null) {
+					jyrdcxxEntity.setAddDate(new Date());
+					jyrdcxxEntity.setAddUser(Utils.getCurrentUser());
+				}
+			}
+			// 对堆存信息insert/update操作
+			jyrdcxxDao.save(dcxxeditlist);
+		}
+		if (dcxxdeletelist != null && dcxxdeletelist.size() > 0) {
+			for (JyrdcxxEntity str : dcxxdeletelist) {
+				jyrdcxxDao.logicDelete(str);
+			}
+		}
+		if (delCkList != null && delCkList.size() > 0) {
+			jyrckxxDao.logicDelete(delCkList);
+		}
+		if (ckList != null && ckList.size() > 0) {
+			for (JyrckxxEntity ck : ckList) {
+				ck.setSzd(jyrEntity.getSzd());
+				ck.setGq(jyrEntity.getSzgq());
+				ck.setSsjyr(jyrEntity);
+				if (null == ck.getId()) {
+					ck.setAddDate(new Date());
+					ck.setAddUser(Utils.getCurrentUser());
+					ck.setId(null);
+				}
+			}
+		}
+		jyrckxxDao.save(ckList);
+
+		// 对储罐区
+		if (cgq_add_list != null && cgq_add_list.size() > 0) {
+			for (CgqEntity jyrcgqxxEntity : cgq_add_list) {
+				jyrcgqxxEntity.setDwmc(jyrEntity);
+				jyrcgqxxEntity.setSzd(jyrEntity.getSzd());
+				jyrcgqxxEntity.setGq(jyrEntity.getSzgq());
+				if (jyrcgqxxEntity.getId() == null) {
+					jyrcgqxxEntity.setAddDate(new Date());
+					jyrcgqxxEntity.setAddUser(Utils.getCurrentUser());
+				}
+
+			}
+			// 对泊位信息insert/update操作
+			jyrcgqDao.save(cgq_add_list);
+		}
+
+		if (cgq_del_list != null && cgq_del_list.size() > 0) {
+			for (CgqEntity str : cgq_del_list) {
+				// 对储罐区信息进行删除
+				jyrcgqDao.logicDelete(str);
+			}
+		}
+
+		return jyrEntity;
+	}
+
 	@Override
 	public void saveZycs(List<BwEntity> bwList, List<CgEntity> cgList,
 			List<JyrdcxxEntity> dcList, List<JyrckxxEntity> ckList,
@@ -506,7 +601,7 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 				row.put("WHNUM", objects[2]);
 				row.put("YEAR", objects[3]);
 				row.put("MONTH", objects[4]);
-				row.put("SL",null == cg.get(i)[1] ? 0 : cg.get(i)[1]);
+				row.put("SL", null == cg.get(i)[1] ? 0 : cg.get(i)[1]);
 				row.put("CCL", null == cg.get(i)[2] ? 0 : cg.get(i)[2]);
 				list.add(row);
 			}
@@ -563,6 +658,7 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 		bc.setAttribute("bwList", jyrbwxxDao.findByQymc(entity));
 		bc.setAttribute("ckList", jyrckxxDao.findBySsjyrAndRecordStatusNot(
 				entity, JyrEntity.RECORD_STATE_DELETE));
+		bc.setAttribute("cgqList", jyrcgqDao.findByQymc(entity));
 		bc.setAttribute("cgList", cgDao.findByDwmcAndRecordStatusNot(entity,
 				JyrEntity.RECORD_STATE_DELETE));
 		bc.setAttribute("mtList", mtDao.findByJyrAndRecordStatusNot(entity,
@@ -990,17 +1086,19 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 		List<Object[]> list2 = null;
 		if (szd != null) {
 			szdList = codeService.findSzdByParent(szd.getId());
-			list2=jyrDao.countGkwhqyTotal(szd.getId() +"%", szqy,tjsjq, tjsjz, lb1, lb2, lb3) ;
+			list2 = jyrDao.countGkwhqyTotal(szd.getId() + "%", szqy, tjsjq,
+					tjsjz, lb1, lb2, lb3);
 		} else {
 			szdList = codeService.findSzdByParent(Constants.SZD_ID_PROVINCE);
-			list2=jyrDao.countGkwhqyTotal(Constants.SZD_ID_PROVINCE +"%",  szqy,tjsjq, tjsjz, lb1, lb2, lb3) ;
+			list2 = jyrDao.countGkwhqyTotal(Constants.SZD_ID_PROVINCE + "%",
+					szqy, tjsjq, tjsjz, lb1, lb2, lb3);
 		}
 		GkwhqyCountEntity entity = new GkwhqyCountEntity();
-	    entity.setSzd("合计");
-	    entity.setSzgq("");
+		entity.setSzd("合计");
+		entity.setSzgq("");
 		entity.setSfcz("");
 		entity.setSzqy("");
-	    entity = changeGkwhqyEntity2(entity, list2);
+		entity = changeGkwhqyEntity2(entity, list2);
 		list.add(entity);
 		for (CodeEntity szdEntity : szdList) {
 			// 根据所在地查询所有的经营人
@@ -1018,7 +1116,8 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 				entity.setSzd(szdEntity.getBz());
 				entity.setQymc(e.getGkjyr());
 				// 设置码头泊位类别 :危险货物集装箱码头,石油化工码头,危险货物非石油化工码头
-				if (lb3.equals("Y") && (e.getQyxz().charAt(0) + "").equals("Y")&& (e.getQyxz().charAt(4)+"").equals("Y")) {
+				if (lb3.equals("Y") && (e.getQyxz().charAt(0) + "").equals("Y")
+						&& (e.getQyxz().charAt(4) + "").equals("Y")) {
 					entity.setLb("危险货物非石油化工码头");
 				}
 				if (lb2.equals("Y") && (e.getQyxz().charAt(0) + "").equals("Y")
@@ -1046,9 +1145,9 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 				entity.setSzqy(qylxString);
 				entity = changeGkwhqyEntity(entity, objectList);
 				// 过滤掉吞吐量为0的数据
-				/*if (!(entity.getTtl().equals("0"))) {
-					list.add(entity);
-				}*/
+				/*
+				 * if (!(entity.getTtl().equals("0"))) { list.add(entity); }
+				 */
 				list.add(entity);
 			}
 		}
@@ -1062,10 +1161,11 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 		List<Object[]> list2 = null;
 		if (szd != null) {
 			szdList = codeService.findSzdByParent(szd.getId());
-			list2=jyrDao.countGkwhccssTotal(szd.getId() + "%", szqy);
+			list2 = jyrDao.countGkwhccssTotal(szd.getId() + "%", szqy);
 		} else {
 			szdList = codeService.findSzdByParent(Constants.SZD_ID_PROVINCE);
-			list2=jyrDao.countGkwhccssTotal(Constants.SZD_ID_PROVINCE + "%", szqy);
+			list2 = jyrDao.countGkwhccssTotal(Constants.SZD_ID_PROVINCE + "%",
+					szqy);
 		}
 		GkwhccssEntity entity = new GkwhccssEntity();
 		entity.setSzd("合计");
@@ -1104,7 +1204,7 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 					}
 				}
 				entity.setLb(qyxz);
-				//entity.setZyhz(e.getZyhz());
+				// entity.setZyhz(e.getZyhz());
 				String qylxString = "";
 				if (e.getQylx() != null) {
 					if (e.getQylx().equals("1")) {
@@ -1134,6 +1234,7 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 		entity.setZdwxydy(prase(objectList.get(4)));
 		return entity;
 	}
+
 	private GkwhccssEntity changeGkwhccxxEntity2(GkwhccssEntity entity,
 			List<Object[]> objectList) {
 		entity.setQymc(prase(objectList.get(0)));
@@ -1157,7 +1258,7 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 		entity.setZyhz(praseString(objectList.get(7)));
 		return entity;
 	}
-	
+
 	private GkwhqyCountEntity changeGkwhqyEntity2(GkwhqyCountEntity entity,
 			List<Object[]> objectList) {
 		entity.setQymc(prase(objectList.get(0)));

+ 26 - 6
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/zysqbp/ZysqbpServiceImpl.java

@@ -20,6 +20,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.activiti.engine.task.Task;
+import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
@@ -63,7 +64,8 @@ import com.yjpt.util.DateUtil;
 @Service
 public class ZysqbpServiceImpl extends
 		BaseWorkFlowServiceImpl<ZysqbpEntity, Long> implements ZysqbpService {
-
+	private final static Logger LOGGER = Logger
+			.getLogger(ZysqbpServiceImpl.class);
 	@Autowired
 	private ZysqbpDao zysqbpDao;
 	@Autowired
@@ -212,6 +214,10 @@ public class ZysqbpServiceImpl extends
 
 	@Override
 	public <S extends ZysqbpEntity> S submit(String currentRoleCode, S data) {
+		String url = Thread.currentThread().getStackTrace()[2].getClassName()
+				+ "."
+				+ Thread.currentThread().getStackTrace()[2].getMethodName();
+		
 		String zyddString;
 
 		if (data.getZyddqybh() != null)
@@ -226,8 +232,6 @@ public class ZysqbpServiceImpl extends
 				: "";
 		if (data.getRecordStatus() == BaseEntity.RECORD_STATE_REJECT) {
 			data.setRecordStatus(BaseEntity.RECORD_STATE_SUBMIT);
-			data = this.save(data);
-
 			String str = sdf.format(data.getAddDate()).concat(
 					data.getId().toString());
 			data.setBh(str);
@@ -246,9 +250,15 @@ public class ZysqbpServiceImpl extends
 			// }
 			workService.complete(param, variables, task);
 		} else {
-			data.setBh(generateNoByNoRule(GlobalData.CITY_CODE));
-			data.setRecordStatus(BaseEntity.RECORD_STATE_SUBMIT);
-			data = this.save(data);
+			try{
+				data.setBh(generateNoByNoRule(GlobalData.CITY_CODE));
+				data.setRecordStatus(BaseEntity.RECORD_STATE_SUBMIT);
+				data = this.save(data);
+			}catch (Exception e){
+				LOGGER.equals(url + "<EORROR> 获取编号 generateNoByNoRule  ");
+				e.printStackTrace();
+			}
+			
 			if (Constants.YES.equals(GlobalData.QLYG_SYNC)) {
 				// 同步生成办件信息
 				this.saveApply(data);
@@ -2224,6 +2234,10 @@ public class ZysqbpServiceImpl extends
 
 	@Override
 	public ZysqbpEntity kgwgSave(ZysqbpEntity entity) {
+		long startTime = System.currentTimeMillis();
+		String url =  Thread.currentThread().getStackTrace()[2].getClassName()
+				+ "."
+				+ Thread.currentThread().getStackTrace()[2].getMethodName();
 		entity = this.save(entity);
 		// 同步到省级
 		if (Constants.YES.equals(GlobalData.JAXWS_SYNC)) {
@@ -2232,10 +2246,16 @@ public class ZysqbpServiceImpl extends
 				try {
 					webServce.save(entity);
 				} catch (Exception e) {
+					LOGGER.error("error occured,url:" + url + " (ZysqbpWebService.save) ");
 					e.printStackTrace();
 				}
+				long cost =  System.currentTimeMillis() - startTime;
+				System.err.println(url + ",cost:"+cost);
+				LOGGER.info(url + "<ERROR> cost:"+cost);
 			}
 		}
+		long cost =  System.currentTimeMillis() - startTime;
+		LOGGER.info(url + "<SUCCESS> cost:"+cost);
 		return entity;
 	}
 

+ 51 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/jyr/CgqService.java

@@ -0,0 +1,51 @@
+package com.jtgh.yjpt.service.jyr;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
+import org.springframework.data.jpa.domain.Specification;
+
+import com.jtgh.yjpt.entity.jyr.CgqEntity;
+
+public interface CgqService {
+	/***
+	 * 逻辑删除一条数据
+	 */
+	public void logicDelete(Long id);
+	/**
+	 * 逻辑删除多条数据
+	 * @param entities
+	 */
+	public void  logicDelete(Iterable<CgqEntity> entities);
+	/**
+	 * 根据记录的同步id查找记录
+	 * @param tbdyid
+	 * @return
+	 */
+	public CgqEntity findByTbdyid(Long tbdyid);
+	
+	/**
+	 * 分页查询所有验收申请
+	 * 
+	 * @param pageable
+	 *            分页信息
+	 * @return
+	 */
+	public Page<CgqEntity> findAll(Specification<CgqEntity> spec,
+			Pageable pageable);
+	
+	public Collection<CgqEntity> findAll(Specification<CgqEntity> spec,
+			Sort sort);
+	/**
+	 * 查询所有的储罐区
+	 * @param spec
+	 * @return
+	 */
+	public List<CgqEntity> findAll(Specification<CgqEntity> spec);
+	public <S extends CgqEntity> S save(S newEntity);
+	public CgqEntity findOne(Long tbdyid);
+
+}

+ 20 - 10
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/jyr/JyrService.java

@@ -23,6 +23,7 @@ import com.jtgh.yjpt.common.BusinessContext;
 import com.jtgh.yjpt.entity.ajj.QyjbxxEntity;
 import com.jtgh.yjpt.entity.common.CodeEntity;
 import com.jtgh.yjpt.entity.jyr.BwEntity;
+import com.jtgh.yjpt.entity.jyr.CgqEntity;
 import com.jtgh.yjpt.entity.jyr.GkwhccssEntity;
 import com.jtgh.yjpt.entity.jyr.GkwhqyCountEntity;
 import com.jtgh.yjpt.entity.jyr.JyrCountEntity;
@@ -124,6 +125,13 @@ public interface JyrService {
 			List<JyrdcxxEntity> dcxxeditlist,
 			List<JyrdcxxEntity> dcxxdeletelist, List<BwEntity> bw_add_list,
 			List<BwEntity> bw_del_list, List<JyrckxxEntity> ckList,
+			List<JyrckxxEntity> delCkList, List<CgqEntity> cgq_add_list,
+			List<CgqEntity> cgq_del_list);
+
+	public JyrEntity save(JyrEntity JyrEntity,
+			List<JyrdcxxEntity> dcxxeditlist,
+			List<JyrdcxxEntity> dcxxdeletelist, List<BwEntity> bw_add_list,
+			List<BwEntity> bw_del_list, List<JyrckxxEntity> ckList,
 			List<JyrckxxEntity> delCkList, String tb);
 
 	/**
@@ -140,7 +148,7 @@ public interface JyrService {
 			List<JyrdcxxEntity> dcxxdeletelist, List<BwEntity> bw_add_list,
 			List<BwEntity> bw_del_list, List<JyrckxxEntity> ckList,
 			List<JyrckxxEntity> delCkList);
-	
+
 	public void tbWebService(JyrEntity jyrEntity);
 
 	/**
@@ -191,7 +199,7 @@ public interface JyrService {
 	public List<Map<String, Object>> countWhzyrkz(Long szd);
 
 	public BusinessContext editInit(JyrEntity entity);
-	
+
 	public BusinessContext auditInit(String gnmk, Long voId);
 
 	/**
@@ -218,12 +226,12 @@ public interface JyrService {
 	/** 根据统计经营人的泊位和储罐 */
 	public List<JyrCountEntity> countEventBySzd(CodeEntity szd, String qylx,
 			Date tjsjq, Date tjsjz);
-	
+
 	public List<GkwhqyCountEntity> countGkwhqy(CodeEntity szd, String szqy,
-			String lb1, String lb2,String lb3, Date tjsjq, Date tjsjz);
-	
+			String lb1, String lb2, String lb3, Date tjsjq, Date tjsjz);
+
 	public List<GkwhccssEntity> countGkwhccss(CodeEntity szd, String szqy);
-	
+
 	public Collection<JyrEntity> findAll(Specification<JyrEntity> spec,
 			Sort sort);
 
@@ -280,14 +288,16 @@ public interface JyrService {
 	public void deleteSynTimer(JyrEntity entity, JyrWebService webService);
 
 	public List<JyrEntity> findValid();
-	
+
 	/**
 	 * 保存审核信息
+	 * 
 	 * @param jyrEntity
 	 * @param shxx_change_list
 	 */
-	public void saveShxx(String gnmk, Long voId,List<JyrShxxEntity> shxx_change_list);
-	
+	public void saveShxx(String gnmk, Long voId,
+			List<JyrShxxEntity> shxx_change_list);
+
 	public List<JyrEntity> findByGg(Long ggid);
-	
+
 }

+ 2 - 6
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/bagl/BaglWebService.java

@@ -187,9 +187,7 @@ public class BaglWebService extends BaseController {
 		}
 		entity = wxybabService.save(entity);
 		// 保存总览表信息
-		if(zlb == null){
-			zlb = findZlbByDjbId(entity.getId());
-		}
+		zlb = findZlbByDjbId(entity.getId());
 		if (zlb == null || zlb.getId() == null || zlb.getId().equals(0l)) {
 			zlb = new GqnwxyzlbEntity();
 			if (jyr != null) {
@@ -317,9 +315,7 @@ public class BaglWebService extends BaseController {
 		}
 		entity = wxybabService.submit(entity.getRecordCode(), entity);
 		// 保存总览表信息
-		if(zlb == null){
-			zlb = findZlbByDjbId(entity.getId());
-		}
+		zlb = findZlbByDjbId(entity.getId());
 		if (zlb == null || zlb.getId() == null || zlb.getId().equals(0l)) {
 			zlb = new GqnwxyzlbEntity();
 			if (jyr != null) {

+ 66 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/jyr/JyrxxglWebService.java

@@ -14,9 +14,11 @@ import org.springframework.data.domain.Sort.Direction;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Service;
 
+import com.jtgh.yjpt.client.common.accessory.AccessoryWebService;
 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;
@@ -24,6 +26,7 @@ import com.jtgh.yjpt.controller.BaseController;
 import com.jtgh.yjpt.entity.BaseEntity;
 import com.jtgh.yjpt.entity.auth.UserEntity;
 import com.jtgh.yjpt.entity.common.AccessoryEntity;
+import com.jtgh.yjpt.entity.common.CodeEntity;
 import com.jtgh.yjpt.entity.jyr.BwEntity;
 import com.jtgh.yjpt.entity.jyr.JyrEntity;
 import com.jtgh.yjpt.entity.jyrxxgl.JyrckxxEntity;
@@ -317,6 +320,19 @@ public class JyrxxglWebService extends BaseController {
 			if (zsEntities.size() > 0) {
 				ryjbxxEntity.setFirstZs(zsEntities.get(0));
 			}	
+			List<PredicateModel> filterList2 = new ArrayList<PredicateModel>();
+			addNotEmptyModel(filterList2, "entityType.id", Constants.FJSSLX_RYJBXX,
+					Operator.EQ);
+			addNotEmptyModel(filterList2, "recordStatus",
+					BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+			addNotEmptyModel(filterList2, "entityId",ryjbxxEntity.getId(), PredicateModel.Operator.EQ);
+			Specification<AccessoryEntity> accSpec = SpecificationCreater
+					.searchByPredicateModels(filterList2);
+			Sort s = new Sort(Direction.DESC, "id");
+			List<AccessoryEntity> accList = accessoryService.findAll(accSpec,s);
+			if (accList != null && accList.size() > 0) {
+				ryjbxxEntity.setZp(accList.get(0));
+			}
 		}	
 		return ryjbxxEntity;
 	}
@@ -365,6 +381,56 @@ public class JyrxxglWebService extends BaseController {
 			ryjbxxEntity.setUpdateUser(Utils.getWebServiceUser());
 		}
 		RyjbxxEntity ryjbxx = new RyjbxxEntity();
+		AccessoryEntity acc = ryjbxxEntity.getZp();
+		ryjbxx = ryjbxxService.save(ryjbxxEntity);
+		if(acc!=null && (acc.getId()==null || acc.getId().equals(0l))){
+			List<PredicateModel> filterList2 = new ArrayList<PredicateModel>();
+			addNotEmptyModel(filterList2, "entityType.id", Constants.FJSSLX_RYJBXX,
+					Operator.EQ);
+			addNotEmptyModel(filterList2, "recordStatus",
+					BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+			addNotEmptyModel(filterList2, "entityId",ryjbxxEntity.getId(), PredicateModel.Operator.EQ);
+			Specification<AccessoryEntity> accSpec = SpecificationCreater
+					.searchByPredicateModels(filterList2);
+			Sort s = new Sort(Direction.DESC, "id");
+			List<AccessoryEntity> accList = accessoryService.findAll(accSpec,s);
+			accessoryService.logicDelete(accList);
+			acc.setEntityId(ryjbxxEntity.getId());
+			CodeEntity code = new CodeEntity();
+			code.setId(Constants.FJSSLX_RYJBXX);
+			acc.setEntityType(code);
+			accessoryService.save(acc);
+			if (Constants.YES.equals(GlobalData.JAXWS_SYNC)
+					&& Constants.DEPLOY_MODE_CITY.equals(GlobalData.DEPLOY_MODE)) {
+				AccessoryWebService webService = accessoryService
+						.getAccessoryWebService();
+				try {
+					if (webService != null) {
+						webService.deleteEntities(accList);
+						webService.save(acc);
+						for (AccessoryEntity accessoryEntity : accList) {
+							accessoryEntity.setTbzt(Constants.YES);
+						}
+						acc.setTbzt(Constants.YES);
+					} else {
+						for (AccessoryEntity accessoryEntity : accList) {
+							accessoryEntity.setTbzt(Constants.NO);
+						}
+						acc.setTbzt(Constants.NO);
+					}
+
+				} catch (Exception e) {
+					e.printStackTrace();
+					for (AccessoryEntity accessoryEntity : accList) {
+						accessoryEntity.setTbzt(Constants.NO);
+					}
+					acc.setTbzt(Constants.NO);
+				}
+				accessoryService.logicDelete(accList);
+				accessoryService.save(acc);
+			}	
+		}
+		
 		ryjbxx = ryjbxxService.save(ryjbxxEntity, zsList, deleteZsList, accId);
 		return ryjbxx;
 	}

+ 4 - 5
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/yjgl/cg/CgxxglWebService.java

@@ -190,6 +190,7 @@ public class CgxxglWebService extends BaseController {
 		addNotEmptyModel(filterList, "gq", szgq, Operator.EQ);
 		addNotEmptyModel(filterList, "dwmc", gkjyr, Operator.EQ);
 		addNotEmptyModel(filterList, "cgmc", cgmc, Operator.LIKE);
+		addNotEmptyModel(filterList, "zdwxycggs", new Integer(1), Operator.EQ);
 		addNotEmptyModel(filterList, "recordStatus",
 				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
 		if (Utils.getWebServiceUser() != null) {
@@ -212,13 +213,11 @@ public class CgxxglWebService extends BaseController {
 		if (list == null || list.getTotalPages() <= pageCount) {
 			return new ArrayList<CgEntity>();
 		}
-		for (CgEntity vo : list) {
-			// 检索储罐状态
-			vo.setCgzt(cgztService.findByCg(vo));
-			vo.setCgsy(cgsyService.findByCg(vo));
-		}
 		return list.getContent();
 	}
+	
+	
+	
 
 	/**
 	 * 保存储罐状态

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

@@ -10,10 +10,13 @@ import javax.jws.WebService;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Sort;
+import org.springframework.data.domain.Sort.Direction;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 import org.springframework.stereotype.Service;
 
+import com.jtgh.yjpt.client.common.accessory.AccessoryWebService;
 import com.jtgh.yjpt.client.yjzyxxgl.yjzjk.YjzjkWebService;
 import com.jtgh.yjpt.common.Constants;
 import com.jtgh.yjpt.common.GlobalData;
@@ -27,6 +30,7 @@ import com.jtgh.yjpt.controller.yjzyxxgl.ZyyjjydwController;
 import com.jtgh.yjpt.entity.BaseEntity;
 import com.jtgh.yjpt.entity.auth.UserEntity;
 import com.jtgh.yjpt.entity.common.AccessoryEntity;
+import com.jtgh.yjpt.entity.common.CodeEntity;
 import com.jtgh.yjpt.entity.yjgl.YjyaEntity;
 import com.jtgh.yjpt.entity.yjzyxxgl.JzyjjydwryhzEntity;
 import com.jtgh.yjpt.entity.yjzyxxgl.YjwlEntity;
@@ -87,7 +91,7 @@ public class YjzyxxglWebService extends BaseController {
 	 * @return
 	 */
 	public List<YjzjkEntity> getYjzjkPageListByParams(Long szd, String sfsygkj,
-			String xm, String xb, String xjzd, String gzdw, int n, int pageCount) {
+			String xm, String xb, String xjzd, String gzdw,Long zclb, int n, int pageCount) {
 		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
 		// 根据姓名过滤
 		addNotEmptyModel(filterList, "xm", xm, Operator.LIKE);
@@ -97,6 +101,8 @@ public class YjzyxxglWebService extends BaseController {
 		addNotEmptyModel(filterList, "xjzd", xjzd, Operator.LIKE);
 		// 根据工作单位过滤
 		addNotEmptyModel(filterList, "gzdw", gzdw, Operator.LIKE);
+		// 专长类别
+		addNotEmptyModel(filterList, "zclb", zclb, Operator.EQ);
 		// 根据 所在地过滤
 		if (szd != null)
 			addNotEmptyModel(filterList, "szd.id", szd, Operator.LIKE_R);
@@ -112,6 +118,26 @@ public class YjzyxxglWebService extends BaseController {
 		if (list == null || list.getTotalPages() <= pageCount) {
 			return new ArrayList<YjzjkEntity>();
 		}
+		for(YjzjkEntity entity:list){
+			// 检索附件
+			List<PredicateModel>  fiterList2 = new ArrayList<PredicateModel>();
+			addNotEmptyModel(fiterList2, "entityType.id",
+					Constants.ACCESSORY_ENTITY_TYPE_YJZJK, Operator.EQ);
+			addNotEmptyModel(fiterList2, "recordStatus",
+					BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+			addNotEmptyModel(fiterList2, "entityId", entity.getId(),
+					PredicateModel.Operator.EQ);
+			Specification<AccessoryEntity> accSpec = SpecificationCreater
+					.searchByPredicateModels(fiterList2);
+			Sort s = new Sort(Direction.DESC, "id");
+			List<AccessoryEntity> accList = accessoryService.findAll(accSpec,s);
+			if (accList != null && accList.size() > 0) {
+				AccessoryEntity acc = new AccessoryEntity();
+				acc.setId(accList.get(0).getId());
+				entity.setAccessory(acc);
+			}
+		}
+	
 		return list.getContent();
 	}
 
@@ -140,6 +166,56 @@ public class YjzyxxglWebService extends BaseController {
 			entity.setUpdateDate(new Date());
 			entity.setUpdateUser(Utils.getWebServiceUser());
 		}
+		AccessoryEntity acc = entity.getAccessory();
+		entity = yjzjkService.save(entity);
+		if(acc!=null && (acc.getId()==null || acc.getId().equals(0l))){
+			List<PredicateModel> filterList2 = new ArrayList<PredicateModel>();
+			addNotEmptyModel(filterList2, "entityType.id", Constants.ACCESSORY_ENTITY_TYPE_YJZJK,
+					Operator.EQ);
+			addNotEmptyModel(filterList2, "recordStatus",
+					BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+			addNotEmptyModel(filterList2, "entityId",entity.getId(), PredicateModel.Operator.EQ);
+			Specification<AccessoryEntity> accSpec = SpecificationCreater
+					.searchByPredicateModels(filterList2);
+			Sort s = new Sort(Direction.DESC, "id");
+			List<AccessoryEntity> accList = accessoryService.findAll(accSpec,s);
+			accessoryService.logicDelete(accList);
+			acc.setEntityId(entity.getId());
+			CodeEntity code = new CodeEntity();
+			code.setId(Long.parseLong(Constants.ACCESSORY_ENTITY_TYPE_YJZJK));
+			acc.setEntityType(code);
+			accessoryService.save(acc);
+			if (Constants.YES.equals(GlobalData.JAXWS_SYNC)
+					&& Constants.DEPLOY_MODE_CITY.equals(GlobalData.DEPLOY_MODE)) {
+				AccessoryWebService webService = accessoryService
+						.getAccessoryWebService();
+				try {
+					if (webService != null) {
+						webService.deleteEntities(accList);
+						webService.save(acc);
+						for (AccessoryEntity accessoryEntity : accList) {
+							accessoryEntity.setTbzt(Constants.YES);
+						}
+						acc.setTbzt(Constants.YES);
+					} else {
+						for (AccessoryEntity accessoryEntity : accList) {
+							accessoryEntity.setTbzt(Constants.NO);
+						}
+						acc.setTbzt(Constants.NO);
+					}
+
+				} catch (Exception e) {
+					e.printStackTrace();
+					for (AccessoryEntity accessoryEntity : accList) {
+						accessoryEntity.setTbzt(Constants.NO);
+					}
+					acc.setTbzt(Constants.NO);
+				}
+				accessoryService.logicDelete(accList);
+				accessoryService.save(acc);
+			}
+			
+		}
 		if (fileId == null)
 			fileId = 0l;
 		entity = yjzjkService.saveEntity(entity, fileId);

+ 24 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/zcdc/dc/JdjcWebService.java

@@ -37,7 +37,9 @@ import com.jtgh.yjpt.entity.BaseEntity;
 import com.jtgh.yjpt.entity.auth.UserEntity;
 import com.jtgh.yjpt.entity.check.DcEntity;
 import com.jtgh.yjpt.entity.check.DcZxjcEntity;
+import com.jtgh.yjpt.entity.check.ZcDcCountEntity;
 import com.jtgh.yjpt.entity.common.AccessoryEntity;
+import com.jtgh.yjpt.entity.common.CodeEntity;
 import com.jtgh.yjpt.entity.gg.GgEntity;
 import com.jtgh.yjpt.service.check.DcService;
 import com.jtgh.yjpt.service.check.ZxjcService;
@@ -387,6 +389,8 @@ public class JdjcWebService extends BaseController {
 					&& user.getJyrjcxx() != null) {
 				addNotEmptyModel(filterList, "bdcdw", user.getJyrjcxx(),
 						Operator.EQ);
+				addNotEmptyModel(filterList, "recordStatus",
+						BaseEntity.RECORD_STATE_VALID, Operator.NEQ);
 			} else {
 				// 行政人员根据权限过滤(督查列表菜单ID=42)
 				addRecordCodeFilter(42l, filterList);
@@ -596,5 +600,25 @@ public class JdjcWebService extends BaseController {
 		list = (List<DcEntity>) dcService.findAll(spec);
 		return list;
 	}
+	
+	/**
+	 * 统计督查
+	 * @param szd
+	 * @param tjsjq
+	 * @param tjsjz
+	 * @return
+	 */
+	public List<ZcDcCountEntity> countEvent(Long szd, Date tjsjq,
+			Date tjsjz){
+		if(szd==null || szd.equals(0l)){
+			szd=Constants.SZD_ID_PROVINCE;
+		}
+		CodeEntity entity = new CodeEntity();
+		entity.setId(szd);
+		if (Constants.SZD_ID_PROVINCE.equals(entity.getId()))	
+				return 	dcService.countSzdEvent(entity, tjsjq, tjsjz);
+		else
+				return dcService.countJyrEvent(entity, tjsjq, tjsjz);	
+	}
 
 }

+ 70 - 31
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/zcdc/zc/ZczbWebService.java

@@ -64,6 +64,7 @@ public class ZczbWebService extends BaseController {
 	private BlobDao blobDao;
 	@Autowired
 	private ThreadPoolTaskExecutor threadPool;
+
 	/**
 	 * 保存
 	 * 
@@ -85,22 +86,23 @@ public class ZczbWebService extends BaseController {
 			entity.setSftb(vo.getSftb());
 			entity.setTbzt(vo.getTbzt());
 			entity.setQylb(vo.getQylb());
-			entity.setTbdyid(vo.getTbdyid());			
+			entity.setTbdyid(vo.getTbdyid());
 			entity.setUpdateDate(new Date());
 			entity.setUpdateUser(Utils.getWebServiceUser());
-		}	
+		}
 		entity.setTbzt(Constants.NO);
 		entity = zcService.save(entity);
-		final Long tempid=entity.getId();
+		final Long tempid = entity.getId();
 		Thread thread = new Thread(new Runnable() {
 			@Override
 			public void run() {
 				// 同步
-				ZcEntity tbEntity = zcService.findOne(tempid);		
+				ZcEntity tbEntity = zcService.findOne(tempid);
 				if (Constants.YES.equals(GlobalData.JAXWS_SYNC)
-						&& GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
+						&& GlobalData.DEPLOY_MODE
+								.equals(Constants.DEPLOY_MODE_CITY)) {
 
-					try {								
+					try {
 						ZcWebService webService = zcService.getWebService();
 						if (webService != null) {
 							webService.save(tbEntity);
@@ -135,8 +137,8 @@ public class ZczbWebService extends BaseController {
 							zcyhService.save(zcyhEntity);
 						}
 					}
-				}			
-			}			
+				}
+			}
 		});
 		threadPool.execute(thread);
 		return entity;
@@ -167,7 +169,7 @@ public class ZczbWebService extends BaseController {
 			entity.setSftb(vo.getSftb());
 			entity.setTbzt(vo.getTbzt());
 			entity.setQylb(vo.getQylb());
-			entity.setTbdyid(vo.getTbdyid());	
+			entity.setTbdyid(vo.getTbdyid());
 			entity.setUpdateUser(Utils.getCurrentUser());
 			entity.setUpdateDate(new Date());
 		}
@@ -226,11 +228,11 @@ public class ZczbWebService extends BaseController {
 			tbAddList.add(zcyhEntity);
 			if (null != zcyhEntity.getZgcs()) {// 但是整改措施不为空
 				for (AccessoryEntity zcyhEntity2 : zcyhEntity.getZgcs()) {
-					AccessoryEntity zgcs=null;
-					if(zcyhEntity2.getId()!=null|| !zcyhEntity2.getId().equals(0l)){
-						zgcs = accessoryService.findOne(zcyhEntity2
-								.getId());
-					}	
+					AccessoryEntity zgcs = null;
+					if (zcyhEntity2.getId() != null
+							|| !zcyhEntity2.getId().equals(0l)) {
+						zgcs = accessoryService.findOne(zcyhEntity2.getId());
+					}
 					if (null != zgcs) {
 						zgcs.setEntityId(zcyhEntity.getId());
 						zgcs.setTbzt(Constants.NO);
@@ -239,11 +241,12 @@ public class ZczbWebService extends BaseController {
 				}
 			}
 			if (null != zcyhEntity.getZgjg()) {
-				AccessoryEntity zgjg=null;
-				if(zcyhEntity.getZgjg().getId()!=null|| !zcyhEntity.getZgjg().getId().equals(0l)){
-					zgjg = accessoryService.findOne(zcyhEntity
-							.getZgjg().getId());
-				}			 
+				AccessoryEntity zgjg = null;
+				if (zcyhEntity.getZgjg().getId() != null
+						|| !zcyhEntity.getZgjg().getId().equals(0l)) {
+					zgjg = accessoryService.findOne(zcyhEntity.getZgjg()
+							.getId());
+				}
 				if (null != zgjg) {
 					zgjg.setEntityId(zcyhEntity.getId());
 					zgjg.setTbzt(Constants.NO);
@@ -259,7 +262,8 @@ public class ZczbWebService extends BaseController {
 				ZcEntity tbEntity = zcService.findOne(tempid);
 				// 同步
 				if (Constants.YES.equals(GlobalData.JAXWS_SYNC)
-						&& GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
+						&& GlobalData.DEPLOY_MODE
+								.equals(Constants.DEPLOY_MODE_CITY)) {
 					try {
 						ZcWebService webService = zcService.getWebService();
 						if (webService != null) {
@@ -308,30 +312,34 @@ public class ZczbWebService extends BaseController {
 						}
 					}
 					AccessoryWebService accessoryWebService = accessoryService
-							.getAccessoryWebService(tbEntity.getSzd().getId());		
+							.getAccessoryWebService(tbEntity.getSzd().getId());
 					if (null != accessoryWebService) {
 						List<AccessoryEntity> accList = new ArrayList<AccessoryEntity>();
 						for (ZcyhEntity zcyhEntity : yhList) {
 							accList.addAll((List<AccessoryEntity>) accessoryController
-									.listById(zcyhEntity.getId(),
+									.listById(
+											zcyhEntity.getId(),
 											Long.parseLong(Constants.FJSSLX_YHZP))
 									.getAttribute("records"));
 							accList.addAll((List<AccessoryEntity>) accessoryController
-									.listById(zcyhEntity.getId(),
+									.listById(
+											zcyhEntity.getId(),
 											Long.parseLong(Constants.FJSSLX_ZGHZP))
 									.getAttribute("records"));
 							accList.addAll((List<AccessoryEntity>) accessoryController
-									.listById(zcyhEntity.getId(),
+									.listById(
+											zcyhEntity.getId(),
 											Long.parseLong(Constants.FJSSLX_ZGCSFJ))
 									.getAttribute("records"));
 							accList.addAll((List<AccessoryEntity>) accessoryController
-									.listById(zcyhEntity.getId(),
+									.listById(
+											zcyhEntity.getId(),
 											Long.parseLong(Constants.FJSSLX_ZGJGFJ))
 									.getAttribute("records"));
 						}
-						if(accList!=null){
-							for(AccessoryEntity acc:accList){
-								if(acc.getTbzt().equals(Constants.NO)){
+						if (accList != null) {
+							for (AccessoryEntity acc : accList) {
+								if (acc.getTbzt().equals(Constants.NO)) {
 									try {
 										accessoryWebService.save(acc);
 										acc.setTbzt(Constants.YES);
@@ -340,15 +348,15 @@ public class ZczbWebService extends BaseController {
 										e.printStackTrace();
 										acc.setTbzt(Constants.NO);
 										accessoryService.save(acc);
-									}	
-								}							
+									}
+								}
 							}
 						}
 					}
 				}
 			}
 		});
-		threadPool.execute(thread);		
+		threadPool.execute(thread);
 		return zcEntity;
 	}
 
@@ -557,4 +565,35 @@ public class ZczbWebService extends BaseController {
 		return zcyh;
 	}
 
+	/**
+	 * 查询所有隐患
+	 * 
+	 * @return
+	 */
+	public List<ZcyhEntity> getZcyhListByParams(String xmmc, String szwz, int n,
+			int pageCount) {
+		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
+		if (Constants.YES.equals(Utils.getCurrentUser().getSfjyr())) {
+			addNotEmptyModel(filterList, "sszc.qymc", Utils.getCurrentUser()
+					.getJyrjcxx(), Operator.EQ);
+		}
+		addNotEmptyModel(filterList, "recordStatus",
+				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+		addNotEmptyModel(filterList, "sssg", "sssg", Operator.NL);
+		addNotEmptyModel(filterList, "xmmc", xmmc, Operator.LIKE);
+		addNotEmptyModel(filterList, "szwz", szwz, Operator.LIKE);
+		addNotEmptyModel(filterList, "sszc.recordStatus",
+				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+		addNotEmptyModel(filterList, "sszc", "sszc", Operator.NNL);
+		Specification<ZcyhEntity> spec = SpecificationCreater
+				.searchByPredicateModels(filterList);
+		SinglePageRequest page = new SinglePageRequest(pageCount, n, "desc",
+				"id");
+		Page<ZcyhEntity> pageList = zcyhService.findAll(spec, page);
+		if (page == null || pageList.getTotalPages() <= pageCount) {
+			return new ArrayList<ZcyhEntity>();
+		}
+		return pageList.getContent();
+	}
+
 }

+ 2 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/zysqbp/WhsqbpWebService.java

@@ -248,6 +248,8 @@ public class WhsqbpWebService extends BaseController {
 			} else {
 				// 行政人员根据权限过滤(危货列表菜单ID=26)
 				addRecordCodeFilter(26l, filterList);
+				addNotEmptyModel(filterList, "recordStatus",
+						BaseEntity.RECORD_STATE_VALID, Operator.NEQ);
 			}
 		}
 		Specification<ZysqbpEntity> spec = SpecificationCreater