|
|
@@ -138,16 +138,48 @@
|
|
|
<if test="businessCompanyId!=null and businessCompanyId!=''">
|
|
|
AND RC.COMPANY_ID = #{businessCompanyId}
|
|
|
</if>
|
|
|
+ <if test="supplierCompanyId!=null and supplierCompanyId!=''">
|
|
|
+ AND RC.COMPANY_ID = #{supplierCompanyId}
|
|
|
+ </if>
|
|
|
+ <if test="receiveCompanyId!=null and receiveCompanyId!=''">
|
|
|
+ AND RC.COMPANY_ID = #{receiveCompanyId}
|
|
|
+ </if>
|
|
|
<if test="carrierId!=null and carrierId!=''">
|
|
|
AND RC.COMPANY_ID = #{carrierId}
|
|
|
</if>
|
|
|
<if test="index!=null and index!=''">
|
|
|
AND REGEXP_LIKE(RC.COMPANY_NAME, #{index})
|
|
|
</if>
|
|
|
- <if test="!roleCodes.contains('admin') and dilCompanyList != null and dilCompanyList.size > 0">
|
|
|
- AND RC.COMPANY_ID in
|
|
|
+ <if test="roleCodes.contains('shippingCompany') and dilCompanyList != null and dilCompanyList.size > 0">
|
|
|
+ or RC.COMPANY_ID in
|
|
|
+ <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
|
|
|
+ <if test="companyType == '发货单位'">
|
|
|
+ #{item.companyId}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="roleCodes.contains('recevingCompany') and dilCompanyList != null and dilCompanyList.size > 0">
|
|
|
+ or RC.COMPANY_ID in
|
|
|
+ <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
|
|
|
+ <if test="companyType == '收货单位'">
|
|
|
+ #{item.companyId}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="roleCodes.contains('carrierCompany') and dilCompanyList != null and dilCompanyList.size > 0">
|
|
|
+ or RC.COMPANY_ID in
|
|
|
+ <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
|
|
|
+ <if test="companyType == '承运单位'">
|
|
|
+ #{item.companyId}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="roleCodes.contains('businessCompany') and dilCompanyList != null and dilCompanyList.size > 0">
|
|
|
+ or RC.COMPANY_ID in
|
|
|
<foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
|
|
|
- #{item.companyId}
|
|
|
+ <if test="companyType == '业务单位'">
|
|
|
+ #{item.companyId}
|
|
|
+ </if>
|
|
|
</foreach>
|
|
|
</if>
|
|
|
</where>
|
|
|
@@ -207,8 +239,6 @@
|
|
|
select * from(
|
|
|
select * from(
|
|
|
select
|
|
|
- MATERIAL_TYPE_ID "materialTypeId",
|
|
|
- MATERIAL_TYPE_NAME "materialTypeName",
|
|
|
MATERIAL_TYPE_ID "id",
|
|
|
MATERIAL_TYPE_ID "value",
|
|
|
MATERIAL_TYPE_NAME "label",
|
|
|
@@ -224,23 +254,12 @@
|
|
|
<if test="remark!=null and remark!=''">
|
|
|
AND REGEXP_LIKE("remark", #{remark})
|
|
|
</if>
|
|
|
- <if test="materialTypeId!=null and materialTypeId!=''">
|
|
|
- AND "materialTypeId" = #{materialTypeId}
|
|
|
- </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 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",
|
|
|
@@ -632,15 +651,13 @@
|
|
|
<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>
|
|
|
+ DELETED = 0
|
|
|
<if test="index!=null and index!=''">
|
|
|
AND REGEXP_LIKE(RC.MATERIAL_NAME, #{index})
|
|
|
</if>
|
|
|
@@ -650,8 +667,6 @@
|
|
|
<if test="id!=null and id.size>0">
|
|
|
UNION
|
|
|
select
|
|
|
- RC.MATERIAL_ID "materialId",
|
|
|
- RC.MATERIAL_NAME "materialName",
|
|
|
RC.MATERIAL_ID "id",
|
|
|
RC.MATERIAL_ID "value",
|
|
|
RC.MATERIAL_NAME "label",
|