|
@@ -9,125 +9,130 @@
|
|
|
|
|
|
<select id="findList"
|
|
|
resultType="com.jeeplus.finance.reimbursementApproval.approvalInfo.service.dto.RetureListDto">
|
|
|
- SELECT
|
|
|
- DISTINCT a.id,
|
|
|
- a.`no`,
|
|
|
- (CASE
|
|
|
- WHEN a.source_type = 1 THEN b.type_id
|
|
|
- WHEN a.source_type = 2 THEN b2.type_id
|
|
|
- WHEN a.source_type = 3 THEN b3.type_id
|
|
|
- WHEN a.source_type = 4 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 t.name
|
|
|
- WHEN a.source_type = 2 THEN t2.name
|
|
|
- WHEN a.source_type = 3 THEN t3.name
|
|
|
- WHEN a.source_type = 4 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 b.project_id
|
|
|
- WHEN a.source_type = 2 THEN b2.contract_id
|
|
|
- WHEN a.source_type = 3 THEN b3.project_id
|
|
|
- WHEN a.source_type = 4 THEN b4.project_id
|
|
|
- ELSE b5.project_id END) AS project_id,
|
|
|
- (CASE
|
|
|
- WHEN a.source_type = 1 THEN p.project_name
|
|
|
- WHEN a.source_type = 2 THEN contr2.contract_name
|
|
|
- WHEN a.source_type = 3 THEN p3.project_name
|
|
|
- WHEN a.source_type = 4 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 b.report_number
|
|
|
- WHEN a.source_type = 2 THEN b2.report_number
|
|
|
- WHEN a.source_type = 3 THEN b3.report_number
|
|
|
- WHEN a.source_type = 4 THEN b4.report_number
|
|
|
- ELSE b5.report_number END) AS report_number,
|
|
|
- (CASE
|
|
|
- WHEN a.source_type = 1 THEN so.name
|
|
|
- WHEN a.source_type = 2 THEN so2.name
|
|
|
- WHEN a.source_type = 3 THEN so3.name
|
|
|
- WHEN a.source_type = 4 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 us.name
|
|
|
- WHEN a.source_type = 2 THEN us2.name
|
|
|
- WHEN a.source_type = 3 THEN us3.name
|
|
|
- WHEN a.source_type = 4 THEN us4.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 b2.`number`
|
|
|
- WHEN a.source_type = 3 THEN b3.`number`
|
|
|
- WHEN a.source_type = 4 THEN b4.`number`
|
|
|
- WHEN a.source_type = 6 THEN b6.`number`
|
|
|
- ELSE b5.`number` END) AS `number`,
|
|
|
-
|
|
|
- a.reimbursement_type,
|
|
|
- a.user_name,
|
|
|
- a.reim_date,
|
|
|
- a.approval_time,
|
|
|
- a.type,
|
|
|
- a.proc_ins_id,
|
|
|
- a.process_definition_id,
|
|
|
- d.ID_ AS task_id,
|
|
|
- a.create_by_id as create_id,
|
|
|
- a.source_type,
|
|
|
- a.purchase_id,
|
|
|
- a.payment_time,
|
|
|
- a.payment_status,
|
|
|
- b.user_id as projectUser,
|
|
|
- b.dept_id as projectOffice,
|
|
|
- b3.user_id as reportUser,
|
|
|
- b3.dept_id as reportOffice,
|
|
|
- pru.purchase_no
|
|
|
- FROM
|
|
|
- cw_reimbursement_info a
|
|
|
- LEFT JOIN cw_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 cw_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 cw_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 sys_user_manage_office sumo on sumo.office_id = c.office_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}
|
|
|
- ORDER BY a.update_time DESC
|
|
|
+ SELECT DISTINCT a.id,
|
|
|
+ a.`no`,
|
|
|
+ (CASE
|
|
|
+ WHEN a.source_type = 1 THEN b.type_id
|
|
|
+ WHEN a.source_type = 2 THEN b2.type_id
|
|
|
+ WHEN a.source_type = 3 THEN b3.type_id
|
|
|
+ WHEN a.source_type = 4 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 t.name
|
|
|
+ WHEN a.source_type = 2 THEN t2.name
|
|
|
+ WHEN a.source_type = 3 THEN t3.name
|
|
|
+ WHEN a.source_type = 4 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 b.project_id
|
|
|
+ WHEN a.source_type = 2 THEN b2.contract_id
|
|
|
+ WHEN a.source_type = 3 THEN b3.project_id
|
|
|
+ WHEN a.source_type = 4 THEN b4.project_id
|
|
|
+ ELSE b5.project_id END) AS project_id,
|
|
|
+ (CASE
|
|
|
+ WHEN a.source_type = 1 THEN p.project_name
|
|
|
+ WHEN a.source_type = 2 THEN contr2.contract_name
|
|
|
+ WHEN a.source_type = 3 THEN p3.project_name
|
|
|
+ WHEN a.source_type = 4 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 b.report_number
|
|
|
+ WHEN a.source_type = 2 THEN b2.report_number
|
|
|
+ WHEN a.source_type = 3 THEN b3.report_number
|
|
|
+ WHEN a.source_type = 4 THEN b4.report_number
|
|
|
+ ELSE b5.report_number END) AS report_number,
|
|
|
+ (CASE
|
|
|
+ WHEN a.source_type = 1 THEN so.name
|
|
|
+ WHEN a.source_type = 2 THEN so2.name
|
|
|
+ WHEN a.source_type = 3 THEN so3.name
|
|
|
+ WHEN a.source_type = 4 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 us.name
|
|
|
+ WHEN a.source_type = 2 THEN us2.name
|
|
|
+ WHEN a.source_type = 3 THEN us3.name
|
|
|
+ WHEN a.source_type = 4 THEN us4.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 b2.`number`
|
|
|
+ WHEN a.source_type = 3 THEN b3.`number`
|
|
|
+ WHEN a.source_type = 4 THEN b4.`number`
|
|
|
+ WHEN a.source_type = 6 THEN b6.`number`
|
|
|
+ ELSE b5.`number_count` END) AS `number`,
|
|
|
+ (CASE
|
|
|
+ WHEN a.source_type = 1 THEN b.`number_count`
|
|
|
+ WHEN a.source_type = 2 THEN b2.`number_count`
|
|
|
+ WHEN a.source_type = 3 THEN b3.`number_count`
|
|
|
+ WHEN a.source_type = 4 THEN b4.`number_count`
|
|
|
+ ELSE b5.`number_count` END) AS `number_count`,
|
|
|
+
|
|
|
+ a.reimbursement_type,
|
|
|
+ a.user_name,
|
|
|
+ a.reim_date,
|
|
|
+ a.approval_time,
|
|
|
+ a.type,
|
|
|
+ a.proc_ins_id,
|
|
|
+ a.process_definition_id,
|
|
|
+ d.ID_ AS task_id,
|
|
|
+ a.create_by_id as create_id,
|
|
|
+ a.source_type,
|
|
|
+ a.purchase_id,
|
|
|
+ a.payment_time,
|
|
|
+ a.payment_status,
|
|
|
+ b.user_id as projectUser,
|
|
|
+ b.dept_id as projectOffice,
|
|
|
+ b3.user_id as reportUser,
|
|
|
+ b3.dept_id as reportOffice,
|
|
|
+ pru.purchase_no
|
|
|
+ FROM cw_reimbursement_info a
|
|
|
+ LEFT JOIN cw_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 cw_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 cw_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 sys_user_manage_office sumo on sumo.office_id = c.office_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}
|
|
|
+ ORDER BY a.update_time DESC
|
|
|
</select>
|
|
|
|
|
|
<select id="computerList"
|
|
@@ -229,7 +234,8 @@
|
|
|
attachment_name AS `name`,
|
|
|
create_by_id AS `by`,
|
|
|
attachment_flag AS `attachmentFlag`,
|
|
|
- create_time
|
|
|
+ create_time,
|
|
|
+ remarks
|
|
|
FROM
|
|
|
work_attachment
|
|
|
WHERE
|
|
@@ -558,7 +564,11 @@
|
|
|
a.contract_id,
|
|
|
a.report_number,
|
|
|
a.number,
|
|
|
+ a.ordinary_number,
|
|
|
a.receipt_number,
|
|
|
+ a.ordinary_receipt_number,
|
|
|
+ a.receipt_number_count,
|
|
|
+ a.number_count,
|
|
|
a.days,
|
|
|
a.content,
|
|
|
su.name as user_name,
|
|
@@ -587,9 +597,17 @@
|
|
|
a.report_id,
|
|
|
a.report_number,
|
|
|
a.number,
|
|
|
+ a.ordinary_number,
|
|
|
a.receipt_number,
|
|
|
+ a.ordinary_receipt_number,
|
|
|
+ a.receipt_number_count,
|
|
|
+ a.number_count,
|
|
|
a.days,
|
|
|
a.content,
|
|
|
+ a.unique_id,
|
|
|
+ a.reimbursement_type,
|
|
|
+ a.unique_id,
|
|
|
+ a.reimbursement_type,
|
|
|
su.name as user_name,
|
|
|
so.name as dept_name,
|
|
|
cw_type.name as type_name,
|
|
@@ -619,8 +637,14 @@
|
|
|
a.project_id,
|
|
|
a.report_number,
|
|
|
a.number,
|
|
|
+ a.ordinary_number,
|
|
|
a.receipt_number,
|
|
|
+ a.ordinary_receipt_number,
|
|
|
+ a.receipt_number_count,
|
|
|
+ a.number_count,
|
|
|
a.days,
|
|
|
+ a.unique_id,
|
|
|
+ a.reimbursement_type,
|
|
|
a.content,
|
|
|
su.name as user_name,
|
|
|
so.name as dept_name,
|
|
@@ -648,9 +672,15 @@
|
|
|
a.project_id,
|
|
|
a.report_number,
|
|
|
a.number,
|
|
|
+ a.ordinary_number,
|
|
|
a.receipt_number,
|
|
|
+ a.ordinary_receipt_number,
|
|
|
+ a.receipt_number_count,
|
|
|
+ a.number_count,
|
|
|
a.days,
|
|
|
a.content,
|
|
|
+ a.unique_id,
|
|
|
+ a.reimbursement_type,
|
|
|
su.name as user_name,
|
|
|
so.name as dept_name,
|
|
|
cw_type.name as type_name,
|
|
@@ -677,7 +707,11 @@
|
|
|
a.project_id,
|
|
|
a.report_number,
|
|
|
a.number,
|
|
|
+ a.ordinary_number,
|
|
|
a.receipt_number,
|
|
|
+ a.ordinary_receipt_number,
|
|
|
+ a.receipt_number_count,
|
|
|
+ a.number_count,
|
|
|
a.days,
|
|
|
a.content,
|
|
|
su.name as user_name,
|