|
@@ -0,0 +1,48 @@
|
|
|
+package com.jtgh.yjpt.controller.cgInfo;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+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.flex.remoting.RemotingDestination;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+
|
|
|
+import com.jtgh.yjpt.anon.Log;
|
|
|
+import com.jtgh.yjpt.anon.Log.Type;
|
|
|
+import com.jtgh.yjpt.common.BusinessContext;
|
|
|
+import com.jtgh.yjpt.common.PredicateModel;
|
|
|
+import com.jtgh.yjpt.common.PredicateModel.Operator;
|
|
|
+import com.jtgh.yjpt.common.SpecificationCreater;
|
|
|
+import com.jtgh.yjpt.controller.BaseController;
|
|
|
+import com.jtgh.yjpt.entity.BaseEntity;
|
|
|
+import com.jtgh.yjpt.entity.cginfo.CgInfoEntity;
|
|
|
+import com.jtgh.yjpt.service.cginfo.CgInfoService;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 储罐基本信息Controller
|
|
|
+ *
|
|
|
+ */
|
|
|
+
|
|
|
+@Controller
|
|
|
+@RemotingDestination
|
|
|
+@Log(menuCode = "003008", menuCodeJyr = "003008_c")
|
|
|
+public class cgInfoController extends BaseController {
|
|
|
+ @Autowired
|
|
|
+ CgInfoService cgInfoService;
|
|
|
+
|
|
|
+ @Log(Type.QUERY)
|
|
|
+ public BusinessContext list(Pageable pageable,Long functionId) {
|
|
|
+ List<PredicateModel> filterList = new ArrayList<PredicateModel>();
|
|
|
+ // 只检索非删除状态记录
|
|
|
+ addNotEmptyModel(filterList, "recordStatus", BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
|
|
|
+ Specification<CgInfoEntity> spec = SpecificationCreater.searchByPredicateModels(filterList);
|
|
|
+ Page<CgInfoEntity> pageList = cgInfoService.findAll(spec, pageable);
|
|
|
+ BusinessContext bc = createBusinessContext(pageList);
|
|
|
+ return bc;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|