Переглянути джерело

git-svn-id: https://192.168.57.71/svn/jsgkj@33 931142cf-59ea-a443-aa0e-51397b428577

ld_liufl 9 роки тому
батько
коміт
51cada21e2

+ 33 - 20
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/fz/FzService.java

@@ -20,50 +20,63 @@ import com.jtgh.yjpt.service.zyfzndjy.GkwxhwzyfzblhhzService;
 
 @Service
 @WebService(targetNamespace = "http://webService.yjpt.com/", serviceName = "fzService")
-@HandlerChain(file="handle-chain.xml")
-public class FzService extends BaseController{
-	
+@HandlerChain(file = "handle-chain.xml")
+public class FzService extends BaseController {
+
 	@Autowired
 	private GkwxhwzyfzblhhzService gkwxhwzyfzblhhzService;
-	public List<GkwxhwzyfzblhhzEntity> list( String szd,String ssgq,String gkjyr,String whdj,String fddbr) {
-		
-		try {
 
+	/**
+	 * 一览查询列表
+	 * 
+	 * @param szd
+	 *            所在地
+	 * @param ssgq
+	 *            港区
+	 * @param gkjyr
+	 *            经营人名称
+	 * @param whdj
+	 *            危货等级
+	 * @param fddbr
+	 *            法定代表人
+	 * @return
+	 */
+	public List<GkwxhwzyfzblhhzEntity> list(String szd, String ssgq,
+			String gkjyr, String whdj, String fddbr) {
+		try {
 			List<PredicateModel> filterList = new ArrayList<PredicateModel>();
 			// 只检索非删除状态记录
 			addNotEmptyModel(filterList, "recordStatus",
 					BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
 			// 根据所在地过滤
 			if (szd != null)
-				addNotEmptyModel(filterList, "szd.id", szd,
-						Operator.EQ);
+				addNotEmptyModel(filterList, "szd.id", szd, Operator.EQ);
 			// 根据港区过滤
-			if(ssgq != null && !ssgq.equals("")){
+			if (ssgq != null && !ssgq.equals("")) {
 				addNotEmptyModel(filterList, "ssgq.id", ssgq, Operator.EQ);
 			}
-			if(gkjyr != null && !gkjyr.equals("")){
-				addNotEmptyModel(filterList, "jyrVo.id",gkjyr, Operator.EQ);
-						}
-			if(whdj != null && !whdj.equals("")){
+			// 根据港口经营人过滤
+			if (gkjyr != null && !gkjyr.equals("")) {
+				addNotEmptyModel(filterList, "jyrVo.id", gkjyr, Operator.EQ);
+			}
+			// 根据危货等级过滤
+			if (whdj != null && !whdj.equals("")) {
 				addNotEmptyModel(filterList, "whdj.id", whdj, Operator.EQ);
 			}
-			if(fddbr != null && !fddbr.equals("")){
+			// 根据法定代表人过滤
+			if (fddbr != null && !fddbr.equals("")) {
 				addNotEmptyModel(filterList, "fddbr", fddbr, Operator.LIKE);
 			}
 			Specification<GkwxhwzyfzblhhzEntity> spec = SpecificationCreater
 					.searchByPredicateModels(filterList);
 			List<GkwxhwzyfzblhhzEntity> list = gkwxhwzyfzblhhzService
 					.findAll(spec);
-			/*for(GkwxhwzyfzblhhzEntity gkwxhwzyfzblhhzEntity :list){
-				if(gkwxhwzyfzblhhzEntity.getTaskList() != null && gkwxhwzyfzblhhzEntity.getTaskList().size()>0){
-					gkwxhwzyfzblhhzEntity.getTaskList().get(0);
-				}
-			}*/
 			return list;
-		
+
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
 		return null;
 	}
+	
 }