diff --git a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java index ba17043..1b62734 100644 --- a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java +++ b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java @@ -575,7 +575,8 @@ public class FreighttTrailerController extends BaseController { if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) { // 营运车辆 List operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID")); - operatingList = operatingList.stream().parallel().filter(data -> "0".equals(data.getString("ISASSIGNED"))).collect(Collectors.toList()); + operatingList = operatingList.stream().parallel().filter(data -> "0".equals(data.getString("ISASSIGNED"))).collect(Collectors.toList()) + .stream().filter(data -> "0".equals(data.getString("ISSCRAP"))).collect(Collectors.toList()); page.setPd(pd); List insAnnually = inspectAnnuallyService.annuallyList(page); @@ -652,6 +653,10 @@ public class FreighttTrailerController extends BaseController { } List resData = freightTrailerService.vehicleList(pd); + if(StringUtils.equals(resData.get(0).getString("TRAFFIC_TYPE"), "2")) { + resData.get(0).put("CONTACT",resData.get(0).getString("CONTACTS")); + resData.get(0).put("CONTACT_NUMBER",resData.get(0).getString("CONTACT_PHONE")); + } if(pd.containsKey("ID")){ pd.put("FOREIGN_KEY", pd.getString("ID")); pd.put("TYPE",121); diff --git a/src/main/java/com/zcloud/controller/insure/InsureController.java b/src/main/java/com/zcloud/controller/insure/InsureController.java index 7c98c90..dc39bee 100644 --- a/src/main/java/com/zcloud/controller/insure/InsureController.java +++ b/src/main/java/com/zcloud/controller/insure/InsureController.java @@ -347,6 +347,10 @@ public class InsureController extends BaseController { } List resData = freightTrailerService.vehicleList(pd); + if(StringUtils.equals(resData.get(0).getString("TRAFFIC_TYPE"), "2")) { + resData.get(0).put("CONTACT", resData.get(0).getString("CONTACTS")); + resData.get(0).put("CONTACT_NUMBER", resData.get(0).getString("CONTACT_PHONE")); + } if (pd.containsKey("ID")) { pd.put("FOREIGN_KEY", pd.getString("ID")); pd.put("TYPE", 121); diff --git a/src/main/java/com/zcloud/controller/operations/OperationsController.java b/src/main/java/com/zcloud/controller/operations/OperationsController.java index 5e200fd..603f9cb 100644 --- a/src/main/java/com/zcloud/controller/operations/OperationsController.java +++ b/src/main/java/com/zcloud/controller/operations/OperationsController.java @@ -345,6 +345,10 @@ public class OperationsController extends BaseController { } List resData = freightTrailerService.vehicleList(pd); + if(StringUtils.equals(resData.get(0).getString("TRAFFIC_TYPE"), "2")) { + resData.get(0).put("CONTACT", resData.get(0).getString("CONTACTS")); + resData.get(0).put("CONTACT_NUMBER", resData.get(0).getString("CONTACT_PHONE")); + } if (pd.containsKey("ID")) { pd.put("FOREIGN_KEY", pd.getString("ID")); pd.put("TYPE", 121); diff --git a/src/main/java/com/zcloud/controller/system/DictionariesCorpController.java b/src/main/java/com/zcloud/controller/system/DictionariesCorpController.java index 16782dc..f39530b 100644 --- a/src/main/java/com/zcloud/controller/system/DictionariesCorpController.java +++ b/src/main/java/com/zcloud/controller/system/DictionariesCorpController.java @@ -11,6 +11,7 @@ import com.zcloud.service.system.UsersService; import com.zcloud.util.Jurisdiction; import com.zcloud.util.Tools; import net.sf.json.JSONArray; +import org.apache.commons.lang.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -21,6 +22,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 说明:数据字典处理类(企业级) @@ -315,6 +317,8 @@ public class DictionariesCorpController extends BaseController { pdf.put("NAME", d.getNAME()); pdList.add(pdf); } + pdList = pdList.stream().parallel() + .filter(data -> !StringUtils.equals(data.getString("NAME"), "")).collect(Collectors.toList()); map.put("list", pdList); 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 568f4be..6f4d2aa 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -17,6 +17,7 @@ import com.zcloud.service.system.*; import com.zcloud.util.*; import net.sf.json.JSONArray; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.crypto.hash.SimpleHash; import org.checkerframework.checker.units.qual.C; @@ -32,6 +33,7 @@ import java.io.File; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; +import java.util.stream.Collectors; /** * 说明:系统用户处理类 @@ -242,8 +244,12 @@ public class UsersController extends BaseController { pd = this.getPageData(); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //page.setPd(pd); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + pd.put("VIPLEVEL", Jurisdiction.getVIPLEVEL()); List userList = usersService.userSelectPersonTypelist(pd);//列出用户列表 - System.out.println("userList = " + userList); + userList = userList.stream().parallel() + .filter(data -> data.getString("PERSONNEL_TYPE").contains("5ae743c76dbf496eb1b5101075b073d5")) // 列出所有驾驶员 + .collect(Collectors.toList()); map.put("userList", userList); //map.put("page", page); map.put("pd", pd); diff --git a/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml b/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml index f9596da..359a41f 100644 --- a/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml +++ b/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml @@ -293,9 +293,13 @@ diff --git a/src/main/resources/mybatis/datasource/system/UsersMapper.xml b/src/main/resources/mybatis/datasource/system/UsersMapper.xml index 574a2c1..0551b03 100644 --- a/src/main/resources/mybatis/datasource/system/UsersMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UsersMapper.xml @@ -1683,6 +1683,79 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT t1.USER_CORP_ID, t1.CORPINFO_ID, t1.USER_ID, t1.APPLY_TYPE, t1.APPLY_STATUS, t1.ISDELETE FROM SYS_USER_CORP t1 WHERE t1.ISDELETE = '0' + + + AND t1.APPLY_TYPE in ('1','3') + + AND t1.CREATTIME = ( + SELECT MAX(t2.CREATTIME) + FROM SYS_USER_CORP t2 + WHERE t2.ISDELETE = '0' + + + AND t2.APPLY_TYPE in ('1','3') + + AND t2.USER_ID = t1.USER_ID) + ) uc on uc.USER_ID = u.USER_ID and uc.ISDELETE = 0 + where u.ISDELETE = 0 + and u.USERNAME != 'admin' + + and r.PARENT_ID=#{VIPLEVEL} + + + and r.PARENT_ID = '1' + + + and + ( + u.USERNAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%') + or + u.EMAIL LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%') + or + u.NUMBER LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%') + or + u.NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%') + or + u.PHONE LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%') + ) + + + and u.ROLE_ID=#{ROLE_ID} + + + and u.DEPARTMENT_ID=#{DEPARTMENT_ID} + + + and u.LAST_LOGIN >= #{STARTTIME} + + + and u.LAST_LOGIN <= #{ENDTIME} + + + and u.SHIFTDUTYONE=#{SHIFTDUTYONE} + + + and u.SHIFTDUTYTWO=#{SHIFTDUTYTWO} + + + AND + uc.CORPINFO_ID = #{CORPINFO_ID} + + + and (select count(1) from BUS_STAGESTUDENTRELATION s where s.USER_ID = u.USER_ID) > 0 + + + and u.ISSTUDENT = #{IS_STUDENT} + + + and info.PERSONNEL_TYPE = #{PERSONNEL_TYPE} + + + and info.IS_RECORDER = #{IS_RECORDER} + + + and info.IS_CHARGE = #{IS_CHARGE} + order by u.SORT asc,u.LAST_LOGIN desc