bug优化

dev
WenShiJun 2024-03-27 18:05:14 +08:00
parent 2e121cfabc
commit afdce2f5f2
12 changed files with 175 additions and 64 deletions

View File

@ -56,9 +56,6 @@ public class AssignedManageController extends BaseController {
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字 pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
pd.put("ASSIGNED_DATE", pd.get("TRANSACTION_DATE")); pd.put("ASSIGNED_DATE", pd.get("TRANSACTION_DATE"));
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("VEHICLE_TYPE",pd.get("ASSIGNED_VEHICLE_MODEL")); pd.put("VEHICLE_TYPE",pd.get("ASSIGNED_VEHICLE_MODEL"));

View File

@ -243,20 +243,45 @@ public class FreighttTrailerController extends BaseController {
String[] ArrayDATA_IDS = DATA_IDS.split(","); String[] ArrayDATA_IDS = DATA_IDS.split(",");
pd.put("ArrayDATA_IDS",ArrayDATA_IDS); pd.put("ArrayDATA_IDS",ArrayDATA_IDS);
} }
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
Map<String,Object> dataMap = new HashMap<String,Object>(); Map<String,Object> dataMap = new HashMap<String,Object>();
List<String> titles = new ArrayList<String>(); List<String> titles = new ArrayList<String>();
titles.add("所属企业"); //1 titles.add("车牌号"); //1
titles.add("风险点(单元)名称"); //2 titles.add("车架号"); //2
titles.add("所属部门"); //3 titles.add("车身编号"); //3
titles.add("挂车类型"); //4
titles.add("运营证号"); //5
titles.add("归属部门"); //6
titles.add("车主"); //7
titles.add("车主电话"); //8
titles.add("初登日期"); //9
titles.add("发证日期"); //10
titles.add("到期日期"); //11
titles.add("挂车品牌"); //12
titles.add("挂车型号"); //13
titles.add("核定总质量"); //14
titles.add("核定载质量"); //15
titles.add("容积"); //16
dataMap.put("titles", titles); dataMap.put("titles", titles);
List<PageData> varOList = freightTrailerService.listOut(pd); List<PageData> varOList = freightTrailerService.listOut(pd);
List<PageData> varList = new ArrayList<PageData>(); List<PageData> varList = new ArrayList<PageData>();
for(int i=0;i<varOList.size();i++){ for(int i=0;i<varOList.size();i++){
PageData vpd = new PageData(); PageData vpd = new PageData();
vpd.put("var1", varOList.get(i).getString("CORP_NAME")); //1 vpd.put("var1", varOList.get(i).getString("PLATE_NUMBER"));//1
vpd.put("var2", varOList.get(i).getString("RISKUNITNAME")); //2 vpd.put("var2", varOList.get(i).getString("VIN"));//2
vpd.put("var3", varOList.get(i).getString("DEPT_NAME")); //6 vpd.put("var3", varOList.get(i).getString("VEHICLE_BODY_NUMBER"));//3
vpd.put("var4", varOList.get(i).getString("TRAILER_TYPE"));//4
vpd.put("var5", varOList.get(i).getString("OPER_CERTIFICATE_NUM"));//5
vpd.put("var6", varOList.get(i).getString("BELONGING_DEPT"));//6
vpd.put("var7", varOList.get(i).getString("CAR_OWNERS"));//7
vpd.put("var8", varOList.get(i).getString("CAR_OWNERS_TEL"));//8
vpd.put("var9", varOList.get(i).getString("INITIAL_REGISTRATION_DATE"));//9
vpd.put("var10", varOList.get(i).getString("CERTIFICATE_DATE"));//10
vpd.put("var11", varOList.get(i).getString("DUE_DATE"));//11
vpd.put("var12", varOList.get(i).getString("TRAILER_BRAND"));//12
vpd.put("var13", varOList.get(i).getString("TRAILER_MODEL"));//13
vpd.put("var14", varOList.get(i).getString("APPROVED_TOTAL_MASS"));//14
vpd.put("var15", varOList.get(i).getString("APPROVED_LOAD_CAPACITY"));//15
vpd.put("var16", varOList.get(i).getString("VOLUME"));//16
varList.add(vpd); varList.add(vpd);
} }
dataMap.put("varList", varList); dataMap.put("varList", varList);

