Преглед изворни кода

git-svn-id: https://192.168.57.71/svn/hbghj@127 201dd7a2-ec1b-f84b-8b06-88221118ff88

xt_xuhao пре 9 година
родитељ
комит
5b794c860b
74 измењених фајлова са 4529 додато и 421 уклоњено
  1. 21 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/DtxtBwDao.java
  2. 26 3
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/DtywCbsbDao.java
  3. 15 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/YjptBwDao.java
  4. 15 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/YjptGkwxhwzyfzblFzDao.java
  5. 15 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/YjptGkwxhwzyfzblhhzDao.java
  6. 15 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/YjptWxhwpmDao.java
  7. 15 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/YjptZysqbpDao.java
  8. 12 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/common/CjhsCustomRepository.java
  9. 2 5
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/DtxtSjhsjgEntity.java
  10. 2 4
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/DtxtXjhsjgEntity.java
  11. 16 9
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/DtywCbsbEntity.java
  12. 5 7
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/DtywCbsbgtHwEntity.java
  13. 2 4
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/DtywCbsbszHwEntity.java
  14. 2 4
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/DtywCbsbytHwEntity.java
  15. 407 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/YjptBwEntity.java
  16. 162 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/YjptGkwxhwzyfzblFzEntity.java
  17. 308 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/YjptGkwxhwzyfzblhhzEntity.java
  18. 219 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/YjptWxhwpmEntity.java
  19. 505 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/YjptZysqbpEntity.java
  20. 2 4
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/ZtzdCbzlViewEntity.java
  21. 2 4
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/ZtzdGjViewEntity.java
  22. 2 4
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/ZtzdGkmlViewEntity.java
  23. 18 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/DtxtBwService.java
  24. 24 7
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/DtywCbsbService.java
  25. 19 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/YjptBwService.java
  26. 19 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/YjptGkwxhwzyfzblFzService.java
  27. 19 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/YjptGkwxhwzyfzblhhzService.java
  28. 19 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/YjptWxhwpmService.java
  29. 19 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/YjptZysqbpService.java
  30. 34 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/DtxtBwServiceImpl.java
  31. 149 5
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/DtywCbsbServiceImpl.java
  32. 30 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/YjptBwServiceImpl.java
  33. 30 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/YjptGkwxhwzyfzblFzServiceImpl.java
  34. 30 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/YjptGkwxhwzyfzblhhzServiceImpl.java
  35. 30 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/YjptWxhwpmServiceImpl.java
  36. 30 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/YjptZysqbpServiceImpl.java
  37. 96 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/sync/CjhsSyn.java
  38. 7 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/controller/sys/WxhwpmController.java
  39. 10 2
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/controller/zyfzndjy/GkwxhwzyfzblhhzController.java
  40. 296 171
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/controller/zysqbp/ZysqbpController.java
  41. 9 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/dao/jyr/BwDao.java
  42. 6 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/dao/jyr/WxhwpmDao.java
  43. 6 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/dao/zyfzndjy/Gkwxhwzyfzbl_fzbDao.java
  44. 6 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/dao/zyfzndjy/GkwxhwzyfzblhhzbDao.java
  45. 6 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/dao/zysqbp/ZysqbpDao.java
  46. 11 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/cjhs/CjhsEntity.java
  47. 18 1
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/cjhs/CjhsHwEntity.java
  48. 15 1
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/jyr/BwEntity.java
  49. 13 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/jyr/WxhwpmEntity.java
  50. 12 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/zyfzndjy/GkwxhwzyfzblFzEntity.java
  51. 13 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/zyfzndjy/GkwxhwzyfzblhhzEntity.java
  52. 12 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/zysqbp/ZysqbpEntity.java
  53. 29 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/cjhs/CjhsDbService.java
  54. 22 13
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/cjhs/CjhsService.java
  55. 41 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/cjhs/GkToCjhsService.java
  56. 66 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/cjhs/CjhsDbServiceImpl.java
  57. 337 55
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/cjhs/CjhsServiceImpl.java
  58. 633 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/cjhs/GkToCjhsServiceImpl.java
  59. 8 3
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/jyr/BwServiceImpl.java
  60. 5 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/jyr/JyrServiceImpl.java
  61. 6 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/sys/WxhwpmServiceImpl.java
  62. 8 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/zyfzhz/GkwxhwzyfzhzServiceImpl.java
  63. 5 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/zyfzndjy/GkwxhwzyfzServiceImpl.java
  64. 12 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/zyfzndjy/GkwxhwzyfzblhhzServiceImpl.java
  65. 10 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/zysqbp/ZysqbpServiceImpl.java
  66. 6 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/jyr/BwService.java
  67. 6 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/sys/WxhwpmService.java
  68. 8 1
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/zyfzndjy/GkwxhwzyfzService.java
  69. 6 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/zyfzndjy/GkwxhwzyfzblhhzService.java
  70. 6 0
      gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/zysqbp/ZysqbpService.java
  71. 3 3
      gkaq/yjpt-java/trunk/resources/spring/application.properties
  72. 30 111
      gkaq/yjpt-java/trunk/resources/spring/applicationContext-datachange.xml
  73. 7 0
      gkaq/yjpt-java/trunk/resources/sql/init/9.update.sql.ftl
  74. 499 0
      gkaq/yjpt-java/trunk/resources/sql/init/cjhs.table.sql

+ 21 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/DtxtBwDao.java

@@ -0,0 +1,21 @@
+package com.jtgh.cjhs.dao;
+
+import java.util.List;
+
+import org.springframework.data.jpa.repository.Query;
+
+import com.jtgh.cjhs.dao.common.CjhsRepository;
+import com.jtgh.cjhs.entity.DtxtBwEntity;
+
+/**
+ *长江海事DAO
+ * 
+ * @author 刘福亮
+ * 
+ */
+public interface DtxtBwDao extends
+		CjhsRepository<DtxtBwEntity, String> {
+
+	@Query(value = " SELECT * FROM DTXT_BW WHERE BWDM=?1   ", nativeQuery = true)
+	public List<DtxtBwEntity> findByBwdm(String bwdm);
+}

+ 26 - 3
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/DtywCbsbDao.java

@@ -8,14 +8,37 @@ import com.jtgh.cjhs.dao.common.CjhsRepository;
 import com.jtgh.cjhs.entity.DtywCbsbEntity;
 import com.jtgh.cjhs.entity.DtywCbsbEntity;
 
 
 /**
 /**
- *长江海事DAO
+ * 长江海事DAO
  * 
  * 
  * @author 刘福亮
  * @author 刘福亮
  * 
  * 
  */
  */
-public interface DtywCbsbDao extends
-		CjhsRepository<DtywCbsbEntity, String> {
+public interface DtywCbsbDao extends CjhsRepository<DtywCbsbEntity, String> {
 
 
 	@Query(value = " SELECT * FROM (SELECT * FROM DTYW_CBSB WHERE ZWCM=?1 ORDER BY MRUT DESC)WHERE  ROWNUM<2   ", nativeQuery = true)
 	@Query(value = " SELECT * FROM (SELECT * FROM DTYW_CBSB WHERE ZWCM=?1 ORDER BY MRUT DESC)WHERE  ROWNUM<2   ", nativeQuery = true)
 	public List<DtywCbsbEntity> findByZwcm(String zwcm);
 	public List<DtywCbsbEntity> findByZwcm(String zwcm);
+
+	@Query(value = " SELECT SBDBH,HWLX,WGBH,ZQYSMCZW,WXLB,ZZL,LZBZ,WXHWBZ,BSXH,XH FROM  DTYW_CBSBGT_HW H WHERE H.SBDBH=?1 ", nativeQuery = true)
+	public List<Object[]> findCbsbgtHwBySbdbh(String sbdbh);
+
+	@Query(value = " SELECT SBDBH,HWLX,WGBH,ZQYSMCZW,WXLB,ZZL,LZBZ,WXHWBZ,BSXH,XH FROM  DTYW_CBSBSZ_HW H WHERE H.SBDBH=?1", nativeQuery = true)
+	public List<Object[]> findCbsbszHwBySbdbh(String sbdbh);
+
+	@Query(value = " SELECT SBDBH,HWLX,WGBH,ZQYSMCZW,WXLB,SL,LZBZ,WXHWBZ,BSXH,XH FROM  DTYW_CBSBYT_HW H WHERE H.SBDBH=?1 ", nativeQuery = true)
+	public List<Object[]> findCbsbytHwBySbdbh(String sbdbh);
+
+	@Query(value = " SELECT SBDBH,HWLX,WGBH,ZQYSMCZW,WXLB,ZZL,LZBZ,WXHWBZ,BSXH,XH FROM  DTYW_CBSBGT_HW H "
+			+ " WHERE H.SBDBH=?1 AND H.BSXH=?2 AND H.XH=?3 ", nativeQuery = true)
+	public List<Object[]> findCbsbgtHwBySbdbhAndBsxhAndXh(String sbdbh,
+			Long bsxh, Long xh);
+
+	@Query(value = " SELECT SBDBH,HWLX,WGBH,ZQYSMCZW,WXLB,ZZL,LZBZ,WXHWBZ,BSXH,XH FROM  DTYW_CBSBSZ_HW H "
+			+ " WHERE H.SBDBH=?1 AND H.BSXH=?2 AND H.XH=?3 ", nativeQuery = true)
+	public List<Object[]> findCbsbszHwBySbdbhAndBsxhAndXh(String sbdbh,
+			Long bsxh, Long xh);
+
+	@Query(value = " SELECT SBDBH,HWLX,WGBH,ZQYSMCZW,WXLB,SL,LZBZ,WXHWBZ,BSXH,XH FROM  DTYW_CBSBYT_HW H "
+			+ " WHERE H.SBDBH=?1 AND H.BSXH=?2 AND H.XH=?3  ", nativeQuery = true)
+	public List<Object[]> findCbsbytHwBySbdbhAndBsxhAndXh(String sbdbh,
+			Long bsxh, Long xh);
 }
 }

+ 15 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/YjptBwDao.java

@@ -0,0 +1,15 @@
+package com.jtgh.cjhs.dao;
+
+import com.jtgh.cjhs.dao.common.CjhsRepository;
+import com.jtgh.cjhs.entity.YjptBwEntity;
+
+/**
+ *长江海事泊位DAO
+ * 
+ * @author 刘福亮
+ * 
+ */
+public interface YjptBwDao extends
+		CjhsRepository<YjptBwEntity, String> {
+
+}

+ 15 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/YjptGkwxhwzyfzblFzDao.java

@@ -0,0 +1,15 @@
+package com.jtgh.cjhs.dao;
+
+import com.jtgh.cjhs.dao.common.CjhsRepository;
+import com.jtgh.cjhs.entity.YjptGkwxhwzyfzblFzEntity;
+
+/**
+ *长江海事附证信息DAO
+ * 
+ * @author 刘福亮
+ * 
+ */
+public interface YjptGkwxhwzyfzblFzDao extends
+		CjhsRepository<YjptGkwxhwzyfzblFzEntity, String> {
+
+}

+ 15 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/YjptGkwxhwzyfzblhhzDao.java

@@ -0,0 +1,15 @@
+package com.jtgh.cjhs.dao;
+
+import com.jtgh.cjhs.dao.common.CjhsRepository;
+import com.jtgh.cjhs.entity.YjptGkwxhwzyfzblhhzEntity;
+
+/**
+ *附证DAO
+ * 
+ * @author 刘福亮
+ * 
+ */
+public interface YjptGkwxhwzyfzblhhzDao extends
+		CjhsRepository<YjptGkwxhwzyfzblhhzEntity, String> {
+
+}

+ 15 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/YjptWxhwpmDao.java

@@ -0,0 +1,15 @@
+package com.jtgh.cjhs.dao;
+
+import com.jtgh.cjhs.dao.common.CjhsRepository;
+import com.jtgh.cjhs.entity.YjptWxhwpmEntity;
+
+/**
+ *长江海事危险品DAO
+ * 
+ * @author 刘福亮
+ * 
+ */
+public interface YjptWxhwpmDao extends
+		CjhsRepository<YjptWxhwpmEntity, String> {
+
+}

+ 15 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/YjptZysqbpDao.java

@@ -0,0 +1,15 @@
+package com.jtgh.cjhs.dao;
+
+import com.jtgh.cjhs.dao.common.CjhsRepository;
+import com.jtgh.cjhs.entity.YjptZysqbpEntity;
+
+/**
+ *长江海事危险品DAO
+ * 
+ * @author 刘福亮
+ * 
+ */
+public interface YjptZysqbpDao extends
+		CjhsRepository<YjptZysqbpEntity, String> {
+
+}

+ 12 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/dao/common/CjhsCustomRepository.java

@@ -90,4 +90,16 @@ public class CjhsCustomRepository<T  , ID extends Serializable>
 		super(entityInformation, entityManager);
 		super(entityInformation, entityManager);
 		this.entityManager = entityManager;
 		this.entityManager = entityManager;
 	}
 	}
+	
+	public <S extends T> S save(S entity) {
+		return super.save(entity);
+	}
+	
+	public T saveAndFlush(T entity) {
+		return super.saveAndFlush(entity);
+	}
+	
+	public <S extends T> List<S> save(Iterable<S> entities) {
+		return super.save(entities);
+	}
 }
 }

+ 2 - 5
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/DtxtSjhsjgEntity.java

@@ -2,16 +2,13 @@ package com.jtgh.cjhs.entity;
 
 
 import java.util.Date;
 import java.util.Date;
 
 
-import javax.persistence.Entity;
-import javax.persistence.Table;
-
 /**
 /**
  * 省级海事机构
  * 省级海事机构
  * @author 刘福亮
  * @author 刘福亮
  *
  *
  */
  */
