From 59c2e48f4c40e7dbc81149c9a859a54d8780ddf3 Mon Sep 17 00:00:00 2001
From: BAOLH <baolh@yhzhg.cn>
Date: Thu, 17 Sep 2026 05:40:25 +0000
Subject: [PATCH] Merge branch 'wcd-2411-update' into wcd
---
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskServiceImpl.java | 4
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/NewAttendanceServiceImpl.java | 12 +-
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceLeaveServiceImpl.java | 8
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/CustomerResourcesServiceImpl.java | 7 -
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceOvertimeServiceImpl.java | 4
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/ContractMethod.java | 2
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java | 20 ++-
/dev/null | 32 ------
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceBusinessTravelServiceImpl.java | 6
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceCardreplacementServiceImpl.java | 6
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/impl/ProjectServiceImpl.java | 4
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java | 6
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/NewSalaryServiceImpl.java | 2
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/SalaryServiceImpl.java | 2
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceGoOutServiceImpl.java | 8
eladmin-web-master/src/views/attendance/preBusinessTravel/index.vue | 71 +++++---------
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceMonthServiceImpl.java | 2
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceServiceImpl.java | 12 +-
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskDaliyServiceImpl.java | 2
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/PreBusinessTravelServiceImpl.java | 36 ++++---
20 files changed, 99 insertions(+), 147 deletions(-)
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceBusinessTravelServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceBusinessTravelServiceImpl.java
index d945749..568a268 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceBusinessTravelServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceBusinessTravelServiceImpl.java
@@ -247,8 +247,8 @@
//获取当前登入人信息
User user1 = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user1.getRoles().iterator().next();
- //除超管、总经理只能修改自己信息
- if (role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL) {
+ // 除超管、总经理只能修改自己信息
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(resources.getUserId()).equals(SecurityUtils.getCurrentUserId())) {
throw new BadRequestException("只能修改自己的记录");
}
@@ -405,7 +405,7 @@
User user = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user.getRoles().iterator().next();
//除超管、总经理只能删除自己信息
- if (role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL) {
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(attendanceBusinessTravel.get().getUserId()).equals(SecurityUtils.getCurrentUserId())) {
throw new BadRequestException("只能删除自己的记录");
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceCardreplacementServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceCardreplacementServiceImpl.java
index bd7afce..cd198c1 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceCardreplacementServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceCardreplacementServiceImpl.java
@@ -192,7 +192,7 @@
User user = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user.getRoles().iterator().next();
//除超管、总经理只能修改自己信息
- if(role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL){
+ if(!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))){
if (!Long.valueOf(resources.getUserId()).equals(SecurityUtils.getCurrentUserId())){
throw new BadRequestException("只能修改自己的记录");
}
@@ -407,8 +407,8 @@
Role role = user.getRoles().iterator().next();
//根据id查询记录
Optional<AttendanceCardreplacement> attendanceCardreplacement = attendanceCardreplacementRepository.findById(id);
- //除超管、总经理只能删除自己信息
- if(role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL){
+ // 除超管、总经理只能删除自己信息
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))){
if (!Long.valueOf(attendanceCardreplacement.get().getUserId()).equals(SecurityUtils.getCurrentUserId())){
throw new BadRequestException("只能删除自己的记录");
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceGoOutServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceGoOutServiceImpl.java
index b6df7fa..f4db864 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceGoOutServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceGoOutServiceImpl.java
@@ -282,7 +282,7 @@
User user1 = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user1.getRoles().iterator().next();
//除超管、总经理只能修改自己信息
- if (role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL) {
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(resources.getUserId()).equals(SecurityUtils.getCurrentUserId())) {
throw new BadRequestException("只能修改自己的记录");
}
@@ -454,11 +454,11 @@
throw new BadRequestException("审核通过或退回的不能进行删除");
}
- //获取当前登入人信息
+ // 获取当前登入人信息
User user = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user.getRoles().iterator().next();
- //除超管、总经理只能删除自己信息
- if (role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL) {
+ // 除超管、总经理只能删除自己信息
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(attendanceGoOut.get().getUserId()).equals(SecurityUtils.getCurrentUserId())) {
throw new BadRequestException("只能删除自己的记录");
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceLeaveServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceLeaveServiceImpl.java
index 6b6f17a..7f839fa 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceLeaveServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceLeaveServiceImpl.java
@@ -310,8 +310,8 @@
//获取当前登入人信息
User user1 = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user1.getRoles().iterator().next();
- //除超管、总经理只能修改自己信息
- if(role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL){
+ // 除超管、总经理只能修改自己信息
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))){
if (!Long.valueOf(resources.getUserId()).equals(SecurityUtils.getCurrentUserId())){
throw new BadRequestException("只能修改自己的记录");
}
@@ -644,8 +644,8 @@
Role role = user.getRoles().iterator().next();
//根据id查询记录
Optional<AttendanceLeave> attendanceLeave1 = attendanceLeaveRepository.findById(id);
- //除超管、总经理只能删除自己信息
- if(role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL){
+ // 除超管、总经理只能删除自己信息
+ if(!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))){
if (!Long.valueOf(attendanceLeave1.get().getUserId()).equals(SecurityUtils.getCurrentUserId())){
throw new BadRequestException("只能删除自己的记录");
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceMonthServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceMonthServiceImpl.java
index bd5e63f..6e87b6f 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceMonthServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceMonthServiceImpl.java
@@ -81,7 +81,7 @@
// 登录用户最大角色等级
int min = Collections.min(levels);
// 判断角色等级
- if (min == Constant.ROLE_LEVEL_MANAGER || min == Constant.ROLE_LEVEL_LEADER || min == Constant.ROLE_LEVEL_ORDINARY) {
+ if (Constant.BASE_LEVEL_LIST.contains(Long.valueOf(min))) {
criteria.setUserId(SecurityUtils.getCurrentUserId());
criteria.setIsPublicity(Constant.PUBLICITY_STATUS_YES);
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceOvertimeServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceOvertimeServiceImpl.java
index d7b7a90..d1b4e5a 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceOvertimeServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceOvertimeServiceImpl.java
@@ -200,8 +200,8 @@
//获取当前登入人信息
User user1 = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user1.getRoles().iterator().next();
- //除超管、总经理只能修改自己信息
- if(role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL){
+ // 除超管、总经理只能修改自己信息
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(resources.getUserId()).equals(SecurityUtils.getCurrentUserId())){
throw new BadRequestException("只能修改自己的记录");
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceServiceImpl.java
index c3d9a6f..58f0637 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceServiceImpl.java
@@ -146,8 +146,8 @@
//获取当前登入人信息
User user = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user.getRoles().iterator().next();
- //除超管、总经理只能修改自己信息
- if(role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL){
+ // 除超管、总经理只能修改自己信息
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(resources.getUserId()).equals(SecurityUtils.getCurrentUserId())){
throw new BadRequestException("只能修改自己的记录");
}
@@ -323,8 +323,8 @@
Role role = user.getRoles().iterator().next();
//根据id查询记录
Optional<Attendance> attendance = attendanceRepository.findById(id);
- //除超管、总经理只能删除自己信息
- if(role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL){
+ // 除超管、总经理只能删除自己信息
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(attendance.get().getUserId()).equals(SecurityUtils.getCurrentUserId())){
throw new BadRequestException("只能删除自己的记录");
}
@@ -342,8 +342,8 @@
//获取当前登入人信息
User user = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user.getRoles().iterator().next();
- //除超管、总经理只能补自己的卡
- if(role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL){
+ // 除超管、总经理只能补自己的卡
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(userId).equals(SecurityUtils.getCurrentUserId())){
throw new BadRequestException("只能补自己的卡");
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/NewAttendanceServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/NewAttendanceServiceImpl.java
index 1f55372..a69d8ce 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/NewAttendanceServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/NewAttendanceServiceImpl.java
@@ -128,8 +128,8 @@
//获取当前登入人信息
User user = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user.getRoles().iterator().next();
- //除超管、总经理只能修改自己信息
- if (role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL) {
+ // 除超管、总经理只能修改自己信息
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(resources.getUserId()).equals(SecurityUtils.getCurrentUserId())) {
throw new BadRequestException("只能修改自己的记录");
}
@@ -238,8 +238,8 @@
Role role = user.getRoles().iterator().next();
//根据id查询记录
Optional<NewAttendance> attendance = newAttendanceRepository.findById(id);
- //除超管、总经理只能删除自己信息
- if (role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL) {
+ // 除超管、总经理只能删除自己信息
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(attendance.get().getUserId()).equals(SecurityUtils.getCurrentUserId())) {
throw new BadRequestException("只能删除自己的记录");
}
@@ -257,8 +257,8 @@
//获取当前登入人信息
User user = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user.getRoles().iterator().next();
- //除超管、总经理只能补自己的卡
- if (role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL) {
+ // 除超管、总经理只能补自己的卡
+ if (!Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(userId).equals(SecurityUtils.getCurrentUserId())) {
throw new BadRequestException("只能补自己的卡");
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/PreBusinessTravelServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/PreBusinessTravelServiceImpl.java
index a9f06fe..cee78ed 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/PreBusinessTravelServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/PreBusinessTravelServiceImpl.java
@@ -120,19 +120,20 @@
@Override
@Transactional(rollbackFor = Exception.class)
public PreBusinessTravelDto create(PreBusinessTravel resources) {
- // 获取当前登陆人信息,设置为请假发起人
- User user = userRepository.getOne(resources.getUserId() == null ? SecurityUtils.getCurrentUserId() : resources.getUserId());
- User approvalUser = userRepository.findById(resources.getApprovalUserId()).orElseGet(User::new);
- // 获取项目信息
- Project project = projectRepository.findById(resources.getProjectId()).orElseGet(Project::new);
- // 获取成员信息
- String memberUserName = Arrays.stream(resources.getMemberUserId().split("-")).filter(StringUtils::isNotBlank).map(idStr -> userRepository.findById(Long.parseLong(idStr)).orElseGet(User::new).getNickName()).collect(Collectors.joining(","));
// 默认数据
resources.setApprovalStatus(Constant.BUSSINESS_APPROVE_STATUS_REVIEWED);
// 判断是否提交企微审批
List<DictDetail> siteTypes = dictDetailRepository.findByDictName(Constant.APPROVAL_SITE_TYPE).stream().filter(siteType -> siteType.getValue().toLowerCase().equals("wecom")).collect(Collectors.toList());
if (siteTypes.size() > 0) {
+ // 获取当前登陆人信息,设置为请假发起人
+ User user = userRepository.getOne(resources.getUserId() == null ? SecurityUtils.getCurrentUserId() : resources.getUserId());
+ User approvalUser = userRepository.findById(resources.getApprovalUserId()).orElseGet(User::new);
+ // 获取项目信息
+ Project project = projectRepository.findById(resources.getProjectId()).orElseGet(Project::new);
+ // 获取成员信息
+ String memberUserName = Arrays.stream(resources.getMemberUserId().split("-")).filter(StringUtils::isNotBlank).map(idStr -> userRepository.findById(Long.parseLong(idStr)).orElseGet(User::new).getNickName()).collect(Collectors.joining(","));
+
// 添加企微申请参数
resources.setWecomProjectName(project.getName());
resources.setWecomMemberName(memberUserName);
@@ -160,16 +161,19 @@
ValidationUtil.isNull( preBusinessTravel.getId(),"PreBusinessTravel","id", resources.getId());
preBusinessTravel.copy(resources);
- // 审核通过或者退回不能修改
- if (preBusinessTravel.getApprovalStatus().equals(Constant.BUSSINESS_APPROVE_STATUS_AGREE) || preBusinessTravel.getApprovalStatus().equals(Constant.BUSSINESS_APPROVE_STATUS_REFUSE)) {
- throw new BadRequestException("审核通过或退回的不能进行修改");
- }
-
// 获取当前登录者信息
User loginUser = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = loginUser.getRoles().iterator().next();
- // 除超管、总经理只能修改自己信息
- if (role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL) {
+
+ // 除超管、总经理、统括经理审核通过或者退回不能修改
+ if (!Constant.HIGH_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
+ if (preBusinessTravel.getApprovalStatus().equals(Constant.BUSSINESS_APPROVE_STATUS_AGREE) || preBusinessTravel.getApprovalStatus().equals(Constant.BUSSINESS_APPROVE_STATUS_REFUSE)) {
+ throw new BadRequestException("审核通过或退回的不能进行修改");
+ }
+ }
+
+ // 除超管、总经理、统括经理只能修改自己信息
+ if (!Constant.HIGH_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(resources.getUserId()).equals(SecurityUtils.getCurrentUserId())) {
throw new BadRequestException("只能修改自己的记录");
}
@@ -192,7 +196,7 @@
User user = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user.getRoles().iterator().next();
// 除超管、总经理只能删除自己信息
- if (role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL) {
+ if (!Constant.HIGH_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (!Long.valueOf(preBusinessTravel.get().getUserId()).equals(SecurityUtils.getCurrentUserId())) {
throw new BadRequestException("只能删除自己的记录");
}
@@ -277,7 +281,7 @@
User user = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user.getRoles().iterator().next();
// 除超管、总经理只能查询自己作为成员的事前出差信息
- if (role.getId() != Constant.ROLE_LEVEL_SUPER && role.getId() != Constant.ROLE_LEVEL_GENERAL) {
+ if (!Constant.HIGH_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
criteria.setMemberUserIdLike(String.format("-%s-", SecurityUtils.getCurrentUserId().toString()));
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/domain/BusinessExpense.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/domain/BusinessExpense.java
deleted file mode 100644
index 38e7f8b..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/domain/BusinessExpense.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.domain;
-
-import lombok.Data;
-import cn.hutool.core.bean.BeanUtil;
-import io.swagger.annotations.ApiModelProperty;
-import cn.hutool.core.bean.copier.CopyOptions;
-import me.zhengjie.base.BaseEntity;
-
-import javax.persistence.*;
-import javax.validation.constraints.*;
-import java.sql.Timestamp;
-import java.io.Serializable;
-
-/**
-* @website https://eladmin.vip
-* @description /
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@Entity
-@Data
-@Table(name="business_expense")
-public class BusinessExpense extends BaseEntity implements Serializable {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "`id`")
- @ApiModelProperty(value = "ID")
- private Long id;
-
- @Column(name = "`expense_type`",nullable = false)
- @NotBlank
- @ApiModelProperty(value = "费用类型")
- private String expenseType;
-
- @Column(name = "`business_plan_id`",nullable = false)
- @NotNull
- @ApiModelProperty(value = "所属营业计划")
- private Long businessPlanId;
-
- @Column(name = "`project_id`")
- @ApiModelProperty(value = "所属项目")
- private Long projectId;
-
- @Column(name = "`remarks`")
- @ApiModelProperty(value = "备注")
- private String remarks;
-
- public void copy(BusinessExpense source){
- BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
- }
-}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/domain/BusinessExpenseReimbursement.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/domain/BusinessExpenseReimbursement.java
deleted file mode 100644
index cb8ea67..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/domain/BusinessExpenseReimbursement.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.domain;
-
-import lombok.Data;
-import cn.hutool.core.bean.BeanUtil;
-import io.swagger.annotations.ApiModelProperty;
-import cn.hutool.core.bean.copier.CopyOptions;
-import me.zhengjie.base.BaseEntity;
-
-import javax.persistence.*;
-import javax.validation.constraints.*;
-import java.sql.Timestamp;
-import java.math.BigDecimal;
-import java.io.Serializable;
-
-/**
-* @website https://eladmin.vip
-* @description /
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@Entity
-@Data
-@Table(name="business_expense_reimbursement")
-public class BusinessExpenseReimbursement extends BaseEntity implements Serializable {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "`id`")
- @ApiModelProperty(value = "ID")
- private Long id;
-
- @Column(name = "`business_expense_id`",nullable = false)
- @NotNull
- @ApiModelProperty(value = "所属营业费用")
- private Long businessExpenseId;
-
- @Column(name = "`reimbursement_content`",nullable = false)
- @NotBlank
- @ApiModelProperty(value = "报销内容")
- private String reimbursementContent;
-
- @Column(name = "`reimbursement_amount`",nullable = false)
- @NotNull
- @ApiModelProperty(value = "报销金额")
- private BigDecimal reimbursementAmount;
-
- @Column(name = "`reimbursement_voucher`")
- @ApiModelProperty(value = "报销凭证")
- private String reimbursementVoucher;
-
- @Column(name = "`remarks`")
- @ApiModelProperty(value = "备注")
- private String remarks;
-
- public void copy(BusinessExpenseReimbursement source){
- BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
- }
-}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/domain/BusinessPlan.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/domain/BusinessPlan.java
deleted file mode 100644
index 63de06f..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/domain/BusinessPlan.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.domain;
-
-import lombok.Data;
-import cn.hutool.core.bean.BeanUtil;
-import io.swagger.annotations.ApiModelProperty;
-import cn.hutool.core.bean.copier.CopyOptions;
-import me.zhengjie.base.BaseEntity;
-
-import javax.persistence.*;
-import javax.validation.constraints.*;
-import java.sql.Timestamp;
-import java.io.Serializable;
-
-/**
-* @website https://eladmin.vip
-* @description /
-* @author 赵士淞
-* @date 2023-04-12
-**/
-@Entity
-@Data
-@Table(name="business_plan")
-public class BusinessPlan extends BaseEntity implements Serializable {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "`id`")
- @ApiModelProperty(value = "ID")
- private Long id;
-
- @Column(name = "`business_place`",nullable = false)
- @NotBlank
- @ApiModelProperty(value = "营业地")
- private String businessPlace;
-
- @Column(name = "`business_content`",nullable = false)
- @NotBlank
- @ApiModelProperty(value = "营业内容")
- private String businessContent;
-
- @Column(name = "`business_status`",nullable = false)
- @NotBlank
- @ApiModelProperty(value = "营业状态")
- private String businessStatus;
-
- @Column(name = "`remarks`")
- @ApiModelProperty(value = "备注")
- private String remarks;
-
- public void copy(BusinessPlan source){
- BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
- }
-}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/domain/BusinessPlanPersonnel.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/domain/BusinessPlanPersonnel.java
deleted file mode 100644
index 6c87c4d..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/domain/BusinessPlanPersonnel.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.domain;
-
-import lombok.Data;
-import cn.hutool.core.bean.BeanUtil;
-import io.swagger.annotations.ApiModelProperty;
-import cn.hutool.core.bean.copier.CopyOptions;
-import me.zhengjie.base.BaseEntity;
-
-import javax.persistence.*;
-import javax.validation.constraints.*;
-import java.sql.Timestamp;
-import java.io.Serializable;
-
-/**
-* @website https://eladmin.vip
-* @description /
-* @author 赵士淞
-* @date 2023-04-12
-**/
-@Entity
-@Data
-@Table(name="business_plan_personnel")
-public class BusinessPlanPersonnel extends BaseEntity implements Serializable {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "`id`")
- @ApiModelProperty(value = "ID")
- private Long id;
-
- @Column(name = "`business_plan_id`",nullable = false)
- @NotNull
- @ApiModelProperty(value = "所属营业计划")
- private Long businessPlanId;
-
- @Column(name = "`user_id`",nullable = false)
- @NotNull
- @ApiModelProperty(value = "所属用户")
- private Long userId;
-
- @Column(name = "`business_plan_start_date`",nullable = false)
- @NotNull
- @ApiModelProperty(value = "营业计划开始日期")
- private Timestamp businessPlanStartDate;
-
- @Column(name = "`business_plan_end_date`",nullable = false)
- @NotNull
- @ApiModelProperty(value = "营业计划结束日期")
- private Timestamp businessPlanEndDate;
-
- @Column(name = "`remarks`")
- @ApiModelProperty(value = "备注")
- private String remarks;
-
- public void copy(BusinessPlanPersonnel source){
- BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
- }
-}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rabbit/BusinessExpenseRabbit.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rabbit/BusinessExpenseRabbit.java
deleted file mode 100644
index db6e0e0..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rabbit/BusinessExpenseRabbit.java
+++ /dev/null
@@ -1,27 +0,0 @@
-//package me.zhengjie.modules.business.rabbit;
-//
-//import com.alibaba.fastjson.JSON;
-//import me.zhengjie.modules.business.service.BusinessExpenseService;
-//import me.zhengjie.modules.business.service.dto.BusinessExpenseDto;
-//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
-//import org.springframework.amqp.rabbit.annotation.RabbitListener;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.stereotype.Component;
-//
-//import java.util.Map;
-//
-//@Component
-//@RabbitListener(queues = "business.businessExpenseApply")
-//public class BusinessExpenseRabbit {
-//
-// @Autowired
-// private BusinessExpenseService businessExpenseService;
-//
-// @RabbitHandler
-// public void process(Map<String, Object> message) {
-// // Map 转 实体类
-// BusinessExpenseDto businessExpenseDto = JSON.parseObject(JSON.toJSONString(message), BusinessExpenseDto.class);
-// // 新增营业费用
-// businessExpenseService.create(businessExpenseDto);
-// }
-//}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/repository/BusinessExpenseReimbursementRepository.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/repository/BusinessExpenseReimbursementRepository.java
deleted file mode 100644
index bb7a70c..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/repository/BusinessExpenseReimbursementRepository.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.repository;
-
-import me.zhengjie.modules.business.domain.BusinessExpenseReimbursement;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Query;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-13
-**/
-public interface BusinessExpenseReimbursementRepository extends JpaRepository<BusinessExpenseReimbursement, Long>, JpaSpecificationExecutor<BusinessExpenseReimbursement> {
-
- // 根据营业费用ID查询
- List<BusinessExpenseReimbursement> findByBusinessExpenseId(Long businessExpenseId);
- // 根据营业费用ID删除
- void deleteByBusinessExpenseId(Long businessExpenseId);
- // 根据营业费用ID统计报销金额
- @Query(value = "SELECT SUM(reimbursement_amount) FROM business_expense_reimbursement WHERE business_expense_id = ?1", nativeQuery = true)
- BigDecimal amountReimbursementAmountByBusinessExpenseId(Long businessExpenseId);
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/repository/BusinessExpenseRepository.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/repository/BusinessExpenseRepository.java
deleted file mode 100644
index 1cc868f..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/repository/BusinessExpenseRepository.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.repository;
-
-import me.zhengjie.modules.business.domain.BusinessExpense;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-13
-**/
-public interface BusinessExpenseRepository extends JpaRepository<BusinessExpense, Long>, JpaSpecificationExecutor<BusinessExpense> {
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/repository/BusinessPlanPersonnelRepository.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/repository/BusinessPlanPersonnelRepository.java
deleted file mode 100644
index 6c4e132..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/repository/BusinessPlanPersonnelRepository.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.repository;
-
-import me.zhengjie.modules.business.domain.BusinessPlanPersonnel;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-
-import java.util.List;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-12
-**/
-public interface BusinessPlanPersonnelRepository extends JpaRepository<BusinessPlanPersonnel, Long>, JpaSpecificationExecutor<BusinessPlanPersonnel> {
-
- // 根据营业计划ID查询
- List<BusinessPlanPersonnel> findByBusinessPlanId(Long businessPlanId);
- // 根据营业计划ID删除
- void deleteByBusinessPlanId(Long businessPlanId);
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/repository/BusinessPlanRepository.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/repository/BusinessPlanRepository.java
deleted file mode 100644
index 5d292e9..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/repository/BusinessPlanRepository.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.repository;
-
-import me.zhengjie.modules.business.domain.BusinessPlan;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-12
-**/
-public interface BusinessPlanRepository extends JpaRepository<BusinessPlan, Long>, JpaSpecificationExecutor<BusinessPlan> {
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessExpenseController.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessExpenseController.java
deleted file mode 100644
index 11665cf..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessExpenseController.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.rest;
-
-import me.zhengjie.annotation.Log;
-import me.zhengjie.modules.business.domain.BusinessExpense;
-import me.zhengjie.modules.business.service.BusinessExpenseService;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseDto;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseQueryCriteria;
-import org.springframework.data.domain.Pageable;
-import lombok.RequiredArgsConstructor;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import io.swagger.annotations.*;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@RestController
-@RequiredArgsConstructor
-@Api(tags = "营业费用管理")
-@RequestMapping("/api/businessExpense")
-public class BusinessExpenseController {
-
- private final BusinessExpenseService businessExpenseService;
-
- @Log("导出数据")
- @ApiOperation("导出数据")
- @GetMapping(value = "/download")
- @PreAuthorize("@el.check('businessExpense:download')")
- public void exportBusinessExpense(HttpServletResponse response, BusinessExpenseQueryCriteria criteria) throws IOException {
- businessExpenseService.download(businessExpenseService.queryAll(criteria), response);
- }
-
- @GetMapping
- @Log("查询营业费用")
- @ApiOperation("查询营业费用")
- @PreAuthorize("@el.check('businessExpense:list')")
- public ResponseEntity<Object> queryBusinessExpense(BusinessExpenseQueryCriteria criteria, Pageable pageable){
- return new ResponseEntity<>(businessExpenseService.queryAll(criteria,pageable),HttpStatus.OK);
- }
-
- @GetMapping(value = "/all")
- @Log("查询营业费用")
- @ApiOperation("查询营业费用")
- @PreAuthorize("@el.check('businessExpense:list')")
- public ResponseEntity<Object> queryBusinessExpense(BusinessExpenseQueryCriteria criteria){
- return new ResponseEntity<>(businessExpenseService.queryAll(criteria),HttpStatus.OK);
- }
-
- @PostMapping
- @Log("新增营业费用")
- @ApiOperation("新增营业费用")
- @PreAuthorize("@el.check('businessExpense:add')")
- public ResponseEntity<Object> createBusinessExpense(@Validated @RequestBody BusinessExpenseDto resources){
- return new ResponseEntity<>(businessExpenseService.create(resources),HttpStatus.CREATED);
- }
-
- @PutMapping
- @Log("修改营业费用")
- @ApiOperation("修改营业费用")
- @PreAuthorize("@el.check('businessExpense:edit')")
- public ResponseEntity<Object> updateBusinessExpense(@Validated @RequestBody BusinessExpenseDto resources){
- businessExpenseService.update(resources);
- return new ResponseEntity<>(HttpStatus.NO_CONTENT);
- }
-
- @DeleteMapping
- @Log("删除营业费用")
- @ApiOperation("删除营业费用")
- @PreAuthorize("@el.check('businessExpense:del')")
- public ResponseEntity<Object> deleteBusinessExpense(@RequestBody Long[] ids) {
- businessExpenseService.deleteAll(ids);
- return new ResponseEntity<>(HttpStatus.OK);
- }
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessExpenseFlowableController.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessExpenseFlowableController.java
deleted file mode 100644
index f8f70c2..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessExpenseFlowableController.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.rest;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import me.zhengjie.annotation.Log;
-import me.zhengjie.modules.business.service.BusinessExpenseFlowableService;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseDto;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@RestController
-@RequiredArgsConstructor
-@Api(tags = "营业费用管理")
-@RequestMapping("/api/businessExpenseFlowable")
-public class BusinessExpenseFlowableController {
-
- private final BusinessExpenseFlowableService businessExpenseFlowableService;
-
- @GetMapping(value = "/report")
- @Log("查询我发起的营业费用(Flowable)")
- @ApiOperation("查询我发起的营业费用(Flowable)")
- @PreAuthorize("@el.check('businessExpense:list')")
- public ResponseEntity<Object> reportBusinessExpense() throws Exception {
- return new ResponseEntity<>(businessExpenseFlowableService.report(),HttpStatus.OK);
- }
-
- @GetMapping(value = "/approve")
- @Log("查询待审批的营业费用(Flowable)")
- @ApiOperation("查询待审批的营业费用(Flowable)")
- @PreAuthorize("@el.check('businessExpense:list')")
- public ResponseEntity<Object> approveBusinessExpense() throws Exception {
- return new ResponseEntity<>(businessExpenseFlowableService.approve(),HttpStatus.OK);
- }
-
- @PostMapping
- @Log("新增营业费用(Flowable)")
- @ApiOperation("新增营业费用(Flowable)")
- @PreAuthorize("@el.check('businessExpenseFlowable:add')")
- public ResponseEntity<Object> createBusinessExpense(@Validated @RequestBody BusinessExpenseDto resources) throws Exception {
- businessExpenseFlowableService.create(resources);
- return new ResponseEntity<>(HttpStatus.CREATED);
- }
-
- @PostMapping(value = "/agree")
- @Log("同意营业费用(Flowable)")
- @ApiOperation("同意营业费用(Flowable)")
- public ResponseEntity<Object> agreeBusinessExpense(@RequestBody String processInstanceId) throws Exception {
- businessExpenseFlowableService.agree(processInstanceId);
- return new ResponseEntity<>(HttpStatus.OK);
- }
-
- @PostMapping(value = "/reject")
- @Log("拒绝营业费用(Flowable)")
- @ApiOperation("拒绝营业费用(Flowable)")
- public ResponseEntity<Object> rejectBusinessExpense(@RequestBody String processInstanceId) throws Exception {
- businessExpenseFlowableService.reject(processInstanceId);
- return new ResponseEntity<>(HttpStatus.OK);
- }
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessExpenseReimbursementController.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessExpenseReimbursementController.java
deleted file mode 100644
index 4763ee5..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessExpenseReimbursementController.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.rest;
-
-import me.zhengjie.annotation.Log;
-import me.zhengjie.modules.business.domain.BusinessExpenseReimbursement;
-import me.zhengjie.modules.business.service.BusinessExpenseReimbursementService;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseReimbursementQueryCriteria;
-import org.springframework.data.domain.Pageable;
-import lombok.RequiredArgsConstructor;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import io.swagger.annotations.*;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@RestController
-@RequiredArgsConstructor
-@Api(tags = "营业费用明细管理")
-@RequestMapping("/api/businessExpenseReimbursement")
-public class BusinessExpenseReimbursementController {
-
- private final BusinessExpenseReimbursementService businessExpenseReimbursementService;
-
- @Log("导出数据")
- @ApiOperation("导出数据")
- @GetMapping(value = "/download")
- @PreAuthorize("@el.check('businessExpenseReimbursement:download')")
- public void exportBusinessExpenseReimbursement(HttpServletResponse response, BusinessExpenseReimbursementQueryCriteria criteria) throws IOException {
- businessExpenseReimbursementService.download(businessExpenseReimbursementService.queryAll(criteria), response);
- }
-
- @GetMapping
- @Log("查询营业费用明细")
- @ApiOperation("查询营业费用明细")
- @PreAuthorize("@el.check('businessExpenseReimbursement:list')")
- public ResponseEntity<Object> queryBusinessExpenseReimbursement(BusinessExpenseReimbursementQueryCriteria criteria, Pageable pageable){
- return new ResponseEntity<>(businessExpenseReimbursementService.queryAll(criteria,pageable),HttpStatus.OK);
- }
-
- @GetMapping(value = "/all")
- @Log("查询营业费用明细")
- @ApiOperation("查询营业费用明细")
- @PreAuthorize("@el.check('businessExpenseReimbursement:list')")
- public ResponseEntity<Object> queryBusinessExpenseReimbursement(BusinessExpenseReimbursementQueryCriteria criteria){
- return new ResponseEntity<>(businessExpenseReimbursementService.queryAll(criteria),HttpStatus.OK);
- }
-
- @PostMapping
- @Log("新增营业费用明细")
- @ApiOperation("新增营业费用明细")
- @PreAuthorize("@el.check('businessExpenseReimbursement:add')")
- public ResponseEntity<Object> createBusinessExpenseReimbursement(@Validated @RequestBody BusinessExpenseReimbursement resources){
- return new ResponseEntity<>(businessExpenseReimbursementService.create(resources),HttpStatus.CREATED);
- }
-
- @PutMapping
- @Log("修改营业费用明细")
- @ApiOperation("修改营业费用明细")
- @PreAuthorize("@el.check('businessExpenseReimbursement:edit')")
- public ResponseEntity<Object> updateBusinessExpenseReimbursement(@Validated @RequestBody BusinessExpenseReimbursement resources){
- businessExpenseReimbursementService.update(resources);
- return new ResponseEntity<>(HttpStatus.NO_CONTENT);
- }
-
- @DeleteMapping
- @Log("删除营业费用明细")
- @ApiOperation("删除营业费用明细")
- @PreAuthorize("@el.check('businessExpenseReimbursement:del')")
- public ResponseEntity<Object> deleteBusinessExpenseReimbursement(@RequestBody Long[] ids) {
- businessExpenseReimbursementService.deleteAll(ids);
- return new ResponseEntity<>(HttpStatus.OK);
- }
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessPlanController.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessPlanController.java
deleted file mode 100644
index b9f8e19..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessPlanController.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.rest;
-
-import me.zhengjie.annotation.Log;
-import me.zhengjie.modules.business.domain.BusinessPlan;
-import me.zhengjie.modules.business.service.BusinessPlanService;
-import me.zhengjie.modules.business.service.dto.BusinessPlanDto;
-import me.zhengjie.modules.business.service.dto.BusinessPlanQueryCriteria;
-import org.springframework.data.domain.Pageable;
-import lombok.RequiredArgsConstructor;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import io.swagger.annotations.*;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-12
-**/
-@RestController
-@RequiredArgsConstructor
-@Api(tags = "营业计划管理")
-@RequestMapping("/api/businessPlan")
-public class BusinessPlanController {
-
- private final BusinessPlanService businessPlanService;
-
- @Log("导出数据")
- @ApiOperation("导出数据")
- @GetMapping(value = "/download")
- @PreAuthorize("@el.check('businessPlan:download')")
- public void exportBusinessPlan(HttpServletResponse response, BusinessPlanQueryCriteria criteria) throws IOException {
- businessPlanService.download(businessPlanService.queryAll(criteria), response);
- }
-
- @GetMapping
- @Log("查询营业计划")
- @ApiOperation("查询营业计划")
- @PreAuthorize("@el.check('businessPlan:list')")
- public ResponseEntity<Object> queryBusinessPlan(BusinessPlanQueryCriteria criteria, Pageable pageable){
- return new ResponseEntity<>(businessPlanService.queryAll(criteria,pageable),HttpStatus.OK);
- }
-
- @GetMapping(value = "/all")
- @Log("查询营业计划")
- @ApiOperation("查询营业计划")
- @PreAuthorize("@el.check('businessPlan:list')")
- public ResponseEntity<Object> queryBusinessPlan(BusinessPlanQueryCriteria criteria){
- return new ResponseEntity<>(businessPlanService.queryAll(criteria),HttpStatus.OK);
- }
-
- @PostMapping
- @Log("新增营业计划")
- @ApiOperation("新增营业计划")
- @PreAuthorize("@el.check('businessPlan:add')")
- public ResponseEntity<Object> createBusinessPlan(@Validated @RequestBody BusinessPlanDto resources){
- return new ResponseEntity<>(businessPlanService.create(resources),HttpStatus.CREATED);
- }
-
- @PutMapping
- @Log("修改营业计划")
- @ApiOperation("修改营业计划")
- @PreAuthorize("@el.check('businessPlan:edit')")
- public ResponseEntity<Object> updateBusinessPlan(@Validated @RequestBody BusinessPlanDto resources){
- businessPlanService.update(resources);
- return new ResponseEntity<>(HttpStatus.NO_CONTENT);
- }
-
- @DeleteMapping
- @Log("删除营业计划")
- @ApiOperation("删除营业计划")
- @PreAuthorize("@el.check('businessPlan:del')")
- public ResponseEntity<Object> deleteBusinessPlan(@RequestBody Long[] ids) {
- businessPlanService.deleteAll(ids);
- return new ResponseEntity<>(HttpStatus.OK);
- }
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessPlanPersonnelController.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessPlanPersonnelController.java
deleted file mode 100644
index dc70b6b..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rest/BusinessPlanPersonnelController.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.rest;
-
-import me.zhengjie.annotation.Log;
-import me.zhengjie.modules.business.domain.BusinessPlanPersonnel;
-import me.zhengjie.modules.business.service.BusinessPlanPersonnelService;
-import me.zhengjie.modules.business.service.dto.BusinessPlanPersonnelQueryCriteria;
-import org.springframework.data.domain.Pageable;
-import lombok.RequiredArgsConstructor;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import io.swagger.annotations.*;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-12
-**/
-@RestController
-@RequiredArgsConstructor
-@Api(tags = "营业计划人员管理")
-@RequestMapping("/api/businessPlanPersonnel")
-public class BusinessPlanPersonnelController {
-
- private final BusinessPlanPersonnelService businessPlanPersonnelService;
-
- @Log("导出数据")
- @ApiOperation("导出数据")
- @GetMapping(value = "/download")
- @PreAuthorize("@el.check('businessPlanPersonnel:download')")
- public void exportBusinessPlanPersonnel(HttpServletResponse response, BusinessPlanPersonnelQueryCriteria criteria) throws IOException {
- businessPlanPersonnelService.download(businessPlanPersonnelService.queryAll(criteria), response);
- }
-
- @GetMapping
- @Log("查询营业计划人员")
- @ApiOperation("查询营业计划人员")
- @PreAuthorize("@el.check('businessPlanPersonnel:list')")
- public ResponseEntity<Object> queryBusinessPlanPersonnel(BusinessPlanPersonnelQueryCriteria criteria, Pageable pageable){
- return new ResponseEntity<>(businessPlanPersonnelService.queryAll(criteria,pageable),HttpStatus.OK);
- }
-
- @GetMapping(value = "/all")
- @Log("查询营业计划人员")
- @ApiOperation("查询营业计划人员")
- @PreAuthorize("@el.check('businessPlanPersonnel:list')")
- public ResponseEntity<Object> queryBusinessPlanPersonnel(BusinessPlanPersonnelQueryCriteria criteria){
- return new ResponseEntity<>(businessPlanPersonnelService.queryAll(criteria),HttpStatus.OK);
- }
-
- @PostMapping
- @Log("新增营业计划人员")
- @ApiOperation("新增营业计划人员")
- @PreAuthorize("@el.check('businessPlanPersonnel:add')")
- public ResponseEntity<Object> createBusinessPlanPersonnel(@Validated @RequestBody BusinessPlanPersonnel resources){
- return new ResponseEntity<>(businessPlanPersonnelService.create(resources),HttpStatus.CREATED);
- }
-
- @PutMapping
- @Log("修改营业计划人员")
- @ApiOperation("修改营业计划人员")
- @PreAuthorize("@el.check('businessPlanPersonnel:edit')")
- public ResponseEntity<Object> updateBusinessPlanPersonnel(@Validated @RequestBody BusinessPlanPersonnel resources){
- businessPlanPersonnelService.update(resources);
- return new ResponseEntity<>(HttpStatus.NO_CONTENT);
- }
-
- @DeleteMapping
- @Log("删除营业计划人员")
- @ApiOperation("删除营业计划人员")
- @PreAuthorize("@el.check('businessPlanPersonnel:del')")
- public ResponseEntity<Object> deleteBusinessPlanPersonnel(@RequestBody Long[] ids) {
- businessPlanPersonnelService.deleteAll(ids);
- return new ResponseEntity<>(HttpStatus.OK);
- }
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessExpenseFlowableService.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessExpenseFlowableService.java
deleted file mode 100644
index 97bdd2e..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessExpenseFlowableService.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service;
-
-import me.zhengjie.modules.business.service.dto.BusinessExpenseDto;
-
-import java.util.Map;
-
-/**
-* @website https://eladmin.vip
-* @description 服务接口
-* @author 赵士淞
-* @date 2023-04-13
-**/
-public interface BusinessExpenseFlowableService {
-
- /**
- * 我发起的
- * @return List<BusinessExpenseDto>
- */
- Map<String, Object> report() throws Exception;
-
- /**
- * 待审批的
- * @return List<BusinessExpenseDto>
- */
- Map<String, Object> approve() throws Exception;
-
- /**
- * 创建
- * @param resources /
- */
- void create(BusinessExpenseDto resources) throws Exception;
-
- /**
- * 同意
- * @param processInstanceId /
- */
- void agree(String processInstanceId) throws Exception;
-
- /**
- * 拒绝
- * @param processInstanceId /
- */
- void reject(String processInstanceId) throws Exception;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessExpenseReimbursementService.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessExpenseReimbursementService.java
deleted file mode 100644
index aae21bb..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessExpenseReimbursementService.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service;
-
-import me.zhengjie.modules.business.domain.BusinessExpenseReimbursement;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseReimbursementDto;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseReimbursementQueryCriteria;
-import org.springframework.data.domain.Pageable;
-import java.util.Map;
-import java.util.List;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-
-/**
-* @website https://eladmin.vip
-* @description 服务接口
-* @author 赵士淞
-* @date 2023-04-13
-**/
-public interface BusinessExpenseReimbursementService {
-
- /**
- * 查询数据分页
- * @param criteria 条件
- * @param pageable 分页参数
- * @return Map<String,Object>
- */
- Map<String,Object> queryAll(BusinessExpenseReimbursementQueryCriteria criteria, Pageable pageable);
-
- /**
- * 查询所有数据不分页
- * @param criteria 条件参数
- * @return List<BusinessExpenseReimbursementDto>
- */
- List<BusinessExpenseReimbursementDto> queryAll(BusinessExpenseReimbursementQueryCriteria criteria);
-
- /**
- * 根据ID查询
- * @param id ID
- * @return BusinessExpenseReimbursementDto
- */
- BusinessExpenseReimbursementDto findById(Long id);
-
- /**
- * 创建
- * @param resources /
- * @return BusinessExpenseReimbursementDto
- */
- BusinessExpenseReimbursementDto create(BusinessExpenseReimbursement resources);
-
- /**
- * 编辑
- * @param resources /
- */
- void update(BusinessExpenseReimbursement resources);
-
- /**
- * 多选删除
- * @param ids /
- */
- void deleteAll(Long[] ids);
-
- /**
- * 导出数据
- * @param all 待导出的数据
- * @param response /
- * @throws IOException /
- */
- void download(List<BusinessExpenseReimbursementDto> all, HttpServletResponse response) throws IOException;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessExpenseService.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessExpenseService.java
deleted file mode 100644
index 0cb914c..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessExpenseService.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service;
-
-import me.zhengjie.modules.business.domain.BusinessExpense;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseDto;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseQueryCriteria;
-import org.springframework.data.domain.Pageable;
-import java.util.Map;
-import java.util.List;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-
-/**
-* @website https://eladmin.vip
-* @description 服务接口
-* @author 赵士淞
-* @date 2023-04-13
-**/
-public interface BusinessExpenseService {
-
- /**
- * 查询数据分页
- * @param criteria 条件
- * @param pageable 分页参数
- * @return Map<String,Object>
- */
- Map<String,Object> queryAll(BusinessExpenseQueryCriteria criteria, Pageable pageable);
-
- /**
- * 查询所有数据不分页
- * @param criteria 条件参数
- * @return List<BusinessExpenseDto>
- */
- List<BusinessExpenseDto> queryAll(BusinessExpenseQueryCriteria criteria);
-
- /**
- * 根据ID查询
- * @param id ID
- * @return BusinessExpenseDto
- */
- BusinessExpenseDto findById(Long id);
-
- /**
- * 创建
- * @param resources /
- * @return BusinessExpenseDto
- */
- BusinessExpenseDto create(BusinessExpenseDto resources);
-
- /**
- * 编辑
- * @param resources /
- */
- void update(BusinessExpenseDto resources);
-
- /**
- * 多选删除
- * @param ids /
- */
- void deleteAll(Long[] ids);
-
- /**
- * 导出数据
- * @param all 待导出的数据
- * @param response /
- * @throws IOException /
- */
- void download(List<BusinessExpenseDto> all, HttpServletResponse response) throws IOException;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessPlanPersonnelService.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessPlanPersonnelService.java
deleted file mode 100644
index 91779dd..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessPlanPersonnelService.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service;
-
-import me.zhengjie.modules.business.domain.BusinessPlanPersonnel;
-import me.zhengjie.modules.business.service.dto.BusinessPlanPersonnelDto;
-import me.zhengjie.modules.business.service.dto.BusinessPlanPersonnelQueryCriteria;
-import org.springframework.data.domain.Pageable;
-import java.util.Map;
-import java.util.List;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-
-/**
-* @website https://eladmin.vip
-* @description 服务接口
-* @author 赵士淞
-* @date 2023-04-12
-**/
-public interface BusinessPlanPersonnelService {
-
- /**
- * 查询数据分页
- * @param criteria 条件
- * @param pageable 分页参数
- * @return Map<String,Object>
- */
- Map<String,Object> queryAll(BusinessPlanPersonnelQueryCriteria criteria, Pageable pageable);
-
- /**
- * 查询所有数据不分页
- * @param criteria 条件参数
- * @return List<BusinessPlanPersonnelDto>
- */
- List<BusinessPlanPersonnelDto> queryAll(BusinessPlanPersonnelQueryCriteria criteria);
-
- /**
- * 根据ID查询
- * @param id ID
- * @return BusinessPlanPersonnelDto
- */
- BusinessPlanPersonnelDto findById(Long id);
-
- /**
- * 创建
- * @param resources /
- * @return BusinessPlanPersonnelDto
- */
- BusinessPlanPersonnelDto create(BusinessPlanPersonnel resources);
-
- /**
- * 编辑
- * @param resources /
- */
- void update(BusinessPlanPersonnel resources);
-
- /**
- * 多选删除
- * @param ids /
- */
- void deleteAll(Long[] ids);
-
- /**
- * 导出数据
- * @param all 待导出的数据
- * @param response /
- * @throws IOException /
- */
- void download(List<BusinessPlanPersonnelDto> all, HttpServletResponse response) throws IOException;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessPlanService.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessPlanService.java
deleted file mode 100644
index 42a8e6c..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/BusinessPlanService.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service;
-
-import me.zhengjie.modules.business.domain.BusinessPlan;
-import me.zhengjie.modules.business.service.dto.BusinessPlanDto;
-import me.zhengjie.modules.business.service.dto.BusinessPlanQueryCriteria;
-import org.springframework.data.domain.Pageable;
-import java.util.Map;
-import java.util.List;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-
-/**
-* @website https://eladmin.vip
-* @description 服务接口
-* @author 赵士淞
-* @date 2023-04-12
-**/
-public interface BusinessPlanService {
-
- /**
- * 查询数据分页
- * @param criteria 条件
- * @param pageable 分页参数
- * @return Map<String,Object>
- */
- Map<String,Object> queryAll(BusinessPlanQueryCriteria criteria, Pageable pageable);
-
- /**
- * 查询所有数据不分页
- * @param criteria 条件参数
- * @return List<BusinessPlanDto>
- */
- List<BusinessPlanDto> queryAll(BusinessPlanQueryCriteria criteria);
-
- /**
- * 根据ID查询
- * @param id ID
- * @return BusinessPlanDto
- */
- BusinessPlanDto findById(Long id);
-
- /**
- * 创建
- * @param resources /
- * @return BusinessPlanDto
- */
- BusinessPlanDto create(BusinessPlanDto resources);
-
- /**
- * 编辑
- * @param resources /
- */
- void update(BusinessPlanDto resources);
-
- /**
- * 多选删除
- * @param ids /
- */
- void deleteAll(Long[] ids);
-
- /**
- * 导出数据
- * @param all 待导出的数据
- * @param response /
- * @throws IOException /
- */
- void download(List<BusinessPlanDto> all, HttpServletResponse response) throws IOException;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseDto.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseDto.java
deleted file mode 100644
index 4128baf..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseDto.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.dto;
-
-import lombok.Data;
-import me.zhengjie.base.BaseDTO;
-import me.zhengjie.modules.business.domain.BusinessExpenseReimbursement;
-
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-import java.io.Serializable;
-import java.util.List;
-
-/**
-* @website https://eladmin.vip
-* @description /
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@Data
-public class BusinessExpenseDto extends BaseDTO implements Serializable {
-
- /** ID */
- private Long id;
-
- /** 费用类型 */
- private String expenseType;
-
- /** 所属营业计划 */
- private Long businessPlanId;
-
- /** 所属营业计划内容 */
- private String businessPlanContent;
-
- /** 所属项目 */
- private Long projectId;
-
- /** 所属项目名称 */
- private String projectName;
-
- /** 备注 */
- private String remarks;
-
- /** 营业费用明细列表 */
- private List<BusinessExpenseReimbursementDto> businessExpenseReimbursementDtoList;
-
- /** 报销金额总计 */
- private BigDecimal amountReimbursementAmount;
-
- /** 流程实例ID */
- private String processInstanceId;
-
- /** 审批状态 */
- private String approve;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseQueryCriteria.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseQueryCriteria.java
deleted file mode 100644
index a0bcaae..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseQueryCriteria.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.dto;
-
-import lombok.Data;
-import java.util.List;
-import me.zhengjie.annotation.Query;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@Data
-public class BusinessExpenseQueryCriteria{
-
- /** 精确 */
- @Query
- private String expenseType;
-
- /** 精确 */
- @Query
- private Long businessPlanId;
-
- /** 精确 */
- @Query
- private Long projectId;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseReimbursementDto.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseReimbursementDto.java
deleted file mode 100644
index 98da402..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseReimbursementDto.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.dto;
-
-import lombok.Data;
-import me.zhengjie.base.BaseDTO;
-
-import java.sql.Timestamp;
-import java.math.BigDecimal;
-import java.io.Serializable;
-
-/**
-* @website https://eladmin.vip
-* @description /
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@Data
-public class BusinessExpenseReimbursementDto extends BaseDTO implements Serializable {
-
- /** ID */
- private Long id;
-
- /** 所属营业费用 */
- private Long businessExpenseId;
-
- /** 所属营业费用类型 */
- private String businessExpenseType;
-
- /** 报销内容 */
- private String reimbursementContent;
-
- /** 报销金额 */
- private BigDecimal reimbursementAmount;
-
- /** 报销凭证 */
- private String reimbursementVoucher;
-
- /** 备注 */
- private String remarks;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseReimbursementQueryCriteria.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseReimbursementQueryCriteria.java
deleted file mode 100644
index 0a026b8..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessExpenseReimbursementQueryCriteria.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.dto;
-
-import lombok.Data;
-import java.util.List;
-import me.zhengjie.annotation.Query;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@Data
-public class BusinessExpenseReimbursementQueryCriteria{
-
- /** 精确 */
- @Query
- private Long businessExpenseId;
-
- /** 模糊 */
- @Query(type = Query.Type.INNER_LIKE)
- private String reimbursementContent;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessPlanDto.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessPlanDto.java
deleted file mode 100644
index 84d4915..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessPlanDto.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.dto;
-
-import lombok.Data;
-import me.zhengjie.base.BaseDTO;
-
-import java.sql.Timestamp;
-import java.io.Serializable;
-import java.util.List;
-
-/**
-* @website https://eladmin.vip
-* @description /
-* @author 赵士淞
-* @date 2023-04-12
-**/
-@Data
-public class BusinessPlanDto extends BaseDTO implements Serializable {
-
- /** ID */
- private Long id;
-
- /** 营业地 */
- private String businessPlace;
-
- /** 营业内容 */
- private String businessContent;
-
- /** 营业状态 */
- private String businessStatus;
-
- /** 备注 */
- private String remarks;
-
- /** 营业计划人员列表 */
- private List<BusinessPlanPersonnelDto> businessPlanPersonnelDtoList;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessPlanPersonnelDto.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessPlanPersonnelDto.java
deleted file mode 100644
index 934fc1e..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessPlanPersonnelDto.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.dto;
-
-import lombok.Data;
-import me.zhengjie.base.BaseDTO;
-
-import java.sql.Timestamp;
-import java.io.Serializable;
-
-/**
-* @website https://eladmin.vip
-* @description /
-* @author 赵士淞
-* @date 2023-04-12
-**/
-@Data
-public class BusinessPlanPersonnelDto extends BaseDTO implements Serializable {
-
- /** ID */
- private Long id;
-
- /** 所属营业计划 */
- private Long businessPlanId;
-
- /** 所属营业计划内容 */
- private String businessPlanContent;
-
- /** 所属用户 */
- private Long userId;
-
- /** 所属用户昵称 */
- private String userNickName;
-
- /** 营业计划开始日期 */
- private Timestamp businessPlanStartDate;
-
- /** 营业计划结束日期 */
- private Timestamp businessPlanEndDate;
-
- /** 备注 */
- private String remarks;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessPlanPersonnelQueryCriteria.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessPlanPersonnelQueryCriteria.java
deleted file mode 100644
index c01eb72..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessPlanPersonnelQueryCriteria.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.dto;
-
-import lombok.Data;
-import java.util.List;
-import me.zhengjie.annotation.Query;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-12
-**/
-@Data
-public class BusinessPlanPersonnelQueryCriteria{
-
- /** 精确 */
- @Query
- private Long businessPlanId;
-
- /** 精确 */
- @Query
- private Long userId;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessPlanQueryCriteria.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessPlanQueryCriteria.java
deleted file mode 100644
index 38d99ab..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/dto/BusinessPlanQueryCriteria.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.dto;
-
-import lombok.Data;
-import java.util.List;
-import me.zhengjie.annotation.Query;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-12
-**/
-@Data
-public class BusinessPlanQueryCriteria{
-
- /** 模糊 */
- @Query(type = Query.Type.INNER_LIKE)
- private String businessPlace;
-
- /** 模糊 */
- @Query(type = Query.Type.INNER_LIKE)
- private String businessContent;
-
- /** 精确 */
- @Query
- private String businessStatus;
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseReimbursementServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseReimbursementServiceImpl.java
deleted file mode 100644
index 53477b5..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseReimbursementServiceImpl.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.impl;
-
-import me.zhengjie.modules.business.domain.BusinessExpense;
-import me.zhengjie.modules.business.domain.BusinessExpenseReimbursement;
-import me.zhengjie.modules.business.repository.BusinessExpenseRepository;
-import me.zhengjie.utils.ValidationUtil;
-import me.zhengjie.utils.FileUtil;
-import lombok.RequiredArgsConstructor;
-import me.zhengjie.modules.business.repository.BusinessExpenseReimbursementRepository;
-import me.zhengjie.modules.business.service.BusinessExpenseReimbursementService;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseReimbursementDto;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseReimbursementQueryCriteria;
-import me.zhengjie.modules.business.service.mapstruct.BusinessExpenseReimbursementMapper;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-import me.zhengjie.utils.PageUtil;
-import me.zhengjie.utils.QueryHelp;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.function.Function;
-
-/**
-* @website https://eladmin.vip
-* @description 服务实现
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@Service
-@RequiredArgsConstructor
-public class BusinessExpenseReimbursementServiceImpl implements BusinessExpenseReimbursementService {
-
- private final BusinessExpenseReimbursementRepository businessExpenseReimbursementRepository;
- private final BusinessExpenseReimbursementMapper businessExpenseReimbursementMapper;
- private final BusinessExpenseRepository businessExpenseRepository;
-
- @Override
- public Map<String,Object> queryAll(BusinessExpenseReimbursementQueryCriteria criteria, Pageable pageable){
- Page<BusinessExpenseReimbursement> page = businessExpenseReimbursementRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
- // 将实体类转换为DTO(重写)
- Function<BusinessExpenseReimbursement, BusinessExpenseReimbursementDto> func = new Function<BusinessExpenseReimbursement, BusinessExpenseReimbursementDto>(){
- @Override
- public BusinessExpenseReimbursementDto apply(BusinessExpenseReimbursement t) {
- // 将实体类转换成DTO
- BusinessExpenseReimbursementDto businessExpenseReimbursementDto = businessExpenseReimbursementMapper.toDto(t);
-
- // 获取营业费用
- BusinessExpense businessExpense = businessExpenseRepository.findById(businessExpenseReimbursementDto.getBusinessExpenseId()).orElseGet(BusinessExpense::new);
- businessExpenseReimbursementDto.setBusinessExpenseType(businessExpense.getExpenseType());
-
- // 返回处理好的DTO
- return businessExpenseReimbursementDto;
- }
- };
- return PageUtil.toPage(page.map(func));
- }
-
- @Override
- public List<BusinessExpenseReimbursementDto> queryAll(BusinessExpenseReimbursementQueryCriteria criteria){
- return businessExpenseReimbursementMapper.toDto(businessExpenseReimbursementRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
- }
-
- @Override
- @Transactional
- public BusinessExpenseReimbursementDto findById(Long id) {
- BusinessExpenseReimbursement businessExpenseReimbursement = businessExpenseReimbursementRepository.findById(id).orElseGet(BusinessExpenseReimbursement::new);
- ValidationUtil.isNull(businessExpenseReimbursement.getId(),"BusinessExpenseReimbursement","id",id);
- return businessExpenseReimbursementMapper.toDto(businessExpenseReimbursement);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public BusinessExpenseReimbursementDto create(BusinessExpenseReimbursement resources) {
- return businessExpenseReimbursementMapper.toDto(businessExpenseReimbursementRepository.save(resources));
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void update(BusinessExpenseReimbursement resources) {
- BusinessExpenseReimbursement businessExpenseReimbursement = businessExpenseReimbursementRepository.findById(resources.getId()).orElseGet(BusinessExpenseReimbursement::new);
- ValidationUtil.isNull( businessExpenseReimbursement.getId(),"BusinessExpenseReimbursement","id",resources.getId());
- businessExpenseReimbursement.copy(resources);
- businessExpenseReimbursementRepository.save(businessExpenseReimbursement);
- }
-
- @Override
- public void deleteAll(Long[] ids) {
- for (Long id : ids) {
- businessExpenseReimbursementRepository.deleteById(id);
- }
- }
-
- @Override
- public void download(List<BusinessExpenseReimbursementDto> all, HttpServletResponse response) throws IOException {
- List<Map<String, Object>> list = new ArrayList<>();
- for (BusinessExpenseReimbursementDto businessExpenseReimbursement : all) {
- Map<String,Object> map = new LinkedHashMap<>();
- map.put("所属营业费用", businessExpenseReimbursement.getBusinessExpenseId());
- map.put("报销内容", businessExpenseReimbursement.getReimbursementContent());
- map.put("报销金额", businessExpenseReimbursement.getReimbursementAmount());
- map.put("报销凭证", businessExpenseReimbursement.getReimbursementVoucher());
- map.put("备注", businessExpenseReimbursement.getRemarks());
- map.put("创建者", businessExpenseReimbursement.getCreateBy());
- map.put("创建时间", businessExpenseReimbursement.getCreateTime());
- map.put("更新者", businessExpenseReimbursement.getUpdateBy());
- map.put("更新时间", businessExpenseReimbursement.getUpdateTime());
- list.add(map);
- }
- FileUtil.downloadExcel(list, response);
- }
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseServiceFlowableImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseServiceFlowableImpl.java
deleted file mode 100644
index 2b82190..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseServiceFlowableImpl.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.impl;
-
-import com.alibaba.fastjson.JSONArray;
-import lombok.RequiredArgsConstructor;
-import me.zhengjie.modules.api.Api;
-import me.zhengjie.modules.business.service.BusinessExpenseFlowableService;
-import me.zhengjie.modules.business.service.BusinessPlanService;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseDto;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseReimbursementDto;
-import me.zhengjie.modules.business.service.dto.BusinessPlanDto;
-import me.zhengjie.modules.constant.Constant;
-import me.zhengjie.modules.project.service.ProjectService;
-import me.zhengjie.modules.project.service.dto.ProjectDto;
-import me.zhengjie.modules.system.domain.Role;
-import me.zhengjie.modules.system.domain.User;
-import me.zhengjie.modules.system.repository.RoleRepository;
-import me.zhengjie.modules.system.repository.UserRepository;
-import me.zhengjie.utils.ObjectUtil;
-import me.zhengjie.utils.SecurityUtils;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.math.BigDecimal;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
-* @website https://eladmin.vip
-* @description 服务实现
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@Service
-@RequiredArgsConstructor
-public class BusinessExpenseServiceFlowableImpl implements BusinessExpenseFlowableService {
-
- @Value("${flowable.url}")
- private String flowableUrl;
-
- private final Api api;
- private final BusinessPlanService businessPlanService;
- private final ProjectService projectService;
- private final RoleRepository roleRepository;
- private final UserRepository userRepository;
-
- /**
- * 我发起的
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Map<String, Object> report() throws Exception {
- // 发起通信
- Object returnObject = api.post(flowableUrl + "/api/common/report?key=" + "businessExpenseApply" + "&userId=" + SecurityUtils.getCurrentUserId(), new HashMap<>());
- // 查询处理
- return queryHandle(returnObject);
- }
-
- /**
- * 待审批的
- * @return
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Map<String, Object> approve() throws Exception {
- // 发起通信
- Object returnObject = api.post(flowableUrl + "/api/common/approve?key=" + "businessExpenseApply" + "&userId=" + SecurityUtils.getCurrentUserId(), new HashMap<>());
- // 查询处理
- return queryHandle(returnObject);
- }
-
- /**
- * 查询处理
- * @param returnObject
- * @return
- */
- private Map<String, Object> queryHandle(Object returnObject) {
- // 返回结果
- Map<String, Object> returnMap = new HashMap<>();
- // 通信结果转DTO
- List<BusinessExpenseDto> businessExpenseDtoList = ((JSONArray) returnObject).toJavaList(BusinessExpenseDto.class);
- // 循环DTO
- for (BusinessExpenseDto businessExpenseDto : businessExpenseDtoList) {
- // 获取营业计划
- BusinessPlanDto businessPlanDto = businessPlanService.findById(businessExpenseDto.getBusinessPlanId());
- businessExpenseDto.setBusinessPlanContent(businessPlanDto.getBusinessContent());
- // 获取项目
- if (businessExpenseDto.getProjectId() != null) {
- ProjectDto projectDto = projectService.findById(businessExpenseDto.getProjectId());
- businessExpenseDto.setProjectName(projectDto.getName());
- }
- // 报销金额总计
- BigDecimal amountReimbursementAmount = new BigDecimal(0);
- // 获取营业费用明细
- List<BusinessExpenseReimbursementDto> businessExpenseReimbursementDtoList = businessExpenseDto.getBusinessExpenseReimbursementDtoList();
- for (BusinessExpenseReimbursementDto businessExpenseReimbursementDto : businessExpenseReimbursementDtoList) {
- amountReimbursementAmount = amountReimbursementAmount.add(businessExpenseReimbursementDto.getReimbursementAmount());
- }
- businessExpenseDto.setAmountReimbursementAmount(amountReimbursementAmount);
- }
- // 返回结果
- returnMap.put("content", businessExpenseDtoList);
- returnMap.put("totalElements", businessExpenseDtoList.size());
- return returnMap;
- }
-
- /**
- * 创建
- * @param resources /
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void create(BusinessExpenseDto resources) throws Exception {
- // 查询指定角色
- Role role = roleRepository.findByLevel(Constant.ROLE_LEVEL_FINANCE.intValue());
- // 查询指定角色用户
- List<User> userList = userRepository.findByRoleId(role.getId());
- // 审批人字符串
- String approver = "";
- // 循环指定角色用户
- for (int i = 0; i < userList.size(); i ++) {
- if (i == 0) {
- // 审批人字符串
- approver = userList.get(i).getId().toString();
- } else {
- // 审批人字符串
- approver += "," + userList.get(i).getId().toString();
- }
- }
- // 参数
- Map<String, Object> params = ObjectUtil.toObjectMap(resources);
- params.put("approver", approver);
- // 发起通信
- api.post(flowableUrl + "/api/common/run?key=" + "businessExpenseApply" + "&userId=" + SecurityUtils.getCurrentUserId(), params);
- }
-
- /**
- * 同意
- * @param processInstanceId /
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void agree(String processInstanceId) throws Exception {
- // 参数
- Map<String, Object> paramsMap = new HashMap<>();
- paramsMap.put("approve", "true");
- // 发起通信
- api.post(flowableUrl + "/api/common/next?processInstanceId=" + processInstanceId, paramsMap);
- }
-
- /**
- * 拒绝
- * @param processInstanceId /
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void reject(String processInstanceId) throws Exception {
- // 参数
- Map<String, Object> paramsMap = new HashMap<>();
- paramsMap.put("approve", "false");
- // 发起通信
- api.post(flowableUrl + "/api/common/next?processInstanceId=" + processInstanceId, paramsMap);
- }
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseServiceImpl.java
deleted file mode 100644
index 05de1a1..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessExpenseServiceImpl.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.impl;
-
-import me.zhengjie.modules.business.domain.BusinessExpense;
-import me.zhengjie.modules.business.domain.BusinessExpenseReimbursement;
-import me.zhengjie.modules.business.repository.BusinessExpenseReimbursementRepository;
-import me.zhengjie.modules.business.service.BusinessExpenseReimbursementService;
-import me.zhengjie.modules.business.service.BusinessPlanService;
-import me.zhengjie.modules.business.service.dto.*;
-import me.zhengjie.modules.business.service.mapstruct.BusinessExpenseReimbursementMapper;
-import me.zhengjie.modules.capitalFlow.service.CapitalFlowExpendService;
-import me.zhengjie.modules.constant.Constant;
-import me.zhengjie.modules.project.service.ProjectService;
-import me.zhengjie.modules.project.service.dto.ProjectDto;
-import me.zhengjie.modules.system.domain.DictDetail;
-import me.zhengjie.modules.system.repository.DictDetailRepository;
-import me.zhengjie.utils.ValidationUtil;
-import me.zhengjie.utils.FileUtil;
-import lombok.RequiredArgsConstructor;
-import me.zhengjie.modules.business.repository.BusinessExpenseRepository;
-import me.zhengjie.modules.business.service.BusinessExpenseService;
-import me.zhengjie.modules.business.service.mapstruct.BusinessExpenseMapper;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-import me.zhengjie.utils.PageUtil;
-import me.zhengjie.utils.QueryHelp;
-
-import java.math.BigDecimal;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.function.Function;
-
-/**
-* @website https://eladmin.vip
-* @description 服务实现
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@Service
-@RequiredArgsConstructor
-public class BusinessExpenseServiceImpl implements BusinessExpenseService {
-
- private final BusinessExpenseRepository businessExpenseRepository;
- private final BusinessExpenseMapper businessExpenseMapper;
- private final BusinessPlanService businessPlanService;
- private final ProjectService projectService;
- private final BusinessExpenseReimbursementRepository businessExpenseReimbursementRepository;
- private final BusinessExpenseReimbursementMapper businessExpenseReimbursementMapper;
- private final CapitalFlowExpendService capitalFlowExpendService;
- private final DictDetailRepository dictDetailRepository;
- private final BusinessExpenseReimbursementService businessExpenseReimbursementService;
-
- @Override
- public Map<String,Object> queryAll(BusinessExpenseQueryCriteria criteria, Pageable pageable){
- Page<BusinessExpense> page = businessExpenseRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
- // 将实体类转换为DTO(重写)
- Function<BusinessExpense, BusinessExpenseDto> func = new Function<BusinessExpense, BusinessExpenseDto>(){
- @Override
- public BusinessExpenseDto apply(BusinessExpense t) {
- // 将实体类转换成DTO
- BusinessExpenseDto businessExpenseDto = businessExpenseMapper.toDto(t);
-
- // 获取营业计划
- BusinessPlanDto businessPlanDto = businessPlanService.findById(businessExpenseDto.getBusinessPlanId());
- businessExpenseDto.setBusinessPlanContent(businessPlanDto.getBusinessContent());
- // 获取项目
- if (businessExpenseDto.getProjectId() != null) {
- ProjectDto projectDto = projectService.findById(businessExpenseDto.getProjectId());
- businessExpenseDto.setProjectName(projectDto.getName());
- }
- // 获取营业费用明细
- List<BusinessExpenseReimbursement> businessExpenseReimbursementList = businessExpenseReimbursementRepository.findByBusinessExpenseId(businessExpenseDto.getId());
- businessExpenseDto.setBusinessExpenseReimbursementDtoList(businessExpenseReimbursementMapper.toDto(businessExpenseReimbursementList));
- // 获取报销金额总计
- BigDecimal amountReimbursementAmount = businessExpenseReimbursementRepository.amountReimbursementAmountByBusinessExpenseId(businessExpenseDto.getId());
- businessExpenseDto.setAmountReimbursementAmount(amountReimbursementAmount);
-
- // 返回处理好的DTO
- return businessExpenseDto;
- }
- };
- return PageUtil.toPage(page.map(func));
- }
-
- @Override
- public List<BusinessExpenseDto> queryAll(BusinessExpenseQueryCriteria criteria){
- return businessExpenseMapper.toDto(businessExpenseRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
- }
-
- @Override
- @Transactional
- public BusinessExpenseDto findById(Long id) {
- BusinessExpense businessExpense = businessExpenseRepository.findById(id).orElseGet(BusinessExpense::new);
- ValidationUtil.isNull(businessExpense.getId(),"BusinessExpense","id",id);
- return businessExpenseMapper.toDto(businessExpense);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public BusinessExpenseDto create(BusinessExpenseDto resources) {
- // 保存营业费用
- BusinessExpense businessExpense = businessExpenseRepository.save(businessExpenseMapper.toEntity(resources));
- // 保存相关营业费用明细
- saveBusinessExpenseReimbursement(resources.getBusinessExpenseReimbursementDtoList(), businessExpense.getId());
- // 关联新增
- accountCreate(resources);
- return findById(businessExpense.getId());
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void update(BusinessExpenseDto resources) {
- BusinessExpense businessExpense = businessExpenseRepository.findById(resources.getId()).orElseGet(BusinessExpense::new);
- ValidationUtil.isNull( businessExpense.getId(),"BusinessExpense","id",resources.getId());
- // 关联删除
- accountDelete(businessExpense);
- businessExpense.copy(businessExpenseMapper.toEntity(resources));
- businessExpenseRepository.save(businessExpense);
- // 保存相关营业费用明细
- saveBusinessExpenseReimbursement(resources.getBusinessExpenseReimbursementDtoList(), businessExpense.getId());
- // 实体类 转 DTO
- BusinessExpenseDto businessExpenseDto = businessExpenseMapper.toDto(businessExpense);
- businessExpenseDto.setBusinessExpenseReimbursementDtoList(resources.getBusinessExpenseReimbursementDtoList());
- // 关联新增
- accountCreate(businessExpenseDto);
- }
-
- /**
- * 保存相关营业费用明细
- * @param businessExpenseReimbursementDtoList
- * @param businessExpenseId
- */
- private void saveBusinessExpenseReimbursement(List<BusinessExpenseReimbursementDto> businessExpenseReimbursementDtoList, Long businessExpenseId) {
- // 根据营业费用ID删除营业费用明细
- businessExpenseReimbursementRepository.deleteByBusinessExpenseId(businessExpenseId);
- // 营业费用明细列表
- List<BusinessExpenseReimbursement> businessExpenseReimbursementList = businessExpenseReimbursementMapper.toEntity(businessExpenseReimbursementDtoList);
- // 循环营业费用明细列表
- for (BusinessExpenseReimbursement businessExpenseReimbursement : businessExpenseReimbursementList) {
- // 营业费用明细
- businessExpenseReimbursement.setBusinessExpenseId(businessExpenseId);
- // 保存营业费用明细
- businessExpenseReimbursementRepository.save(businessExpenseReimbursement);
- }
- }
-
- @Override
- public void deleteAll(Long[] ids) {
- for (Long id : ids) {
- BusinessExpense businessExpense = businessExpenseRepository.findById(id).orElseGet(BusinessExpense::new);
- ValidationUtil.isNull( businessExpense.getId(),"BusinessExpense","id",id);
- // 关联删除
- accountDelete(businessExpense);
- businessExpenseRepository.deleteById(id);
- }
- }
-
- @Override
- public void download(List<BusinessExpenseDto> all, HttpServletResponse response) throws IOException {
- List<Map<String, Object>> list = new ArrayList<>();
- for (BusinessExpenseDto businessExpense : all) {
- Map<String,Object> map = new LinkedHashMap<>();
- map.put("费用类型", businessExpense.getExpenseType());
- map.put("所属营业计划", businessExpense.getBusinessPlanId());
- map.put("所属项目", businessExpense.getProjectId());
- map.put("备注", businessExpense.getRemarks());
- map.put("创建者", businessExpense.getCreateBy());
- map.put("创建时间", businessExpense.getCreateTime());
- map.put("更新者", businessExpense.getUpdateBy());
- map.put("更新时间", businessExpense.getUpdateTime());
- list.add(map);
- }
- FileUtil.downloadExcel(list, response);
- }
-
- /**
- * 关联创建
- * @param resources
- */
- private void accountCreate(BusinessExpenseDto resources) {
- // 营业计划
- BusinessPlanDto businessPlanDto = businessPlanService.findById(resources.getBusinessPlanId());
- // 费用类型
- DictDetail dictDetail = dictDetailRepository.findByDictNameAndValue(Constant.EXPENSE_TYPE, resources.getExpenseType());
- // 费用金额
- BigDecimal amount = new BigDecimal(0);
- for (BusinessExpenseReimbursementDto businessExpenseReimbursementDto : resources.getBusinessExpenseReimbursementDtoList()) {
- amount = amount.add(businessExpenseReimbursementDto.getReimbursementAmount());
- }
- // 关联创建
- capitalFlowExpendService.flowableCreate(Constant.ACCOUNT_TYPE_QIYUAN, businessPlanDto.getBusinessContent() + " - " + dictDetail.getLabel(), amount);
- }
-
- /**
- * 关联删除
- * @param resources
- */
- private void accountDelete(BusinessExpense resources) {
- // 营业计划
- BusinessPlanDto businessPlanDto = businessPlanService.findById(resources.getBusinessPlanId());
- // 费用类型
- DictDetail dictDetail = dictDetailRepository.findByDictNameAndValue(Constant.EXPENSE_TYPE, resources.getExpenseType());
- // 费用金额
- BigDecimal amount = new BigDecimal(0);
- BusinessExpenseReimbursementQueryCriteria businessExpenseReimbursementQueryCriteria = new BusinessExpenseReimbursementQueryCriteria();
- businessExpenseReimbursementQueryCriteria.setBusinessExpenseId(resources.getId());
- List<BusinessExpenseReimbursementDto> businessExpenseReimbursementDtoList = businessExpenseReimbursementService.queryAll(businessExpenseReimbursementQueryCriteria);
- for (BusinessExpenseReimbursementDto businessExpenseReimbursementDto : businessExpenseReimbursementDtoList) {
- amount = amount.add(businessExpenseReimbursementDto.getReimbursementAmount());
- }
- // 关联删除
- capitalFlowExpendService.flowableDelete(Constant.ACCOUNT_TYPE_QIYUAN, businessPlanDto.getBusinessContent() + " - " + dictDetail.getLabel(), amount);
- }
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessPlanPersonnelServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessPlanPersonnelServiceImpl.java
deleted file mode 100644
index 288c87f..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessPlanPersonnelServiceImpl.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.impl;
-
-import me.zhengjie.modules.business.domain.BusinessPlanPersonnel;
-import me.zhengjie.modules.business.service.BusinessPlanService;
-import me.zhengjie.modules.business.service.dto.BusinessPlanDto;
-import me.zhengjie.modules.system.service.UserService;
-import me.zhengjie.modules.system.service.dto.UserDto;
-import me.zhengjie.utils.ValidationUtil;
-import me.zhengjie.utils.FileUtil;
-import lombok.RequiredArgsConstructor;
-import me.zhengjie.modules.business.repository.BusinessPlanPersonnelRepository;
-import me.zhengjie.modules.business.service.BusinessPlanPersonnelService;
-import me.zhengjie.modules.business.service.dto.BusinessPlanPersonnelDto;
-import me.zhengjie.modules.business.service.dto.BusinessPlanPersonnelQueryCriteria;
-import me.zhengjie.modules.business.service.mapstruct.BusinessPlanPersonnelMapper;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-import me.zhengjie.utils.PageUtil;
-import me.zhengjie.utils.QueryHelp;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.function.Function;
-
-/**
-* @website https://eladmin.vip
-* @description 服务实现
-* @author 赵士淞
-* @date 2023-04-12
-**/
-@Service
-@RequiredArgsConstructor
-public class BusinessPlanPersonnelServiceImpl implements BusinessPlanPersonnelService {
-
- private final BusinessPlanPersonnelRepository businessPlanPersonnelRepository;
- private final BusinessPlanPersonnelMapper businessPlanPersonnelMapper;
- private final BusinessPlanService businessPlanService;
- private final UserService userService;
-
- @Override
- public Map<String,Object> queryAll(BusinessPlanPersonnelQueryCriteria criteria, Pageable pageable){
- Page<BusinessPlanPersonnel> page = businessPlanPersonnelRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
- // 将实体类转换为DTO(重写)
- Function<BusinessPlanPersonnel, BusinessPlanPersonnelDto> func = new Function<BusinessPlanPersonnel, BusinessPlanPersonnelDto>(){
- @Override
- public BusinessPlanPersonnelDto apply(BusinessPlanPersonnel t) {
- // 将实体类转换成DTO
- BusinessPlanPersonnelDto businessPlanPersonnelDto = businessPlanPersonnelMapper.toDto(t);
-
- // 获取营业计划
- BusinessPlanDto businessPlanDto = businessPlanService.findById(businessPlanPersonnelDto.getBusinessPlanId());
- businessPlanPersonnelDto.setBusinessPlanContent(businessPlanDto.getBusinessContent());
- // 获取用户
- UserDto userDto = userService.findById(businessPlanPersonnelDto.getUserId());
- businessPlanPersonnelDto.setUserNickName(userDto.getNickName());
-
- // 返回处理好的DTO
- return businessPlanPersonnelDto;
- }
- };
- return PageUtil.toPage(page.map(func));
- }
-
- @Override
- public List<BusinessPlanPersonnelDto> queryAll(BusinessPlanPersonnelQueryCriteria criteria){
- return businessPlanPersonnelMapper.toDto(businessPlanPersonnelRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
- }
-
- @Override
- @Transactional
- public BusinessPlanPersonnelDto findById(Long id) {
- BusinessPlanPersonnel businessPlanPersonnel = businessPlanPersonnelRepository.findById(id).orElseGet(BusinessPlanPersonnel::new);
- ValidationUtil.isNull(businessPlanPersonnel.getId(),"BusinessPlanPersonnel","id",id);
- return businessPlanPersonnelMapper.toDto(businessPlanPersonnel);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public BusinessPlanPersonnelDto create(BusinessPlanPersonnel resources) {
- return businessPlanPersonnelMapper.toDto(businessPlanPersonnelRepository.save(resources));
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void update(BusinessPlanPersonnel resources) {
- BusinessPlanPersonnel businessPlanPersonnel = businessPlanPersonnelRepository.findById(resources.getId()).orElseGet(BusinessPlanPersonnel::new);
- ValidationUtil.isNull( businessPlanPersonnel.getId(),"BusinessPlanPersonnel","id",resources.getId());
- businessPlanPersonnel.copy(resources);
- businessPlanPersonnelRepository.save(businessPlanPersonnel);
- }
-
- @Override
- public void deleteAll(Long[] ids) {
- for (Long id : ids) {
- businessPlanPersonnelRepository.deleteById(id);
- }
- }
-
- @Override
- public void download(List<BusinessPlanPersonnelDto> all, HttpServletResponse response) throws IOException {
- List<Map<String, Object>> list = new ArrayList<>();
- for (BusinessPlanPersonnelDto businessPlanPersonnel : all) {
- Map<String,Object> map = new LinkedHashMap<>();
- map.put("所属营业计划", businessPlanPersonnel.getBusinessPlanId());
- map.put("所属用户", businessPlanPersonnel.getUserId());
- map.put("营业计划开始日期", businessPlanPersonnel.getBusinessPlanStartDate());
- map.put("营业计划结束日期", businessPlanPersonnel.getBusinessPlanEndDate());
- map.put("备注", businessPlanPersonnel.getRemarks());
- map.put("创建者", businessPlanPersonnel.getCreateBy());
- map.put("创建时间", businessPlanPersonnel.getCreateTime());
- map.put("更新者", businessPlanPersonnel.getUpdateBy());
- map.put("更新时间", businessPlanPersonnel.getUpdateTime());
- list.add(map);
- }
- FileUtil.downloadExcel(list, response);
- }
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessPlanServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessPlanServiceImpl.java
deleted file mode 100644
index c56ebbb..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/impl/BusinessPlanServiceImpl.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.impl;
-
-import me.zhengjie.modules.business.domain.BusinessPlan;
-import me.zhengjie.modules.business.domain.BusinessPlanPersonnel;
-import me.zhengjie.modules.business.repository.BusinessPlanPersonnelRepository;
-import me.zhengjie.modules.business.service.dto.BusinessPlanPersonnelDto;
-import me.zhengjie.modules.business.service.mapstruct.BusinessPlanPersonnelMapper;
-import me.zhengjie.modules.system.service.UserService;
-import me.zhengjie.modules.system.service.dto.UserDto;
-import me.zhengjie.utils.ValidationUtil;
-import me.zhengjie.utils.FileUtil;
-import lombok.RequiredArgsConstructor;
-import me.zhengjie.modules.business.repository.BusinessPlanRepository;
-import me.zhengjie.modules.business.service.BusinessPlanService;
-import me.zhengjie.modules.business.service.dto.BusinessPlanDto;
-import me.zhengjie.modules.business.service.dto.BusinessPlanQueryCriteria;
-import me.zhengjie.modules.business.service.mapstruct.BusinessPlanMapper;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-import me.zhengjie.utils.PageUtil;
-import me.zhengjie.utils.QueryHelp;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.function.Function;
-
-/**
-* @website https://eladmin.vip
-* @description 服务实现
-* @author 赵士淞
-* @date 2023-04-12
-**/
-@Service
-@RequiredArgsConstructor
-public class BusinessPlanServiceImpl implements BusinessPlanService {
-
- private final BusinessPlanRepository businessPlanRepository;
- private final BusinessPlanMapper businessPlanMapper;
- private final BusinessPlanPersonnelRepository businessPlanPersonnelRepository;
- private final BusinessPlanPersonnelMapper businessPlanPersonnelMapper;
- private final UserService userService;
-
- @Override
- public Map<String,Object> queryAll(BusinessPlanQueryCriteria criteria, Pageable pageable){
- Page<BusinessPlan> page = businessPlanRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
- // 将实体类转换为DTO(重写)
- Function<BusinessPlan, BusinessPlanDto> func = new Function<BusinessPlan, BusinessPlanDto>(){
- @Override
- public BusinessPlanDto apply(BusinessPlan t) {
- // 将实体类转换成DTO
- BusinessPlanDto businessPlanDto = businessPlanMapper.toDto(t);
-
- // 根据营业计划ID查询营业计划人员
- List<BusinessPlanPersonnelDto> businessPlanPersonnelDtoList = businessPlanPersonnelMapper.toDto(businessPlanPersonnelRepository.findByBusinessPlanId(businessPlanDto.getId()));
- // 循环营业计划人员
- for (BusinessPlanPersonnelDto businessPlanPersonnelDto : businessPlanPersonnelDtoList) {
- // 获取用户
- UserDto userDto = userService.findById(businessPlanPersonnelDto.getUserId());
- businessPlanPersonnelDto.setUserNickName(userDto.getNickName());
- }
- // DTO
- businessPlanDto.setBusinessPlanPersonnelDtoList(businessPlanPersonnelDtoList);
-
- // 返回处理好的DTO
- return businessPlanDto;
- }
- };
- return PageUtil.toPage(page.map(func));
- }
-
- @Override
- public List<BusinessPlanDto> queryAll(BusinessPlanQueryCriteria criteria){
- return businessPlanMapper.toDto(businessPlanRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
- }
-
- @Override
- @Transactional
- public BusinessPlanDto findById(Long id) {
- BusinessPlan businessPlan = businessPlanRepository.findById(id).orElseGet(BusinessPlan::new);
- ValidationUtil.isNull(businessPlan.getId(),"BusinessPlan","id",id);
- return businessPlanMapper.toDto(businessPlan);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public BusinessPlanDto create(BusinessPlanDto resources) {
- // 保存营业计划
- BusinessPlan businessPlan = businessPlanRepository.save(businessPlanMapper.toEntity(resources));
- // 保存相关营业计划人员
- saveBusinessPlanPersonnel(resources.getBusinessPlanPersonnelDtoList(), businessPlan.getId());
- return findById(businessPlan.getId());
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void update(BusinessPlanDto resources) {
- BusinessPlan businessPlan = businessPlanRepository.findById(resources.getId()).orElseGet(BusinessPlan::new);
- ValidationUtil.isNull( businessPlan.getId(),"BusinessPlan","id",resources.getId());
- businessPlan.copy(businessPlanMapper.toEntity(resources));
- businessPlanRepository.save(businessPlan);
- // 保存相关营业计划人员
- saveBusinessPlanPersonnel(resources.getBusinessPlanPersonnelDtoList(), businessPlan.getId());
- }
-
- /**
- * 保存相关营业计划人员
- * @param businessPlanPersonnelDtoList
- * @param businessPlanId
- */
- private void saveBusinessPlanPersonnel(List<BusinessPlanPersonnelDto> businessPlanPersonnelDtoList, Long businessPlanId) {
- // 根据营业计划ID删除营业计划人员
- businessPlanPersonnelRepository.deleteByBusinessPlanId(businessPlanId);
- // 营业计划人员列表
- List<BusinessPlanPersonnel> businessPlanPersonnelList = businessPlanPersonnelMapper.toEntity(businessPlanPersonnelDtoList);
- // 循环营业计划人员列表
- for (BusinessPlanPersonnel businessPlanPersonnel : businessPlanPersonnelList) {
- // 营业计划人员
- businessPlanPersonnel.setBusinessPlanId(businessPlanId);
- // 保存营业计划人员
- businessPlanPersonnelRepository.save(businessPlanPersonnel);
- }
- }
-
- @Override
- public void deleteAll(Long[] ids) {
- for (Long id : ids) {
- businessPlanRepository.deleteById(id);
- }
- }
-
- @Override
- public void download(List<BusinessPlanDto> all, HttpServletResponse response) throws IOException {
- List<Map<String, Object>> list = new ArrayList<>();
- for (BusinessPlanDto businessPlan : all) {
- Map<String,Object> map = new LinkedHashMap<>();
- map.put("营业地", businessPlan.getBusinessPlace());
- map.put("营业内容", businessPlan.getBusinessContent());
- map.put("营业状态", businessPlan.getBusinessStatus());
- map.put("备注", businessPlan.getRemarks());
- map.put("创建者", businessPlan.getCreateBy());
- map.put("创建时间", businessPlan.getCreateTime());
- map.put("更新者", businessPlan.getUpdateBy());
- map.put("更新时间", businessPlan.getUpdateTime());
- list.add(map);
- }
- FileUtil.downloadExcel(list, response);
- }
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/mapstruct/BusinessExpenseMapper.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/mapstruct/BusinessExpenseMapper.java
deleted file mode 100644
index 74b3516..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/mapstruct/BusinessExpenseMapper.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.mapstruct;
-
-import me.zhengjie.base.BaseMapper;
-import me.zhengjie.modules.business.domain.BusinessExpense;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseDto;
-import org.mapstruct.Mapper;
-import org.mapstruct.ReportingPolicy;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
-public interface BusinessExpenseMapper extends BaseMapper<BusinessExpenseDto, BusinessExpense> {
-
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/mapstruct/BusinessExpenseReimbursementMapper.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/mapstruct/BusinessExpenseReimbursementMapper.java
deleted file mode 100644
index d8e6eca..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/mapstruct/BusinessExpenseReimbursementMapper.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.mapstruct;
-
-import me.zhengjie.base.BaseMapper;
-import me.zhengjie.modules.business.domain.BusinessExpenseReimbursement;
-import me.zhengjie.modules.business.service.dto.BusinessExpenseReimbursementDto;
-import org.mapstruct.Mapper;
-import org.mapstruct.ReportingPolicy;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-13
-**/
-@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
-public interface BusinessExpenseReimbursementMapper extends BaseMapper<BusinessExpenseReimbursementDto, BusinessExpenseReimbursement> {
-
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/mapstruct/BusinessPlanMapper.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/mapstruct/BusinessPlanMapper.java
deleted file mode 100644
index cf89aed..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/mapstruct/BusinessPlanMapper.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.mapstruct;
-
-import me.zhengjie.base.BaseMapper;
-import me.zhengjie.modules.business.domain.BusinessPlan;
-import me.zhengjie.modules.business.service.dto.BusinessPlanDto;
-import org.mapstruct.Mapper;
-import org.mapstruct.ReportingPolicy;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-12
-**/
-@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
-public interface BusinessPlanMapper extends BaseMapper<BusinessPlanDto, BusinessPlan> {
-
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/mapstruct/BusinessPlanPersonnelMapper.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/mapstruct/BusinessPlanPersonnelMapper.java
deleted file mode 100644
index 9c8b2e8..0000000
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/service/mapstruct/BusinessPlanPersonnelMapper.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-* Copyright 2019-2020 Zheng Jie
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package me.zhengjie.modules.business.service.mapstruct;
-
-import me.zhengjie.base.BaseMapper;
-import me.zhengjie.modules.business.domain.BusinessPlanPersonnel;
-import me.zhengjie.modules.business.service.dto.BusinessPlanPersonnelDto;
-import org.mapstruct.Mapper;
-import org.mapstruct.ReportingPolicy;
-
-/**
-* @website https://eladmin.vip
-* @author 赵士淞
-* @date 2023-04-12
-**/
-@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
-public interface BusinessPlanPersonnelMapper extends BaseMapper<BusinessPlanPersonnelDto, BusinessPlanPersonnel> {
-
-}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java
index ede5644..887c24c 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java
@@ -1,22 +1,30 @@
package me.zhengjie.modules.constant;
import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.List;
public class Constant {
// 角色级别:超级管理员
- public static final Long ROLE_LEVEL_SUPER = 1L;
+ public static final Long ROLE_LEVEL_ADMIN = 999L;
// 角色级别:总经理
+ public static final Long ROLE_LEVEL_SUPER = 1L;
+ // 角色级别:统括经理
public static final Long ROLE_LEVEL_GENERAL = 2L;
// 角色级别:项目经理
public static final Long ROLE_LEVEL_MANAGER = 3L;
- // 角色级别:项目组长
+ // 角色级别:项目组长、设备管理员、财务管理员、人力资源管理员
public static final Long ROLE_LEVEL_LEADER = 4L;
// 角色级别:普通员工
public static final Long ROLE_LEVEL_ORDINARY = 5L;
- // 角色级别:设备管理员
- public static final Long ROLE_LEVEL_DEVICE = 6L;
- // 角色级别:财务管理员
- public static final Long ROLE_LEVEL_FINANCE = 7L;
+ // 角色级别:合同管理员
+ public static final Long ROLE_LEVEL_CONTRACT = 6L;
+ // 角色级别:超高级组合
+ public static final List<Long> SUPER_LEVEL_LIST = Arrays.asList(ROLE_LEVEL_ADMIN, ROLE_LEVEL_SUPER);
+ // 角色级别:高级(含超高级)组合
+ public static final List<Long> HIGH_LEVEL_LIST = Arrays.asList(ROLE_LEVEL_ADMIN, ROLE_LEVEL_SUPER, ROLE_LEVEL_GENERAL);
+ // 角色级别:基础组合
+ public static final List<Long> BASE_LEVEL_LIST = Arrays.asList(ROLE_LEVEL_MANAGER, ROLE_LEVEL_LEADER, ROLE_LEVEL_ORDINARY);
// 日期类型
public static final String DATE_TYPE = "date_type";
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/impl/ProjectServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/impl/ProjectServiceImpl.java
index b04fc1e..c76f77e 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/impl/ProjectServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/impl/ProjectServiceImpl.java
@@ -280,7 +280,7 @@
int min = Collections.min(levels);
List<Long> projectIdList = new ArrayList<>();
// 判断角色等级
- if (min == Constant.ROLE_LEVEL_MANAGER || min == Constant.ROLE_LEVEL_LEADER || min == Constant.ROLE_LEVEL_ORDINARY) {
+ if (Constant.BASE_LEVEL_LIST.contains(Long.valueOf(min))) {
// 根据用户ID查询参与的项目ID
//List<Long> taskUserProjectIdList = taskDaliyRepository.findProjectIdByUserId(SecurityUtils.getCurrentUserId());
//如果当前用户属于一个任务,那么他也可以看见当前这个任务的项目
@@ -324,7 +324,7 @@
}
}
- if (!(min == Constant.ROLE_LEVEL_MANAGER || min == Constant.ROLE_LEVEL_LEADER || min == Constant.ROLE_LEVEL_ORDINARY)){
+ if (!Constant.BASE_LEVEL_LIST.contains(Long.valueOf(min))){
for (ProjectDto projectDto : projectDtoList) {
projectDto.setFlag(true);
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/ContractMethod.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/ContractMethod.java
index 73eeadc..2eaf4b3 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/ContractMethod.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/ContractMethod.java
@@ -50,7 +50,7 @@
// 获取用户角色
Role role = user.getRoles().iterator().next();
// 高级别
- if (Long.valueOf(role.getLevel()).equals(Constant.ROLE_LEVEL_SUPER) || Long.valueOf(role.getLevel()).equals(Constant.ROLE_LEVEL_GENERAL)) {
+ if (Constant.SUPER_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
if (StringUtils.isNotBlank(user.getWeComId())) {
weComList.add(user.getWeComId());
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/NewSalaryServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/NewSalaryServiceImpl.java
index 2a39c23..5fccbd9 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/NewSalaryServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/NewSalaryServiceImpl.java
@@ -113,7 +113,7 @@
// 登录用户最大角色等级
int min = Collections.min(levels);
// 判断角色等级
- if (min == Constant.ROLE_LEVEL_MANAGER || min == Constant.ROLE_LEVEL_LEADER || min == Constant.ROLE_LEVEL_ORDINARY) {
+ if (Constant.BASE_LEVEL_LIST.contains(Long.valueOf(min))) {
// 工资查询类
criteria.setUserId(SecurityUtils.getCurrentUserId());
criteria.setPublicityStatus(Constant.PUBLICITY_STATUS_YES);
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/SalaryServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/SalaryServiceImpl.java
index 21809ed..689c494 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/SalaryServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/SalaryServiceImpl.java
@@ -114,7 +114,7 @@
// 登录用户最大角色等级
int min = Collections.min(levels);
// 判断角色等级
- if (min == Constant.ROLE_LEVEL_MANAGER || min == Constant.ROLE_LEVEL_LEADER || min == Constant.ROLE_LEVEL_ORDINARY) {
+ if (Constant.BASE_LEVEL_LIST.contains(Long.valueOf(min))) {
// 工资查询类
criteria.setUserId(SecurityUtils.getCurrentUserId());
criteria.setPublicityStatus(Constant.PUBLICITY_STATUS_YES);
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/CustomerResourcesServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/CustomerResourcesServiceImpl.java
index 6987186..c938638 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/CustomerResourcesServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/CustomerResourcesServiceImpl.java
@@ -15,8 +15,6 @@
*/
package me.zhengjie.modules.system.service.impl;
-import me.zhengjie.modules.business.service.BusinessPlanService;
-import me.zhengjie.modules.business.service.dto.BusinessPlanDto;
import me.zhengjie.modules.constant.Constant;
import me.zhengjie.modules.quartz.service.impl.WeComServiceImpl;
import me.zhengjie.modules.system.domain.CustomerResources;
@@ -60,7 +58,6 @@
private final UserRepository userRepository;
private final WeComServiceImpl weComService;
private final CustomerResourcesUserRepository customerResourcesUserRepository;
- private final BusinessPlanService businessPlanService;
@Override
public Map<String, Object> queryAll(CustomerResourcesQueryCriteria criteria, Pageable pageable) {
@@ -71,10 +68,6 @@
public CustomerResourcesDto apply(CustomerResources t) {
// 将实体类转换成DTO
CustomerResourcesDto customerResourcesDto = customerResourcesMapper.toDto(t);
-
- // 获取营业计划
- BusinessPlanDto businessPlanDto = businessPlanService.findById(customerResourcesDto.getBusinessPlanId());
- customerResourcesDto.setBusinessPlanContent(businessPlanDto.getBusinessContent());
// 返回处理好的DTO
return customerResourcesDto;
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java
index d213319..926410a 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java
@@ -424,11 +424,11 @@
@Override
public List<User> getUserInfose() {
List<User> userList = new ArrayList<>();
- //获取当前登入人信息
+ // 获取当前登入人信息
User user1 = userRepository.getOne(SecurityUtils.getCurrentUserId());
Role role = user1.getRoles().iterator().next();
- //超管、总经理,痛苦哦经理查看全部
- if (Long.valueOf(role.getLevel()) == Constant.ROLE_LEVEL_SUPER || Long.valueOf(role.getLevel()) == Constant.ROLE_LEVEL_GENERAL) {
+ // 超管、总经理、统括经理查看全部
+ if (Constant.HIGH_LEVEL_LIST.contains(Long.valueOf(role.getLevel()))) {
userList = userRepository.findAllByEnabled(true);
} else {
userList = userRepository.findByUserId(user1.getId());
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskDaliyServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskDaliyServiceImpl.java
index 6deb610..73a0061 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskDaliyServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskDaliyServiceImpl.java
@@ -591,7 +591,7 @@
// 登录用户最大角色等级
int min = Collections.min(levels);
// 判断角色等级
- if (min == Constant.ROLE_LEVEL_MANAGER || min == Constant.ROLE_LEVEL_LEADER || min == Constant.ROLE_LEVEL_ORDINARY) {
+ if (Constant.BASE_LEVEL_LIST.contains(Long.valueOf(min))) {
// 判断是否是自己的日报
if (SecurityUtils.getCurrentUserId().longValue() != resources.getUserId().longValue()) {
throw new BadRequestException("只能新增修改自己的任务日报!");
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskServiceImpl.java
index 76faf8b..9fd2b77 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskServiceImpl.java
@@ -115,7 +115,7 @@
// 登录用户最大角色等级
int min = Collections.min(levels);
- if (min == Constant.ROLE_LEVEL_MANAGER || min == Constant.ROLE_LEVEL_LEADER || min == Constant.ROLE_LEVEL_ORDINARY) {
+ if (Constant.BASE_LEVEL_LIST.contains(Long.valueOf(min))) {
ArrayList<Long> projectList = new ArrayList<>();
Query query = Query.query(Criteria.where("containUserList").is(SecurityUtils.getCurrentUserId()));
@@ -891,7 +891,7 @@
if (criteria.getProjectId() != null) {
criteriaTask.and("projectId").is(criteria.getProjectId());
- if (min == Constant.ROLE_LEVEL_MANAGER || min == Constant.ROLE_LEVEL_LEADER || min == Constant.ROLE_LEVEL_ORDINARY) {
+ if (Constant.BASE_LEVEL_LIST.contains(Long.valueOf(min))) {
//看看当前这个用户是不是这个项目的项目负责人,如果是项目负责人的话显示全部的任务
List<Long> projectIds = projectRepository.findIdByLiableUserId(userId);
if (!projectIds.contains(criteria.getProjectId())) {
diff --git a/eladmin-web-master/src/views/attendance/preBusinessTravel/index.vue b/eladmin-web-master/src/views/attendance/preBusinessTravel/index.vue
index 3b353c6..44d176d 100644
--- a/eladmin-web-master/src/views/attendance/preBusinessTravel/index.vue
+++ b/eladmin-web-master/src/views/attendance/preBusinessTravel/index.vue
@@ -82,7 +82,7 @@
</el-select>
</el-form-item>
<el-form-item label="标题" prop="title">
- <el-input v-model="form.title" placeholder="请输入" style="width: 370px;" />
+ <el-input v-model="form.title" placeholder="请输入" :disabled="!checkPer(permission.forceEdit) && (form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null)" style="width: 370px;" />
</el-form-item>
<el-form-item label="出差开始时间" prop="travelStartTime">
<el-date-picker
@@ -98,7 +98,7 @@
}
}"
:default-time="$store.state.user.user.sysRostering.workStartTime + ':00'"
- :disabled="form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null"
+ :disabled="!checkPer(permission.forceEdit) && (form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null)"
@change="handleCheckTime"
/>
</el-form-item>
@@ -116,7 +116,7 @@
}
}"
:default-time="$store.state.user.user.sysRostering.workEndTime + ':00'"
- :disabled="form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null"
+ :disabled="!checkPer(permission.forceEdit) && (form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null)"
@change="handleCheckTime"
/>
</el-form-item>
@@ -126,21 +126,21 @@
</el-input>
</el-form-item>
<el-form-item label="出差原因" prop="travelReason">
- <el-input v-model="form.travelReason" type="textarea" rows="3" :disabled="form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null" style="width: 370px;" />
+ <el-input v-model="form.travelReason" type="textarea" rows="3" :disabled="!checkPer(permission.forceEdit) && (form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null)" style="width: 370px;" />
</el-form-item>
<el-form-item label="出发城市" prop="departureCity">
- <el-input v-model="form.departureCity" :disabled="form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null" style="width: 370px;" />
+ <el-input v-model="form.departureCity" :disabled="!checkPer(permission.forceEdit) && (form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null)" style="width: 370px;" />
</el-form-item>
<el-form-item label="到达城市" prop="arrivalCity">
- <el-input v-model="form.arrivalCity" :disabled="form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null" style="width: 370px;" />
+ <el-input v-model="form.arrivalCity" :disabled="!checkPer(permission.forceEdit) && (form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null)" style="width: 370px;" />
</el-form-item>
<el-form-item label="关联项目" prop="projectId">
- <el-select v-model="form.projectId" filterable clearable placeholder="请选择" :disabled="form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn" style="width: 370px;">
+ <el-select v-model="form.projectId" filterable clearable placeholder="请选择" :disabled="!checkPer(permission.forceEdit) && (form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null)" style="width: 370px;">
<el-option v-for="item in projects" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="成员" prop="memberUserIds">
- <el-select v-model="form.memberUserIds" filterable clearable multiple placeholder="请选择" :disabled="form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn" style="width: 370px;">
+ <el-select v-model="form.memberUserIds" filterable clearable multiple placeholder="请选择" :disabled="!checkPer(permission.forceEdit) && (form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null)" style="width: 370px;">
<el-option v-for="item in users" :key="'memberUserId_' + item.id" :label="item.nickName" :value="item.id" />
</el-select>
</el-form-item>
@@ -148,7 +148,7 @@
<el-input v-model="form.approvalDescription" type="textarea" rows="3" disabled style="width: 370px;" />
</el-form-item>
<el-form-item label="备注" prop="remarks">
- <el-input v-model="form.remarks" type="textarea" rows="3" :disabled="form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null" style="width: 370px;" />
+ <el-input v-model="form.remarks" type="textarea" rows="3" :disabled="!checkPer(permission.forceEdit) && (form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null)" style="width: 370px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -159,6 +159,9 @@
<!--审核组件-->
<el-dialog :close-on-click-modal="false" :before-close="handleCloseApproval" :visible.sync="approvalDialog.visible" :title="approvalDialog.title" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="110px">
+ <el-form-item label="标题">
+ {{ form.title }}
+ </el-form-item>
<el-form-item label="申请人">
{{ form.userName }}
</el-form-item>
@@ -179,6 +182,9 @@
</el-form-item>
<el-form-item label="出差原因">
{{ form.travelReason }}
+ </el-form-item>
+ <el-form-item label="成员">
+ {{ form.memberUserIds.map(userId => users.find(user => user.id == userId).nickName).join(',') }}
</el-form-item>
<el-form-item v-if="form.approvalStatus === dictBussinessAppReturn" label="退回原因" prop="approvalDescription">
<div style="color: red;">
@@ -234,7 +240,11 @@
<el-table-column prop="departureCity" label="出发城市" width="80" show-overflow-tooltip />
<el-table-column prop="arrivalCity" label="到达城市" width="80" show-overflow-tooltip />
<el-table-column prop="project.name" label="关联项目" width="80" show-overflow-tooltip />
- <el-table-column prop="wecomMemberName" label="成员" />
+ <el-table-column prop="memberUserId" label="成员" width="120" show-overflow-tooltip>
+ <template slot-scope="scope">
+ {{ scope.row.memberUserId.split('-').filter(Boolean).map(num => Number(num)).map(userId => users.find(user => user.id == userId).nickName).join(',') }}
+ </template>
+ </el-table-column>
<el-table-column prop="approvalStatus" label="审批状态" width="80" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.approvalStatus === dictBussinessAppRev" type="warning">
@@ -321,7 +331,7 @@
import cpApprovalDelDialog from '@/components/CpApprovalDelDialog'
import constant from '@/utils/constant'
-const defaultForm = { id: null, userId: null, approvalUserId: null, title: null, travelStartTime: null, travelEndTime: null, travelDuration: null, durationUnit: null, travelReason: null, departureCity: null, arrivalCity: null, approvalStatus: null, approvalDescription: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null, projectId: null, memberUserId: null, wecomSpNo: null, wecomEventId: null, wecomLocation: null, wecomDateType: null, wecomDuration: null, wecomAttendanceType: null, wecomApproveWecomId: null, wecomProjectName: null, wecomMemberName: null }
+const defaultForm = { id: null, userId: null, approvalUserId: null, title: null, travelStartTime: null, travelEndTime: null, travelDuration: null, durationUnit: null, travelReason: null, departureCity: null, arrivalCity: null, approvalStatus: null, approvalDescription: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null, projectId: null, memberUserId: null, wecomSpNo: null, wecomEventId: null, wecomLocation: null, wecomDateType: null, wecomDuration: null, wecomAttendanceType: null, wecomApproveWecomId: null, wecomProjectName: null, wecomMemberName: null, memberUserIds: [] }
export default {
name: 'PreBusinessTravel',
components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, cpApprovalDelDialog },
@@ -338,7 +348,8 @@
edit: ['admin', 'preBusinessTravel:edit'],
del: ['admin', 'preBusinessTravel:del'],
approval: ['admin', 'preBusinessTravel:approval'],
- batchApproval: ['admin', 'preBusinessTravel:batchApproval']
+ batchApproval: ['admin', 'preBusinessTravel:batchApproval'],
+ forceEdit: ['admin', 'preBusinessTravel:forceEdit']
},
rules: {
userId: [
@@ -429,32 +440,26 @@
// 钩子:新建 - 之前
[CRUD.HOOK.beforeToAdd]() {
const that = this
- // that.form.durationUnit = that.dictLeaveTimeTypeDay
- // that.form.memberUserIds = []
that.$set(that.form, 'durationUnit', that.dictLeaveTimeTypeDay)
that.$set(that.form, 'memberUserIds', [])
// 判断用户最大角色级别是否大于总经理角色:赋值
if (that.userRolesLevelMin > that.roleLevelGenerl) {
// 表单赋值
- // that.form.userId = that.user.id
that.$set(that.form, 'userId', that.user.id)
}
if (that.wecomApprovalVisible) {
- // this.form.approvalUserId = 0
that.$set(that.form, 'approvalUserId', 0)
}
},
// 钩子:编辑 - 之前
[CRUD.HOOK.beforeToEdit]() {
const that = this
- // that.form.memberUserIds = that.form.memberUserId.split('-').filter(Boolean)
- that.$set(that.form, 'memberUserIds', that.form.memberUserId.split('-').filter(Boolean))
+ that.$set(that.form, 'memberUserIds', that.form.memberUserId.split('-').filter(Boolean).map(num => Number(num)))
},
// 钩子:提交 - 之前
[CRUD.HOOK.beforeSubmit]() {
const that = this
- // that.form.memberUserId = `-${that.form.memberUserIds.join('--')}-`
that.$set(that.form, 'memberUserId', `-${that.form.memberUserIds.join('--')}-`)
},
// 钩子:删除 - 之前
@@ -513,7 +518,6 @@
userId: that.form.userId
})
crudPreBusinessTravel.getRemainingTime(data).then(res => {
- // that.form.travelDuration = res
that.$set(that.form, 'travelDuration', res)
})
}
@@ -522,22 +526,8 @@
toApproval(data, opType) {
const that = this
if (opType !== '1') {
- // that.approvalDialog.visible = true
that.$set(that.approvalDialog, 'visible', true)
}
- // that.form.id = data.id
- // that.form.userId = data.userId
- // that.form.userName = data.userName
- // that.form.title = data.title
- // that.form.travelStartTime = data.travelStartTime
- // that.form.travelEndTime = data.travelEndTime
- // that.form.departureCity = data.departureCity
- // that.form.arrivalCity = data.arrivalCity
- // that.form.travelDuration = data.travelDuration
- // that.form.durationUnit = data.durationUnit
- // that.form.approvalStatus = data.approvalStatus
- // that.form.travelReason = data.travelReason
- // that.form.remarks = data.remarks
that.$set(that.form, 'id', data.id)
that.$set(that.form, 'userId', data.userId)
that.$set(that.form, 'userName', data.userName)
@@ -551,11 +541,11 @@
that.$set(that.form, 'approvalStatus', data.approvalStatus)
that.$set(that.form, 'travelReason', data.travelReason)
that.$set(that.form, 'remarks', data.remarks)
+ that.$set(that.form, 'memberUserIds', data.memberUserId.split('-').filter(Boolean).map(num => Number(num)))
},
// 审核提交功能
handleApproval(type, data) {
const that = this
- // that.form.userId = data.userId
that.$set(that.form, 'userId', data.userId)
const msg = type === 2 ? '通过' : '拒绝'
that.$refs['form'].validate(valid => {
@@ -564,28 +554,21 @@
}
// 判断通过状态
if (type === 2) {
- // that.form.approvalStatus = that.dictBussinessAppAgree
that.$set(that.form, 'approvalStatus', that.dictBussinessAppAgree)
} else {
// 退回改状态显示退回原因
- // that.form.approvalStatus = that.dictBussinessAppReturn
that.$set(that.form, 'approvalStatus', that.dictBussinessAppReturn)
if (that.form.approvalDescription == null) {
return
}
}
- // that.approvalDialog.loading = true
that.$set(that.approvalDialog, 'loading', true)
crudPreBusinessTravel.approval(that.form).then(_res => {
that.crud.refresh()
- // that.approvalDialog.visible = false
- // that.approvalDialog.loading = false
that.$set(that.approvalDialog, 'visible', false)
that.$set(that.approvalDialog, 'loading', false)
that.$message({ type: 'success', message: '审核' + msg + '成功' })
}).catch(() => {
- // that.approvalDialog.visible = false
- // that.approvalDialog.loading = false
that.$set(that.approvalDialog, 'visible', false)
that.$set(that.approvalDialog, 'loading', false)
})
@@ -626,13 +609,10 @@
handleRevoke(data) {
const that = this
that.toApproval(data, '1')
- // that.form.approvalStatus = that.dictBussinessAppRev
that.$set(that.form, 'approvalStatus', that.dictBussinessAppRev)
- // that.approvalDialog.loading = true
that.$set(that.approvalDialog, 'loading', true)
crudPreBusinessTravel.approval(that.form).then(_res => {
that.crud.refresh()
- // that.approvalDialog.loading = false
that.$set(that.approvalDialog, 'loading', false)
that.$message({ type: 'success', message: '撤销成功' })
that.$refs[`popover_${data.id}`].showPopper = false
@@ -651,7 +631,6 @@
that.$refs['form'].resetFields()
}
that.crud.cancelCU()
- // that.approvalDialog.visible = false
that.$set(that.approvalDialog, 'visible', false)
},
// 取消撤销操作
--
Gitblit v1.9.3