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] }} - + - +