|
|
@ -13,7 +13,8 @@ |
|
|
<result column="apply_time" property="applyTime" jdbcType="INTEGER"/> |
|
|
<result column="apply_time" property="applyTime" jdbcType="INTEGER"/> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
<!-- 字段映射 --> |
|
|
<!-- 字段映射 --> |
|
|
<resultMap id="simpleApplicationOutRecordMap" type="com.dreamchaser.depository_manage.entity.SimpleApplicationOutRecord"> |
|
|
<resultMap id="simpleApplicationOutRecordMap" |
|
|
|
|
|
type="com.dreamchaser.depository_manage.entity.SimpleApplicationOutRecord"> |
|
|
<id property="id" column="aorid" jdbcType="INTEGER"/> |
|
|
<id property="id" column="aorid" jdbcType="INTEGER"/> |
|
|
<result column="applicantId" property="applicantId" jdbcType="INTEGER"/> |
|
|
<result column="applicantId" property="applicantId" jdbcType="INTEGER"/> |
|
|
<result column="applicantTime" property="applicantTime" jdbcType="INTEGER"/> |
|
|
<result column="applicantTime" property="applicantTime" jdbcType="INTEGER"/> |
|
|
@ -285,11 +286,13 @@ |
|
|
FROM applicationOutRecordInfo WHERE 1=1 |
|
|
FROM applicationOutRecordInfo WHERE 1=1 |
|
|
<if test='isDone == "0"'> |
|
|
<if test='isDone == "0"'> |
|
|
and (departmentHeadTime = 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass = 3) |
|
|
and (departmentHeadTime = 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass = 3) |
|
|
or (depositoryManagerTime = 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass = 3) |
|
|
or (depositoryManagerTime = 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass = |
|
|
|
|
|
3) |
|
|
</if> |
|
|
</if> |
|
|
<if test='isDone == "1"'> |
|
|
<if test='isDone == "1"'> |
|
|
and (departmentHeadTime != 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass != 3) |
|
|
and (departmentHeadTime != 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass != 3) |
|
|
or (depositoryManagerTime != 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass != 3) |
|
|
or (depositoryManagerTime != 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass |
|
|
|
|
|
!= 3) |
|
|
</if> |
|
|
</if> |
|
|
group by aorid |
|
|
group by aorid |
|
|
ORDER BY applicantTime desc |
|
|
ORDER BY applicantTime desc |
|
|
@ -310,6 +313,56 @@ |
|
|
</if> |
|
|
</if> |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="findApplicationInRecordPByUser" parameterType="map" |
|
|
|
|
|
resultMap="applicationInRecord"> |
|
|
|
|
|
select |
|
|
|
|
|
<include refid="ApplicationInRecordInfo"/> |
|
|
|
|
|
from applicationInRecordInfo |
|
|
|
|
|
where 1 = 1 |
|
|
|
|
|
<if test="depositoryIdList != null"> |
|
|
|
|
|
and did in |
|
|
|
|
|
<foreach collection="depositoryIdList" index="index" item="id" open="(" separator="," close=")"> |
|
|
|
|
|
#{id} |
|
|
|
|
|
</foreach> |
|
|
|
|
|
<if test="applicantId != null and applicantId != ''"> |
|
|
|
|
|
or applicant_id = #{applicantId} |
|
|
|
|
|
</if> |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="depositoryIdList == null"> |
|
|
|
|
|
<if test="applicantId != null and applicantId != ''"> |
|
|
|
|
|
and applicant_id = #{applicantId} |
|
|
|
|
|
</if> |
|
|
|
|
|
</if> |
|
|
|
|
|
order by applicant_time desc |
|
|
|
|
|
<if test="begin != null and size != null"> |
|
|
|
|
|
LIMIT #{begin},#{size} |
|
|
|
|
|
</if> |
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="findApplicationInRecordPCountByUser" parameterType="map" |
|
|
|
|
|
resultType="int"> |
|
|
|
|
|
select |
|
|
|
|
|
count(*) |
|
|
|
|
|
from applicationInRecordInfo |
|
|
|
|
|
where 1 = 1 |
|
|
|
|
|
<if test="depositoryIdList != null"> |
|
|
|
|
|
and did in |
|
|
|
|
|
<foreach collection="depositoryIdList" index="index" item="id" open="(" separator="," close=")"> |
|
|
|
|
|
#{id} |
|
|
|
|
|
</foreach> |
|
|
|
|
|
<if test="applicantId != null and applicantId != ''"> |
|
|
|
|
|
or applicant_id = #{applicantId} |
|
|
|
|
|
</if> |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="depositoryIdList == null"> |
|
|
|
|
|
<if test="applicantId != null and applicantId != ''"> |
|
|
|
|
|
and applicant_id = #{applicantId} |
|
|
|
|
|
</if> |
|
|
|
|
|
</if> |
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
<!--根据条件查询入库记录--> |
|
|
<!--根据条件查询入库记录--> |
|
|
<select id="findApplicationInRecordPByCondition" parameterType="map" resultMap="applicationInRecord"> |
|
|
<select id="findApplicationInRecordPByCondition" parameterType="map" resultMap="applicationInRecord"> |
|
|
select |
|
|
select |
|
|
@ -325,6 +378,7 @@ |
|
|
<if test="depositoryId != null and depositoryId != ''"> |
|
|
<if test="depositoryId != null and depositoryId != ''"> |
|
|
and did = #{depositoryId} |
|
|
and did = #{depositoryId} |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
|
|
|
<if test="mid != null and mid != ''"> |
|
|
<if test="mid != null and mid != ''"> |
|
|
and mid = #{mid} |
|
|
and mid = #{mid} |
|
|
</if> |
|
|
</if> |
|
|
@ -858,7 +912,8 @@ |
|
|
<insert id="insertDepositoryRecords" parameterType="list"> |
|
|
<insert id="insertDepositoryRecords" parameterType="list"> |
|
|
INSERT INTO depository_record ( |
|
|
INSERT INTO depository_record ( |
|
|
id, application_id, mname, depository_id, type, quantity, price, state, |
|
|
id, application_id, mname, depository_id, type, quantity, price, state, |
|
|
applicant_id, apply_remark, apply_time, reviewer_id, review_remark, review_time,review_pass, checker_id, check_remark, |
|
|
applicant_id, apply_remark, apply_time, reviewer_id, review_remark, review_time,review_pass, checker_id, |
|
|
|
|
|
check_remark, |
|
|
check_time,check_pass |
|
|
check_time,check_pass |
|
|
) VALUES |
|
|
) VALUES |
|
|
<foreach collection="list" index="index" item="item" separator=","> |
|
|
<foreach collection="list" index="index" item="item" separator=","> |
|
|
@ -1271,6 +1326,7 @@ |
|
|
and dr.check_time between #{start} and #{end} |
|
|
and dr.check_time between #{start} and #{end} |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 根据主键删除数据 --> |
|
|
<!-- 根据主键删除数据 --> |
|
|
<delete id="deleteApplicationInRecordById" parameterType="integer"> |
|
|
<delete id="deleteApplicationInRecordById" parameterType="integer"> |
|
|
DELETE FROM application_in_record WHERE id = #{id} |
|
|
DELETE FROM application_in_record WHERE id = #{id} |
|
|
@ -1298,8 +1354,4 @@ |
|
|
</delete> |
|
|
</delete> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
</mapper> |