浏览代码

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

xt_xuhao 8 年之前
父节点
当前提交
063993e6dd

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

@@ -1,5 +1,6 @@
 package com.jtgh.cjhs.dao;
 
+import java.util.Date;
 import java.util.List;
 
 import org.springframework.data.jpa.repository.Query;
@@ -15,8 +16,8 @@ import com.jtgh.cjhs.entity.DtywCbsbEntity;
  */
 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)
-	public List<DtywCbsbEntity> findByZwcm(String zwcm);
+	@Query(value = " SELECT * FROM (SELECT * FROM DTYW_CBSB WHERE ZWCM=?1 AND ?2-1<=KSZYSJ AND KSZYSJ<=?2+1 ORDER BY MRUT DESC)WHERE  ROWNUM<2   ", nativeQuery = true)
+	public List<DtywCbsbEntity> findByZwcm(String zwcm,Date bgsj);
 
 	/**
 	 * 固体货物表

+ 2 - 1
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/DtywCbsbService.java

@@ -1,5 +1,6 @@
 package com.jtgh.cjhs.service;
 
+import java.util.Date;
 import java.util.List;
 
 import org.springframework.data.domain.Page;
@@ -25,7 +26,7 @@ public interface DtywCbsbService {
 
 	public DtywCbsbEntity findBySbdbh(String sbdbh);
 
-	public List<DtywCbsbEntity> findByZwcm(String zwcm);
+	public List<DtywCbsbEntity> findByZwcm(String zwcm,Date bgsj);
 
 	public List<DtywCbsbgtHwEntity> findCbsbgtHwBySbdbh(String sbdbh);
 

+ 3 - 2
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/DtywCbsbServiceImpl.java

@@ -1,6 +1,7 @@
 package com.jtgh.cjhs.service.impl;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
 
@@ -39,8 +40,8 @@ public class DtywCbsbServiceImpl extends
 	}
 
 	@Override
-	public List<DtywCbsbEntity> findByZwcm(String zwcm) {
-		return dtywCbsbDao.findByZwcm(zwcm);
+	public List<DtywCbsbEntity> findByZwcm(String zwcm,Date bgsj) {
+		return dtywCbsbDao.findByZwcm(zwcm,bgsj);
 	}
 
 	/**

+ 15 - 18
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/controller/check/DcController.java

@@ -92,14 +92,13 @@ public class DcController extends BaseController {
 	 * @throws ParseException
 	 */
 	@Log(Type.QUERY)
