소스 검색

项目-数电发票报销调整

sangwenwei 6 달 전
부모
커밋
3ca70a7492
12개의 변경된 파일204개의 추가작업 그리고 138개의 파일을 삭제
  1. 25 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/CcpmApiFallbackFactory.java
  2. 21 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/ICcpmApi.java
  3. 4 0
      jeeplus-common/jeeplus-common-core/src/main/java/com/jeeplus/common/constant/AppNameConstants.java
  4. 8 0
      jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/controller/CcpmReimbursementInfoController.java
  5. 0 83
      jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/controller/updateOldData.java
  6. 1 1
      jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/mapper/CcpmReimbursementInfoMapper.java
  7. 1 1
      jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/mapper/xml/CcpmReimbursementInfoMapper.xml
  8. 108 45
      jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/service/CcpmReimbursementInfoService.java
  9. 5 0
      jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/service/dto/CcpmReimAmountAndFileDto.java
  10. 7 4
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/oss/service/OssService.java
  11. 13 0
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/feign/CcpmFeignApi.java
  12. 11 4
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/service/jobhandler/SampleXxlJob.java

+ 25 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/CcpmApiFallbackFactory.java

@@ -0,0 +1,25 @@
+package com.jeeplus.flowable.factory;
+
+import com.jeeplus.flowable.feign.IAssessApi;
+import com.jeeplus.flowable.feign.ICcpmApi;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.cloud.openfeign.FallbackFactory;
+import org.springframework.stereotype.Component;
+
+/**
+ * 项目降级处理
+ */
+@Slf4j
+@Component
+public class CcpmApiFallbackFactory implements FallbackFactory<ICcpmApi> {
+    @Override
+    public ICcpmApi create(Throwable cause) {
+        log.error ( "财务服务调用失败:{}", cause.getMessage ( ) );
+        return new ICcpmApi() {
+            @Override
+            public void updateOldData() {
+
+            }
+        };
+    }
+}

+ 21 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/ICcpmApi.java

@@ -0,0 +1,21 @@
+package com.jeeplus.flowable.feign;
+
+import com.jeeplus.common.constant.AppNameConstants;
+import com.jeeplus.flowable.factory.AssessApiFallbackFactory;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * @author: 王强
+ * @create: 2023-07-26 17:01
+ **/
+@FeignClient(contextId = "ccpmApi", name = AppNameConstants.APP_CCPM_MODULES, fallbackFactory = AssessApiFallbackFactory.class)
+public interface ICcpmApi {
+
+    /**
+     * 修改数电发票报销数据
+     */
+    @GetMapping(value = "/ccpmReimbursement/info/updateOldData")
+    void updateOldData();
+}

+ 4 - 0
jeeplus-common/jeeplus-common-core/src/main/java/com/jeeplus/common/constant/AppNameConstants.java

@@ -33,4 +33,8 @@ public interface AppNameConstants {
      * 人力资源
      */
     String APP_HUMAN_MODULES = "jeeplus-human";
+    /**
+     * 项目模块
+     */
+    String APP_CCPM_MODULES = "jeeplus-ccpm";
 }

+ 8 - 0
jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/controller/CcpmReimbursementInfoController.java

@@ -424,5 +424,13 @@ public class CcpmReimbursementInfoController {
         service.updateFileStatusById(dto);
     }
 
+    /**
+     * 修改数电发票报销数据(对老数据进行调整)
+     */
+    @ApiOperation(value = "修改数电发票报销数据(对老数据进行调整)")
+    @GetMapping(value = "updateOldData")
+    public void updateOldData(){
+        service.updateOldData();
+    }
 
 }

+ 0 - 83
jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/controller/updateOldData.java

