| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.steerinfo.dil.mapper.UniversalMapper">
- <sql id="orderBy">
- <if test="orderField != null and orderField != ''">
- order by "${orderField}"
- <if test="orderType != null and orderType != ''">
- ${orderType}
- </if>
- </if>
- </sql>
- <!-- 查询所有的汽车衡 -->
- <select id="getAllCalculateMes" resultType="java.util.Map">
- select RTC.TRUCK_CALCULATE_ID "id",
- RTC.TRUCK_CALCULATE_ID "value",
- RTC.TRUCK_CALCULATE_NUMBER "label",
- RTC.TRUCK_CALCULATE_NUMBER "text"
- from RMS_TRUCK_CALCULATE RTC
- </select>
- <select id="getAllGatepost" resultType="java.util.Map">
- select GATEPOST_ID "id",
- GATEPOST_ID "value",
- GATEPOST_NAME "label",
- GATEPOST_NAME "text"
- from RMS_GATEPOST
- </select>
- <select id="getAllWareHouse" resultType="java.util.Map">
- select WAREHOUSE_ID "id",
- WAREHOUSE_ID "value",
- WAREHOUSE_NAME "label",
- WAREHOUSE_NAME "text"
- from RMS_WAREHOUSE
- </select>
- <select id="getColumnNoRoutList" resultType="java.lang.String" parameterType="map">
- select DTCR.COLUMN_NAME from DIL_TABLE_COLUMN_ROLE DTCR
- left join DIL_ROLE_ORGCODE_TABLE DROT
- ON DTCR.PRIMARY_ID = DROT.COLUMN_ID
- WHERE
- DTCR.TABLE_NAME = #{tableName}
- <if test="orgCode != null">
- and DROT.ORG_CODE = #{orgCode}
- </if>
- </select>
- <select id="getColumnShowData" resultType="java.util.Map" parameterType="map">
- SELECT DTCR.COLUMN_NAME "key",
- DTCR.COLUMN_NAME "label"
- FROM DIL_TABLE_COLUMN_ROLE DTCR
- LEFT JOIN DIL_ROLE_ORGCODE_TABLE DROT on DTCR.PRIMARY_ID = DROT.COLUMN_ID
- WHERE
- DTCR.TABLE_NAME = #{tableName}
- <if test="userName != null">
- AND nvl(DROT.USER_NAME,'0') != #{userName}
- </if>
- <if test="schemeName != null">
- AND nvl(DROT.PRIMARY_NAME,'0') != #{schemeName}
- </if>
- </select>
- <select id="getColumnHiddenData" resultType="string" parameterType="map">
- SELECT DTCR.COLUMN_NAME FROM DIL_ROLE_ORGCODE_TABLE DROT
- LEFT JOIN DIL_TABLE_COLUMN_ROLE DTCR on DTCR.PRIMARY_ID = DROT.COLUMN_ID
- WHERE
- DTCR.TABLE_NAME = #{tableName}
- <if test="userName != null">
- AND DROT.USER_NAME = #{userName}
- </if>
- <if test="orgCode != null">
- AND DROT.ORG_CODE = #{orgCode}
- </if>
- <if test="schemeName != null">
- AND nvl(DROT.PRIMARY_NAME,'0') = #{schemeName}
- </if>
- </select>
- <select id="getColumnAllData" resultType="java.util.Map" parameterType="map">
- SELECT DTCR.COLUMN_NAME "key",
- DTCR.COLUMN_NAME "label"
- FROM DIL_TABLE_COLUMN_ROLE DTCR
- WHERE DTCR.TABLE_NAME = #{tableName}
- </select>
- <select id="getColumnAllScheme" resultType="java.util.LinkedHashMap" parameterType="map">
- SELECT distinct DROT.PRIMARY_NAME "schemeName",
- DROT.ENABLE_STATUS "enableStatus",
- DROT.USER_NAME "userName",
- DROT.ORG_CODE "orgCode",
- DTCR.TABLE_NAME "tableName"
- FROM DIL_ROLE_ORGCODE_TABLE DROT
- LEFT JOIN DIL_TABLE_COLUMN_ROLE DTCR on DROT.COLUMN_ID = DTCR.PRIMARY_ID
- WHERE DROT.USER_NAME = #{userName}
- AND DROT.ORG_CODE = #{orgCode}
- AND DTCR.TABLE_NAME = #{tableName}
- AND NVL(DROT.PRIMARY_NAME, '') != '默认方案'
- </select>
- <select id="getWlUrl" resultType="java.lang.String">
- SELECT DL.VERSION_VALUE
- FROM DIL_VERSION DL
- WHERE DL.VERSION_ID = 11
- </select>
- <!-- 边输边查公司 -->
- <select id="getCompanyMesByLike" resultType="java.util.Map">
- select * from(
- select
- RC.COMPANY_ID "companyId",
- RC.COMPANY_NAME "companyName",
- RC.COMPANY_TYPE "companyType",
- 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 DELETED = 0 )
- <where>
- <if test="companyType!=null and companyType!=''">
- AND "companyType" = #{companyType}
- </if>
- <if test="index!=null and index!=''">
- AND REGEXP_LIKE("label", #{index})
- </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>
- FETCH NEXT 100 ROWS ONLY
- </select>
- <select id="getMaterialTypeByLike" resultType="java.util.Map">
- select * from(
- 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"
- from RMS_MATERIAL_TYPE
- where DELETED = 0
- )
- <where>
- <if test="index!=null and index!=''">
- AND REGEXP_LIKE("label", #{index})
- </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>
- FETCH NEXT 100 ROWS ONLY
- </select>
- <select id="getEmissionStandardByLike" resultType="java.util.Map">
- select * from (
- select
- EMISSION_STANDARD_ID "emissionStandardId",
- EMISSION_STANDARD_NAME "emissionStandardName",
- EMISSION_STANDARD_ID "id",
- EMISSION_STANDARD_ID "value",
- EMISSION_STANDARD_NAME "label",
- EMISSION_STANDARD_NAME "text",
- from RMS_EMISSION_STANDARD
- where DELETED = 0
- )
- <where>
- <if test="index!=null and index!=''">
- AND REGEXP_LIKE("label", #{index})
- </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>
- FETCH NEXT 100 ROWS ONLY
- </select>
- <select id="getOperationPointByLike" resultType="java.util.Map">
- select * from (
- select
- OPERATION_POINT_ID "operationPointId",
- OPERATION_POINT_NAME "operationPointName",
- OPERATION_POINT_TYPE "operationPointType",
- OPERATION_POINT_ID "id",
- OPERATION_POINT_ID "value",
- OPERATION_POINT_NAME "label",
- OPERATION_POINT_NAME "text"
- from RMS_OPERATION_POINT
- where DELETED = 0
- )
- <where>
- <if test="operationPointType!=null and operationPointType!=''">
- AND REGEXP_LIKE("operationPointType", #{operationPointType})
- </if>
- <if test="index!=null and index!=''">
- AND REGEXP_LIKE("label", #{index})
- </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>
- FETCH NEXT 100 ROWS ONLY
- </select>
- <select id="getPersonnelByLike" resultType="java.util.Map">
- select * from (
- select
- PERSONNEL_ID "personnelId",
- PERSONNEL_NAME "personnelName",
- PERSONNEL_POST "personnelPost",
- PERSONNEL_ID "id",
- PERSONNEL_ID "value",
- PERSONNEL_NAME "label",
- PERSONNEL_NAME "text"
- from RMS_PERSONNEL
- where DELETED = 0
- )
- <where>
- <if test="personnelPost!=null and personnelPost!=''">
- AND "personnelPost" = #{personnelPost}
- </if>
- <if test="index!=null and index!=''">
- AND REGEXP_LIKE("label", #{index})
- </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>
- FETCH NEXT 100 ROWS ONLY
- </select>
- <select id="getCapacityByLike" resultType="java.util.Map">
- select * from (
- SELECT DISTINCT
- RCA .CAPACITY_ID "capacityId",
- RCA .CAPACITY_ID "id",
- RCA .CAPACITY_ID "value",
- RCA .CAPACITY_NUMBER "label",
- RCA .CAPACITY_NUMBER "text"
- FROM RMS_CAPACITY RCA
- LEFT JOIN RMS_CAPACITY_CARRIER RCC ON RCA .CAPACITY_ID = RCC .CAPACITY_ID
- LEFT JOIN RMS_COMPANY RC ON RC .COMPANY_ID = RCC .COMPANY_ID
- WHERE RCA .DELETED = 0
- <if test="orgCode!=null and orgCode !='' and roleCodes.contains('chengyunshang')">
- AND RC.SSO_CODE = #{orgCode}
- </if>
- )
- <where>
- <if test="index!=null and index!=''">
- AND REGEXP_LIKE("label", #{index})
- </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>
- FETCH NEXT 100 ROWS ONLY
- </select>
- <select id="getrmsrmsjobinfosBylike" resultType="java.util.Map">
- select * from(
- select
- RC.JOB_ID "jboId",
- RC.JOB_NAME "jobName",
- RC.JOB_ID "id",
- RC.JOB_ID "value",
- RC.JOB_NAME "label",
- RC.JOB_NAME "text"
- from RMS_JOB_INFO RC
- where DELETED = 0
- )
- <where>
- <if test="index!=null and index!=''">
- AND REGEXP_LIKE("label", #{index})
- </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>
- FETCH NEXT 100 ROWS ONLY
- </select>
- <select id="getTransRangeByLike" resultType="java.util.Map">
- select * from(
- select
- RC.TRANS_RANGE_ID "transrangeId",
- RC.TRANS_RANGE_NAME "transrangeName",
- RC.TRANS_RANGE_ID "id",
- RC.TRANS_RANGE_ID "value",
- RC.TRANS_RANGE_NAME "label",
- RC.TRANS_RANGE_NAME "text"
- from RMS_TRANS_RANGE RC
- where DELETED = 0
- )
- <where>
- <if test="index!=null and index!=''">
- AND REGEXP_LIKE("label", #{index})
- </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>
- FETCH NEXT 100 ROWS ONLY
- </select>
- <select id="getCategoryCodeByLike" resultType="java.util.Map">
- select * from(
- select
- RC.RULES_ID "rulesId",
- RC.RULES_CODE "rulesCode",
- RC.RULES_ID "id",
- RC.RULES_ID "value",
- RC.RULES_CODE "label",
- RC.RULES_CODE "text",
- from RMS_DEMAND_RULES RC
- where DELETED = 0
- )
- <where>
- <if test="index!=null and index!=''">
- AND REGEXP_LIKE("label", #{index})
- </if>
- <if test="id!=null and !(index!=null and index!='')">
- AND "id" in
- <foreach collection="id" item="item" open="(" close=")" separator="," >
- #{item}
- </foreach>
- </if>
- </where>
- FETCH NEXT 100 ROWS ONLY
- </select>
- <select id="getCapacityTypeByLike" resultType="java.util.Map">
- select * from(
- select
- RC.CAPACITY_TYPE_ID "capacityTypeId",
- RC.CAPACITY_TYPE_NAME "capacityTypeName",
- RC.CAPACITY_TYPE_ID "id",
- RC.CAPACITY_TYPE_ID "value",
- RC.CAPACITY_TYPE_NAME "label",
- RC.CAPACITY_TYPE_NAME "text",
- from RMS_CAPACITY_TYPE RC
- where DELETED = 0
- )
- <where>
- <if test="index!=null and index!=''">
- AND REGEXP_LIKE("label", #{index})
- </if>
- <if test="id!=null and !(index!=null and index!='')">
- AND "id" in
- <foreach collection="id" item="item" open="(" close=")" separator="," >
- #{item}
- </foreach>
- </if>
- </where>
- FETCH NEXT 100 ROWS ONLY
- </select>
- <select id="getLineByLike" resultType="java.util.Map">
- select * from(
- select
- RC.LINE_ID "lineId",
- RC.LINE_NAME "lineName",
- RC.LINE_ID "id",
- RC.LINE_ID "value",
- RC.LINE_NAME "label",
- RC.LINE_NAME "text"
- from RMS_LINE RC
- where DELETED = 0
- )
- <where>
- <if test="index!=null and index!=''">
- AND REGEXP_LIKE("label", #{index})
- </if>
- <if test="id!=null and !(index!=null and index!='')">
- AND "id" in
- <foreach collection="id" item="item" open="(" close=")" separator="," >
- #{item}
- </foreach>
- </if>
- </where>
- FETCH NEXT 100 ROWS ONLY
- </select>
- <select id="getMaterialByLike" resultType="java.util.Map">
- select * from(
- select
- RC.MATERIAL_ID "materialId",
- RC.MATERIAL_NAME "materialName",
- RC.MATERIAL_ID "id",
- RC.MATERIAL_ID "value",
- RC.MATERIAL_NAME "label",
- RC.MATERIAL_NAME "text",
- from RMS_MATERIAL RC
- where DELETED = 0
- )
- <where>
- <if test="index!=null and index!=''">
- AND REGEXP_LIKE("label", #{index})
- </if>
- <if test="id!=null and !(index!=null and index!='')">
- AND "id" in
- <foreach collection="id" item="item" open="(" close=")" separator="," >
- #{item}
- </foreach>
- </if>
- </where>
- FETCH NEXT 100 ROWS ONLY
- </select>
- </mapper>
|