-@Entity
-@Table(name = "DTXT_SJHSJG")
+//@Entity
+//@Table(name = "DTXT_SJHSJG")
 public class DtxtSjhsjgEntity  {
 public class DtxtSjhsjgEntity  {
 
 
 
 

+ 2 - 4
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/DtxtXjhsjgEntity.java

@@ -1,15 +1,13 @@
 package com.jtgh.cjhs.entity;
 package com.jtgh.cjhs.entity;
 
 
-import javax.persistence.Entity;
-import javax.persistence.Table;
 
 
 /**
 /**
  * 下级海事机构
  * 下级海事机构
  * @author 刘福亮
  * @author 刘福亮
  *
  *
  */
  */
-@Entity
-@Table(name = "DTXT_XJHSJG")
+//@Entity
+//@Table(name = "DTXT_XJHSJG")
 public class DtxtXjhsjgEntity {
 public class DtxtXjhsjgEntity {
 
 
 	//登录机构代码
 	//登录机构代码

+ 16 - 9
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/DtywCbsbEntity.java

@@ -1,7 +1,9 @@
 package com.jtgh.cjhs.entity;
 package com.jtgh.cjhs.entity;
 
 
+import java.io.Serializable;
 import java.util.Date;
 import java.util.Date;
 
 
+import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Id;
 import javax.persistence.Table;
 import javax.persistence.Table;
@@ -12,10 +14,14 @@ import javax.persistence.Table;
  */
  */
 @Entity
 @Entity
 @Table(name = "DTYW_CBSB")
 @Table(name = "DTYW_CBSB")
-public class DtywCbsbEntity {
+public class DtywCbsbEntity implements Serializable {
 
 
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 7129411283139438804L;
 	//申报单编号
 	//申报单编号
-	private  String sbdbh;
+	private String id;
 	//申报单类别
 	//申报单类别
 	private  String sbdlb;
 	private  String sbdlb;
 	//船舶编号
 	//船舶编号
@@ -50,6 +56,14 @@ public class DtywCbsbEntity {
 	private String nwmbz;
 	private String nwmbz;
 	//进出港标志
 	//进出港标志
 	private String jcgbz;
 	private String jcgbz;
+	@Id
+	@Column(name = "SBDBH")
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
 	public String getHc() {
 	public String getHc() {
 		return hc;
 		return hc;
 	}
 	}
@@ -85,13 +99,6 @@ public class DtywCbsbEntity {
 	//流转标志
 	//流转标志
 	private  String lzbz;
 	private  String lzbz;
 	
 	
-	@Id
-	public String getSbdbh() {
-		return sbdbh;
-	}
-	public void setSbdbh(String sbdbh) {
-		this.sbdbh = sbdbh;
-	}
 	public String getSbdlb() {
 	public String getSbdlb() {
 		return sbdlb;
 		return sbdlb;
 	}
 	}

+ 5 - 7
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/DtywCbsbgtHwEntity.java

@@ -1,14 +1,12 @@
 package com.jtgh.cjhs.entity;
 package com.jtgh.cjhs.entity;
 
 
-import javax.persistence.Entity;
-import javax.persistence.Table;
 /**
 /**
  * 船舶申报固体货物
  * 船舶申报固体货物
  * @author 刘福亮
  * @author 刘福亮
  *
  *
  */
  */
-@Entity
-@Table(name = "DTYW_CBSBGT_HW")
+//@Entity
+//@Table(name = "DTYW_CBSBGT_HW")
 public class DtywCbsbgtHwEntity {
 public class DtywCbsbgtHwEntity {
 
 
 	//申报单编号
 	//申报单编号
@@ -22,7 +20,7 @@ public class DtywCbsbgtHwEntity {
 	//危险类别
 	//危险类别
 	private  String wxlb;
 	private  String wxlb;
 	//总重量
 	//总重量
-	private  String zzl;
+	private  Double zzl;
 	//流转标志
 	//流转标志
 	private  String lzbz;
 	private  String lzbz;
 	//危险货物标志
 	//危险货物标志
@@ -69,10 +67,10 @@ public class DtywCbsbgtHwEntity {
 	public void setWxhwbz(String wxhwbz) {
 	public void setWxhwbz(String wxhwbz) {
 		this.wxhwbz = wxhwbz;
 		this.wxhwbz = wxhwbz;
 	}
 	}
-	public String getZzl() {
+	public Double getZzl() {
 		return zzl;
 		return zzl;
 	}
 	}
-	public void setZzl(String zzl) {
+	public void setZzl(Double zzl) {
 		this.zzl = zzl;
 		this.zzl = zzl;
 	}
 	}
 	
 	

+ 2 - 4
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/DtywCbsbszHwEntity.java

@@ -1,8 +1,6 @@
 package com.jtgh.cjhs.entity;
 package com.jtgh.cjhs.entity;
 
 
-import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Id;
-import javax.persistence.Table;
 
 
 /**
 /**
  * 船舶申报散装货物
  * 船舶申报散装货物
@@ -10,8 +8,8 @@ import javax.persistence.Table;
  * @author 刘福亮
  * @author 刘福亮
  * 
  * 
  */
  */
-@Entity
-@Table(name = "DTYW_CBSBSZ_HW")
+//@Entity
+//@Table(name = "DTYW_CBSBSZ_HW")
 public class DtywCbsbszHwEntity  {
 public class DtywCbsbszHwEntity  {
 
 
 	// 申报单编号
 	// 申报单编号

+ 2 - 4
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/DtywCbsbytHwEntity.java

@@ -1,14 +1,12 @@
 package com.jtgh.cjhs.entity;
 package com.jtgh.cjhs.entity;
 
 
-import javax.persistence.Entity;
-import javax.persistence.Table;
 /**
 /**
  * 船舶申报液体货物
  * 船舶申报液体货物
  * @author 刘福亮
  * @author 刘福亮
  *
  *
  */
  */
-@Entity
-@Table(name = "DTYW_CBSBYT_HW")
+//@Entity
+//@Table(name = "DTYW_CBSBYT_HW")
 public class DtywCbsbytHwEntity {
 public class DtywCbsbytHwEntity {
 
 
 
 

+ 407 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/YjptBwEntity.java

@@ -0,0 +1,407 @@
+package com.jtgh.cjhs.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "YJPT_BW")
+public class YjptBwEntity  implements Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -5305290086366911283L;
+	/**
+	 * ID
+	 * 
+	 * @pdOid 0183bf29-52d3-40fb-9795-a72937812303
+	 */
+	private String id;
+
+	private String szd;
+	
+	/**
+	 * 所在港区
+	 * 
+	 * @pdOid 3758ee69-7717-491e-b3fd-39e609d4effb
+	 */
+	private String szgq;
+	/**
+	 * 企业名称
+	 * 
+	 * @pdOid 65854a35-8511-4d7e-a7a8-bb7efbfbf145
+	 */
+	private String qymc;
+	/**
+	 * 码头名称
+	 * 
+	 * @pdOid b3e2d7c0-454c-4d30-b1d2-f7ca8d4d18f3
+	 */
+	private String mtmc;
+	/**
+	 * 泊位名称
+	 * 
+	 * @pdOid 7701587a-718d-4384-b44d-fa90d6d682c2
+	 */
+	private String bwmc;
+	/**
+	 * 泊位属性
+	 * 
+	 * @pdOid 6c6022ab-6db4-4dfe-85e7-85ec1ef7ecef
+	 */
+	private String bwsx;
+	/**
+	 * 泊位所在水系
+	 * 
+	 * @pdOid 4479fc9b-33be-4195-bf8b-7267364a5bbc
+	 */
+	private String bwszsx;
+	/**
+	 * 服务类型
+	 * 
+	 * @pdOid 140b2adb-d269-48b1-a33d-d3b0cb86928b
+	 */
+	private String fwlx;
+	/**
+	 * 投产年份
+	 * 
+	 * @pdOid fba87ac2-aa71-46f4-8b0a-62680b74001d
+	 */
+	private Integer tcnf;
+	/**
+	 * 结构型式
+	 * 
+	 * @pdOid 91067219-1339-46b1-9ddc-b8d8d58ecf3b
+	 */
+	private String jgxs;
+	/**
+	 * 生产类型
+	 * 
+	 * @pdOid 5fac023e-7a54-4d2c-8254-747061e99ab9
+	 */
+	private String sclx;
+	/**
+	 * 竣工验收年份
+	 * 
+	 * @pdOid 98e627e6-2d10-4bd9-a237-184cf9597e1c
+	 */
+	private Integer jgysnf;
+	/**
+	 * 前沿设计水深
+	 * 
+	 * @pdOid 31f6bacd-90d9-4f01-b6f7-c9519bca2289
+	 */
+	private String qysjsh;
+	/**
+	 * 前沿实际水深
+	 * 
+	 * @pdOid 36c29d4d-8f9b-42c2-9d6a-498858f885c6
+	 */
+	private String qysjss;
+	/**
+	 * 泊位长度
+	 * 
+	 * @pdOid 22a267cf-0359-4ec3-baf2-af5dd2ed8f40
+	 */
+	private String bwcd;
+	/**
+	 * 危险品泊位
+	 * 
+	 * @pdOid f425e748-4ef8-4b3b-b01b-7d91402b9973
+	 */
+	private String wxpbw;
+	/**
+	 * 设计通过能力
+	 * 
+	 * @pdOid cf94b520-f143-49d7-8940-c525c1816d43
+	 */
+	private String sjtgnl;
+	/**
+	 * 设计靠泊能力(吨级)
+	 * 
+	 * @pdOid 22f9ebff-4c02-409e-801f-6a788b77ca07
+	 */
+	private String sjkpnl;
+	/**
+	 * 年货物通过能力
+	 * 
+	 * @pdOid c3bdc455-9d26-44dd-aeb5-9dcc3afe4262
+	 */
+	private String nhwtgml;
+	/**
+	 * 年危险货物吞吐量
+	 * 
+	 * @pdOid 7bd0b0df-9258-4020-b220-f8a5992fe56c
+	 */
+	private String nwxhwttl;
+	/**
+	 * 核查靠泊能力(吨级)
+	 * 
+	 * @pdOid 03815e4e-6d06-4cd1-a2ce-9bf79d93510b
+	 */
+	private String hckpnl;
+	/**
+	 * 专业化泊位分类
+	 * 
+	 * @pdOid 64eb8c23-bab6-485a-9483-26937005c8ba
+	 */
+	private String zyhbwfl;
+	/**
+	 * 经度
+	 * 
+	 * @pdOid c1c26ed1-a0de-4cec-8ca7-dbd57925791b
+	 */
+	private String jd;
+	/**
+	 * 纬度
+	 * 
+	 * @pdOid d1dae836-dccf-4cea-8e9c-adb91f87c61f
+	 */
+	private String wd;
+	/**
+	 * 是否发证
+	 * 
+	 * @pdOid f257848d-55f8-452d-ab47-35f7dfe3f3c9
+	 */
+	private String sffz;
+	/**
+	 * 泊位用途
+	 * 
+	 * @pdOid 6dbdb616-401e-47c3-a3bc-fa337a0d192e
+	 */
+	private String bwyt;
+	/**
+	 * 作业认可范围
+	 * 
+	 * @pdOid b63eb646-b0f4-44df-9309-4059347a642d
+	 */
+	private String zyrkfw;
+	/**
+	 * 泊位用途
+	 */
+	private String zwbwyt;
+
+	@Id
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getSzgq() {
+		return szgq;
+	}
+	public void setSzgq(String szgq) {
+		this.szgq = szgq;
+	}
+	public String getQymc() {
+		return qymc;
+	}
+	public void setQymc(String qymc) {
+		this.qymc = qymc;
+	}
+	public String getMtmc() {
+		return mtmc;
+	}
+	public void setMtmc(String mtmc) {
+		this.mtmc = mtmc;
+	}
+	public String getBwmc() {
+		return bwmc;
+	}
+	public void setBwmc(String bwmc) {
+		this.bwmc = bwmc;
+	}
+	public String getBwsx() {
+		return bwsx;
+	}
+	public void setBwsx(String bwsx) {
+		this.bwsx = bwsx;
+	}
+	public String getBwszsx() {
+		return bwszsx;
+	}
+	public void setBwszsx(String bwszsx) {
+		this.bwszsx = bwszsx;
+	}
+	public String getFwlx() {
+		return fwlx;
+	}
+	public void setFwlx(String fwlx) {
+		this.fwlx = fwlx;
+	}
+	public Integer getTcnf() {
+		return tcnf;
+	}
+	public void setTcnf(Integer tcnf) {
+		this.tcnf = tcnf;
+	}
+	public String getJgxs() {
+		return jgxs;
+	}
+	public void setJgxs(String jgxs) {
+		this.jgxs = jgxs;
+	}
+	public String getSclx() {
+		return sclx;
+	}
+	public void setSclx(String sclx) {
+		this.sclx = sclx;
+	}
+	public Integer getJgysnf() {
+		return jgysnf;
+	}
+	public void setJgysnf(Integer jgysnf) {
+		this.jgysnf = jgysnf;
+	}
+	public String getQysjsh() {
+		return qysjsh;
+	}
+	public void setQysjsh(String qysjsh) {
+		this.qysjsh = qysjsh;
+	}
+	public String getQysjss() {
+		return qysjss;
+	}
+	public void setQysjss(String qysjss) {
+		this.qysjss = qysjss;
+	}
+	public String getBwcd() {
+		return bwcd;
+	}
+	public void setBwcd(String bwcd) {
+		this.bwcd = bwcd;
+	}
+	public String getWxpbw() {
+		return wxpbw;
+	}
+	public void setWxpbw(String wxpbw) {
+		this.wxpbw = wxpbw;
+	}
+	public String getSjtgnl() {
+		return sjtgnl;
+	}
+	public void setSjtgnl(String sjtgnl) {
+		this.sjtgnl = sjtgnl;
+	}
+	public String getSjkpnl() {
+		return sjkpnl;
+	}
+	public void setSjkpnl(String sjkpnl) {
+		this.sjkpnl = sjkpnl;
+	}
+	public String getNhwtgml() {
+		return nhwtgml;
+	}
+	public void setNhwtgml(String nhwtgml) {
+		this.nhwtgml = nhwtgml;
+	}
+	public String getNwxhwttl() {
+		return nwxhwttl;
+	}
+	public void setNwxhwttl(String nwxhwttl) {
+		this.nwxhwttl = nwxhwttl;
+	}
+	public String getHckpnl() {
+		return hckpnl;
+	}
+	public void setHckpnl(String hckpnl) {
+		this.hckpnl = hckpnl;
+	}
+	public String getZyhbwfl() {
+		return zyhbwfl;
+	}
+	public void setZyhbwfl(String zyhbwfl) {
+		this.zyhbwfl = zyhbwfl;
+	}
+	public String getJd() {
+		return jd;
+	}
+	public void setJd(String jd) {
+		this.jd = jd;
+	}
+	public String getWd() {
+		return wd;
+	}
+	public void setWd(String wd) {
+		this.wd = wd;
+	}
+	public String getSffz() {
+		return sffz;
+	}
+	public void setSffz(String sffz) {
+		this.sffz = sffz;
+	}
+	public String getBwyt() {
+		return bwyt;
+	}
+	public void setBwyt(String bwyt) {
+		this.bwyt = bwyt;
+	}
+	public String getZyrkfw() {
+		return zyrkfw;
+	}
+	public void setZyrkfw(String zyrkfw) {
+		this.zyrkfw = zyrkfw;
+	}
+	public String getZwbwyt() {
+		return zwbwyt;
+	}
+	public void setZwbwyt(String zwbwyt) {
+		this.zwbwyt = zwbwyt;
+	}
+	
+
+	/** 记录创建人 */
+	private String addUser = null;
+	/** 记录创建时间 */
+	private Date addDate = null;
+	/** 记录更新人 */
+	private String updateUser = null;
+	/** 记录更新时间 */
+	private Date updateDate = null;
+	/** 记录状态 */
+	private int recordStatus = 1;
+	public String getAddUser() {
+		return addUser;
+	}
+	public void setAddUser(String addUser) {
+		this.addUser = addUser;
+	}
+	public Date getAddDate() {
+		return addDate;
+	}
+	public void setAddDate(Date addDate) {
+		this.addDate = addDate;
+	}
+	public String getUpdateUser() {
+		return updateUser;
+	}
+	public void setUpdateUser(String updateUser) {
+		this.updateUser = updateUser;
+	}
+	public Date getUpdateDate() {
+		return updateDate;
+	}
+	public void setUpdateDate(Date updateDate) {
+		this.updateDate = updateDate;
+	}
+	public int getRecordStatus() {
+		return recordStatus;
+	}
+	public void setRecordStatus(int recordStatus) {
+		this.recordStatus = recordStatus;
+	}
+	public String getSzd() {
+		return szd;
+	}
+	public void setSzd(String szd) {
+		this.szd = szd;
+	}
+	
+
+}

+ 162 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/YjptGkwxhwzyfzblFzEntity.java

@@ -0,0 +1,162 @@
+package com.jtgh.cjhs.entity;
+
+/* ====================================================================
+ * $Source:  $
+ * $Author:  $
+ * $Revision:  $
+ * $Date:  $
+ * ====================================================================
+ *  File  			Gkwxhwzyfzblhhz.java
+ *  Description    	
+ *  History      	2014/01/03             
+ *           Copyright 2002 Co. All Rights Reserved.
+ * ====================================================================
+ */
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+/**
+ * 港口危险货物作业办理或换证申请表附证
+ * 
+ * @author
+ * @version 1.0
+ */
+@Entity
+@Table(name = "YJPT_GKWXHWZYFZBL_FZ")
+public class YjptGkwxhwzyfzblFzEntity implements Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 420403174224016697L;
+	/**
+	 * id
+	 */
+	private String id = null;
+	private String szd;
+	private String fzsq;
+	private String qynbmc =null;
+
+	/**
+	 * 作业场所
+	 */
+	private String zycs = null;
+	/**
+	 * 附证场所编号
+	 */
+	private String fzcsbh = null;
+
+	/**
+	 * 企业内部编号
+	 */
+	private String qynbbh = null;
+	private String  jyr =null;
+	/**
+	 * 允许作业的危险货物品名
+	 * @return
+	 */
+	private String wxhwm;
+	@Id
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getFzsq() {
+		return fzsq;
+	}
+	public void setFzsq(String fzsq) {
+		this.fzsq = fzsq;
+	}
+	public String getQynbmc() {
+		return qynbmc;
+	}
+	public void setQynbmc(String qynbmc) {
+		this.qynbmc = qynbmc;
+	}
+	public String getZycs() {
+		return zycs;
+	}
+	public void setZycs(String zycs) {
+		this.zycs = zycs;
+	}
+	public String getFzcsbh() {
+		return fzcsbh;
+	}
+	public void setFzcsbh(String fzcsbh) {
+		this.fzcsbh = fzcsbh;
+	}
+	public String getQynbbh() {
+		return qynbbh;
+	}
+	public void setQynbbh(String qynbbh) {
+		this.qynbbh = qynbbh;
+	}
+	public String getJyr() {
+		return jyr;
+	}
+	public void setJyr(String jyr) {
+		this.jyr = jyr;
+	}
+	public String getWxhwm() {
+		return wxhwm;
+	}
+	public void setWxhwm(String wxhwm) {
+		this.wxhwm = wxhwm;
+	}	
+
+	/** 记录创建人 */
+	private String addUser = null;
+	/** 记录创建时间 */
+	private Date addDate = null;
+	/** 记录更新人 */
+	private String updateUser = null;
+	/** 记录更新时间 */
+	private Date updateDate = null;
+	/** 记录状态 */
+	private int recordStatus = 1;
+	public String getAddUser() {
+		return addUser;
+	}
+	public void setAddUser(String addUser) {
+		this.addUser = addUser;
+	}
+	public Date getAddDate() {
+		return addDate;
+	}
+	public void setAddDate(Date addDate) {
+		this.addDate = addDate;
+	}
+	public String getUpdateUser() {
+		return updateUser;
+	}
+	public void setUpdateUser(String updateUser) {
+		this.updateUser = updateUser;
+	}
+	public Date getUpdateDate() {
+		return updateDate;
+	}
+	public void setUpdateDate(Date updateDate) {
+		this.updateDate = updateDate;
+	}
+	public int getRecordStatus() {
+		return recordStatus;
+	}
+	public void setRecordStatus(int recordStatus) {
+		this.recordStatus = recordStatus;
+	}
+	public String getSzd() {
+		return szd;
+	}
+	public void setSzd(String szd) {
+		this.szd = szd;
+	}
+	
+		
+}

+ 308 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/YjptGkwxhwzyfzblhhzEntity.java

@@ -0,0 +1,308 @@
+package com.jtgh.cjhs.entity;
+
+/* ====================================================================
+ * $Source:  $
+ * $Author:  $
+ * $Revision:  $
+ * $Date:  $
+ * ====================================================================
+ *  File  			Gkwxhwzyfzblhhz.java
+ *  Description    	
+ *  History      	2014/01/03             
+ *           Copyright 2002 Co. All Rights Reserved.
+ * ====================================================================
+ */
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+/**
+ * 港口危险货物作业"附证" 办理或换证申请表
+ * 
+ * @author
+ * @version 1.0
+ */
+@Entity
+@Table(name = "YJPT_GKWXHWZYFZBLHHZ")
+public class YjptGkwxhwzyfzblhhzEntity implements Serializable {
+
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -1373469066307163413L;
+
+
+	/**
+	 * id
+	 */
+	private String id = null;
+
+	private String szd =null;//所在地
+	private String ssgq = null;// 港区
+	private String qymc;//企业名称
+
+	private String blbh;//办理编号
+	/**
+	 * dz
+	 */
+	private String dz = null;
+
+	/**
+	 * fddbr
+	 */
+	private String fddbr = null;
+
+	/**
+	 * aqgljg
+	 */
+	private String aqgljg = null;
+
+	private String gkjyxkz;
+
+	/**
+	 * 安全副总
+	 */
+	private String aqfz = null;
+
+	/**
+	 * gqgljgfzrxm
+	 */
+	private String gqgljgfzrxm = null;
+
+	/**
+	 * gqgljgfzrzc
+	 */
+	private String gqgljgfzrzc = null;
+
+	/**
+	 * gqgljgfzrlxdh
+	 */
+	private String gqgljgfzrlxdh = null;
+
+	/**
+	 * gqgljgfzrdzyx
+	 */
+	private String gqgljgfzrdzyx = null;
+	/** 作业场所 */
+	private String zycs;
+	/** 产权 */
+	private String cq;
+	/** 作业方式 */
+	private String zyfs;
+	/** 危货等级 */
+	private String whdj;
+	/** 作业危险货物品名 */
+	private String zywxhwpm;
+	/** 编号 */
+	private String bh;
+	/** 发证机关 */
+	private String fzjg;
+	// 开始时间就是发证时间
+	private Date yxqkssj;
+	/** 有效期止 */
+	private Date yxqjssj;
+	/** 作业场所编号 */
+	private String fzcsbh;
+	/** 企业内部编号 */
+	private String qynbbh;
+	@Id
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getSsgq() {
+		return ssgq;
+	}
+	public void setSsgq(String ssgq) {
+		this.ssgq = ssgq;
+	}
+	public String getDz() {
+		return dz;
+	}
+	public void setDz(String dz) {
+		this.dz = dz;
+	}
+	public String getFddbr() {
+		return fddbr;
+	}
+	public void setFddbr(String fddbr) {
+		this.fddbr = fddbr;
+	}
+	public String getAqgljg() {
+		return aqgljg;
+	}
+	public void setAqgljg(String aqgljg) {
+		this.aqgljg = aqgljg;
+	}
+	public String getGkjyxkz() {
+		return gkjyxkz;
+	}
+	public void setGkjyxkz(String gkjyxkz) {
+		this.gkjyxkz = gkjyxkz;
+	}
+	public String getAqfz() {
+		return aqfz;
+	}
+	public void setAqfz(String aqfz) {
+		this.aqfz = aqfz;
+	}
+	public String getGqgljgfzrxm() {
+		return gqgljgfzrxm;
+	}
+	public void setGqgljgfzrxm(String gqgljgfzrxm) {
+		this.gqgljgfzrxm = gqgljgfzrxm;
+	}
+	public String getGqgljgfzrzc() {
+		return gqgljgfzrzc;
+	}
+	public void setGqgljgfzrzc(String gqgljgfzrzc) {
+		this.gqgljgfzrzc = gqgljgfzrzc;
+	}
+	public String getGqgljgfzrlxdh() {
+		return gqgljgfzrlxdh;
+	}
+	public void setGqgljgfzrlxdh(String gqgljgfzrlxdh) {
+		this.gqgljgfzrlxdh = gqgljgfzrlxdh;
+	}
+	public String getGqgljgfzrdzyx() {
+		return gqgljgfzrdzyx;
+	}
+	public void setGqgljgfzrdzyx(String gqgljgfzrdzyx) {
+		this.gqgljgfzrdzyx = gqgljgfzrdzyx;
+	}
+	public String getZycs() {
+		return zycs;
+	}
+	public void setZycs(String zycs) {
+		this.zycs = zycs;
+	}
+	public String getCq() {
+		return cq;
+	}
+	public void setCq(String cq) {
+		this.cq = cq;
+	}
+	public String getZyfs() {
+		return zyfs;
+	}
+	public void setZyfs(String zyfs) {
+		this.zyfs = zyfs;
+	}
+	public String getWhdj() {
+		return whdj;
+	}
+	public void setWhdj(String whdj) {
+		this.whdj = whdj;
+	}
+	public String getZywxhwpm() {
+		return zywxhwpm;
+	}
+	public void setZywxhwpm(String zywxhwpm) {
+		this.zywxhwpm = zywxhwpm;
+	}
+	public String getBh() {
+		return bh;
+	}
+	public void setBh(String bh) {
+		this.bh = bh;
+	}
+	public String getFzjg() {
+		return fzjg;
+	}
+	public void setFzjg(String fzjg) {
+		this.fzjg = fzjg;
+	}
+	public Date getYxqkssj() {
+		return yxqkssj;
+	}
+	public void setYxqkssj(Date yxqkssj) {
+		this.yxqkssj = yxqkssj;
+	}
+	public Date getYxqjssj() {
+		return yxqjssj;
+	}
+	public void setYxqjssj(Date yxqjssj) {
+		this.yxqjssj = yxqjssj;
+	}
+	public String getFzcsbh() {
+		return fzcsbh;
+	}
+	public void setFzcsbh(String fzcsbh) {
+		this.fzcsbh = fzcsbh;
+	}
+	public String getQynbbh() {
+		return qynbbh;
+	}
+	public void setQynbbh(String qynbbh) {
+		this.qynbbh = qynbbh;
+	}
+	
+
+	/** 记录创建人 */
+	private String addUser = null;
+	/** 记录创建时间 */
+	private Date addDate = null;
+	/** 记录更新人 */
+	private String updateUser = null;
+	/** 记录更新时间 */
+	private Date updateDate = null;
+	/** 记录状态 */
+	private int recordStatus = 1;
+	public String getAddUser() {
+		return addUser;
+	}
+	public void setAddUser(String addUser) {
+		this.addUser = addUser;
+	}
+	public Date getAddDate() {
+		return addDate;
+	}
+	public void setAddDate(Date addDate) {
+		this.addDate = addDate;
+	}
+	public String getUpdateUser() {
+		return updateUser;
+	}
+	public void setUpdateUser(String updateUser) {
+		this.updateUser = updateUser;
+	}
+	public Date getUpdateDate() {
+		return updateDate;
+	}
+	public void setUpdateDate(Date updateDate) {
+		this.updateDate = updateDate;
+	}
+	public int getRecordStatus() {
+		return recordStatus;
+	}
+	public void setRecordStatus(int recordStatus) {
+		this.recordStatus = recordStatus;
+	}
+	public String getQymc() {
+		return qymc;
+	}
+	public void setQymc(String qymc) {
+		this.qymc = qymc;
+	}
+	public String getSzd() {
+		return szd;
+	}
+	public void setSzd(String szd) {
+		this.szd = szd;
+	}
+	public String getBlbh() {
+		return blbh;
+	}
+	public void setBlbh(String blbh) {
+		this.blbh = blbh;
+	}
+	
+
+}

+ 219 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/YjptWxhwpmEntity.java

@@ -0,0 +1,219 @@
+package com.jtgh.cjhs.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+/***
+ * 危险货物品名实体
+ * 
+ * @author chenkf
+ * 
+ */
+@Entity
+@Table(name = "YJPT_WXHWPMB")
+public class YjptWxhwpmEntity implements Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 2957193352464828725L;
+	private String id;
+	/**
+	 * 编号
+	 */
+	private String bh;
+	/**
+	 * 名称与说明
+	 */
+	private String mchsm;
+	/**
+	 * 英文名称
+	 */
+	private String ywmc;
+	/**
+	 * 类别和项别
+	 */
+	private String lbhxb;
+	/**
+	 * 次要危险性
+	 */
+	private String cywxx;
+	/**
+	 * 包装类别
+	 */
+	private String bzlb;
+	/**
+	 * 备注
+	 */
+	private String bz;
+	/**
+	 * 理化性质
+	 */
+	private String lhxz;
+	/**
+	 * 安全防范措施
+	 */
+	private String aqffcs;
+
+	/**
+	 * 火灾危险性
+	 */
+	private String hzwxx;
+	/**
+	 * 毒性等级
+	 */
+	private String dxdj;
+	/**
+	 * 污染级别
+	 */
+	private String wrlb;
+	
+	/**
+	 * un
+	 */
+	private String un;
+	/**
+	 * 说明
+	 */
+	private String sm;
+	
+	@Id
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getBh() {
+		return bh;
+	}
+	public void setBh(String bh) {
+		this.bh = bh;
+	}
+	public String getMchsm() {
+		return mchsm;
+	}
+	public void setMchsm(String mchsm) {
+		this.mchsm = mchsm;
+	}
+	public String getYwmc() {
+		return ywmc;
+	}
+	public void setYwmc(String ywmc) {
+		this.ywmc = ywmc;
+	}
+	public String getLbhxb() {
+		return lbhxb;
+	}
+	public void setLbhxb(String lbhxb) {
+		this.lbhxb = lbhxb;
+	}
+	public String getCywxx() {
+		return cywxx;
+	}
+	public void setCywxx(String cywxx) {
+		this.cywxx = cywxx;
+	}
+	public String getBzlb() {
+		return bzlb;
+	}
+	public void setBzlb(String bzlb) {
+		this.bzlb = bzlb;
+	}
+	public String getBz() {
+		return bz;
+	}
+	public void setBz(String bz) {
+		this.bz = bz;
+	}
+	public String getLhxz() {
+		return lhxz;
+	}
+	public void setLhxz(String lhxz) {
+		this.lhxz = lhxz;
+	}
+	public String getAqffcs() {
+		return aqffcs;
+	}
+	public void setAqffcs(String aqffcs) {
+		this.aqffcs = aqffcs;
+	}
+	public String getHzwxx() {
+		return hzwxx;
+	}
+	public void setHzwxx(String hzwxx) {
+		this.hzwxx = hzwxx;
+	}
+	public String getDxdj() {
+		return dxdj;
+	}
+	public void setDxdj(String dxdj) {
+		this.dxdj = dxdj;
+	}
+	public String getWrlb() {
+		return wrlb;
+	}
+	public void setWrlb(String wrlb) {
+		this.wrlb = wrlb;
+	}
+	
+
+	/** 记录创建人 */
+	private String addUser = null;
+	/** 记录创建时间 */
+	private Date addDate = null;
+	/** 记录更新人 */
+	private String updateUser = null;
+	/** 记录更新时间 */
+	private Date updateDate = null;
+	/** 记录状态 */
+	private int recordStatus = 1;
+	public String getAddUser() {
+		return addUser;
+	}
+	public void setAddUser(String addUser) {
+		this.addUser = addUser;
+	}
+	public Date getAddDate() {
+		return addDate;
+	}
+	public void setAddDate(Date addDate) {
+		this.addDate = addDate;
+	}
+	public String getUpdateUser() {
+		return updateUser;
+	}
+	public void setUpdateUser(String updateUser) {
+		this.updateUser = updateUser;
+	}
+	public Date getUpdateDate() {
+		return updateDate;
+	}
+	public void setUpdateDate(Date updateDate) {
+		this.updateDate = updateDate;
+	}
+	public int getRecordStatus() {
+		return recordStatus;
+	}
+	public void setRecordStatus(int recordStatus) {
+		this.recordStatus = recordStatus;
+	}
+	public String getUn() {
+		return un;
+	}
+	public void setUn(String un) {
+		this.un = un;
+	}
+	public String getSm() {
+		return sm;
+	}
+	public void setSm(String sm) {
+		this.sm = sm;
+	}
+	
+
+}

+ 505 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/YjptZysqbpEntity.java

@@ -0,0 +1,505 @@
+package com.jtgh.cjhs.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+/**
+ * 应急平台危险货物港口作业申报单
+ * 
+ * @author shixm
+ */
+@Entity
+@Table(name = "YJPT_WXHWGKZYSBD")
+public class YjptZysqbpEntity implements Serializable {
+
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -2227044450509543717L;
+	/** ID主键 */
+	private String id;
+	private String bh;// 编号
+	private String szd;//所在地
+	//港区
+	private String szgq;
+	/** 作业单位 */
+	private String zydw;
+	/** 作业委托人 */
+	private String zywtr;
+	/** 船名 */
+	private String cm;
+	/** 现场管理负责人 */
+	private String xcglfzr;
+	/** 危险品类别 */
+	private String wxplb;
+	/** 危险物品名称 */
+	private String wxwpmc;
+	private String wxhwmcbh;
+	/** 物品编号 */
+	private String wpbh;
+	/** 进出港 */
+	private String jcg;
+	/** 作业数量 */
+	private Double zysl;
+	/** 理化性质 */
+	private String lhxz;
+	/** 作业时间 */
+	private Date zysj;
+	/** 作业地点 */
+	private String zydd;
+	private String zyddqybh;
+	/** 安全防范措施 */
+	private String aqffcs;
+	/** 报告人 */
+	private String bgr;
+	/** 联系方式 */
+	private String lxfs;
+	/** 报告时间 */
+	private Date bgsj;
+	/** 靠泊时间 */
+	private Date kpsj;
+	/** 作业类型 */
+	private String zylx;
+	/** 开工时间 */
+	private Date kgsj;
+	/** 完工时间 */
+	private Date wgsj;
+	/** 开工状态 */
+	private String kgzt;
+	/*** 完工状态 */
+	private String wgzt;
+	/** 国际编号 */
+	private String gjbh;
+	/** 上港 */
+	private String sg;
+	/** 下港 */
+	private String xg;
+	/** 作业时间起 */
+	private Date zysjq;
+	/** 作业时间止 */
+	private Date zysjz;
+	/** 取消作业时间 */
+	private Date qxzysj;
+	/** 作业地点其他 */
+	private String zyddqt;
+	/**
+	 * 集装箱数量
+	 */
+	private String jzxsl;
+	
+	/**
+	 * 货物种类
+	 */
+	private String hwzl;
+	/**
+	 * 包装类别
+	 */
+	private String bzlb;
+	/**
+	 * 货物形式
+	 */
+	private String hwxs;
+	/** 海事对接字段:船次、船舶编号、对比结果、物品CN编号 */
+	private String hc, cbbh, cnno;
+	/**
+	 * 20'集装箱数量,40'集装箱数量,45'集装箱数量,特种集装箱数量,20'罐柜数量,40'罐柜数量
+	 */
+	private Double sl20c, sl40c, sl45c, slspc, sl20t, sl40t,teu;
+	
+	/**
+	 * 英文船名
+	 */
+	private String ywcm;
+
+	/**
+	 * 火灾危险性
+	 */
+	private String hzwxx;
+	/**
+	 * 毒性等级
+	 */
+	private String dxdj;
+	/**
+	 * 污染级别
+	 */
+	private String wrlb;
+	/**
+	 * 1:内贸/2:外贸
+	 */
+	private String mao;
+	
+	@Id
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	
+	public String getBh() {
+		return bh;
+	}
+	public void setBh(String bh) {
+		this.bh = bh;
+	}
+	public String getSzgq() {
+		return szgq;
+	}
+	public void setSzgq(String szgq) {
+		this.szgq = szgq;
+	}
+	public String getZydw() {
+		return zydw;
+	}
+	public void setZydw(String zydw) {
+		this.zydw = zydw;
+	}
+	public String getZywtr() {
+		return zywtr;
+	}
+	public void setZywtr(String zywtr) {
+		this.zywtr = zywtr;
+	}
+	public String getCm() {
+		return cm;
+	}
+	public void setCm(String cm) {
+		this.cm = cm;
+	}
+	public String getXcglfzr() {
+		return xcglfzr;
+	}
+	public void setXcglfzr(String xcglfzr) {
+		this.xcglfzr = xcglfzr;
+	}
+	public String getWxplb() {
+		return wxplb;
+	}
+	public void setWxplb(String wxplb) {
+		this.wxplb = wxplb;
+	}
+	public String getWxwpmc() {
+		return wxwpmc;
+	}
+	public void setWxwpmc(String wxwpmc) {
+		this.wxwpmc = wxwpmc;
+	}
+	public String getWxhwmcbh() {
+		return wxhwmcbh;
+	}
+	public void setWxhwmcbh(String wxhwmcbh) {
+		this.wxhwmcbh = wxhwmcbh;
+	}
+	public String getWpbh() {
+		return wpbh;
+	}
+	public void setWpbh(String wpbh) {
+		this.wpbh = wpbh;
+	}
+	public String getJcg() {
+		return jcg;
+	}
+	public void setJcg(String jcg) {
+		this.jcg = jcg;
+	}
+	public Double getZysl() {
+		return zysl;
+	}
+	public void setZysl(Double zysl) {
+		this.zysl = zysl;
+	}
+	public String getLhxz() {
+		return lhxz;
+	}
+	public void setLhxz(String lhxz) {
+		this.lhxz = lhxz;
+	}
+	public Date getZysj() {
+		return zysj;
+	}
+	public void setZysj(Date zysj) {
+		this.zysj = zysj;
+	}
+	public String getZydd() {
+		return zydd;
+	}
+	public void setZydd(String zydd) {
+		this.zydd = zydd;
+	}
+	public String getZyddqybh() {
+		return zyddqybh;
+	}
+	public void setZyddqybh(String zyddqybh) {
+		this.zyddqybh = zyddqybh;
+	}
+	public String getAqffcs() {
+		return aqffcs;
+	}
+	public void setAqffcs(String aqffcs) {
+		this.aqffcs = aqffcs;
+	}
+	public String getBgr() {
+		return bgr;
+	}
+	public void setBgr(String bgr) {
+		this.bgr = bgr;
+	}
+	public String getLxfs() {
+		return lxfs;
+	}
+	public void setLxfs(String lxfs) {
+		this.lxfs = lxfs;
+	}
+	public Date getBgsj() {
+		return bgsj;
+	}
+	public void setBgsj(Date bgsj) {
+		this.bgsj = bgsj;
+	}
+	public Date getKpsj() {
+		return kpsj;
+	}
+	public void setKpsj(Date kpsj) {
+		this.kpsj = kpsj;
+	}
+	public String getZylx() {
+		return zylx;
+	}
+	public void setZylx(String zylx) {
+		this.zylx = zylx;
+	}
+	public Date getKgsj() {
+		return kgsj;
+	}
+	public void setKgsj(Date kgsj) {
+		this.kgsj = kgsj;
+	}
+	public Date getWgsj() {
+		return wgsj;
+	}
+	public void setWgsj(Date wgsj) {
+		this.wgsj = wgsj;
+	}
+	public String getKgzt() {
+		return kgzt;
+	}
+	public void setKgzt(String kgzt) {
+		this.kgzt = kgzt;
+	}
+	public String getWgzt() {
+		return wgzt;
+	}
+	public void setWgzt(String wgzt) {
+		this.wgzt = wgzt;
+	}
+	public String getGjbh() {
+		return gjbh;
+	}
+	public void setGjbh(String gjbh) {
+		this.gjbh = gjbh;
+	}
+	public String getSg() {
+		return sg;
+	}
+	public void setSg(String sg) {
+		this.sg = sg;
+	}
+	public String getXg() {
+		return xg;
+	}
+	public void setXg(String xg) {
+		this.xg = xg;
+	}
+	public Date getZysjq() {
+		return zysjq;
+	}
+	public void setZysjq(Date zysjq) {
+		this.zysjq = zysjq;
+	}
+	public Date getZysjz() {
+		return zysjz;
+	}
+	public void setZysjz(Date zysjz) {
+		this.zysjz = zysjz;
+	}
+	public Date getQxzysj() {
+		return qxzysj;
+	}
+	public void setQxzysj(Date qxzysj) {
+		this.qxzysj = qxzysj;
+	}
+	public String getZyddqt() {
+		return zyddqt;
+	}
+	public void setZyddqt(String zyddqt) {
+		this.zyddqt = zyddqt;
+	}
+	public String getJzxsl() {
+		return jzxsl;
+	}
+	public void setJzxsl(String jzxsl) {
+		this.jzxsl = jzxsl;
+	}
+	public String getHwzl() {
+		return hwzl;
+	}
+	public void setHwzl(String hwzl) {
+		this.hwzl = hwzl;
+	}
+	public String getHwxs() {
+		return hwxs;
+	}
+	public void setHwxs(String hwxs) {
+		this.hwxs = hwxs;
+	}
+	public String getHc() {
+		return hc;
+	}
+	public void setHc(String hc) {
+		this.hc = hc;
+	}
+	public String getCbbh() {
+		return cbbh;
+	}
+	public void setCbbh(String cbbh) {
+		this.cbbh = cbbh;
+	}
+	public String getCnno() {
+		return cnno;
+	}
+	public void setCnno(String cnno) {
+		this.cnno = cnno;
+	}
+	public Double getSl20c() {
+		return sl20c;
+	}
+	public void setSl20c(Double sl20c) {
+		this.sl20c = sl20c;
+	}
+	public Double getSl40c() {
+		return sl40c;
+	}
+	public void setSl40c(Double sl40c) {
+		this.sl40c = sl40c;
+	}
+	public Double getSl45c() {
+		return sl45c;
+	}
+	public void setSl45c(Double sl45c) {
+		this.sl45c = sl45c;
+	}
+	public Double getSlspc() {
+		return slspc;
+	}
+	public void setSlspc(Double slspc) {
+		this.slspc = slspc;
+	}
+	public Double getSl20t() {
+		return sl20t;
+	}
+	public void setSl20t(Double sl20t) {
+		this.sl20t = sl20t;
+	}
+	public Double getSl40t() {
+		return sl40t;
+	}
+	public void setSl40t(Double sl40t) {
+		this.sl40t = sl40t;
+	}
+	public Double getTeu() {
+		return teu;
+	}
+	public void setTeu(Double teu) {
+		this.teu = teu;
+	}
+	public String getYwcm() {
+		return ywcm;
+	}
+	public void setYwcm(String ywcm) {
+		this.ywcm = ywcm;
+	}
+	public String getHzwxx() {
+		return hzwxx;
+	}
+	public void setHzwxx(String hzwxx) {
+		this.hzwxx = hzwxx;
+	}
+	public String getDxdj() {
+		return dxdj;
+	}
+	public void setDxdj(String dxdj) {
+		this.dxdj = dxdj;
+	}
+	public String getWrlb() {
+		return wrlb;
+	}
+	public void setWrlb(String wrlb) {
+		this.wrlb = wrlb;
+	}
+	public String getMao() {
+		return mao;
+	}
+	public void setMao(String mao) {
+		this.mao = mao;
+	}
+	
+
+	/** 记录创建人 */
+	private String addUser = null;
+	/** 记录创建时间 */
+	private Date addDate = null;
+	/** 记录更新人 */
+	private String updateUser = null;
+	/** 记录更新时间 */
+	private Date updateDate = null;
+	/** 记录状态 */
+	private int recordStatus = 1;
+	public String getAddUser() {
+		return addUser;
+	}
+	public void setAddUser(String addUser) {
+		this.addUser = addUser;
+	}
+	public Date getAddDate() {
+		return addDate;
+	}
+	public void setAddDate(Date addDate) {
+		this.addDate = addDate;
+	}
+	public String getUpdateUser() {
+		return updateUser;
+	}
+	public void setUpdateUser(String updateUser) {
+		this.updateUser = updateUser;
+	}
+	public Date getUpdateDate() {
+		return updateDate;
+	}
+	public void setUpdateDate(Date updateDate) {
+		this.updateDate = updateDate;
+	}
+	public int getRecordStatus() {
+		return recordStatus;
+	}
+	public void setRecordStatus(int recordStatus) {
+		this.recordStatus = recordStatus;
+	}
+	public String getSzd() {
+		return szd;
+	}
+	public void setSzd(String szd) {
+		this.szd = szd;
+	}
+	public String getBzlb() {
+		return bzlb;
+	}
+	public void setBzlb(String bzlb) {
+		this.bzlb = bzlb;
+	}
+	
+}

+ 2 - 4
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/ZtzdCbzlViewEntity.java

@@ -1,14 +1,12 @@
 package com.jtgh.cjhs.entity;
 package com.jtgh.cjhs.entity;
 
 
-import javax.persistence.Entity;
-import javax.persistence.Table;
 /**
 /**
  * 船舶种类字典
  * 船舶种类字典
  * @author 刘福亮
  * @author 刘福亮
  *
  *
  */
  */
-@Entity
-@Table(name = "ZTZD_CBZL_VIEW")
+//@Entity
+//@Table(name = "ZTZD_CBZL_VIEW")
 public class ZtzdCbzlViewEntity {
 public class ZtzdCbzlViewEntity {
 
 
 
 

+ 2 - 4
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/ZtzdGjViewEntity.java

@@ -1,14 +1,12 @@
 package com.jtgh.cjhs.entity;
 package com.jtgh.cjhs.entity;
 
 
-import javax.persistence.Entity;
-import javax.persistence.Table;
 /**
 /**
  * 国籍字典表
  * 国籍字典表
  * @author 刘福亮
  * @author 刘福亮
  *
  *
  */
  */
-@Entity
-@Table(name = "ZTZD_GJ_VIEW")
+//@Entity
+//@Table(name = "ZTZD_GJ_VIEW")
 public class ZtzdGjViewEntity{
 public class ZtzdGjViewEntity{
 
 
 
 

+ 2 - 4
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/entity/ZtzdGkmlViewEntity.java

@@ -1,14 +1,12 @@
 package com.jtgh.cjhs.entity;
 package com.jtgh.cjhs.entity;
 
 
-import javax.persistence.Entity;
-import javax.persistence.Table;
 /**
 /**
  *港口名录字典表
  *港口名录字典表
  * @author 刘福亮
  * @author 刘福亮
  *
  *
  */
  */
-@Entity
-@Table(name = "ZTZD_GKML_VIEW")
+//@Entity
+//@Table(name = "ZTZD_GKML_VIEW")
 public class ZtzdGkmlViewEntity {
 public class ZtzdGkmlViewEntity {
 
 
 
 

+ 18 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/DtxtBwService.java

@@ -0,0 +1,18 @@
+package com.jtgh.cjhs.service;
+
+import com.jtgh.cjhs.entity.DtxtBwEntity;
+
+
+/**
+ * 危险品申报信息
+ * @author 刘福亮
+ *
+ */
+
+public interface DtxtBwService {
+
+	
+	public DtxtBwEntity  findByBwdm(String bwdm);
+	
+	
+}

+ 24 - 7
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/DtywCbsbService.java

@@ -7,22 +7,39 @@ import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.data.jpa.domain.Specification;
 
 
 import com.jtgh.cjhs.entity.DtywCbsbEntity;
 import com.jtgh.cjhs.entity.DtywCbsbEntity;
+import com.jtgh.cjhs.entity.DtywCbsbgtHwEntity;
+import com.jtgh.cjhs.entity.DtywCbsbszHwEntity;
+import com.jtgh.cjhs.entity.DtywCbsbytHwEntity;
 
 
 /**
 /**
  * 危险品申报信息
  * 危险品申报信息
+ * 
  * @author 刘福亮
  * @author 刘福亮
- *
+ * 
  */
  */
 
 
 public interface DtywCbsbService {
 public interface DtywCbsbService {
 
 
-	
 	public Page<DtywCbsbEntity> findAll(Specification<DtywCbsbEntity> spec,
 	public Page<DtywCbsbEntity> findAll(Specification<DtywCbsbEntity> spec,
 			Pageable pageable);
 			Pageable pageable);
-	
-	public DtywCbsbEntity  findBySbdbh(String sbdbh);
-	
+
+	public DtywCbsbEntity findBySbdbh(String sbdbh);
+
 	public List<DtywCbsbEntity> findByZwcm(String zwcm);
 	public List<DtywCbsbEntity> findByZwcm(String zwcm);
-	
-	
+
+	public List<DtywCbsbgtHwEntity> findCbsbgtHwBySbdbh(String sbdbh);
+
+	public List<DtywCbsbszHwEntity> findCbsbszHwBySbdbh(String sbdbh);
+
+	public List<DtywCbsbytHwEntity> findCbsbytHwBySbdbh(String sbdbh);
+
+	public List<DtywCbsbgtHwEntity> findCbsbgtHwBySbdbhAndBsxhAndXh(
+			String sbdbh, Long bsxh, Long xh);
+
+	public List<DtywCbsbszHwEntity> findCbsbszHwBySbdbhAndBsxhAndXh(
+			String sbdbh, Long bsxh, Long xh);
+
+	public List<DtywCbsbytHwEntity> findCbsbytHwBySbdbhAndBsxhAndXh(
+			String sbdbh, Long bsxh, Long xh);
+
 }
 }

+ 19 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/YjptBwService.java

@@ -0,0 +1,19 @@
+package com.jtgh.cjhs.service;
+
+import com.jtgh.cjhs.entity.YjptBwEntity;
+
+
+/**
+ * 泊位信息
+ * @author 刘福亮
+ *
+ */
+
+public interface YjptBwService {
+
+	
+	/** 保存经营人信息 */
+	public <S extends YjptBwEntity> S save(S entity);
+	
+	
+}

+ 19 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/YjptGkwxhwzyfzblFzService.java

@@ -0,0 +1,19 @@
+package com.jtgh.cjhs.service;
+
+import com.jtgh.cjhs.entity.YjptGkwxhwzyfzblFzEntity;
+
+
+/**
+ * 附证信息
+ * @author 刘福亮
+ *
+ */
+
+public interface YjptGkwxhwzyfzblFzService {
+
+	
+	/** 保存经营人信息 */
+	public <S extends YjptGkwxhwzyfzblFzEntity> S save(S entity);
+	
+	
+}

+ 19 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/YjptGkwxhwzyfzblhhzService.java

@@ -0,0 +1,19 @@
+package com.jtgh.cjhs.service;
+
+import com.jtgh.cjhs.entity.YjptGkwxhwzyfzblhhzEntity;
+
+
+/**
+ * 附证申请信息
+ * @author 刘福亮
+ *
+ */
+
+public interface YjptGkwxhwzyfzblhhzService {
+
+	
+	/** 保存经营人信息 */
+	public <S extends YjptGkwxhwzyfzblhhzEntity> S save(S entity);
+	
+	
+}

+ 19 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/YjptWxhwpmService.java

@@ -0,0 +1,19 @@
+package com.jtgh.cjhs.service;
+
+import com.jtgh.cjhs.entity.YjptWxhwpmEntity;
+
+
+/**
+ * 危险品申报信息
+ * @author 刘福亮
+ *
+ */
+
+public interface YjptWxhwpmService {
+
+	
+	/** 保存经营人信息 */
+	public <S extends YjptWxhwpmEntity> S save(S entity);
+	
+	
+}

+ 19 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/YjptZysqbpService.java

@@ -0,0 +1,19 @@
+package com.jtgh.cjhs.service;
+
+import com.jtgh.cjhs.entity.YjptZysqbpEntity;
+
+
+/**
+ * 危险品申报信息
+ * @author 刘福亮
+ *
+ */
+
+public interface YjptZysqbpService {
+
+	
+	/** 保存经营人信息 */
+	public <S extends YjptZysqbpEntity> S save(S entity);
+	
+	
+}

+ 34 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/DtxtBwServiceImpl.java

@@ -0,0 +1,34 @@
+package com.jtgh.cjhs.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.jtgh.cjhs.dao.DtxtBwDao;
+import com.jtgh.cjhs.dao.common.CjhsRepository;
+import com.jtgh.cjhs.entity.DtxtBwEntity;
+import com.jtgh.cjhs.service.CjhsBaseService;
+import com.jtgh.cjhs.service.DtxtBwService;
+
+/**
+ * 危险品申报信息
+ * @author 刘福亮
+ *
+ */
+@Service
+public class DtxtBwServiceImpl extends
+CjhsBaseService<DtxtBwEntity, String>  implements DtxtBwService {
+	@Autowired
+	private DtxtBwDao  dtxtBwDao;
+
+	@Override
+	protected CjhsRepository<DtxtBwEntity, String> getDao() {
+		return dtxtBwDao;
+	}
+
+	@Override
+	public DtxtBwEntity findByBwdm(String bwdm) {		
+		return dtxtBwDao.findOne(bwdm);
+	}
+
+	
+}

+ 149 - 5
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/DtywCbsbServiceImpl.java

@@ -1,25 +1,32 @@
 package com.jtgh.cjhs.service.impl;
 package com.jtgh.cjhs.service.impl;
 
 
+import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 import java.util.List;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 
 
 import com.jtgh.cjhs.dao.DtywCbsbDao;
 import com.jtgh.cjhs.dao.DtywCbsbDao;
 import com.jtgh.cjhs.dao.common.CjhsRepository;
 import com.jtgh.cjhs.dao.common.CjhsRepository;
 import com.jtgh.cjhs.entity.DtywCbsbEntity;
 import com.jtgh.cjhs.entity.DtywCbsbEntity;
+import com.jtgh.cjhs.entity.DtywCbsbgtHwEntity;
+import com.jtgh.cjhs.entity.DtywCbsbszHwEntity;
+import com.jtgh.cjhs.entity.DtywCbsbytHwEntity;
 import com.jtgh.cjhs.service.CjhsBaseService;
 import com.jtgh.cjhs.service.CjhsBaseService;
 import com.jtgh.cjhs.service.DtywCbsbService;
 import com.jtgh.cjhs.service.DtywCbsbService;
 
 
 /**
 /**
  * 危险品申报信息
  * 危险品申报信息
+ * 
  * @author 刘福亮
  * @author 刘福亮
- *
+ * 
  */
  */
-
+@Service
 public class DtywCbsbServiceImpl extends
 public class DtywCbsbServiceImpl extends
-CjhsBaseService<DtywCbsbEntity, String>  implements DtywCbsbService {
+		CjhsBaseService<DtywCbsbEntity, String> implements DtywCbsbService {
 	@Autowired
 	@Autowired
-	private DtywCbsbDao  dtywCbsbDao;
+	private DtywCbsbDao dtywCbsbDao;
 
 
 	@Override
 	@Override
 	protected CjhsRepository<DtywCbsbEntity, String> getDao() {
 	protected CjhsRepository<DtywCbsbEntity, String> getDao() {
@@ -37,5 +44,142 @@ CjhsBaseService<DtywCbsbEntity, String>  implements DtywCbsbService {
 		return dtywCbsbDao.findByZwcm(zwcm);
 		return dtywCbsbDao.findByZwcm(zwcm);
 	}
 	}
 
 
-	
+	/**
+	 * 获取固体货物信息
+	 */
+	@Override
+	public List<DtywCbsbgtHwEntity> findCbsbgtHwBySbdbh(String sbdbh) {
+		List<Object[]> res = dtywCbsbDao.findCbsbgtHwBySbdbh(sbdbh);
+		List<DtywCbsbgtHwEntity> list = new ArrayList<DtywCbsbgtHwEntity>();
+		for (Iterator<Object[]> iterator = res.iterator(); iterator.hasNext();) {
+			Object[] objects = iterator.next();
+			DtywCbsbgtHwEntity entity = new DtywCbsbgtHwEntity();
+			entity.setSbdbh(objects[0].toString());
+			entity.setHwlx(objects[1].toString());
+			entity.setWgbh(objects[2].toString());
+			entity.setZqysmczw(objects[3].toString());
+			entity.setWxlb(objects[4].toString());
+			entity.setZzl(Double.parseDouble(objects[5].toString()));
+			entity.setLzbz(objects[6].toString());
+			entity.setWxhwbz(objects[7].toString());
+			list.add(entity);
+		}
+		return list;
+	}
+
+	/**
+	 * 获取散装货物信息
+	 */
+	@Override
+	public List<DtywCbsbszHwEntity> findCbsbszHwBySbdbh(String sbdbh) {
+		List<Object[]> res = dtywCbsbDao.findCbsbszHwBySbdbh(sbdbh);
+		List<DtywCbsbszHwEntity> list = new ArrayList<DtywCbsbszHwEntity>();
+		for (Iterator<Object[]> iterator = res.iterator(); iterator.hasNext();) {
+			Object[] objects = iterator.next();
+			DtywCbsbszHwEntity entity = new DtywCbsbszHwEntity();
+			entity.setSbdbh(objects[0].toString());
+			entity.setHwlx(objects[1].toString());
+			entity.setWgbh(objects[2].toString());
+			entity.setZqysmczw(objects[3].toString());
+			entity.setWxlb(objects[4].toString());
+			entity.setZzl(Double.parseDouble(objects[5].toString()));
+			entity.setLzbz(objects[6].toString());
+			entity.setWxhwbz(objects[7].toString());
+			list.add(entity);
+		}
+		return list;
+	}
+
+	/**
+	 * 获取液体货物信息
+	 */
+	@Override
+	public List<DtywCbsbytHwEntity> findCbsbytHwBySbdbh(String sbdbh) {
+		List<Object[]> res = dtywCbsbDao.findCbsbytHwBySbdbh(sbdbh);
+		List<DtywCbsbytHwEntity> list = new ArrayList<DtywCbsbytHwEntity>();
+		for (Iterator<Object[]> iterator = res.iterator(); iterator.hasNext();) {
+			Object[] objects = iterator.next();
+			DtywCbsbytHwEntity entity = new DtywCbsbytHwEntity();
+			entity.setSbdbh(objects[0].toString());
+			entity.setHwlx(objects[1].toString());
+			entity.setWgbh(objects[2].toString());
+			entity.setZqysmczw(objects[3].toString());
+			entity.setWxlb(objects[4].toString());
+			entity.setSl(Double.parseDouble(objects[5].toString()));
+			entity.setLzbz(objects[6].toString());
+			entity.setWxhwbz(objects[7].toString());
+			entity.setBsxh(Long.parseLong(objects[8].toString()));
+			entity.setXh(Long.parseLong(objects[9].toString()));
+			list.add(entity);
+		}
+		return list;
+	}
+
+	@Override
+	public List<DtywCbsbgtHwEntity> findCbsbgtHwBySbdbhAndBsxhAndXh(
+			String sbdbh, Long bsxh, Long xh) {
+		List<Object[]> res=dtywCbsbDao.findCbsbgtHwBySbdbhAndBsxhAndXh(sbdbh,bsxh,xh);
+		List<DtywCbsbgtHwEntity> list = new ArrayList<DtywCbsbgtHwEntity>();
+		for (Iterator<Object[]> iterator = res.iterator(); iterator.hasNext();) {
+			Object[] objects = iterator.next();
+			DtywCbsbgtHwEntity entity = new DtywCbsbgtHwEntity();
+			entity.setSbdbh(objects[0].toString());
+			entity.setHwlx(objects[1].toString());
+			entity.setWgbh(objects[2].toString());
+			entity.setZqysmczw(objects[3].toString());
+			entity.setWxlb(objects[4].toString());
+			entity.setZzl(Double.parseDouble(objects[5].toString()));
+			entity.setLzbz(objects[6].toString());
+			entity.setWxhwbz(objects[7].toString());
+			list.add(entity);
+		}
+		return list;
+	}
+
+	@Override
+	public List<DtywCbsbszHwEntity> findCbsbszHwBySbdbhAndBsxhAndXh(
+			String sbdbh, Long bsxh, Long xh) {
+		List<Object[]> res = dtywCbsbDao.findCbsbszHwBySbdbhAndBsxhAndXh(sbdbh,
+				bsxh, xh);
+		List<DtywCbsbszHwEntity> list = new ArrayList<DtywCbsbszHwEntity>();
+		for (Iterator<Object[]> iterator = res.iterator(); iterator.hasNext();) {
+			Object[] objects = iterator.next();
+			DtywCbsbszHwEntity entity = new DtywCbsbszHwEntity();
+			entity.setSbdbh(objects[0].toString());
+			entity.setHwlx(objects[1].toString());
+			entity.setWgbh(objects[2].toString());
+			entity.setZqysmczw(objects[3].toString());
+			entity.setWxlb(objects[4].toString());
+			entity.setZzl(Double.parseDouble(objects[5].toString()));
+			entity.setLzbz(objects[6].toString());
+			entity.setWxhwbz(objects[7].toString());
+			list.add(entity);
+		}
+		return list;
+	}
+
+	@Override
+	public List<DtywCbsbytHwEntity> findCbsbytHwBySbdbhAndBsxhAndXh(
+			String sbdbh, Long bsxh, Long xh) {
+		List<Object[]> res = dtywCbsbDao.findCbsbytHwBySbdbhAndBsxhAndXh(sbdbh,
+				bsxh, xh);
+		List<DtywCbsbytHwEntity> list = new ArrayList<DtywCbsbytHwEntity>();
+		for (Iterator<Object[]> iterator = res.iterator(); iterator.hasNext();) {
+			Object[] objects = iterator.next();
+			DtywCbsbytHwEntity entity = new DtywCbsbytHwEntity();
+			entity.setSbdbh(objects[0].toString());
+			entity.setHwlx(objects[1].toString());
+			entity.setWgbh(objects[2].toString());
+			entity.setZqysmczw(objects[3].toString());
+			entity.setWxlb(objects[4].toString());
+			entity.setSl(Double.parseDouble(objects[5].toString()));
+			entity.setLzbz(objects[6].toString());
+			entity.setWxhwbz(objects[7].toString());
+			entity.setBsxh(Long.parseLong(objects[8].toString()));
+			entity.setXh(Long.parseLong(objects[9].toString()));
+			list.add(entity);
+		}
+		return list;
+	}
+
 }
 }

+ 30 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/YjptBwServiceImpl.java

@@ -0,0 +1,30 @@
+package com.jtgh.cjhs.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.jtgh.cjhs.dao.YjptBwDao;
+import com.jtgh.cjhs.dao.common.CjhsRepository;
+import com.jtgh.cjhs.entity.YjptBwEntity;
+import com.jtgh.cjhs.service.CjhsBaseService;
+import com.jtgh.cjhs.service.YjptBwService;
+
+/**
+ * 危险品申报信息
+ * @author 刘福亮
+ *
+ */
+@Service
+public class YjptBwServiceImpl extends
+CjhsBaseService<YjptBwEntity, String>  implements YjptBwService {
+
+	@Autowired
+	private YjptBwDao dao;
+	@Override
+	protected CjhsRepository<YjptBwEntity, String> getDao() {
+		
+		return dao;
+	}
+
+
+}

+ 30 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/YjptGkwxhwzyfzblFzServiceImpl.java

@@ -0,0 +1,30 @@
+package com.jtgh.cjhs.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.jtgh.cjhs.dao.YjptGkwxhwzyfzblFzDao;
+import com.jtgh.cjhs.dao.common.CjhsRepository;
+import com.jtgh.cjhs.entity.YjptGkwxhwzyfzblFzEntity;
+import com.jtgh.cjhs.service.CjhsBaseService;
+import com.jtgh.cjhs.service.YjptGkwxhwzyfzblFzService;
+
+/**
+ * 附证信息
+ * @author 刘福亮
+ *
+ */
+@Service
+public class YjptGkwxhwzyfzblFzServiceImpl extends
+CjhsBaseService<YjptGkwxhwzyfzblFzEntity, String>  implements YjptGkwxhwzyfzblFzService {
+
+	@Autowired
+	private YjptGkwxhwzyfzblFzDao dao;
+	
+	@Override
+	protected CjhsRepository<YjptGkwxhwzyfzblFzEntity, String> getDao() {
+		return dao;
+	}
+
+
+}

+ 30 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/YjptGkwxhwzyfzblhhzServiceImpl.java

@@ -0,0 +1,30 @@
+package com.jtgh.cjhs.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.jtgh.cjhs.dao.YjptGkwxhwzyfzblhhzDao;
+import com.jtgh.cjhs.dao.common.CjhsRepository;
+import com.jtgh.cjhs.entity.YjptGkwxhwzyfzblhhzEntity;
+import com.jtgh.cjhs.service.CjhsBaseService;
+import com.jtgh.cjhs.service.YjptGkwxhwzyfzblhhzService;
+
+/**
+ * 附证申请信息
+ * @author 刘福亮
+ *
+ */
+@Service
+public class YjptGkwxhwzyfzblhhzServiceImpl extends
+CjhsBaseService<YjptGkwxhwzyfzblhhzEntity, String>  implements YjptGkwxhwzyfzblhhzService {
+
+	@Autowired
+	private YjptGkwxhwzyfzblhhzDao dao;
+	
+	@Override
+	protected CjhsRepository<YjptGkwxhwzyfzblhhzEntity, String> getDao() {
+		return dao;
+	}
+
+
+}

+ 30 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/YjptWxhwpmServiceImpl.java

@@ -0,0 +1,30 @@
+package com.jtgh.cjhs.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.jtgh.cjhs.dao.YjptWxhwpmDao;
+import com.jtgh.cjhs.dao.common.CjhsRepository;
+import com.jtgh.cjhs.entity.YjptWxhwpmEntity;
+import com.jtgh.cjhs.service.CjhsBaseService;
+import com.jtgh.cjhs.service.YjptWxhwpmService;
+
+/**
+ * 危险品申报信息
+ * @author 刘福亮
+ *
+ */
+@Service
+public class YjptWxhwpmServiceImpl extends
+CjhsBaseService<YjptWxhwpmEntity, String>  implements YjptWxhwpmService {
+
+	@Autowired
+	private YjptWxhwpmDao dao;
+	
+	@Override
+	protected CjhsRepository<YjptWxhwpmEntity, String> getDao() {
+		return dao;
+	}
+
+
+}

+ 30 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/YjptZysqbpServiceImpl.java

@@ -0,0 +1,30 @@
+package com.jtgh.cjhs.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.jtgh.cjhs.dao.YjptZysqbpDao;
+import com.jtgh.cjhs.dao.common.CjhsRepository;
+import com.jtgh.cjhs.entity.YjptZysqbpEntity;
+import com.jtgh.cjhs.service.CjhsBaseService;
+import com.jtgh.cjhs.service.YjptZysqbpService;
+
+/**
+ * 危险品申报信息
+ * @author 刘福亮
+ *
+ */
+@Service
+public class YjptZysqbpServiceImpl extends
+CjhsBaseService<YjptZysqbpEntity, String>  implements YjptZysqbpService {
+
+	@Autowired
+	private YjptZysqbpDao dao;
+	
+	@Override
+	protected CjhsRepository<YjptZysqbpEntity, String> getDao() {
+		return dao;
+	}
+
+
+}

+ 96 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/sync/CjhsSyn.java

@@ -0,0 +1,96 @@
+package com.jtgh.cjhs.sync;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.jtgh.yjpt.entity.jyr.BwEntity;
+import com.jtgh.yjpt.entity.jyr.WxhwpmEntity;
+import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
+import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzEntity;
+import com.jtgh.yjpt.entity.zysqbp.ZysqbpEntity;
+import com.jtgh.yjpt.service.cjhs.GkToCjhsService;
+import com.jtgh.yjpt.service.jyr.BwService;
+import com.jtgh.yjpt.service.sys.WxhwpmService;
+import com.jtgh.yjpt.service.zyfzndjy.GkwxhwzyfzService;
+import com.jtgh.yjpt.service.zyfzndjy.GkwxhwzyfzblhhzService;
+import com.jtgh.yjpt.service.zysqbp.ZysqbpService;
+
+@Component
+public class CjhsSyn {
+
+	@Autowired
+	private GkToCjhsService service;
+	@Autowired
+	private BwService bwService;
+	@Autowired
+	private GkwxhwzyfzblhhzService gkwxhwzyfzblhhzService;
+	@Autowired
+	private GkwxhwzyfzService gkwxhwzyfzblFzService;
+	@Autowired
+	private WxhwpmService wxhwpmService;
+	@Autowired
+	private ZysqbpService zysqbpService;
+
+	public void execute() {
+		saveBw();
+		saveFz();
+		saveFzxx();
+		saveWxhwpm();
+		saveZysqbp();
+	}
+
+	/**
+	 * 同步泊位
+	 */
+	private void saveBw() {
+		List<BwEntity> list = bwService.findCjhsTb();
+		for (BwEntity entity : list) {
+			service.saveData(entity);
+		}
+	}
+
+	/**
+	 * 同步附证
+	 */
+	private void saveFz() {
+		List<GkwxhwzyfzblhhzEntity> list = gkwxhwzyfzblhhzService.findCjhsTb();
+		for (GkwxhwzyfzblhhzEntity entity : list) {
+			service.saveData(entity);
+			List<GkwxhwzyfzblFzEntity> fzxxList = gkwxhwzyfzblFzService.findByFzsq(entity);
+			service.saveFzxxDatas(fzxxList);
+		}
+	}
+	
+	/**
+	 * 同步附证信息
+	 */
+	private void saveFzxx() {
+		List<GkwxhwzyfzblFzEntity> list = gkwxhwzyfzblFzService.findCjhsTb();
+		for (GkwxhwzyfzblFzEntity entity : list) {
+			service.saveData(entity);
+		}
+	}
+
+	/**
+	 * 同步危险品
+	 */
+	private void saveWxhwpm() {
+		List<WxhwpmEntity> list = wxhwpmService.findCjhsTb();
+		for (WxhwpmEntity entity : list) {
+			service.saveData(entity);
+		}
+	}
+
+	/**
+	 * 同步作业申报
+	 */
+	private void saveZysqbp() {
+		List<ZysqbpEntity> list = zysqbpService.findCjhsTb();
+		for (ZysqbpEntity entity : list) {
+			service.saveData(entity);
+		}
+	}
+
+}

+ 7 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/controller/sys/WxhwpmController.java

@@ -30,6 +30,7 @@ import com.jtgh.yjpt.entity.common.CodeEntity;
 import com.jtgh.yjpt.entity.common.MemEntity;
 import com.jtgh.yjpt.entity.common.MemEntity;
 import com.jtgh.yjpt.entity.common.MemType;
 import com.jtgh.yjpt.entity.common.MemType;
 import com.jtgh.yjpt.entity.jyr.WxhwpmEntity;
 import com.jtgh.yjpt.entity.jyr.WxhwpmEntity;
+import com.jtgh.yjpt.service.cjhs.GkToCjhsService;
 import com.jtgh.yjpt.service.common.CodeService;
 import com.jtgh.yjpt.service.common.CodeService;
 import com.jtgh.yjpt.service.common.MemService;
 import com.jtgh.yjpt.service.common.MemService;
 import com.jtgh.yjpt.service.sys.WxhwpmService;
 import com.jtgh.yjpt.service.sys.WxhwpmService;
@@ -55,6 +56,9 @@ public class WxhwpmController extends BaseController {
 
 
 	@Autowired
 	@Autowired
 	private MemService memService;
 	private MemService memService;
+	
+	@Autowired
+	private GkToCjhsService gkToCjhsService;
 
 
 	@Log(Type.QUERY)
 	@Log(Type.QUERY)
 	public BusinessContext list(SinglePageRequest pageable, Long functionId,
 	public BusinessContext list(SinglePageRequest pageable, Long functionId,
@@ -84,6 +88,7 @@ public class WxhwpmController extends BaseController {
 			entity.setAddDate(new Date());
 			entity.setAddDate(new Date());
 		}
 		}
 		entity = wxhwpmService.save(entity);
 		entity = wxhwpmService.save(entity);
+		gkToCjhsService.saveData(entity);
 		//tb(GlobalData.DEPLOY_MODE, entity, Constants.TB_METHOD_SAVE);
 		//tb(GlobalData.DEPLOY_MODE, entity, Constants.TB_METHOD_SAVE);
 		return createBusinessContext(entity);
 		return createBusinessContext(entity);
 	}
 	}
@@ -98,6 +103,7 @@ public class WxhwpmController extends BaseController {
 			entity.setAddDate(new Date());
 			entity.setAddDate(new Date());
 		}
 		}
 		entity = wxhwpmService.save(entity);
 		entity = wxhwpmService.save(entity);
+		gkToCjhsService.saveData(entity);
 		//tb(GlobalData.DEPLOY_MODE, entity, Constants.TB_METHOD_SAVE);
 		//tb(GlobalData.DEPLOY_MODE, entity, Constants.TB_METHOD_SAVE);
 		return createBusinessContext(entity);
 		return createBusinessContext(entity);
 	}
 	}
@@ -106,6 +112,7 @@ public class WxhwpmController extends BaseController {
 	public BusinessContext delete(WxhwpmEntity entity) {
 	public BusinessContext delete(WxhwpmEntity entity) {
 		wxhwpmService.logicDelete(entity.getId());
 		wxhwpmService.logicDelete(entity.getId());
 		entity.setRecordStatus(BaseEntity.RECORD_STATE_DELETE);
 		entity.setRecordStatus(BaseEntity.RECORD_STATE_DELETE);
+		gkToCjhsService.saveData(entity);
 		//tb(GlobalData.DEPLOY_MODE, entity, Constants.TB_METHOD_DELETE);
 		//tb(GlobalData.DEPLOY_MODE, entity, Constants.TB_METHOD_DELETE);
 		return createBusinessContext();
 		return createBusinessContext();
 	}
 	}

+ 10 - 2
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/controller/zyfzndjy/GkwxhwzyfzblhhzController.java

@@ -74,6 +74,7 @@ import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzzbEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzzbEntity;
 import com.jtgh.yjpt.entity.zyfzns.Gkwxhwzyfzns;
 import com.jtgh.yjpt.entity.zyfzns.Gkwxhwzyfzns;
+import com.jtgh.yjpt.service.cjhs.GkToCjhsService;
 import com.jtgh.yjpt.service.common.AccessoryService;
 import com.jtgh.yjpt.service.common.AccessoryService;
 import com.jtgh.yjpt.service.common.CodeService;
 import com.jtgh.yjpt.service.common.CodeService;
 import com.jtgh.yjpt.service.jlrxxgl.GlzdxxService;
 import com.jtgh.yjpt.service.jlrxxgl.GlzdxxService;
@@ -118,7 +119,8 @@ public class GkwxhwzyfzblhhzController extends BaseController {
 	private YjwzFlxxService wzService;
 	private YjwzFlxxService wzService;
 	@Autowired
 	@Autowired
 	private AccessoryService accessoryService;
 	private AccessoryService accessoryService;
-	 
+	@Autowired
+	private GkToCjhsService gkToCjhsService;
 
 
 
 
 	/**
 	/**
@@ -640,8 +642,14 @@ public class GkwxhwzyfzblhhzController extends BaseController {
 			gkwxhwzyfzblhhzService.claim(entity.getId().toString(), Utils
 			gkwxhwzyfzblhhzService.claim(entity.getId().toString(), Utils
 					.getCurrentUser().getId().toString());
 					.getCurrentUser().getId().toString());
 		}
 		}
-		gkwxhwzyfzblhhzService.changeAudit(shyj, shsj, entity,
+		
+		boolean isDone = gkwxhwzyfzblhhzService.changeAudit(shyj, shsj, entity,
 				flag,schq,fz);		
 				flag,schq,fz);		
+		if(isDone){
+			 gkToCjhsService.saveData(entity);
+			 List<GkwxhwzyfzblFzEntity> fzxxList = gkwxhwzyfzService.findByFzsq(entity);
+			 gkToCjhsService.saveFzxxDatas(fzxxList);
+		}
 		return null;
 		return null;
 	}
 	}
 	
 	

+ 296 - 171
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/controller/zysqbp/ZysqbpController.java

@@ -8,13 +8,10 @@ import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Calendar;
 import java.util.Collection;
 import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.Date;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
-import java.util.Set;
 
 
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.CriteriaQuery;
@@ -45,6 +42,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 
+import com.jtgh.cjhs.entity.DtywCbsbEntity;
+import com.jtgh.cjhs.service.DtywCbsbService;
 import com.jtgh.yjpt.anon.Log;
 import com.jtgh.yjpt.anon.Log;
 import com.jtgh.yjpt.anon.Log.Type;
 import com.jtgh.yjpt.anon.Log.Type;
 import com.jtgh.yjpt.client.zysqbp.ZysqbpWebService;
 import com.jtgh.yjpt.client.zysqbp.ZysqbpWebService;
@@ -66,13 +65,15 @@ import com.jtgh.yjpt.dao.task.GztxDao;
 import com.jtgh.yjpt.dao.zysqbp.ZysqbpBgDao;
 import com.jtgh.yjpt.dao.zysqbp.ZysqbpBgDao;
 import com.jtgh.yjpt.entity.BaseEntity;
 import com.jtgh.yjpt.entity.BaseEntity;
 import com.jtgh.yjpt.entity.auth.UserEntity;
 import com.jtgh.yjpt.entity.auth.UserEntity;
+import com.jtgh.yjpt.entity.cjhs.CjhsDbEntity;
+import com.jtgh.yjpt.entity.cjhs.CjhsEntity;
+import com.jtgh.yjpt.entity.cjhs.CjhsHwEntity;
 import com.jtgh.yjpt.entity.common.AccessoryEntity;
 import com.jtgh.yjpt.entity.common.AccessoryEntity;
 import com.jtgh.yjpt.entity.common.CodeEntity;
 import com.jtgh.yjpt.entity.common.CodeEntity;
 import com.jtgh.yjpt.entity.common.TaskInfoEntity;
 import com.jtgh.yjpt.entity.common.TaskInfoEntity;
 import com.jtgh.yjpt.entity.gg.GgEntity;
 import com.jtgh.yjpt.entity.gg.GgEntity;
 import com.jtgh.yjpt.entity.gkgq.GqEntity;
 import com.jtgh.yjpt.entity.gkgq.GqEntity;
 import com.jtgh.yjpt.entity.hs.ZysqbpHsEntity;
 import com.jtgh.yjpt.entity.hs.ZysqbpHsEntity;
-import com.jtgh.yjpt.entity.hs.ZysqbphsdbEntity;
 import com.jtgh.yjpt.entity.jyr.BwEntity;
 import com.jtgh.yjpt.entity.jyr.BwEntity;
 import com.jtgh.yjpt.entity.jyr.JyrEntity;
 import com.jtgh.yjpt.entity.jyr.JyrEntity;
 import com.jtgh.yjpt.entity.jyr.JyrNsEntity;
 import com.jtgh.yjpt.entity.jyr.JyrNsEntity;
@@ -85,11 +86,13 @@ import com.jtgh.yjpt.entity.zysqbp.ZysqbpCountEntity;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpCountEntity1;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpCountEntity1;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpEntity;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpEntity;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpGatherEntity;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpGatherEntity;
+import com.jtgh.yjpt.service.cjhs.CjhsDbService;
+import com.jtgh.yjpt.service.cjhs.CjhsService;
+import com.jtgh.yjpt.service.cjhs.GkToCjhsService;
 import com.jtgh.yjpt.service.common.AccessoryService;
 import com.jtgh.yjpt.service.common.AccessoryService;
 import com.jtgh.yjpt.service.common.CodeService;
 import com.jtgh.yjpt.service.common.CodeService;
 import com.jtgh.yjpt.service.common.WorkflowMangerService;
 import com.jtgh.yjpt.service.common.WorkflowMangerService;
 import com.jtgh.yjpt.service.gkgq.GqService;
 import com.jtgh.yjpt.service.gkgq.GqService;
-import com.jtgh.yjpt.service.hs.HsCompareService;
 import com.jtgh.yjpt.service.jyr.BwService;
 import com.jtgh.yjpt.service.jyr.BwService;
 import com.jtgh.yjpt.service.jyr.CkService;
 import com.jtgh.yjpt.service.jyr.CkService;
 import com.jtgh.yjpt.service.jyr.DcService;
 import com.jtgh.yjpt.service.jyr.DcService;
@@ -152,10 +155,19 @@ public class ZysqbpController extends BaseController {
 	private GztxDao gztxDao;
 	private GztxDao gztxDao;
 	@Autowired
 	@Autowired
 	private WxhwpmService wxhwpmService;
 	private WxhwpmService wxhwpmService;
-	@Autowired
-	private HsCompareService compareService;
+	/*
+	 * @Autowired private HsCompareService compareService;
+	 */
 	@Autowired
 	@Autowired
 	private JyrNsService nsService;
 	private JyrNsService nsService;
+	@Autowired
+	private CjhsService cjhsService;
+	@Autowired
+	private CjhsDbService cjhsDbService;
+	@Autowired
+	private DtywCbsbService dtywCbsbService;	
+	@Autowired
+	private GkToCjhsService gkToCjhsService;
 
 
 	/**
 	/**
 	 * 查询统计
 	 * 查询统计
@@ -184,7 +196,7 @@ public class ZysqbpController extends BaseController {
 	 */
 	 */
 	public BusinessContext compare(ZysqbpEntity vo) {
 	public BusinessContext compare(ZysqbpEntity vo) {
 		try {
 		try {
-//			compareService.doCompare(vo.getId().toString());
+			// compareService.doCompare(vo.getId().toString());
 		} catch (Exception e) {
 		} catch (Exception e) {
 			e.printStackTrace();
 			e.printStackTrace();
 			return createBusinessContext("msg.fail", true);
 			return createBusinessContext("msg.fail", true);
@@ -194,11 +206,13 @@ public class ZysqbpController extends BaseController {
 
 
 	/**
 	/**
 	 * 一览页面
 	 * 一览页面
+	 * 
 	 * @param pageable
 	 * @param pageable
 	 * @param functionId
 	 * @param functionId
 	 * @param entity
 	 * @param entity
 	 * @param lcStatus
 	 * @param lcStatus
-	 * @param bgsj1 报告时间起
+	 * @param bgsj1
+	 *            报告时间起
 	 * @param bgsj2报告时间止
 	 * @param bgsj2报告时间止
 	 * @param kgsj1开工时间起
 	 * @param kgsj1开工时间起
 	 * @param kgsj2开工时间止
 	 * @param kgsj2开工时间止
@@ -210,7 +224,7 @@ public class ZysqbpController extends BaseController {
 	public BusinessContext list(Pageable pageable, final Long functionId,
 	public BusinessContext list(Pageable pageable, final Long functionId,
 			final ZysqbpEntity entity, final String lcStatus, final Date bgsj1,
 			final ZysqbpEntity entity, final String lcStatus, final Date bgsj1,
 			final Date bgsj2, final Date kgsj1, final Date kgsj2,
 			final Date bgsj2, final Date kgsj1, final Date kgsj2,
-			final Date wgsj1, final Date wgsj2,final CodeEntity zs) {
+			final Date wgsj1, final Date wgsj2, final CodeEntity zs) {
 		BusinessContext bc = new BusinessContext();
 		BusinessContext bc = new BusinessContext();
 		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
 		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
 		try {
 		try {
@@ -225,7 +239,8 @@ public class ZysqbpController extends BaseController {
 					list.add(cb.notEqual(
 					list.add(cb.notEqual(
 							root.get("recordStatus").as(String.class),
 							root.get("recordStatus").as(String.class),
 							BaseEntity.RECORD_STATE_DELETE));
 							BaseEntity.RECORD_STATE_DELETE));
-					if (BaseEntity.RECORD_STATE_DELETE != entity.getRecordStatus()) {
+					if (BaseEntity.RECORD_STATE_DELETE != entity
+							.getRecordStatus()) {
 						list.add(cb.equal(
 						list.add(cb.equal(
 								root.get("recordStatus").as(String.class),
 								root.get("recordStatus").as(String.class),
 								String.valueOf(entity.getRecordStatus())));
 								String.valueOf(entity.getRecordStatus())));
@@ -256,8 +271,9 @@ public class ZysqbpController extends BaseController {
 								root.get("szd").get("id").as(String.class),
 								root.get("szd").get("id").as(String.class),
 								entity.getSzd().getId() + "%"));
 								entity.getSzd().getId() + "%"));
 					if (null != zs)
 					if (null != zs)
-						list.add(cb.equal(
-								root.get("zydw").get("zs").as(CodeEntity.class),zs));
+						list.add(cb
+								.equal(root.get("zydw").get("zs")
+										.as(CodeEntity.class), zs));
 					if (null != entity.getSzgq())
 					if (null != entity.getSzgq())
 						list.add(cb.equal(root.get("szgq").as(GqEntity.class),
 						list.add(cb.equal(root.get("szgq").as(GqEntity.class),
 								entity.getSzgq()));
 								entity.getSzgq()));
@@ -360,9 +376,10 @@ public class ZysqbpController extends BaseController {
 		return null;
 		return null;
 
 
 	}
 	}
-	
+
 	/**
 	/**
 	 * 打印
 	 * 打印
+	 * 
 	 * @param id
 	 * @param id
 	 * @param type
 	 * @param type
 	 * @param response
 	 * @param response
@@ -610,9 +627,9 @@ public class ZysqbpController extends BaseController {
 								param.get(15) + ""));
 								param.get(15) + ""));
 					}
 					}
 					if (!"".equals(param.get(16))) {
 					if (!"".equals(param.get(16))) {
-						list.add(cb.equal(
-								root.get("zydw").get("zs").get("id").as(Long.class),
-								Long.parseLong(param.get(16)+"")));
+						list.add(cb.equal(root.get("zydw").get("zs").get("id")
+								.as(Long.class),
+								Long.parseLong(param.get(16) + "")));
 					}
 					}
 					if (Constants.YES.equals(Utils.getCurrentUser().getSfcd())) {
 					if (Constants.YES.equals(Utils.getCurrentUser().getSfcd())) {
 						list.add(cb.equal(
 						list.add(cb.equal(
@@ -714,7 +731,8 @@ public class ZysqbpController extends BaseController {
 									.getBgsj()),
 									.getBgsj()),
 							entity.getWxwpmc(),
 							entity.getWxwpmc(),
 							mao,
 							mao,
-							null == entity.getSzd() ? "" :entity.getSzd().getName(),
+							null == entity.getSzd() ? "" : entity.getSzd()
+									.getName(),
 							null == entity.getSzgq() ? "" : entity.getSzgq()
 							null == entity.getSzgq() ? "" : entity.getSzgq()
 									.getGqmc(),
 									.getGqmc(),
 							null == entity.getKgsj() ? "" : sdf.format(entity
 							null == entity.getKgsj() ? "" : sdf.format(entity
@@ -736,7 +754,8 @@ public class ZysqbpController extends BaseController {
 									.getBgsj()),
 									.getBgsj()),
 							entity.getWxhwmcbh(),
 							entity.getWxhwmcbh(),
 							mao,
 							mao,
-							null == entity.getSzd() ? "" : entity.getSzd().getName(),
+							null == entity.getSzd() ? "" : entity.getSzd()
+									.getName(),
 							null == entity.getSzgq() ? "" : entity.getSzgq()
 							null == entity.getSzgq() ? "" : entity.getSzgq()
 									.getGqmc(),
 									.getGqmc(),
 							null == entity.getKgsj() ? "" : sdf.format(entity
 							null == entity.getKgsj() ? "" : sdf.format(entity
@@ -1270,6 +1289,7 @@ public class ZysqbpController extends BaseController {
 			}
 			}
 			entity2.setBh(entity.getBh());
 			entity2.setBh(entity.getBh());
 			zysqbpService.save(entity2);
 			zysqbpService.save(entity2);
+			gkToCjhsService.saveData(entity2);
 		}
 		}
 	}
 	}
 
 
@@ -1300,7 +1320,7 @@ public class ZysqbpController extends BaseController {
 	public BusinessContext doCompare(ZysqbpEntity entity) {
 	public BusinessContext doCompare(ZysqbpEntity entity) {
 		BusinessContext bc = createBusinessContext();
 		BusinessContext bc = createBusinessContext();
 		if (Constants.GGDM_ID_ZYDD_BW.equals(entity.getZydd().getId())) {
 		if (Constants.GGDM_ID_ZYDD_BW.equals(entity.getZydd().getId())) {
-		//	entity = compareService.doCompare(entity.getId().toString());
+			// entity = compareService.doCompare(entity.getId().toString());
 		}
 		}
 		bc.setResult(entity);
 		bc.setResult(entity);
 		return bc;
 		return bc;
@@ -1308,9 +1328,10 @@ public class ZysqbpController extends BaseController {
 
 
 	public BusinessContext doViewInit(Long id) {
 	public BusinessContext doViewInit(Long id) {
 		ZysqbpEntity vo = zysqbpService.findOne(id);
 		ZysqbpEntity vo = zysqbpService.findOne(id);
-		if (Constants.GGDM_ID_ZYDD_BW.equals(vo.getZydd().getId())) {
-			vo = compareService.doCompare(vo.getId().toString());
-		}
+		/*
+		 * if (Constants.GGDM_ID_ZYDD_BW.equals(vo.getZydd().getId())) { vo =
+		 * compareService.doCompare(vo.getId().toString()); }
+		 */
 		BusinessContext bc = createBusinessContext();
 		BusinessContext bc = createBusinessContext();
 		bc.setResult(vo);
 		bc.setResult(vo);
 		// 附件查询
 		// 附件查询
@@ -1327,6 +1348,7 @@ public class ZysqbpController extends BaseController {
 		List<AccessoryEntity> acc = accessoryService.findAll(accSpec);
 		List<AccessoryEntity> acc = accessoryService.findAll(accSpec);
 		if (acc != null && acc.size() > 0)
 		if (acc != null && acc.size() > 0)
 			vo.setAccessory(acc.get(0));
 			vo.setAccessory(acc.get(0));
+
 		return bc;
 		return bc;
 	}
 	}
 
 
@@ -1791,9 +1813,8 @@ public class ZysqbpController extends BaseController {
 			if (szd.equals(0l))
 			if (szd.equals(0l))
 				PoiUtils.setCellValue(st0, 1, 1, "湖北省危险货物作业情况汇总表");
 				PoiUtils.setCellValue(st0, 1, 1, "湖北省危险货物作业情况汇总表");
 			else
 			else
-				PoiUtils.setCellValue(st0, 1, 1,
-						codeService.findOne(szd).getName()
-								+ "危险货物作业情况汇总表");
+				PoiUtils.setCellValue(st0, 1, 1, codeService.findOne(szd)
+						.getName() + "危险货物作业情况汇总表");
 			PoiUtils.setCellValue(st0, 2, 10, sdf.format(new Date()));
 			PoiUtils.setCellValue(st0, 2, 10, sdf.format(new Date()));
 			PoiUtils.setCellValue(st0, 3, 2, e.getGkwhqys() + "个");
 			PoiUtils.setCellValue(st0, 3, 2, e.getGkwhqys() + "个");
 			PoiUtils.setCellValue(st0, 3, 4, e.getYfxkz() + "个");
 			PoiUtils.setCellValue(st0, 3, 4, e.getYfxkz() + "个");
@@ -2115,6 +2136,7 @@ public class ZysqbpController extends BaseController {
 			// 发工作提醒
 			// 发工作提醒
 			setGztx("你单位" + sdf.format(entity.getUpdateDate())
 			setGztx("你单位" + sdf.format(entity.getUpdateDate())
 					+ "提交的取消作业申请已审核未通过", entity1.getAddUser());
 					+ "提交的取消作业申请已审核未通过", entity1.getAddUser());
+			gkToCjhsService.saveData(entity1);
 		} else {// 取消通过,流程结束,数据状态改为6,设置取消作业时间,
 		} else {// 取消通过,流程结束,数据状态改为6,设置取消作业时间,
 			ZysqbpEntity entity2 = zysqbpService.findOne(entity.getId());
 			ZysqbpEntity entity2 = zysqbpService.findOne(entity.getId());
 			entity2.setRecordStatus(ZysqbpEntity.RECORD_STATE_QXCOMPLETED);
 			entity2.setRecordStatus(ZysqbpEntity.RECORD_STATE_QXCOMPLETED);
@@ -2125,6 +2147,7 @@ public class ZysqbpController extends BaseController {
 			entity2 = zysqbpService.save(entity2);
 			entity2 = zysqbpService.save(entity2);
 			setGztx("你单位" + sdf.format(entity.getUpdateDate())
 			setGztx("你单位" + sdf.format(entity.getUpdateDate())
 					+ "提交的取消作业申请已审核通过", entity2.getAddUser());
 					+ "提交的取消作业申请已审核通过", entity2.getAddUser());
+			gkToCjhsService.saveData(entity2);
 		}
 		}
 
 
 	}
 	}
@@ -2170,6 +2193,8 @@ public class ZysqbpController extends BaseController {
 			entity1 = zysqbpService.save(entity1);
 			entity1 = zysqbpService.save(entity1);
 			setGztx("你单位" + sdf.format(bgvo.getAddDate()) + "申请的作业变更已审核未通过",
 			setGztx("你单位" + sdf.format(bgvo.getAddDate()) + "申请的作业变更已审核未通过",
 					entity1.getAddUser());
 					entity1.getAddUser());
+			//同步海事
+			gkToCjhsService.saveData(entity1);
 		} else {// 变更通过,流程结束,数据状态改为10,替换新数据
 		} else {// 变更通过,流程结束,数据状态改为10,替换新数据
 			ZysqbpEntity entity2 = zysqbpService.findOne(entity.getId());
 			ZysqbpEntity entity2 = zysqbpService.findOne(entity.getId());
 			entity2.setRecordStatus(ZysqbpEntity.RECORD_STATE_BGCOMPLETED);
 			entity2.setRecordStatus(ZysqbpEntity.RECORD_STATE_BGCOMPLETED);
@@ -2184,6 +2209,8 @@ public class ZysqbpController extends BaseController {
 			// 发工作提醒
 			// 发工作提醒
 			setGztx("你单位" + sdf.format(bgvo.getAddDate()) + "申请的作业变更审核通过",
 			setGztx("你单位" + sdf.format(bgvo.getAddDate()) + "申请的作业变更审核通过",
 					entity2.getAddUser());
 					entity2.getAddUser());
+			//同步海事
+			gkToCjhsService.saveData(entity2);
 		}
 		}
 
 
 	}
 	}
@@ -2234,55 +2261,23 @@ public class ZysqbpController extends BaseController {
 	 * @param id
 	 * @param id
 	 * @return
 	 * @return
 	 */
 	 */
-	public BusinessContext queryDb(Long id) {
-		List<ZysqbphsdbEntity> list = new ArrayList<ZysqbphsdbEntity>();
-		Map<String, Map<String, String>> map = compareService.mergeInfo(id);
-		if (map == null) {
-			return creaBusinessContext(list);
-		}
-		Set<String> set = map.keySet();
-		if (set != null && set.size() > 0) {
-			for (String str : set) {
-				ZysqbphsdbEntity temp = new ZysqbphsdbEntity();
-				temp.setName(str);
-				temp.setGkj(map.get(str).get("GK"));
-				temp.setHs(map.get(str).get("HS"));
-				temp.setZt(map.get(str).get("ZT"));
-				String xh = map.get(str).get("XH");
-				if (org.springframework.util.StringUtils.hasText(xh)) {
-					temp.setXh(new Integer(xh));
-				} else {
-					temp.setXh(Integer.MAX_VALUE);
-				}
-				list.add(temp);
-			}
-			Collections.sort(list, new Comparator<ZysqbphsdbEntity>() {
-
-				@Override
-				public int compare(ZysqbphsdbEntity o1, ZysqbphsdbEntity o2) {
-					return o1.getXh().compareTo(o2.getXh());
-				}
-			});
-		}
-		/**
-		 * 这边暂时用的测试数据,数据库有数据时,将下面的注释掉的代码放开,test里的去掉
-		 */
-		// test=============================
-		// ZysqbphsdbEntity temp = new ZysqbphsdbEntity();
-		// temp.setName("危险品");
-		// temp.setGkj("23");
-		// temp.setHs("32");
-		// temp.setZt(HsCompareService.ZC);
-		// list.add(temp);
-		// ZysqbphsdbEntity temp2 = new ZysqbphsdbEntity();
-		// temp2.setName("总重量");
-		// temp2.setGkj("23");
-		// temp2.setHs("32");
-		// temp2.setZt(HsCompareService.YC);
-		// list.add(temp2);
-		// =====test end=====
-		return creaBusinessContext(list);
-	}
+	/*
+	 * public BusinessContext queryDb(Long id) { List<ZysqbphsdbEntity> list =
+	 * new ArrayList<ZysqbphsdbEntity>(); Map<String, Map<String, String>> map =
+	 * compareService.mergeInfo(id); if (map == null) { return
+	 * creaBusinessContext(list); } Set<String> set = map.keySet(); if (set !=
+	 * null && set.size() > 0) { for (String str : set) { ZysqbphsdbEntity temp
+	 * = new ZysqbphsdbEntity(); temp.setName(str);
+	 * temp.setGkj(map.get(str).get("GK")); temp.setHs(map.get(str).get("HS"));
+	 * temp.setZt(map.get(str).get("ZT")); String xh = map.get(str).get("XH");
+	 * if (org.springframework.util.StringUtils.hasText(xh)) { temp.setXh(new
+	 * Integer(xh)); } else { temp.setXh(Integer.MAX_VALUE); } list.add(temp); }
+	 * Collections.sort(list, new Comparator<ZysqbphsdbEntity>() {
+	 * 
+	 * @Override public int compare(ZysqbphsdbEntity o1, ZysqbphsdbEntity o2) {
+	 * return o1.getXh().compareTo(o2.getXh()); } }); } // =====test end=====
+	 * return creaBusinessContext(list); }
+	 */
 
 
 	/**
 	/**
 	 * 海事申报结果详细
 	 * 海事申报结果详细
@@ -2359,9 +2354,10 @@ public class ZysqbpController extends BaseController {
 			Page<ZysqbpEntity> pageList = zysqbpService.findAll(spec, pageable);
 			Page<ZysqbpEntity> pageList = zysqbpService.findAll(spec, pageable);
 			for (ZysqbpEntity vo : pageList) {
 			for (ZysqbpEntity vo : pageList) {
 				// 如果比对结果条件为空,重新比对
 				// 如果比对结果条件为空,重新比对
-				if (StringUtils.isEmpty(dbStatus)) {
-					vo = compareService.doCompare(vo.getId().toString());
-				}
+				/*
+				 * if (StringUtils.isEmpty(dbStatus)) { vo =
+				 * compareService.doCompare(vo.getId().toString()); }
+				 */
 				// 检索附件
 				// 检索附件
 				filterList = new ArrayList<PredicateModel>();
 				filterList = new ArrayList<PredicateModel>();
 				addNotEmptyModel(filterList, "entityType.id",
 				addNotEmptyModel(filterList, "entityType.id",
@@ -2410,7 +2406,7 @@ public class ZysqbpController extends BaseController {
 	 */
 	 */
 	public BusinessContext queryGkList(ASObject param) {
 	public BusinessContext queryGkList(ASObject param) {
 		List<ZysqbpHsEntity> list = new ArrayList<ZysqbpHsEntity>();
 		List<ZysqbpHsEntity> list = new ArrayList<ZysqbpHsEntity>();
-		list = compareService.findGkwpp(param);
+		/* list = compareService.findGkwpp(param); */
 		return creaBusinessContext(list);
 		return creaBusinessContext(list);
 	}
 	}
 
 
@@ -2458,90 +2454,104 @@ public class ZysqbpController extends BaseController {
 		bc.setResult(accessoryService.save(accNew));
 		bc.setResult(accessoryService.save(accNew));
 		return bc;
 		return bc;
 	}
 	}
-	
-	public BusinessContext findByGg(GgEntity ggEntity){
-	    BusinessContext bc = new BusinessContext();
-	    List<ZysqbpEntity> list = zysqbpService.getZysqbpListByBgsjAndCm(ggEntity.getAddDate(), ggEntity.getByzd3());
-	    if(list != null && list.size() >0){
-	    	bc.setResult(list.get(0));
-	    }
-	    return bc;
+
+	public BusinessContext findByGg(GgEntity ggEntity) {
+		BusinessContext bc = new BusinessContext();
+		List<ZysqbpEntity> list = zysqbpService.getZysqbpListByBgsjAndCm(
+				ggEntity.getAddDate(), ggEntity.getByzd3());
+		if (list != null && list.size() > 0) {
+			bc.setResult(list.get(0));
+		}
+		return bc;
 	}
 	}
+
 	/*
 	/*
-	 * 批量签章时,获取所要保护的数据 
-	 * xh 2016.7.4
-	 * (  public String GetmSignatureData(@RequestParam String documentID,HttpSession session)  )
+	 * 批量签章时,获取所要保护的数据 xh 2016.7.4 ( public String
+	 * GetmSignatureData(@RequestParam String documentID,HttpSession session) )
 	 */
 	 */
 	@RequestMapping(value = "GetmSignatureData", method = RequestMethod.GET)
 	@RequestMapping(value = "GetmSignatureData", method = RequestMethod.GET)
-	@ResponseBody 
-	public String GetmSignatureData(@RequestParam String documentID){ 
+	@ResponseBody
+	public String GetmSignatureData(@RequestParam String documentID) {
 		ZysqbpEntity data = zysqbpService.findOne(Long.parseLong(documentID));
 		ZysqbpEntity data = zysqbpService.findOne(Long.parseLong(documentID));
-		
-		String audit_user="",audit_date="",audit_op="";
-		SimpleDateFormat myFmt=new SimpleDateFormat("yyyy-M-d");
-		SimpleDateFormat myFmt2=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-		
-		//审批信息
+
+		String audit_user = "", audit_date = "", audit_op = "";
+		SimpleDateFormat myFmt = new SimpleDateFormat("yyyy-M-d");
+		SimpleDateFormat myFmt2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+		// 审批信息
 		if (data.getTaskList() != null && data.getTaskList().size() > 0) {
 		if (data.getTaskList() != null && data.getTaskList().size() > 0) {
 			for (TaskInfoEntity task : data.getTaskList()) {
 			for (TaskInfoEntity task : data.getTaskList()) {
 				if ("wf.sc".equals(task.getCurrName())) {
 				if ("wf.sc".equals(task.getCurrName())) {
-//					parameters.put("audit_user", task.getAuditUsername());
-//					parameters.put("audit_date", task.getAuditTime());
-//					parameters.put("audit_op", task.getAuditMsg());
-//					parameters.put("audit_dept", task.getByzd2());
+					// parameters.put("audit_user", task.getAuditUsername());
+					// parameters.put("audit_date", task.getAuditTime());
+					// parameters.put("audit_op", task.getAuditMsg());
+					// parameters.put("audit_dept", task.getByzd2());
 					audit_user = task.getAuditUsername();
 					audit_user = task.getAuditUsername();
-					if(task.getAuditTime()!=null)
+					if (task.getAuditTime() != null)
 						audit_date = myFmt.format(task.getAuditTime());
 						audit_date = myFmt.format(task.getAuditTime());
-					audit_op =  task.getAuditMsg();	
+					audit_op = task.getAuditMsg();
 				}
 				}
 			}
 			}
 		}
 		}
-		
-		
-		String div = "\r\n";//分隔符
+
+		String div = "\r\n";// 分隔符
 		StringBuffer sb = new StringBuffer();
 		StringBuffer sb = new StringBuffer();
-		sb.append("BH="+ ((data.getBh()==null)?"":data.getBh())+ div);
-		sb.append("ZYDW="+((data.getZydw()==null)?"":data.getZydw().getGkjyr())+div);
-		sb.append("ZYWTR="+((data.getZywtr()==null)?"":data.getZywtr())+div);
-		sb.append("CM="+((data.getCm()==null)?"":data.getCm())+div);
-		sb.append("XCGLFZR="+((data.getXcglfzr()==null)?"":data.getXcglfzr())+div);
-		sb.append("WXHWMCBH="+((data.getWxhwmcbh()==null)?"":data.getWxhwmcbh())+div);
-		sb.append("WPBH="+((data.getWpbh()==null)?"":data.getWpbh())+div);
-		sb.append("WXPLB="+((data.getWxplb()==null)?"":data.getWxplb())+div);
-		sb.append("BYZD4="+((data.getByzd4()==null)?"":data.getByzd4())+div);
-	 
-		String inorout ="";
+		sb.append("BH=" + ((data.getBh() == null) ? "" : data.getBh()) + div);
+		sb.append("ZYDW="
+				+ ((data.getZydw() == null) ? "" : data.getZydw().getGkjyr())
+				+ div);
+		sb.append("ZYWTR=" + ((data.getZywtr() == null) ? "" : data.getZywtr())
+				+ div);
+		sb.append("CM=" + ((data.getCm() == null) ? "" : data.getCm()) + div);
+		sb.append("XCGLFZR="
+				+ ((data.getXcglfzr() == null) ? "" : data.getXcglfzr()) + div);
+		sb.append("WXHWMCBH="
+				+ ((data.getWxhwmcbh() == null) ? "" : data.getWxhwmcbh())
+				+ div);
+		sb.append("WPBH=" + ((data.getWpbh() == null) ? "" : data.getWpbh())
+				+ div);
+		sb.append("WXPLB=" + ((data.getWxplb() == null) ? "" : data.getWxplb())
+				+ div);
+		sb.append("BYZD4=" + ((data.getByzd4() == null) ? "" : data.getByzd4())
+				+ div);
+
+		String inorout = "";
 		// 1进港/2出港
 		// 1进港/2出港
-		if(data.getInorout().equals("1")){ 
+		if (data.getInorout().equals("1")) {
 			inorout = "进港";
 			inorout = "进港";
+		} else if (data.getInorout().equals("2")) {
+			inorout = "出港";
 		}
 		}
-		else if(data.getInorout().equals("2")){ 
-			inorout="出港";
-		} 
-		sb.append("INOROUT="+inorout+div);
-		
-		sb.append("ZYSL="+((data.getZysl()==null)?"":data.getZysl())+div);
-		sb.append("SG="+((data.getSg()==null)?"":data.getSg())+div);
-		sb.append("XG="+((data.getXg()==null)?"":data.getXg())+div);
-		
-		String mao="";
-		//1内贸/2外贸 
-		if(data.getMao().equals("1")){ 
+		sb.append("INOROUT=" + inorout + div);
+
+		sb.append("ZYSL=" + ((data.getZysl() == null) ? "" : data.getZysl())
+				+ div);
+		sb.append("SG=" + ((data.getSg() == null) ? "" : data.getSg()) + div);
+		sb.append("XG=" + ((data.getXg() == null) ? "" : data.getXg()) + div);
+
+		String mao = "";
+		// 1内贸/2外贸
+		if (data.getMao().equals("1")) {
 			mao = "内贸";
 			mao = "内贸";
-		}
-		else if(data.getMao().equals("2")){ 
+		} else if (data.getMao().equals("2")) {
 			mao = "外贸 ";
 			mao = "外贸 ";
 		}
 		}
-		sb.append("MAO="+mao+div);
-		
-		 
-		sb.append("HZWXX="+(data.getHzwxx()==null?"": resource.getString(data.getHzwxx()))+div);
-		sb.append("DXDJ="+((data.getDxdj()==null)?"":data.getDxdj())+div);
-		sb.append("WRLB="+((data.getWrlb()==null)?"":data.getWrlb())+div);
-		sb.append("JZXSL="+((data.getWrlb()==null)?"":data.getWrlb())+div);
-		sb.append("HC="+((data.getHc()==null)?"":data.getHc())+div);
-		sb.append("HWZL="+  (data.getHwzl()==null?"": resource.getString(data.getHwzl().getName()))+div);
-		 	
+		sb.append("MAO=" + mao + div);
+
+		sb.append("HZWXX="
+				+ (data.getHzwxx() == null ? "" : resource.getString(data
+						.getHzwxx())) + div);
+		sb.append("DXDJ=" + ((data.getDxdj() == null) ? "" : data.getDxdj())
+				+ div);
+		sb.append("WRLB=" + ((data.getWrlb() == null) ? "" : data.getWrlb())
+				+ div);
+		sb.append("JZXSL=" + ((data.getWrlb() == null) ? "" : data.getWrlb())
+				+ div);
+		sb.append("HC=" + ((data.getHc() == null) ? "" : data.getHc()) + div);
+		sb.append("HWZL="
+				+ (data.getHwzl() == null ? "" : resource.getString(data
+						.getHwzl().getName())) + div);
+
 		String hwxs = data.getHwxs();
 		String hwxs = data.getHwxs();
 		String hwxs1 = "";
 		String hwxs1 = "";
 		if (hwxs != null && hwxs != "") {
 		if (hwxs != null && hwxs != "") {
@@ -2629,34 +2639,149 @@ public class ZysqbpController extends BaseController {
 			}
 			}
 			hwxs1 = hwxs1.substring(0, hwxs1.length() - 1);
 			hwxs1 = hwxs1.substring(0, hwxs1.length() - 1);
 		}
 		}
-		
-		sb.append("HWXS="+hwxs1+div);
-		sb.append("LHXZ="+((data.getLhxz()==null)?"":data.getLhxz())+div);
-		 
-		String zydd = ((data.getZydd()==null)?"":resource.getString(data.getZydd().getName()))+
-				((data.getZyddqybh()==null) ? "" : data.getZyddqybh().getQynbmc());
-		sb.append("ZYDD="+zydd+div);
-		  
-		sb.append("ZYSJQ="+((data.getZysjq()==null)?"":myFmt2.format(data.getZysjq()))+div);
-		sb.append("ZYSJZ="+((data.getZysjz()==null)?"":myFmt2.format(data.getZysjz()))+div);
-		sb.append("AQFFCS="+((data.getAqffcs()==null)?"":data.getAqffcs())+div);
-		sb.append("BGR="+((data.getBgr()==null)?"":data.getBgr())+div);
-		sb.append("LXFS="+((data.getLxfs()==null)?"":data.getLxfs())+div);
-		sb.append("BGSJ="+((data.getBgsj()==null)?"":myFmt2.format(data.getBgsj()))+div);
-		sb.append("BYZD2="+((data.getByzd2()==null)?"":data.getByzd2())+div);
- 
-		//审核意见 
-		sb.append("SHYJ="+audit_op+div);
-		sb.append("SHR="+audit_user+div);
-		sb.append("SHSJ="+audit_date+div);
- 
-	     
-	    try {
-			return  java.net.URLEncoder.encode(sb.toString(),"gb2312");
-		} catch (UnsupportedEncodingException e) { 
+
+		sb.append("HWXS=" + hwxs1 + div);
+		sb.append("LHXZ=" + ((data.getLhxz() == null) ? "" : data.getLhxz())
+				+ div);
+
+		String zydd = ((data.getZydd() == null) ? "" : resource.getString(data
+				.getZydd().getName()))
+				+ ((data.getZyddqybh() == null) ? "" : data.getZyddqybh()
+						.getQynbmc());
+		sb.append("ZYDD=" + zydd + div);
+
+		sb.append("ZYSJQ="
+				+ ((data.getZysjq() == null) ? "" : myFmt2.format(data
+						.getZysjq())) + div);
+		sb.append("ZYSJZ="
+				+ ((data.getZysjz() == null) ? "" : myFmt2.format(data
+						.getZysjz())) + div);
+		sb.append("AQFFCS="
+				+ ((data.getAqffcs() == null) ? "" : data.getAqffcs()) + div);
+		sb.append("BGR=" + ((data.getBgr() == null) ? "" : data.getBgr()) + div);
+		sb.append("LXFS=" + ((data.getLxfs() == null) ? "" : data.getLxfs())
+				+ div);
+		sb.append("BGSJ="
+				+ ((data.getBgsj() == null) ? ""
+						: myFmt2.format(data.getBgsj())) + div);
+		sb.append("BYZD2=" + ((data.getByzd2() == null) ? "" : data.getByzd2())
+				+ div);
+
+		// 审核意见
+		sb.append("SHYJ=" + audit_op + div);
+		sb.append("SHR=" + audit_user + div);
+		sb.append("SHSJ=" + audit_date + div);
+
+		try {
+			return java.net.URLEncoder.encode(sb.toString(), "gb2312");
+		} catch (UnsupportedEncodingException e) {
 			e.printStackTrace();
 			e.printStackTrace();
-		}  
-	     
-	    return "error";
+		}
+
+		return "error";
+	}
+
+	/**
+	 * 初始化海事比对数据
+	 * 
+	 * @param id
+	 * @return
+	 */
+	public BusinessContext doCjhsInit(Long id) {
+		BusinessContext bc = createBusinessContext();
+		CjhsEntity cjhs = cjhsService.findCjhsByGksbbh(id);
+		List<CjhsHwEntity> cjhsHwList = cjhs.getHshwList();
+		List<CjhsHwEntity> list = new ArrayList<CjhsHwEntity>();
+		//货物总重量取和
+		if (cjhsHwList != null && cjhsHwList.size() > 0) {
+			CjhsHwEntity cjhsHw = cjhsHwList.get(0);
+			double zzl=0;
+			for (CjhsHwEntity hw : cjhsHwList) {
+				if (hw.getZqysmczw() != null
+						&& hw.getZqysmczw().trim()
+								.equals(cjhsHw.getZqysmczw().trim())) {
+					zzl = zzl+ hw.getZzl();
+				}
+			}
+			cjhsHw.setZzl(zzl);
+			list.add(cjhsHw);
+		}
+		bc.setResult(cjhs);
+		return bc;
+	}
+
+	/**
+	 * 长江海事船舶申报单列表
+	 * 
+	 * @param id
+	 * @return
+	 */
+	public BusinessContext queryCjhsList(ZysqbpEntity zysqbp,Pageable pageable,  Date ksq,
+			 Date ksz,  Date jsq,  Date jsz,  String zygk,
+			 String cm) {
+		BusinessContext bc = new BusinessContext();
+		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
+		ksq = Utils.getDateFirstTime(ksq);
+		ksz = Utils.getDateLastTime(ksz);
+		jsq = Utils.getDateFirstTime(jsq);
+		jsz = Utils.getDateLastTime(jsz);
+		addNotEmptyModel(filterList, "kszysj", ksq, Operator.GTE);
+		addNotEmptyModel(filterList, "kszysj", ksz, Operator.LTE);
+		addNotEmptyModel(filterList, "jszysj", jsq, Operator.GTE);
+		addNotEmptyModel(filterList, "jszysj", jsz, Operator.LTE);
+		addNotEmptyModel(filterList, "gkzwmc", zygk, Operator.LIKE);
+		addNotEmptyModel(filterList, "zwcm", cm, Operator.LIKE);
+		// 权限过滤
+		Specification<DtywCbsbEntity> spec = SpecificationCreater
+				.searchByPredicateModels(filterList);
+		SinglePageRequest page = new SinglePageRequest(pageable.getPageSize(),
+				pageable.getPageNumber(), "desc", "kszysj");
+		Page<DtywCbsbEntity> cbsbPageList = dtywCbsbService.findAll(spec, page);
+		List<CjhsEntity> cjhsList = new ArrayList<CjhsEntity>();
+		List<CjhsDbEntity> cjhsDbList = cjhsDbService.findByGksbbh(zysqbp
+				.getId());
+		for (DtywCbsbEntity cbsb : cbsbPageList) {
+			CjhsEntity cjhs = cjhsService.changeFromDtywCbsbNoHw(cbsb);
+			if (cjhsDbList != null && cjhsDbList.size() > 0) {
+				CjhsDbEntity Db = cjhsDbList.get(0);
+				if (Db.getHssbbh().equals(cjhs.getSbdbh())) {
+					cjhs.setSfpp("Y");
+				}
+			}
+			cjhsList.add(cjhs);
+		}
+		bc.setAttribute("list", cjhsList);
+		bc.setAttribute("totalCount", 0);
+		if (cbsbPageList != null) {
+			bc.setAttribute("totalCount", cbsbPageList.getTotalElements());
+		}
+		return bc;
 	}
 	}
+
+	/**
+	 * 长江海事货物信息
+	 * 
+	 * @param id
+	 * @return
+	 */
+	public BusinessContext queryCjhsHwList(String hssbbh,ZysqbpEntity zysqbp) {
+		BusinessContext bc = new BusinessContext();
+		bc.setAttribute("list", cjhsService.findCjhsHwListByHssbbh(zysqbp,hssbbh));
+		return bc;
+	}
+	
+	/**
+	 * 保存比对结果
+	 * @param entity 海事货物
+	 * @param gksbbh 港口申报单
+	 */
+	public void saveDb(CjhsHwEntity entity,Long gksbbh){
+		CjhsDbEntity db = new CjhsDbEntity();
+		db.setGksbbh(gksbbh);
+		db.setHssbbh(entity.getSbdbh());
+		db.setBsxh(entity.getBsxh());
+		db.setXh(entity.getXh());
+		cjhsDbService.update(db);
+	}
+
 }
 }

+ 9 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/dao/jyr/BwDao.java

@@ -3,6 +3,7 @@ package com.jtgh.yjpt.dao.jyr;
 import java.util.List;
 import java.util.List;
 
 
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.jpa.repository.Query;
+
 import com.jtgh.yjpt.dao.common.MyRepository;
 import com.jtgh.yjpt.dao.common.MyRepository;
 import com.jtgh.yjpt.entity.jyr.BwEntity;
 import com.jtgh.yjpt.entity.jyr.BwEntity;
 import com.jtgh.yjpt.entity.jyr.JyrEntity;
 import com.jtgh.yjpt.entity.jyr.JyrEntity;
@@ -32,4 +33,12 @@ public interface BwDao extends MyRepository<BwEntity, Long> {
 			"(select ID from T_YJPT_JYRJCXX J where J.SFWHQY<>'N' AND J.RECORD_STATUS<>9 and substr(QYXZ,1,1)='Y' and substr(QYXZ,4,1)='Y' AND J.SZD LIKE ?1% ) ",nativeQuery = true)
 			"(select ID from T_YJPT_JYRJCXX J where J.SFWHQY<>'N' AND J.RECORD_STATUS<>9 and substr(QYXZ,1,1)='Y' and substr(QYXZ,4,1)='Y' AND J.SZD LIKE ?1% ) ",nativeQuery = true)
 	public List<Object[]> GetBW_SYHG_Num_By_SZD(String szd);
 	public List<Object[]> GetBW_SYHG_Num_By_SZD(String szd);
 	
 	
+	
+	/**
+	 *查找海事同步未成功的数据 
+	 */
+	@Query(value="SELECT * from T_YJPT_JYRXX_BW  where cjhstbzt='N'",nativeQuery = true)
+	public List<BwEntity> findCjhsTb();
+	
+	
 }
 }

+ 6 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/dao/jyr/WxhwpmDao.java

@@ -73,4 +73,10 @@ public interface WxhwpmDao extends MyRepository<WxhwpmEntity, Long> {
 			" )",nativeQuery=true)
 			" )",nativeQuery=true)
 	public List<Object[]> Count_Total_LBHXB_BZLB();
 	public List<Object[]> Count_Total_LBHXB_BZLB();
 	
 	
+	/**
+	 *查找海事同步未成功的数据 
+	 */
+	@Query(value="SELECT * from T_YJPT_WXHWPMB  where cjhstbzt='N'",nativeQuery = true)
+	public List<WxhwpmEntity> findCjhsTb();
+	
 }
 }

+ 6 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/dao/zyfzndjy/Gkwxhwzyfzbl_fzbDao.java

@@ -60,4 +60,10 @@ public interface Gkwxhwzyfzbl_fzbDao extends
 	//获得所在危货附证中的危货物品
 	//获得所在危货附证中的危货物品
 	@Query(value="	SELECT DISTINCT(byzd5) from T_YJPT_GKWXHWZYFZBL_FZ where RECORD_STATUS<>9 and szd like ?1% ",nativeQuery=true)
 	@Query(value="	SELECT DISTINCT(byzd5) from T_YJPT_GKWXHWZYFZBL_FZ where RECORD_STATUS<>9 and szd like ?1% ",nativeQuery=true)
 	public List<Object[]> GetWH_By_Szd(String szd);
 	public List<Object[]> GetWH_By_Szd(String szd);
+	
+	/**
+	 *查找海事同步未成功的数据 
+	 */
+	@Query(value="SELECT * from T_YJPT_GKWXHWZYFZBL_FZ  where cjhstbzt='N'",nativeQuery = true)
+	public List<GkwxhwzyfzblFzEntity> findCjhsTb();
 }
 }

+ 6 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/dao/zyfzndjy/GkwxhwzyfzblhhzbDao.java

@@ -56,4 +56,10 @@ public interface GkwxhwzyfzblhhzbDao extends
 	public List<GkwxhwzyfzblhhzEntity> query2(Timestamp jssj);
 	public List<GkwxhwzyfzblhhzEntity> query2(Timestamp jssj);
 	@Query(value="select * from T_YJPT_GKWXHWZYFZBLHHZ where  rownum<=200",nativeQuery=true)
 	@Query(value="select * from T_YJPT_GKWXHWZYFZBLHHZ where  rownum<=200",nativeQuery=true)
 	public List<GkwxhwzyfzblhhzEntity> query3();
 	public List<GkwxhwzyfzblhhzEntity> query3();
+	
+	/**
+	 *查找海事同步未成功的数据 
+	 */
+	@Query(value="SELECT * from T_YJPT_GKWXHWZYFZBLHHZ  where cjhstbzt='N'",nativeQuery = true)
+	public List<GkwxhwzyfzblhhzEntity> findCjhsTb();
 }
 }

+ 6 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/dao/zysqbp/ZysqbpDao.java

@@ -1154,4 +1154,10 @@ public interface ZysqbpDao extends MyRepository<ZysqbpEntity, Long> {
 	@Query(value = "select * from t_yjpt_wxhwgkzysbd b where b.ywcm=?2 and (b.record_status=2 or b.record_status=10) and  (case when b.bgsj >=?1 then b.bgsj - ?1  else ?1-b.bgsj  end)  " 
 	@Query(value = "select * from t_yjpt_wxhwgkzysbd b where b.ywcm=?2 and (b.record_status=2 or b.record_status=10) and  (case when b.bgsj >=?1 then b.bgsj - ?1  else ?1-b.bgsj  end)  " 
 	     +"in (select  min (case when b1.bgsj >= ?1 then  b1.bgsj - ?1  else ?1-b1.bgsj  end  ) a  from t_yjpt_wxhwgkzysbd b1  where b1.ywcm=?2 and (b1.record_status=2 or b1.record_status=10)) ", nativeQuery = true)
 	     +"in (select  min (case when b1.bgsj >= ?1 then  b1.bgsj - ?1  else ?1-b1.bgsj  end  ) a  from t_yjpt_wxhwgkzysbd b1  where b1.ywcm=?2 and (b1.record_status=2 or b1.record_status=10)) ", nativeQuery = true)
 	public List<ZysqbpEntity> getZysqbpListByBgsjAndCm(Date date, String cm);
 	public List<ZysqbpEntity> getZysqbpListByBgsjAndCm(Date date, String cm);
+	
+	/**
+	 *查找海事同步未成功的数据 
+	 */
+	@Query(value="SELECT * from T_YJPT_WXHWGKZYSBD  where cjhstbzt='N'",nativeQuery = true)
+	public List<ZysqbpEntity> findCjhsTb();
 }
 }

+ 11 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/cjhs/CjhsEntity.java

@@ -167,5 +167,16 @@ public class CjhsEntity {
 		this.ssmt = ssmt;
 		this.ssmt = ssmt;
 	}
 	}
 
 
+	/**
+	 * 是否匹配
+	 */
+	private String  sfpp="N";
+	@Transient
+	public String getSfpp() {
+		return sfpp;
+	}
+	public void setSfpp(String sfpp) {
+		this.sfpp = sfpp;
+	}
 
 
 }
 }

+ 18 - 1
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/cjhs/CjhsHwEntity.java

@@ -1,5 +1,7 @@
 package com.jtgh.yjpt.entity.cjhs;
 package com.jtgh.yjpt.entity.cjhs;
 
 
+import javax.persistence.Transient;
+
 
 
 
 
 
 
@@ -29,7 +31,8 @@ public class CjhsHwEntity  {
 	 * 总重量
 	 * 总重量
 	 */
 	 */
 	private double zzl;
 	private double zzl;
-
+	
+	
 	public String getSbdbh() {
 	public String getSbdbh() {
 		return sbdbh;
 		return sbdbh;
 	}
 	}
@@ -72,5 +75,19 @@ public class CjhsHwEntity  {
 	public void setXh(Long xh) {
 	public void setXh(Long xh) {
 		this.xh = xh;
 		this.xh = xh;
 	}
 	}
+	
+	/**
+	 * 是否匹配
+	 */
+	private String  sfpp="N";
+	@Transient
+	public String getSfpp() {
+		return sfpp;
+	}
+	public void setSfpp(String sfpp) {
+		this.sfpp = sfpp;
+	}
+	
+	
 }
 }
 
 

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

@@ -469,8 +469,22 @@ public class BwEntity extends BaseEntity<Long> implements Cloneable {
 
 
 	@Override
 	@Override
 	protected BwEntity clone() throws CloneNotSupportedException {
 	protected BwEntity clone() throws CloneNotSupportedException {
-		// TODO Auto-generated method stub
 		return (BwEntity) super.clone();
 		return (BwEntity) super.clone();
 	}
 	}
+	
+
+
+	/**
+	 * 长江海事同步状态
+	 */
+	private String cjhstbzt;
+	
+	public String getCjhstbzt() {
+		return cjhstbzt;
+	}
+
+	public void setCjhstbzt(String cjhstbzt) {
+		this.cjhstbzt = cjhstbzt;
+	}
 
 
 }
 }

+ 13 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/jyr/WxhwpmEntity.java

@@ -202,5 +202,18 @@ public class WxhwpmEntity extends BaseEntity<Long> implements Cloneable {
 	public void setAqffcs(String aqffcs) {
 	public void setAqffcs(String aqffcs) {
 		this.aqffcs = aqffcs;
 		this.aqffcs = aqffcs;
 	}
 	}
+	
+	/**
+	 * 长江海事同步状态
+	 */
+	private String cjhstbzt;
+	
+	public String getCjhstbzt() {
+		return cjhstbzt;
+	}
+
+	public void setCjhstbzt(String cjhstbzt) {
+		this.cjhstbzt = cjhstbzt;
+	}
 
 
 }
 }

+ 12 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/zyfzndjy/GkwxhwzyfzblFzEntity.java

@@ -192,5 +192,17 @@ public class GkwxhwzyfzblFzEntity extends BaseEntity<Long> {
 		this.jyr = jyr;
 		this.jyr = jyr;
 	}
 	}
 	
 	
+	/**
+	 * 长江海事同步状态
+	 */
+	private String cjhstbzt;
+	
+	public String getCjhstbzt() {
+		return cjhstbzt;
+	}
+
+	public void setCjhstbzt(String cjhstbzt) {
+		this.cjhstbzt = cjhstbzt;
+	}
 	
 	
 }
 }

