Compare commits

..

No commits in common. "c2af2a8374d479ed650c02a02031627834cd3186" and "708775f6dc3711eb3362dc7d8e5d1404726520cd" have entirely different histories.

17 changed files with 52 additions and 216 deletions

View File

@ -2,12 +2,8 @@ package cn.iocoder.yudao.module.bpm.controller.admin.oa;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.contract.BpmOAContractPageReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.contract.BpmOAContractRespVO;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.payment.BpmOAPaymentCreateReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.payment.BpmOAPaymentPageReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.payment.BpmOAPaymentRespVO;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.payment.FactoryDetailVO;
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAPaymentDO;
@ -167,11 +163,4 @@ public class BpmOAPaymentController {
return success(paymentService.getPaymentList(type));
}
@GetMapping("/page")
@Operation(summary = "获得 后补票的付款申请分页列表")
public CommonResult<PageResult<BpmOAPaymentRespVO>> getPage(@Valid BpmOAPaymentPageReqVO pageReqVO) {
return success(paymentService.getPaymentPage(pageReqVO));
}
}

View File

@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.oa;
import cn.hutool.core.collection.CollUtil;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.project.BpmOAProjectCreateReqVO;
@ -66,18 +65,12 @@ public class BpmOAProjectController {
BpmOAProjectRespVO respVO = BeanUtils.toBean(project, BpmOAProjectRespVO.class);
if (respVO != null) {
Set<Long> userIds = new HashSet<>();
// 获取项目中所有人员的用户编号列表
if (CollUtil.isNotEmpty(respVO.getStaff())) {
userIds.addAll(respVO.getStaff());
}
Set<Long> userIds = respVO.getStaff() == null ? new HashSet<>() : respVO.getStaff();
userIds.add(respVO.getDirectorUserId());
Set<Long> deptIds = new HashSet<>();
// 获取项目中所有部门编号列表
if (CollUtil.isNotEmpty(respVO.getParticipationDept())) {
deptIds.addAll(respVO.getParticipationDept());
}
Set<Long> deptIds = respVO.getParticipationDept() == null ? new HashSet<>() : respVO.getParticipationDept();
deptIds.add(respVO.getResponsibleDept());
// 获取所有用户信息
@ -111,36 +104,29 @@ public class BpmOAProjectController {
if (respVO != null) {
Set<Long> userIds = new HashSet<>();
// 获取项目中所有人员的用户编号列表
if (CollUtil.isNotEmpty(respVO.getStaff())) {
userIds.addAll(respVO.getStaff());
}
userIds.add(respVO.getDirectorUserId());
Set<Long> deptIds = new HashSet<>();
// 获取项目中所有部门编号列表
if (CollUtil.isNotEmpty(respVO.getParticipationDept())) {
deptIds.addAll(respVO.getParticipationDept());
}
Set<Long> deptIds = respVO.getParticipationDept() == null ? new HashSet<>() : respVO.getParticipationDept();
deptIds.add(respVO.getResponsibleDept());
// 获取所有用户信息
Map<Long, AdminUserRespDTO> userMap = userApi.getUserMap(userIds);
AdminUserRespDTO userRespDTO = userApi.getUser(respVO.getDirectorUserId()).getCheckedData();
// 获取所有部门信息
Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(deptIds);
List<DeptRespDTO> deptDOS = deptApi.getDeptList(deptIds).getCheckedData();
Map<Long, DeptRespDTO> deptMap = convertMap(deptDOS, DeptRespDTO::getId);
// 设置责任人名称
respVO.setDirectorUserName(userMap.get(respVO.getDirectorUserId()).getNickname());
// 设置项目人员名称
userMap.remove(respVO.getDirectorUserId());
respVO.setStaffName(userMap.values().stream().map(AdminUserRespDTO::getNickname).collect(Collectors.joining("")));
respVO.setDirectorUserName(userRespDTO.getNickname());
// 筛选出不是责任人部门的部门信息
List<DeptRespDTO> deptVOs = deptDOS.stream()
.filter(dept -> !dept.getId().equals(respVO.getResponsibleDept()))
.distinct()
.collect(Collectors.toList());
// 设置责任部门名称
respVO.setResponsibleDeptName(deptMap.get(respVO.getResponsibleDept()).getName());
// 拼接参与部门名称
deptMap.remove(respVO.getResponsibleDept());
respVO.setParticipationDeptName(deptMap.values().stream().map(DeptRespDTO::getName).collect(Collectors.joining("")));
respVO.setParticipationDeptName(deptVOs.stream().map(DeptRespDTO::getName).collect(Collectors.joining("")));
}
return success(respVO);

View File

@ -57,12 +57,6 @@ public class BpmOAPaymentCreateReqVO {
@NotNull(message = "付款公司编号不能为空")
private Long paymentCompany;
@Schema(description = "是否后补发票 | 0否 1是", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Integer isTickets;
@Schema(description = "后补票批注", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private String annotations;
@Schema(description = "父级审批编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Long parentId;

View File

@ -1,19 +0,0 @@
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.payment;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@Schema(description = "管理后台 - 付款申请分页 Request VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class BpmOAPaymentPageReqVO extends PageParam {
@Schema(description = "补票状态 | 0待补票 1已补票 2已确认")
private Integer status;
}

View File

@ -73,12 +73,6 @@ public class BpmOAPaymentRespVO extends BpmOABaseRespVO {
@Schema(description = "付款公司名称")
private String paymentCompanyName;
@Schema(description = "是否后补发票 | 0否 1是", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Integer isTickets;
@Schema(description = "后补票批注", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private String annotations;
@Schema(description = "父级审批编号")
private Long parentId;

View File

@ -102,16 +102,6 @@ public class BpmOAPaymentDO extends BaseDO {
*/
private Long paymentCompany;
/**
* 是否后补发票 | 0否 1是
*/
private Integer isTickets;
/**
* 后补票批注
*/
private String annotations;
/**
* 父级审批
*/

View File

@ -1,8 +1,6 @@
package cn.iocoder.yudao.module.bpm.service.oa;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.payment.BpmOAPaymentCreateReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.payment.BpmOAPaymentPageReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.payment.BpmOAPaymentRespVO;
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAPaymentDO;
@ -48,11 +46,4 @@ public interface BpmOAPaymentService {
* @return 付款申请列表
*/
List<BpmOAPaymentRespVO> getPaymentList(Integer type);
/**
* 获得 后补票的付款申请分页列表
* @param pageReqVO 分页条件
* @return 付款申请分页列表
*/
PageResult<BpmOAPaymentRespVO> getPaymentPage(BpmOAPaymentPageReqVO pageReqVO);
}

View File

@ -2,12 +2,10 @@ package cn.iocoder.yudao.module.bpm.service.oa;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.UploadUserFile;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.payment.BpmOAPaymentCreateReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.payment.BpmOAPaymentPageReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.payment.BpmOAPaymentRespVO;
import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpayment.FinancialPaymentDO;
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAPaymentDO;
@ -144,12 +142,6 @@ public class BpmOAPaymentServiceImpl extends BpmOABaseService implements BpmOAPa
return paymentMapper.selectPaymentList(type);
}
@Override
public PageResult<BpmOAPaymentRespVO> getPaymentPage(BpmOAPaymentPageReqVO pageReqVO) {
return null;
}
private BpmOAPaymentDO validateLeaveExists(Long id) {
BpmOAPaymentDO paymentDO = paymentMapper.selectById(id);
if (paymentDO == null) {

View File

@ -1,31 +1,32 @@
package cn.iocoder.yudao.module.system.controller.admin.customersettlement;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.module.system.controller.admin.customersettlement.vo.CustomerSettlementPageReqVO;
import cn.iocoder.yudao.module.system.controller.admin.customersettlement.vo.CustomerSettlementRespVO;
import cn.iocoder.yudao.module.system.controller.admin.customersettlement.vo.CustomerSettlementSaveReqVO;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.system.controller.admin.customersettlement.vo.*;
import cn.iocoder.yudao.module.system.dal.dataobject.customersettlement.CustomerSettlementDO;
import cn.iocoder.yudao.module.system.service.customersettlement.CustomerSettlementService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
@Tag(name = "管理后台 - 客户结算信息")
@RestController

View File

@ -1,8 +1,5 @@
package cn.iocoder.yudao.module.system.controller.admin.customersettlement.vo;
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.upload.UploadUserFile;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
@ -51,7 +48,7 @@ public class CustomerSettlementRespVO {
@Schema(description = "上传附件", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
@ExcelProperty("上传附件")
private List<UploadUserFile> url;
private String url;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")

View File

@ -1,13 +1,11 @@
package cn.iocoder.yudao.module.system.controller.admin.customersettlement.vo;
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.upload.UploadUserFile;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
import java.math.BigDecimal;
import java.util.List;
@Schema(description = "管理后台 - 客户结算信息新增/修改 Request VO")
@Data
@ -44,6 +42,6 @@ public class CustomerSettlementSaveReqVO {
@Schema(description = "上传附件", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
@NotEmpty(message = "上传附件不能为空")
private List<UploadUserFile> url;
private String url;
}

View File

@ -2,11 +2,9 @@ package cn.iocoder.yudao.module.system.controller.admin.dept;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.module.infra.api.config.ConfigApi;
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptListReqVO;
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptRespVO;
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptSaveReqVO;
@ -15,7 +13,6 @@ import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.service.dept.DeptService;
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
import com.fasterxml.jackson.core.type.TypeReference;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -25,12 +22,11 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.*;
import java.util.List;
import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
@Tag(name = "管理后台 - 部门")
@RestController
@ -43,9 +39,6 @@ public class DeptController {
@Resource
private AdminUserService userService;
@Resource
private ConfigApi configApi;
@PostMapping("create")
@Operation(summary = "创建部门")
@PreAuthorize("@ss.hasPermission('system:dept:create')")
@ -171,47 +164,6 @@ public class DeptController {
return success(BeanUtils.toBean(list, DeptSimpleRespVO.class));
}
@GetMapping(value = {"/all-list-outsiders"})
@Operation(summary = "获取部门精简信息列表", description = "只包含被开启的部门,主要用于需要区分外部人员时的下拉选项")
@DataPermission(enable = false)
public CommonResult<List<DeptSimpleRespVO>> getAllDeptListOutsiders() {
// 获取外部人员 部门信息
String deptString = configApi.getConfigKey("system.outsiders").getCheckedData();
Map<String, String> deptMap = JsonUtils.parseObject(deptString, new TypeReference<Map<String, String>>(){});
// 判断当前登录用户是否 属于外部人员
for (String key : deptMap.keySet()) {
String value = deptMap.get(key);
if (value.contains(Objects.requireNonNull(getLoginUserId()).toString())) {
DeptDO deptDO = deptService.getDept(Long.valueOf(key));
return success(BeanUtils.toBean(Collections.singletonList(deptDO), DeptSimpleRespVO.class));
}
}
List<DeptDO> list = deptService.getDeptList(
new DeptListReqVO().setStatus(CommonStatusEnum.ENABLE.getStatus()));
// 获得所有得虚机构部门信息
List<DeptDO> virtuallyDeptId = list.stream()
.filter(dept -> dept.getVirtuallyStatus() == 1)
.collect(Collectors.toList());
virtuallyDeptId.forEach(data -> {
// 将虚机构的子部门父部门设置为虚机构的父部门
list.stream().filter(dept -> dept.getParentId().equals(data.getId()))
.map(dept -> dept.setParentId(data.getParentId()))
.collect(Collectors.toList());
});
// 移除虚机构不展示
list.removeIf(dept -> dept.getVirtuallyStatus() == 1);
return success(BeanUtils.toBean(list, DeptSimpleRespVO.class));
}
@GetMapping(value = { "/get-factory-dept"})
@Operation(summary = "获取工厂部门精简信息列表", description = "只包含被开启的部门,主要用于前端的下拉选项")
@DataPermission(enable = false)

View File

@ -173,7 +173,7 @@ public class ProjectController {
@GetMapping("/get-my-project")
@Operation(summary = "获得我参与的项目")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
// @PreAuthorize("@ss.hasPermission('system:project:query')")
@PreAuthorize("@ss.hasPermission('system:project:query')")
public CommonResult<List<ProjectRespVO>> getMyProject() {
List<ProjectDO> projectList = projectService.getMyProject(getLoginUserId());
return success(BeanUtils.toBean(projectList, ProjectRespVO.class));

View File

@ -1,23 +1,21 @@
package cn.iocoder.yudao.module.system.dal.dataobject.customersettlement;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.upload.UploadUserFile;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.*;
import java.util.*;
import java.math.BigDecimal;
import java.util.List;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* 客户结算信息 DO
*
* @author 陈宾顺
*/
@TableName(value = "system_customer_settlement", autoResultMap = true)
@TableName("system_customer_settlement")
@KeySequence("system_customer_settlement_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@EqualsAndHashCode(callSuper = true)
@ -63,7 +61,6 @@ public class CustomerSettlementDO extends BaseDO {
/**
* 上传附件
*/
@TableField(typeHandler = JacksonTypeHandler.class)
private List<UploadUserFile> url;
private String url;
}

View File

@ -17,14 +17,6 @@ public interface RedisKeyConstants {
*/
String DEPT_CHILDREN_ID_LIST = "dept_children_ids";
/**
* 指定部门的所有子部门编号数组的缓存
* <p>
* KEY 格式dept_child_ids:{id}
* VALUE 数据类型String 子部门编号集合
*/
String DEPT_CHILD_ID_LIST = "dept_child_ids";
/**
* 角色的缓存
* <p>

View File

@ -1,17 +1,11 @@
package cn.iocoder.yudao.module.system.service.customersettlement;
import cn.iocoder.yudao.module.infra.api.file.FileApi;
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.upload.UploadUserFile;
import cn.iocoder.yudao.module.system.dal.dataobject.rental.RentalDepositRecordDO;
import org.apache.tomcat.util.digester.ObjectCreateRule;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.stream.Collectors;
import cn.iocoder.yudao.module.system.controller.admin.customersettlement.vo.*;
import cn.iocoder.yudao.module.system.dal.dataobject.customersettlement.CustomerSettlementDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
@ -35,27 +29,15 @@ public class CustomerSettlementServiceImpl implements CustomerSettlementService
@Resource
private CustomerSettlementMapper customerSettlementMapper;
@Resource
private FileApi fileApi;
@Override
public Long createCustomerSettlement(CustomerSettlementSaveReqVO createReqVO) {
// 插入
CustomerSettlementDO customerSettlement = BeanUtils.toBean(createReqVO, CustomerSettlementDO.class);
customerSettlementMapper.insert(customerSettlement);
// 更新交易凭证附件 业务编号
UpdateBusinessFile(customerSettlement);
// 返回
return customerSettlement.getId();
}
private void UpdateBusinessFile(CustomerSettlementDO updateReqVO) {
List<String> urls = updateReqVO.getUrl().stream().map(UploadUserFile::getUrl).collect(Collectors.toList());
fileApi.updateBusinessFile(urls, updateReqVO.getId().toString());
}
@Override
public void updateCustomerSettlement(CustomerSettlementSaveReqVO updateReqVO) {
// 校验存在

View File

@ -270,7 +270,7 @@ public class DeptServiceImpl implements DeptService {
@Override
@DataPermission(enable = false)
@Cacheable(cacheNames = RedisKeyConstants.DEPT_CHILD_ID_LIST, key = "#id")
@Cacheable(cacheNames = RedisKeyConstants.DEPT_CHILDREN_ID_LIST, key = "#id")
public List<DeptDO> getChildDept(Long id) {
return deptMapper.selectList(new LambdaQueryWrapperX<DeptDO>()