@@ -1,83 +0,0 @@
-package com.jeeplus.ccpm.approvalInfo.controller;
-
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.extra.spring.SpringUtil;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.jeeplus.ccpm.approvalInfo.domain.CcpmReimbursementAmountInfo;
-import com.jeeplus.ccpm.approvalInfo.mapper.CcpmReimbursementAmountInfoMapper;
-import com.jeeplus.ccpm.approvalInfo.mapper.CcpmReimbursementInfoMapper;
-import com.jeeplus.ccpm.approvalInfo.service.dto.CcpmReimAmountAndFileDto;
-import com.jeeplus.sys.domain.WorkAttachmentInfo;
-import com.jeeplus.sys.feign.IUserApi;
-import com.jeeplus.sys.feign.IWorkAttachmentApi;
-import com.jeeplus.utils.StringUtils;
-import org.springframework.beans.BeanUtils;
-import org.springframework.stereotype.Component;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Component
-public class updateOldData {
-    @Resource
-    private CcpmReimbursementInfoMapper infoMapper;
-    @Resource
-    private CcpmReimbursementAmountInfoMapper amountInfoMapper;
-
-
-    @PostConstruct
-    public void init() {
-        executeFileProcessing();
-    }
-    @Transactional
-    public void executeFileProcessing() {
-        //查询所有的数电发票信息
-        LambdaQueryWrapper<CcpmReimbursementAmountInfo> invoiceReimbursementsLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        invoiceReimbursementsLambdaQueryWrapper.eq(CcpmReimbursementAmountInfo::getReimbursementType, "1");
-        invoiceReimbursementsLambdaQueryWrapper.eq(CcpmReimbursementAmountInfo::getDelFlag, "0");
-        List<CcpmReimbursementAmountInfo> invoiceReimbursements = amountInfoMapper.selectList(invoiceReimbursementsLambdaQueryWrapper);
-        if (CollectionUtil.isNotEmpty(invoiceReimbursements)){
-            for (CcpmReimbursementAmountInfo invoiceReimbursement : invoiceReimbursements) {
-                // 查询附件信息
-                List<WorkAttachmentInfo> fileList = infoMapper.findReimFiles(invoiceReimbursement.getInfoId());
-                // 用于存储所有的 attachmentId
-                List<String> attachmentIds = new ArrayList<>();
-                if (CollectionUtil.isNotEmpty(fileList)) {
-                    // 首先收集所有的 attachmentId
-                    for (WorkAttachmentInfo workAttachmentInfo : fileList) {
-                        attachmentIds.add(workAttachmentInfo.getAttachmentId());
-                    }
-                    if (CollectionUtil.isNotEmpty(attachmentIds)) {
-                        Map<String, String> map = SpringUtil.getBean(IWorkAttachmentApi.class).disposeElectronicEngineeringInvoiceNumber(attachmentIds, "3");
-                        // 处理结果的逻辑
-                        if (map != null && !map.isEmpty()) {
-                            for (WorkAttachmentInfo workAttachmentInfo : fileList) {
-                                for (Map.Entry<String, String> entry : map.entrySet()) {
-                                    String key = entry.getKey();
-                                    String value = entry.getValue();
-
-                                    if (StringUtils.isNotBlank(value) && key.equals(invoiceReimbursement.getNumber())) {
-                                        // 如果 value 非空且 key 匹配,则执行修改操作
-                                        invoiceReimbursement.setFileUrl(workAttachmentInfo.getUrl());
-                                        invoiceReimbursement.setFileType(workAttachmentInfo.getType());
-                                        invoiceReimbursement.setAttachmentName(workAttachmentInfo.getName());
-                                        invoiceReimbursement.setAttachmentFlag("invoiceReimbursement");
-                                        invoiceReimbursement.setFileSize(workAttachmentInfo.getFileSize());
-                                        amountInfoMapper.updateById(invoiceReimbursement);
-
-                                    }
-
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-}

+ 1 - 1
jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/mapper/CcpmReimbursementInfoMapper.java

@@ -75,5 +75,5 @@ public interface CcpmReimbursementInfoMapper extends BaseMapper<CcpmReimbursemen
 
     void updatePaymentById(@Param("id") String id,@Param("paymentStatus") String paymentStatus);
     @InterceptorIgnore(tenantLine = "true")
-    List<WorkAttachmentInfo> findReimFiles(@Param("infoId") String infoId);
+    List<WorkAttachmentInfo> findReimFiles(@Param("infoId") String infoId,@Param("attachmentFlag") String attachmentFlag);
 }

+ 1 - 1
jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/mapper/xml/CcpmReimbursementInfoMapper.xml

@@ -203,7 +203,7 @@
 			work_attachment
 		WHERE
 			del_flag = 0
-			AND attachment_id = #{infoId} and attachment_flag = 'invoiceReimbursement'
+			AND attachment_id = #{infoId} and attachment_flag = #{attachmentFlag}
 	</select>
 
 	<select id="findOfficeList"

+ 108 - 45
jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/service/CcpmReimbursementInfoService.java

@@ -1,5 +1,6 @@
 package com.jeeplus.ccpm.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;
@@ -789,8 +790,8 @@ public class CcpmReimbursementInfoService {
 //            dto.setInvoiceReimbursements(invoiceReimbursements);
             // 查询附件信息
             List<WorkAttachmentInfo> fileList = infoMapper.findFiles(id);
-            List<WorkAttachmentInfo> files = com.google.common.collect.Lists.newArrayList();
-            List<CcpmReimAmountAndFileDto> invoiceReimbursementFiles = com.google.common.collect.Lists.newArrayList();
+            Set<CcpmReimAmountAndFileDto> invoiceReimbursementFiles = new HashSet<>(); // 使用 Set 去重
+            List<WorkAttachmentInfo> files = new ArrayList<>();
 
             if (CollectionUtils.isNotEmpty(fileList)) {
                 // 提前为 invoiceReimbursements 构建 URL 到 invoiceReimbursement 的映射,减少嵌套循环
@@ -800,6 +801,11 @@ public class CcpmReimbursementInfoService {
                         reimbursementMap.put(invoiceReimbursement.getFileUrl(), invoiceReimbursement);
                     }
                 }
+                //查询数电发票解析后的数据
+                ArrayList<String> strings = new ArrayList<>();
+                strings.add(id);
+                Map<String, String> map = SpringUtil.getBean(IWorkAttachmentApi.class).disposeElectronicEngineeringInvoiceNumber(strings, "3");
+
 
                 // 遍历 fileList 进行处理
                 for (WorkAttachmentInfo i : fileList) {
@@ -809,9 +815,25 @@ public class CcpmReimbursementInfoService {
                         if (invoiceReimbursement != null) {
                             // 处理有 URL 匹配的文件
                             processMatchingFiles(i, invoiceReimbursement, invoiceReimbursementFiles);
-                        } else {
-                            // 处理没有 URL 匹配的文件,针对老数据进行处理
-                            handleOldData(i, invoiceReimbursements, invoiceReimbursementFiles,id);
+                        }else {
+                            if (map !=null){
+                                for (Map.Entry<String, String> entry : map.entrySet()) {
+                                    for (CcpmReimbursementAmountInfo reimbursement : invoiceReimbursements) {
+                                        String key = entry.getKey();
+                                        String value = entry.getValue();
+                                        if (reimbursement.getNumber().equals(key) && i.getUrl().equals(value)){
+                                            CcpmReimAmountAndFileDto ccpmReimAmountAndFileDto = new CcpmReimAmountAndFileDto();
+                                            BeanUtils.copyProperties(i, ccpmReimAmountAndFileDto);
+                                            BeanUtils.copyProperties(reimbursement, ccpmReimAmountAndFileDto);
+                                            ccpmReimAmountAndFileDto.setId(i.getId());
+                                            ccpmReimAmountAndFileDto.setCreateBy(SpringUtil.getBean(IUserApi.class).getById(i.getBy()));
+                                            invoiceReimbursementFiles.add(ccpmReimAmountAndFileDto);
+                                        }
+                                    }
+
+                                }
+
+                            }
                         }
                     } else {
                         // 处理其他文件
@@ -820,19 +842,16 @@ public class CcpmReimbursementInfoService {
                 }
             }
             dto.setFiles(files);
-            //进行一次去重
-            List<CcpmReimAmountAndFileDto> uniqueFilesList = invoiceReimbursementFiles.stream()
-                    .collect(Collectors.collectingAndThen(
-                            Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(CcpmReimAmountAndFileDto::getNumber))),
-                            ArrayList::new
-                    ));
+            // 将 Set 转换回 List
+            List<CcpmReimAmountAndFileDto> uniqueFilesList = new ArrayList<>(invoiceReimbursementFiles);
             dto.setInvoiceReimbursementFiles(uniqueFilesList);
         }
         return dto;
     }
 
+
     // 针对 URL 匹配的文件进行处理的提取方法
-    private void processMatchingFiles(WorkAttachmentInfo i, CcpmReimbursementAmountInfo invoiceReimbursement, List<CcpmReimAmountAndFileDto> invoiceReimbursementFiles) {
+    private void processMatchingFiles(WorkAttachmentInfo i, CcpmReimbursementAmountInfo invoiceReimbursement, Set<CcpmReimAmountAndFileDto> invoiceReimbursementFiles) {
         CcpmReimAmountAndFileDto ccpmReimAmountAndFileDto = new CcpmReimAmountAndFileDto();
         BeanUtils.copyProperties(i, ccpmReimAmountAndFileDto);
         BeanUtils.copyProperties(invoiceReimbursement, ccpmReimAmountAndFileDto);
@@ -842,30 +861,26 @@ public class CcpmReimbursementInfoService {
     }
 
     // 针对老数据的处理方法
-    private void handleOldData(WorkAttachmentInfo i, List<CcpmReimbursementAmountInfo> invoiceReimbursements, List<CcpmReimAmountAndFileDto> invoiceReimbursementFiles,String id) {
-        ArrayList<String> strings = new ArrayList<>();
-        strings.add(id);
-        Map<String, String> map = SpringUtil.getBean(IWorkAttachmentApi.class).disposeElectronicEngineeringInvoiceNumber(strings, "3");
-
-        if (map != null) {
-            for (Map.Entry<String, String> entry : map.entrySet()) {
-                String key = entry.getKey();
-                String value = entry.getValue();
-                for (CcpmReimbursementAmountInfo invoiceReimbursement : invoiceReimbursements) {
-                    if (StringUtils.isNotBlank(value) && key.equals(invoiceReimbursement.getNumber())) {
-                        // 如果 value 非空且 key 匹配,则执行相关操作
-                        CcpmReimAmountAndFileDto ccpmReimAmountAndFileDto = new CcpmReimAmountAndFileDto();
-                        BeanUtils.copyProperties(i, ccpmReimAmountAndFileDto);
-                        BeanUtils.copyProperties(invoiceReimbursement, ccpmReimAmountAndFileDto);
-                        ccpmReimAmountAndFileDto.setId(i.getId());
-                        ccpmReimAmountAndFileDto.setCreateBy(SpringUtil.getBean(IUserApi.class).getById(i.getBy()));
-                        invoiceReimbursementFiles.add(ccpmReimAmountAndFileDto);
-                    }
-                }
-
-            }
-        }
-    }
+//    private void handleOldData(WorkAttachmentInfo i, List<CcpmReimbursementAmountInfo> invoiceReimbursements, Set<CcpmReimAmountAndFileDto> invoiceReimbursementFiles,Map<String, String> map) {
+//        if (map != null) {
+//            for (Map.Entry<String, String> entry : map.entrySet()) {
+//                String key = entry.getKey();
+//                String value = entry.getValue();
+//                for (CcpmReimbursementAmountInfo invoiceReimbursement : invoiceReimbursements) {
+//                    if (StringUtils.isNotBlank(value) && key.equals(invoiceReimbursement.getNumber())) {
+//                        // 如果 value 非空且 key 匹配,则执行相关操作
+//                        CcpmReimAmountAndFileDto ccpmReimAmountAndFileDto = new CcpmReimAmountAndFileDto();
+//                        BeanUtils.copyProperties(i, ccpmReimAmountAndFileDto);
+//                        BeanUtils.copyProperties(invoiceReimbursement, ccpmReimAmountAndFileDto);
+//                        ccpmReimAmountAndFileDto.setId(i.getId());
+//                        ccpmReimAmountAndFileDto.setCreateBy(SpringUtil.getBean(IUserApi.class).getById(i.getBy()));
+//                        invoiceReimbursementFiles.add(ccpmReimAmountAndFileDto);
+//                    }
+//                }
+//
+//            }
+//        }
+//    }
 
     // 处理其他文件的方法
     private void processNonInvoiceFiles(WorkAttachmentInfo i, List<WorkAttachmentInfo> files) {
@@ -1172,7 +1187,7 @@ public class CcpmReimbursementInfoService {
             // 查询附件信息
             List<WorkAttachmentInfo> fileList = infoMapper.findFiles(reimId);
             List<WorkAttachmentInfo> files = com.google.common.collect.Lists.newArrayList();
-            List<CcpmReimAmountAndFileDto> invoiceReimbursementFiles = com.google.common.collect.Lists.newArrayList();
+            Set<CcpmReimAmountAndFileDto> invoiceReimbursementFiles = new HashSet<>();
 
             if (CollectionUtils.isNotEmpty(fileList)) {
                 // 提前为 invoiceReimbursements 构建 URL 到 invoiceReimbursement 的映射,减少嵌套循环
@@ -1191,9 +1206,6 @@ public class CcpmReimbursementInfoService {
                         if (invoiceReimbursement != null) {
                             // 处理有 URL 匹配的文件
                             processMatchingFiles(i, invoiceReimbursement, invoiceReimbursementFiles);
-                        } else {
-                            // 处理没有 URL 匹配的文件,针对老数据进行处理
-                            handleOldData(i, invoiceReimbursements, invoiceReimbursementFiles,reimId);
                         }
                     } else {
                         // 处理其他文件
@@ -1203,11 +1215,7 @@ public class CcpmReimbursementInfoService {
             }
             dto.setFiles(files);
             //进行一次去重
-            List<CcpmReimAmountAndFileDto> uniqueFilesList = invoiceReimbursementFiles.stream()
-                    .collect(Collectors.collectingAndThen(
-                            Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(CcpmReimAmountAndFileDto::getNumber))),
-                            ArrayList::new
-                    ));
+            List<CcpmReimAmountAndFileDto> uniqueFilesList = new ArrayList<>(invoiceReimbursementFiles);
             dto.setInvoiceReimbursementFiles(uniqueFilesList);
         }
         return dto;
@@ -1336,4 +1344,59 @@ public class CcpmReimbursementInfoService {
         ccpmReimbursementFileSupplementMapper.updateFileStatusById(dto.getFileSuppleId(),dto.getFileStatus());
     }
 
+    /**
+     * 修改数电发票报销数据(对老数据进行调整)
+     */
+    public void updateOldData() {
+        try {
+            Set<String> infoIds = new HashSet<>(); // 使用 Set 去重
+
+            // 查询所有的数电发票信息
+            LambdaQueryWrapper<CcpmReimbursementAmountInfo> invoiceReimbursementsLambdaQueryWrapper = new LambdaQueryWrapper<>();
+            invoiceReimbursementsLambdaQueryWrapper.eq(CcpmReimbursementAmountInfo::getReimbursementType, "1");
+            invoiceReimbursementsLambdaQueryWrapper.eq(CcpmReimbursementAmountInfo::getDelFlag, "0");
+            invoiceReimbursementsLambdaQueryWrapper.orderByDesc(CcpmReimbursementAmountInfo::getCreateTime);
+            List<CcpmReimbursementAmountInfo> invoiceReimbursements = amountInfoMapper.selectList(invoiceReimbursementsLambdaQueryWrapper);
+
+            if (CollectionUtil.isNotEmpty(invoiceReimbursements)) {
+                // 将所有的报销id进行存储
+                for (CcpmReimbursementAmountInfo invoiceReimbursement : invoiceReimbursements) {
+                    infoIds.add(invoiceReimbursement.getInfoId());
+                }
+                if (infoIds != null && invoiceReimbursements != null){
+                    ArrayList<String> list = new ArrayList<>(infoIds);
+                    for (String id : list) {
+                        //查询数电发票解析后的数据
+                        ArrayList<String> strings = new ArrayList<>();
+                        strings.add(id);
+                        Map<String, String> map = SpringUtil.getBean(IWorkAttachmentApi.class).disposeElectronicEngineeringInvoiceNumber(strings, "3");
+
+                        List<WorkAttachmentInfo> fileList = infoMapper.findReimFiles(id, "invoiceReimbursement");
+                        if (CollectionUtil.isNotEmpty(invoiceReimbursements) && CollectionUtil.isNotEmpty(fileList) && map !=null){
+                            for (CcpmReimbursementAmountInfo amountInfo : invoiceReimbursements) {
+                                for (Map.Entry<String, String> entry : map.entrySet()) {
+                                    for (WorkAttachmentInfo i : fileList) {
+                                        String key = entry.getKey();
+                                        String value = entry.getValue();
+                                        if (amountInfo.getNumber().equals(key) && i.getUrl().equals(value)){
+                                            amountInfo.setFileUrl(i.getUrl());
+                                            amountInfo.setFileType(i.getType());
+                                            amountInfo.setAttachmentFlag("invoiceReimbursement");
+                                            amountInfo.setAttachmentName(i.getName());
+                                            amountInfo.setFileSize(i.getFileSize());
+                                            amountInfoMapper.updateById(amountInfo);
+                                        }
+                                    }
+                                }
+                            }
+
+                        }
+                    }
+                }
+
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
 }

+ 5 - 0
jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/service/dto/CcpmReimAmountAndFileDto.java

@@ -153,4 +153,9 @@ public class CcpmReimAmountAndFileDto extends BaseEntity {
      */
     @TableField(exist = false)
     private String temporaryUrl;
+
+    /*8
+    数电发票id
+     */
+    private String amountId;
 }

+ 7 - 4
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/oss/service/OssService.java

@@ -738,11 +738,14 @@ public class OssService extends ServiceImpl<OssServiceMapper, WorkAttachment> {
             for (WorkAttachmentInfo attachmentInfo : attachmentList) {
                 if(attachmentInfo.getUrl().contains(".xml")){
                     Map<String, Object> stringObjectMap = this.downLoadFileDisposeXmlFile(attachmentInfo.getUrl());
-                    String invoiceNumber = (String) stringObjectMap.get("InvoiceNumber");
-                    String buyerInformationBuyerName = (String) stringObjectMap.get("BuyerInformationBuyerName");
-                    if(StringUtils.isNotBlank(invoiceNumber) && StringUtils.isNotBlank(buyerInformationBuyerName)){
-                        map.put(invoiceNumber,invoiceNumber);
+                    if (stringObjectMap != null){
+                        String invoiceNumber = (String) stringObjectMap.get("InvoiceNumber");
+                        String buyerInformationBuyerName = (String) stringObjectMap.get("BuyerInformationBuyerName");
+                        if(StringUtils.isNotBlank(invoiceNumber) && StringUtils.isNotBlank(buyerInformationBuyerName)){
+                            map.put(invoiceNumber,attachmentInfo.getUrl());
+                        }
                     }
+
                 }
             }
         } catch (Exception e) {

+ 13 - 0
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/feign/CcpmFeignApi.java

@@ -0,0 +1,13 @@
+package com.xxl.job.executor.feign;
+
+import com.jeeplus.common.constant.AppNameConstants;
+import com.jeeplus.flowable.feign.ICcpmApi;
+import org.springframework.cloud.openfeign.FeignClient;
+
+/**
+ * @author: 王强
+ * @create: 2023-07-27 08:48
+ **/
+@FeignClient(contextId = "ccpmFeignApi", name = AppNameConstants.APP_CCPM_MODULES)
+public interface CcpmFeignApi extends ICcpmApi {
+}

+ 11 - 4
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/service/jobhandler/SampleXxlJob.java

@@ -16,10 +16,7 @@ import com.jeeplus.sys.service.dto.RoleDTO;
 import com.jeeplus.sys.service.dto.UserDTO;
 import com.xxl.job.core.context.XxlJobHelper;
 import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.executor.feign.AssessFeignApi;
-import com.xxl.job.executor.feign.FinanceFeignApi;
-import com.xxl.job.executor.feign.HumanFeignApi;
-import com.xxl.job.executor.feign.UserFeignApi;
+import com.xxl.job.executor.feign.*;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -471,6 +468,16 @@ public class SampleXxlJob {
         }
     }
 
+
+    /**
+     * 项目-数电发票报销-修改老数据
+
+     */
+    @XxlJob("updateCcpmReimbursement")
+    public void updateCcpmReimbursement(){
+        SpringUtil.getBean ( CcpmFeignApi.class ).updateOldData();
+    }
+
     public static String dateToString(Date date) {
         SimpleDateFormat sformat = new SimpleDateFormat("yyyy-MM-dd");//日期格式
         return sformat.format(date);