+ 13 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/zyfzndjy/GkwxhwzyfzblhhzEntity.java

@@ -404,4 +404,17 @@ public class GkwxhwzyfzblhhzEntity extends BaseEntity<Long> {
 		this.qynbbh = qynbbh;
 		this.qynbbh = qynbbh;
 	}
 	}
 
 
+	/**
+	 * 长江海事同步状态
+	 */
+	private String cjhstbzt;
+	
+	public String getCjhstbzt() {
+		return cjhstbzt;
+	}
+
+	public void setCjhstbzt(String cjhstbzt) {
+		this.cjhstbzt = cjhstbzt;
+	}
+	
 }
 }

+ 12 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/entity/zysqbp/ZysqbpEntity.java

@@ -844,4 +844,16 @@ public class ZysqbpEntity extends BaseEntity<Long> {
 		this.zylx = zylx;
 		this.zylx = zylx;
 	}
 	}
 	
 	
+	/**
+	 * 长江海事同步状态
+	 */
+	private String cjhstbzt;
+	
+	public String getCjhstbzt() {
+		return cjhstbzt;
+	}
+
+	public void setCjhstbzt(String cjhstbzt) {
+		this.cjhstbzt = cjhstbzt;
+	}
 }
 }

+ 29 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/cjhs/CjhsDbService.java

