2025-02-21 20:39:20 +08:00
|
|
|
<?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.ruoyi.oa.mapper.SysOaClaimMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.ruoyi.oa.domain.vo.SysOaClaimVo" id="SysOaClaimResult">
|
|
|
|
|
<result property="claimId" column="claim_id"/>
|
|
|
|
|
<result property="userId" column="user_id"/>
|
|
|
|
|
<result property="fileIds" column="file_ids"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
|
<result property="startTime" column="start_time"/>
|
|
|
|
|
<result property="endTime" column="end_time"/>
|
|
|
|
|
<result property="tripDays" column="trip_days"/>
|
|
|
|
|
<result property="cost" column="cost"/>
|
|
|
|
|
<result property="detailNumber" column="detail_number"/>
|
|
|
|
|
<result property="projectId" column="project_id"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
|
<result property="procInsId" column="proc_ins_id"/>
|
|
|
|
|
<result property="status" column="status_"/>
|
|
|
|
|
<result property="completedTime" column="completed_time"/>
|
2025-02-23 16:24:29 +08:00
|
|
|
<result property="projectName" column="project_name"/>
|
|
|
|
|
<result property="address" column="address"/>
|
2025-02-21 20:39:20 +08:00
|
|
|
<collection property="detailList" javaType="list" resultMap="SysOaClaimDetailResult"/>
|
2025-02-23 16:24:29 +08:00
|
|
|
<collection property="fileList" javaType="list" resultMap="SysOaFileResult"/>
|
2025-02-21 20:39:20 +08:00
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.ruoyi.oa.domain.SysOaClaimDetail" id="SysOaClaimDetailResult">
|
|
|
|
|
<result property="claimDetailId" column="claim_detail_id"/>
|
|
|
|
|
<result property="claimId" column="claim_id"/>
|
|
|
|
|
<result property="claimType" column="claim_type"/>
|
|
|
|
|
<result property="beginTime" column="begin_time"/>
|
2025-02-23 16:24:29 +08:00
|
|
|
<result property="endTime" column="detail_end"/>
|
2025-02-21 20:39:20 +08:00
|
|
|
<result property="lodgingAddress" column="lodging_address"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
2025-02-23 16:24:29 +08:00
|
|
|
<result property="cost" column="detail_cost"/>
|
2025-02-21 20:39:20 +08:00
|
|
|
<result property="bigCost" column="big_cost"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.ruoyi.oa.domain.SysOaFile" id="SysOaFileResult">
|
|
|
|
|
<result property="fileId" column="file_id"/>
|
|
|
|
|
<result property="fileUrl" column="file_url"/>
|
|
|
|
|
<result property="status" column="status"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
2025-02-23 16:24:29 +08:00
|
|
|
<select id="selectSysOaClaimVoById" resultMap="SysOaClaimResult" parameterType="Long">
|
2025-02-21 20:39:20 +08:00
|
|
|
SELECT soc.claim_id,
|
|
|
|
|
soc.user_id,
|
|
|
|
|
soc.file_ids,
|
|
|
|
|
soc.remark,
|
|
|
|
|
soc.start_time,
|
|
|
|
|
soc.end_time,
|
2025-02-23 16:24:29 +08:00
|
|
|
soc.address,
|
2025-02-21 20:39:20 +08:00
|
|
|
soc.trip_days,
|
|
|
|
|
soc.cost,
|
|
|
|
|
soc.detail_number,
|
|
|
|
|
soc.project_id,
|
|
|
|
|
soc.create_time,
|
|
|
|
|
soc.create_by,
|
|
|
|
|
soc.update_time,
|
|
|
|
|
soc.update_by,
|
|
|
|
|
soc.del_flag,
|
|
|
|
|
soc.proc_ins_id,
|
|
|
|
|
soc.completed_time,
|
|
|
|
|
sof.file_id,
|
|
|
|
|
file_url,
|
|
|
|
|
status,
|
|
|
|
|
socd.claim_detail_id,
|
|
|
|
|
claim_type,
|
2025-02-23 16:24:29 +08:00
|
|
|
socd.begin_time ,
|
|
|
|
|
socd.end_time as detail_end,
|
2025-02-21 20:39:20 +08:00
|
|
|
socd.lodging_address,
|
|
|
|
|
socd.create_time,
|
|
|
|
|
socd.create_by,
|
|
|
|
|
socd.update_time,
|
|
|
|
|
socd.update_by,
|
|
|
|
|
socd.del_flag,
|
|
|
|
|
socd.remark,
|
|
|
|
|
socd.file_ids,
|
2025-02-23 16:24:29 +08:00
|
|
|
socd.cost as detail_cost,
|
|
|
|
|
socd.big_cost,
|
|
|
|
|
sop.project_name
|
2025-02-21 20:39:20 +08:00
|
|
|
FROM sys_oa_claim soc
|
2025-02-23 16:24:29 +08:00
|
|
|
left join sys_oa_claim_detail socd on soc.claim_id = socd.claim_id
|
2025-02-21 20:39:20 +08:00
|
|
|
left JOIN sys_oa_file sof ON FIND_IN_SET(sof.file_id, soc.file_ids) > 0
|
2025-02-23 16:24:29 +08:00
|
|
|
left join sys_oa_project sop on soc.project_id = sop.project_id
|
|
|
|
|
where soc.claim_id = #{claimId}
|
2025-02-21 20:39:20 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectPageVo" resultMap="SysOaClaimResult">
|
|
|
|
|
SELECT soc.claim_id,
|
|
|
|
|
soc.user_id,
|
|
|
|
|
soc.file_ids,
|
|
|
|
|
soc.remark,
|
|
|
|
|
soc.start_time,
|
|
|
|
|
soc.end_time,
|
|
|
|
|
soc.trip_days,
|
|
|
|
|
soc.cost,
|
|
|
|
|
soc.detail_number,
|
|
|
|
|
soc.project_id,
|
2025-02-23 16:24:29 +08:00
|
|
|
soc.address,
|
2025-02-21 20:39:20 +08:00
|
|
|
soc.create_time,
|
|
|
|
|
soc.create_by,
|
|
|
|
|
soc.update_time,
|
|
|
|
|
soc.update_by,
|
|
|
|
|
soc.del_flag,
|
|
|
|
|
soc.proc_ins_id,
|
|
|
|
|
soc.completed_time,
|
2025-02-23 16:24:29 +08:00
|
|
|
sop.project_name,
|
2025-02-21 20:39:20 +08:00
|
|
|
IF(ahp.END_TIME_ IS NULL, 0, 1) AS status_
|
|
|
|
|
FROM sys_oa_claim soc
|
|
|
|
|
left join ACT_HI_PROCINST ahp on soc.proc_ins_id = ahp.PROC_INST_ID_
|
2025-02-23 16:24:29 +08:00
|
|
|
left join sys_oa_project sop on sop.project_id = soc.project_id
|
2025-02-21 20:39:20 +08:00
|
|
|
${ew.getCustomSqlSegment}
|
|
|
|
|
</select>
|
|
|
|
|
|
2025-02-23 16:24:29 +08:00
|
|
|
<select id="selectSysOaClaimVoByProcInsId" resultMap="SysOaClaimResult" parameterType="String">
|
|
|
|
|
SELECT soc.claim_id,
|
|
|
|
|
soc.user_id,
|
|
|
|
|
soc.file_ids,
|
|
|
|
|
soc.remark,
|
|
|
|
|
soc.start_time,
|
|
|
|
|
soc.end_time,
|
|
|
|
|
soc.address,
|
|
|
|
|
soc.trip_days,
|
|
|
|
|
soc.cost,
|
|
|
|
|
soc.detail_number,
|
|
|
|
|
soc.project_id,
|
|
|
|
|
soc.create_time,
|
|
|
|
|
soc.create_by,
|
|
|
|
|
soc.update_time,
|
|
|
|
|
soc.update_by,
|
|
|
|
|
soc.del_flag,
|
|
|
|
|
soc.proc_ins_id,
|
|
|
|
|
soc.completed_time,
|
|
|
|
|
sof.file_id,
|
|
|
|
|
file_url,
|
|
|
|
|
status,
|
|
|
|
|
socd.claim_detail_id,
|
|
|
|
|
claim_type,
|
|
|
|
|
socd.begin_time ,
|
|
|
|
|
socd.end_time as detail_end,
|
|
|
|
|
socd.lodging_address,
|
|
|
|
|
socd.create_time,
|
|
|
|
|
socd.create_by,
|
|
|
|
|
socd.update_time,
|
|
|
|
|
socd.update_by,
|
|
|
|
|
socd.del_flag,
|
|
|
|
|
socd.remark,
|
|
|
|
|
socd.file_ids,
|
|
|
|
|
socd.cost as detail_cost,
|
|
|
|
|
socd.big_cost,
|
|
|
|
|
sop.project_name
|
|
|
|
|
FROM sys_oa_claim soc
|
|
|
|
|
left join sys_oa_claim_detail socd on soc.claim_id = socd.claim_id
|
|
|
|
|
left JOIN sys_oa_file sof ON FIND_IN_SET(sof.file_id, soc.file_ids) > 0
|
|
|
|
|
left join sys_oa_project sop on soc.project_id = sop.project_id
|
|
|
|
|
where soc.proc_ins_id = #{procInsId}
|
|
|
|
|
</select>
|
|
|
|
|
|
2025-02-21 20:39:20 +08:00
|
|
|
|
|
|
|
|
</mapper>
|