Selaa lähdekoodia

开票和报销功能提交

user5 8 kuukautta sitten
vanhempi
commit
24949209fc
29 muutettua tiedostoa jossa 612 lisäystä ja 168 poistoa
  1. 5 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/FinanceApiFallbackFactory.java
  2. 8 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IFinanceApi.java
  3. 2 2
      jeeplus-modules/jeeplus-assess/src/main/resources/bootstrap.yml
  4. 2 2
      jeeplus-modules/jeeplus-ccpm/src/main/resources/bootstrap.yml
  5. 16 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementDetailInfoReportMapper.java
  6. 7 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/ZsReimbursementInfoMapper.java
  7. 54 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/xml/ZsReimbursementDetailInfoReportMapper.xml
  8. 133 138
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/xml/ZsReimbursementInfoMapper.xml
  9. 57 5
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/ZsReimbursementInfoService.java
  10. 12 0
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsRetureListDto.java
  11. 4 4
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/domain/ZsReimbursementTypeInfo.java
  12. 4 4
      jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/service/ZsReimbursementTypeService.java
  13. 3 3
      jeeplus-modules/jeeplus-centrecareful/src/main/resources/bootstrap.yml
  14. 2 2
      jeeplus-modules/jeeplus-consult/src/main/resources/bootstrap.yml
  15. 16 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/controller/CwFinanceInvoiceController.java
  16. 9 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/domain/CwFinanceInvoice.java
  17. 7 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/CwFinanceInvoiceMapper.java
  18. 17 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/xml/CwFinanceInvoiceMapper.xml
  19. 205 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/service/CwFinanceInvoiceService.java
  20. 5 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/service/dto/CwFinanceInvoiceDTO.java
  21. 16 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/CwProjectRecordsService.java
  22. 1 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/mapper/xml/CwProjectReportArchiveMapper.xml
  23. 2 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/service/dto/CwProjectReportArchiveDTO.java
  24. 12 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/controller/CwReimbursementInfoController.java
  25. 2 2
      jeeplus-modules/jeeplus-finance/src/main/resources/bootstrap.yml
  26. 1 1
      jeeplus-modules/jeeplus-flowable/src/main/resources/bootstrap.yml
  27. 2 2
      jeeplus-modules/jeeplus-human/src/main/resources/bootstrap.yml
  28. 6 0
      jeeplus-modules/jeeplus-public-modules/pom.xml
  29. 2 2
      jeeplus-modules/jeeplus-public-modules/src/main/resources/bootstrap.yml

+ 5 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/FinanceApiFallbackFactory.java

@@ -57,6 +57,11 @@ public class FinanceApiFallbackFactory implements FallbackFactory<IFinanceApi> {
                 return null;
             }
 
+            @Override
+            public String getCwProjectNameByIds(String ids) {
+                return null;
+            }
+
         };
     }
 }

+ 8 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IFinanceApi.java

@@ -49,4 +49,12 @@ public interface IFinanceApi {
     @GetMapping(value = "/cw_finance/invoice/getExceedCwFinance")
     String getExceedCwFinance();
 
+    /**
+     * 根据项目ids获取项目名称
+     * @param ids
+     * @return
+     */
+    @GetMapping(value = "/reimbursementApproval/info/getCwProjectNameByIds")
+    String getCwProjectNameByIds(@RequestParam(value = "ids") String ids);
+
 }

+ 2 - 2
jeeplus-modules/jeeplus-assess/src/main/resources/bootstrap.yml

@@ -87,8 +87,8 @@ config:
       aliyunUrl: http://oss.gangwaninfo.com
       aliyunDownloadUrl: http://cdn.gangwaninfo.com
       endpoint: http://oss-cn-hangzhou.aliyuncs.com
-      accessKeyId: LTAI5tQDWoM9c1WyJNPs86rX
-      accessKeySecret: 84dDIx4edT1n78KUOqqSmDZ35pchJv
+      accessKeyId: LTAI5tKa6kzGr5EyPWJB4EcD
+      accessKeySecret: arHxB7ZPhizrBYf4844TtyaRctPMgW
       bucketName: xg-pg
     minIO:
       endpoint:

+ 2 - 2
jeeplus-modules/jeeplus-ccpm/src/main/resources/bootstrap.yml

@@ -87,8 +87,8 @@ config:
       aliyunUrl: http://oss.gangwaninfo.com
       aliyunDownloadUrl: http://cdn.gangwaninfo.com
       endpoint: http://oss-cn-hangzhou.aliyuncs.com
-      accessKeyId: LTAI5tQDWoM9c1WyJNPs86rX
-      accessKeySecret: 84dDIx4edT1n78KUOqqSmDZ35pchJv
+      accessKeyId: LTAI5tKa6kzGr5EyPWJB4EcD
+      accessKeySecret: arHxB7ZPhizrBYf4844TtyaRctPMgW
       bucketName: xg-pg
     minIO:
       endpoint:

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

@@ -1,9 +1,25 @@
 package com.jeeplus.centrecareful.approvalInfo.mapper;
 
 import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.jeeplus.centrecareful.approvalInfo.domain.ZsReimbursementDetailInfoReport;