@@ -0,0 +1,29 @@
+package com.jtgh.yjpt.service.cjhs;
+
+import java.util.List;
+
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.domain.Specification;
+
+import com.jtgh.yjpt.entity.cjhs.CjhsDbEntity;
+
+
+/**
+ * 海事比对服务
+ * 
+ * @author 刘福亮
+ * 
+ */
+public interface CjhsDbService {
+
+	public Page<CjhsDbEntity> findAll(Specification<CjhsDbEntity> spec,
+			Pageable pageable);
+	
+	public List<CjhsDbEntity> findByGksbbh(Long gksbbh);
+	
+	public void save(CjhsDbEntity entity);
+	
+	public void update(CjhsDbEntity entity);
+
+}

+ 22 - 13
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/cjhs/CjhsService.java

@@ -2,29 +2,38 @@ package com.jtgh.yjpt.service.cjhs;
 
 
 import java.util.List;
 import java.util.List;
 
 
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.jpa.domain.Specification;
-
-import com.jtgh.yjpt.entity.cjhs.CjhsDbEntity;
+import com.jtgh.cjhs.entity.DtywCbsbEntity;
 import com.jtgh.yjpt.entity.cjhs.CjhsEntity;
 import com.jtgh.yjpt.entity.cjhs.CjhsEntity;
