Pārlūkot izejas kodu

中审项目报销-单独建表

huangguoce 1 mēnesi atpakaļ
vecāks
revīzija
ec3aa376bf

+ 91 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementDetailInfoProject.java

@@ -0,0 +1,91 @@
+package com.jeeplus.centrecareful.approvalInfo.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+@TableName(value = "zs_reimbursement_detail_info_zs_project")
+public class ZsReimbursementDetailInfoProject extends BaseEntity {
+
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 报销人
+     */
+    private String userId;
+
+    /**
+     * 报销人名称
+     */
+    private String userName;
+
+    /**
+     * 报销部门
+     */
+    private String deptId;
+
+    /**
+     * 报销部门名称
+     */
+    private String deptName;
+
+    /**
+     * 报销类型
+     */
+    private String typeId;
+
+    /**
+     * 报销类型名称
+     */
+    private String typeName;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 费用(元)
+     */
+    private String number;
+
+    /**
+     * 收据张数
+     */
+    private Integer receiptNumber;
+
+    /**
+     * 出差天数
+     */
+    private Integer days;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 报销项目
+     */
+    private String projectId;
+
+    /**
+     * 报销项目名称
+     */
+    private String projectName;
+
+    /**
+     * 发票号
+     */
+    private String invoiceNumber;
+
+    /**
+     * 立项号
+     */
+    private String projectApprovalNumber;
+}

+ 2 - 4
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/domain/ZsReimbursementDetailInfoReport.java

@@ -25,7 +25,6 @@ public class ZsReimbursementDetailInfoReport extends BaseEntity {
     /**
      * 报销人名称
      */
-    @TableField(exist = false)
     private String userName;
 
     /**
@@ -36,7 +35,6 @@ public class ZsReimbursementDetailInfoReport extends BaseEntity {
     /**
      * 报销部门名称
      */
-    @TableField(exist = false)
     private String deptName;
 
     /**
@@ -47,7 +45,6 @@ public class ZsReimbursementDetailInfoReport extends BaseEntity {
     /**
      * 报销类型名称
      */
-    @TableField(exist = false)
     private String typeName;
 
     /**
@@ -94,6 +91,7 @@ public class ZsReimbursementDetailInfoReport extends BaseEntity {
     /**
      * 报销项目名称
      */
-    @TableField(exist = false)
     private String projectName;
+
+
 }

+ 8 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoProjectMapper.java

@@ -0,0 +1,8 @@
+package com.jeeplus.centrecareful.approvalInfo.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoProject;
+
+public interface ZsReimbursementDetailInfoProjectMapper extends BaseMapper<ZsReimbursementDetailInfoProject> {
+}

+ 0 - 11
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoReportMapper.java

@@ -11,15 +11,4 @@ import org.apache.poi.ss.formula.functions.T;
 //@InterceptorIgnore(tenantLine = "true")
 public interface ZsReimbursementDetailInfoReportMapper extends BaseMapper<ZsReimbursementDetailInfoReport> {
 
-    /**
-     * 保存报告报销到财务表
-     * @param info
-     */
-    void insertCwDetail(ZsReimbursementDetailInfoReport info);
-
-    /**
-     * 根据id删除文件
-     * @param id
-     */
-    void deleteCwDetail(String id);
 }

+ 4 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementInfoMapper.java

@@ -52,6 +52,10 @@ public interface ZsReimbursementInfoMapper extends BaseMapper<ZsReimbursementInf
 
     @InterceptorIgnore(tenantLine = "true")
     List<ZsReimbursementDetailInfoOther> getOtherDetailList(@Param("id") String id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    List<ZsReimbursementDetailInfoProject> getZsProjectDetailList(@Param("id") String id);
+
     @InterceptorIgnore(tenantLine = "true")
     List<ZsReimbursementDetailInfoProcured> getProcuredDetailList(@Param("id") String id);
     @InterceptorIgnore(tenantLine = "true")

+ 0 - 54
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/xml/ZsReimbursementDetailInfoReportMapper.xml

@@ -1,54 +0,0 @@
-<?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.jeeplus.centrecareful.approvalInfo.mapper.ZsReimbursementDetailInfoReportMapper">
-
-	<insert id="insertCwDetail">
-		insert into cw_reimbursement_detail_info_report (
-		  id,
-		  create_by_id,
-		  create_time,
-		  update_by_id,
-		  update_time,
-		  del_flag,
-		  info_id,
-		  user_id,
-		  dept_id,
-		  type_id,
-		  report_id,
-		  report_number,
-		  number,
-		  receipt_number,
-		  days,
-		  content,
-		  project_id,
-		  tenant_id
-		)
-		values
-		  (
-			#{id},
-			#{createById},
-			#{createTime},
-			#{updateById},
-			#{updateTime},
-			#{delFlag},
-			#{infoId},
-			#{userId},
-			#{deptId},
-			#{typeId},
-			#{reportId},
-			#{reportNumber},
-			#{number},
-			#{receiptNumber},
-			#{days},
-			#{content},
-			#{projectId},
-			#{tenantId}
-		  ) ;
-
-	</insert>
-
-	<update id="deleteCwDetail">
-		update cw_reimbursement_detail_info_report set del_flag = 1 where info_id = #{id}
-	</update>
-
-</mapper>

+ 302 - 159
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/xml/ZsReimbursementInfoMapper.xml

@@ -9,71 +9,141 @@
 
 	<select id="findList"
             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.reim_date,
 			a.type,
@@ -87,54 +157,100 @@
 			a.payment_time,
 			a.reimbursement_type,
 			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
 			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}
 		ORDER BY a.update_time DESC
     </select>
