Selaa lähdekoodia

报销的remove方法调整 和 报销编号调整并且1月1日开始使用新报销编号模板

huangguoce 16 tuntia sitten
vanhempi
commit
17896b03a6

+ 32 - 22
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/ReimbursementInfoService.java

@@ -1,6 +1,7 @@
 package com.jeeplus.assess.reimbursement.reimbursementInfo.service;
 
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.fastjson.JSON;
@@ -340,7 +341,18 @@ public class ReimbursementInfoService {
         // 生成id
         String id = UUID.randomUUID().toString().replace("-", "");
         // 生成编号
-        String no = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), dto.BIZ_CODE, TokenProvider.getCurrentToken());
+        // 判断超过 2026-01-01
+        Date targetDate = DateUtil.parseDate("2026-01-01");
+        boolean isAfterTargetDate = DateUtil.date().after(targetDate);
+        String bizCode = isAfterTargetDate ? dto.NEW_BIZ_CODE : dto.BIZ_CODE;
+        // 生成编号
+        String no = SpringUtil.getBean(IWorkAttachmentApi.class)
+                .genSerialNum(
+                        userDTO.getCompanyDTO().getId(),
+                        bizCode,
+                        TokenProvider.getCurrentToken()
+                );
+
         // 保存基础信息表信息
         ReimbursementInfo info = new ReimbursementInfo();
         BeanUtils.copyProperties(dto, info);
@@ -787,33 +799,31 @@ public class ReimbursementInfoService {
     }
 
 
-    public String remove(String id) {
+    @Transactional(rollbackFor = Exception.class)
+    public String remove(String ids) {
+        List<String> idList = Arrays.asList(ids.split(","));
         // 删除基础信息表
-        infoMapper.deleteById(id);
+        infoMapper.deleteBatchIds(idList);
         // 删除详情列表
-        LambdaQueryWrapper<ReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
-        detailWrapper.eq(ReimbursementDetailInfo::getInfoId, id);
-        detailInfoMapper.delete(detailWrapper);
+        detailInfoMapper.delete(new LambdaQueryWrapper<ReimbursementDetailInfo>()
+                .in(ReimbursementDetailInfo::getInfoId, idList));
         // 删除合同列表
-        LambdaQueryWrapper<ReimbursementDetailInfoContract> detailWrapperContract = new LambdaQueryWrapper<>();
-        detailWrapperContract.eq(ReimbursementDetailInfoContract::getInfoId, id);
-        reimbursementDetailInfoContractMapper.delete(detailWrapperContract);
+        reimbursementDetailInfoContractMapper.delete(new LambdaQueryWrapper<ReimbursementDetailInfoContract>()
+                .in(ReimbursementDetailInfoContract::getInfoId, idList));
         // 删除其他报销列表
-        LambdaQueryWrapper<ReimbursementDetailInfoOther> detailWrapperOther = new LambdaQueryWrapper<>();
-        detailWrapperOther.eq(ReimbursementDetailInfoOther::getInfoId, id);
-        reimbursementDetailInfoOtherMapper.delete(detailWrapperOther);
+        reimbursementDetailInfoOtherMapper.delete(new LambdaQueryWrapper<ReimbursementDetailInfoOther>()
+                .in(ReimbursementDetailInfoOther::getInfoId, idList));
         // 删除采购报销列表
-        LambdaQueryWrapper<ReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
-        detailWrapperProcured.eq(ReimbursementDetailInfoProcured::getInfoId, id);
-        reimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
+        reimbursementDetailInfoProcuredMapper.delete(new LambdaQueryWrapper<ReimbursementDetailInfoProcured>()
+                .in(ReimbursementDetailInfoProcured::getInfoId, idList));
         // 删除专用发票信息列表
-        LambdaQueryWrapper<ReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        amountInfoLambdaQueryWrapper.eq(ReimbursementAmountInfo::getInfoId, id);
-        amountInfoMapper.delete(amountInfoLambdaQueryWrapper);
-        // 删除附件信息
-//        LambdaQueryWrapper<WorkAttachmentInfo> wrapper = new LambdaQueryWrapper<>();
-//        wrapper.eq(WorkAttachmentInfo::getAttachmentId, id);
-        SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(id);
+        amountInfoMapper.delete(new LambdaQueryWrapper<ReimbursementAmountInfo>()
+                .in(ReimbursementAmountInfo::getInfoId, idList));
+
+        idList.forEach(id ->
+                SpringUtil.getBean(IWorkAttachmentApi.class)
+                        .deleteByAttachmentId(id)
+        );
         return "操作成功";
     }
 

+ 3 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/dto/SaveInfoDto.java

@@ -17,6 +17,9 @@ public class SaveInfoDto extends BaseEntity {
     //合同编号类型(字典值)
     public static final String BIZ_CODE = "5";
 
+    //2026年1月1日开始使用新的报销编号模板
+    public static final String NEW_BIZ_CODE = "102";
+
     /**
      * 经办人id
      */

+ 34 - 25
jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/service/CcpmReimbursementInfoService.java

@@ -1,6 +1,7 @@
 package com.jeeplus.ccpm.approvalInfo.service;
 
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.fastjson.JSON;
@@ -319,7 +320,17 @@ public class CcpmReimbursementInfoService {
         // 生成id
         String id = UUID.randomUUID().toString().replace("-", "");
         // 生成编号
-        String no = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), CcpmSaveInfoDto.BIZ_CODE,TokenProvider.getCurrentToken());
+        // 判断超过 2026-01-01
+        Date targetDate = DateUtil.parseDate("2026-01-01");
+        boolean isAfterTargetDate = DateUtil.date().after(targetDate);
+        String bizCode = isAfterTargetDate ? dto.NEW_BIZ_CODE : dto.BIZ_CODE;
+        // 生成编号
+        String no = SpringUtil.getBean(IWorkAttachmentApi.class)
+                .genSerialNum(
+                        userDTO.getCompanyDTO().getId(),
+                        bizCode,
+                        TokenProvider.getCurrentToken()
+                );
         // 保存基础信息表信息
         CcpmReimbursementInfo info = new CcpmReimbursementInfo();
         BeanUtils.copyProperties(dto, info);
@@ -758,38 +769,36 @@ public class CcpmReimbursementInfoService {
         }
     }
 
