|
@@ -79,6 +79,7 @@
|
|
|
|
|
|
|
|
<!-- 边输边查公司 -->
|
|
<!-- 边输边查公司 -->
|
|
|
<select id="getCompanyMesByLike" resultType="java.util.Map">
|
|
<select id="getCompanyMesByLike" resultType="java.util.Map">
|
|
|
|
|
+ select * from(
|
|
|
select * from(
|
|
select * from(
|
|
|
select
|
|
select
|
|
|
RC.SSO_ID "ssoId",
|
|
RC.SSO_ID "ssoId",
|
|
@@ -99,16 +100,30 @@
|
|
|
<if test="index!=null and index!=''">
|
|
<if test="index!=null and index!=''">
|
|
|
AND REGEXP_LIKE("label", #{index})
|
|
AND REGEXP_LIKE("label", #{index})
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="id!=null and id.size>0 and !(index!=null and index!='')">
|
|
|
|
|
- AND "id" in
|
|
|
|
|
- <foreach collection="id" item="item" open="(" close=")" separator="," >
|
|
|
|
|
- #{item}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
</where>
|
|
</where>
|
|
|
FETCH NEXT 10 ROWS ONLY
|
|
FETCH NEXT 10 ROWS ONLY
|
|
|
|
|
+ )
|
|
|
|
|
+ <if test="id!=null and id.size>0">
|
|
|
|
|
+ UNION
|
|
|
|
|
+ select
|
|
|
|
|
+ RC.SSO_ID "ssoId",
|
|
|
|
|
+ RC.SSO_CODE "ssoCode",
|
|
|
|
|
+ RC.COMPANY_ID "id",
|
|
|
|
|
+ RC.COMPANY_ID "value",
|
|
|
|
|
+ <if test="companyType==null">
|
|
|
|
|
+ RC.COMPANY_TYPE || '-' ||
|
|
|
|
|
+ </if>
|
|
|
|
|
+ RC.COMPANY_NAME "label",
|
|
|
|
|
+ RC.COMPANY_NAME "text"
|
|
|
|
|
+ from RMS_COMPANY RC
|
|
|
|
|
+ where RC.COMPANY_ID in
|
|
|
|
|
+ <foreach collection="id" item="item" open="(" close=")" separator="," >
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
</select>
|
|
</select>
|
|
|
<select id="getMaterialTypeByLike" resultType="java.util.Map">
|
|
<select id="getMaterialTypeByLike" resultType="java.util.Map">
|
|
|
|
|
+ select * from(
|
|
|
select * from(
|
|
select * from(
|
|
|
select
|
|
select
|
|
|
MATERIAL_TYPE_ID "materialTypeId",
|
|
MATERIAL_TYPE_ID "materialTypeId",
|
|
@@ -128,14 +143,25 @@
|
|
|
<if test="remark!=null and remark!=''">
|
|
<if test="remark!=null and remark!=''">
|
|
|
AND REGEXP_LIKE("remark", #{remark})
|
|
AND REGEXP_LIKE("remark", #{remark})
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="id!=null and id.size>0 and !(index!=null and index!='')">
|
|
|
|
|
- AND "id" in
|
|
|
|
|
- <foreach collection="id" item="item" open="(" close=")" separator="," >
|
|
|
|
|
- #{item}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
</where>
|
|
</where>
|
|
|
FETCH NEXT 10 ROWS ONLY
|
|
FETCH NEXT 10 ROWS ONLY
|
|
|
|
|
+ )
|
|
|
|
|
+ <if test="id!=null and id.size>0">
|
|
|
|
|
+ UNION
|
|
|
|
|
+ select
|
|
|
|
|
+ MATERIAL_TYPE_ID "materialTypeId",
|
|
|
|
|
+ MATERIAL_TYPE_NAME "materialTypeName",
|
|
|
|
|
+ MATERIAL_TYPE_ID "id",
|
|
|
|
|
+ MATERIAL_TYPE_ID "value",
|
|
|
|
|
+ MATERIAL_TYPE_NAME "label",
|
|
|
|
|
+ MATERIAL_TYPE_NAME "text",
|
|
|
|
|
+ REMARK "remark"
|
|
|
|
|
+ from RMS_MATERIAL_TYPE
|
|
|
|
|
+ where MATERIAL_TYPE_ID in
|
|
|
|
|
+ <foreach collection="id" item="item" open="(" close=")" separator="," >
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
</select>
|
|
</select>
|
|
|
<select id="getEmissionStandardByLike" resultType="java.util.Map">
|
|
<select id="getEmissionStandardByLike" resultType="java.util.Map">
|
|
|
select * from (
|
|
select * from (
|
|
@@ -525,10 +551,11 @@
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
<select id="getBusinessTypeLike" resultType="java.util.Map">
|
|
<select id="getBusinessTypeLike" resultType="java.util.Map">
|
|
|
|
|
+ select * from(
|
|
|
select * from(
|
|
select * from(
|
|
|
select
|
|
select
|
|
|
- DBT.BUSINESS_TYPE_ID "businessTypeId",
|
|
|
|
|
- DBT.BUSINESS_TYPE_ID "id",
|
|
|
|
|
|
|
+ DBT.BUSINESS_TYPE_ID "businessTypeId",
|
|
|
|
|
+ DBT.BUSINESS_TYPE_ID "id",
|
|
|
DBT.BUSINESS_TYPE_ID "value",
|
|
DBT.BUSINESS_TYPE_ID "value",
|
|
|
DBT.BUSINESS_TYPE_NAME "text",
|
|
DBT.BUSINESS_TYPE_NAME "text",
|
|
|
DBT.BUSINESS_TYPE_NAME "businessTypeName",
|
|
DBT.BUSINESS_TYPE_NAME "businessTypeName",
|
|
@@ -543,10 +570,10 @@
|
|
|
AND REGEXP_LIKE("label", #{index})
|
|
AND REGEXP_LIKE("label", #{index})
|
|
|
</if>
|
|
</if>
|
|
|
<if test="businessType!=null and businessType!=''">
|
|
<if test="businessType!=null and businessType!=''">
|
|
|
- AND "businessTypeId" = #{businessType}
|
|
|
|
|
|
|
+ AND "businessTypeId" = #{businessType}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="businessScene!=null and businessScene!=''">
|
|
<if test="businessScene!=null and businessScene!=''">
|
|
|
- AND "businessScene" = #{businessScene}
|
|
|
|
|
|
|
+ AND "businessScene" = #{businessScene}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="transportType!=null and transportType!=''">
|
|
<if test="transportType!=null and transportType!=''">
|
|
|
AND REGEXP_LIKE("transportType", #{transportType})
|
|
AND REGEXP_LIKE("transportType", #{transportType})
|
|
@@ -554,14 +581,28 @@
|
|
|
<if test="materialTypeName!=null and materialTypeName!=''">
|
|
<if test="materialTypeName!=null and materialTypeName!=''">
|
|
|
AND REGEXP_LIKE("materialTypeName", #{materialTypeName})
|
|
AND REGEXP_LIKE("materialTypeName", #{materialTypeName})
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="id!=null and id.size > 0 and !(index!=null and index!='')">
|
|
|
|
|
- AND "id" in
|
|
|
|
|
- <foreach collection="id" item="item" open="(" close=")" separator="," >
|
|
|
|
|
- #{item}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
+
|
|
|
</where>
|
|
</where>
|
|
|
FETCH NEXT 10 ROWS ONLY
|
|
FETCH NEXT 10 ROWS ONLY
|
|
|
|
|
+ )
|
|
|
|
|
+ <if test="id!=null and id.size > 0">
|
|
|
|
|
+ UNION
|
|
|
|
|
+ select
|
|
|
|
|
+ DBT.BUSINESS_TYPE_ID "businessTypeId",
|
|
|
|
|
+ DBT.BUSINESS_TYPE_ID "id",
|
|
|
|
|
+ DBT.BUSINESS_TYPE_ID "value",
|
|
|
|
|
+ DBT.BUSINESS_TYPE_NAME "text",
|
|
|
|
|
+ DBT.BUSINESS_TYPE_NAME "businessTypeName",
|
|
|
|
|
+ DBT.BUSINESS_SCENE "businessScene",
|
|
|
|
|
+ DBT.BUSINESS_TYPE_NAME "label",
|
|
|
|
|
+ DBT.ALTERNATE_FIELDS1 "transportType",
|
|
|
|
|
+ DBT.ALTERNATE_FIELDS2 "materialTypeName"
|
|
|
|
|
+ from DIL_BUSINESS_TYPE DBT
|
|
|
|
|
+ WHERE DBT.BUSINESS_TYPE_ID in
|
|
|
|
|
+ <foreach collection="id" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
</select>
|
|
</select>
|
|
|
<select id="findTrainWeight" resultType="java.util.Map">
|
|
<select id="findTrainWeight" resultType="java.util.Map">
|
|
|
<foreach collection="list" item="item" separator=" UNION " >
|
|
<foreach collection="list" item="item" separator=" UNION " >
|
|
@@ -651,7 +692,7 @@
|
|
|
AND REGEXP_LIKE("label", #{index})
|
|
AND REGEXP_LIKE("label", #{index})
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
- FETCH NEXT 10 ROWS ONLY
|
|
|
|
|
|
|
+ FETCH NEXT 1 ROWS ONLY
|
|
|
</select>
|
|
</select>
|
|
|
<select id="getDemandRulesCode" resultType="java.util.Map">
|
|
<select id="getDemandRulesCode" resultType="java.util.Map">
|
|
|
SELECT * FROM (
|
|
SELECT * FROM (
|