jsk 出库台账添加 分公司-领用单位-工程名称 过滤条件
This commit is contained in:
parent
dc0e239761
commit
373229a416
|
|
@ -97,4 +97,8 @@ public class LeaseOutInfo {
|
||||||
|
|
||||||
@ApiModelProperty(value = "用户id")
|
@ApiModelProperty(value = "用户id")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
|
private String leaseUnitId;
|
||||||
|
private String leaseProjectId;
|
||||||
|
private String impUnitName;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -260,6 +260,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="userId != null">
|
<if test="userId != null">
|
||||||
AND mtm.user_id = #{userId}
|
AND mtm.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="leaseUnitId != null">
|
||||||
|
AND bu.unit_id = #{leaseUnitId}
|
||||||
|
</if>
|
||||||
|
<if test="leaseProjectId != null">
|
||||||
|
AND bp.pro_id = #{leaseProjectId}
|
||||||
|
</if>
|
||||||
|
<if test="impUnitName != null">
|
||||||
|
AND bp.imp_unit in (
|
||||||
|
select dept_id from sys_dept where dept_id=#{impUnitName}
|
||||||
|
union
|
||||||
|
select dept_id from sys_dept where parent_id=#{impUnitName}
|
||||||
|
union
|
||||||
|
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id=#{impUnitName})
|
||||||
|
union
|
||||||
|
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id=#{impUnitName}))
|
||||||
|
)
|
||||||
|
</if>
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
<![CDATA[and DATE_FORMAT( COALESCE(lai.release_time, lai.create_time), '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
<![CDATA[and DATE_FORMAT( COALESCE(lai.release_time, lai.create_time), '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -314,6 +331,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="userId != null">
|
<if test="userId != null">
|
||||||
AND mtm.user_id = #{userId}
|
AND mtm.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="leaseUnitId != null">
|
||||||
|
AND bu.unit_id = #{leaseUnitId}
|
||||||
|
</if>
|
||||||
|
<if test="leaseProjectId != null">
|
||||||
|
AND bp.pro_id = #{leaseProjectId}
|
||||||
|
</if>
|
||||||
|
<if test="impUnitName != null">
|
||||||
|
AND bp.imp_unit in (
|
||||||
|
select dept_id from sys_dept where dept_id=#{impUnitName}
|
||||||
|
union
|
||||||
|
select dept_id from sys_dept where parent_id=#{impUnitName}
|
||||||
|
union
|
||||||
|
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id=#{impUnitName})
|
||||||
|
union
|
||||||
|
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id=#{impUnitName}))
|
||||||
|
)
|
||||||
|
</if>
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
<![CDATA[ AND DATE_FORMAT( lpd.create_time , '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
<![CDATA[ AND DATE_FORMAT( lpd.create_time , '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -1629,7 +1629,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getImpUnitNameList" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
<select id="getImpUnitNameList" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
||||||
SELECT
|
SELECT
|
||||||
DISTINCT sd.dept_name AS impUnitName
|
DISTINCT sd.dept_name AS impUnitName,sd.dept_id as impUnit
|
||||||
FROM
|
FROM
|
||||||
bm_project bp
|
bm_project bp
|
||||||
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
||||||
|
|
|
||||||
|
|
@ -1418,7 +1418,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getImpUnitNameList" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
<select id="getImpUnitNameList" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
||||||
SELECT
|
SELECT
|
||||||
DISTINCT sd.dept_name AS impUnitName
|
DISTINCT sd.dept_name AS impUnitName,sd.dept_id as impUnit
|
||||||
FROM
|
FROM
|
||||||
bm_project bp
|
bm_project bp
|
||||||
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue