|
@@ -7,6 +7,7 @@ import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.LinkedList;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
import javax.persistence.criteria.CriteriaBuilder;
|
|
|
import javax.persistence.criteria.CriteriaBuilder.In;
|
|
@@ -29,6 +30,8 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import cache.CacheSearchCondition;
|
|
|
+
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.xt.jygl.accessory.entity.AccessoryEntity;
|
|
|
import com.xt.jygl.accessory.service.AccessoryService;
|
|
@@ -211,6 +214,7 @@ public class XkzzxCtl extends BaseWebCtl {
|
|
|
model.addAttribute("jyr", jyr);
|
|
|
}
|
|
|
model.addAttribute("user", user);
|
|
|
+ final Map<String, Object> cacheSCmap = CacheSearchCondition.cacheSCmap(request, "gkjyxkzx");
|
|
|
// 查询条件
|
|
|
Specification<XkzzxEntity> spec = new Specification<XkzzxEntity>() {
|
|
|
@Override
|
|
@@ -218,21 +222,51 @@ public class XkzzxCtl extends BaseWebCtl {
|
|
|
List<Predicate> list = new ArrayList<Predicate>();
|
|
|
if (StringUtils.isNotEmpty(szdid)) {
|
|
|
list.add(cb.like(root.get("szd").get("id").as(String.class), "%" + szdid + "%"));
|
|
|
+ } else if (isGET(request)) {
|
|
|
+ String v = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "szdid");
|
|
|
+ if (StringUtils.isNotEmpty(v)) {
|
|
|
+ list.add(cb.like(root.get("szd").get("id").as(String.class), "%" + v + "%"));
|
|
|
+ }
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(szgkid)) {
|
|
|
list.add(cb.like(root.get("szgk").get("id").as(String.class), "%" + szgkid + "%"));
|
|
|
+ } else if (isGET(request)) {
|
|
|
+ String v = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "szgkid");
|
|
|
+ if (StringUtils.isNotEmpty(v)) {
|
|
|
+ list.add(cb.like(root.get("szgk").get("id").as(String.class), "%" + v + "%"));
|
|
|
+ }
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(szgqid)) {
|
|
|
list.add(cb.like(root.get("szgq").get("id").as(String.class), "%" + szgqid + "%"));
|
|
|
+ } else if (isGET(request)) {
|
|
|
+ String v = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "szgqid");
|
|
|
+ if (StringUtils.isNotEmpty(v)) {
|
|
|
+ list.add(cb.like(root.get("szgq").get("id").as(String.class), "%" + v + "%"));
|
|
|
+ }
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(gkjyr)) {
|
|
|
list.add(cb.like(root.get("jyrmc").as(String.class), "%" + gkjyr + "%"));
|
|
|
+ } else if (isGET(request)) {
|
|
|
+ String v = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "gkjyr");
|
|
|
+ if (StringUtils.isNotEmpty(v)) {
|
|
|
+ list.add(cb.like(root.get("jyrmc").as(String.class), "%" + v + "%"));
|
|
|
+ }
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(fddbr)) {
|
|
|
list.add(cb.like(root.get("fddbr").as(String.class), "%" + fddbr + "%"));
|
|
|
+ } else if (isGET(request)) {
|
|
|
+ String v = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "fddbr");
|
|
|
+ if (StringUtils.isNotEmpty(v)) {
|
|
|
+ list.add(cb.like(root.get("fddbr").as(String.class), "%" + v + "%"));
|
|
|
+ }
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(bgdd)) {
|
|
|
list.add(cb.like(root.get("bgdd").as(String.class), "%" + bgdd + "%"));
|
|
|
+ } else if (isGET(request)) {
|
|
|
+ String v = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "bgdd");
|
|
|
+ if (StringUtils.isNotEmpty(v)) {
|
|
|
+ list.add(cb.like(root.get("bgdd").as(String.class), "%" + v + "%"));
|
|
|
+ }
|
|
|
}
|
|
|
list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
|
|
|
list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORE_STATE_COPY));
|
|
@@ -295,10 +329,11 @@ public class XkzzxCtl extends BaseWebCtl {
|
|
|
}
|
|
|
if (isPOST(request)) {
|
|
|
SearchCondition.xkzzxpage = page.getPage();
|
|
|
+ CacheSearchCondition.putCacheSCmap(request.getParameterMap(), cacheSCmap);
|
|
|
}
|
|
|
- model.addAttribute("gkjyr", gkjyr);
|
|
|
- model.addAttribute("fddbr", fddbr);
|
|
|
- model.addAttribute("bgdd", bgdd);
|
|
|
+ model.addAttribute("gkjyr", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "gkjyr"));
|
|
|
+ model.addAttribute("fddbr", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "fddbr"));
|
|
|
+ model.addAttribute("bgdd", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "bgdd"));
|
|
|
model.addAttribute("list", voList);
|
|
|
model.addAttribute("menuid", menuid);
|
|
|
// 翻页共通
|