From 5a6d28fd88276bd45bb26f929131da0a3de8ce4a Mon Sep 17 00:00:00 2001 From: hhb <839062268@qq.com> Date: Tue, 7 Nov 2023 01:32:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=B3=E5=8A=A1=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zhengjie/modules/system/service/dto/ServiceFeeDto.java | 4 ++-- .../modules/system/service/impl/ServiceFeeServiceImpl.java | 6 ++++++ eladmin-web/src/views/system/service_fee/index.vue | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/ServiceFeeDto.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/ServiceFeeDto.java index a16a38a..a461426 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/ServiceFeeDto.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/ServiceFeeDto.java @@ -34,7 +34,7 @@ public class ServiceFeeDto implements Serializable { private Long serviceFeeId; /** 劳务人 */ - private User user; + private UserDto user; /** 应发金额 */ private BigDecimal payableFee; @@ -49,7 +49,7 @@ public class ServiceFeeDto implements Serializable { private String feeSource; /** 审批人 */ - private User approveUser; + private UserDto approveUser; /** 劳务时间 */ private Timestamp serviceTime; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/ServiceFeeServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/ServiceFeeServiceImpl.java index bcfb788..608cfa0 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/ServiceFeeServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/ServiceFeeServiceImpl.java @@ -72,12 +72,18 @@ public class ServiceFeeServiceImpl implements ServiceFeeService { @Override @Transactional(rollbackFor = Exception.class) public void create(ServiceFee resources) { + if (resources.getApproveUser().getId() == null){ + resources.setApproveUser(null); + } serviceFeeRepository.save(resources); } @Override @Transactional(rollbackFor = Exception.class) public void update(ServiceFee resources) { + if (resources.getApproveUser().getId() == null){ + resources.setApproveUser(null); + } ServiceFee serviceFee = serviceFeeRepository.findById(resources.getServiceFeeId()).orElseGet(ServiceFee::new); ValidationUtil.isNull( serviceFee.getServiceFeeId(),"ServiceFee","id",resources.getServiceFeeId()); serviceFee.copy(resources); diff --git a/eladmin-web/src/views/system/service_fee/index.vue b/eladmin-web/src/views/system/service_fee/index.vue index b204070..567aef3 100644 --- a/eladmin-web/src/views/system/service_fee/index.vue +++ b/eladmin-web/src/views/system/service_fee/index.vue @@ -65,7 +65,7 @@ - + @@ -74,9 +74,9 @@ {{ dict.label.fee_source[scope.row.feeSource] }} - + - +