优化BUG

dev
xiepeng 2024-05-16 18:01:52 +08:00
parent 0de1e045c0
commit 60deab8936
8 changed files with 104 additions and 6 deletions

View File

@ -575,7 +575,8 @@ public class FreighttTrailerController extends BaseController {
if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) { if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
// 营运车辆 // 营运车辆
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID")); List<PageData> 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); page.setPd(pd);
List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page); List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page);
@ -652,6 +653,10 @@ public class FreighttTrailerController extends BaseController {
} }
List<PageData> resData = freightTrailerService.vehicleList(pd); List<PageData> 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")){ if(pd.containsKey("ID")){
pd.put("FOREIGN_KEY", pd.getString("ID")); pd.put("FOREIGN_KEY", pd.getString("ID"));
pd.put("TYPE",121); pd.put("TYPE",121);

View File

@ -347,6 +347,10 @@ public class InsureController extends BaseController {
} }
List<PageData> resData = freightTrailerService.vehicleList(pd); List<PageData> 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")) { if (pd.containsKey("ID")) {
pd.put("FOREIGN_KEY", pd.getString("ID")); pd.put("FOREIGN_KEY", pd.getString("ID"));
pd.put("TYPE", 121); pd.put("TYPE", 121);

View File

@ -345,6 +345,10 @@ public class OperationsController extends BaseController {
} }
List<PageData> resData = freightTrailerService.vehicleList(pd); List<PageData> 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")) { if (pd.containsKey("ID")) {
pd.put("FOREIGN_KEY", pd.getString("ID")); pd.put("FOREIGN_KEY", pd.getString("ID"));
pd.put("TYPE", 121); pd.put("TYPE", 121);

View File

@ -11,6 +11,7 @@ import com.zcloud.service.system.UsersService;
import com.zcloud.util.Jurisdiction; import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools; import com.zcloud.util.Tools;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -21,6 +22,7 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* () * ()
@ -315,6 +317,8 @@ public class DictionariesCorpController extends BaseController {
pdf.put("NAME", d.getNAME()); pdf.put("NAME", d.getNAME());
pdList.add(pdf); pdList.add(pdf);
} }
pdList = pdList.stream().parallel()
.filter(data -> !StringUtils.equals(data.getString("NAME"), "")).collect(Collectors.toList());
map.put("list", pdList); map.put("list", pdList);
map.put("result", errInfo); //返回结果 map.put("result", errInfo); //返回结果
return map; return map;

View File

