diff --git a/src/main/java/com/zcloud/controller/app/AppHiddenController.java b/src/main/java/com/zcloud/controller/app/AppHiddenController.java index ed968a2..96cc98c 100644 --- a/src/main/java/com/zcloud/controller/app/AppHiddenController.java +++ b/src/main/java/com/zcloud/controller/app/AppHiddenController.java @@ -1,5 +1,6 @@ package com.zcloud.controller.app; +import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse; @@ -29,7 +30,9 @@ import com.zcloud.util.event.DeviceHiddenEvent; import com.zcloud.util.message.MessageService; import net.sf.json.JSONArray; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.StringUtils; +import org.bytedeco.javacpp.RealSense; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Controller; @@ -44,6 +47,7 @@ import javax.servlet.http.HttpServletRequest; import java.io.File; import java.text.SimpleDateFormat; import java.util.*; +import java.util.stream.Collectors; /** * 说明:隐患 作者:luoxiaobao 时间:2021-01-04 官网:www.zcloudchina.com @@ -778,7 +782,7 @@ public class AppHiddenController extends BaseController { /** * 删除 * - * @param out + * @param * @throws Exception */ @RequestMapping(value = "/riskListCheckHiddenDelete") // /delete diff --git a/src/main/java/com/zcloud/controller/comprehensive/AppTrafficSecurityNoticeController.java b/src/main/java/com/zcloud/controller/comprehensive/AppTrafficSecurityNoticeController.java index 6cd798a..9986c5e 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/AppTrafficSecurityNoticeController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/AppTrafficSecurityNoticeController.java @@ -20,10 +20,8 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; @Controller @RequestMapping("/app/trafficNotice") @@ -118,8 +116,22 @@ public class AppTrafficSecurityNoticeController extends BaseController { */ // pd.put("USER_ID", pd.getString("loginUserId")); page.setPd(pd); + List list = new ArrayList<>(); List varList = trafficSecurityReadDetailService.listByUserId(page); - map.put("varList", varList); + String level[] = new String[]{"紧急通知", "重要通知", "一般通知"}; + for (int i = 0; i < level.length; i++) { + for (PageData data : varList) { + if(StringUtils.equals(data.getString("LEVEL"),level[i]) && StringUtils.equals(data.getString("TYPE"),null)) { + list.add(data); + } + } + } + List collect = varList.stream().parallel().filter(data -> StringUtils.equals(data.getString("TYPE"), "1")).collect(Collectors.toList()); + for (PageData data : collect) { + list.add(data); + } + System.out.println("list = " + list); + map.put("varList", list); map.put("page", page); map.put("result", errInfo); return map; diff --git a/src/main/java/com/zcloud/controller/system/UsersController.java b/src/main/java/com/zcloud/controller/system/UsersController.java index 5317105..797b93e 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -3420,9 +3420,8 @@ public class UsersController extends BaseController { resultList.add(value.get(0)); }); - List collect = resultList.stream().filter(data -> StringUtils.equals(data.getString("APPLY_TYPE"), "4")).collect(Collectors.toList()); + List collect = resultList.stream().filter(data -> StringUtils.equals(data.getString("APPLY_TYPE"), "4") || StringUtils.equals(data.getString("APPLY_TYPE"), "3")).collect(Collectors.toList()); - System.out.println("collect = " + collect); /*List dimissionList = userCorpService.getDimissionUser(); System.out.println("dimissionList = " + dimissionList);*/ map.put("userList", collect); diff --git a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java index 3405c5e..c85fcdd 100644 --- a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java @@ -1481,7 +1481,7 @@ public class UsersServiceImpl implements UsersService { userCertificateService.save(idCard);*/ // 驾驶证 - driverLicense.put("USER_CERTIFICATE_ID", Warden.get32UUID()); + /*driverLicense.put("USER_CERTIFICATE_ID", Warden.get32UUID()); driverLicense.put("USER_ID", pd.getString("USER_ID")); driverLicense.put("CERTIFICATE_CATEGORY", "2"); driverLicense.put("ID_NO", pd.getString("DRIVER_LICENSE_NO")); @@ -1522,7 +1522,7 @@ public class UsersServiceImpl implements UsersService { qualificationCertificateCategory.put("USER_ID", pd.getString("USER_ID")); qualificationCertificateCategory.put("ALLOW_QUALIFICATION", QUALIFICATION_CERTIFICATE_CATEGORY[i]); userCertificateAppendixService.save(qualificationCertificateCategory); - } + }*/ // pd.put("TYPE_OF_WORK", pd.getString("POST_ID")); pd.put("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916"); // sys_userinfo 证件类型:身份证 pd.put("AUTHENTICATION", "0"); // sys_userinfo 学员是否认证 0否 1是 diff --git a/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml b/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml index 11d654e..c688ea6 100644 --- a/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml +++ b/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml @@ -3811,7 +3811,7 @@ f.CREATOR,f.STATE,f.CREATOR FROM BUS_HIDDEN f - WHERE f.ISDELETE = '0' and f.STATE != '0' and f.HIDDENLEVEL = 'hiddenLevel0001' + WHERE f.ISDELETE = '0' and f.STATE != '0'/* and f.HIDDENLEVEL = 'hiddenLevel0001'*/ and (