View File

@ -55,9 +55,6 @@ public class ScrapManageController extends BaseController {
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字 pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
scrapManageService.save(pd); scrapManageService.save(pd);
map.put("pd", pd); map.put("pd", pd);
map.put("result", errInfo); map.put("result", errInfo);

View File

@ -59,9 +59,9 @@ public class TaxationManageController extends BaseController {
String day = DateUtil.getDay(); String day = DateUtil.getDay();
boolean flag = DateUtil.compareDate(expireDate, day); boolean flag = DateUtil.compareDate(expireDate, day);
if(flag) { if(flag) {
pd.put("EXPIRE_STATUS","未到期"); pd.put("EXPIRE_STATUS","1");
}else{ }else{
pd.put("EXPIRE_STATUS","已到期"); pd.put("EXPIRE_STATUS","0");
} }
} }
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());

View File

@ -454,6 +454,7 @@
<if test="pd.TRANSPORT_ENTERPRISES != null and pd.TRANSPORT_ENTERPRISES != ''"><!-- 关键词检索 --> <if test="pd.TRANSPORT_ENTERPRISES != null and pd.TRANSPORT_ENTERPRISES != ''"><!-- 关键词检索 -->
and f.TRANSPORT_ENTERPRISES = #{pd.TRANSPORT_ENTERPRISES} and f.TRANSPORT_ENTERPRISES = #{pd.TRANSPORT_ENTERPRISES}
</if> </if>
ORDER BY f.CREATTIME desc
</select> </select>
<select id="listAll" parameterType="pd" resultType="pd"> <select id="listAll" parameterType="pd" resultType="pd">

View File