+import org.apache.ibatis.annotations.Param;
+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);
 }

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

@@ -47,6 +47,8 @@ public interface ZsReimbursementInfoMapper extends BaseMapper<ZsReimbursementInf
     List<ZsReimbursementDetailInfoContract> getContractDetailList(@Param("id") String id);
     @InterceptorIgnore(tenantLine = "true")
     List<ZsReimbursementDetailInfoReport> getReportDetailList(@Param("id") String id);
+    @InterceptorIgnore(tenantLine = "true")
+    List<ZsReimbursementDetailInfoReport> getCwReportDetailList(@Param("id") String id);
 
     @InterceptorIgnore(tenantLine = "true")
     List<ZsReimbursementDetailInfoOther> getOtherDetailList(@Param("id") String id);
@@ -68,4 +70,9 @@ public interface ZsReimbursementInfoMapper extends BaseMapper<ZsReimbursementInf
     List<ZsReimbursementAmountInfoDTO> getInvoiceReimbursementAmountList(@Param("idList") List<String> idList);
 
     void updatePaymentById(@Param("id") String id,@Param("paymentStatus") String paymentStatus);
+
+    @InterceptorIgnore(tenantLine = "true")
+    String findUserById(@Param("projectUser") String projectUser);
+    @InterceptorIgnore(tenantLine = "true")
+    String findOfficeById(@Param("projectOffice")String projectOffice);
 }

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

@@ -0,0 +1,54 @@
+<?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>

+ 133 - 138
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/mapper/xml/ZsReimbursementInfoMapper.xml

@@ -12,104 +12,60 @@
         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 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 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 = 4 THEN
-		b4.project_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 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 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` ELSE b5.`number`
-			END
-			) AS `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
+			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.user_name,
 			a.reim_date,
 			a.type,
@@ -123,50 +79,50 @@
 			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
 		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 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 zs_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 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 zs_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 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 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 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 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
@@ -518,6 +474,38 @@
 		order by a.number asc
 	</select>
 
+	<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'
+		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,
@@ -677,4 +665,11 @@
 		</where>
 	</delete>
 
+	<select id="findUserById" resultType="string">
+		select name from sys_user where id = #{projectUser}
+	</select>
+	<select id="findOfficeById" resultType="string">
+		select name from sys_office where id = #{projectOffice}
+	</select>
+
 </mapper>

+ 57 - 5
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/ZsReimbursementInfoService.java

@@ -1,5 +1,6 @@
 package com.jeeplus.centrecareful.approvalInfo.service;
 
+import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.fastjson.JSON;
@@ -17,6 +18,7 @@ import com.jeeplus.centrecareful.approvalInfo.service.dto.*;
 import com.jeeplus.core.query.QueryWrapperGenerator;
 //import com.jeeplus.finance.contractRegistration.service.ContractInfoService;
 //import com.jeeplus.finance.reimbursementApproval.approvalInfo.service.dto.QueryListDto;
+import com.jeeplus.flowable.feign.IFinanceApi;
 import com.jeeplus.flowable.feign.IFlowableApi;
 import com.jeeplus.sys.domain.Office;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
