diff --git a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml
index 642c1ad4..06a59fd9 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml
+++ b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml
@@ -140,6 +140,16 @@
2.0.0-jdk8-snapshot
compile
+
+ com.alibaba
+ easyexcel-core
+ 4.0.3
+ compile
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/FinancialPaymentController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/FinancialPaymentController.java
index 2608bfba..a5aa9ab6 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/FinancialPaymentController.java
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/FinancialPaymentController.java
@@ -2,9 +2,11 @@ package cn.iocoder.yudao.module.bpm.controller.admin.financialpayment;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.UploadUserFile;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentPageReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentRespVO;
import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentSaveReqVO;
@@ -17,15 +19,19 @@ import cn.iocoder.yudao.module.bpm.service.financialpaymentitem.FinancialPayment
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
@Tag(name = "管理后台 - 财务支付管理")
@RestController
@@ -102,6 +108,11 @@ public class FinancialPaymentController {
@Operation(summary = "获得财务支付管理分页")
public CommonResult> getFinancialPaymentPage(@Valid FinancialPaymentPageReqVO pageReqVO) {
PageResult pageResult = financialPaymentService.getFinancialPaymentPage(pageReqVO);
+ pageResult.getList().forEach(item -> {
+ if (StringUtils.isNotEmpty(item.getRecipientName())) {
+ item.setRecipientName(item.getRecipientName().split(",")[0]);
+ }
+ });
return success(BeanUtils.toBean(pageResult, FinancialPaymentRespVO.class));
}
@@ -111,4 +122,14 @@ public class FinancialPaymentController {
FinancialPaymentDO paymentDO = financialPaymentService.getPaymentTotal(pageReqVO);
return success(BeanUtils.toBean(paymentDO, FinancialPaymentRespVO.class));
}
+
+ @GetMapping("/export-excel")
+ @Operation(summary = "导出支付信息 Excel")
+ @OperateLog(type = EXPORT)
+ public void exportFactoryInfoExcel(@Valid FinancialPaymentPageReqVO pageReqVO,
+ HttpServletResponse response) throws IOException {
+ pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
+
+ financialPaymentService.exportList(response, pageReqVO);
+ }
}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialExportExcelVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialExportExcelVO.java
new file mode 100644
index 00000000..97e47711
--- /dev/null
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialExportExcelVO.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/**
+ * 用户 Excel 导入 VO
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = false) // 设置 chain = false,避免用户导入有问题
+public class FinancialExportExcelVO {
+
+ @ExcelProperty("姓名")
+ private String nickName;
+
+ @ExcelProperty("报销部门")
+ private String deptName;
+
+ @ExcelProperty("事项")
+ private String detail;
+
+ @ExcelProperty("金额")
+ private BigDecimal amount;
+
+ @ExcelProperty("卡号")
+ private String bankNo;
+
+ @ExcelProperty("公账/私账")
+ private String type;
+
+ @ExcelProperty("备注")
+ private String note;
+}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/CustomCellStyleHandler.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/CustomCellStyleHandler.java
new file mode 100644
index 00000000..3ecae9bc
--- /dev/null
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/CustomCellStyleHandler.java
@@ -0,0 +1,77 @@
+package cn.iocoder.yudao.module.bpm.service.financialpayment;
+
+import com.alibaba.excel.metadata.Head;
+import com.alibaba.excel.metadata.data.WriteCellData;
+import com.alibaba.excel.write.handler.CellWriteHandler;
+import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
+import com.alibaba.excel.write.metadata.holder.WriteTableHolder;
+import org.apache.poi.ss.usermodel.*;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class CustomCellStyleHandler implements CellWriteHandler {
+
+ private final Map styleCache = new HashMap<>();
+
+ @Override
+ public void afterCellDispose(
+ WriteSheetHolder writeSheetHolder,
+ WriteTableHolder writeTableHolder,
+ List> cellDataList,
+ Cell cell,
+ Head head,
+ Integer relativeRowIndex,
+ Boolean isHead) {
+
+ Workbook workbook = writeSheetHolder.getSheet().getWorkbook();
+ writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), 7120);
+
+ // 获取或创建样式
+ CellStyle cellStyle = getOrCreateCellStyle(workbook, isHead, relativeRowIndex, cellDataList);
+
+ cell.setCellStyle(cellStyle);
+ }
+
+ private CellStyle getOrCreateCellStyle(Workbook workbook, Boolean isHead, Integer relativeRowIndex, List> cellDataList) {
+ String key = generateStyleKey(isHead, relativeRowIndex);
+ if (styleCache.containsKey(key)) {
+ return styleCache.get(key);
+ }
+
+ CellStyle cellStyle = workbook.createCellStyle();
+ cellStyle.setAlignment(HorizontalAlignment.CENTER);
+ cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+
+// if (isHead != null && isHead) {
+// setHeaderStyle(workbook, cellStyle, relativeRowIndex, cellDataList);
+// }
+
+ styleCache.put(key, cellStyle);
+ return cellStyle;
+ }
+
+ private void setHeaderStyle(Workbook workbook, CellStyle cellStyle, Integer relativeRowIndex, List> cellDataList) {
+ if (relativeRowIndex == 0 || relativeRowIndex == 1) {
+ applyStyle(workbook, cellStyle, IndexedColors.TURQUOISE.getIndex(), (short) 20, cellDataList);
+ } else if (relativeRowIndex == 2 || relativeRowIndex == 3) {
+ applyStyle(workbook, cellStyle, IndexedColors.LIGHT_YELLOW.getIndex(), (short) 20, cellDataList);
+ }
+ }
+
+
+ private void applyStyle(Workbook workbook, CellStyle cellStyle, short backgroundColor, short fontSize, List> cellDataList) {
+ cellStyle.setFillForegroundColor(backgroundColor);
+ cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
+
+ Font font = workbook.createFont();
+ font.setFontHeightInPoints(fontSize);
+ cellStyle.setFont(font);
+ cellDataList.get(0).setWriteCellStyle(null);
+ }
+
+ private String generateStyleKey(Boolean isHead, Integer relativeRowIndex) {
+ return "isHead:" + isHead + ",rowIndex:" + relativeRowIndex;
+ }
+}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentService.java
index d0611ea3..58f40871 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentService.java
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentService.java
@@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.Financia
import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentSaveVO;
import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpayment.FinancialPaymentDO;
+import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
@@ -102,4 +103,11 @@ public interface FinancialPaymentService {
* @return 统计信息
*/
FinancialPaymentDO getPaymentTotal(FinancialPaymentPageReqVO pageReqVO);
+
+ /**
+ * 导出支付信息
+ * @param response 响应
+ * @param pageReqVO 查询条件
+ */
+ void exportList(HttpServletResponse response, FinancialPaymentPageReqVO pageReqVO);
}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentServiceImpl.java
index 86ae21b7..f33ba542 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentServiceImpl.java
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentServiceImpl.java
@@ -25,7 +25,6 @@ import cn.iocoder.yudao.module.bpm.dal.mysql.oa.*;
import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmProcessInstanceExtMapper;
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum;
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum;
-import cn.iocoder.yudao.module.bpm.service.oa.BpmOAExpensesService;
import cn.iocoder.yudao.module.system.api.auth.AdminOauthUserOtherInfoApi;
import cn.iocoder.yudao.module.system.api.auth.dto.AdminOauthUserOtherInfoApiDTO;
import cn.iocoder.yudao.module.system.api.auth.vo.AdminOauthUserOtherInfoApiVO;
@@ -33,6 +32,8 @@ import cn.iocoder.yudao.module.system.api.dept.DeptApi;
import cn.iocoder.yudao.module.system.api.loan.LoanApi;
import cn.iocoder.yudao.module.system.api.loan.dto.LoanDTO;
import cn.iocoder.yudao.module.system.api.subscribe.SubscribeMessageSendApi;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.support.ExcelTypeEnum;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
@@ -40,10 +41,13 @@ import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.util.*;
+import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId;
@@ -286,4 +290,116 @@ public class FinancialPaymentServiceImpl implements FinancialPaymentService {
pageReqVO.setReceiveUserId(getLoginUserId());
return financialPaymentMapper.selectPaymentTotal(pageReqVO);
}
+
+ @Override
+ public void exportList(HttpServletResponse response, FinancialPaymentPageReqVO pageReqVO) {
+
+ try {
+ if (pageReqVO.getStatus() == null) {
+ pageReqVO.setStatus(2);
+ }
+
+ // 获取支付信息数据
+ List list = this.getFinancialPaymentPage(pageReqVO).getList();
+ list.removeIf(item -> item.getCompanyId() == null);
+
+ // 根据付款公司进行分组
+ Map> companyIdMap = list.stream().collect(Collectors.groupingBy(FinancialPaymentDO::getCompanyId));
+
+ List> data = new ArrayList<>();
+ for (Map.Entry> entry : companyIdMap.entrySet()) {
+
+ // 设置表头
+ data.add(Arrays.asList(entry.getValue().get(0).getCompanyName(), entry.getValue().get(0).getCompanyName(), entry.getValue().get(0).getCompanyName(),
+ entry.getValue().get(0).getCompanyName(), entry.getValue().get(0).getCompanyName(), entry.getValue().get(0).getCompanyName()));
+ data.add(this.setTitle());
+
+ // 提取所有公账 支付信息
+ List publicAccount = entry.getValue().stream()
+ .filter(item -> item.getType() != 9)
+ .collect(Collectors.toList());
+ // 提取所有私账 支付信息
+ List privateAccount = entry.getValue().stream()
+ .filter(item -> item.getType() == 9)
+ .collect(Collectors.toList());
+
+ // 遍历公账信息
+ for (FinancialPaymentDO financialPaymentDO : publicAccount) {
+ List row = new ArrayList<>();
+ // 设置姓名
+ row.add(financialPaymentDO.getNickname());
+ // 设置报销部门
+ row.add(financialPaymentDO.getDeptName());
+ // 添加事项
+ row.add(financialPaymentDO.getReason());
+ // 添加金额
+ row.add(financialPaymentDO.getActualPayment().toString());
+ // 添加卡号
+ row.add(financialPaymentDO.getRecipientName());
+ // 添加公账/私账
+ row.add("公账");
+ // 添加备注
+ row.add(financialPaymentDO.getNickname() + "报销");
+
+ data.add(row);
+ }
+
+ // 添加公账合计数据
+ BigDecimal publicAccountTotal = publicAccount.stream().map(FinancialPaymentDO::getActualPayment).reduce(BigDecimal.ZERO, BigDecimal::add);
+ data.add(Arrays.asList("公账总计", "公账总计", "公账总计", publicAccountTotal.toString(), "", "公账"));
+
+ // 遍历私账信息
+ for (FinancialPaymentDO financialPaymentDO : privateAccount) {
+ List row = new ArrayList<>();
+ // 设置姓名
+ row.add(financialPaymentDO.getNickname());
+ // 设置报销部门
+ row.add(financialPaymentDO.getDeptName());
+ // 添加事项
+ row.add(financialPaymentDO.getReason());
+ // 添加金额
+ row.add(financialPaymentDO.getActualPayment().toString());
+ // 添加卡号
+ row.add(financialPaymentDO.getRecipientName());
+ // 添加公账/私账
+ row.add("私账");
+ // 添加备注
+ row.add(financialPaymentDO.getNickname() + "报销");
+
+ data.add(row);
+ }
+
+ // 添加私账合计数据
+ BigDecimal privateAccountTotal = privateAccount.stream().map(FinancialPaymentDO::getActualPayment).reduce(BigDecimal.ZERO, BigDecimal::add);
+ data.add(Arrays.asList("私账总计", "私账总计", "私账总计", privateAccountTotal.toString(), "", "私账"));
+ }
+
+ EasyExcel.write(response.getOutputStream())
+ .autoCloseStream(false)
+ .excelType(ExcelTypeEnum.XLSX)
+ .sheet("账目明细")
+ .registerWriteHandler(new CustomCellStyleHandler())
+ .doWrite(data);
+
+ response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("账目", StandardCharsets.UTF_8.name()));
+ response.setContentType("application/vnd.ms-excel;charset=UTF-8");
+
+ } catch (IOException e) {
+ log.error("[exportList][导出失败]", e);
+ throw new RuntimeException(e);
+ }
+ }
+
+ private List setTitle() {
+ List titleRow = new ArrayList<>();
+ titleRow.add("姓名");
+ titleRow.add("报销部门");
+ titleRow.add("事项");
+ titleRow.add("金额");
+ titleRow.add("卡号");
+ titleRow.add("公账/私账");
+ titleRow.add("备注");
+
+ return titleRow;
+ }
}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOACashServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOACashServiceImpl.java
index 14b3f802..8f1f431e 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOACashServiceImpl.java
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOACashServiceImpl.java
@@ -252,7 +252,7 @@ public class BpmOACashServiceImpl extends BpmOABaseService implements BpmOACashS
.setAmountPayable(isImprest == 1 ? amount.abs() : cash.getTotalMoney())
.setBeginTime(processInstance.getCreateTime())
.setEndTime(processInstance.getEndTime())
- .setRecipientName(bankRespDTO.getNickname())
+ .setRecipientName(bankRespDTO != null ? bankRespDTO.getNickname() + "," + bankRespDTO.getBankNo() + "," + bankRespDTO.getBankName() : "")
.setCompanyId(deptRespDTO != null ? deptRespDTO.getId() : null)
);
}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAExpensesServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAExpensesServiceImpl.java
index 2af77d48..09595435 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAExpensesServiceImpl.java
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAExpensesServiceImpl.java
@@ -30,7 +30,6 @@ import cn.iocoder.yudao.module.system.api.loan.dto.LoanDTO;
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.flowable.engine.runtime.ProcessInstance;
import org.springframework.context.annotation.Lazy;
@@ -289,7 +288,7 @@ public class BpmOAExpensesServiceImpl extends BpmOABaseService implements BpmOAE
.setProcessInstanceName(processInstance.getName())
.setBeginTime(processInstance.getCreateTime())
.setEndTime(processInstance.getEndTime())
- .setRecipientName(bankRespDTO != null ? bankRespDTO.getNickname() : "")
+ .setRecipientName(bankRespDTO != null ? bankRespDTO.getNickname() + "," + bankRespDTO.getBankNo() + "," + bankRespDTO.getBankName() : "")
.setCompanyFactoryId(dto.getId())
);
}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestServiceImpl.java
index 334a1980..a492499b 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestServiceImpl.java
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestServiceImpl.java
@@ -143,7 +143,7 @@ public class BpmOAImprestServiceImpl extends BpmOABaseService implements BpmOAIm
.setProcessInstanceName(processInstance.getName())
.setBeginTime(processInstance.getCreateTime())
.setEndTime(processInstance.getEndTime())
- .setRecipientName(bankRespDTO.getNickname())
+ .setRecipientName(bankRespDTO != null ? bankRespDTO.getNickname() + "," + bankRespDTO.getBankNo() + "," + bankRespDTO.getBankName() : "")
.setCompanyId(deptRespDTO != null ? deptRespDTO.getId() : null)
);
}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALoanServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALoanServiceImpl.java
index 448e8530..3ece34c6 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALoanServiceImpl.java
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALoanServiceImpl.java
@@ -174,7 +174,7 @@ public class BpmOALoanServiceImpl extends BpmOABaseService implements BpmOALoanS
.setProcessInstanceName(processInstance.getName())
.setBeginTime(processInstance.getCreateTime())
.setEndTime(processInstance.getEndTime())
- .setRecipientName(bankRespDTO.getNickname())
+ .setRecipientName(bankRespDTO != null ? bankRespDTO.getNickname() + "," + bankRespDTO.getBankNo() + "," + bankRespDTO.getBankName() : "")
);
}
}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAPaymentServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAPaymentServiceImpl.java
index 58dea6a1..d520a095 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAPaymentServiceImpl.java
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAPaymentServiceImpl.java
@@ -147,7 +147,7 @@ public class BpmOAPaymentServiceImpl extends BpmOABaseService implements BpmOAPa
.setProcessInstanceName(processInstance.getName())
.setBeginTime(processInstance.getCreateTime())
.setEndTime(processInstance.getEndTime())
- .setRecipientName(bankRespDTO.getNickname())
+ .setRecipientName(bankRespDTO != null ? bankRespDTO.getNickname() + "," + bankRespDTO.getBankNo() + "," + bankRespDTO.getBankName() : "")
.setCompanyId(deptRespDTO != null ? deptRespDTO.getId() : null)
);
}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementServiceImpl.java
index 2cd1c708..40bdaddc 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementServiceImpl.java
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementServiceImpl.java
@@ -251,7 +251,7 @@ public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements B
.setProcessInstanceName(processInstance.getName())
.setBeginTime(processInstance.getCreateTime())
.setEndTime(processInstance.getEndTime())
- .setRecipientName(bpmOAReimbursementDO.getNickname())
+ .setRecipientName(bpmOAReimbursementDO.getNickname() + "," + bpmOAReimbursementDO.getBankNo() + "," + bpmOAReimbursementDO.getBankName())
.setCompanyId(deptRespDTO != null ? deptRespDTO.getId() : null)
);
}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/oa/BpmOAExpensesMapper.xml b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/oa/BpmOAExpensesMapper.xml
index 0cebe79b..a057015e 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/oa/BpmOAExpensesMapper.xml
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/oa/BpmOAExpensesMapper.xml
@@ -14,7 +14,7 @@
a.type as type,
a.cost_section AS costSection,
a.dept_id AS deptId,
- d.name AS deptName,
+ d.short_name AS deptName,
a.total_money AS amount,
a.detail AS detail,
b.user_id AS userId,
@@ -30,7 +30,7 @@
FROM bpm_oa_expenses b
JOIN bpm_oa_expenses_item a ON a.expenses_id = b.id
JOIN bpm_process_instance_ext c ON c.process_instance_id = b.process_instance_id
- LEFT JOIN system_dept d ON d.factory_id = a.dept_id
+ LEFT JOIN sf_factory_info d ON d.id = a.dept_id
LEFT JOIN system_users u ON u.id = b.user_id
LEFT JOIN system_bank ub ON ub.id = b.bank_id
WHERE
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java
index 488a9acb..8b750416 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java
@@ -270,7 +270,7 @@ public class DeptServiceImpl implements DeptService {
@Override
@DataPermission(enable = false)
- @Cacheable(cacheNames = RedisKeyConstants.DEPT_CHILD_ID_LIST, key = "#id")
+ @Cacheable(cacheNames = RedisKeyConstants.DEPT_CHILD_ID_LIST, key = "#id", condition = "#id != null")
public List getChildDept(Long id) {
return deptMapper.selectList(new LambdaQueryWrapperX()