|
@@ -1,17 +1,27 @@
|
|
|
package com.jtgh.yjpt.webService.zcdc.dc;
|
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
import javax.jws.HandlerChain;
|
|
|
import javax.jws.WebService;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
+import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.jtgh.yjpt.common.Constants;
|
|
|
import com.jtgh.yjpt.common.GlobalData;
|
|
|
+import com.jtgh.yjpt.common.PredicateModel;
|
|
|
+import com.jtgh.yjpt.common.PredicateModel.Operator;
|
|
|
+import com.jtgh.yjpt.common.SinglePageRequest;
|
|
|
+import com.jtgh.yjpt.common.SpecificationCreater;
|
|
|
+import com.jtgh.yjpt.controller.BaseController;
|
|
|
+import com.jtgh.yjpt.entity.BaseEntity;
|
|
|
import com.jtgh.yjpt.entity.check.DcEntity;
|
|
|
import com.jtgh.yjpt.service.check.DcService;
|
|
|
-import com.jtgh.yjpt.webService.BaseWebService;
|
|
|
import com.jtgh.yjpt.webService.WsResult;
|
|
|
/**
|
|
|
* 督察WebService
|
|
@@ -22,7 +32,7 @@ import com.jtgh.yjpt.webService.WsResult;
|
|
|
@Service
|
|
|
@WebService(targetNamespace = "http://webService.yjpt.com/", serviceName = "dcService")
|
|
|
@HandlerChain(file="handle-chain.xml")
|
|
|
-public class DcWebService extends BaseWebService {
|
|
|
+public class DcWebService extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private DcService dcService;
|
|
@@ -58,4 +68,23 @@ public class DcWebService extends BaseWebService {
|
|
|
}
|
|
|
return ws;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据储罐获得督查列表
|
|
|
+ */
|
|
|
+ public List<DcEntity> getDCByCg(long cgId,int pageSize,int pageNum){
|
|
|
+ SinglePageRequest page = new SinglePageRequest(pageNum, pageSize, "desc", "id");
|
|
|
+ List<PredicateModel> filterList = new ArrayList<PredicateModel>();
|
|
|
+ // 所属储罐
|
|
|
+ addNotEmptyModel(filterList, "cg", cgId, Operator.EQ);
|
|
|
+ // 隐患区域-罐区
|
|
|
+ addNotEmptyModel(filterList, "yhqy", "2", Operator.EQ);
|
|
|
+ addNotEmptyModel(filterList, "recordStatus",BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
|
|
|
+ Specification<DcEntity> spec = SpecificationCreater.searchByPredicateModels(filterList);
|
|
|
+ Page<DcEntity> pageContent = dcService.findAll(spec, page);
|
|
|
+ return pageContent.getContent();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|