@@ -31,6 +33,7 @@ import javax.annotation.Resource;
 import com.baomidou.mybatisplus.*;
 
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * @author: 王强
@@ -221,6 +224,26 @@ public class ZsReimbursementInfoService {
         }*/
         IPage<ZsRetureListDto> list = infoMapper.findList(page, queryWrapper);
         list.getRecords().stream().forEach(item ->{
+            if (StringUtils.isNotBlank(item.getSourceType()) && "1".equals(item.getSourceType())) { //项目报销
+                if (StringUtils.isNotBlank(item.getProjectId())) {
+                    String proName = SpringUtil.getBean(IFinanceApi.class).getCwProjectNameByIds(item.getProjectId());
+                    item.setProjectName(proName);
+                }
+                if (StringUtils.isBlank(item.getDeptName())){
+                    String name = infoMapper.findUserById(item.getProjectUser());
+                    item.setName(name);
+                    String office = infoMapper.findOfficeById(item.getProjectOffice());
+                    item.setDeptName(office);
+                }
+            }
+            if (StringUtils.isNotBlank(item.getSourceType()) && "3".equals(item.getSourceType())){//报告报销
+                if (org.apache.commons.lang3.StringUtils.isBlank(item.getDeptName())){
+                    String name = infoMapper.findUserById(item.getReportUser());
+                    item.setName(name);
+                    String office = infoMapper.findOfficeById(item.getReportOffice());
+                    item.setDeptName(office);
+                }
+            }
             //文件补充
             ZsReimbursementFileSupplement reimbursementFileSupplement = zsReimbursementFileSupplementMapper.getByReimId(item.getId());
             if (ObjectUtils.isNotEmpty(reimbursementFileSupplement)){
@@ -304,7 +327,7 @@ public class ZsReimbursementInfoService {
             for (ZsReimbursementDetailInfoReport detailInfo : dto.getDetailInfoReports()) {
                 // 保存基础表信息主键值
                 detailInfo.setInfoId(id);
-                zsReimbursementDetailInfoReportMapper.insert(detailInfo);
+                zsReimbursementDetailInfoReportMapper.insertCwDetail(detailInfo);
             }
         }
         // 保存其他报销详情列表信息
@@ -434,7 +457,7 @@ public class ZsReimbursementInfoService {
         // 删除报告列表
         LambdaQueryWrapper<ZsReimbursementDetailInfoReport> detailWrapperReport = new LambdaQueryWrapper<>();
         detailWrapperReport.eq(ZsReimbursementDetailInfoReport::getInfoId, dto.getId());
-        zsReimbursementDetailInfoReportMapper.delete(detailWrapperReport);
+        zsReimbursementDetailInfoReportMapper.deleteCwDetail(dto.getId());
         // 删除其他报销表
         LambdaQueryWrapper<ZsReimbursementDetailInfoOther> detailWrapperOthers = new LambdaQueryWrapper<>();
         detailWrapperOthers.eq(ZsReimbursementDetailInfoOther::getInfoId, dto.getId());
@@ -468,7 +491,7 @@ public class ZsReimbursementInfoService {
                 // 保存基础表信息主键值
                 detailInfo.setInfoId(dto.getId());
                 detailInfo.setId("");
-                zsReimbursementDetailInfoReportMapper.insert(detailInfo);
+                zsReimbursementDetailInfoReportMapper.insertCwDetail(detailInfo);
             }
         }
         // 保存其他报销详情列表信息
@@ -626,11 +649,40 @@ public class ZsReimbursementInfoService {
 //        detailInfoLambdaQueryWrapper.orderByAsc(ZsReimbursementDetailInfo::getNumber);
 //        List<ZsReimbursementDetailInfo> detailInfos = detailInfoMapper.selectList(detailInfoLambdaQueryWrapper);
             // 项目报销详情
-            dto.setDetailInfos(infoMapper.getDetailList(id));
+            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));
             // 报告报销详情
-            dto.setDetailInfoReports(infoMapper.getReportDetailList(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));
             // 采购报销

+ 12 - 0
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalInfo/service/dto/ZsRetureListDto.java

@@ -119,6 +119,18 @@ public class ZsRetureListDto {
 
     private String purchaseId;
 
+
+    /**
+     * 项目报销人id,报销部门id
+     */
+    private String projectUser;
+    private String projectOffice;
+    /**
+     * 报告报销人id,报销部门id
+     */
+    private String reportUser;
+    private String reportOffice;
+
     /**
      * 数据审核人
      */

+ 4 - 4
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/domain/ZsReimbursementTypeInfo.java

@@ -28,26 +28,26 @@ public class ZsReimbursementTypeInfo extends TreeEntity<ZsReimbursementTypeInfo>
      * 创建日期
      */
     @TableField(fill = FieldFill.INSERT)
-    private Date createDate;
+    private Date createTime;
 
     /**
      * 创建人
      */
     @Query
     @TableField(fill = FieldFill.INSERT)
-    private String createBy;
+    private String createById;
 
     /**
      * 更新日期
      */
     @TableField(fill = FieldFill.INSERT_UPDATE)
-    private Date updateDate;
+    private Date updateTime;
 
     /**
      * 更新人
      */
     @TableField(fill = FieldFill.INSERT_UPDATE)
-    private String updateBy;
+    private String updateById;
 
     /**
      * 逻辑删除标记

+ 4 - 4
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/approvalType/service/ZsReimbursementTypeService.java

@@ -105,10 +105,10 @@ public class ZsReimbursementTypeService {
         // 生成id值
         String id = UUID.randomUUID().toString().replace("-", "");
         info.setId(id);
-        info.setCreateBy(userDto.getId());
-        info.setCreateDate(new Date());
-        info.setUpdateBy(userDto.getId());
-        info.setUpdateDate(new Date());
+        info.setCreateById(userDto.getId());
+        info.setCreateTime(new Date());
+        info.setUpdateById(userDto.getId());
+        info.setUpdateTime(new Date());
         info.setDelFlag(0);
         // 生成序号/层级
         getNo(info);

+ 3 - 3
jeeplus-modules/jeeplus-centrecareful/src/main/resources/bootstrap.yml

@@ -86,9 +86,9 @@ config:
     aliyun:
       aliyunUrl: http://oss.gangwaninfo.com
       aliyunDownloadUrl: http://cdn.gangwaninfo.com
-      endpoint: http://oss-cn-hangzhou.aliyuncs.com
-      accessKeyId: LTAI5tQDWoM9c1WyJNPs86rX
-      accessKeySecret: 84dDIx4edT1n78KUOqqSmDZ35pchJv
+      endpoint: http://oss-cn-hangzhou.aliyuncs.
+      accessKeyId: LTAI5tKa6kzGr5EyPWJB4EcD
+      accessKeySecret: arHxB7ZPhizrBYf4844TtyaRctPMgW
       bucketName: xg-pg
     minIO:
       endpoint:

+ 2 - 2
jeeplus-modules/jeeplus-consult/src/main/resources/bootstrap.yml

@@ -87,8 +87,8 @@ config:
       aliyunUrl: http://oss.gangwaninfo.com
       aliyunDownloadUrl: http://cdn.gangwaninfo.com
       endpoint: http://oss-cn-hangzhou.aliyuncs.com
-      accessKeyId: LTAI5tQDWoM9c1WyJNPs86rX
-      accessKeySecret: 84dDIx4edT1n78KUOqqSmDZ35pchJv
+      accessKeyId: LTAI5tKa6kzGr5EyPWJB4EcD
+      accessKeySecret: arHxB7ZPhizrBYf4844TtyaRctPMgW
       bucketName: xg-pg
     minIO:
       endpoint:

+ 16 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/controller/CwFinanceInvoiceController.java

@@ -92,6 +92,22 @@ public class CwFinanceInvoiceController {
     }
 
     /**
+     * 查询发票列表
+     * @param cwFinanceInvoiceDTO
+     * @param page
+     * @return
+     * @throws Exception
+     */
+    @ApiLog("查询发票列表")
+    @PreAuthorize("hasAuthority('cw_finance:invoice:list')")
+    @GetMapping("redList")
+    public ResponseEntity<IPage<CwFinanceInvoiceDTO>> redList(CwFinanceInvoiceDTO cwFinanceInvoiceDTO, Page<CwFinanceInvoiceDTO> page) throws Exception {
+        IPage<CwFinanceInvoiceDTO> result = new Page<CwFinanceInvoiceDTO>();
+        result = cwFinanceInvoiceService.findRedList (page, cwFinanceInvoiceDTO,"");
+        return ResponseEntity.ok (result);
+    }
+
+    /**
      * 查询发票数据
      * @param id
      * @return

+ 9 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/domain/CwFinanceInvoice.java

@@ -202,5 +202,14 @@ public class CwFinanceInvoice extends BaseEntity {
     private String actualDrawerEmailAddress;
 
 
+
+    @Query(tableColumn = "fi.red_invoice_flag",type = QueryType.EQ)
+    private Integer redInvoiceFlag; //是否红字发票
+    @Query(tableColumn = "fi.red_invoice_relevancy_id",type = QueryType.EQ)
+    private String redInvoiceRelevancyId;	//红字发票关联其他发票id
+    @Query(tableColumn = "fi.red_invoice_relevancy_number",type = QueryType.EQ)
+    private String redInvoiceRelevancyNumber;	//红字发票关联其他发票编号
+
+
     private static final long serialVersionUID = 1L;
 }

+ 7 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/CwFinanceInvoiceMapper.java

@@ -59,6 +59,13 @@ public interface CwFinanceInvoiceMapper extends BaseMapper<CwFinanceInvoice> {
     Integer getCountByNo(@Param("no") String no);
 
     List<CwFinanceInvoiceDTO> getExceedCwFinance();
+
+    /**
+     * 根据id查询发票号
+     * @param invoiceId
+     * @return
+     */
+    String getInvoiceNumberStr(String invoiceId);
 }
 
 

+ 17 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/xml/CwFinanceInvoiceMapper.xml

@@ -46,6 +46,10 @@
             <result property="taskId" column="task_id" jdbcType="VARCHAR"/>
             <result property="isMultiple" column="is_multiple" jdbcType="VARCHAR"/>
             <result property="billingId" column="billing_id" jdbcType="VARCHAR"/>
+            <result property="redInvoiceFlag" column="red_invoice_flag" jdbcType="VARCHAR"/>
+            <result property="redInvoiceRelevancyId" column="red_invoice_relevancy_id" jdbcType="VARCHAR"/>
+            <result property="redInvoiceRelevancyNumber" column="red_invoice_relevancy_number" jdbcType="VARCHAR"/>
+
             <association property="financeInvoiceInvalidDTO" column="id" select="getFii" javaType="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceInvalidDTO"></association>
             <collection property="financeInvoiceReceivablesDTOList" column="id" select="getFirList" ofType="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceReceivablesDTO"></collection>
             <collection property="financeInvoiceBaseDTOList" column="id" select="getBaseList" ofType="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceBaseDTO"></collection>
@@ -195,7 +199,10 @@
         fi.is_multiple,
         fi.billing_id,
         fi.report_type,
-        fi.actual_drawer_email_address
+        fi.actual_drawer_email_address,
+        fi.red_invoice_flag,
+        fi.red_invoice_relevancy_id,
+        fi.red_invoice_relevancy_number
     </sql>
 
     <sql id="File_Column_List">
@@ -562,6 +569,9 @@
         <if test="null != actualDrawerEmailAddress and actualDrawerEmailAddress != ''">
             actual_drawer_email_address = #{actualDrawerEmailAddress},
         </if>
+        red_invoice_flag = #{redInvoiceFlag},
+        red_invoice_relevancy_id = #{redInvoiceRelevancyId},
+        red_invoice_relevancy_number = #{redInvoiceRelevancyNumber},
 
         remarks = #{remarks}
         where id = #{id}
@@ -621,4 +631,10 @@
         fi.billing_date DESC
     </select>
 
+
+
+    <select id="getInvoiceNumberStr" resultType="java.lang.String">
+		select group_concat(number) from cw_finance_invoice_detail where invoice_id = #{invoiceId}
+	</select>
+
 </mapper>

+ 205 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/service/CwFinanceInvoiceService.java

@@ -351,9 +351,214 @@ public class CwFinanceInvoiceService extends ServiceImpl<CwFinanceInvoiceMapper,
         return list;
     }
 
+
+    public IPage<CwFinanceInvoiceDTO> findRedList(Page<CwFinanceInvoiceDTO> page, CwFinanceInvoiceDTO cwFinanceInvoiceDTO,String export) throws Exception{
+        QueryWrapper<CwFinanceInvoice> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( CwFinanceInvoiceWrapper.INSTANCE.toEntity(cwFinanceInvoiceDTO), CwFinanceInvoice.class );
+        queryWrapper.eq("fi.del_flag","0");
+        queryWrapper.eq("a.del_flag","0");
+        //判定开票金额大于等于0 的发票信息
+        queryWrapper.ge("fi.account","0");
+        ArrayList<String> searchIdList = new ArrayList<>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        AtomicInteger checkNum = new AtomicInteger();
+        if (ObjectUtil.isNotEmpty(cwFinanceInvoiceDTO)) {
+            // 发票号查询
+            if (StringUtils.isNotBlank(cwFinanceInvoiceDTO.getNumber())) {
+                List<CwFinanceInvoiceDetail> cwFinanceInvoiceDetails = cwFinanceInvoiceDetailMapper.selectList(new LambdaQueryWrapper<CwFinanceInvoiceDetail>().like(CwFinanceInvoiceDetail::getNumber, cwFinanceInvoiceDTO.getNumber()));
+                List<String> ids = cwFinanceInvoiceDetails.stream().distinct().map(CwFinanceInvoiceDetail::getInvoiceId).collect(Collectors.toList());
+                if(CollectionUtil.isEmpty(ids)) {
+                    return new Page<CwFinanceInvoiceDTO>();
+                }else{
+                    if (CollectionUtil.isNotEmpty(searchIdList)){
+                        List<String> newSearchIdList = getSearchList(searchIdList,ids);
+                        searchIdList = new ArrayList<String>();
+                        for (String item : newSearchIdList) {
+                            searchIdList.add(item);
+                        }
+                    }else{
+                        if (checkNum.get() > 0){
+                            return new Page<CwFinanceInvoiceDTO>();
+                        }else{
+                            for (String item : ids) {
+                                searchIdList.add(item);
+                            }
+                        }
+                    }
+                    checkNum.getAndIncrement();
+                }
+            }
+            // 开票总金额
+            if (StringUtils.isNotBlank(cwFinanceInvoiceDTO.getAccountBegin())&&StringUtils.isNotBlank(cwFinanceInvoiceDTO.getAccountEnd())) {
+                List<CwFinanceInvoice> cwFinanceInvoices = cwFinanceInvoiceMapper.selectList(new LambdaQueryWrapper<CwFinanceInvoice>()
+                        .between(CwFinanceInvoice::getAccount, new BigDecimal(cwFinanceInvoiceDTO.getAccountBegin()), new BigDecimal(cwFinanceInvoiceDTO.getAccountEnd())));
+                List<String> ids = cwFinanceInvoices.stream().distinct().map(CwFinanceInvoice::getId).collect(Collectors.toList());
+                if(CollectionUtil.isEmpty(ids)) {
+                    return new Page<CwFinanceInvoiceDTO>();
+                }else{
+                    if (CollectionUtil.isNotEmpty(searchIdList)){
+                        List<String> newSearchIdList = getSearchList(searchIdList,ids);
+                        searchIdList = new ArrayList<String>();
+                        for (String item : newSearchIdList) {
+                            searchIdList.add(item);
+                        }
+                    }else{
+                        if (checkNum.get() > 0){
+                            return new Page<CwFinanceInvoiceDTO>();
+                        }else{
+                            for (String item : ids) {
+                                searchIdList.add(item);
+                            }
+                        }
+                    }
+                    checkNum.getAndIncrement();
+                }
+            }
+            // 开票日期
+            if (StringUtils.isNotBlank(cwFinanceInvoiceDTO.getBillingDateBegin())&&StringUtils.isNotBlank(cwFinanceInvoiceDTO.getBillingDateEnd())) {
+                List<CwFinanceInvoice> cwFinanceInvoices = cwFinanceInvoiceMapper.selectList(new LambdaQueryWrapper<CwFinanceInvoice>()
+                        .between(CwFinanceInvoice::getBillingDate, sdf.parse(cwFinanceInvoiceDTO.getBillingDateBegin()), sdf.parse(cwFinanceInvoiceDTO.getBillingDateEnd())));
+                List<String> ids = cwFinanceInvoices.stream().distinct().map(CwFinanceInvoice::getId).collect(Collectors.toList());
+                if(CollectionUtil.isEmpty(ids)) {
+                    return new Page<CwFinanceInvoiceDTO>();
+                }else{
+                    if (CollectionUtil.isNotEmpty(searchIdList)){
+                        List<String> newSearchIdList = getSearchList(searchIdList,ids);
+                        searchIdList = new ArrayList<String>();
+                        for (String item : newSearchIdList) {
+                            searchIdList.add(item);
+                        }
+                    }else{
+                        if (checkNum.get() > 0){
+                            return new Page<CwFinanceInvoiceDTO>();
+                        }else{
+                            for (String item : ids) {
+                                searchIdList.add(item);
+                            }
+                        }
+                    }
+                    checkNum.getAndIncrement();
+                }
+            }
+            // 收款日期
+            if (StringUtils.isNotBlank(cwFinanceInvoiceDTO.getRemittanceDateBegin())&&StringUtils.isNotBlank(cwFinanceInvoiceDTO.getRemittanceDateEnd())) {
+                List<CwFinanceInvoice> cwFinanceInvoices = cwFinanceInvoiceMapper.selectList(new LambdaQueryWrapper<CwFinanceInvoice>()
+                        .between(CwFinanceInvoice::getReceivablesDate, sdf.parse(cwFinanceInvoiceDTO.getRemittanceDateBegin()), sdf.parse(cwFinanceInvoiceDTO.getRemittanceDateEnd())));
+                List<String> ids = cwFinanceInvoices.stream().distinct().map(CwFinanceInvoice::getId).collect(Collectors.toList());
+                if(CollectionUtil.isEmpty(ids)) {
+                    return new Page<CwFinanceInvoiceDTO>();
+                }else{
+                    if (CollectionUtil.isNotEmpty(searchIdList)){
+                        List<String> newSearchIdList = getSearchList(searchIdList,ids);
+                        searchIdList = new ArrayList<String>();
+                        for (String item : newSearchIdList) {
+                            searchIdList.add(item);
+                        }
+                    }else{
+                        if (checkNum.get() > 0){
+                            return new Page<CwFinanceInvoiceDTO>();
+                        }else{
+                            for (String item : ids) {
+                                searchIdList.add(item);
+                            }
+                        }
+                    }
+                    checkNum.getAndIncrement();
+                }
+            }
+            // 项目名称
+            if (StringUtils.isNotBlank(cwFinanceInvoiceDTO.getProgramId())){
+                List<CwFinanceInvoiceBase> cwFinanceInvoiceBaseList = cwFinanceInvoiceBaseMapper.selectList(new LambdaQueryWrapper<CwFinanceInvoiceBase>()
+                        .eq(CwFinanceInvoiceBase::getProgramId, cwFinanceInvoiceDTO.getProgramId()));
+                List<String> ids = cwFinanceInvoiceBaseList.stream().distinct().map(CwFinanceInvoiceBase::getInvoiceId).collect(Collectors.toList());
+                if(CollectionUtil.isEmpty(ids)) {
+                    return new Page<CwFinanceInvoiceDTO>();
+                }else{
+                    if (CollectionUtil.isNotEmpty(searchIdList)){
+                        List<String> newSearchIdList = getSearchList(searchIdList,ids);
+                        searchIdList = new ArrayList<String>();
+                        for (String item : newSearchIdList) {
+                            searchIdList.add(item);
+                        }
+                    }else{
+                        if (checkNum.get() > 0){
+                            return new Page<CwFinanceInvoiceDTO>();
+                        }else{
+                            for (String item : ids) {
+                                searchIdList.add(item);
+                            }
+                        }
+                    }
+                    checkNum.getAndIncrement();
+
+                }
+            }
+            // 经办人
+            if (StringUtils.isNotBlank(cwFinanceInvoiceDTO.getOperator())){
+                queryWrapper.like("su.id", cwFinanceInvoiceDTO.getOperator()).or().like("su.name", cwFinanceInvoiceDTO.getOperator());
+            }
+            //报备类型
+            if (StringUtils.isNotBlank(cwFinanceInvoiceDTO.getReportType())){
+                queryWrapper.eq("fi.report_type",cwFinanceInvoiceDTO.getReportType()).or(i->i.eq("pr.report_type",cwFinanceInvoiceDTO.getReportType()));
+            }
+            if (StringUtils.isNotBlank(cwFinanceInvoiceDTO.getReconciliationPeopleName())) {
+                queryWrapper.eq("fi.reconciliation_people",cwFinanceInvoiceDTO.getReconciliationPeopleName()).or().like("su1.name",cwFinanceInvoiceDTO.getReconciliationPeopleName());
+            }
+            // 经办人部门
+            if (StringUtils.isNotBlank(cwFinanceInvoiceDTO.getOperatorOffice())){
+                List<User> userList = SpringUtil.getBean ( IUserApi.class ).getUserByOfficeAll(cwFinanceInvoiceDTO.getOperatorOffice());
+                if (CollectionUtil.isNotEmpty(userList)) {
+                    List<String> userIdList = userList.stream().distinct().map(User::getId).collect(Collectors.toList());
+                    if (CollectionUtil.isNotEmpty(userIdList)) {
+                        queryWrapper.in("fi.create_by_id",userIdList);
+                    } else {
+                        return new Page<CwFinanceInvoiceDTO>();
+                    }
+                } else {
+                    return new Page<CwFinanceInvoiceDTO>();
+                }
+            }
+        }
+        if (CollectionUtil.isNotEmpty(searchIdList)){
+            List<String> ids = searchIdList.stream().distinct().collect(Collectors.toList());
+            queryWrapper.in("fi.id",ids);
+        } else{
+            if (checkNum.get() > 0) {
+                return new Page<CwFinanceInvoiceDTO>();
+            }
+        }
+        IPage<CwFinanceInvoiceDTO> list = null;
+        if(StringUtils.isNotBlank(export) && "export".equals(export)){
+            list = cwFinanceInvoiceMapper.findExportList(page, queryWrapper);
+            list.getRecords().forEach(item->{
+                //预开票且报告与发票关联完成的则已完成关联
+                if(StringUtils.isNotBlank(item.getIsPreInvoice()) && StringUtils.isNotBlank(item.getReportNos()) && StringUtils.isNotBlank(item.getNo())){
+                    if ("1".equals(item.getIsPreInvoice())){
+                        item.setIsCompleteInvoice("2");
+                    }
+                }else if (StringUtils.isNotBlank(item.getIsPreInvoice()) && StringUtils.isBlank(item.getReportNos()) && StringUtils.isNotBlank(item.getNo())){
+                    if ("1".equals(item.getIsPreInvoice())){
+                        item.setIsCompleteInvoice("0");
+                    }
+                }
+            });
+        }else{
+            list = cwFinanceInvoiceMapper.findList(page, queryWrapper);
+        }
+
+        return list;
+    }
+
+
+
     public CwFinanceInvoiceDTO queryById(String id) {
 
         CwFinanceInvoiceDTO cwFinanceInvoiceDTO = cwFinanceInvoiceMapper.queryById(id);
+        if(1 == cwFinanceInvoiceDTO.getRedInvoiceFlag()){
+            //此处为红冲数据 需要获取发票号
+            CwFinanceInvoiceDTO redCwFinanceInvoiceDTO = cwFinanceInvoiceMapper.queryById(cwFinanceInvoiceDTO.getRedInvoiceRelevancyId());
+            String invoiceNumberStr = cwFinanceInvoiceMapper.getInvoiceNumberStr(redCwFinanceInvoiceDTO.getId());
+            cwFinanceInvoiceDTO.setInvoiceNumberStr(invoiceNumberStr);
+        }
         //获取项目是否预开票
         if (ObjectUtil.isNotEmpty(cwFinanceInvoiceDTO)){
             for (CwFinanceInvoiceBaseDTO cwFinanceInvoiceBaseDTO : cwFinanceInvoiceDTO.getFinanceInvoiceBaseDTOList()) {

+ 5 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/service/dto/CwFinanceInvoiceDTO.java

@@ -372,6 +372,11 @@ public class CwFinanceInvoiceDTO extends BaseDTO {
     @Excel(name = "预开票已关联",width = 14)
     private String isCompleteInvoice;
 
+    private Integer redInvoiceFlag; //是否红字发票
+    private String redInvoiceRelevancyId;	//红字发票关联其他发票id
+    private String redInvoiceRelevancyNumber;	//红字发票关联其他发票编号
+    private String invoiceNumberStr;	//红字发票关联其他发票号
+    private List<String> redNotStatusList;
 
 
     private static final long serialVersionUID = 1L;

+ 16 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/CwProjectRecordsService.java

@@ -157,6 +157,22 @@ public class CwProjectRecordsService extends ServiceImpl<CwProjectRecordsMapper,
         }
         List<UserDTO> finalAllUserInfo = allUserInfo;
         list.getRecords().forEach(li->{
+            if (null != li.getCreateBy() && StringUtils.isBlank(li.getCreateBy().getName())){
+                //根据项目经理1的id去查项目经理去名称
+                if (StringUtils.isNotBlank(li.getProjectMasterId())){
+                    UserDTO matchingUser = null;
+                    for (UserDTO user : finalAllUserInfo) {
+                        if (li.getCreateBy().getId().equals(user.getId())) {
+                            matchingUser = user;
+                            break;
+                        }
+                    }
+                    if (matchingUser != null) {
+                        String createUserName = matchingUser.getName(); // Assuming the property name is "userName"
+                        li.getCreateBy().setName(createUserName);
+                    }
+                }
+            }
             if (StringUtils.isBlank(li.getProjectMasterName())){
                 //根据项目经理1的id去查项目经理去名称
                 if (StringUtils.isNotBlank(li.getProjectMasterId())){

+ 1 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/mapper/xml/CwProjectReportArchiveMapper.xml

@@ -31,6 +31,7 @@
             <result property="projectName" column="project_name" jdbcType="VARCHAR"/>
             <result property="createName" column="user_name" jdbcType="VARCHAR"/>
             <result property="createDateT" column="create_time" jdbcType="VARCHAR"/>
+            <result property="createDate" column="create_time" jdbcType="TIMESTAMP"/>
             <result property="reportId" column="report_id" jdbcType="VARCHAR"/>
             <result property="reportNo" column="report_no" jdbcType="VARCHAR"/>
             <result property="reportRemarks" column="report_remarks" jdbcType="VARCHAR"/>

+ 2 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/service/dto/CwProjectReportArchiveDTO.java

@@ -180,6 +180,8 @@ public class CwProjectReportArchiveDTO extends BaseDTO {
     @Excel(name = "创建时间",exportFormat = "yyyy-MM-dd HH:mm:ss",width = 25,orderNum = "15")
     private String createDateT;
 
+    private Date createDate;
+
     /**
      * 报告id
      */

+ 12 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/controller/CwReimbursementInfoController.java

@@ -11,6 +11,7 @@ import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
 import com.jeeplus.finance.invoice.util.EasyPoiUtil;
 import com.jeeplus.finance.projectRecords.domain.CwProjectRecords;
+import com.jeeplus.finance.projectRecords.service.dto.CwProjectRecordsDTO;
 import com.jeeplus.finance.reimbursementApproval.approvalInfo.domain.CwReimbursementFileSupplement;
 import com.jeeplus.finance.reimbursementApproval.approvalInfo.domain.CwReimbursementInfo;
 import com.jeeplus.finance.reimbursementApproval.approvalInfo.domain.CwReimbursementInfoUpHi;
@@ -511,6 +512,17 @@ public class CwReimbursementInfoController {
 
 
 
+    /**
+     * 根据项目ids查询项目名称
+     * @return
+     */
+    @ApiLog("根据项目ids查询项目名称")
+    @GetMapping("getCwProjectNameByIds")
+    public String getCwProjectNameByIds(String ids) {
+        String projectName = service.selectProjectByIds (ids);
+        return JSON.toJSONString(projectName);
+    }
+
 
 
 

+ 2 - 2
jeeplus-modules/jeeplus-finance/src/main/resources/bootstrap.yml

@@ -88,8 +88,8 @@ config:
       aliyunUrl: http://oss.gangwaninfo.com
       aliyunDownloadUrl: http://cdn.gangwaninfo.com
       endpoint: http://oss-cn-hangzhou.aliyuncs.com
-      accessKeyId: LTAI5tQDWoM9c1WyJNPs86rX
-      accessKeySecret: 84dDIx4edT1n78KUOqqSmDZ35pchJv
+      accessKeyId: LTAI5tKa6kzGr5EyPWJB4EcD
+      accessKeySecret: arHxB7ZPhizrBYf4844TtyaRctPMgW
       bucketName: xg-pg
     minIO:
       endpoint:

+ 1 - 1
jeeplus-modules/jeeplus-flowable/src/main/resources/bootstrap.yml

@@ -62,7 +62,7 @@ management:
         include: "*"
 
 #其他系统的地址
-CCPM_PATH:  http://localhost:8888
+CCPM_PATH:  http://localhost:8090
 #待办中展示其他系统的流程
 #ccpm =》 39 项目登记,13,102 报销,  108 电子发票报销,  109 普通报销,  21 213 发票
 CCPM_TASK: 13,102,39,108,109,21,213

+ 2 - 2
jeeplus-modules/jeeplus-human/src/main/resources/bootstrap.yml

@@ -88,8 +88,8 @@ config:
       aliyunUrl: http://oss.gangwaninfo.com
       aliyunDownloadUrl: http://cdn.gangwaninfo.com
       endpoint: http://oss-cn-hangzhou.aliyuncs.com
-      accessKeyId: LTAI5tQDWoM9c1WyJNPs86rX
-      accessKeySecret: 84dDIx4edT1n78KUOqqSmDZ35pchJv
+      accessKeyId: LTAI5tKa6kzGr5EyPWJB4EcD
+      accessKeySecret: arHxB7ZPhizrBYf4844TtyaRctPMgW
       bucketName: xg-pg
     minIO:
       endpoint:

+ 6 - 0
jeeplus-modules/jeeplus-public-modules/pom.xml

@@ -149,6 +149,12 @@
             <groupId>org.springframework</groupId>
             <artifactId>spring-test</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+            <version>20210307</version> <!-- 使用最新稳定版本 -->
+        </dependency>
+
     </dependencies>
 
     <build>

+ 2 - 2
jeeplus-modules/jeeplus-public-modules/src/main/resources/bootstrap.yml

@@ -87,8 +87,8 @@ config:
       aliyunUrl: http://oss.gangwaninfo.com
       aliyunDownloadUrl: http://cdn.gangwaninfo.com
       endpoint: http://oss-cn-hangzhou.aliyuncs.com
-      accessKeyId: LTAI5tQDWoM9c1WyJNPs86rX
-      accessKeySecret: 84dDIx4edT1n78KUOqqSmDZ35pchJv
+      accessKeyId: LTAI5tKa6kzGr5EyPWJB4EcD
+      accessKeySecret: arHxB7ZPhizrBYf4844TtyaRctPMgW
       bucketName: xg-pg
     minIO:
       endpoint: