Pārlūkot izejas kodu

报销功能修改

lizhenhao 2 gadi atpakaļ
vecāks
revīzija
0da00f89a5
17 mainītis faili ar 631 papildinājumiem un 49 dzēšanām
  1. 1 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/controller/CwReimbursementInfoController.java
  2. 88 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/domain/CwReimbursementDetailInfoContract.java
  3. 84 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/domain/CwReimbursementDetailInfoOther.java
  4. 99 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/domain/CwReimbursementDetailInfoReport.java
  5. 6 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/domain/CwReimbursementInfo.java
  6. 8 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/mapper/CwReimbursementDetailInfoContractMapper.java
  7. 8 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/mapper/CwReimbursementDetailInfoOtherMapper.java
  8. 8 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/mapper/CwReimbursementDetailInfoReportMapper.java
  9. 8 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/mapper/CwReimbursementInfoMapper.java
  10. 184 12
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/mapper/xml/CwReimbursementInfoMapper.xml
  11. 109 33
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/service/CwReimbursementInfoService.java
  12. 5 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/service/dto/QueryListDto.java
  13. 3 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/service/dto/ReportNoDto.java
  14. 2 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/service/dto/RetureListDto.java
  15. 9 2
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/service/dto/SaveInfoDto.java
  16. 3 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalType/domain/CwReimbursementTypeInfo.java
  17. 6 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalType/service/CwReimbursementTypeService.java

+ 1 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/controller/CwReimbursementInfoController.java

@@ -42,7 +42,7 @@ public class CwReimbursementInfoController {
 
     /**
      * 列表查询
-     * @param dto
+     * @param dto/reimbursementApproval/type/bxList
      * @return
      */
     @ApiOperation(value = "列表查询")

+ 88 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/domain/CwReimbursementDetailInfoContract.java

@@ -0,0 +1,88 @@
+package com.jeeplus.test.cw.reimbursementApproval.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 = "cw_reimbursement_detail_info_contract")
+public class CwReimbursementDetailInfoContract extends BaseEntity {
+
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 报销人
+     */
+    private String userId;
+
+    /**
+     * 报销人名称
+     */
+    @TableField(exist = false)
+    private String userName;
+
+    /**
+     * 报销部门
+     */
+    private String deptId;
+
+    /**
+     * 报销部门名称
+     */
+    @TableField(exist = false)
+    private String deptName;
+
+    /**
+     * 报销类型
+     */
+    private String typeId;
+
+    /**
+     * 报销类型名称
+     */
+    @TableField(exist = false)
+    private String typeName;
+
+    /**
+     * 报销合同
+     */
+    private String contractId;
+
+    /**
+     * 报销合同名称
+     */
+    @TableField(exist = false)
+    private String contractName;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 费用(元)
+     */
+    private String number;
+
+    /**
+     * 收据张数
+     */
+    private Integer receiptNumber;
+
+    /**
+     * 出差天数
+     */
+    private Integer days;
+
+    /**
+     * 内容
+     */
+    private String content;
+}

+ 84 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/domain/CwReimbursementDetailInfoOther.java

@@ -0,0 +1,84 @@
+package com.jeeplus.test.cw.reimbursementApproval.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 = "cw_reimbursement_detail_info_other")
+public class CwReimbursementDetailInfoOther extends BaseEntity {
+
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 报销人
+     */
+    private String userId;
+
+    /**
+     * 报销人名称
+     */
+    @TableField(exist = false)
+    private String userName;
+
+    /**
+     * 报销部门
+     */
+    private String deptId;
+
+    /**
+     * 报销部门名称
+     */
+    @TableField(exist = false)
+    private String deptName;
+
+    /**
+     * 报销类型
+     */
+    private String typeId;
+
+    /**
+     * 报销类型名称
+     */
+    @TableField(exist = false)
+    private String typeName;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 费用(元)
+     */
+    private String number;
+
+    /**
+     * 收据张数
+     */
+    private Integer receiptNumber;
+
+    /**
+     * 出差天数
+     */
+    private Integer days;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 报销项目
+     */
+    private String projectId;
+
+    /**
+     * 报销项目名称
+     */
+    private String projectName;
+}

+ 99 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/domain/CwReimbursementDetailInfoReport.java

