|
@@ -9,71 +9,141 @@
|
|
|
|
|
|
<select id="findList"
|
|
<select id="findList"
|
|
resultType="com.jeeplus.centrecareful.approvalInfo.service.dto.ZsRetureListDto">
|
|
resultType="com.jeeplus.centrecareful.approvalInfo.service.dto.ZsRetureListDto">
|
|
- SELECT
|
|
|
|
- DISTINCT a.id,
|
|
|
|
- a.`no`,
|
|
|
|
- (CASE
|
|
|
|
- WHEN a.source_type = 1 THEN b4.type_id
|
|
|
|
- WHEN a.source_type = 2 THEN b4.type_id
|
|
|
|
- WHEN a.source_type = 3 THEN b4.type_id
|
|
|
|
- WHEN a.source_type = 4 THEN b4.type_id
|
|
|
|
- WHEN a.source_type = 8 THEN b4.type_id
|
|
|
|
- WHEN a.source_type = 6 THEN b6.type_id
|
|
|
|
- ELSE b5.type_id END) AS type_id,
|
|
|
|
- (CASE
|
|
|
|
- WHEN a.source_type = 1 THEN t4.name
|
|
|
|
- WHEN a.source_type = 2 THEN t4.name
|
|
|
|
- WHEN a.source_type = 3 THEN t4.name
|
|
|
|
- WHEN a.source_type = 4 THEN t4.name
|
|
|
|
- WHEN a.source_type = 8 THEN t4.name
|
|
|
|
- WHEN a.source_type = 6 THEN t6.name
|
|
|
|
- ELSE t5.name END) AS type_name,
|
|
|
|
- (CASE
|
|
|
|
- WHEN a.source_type = 1 THEN b4.project_id
|
|
|
|
- WHEN a.source_type = 2 THEN b4.project_id
|
|
|
|
- WHEN a.source_type = 3 THEN b4.project_id
|
|
|
|
- WHEN a.source_type = 4 THEN b4.project_id
|
|
|
|
- WHEN a.source_type = 8 THEN b4.project_id
|
|
|
|
- ELSE b5.project_id END) AS project_id,
|
|
|
|
- (CASE
|
|
|
|
- WHEN a.source_type = 1 THEN b4.project_name
|
|
|
|
- WHEN a.source_type = 2 THEN b4.project_name
|
|
|
|
- WHEN a.source_type = 3 THEN b4.project_name
|
|
|
|
- WHEN a.source_type = 4 THEN b4.project_name
|
|
|
|
- WHEN a.source_type = 8 THEN b4.project_name
|
|
|
|
- WHEN a.source_type = 6 THEN b6.reimbuser_name
|
|
|
|
- ELSE b5.project_name END) AS project_name,
|
|
|
|
- (CASE
|
|
|
|
- WHEN a.source_type = 1 THEN b4.report_number
|
|
|
|
- WHEN a.source_type = 2 THEN b4.report_number
|
|
|
|
- WHEN a.source_type = 3 THEN b4.report_number
|
|
|
|
- WHEN a.source_type = 4 THEN b4.report_number
|
|
|
|
- WHEN a.source_type = 8 THEN b4.report_number
|
|
|
|
- ELSE b5.report_number END) AS report_number,
|
|
|
|
- (CASE
|
|
|
|
- WHEN a.source_type = 1 THEN so4.name
|
|
|
|
- WHEN a.source_type = 2 THEN so4.name
|
|
|
|
- WHEN a.source_type = 3 THEN so4.name
|
|
|
|
- WHEN a.source_type = 4 THEN so4.name
|
|
|
|
- WHEN a.source_type = 8 THEN so4.name
|
|
|
|
- WHEN a.source_type = 6 THEN so6.name
|
|
|
|
- ELSE so5.name END) AS dept_name,
|
|
|
|
- (CASE
|
|
|
|
- WHEN a.source_type = 1 THEN us4.name
|
|
|
|
- WHEN a.source_type = 2 THEN us4.name
|
|
|
|
- WHEN a.source_type = 3 THEN us4.name
|
|
|
|
- WHEN a.source_type = 4 THEN us4.name
|
|
|
|
- WHEN a.source_type = 8 THEN us4.name
|
|
|
|
- WHEN a.source_type = 6 THEN us6.name
|
|
|
|
- ELSE us5.name END) AS name,
|
|
|
|
- (CASE
|
|
|
|
- WHEN a.source_type = 1 THEN b4.`number`
|
|
|
|
- WHEN a.source_type = 2 THEN b4.`number`
|
|
|
|
- WHEN a.source_type = 3 THEN b4.`number`
|
|
|
|
- WHEN a.source_type = 4 THEN b4.`number`
|
|
|
|
- WHEN a.source_type = 8 THEN b4.`number`
|
|
|
|
- WHEN a.source_type = 6 THEN b6.`number`
|
|
|
|
- ELSE b5.`number` END) AS `number`,
|
|
|
|
|
|
+ SELECT DISTINCT
|
|
|
|
+ a.id,
|
|
|
|
+ a.`no`,
|
|
|
|
+ (
|
|
|
|
+ CASE
|
|
|
|
+
|
|
|
|
+ WHEN a.source_type = 1 THEN
|
|
|
|
+ b.type_id
|
|
|
|
+ WHEN a.source_type = 2 THEN
|
|
|
|
+ b4.type_id
|
|
|
|
+ WHEN a.source_type = 3 THEN
|
|
|
|
+ r4.type_id
|
|
|
|
+ WHEN a.source_type = 4 THEN
|
|
|
|
+ b4.type_id
|
|
|
|
+ WHEN a.source_type = 8 THEN
|
|
|
|
+ zs1.type_id
|
|
|
|
+ WHEN a.source_type = 6 THEN
|
|
|
|
+ b6.type_id ELSE b5.type_id
|
|
|
|
+ END
|
|
|
|
+ ) AS type_id,
|
|
|
|
+ (
|
|
|
|
+ CASE
|
|
|
|
+
|
|
|
|
+ WHEN a.source_type = 1 THEN
|
|
|
|
+ t44.NAME
|
|
|
|
+ WHEN a.source_type = 2 THEN
|
|
|
|
+ t4.NAME
|
|
|
|
+ WHEN a.source_type = 3 THEN
|
|
|
|
+ r44.NAME
|
|
|
|
+ WHEN a.source_type = 4 THEN
|
|
|
|
+ t4.NAME
|
|
|
|
+ WHEN a.source_type = 8 THEN
|
|
|
|
+ zs11.NAME
|
|
|
|
+ WHEN a.source_type = 6 THEN
|
|
|
|
+ t6.NAME ELSE t5.NAME
|
|
|
|
+ END
|
|
|
|
+ ) AS type_name,
|
|
|
|
+ (
|
|
|
|
+ CASE
|
|
|
|
+
|
|
|
|
+ WHEN a.source_type = 1 THEN
|
|
|
|
+ b4.project_id
|
|
|
|
+ WHEN a.source_type = 2 THEN
|
|
|
|
+ b4.project_id
|
|
|
|
+ WHEN a.source_type = 3 THEN
|
|
|
|
+ r4.project_id
|
|
|
|
+ WHEN a.source_type = 4 THEN
|
|
|
|
+ b4.project_id
|
|
|
|
+ WHEN a.source_type = 8 THEN
|
|
|
|
+ b4.project_id ELSE b5.project_id
|
|
|
|
+ END
|
|
|
|
+ ) AS project_id,
|
|
|
|
+ (
|
|
|
|
+ CASE
|
|
|
|
+
|
|
|
|
+ WHEN a.source_type = 1 THEN
|
|
|
|
+ b.project_name
|
|
|
|
+ WHEN a.source_type = 2 THEN
|
|
|
|
+ b4.project_name
|
|
|
|
+ WHEN a.source_type = 3 THEN
|
|
|
|
+ r4.project_name
|
|
|
|
+ WHEN a.source_type = 4 THEN
|
|
|
|
+ b4.project_name
|
|
|
|
+ WHEN a.source_type = 8 THEN
|
|
|
|
+ zs1.project_name
|
|
|
|
+ WHEN a.source_type = 6 THEN
|
|
|
|
+ b6.reimbuser_name ELSE b5.project_name
|
|
|
|
+ END
|
|
|
|
+ ) AS project_name,
|
|
|
|
+ (
|
|
|
|
+ CASE
|
|
|
|
+
|
|
|
|
+ WHEN a.source_type = 1 THEN
|
|
|
|
+ b4.report_number
|
|
|
|
+ WHEN a.source_type = 2 THEN
|
|
|
|
+ b4.report_number
|
|
|
|
+ WHEN a.source_type = 3 THEN
|
|
|
|
+ r4.report_number
|
|
|
|
+ WHEN a.source_type = 4 THEN
|
|
|
|
+ b4.report_number
|
|
|
|
+ WHEN a.source_type = 8 THEN
|
|
|
|
+ b4.report_number ELSE b5.report_number
|
|
|
|
+ END
|
|
|
|
+ ) AS report_number,
|
|
|
|
+ (
|
|
|
|
+ CASE
|
|
|
|
+
|
|
|
|
+ WHEN a.source_type = 1 THEN
|
|
|
|
+ so44.NAME
|
|
|
|
+ WHEN a.source_type = 2 THEN
|
|
|
|
+ so4.NAME
|
|
|
|
+ WHEN a.source_type = 3 THEN
|
|
|
|
+ r444.NAME
|
|
|
|
+ WHEN a.source_type = 4 THEN
|
|
|
|
+ so4.NAME
|
|
|
|
+ WHEN a.source_type = 8 THEN
|
|
|
|
+ zs111.NAME
|
|
|
|
+ WHEN a.source_type = 6 THEN
|
|
|
|
+ so6.NAME ELSE so5.NAME
|
|
|
|
+ END
|
|
|
|
+ ) AS dept_name,
|
|
|
|
+ (
|
|
|
|
+ CASE
|
|
|
|
+
|
|
|
|
+ WHEN a.source_type = 1 THEN
|
|
|
|
+ usxg.NAME
|
|
|
|
+ WHEN a.source_type = 2 THEN
|
|
|
|
+ us4.NAME
|
|
|
|
+ WHEN a.source_type = 3 THEN
|
|
|
|
+ us44.NAME
|
|
|
|
+ WHEN a.source_type = 4 THEN
|
|
|
|
+ us4.NAME
|
|
|
|
+ WHEN a.source_type = 8 THEN
|
|
|
|
+ uszs.NAME
|
|
|
|
+ WHEN a.source_type = 6 THEN
|
|
|
|
+ us6.NAME ELSE us5.NAME
|
|
|
|
+ END
|
|
|
|
+ ) AS NAME,
|
|
|
|
+ (
|
|
|
|
+ CASE
|
|
|
|
+
|
|
|
|
+ WHEN a.source_type = 1 THEN
|
|
|
|
+ b.`number`
|
|
|
|
+ WHEN a.source_type = 2 THEN
|
|
|
|
+ b4.`number`
|
|
|
|
+ WHEN a.source_type = 3 THEN
|
|
|
|
+ r4.`number`
|
|
|
|
+ WHEN a.source_type = 4 THEN
|
|
|
|
+ b4.`number`
|
|
|
|
+ WHEN a.source_type = 8 THEN
|
|
|
|
+ zs1.`number`
|
|
|
|
+ WHEN a.source_type = 6 THEN
|
|
|
|
+ b6.`number` ELSE b5.`number`
|
|
|
|
+ END
|
|
|
|
+ ) AS `number`,
|
|
a.user_name,
|
|
a.user_name,
|
|
a.reim_date,
|
|
a.reim_date,
|
|
a.type,
|
|
a.type,
|
|
@@ -87,54 +157,100 @@
|
|
a.payment_time,
|
|
a.payment_time,
|
|
a.reimbursement_type,
|
|
a.reimbursement_type,
|
|
pru.purchase_no,
|
|
pru.purchase_no,
|
|
- b.user_id as projectUser,
|
|
|
|
- b.dept_id as projectOffice,
|
|
|
|
- b3.user_id as reportUser,
|
|
|
|
- b3.dept_id as reportOffice,
|
|
|
|
- a.update_time,
|
|
|
|
- a.approval_time
|
|
|
|
|
|
+ b.user_id AS projectUser,
|
|
|
|
+ b.dept_id AS projectOffice,
|
|
|
|
+ b3.user_id AS reportUser,
|
|
|
|
+ b3.dept_id AS reportOffice,
|
|
|
|
+ a.update_time,
|
|
|
|
+ a.approval_time
|
|
FROM
|
|
FROM
|
|
zs_reimbursement_info a
|
|
zs_reimbursement_info a
|
|
- LEFT JOIN zs_reimbursement_detail_info b ON a.id = b.info_id AND b.del_flag = 0
|
|
|
|
- left join cw_reimbursement_type_info t on b.type_id = t.id and t.del_flag = 0
|
|
|
|
- left join cw_project_records p on p.id = b.project_id and p.del_flag = 0
|
|
|
|
- left join sys_office so on so.id = b.dept_id and so.del_flag = 0
|
|
|
|
- left join sys_user us on us.id = b.user_id and us.del_flag = 0
|
|
|
|
-
|
|
|
|
- LEFT JOIN cw_reimbursement_detail_info_contract b2 ON a.id = b2.info_id AND b2.del_flag = 0
|
|
|
|
- left join cw_reimbursement_type_info t2 on b2.type_id = t2.id and t2.del_flag = 0
|
|
|
|
- left join cw_work_contract_info contr2 on contr2.id = b2.contract_id and contr2.del_flag = 0
|
|
|
|
- left join sys_office so2 on so2.id = b2.dept_id and so2.del_flag = 0
|
|
|
|
- left join sys_user us2 on us2.id = b2.user_id and us2.del_flag = 0
|
|
|
|
-
|
|
|
|
- LEFT JOIN cw_reimbursement_detail_info_report b3 ON a.id = b3.info_id AND b3.del_flag = 0
|
|
|
|
- left join cw_reimbursement_type_info t3 on b3.type_id = t3.id and t3.del_flag = 0
|
|
|
|
- left join cw_project_records p3 on p3.id = b3.project_id and p3.del_flag = 0
|
|
|
|
- left join sys_office so3 on so3.id = b3.dept_id and so3.del_flag = 0
|
|
|
|
- left join sys_user us3 on us3.id = b3.user_id and us3.del_flag = 0
|
|
|
|
-
|
|
|
|
- LEFT JOIN zs_reimbursement_detail_info_other b4 ON a.id = b4.info_id AND b4.del_flag = 0
|
|
|
|
- left join cw_reimbursement_type_info t4 on b4.type_id = t4.id and t4.del_flag = 0
|
|
|
|
- left join cw_project_records p4 on p4.id = b4.project_id and p4.del_flag = 0
|
|
|
|
- left join sys_office so4 on so4.id = b4.dept_id and so4.del_flag = 0
|
|
|
|
- left join sys_user us4 on us4.id = b4.user_id and us4.del_flag = 0
|
|
|
|
-
|
|
|
|
- LEFT JOIN zs_reimbursement_detail_info_procured b5 ON a.id = b5.info_id AND b5.del_flag = 0
|
|
|
|
- left join cw_reimbursement_type_info t5 on b5.type_id = t5.id and t5.del_flag = 0
|
|
|
|
- left join cw_project_records p5 on p5.id = b5.project_id and p5.del_flag = 0
|
|
|
|
- left join sys_office so5 on so5.id = b5.dept_id and so5.del_flag = 0
|
|
|
|
- left join sys_user us5 on us5.id = b5.user_id and us5.del_flag = 0
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- LEFT JOIN human_reimbursement_detail_info_procured b6 ON a.id = b6.info_id AND b6.del_flag = 0
|
|
|
|
- left join cw_reimbursement_type_info t6 on b6.type_id = t6.id and t6.del_flag = 0
|
|
|
|
- left join sys_office so6 on so6.id = b6.dept_id and so6.del_flag = 0
|
|
|
|
- left join sys_user us6 on us6.id = b6.user_id and us6.del_flag = 0
|
|
|
|
-
|
|
|
|
- LEFT JOIN sys_user c ON a.create_by_id = c.id
|
|
|
|
- LEFT JOIN act_ru_task d ON a.proc_ins_id = d.PROC_INST_ID_
|
|
|
|
- LEFT JOIN material_management_pruchase_request_basics pru ON pru.id = a.purchase_id
|
|
|
|
- AND pru.del_flag = '0'
|
|
|
|
|
|
+ LEFT JOIN zs_reimbursement_detail_info b ON a.id = b.info_id
|
|
|
|
+ AND b.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_reimbursement_type_info t ON b.type_id = t.id
|
|
|
|
+ AND t.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_project_records p ON p.id = b.project_id
|
|
|
|
+ AND p.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_office so ON so.id = b.dept_id
|
|
|
|
+ AND so.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_user us ON us.id = b.user_id
|
|
|
|
+ AND us.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_reimbursement_detail_info_contract b2 ON a.id = b2.info_id
|
|
|
|
+ AND b2.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_reimbursement_type_info t2 ON b2.type_id = t2.id
|
|
|
|
+ AND t2.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_work_contract_info contr2 ON contr2.id = b2.contract_id
|
|
|
|
+ AND contr2.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_office so2 ON so2.id = b2.dept_id
|
|
|
|
+ AND so2.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_user us2 ON us2.id = b2.user_id
|
|
|
|
+ AND us2.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_reimbursement_detail_info_report b3 ON a.id = b3.info_id
|
|
|
|
+ AND b3.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_reimbursement_type_info t3 ON b3.type_id = t3.id
|
|
|
|
+ AND t3.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_project_records p3 ON p3.id = b3.project_id
|
|
|
|
+ AND p3.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_office so3 ON so3.id = b3.dept_id
|
|
|
|
+ AND so3.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_user us3 ON us3.id = b3.user_id
|
|
|
|
+ AND us3.del_flag = 0
|
|
|
|
+ LEFT JOIN zs_reimbursement_detail_info_other b4 ON a.id = b4.info_id
|
|
|
|
+ AND b4.del_flag = 0
|
|
|
|
+ LEFT JOIN zs_reimbursement_detail_info_zs_project zs1 ON a.id = zs1.info_id
|
|
|
|
+ AND zs1.del_flag = 0
|
|
|
|
+ LEFT JOIN zs_reimbursement_detail_info_report r4 ON a.id = r4.info_id
|
|
|
|
+ AND r4.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_reimbursement_type_info t4 ON b4.type_id = t4.id
|
|
|
|
+ AND t4.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_reimbursement_type_info r44 ON r4.type_id = r44.id
|
|
|
|
+ AND r44.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_reimbursement_type_info zs11 ON zs1.type_id = zs11.id
|
|
|
|
+ AND zs11.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_reimbursement_type_info t44 ON b.type_id = t44.id
|
|
|
|
+ AND t44.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_project_records p4 ON p4.id = b4.project_id
|
|
|
|
+ AND p4.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_office so4 ON so4.id = b4.dept_id
|
|
|
|
+ AND so4.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_office r444 ON r444.id = r4.dept_id
|
|
|
|
+ AND r444.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_office zs111 ON zs111.id = zs1.dept_id
|
|
|
|
+ AND zs111.del_flag = 0
|
|
|
|
+
|
|
|
|
+ LEFT JOIN sys_office so44 ON so44.id = b.dept_id
|
|
|
|
+ AND so44.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_user us4 ON us4.id = b4.user_id
|
|
|
|
+ AND us4.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_user us44 ON us44.id = r4.user_id
|
|
|
|
+ AND us44.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_user usxg ON usxg.id = b.user_id
|
|
|
|
+ AND usxg.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_user uszs ON uszs.id = zs1.user_id
|
|
|
|
+ AND uszs.del_flag = 0
|
|
|
|
+
|
|
|
|
+ LEFT JOIN zs_reimbursement_detail_info_procured b5 ON a.id = b5.info_id
|
|
|
|
+ AND b5.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_reimbursement_type_info t5 ON b5.type_id = t5.id
|
|
|
|
+ AND t5.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_project_records p5 ON p5.id = b5.project_id
|
|
|
|
+ AND p5.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_office so5 ON so5.id = b5.dept_id
|
|
|
|
+ AND so5.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_user us5 ON us5.id = b5.user_id
|
|
|
|
+ AND us5.del_flag = 0
|
|
|
|
+ LEFT JOIN human_reimbursement_detail_info_procured b6 ON a.id = b6.info_id
|
|
|
|
+ AND b6.del_flag = 0
|
|
|
|
+ LEFT JOIN cw_reimbursement_type_info t6 ON b6.type_id = t6.id
|
|
|
|
+ AND t6.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_office so6 ON so6.id = b6.dept_id
|
|
|
|
+ AND so6.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_user us6 ON us6.id = b6.user_id
|
|
|
|
+ AND us6.del_flag = 0
|
|
|
|
+ LEFT JOIN sys_user c ON a.create_by_id = c.id
|
|
|
|
+ LEFT JOIN act_ru_task d ON a.proc_ins_id = d.PROC_INST_ID_
|
|
|
|
+ LEFT JOIN material_management_pruchase_request_basics pru ON pru.id = a.purchase_id
|
|
|
|
+ AND pru.del_flag = '0'
|
|
${ew.customSqlSegment}
|
|
${ew.customSqlSegment}
|
|
ORDER BY a.update_time DESC
|
|
ORDER BY a.update_time DESC
|
|
</select>
|
|
</select>
|
|
@@ -484,59 +600,56 @@
|
|
|
|
|
|
<select id="getCwReportDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoReport">
|
|
<select id="getCwReportDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoReport">
|
|
select
|
|
select
|
|
- a.id,
|
|
|
|
- a.create_by_id,
|
|
|
|
- a.create_time,
|
|
|
|
- a.del_flag,
|
|
|
|
- a.info_id,
|
|
|
|
- a.user_id,
|
|
|
|
- a.dept_id,
|
|
|
|
- a.type_id,
|
|
|
|
- a.report_id,
|
|
|
|
- a.report_number,
|
|
|
|
- a.number,
|
|
|
|
- a.receipt_number,
|
|
|
|
- a.days,
|
|
|
|
- a.content,
|
|
|
|
- su.name as user_name,
|
|
|
|
- so.name as dept_name,
|
|
|
|
- cw_type.name as type_name,
|
|
|
|
- cw_report.document_no as document_no,
|
|
|
|
- cw_project.project_name as project_name,
|
|
|
|
- a.project_id
|
|
|
|
- from cw_reimbursement_detail_info_report a
|
|
|
|
- left join sys_user su on a.user_id = su.id and su.del_flag = '0'
|
|
|
|
- left join sys_office so on a.dept_id = so.id and so.del_flag = '0'
|
|
|
|
- left join cw_reimbursement_type_info cw_type on cw_type.id = a.type_id and cw_type.del_flag = '0'
|
|
|
|
- left join cw_project_report cw_report on cw_report.id = a.report_id and cw_report.del_flag = '0'
|
|
|
|
- left join cw_project_records cw_project on cw_project.id = a.project_id and cw_project.del_flag = '0'
|
|
|
|
|
|
+ a.id,
|
|
|
|
+ a.create_by_id,
|
|
|
|
+ a.create_time,
|
|
|
|
+ a.del_flag,
|
|
|
|
+ a.info_id,
|
|
|
|
+ a.user_id,
|
|
|
|
+ a.dept_id,
|
|
|
|
+ a.type_id,
|
|
|
|
+ a.project_id,
|
|
|
|
+ a.report_number,
|
|
|
|
+ a.number,
|
|
|
|
+ a.receipt_number,
|
|
|
|
+ a.days,
|
|
|
|
+ a.content,
|
|
|
|
+ su.name as user_name,
|
|
|
|
+ so.name as dept_name,
|
|
|
|
+ zs_type.name as type_name,
|
|
|
|
+ a.project_name as project_name
|
|
|
|
+ from zs_reimbursement_detail_info_report a
|
|
|
|
+ left join sys_user su on a.user_id = su.id and su.del_flag = '0'
|
|
|
|
+ left join sys_office so on a.dept_id = so.id and so.del_flag = '0'
|
|
|
|
+ left join cw_reimbursement_type_info zs_type on zs_type.id = a.type_id and zs_type.del_flag = '0'
|
|
where a.del_flag = '0' and a.info_id = #{id}
|
|
where a.del_flag = '0' and a.info_id = #{id}
|
|
order by a.number asc
|
|
order by a.number asc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfo">
|
|
<select id="getDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfo">
|
|
select
|
|
select
|
|
- a.id,
|
|
|
|
- a.create_by_id,
|
|
|
|
- a.create_time,
|
|
|
|
- a.del_flag,
|
|
|
|
- a.info_id,
|
|
|
|
- a.user_id,
|
|
|
|
- a.dept_id,
|
|
|
|
- a.type_id,
|
|
|
|
- a.project_id,
|
|
|
|
- a.report_number,
|
|
|
|
- a.number,
|
|
|
|
- a.receipt_number,
|
|
|
|
- a.days,
|
|
|
|
- a.content,
|
|
|
|
- su.name as user_name,
|
|
|
|
- so.name as dept_name,
|
|
|
|
- zs_type.name as type_name
|
|
|
|
|
|
+ a.id,
|
|
|
|
+ a.create_by_id,
|
|
|
|
+ a.create_time,
|
|
|
|
+ a.del_flag,
|
|
|
|
+ a.info_id,
|
|
|
|
+ a.user_id,
|
|
|
|
+ a.dept_id,
|
|
|
|
+ a.type_id,
|
|
|
|
+ a.project_id,
|
|
|
|
+ a.report_number,
|
|
|
|
+ a.number,
|
|
|
|
+ a.receipt_number,
|
|
|
|
+ a.days,
|
|
|
|
+ a.content,
|
|
|
|
+ su.name as user_name,
|
|
|
|
+ so.name as dept_name,
|
|
|
|
+ zs_type.name as type_name,
|
|
|
|
+ a.project_name as project_name
|
|
from zs_reimbursement_detail_info a
|
|
from zs_reimbursement_detail_info a
|
|
- left join sys_user su on a.user_id = su.id and su.del_flag = '0'
|
|
|
|
- left join sys_office so on a.dept_id = so.id and so.del_flag = '0'
|
|
|
|
- left join cw_reimbursement_type_info zs_type on zs_type.id = a.type_id and zs_type.del_flag = '0'
|
|
|
|
|
|
+ left join sys_user su on a.user_id = su.id and su.del_flag = '0'
|
|
|
|
+ left join sys_office so on a.dept_id = so.id and so.del_flag = '0'
|
|
|
|
+ left join cw_reimbursement_type_info zs_type on zs_type.id = a.type_id and zs_type.del_flag = '0'
|
|
where a.del_flag = '0' and a.info_id = #{id}
|
|
where a.del_flag = '0' and a.info_id = #{id}
|
|
order by a.number asc
|
|
order by a.number asc
|
|
</select>
|
|
</select>
|
|
@@ -557,8 +670,6 @@
|
|
a.receipt_number,
|
|
a.receipt_number,
|
|
a.days,
|
|
a.days,
|
|
a.content,
|
|
a.content,
|
|
- a.invoice_number,
|
|
|
|
- a.project_approval_number,
|
|
|
|
su.name as user_name,
|
|
su.name as user_name,
|
|
so.name as dept_name,
|
|
so.name as dept_name,
|
|
zs_type.name as type_name,
|
|
zs_type.name as type_name,
|
|
@@ -571,6 +682,38 @@
|
|
order by a.number asc
|
|
order by a.number asc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <select id="getZsProjectDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoProject">
|
|
|
|
+ select
|
|
|
|
+ a.id,
|
|
|
|
+ a.create_by_id,
|
|
|
|
+ a.create_time,
|
|
|
|
+ a.del_flag,
|
|
|
|
+ a.info_id,
|
|
|
|
+ a.user_id,
|
|
|
|
+ a.dept_id,
|
|
|
|
+ a.type_id,
|
|
|
|
+ a.project_id,
|
|
|
|
+ a.report_number,
|
|
|
|
+ a.number,
|
|
|
|
+ a.receipt_number,
|
|
|
|
+ a.days,
|
|
|
|
+ a.content,
|
|
|
|
+ su.name as user_name,
|
|
|
|
+ so.name as dept_name,
|
|
|
|
+ zs_type.name as type_name,
|
|
|
|
+ a.project_name as project_name,
|
|
|
|
+ a.invoice_number as invoiceNumber,
|
|
|
|
+ a.project_approval_number as projectApprovalNumber
|
|
|
|
+ from zs_reimbursement_detail_info_zs_project a
|
|
|
|
+ left join sys_user su on a.user_id = su.id and su.del_flag = '0'
|
|
|
|
+ left join sys_office so on a.dept_id = so.id and so.del_flag = '0'
|
|
|
|
+ left join cw_reimbursement_type_info zs_type on zs_type.id = a.type_id and zs_type.del_flag = '0'
|
|
|
|
+ where a.del_flag = '0' and a.info_id = #{id}
|
|
|
|
+ order by a.number asc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
<select id="getProcuredDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoProcured">
|
|
<select id="getProcuredDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoProcured">
|
|
select
|
|
select
|
|
a.id,
|
|
a.id,
|