|
@@ -77,10 +77,10 @@ public class XkzfzCtl extends BaseWebCtl {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/main")
|
|
|
- public String main(SimplePageRequest page, Model model,final HttpServletRequest request, final String ssjyr, final String szdid, final String szgkid, final String szgqid, final String fzsqh, String menuid,final String fzsfyx,final String wxhwpm,final String fzsfdq) throws JsonProcessingException {
|
|
|
- final Map<String, Object> cacheSCmap = CacheSearchCondition.cacheSCmap(request,"xkzfz");
|
|
|
+ public String main(SimplePageRequest page, Model model, final HttpServletRequest request, final String ssjyr, final String szdid, final String szgkid, final String szgqid, final String fzsqh, String menuid, final String fzsfyx, final String wxhwpm, final String fzsfdq) throws JsonProcessingException {
|
|
|
+ final Map<String, Object> cacheSCmap = CacheSearchCondition.cacheSCmap(request, "xkzfz");
|
|
|
final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
-
|
|
|
+
|
|
|
// 查詢條件
|
|
|
Specification<XkzfzEntity> spec = new Specification<XkzfzEntity>() {
|
|
|
|
|
@@ -89,134 +89,152 @@ public class XkzfzCtl 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) ){
|
|
|
+ } 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 + "%"));
|
|
|
}
|
|
|
}
|
|
|
-// else if(StringUtils.isNotEmpty(SearchCondition.fzszdid)&&isGET(request)){
|
|
|
-// list.add(cb.like(root.get("szd").get("id").as(String.class), "%" + SearchCondition.fzszdid + "%"));
|
|
|
-// }
|
|
|
+ // else
|
|
|
+ // if(StringUtils.isNotEmpty(SearchCondition.fzszdid)&&isGET(request)){
|
|
|
+ // list.add(cb.like(root.get("szd").get("id").as(String.class),
|
|
|
+ // "%" + SearchCondition.fzszdid + "%"));
|
|
|
+ // }
|
|
|
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) ){
|
|
|
+ } 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 + "%"));
|
|
|
}
|
|
|
}
|
|
|
-// else if(StringUtils.isNotEmpty(SearchCondition.fzszgkid)&&isGET(request)){
|
|
|
-// list.add(cb.like(root.get("szgk").get("id").as(String.class), "%" + SearchCondition.fzszgkid + "%"));
|
|
|
-// }
|
|
|
+ // else
|
|
|
+ // if(StringUtils.isNotEmpty(SearchCondition.fzszgkid)&&isGET(request)){
|
|
|
+ // list.add(cb.like(root.get("szgk").get("id").as(String.class),
|
|
|
+ // "%" + SearchCondition.fzszgkid + "%"));
|
|
|
+ // }
|
|
|
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) ){
|
|
|
+ } 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 + "%"));
|
|
|
}
|
|
|
}
|
|
|
-// else if(StringUtils.isNotEmpty(SearchCondition.fzszgqid)&&isGET(request)){
|
|
|
-// list.add(cb.like(root.get("szgq").get("id").as(String.class), "%" + SearchCondition.fzszgqid + "%"));
|
|
|
-// }
|
|
|
+ // else
|
|
|
+ // if(StringUtils.isNotEmpty(SearchCondition.fzszgqid)&&isGET(request)){
|
|
|
+ // list.add(cb.like(root.get("szgq").get("id").as(String.class),
|
|
|
+ // "%" + SearchCondition.fzszgqid + "%"));
|
|
|
+ // }
|
|
|
if (StringUtils.isNotEmpty(ssjyr)) {
|
|
|
list.add(cb.like(root.get("ssjyr").get("gkjyr").as(String.class), "%" + ssjyr + "%"));
|
|
|
- }else if(isGET(request)){
|
|
|
- String v=(String)CacheSearchCondition.cacheSCmapVal(cacheSCmap, "ssjyr");
|
|
|
- if(StringUtils.isNotEmpty(v) ){
|
|
|
+ } else if (isGET(request)) {
|
|
|
+ String v = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "ssjyr");
|
|
|
+ if (StringUtils.isNotEmpty(v)) {
|
|
|
list.add(cb.like(root.get("ssjyr").get("gkjyr").as(String.class), "%" + v + "%"));
|
|
|
}
|
|
|
}
|
|
|
-// else if(StringUtils.isNotEmpty(SearchCondition.fzssjyr)&&isGET(request)){
|
|
|
-// list.add(cb.like(root.get("ssjyr").get("gkjyr").as(String.class), "%" + SearchCondition.fzssjyr + "%"));
|
|
|
-// }
|
|
|
+ // else
|
|
|
+ // if(StringUtils.isNotEmpty(SearchCondition.fzssjyr)&&isGET(request)){
|
|
|
+ // list.add(cb.like(root.get("ssjyr").get("gkjyr").as(String.class),
|
|
|
+ // "%" + SearchCondition.fzssjyr + "%"));
|
|
|
+ // }
|
|
|
if (StringUtils.isNotEmpty(fzsqh)) {
|
|
|
list.add(cb.like(root.get("fzsqh").as(String.class), "%" + fzsqh + "%"));
|
|
|
- }else if(isGET(request)){
|
|
|
- String v=(String)CacheSearchCondition.cacheSCmapVal(cacheSCmap, "fzsqh");
|
|
|
- if(StringUtils.isNotEmpty(v) ){
|
|
|
+ } else if (isGET(request)) {
|
|
|
+ String v = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "fzsqh");
|
|
|
+ if (StringUtils.isNotEmpty(v)) {
|
|
|
list.add(cb.like(root.get("fzsqh").as(String.class), "%" + v + "%"));
|
|
|
}
|
|
|
}
|
|
|
-// else if(StringUtils.isNotEmpty(SearchCondition.fzsqh)&&isGET(request)){
|
|
|
-// list.add(cb.like(root.get("fzsqh").as(String.class), "%" + SearchCondition.fzsqh + "%"));
|
|
|
-// }
|
|
|
+ // else
|
|
|
+ // if(StringUtils.isNotEmpty(SearchCondition.fzsqh)&&isGET(request)){
|
|
|
+ // list.add(cb.like(root.get("fzsqh").as(String.class), "%" +
|
|
|
+ // SearchCondition.fzsqh + "%"));
|
|
|
+ // }
|
|
|
if (StringUtils.isNotEmpty(wxhwpm)) {
|
|
|
list.add(cb.like(root.get("wxhwpm").as(String.class), "%" + wxhwpm + "%"));
|
|
|
- }else if(isGET(request)){
|
|
|
- String v=(String)CacheSearchCondition.cacheSCmapVal(cacheSCmap, "wxhwpm");
|
|
|
- if(StringUtils.isNotEmpty(v) ){
|
|
|
+ } else if (isGET(request)) {
|
|
|
+ String v = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "wxhwpm");
|
|
|
+ if (StringUtils.isNotEmpty(v)) {
|
|
|
list.add(cb.like(root.get("wxhwpm").as(String.class), "%" + v + "%"));
|
|
|
}
|
|
|
}
|
|
|
-// else if(StringUtils.isNotEmpty(SearchCondition.fzwxhwpm)&&isGET(request)){
|
|
|
-// list.add(cb.like(root.get("wxhwpm").as(String.class), "%" + SearchCondition.fzwxhwpm + "%"));
|
|
|
-// }
|
|
|
- if(StringUtils.isNotEmpty(fzsfyx)){
|
|
|
- if(("是").equals(fzsfyx)){
|
|
|
+ // else
|
|
|
+ // if(StringUtils.isNotEmpty(SearchCondition.fzwxhwpm)&&isGET(request)){
|
|
|
+ // list.add(cb.like(root.get("wxhwpm").as(String.class), "%" +
|
|
|
+ // SearchCondition.fzwxhwpm + "%"));
|
|
|
+ // }
|
|
|
+ if (StringUtils.isNotEmpty(fzsfyx)) {
|
|
|
+ if (("是").equals(fzsfyx)) {
|
|
|
list.add(cb.equal(root.get("recordStatus").as(String.class), "1"));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
list.add(cb.notEqual(root.get("recordStatus").as(String.class), "1"));
|
|
|
}
|
|
|
- }else if(isGET(request)){
|
|
|
- String v=(String)CacheSearchCondition.cacheSCmapVal(cacheSCmap, "fzsfyx");
|
|
|
- if(StringUtils.isNotEmpty(v) ){
|
|
|
- if(("是").equals(v)){
|
|
|
+ } else if (isGET(request)) {
|
|
|
+ String v = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "fzsfyx");
|
|
|
+ if (StringUtils.isNotEmpty(v)) {
|
|
|
+ if (("是").equals(v)) {
|
|
|
list.add(cb.equal(root.get("recordStatus").as(String.class), "1"));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
list.add(cb.notEqual(root.get("recordStatus").as(String.class), "1"));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-// else if(StringUtils.isNotEmpty(SearchCondition.fzsfyx)&&isGET(request)){
|
|
|
-// if(("是").equals(SearchCondition.fzsfyx)){
|
|
|
-// list.add(cb.equal(root.get("recordStatus").as(String.class), "1"));
|
|
|
-// }else{
|
|
|
-// list.add(cb.notEqual(root.get("recordStatus").as(String.class), "1"));
|
|
|
-// }
|
|
|
-// }
|
|
|
+ // else
|
|
|
+ // if(StringUtils.isNotEmpty(SearchCondition.fzsfyx)&&isGET(request)){
|
|
|
+ // if(("是").equals(SearchCondition.fzsfyx)){
|
|
|
+ // list.add(cb.equal(root.get("recordStatus").as(String.class),
|
|
|
+ // "1"));
|
|
|
+ // }else{
|
|
|
+ // list.add(cb.notEqual(root.get("recordStatus").as(String.class),
|
|
|
+ // "1"));
|
|
|
+ // }
|
|
|
+ // }
|
|
|
Date now = new Date();
|
|
|
- if(StringUtils.isNotEmpty(fzsfdq)){
|
|
|
- if((fzsfdq).equals("6103")){
|
|
|
+ if (StringUtils.isNotEmpty(fzsfdq)) {
|
|
|
+ if ((fzsfdq).equals("6103")) {
|
|
|
list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class), now));
|
|
|
- }else if((fzsfdq).equals("6101")){
|
|
|
+ } else if ((fzsfdq).equals("6101")) {
|
|
|
list.add(cb.greaterThan(root.get("yxqjssj").as(Date.class), now));
|
|
|
- }else{
|
|
|
- list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class),DateTime.addDays(now, 30)));
|
|
|
+ } else {
|
|
|
+ list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class), DateTime.addDays(now, 30)));
|
|
|
}
|
|
|
-
|
|
|
- }else if(isGET(request)){
|
|
|
- String v=(String)CacheSearchCondition.cacheSCmapVal(cacheSCmap, "fzsfdq");
|
|
|
- if(StringUtils.isNotEmpty(v)){
|
|
|
- if(v.equals("6103")){
|
|
|
+
|
|
|
+ } else if (isGET(request)) {
|
|
|
+ String v = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "fzsfdq");
|
|
|
+ if (StringUtils.isNotEmpty(v)) {
|
|
|
+ if (v.equals("6103")) {
|
|
|
list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class), now));
|
|
|
- }else if(v.equals("6101")){
|
|
|
+ } else if (v.equals("6101")) {
|
|
|
list.add(cb.greaterThan(root.get("yxqjssj").as(Date.class), now));
|
|
|
- }else{
|
|
|
- list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class),DateTime.addDays(now, 30)));
|
|
|
+ } else {
|
|
|
+ list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class), DateTime.addDays(now, 30)));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-// else if(StringUtils.isNotEmpty(SearchCondition.fzsfdq)&&isGET(request)){
|
|
|
-// if((SearchCondition.fzsfdq).equals("6103")){
|
|
|
-// list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class), now));
|
|
|
-// }else if((SearchCondition.fzsfdq).equals("6101")){
|
|
|
-// list.add(cb.greaterThan(root.get("yxqjssj").as(Date.class), now));
|
|
|
-// }else{
|
|
|
-// list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class),DateTime.addDays(now, 30)));
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
+
|
|
|
+ // else
|
|
|
+ // if(StringUtils.isNotEmpty(SearchCondition.fzsfdq)&&isGET(request)){
|
|
|
+ // if((SearchCondition.fzsfdq).equals("6103")){
|
|
|
+ // list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class),
|
|
|
+ // now));
|
|
|
+ // }else if((SearchCondition.fzsfdq).equals("6101")){
|
|
|
+ // list.add(cb.greaterThan(root.get("yxqjssj").as(Date.class),
|
|
|
+ // now));
|
|
|
+ // }else{
|
|
|
+ // list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class),DateTime.addDays(now,
|
|
|
+ // 30)));
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
// 经营人只能查看自己企业下的数据,非经营人只能查看自己所在地的数据
|
|
|
if (isJyr()) {
|
|
|
list.add(cb.like(root.get("ssjyr").get("id").as(String.class), "%" + getSsjyr().getId() + "%"));
|
|
|
} else {
|
|
|
In<String> in = cb.in(root.get("szgq").get("id").as(String.class));
|
|
|
@SuppressWarnings("unchecked")
|
|
|
- List<String> gqlist = (List<String>) Utils.getSession()
|
|
|
- .getAttribute("gqList");
|
|
|
+ List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
|
|
|
if (gqlist != null && gqlist.size() > 0) {
|
|
|
for (int i = 0; i < gqlist.size(); i++) {
|
|
|
in.value(gqlist.get(i));
|
|
@@ -228,11 +246,11 @@ public class XkzfzCtl extends BaseWebCtl {
|
|
|
return cb.and(list.toArray(new Predicate[] {}));
|
|
|
}
|
|
|
};
|
|
|
- //判断登录用户是否和上次登录用户相同,若不同则清空查询条件
|
|
|
+ // 判断登录用户是否和上次登录用户相同,若不同则清空查询条件
|
|
|
String user1 = (String) Utils.getSession().getAttribute("user");
|
|
|
String user2 = SecUtils.getCurrUser().getId();
|
|
|
- if(user2!=null){
|
|
|
- if(!user2.equals(user1)){
|
|
|
+ if (user2 != null) {
|
|
|
+ if (!user2.equals(user1)) {
|
|
|
SearchCondition.fzpage = 1;
|
|
|
SearchCondition.fzsqh = "";
|
|
|
SearchCondition.fzszdid = "";
|
|
@@ -243,11 +261,11 @@ public class XkzfzCtl extends BaseWebCtl {
|
|
|
SearchCondition.fzsfyx = "";
|
|
|
SearchCondition.fzsfdq = "";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
Utils.getSession().setAttribute("user", user2);
|
|
|
-
|
|
|
- if(page.getPage()<1){
|
|
|
+
|
|
|
+ if (page.getPage() < 1) {
|
|
|
Object fzpage = CacheSearchCondition.cacheSCmapVal(cacheSCmap, "fzpage");
|
|
|
if (StringUtils.isEmpty(fzpage) || !org.apache.commons.lang.StringUtils.isNumeric(String.valueOf(fzpage))) {
|
|
|
fzpage = "1";
|
|
@@ -256,17 +274,17 @@ public class XkzfzCtl extends BaseWebCtl {
|
|
|
}
|
|
|
page.setSort("yxqjssj");
|
|
|
page.setOrder("desc");
|
|
|
-// if(isPOST(request)){
|
|
|
-// SearchCondition.fzpage=page.getPage();
|
|
|
-// SearchCondition.fzsqh=fzsqh;
|
|
|
-// SearchCondition.fzszdid=szdid;
|
|
|
-// SearchCondition.fzszgqid=szgqid;
|
|
|
-// SearchCondition.fzszgkid=szgkid;
|
|
|
-// SearchCondition.fzssjyr=ssjyr;
|
|
|
-// SearchCondition.fzsfyx= fzsfyx;
|
|
|
-// SearchCondition.fzwxhwpm = wxhwpm;
|
|
|
-// SearchCondition.fzsfdq = fzsfdq;
|
|
|
-// }
|
|
|
+ // if(isPOST(request)){
|
|
|
+ // SearchCondition.fzpage=page.getPage();
|
|
|
+ // SearchCondition.fzsqh=fzsqh;
|
|
|
+ // SearchCondition.fzszdid=szdid;
|
|
|
+ // SearchCondition.fzszgqid=szgqid;
|
|
|
+ // SearchCondition.fzszgkid=szgkid;
|
|
|
+ // SearchCondition.fzssjyr=ssjyr;
|
|
|
+ // SearchCondition.fzsfyx= fzsfyx;
|
|
|
+ // SearchCondition.fzwxhwpm = wxhwpm;
|
|
|
+ // SearchCondition.fzsfdq = fzsfdq;
|
|
|
+ // }
|
|
|
Page<XkzfzEntity> list = query.findAll(spec, toPageRequest(page), XkzfzEntity.class);
|
|
|
List<XkzfzVo> voList = new ArrayList<XkzfzVo>();
|
|
|
for (XkzfzEntity entity : list) {
|
|
@@ -303,16 +321,21 @@ public class XkzfzCtl extends BaseWebCtl {
|
|
|
voList.add(vo);
|
|
|
}
|
|
|
}
|
|
|
-// model.addAttribute("list", voList);
|
|
|
-// model.addAttribute("ssjyr", isPOST(request)?ssjyr:SearchCondition.fzssjyr);
|
|
|
-// model.addAttribute("szd", isPOST(request)?szdid:SearchCondition.fzszdid);
|
|
|
-// model.addAttribute("szgk", isPOST(request)?szgkid:SearchCondition.fzszgkid);
|
|
|
-// model.addAttribute("szgq", isPOST(request)?szgqid:SearchCondition.fzszgqid);
|
|
|
-// model.addAttribute("fzsqh", isPOST(request)?fzsqh:SearchCondition.fzsqh);
|
|
|
-// model.addAttribute("fzsfyx",isPOST(request)?fzsfyx:SearchCondition.fzsfyx);
|
|
|
-// model.addAttribute("fzwxhwpm",isPOST(request)?fzsfyx:SearchCondition.fzwxhwpm);
|
|
|
-// model.addAttribute("fzsfdq",isPOST(request)?fzsfdq:SearchCondition.fzsfdq);
|
|
|
-// model.addAttribute("menuid", menuid);
|
|
|
+ // model.addAttribute("list", voList);
|
|
|
+ // model.addAttribute("ssjyr",
|
|
|
+ // isPOST(request)?ssjyr:SearchCondition.fzssjyr);
|
|
|
+ // model.addAttribute("szd",
|
|
|
+ // isPOST(request)?szdid:SearchCondition.fzszdid);
|
|
|
+ // model.addAttribute("szgk",
|
|
|
+ // isPOST(request)?szgkid:SearchCondition.fzszgkid);
|
|
|
+ // model.addAttribute("szgq",
|
|
|
+ // isPOST(request)?szgqid:SearchCondition.fzszgqid);
|
|
|
+ // model.addAttribute("fzsqh",
|
|
|
+ // isPOST(request)?fzsqh:SearchCondition.fzsqh);
|
|
|
+ // model.addAttribute("fzsfyx",isPOST(request)?fzsfyx:SearchCondition.fzsfyx);
|
|
|
+ // model.addAttribute("fzwxhwpm",isPOST(request)?fzsfyx:SearchCondition.fzwxhwpm);
|
|
|
+ // model.addAttribute("fzsfdq",isPOST(request)?fzsfdq:SearchCondition.fzsfdq);
|
|
|
+ // model.addAttribute("menuid", menuid);
|
|
|
if (isPOST(request)) {
|
|
|
cacheSCmap.put("fzpage", page.getPage());
|
|
|
CacheSearchCondition.putCacheSCmap(request.getParameterMap(), cacheSCmap);
|
|
@@ -330,7 +353,7 @@ public class XkzfzCtl extends BaseWebCtl {
|
|
|
model.addAttribute("fzwxhwpm", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "wxhwpm"));
|
|
|
model.addAttribute("fzsfdq", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "fzsfdq"));
|
|
|
model.addAttribute("menuid", menuid);
|
|
|
-
|
|
|
+
|
|
|
// 翻页共通
|
|
|
putPageInfo(model, page, list);
|
|
|
return "gkjygl/gkjyr/jyrxkzfz/xkzfzmain";
|
|
@@ -462,7 +485,7 @@ public class XkzfzCtl extends BaseWebCtl {
|
|
|
int serverPort = request.getServerPort();
|
|
|
String address = InetAddress.getLocalHost().getHostAddress();
|
|
|
QrcodeFactory qf = new QrcodeFactory(140, 140, 45, 45);
|
|
|
- qf.createQrcode("http://" + address + ":" + serverPort + "/jygl/xkzfz/viewWhfzList?id=" + id, path + "twoCodeFz.png", path + "login_logo.png");
|
|
|
+ qf.createQrcode("http://" + address + ":" + serverPort + "/" + request.getContextPath() + "/xkzfz/viewWhfzList?id=" + id, path + "twoCodeFz.png", path + "login_logo.png");
|
|
|
OutputStream toClient = response.getOutputStream(); // 得到向客户端输出二进制数据的对象
|
|
|
FileInputStream is = new FileInputStream(path + "twoCodeFz.png");
|
|
|
int i = is.available(); // 得到文件大小
|
|
@@ -499,16 +522,16 @@ public class XkzfzCtl extends BaseWebCtl {
|
|
|
model.addAttribute("record", vo);
|
|
|
return "gkjygl/gkjyr/jyrxkzfz/wxhwzyfz";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@RequestMapping(value = "/selectFzsfdq")
|
|
|
@ResponseBody
|
|
|
public List<CodeEntity> selectFzsfdq() {
|
|
|
List<CodeEntity> list = securityMgr.codeService().findValidCodesByGroupCode("SFDQ");
|
|
|
return list;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@RequestMapping(value = "/exportExcelAll")
|
|
|
- public String exportExcelAll(HttpServletResponse response,final String ssjyr, final String szdid, final String szgkid, final String szgqid, final String fzsqh,final String fzsfyx,final String wxhwpm,final String fzsfdq) {
|
|
|
+ public String exportExcelAll(HttpServletResponse response, final String ssjyr, final String szdid, final String szgkid, final String szgqid, final String fzsqh, final String fzsfyx, final String wxhwpm, final String fzsfdq) {
|
|
|
// 查詢條件
|
|
|
Specification<XkzfzEntity> spec = new Specification<XkzfzEntity>() {
|
|
|
|
|
@@ -533,33 +556,32 @@ public class XkzfzCtl extends BaseWebCtl {
|
|
|
if (StringUtils.isNotEmpty(wxhwpm)) {
|
|
|
list.add(cb.like(root.get("wxhwpm").as(String.class), "%" + wxhwpm + "%"));
|
|
|
}
|
|
|
- if(StringUtils.isNotEmpty(fzsfyx)){
|
|
|
- if(("是").equals(fzsfyx)){
|
|
|
+ if (StringUtils.isNotEmpty(fzsfyx)) {
|
|
|
+ if (("是").equals(fzsfyx)) {
|
|
|
list.add(cb.equal(root.get("recordStatus").as(String.class), "1"));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
list.add(cb.notEqual(root.get("recordStatus").as(String.class), "1"));
|
|
|
}
|
|
|
}
|
|
|
Date now = new Date();
|
|
|
- if(StringUtils.isNotEmpty(fzsfdq)){
|
|
|
- if((fzsfdq).equals("6103")){
|
|
|
+ if (StringUtils.isNotEmpty(fzsfdq)) {
|
|
|
+ if ((fzsfdq).equals("6103")) {
|
|
|
list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class), now));
|
|
|
- }else if((fzsfdq).equals("6101")){
|
|
|
+ } else if ((fzsfdq).equals("6101")) {
|
|
|
list.add(cb.greaterThan(root.get("yxqjssj").as(Date.class), now));
|
|
|
- }else{
|
|
|
- list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class),DateTime.addDays(now, 30)));
|
|
|
+ } else {
|
|
|
+ list.add(cb.lessThanOrEqualTo(root.get("yxqjssj").as(Date.class), DateTime.addDays(now, 30)));
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 经营人只能查看自己企业下的数据,非经营人只能查看自己所在地的数据
|
|
|
if (isJyr()) {
|
|
|
list.add(cb.like(root.get("ssjyr").get("id").as(String.class), "%" + getSsjyr().getId() + "%"));
|
|
|
} else {
|
|
|
In<String> in = cb.in(root.get("szgq").get("id").as(String.class));
|
|
|
@SuppressWarnings("unchecked")
|
|
|
- List<String> gqlist = (List<String>) Utils.getSession()
|
|
|
- .getAttribute("gqList");
|
|
|
+ List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
|
|
|
if (gqlist != null && gqlist.size() > 0) {
|
|
|
for (int i = 0; i < gqlist.size(); i++) {
|
|
|
in.value(gqlist.get(i));
|
|
@@ -587,10 +609,10 @@ public class XkzfzCtl extends BaseWebCtl {
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public List<XkzfzVo> entityToVo(List<XkzfzEntity> list) {
|
|
|
List<XkzfzVo> voList = new ArrayList<XkzfzVo>();
|
|
|
-
|
|
|
+
|
|
|
for (XkzfzEntity entity : list) {
|
|
|
XkzfzVo vo = new XkzfzVo();
|
|
|
if (null != entity) {
|