From 412628e222180fafab1c5d53e5a6711d75b682b3 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期一, 31 七月 2023 09:08:22 +0800
Subject: [PATCH] 代码修改,给字段判空
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java | 30 ++++++++++++++++--------------
1 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
index c210bc5..6fb031b 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
@@ -446,22 +446,24 @@
@PostMapping("/travelexpensereport")
public AjaxResult travelexpensereport(@RequestBody CheckFundVO checkFundVO) {
ServiceReimbursement serviceReimbursement = serviceReimbursementService.getById(checkFundVO.getFundid());
- //濡傛灉绛変簬100锛岃鏄庡凡缁忚蛋鍒板尰闄㈣储鍔¢偅杈逛簡锛涜储鍔¢偅杈瑰彇鏁版嵁鏄粠鍒嗕韩琛ㄥ彇锛屾墍浠ワ紝杩欓噷鐩存帴寰�鍒嗕韩琛ㄩ噷娣诲姞鏁版嵁灏辫浜�
- if (serviceReimbursement.getBackflowlevel() == 100 || serviceReimbursement.getBackflowlevel() == 199) {
+ //濡傛灉绛変簬100锛岃鏄庡凡缁忚蛋鍒板尰闄㈣储鍔¢偅杈逛簡锛涜储鍔¢偅杈瑰彇鏁版嵁鏄粠鍒嗕韩琛ㄥ彇锛屾墍浠ワ紝杩欓噷鐩存帴寰�鍒嗕韩琛ㄩ噷娣诲姞鏁版嵁灏辫浜�;
+ if (!Objects.isNull(serviceReimbursement) && serviceReimbursement.getBackflowlevel() != null) {
+ if (serviceReimbursement.getBackflowlevel() == 100 || serviceReimbursement.getBackflowlevel() == 199){
- //灏嗕慨鏀圭殑涓婃姤鏁版嵁 鏂板涓�鏉�
- ServiceReimbursementShared serviceReimbursementShared = DtoConversionUtils.sourceToTarget(serviceReimbursement, ServiceReimbursementShared.class);
- serviceReimbursementShared.setId(null);
- serviceReimbursementShared.setDelFlag(0L);
- serviceReimbursementShared.setReimid(serviceReimbursement.getId());
- serviceReimbursementSharedService.save(serviceReimbursementShared);
+ //灏嗕慨鏀圭殑涓婃姤鏁版嵁 鏂板涓�鏉�
+ ServiceReimbursementShared serviceReimbursementShared = DtoConversionUtils.sourceToTarget(serviceReimbursement, ServiceReimbursementShared.class);
+ serviceReimbursementShared.setId(null);
+ serviceReimbursementShared.setDelFlag(0L);
+ serviceReimbursementShared.setReimid(serviceReimbursement.getId());
+ serviceReimbursementSharedService.save(serviceReimbursementShared);
- //灏嗛��鍥為樁娈佃缃垚100
- serviceReimbursement.setBackflowlevel(100L);
- serviceReimbursement.setFlowlevel(100L);
- serviceReimbursement.setRecordstatus(0);
- serviceReimbursementService.updateById(serviceReimbursement);
- return success();
+ //灏嗛��鍥為樁娈佃缃垚100
+ serviceReimbursement.setBackflowlevel(100L);
+ serviceReimbursement.setFlowlevel(100L);
+ serviceReimbursement.setRecordstatus(0);
+ serviceReimbursementService.updateById(serviceReimbursement);
+ return success();
+ }
}
if (serviceReimbursement != null) {
Integer TotalLevel = 0;
--
Gitblit v1.9.3