@@ -0,0 +1,99 @@
+package com.jeeplus.test.cw.reimbursementApproval.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 = "cw_reimbursement_detail_info_report")
+public class CwReimbursementDetailInfoReport extends BaseEntity {
+
+    /**
+     * 关联id
+     */
+    private String infoId;
+
+    /**
+     * 报销人
+     */
+    private String userId;
+
+    /**
+     * 报销人名称
+     */
+    @TableField(exist = false)
+    private String userName;
+
+    /**
+     * 报销部门
+     */
+    private String deptId;
+
+    /**
+     * 报销部门名称
+     */
+    @TableField(exist = false)
+    private String deptName;
+
+    /**
+     * 报销类型
+     */
+    private String typeId;
+
+    /**
+     * 报销类型名称
+     */
+    @TableField(exist = false)
+    private String typeName;
+
+    /**
+     * 报销报告
+     */
+    private String reportId;
+
+    /**
+     * 报销报告单据编号
+     */
+    @TableField(exist = false)
+    private String documentNo;
+
+    /**
+     * 报告号
+     */
+    private String reportNumber;
+
+    /**
+     * 费用(元)
+     */
+    private String number;
+
+    /**
+     * 收据张数
+     */
+    private Integer receiptNumber;
+
+    /**
+     * 出差天数
+     */
+    private Integer days;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 报销项目
+     */
+    private String projectId;
+
+    /**
+     * 报销项目名称
+     */
+    @TableField(exist = false)
+    private String projectName;
+}

+ 6 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/domain/CwReimbursementInfo.java

@@ -63,4 +63,10 @@ public class CwReimbursementInfo extends BaseEntity {
      *
      */
     private String processDefinitionId;
+
+    /**
+     * 报销类型
+     */
+    private String sourceType;
+
 }

+ 8 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/mapper/CwReimbursementDetailInfoContractMapper.java

@@ -0,0 +1,8 @@
+package com.jeeplus.test.cw.reimbursementApproval.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfo;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoContract;
+
+public interface CwReimbursementDetailInfoContractMapper extends BaseMapper<CwReimbursementDetailInfoContract> {
+}

+ 8 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/mapper/CwReimbursementDetailInfoOtherMapper.java

@@ -0,0 +1,8 @@
+package com.jeeplus.test.cw.reimbursementApproval.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoOther;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoReport;
+
+public interface CwReimbursementDetailInfoOtherMapper extends BaseMapper<CwReimbursementDetailInfoOther> {
+}

+ 8 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/mapper/CwReimbursementDetailInfoReportMapper.java

@@ -0,0 +1,8 @@
+package com.jeeplus.test.cw.reimbursementApproval.approvalInfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfo;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoReport;
+
+public interface CwReimbursementDetailInfoReportMapper extends BaseMapper<CwReimbursementDetailInfoReport> {
+}

+ 8 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/mapper/CwReimbursementInfoMapper.java

@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementInfo;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.*;
 import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.service.dto.ReportNoDto;
 import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.service.dto.RetureListDto;
 import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.service.dto.TreeUserDto;
@@ -41,4 +41,11 @@ public interface CwReimbursementInfoMapper extends BaseMapper<CwReimbursementInf
 
     IPage<ReportNoDto> getReportNoList(Page<ReportNoDto> page, @Param(Constants.WRAPPER) QueryWrapper<ReportNoDto> queryWrapper);
 
+    List<CwReimbursementDetailInfoContract> getContractDetailList(@Param("id") String id);
+
+    List<CwReimbursementDetailInfoReport> getReportDetailList(@Param("id") String id);
+
+    List<CwReimbursementDetailInfoOther> getOtherDetailList(@Param("id") String id);
+
+    List<CwReimbursementDetailInfo> getDetailList(@Param("id") String id);
 }

+ 184 - 12
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/mapper/xml/CwReimbursementInfoMapper.xml

@@ -3,9 +3,6 @@
 <mapper namespace="com.jeeplus.test.cw.reimbursementApproval.approvalInfo.mapper.CwReimbursementInfoMapper">
 	<update id="updateStatusById">
 		UPDATE cw_reimbursement_info SET type = #{type}
-		<if test="type == '3'.toString">
-			, proc_ins_id = NULL, process_definition_id = NULL
-		</if>
 		WHERE id = #{id}
 	</update>
 