+import com.jtgh.yjpt.entity.cjhs.CjhsHwEntity;
+import com.jtgh.yjpt.entity.jyr.BwEntity;
+import com.jtgh.yjpt.entity.jyr.WxhwpmEntity;
+import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
+import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzEntity;
+import com.jtgh.yjpt.entity.zysqbp.ZysqbpEntity;
 
 
 
 
 /**
 /**
  * 海事比对服务
  * 海事比对服务
  * 
  * 
- * @author 袁晓冬
+ * @author 刘福亮
  * 
  * 
  */
  */
 public interface CjhsService {
 public interface CjhsService {
 
 
-	Page<CjhsDbEntity> findAll(Specification<CjhsDbEntity> spec,
-			Pageable pageable);
-	
-	public List<CjhsDbEntity> findByGksbbh(Long gksbbh);
-
 	public  CjhsEntity findCjhsByGksbbh(Long gksbbh);
 	public  CjhsEntity findCjhsByGksbbh(Long gksbbh);
 	
 	
-	void save(CjhsDbEntity entity);
-
+	public CjhsEntity changeFromDtywCbsbNoHw(DtywCbsbEntity cbsb);
+	
+	public List<CjhsHwEntity> findCjhsHwListByHssbbh(ZysqbpEntity zysqbp,String hssbbh);
+	
+	public void saveData(BwEntity entity);
+	
+	public void saveData(GkwxhwzyfzblhhzEntity entity);
+	
+	public void saveData(GkwxhwzyfzblFzEntity entity);
+	
+	public void saveData(WxhwpmEntity entity);
+	
+	public void saveData(ZysqbpEntity entity);
+	
 }
 }

+ 41 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/cjhs/GkToCjhsService.java

@@ -0,0 +1,41 @@
+package com.jtgh.yjpt.service.cjhs;
+
+import java.util.List;
+
+import com.jtgh.yjpt.entity.jyr.BwEntity;
+import com.jtgh.yjpt.entity.jyr.WxhwpmEntity;
+import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
+import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzEntity;
+import com.jtgh.yjpt.entity.zysqbp.ZysqbpEntity;
+
+
+/**
+ * 同步港口数据
+ * 
+ * @author 刘福亮
+ * 
+ */
+public interface GkToCjhsService {
+
+	public void saveData(BwEntity entity);
+	
+	public void saveData(GkwxhwzyfzblhhzEntity entity);
+	
+	public void saveData(GkwxhwzyfzblFzEntity entity);
+	
+	public void saveData(WxhwpmEntity entity);
+	
+	public void saveData(ZysqbpEntity entity);
+
+	public void saveZysqDatas(List<ZysqbpEntity> list);
+
+	public void saveWxpDatas(List<WxhwpmEntity> list);
+
+	public void saveBwDatas(List<BwEntity> list);
+
+	public void saveFzDatas(List<GkwxhwzyfzblhhzEntity> list);
+
+	public void saveFzxxDatas(List<GkwxhwzyfzblFzEntity> list);
+
+	
+}

+ 66 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/cjhs/CjhsDbServiceImpl.java

@@ -0,0 +1,66 @@
+package com.jtgh.yjpt.service.impl.cjhs;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.domain.Specification;
+import org.springframework.stereotype.Service;
+
+import com.jtgh.yjpt.entity.cjhs.CjhsDbEntity;
+import com.jtgh.yjpt.service.cjhs.CjhsDbService;
+import com.jtgh.yjpt.service.common.QueryService;
+
+@Service
+public class CjhsDbServiceImpl implements CjhsDbService {
+	@Autowired
+	private QueryService query;
+	@Autowired
+	@PersistenceContext(unitName = "entityManagerFactory")
+	private EntityManager entityManager;
+
+	@Override
+	public Page<CjhsDbEntity> findAll(Specification<CjhsDbEntity> spec,
+			Pageable pageable) {
+		try {
+			return query.findAll(spec, pageable, CjhsDbEntity.class);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return null;
+		}
+	}
+
+	@Override
+	public void save(CjhsDbEntity entity) {
+		entityManager.persist(entity);
+	}
+	
+	@Override
+	public void update(CjhsDbEntity entity) {
+		entityManager.merge(entity);
+		entityManager.flush();
+	}
+
+	@Override
+	public List<CjhsDbEntity> findByGksbbh(Long gksbbh) {
+		try {
+			Map<String, Object> params = new HashMap<String, Object>();
+			if(gksbbh==null||gksbbh.equals("")){
+				return null;
+			}
+			params.put("gksbbh", gksbbh);
+			return query.nativeQuery(
+					" SELECT * FROM T_CJHS_GKBD WHERE GKSBBH=:gksbbh",
+					CjhsDbEntity.class, params);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return null;
+		}
+	}
+}

+ 337 - 55
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/cjhs/CjhsServiceImpl.java

@@ -1,71 +1,40 @@
 package com.jtgh.yjpt.service.impl.cjhs;
 package com.jtgh.yjpt.service.impl.cjhs;
 
 
-import java.util.HashMap;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
-import java.util.Map;
-
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
+import com.jtgh.cjhs.entity.DtxtBwEntity;
 import com.jtgh.cjhs.entity.DtywCbsbEntity;
 import com.jtgh.cjhs.entity.DtywCbsbEntity;
+import com.jtgh.cjhs.entity.DtywCbsbgtHwEntity;
+import com.jtgh.cjhs.entity.DtywCbsbszHwEntity;
+import com.jtgh.cjhs.entity.DtywCbsbytHwEntity;
+import com.jtgh.cjhs.service.DtxtBwService;
 import com.jtgh.cjhs.service.DtywCbsbService;
 import com.jtgh.cjhs.service.DtywCbsbService;
 import com.jtgh.yjpt.entity.cjhs.CjhsDbEntity;
 import com.jtgh.yjpt.entity.cjhs.CjhsDbEntity;
 import com.jtgh.yjpt.entity.cjhs.CjhsEntity;
 import com.jtgh.yjpt.entity.cjhs.CjhsEntity;
+import com.jtgh.yjpt.entity.cjhs.CjhsHwEntity;
+import com.jtgh.yjpt.entity.jyr.BwEntity;
+import com.jtgh.yjpt.entity.jyr.WxhwpmEntity;
+import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
+import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzEntity;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpEntity;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpEntity;
+import com.jtgh.yjpt.service.cjhs.CjhsDbService;
 import com.jtgh.yjpt.service.cjhs.CjhsService;
 import com.jtgh.yjpt.service.cjhs.CjhsService;
-import com.jtgh.yjpt.service.common.QueryService;
 import com.jtgh.yjpt.service.zysqbp.ZysqbpService;
 import com.jtgh.yjpt.service.zysqbp.ZysqbpService;
 
 
 @Service
 @Service