@ -17,6 +17,7 @@ import com.zcloud.service.system.*;
import com.zcloud.util.*; import com.zcloud.util.*;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.crypto.hash.SimpleHash; import org.apache.shiro.crypto.hash.SimpleHash;
import org.checkerframework.checker.units.qual.C; import org.checkerframework.checker.units.qual.C;
@ -32,6 +33,7 @@ import java.io.File;
import java.util.*; import java.util.*;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors;
/** /**
* *
@ -242,8 +244,12 @@ public class UsersController extends BaseController {
pd = this.getPageData(); pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
//page.setPd(pd); //page.setPd(pd);
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("VIPLEVEL", Jurisdiction.getVIPLEVEL());
List<PageData> userList = usersService.userSelectPersonTypelist(pd);//列出用户列表 List<PageData> 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("userList", userList);
//map.put("page", page); //map.put("page", page);
map.put("pd", pd); map.put("pd", pd);

View File

@ -293,9 +293,13 @@
<!-- 货运挂车列表ALL --> <!-- 货运挂车列表ALL -->
<select id="vehicleList" parameterType="page" resultType="pd"> <select id="vehicleList" parameterType="page" resultType="pd">
select select
* *,
bto.*,
btmf.*
from from
v_traffic f v_traffic f
LEFT JOIN bus_traffic_operatingvehicle bto on bto.OPERATING_ID = f.ID
LEFT JOIN bus_traffic_mechanical_freighttrailer btmf on btmf.FREIGHTTRAILER_ID = f.ID
where f.CORPINFO_ID = #{CORPINFO_ID} where f.CORPINFO_ID = #{CORPINFO_ID}
<if test="TRAFFIC_TYPE != null and TRAFFIC_TYPE != ''"> <if test="TRAFFIC_TYPE != null and TRAFFIC_TYPE != ''">
and f.TRAFFIC_TYPE = #{TRAFFIC_TYPE} and f.TRAFFIC_TYPE = #{TRAFFIC_TYPE}

View File

@ -619,9 +619,7 @@
<include refid="tableName"></include> f <include refid="tableName"></include> f
LEFT JOIN v_traffic v on v.ID = f.OPERATING_ID LEFT JOIN v_traffic v on v.ID = f.OPERATING_ID
where where
f.CORPINFO_ID = #{corpId} f.CORPINFO_ID = #{corpId} AND f.ISDELETE = '0'
AND (f.ISDELETE = '0' OR f.ISDELETE IS NULL)
AND (f.ISSCRAP = '0' OR f.ISSCRAP IS NULL)
</select> </select>
<!-- 所属企业列表 --> <!-- 所属企业列表 -->

View File

@ -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 SELECT t1.USER_CORP_ID, t1.CORPINFO_ID, t1.USER_ID, t1.APPLY_TYPE, t1.APPLY_STATUS, t1.ISDELETE
FROM SYS_USER_CORP t1 FROM SYS_USER_CORP t1
WHERE t1.ISDELETE = '0' WHERE t1.ISDELETE = '0'
<if test="APPLY_TYPE != null and APPLY_TYPE != ''">
<choose>
<when test="APPLY_TYPE == '1-3'"> AND t1.APPLY_TYPE in ('1','3')</when>
</choose>
</if> AND t1.CREATTIME = (
SELECT MAX(t2.CREATTIME)
FROM SYS_USER_CORP t2
WHERE t2.ISDELETE = '0'
<if test="APPLY_TYPE != null and APPLY_TYPE != ''">
<choose>
<when test="APPLY_TYPE == '1-3'"> AND t2.APPLY_TYPE in ('1','3')</when>
</choose>
</if> 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'
<if test="VIPLEVEL != null and VIPLEVEL != ''"> <!-- 角色检索 -->
and r.PARENT_ID=#{VIPLEVEL}
</if>
<if test="VIPLEVEL == null or VIPLEVEL == ''"> <!-- 角色检索 -->
and r.PARENT_ID = '1'
</if>
<if test="KEYWORDS!= null and KEYWORDS != ''"><!-- 关键词检索 -->
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}),'%')
)
</if>
<if test="ROLE_ID != null and ROLE_ID != ''"> <!-- 角色检索 -->
and u.ROLE_ID=#{ROLE_ID}
</if>
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''"> <!-- 角色检索 -->
and u.DEPARTMENT_ID=#{DEPARTMENT_ID}
</if>
<if test="STARTTIME!=null and STARTTIME!=''"> <!-- 登录时间检索 -->
and u.LAST_LOGIN &gt;= #{STARTTIME}
</if>
<if test="ENDTIME!=null and ENDTIME!=''"> <!-- 登录时间检索 -->
and u.LAST_LOGIN &lt;= #{ENDTIME}
</if>
<if test="SHIFTDUTYONE != null and SHIFTDUTYONE != ''">
and u.SHIFTDUTYONE=#{SHIFTDUTYONE}
</if>
<if test="SHIFTDUTYTWO != null and SHIFTDUTYTWO != ''">
and u.SHIFTDUTYTWO=#{SHIFTDUTYTWO}
</if>
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
AND
uc.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="IS_ARCHIVES != null and IS_ARCHIVES != ''">
and (select count(1) from BUS_STAGESTUDENTRELATION s where s.USER_ID = u.USER_ID) &gt; 0
</if>
<if test="IS_STUDENT != null and IS_STUDENT != ''">
and u.ISSTUDENT = #{IS_STUDENT}
</if>
<if test="PERSONNEL_TYPE != null and PERSONNEL_TYPE != ''">
and info.PERSONNEL_TYPE = #{PERSONNEL_TYPE}
</if>
<if test="IS_RECORDER != null and IS_RECORDER != '' and IS_RECORDER == 1 ">
and info.IS_RECORDER = #{IS_RECORDER}
</if>
<if test="IS_CHARGE != null and IS_CHARGE != '' and IS_CHARGE == 1 ">
and info.IS_CHARGE = #{IS_CHARGE}
</if>
order by u.SORT asc,u.LAST_LOGIN desc order by u.SORT asc,u.LAST_LOGIN desc
</select> </select>