|
|
@@ -228,16 +228,19 @@
|
|
|
select * from(
|
|
|
select * from(
|
|
|
select
|
|
|
- MATERIAL_TYPE_ID "operationsNameId",
|
|
|
- MATERIAL_TYPE_NAME "operationsName",
|
|
|
- MATERIAL_TYPE_ID "id",
|
|
|
- MATERIAL_TYPE_ID "value",
|
|
|
- MATERIAL_TYPE_NAME "label",
|
|
|
- MATERIAL_TYPE_NAME "text",
|
|
|
- REMARK "remark",
|
|
|
+ t.MATERIAL_TYPE_ID "operationsNameId",
|
|
|
+ t.MATERIAL_TYPE_NAME "operationsName",
|
|
|
+ t.MATERIAL_TYPE_ID "id",
|
|
|
+ t.MATERIAL_TYPE_ID "value",
|
|
|
+ t.MATERIAL_TYPE_NAME "label",
|
|
|
+ t.MATERIAL_TYPE_NAME "text",
|
|
|
+ t.REMARK "remark",
|
|
|
+ t1.company_id "businessCompanyId",
|
|
|
'operationsName' "prop"
|
|
|
- from RMS_MATERIAL_TYPE
|
|
|
- where DELETED = 0
|
|
|
+ from RMS_MATERIAL_TYPE t
|
|
|
+ left join rms_company_b_m_t t1
|
|
|
+ on t.material_type_id = t1.material_type_id
|
|
|
+ where t.DELETED = 0
|
|
|
)
|
|
|
<where>
|
|
|
<if test="index!=null and index!=''">
|
|
|
@@ -249,6 +252,9 @@
|
|
|
<if test="lastIndex!=null">
|
|
|
and "operationsNameId" < #{lastIndex}
|
|
|
</if>
|
|
|
+ <if test="companyType != null and companyType == '业务单位' and isListed == null">
|
|
|
+ <include refid="com.steerinfo.dil.mapper.CommonMapper.filterCompanyData"></include>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
order by "operationsNameId" desc
|
|
|
FETCH NEXT 10 ROWS ONLY
|
|
|
@@ -468,8 +474,10 @@
|
|
|
RCA.REMARK1 "remark1",
|
|
|
RCA.CAPACITY_NUMBER "capacityNumber",
|
|
|
(case
|
|
|
+ when RCA.deleted = '3' is not null then '维保'
|
|
|
when oto.capacity_id is null then '空闲'
|
|
|
when oto.deleted != '2' and oto.capacity_id is not null then '已派'
|
|
|
+ when oto.deleted = '2' and oto.capacity_id is not null then '空闲'
|
|
|
end) "status",
|
|
|
RCT.CAPACITY_TYPE_NAME "capacityTypeName",
|
|
|
'capacityNumber' "prop"
|
|
|
@@ -664,11 +672,16 @@
|
|
|
</if>
|
|
|
WHERE RCA .DELETED = 0
|
|
|
<if test="capacityTypeId !=null">
|
|
|
- AND RCT.CAPACITY_TYPE_ID in (
|
|
|
- select rct.capacity_type_id from rms_capacity_type rct
|
|
|
- START WITH rct.capacity_type_id = #{capacityTypeId}
|
|
|
- connect BY PRIOR rct.capacity_type_id = rct.p_capacity_type_id
|
|
|
- )
|
|
|
+ AND (RCT.CAPACITY_TYPE_ID in (
|
|
|
+ select rct.capacity_type_id from rms_capacity_type rct
|
|
|
+ START WITH rct.capacity_type_id = #{capacityTypeId}
|
|
|
+ connect BY PRIOR rct.capacity_type_id = rct.p_capacity_type_id
|
|
|
+ )
|
|
|
+ or RCA.CAPACITY_TYPE_ID2 in (
|
|
|
+ select rct.capacity_type_id from rms_capacity_type rct
|
|
|
+ START WITH rct.capacity_type_id = #{capacityTypeId}
|
|
|
+ connect BY PRIOR rct.capacity_type_id = rct.p_capacity_type_id
|
|
|
+ ))
|
|
|
</if>
|
|
|
<if test="capacityType != null and capacityType != '' ">
|
|
|
AND RCT.CAPACITY_TYPE_NAME = #{capacityType}
|
|
|
@@ -826,12 +839,15 @@
|
|
|
rc.START_POINT_ID "shippingPointId",
|
|
|
rc.END_POINT_ID "receivingPointId",
|
|
|
rc.LINE_ID "lineId",
|
|
|
+ t1.company_id "businessCompanyId",
|
|
|
'operationRangeName' "prop"
|
|
|
from RMS_TRANS_RANGE RC
|
|
|
left join rms_operation_point rop_s
|
|
|
on rop_s.operation_point_id = RC.start_point_id
|
|
|
left join rms_operation_point rop_e
|
|
|
on rop_e.operation_point_id = RC.end_point_id
|
|
|
+ left join rms_company_b_m_t t1
|
|
|
+ on RC.trans_range_id = t1.trans_range_id
|
|
|
<where>
|
|
|
and RC.DELETED = 0
|
|
|
<if test="isNc!=null and isNc!=''">
|
|
|
@@ -841,6 +857,9 @@
|
|
|
</where>
|
|
|
)
|
|
|
<where>
|
|
|
+ <if test="companyType != null and companyType == '业务单位' and isListed == null">
|
|
|
+ <include refid="com.steerinfo.dil.mapper.CommonMapper.filterCompanyData"></include>
|
|
|
+ </if>
|
|
|
<if test="index!=null and index!=''">
|
|
|
<bind name="indexBind" value="'%' + index + '%'"/>
|
|
|
AND "label" like #{indexBind}
|