@ -219,15 +219,60 @@
REMINDER_STATUS 提醒状态 REMINDER_STATUS 提醒状态
--> -->
<!-- <select id="datalistPage" parameterType="page" resultType="pd">-->
<!-- select-->
<!-- f.*,-->
<!-- case when f.DUE_DATE &lt; NOW() then 0 else 1 end as DUE_DATE_TYPE,-->
<!-- v1.PLATE_NUMBER,-->
<!-- case when btsm.PLATE_NUMBER is not null then 1 else f.ARCHIVES_TYPE end as ARCHIVES_TYPE-->
<!-- from-->
<!-- <include refid="tableName"></include>-->
<!-- f-->
<!-- INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID-->
<!-- LEFT JOIN BUS_TRAFFIC_SCRAP_MANAGEMENT btsm on v1.PLATE_NUMBER = btsm.PLATE_NUMBER-->
<!-- where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}-->
<!-- <if test="pd.BASICINFO_LICENSE_PLATE != null and pd.BASICINFO_LICENSE_PLATE != ''">-->
<!-- and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%')-->
<!-- </if>-->
<!-- <if test="pd.CAR_OWNERS != null and pd.CAR_OWNERS != ''">-->
<!-- and f.CAR_OWNERS LIKE CONCAT(CONCAT('%', #{pd.CAR_OWNERS}),'%')-->
<!-- </if>-->
<!-- <if test="pd.REGISTRANT != null and pd.REGISTRANT != ''">-->
<!-- and f.REGISTRANT LIKE CONCAT(CONCAT('%', #{pd.REGISTRANT}),'%')-->
<!-- </if>-->
<!-- <if test="pd.DUE_DATE != null and pd.DUE_DATE != ''">-->
<!-- and f.DUE_DATE = #{pd.DUE_DATE}-->
<!-- </if>-->
<!-- <if test="pd.VEHICLE_MODEL != null and pd.VEHICLE_MODEL != ''">-->
<!-- and f.VEHICLE_MODEL LIKE CONCAT(CONCAT('%', #{pd.VEHICLE_MODEL}),'%')-->
<!-- </if>-->
<!-- <if test="pd.REMINDER_STATUS != null and pd.REMINDER_STATUS != ''">-->
<!-- and f.REMINDER_STATUS = #{pd.REMINDER_STATUS}-->
<!-- </if>-->
<!-- <if test="pd.PLATE_NUMBER != null and pd.PLATE_NUMBER != ''">-->
<!-- and v1.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%')-->
<!-- </if>-->
<!-- <if test="pd.DUE_DATE_TYPE != null and pd.DUE_DATE_TYPE != ''">-->
<!-- and case when f.DUE_DATE &lt; NOW() then 0 else 1 end = #{pd.DUE_DATE_TYPE}-->
<!-- </if>-->
<!-- ORDER BY f.CREATTIME DESC-->
<!-- </select>-->
<select id="datalistPage" parameterType="page" resultType="pd"> <select id="datalistPage" parameterType="page" resultType="pd">
select select
f.*, f.*,
case when f.DUE_DATE &lt; NOW() then 0 else 1 end as DUE_DATE_TYPE, case when f.DUE_DATE &lt; NOW() then 0 else 1 end as DUE_DATE_TYPE,
v1.PLATE_NUMBER v1.PLATE_NUMBER,
case
when btsm.PLATE_NUMBER is not null then '1'
when bta.RAW_PLATE_NUMBER is not null then '2'
else f.ARCHIVES_TYPE
end as NEW_ARCHIVES_TYPE
from from
<include refid="tableName"></include> <include refid="tableName"></include> f
f
INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID
LEFT JOIN BUS_TRAFFIC_SCRAP_MANAGEMENT btsm on v1.PLATE_NUMBER = btsm.PLATE_NUMBER
LEFT JOIN BUS_TRAFFIC_ASSIGNED bta on v1.PLATE_NUMBER = bta.RAW_PLATE_NUMBER
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.BASICINFO_LICENSE_PLATE != null and pd.BASICINFO_LICENSE_PLATE != ''"> <if test="pd.BASICINFO_LICENSE_PLATE != null and pd.BASICINFO_LICENSE_PLATE != ''">
and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%') and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%')
@ -251,10 +296,16 @@
and v1.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%') and v1.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%')
</if> </if>
<if test="pd.DUE_DATE_TYPE != null and pd.DUE_DATE_TYPE != ''"> <if test="pd.DUE_DATE_TYPE != null and pd.DUE_DATE_TYPE != ''">
and case when f.DUE_DATE &lt; NOW() then 0 else 1 end = #{pd.DUE_DATE_TYPE} -- 添加条件只有当当前时间NOW())处于提醒时间段内时,才会返回相应的记录。
-- 提醒时间段是由两个日期定义的:
-- 1. 提前提醒的日期即从DUE_DATE字段指定的到期日期减去REMINDER_DAYS字段指定的天数。
-- 2. 到期日期DUE_DATE字段本身。
-- DATE_SUB函数用于计算提前提醒的日期。它从到期日期中减去一定天数以得到提醒开始的日期。
-- DATE_SUB的第一个参数是到期日期f.DUE_DATE
-- 第二个参数INTERVAL f.REMINDER_DAYS DAY指定从到期日期向前推算的天数f.REMINDER_DAYS字段的值
and NOW() BETWEEN DATE_SUB(f.DUE_DATE, INTERVAL f.REMINDER_DAYS DAY) AND f.DUE_DATE
</if> </if>
ORDER BY f.CREATTIME DESC ORDER BY f.CREATTIME DESC
</select> </select>
</mapper> </mapper>

View File

@ -343,9 +343,10 @@
<if test="pd.USER_ID != null and pd.USER_ID != ''"> <if test="pd.USER_ID != null and pd.USER_ID != ''">
and f.USER_ID = #{pd.USER_ID} and f.USER_ID = #{pd.USER_ID}
</if> </if>
<if test="pd.PENALTYTIME != null and pd.PENALTYTIME != ''"><!-- 检索-处罚时间 --> <if test="pd.ACCIDENTDATE != null and pd.ACCIDENTDATE != ''"><!-- 检索-处罚时间 -->
and f.PENALTYTIME = #{pd.PENALTYTIME} and f.ACCIDENTDATE = #{pd.ACCIDENTDATE}
</if> </if>
ORDER BY f.CREATETIME DESC
</select> </select>
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="com.zcloud.entity.PageData"> <select id="findById" resultType="com.zcloud.entity.PageData" parameterType="com.zcloud.entity.PageData">

View File

@ -242,11 +242,11 @@
<select id="listOut" parameterType="pd" resultType="pd"> <select id="listOut" parameterType="pd" resultType="pd">
select select
<include refid="Field2"></include>, <include refid="Field2"></include>
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f
inner join bus_corp_info b on f.CORPINFO_ID = b.CORPINFO_ID where f.ISDELETE = '0'
where f.FREIGHTTRAILER_ID = #{FREIGHTTRAILER_ID} and f.FREIGHTTRAILER_ID in
<foreach item="item" index="index" open="(" separator="," close=")" collection="ArrayDATA_IDS"> <foreach item="item" index="index" open="(" separator="," close=")" collection="ArrayDATA_IDS">
#{item} #{item}
</foreach> </foreach>

View File

@ -191,7 +191,6 @@
f.REMINDER_STATUS, f.REMINDER_STATUS,
(select t.FILEPATH from bus_imgfiles t where t.TYPE = 127 and t.FOREIGN_KEY = f.MAINTENANCE_ID limit 1) as MAINTENANCEINFO, (select t.FILEPATH from bus_imgfiles t where t.TYPE = 127 and t.FOREIGN_KEY = f.MAINTENANCE_ID limit 1) as MAINTENANCEINFO,
f.NOTES, f.NOTES,
f.ARCHIVES_TYPE,
f.ISDELETE, f.ISDELETE,
f.CREATOR, f.CREATOR,
f.CREATORNAME, f.CREATORNAME,
@ -222,11 +221,19 @@
select select
f.*, f.*,
case when f.DUE_DATE &lt; NOW() then 0 else 1 end as DUE_DATE_TYPE, case when f.DUE_DATE &lt; NOW() then 0 else 1 end as DUE_DATE_TYPE,
v1.PLATE_NUMBER v1.PLATE_NUMBER,
case
when btsm.PLATE_NUMBER is not null then '1'
when bta.RAW_PLATE_NUMBER is not null then '2'
else f.ARCHIVES_TYPE
end as NEW_ARCHIVES_TYPE,
COALESCE(bta.RAW_PLATE_NUMBER, '0') as RAW_PLATE_NUMBER
from from
<include refid="tableName"></include> <include refid="tableName"></include>
f f
INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID
LEFT JOIN BUS_TRAFFIC_SCRAP_MANAGEMENT btsm on v1.PLATE_NUMBER = btsm.PLATE_NUMBER
LEFT JOIN BUS_TRAFFIC_ASSIGNED bta on v1.PLATE_NUMBER = bta.RAW_PLATE_NUMBER
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.BASICINFO_LICENSE_PLATE != null and pd.BASICINFO_LICENSE_PLATE != ''"> <if test="pd.BASICINFO_LICENSE_PLATE != null and pd.BASICINFO_LICENSE_PLATE != ''">
and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%') and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%')
@ -250,7 +257,14 @@
and v1.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%') and v1.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%')
</if> </if>
<if test="pd.DUE_DATE_TYPE != null and pd.DUE_DATE_TYPE != ''"> <if test="pd.DUE_DATE_TYPE != null and pd.DUE_DATE_TYPE != ''">
and case when f.DUE_DATE &lt; NOW() then 0 else 1 end = #{pd.DUE_DATE_TYPE} -- 添加条件只有当当前时间NOW())处于提醒时间段内时,才会返回相应的记录。
-- 提醒时间段是由两个日期定义的:
-- 1. 提前提醒的日期即从DUE_DATE字段指定的到期日期减去REMINDER_DAYS字段指定的天数。
-- 2. 到期日期DUE_DATE字段本身。
-- DATE_SUB函数用于计算提前提醒的日期。它从到期日期中减去一定天数以得到提醒开始的日期。
-- DATE_SUB的第一个参数是到期日期f.DUE_DATE
-- 第二个参数INTERVAL f.REMINDER_DAYS DAY指定从到期日期向前推算的天数f.REMINDER_DAYS字段的值
and NOW() BETWEEN DATE_SUB(f.DUE_DATE, INTERVAL f.REMINDER_DAYS DAY) AND f.DUE_DATE
</if> </if>
ORDER BY f.CREATTIME DESC ORDER BY f.CREATTIME DESC
</select> </select>

View File

@ -38,6 +38,7 @@
REMINDER_STATUS, REMINDER_STATUS,
OPERATIONSINFO, OPERATIONSINFO,
NOTES, NOTES,
NUM,
ISDELETE, ISDELETE,
CREATOR, CREATOR,
CREATORNAME, CREATORNAME,
@ -80,6 +81,7 @@
#{REMINDER_STATUS}, #{REMINDER_STATUS},
#{OPERATIONSINFO}, #{OPERATIONSINFO},
#{NOTES}, #{NOTES},
#{NUM},
#{ISDELETE}, #{ISDELETE},
#{CREATOR}, #{CREATOR},
#{CREATORNAME}, #{CREATORNAME},
@ -122,7 +124,6 @@
update update
<include refid="tableName"></include> <include refid="tableName"></include>
set set
NUM = #{NUM},
VEHICLE_MODEL = #{VEHICLE_MODEL}, VEHICLE_MODEL = #{VEHICLE_MODEL},
VEHICLE = #{VEHICLE}, VEHICLE = #{VEHICLE},
CAR_OWNERS = #{CAR_OWNERS}, CAR_OWNERS = #{CAR_OWNERS},
@ -163,7 +164,6 @@
select select
f.OPERATIONS_ID, f.OPERATIONS_ID,
f.CORPINFO_ID, f.CORPINFO_ID,
f.NUM,
f.VEHICLE_MODEL, f.VEHICLE_MODEL,
f.VEHICLE, f.VEHICLE,
f.CAR_OWNERS, f.CAR_OWNERS,
@ -174,10 +174,10 @@
f.DUE_DATE, f.DUE_DATE,
f.REMINDER_DAYS, f.REMINDER_DAYS,
f.REMINDER_DATE, f.REMINDER_DATE,
f.NUM,
f.REMINDER_STATUS, f.REMINDER_STATUS,
(select t.FILEPATH from bus_imgfiles t where t.TYPE = 126 and t.FOREIGN_KEY = f.OPERATIONS_ID limit 1) as OPERATIONSINFO, (select t.FILEPATH from bus_imgfiles t where t.TYPE = 126 and t.FOREIGN_KEY = f.OPERATIONS_ID limit 1) as OPERATIONSINFO,
f.NOTES, f.NOTES,
f.ARCHIVES_TYPE,
f.ISDELETE, f.ISDELETE,
f.CREATOR, f.CREATOR,
f.CREATORNAME, f.CREATORNAME,
@ -209,11 +209,19 @@
f.*, f.*,
case when f.DUE_DATE &lt; NOW() then 0 else 1 end as DUE_DATE_TYPE, case when f.DUE_DATE &lt; NOW() then 0 else 1 end as DUE_DATE_TYPE,
v1.PLATE_NUMBER, v1.PLATE_NUMBER,
(SELECT sd.NAME FROM sys_dictionaries sd where sd.DICTIONARIES_ID=f.CYCLE) as CYCLE_NAME case
when btsm.PLATE_NUMBER is not null then '1'
when bta.RAW_PLATE_NUMBER is not null then '2'
else f.ARCHIVES_TYPE
end as NEW_ARCHIVES_TYPE,
COALESCE((SELECT sd.NAME FROM sys_dictionaries sd WHERE sd.DICTIONARIES_ID=f.CYCLE), '0') as CYCLE_NAME,
COALESCE(bta.RAW_PLATE_NUMBER, '0') as RAW_PLATE_NUMBER
from from
<include refid="tableName"></include> <include refid="tableName"></include>
f f
INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID
LEFT JOIN BUS_TRAFFIC_SCRAP_MANAGEMENT btsm on v1.PLATE_NUMBER = btsm.PLATE_NUMBER
LEFT JOIN BUS_TRAFFIC_ASSIGNED bta on v1.PLATE_NUMBER = bta.RAW_PLATE_NUMBER
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.BASICINFO_LICENSE_PLATE != null and pd.BASICINFO_LICENSE_PLATE != ''"> <if test="pd.BASICINFO_LICENSE_PLATE != null and pd.BASICINFO_LICENSE_PLATE != ''">
and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%') and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%')
@ -237,10 +245,16 @@
and v1.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%') and v1.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%')
</if> </if>
<if test="pd.DUE_DATE_TYPE != null and pd.DUE_DATE_TYPE != ''"> <if test="pd.DUE_DATE_TYPE != null and pd.DUE_DATE_TYPE != ''">
and case when f.DUE_DATE &lt; NOW() then 0 else 1 end = #{pd.DUE_DATE_TYPE} -- 添加条件只有当当前时间NOW())处于提醒时间段内时,才会返回相应的记录。
-- 提醒时间段是由两个日期定义的:
-- 1. 提前提醒的日期即从DUE_DATE字段指定的到期日期减去REMINDER_DAYS字段指定的天数。
-- 2. 到期日期DUE_DATE字段本身。
-- DATE_SUB函数用于计算提前提醒的日期。它从到期日期中减去一定天数以得到提醒开始的日期。
-- DATE_SUB的第一个参数是到期日期f.DUE_DATE
-- 第二个参数INTERVAL f.REMINDER_DAYS DAY指定从到期日期向前推算的天数f.REMINDER_DAYS字段的值
and NOW() BETWEEN DATE_SUB(f.DUE_DATE, INTERVAL f.REMINDER_DAYS DAY) AND f.DUE_DATE
</if> </if>
ORDER BY f.CREATTIME DESC ORDER BY f.CREATTIME DESC
</select> </select>
</mapper> </mapper>