@@ -484,59 +600,56 @@
 
 	<select id="getCwReportDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoReport">
 		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}
 		order by a.number asc
 	</select>
 
 	<select id="getDetailList" resultType="com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfo">
 		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
-		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}
 		order by a.number asc
 	</select>
@@ -557,8 +670,6 @@
 		a.receipt_number,
 		a.days,
 		a.content,
-		a.invoice_number,
-		a.project_approval_number,
 		su.name as user_name,
 		so.name as dept_name,
 		zs_type.name as type_name,
@@ -571,6 +682,38 @@
 		order by a.number asc
 	</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
 		a.id,

+ 34 - 27
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/ZsReimbursementInfoService.java

@@ -62,6 +62,9 @@ public class ZsReimbursementInfoService {
     private ZsReimbursementDetailInfoProcuredMapper zsReimbursementDetailInfoProcuredMapper;
 
     @Resource
+    private ZsReimbursementDetailInfoProjectMapper zsReimbursementDetailInfoProjectMapper;
+
+    @Resource
     private ZsReimbursementDetailInfoMapper detailInfoMapper;
 
     @Resource
@@ -338,7 +341,7 @@ public class ZsReimbursementInfoService {
             for (ZsReimbursementDetailInfoReport detailInfo : dto.getDetailInfoReports()) {
                 // 保存基础表信息主键值
                 detailInfo.setInfoId(id);
-                zsReimbursementDetailInfoReportMapper.insertCwDetail(detailInfo);
+                zsReimbursementDetailInfoReportMapper.insert(detailInfo);
             }
         }
         // 保存其他报销详情列表信息
@@ -349,6 +352,14 @@ public class ZsReimbursementInfoService {
                 zsReimbursementDetailInfoOtherMapper.insert(detailInfo);
             }
         }