@@ -15,24 +12,80 @@
         SELECT
 			a.id,
 			a.`no`,
-			b.type_id,
-			b.type_name,
-			b.project_id,
-			b.project_name,
-			b.report_number,
+			(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
+									ELSE b4.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
+									ELSE t4.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
+									ELSE b4.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
+									ELSE p4.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
+									ELSE b4.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
+									ELSE so4.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
+									ELSE us4.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`
+									ELSE b4.`number` END) AS `number`,
 			a.user_name,
-			b.user_name AS `name`,
-			b.dept_name,
 			a.reim_date,
-			b.`number`,
 			a.type,
 			a.proc_ins_id,
 			a.process_definition_id,
 			d.ID_ AS task_id,
-			a.create_by as create_id
+			a.create_by as create_id,
+			a.source_type
 		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 sys_user c ON a.create_by =  c.id
 			LEFT JOIN act_ru_task d ON a.proc_ins_id = d.PROC_INST_ID_
 			${ew.customSqlSegment}
@@ -255,4 +308,123 @@
 		${ew.customSqlSegment}
 		ORDER BY a.update_date DESC
 	</select>
+
+	<select id="getContractDetailList" resultType="com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoContract">
+		select
+		a.id,
+		a.create_by,
+		a.create_date,
+		a.del_flag,
+		a.info_id,
+		a.user_id,
+		a.dept_id,
+		a.type_id,
+		a.contract_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_contract.contract_name as contract_name
+		from cw_reimbursement_detail_info_contract 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_work_contract_info cw_contract on cw_contract.id = a.contract_id and cw_contract.del_flag = '0'
+		where a.del_flag = '0' and a.info_id = #{id}
+		order by a.number asc
+	</select>
+
+	<select id="getReportDetailList" resultType="com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoReport">
+		select
+		a.id,
+		a.create_by,
+		a.create_date,
+		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'
+		where a.del_flag = '0' and a.info_id = #{id}
+		order by a.number asc
+	</select>
+
+	<select id="getDetailList" resultType="com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfo">
+		select
+		a.id,
+		a.create_by,
+		a.create_date,
+		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,
+		cw_type.name as type_name,
+		cw_project.project_name as project_name
+		from cw_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 cw_type on cw_type.id = a.type_id and cw_type.del_flag = '0'
+		left join cw_project_records cw_project on cw_project.id = a.project_id and cw_project.del_flag = '0'
+		where a.del_flag = '0' and a.info_id = #{id}
+		order by a.number asc
+	</select>
+
+	<select id="getOtherDetailList" resultType="com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfoOther">
+		select
+		a.id,
+		a.create_by,
+		a.create_date,
+		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,
+		cw_type.name as type_name,
+		a.project_name as project_name
+		from cw_reimbursement_detail_info_other 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_records cw_project on cw_project.id = a.project_id and cw_project.del_flag = '0'
+		where a.del_flag = '0' and a.info_id = #{id}
+		order by a.number asc
+	</select>
 </mapper>

+ 109 - 33
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/service/CwReimbursementInfoService.java

@@ -10,12 +10,8 @@ import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.sys.utils.StringUtils;
 import com.jeeplus.sys.utils.UserUtils;
 import com.jeeplus.test.cw.contractRegistration.service.ContractInfoService;
-import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementAmountInfo;
-import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfo;
-import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementInfo;
-import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.mapper.CwReimbursementAmountInfoMapper;
-import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.mapper.CwReimbursementDetailInfoMapper;
-import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.mapper.CwReimbursementInfoMapper;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.*;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.mapper.*;
 import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.service.dto.*;
 import com.jeeplus.test.mould.service.SerialnumTplService;
 import com.jeeplus.test.oss.domain.WorkAttachment;
@@ -42,6 +38,15 @@ public class CwReimbursementInfoService {
     private CwReimbursementInfoMapper infoMapper;
 
     @Resource
+    private CwReimbursementDetailInfoContractMapper cwReimbursementDetailInfoContractMapper;
+
+    @Resource
+    private CwReimbursementDetailInfoReportMapper cwReimbursementDetailInfoReportMapper;
+
+    @Resource
+    private CwReimbursementDetailInfoOtherMapper cwReimbursementDetailInfoOtherMapper;
+
+    @Resource
     private CwReimbursementDetailInfoMapper detailInfoMapper;
 
     @Resource
@@ -67,7 +72,7 @@ public class CwReimbursementInfoService {
          * c表是sysUser
          */
         queryWrapper.eq("a.del_flag", 0);
-        queryWrapper.eq("c.project_name", dto.getProjectName());
+        queryWrapper.eq("c.id", dto.getProjectId());
         return infoMapper.getReportNoList(page, queryWrapper);
     }
 
@@ -123,6 +128,9 @@ public class CwReimbursementInfoService {
         if (StringUtils.isNotEmpty(dto.getReportNumber())) {
             queryWrapper.like("b.report_number", dto.getReportNumber());
         }
+        if (StringUtils.isNotBlank(dto.getSourceType())) {
+            queryWrapper.eq("a.source_type", dto.getSourceType());
+        }
         return infoMapper.findList(page, queryWrapper);
     }
 
@@ -172,22 +180,38 @@ public class CwReimbursementInfoService {
         info.setUpdateDate(new Date());
         info.setDelFlag(0);
         infoMapper.insert(info);
-        // 保存详情列表信息
+        // 保存项目详情列表信息
         if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
             for (CwReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
-                // 生成id
-                String detailId = UUID.randomUUID().toString().replace("-", "");
-                detailInfo.setId(detailId);
-                detailInfo.setCreateBy(userDTO.getId());
-                detailInfo.setCreateDate(new Date());
-                detailInfo.setUpdateBy(userDTO.getId());
-                detailInfo.setUpdateDate(new Date());
-                detailInfo.setDelFlag(0);
                 // 保存基础表信息主键值
                 detailInfo.setInfoId(id);
                 detailInfoMapper.insert(detailInfo);
             }
         }
+        // 保存合同详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoContracts())) {
+            for (CwReimbursementDetailInfoContract detailInfo : dto.getDetailInfoContracts()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                cwReimbursementDetailInfoContractMapper.insert(detailInfo);
+            }
+        }
+        // 保存报告详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoReports())) {
+            for (CwReimbursementDetailInfoReport detailInfo : dto.getDetailInfoReports()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                cwReimbursementDetailInfoReportMapper.insert(detailInfo);
+            }
+        }
+        // 保存其他报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoOthers())) {
+            for (CwReimbursementDetailInfoOther detailInfo : dto.getDetailInfoOthers()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(id);
+                cwReimbursementDetailInfoOtherMapper.insert(detailInfo);
+            }
+        }
         // 保存专用发票列表信息
         if (CollectionUtils.isNotEmpty(dto.getAmountInfos())) {
             for (CwReimbursementAmountInfo amountInfo : dto.getAmountInfos()) {
@@ -223,21 +247,55 @@ public class CwReimbursementInfoService {
         LambdaQueryWrapper<CwReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
         detailWrapper.eq(CwReimbursementDetailInfo::getInfoId, dto.getId());
         detailInfoMapper.delete(detailWrapper);
+        // 删除合同列表
+        LambdaQueryWrapper<CwReimbursementDetailInfoContract> detailWrapperContract = new LambdaQueryWrapper<>();
+        detailWrapperContract.eq(CwReimbursementDetailInfoContract::getInfoId, dto.getId());
+        cwReimbursementDetailInfoContractMapper.delete(detailWrapperContract);
+        // 删除报告列表
+        LambdaQueryWrapper<CwReimbursementDetailInfoReport> detailWrapperReport = new LambdaQueryWrapper<>();
+        detailWrapperReport.eq(CwReimbursementDetailInfoReport::getInfoId, dto.getId());
+        cwReimbursementDetailInfoReportMapper.delete(detailWrapperReport);
+        // 删除其他报销表
+        LambdaQueryWrapper<CwReimbursementDetailInfoOther> detailWrapperOthers = new LambdaQueryWrapper<>();
+        detailWrapperOthers.eq(CwReimbursementDetailInfoOther::getInfoId, dto.getId());
+        cwReimbursementDetailInfoOtherMapper.delete(detailWrapperOthers);
+
+        // 保存项目详情列表信息
         if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
             for (CwReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
-                // 生成id
-                String detailId = UUID.randomUUID().toString().replace("-", "");
-                detailInfo.setId(detailId);
-                detailInfo.setCreateBy(userDTO.getId());
-                detailInfo.setCreateDate(new Date());
-                detailInfo.setUpdateBy(userDTO.getId());
-                detailInfo.setUpdateDate(new Date());
-                detailInfo.setDelFlag(0);
                 // 保存基础表信息主键值
                 detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
                 detailInfoMapper.insert(detailInfo);
             }
         }
+        // 保存合同详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoContracts())) {
+            for (CwReimbursementDetailInfoContract detailInfo : dto.getDetailInfoContracts()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                cwReimbursementDetailInfoContractMapper.insert(detailInfo);
+            }
+        }
+        // 保存报告详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoReports())) {
+            for (CwReimbursementDetailInfoReport detailInfo : dto.getDetailInfoReports()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                cwReimbursementDetailInfoReportMapper.insert(detailInfo);
+            }
+        }
+        // 保存其他报销详情列表信息
+        if (CollectionUtils.isNotEmpty(dto.getDetailInfoOthers())) {
+            for (CwReimbursementDetailInfoOther detailInfo : dto.getDetailInfoOthers()) {
+                // 保存基础表信息主键值
+                detailInfo.setInfoId(dto.getId());
+                detailInfo.setId("");
+                cwReimbursementDetailInfoOtherMapper.insert(detailInfo);
+            }
+        }
         // 修改专用发票信息列表
         // 删除原有数据
         LambdaQueryWrapper<CwReimbursementAmountInfo> amountWrapper = new LambdaQueryWrapper<>();
@@ -269,9 +327,21 @@ public class CwReimbursementInfoService {
         // 删除基础信息表
         infoMapper.deleteById(id);
         // 删除详情列表
-        LambdaQueryWrapper<CwReimbursementDetailInfo> detailInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        detailInfoLambdaQueryWrapper.eq(CwReimbursementDetailInfo::getInfoId, id);
-        detailInfoMapper.delete(detailInfoLambdaQueryWrapper);
+        LambdaQueryWrapper<CwReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
+        detailWrapper.eq(CwReimbursementDetailInfo::getInfoId, id);
+        detailInfoMapper.delete(detailWrapper);
+        // 删除合同列表
+        LambdaQueryWrapper<CwReimbursementDetailInfoContract> detailWrapperContract = new LambdaQueryWrapper<>();
+        detailWrapperContract.eq(CwReimbursementDetailInfoContract::getInfoId, id);
+        cwReimbursementDetailInfoContractMapper.delete(detailWrapperContract);
+        // 删除报告列表
+        LambdaQueryWrapper<CwReimbursementDetailInfoReport> detailWrapperReport = new LambdaQueryWrapper<>();
+        detailWrapperReport.eq(CwReimbursementDetailInfoReport::getInfoId, id);
+        cwReimbursementDetailInfoReportMapper.delete(detailWrapperReport);
+        // 删除其他报销列表
+        LambdaQueryWrapper<CwReimbursementDetailInfoOther> detailWrapperOther = new LambdaQueryWrapper<>();
+        detailWrapperOther.eq(CwReimbursementDetailInfoOther::getInfoId, id);
+        cwReimbursementDetailInfoOtherMapper.delete(detailWrapperOther);
         // 删除专用发票信息列表
         LambdaQueryWrapper<CwReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
         amountInfoLambdaQueryWrapper.eq(CwReimbursementAmountInfo::getInfoId, id);
@@ -289,12 +359,18 @@ public class CwReimbursementInfoService {
         CwReimbursementInfo info = infoMapper.selectById(id);
         BeanUtils.copyProperties(info, dto);
         // 查询详情列表
-        LambdaQueryWrapper<CwReimbursementDetailInfo> detailInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        detailInfoLambdaQueryWrapper.eq(CwReimbursementDetailInfo::getInfoId, id);
-        detailInfoLambdaQueryWrapper.orderByAsc(CwReimbursementDetailInfo::getNumber);
-        List<CwReimbursementDetailInfo> detailInfos = detailInfoMapper.selectList(detailInfoLambdaQueryWrapper);
-
-        dto.setDetailInfos(detailInfos);
+//        LambdaQueryWrapper<CwReimbursementDetailInfo> detailInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
+//        detailInfoLambdaQueryWrapper.eq(CwReimbursementDetailInfo::getInfoId, id);
+//        detailInfoLambdaQueryWrapper.orderByAsc(CwReimbursementDetailInfo::getNumber);
+//        List<CwReimbursementDetailInfo> detailInfos = detailInfoMapper.selectList(detailInfoLambdaQueryWrapper);
+        // 项目报销详情
+        dto.setDetailInfos(infoMapper.getDetailList(id));
+        // 合同报销详情
+        dto.setDetailInfoContracts(infoMapper.getContractDetailList(id));
+        // 报告报销详情
+        dto.setDetailInfoReports(infoMapper.getReportDetailList(id));
+        // 其他报销
+        dto.setDetailInfoOthers(infoMapper.getOtherDetailList(id));
         // 查询专用发票信息列表
         LambdaQueryWrapper<CwReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
         amountInfoLambdaQueryWrapper.eq(CwReimbursementAmountInfo::getInfoId, id);

+ 5 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/service/dto/QueryListDto.java

@@ -50,4 +50,9 @@ public class QueryListDto extends BaseEntity {
      * 报告号
      */
     private String reportNumber;
+
+    /**
+     * 报销类型
+     */
+    private String sourceType;
 }

+ 3 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/service/dto/ReportNoDto.java

@@ -15,4 +15,7 @@ public class ReportNoDto extends BaseEntity {
 
     //项目名称
     private String projectName;
+
+    // 项目id
+    private String projectId;
 }

+ 2 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/service/dto/RetureListDto.java

@@ -102,4 +102,6 @@ public class RetureListDto {
      * 创建人id
      */
     private String createId;
+
+    private String sourceType;
 }

+ 9 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalInfo/service/dto/SaveInfoDto.java

@@ -2,8 +2,7 @@ package com.jeeplus.test.cw.reimbursementApproval.approvalInfo.service.dto;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeeplus.core.domain.BaseEntity;
-import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementAmountInfo;
-import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.CwReimbursementDetailInfo;
+import com.jeeplus.test.cw.reimbursementApproval.approvalInfo.domain.*;
 import com.jeeplus.test.reimbursement.reimbursementInfo.domain.ReimbursementAmountInfo;
 import com.jeeplus.test.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfo;
 import com.jeeplus.test.workContract.service.dto.WorkAttachmentDto;
@@ -67,9 +66,17 @@ public class SaveInfoDto extends BaseEntity {
     private String processInstanceId;
 
     private List<CwReimbursementDetailInfo> detailInfos;
+    private List<CwReimbursementDetailInfoContract> detailInfoContracts;
+    private List<CwReimbursementDetailInfoReport> detailInfoReports;
+    private List<CwReimbursementDetailInfoOther> detailInfoOthers;
 
     private List<CwReimbursementAmountInfo> amountInfos;
 
     private List<WorkAttachmentDto> files;
 
+    /**
+     * 报销类型
+     */
+    private String sourceType;
+
 }

+ 3 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalType/domain/CwReimbursementTypeInfo.java

@@ -87,4 +87,7 @@ public class CwReimbursementTypeInfo extends TreeEntity<CwReimbursementTypeInfo>
      * 业务类型
      */
     private String businessType;
+
+    @TableField(exist = false)
+    private String like;
 }

+ 6 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalType/service/CwReimbursementTypeService.java

@@ -1,5 +1,6 @@
 package com.jeeplus.test.cw.reimbursementApproval.approvalType.service;
 
+import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.jeeplus.core.domain.BaseEntity;
 import com.jeeplus.sys.service.dto.UserDTO;
@@ -44,6 +45,11 @@ public class CwReimbursementTypeService {
         if (StringUtils.isNotEmpty(info.getName())) {
             wrapper.like(CwReimbursementTypeInfo::getName, info.getName());
         }
+        if (ObjectUtil.isNotEmpty(info)) {
+            if (StringUtils.isNotBlank(info.getLike())){
+                wrapper.likeRight(CwReimbursementTypeInfo::getSort,info.getLike());
+            }
+        }
         if (info.getSort() != null) {
             wrapper.like(CwReimbursementTypeInfo::getSort, info.getSort());
         }