-public class CjhsServiceImpl implements CjhsService {
-	@Autowired
-	private QueryService query;
-	@Autowired
-	@PersistenceContext(unitName = "entityManagerFactory")
-	private EntityManager entityManager;
-
+public class CjhsServiceImpl  implements CjhsService {
 	@Autowired
 	@Autowired
 	private ZysqbpService zysqbpService;
 	private ZysqbpService zysqbpService;
 	@Autowired
 	@Autowired
-	private CjhsService cjhsService;
-	@Autowired
 	private DtywCbsbService dtywCbsbService;
 	private DtywCbsbService dtywCbsbService;
-
-	@Override
-	public Page<CjhsDbEntity> findAll(Specification<CjhsDbEntity> spec,
-			Pageable pageable) {
-		try {
-			return query.findAll(spec, pageable, CjhsDbEntity.class);
-		} catch (Exception e) {
-			e.printStackTrace();
-			return null;
-		}
-	}
-
-	@Override
-	public void save(CjhsDbEntity entity) {
-		entityManager.persist(entity);
-	}
-
-	@Override
-	public List<CjhsDbEntity> findByGksbbh(Long gksbbh) {
-		try {
-			Map<String, Object> params = new HashMap<String, Object>();
-			params.put("gksbbh", gksbbh);
-			return query.nativeQuery(
-					"SELECT * FROM T_CJHS_GKBD WHERE GKSBBH=#{gksbbh}",
-					CjhsDbEntity.class, params);
-		} catch (Exception e) {
-			e.printStackTrace();
-			return null;
-		}
-	}
+	@Autowired
+	private DtxtBwService dtxtBwService;
+	@Autowired
+	private CjhsDbService cjhsDbService;
 
 
 	/**
 	/**
 	 * 获取海事申报记录,不论结果都返回
 	 * 获取海事申报记录,不论结果都返回
@@ -76,7 +45,7 @@ public class CjhsServiceImpl implements CjhsService {
 		ZysqbpEntity vo = zysqbpService.findOne(gksbbh);
 		ZysqbpEntity vo = zysqbpService.findOne(gksbbh);
 		// 获取比对数据
 		// 获取比对数据
 		try {
 		try {
-			List<CjhsDbEntity> cjhsdbList = cjhsService.findByGksbbh(gksbbh);
+			List<CjhsDbEntity> cjhsdbList = cjhsDbService.findByGksbbh(gksbbh);
 			if (cjhsdbList == null || cjhsdbList.size() <= 0) {
 			if (cjhsdbList == null || cjhsdbList.size() <= 0) {
 				List<DtywCbsbEntity> dtywCbsbEntityList = dtywCbsbService
 				List<DtywCbsbEntity> dtywCbsbEntityList = dtywCbsbService
 						.findByZwcm(vo.getCm());
 						.findByZwcm(vo.getCm());
@@ -84,9 +53,19 @@ public class CjhsServiceImpl implements CjhsService {
 					DtywCbsbEntity dtywCbsbEntity = dtywCbsbEntityList.get(0);
 					DtywCbsbEntity dtywCbsbEntity = dtywCbsbEntityList.get(0);
 					cjhs = changeFromDtywCbsb(dtywCbsbEntity);
 					cjhs = changeFromDtywCbsb(dtywCbsbEntity);
 				}
 				}
+				if (cjhs != null && cjhs.getHshwList() != null) {
+					CjhsHwEntity cjhsHw = cjhs.getHshwList().get(0);
+					CjhsDbEntity db = new CjhsDbEntity();
+					db.setGksbbh(gksbbh);
+					db.setHssbbh(cjhsHw.getSbdbh());
+					db.setXh(cjhsHw.getXh());
+					db.setBsxh(cjhsHw.getBsxh());
+					cjhsDbService.save(db);
+				}
 			} else {
 			} else {
 				CjhsDbEntity cjhsdbEntity = cjhsdbList.get(0);
 				CjhsDbEntity cjhsdbEntity = cjhsdbList.get(0);
-				DtywCbsbEntity dtywCbsbEntity =dtywCbsbService.findBySbdbh(cjhsdbEntity.getHssbbh()); 
+				DtywCbsbEntity dtywCbsbEntity = dtywCbsbService
+						.findBySbdbh(cjhsdbEntity.getHssbbh());
 				cjhs = changeFromDtywCbsb(dtywCbsbEntity);
 				cjhs = changeFromDtywCbsb(dtywCbsbEntity);
 			}
 			}
 		} catch (Exception e) {
 		} catch (Exception e) {
@@ -94,10 +73,102 @@ public class CjhsServiceImpl implements CjhsService {
 		}
 		}
 		return cjhs;
 		return cjhs;
 	}
 	}
-	
-	public CjhsEntity changeFromDtywCbsb(DtywCbsbEntity entity){
+
+	/**
+	 * 从海事实体转成本地实体
+	 * 
+	 * @param entity
+	 * @return
+	 */
+	public CjhsEntity changeFromDtywCbsb(DtywCbsbEntity entity) {
+		// 转换船舶申报
+		CjhsEntity cjhs = changeFromDtywCbsbNoHw(entity);
+		List<CjhsHwEntity> cjhsHwList = findCjhsHwListByCbsb(entity);
+		if (cjhsHwList != null && cjhsHwList.size() > 0) {
+			cjhs.setHshwList(cjhsHwList);
+		}
+
+		return cjhs;
+	}
+
+	/**
+	 * 根据船舶申报货物货物信息
+	 * 
+	 * @param entity
+	 * @return
+	 */
+	public List<CjhsHwEntity> findCjhsHwListByCbsb(DtywCbsbEntity entity) {
+		List<CjhsHwEntity> cjhsHwList = null;
+		if (entity.getSbdlb().trim().equals("CS")) {
+			List<DtywCbsbszHwEntity> cbsbszList = dtywCbsbService
+					.findCbsbszHwBySbdbh(entity.getId());
+			cjhsHwList = changeFromCbsbszHw(cbsbszList);
+		} else if (entity.getSbdlb().trim().equals("CB")) {
+			List<DtywCbsbgtHwEntity> cbsbgtList = dtywCbsbService
+					.findCbsbgtHwBySbdbh(entity.getId());
+			cjhsHwList = changeFromCbsbgtHw(cbsbgtList);
+		} else if (entity.getSbdlb().trim().equals("CY")) {
+			List<DtywCbsbytHwEntity> cbsbytList = dtywCbsbService
+					.findCbsbytHwBySbdbh(entity.getId());
+			cjhsHwList = changeFromCbsbytHw(cbsbytList);
+		}
+		return cjhsHwList;
+	}
+
+	/**
+	 * 根据船舶申报货物货物信息
+	 * 
+	 * @param entity
+	 * @return
+	 */
+	public List<CjhsHwEntity> findCjhsHwListByCbsb(DtywCbsbEntity entity,
+			CjhsDbEntity db) {
+		List<CjhsHwEntity> cjhsHwList = null;
+		if (entity.getSbdlb().trim().equals("CS")) {
+			List<DtywCbsbszHwEntity> cbsbszList = dtywCbsbService
+					.findCbsbszHwBySbdbh(entity.getId());
+			List<DtywCbsbszHwEntity> cbsbszList2 = dtywCbsbService
+					.findCbsbszHwBySbdbhAndBsxhAndXh(db.getHssbbh(),
+							db.getBsxh(), db.getXh());
+			DtywCbsbszHwEntity cbsbsz = null;
+			if (cbsbszList2 != null && cbsbszList2.size() > 0) {
+				cbsbsz = cbsbszList2.get(0);
+			}
+			cjhsHwList = changeFromCbsbszHw(cbsbszList, cbsbsz);
+		} else if (entity.getSbdlb().trim().equals("CB")) {
+			List<DtywCbsbgtHwEntity> cbsbgtList = dtywCbsbService
+					.findCbsbgtHwBySbdbh(entity.getId());
+			List<DtywCbsbgtHwEntity> cbsbgtList2 = dtywCbsbService
+					.findCbsbgtHwBySbdbhAndBsxhAndXh(db.getHssbbh(),
+							db.getBsxh(), db.getXh());
+			DtywCbsbgtHwEntity cbsbgt = null;
+			if (cbsbgtList2 != null && cbsbgtList2.size() > 0) {
+				cbsbgt = cbsbgtList2.get(0);
+			}
+			cjhsHwList = changeFromCbsbgtHw(cbsbgtList, cbsbgt);
+		} else if (entity.getSbdlb().trim().equals("CY")) {
+			List<DtywCbsbytHwEntity> cbsbytList = dtywCbsbService
+					.findCbsbytHwBySbdbh(entity.getId());
+			List<DtywCbsbytHwEntity> cbsbytList2 = dtywCbsbService
+					.findCbsbytHwBySbdbhAndBsxhAndXh(db.getHssbbh(),
+							db.getBsxh(), db.getXh());
+			DtywCbsbytHwEntity cbsbyt = null;
+			if (cbsbytList2 != null && cbsbytList2.size() > 0) {
+				cbsbyt = cbsbytList2.get(0);
+			}
+			cjhsHwList = changeFromCbsbytHw(cbsbytList, cbsbyt);
+		}
+		return cjhsHwList;
+	}
+
+	/**
+	 * 从海事实体转成本地实体(申报不包含货物)
+	 * 
+	 * @param entity
+	 * @return
+	 */
+	public CjhsEntity changeFromDtywCbsbNoHw(DtywCbsbEntity entity) {
 		CjhsEntity cjhs = new CjhsEntity();
 		CjhsEntity cjhs = new CjhsEntity();
-		cjhs.setBwmc(bwmc);
 		cjhs.setBwdm(entity.getBwdm());
 		cjhs.setBwdm(entity.getBwdm());
 		cjhs.setCbmc(entity.getZwcm());
 		cjhs.setCbmc(entity.getZwcm());
 		cjhs.setHc(entity.getHc());
 		cjhs.setHc(entity.getHc());
@@ -106,10 +177,221 @@ public class CjhsServiceImpl implements CjhsService {
 		cjhs.setKszysj(entity.getKszysj());
 		cjhs.setKszysj(entity.getKszysj());
 		cjhs.setLzbz(entity.getLzbz());
 		cjhs.setLzbz(entity.getLzbz());
 		cjhs.setNwmbz(entity.getNwmbz());
 		cjhs.setNwmbz(entity.getNwmbz());
-		cjhs.setSbdbh(entity.getSbdbh());
-		cjhs.setSsmt(ssmt);
+		cjhs.setSbdbh(entity.getId());
 		cjhs.setZygkmc(entity.getZygkmc());
 		cjhs.setZygkmc(entity.getZygkmc());
+
+		// 获取泊位信息
+		DtxtBwEntity bw = dtxtBwService.findByBwdm(entity.getBwdm().trim());
+		if (bw != null) {
+			cjhs.setBwmc(bw.getBwmc());
+			cjhs.setSsmt(bw.getSsmt());
+		}
 		return cjhs;
 		return cjhs;
 	}
 	}
 
 
+	/**
+	 * 根据散装转换
+	 * 
+	 * @param list
+	 * @return
+	 */
+	public List<CjhsHwEntity> changeFromCbsbszHw(List<DtywCbsbszHwEntity> list) {
+		List<CjhsHwEntity> cjhsHwList = new ArrayList<CjhsHwEntity>();
+		for (DtywCbsbszHwEntity entity : list) {
+			CjhsHwEntity cjhs = new CjhsHwEntity();
+			cjhs.setSbdbh(entity.getSbdbh());
+			cjhs.setBsxh(entity.getBsxh());
+			cjhs.setWgbh(entity.getWgbh());
+			cjhs.setXh(entity.getXh());
+			cjhs.setZqysmczw(entity.getZqysmczw());
+			cjhs.setZzl(entity.getZzl());
+			cjhsHwList.add(cjhs);
+		}
+		return cjhsHwList;
+	}
+
+	/**
+	 * 根据散装转换
+	 * 
+	 * @param list
+	 * @return
+	 */
+	public List<CjhsHwEntity> changeFromCbsbgtHw(List<DtywCbsbgtHwEntity> list) {
+		List<CjhsHwEntity> cjhsHwList = new ArrayList<CjhsHwEntity>();
+		for (DtywCbsbgtHwEntity entity : list) {
+			CjhsHwEntity cjhs = new CjhsHwEntity();
+			cjhs.setSbdbh(entity.getSbdbh());
+			cjhs.setBsxh(entity.getBsxh());
+			cjhs.setWgbh(entity.getWgbh());
+			cjhs.setXh(entity.getXh());
+			cjhs.setZqysmczw(entity.getZqysmczw());
+			cjhs.setZzl(entity.getZzl());
+			cjhsHwList.add(cjhs);
+		}
+		return cjhsHwList;
+	}
+
+	/**
+	 * 根据散装转换
+	 * 
+	 * @param list
+	 * @return
+	 */
+	public List<CjhsHwEntity> changeFromCbsbytHw(List<DtywCbsbytHwEntity> list) {
+		List<CjhsHwEntity> cjhsHwList = new ArrayList<CjhsHwEntity>();
+		for (DtywCbsbytHwEntity entity : list) {
+			CjhsHwEntity cjhs = new CjhsHwEntity();
+			cjhs.setSbdbh(entity.getSbdbh());
+			cjhs.setBsxh(entity.getBsxh());
+			cjhs.setWgbh(entity.getWgbh());
+			cjhs.setXh(entity.getXh());
+			cjhs.setZqysmczw(entity.getZqysmczw());
+			cjhs.setZzl(entity.getSl());
+			cjhsHwList.add(cjhs);
+		}
+		return cjhsHwList;
+	}
+
+	/**
+	 * 根据散装转换
+	 * 
+	 * @param list
+	 * @return
+	 */
+	public List<CjhsHwEntity> changeFromCbsbszHw(List<DtywCbsbszHwEntity> list,
+			DtywCbsbszHwEntity hw) {
+		List<CjhsHwEntity> cjhsHwList = new ArrayList<CjhsHwEntity>();
+		for (DtywCbsbszHwEntity entity : list) {
+			CjhsHwEntity cjhs = new CjhsHwEntity();
+			cjhs.setSbdbh(entity.getSbdbh());
+			cjhs.setBsxh(entity.getBsxh());
+			cjhs.setWgbh(entity.getWgbh());
+			cjhs.setXh(entity.getXh());
+			cjhs.setZqysmczw(entity.getZqysmczw());
+			cjhs.setZzl(entity.getZzl());
+			if (hw != null && hw.getSbdbh().equals(entity.getSbdbh())
+					&& hw.getZqysmczw().equals(entity.getZqysmczw())) {
+				cjhs.setSfpp("Y");
+			}
+			cjhsHwList.add(cjhs);
+		}
+		return cjhsHwList;
+	}
+
+	/**
+	 * 根据散装转换
+	 * 
+	 * @param list
+	 * @return
+	 */
+	public List<CjhsHwEntity> changeFromCbsbgtHw(List<DtywCbsbgtHwEntity> list,
+			DtywCbsbgtHwEntity hw) {
+		List<CjhsHwEntity> cjhsHwList = new ArrayList<CjhsHwEntity>();
+		for (DtywCbsbgtHwEntity entity : list) {
+			CjhsHwEntity cjhs = new CjhsHwEntity();
+			cjhs.setSbdbh(entity.getSbdbh());
+			cjhs.setBsxh(entity.getBsxh());
+			cjhs.setWgbh(entity.getWgbh());
+			cjhs.setXh(entity.getXh());
+			cjhs.setZqysmczw(entity.getZqysmczw());
+			cjhs.setZzl(entity.getZzl());
+			if (hw != null && hw.getSbdbh().equals(entity.getSbdbh())
+					&& hw.getZqysmczw().equals(entity.getZqysmczw())) {
+				cjhs.setSfpp("Y");
+			}
+			cjhsHwList.add(cjhs);
+		}
+		return cjhsHwList;
+	}
+
+	/**
+	 * 根据散装转换
+	 * 
+	 * @param list
+	 * @return
+	 */
+	public List<CjhsHwEntity> changeFromCbsbytHw(List<DtywCbsbytHwEntity> list,
+			DtywCbsbytHwEntity hw) {
+		List<CjhsHwEntity> cjhsHwList = new ArrayList<CjhsHwEntity>();
+		for (DtywCbsbytHwEntity entity : list) {
+			CjhsHwEntity cjhs = new CjhsHwEntity();
+			cjhs.setSbdbh(entity.getSbdbh());
+			cjhs.setBsxh(entity.getBsxh());
+			cjhs.setWgbh(entity.getWgbh());
+			cjhs.setXh(entity.getXh());
+			cjhs.setZqysmczw(entity.getZqysmczw());
+			cjhs.setZzl(entity.getSl());
+			if (hw != null && hw.getSbdbh().equals(entity.getSbdbh())
+					&& hw.getZqysmczw().equals(entity.getZqysmczw())) {
+				cjhs.setSfpp("Y");
+			}
+			cjhsHwList.add(cjhs);
+		}
+		return cjhsHwList;
+	}
+
+
+	/**
+	 * 获取长江海事货物信息
+	 */
+	@Override
+	public List<CjhsHwEntity> findCjhsHwListByHssbbh(ZysqbpEntity zysqbp,
+			String hssbbh) {
+		DtywCbsbEntity dtywCbsbEntity = dtywCbsbService.findBySbdbh(hssbbh);
+		List<CjhsDbEntity> cjhsDbList = cjhsDbService.findByGksbbh(zysqbp
+				.getId());
+		CjhsDbEntity db = null;
+		if (cjhsDbList != null && cjhsDbList.size() > 0) {
+			db = cjhsDbList.get(0);
+		}
+
+		List<CjhsHwEntity> hwList = findCjhsHwListByCbsb(dtywCbsbEntity, db);
+
+		return hwList;
+	}
+
+	/**
+	 *保存泊位
+	 */
+	@Override
+	public void saveData(BwEntity entity) {
+		
+		
+	}
+
+	/**
+	 * 保存附证信息
+	 */
+	@Override
+	public void saveData(GkwxhwzyfzblhhzEntity entity) {
+		
+		
+	}
+
+	/**
+	 * 保存附证申请信息
+	 */
+	@Override
+	public void saveData(GkwxhwzyfzblFzEntity entity) {
+		
+		
+	}
+
+	/**
+	 * 保存危险品信息
+	 */
+	@Override
+	public void saveData(WxhwpmEntity entity) {
+		
+		
+	}
+
+	/**
+	 * 保存作业申报信息
+	 */
+	@Override
+	public void saveData(ZysqbpEntity entity) {
+		
+		
+	}
 }
 }

+ 633 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/cjhs/GkToCjhsServiceImpl.java

@@ -0,0 +1,633 @@
+package com.jtgh.yjpt.service.impl.cjhs;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.jtgh.cjhs.entity.YjptBwEntity;
+import com.jtgh.cjhs.entity.YjptGkwxhwzyfzblFzEntity;
+import com.jtgh.cjhs.entity.YjptGkwxhwzyfzblhhzEntity;
+import com.jtgh.cjhs.entity.YjptWxhwpmEntity;
+import com.jtgh.cjhs.entity.YjptZysqbpEntity;
+import com.jtgh.cjhs.service.YjptBwService;
+import com.jtgh.cjhs.service.YjptGkwxhwzyfzblFzService;
+import com.jtgh.cjhs.service.YjptGkwxhwzyfzblhhzService;
+import com.jtgh.cjhs.service.YjptWxhwpmService;
+import com.jtgh.cjhs.service.YjptZysqbpService;
+import com.jtgh.yjpt.entity.common.CodeEntity;
+import com.jtgh.yjpt.entity.jyr.BwEntity;
+import com.jtgh.yjpt.entity.jyr.WxhwpmEntity;
+import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
+import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzEntity;
+import com.jtgh.yjpt.entity.zysqbp.ZysqbpEntity;
+import com.jtgh.yjpt.service.cjhs.GkToCjhsService;
+import com.jtgh.yjpt.service.common.CodeService;
+import com.jtgh.yjpt.service.jyr.BwService;
+import com.jtgh.yjpt.service.sys.WxhwpmService;
+import com.jtgh.yjpt.service.zyfzndjy.GkwxhwzyfzService;
+import com.jtgh.yjpt.service.zyfzndjy.GkwxhwzyfzblhhzService;
+import com.jtgh.yjpt.service.zysqbp.ZysqbpService;
+
+@Service
+public class GkToCjhsServiceImpl implements GkToCjhsService {
+	@Autowired
+	private YjptBwService yjptBwService;
+	@Autowired
+	private YjptGkwxhwzyfzblhhzService yjptGkwxhwzyfzblhhzService;
+	@Autowired
+	private YjptGkwxhwzyfzblFzService yjptGkwxhwzyfzblFzService;
+	@Autowired
+	private YjptWxhwpmService yjptWxhwpmService;
+	@Autowired
+	private YjptZysqbpService yjptZysqbpService;
+	@Autowired
+	private BwService bwService;
+	@Autowired
+	private GkwxhwzyfzblhhzService gkwxhwzyfzblhhzService;
+	@Autowired
+	private GkwxhwzyfzService gkwxhwzyfzblFzService;
+	@Autowired
+	private WxhwpmService wxhwpmService;
+	@Autowired
+	private ZysqbpService zysqbpService;
+	@Autowired
+	private CodeService codeService;
+
+	/**
+	 * 保存泊位
+	 */
+	@Override
+	public void saveData(BwEntity entity) {
+		entity = bwService.findOne(entity.getId());
+		try {
+			YjptBwEntity cjhs = changeToCjhs(entity);
+			yjptBwService.save(cjhs);
+			entity.setCjhstbzt("Y");
+			bwService.save(entity);
+		} catch (Exception e) {
+			entity.setCjhstbzt("N");
+			bwService.save(entity);
+			e.printStackTrace();
+		}
+		return;
+	}
+
+	/**
+	 * 保存附证申请信息
+	 */
+	@Override
+	public void saveData(GkwxhwzyfzblhhzEntity entity) {
+		entity = gkwxhwzyfzblhhzService.findOne(entity.getId());
+		try {
+			YjptGkwxhwzyfzblhhzEntity cjhs = changeToCjhs(entity);
+			yjptGkwxhwzyfzblhhzService.save(cjhs);
+			entity.setCjhstbzt("Y");
+			gkwxhwzyfzblhhzService.save(entity);
+		} catch (Exception e) {
+			entity.setCjhstbzt("N");
+			gkwxhwzyfzblhhzService.save(entity);
+			e.printStackTrace();
+		}
+		return;
+	}
+
+	/**
+	 * 保存附证信息
+	 */
+	@Override
+	public void saveData(GkwxhwzyfzblFzEntity entity) {
+		entity = gkwxhwzyfzblFzService.findOne(entity.getId());
+		try {
+			YjptGkwxhwzyfzblFzEntity cjhs = changeToCjhs(entity);
+			yjptGkwxhwzyfzblFzService.save(cjhs);
+			entity.setCjhstbzt("Y");
+			gkwxhwzyfzblFzService.save(entity);
+		} catch (Exception e) {
+			entity.setCjhstbzt("N");
+			gkwxhwzyfzblFzService.save(entity);
+			e.printStackTrace();
+		}
+		return;
+	}
+
+	/**
+	 * 保存危险品信息
+	 */
+	@Override
+	public void saveData(WxhwpmEntity entity) {
+		entity = wxhwpmService.findOne(entity.getId());
+		try {
+			YjptWxhwpmEntity cjhs = changeToCjhs(entity);
+			yjptWxhwpmService.save(cjhs);
+			entity.setCjhstbzt("Y");
+			wxhwpmService.save(entity);
+		} catch (Exception e) {
+			entity.setCjhstbzt("N");
+			wxhwpmService.save(entity);
+			e.printStackTrace();
+		}
+		return;
+	}
+
+	/**
+	 * 保存作业申报信息
+	 */
+	@Override
+	public void saveData(ZysqbpEntity entity) {
+		entity = zysqbpService.findOne(entity.getId());
+		try {
+			YjptZysqbpEntity cjhs = changeToCjhs(entity);
+			yjptZysqbpService.save(cjhs);
+			entity.setCjhstbzt("Y");
+			zysqbpService.save(entity);
+		} catch (Exception e) {
+			entity.setCjhstbzt("N");
+			zysqbpService.save(entity);
+			e.printStackTrace();
+		}
+		return;
+	}
+
+	/**
+	 * 保存泊位
+	 */
+	@Override
+	public void saveBwDatas(List<BwEntity> list) {
+		for (BwEntity entity : list) {
+			saveData(entity);
+		}
+		return;
+	}
+
+	/**
+	 * 保存附证申请信息
+	 */
+	@Override
+	public void saveFzDatas(List<GkwxhwzyfzblhhzEntity> list) {
+		for (GkwxhwzyfzblhhzEntity entity : list) {
+			saveData(entity);
+		}
+		return;
+	}
+
+	/**
+	 * 保存附证信息
+	 */
+	@Override
+	public void saveFzxxDatas(List<GkwxhwzyfzblFzEntity> list) {
+		for (GkwxhwzyfzblFzEntity entity : list) {
+			saveData(entity);
+		}
+		return;
+	}
+
+	/**
+	 * 保存危险品信息
+	 */
+	@Override
+	public void saveWxpDatas(List<WxhwpmEntity> list) {
+		for (WxhwpmEntity entity : list) {
+			saveData(entity);
+		}
+		return;
+	}
+
+	/**
+	 * 保存作业申报信息
+	 */
+	@Override
+	public void saveZysqDatas(List<ZysqbpEntity> list) {
+		for (ZysqbpEntity entity : list) {
+			saveData(entity);
+		}
+		return;
+	}
+
+	/**
+	 * 泊位实体 转换
+	 * 
+	 * @param entity
+	 * @return
+	 */
+	public YjptBwEntity changeToCjhs(BwEntity entity) {
+		YjptBwEntity cjhs = new YjptBwEntity();
+
+		cjhs.setId(entity.getId().toString());
+		if (entity.getAddUser() != null) {
+			cjhs.setAddUser(entity.getAddUser().getName());
+		}
+		cjhs.setAddDate(entity.getAddDate());
+		if (entity.getUpdateUser() != null) {
+			cjhs.setUpdateUser(entity.getUpdateUser().getName());
+		}
+		cjhs.setUpdateDate(entity.getUpdateDate());
+		cjhs.setRecordStatus(entity.getRecordStatus());
+
+		cjhs.setBwcd(entity.getBwcd());
+		cjhs.setBwmc(entity.getBwmc());
+		if (entity.getBwsx() != null) {
+			cjhs.setBwsx(entity.getBwsx().getBz());
+		}
+		if (entity.getBwszsx() != null) {
+			cjhs.setBwszsx(entity.getBwszsx().getBz());
+		}
+
+		cjhs.setBwyt(entity.getBwyt());
+		if (entity.getFwlx() != null) {
+			cjhs.setFwlx(entity.getFwlx().getBz());
+		}
+		cjhs.setHckpnl(entity.getHckpnl());
+		cjhs.setJd(entity.getJd());
+		if (entity.getJgxs() != null) {
+			cjhs.setJgxs(entity.getJgxs().getBz());
+		}
+		cjhs.setJgysnf(entity.getJgysnf());
+		if (entity.getMtmc() != null) {
+			cjhs.setMtmc(entity.getMtmc().getMtmc());
+		}
+		cjhs.setNhwtgml(entity.getNhwtgml());
+		cjhs.setNwxhwttl(entity.getNwxhwttl());
+		if (entity.getQymc() != null) {
+			cjhs.setQymc(entity.getQymc().getGkjyr());
+		}
+
+		cjhs.setQysjsh(entity.getQysjsh());
+		cjhs.setQysjss(entity.getQysjss());
+		if (entity.getSclx() != null) {
+			cjhs.setSclx(entity.getSclx().getBz());
+		}
+		cjhs.setSffz(entity.getSffz());
+		cjhs.setSjkpnl(entity.getSjkpnl());
+		cjhs.setSjtgnl(entity.getSjtgnl());
+		if (entity.getSzd() != null) {
+			cjhs.setSzd(entity.getSzd().getBz());
+		}
+		if (entity.getSzgq() != null) {
+			cjhs.setSzgq(entity.getSzgq().getGqmc());
+		}
+		cjhs.setTcnf(entity.getTcnf());
+		cjhs.setWd(entity.getWd());
+		cjhs.setWxpbw(entity.getWxpbw());
+		cjhs.setZwbwyt(entity.getZwbwyt());
+		if (entity.getZyhbwfl() != null) {
+			cjhs.setZyhbwfl(entity.getZyhbwfl().getBz());
+		}
+		cjhs.setZyrkfw(entity.getZyrkfw());
+
+		return cjhs;
+
+	}
+
+	/**
+	 * 附证实体转换
+	 * 
+	 * @param entity
+	 * @return
+	 */
+	public YjptGkwxhwzyfzblhhzEntity changeToCjhs(GkwxhwzyfzblhhzEntity entity) {
+		YjptGkwxhwzyfzblhhzEntity cjhs = new YjptGkwxhwzyfzblhhzEntity();
+
+		cjhs.setId(entity.getId().toString());
+		if (entity.getAddUser() != null) {
+			cjhs.setAddUser(entity.getAddUser().getName());
+		}
+		cjhs.setAddDate(entity.getAddDate());
+		if (entity.getUpdateUser() != null) {
+			cjhs.setUpdateUser(entity.getUpdateUser().getName());
+		}
+		cjhs.setUpdateDate(entity.getUpdateDate());
+		cjhs.setRecordStatus(entity.getRecordStatus());
+
+		cjhs.setAqfz(entity.getAqfz());
+		cjhs.setAqgljg(entity.getAqgljg());
+		cjhs.setBh(entity.getBh());
+		if (entity.getCq() != null) {
+			cjhs.setCq(entity.getCq().getBz());
+		}
+		//办理编号
+		cjhs.setBlbh(entity.getByzd1());
+
+		cjhs.setDz(entity.getDz());
+		cjhs.setFddbr(entity.getFddbr());
+		cjhs.setFzcsbh(entity.getFzcsbh());
+		cjhs.setFzjg(entity.getFzjg());
+		cjhs.setGkjyxkz(entity.getGkjyxkz());
+		cjhs.setGqgljgfzrdzyx(entity.getGqgljgfzrdzyx());
+		cjhs.setGqgljgfzrlxdh(entity.getGqgljgfzrlxdh());
+		cjhs.setGqgljgfzrxm(entity.getGqgljgfzrxm());
+		cjhs.setGqgljgfzrzc(entity.getGqgljgfzrzc());
+		if (entity.getJyrVo() != null) {
+			cjhs.setQymc(entity.getJyrVo().getGkjyr());
+		}
+
+		cjhs.setQynbbh(entity.getQynbbh());
+		if (entity.getSsgq() != null) {
+			cjhs.setSsgq(entity.getSsgq().getGqmc());
+		}
+
+		if (entity.getWhdj() != null) {
+			cjhs.setWhdj(entity.getWhdj().getBz());
+		}
+
+		cjhs.setYxqjssj(entity.getYxqjssj());
+		cjhs.setYxqkssj(entity.getYxqkssj());
+		if (entity.getSzd() != null) {
+			cjhs.setSzd(entity.getSzd().getBz());
+		}
+
+		if (entity.getZycs() != null) {
+			cjhs.setZycs(entity.getZycs().getBz());
+		}
+		cjhs.setZycs(entity.getZycs().getBz());
+		// 作业方式
+		String zyfs = "";
+		if (entity.getZyfs() != null) {
+			String[] arrZyfs = entity.getZyfs().split(",");
+			for (String zyfsId : arrZyfs) {
+				CodeEntity zyfsEntity = codeService.findOne(Long
+						.parseLong(zyfsId));
+				if (zyfs.isEmpty()) {
+					zyfs = zyfsEntity.getBz();
+				} else {
+					zyfs += "," + zyfsEntity.getBz();
+				}
+			}
+			cjhs.setZyfs(zyfs);
+		}
+		cjhs.setZywxhwpm(entity.getZywxhwpm());
+
+		return cjhs;
+	}
+
+	public YjptGkwxhwzyfzblFzEntity changeToCjhs(GkwxhwzyfzblFzEntity entity) {
+		YjptGkwxhwzyfzblFzEntity cjhs = new YjptGkwxhwzyfzblFzEntity();
+
+		cjhs.setId(entity.getId().toString());
+		if (entity.getAddUser() != null) {
+			cjhs.setAddUser(entity.getAddUser().getName());
+		}
+		cjhs.setAddDate(entity.getAddDate());
+		if (entity.getUpdateUser() != null) {
+			cjhs.setUpdateUser(entity.getUpdateUser().getName());
+		}
+		cjhs.setUpdateDate(entity.getUpdateDate());
+		cjhs.setRecordStatus(entity.getRecordStatus());
+
+		cjhs.setFzcsbh(entity.getFzcsbh());
+		cjhs.setFzsq(entity.getFzsq().getId() + "");
+		if (entity.getJyr() != null) {
+			cjhs.setJyr(entity.getJyr().getGkjyr());
+		}
+
+		cjhs.setQynbbh(entity.getQynbbh());
+		cjhs.setQynbmc(entity.getQynbmc());
+		cjhs.setWxhwm(entity.getByzd5());
+		if (entity.getZycs() != null) {
+			cjhs.setZycs(entity.getZycs().getBz());
+		}
+		if (entity.getSzd() != null) {
+			cjhs.setSzd(entity.getSzd().getBz());
+		}
+
+		return cjhs;
+	}
+
+	public YjptWxhwpmEntity changeToCjhs(WxhwpmEntity entity) {
+		YjptWxhwpmEntity cjhs = new YjptWxhwpmEntity();
+
+		cjhs.setId(entity.getId().toString());
+		if (entity.getAddUser() != null) {
+			cjhs.setAddUser(entity.getAddUser().getName());
+		}
+		cjhs.setAddDate(entity.getAddDate());
+		if (entity.getUpdateUser() != null) {
+			cjhs.setUpdateUser(entity.getUpdateUser().getName());
+		}
+		cjhs.setUpdateDate(entity.getUpdateDate());
+		cjhs.setRecordStatus(entity.getRecordStatus());
+
+		cjhs.setAqffcs(entity.getAqffcs());
+		cjhs.setBh(entity.getBh());
+		cjhs.setBz(entity.getBh());
+		cjhs.setBzlb(entity.getBzlb());
+		cjhs.setCywxx(entity.getCywxx());
+		if (entity.getDxdj() != null) {
+			cjhs.setDxdj(entity.getDxdj().getBz());
+		}
+		if (entity.getHzwxx() != null) {
+			cjhs.setHzwxx(entity.getHzwxx().getBz());
+		}
+		cjhs.setLbhxb(entity.getLbhxb());
+		cjhs.setLhxz(entity.getMchsm());
+		if (entity.getWrlb() != null) {
+			cjhs.setWrlb(entity.getWrlb().getBz());
+		}
+		cjhs.setYwmc(entity.getYwmc());
+		// un
+		cjhs.setUn(entity.getByzd1());
+		// 名称和说明
+		cjhs.setSm(entity.getByzd3());
+		return cjhs;
+	}
+
+	public YjptZysqbpEntity changeToCjhs(ZysqbpEntity entity) {
+		YjptZysqbpEntity cjhs = new YjptZysqbpEntity();
+
+		cjhs.setId(entity.getId().toString());
+		if (entity.getAddUser() != null) {
+			cjhs.setAddUser(entity.getAddUser().getName());
+		}
+		cjhs.setAddDate(entity.getAddDate());
+		if (entity.getUpdateUser() != null) {
+			cjhs.setUpdateUser(entity.getUpdateUser().getName());
+		}
+		cjhs.setUpdateDate(entity.getUpdateDate());
+		cjhs.setRecordStatus(entity.getRecordStatus());
+
+		cjhs.setAqffcs(entity.getAqffcs());
+		cjhs.setBgr(entity.getBgr());
+		cjhs.setBgsj(entity.getBgsj());
+		cjhs.setBh(entity.getBh());
+		cjhs.setCbbh(entity.getCbbh());
+		cjhs.setCm(entity.getCm());
+		cjhs.setCnno(entity.getCnno());
+		if(entity.getDxdj()!=null){
+			cjhs.setHwzl(entity.getDxdj().getBz());
+		}
+		cjhs.setDxdj(entity.getDxdj().getBz());
+		cjhs.setGjbh(entity.getGjbh());
+		cjhs.setHc(entity.getHc());
+		String hwxs = entity.getHwxs();
+		String hwxs1 = "";
+		if (hwxs != null && hwxs != "") {
+			if (hwxs.indexOf("1") != -1) {
+				hwxs1 = hwxs1 + "包件体;";
+			}
+			if (hwxs.indexOf("2") != -1) {
+				hwxs1 = hwxs1 + "中型散装容器;";
+			}
+			if (hwxs.indexOf("7") != -1) {
+				hwxs1 = hwxs1 + "槽罐车;";
+			}
+			if (hwxs.indexOf("10") != -1) {
+				hwxs1 = hwxs1 + "其他;";
+			}
+
+			if (hwxs.indexOf("3") != -1 || hwxs.indexOf("4") != -1
+					|| hwxs.indexOf("5") != -1 || hwxs.indexOf("6") != -1) {
+				String hwxs2 = "集装箱(";
+				if (hwxs.indexOf("3") != -1) {
+					hwxs2 = hwxs2
+							+ "20'"
+							+ entity.getSl20c()
+									.toString()
+									.substring(
+											0,
+											entity.getSl20c().toString().length() - 2)
+							+ "个,";
+				}
+				if (hwxs.indexOf("4") != -1) {
+					hwxs2 = hwxs2
+							+ "40'"
+							+ entity.getSl40c()
+									.toString()
+									.substring(
+											0,
+											entity.getSl40c().toString().length() - 2)
+							+ "个,";
+				}
+				if (hwxs.indexOf("5") != -1) {
+					hwxs2 = hwxs2
+							+ "45'"
+							+ entity.getSl45c()
+									.toString()
+									.substring(
+											0,
+											entity.getSl45c().toString().length() - 2)
+							+ "个,";
+				}
+				if (hwxs.indexOf("6") != -1) {
+					hwxs2 = hwxs2
+							+ "特种箱"
+							+ entity.getSlspc()
+									.toString()
+									.substring(
+											0,
+											entity.getSlspc().toString().length() - 2)
+							+ "个,";
+				}
+				hwxs1 = hwxs1 + hwxs2.substring(0, hwxs2.length() - 1) + ");";
+			}
+			if (hwxs.indexOf("8") != -1 || hwxs.indexOf("9") != -1) {
+				String hwxs3 = "罐柜(";
+				if (hwxs.indexOf("8") != -1) {
+					hwxs3 = hwxs3
+							+ "20'"
+							+ entity.getSl20t()
+									.toString()
+									.substring(
+											0,
+											entity.getSl20t().toString().length() - 2)
+							+ "个,";
+				}
+				if (hwxs.indexOf("9") != -1) {
+					hwxs3 = hwxs3
+							+ "40'"
+							+ entity.getSl40t()
+									.toString()
+									.substring(
+											0,
+											entity.getSl40t().toString().length() - 2)
+							+ "个,";
+				}
+				hwxs1 = hwxs1 + hwxs3.substring(0, hwxs3.length() - 1) + ");";
+			}
+			hwxs1 = hwxs1.substring(0, hwxs1.length() - 1);
+		}
+		cjhs.setHwxs(hwxs1);
+		if(entity.getHwzl()!=null){
+			cjhs.setHwzl(entity.getHwzl().getBz());
+		}
+		
+		cjhs.setHzwxx(entity.getHzwxx());
+		String jcg="";
+		if("1".equals(entity.getJcg())){
+			jcg="进港";
+		}
+		if("0".equals(entity.getJcg())){
+			jcg="出港";
+		}
+		cjhs.setJcg(jcg);
+		cjhs.setJzxsl(entity.getJzxsl());
+		cjhs.setKgsj(entity.getKgsj());
+		cjhs.setKgzt(entity.getKgzt());
+		cjhs.setKpsj(entity.getKpsj());
+		cjhs.setLhxz(entity.getLhxz());
+		cjhs.setLxfs(entity.getLxfs());
+		String mao="";
+		if("1".equals(entity.getMao())){
+			mao="内贸";
+		}
+		if("0".equals(entity.getMao())){
+			mao="外贸";
+		}
+		cjhs.setMao(mao);
+		cjhs.setQxzysj(entity.getQxzysj());
+		cjhs.setSg(entity.getSg());
+		cjhs.setSl20c(entity.getSl20c());
+		cjhs.setSl20t(entity.getSl20t());
+		cjhs.setSl40c(entity.getSl40c());
+		cjhs.setSl40t(entity.getSl40t());
+		cjhs.setSl45c(entity.getSl45c());
+		cjhs.setSlspc(entity.getSlspc());
+		if(entity.getSzd()!=null){
+			cjhs.setSzd(entity.getSzd().getBz());
+		}
+		
+		cjhs.setYwcm(entity.getYwcm());
+		if(entity.getSzgq()!=null){
+			cjhs.setSzgq(entity.getSzgq().getGqmc());
+		}
+	
+		cjhs.setTeu(entity.getTeu());
+		cjhs.setWgsj(entity.getWgsj());
+		cjhs.setWgzt(entity.getWgzt());
+		cjhs.setWpbh(entity.getWpbh());
+		cjhs.setWxhwmcbh(entity.getWxhwmcbh());
+		cjhs.setWrlb(entity.getWrlb());
+		cjhs.setWxplb(entity.getWxplb());
+		cjhs.setWxwpmc(entity.getWxwpmc());
+		cjhs.setXcglfzr(entity.getXcglfzr());
+		cjhs.setXg(entity.getXg());
+		cjhs.setYwcm(entity.getYwcm());
+		if(entity.getZydd()!=null){
+			cjhs.setZydd(entity.getZydd().getBz());
+		}
+		
+		
+		cjhs.setZyddqt(entity.getZyddqt());
+		if(entity.getZyddqybh()!=null){
+			cjhs.setZyddqybh(entity.getZyddqybh().getId() +"");
+		}
+		
+		
+		if(entity.getZydw()!=null){
+			cjhs.setZydw(entity.getZydw().getGkjyr());
+		}
+		
+		if(entity.getZylx()!=null){
+			cjhs.setZylx(entity.getZylx().getBz());
+		}
+		
+		cjhs.setZysj(entity.getZysj());
+		cjhs.setZysjq(entity.getZysjq());
+		cjhs.setZysjz(entity.getZysjz());
+		cjhs.setZysl(entity.getZysl());
+		cjhs.setZywtr(entity.getZywtr());
+		
+		cjhs.setBzlb(entity.getByzd4());
+		
+		return cjhs;
+	}
+}