-	public BusinessContext list(SinglePageRequest pageRequest, Long functionId,
-			DcEntity entity, Date jcsjK, Date jcsjZ) throws ParseException {
+	public BusinessContext list(SinglePageRequest pageRequest, Long functionId,DcEntity entity, Date jcsjK, Date jcsjZ)
+			throws ParseException {
 		BusinessContext bc = new BusinessContext();
 		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
 		addRecordCodeFilter(functionId, filterList, null, "bdcdw");
 		if (null != entity.getSzd()) {
-			addNotEmptyModel(filterList, "szd.id", entity.getSzd().getId(),
-					Operator.LIKE_R);
+			addNotEmptyModel(filterList, "szd.id", entity.getSzd().getId(),Operator.LIKE_R);
 		}
 		if (Constants.SZD_ID_PROVINCE.equals(Utils.getCurrentUserSzd())) {
 			//addNotEmptyModel(filterList, "pkj", "1", Operator.NEQ);//让省里能看到所有的
@@ -113,27 +112,25 @@ public class DcController extends BaseController {
 		addNotEmptyModel(filterList, "mqzt", entity.getMqzt(), Operator.EQ);
 		addNotEmptyModel(filterList, "original", "original", Operator.NL);
 		if (jcsjK != null) {
-			addNotEmptyModel(filterList, "sj", Utils.getDateFirstTime(jcsjK),
-					Operator.GTE);
+			addNotEmptyModel(filterList, "sj", Utils.getDateFirstTime(jcsjK),Operator.GTE);
 		}
 		if (jcsjZ != null) {
-			addNotEmptyModel(filterList, "sj", Utils.getDateLastTime(jcsjZ),
-					Operator.LTE);
+			addNotEmptyModel(filterList, "sj", Utils.getDateLastTime(jcsjZ),Operator.LTE);
 		}
-		addNotEmptyModel(filterList, "bdcdwfzr", entity.getBdcdwfzr(),
-				Operator.LIKE);
-		addNotEmptyModel(filterList, "recordStatus",
-				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
-		Specification<DcEntity> spec = SpecificationCreater
-				.searchByPredicateModels(filterList);
+		addNotEmptyModel(filterList, "bdcdwfzr", entity.getBdcdwfzr(),Operator.LIKE);
+		addNotEmptyModel(filterList, "recordStatus",BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+		//plus by xuhao 20160208
+		//行政人员不要看到未提交的数据
+		if(Utils.getCurrentUser().getSfjyr().equals(Constants.NO)){
+			addNotEmptyModel(filterList, "recordStatus",BaseEntity.RECORD_STATE_VALID, Operator.NEQ);
+		}
+		Specification<DcEntity> spec = SpecificationCreater.searchByPredicateModels(filterList);
 		Page<DcEntity> page = dcService.findAll(spec, pageRequest);
 		for (DcEntity ba : page) {
-			if (dcService.getTaskByUserAndBusKey(Utils.getCurrentUser().getId()
-					.toString(), ba.getId().toString()) != null) {
+			if (dcService.getTaskByUserAndBusKey(Utils.getCurrentUser().getId().toString(), ba.getId().toString()) != null) {
 				ba.setTaskState(Constants.TASK_ASSIGN);
 			} else if (dcService
-					.getCandidateTaskByUserAndBusKey(Utils.getCurrentUser()
-							.getId().toString(), ba.getId().toString()) != null) {
+					.getCandidateTaskByUserAndBusKey(Utils.getCurrentUser().getId().toString(), ba.getId().toString()) != null) {
 				ba.setTaskState(Constants.TASK_CANDIDATE);
 			}
 			if (ba.getTaskList() != null && ba.getTaskList().size() > 0) {

+ 4 - 2
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/cjhs/CjhsServiceImpl.java

@@ -51,14 +51,15 @@ public class CjhsServiceImpl implements CjhsService {
 			
 			if (cjhsdbList == null || cjhsdbList.size() <= 0) {
 				/***************比对库中根据危货申报ID没有找到匹配数据*****************/
-				List<DtywCbsbEntity> dtywCbsbEntityList = dtywCbsbService.findByZwcm(zysqbpEntity.getCm());//根据船名获得“更新时间”最新的一条数据
+				//根据船名、危货申报的作业时间起与海事开始作业时间前后浮动一天
+				List<DtywCbsbEntity> dtywCbsbEntityList = dtywCbsbService.findByZwcm(zysqbpEntity.getCm(),zysqbpEntity.getZysjq());
 				if (dtywCbsbEntityList != null && dtywCbsbEntityList.size() > 0) {
 					//yjpt比对库中没有匹配数据,从前置库海事申报table中根据船名拿到一个申报数据
 					DtywCbsbEntity dtywCbsbEntity = dtywCbsbEntityList.get(0);
 					cjhs = changeFromDtywCbsb(dtywCbsbEntity);
 				}
 				
-				//匹配到的第一条输入存入yjpt库比对表,不管匹配是否准确(匹配规则:根据船名获得“更新时间”最新的一条数据)
+				//匹配到的第一条输入存入yjpt库比对表,不管匹配是否准确(匹配规则:根据船名获得“更新时间”最新的一条数据)
 				if (cjhs != null && cjhs.getHshwList() != null) {
 					CjhsHwEntity cjhsHw = cjhs.getHshwList().get(0);
 					CjhsDbEntity db = new CjhsDbEntity();
@@ -70,6 +71,7 @@ public class CjhsServiceImpl implements CjhsService {
 				}//end if not null , save into  yjpt.T_CJHS_GKBD
 			}//end if 
 			else {
+				/***************比对库中根据危货申报ID找到匹配数据*****************/
 				CjhsDbEntity cjhsdbEntity = cjhsdbList.get(0);//比对库中根据危货申报ID找到匹配数据(不管几条,拿第一条,理论上也只有一条)
 				//用比对库中拿到的海事申报编号到前置库:危险品申报信息表(DTYW_CBSB)拿到海事申报的详细信息
 				DtywCbsbEntity dtywCbsbEntity = dtywCbsbService.findBySbdbh(cjhsdbEntity.getHssbbh());

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

@@ -1,23 +1,22 @@
-\ufeff#***************************************  jdbc info  ********************************************#
+#***************************************  jdbc info  ********************************************#
 jdbc.driver                 = oracle.jdbc.driver.OracleDriver
 jdbc.url                      = jdbc:oracle:thin:@192.168.57.36:1521:orcl
 jdbc.username           = yjpthb
 jdbc.password            = yjpthb
 hibernate.dialect        = org.hibernate.dialect.Oracle10gDialect
 #********************************** qlyg jdbc info**********************************************#
-jdbc.qlyg.url               =
-jdbc.qlyg.username    =
+jdbc.qlyg.url               = jdbc:oracle:thin:@172.18.40.3:1521:orcl
+jdbc.qlyg.username    = 
 jdbc.qlyg.password     = 
 #********************************** xzzx jdbc info**********************************************#
 jdbc.xzzx.url               = 
 jdbc.xzzx.username    =  
-jdbc.xzzx.password     =  
-
+jdbc.xzzx.password     = 
 #********************************** cjhs jdbc info**********************************************#
-jdbc.cjhs.url               =  jdbc:oracle:thin:@192.168.57.36:1521:orcl
-jdbc.cjhs.username    =  hbhs
-jdbc.cjhs.password     =  hbhs
-
+jdbc.cjhs.url               =  jdbc:oracle:thin:@192.168.41.26:1521:orcl
+jdbc.cjhs.username    =  hs
+jdbc.cjhs.password     =  hs
+ 
 #dbcp settings
 dbcp.maxIdle=30
 dbcp.minIdle=5
@@ -28,7 +27,7 @@ hibernate.hbm2ddl.auto=
 
 # local WebService
 web.service.url=localhost
-web.service.port=8086
+web.service.port=18088
 
 # Province WebService 
 web.province.service.url=
@@ -41,25 +40,23 @@ jyr.gkyxq=7
 # \u53d1\u9001\u201c\u7981\u6b62\u4f5c\u4e1a\u201d\u63d0\u9192\u7684\u89d2\u8272\u7c7b\u578b-\u5ba1\u67e5004
 jyr.jzzy.roleType=004
 #\u4f5c\u4e1a\u7533\u62a5\u7248\u672c\u65f6\u95f4YYYYMMDD
-zysb.version.date=20150508
+zysb.version.date=20160505
 #\u9644\u8bc1\u5e74\u5ba1\u5f00\u59cb\u68c0\u6d4b\u5e74\u4efd
-fzns.check.date=2017
+fzns.check.date=2018
 #\u7763\u67e5\u662f\u5426\u5e02\u7ea7\u5ba1\u6279(Y/N)
 dc.sjsp=N
-#\u7763\u67e5\u662f\u5426\u5ef6\u671f\u6574\u6539(Y/N)
-dc.yqzg=Y
 #\u4f5c\u4e1a\u7533\u62a572\u5c0f\u65f6\u5224\u65ad(Y/N)
 zysb.check=N
 #\u5bc6\u94a5
-my_yjpt_gkj=yjpt_gkj
+my_yjpt_gkj=yjpt_ghj
 #\u81ea\u67e5\u5ef6\u671f\u671f\u9650
 zcyh.yqsj=2
 
 #\u9644\u8bc1\u4e8c\u7ef4\u7801\u5730\u5740
-fz.qrcode=http://m.yuanxd.com:8091/weixinoa/mobile/fuzheng/wxhwzyfz.jsp?code=
+fz.qrcode=http://hbwx.yuanxd.com:8703/weixinoa/gkoawx/fuzheng/wxhwzyfz.jsp?code=
 
 #\u83b7\u53d6\u6570\u636e\u670d\u52a1\u5730\u5740
-data.url=http://10.7.32.3:8610/dataServer
+data.url=http://172.18.40.2:8701/dataServer
 #Gis\u5730\u56fe\u5730\u5740
-gis.url=http://112.4.174.66:8600/gisServer/main?token=
+gis.url=http://58.49.53.52:8707/gisServer/main?token=
 

+ 1 - 1
gkaq/yjpt-java/trunk/resources/spring/applicationContext.xml

@@ -33,7 +33,7 @@
 				<prop key="hibernate.dialect">${hibernate.dialect}</prop>
 				<prop key="hibernate.ejb.naming_strategy">org.hibernate.cfg.ImprovedNamingStrategy</prop>
 				<prop key="hibernate.jdbc.use_streams_for_binary">true</prop>
-				<prop key="hibernate.show_sql">false</prop>
+				<prop key="hibernate.show_sql">true</prop>
 				<prop key="hibernate.format_sql">true</prop>
 			</props>
 		</property>