+        // 保存中审项目报销详情
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoProject())) {
+            for (ZsReimbursementDetailInfoProject detailInfo : dto.getDetailInfoProject()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                zsReimbursementDetailInfoProjectMapper.insert(detailInfo);
+            }
+        }
         // 保存采购报销详情列表信息
         if (CollectionUtils.isNotEmpty(dto.getDetailInfoProcured())) {
             for (ZsReimbursementDetailInfoProcured detailInfo : dto.getDetailInfoProcured()) {
@@ -526,7 +537,7 @@ public class ZsReimbursementInfoService {
         // 删除报告列表
         LambdaQueryWrapper<ZsReimbursementDetailInfoReport> detailWrapperReport = new LambdaQueryWrapper<>();
         detailWrapperReport.eq(ZsReimbursementDetailInfoReport::getInfoId, dto.getId());
-        zsReimbursementDetailInfoReportMapper.deleteCwDetail(dto.getId());
+        zsReimbursementDetailInfoReportMapper.delete(detailWrapperReport);
         // 删除其他报销表
         LambdaQueryWrapper<ZsReimbursementDetailInfoOther> detailWrapperOthers = new LambdaQueryWrapper<>();
         detailWrapperOthers.eq(ZsReimbursementDetailInfoOther::getInfoId, dto.getId());
@@ -535,6 +546,10 @@ public class ZsReimbursementInfoService {
         LambdaQueryWrapper<ZsReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
         detailWrapperProcured.eq(ZsReimbursementDetailInfoProcured::getInfoId, dto.getId());
         zsReimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
+        //删除中审项目报销表
+        LambdaQueryWrapper<ZsReimbursementDetailInfoProject> detailWrapperProject = new LambdaQueryWrapper<>();
+        detailWrapperProject.eq(ZsReimbursementDetailInfoProject::getInfoId, dto.getId());
+        zsReimbursementDetailInfoProjectMapper.delete(detailWrapperProject);
 
         // 保存项目详情列表信息
         if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
@@ -560,7 +575,7 @@ public class ZsReimbursementInfoService {
                 // 保存基础表信息主键值
                 detailInfo.setInfoId(dto.getId());
                 detailInfo.setId("");
-                zsReimbursementDetailInfoReportMapper.insertCwDetail(detailInfo);
+                zsReimbursementDetailInfoReportMapper.insert(detailInfo);
             }
         }
         // 保存其他报销详情列表信息
@@ -572,6 +587,15 @@ public class ZsReimbursementInfoService {
                 zsReimbursementDetailInfoOtherMapper.insert(detailInfo);
             }
         }
+        // 保存中审项目报销详情
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoProject())) {
+            for (ZsReimbursementDetailInfoProject detailInfo : dto.getDetailInfoProject()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                zsReimbursementDetailInfoProjectMapper.insert(detailInfo);
+            }
+        }
         // 保存采购报销详情列表信息
         if (CollectionUtils.isNotEmpty(dto.getDetailInfoProcured())) {
             for (ZsReimbursementDetailInfoProcured detailInfo : dto.getDetailInfoProcured()) {
@@ -767,6 +791,11 @@ public class ZsReimbursementInfoService {
         LambdaQueryWrapper<ZsReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
         detailWrapperProcured.eq(ZsReimbursementDetailInfoProcured::getInfoId, id);
         zsReimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
+        // 删除中审项目报销列表
+        LambdaQueryWrapper<ZsReimbursementDetailInfoProject> detailWrapperProject = new LambdaQueryWrapper<>();
+        detailWrapperProject.eq(ZsReimbursementDetailInfoProject::getInfoId, id);
+        zsReimbursementDetailInfoProjectMapper.delete(detailWrapperProject);
+
         // 删除专用发票信息列表
         LambdaQueryWrapper<ZsReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
         amountInfoLambdaQueryWrapper.eq(ZsReimbursementAmountInfo::getInfoId, id);
@@ -798,41 +827,19 @@ public class ZsReimbursementInfoService {
 //        List<ZsReimbursementDetailInfo> detailInfos = detailInfoMapper.selectList(detailInfoLambdaQueryWrapper);
             // 项目报销详情
             List<ZsReimbursementDetailInfo> detailList = infoMapper.getDetailList(id);
-            detailList.stream().forEach(projectDetail -> {
-                if (StringUtils.isNotBlank(projectDetail.getProjectId())) {
-                    //根据项目id查询项目名称
-                    String proName = SpringUtil.getBean(IFinanceApi.class).getCwProjectNameByIds(projectDetail.getProjectId());
-                    projectDetail.setProjectName(proName);
-                } else {
-                    projectDetail.setProjectName("");
-                }
-                if (StringUtils.isBlank(projectDetail.getUserName())){
-                    String name = infoMapper.findUserById(projectDetail.getUserId());
-                    projectDetail.setUserName(name);
-                    String office = infoMapper.findOfficeById(projectDetail.getDeptId());
-                    projectDetail.setDeptName(office);
-                }
-
-            });
             dto.setDetailInfos(detailList);
             //dto.setDetailInfos(infoMapper.getDetailList(id));
             // 合同报销详情
             dto.setDetailInfoContracts(infoMapper.getContractDetailList(id));
             // 报告报销详情
             List<ZsReimbursementDetailInfoReport> detailInfoReports=infoMapper.getCwReportDetailList(id);
-            detailInfoReports.stream().forEach(detailInfoReport->{
-                if (StringUtils.isBlank(detailInfoReport.getUserName())){
-                    String name = infoMapper.findUserById(detailInfoReport.getUserId());
-                    detailInfoReport.setUserName(name);
-                    String office = infoMapper.findOfficeById(detailInfoReport.getDeptId());
-                    detailInfoReport.setDeptName(office);
-                }
-            });
             dto.setDetailInfoReports(detailInfoReports);
 
             //dto.setDetailInfoReports(infoMapper.getReportDetailList(id));
             // 其他报销
             dto.setDetailInfoOthers(infoMapper.getOtherDetailList(id));
+            // 中审项目报销
+            dto.setDetailInfoProject(infoMapper.getZsProjectDetailList(id));
             // 采购报销
             dto.setDetailInfoProcured(infoMapper.getProcuredDetailList(id));
             // 查询专用发票信息列表

+ 3 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsSaveInfoDto.java

@@ -68,6 +68,7 @@ public class ZsSaveInfoDto extends BaseEntity {
     private List<ZsReimbursementDetailInfoReport> detailInfoReports;
     private List<ZsReimbursementDetailInfoOther> detailInfoOthers;
     private List<ZsReimbursementDetailInfoProcured> detailInfoProcured;
+    private List<ZsReimbursementDetailInfoProject> detailInfoProject;
 
     private List<ZsReimbursementAmountInfo> amountInfos;
     private List<ZsReimbursementAmountInfo> invoiceReimbursements;
@@ -75,6 +76,8 @@ public class ZsSaveInfoDto extends BaseEntity {
     private List<WorkAttachmentInfo> files;
     private List<ZsReimAmountAndFileDto> invoiceReimbursementFiles;
 
+
+
     /**
      * 报销类型
      */