+ 8 - 3
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/jyr/BwServiceImpl.java

@@ -19,19 +19,19 @@ public class BwServiceImpl extends BaseService<BwEntity, Long> implements BwServ
 	
 	
 	@Override
 	@Override
 	public BwEntity findByTbdyid(Long tbdyid) {
 	public BwEntity findByTbdyid(Long tbdyid) {
-		// TODO Auto-generated method stub
+		
 		return null;
 		return null;
 	}
 	}
 
 
 	@Override
 	@Override
 	protected MyRepository<BwEntity, Long> getDao() {
 	protected MyRepository<BwEntity, Long> getDao() {
-		// TODO Auto-generated method stub
+		
 		return bwdao;
 		return bwdao;
 	}
 	}
 
 
 	@Override
 	@Override
 	public BwWebService geWebService() {
 	public BwWebService geWebService() {
-		// TODO Auto-generated method stub
+		
 		return null;
 		return null;
 	}
 	}
 
 
@@ -47,5 +47,10 @@ public class BwServiceImpl extends BaseService<BwEntity, Long> implements BwServ
 	public List<Object[]> GetBW_SYHG_Num_By_SZD(String szd){
 	public List<Object[]> GetBW_SYHG_Num_By_SZD(String szd){
 		return bwdao.GetBW_SYHG_Num_By_SZD(szd);
 		return bwdao.GetBW_SYHG_Num_By_SZD(szd);
 	}
 	}
+
+	@Override
+	public List<BwEntity> findCjhsTb() {	
+		return bwdao.findCjhsTb();
+	}
 	
 	
 }
 }

+ 5 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/jyr/JyrServiceImpl.java

@@ -61,6 +61,7 @@ import com.jtgh.yjpt.entity.jyrxxgl.JyrtzqkEntity;
 import com.jtgh.yjpt.entity.yjgl.zdwxyfb.CgEntity;
 import com.jtgh.yjpt.entity.yjgl.zdwxyfb.CgEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzEntity;
 import com.jtgh.yjpt.service.BaseService;
 import com.jtgh.yjpt.service.BaseService;
+import com.jtgh.yjpt.service.cjhs.GkToCjhsService;
 import com.jtgh.yjpt.service.common.CodeService;
 import com.jtgh.yjpt.service.common.CodeService;
 import com.jtgh.yjpt.service.gkgq.MtService;
 import com.jtgh.yjpt.service.gkgq.MtService;
 import com.jtgh.yjpt.service.jyr.JyrService;
 import com.jtgh.yjpt.service.jyr.JyrService;
@@ -103,6 +104,8 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 	private YjyabaDao yjyabaDao;
 	private YjyabaDao yjyabaDao;
 	@Autowired
 	@Autowired
 	private JyrShxxDao jyrShxxDao;
 	private JyrShxxDao jyrShxxDao;
+	@Autowired
+	private GkToCjhsService gkToCjhsService;
 
 
 	/**
 	/**
 	 * 转换同步对应ID
 	 * 转换同步对应ID
@@ -197,12 +200,14 @@ public class JyrServiceImpl extends BaseService<JyrEntity, Long> implements
 			}
 			}
 			// 对泊位信息insert/update操作
 			// 对泊位信息insert/update操作
 			jyrbwxxDao.save(bw_add_list);
 			jyrbwxxDao.save(bw_add_list);
+			gkToCjhsService.saveBwDatas(bw_add_list);
 		}
 		}
 
 
 		if (bw_del_list != null && bw_del_list.size() > 0) {
 		if (bw_del_list != null && bw_del_list.size() > 0) {
 			for (BwEntity str : bw_del_list) {
 			for (BwEntity str : bw_del_list) {
 				// 对泊位信息进行删除
 				// 对泊位信息进行删除
 				jyrbwxxDao.logicDelete(str);
 				jyrbwxxDao.logicDelete(str);
+				gkToCjhsService.saveData(str);
 			}
 			}
 		}
 		}
 		// 堆场
 		// 堆场

+ 6 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/sys/WxhwpmServiceImpl.java

@@ -153,5 +153,11 @@ public class WxhwpmServiceImpl extends BaseService<WxhwpmEntity, Long>
 	public List<Object[]> Count_Total_LBHXB_BZLB(){
 	public List<Object[]> Count_Total_LBHXB_BZLB(){
 		return wxhwpmDao.Count_Total_LBHXB_BZLB();
 		return wxhwpmDao.Count_Total_LBHXB_BZLB();
 	}
 	}
+
+	@Override
+	public List<WxhwpmEntity> findCjhsTb() {
+		return wxhwpmDao.findCjhsTb();
+	}
+	
 	
 	
 }
 }

+ 8 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/zyfzhz/GkwxhwzyfzhzServiceImpl.java

@@ -27,6 +27,7 @@ import com.jtgh.yjpt.entity.BaseEntity;
 import com.jtgh.yjpt.entity.common.TaskInfoEntity;
 import com.jtgh.yjpt.entity.common.TaskInfoEntity;
 import com.jtgh.yjpt.entity.zyfzhz.GkwxhwzyfzhzEntity;
 import com.jtgh.yjpt.entity.zyfzhz.GkwxhwzyfzhzEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
+import com.jtgh.yjpt.service.cjhs.GkToCjhsService;
 import com.jtgh.yjpt.service.common.WorkflowMangerService;
 import com.jtgh.yjpt.service.common.WorkflowMangerService;
 import com.jtgh.yjpt.service.impl.BaseWorkFlowServiceImpl;
 import com.jtgh.yjpt.service.impl.BaseWorkFlowServiceImpl;
 import com.jtgh.yjpt.service.task.TaskService;
 import com.jtgh.yjpt.service.task.TaskService;
@@ -48,6 +49,8 @@ public class GkwxhwzyfzhzServiceImpl extends
 	private TaskService taskService;
 	private TaskService taskService;
 	@Autowired
 	@Autowired
 	private GkwxhwzyfzblhhzService service;
 	private GkwxhwzyfzblhhzService service;
+	@Autowired
+	private GkToCjhsService gkToCjhsService;
 
 
 	@Override
 	@Override
 	public String getProcessDefinitionKey() {
 	public String getProcessDefinitionKey() {
@@ -179,6 +182,7 @@ public class GkwxhwzyfzhzServiceImpl extends
 			entity.setRecordStatus(BaseEntity.RECORD_STATE_COMPLETED);
 			entity.setRecordStatus(BaseEntity.RECORD_STATE_COMPLETED);
 			entity.setSsqy(Constants.SSQY_ALL);
 			entity.setSsqy(Constants.SSQY_ALL);
 			entity = this.save(entity);// 审核成功,进行更换
 			entity = this.save(entity);// 审核成功,进行更换
+			//海事保存附证申请
 			List<GkwxhwzyfzblFzEntity> hzList = dao.findByHz(entity);
 			List<GkwxhwzyfzblFzEntity> hzList = dao.findByHz(entity);
 			List<GkwxhwzyfzblFzEntity> sqList = dao.findByFzsq(
 			List<GkwxhwzyfzblFzEntity> sqList = dao.findByFzsq(
 					entity.getFzsq());
 					entity.getFzsq());
@@ -208,6 +212,8 @@ public class GkwxhwzyfzhzServiceImpl extends
 				// }
 				// }
 				for (GkwxhwzyfzblFzEntity gkwxhwzyfzblFzEntity : sqList) {
 				for (GkwxhwzyfzblFzEntity gkwxhwzyfzblFzEntity : sqList) {
 					dao.logicDelete(gkwxhwzyfzblFzEntity);
 					dao.logicDelete(gkwxhwzyfzblFzEntity);
+					//海事保存附证申请
+					gkToCjhsService.saveData(gkwxhwzyfzblFzEntity);
 				}
 				}
 				for (GkwxhwzyfzblFzEntity hz : hzList) {
 				for (GkwxhwzyfzblFzEntity hz : hzList) {
 					GkwxhwzyfzblFzEntity sq = new GkwxhwzyfzblFzEntity();
 					GkwxhwzyfzblFzEntity sq = new GkwxhwzyfzblFzEntity();
@@ -220,6 +226,8 @@ public class GkwxhwzyfzhzServiceImpl extends
 					sq.setQynbmc(hz.getQynbmc());
 					sq.setQynbmc(hz.getQynbmc());
 					sq.setJyr(hz.getJyr());
 					sq.setJyr(hz.getJyr());
 					dao.save(sq);
 					dao.save(sq);
+					//海事保存附证申请
+					gkToCjhsService.saveData(sq);
 				}
 				}
 			} catch (Exception e) {
 			} catch (Exception e) {
 				e.printStackTrace();
 				e.printStackTrace();

+ 5 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/zyfzndjy/GkwxhwzyfzServiceImpl.java

@@ -53,4 +53,9 @@ public class GkwxhwzyfzServiceImpl extends
 		return dao.GetWH_By_Szd(szd);
 		return dao.GetWH_By_Szd(szd);
 	}
 	}
 
 
+	@Override
+	public List<GkwxhwzyfzblFzEntity> findCjhsTb() {
+		return dao.findCjhsTb();
+	}
+
 }
 }

+ 12 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/zyfzndjy/GkwxhwzyfzblhhzServiceImpl.java

@@ -63,6 +63,7 @@ import com.jtgh.yjpt.entity.yjzyxxgl.YjwzxxEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzzbEntity;
 import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblhhzzbEntity;
+import com.jtgh.yjpt.service.cjhs.GkToCjhsService;
 import com.jtgh.yjpt.service.common.WorkflowMangerService;
 import com.jtgh.yjpt.service.common.WorkflowMangerService;
 import com.jtgh.yjpt.service.impl.BaseWorkFlowServiceImpl;
 import com.jtgh.yjpt.service.impl.BaseWorkFlowServiceImpl;
 import com.jtgh.yjpt.service.impl.common.WorkflowMangerServiceImpl;
 import com.jtgh.yjpt.service.impl.common.WorkflowMangerServiceImpl;
@@ -109,6 +110,8 @@ public class GkwxhwzyfzblhhzServiceImpl extends
 	private JyrdcxxDao jyrdcxxDao;
 	private JyrdcxxDao jyrdcxxDao;
 	@Autowired
 	@Autowired
 	private CgDao cgDao;
 	private CgDao cgDao;
+	@Autowired
+	private GkToCjhsService gkToCjhsService;
 
 
 	@Override
 	@Override
 	protected MyRepository<GkwxhwzyfzblhhzEntity, Long> getDao() {
 	protected MyRepository<GkwxhwzyfzblhhzEntity, Long> getDao() {
@@ -299,6 +302,8 @@ public class GkwxhwzyfzblhhzServiceImpl extends
 						// } else {// 如果
 						// } else {// 如果
 					}
 					}
 					dao.save(gkwxhwzyfzblFzEntity);
 					dao.save(gkwxhwzyfzblFzEntity);
+					//同步海事
+					gkToCjhsService.saveData(gkwxhwzyfzblFzEntity);
 				}
 				}
 			}
 			}
 
 
@@ -315,6 +320,8 @@ public class GkwxhwzyfzblhhzServiceImpl extends
 				}
 				}
 				if (falg == false) {
 				if (falg == false) {
 					dao.logicDelete(old);
 					dao.logicDelete(old);
+					//同步海事
+					gkToCjhsService.saveData(old);
 				}
 				}
 			}
 			}
 		}
 		}
@@ -718,4 +725,9 @@ public class GkwxhwzyfzblhhzServiceImpl extends
 		return gkwxhwzyfzblhhzDao.findByJyr(jyr);
 		return gkwxhwzyfzblhhzDao.findByJyr(jyr);
 	}
 	}
 
 
+	@Override
+	public List<GkwxhwzyfzblhhzEntity> findCjhsTb() {		
+		return gkwxhwzyfzblhhzDao.findCjhsTb();
+	}
+
 }
 }

+ 10 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/zysqbp/ZysqbpServiceImpl.java

@@ -52,6 +52,7 @@ import com.jtgh.yjpt.entity.zysqbp.ZysqbpCountEntity;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpCountEntity1;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpCountEntity1;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpEntity;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpEntity;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpGatherEntity;
 import com.jtgh.yjpt.entity.zysqbp.ZysqbpGatherEntity;
+import com.jtgh.yjpt.service.cjhs.GkToCjhsService;
 import com.jtgh.yjpt.service.common.WorkflowMangerService;
 import com.jtgh.yjpt.service.common.WorkflowMangerService;
 import com.jtgh.yjpt.service.impl.BaseWorkFlowServiceImpl;
 import com.jtgh.yjpt.service.impl.BaseWorkFlowServiceImpl;
 import com.jtgh.yjpt.service.impl.common.WorkflowMangerServiceImpl;
 import com.jtgh.yjpt.service.impl.common.WorkflowMangerServiceImpl;
@@ -85,6 +86,8 @@ public class ZysqbpServiceImpl extends
 	private ApplyDao applyDao;
 	private ApplyDao applyDao;
 	@Autowired
 	@Autowired
 	private AccessoryDao accessoryDao;
 	private AccessoryDao accessoryDao;
+	@Autowired
+	private GkToCjhsService gkToCjhsService;
 
 
 	@Override
 	@Override
 	protected MyRepository<ZysqbpEntity, Long> getDao() {
 	protected MyRepository<ZysqbpEntity, Long> getDao() {
@@ -330,6 +333,8 @@ public class ZysqbpServiceImpl extends
 				autoAuditService.complete(param, variables);
 				autoAuditService.complete(param, variables);
 				data.setRecordStatus(BaseEntity.RECORD_STATE_COMPLETED);
 				data.setRecordStatus(BaseEntity.RECORD_STATE_COMPLETED);
 				this.save(data);
 				this.save(data);
+				//同步海事
+				gkToCjhsService.saveData(data);
 			} else {
 			} else {
 				Map<String, Object> variables = new HashMap<String, Object>();
 				Map<String, Object> variables = new HashMap<String, Object>();
 				variables.put("role_xssc", Constants.ROLE_TYPE_CITY_XSSC);
 				variables.put("role_xssc", Constants.ROLE_TYPE_CITY_XSSC);
@@ -2471,4 +2476,9 @@ public class ZysqbpServiceImpl extends
 		return data;
 		return data;
 	}
 	}
 
 
+	@Override
+	public List<ZysqbpEntity> findCjhsTb() {
+		return zysqbpDao.findCjhsTb();
+	}
+
 }
 }

+ 6 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/jyr/BwService.java

@@ -41,5 +41,11 @@ public interface BwService {
 	
 	
 	//根据所在地获得所有未删除的石油化工码头企业数后再获得这些企业的泊位数
 	//根据所在地获得所有未删除的石油化工码头企业数后再获得这些企业的泊位数
 	public List<Object[]> GetBW_SYHG_Num_By_SZD(String szd);
 	public List<Object[]> GetBW_SYHG_Num_By_SZD(String szd);
+	
+	/**
+	 * 获取海事同步未成功的数据
+	 * @return
+	 */
+	public List<BwEntity> findCjhsTb();
 
 
 }
 }

+ 6 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/sys/WxhwpmService.java

@@ -61,4 +61,10 @@ public interface WxhwpmService {
 	
 	
 	//危险货物查询统计 总数量、类别与相别分总类数、包装类别分总类数 
 	//危险货物查询统计 总数量、类别与相别分总类数、包装类别分总类数 
 	public List<Object[]> Count_Total_LBHXB_BZLB();
 	public List<Object[]> Count_Total_LBHXB_BZLB();
+	
+	/**
+	 * 获取海事同步未成功的数据
+	 * @return
+	 */
+	public List<WxhwpmEntity> findCjhsTb();
 }
 }

+ 8 - 1
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/zyfzndjy/GkwxhwzyfzService.java