View File

@ -389,6 +389,7 @@
<if test="pd.REGISTRANT != null and pd.REGISTRANT != ''"><!-- 关键词检索 --> <if test="pd.REGISTRANT != null and pd.REGISTRANT != ''"><!-- 关键词检索 -->
and f.REGISTRANT LIKE CONCAT(CONCAT('%', #{pd.REGISTRANT}),'%') and f.REGISTRANT LIKE CONCAT(CONCAT('%', #{pd.REGISTRANT}),'%')
</if> </if>
ORDER BY f.CREATTIME DESC
</select> </select>
<select id="scrapListAll" parameterType="page" resultType="pd"> <select id="scrapListAll" parameterType="page" resultType="pd">

View File

@ -27,7 +27,7 @@
f.TRANSPORT_ENTERPRISES, f.TRANSPORT_ENTERPRISES,
f.REMINDER_STATUS, f.REMINDER_STATUS,
f.EXPIRE_STATUS, f.EXPIRE_STATUS,
f.RECORD_STATUS, f.ARCHIVES_TYPE,
f.TRAILER_VEHICLE, f.TRAILER_VEHICLE,
f.FRAMES_NUMBER, f.FRAMES_NUMBER,
f.VEHICLE_TYPE, f.VEHICLE_TYPE,
@ -72,7 +72,7 @@
TRANSPORT_ENTERPRISES, TRANSPORT_ENTERPRISES,
REMINDER_STATUS, REMINDER_STATUS,
EXPIRE_STATUS, EXPIRE_STATUS,
RECORD_STATUS, ARCHIVES_TYPE,
TRAILER_VEHICLE, TRAILER_VEHICLE,
FRAMES_NUMBER, FRAMES_NUMBER,
VEHICLE_TYPE, VEHICLE_TYPE,
@ -117,7 +117,7 @@
#{TRANSPORT_ENTERPRISES}, #{TRANSPORT_ENTERPRISES},
#{REMINDER_STATUS}, #{REMINDER_STATUS},
#{EXPIRE_STATUS}, #{EXPIRE_STATUS},
#{RECORD_STATUS}, #{ARCHIVES_TYPE},
#{TRAILER_VEHICLE}, #{TRAILER_VEHICLE},
#{FRAMES_NUMBER}, #{FRAMES_NUMBER},
#{VEHICLE_TYPE}, #{VEHICLE_TYPE},
@ -186,7 +186,7 @@
TRANSPORT_ENTERPRISES = #{TRANSPORT_ENTERPRISES}, TRANSPORT_ENTERPRISES = #{TRANSPORT_ENTERPRISES},
REMINDER_STATUS = #{REMINDER_STATUS}, REMINDER_STATUS = #{REMINDER_STATUS},
EXPIRE_STATUS = #{EXPIRE_STATUS}, EXPIRE_STATUS = #{EXPIRE_STATUS},
RECORD_STATUS = #{RECORD_STATUS}, ARCHIVES_TYPE = #{ARCHIVES_TYPE},
TRAILER_VEHICLE = #{TRAILER_VEHICLE}, TRAILER_VEHICLE = #{TRAILER_VEHICLE},
FRAMES_NUMBER = #{FRAMES_NUMBER}, FRAMES_NUMBER = #{FRAMES_NUMBER},
VEHICLE_TYPE = #{VEHICLE_TYPE}, VEHICLE_TYPE = #{VEHICLE_TYPE},
@ -402,40 +402,50 @@
<!-- 列表(全部) --> <!-- 列表(全部) -->
<select id="datalistPage" parameterType="page" resultType="pd"> <select id="datalistPage" parameterType="page" resultType="pd">
select SELECT
<include refid="Field"></include> f.*,
from CASE
WHEN btsm.PLATE_NUMBER IS NOT NULL THEN '1'
WHEN bta.RAW_PLATE_NUMBER IS NOT NULL THEN '2'
ELSE '0'
END AS NEW_ARCHIVES_TYPE
FROM
<include refid="tableName"></include> f <include refid="tableName"></include> f
where f.ISDELETE = '0' LEFT JOIN BUS_TRAFFIC_SCRAP_MANAGEMENT btsm ON f.PLATE_NUMBER = btsm.PLATE_NUMBER
<if test="pd.PLATE_NUMBER != null and pd.PLATE_NUMBER != ''"><!-- 关键词检索 --> LEFT JOIN BUS_TRAFFIC_ASSIGNED bta ON f.PLATE_NUMBER = bta.RAW_PLATE_NUMBER
and f.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%') WHERE f.ISDELETE = '0'
<if test="pd.PLATE_NUMBER != null and pd.PLATE_NUMBER != ''">
AND f.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}), '%')
</if> </if>
<if test="pd.VEHICLEOWNER != null and pd.VEHICLEOWNER != ''"><!-- 关键词检索 --> <if test="pd.VEHICLEOWNER != null and pd.VEHICLEOWNER != ''">
and f.VEHICLEOWNER LIKE CONCAT(CONCAT('%', #{pd.VEHICLEOWNER}),'%') AND f.VEHICLEOWNER LIKE CONCAT(CONCAT('%', #{pd.VEHICLEOWNER}), '%')
</if> </if>
<if test="pd.REGISTRANT != null and pd.REGISTRANT != ''"><!-- 关键词检索 --> <if test="pd.REGISTRANT != null and pd.REGISTRANT != ''">
and f.REGISTRANT LIKE CONCAT(CONCAT('%', #{pd.REGISTRANT}),'%') AND f.REGISTRANT LIKE CONCAT(CONCAT('%', #{pd.REGISTRANT}), '%')
</if> </if>
<if test="pd.EXPIRE_DATE != null and pd.EXPIRE_DATE != ''"><!-- 关键词检索 --> <!-- <if test="pd.EXPIRE_DATE != null and pd.EXPIRE_DATE != ''">-->
and f.EXPIRE_DATE = #{pd.EXPIRE_DATE} <!-- AND f.EXPIRE_DATE = #{pd.EXPIRE_DATE}-->
<!-- </if>-->
<if test="pd.EXPIRE_DATE != null and pd.EXPIRE_DATE != ''">
-- 添加条件只有当当前时间NOW())处于提醒时间段内时,才会返回相应的记录。
-- 提醒时间段是由两个日期定义的:
-- 1. 提前提醒的日期即从DUE_DATE字段指定的到期日期减去REMINDER_DAYS字段指定的天数。
-- 2. 到期日期DUE_DATE字段本身。
-- DATE_SUB函数用于计算提前提醒的日期。它从到期日期中减去一定天数以得到提醒开始的日期。
-- DATE_SUB的第一个参数是到期日期f.DUE_DATE
-- 第二个参数INTERVAL f.REMINDER_DAYS DAY指定从到期日期向前推算的天数f.REMINDER_DAYS字段的值
and NOW() BETWEEN DATE_SUB(f.EXPIRE_DATE, INTERVAL f.REMINDER_DAY DAY) AND f.EXPIRE_DATE
</if> </if>
<if test="pd.EXPIRE_STATUS != null and pd.EXPIRE_STATUS != ''"><!-- 关键词检索 --> <if test="pd.EXPIRE_STATUS != null and pd.EXPIRE_STATUS != ''">
and f.EXPIRE_STATUS = #{pd.EXPIRE_STATUS} AND f.EXPIRE_STATUS = #{pd.EXPIRE_STATUS}
</if> </if>
<if test="pd.REMINDER_STATUS != null and pd.REMINDER_STATUS != ''"><!-- 关键词检索 --> <if test="pd.REMINDER_STATUS != null and pd.REMINDER_STATUS != ''">
and f.REMINDER_STATUS = #{pd.REMINDER_STATUS} AND f.REMINDER_STATUS = #{pd.REMINDER_STATUS}
</if> </if>
<if test="pd.TRANSPORT_ENTERPRISES != null and pd.TRANSPORT_ENTERPRISES != ''"><!-- 关键词检索 --> <if test="pd.TRANSPORT_ENTERPRISES != null and pd.TRANSPORT_ENTERPRISES != ''">
and f.TRANSPORT_ENTERPRISES = #{pd.TRANSPORT_ENTERPRISES} AND f.TRANSPORT_ENTERPRISES = #{pd.TRANSPORT_ENTERPRISES}
</if> </if>
</select> ORDER BY f.OPERATTIME DESC
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.TAXATION_ID = '0'
</select> </select>
<select id="taxationList" parameterType="page" resultType="pd"> <select id="taxationList" parameterType="page" resultType="pd">