-    public String remove(String id) {
+    @Transactional(rollbackFor = Exception.class)
+    public String remove(String ids) {
+        List<String> idList = Arrays.asList(ids.split(","));
         // 删除基础信息表
-        infoMapper.deleteById(id);
+        infoMapper.deleteBatchIds(idList);
         // 删除详情列表
-        LambdaQueryWrapper<CcpmReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
-        detailWrapper.eq(CcpmReimbursementDetailInfo::getInfoId, id);
-        detailInfoMapper.delete(detailWrapper);
+        detailInfoMapper.delete(new LambdaQueryWrapper<CcpmReimbursementDetailInfo>()
+                .in(CcpmReimbursementDetailInfo::getInfoId, idList));
         // 删除合同列表
-        LambdaQueryWrapper<CcpmReimbursementDetailInfoContract> detailWrapperContract = new LambdaQueryWrapper<>();
-        detailWrapperContract.eq(CcpmReimbursementDetailInfoContract::getInfoId, id);
-        zsReimbursementDetailInfoContractMapper.delete(detailWrapperContract);
+        zsReimbursementDetailInfoContractMapper.delete(new LambdaQueryWrapper<CcpmReimbursementDetailInfoContract>()
+                .in(CcpmReimbursementDetailInfoContract::getInfoId, idList));
         // 删除报告列表
-        LambdaQueryWrapper<CcpmReimbursementDetailInfoReport> detailWrapperReport = new LambdaQueryWrapper<>();
-        detailWrapperReport.eq(CcpmReimbursementDetailInfoReport::getInfoId, id);
-        zsReimbursementDetailInfoReportMapper.delete(detailWrapperReport);
+        zsReimbursementDetailInfoReportMapper.delete(new LambdaQueryWrapper<CcpmReimbursementDetailInfoReport>()
+                .in(CcpmReimbursementDetailInfoReport::getInfoId, idList));
         // 删除其他报销列表
-        LambdaQueryWrapper<CcpmReimbursementDetailInfoOther> detailWrapperOther = new LambdaQueryWrapper<>();
-        detailWrapperOther.eq(CcpmReimbursementDetailInfoOther::getInfoId, id);
-        zsReimbursementDetailInfoOtherMapper.delete(detailWrapperOther);
+        zsReimbursementDetailInfoOtherMapper.delete(new LambdaQueryWrapper<CcpmReimbursementDetailInfoOther>()
+                .in(CcpmReimbursementDetailInfoOther::getInfoId, idList));
         // 删除采购报销列表
-        LambdaQueryWrapper<CcpmReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
-        detailWrapperProcured.eq(CcpmReimbursementDetailInfoProcured::getInfoId, id);
-        zsReimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
+        zsReimbursementDetailInfoProcuredMapper.delete(new LambdaQueryWrapper<CcpmReimbursementDetailInfoProcured>()
+                .in(CcpmReimbursementDetailInfoProcured::getInfoId, idList));
         // 删除专用发票信息列表
-        LambdaQueryWrapper<CcpmReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        amountInfoLambdaQueryWrapper.eq(CcpmReimbursementAmountInfo::getInfoId, id);
-        amountInfoMapper.delete(amountInfoLambdaQueryWrapper);
-        // 删除附件信息
-//        LambdaQueryWrapper<WorkAttachmentInfo> wrapper = new LambdaQueryWrapper<>();
-//        wrapper.eq(WorkAttachmentInfo::getAttachmentId, id);
-        SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(id);
+        amountInfoMapper.delete(new LambdaQueryWrapper<CcpmReimbursementAmountInfo>()
+                .in(CcpmReimbursementAmountInfo::getInfoId, idList));
+
+        idList.forEach(id ->
+                SpringUtil.getBean(IWorkAttachmentApi.class)
+                        .deleteByAttachmentId(id)
+        );
         return "操作成功";
+
     }
 
     /**

+ 3 - 0
jeeplus-modules/jeeplus-ccpm/src/main/java/com/jeeplus/ccpm/approvalInfo/service/dto/CcpmSaveInfoDto.java

@@ -16,6 +16,9 @@ public class CcpmSaveInfoDto extends BaseEntity {
     //合同编号类型(字典值)
     public static final String BIZ_CODE = "5";
 
+
+    //2026年1月1日开始使用新的报销编号模板
+    public static final String NEW_BIZ_CODE = "105";
     /**
      * 经办人id
      */

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

@@ -1,6 +1,7 @@
 package com.jeeplus.centrecareful.approvalInfo.service;
 
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.fastjson.JSON;
@@ -328,7 +329,17 @@ public class ZsReimbursementInfoService {
         // 生成id
         String id = UUID.randomUUID().toString().replace("-", "");
         // 生成编号
-        String no = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ZsSaveInfoDto.BIZ_CODE,TokenProvider.getCurrentToken());
+        // 判断超过 2026-01-01
+        Date targetDate = DateUtil.parseDate("2026-01-01");
+        boolean isAfterTargetDate = DateUtil.date().after(targetDate);
+        String bizCode = isAfterTargetDate ? ZsSaveInfoDto.NEW_BIZ_CODE : ZsSaveInfoDto.BIZ_CODE;
+        // 生成编号
+        String no = SpringUtil.getBean(IWorkAttachmentApi.class)
+                .genSerialNum(
+                        userDTO.getCompanyDTO().getId(),
+                        bizCode,
+                        TokenProvider.getCurrentToken()
+                );
         // 保存基础信息表信息
         ZsReimbursementInfo info = new ZsReimbursementInfo();
         BeanUtils.copyProperties(dto, info);
@@ -797,43 +808,38 @@ public class ZsReimbursementInfoService {
     }
 
 
-    public String remove(String id) {
+    @Transactional(rollbackFor = Exception.class)
+    public String remove(String ids) {
+        List<String> idList = Arrays.asList(ids.split(","));
         // 删除基础信息表
-        infoMapper.deleteById(id);
+        infoMapper.deleteBatchIds(idList);
         // 删除详情列表
-        LambdaQueryWrapper<ZsReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
-        detailWrapper.eq(ZsReimbursementDetailInfo::getInfoId, id);
-        detailInfoMapper.delete(detailWrapper);
+        detailInfoMapper.delete(new LambdaQueryWrapper<ZsReimbursementDetailInfo>()
+                .in(ZsReimbursementDetailInfo::getInfoId, idList));
         // 删除合同列表
-        LambdaQueryWrapper<ZsReimbursementDetailInfoContract> detailWrapperContract = new LambdaQueryWrapper<>();
-        detailWrapperContract.eq(ZsReimbursementDetailInfoContract::getInfoId, id);
-        zsReimbursementDetailInfoContractMapper.delete(detailWrapperContract);
+        zsReimbursementDetailInfoContractMapper.delete(new LambdaQueryWrapper<ZsReimbursementDetailInfoContract>()
+                .in(ZsReimbursementDetailInfoContract::getInfoId, idList));
         // 删除报告列表
-        LambdaQueryWrapper<ZsReimbursementDetailInfoReport> detailWrapperReport = new LambdaQueryWrapper<>();
-        detailWrapperReport.eq(ZsReimbursementDetailInfoReport::getInfoId, id);
-        zsReimbursementDetailInfoReportMapper.delete(detailWrapperReport);
+        zsReimbursementDetailInfoReportMapper.delete(new LambdaQueryWrapper<ZsReimbursementDetailInfoReport>()
+                .in(ZsReimbursementDetailInfoReport::getInfoId, idList));
         // 删除其他报销列表
-        LambdaQueryWrapper<ZsReimbursementDetailInfoOther> detailWrapperOther = new LambdaQueryWrapper<>();
-        detailWrapperOther.eq(ZsReimbursementDetailInfoOther::getInfoId, id);
-        zsReimbursementDetailInfoOtherMapper.delete(detailWrapperOther);
+        zsReimbursementDetailInfoOtherMapper.delete(new LambdaQueryWrapper<ZsReimbursementDetailInfoOther>()
+                .in(ZsReimbursementDetailInfoOther::getInfoId, idList));
         // 删除采购报销列表
-        LambdaQueryWrapper<ZsReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
-        detailWrapperProcured.eq(ZsReimbursementDetailInfoProcured::getInfoId, id);
-        zsReimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
+        zsReimbursementDetailInfoProcuredMapper.delete(new LambdaQueryWrapper<ZsReimbursementDetailInfoProcured>()
+                .in(ZsReimbursementDetailInfoProcured::getInfoId, idList));
         // 删除中审项目报销列表
-        LambdaQueryWrapper<ZsReimbursementDetailInfoProject> detailWrapperProject = new LambdaQueryWrapper<>();
-        detailWrapperProject.eq(ZsReimbursementDetailInfoProject::getInfoId, id);
-        zsReimbursementDetailInfoProjectMapper.delete(detailWrapperProject);
+        zsReimbursementDetailInfoProjectMapper.delete(new LambdaQueryWrapper<ZsReimbursementDetailInfoProject>()
+                .in(ZsReimbursementDetailInfoProject::getInfoId, idList));
 
         // 删除专用发票信息列表
-        LambdaQueryWrapper<ZsReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        amountInfoLambdaQueryWrapper.eq(ZsReimbursementAmountInfo::getInfoId, id);
-        amountInfoMapper.delete(amountInfoLambdaQueryWrapper);
+        amountInfoMapper.delete(new LambdaQueryWrapper<ZsReimbursementAmountInfo>()
+                .in(ZsReimbursementAmountInfo::getInfoId, idList));
         // 删除附件信息
-//        LambdaQueryWrapper<WorkAttachmentInfo> wrapper = new LambdaQueryWrapper<>();
-//        wrapper.eq(WorkAttachmentInfo::getAttachmentId, id);
-        SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(id);
-        return "操作成功";
+        idList.forEach(id ->
+                SpringUtil.getBean(IWorkAttachmentApi.class)
+                        .deleteByAttachmentId(id)
+        );        return "操作成功";
     }
 
     /**

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

@@ -16,6 +16,8 @@ public class ZsSaveInfoDto extends BaseEntity {
     //合同编号类型(字典值)
     public static final String BIZ_CODE = "5";
 
+    //2026年1月1日开始使用新的报销编号模板
+    public static final String NEW_BIZ_CODE = "103";
     /**
      * 经办人id
      */

+ 33 - 25
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/ConsultancyReimbursementInfoService.java

@@ -1,6 +1,7 @@
 package com.jeeplus.consultancy.approvalInfo.service;
 
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.fastjson.JSON;
@@ -320,7 +321,18 @@ public class ConsultancyReimbursementInfoService {
         // 生成id
         String id = UUID.randomUUID().toString().replace("-", "");
         // 生成编号
-        String no = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ConsultancySaveInfoDto.BIZ_CODE,TokenProvider.getCurrentToken());
+        // 判断超过 2026-01-01
+        Date targetDate = DateUtil.parseDate("2026-01-01");
+        boolean isAfterTargetDate = DateUtil.date().after(targetDate);
+        String bizCode = isAfterTargetDate ? ConsultancySaveInfoDto.NEW_BIZ_CODE : ConsultancySaveInfoDto.BIZ_CODE;
+        // 生成编号
+        String no = SpringUtil.getBean(IWorkAttachmentApi.class)
+                .genSerialNum(
+                        userDTO.getCompanyDTO().getId(),
+                        bizCode,
+                        TokenProvider.getCurrentToken()
+                );
+
         // 保存基础信息表信息
         ConsultancyReimbursementInfo info = new ConsultancyReimbursementInfo();
         BeanUtils.copyProperties(dto, info);
@@ -764,37 +776,33 @@ public class ConsultancyReimbursementInfoService {
     }
 
 
-    public String remove(String id) {
+    @Transactional(rollbackFor = Exception.class)
+    public String remove(String ids) {
+        List<String> idList = Arrays.asList(ids.split(","));
         // 删除基础信息表
-        infoMapper.deleteById(id);
+        infoMapper.deleteBatchIds(idList);
         // 删除详情列表
-        LambdaQueryWrapper<ConsultancyReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
-        detailWrapper.eq(ConsultancyReimbursementDetailInfo::getInfoId, id);
-        detailInfoMapper.delete(detailWrapper);
+        detailInfoMapper.delete(new LambdaQueryWrapper<ConsultancyReimbursementDetailInfo>()
+                .in(ConsultancyReimbursementDetailInfo::getInfoId, idList));
         // 删除合同列表
-        LambdaQueryWrapper<ConsultancyReimbursementDetailInfoContract> detailWrapperContract = new LambdaQueryWrapper<>();
-        detailWrapperContract.eq(ConsultancyReimbursementDetailInfoContract::getInfoId, id);
-        zsReimbursementDetailInfoContractMapper.delete(detailWrapperContract);
+        zsReimbursementDetailInfoContractMapper.delete(new LambdaQueryWrapper<ConsultancyReimbursementDetailInfoContract>()
+                .in(ConsultancyReimbursementDetailInfoContract::getInfoId, idList));
         // 删除报告列表
-        LambdaQueryWrapper<ConsultancyReimbursementDetailInfoReport> detailWrapperReport = new LambdaQueryWrapper<>();
-        detailWrapperReport.eq(ConsultancyReimbursementDetailInfoReport::getInfoId, id);
-        zsReimbursementDetailInfoReportMapper.delete(detailWrapperReport);
+        zsReimbursementDetailInfoReportMapper.delete(new LambdaQueryWrapper<ConsultancyReimbursementDetailInfoReport>()
+                .in(ConsultancyReimbursementDetailInfoReport::getInfoId, idList));
         // 删除其他报销列表
-        LambdaQueryWrapper<ConsultancyReimbursementDetailInfoOther> detailWrapperOther = new LambdaQueryWrapper<>();
-        detailWrapperOther.eq(ConsultancyReimbursementDetailInfoOther::getInfoId, id);
-        zsReimbursementDetailInfoOtherMapper.delete(detailWrapperOther);
+        zsReimbursementDetailInfoOtherMapper.delete(new LambdaQueryWrapper<ConsultancyReimbursementDetailInfoOther>()
+                .in(ConsultancyReimbursementDetailInfoOther::getInfoId, idList));
         // 删除采购报销列表
-        LambdaQueryWrapper<ConsultancyReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
-        detailWrapperProcured.eq(ConsultancyReimbursementDetailInfoProcured::getInfoId, id);
-        zsReimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
+        zsReimbursementDetailInfoProcuredMapper.delete(new LambdaQueryWrapper<ConsultancyReimbursementDetailInfoProcured>()
+                .in(ConsultancyReimbursementDetailInfoProcured::getInfoId, idList));
         // 删除专用发票信息列表
-        LambdaQueryWrapper<ConsultancyReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        amountInfoLambdaQueryWrapper.eq(ConsultancyReimbursementAmountInfo::getInfoId, id);
-        amountInfoMapper.delete(amountInfoLambdaQueryWrapper);
-        // 删除附件信息
-//        LambdaQueryWrapper<WorkAttachmentInfo> wrapper = new LambdaQueryWrapper<>();
-//        wrapper.eq(WorkAttachmentInfo::getAttachmentId, id);
-        SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(id);
+        amountInfoMapper.delete(new LambdaQueryWrapper<ConsultancyReimbursementAmountInfo>()
+                .in(ConsultancyReimbursementAmountInfo::getInfoId, idList));
+        idList.forEach(id ->
+                SpringUtil.getBean(IWorkAttachmentApi.class)
+                        .deleteByAttachmentId(id)
+        );
         return "操作成功";
     }
 

+ 3 - 0
jeeplus-modules/jeeplus-consult/src/main/java/com/jeeplus/consultancy/approvalInfo/service/dto/ConsultancySaveInfoDto.java

@@ -16,6 +16,9 @@ public class ConsultancySaveInfoDto extends BaseEntity {
     //合同编号类型(字典值)
     public static final String BIZ_CODE = "5";
 
+
+    //2026年1月1日开始使用新的报销编号模板
+    public static final String NEW_BIZ_CODE = "104";
     /**
      * 经办人id
      */

+ 45 - 37
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/service/CwReimbursementInfoService.java

@@ -1,6 +1,7 @@
 package com.jeeplus.finance.reimbursementApproval.approvalInfo.service;
 
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.fastjson.JSON;
@@ -540,8 +541,18 @@ public class CwReimbursementInfoService {
     public CwReimbursementInfo add(SaveInfoDto dto, UserDTO userDTO) throws Exception{
         // 生成id
         String id = UUID.randomUUID().toString().replace("-", "");
+
+        // 判断超过 2026-01-01
+        Date targetDate = DateUtil.parseDate("2026-01-01");
+        boolean isAfterTargetDate = DateUtil.date().after(targetDate);
+        String bizCode = isAfterTargetDate ? dto.NEW_BIZ_CODE : dto.BIZ_CODE;
         // 生成编号
-        String no = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), dto.BIZ_CODE, TokenProvider.getCurrentToken());
+        String no = SpringUtil.getBean(IWorkAttachmentApi.class)
+                .genSerialNum(
+                        userDTO.getCompanyDTO().getId(),
+                        bizCode,
+                        TokenProvider.getCurrentToken()
+                );
         // 保存基础信息表信息
         CwReimbursementInfo info = new CwReimbursementInfo();
         BeanUtils.copyProperties(dto, info);
@@ -1005,45 +1016,42 @@ public class CwReimbursementInfoService {
     }
 
 
-    public String remove(String id) {
-        // 删除基础信息表
-        infoMapper.deleteById(id);
-        // 删除详情列表
-        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<CwReimbursementDetailInfoProcured> detailWrapperProcured = new LambdaQueryWrapper<>();
-        detailWrapperProcured.eq(CwReimbursementDetailInfoProcured::getInfoId, id);
-        cwReimbursementDetailInfoProcuredMapper.delete(detailWrapperProcured);
-        // 删除实习报销列表
-        LambdaQueryWrapper<HumanReimbursementDetailInfoProcured> humanDetailWrapperProcured = new LambdaQueryWrapper<>();
-        humanDetailWrapperProcured.eq(HumanReimbursementDetailInfoProcured::getInfoId, id);
-        humanReimbursementDetailInfoProcuredMapper.delete(humanDetailWrapperProcured);
-        // 删除专用发票信息列表
-        LambdaQueryWrapper<CwReimbursementAmountInfo> amountInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        amountInfoLambdaQueryWrapper.eq(CwReimbursementAmountInfo::getInfoId, id);
-        amountInfoMapper.delete(amountInfoLambdaQueryWrapper);
-        // 删除附件信息
-//        LambdaQueryWrapper<WorkAttachmentInfo> wrapper = new LambdaQueryWrapper<>();
-//        wrapper.eq(WorkAttachmentInfo::getAttachmentId, id);
-//        ossServiceMapper.delete(wrapper);
-        SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(id);
+    @Transactional(rollbackFor = Exception.class)
+    public String remove(String ids) {
+
+        List<String> idList = Arrays.asList(ids.split(","));
+
+        infoMapper.deleteBatchIds(idList);
+
+        detailInfoMapper.delete(new LambdaQueryWrapper<CwReimbursementDetailInfo>()
+                .in(CwReimbursementDetailInfo::getInfoId, idList));
+
+        cwReimbursementDetailInfoContractMapper.delete(new LambdaQueryWrapper<CwReimbursementDetailInfoContract>()
+                .in(CwReimbursementDetailInfoContract::getInfoId, idList));
+
+        cwReimbursementDetailInfoReportMapper.delete(new LambdaQueryWrapper<CwReimbursementDetailInfoReport>()
+                .in(CwReimbursementDetailInfoReport::getInfoId, idList));
+
+        cwReimbursementDetailInfoOtherMapper.delete(new LambdaQueryWrapper<CwReimbursementDetailInfoOther>()
+                .in(CwReimbursementDetailInfoOther::getInfoId, idList));
+
+        cwReimbursementDetailInfoProcuredMapper.delete(new LambdaQueryWrapper<CwReimbursementDetailInfoProcured>()
+                .in(CwReimbursementDetailInfoProcured::getInfoId, idList));
+
+        humanReimbursementDetailInfoProcuredMapper.delete(new LambdaQueryWrapper<HumanReimbursementDetailInfoProcured>()
+                .in(HumanReimbursementDetailInfoProcured::getInfoId, idList));
+
+        amountInfoMapper.delete(new LambdaQueryWrapper<CwReimbursementAmountInfo>()
+                .in(CwReimbursementAmountInfo::getInfoId, idList));
+
+        idList.forEach(id ->
+                SpringUtil.getBean(IWorkAttachmentApi.class)
+                        .deleteByAttachmentId(id)
+        );
         return "操作成功";
     }
 
+
     public String getOfficeNameByIds(String ids){
         List<String> deptIdList = new ArrayList<>();
         if (ids != null && !ids.trim().isEmpty()) {

+ 3 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/service/dto/SaveInfoDto.java

@@ -16,6 +16,9 @@ public class SaveInfoDto extends BaseEntity {
     //合同编号类型(字典值)
     public static final String BIZ_CODE = "5";
 
+    //2026年1月1日起使用的报销模板编号
+    public static final String NEW_BIZ_CODE = "101";
+
     /**
      * 经办人id
      */