@@ -19,7 +19,8 @@ import com.jtgh.yjpt.service.BaseWorkFlowService;
 
 
 public interface GkwxhwzyfzService extends BaseWorkFlowService {
 public interface GkwxhwzyfzService extends BaseWorkFlowService {
 
 
-
+	public <S extends GkwxhwzyfzblFzEntity> S save(S entity);
+	
 	public GkwxhwzyfzblFzEntity findOne(Long id);
 	public GkwxhwzyfzblFzEntity findOne(Long id);
 
 
 	public List<GkwxhwzyfzblFzEntity> findAll(
 	public List<GkwxhwzyfzblFzEntity> findAll(
@@ -37,4 +38,10 @@ public interface GkwxhwzyfzService extends BaseWorkFlowService {
 
 
 	// 获得所在危货附证中的危货物品
 	// 获得所在危货附证中的危货物品
 	public List<Object[]> GetWH_By_Szd(String szd);
 	public List<Object[]> GetWH_By_Szd(String szd);
+	
+	/**
+	 * 获取海事同步未成功的数据
+	 * @return
+	 */
+	public List<GkwxhwzyfzblFzEntity> findCjhsTb();
 }
 }

+ 6 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/zyfzndjy/GkwxhwzyfzblhhzService.java

@@ -116,4 +116,10 @@ public interface GkwxhwzyfzblhhzService extends BaseWorkFlowService {
 	public List<GkwxhwzyfzblhhzEntity> query(Timestamp kssj, Timestamp jssj);
 	public List<GkwxhwzyfzblhhzEntity> query(Timestamp kssj, Timestamp jssj);
 
 
 	public List<GkwxhwzyfzblhhzEntity> findByJyr(JyrEntity jyr);
 	public List<GkwxhwzyfzblhhzEntity> findByJyr(JyrEntity jyr);
+	
+	/**
+	 * 获取海事同步未成功的数据
+	 * @return
+	 */
+	public List<GkwxhwzyfzblhhzEntity> findCjhsTb();
 }
 }

+ 6 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/zysqbp/ZysqbpService.java

@@ -365,5 +365,11 @@ public interface ZysqbpService extends BaseWorkFlowService {
 	 * @return
 	 * @return
 	 */
 	 */
 	public List<ZysqbpEntity> getZysqbpListByBgsjAndCm(Date date, String cm);
 	public List<ZysqbpEntity> getZysqbpListByBgsjAndCm(Date date, String cm);
+	
+	/**
+	 * 获取海事同步未成功的数据
+	 * @return
+	 */
+	public List<ZysqbpEntity> findCjhsTb();
 
 
 }
 }

+ 3 - 3
gkaq/yjpt-java/trunk/resources/spring/application.properties

@@ -1,8 +1,8 @@
 \ufeff#***************************************  jdbc info  ********************************************#
 \ufeff#***************************************  jdbc info  ********************************************#
 jdbc.driver                 = oracle.jdbc.driver.OracleDriver
 jdbc.driver                 = oracle.jdbc.driver.OracleDriver
-jdbc.url                      = jdbc:oracle:thin:@192.168.57.36:1521:orcl
+jdbc.url                      = jdbc:oracle:thin:@localhost:1521:orcl
 jdbc.username           = yjpthb
 jdbc.username           = yjpthb
-jdbc.password            = yjpthb
+jdbc.password            = yjpt
 hibernate.dialect        = org.hibernate.dialect.Oracle10gDialect
 hibernate.dialect        = org.hibernate.dialect.Oracle10gDialect
 #********************************** qlyg jdbc info**********************************************#
 #********************************** qlyg jdbc info**********************************************#
 jdbc.qlyg.url               =
 jdbc.qlyg.url               =
@@ -14,7 +14,7 @@ jdbc.xzzx.username    =
 jdbc.xzzx.password     =  
 jdbc.xzzx.password     =  
 
 
 #********************************** cjhs jdbc info**********************************************#
 #********************************** cjhs jdbc info**********************************************#
-jdbc.cjhs.url               =  jdbc:oracle:thin:@192.168.57.36:1521:orcl
+jdbc.cjhs.url               =  jdbc:oracle:thin:@localhost:1521:orcl
 jdbc.cjhs.username    =  hbhs
 jdbc.cjhs.username    =  hbhs
 jdbc.cjhs.password     =  hbhs
 jdbc.cjhs.password     =  hbhs
 
 

+ 30 - 111
gkaq/yjpt-java/trunk/resources/spring/applicationContext-datachange.xml

@@ -30,6 +30,12 @@
 			</props>
 			</props>
 		</property>
 		</property>
 	</bean>
 	</bean>
+	<!-- Spring Data Jpa配置 -->
+	<jpa:repositories base-package="com.jtgh.cjhs.dao"
+					 transaction-manager-ref="transactionManager-cjhs"
+					  entity-manager-factory-ref="entityManagerFactory-cjhs"
+					  factory-class="com.jtgh.cjhs.dao.common.CjhsRepositoryFactoryBean" />
+					  
 	<bean id="dataSource-cjhs" class="org.apache.commons.dbcp.BasicDataSource"
 	<bean id="dataSource-cjhs" class="org.apache.commons.dbcp.BasicDataSource"
 		  destroy-method="close" lazy-init="false">
 		  destroy-method="close" lazy-init="false">
 		<property name="driverClassName" value="${jdbc.driver}" />
 		<property name="driverClassName" value="${jdbc.driver}" />
@@ -45,11 +51,21 @@
 		<property name="minEvictableIdleTimeMillis" value="3600000" />
 		<property name="minEvictableIdleTimeMillis" value="3600000" />
 	</bean>
 	</bean>
 	
 	
-	<!-- Spring Data Jpa配置 -->
-	<jpa:repositories base-package="com.jtgh.cjhs.dao"
-					  entity-manager-factory-ref="entityManagerFactory-cjhs"
-					  factory-class="com.jtgh.cjhs.dao.common.CjhsRepositoryFactoryBean" />
-		
+<bean id="transactionManager-cjhs" class="org.springframework.orm.jpa.JpaTransactionManager">
+		<property name="entityManagerFactory" ref="entityManagerFactory-cjhs" />
+	</bean>
+	<tx:advice id="txAdvice-cjhs" transaction-manager="transactionManager-cjhs">
+		<tx:attributes>
+			<tx:method name="save*" propagation="REQUIRED" />
+			<tx:method name="do*" propagation="REQUIRED" />
+			<tx:method name="*" propagation="SUPPORTS" read-only="true" />
+		</tx:attributes>
+	</tx:advice>
+	<aop:config>
+		<aop:pointcut id="txPointcut-cjhs"
+					  expression="execution(* com.jtgh.cjhs.service..*.*(..))" />
+		<aop:advisor advice-ref="txAdvice-cjhs" pointcut-ref="txPointcut-cjhs" />
+	</aop:config>
 	
 	
 	<!-- 权利阳光 Jpa Entity Manager 配置 -->
 	<!-- 权利阳光 Jpa Entity Manager 配置 -->
 	<bean id="entityManagerFactory-qlyg" 
 	<bean id="entityManagerFactory-qlyg" 
@@ -135,124 +151,27 @@
 	</bean>
 	</bean>
 	<bean id="hibernateJpaVendorAdapter"
 	<bean id="hibernateJpaVendorAdapter"
 		  class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
 		  class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
-	<!-- 定时任务 -权力阳光 -->
+	
+	<!-- 定时任务 -海事比对 -->
 	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
 	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
 		<property name="triggers">
 		<property name="triggers">
 			<list>
 			<list>
-				<ref bean="loginLogTrigger"/>
-				<ref bean="checkLogTrigger"/>
-				<ref bean="applyTrigger"/>
-				<ref bean="monitorAlertTrigger"/>
-				<ref bean="superviseStatTrigger"/>
-				<ref bean="superviseTrigger"/>
-				<ref bean="supinfoTrigger"/>
-				<ref bean="alertTrigger"/>
+				<ref bean="cjhsTrigger"/>
 			</list>
 			</list>
 		</property>
 		</property>
 		<property name="autoStartup" value="true"/>
 		<property name="autoStartup" value="true"/>
 	</bean>
 	</bean>
 	<!-- 生成异常信息 -->
 	<!-- 生成异常信息 -->
-	<bean id="alertTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
-		<property name="jobDetail" ref="alertJobDetail"/>
-		<!-- 每天执行一次 -->
-		<property name="cronExpression" value="0 30 1 * * ?"/>
-	</bean>
-	<bean id="alertJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
-		<property name="targetObject" ref="alertJob"/>
-		<property name="targetMethod" value="execute"/>
-		<property name="concurrent" value="false"/>
-		<!-- 是否允许任务并发执行。当值为false时,表示必须等到前一个线程处理完毕后才再启一个新的线程 -->
-	</bean>
-	<bean id="alertJob" class="com.jtgh.qlyg.sync.QlygSyncAlert"/>
-	<!-- 同步反馈信息 -->
-	<bean id="supinfoTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
-		<property name="jobDetail" ref="supinfoJobDetail"/>
-		<!-- 每天执行一次 -->
-		<property name="cronExpression" value="0 35 1 * * ?"/>
-	</bean>
-	<bean id="supinfoJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
-		<property name="targetObject" ref="supinfoJob"/>
-		<property name="targetMethod" value="execute"/>
-		<property name="concurrent" value="false"/>
-		<!-- 是否允许任务并发执行。当值为false时,表示必须等到前一个线程处理完毕后才再启一个新的线程 -->
-	</bean>
-	<bean id="supinfoJob" class="com.jtgh.qlyg.sync.QlygSyncSupinfo"/>
-	<!-- 同步督督察督办信息 -->
-	<bean id="superviseTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
-		<property name="jobDetail" ref="superviseJobDetail"/>
-		<!-- 每天执行一次 -->
-		<property name="cronExpression" value="0 40 1 * * ?"/>
-	</bean>
-	<bean id="superviseJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
-		<property name="targetObject" ref="superviseJob"/>
-		<property name="targetMethod" value="execute"/>
-		<property name="concurrent" value="false"/>
-		<!-- 是否允许任务并发执行。当值为false时,表示必须等到前一个线程处理完毕后才再启一个新的线程 -->
-	</bean>
-	<bean id="superviseJob" class="com.jtgh.qlyg.sync.QlygSyncSupervise"/>
-	<!-- 同步登录信息 -->
-	<bean id="loginLogTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
-		<property name="jobDetail" ref="loginLogJobDetail"/>
+	<bean id="cjhsTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
+		<property name="jobDetail" ref="cjhsJobDetail"/>
 		<!-- 每天执行一次 -->
 		<!-- 每天执行一次 -->
-		<property name="cronExpression" value="0 45 1 * * ?"/>
-	</bean>
-	<bean id="loginLogJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
-		<property name="targetObject" ref="loginLogJob"/>
-		<property name="targetMethod" value="execute"/>
-		<property name="concurrent" value="false"/>
-		<!-- 是否允许任务并发执行。当值为false时,表示必须等到前一个线程处理完毕后才再启一个新的线程 -->
-	</bean>
-	<bean id="loginLogJob" class="com.jtgh.qlyg.sync.QlygSyncLoginLog"/>
-	<!-- 同步查看信息 -->
-	<bean id="checkLogTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
-		<property name="jobDetail" ref="checkLogJobDetail"/>
-		<!-- 每天执行一次 -->
-		<property name="cronExpression" value="0 50 1 * * ?"/>
-	</bean>
-	<bean id="checkLogJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
-		<property name="targetObject" ref="checkLogJob"/>
-		<property name="targetMethod" value="execute"/>
-		<property name="concurrent" value="false"/>
-		<!-- 是否允许任务并发执行。当值为false时,表示必须等到前一个线程处理完毕后才再启一个新的线程 -->
-	</bean>
-	<bean id="checkLogJob" class="com.jtgh.qlyg.sync.QlygSyncCheckLog"/>
-	<!-- 同步办件信息 -->
-	<bean id="applyTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
-		<property name="jobDetail" ref="applyJobDetail"/>
-		<!-- 每天执行一次 -->
-		<property name="cronExpression" value="0 10 1 * * ?"/>
-	</bean>
-	<bean id="applyJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
-		<property name="targetObject" ref="applyJob"/>
-		<property name="targetMethod" value="execute"/>
-		<property name="concurrent" value="false"/>
-		<!-- 是否允许任务并发执行。当值为false时,表示必须等到前一个线程处理完毕后才再启一个新的线程 -->
-	</bean>
-	<bean id="applyJob" class="com.jtgh.qlyg.sync.QlygSyncApply"/>
-	<!-- 同步异常信息 -->
-	<bean id="monitorAlertTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
-		<property name="jobDetail" ref="monitorAlertJobDetail"/>
-		<!-- 每天执行一次 -->
-		<property name="cronExpression" value="0 20 1 * * ?"/>
-	</bean>
-	<bean id="monitorAlertJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
-		<property name="targetObject" ref="monitorAlertJob"/>
-		<property name="targetMethod" value="execute"/>
-		<property name="concurrent" value="false"/>
-		<!-- 是否允许任务并发执行。当值为false时,表示必须等到前一个线程处理完毕后才再启一个新的线程 -->
-	</bean>
-	<bean id="monitorAlertJob" class="com.jtgh.qlyg.sync.QlygSyncMonitorAlert"/>
-	<!-- 同步检查统计信息 -->
-	<bean id="superviseStatTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
-		<property name="jobDetail" ref="superviseStatJobDetail"/>
-		<!-- 每月5号执行一次 -->
-		<property name="cronExpression" value="0 0 1 5 * ?"/>
+		<property name="cronExpression" value="0 0 2 * * ?"/>
 	</bean>
 	</bean>
-	<bean id="superviseStatJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
-		<property name="targetObject" ref="superviseStatJob"/>
+	<bean id="cjhsJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
+		<property name="targetObject" ref="cjhsJob"/>
 		<property name="targetMethod" value="execute"/>
 		<property name="targetMethod" value="execute"/>
 		<property name="concurrent" value="false"/>
 		<property name="concurrent" value="false"/>
 		<!-- 是否允许任务并发执行。当值为false时,表示必须等到前一个线程处理完毕后才再启一个新的线程 -->
 		<!-- 是否允许任务并发执行。当值为false时,表示必须等到前一个线程处理完毕后才再启一个新的线程 -->
 	</bean>
 	</bean>
-	<bean id="superviseStatJob" class="com.jtgh.qlyg.sync.QlygSyncSuperviseStat"/>
+	<bean id="cjhsJob" class="com.jtgh.cjhs.sync.CjhsSyn"/>
 </beans>
 </beans>

+ 7 - 0
gkaq/yjpt-java/trunk/resources/sql/init/9.update.sql.ftl

@@ -634,3 +634,10 @@ comment on column T_HS_GKBD.gksbbh
   is '海事申报单编号';
   is '海事申报单编号';
   comment on column T_HS_GKBD.xh
   comment on column T_HS_GKBD.xh
   is '流水号';
   is '流水号';
+  
+  --长江海事同步数据状态
+ALTER TABLE T_YJPT_JYRXX_BW ADD  CJHSTBZT CHAR(1);
+ALTER TABLE T_YJPT_GKWXHWZYFZBLHHZ ADD  CJHSTBZT CHAR(1);
+ALTER TABLE T_YJPT_GKWXHWZYFZBL_FZ ADD  CJHSTBZT CHAR(1);
+ALTER TABLE T_YJPT_WXHWPMB ADD  CJHSTBZT CHAR(1);
+ALTER TABLE T_YJPT_WXHWGKZYSBD ADD  CJHSTBZT CHAR(1);

+ 499 - 0
gkaq/yjpt-java/trunk/resources/sql/init/cjhs.table.sql

@@ -0,0 +1,499 @@
+ drop table  YJPT_BW ;
+ drop table   YJPT_GKWXHWZYFZBLHHZ ;
+ drop table   YJPT_GKWXHWZYFZBL_FZ ;
+ drop table  YJPT_WXHWPMB ;
+ drop table  YJPT_WXHWGKZYSBD ;
+--泊位
+create table YJPT_BW
+(
+  id            VARCHAR2(25) not null,
+  szd           VARCHAR2(50),
+  szgq          VARCHAR2(50),
+  qymc        VARCHAR2(200),
+  mtmc       VARCHAR2(200),
+  bwmc       VARCHAR2(100),
+  bwsx        	VARCHAR2(20),
+  bwszsx       VARCHAR2(20),
+  fwlx         VARCHAR2(20),
+  tcnf          NUMBER,
+  jgxs         VARCHAR2(20),
+  sclx         VARCHAR2(20),
+  jgysnf        NUMBER,
+  qysjsh        VARCHAR2(100),
+  qysjss        VARCHAR2(100),
+  bwcd          VARCHAR2(100),
+  wxpbw         CHAR(1),
+  sjtgnl        VARCHAR2(100),
+  sjkpnl        VARCHAR2(100),
+  nhwtgml       VARCHAR2(100),
+  nwxhwttl      VARCHAR2(100),
+  zyhbwfl       VARCHAR2(20),
+  jd            VARCHAR2(30),
+  wd            VARCHAR2(30),
+  sffz          CHAR(1),
+  bwyt          VARCHAR2(30),
+  zyrkfw        VARCHAR2(400),
+  add_user      VARCHAR2(50),
+  add_date      TIMESTAMP(6),
+  update_user   VARCHAR2(50),
+  update_date   TIMESTAMP(6),
+  record_status NUMBER default 0,
+  jtjgisdyidh   VARCHAR2(40),
+  hckpnl        VARCHAR2(100),
+  zwbwyt      VARCHAR2(250),
+  bwdm 		VARCHAR2(10)  
+);
+comment on table YJPT_BW
+  is '泊位';
+comment on column YJPT_BW.id  is 'ID';
+comment on column YJPT_BW.szd  is '所在地';
+comment on column YJPT_BW.szgq  is '所在港区';
+comment on column YJPT_BW.qymc  is '企业名称';
+comment on column YJPT_BW.mtmc  is '码头名称';
+comment on column YJPT_BW.bwmc  is '泊位名称';
+comment on column YJPT_BW.bwsx  is '泊位属性';
+comment on column YJPT_BW.bwszsx  is '泊位所在水系';
+comment on column YJPT_BW.fwlx  is '服务类型';
+comment on column YJPT_BW.tcnf  is '投产年份';
+comment on column YJPT_BW.jgxs  is '结构型式';
+comment on column YJPT_BW.sclx  is '生产类型';
+comment on column YJPT_BW.jgysnf  is '竣工验收年份';
+comment on column YJPT_BW.qysjsh  is '前沿设计水深';
+comment on column YJPT_BW.qysjss  is '前沿实际水深';
+comment on column YJPT_BW.bwcd  is '泊位长度';
+comment on column YJPT_BW.wxpbw  is '危险品泊位';
+comment on column YJPT_BW.sjtgnl  is '设计通过能力';
+comment on column YJPT_BW.sjkpnl  is '设计靠泊能力(吨级)';
+comment on column YJPT_BW.nhwtgml  is '年货物通过能力';
+comment on column YJPT_BW.nwxhwttl  is '年危险货物吞吐量';
+comment on column YJPT_BW.zyhbwfl  is '专业化泊位分类';
+comment on column YJPT_BW.jd  is '经度';
+comment on column YJPT_BW.wd  is '纬度';
+comment on column YJPT_BW.sffz  is '是否发证';
+comment on column YJPT_BW.bwyt  is '泊位用途';
+comment on column YJPT_BW.zyrkfw  is '作业认可范围';
+comment on column YJPT_BW.add_user  is '创建人';
+comment on column YJPT_BW.add_date  is '创建时间';
+comment on column YJPT_BW.update_user  is '修改人';
+comment on column YJPT_BW.update_date  is '修改时间';
+comment on column YJPT_BW.record_status  is '删除状态';
+comment on column YJPT_BW.hckpnl  is '核查靠泊能力';
+comment on column YJPT_BW.zwbwyt  is '泊位用途显示';
+alter table YJPT_BW
+  add constraint PK_YJPT_BW primary key (ID);
+  
+  --附证申请(主表)
+  create table YJPT_GKWXHWZYFZBLHHZ
+(
+  id            VARCHAR2(25) not null,
+  qymc          VARCHAR2(200),
+  szd           VARCHAR2(50),
+  ssgq          VARCHAR2(50),
+  dz            VARCHAR2(2000),
+  fddbr         VARCHAR2(200),
+  aqgljg        VARCHAR2(200),
+  aqfz          VARCHAR2(200),
+  gqgljgfzrxm   VARCHAR2(200),
+  gqgljgfzrzc   VARCHAR2(200),
+  gqgljgfzrlxdh VARCHAR2(20),
+  gqgljgfzrdzyx VARCHAR2(200),
+  add_user      VARCHAR2(50),
+  add_date      TIMESTAMP(6),
+  update_user   VARCHAR2(50),
+  update_date   TIMESTAMP(6),
+  record_status NUMBER default 0,
+  zycs          VARCHAR2(50),
+  cq            VARCHAR2(50),
+  zyfs         VARCHAR2(200),
+  whdj         VARCHAR2(50),
+  zywxhwpm      VARCHAR2(4000),
+  bh            VARCHAR2(2000),
+  blbh   VARCHAR2(50),
+  sqtbrq        TIMESTAMP(6),
+  fzsj          TIMESTAMP(6),
+  fzfzrq        TIMESTAMP(6),
+  fzgkjyxkzh    VARCHAR2(20),
+  fzzycs        VARCHAR2(20),
+  fzcsbh        VARCHAR2(50),
+  fzqynbbh      VARCHAR2(20),
+  fzjg          VARCHAR2(100),
+  yxqkssj       TIMESTAMP(6),
+  yxqjssj       TIMESTAMP(6),
+  qynbbh        VARCHAR2(50),
+  gkjyxkz       VARCHAR2(400)
+)
+;
+comment on table YJPT_GKWXHWZYFZBLHHZ
+  is '港口危险货物作业"附证" 办理或换证申请表';
+comment on column YJPT_GKWXHWZYFZBLHHZ.qymc
+  is '企业名称';
+comment on column YJPT_GKWXHWZYFZBLHHZ.szd
+  is '所在地';
+comment on column YJPT_GKWXHWZYFZBLHHZ.ssgq
+  is '所属港区';
+comment on column YJPT_GKWXHWZYFZBLHHZ.dz
+  is '地址';
+comment on column YJPT_GKWXHWZYFZBLHHZ.fddbr
+  is '法定代表人';
+comment on column YJPT_GKWXHWZYFZBLHHZ.aqgljg
+  is '安全管理机构';
+comment on column YJPT_GKWXHWZYFZBLHHZ.aqfz
+  is '安全副总';
+comment on column YJPT_GKWXHWZYFZBLHHZ.gqgljgfzrxm
+  is '安全管理机构负责人信息  姓名';
+comment on column YJPT_GKWXHWZYFZBLHHZ.gqgljgfzrzc
+  is '安全管理机构负责人信息  职称';
+comment on column YJPT_GKWXHWZYFZBLHHZ.gqgljgfzrlxdh
+  is '安全管理机构负责人信息  联系电话';
+comment on column YJPT_GKWXHWZYFZBLHHZ.gqgljgfzrdzyx
+  is '安全管理机构负责人信息  电子邮箱';
+comment on column YJPT_GKWXHWZYFZBLHHZ.add_user
+  is '创建人';
+comment on column YJPT_GKWXHWZYFZBLHHZ.add_date
+  is '创建时间';
+comment on column YJPT_GKWXHWZYFZBLHHZ.update_user
+  is '修改人';
+comment on column YJPT_GKWXHWZYFZBLHHZ.update_date
+  is '修改时间';
+comment on column YJPT_GKWXHWZYFZBLHHZ.record_status
+  is '删除状态';
+comment on column YJPT_GKWXHWZYFZBLHHZ.zycs
+  is '作业场所';
+comment on column YJPT_GKWXHWZYFZBLHHZ.cq
+  is '产权';
+comment on column YJPT_GKWXHWZYFZBLHHZ.zyfs
+  is '作业方式';
+comment on column YJPT_GKWXHWZYFZBLHHZ.whdj
+  is '危货等级';
+comment on column YJPT_GKWXHWZYFZBLHHZ.zywxhwpm
+  is '作业危险货物品名';
+comment on column YJPT_GKWXHWZYFZBLHHZ.bh
+  is '编号';
+  comment on column YJPT_GKWXHWZYFZBLHHZ.blbh
+  is '办理编号';
+comment on column YJPT_GKWXHWZYFZBLHHZ.sqtbrq
+  is '填报日期';
+comment on column YJPT_GKWXHWZYFZBLHHZ.fzsj
+  is '发证时间';
+comment on column YJPT_GKWXHWZYFZBLHHZ.fzfzrq
+  is '发证日期';
+comment on column YJPT_GKWXHWZYFZBLHHZ.fzgkjyxkzh
+  is '港口经营许可证号';
+comment on column YJPT_GKWXHWZYFZBLHHZ.fzzycs
+  is '作业场所';
+comment on column YJPT_GKWXHWZYFZBLHHZ.fzcsbh
+  is '附证场所编号';
+comment on column YJPT_GKWXHWZYFZBLHHZ.fzqynbbh
+  is '企业内部编号';
+comment on column YJPT_GKWXHWZYFZBLHHZ.fzjg
+  is '发证机关';
+comment on column YJPT_GKWXHWZYFZBLHHZ.yxqkssj
+  is '有效期开始时间';
+comment on column YJPT_GKWXHWZYFZBLHHZ.yxqjssj
+  is '有效期结束时间';
+comment on column YJPT_GKWXHWZYFZBLHHZ.qynbbh
+  is '企业内部编号';
+comment on column YJPT_GKWXHWZYFZBLHHZ.gkjyxkz
+  is '港口经营许可证号';
+alter table YJPT_GKWXHWZYFZBLHHZ
+  add constraint PK_YJPT_GKWXHWZYFZBLHHZ primary key (ID);
+
+  --附证信息表(子表)
+  create table YJPT_GKWXHWZYFZBL_FZ
+(
+  id            VARCHAR2(25) not null,
+  zycs          VARCHAR2(20),
+  fzcsbh        VARCHAR2(100),
+  qynbbh        VARCHAR2(100),
+  fzsq          VARCHAR2(25),
+  add_user      VARCHAR2(50),
+  add_date      TIMESTAMP(6),
+  update_user   VARCHAR2(50),
+  update_date   TIMESTAMP(6),
+  record_status NUMBER default 1,
+  qynbmc        VARCHAR2(100),
+  jyr          VARCHAR2(200),
+  wxhwm      VARCHAR2(2000),
+  SZD 			VARCHAR2(50)
+)
+;
+comment on table YJPT_GKWXHWZYFZBL_FZ
+is '附证信息表';
+comment on column YJPT_GKWXHWZYFZBL_FZ.zycs
+  is '作业场所id';
+comment on column YJPT_GKWXHWZYFZBL_FZ.fzcsbh
+  is '附证场所编号';
+comment on column YJPT_GKWXHWZYFZBL_FZ.qynbbh
+  is '企业内部编号';
+comment on column YJPT_GKWXHWZYFZBL_FZ.fzsq
+  is '原附证申请id';
+comment on column YJPT_GKWXHWZYFZBL_FZ.jyr
+  is '关联的经营人';
+comment on column YJPT_GKWXHWZYFZBL_FZ.wxhwm
+  is '允许作业的危险货物品名';
+alter table YJPT_GKWXHWZYFZBL_FZ
+  add constraint PK_YJPT_GKWXHWZYFZBL_FZ primary key (ID);
+
+  --危险品名表
+  create table YJPT_WXHWPMB
+(
+  id            VARCHAR2(25) not null,
+  bh            VARCHAR2(10),
+  mchsm         VARCHAR2(200),
+  un            VARCHAR2(10),
+  sm         VARCHAR2(200),
+  ywmc          VARCHAR2(500),
+  lbhxb         VARCHAR2(100),
+  cywxx         VARCHAR2(100),
+  bzlb          VARCHAR2(50),
+  bz            VARCHAR2(200),
+  add_user      VARCHAR2(50),
+  add_date      TIMESTAMP(6),
+  update_user   VARCHAR2(50),
+  update_date   TIMESTAMP(6),
+  record_status VARCHAR2(10) default '0',
+  lhxz          VARCHAR2(512),
+  aqffcs        VARCHAR2(1000),
+  szd           VARCHAR2(50),
+  hzwxx      VARCHAR2(50),
+  dxdj          VARCHAR2(50),
+  wrlb          VARCHAR2(50)
+)
+;
+comment on table YJPT_GKWXHWZYFZBL_FZ
+  is '危险品名表';
+comment on column YJPT_WXHWPMB.id
+  is 'ID';
+comment on column YJPT_WXHWPMB.bh
+  is '编号';
+comment on column YJPT_WXHWPMB.mchsm
+  is '名称和说明(中文名称)';
+  comment on column YJPT_WXHWPMB.un
+  is 'un';
+comment on column YJPT_WXHWPMB.sm
+  is '名称和说明';
+comment on column YJPT_WXHWPMB.ywmc
+  is '英文名称';
+comment on column YJPT_WXHWPMB.lbhxb
+  is '类别和项别';
+comment on column YJPT_WXHWPMB.cywxx
+  is '次要危险性';
+comment on column YJPT_WXHWPMB.bzlb
+  is '包装类别';
+comment on column YJPT_WXHWPMB.bz
+  is '备注';
+comment on column YJPT_WXHWPMB.add_user
+  is '创建人';
+comment on column YJPT_WXHWPMB.add_date
+  is '创建时间';
+comment on column YJPT_WXHWPMB.update_user
+  is '修改人';
+comment on column YJPT_WXHWPMB.update_date
+  is '修改时间';
+comment on column YJPT_WXHWPMB.record_status
+  is '删除状态';
+comment on column YJPT_WXHWPMB.lhxz
+  is '理化性质';
+comment on column YJPT_WXHWPMB.aqffcs
+  is '防范措施';
+comment on column YJPT_WXHWPMB.szd
+  is 'SZD';
+comment on column YJPT_WXHWPMB.hzwxx
+  is '火灾危险性';
+comment on column YJPT_WXHWPMB.dxdj
+  is '毒性等级';
+comment on column YJPT_WXHWPMB.wrlb
+  is '污染类别';
+  comment on column YJPT_WXHWPMB.bzlb
+  is '包装类别';
+alter table YJPT_WXHWPMB
+  add constraint PK_YJPT_WXHWPMB primary key (ID);
+  
+  --危险货物作业申报单
+  create table YJPT_WXHWGKZYSBD
+(
+  id            VARCHAR2(25) not null,
+  zywtr         VARCHAR2(100),
+  xcglfzr       VARCHAR2(20),
+  add_user      VARCHAR2(50),
+  add_date      TIMESTAMP(6),
+  update_user   VARCHAR2(50),
+  update_date   TIMESTAMP(6),
+  record_status NUMBER,
+  gq             VARCHAR2(50),
+  bh            VARCHAR2(50),
+  szd            VARCHAR2(50),
+  zydw          VARCHAR2(200),
+  cm            VARCHAR2(200),
+  wxplb         VARCHAR2(200),
+  wxwpmc        VARCHAR2(200),
+  wpbh          VARCHAR2(200),
+  jcg           VARCHAR2(200),
+  zysl          NUMBER(*,3),
+  lhxz          VARCHAR2(2000),
+  zysj          TIMESTAMP(6),
+  zydd          VARCHAR2(20),
+  aqffcs        VARCHAR2(2000),
+  bgr           VARCHAR2(40),
+  lxfs          VARCHAR2(400),
+  bgsj          TIMESTAMP(6),
+  zyddqybh      VARCHAR2(20),
+  szgq          VARCHAR2(50),
+  kpsj          TIMESTAMP(6),
+  zylx          VARCHAR2(100),
+  sg            VARCHAR2(100),
+  xg            VARCHAR2(100),
+  kgsj          TIMESTAMP(6),
+  wgsj          TIMESTAMP(6),
+  kgzt          CHAR(1),
+  wgzt          CHAR(1),
+  gjbh          VARCHAR2(100),
+  zysjq         TIMESTAMP(6),
+  zysjz         TIMESTAMP(6),
+  qxzysj        TIMESTAMP(6),
+  zyddqt        VARCHAR2(50),
+  wxhwmcbh      VARCHAR2(200),
+  inorout       CHAR(1),
+  hwzl         VARCHAR2(20),
+  jzxsl       VARCHAR2(15),
+  hwxs		VARCHAR2(100),
+  hc             VARCHAR2(40),
+  cbbh          VARCHAR2(20),
+  cnno          VARCHAR2(100),
+  hzwxx       VARCHAR2(50),
+  dxdj            VARCHAR2(50),
+  wrlb              VARCHAR2(50),
+  mao             VARCHAR2(10),
+  SL20C     NUMBER,
+  SL40C     NUMBER,
+  SL45C     NUMBER,
+  SLSPC     NUMBER,
+  SL20T     NUMBER,
+  SL40T     NUMBER,
+  TEU     NUMBER,
+  ywcm   VARCHAR2(100),
+   bzlb          VARCHAR2(50)
+);
+comment on table YJPT_WXHWGKZYSBD
+  is '危险货物港口作业申请';
+comment on column YJPT_WXHWGKZYSBD.id
+  is 'ID';
+comment on column YJPT_WXHWGKZYSBD.zywtr
+  is '作业委托人';
+comment on column YJPT_WXHWGKZYSBD.xcglfzr
+  is '现场管理负责人';
+comment on column YJPT_WXHWGKZYSBD.add_user
+  is '创建人';
+comment on column YJPT_WXHWGKZYSBD.add_date
+  is '创建时间';
+comment on column YJPT_WXHWGKZYSBD.update_user
+  is '修改人';
+comment on column YJPT_WXHWGKZYSBD.update_date
+  is '修改时间';
+comment on column YJPT_WXHWGKZYSBD.record_status
+  is '删除状态';
+comment on column YJPT_WXHWGKZYSBD.bh
+  is '编号';
+comment on column YJPT_WXHWGKZYSBD.szd
+  is '所在地';
+comment on column YJPT_WXHWGKZYSBD.zydw
+  is '作业单位';
+comment on column YJPT_WXHWGKZYSBD.cm
+  is '船名';
+comment on column YJPT_WXHWGKZYSBD.wxplb
+  is '危险品类别';
+comment on column YJPT_WXHWGKZYSBD.wxwpmc
+  is '危险物品名称';
+comment on column YJPT_WXHWGKZYSBD.wpbh
+  is '物品编号';
+comment on column YJPT_WXHWGKZYSBD.jcg
+  is '进出港';
+comment on column YJPT_WXHWGKZYSBD.zysl
+  is '作业数量(吨)';
+comment on column YJPT_WXHWGKZYSBD.lhxz
+  is '理化性质';
+comment on column YJPT_WXHWGKZYSBD.zysj
+  is '作业时间';
+comment on column YJPT_WXHWGKZYSBD.zydd
+  is '作业地点';
+comment on column YJPT_WXHWGKZYSBD.aqffcs
+  is '安全防范措施';
+comment on column YJPT_WXHWGKZYSBD.bgr
+  is '报告人';
+comment on column YJPT_WXHWGKZYSBD.lxfs
+  is '联系方式';
+comment on column YJPT_WXHWGKZYSBD.bgsj
+  is '报告时间';
+comment on column YJPT_WXHWGKZYSBD.zyddqybh
+  is '作业场所选择企业内部编号';
+comment on column YJPT_WXHWGKZYSBD.kpsj
+  is '靠泊时间';
+comment on column YJPT_WXHWGKZYSBD.zylx
+  is '作业类型';
+comment on column YJPT_WXHWGKZYSBD.sg
+  is '上港';
+comment on column YJPT_WXHWGKZYSBD.xg
+  is '下港';
+comment on column YJPT_WXHWGKZYSBD.kgsj
+  is '开工时间';
+comment on column YJPT_WXHWGKZYSBD.wgsj
+  is '完工时间';
+comment on column YJPT_WXHWGKZYSBD.kgzt
+  is '开工状态';
+comment on column YJPT_WXHWGKZYSBD.wgzt
+  is '完工状态';
+comment on column YJPT_WXHWGKZYSBD.gjbh
+  is '国际编号';
+comment on column YJPT_WXHWGKZYSBD.zysjq
+  is '作业时间起';
+comment on column YJPT_WXHWGKZYSBD.zysjz
+  is '作业时间止';
+comment on column YJPT_WXHWGKZYSBD.qxzysj
+  is '取消作业时间';
+comment on column YJPT_WXHWGKZYSBD.zyddqt
+  is '作业地点其他的选项';
+comment on column YJPT_WXHWGKZYSBD.wxhwmcbh
+  is '危险货物品种编号';
+comment on column YJPT_WXHWGKZYSBD.inorout
+  is '进或者出港';
+comment on column YJPT_WXHWGKZYSBD.hwzl
+  is '货物种类';
+comment on column YJPT_WXHWGKZYSBD.jzxsl
+  is '集装箱数量';
+comment on column YJPT_WXHWGKZYSBD.hwxs
+  is '货物形式';
+comment on column YJPT_WXHWGKZYSBD.hc
+  is '航次';
+comment on column YJPT_WXHWGKZYSBD.cbbh 
+  is '船舶编号';
+comment on column YJPT_WXHWGKZYSBD.cnno
+  is '物品CN编码';
+comment on column YJPT_WXHWGKZYSBD.hzwxx
+  is '火灾危险性';
+comment on column YJPT_WXHWGKZYSBD.dxdj
+  is '毒性等级';
+comment on column YJPT_WXHWGKZYSBD.wrlb
+  is '污染类别';
+  comment on column YJPT_WXHWGKZYSBD.bzlb
+  is '包装类别';
+comment on column YJPT_WXHWGKZYSBD.mao
+  is '内贸外贸';
+COMMENT ON COLUMN YJPT_WXHWGKZYSBD.SL20C 
+ IS '20''集装箱数量';
+COMMENT ON COLUMN YJPT_WXHWGKZYSBD.SL40C 
+ IS '40''集装箱数量';
+COMMENT ON COLUMN YJPT_WXHWGKZYSBD.SL45C
+ IS '45''集装箱数量';
+COMMENT ON COLUMN YJPT_WXHWGKZYSBD.SLSPC
+ IS '特种集装箱数量';
+COMMENT ON COLUMN YJPT_WXHWGKZYSBD.SL20T 
+ IS '20''罐柜数量';
+COMMENT ON COLUMN YJPT_WXHWGKZYSBD.SL40T 
+ IS '40''罐柜数量';
+COMMENT ON COLUMN YJPT_WXHWGKZYSBD.TEU
+ IS 'TEU';
+ COMMENT ON COLUMN YJPT_WXHWGKZYSBD.YWCM
+ IS '英文船名';
+alter table YJPT_WXHWGKZYSBD
+  add constraint PK_YJPT_WXHWGKZYSBD primary key (ID);
+