进度+文件上传重构+文件权限控制
This commit is contained in:
@@ -69,11 +69,13 @@ public class SysOssController extends BaseController {
|
|||||||
@SaCheckPermission("system:oss:upload")
|
@SaCheckPermission("system:oss:upload")
|
||||||
@Log(title = "OSS对象存储", businessType = BusinessType.INSERT)
|
@Log(title = "OSS对象存储", businessType = BusinessType.INSERT)
|
||||||
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
public R<Map<String, String>> upload(@RequestPart("file") MultipartFile file) {
|
public R<Map<String, String>> upload(@RequestPart("file") MultipartFile file,
|
||||||
|
// ★ 接收 isPublic,默认 0
|
||||||
|
@RequestParam(name = "isPublic", defaultValue = "0") Long isPublic) {
|
||||||
if (ObjectUtil.isNull(file)) {
|
if (ObjectUtil.isNull(file)) {
|
||||||
return R.fail("上传文件不能为空");
|
return R.fail("上传文件不能为空");
|
||||||
}
|
}
|
||||||
SysOssVo oss = iSysOssService.upload(file);
|
SysOssVo oss = iSysOssService.upload(file,isPublic);
|
||||||
Map<String, String> map = new HashMap<>(2);
|
Map<String, String> map = new HashMap<>(2);
|
||||||
map.put("url", oss.getUrl());
|
map.put("url", oss.getUrl());
|
||||||
map.put("fileName", oss.getOriginalName());
|
map.put("fileName", oss.getOriginalName());
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.ruoyi.web.controller.system;
|
|||||||
import cn.dev33.satoken.secure.BCrypt;
|
import cn.dev33.satoken.secure.BCrypt;
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
@@ -11,7 +10,6 @@ import com.ruoyi.common.enums.BusinessType;
|
|||||||
import com.ruoyi.common.helper.LoginHelper;
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.file.MimeTypeUtils;
|
import com.ruoyi.common.utils.file.MimeTypeUtils;
|
||||||
import com.ruoyi.system.domain.SysOss;
|
|
||||||
import com.ruoyi.system.domain.vo.SysOssVo;
|
import com.ruoyi.system.domain.vo.SysOssVo;
|
||||||
import com.ruoyi.system.service.ISysOssService;
|
import com.ruoyi.system.service.ISysOssService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
@@ -114,7 +112,7 @@ public class SysProfileController extends BaseController {
|
|||||||
if (!StringUtils.equalsAnyIgnoreCase(extension, MimeTypeUtils.IMAGE_EXTENSION)) {
|
if (!StringUtils.equalsAnyIgnoreCase(extension, MimeTypeUtils.IMAGE_EXTENSION)) {
|
||||||
return R.fail("文件格式不正确,请上传" + Arrays.toString(MimeTypeUtils.IMAGE_EXTENSION) + "格式");
|
return R.fail("文件格式不正确,请上传" + Arrays.toString(MimeTypeUtils.IMAGE_EXTENSION) + "格式");
|
||||||
}
|
}
|
||||||
SysOssVo oss = iSysOssService.upload(avatarfile);
|
SysOssVo oss = iSysOssService.upload(avatarfile, 1L);
|
||||||
String avatar = oss.getUrl();
|
String avatar = oss.getUrl();
|
||||||
if (userService.updateUserAvatar(getUsername(), avatar)) {
|
if (userService.updateUserAvatar(getUsername(), avatar)) {
|
||||||
ajax.put("imgUrl", avatar);
|
ajax.put("imgUrl", avatar);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.util.List;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import com.ruoyi.oa.domain.bo.BatchBo;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@@ -86,6 +87,16 @@ public class OaProjectScheduleStepController extends BaseController {
|
|||||||
return toAjax(iOaProjectScheduleStepService.updateByBo(bo));
|
return toAjax(iOaProjectScheduleStepService.updateByBo(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目进度步骤跟踪
|
||||||
|
*/
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping("/change-batch")
|
||||||
|
public R<Void> changeBatch(@Validated(EditGroup.class) @RequestBody BatchBo batchBo) {
|
||||||
|
return toAjax(iOaProjectScheduleStepService.changeBatch(batchBo));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除项目进度步骤跟踪
|
* 删除项目进度步骤跟踪
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,102 +0,0 @@
|
|||||||
package com.ruoyi.oa.controller;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
|
||||||
import com.ruoyi.common.core.domain.R;
|
|
||||||
import com.ruoyi.common.core.validate.AddGroup;
|
|
||||||
import com.ruoyi.common.core.validate.EditGroup;
|
|
||||||
import com.ruoyi.common.core.validate.QueryGroup;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.oa.domain.vo.SysOaFileVo;
|
|
||||||
import com.ruoyi.oa.domain.bo.SysOaFileBo;
|
|
||||||
import com.ruoyi.oa.service.ISysOaFileService;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件存储
|
|
||||||
*
|
|
||||||
* @author hdka
|
|
||||||
* @date 2024-12-15
|
|
||||||
*/
|
|
||||||
@Validated
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/system/oaFile")
|
|
||||||
public class SysOaFileController extends BaseController {
|
|
||||||
|
|
||||||
private final ISysOaFileService iSysOaFileService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询文件存储列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo<SysOaFileVo> list(SysOaFileBo bo, PageQuery pageQuery) {
|
|
||||||
return iSysOaFileService.queryPageList(bo, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出文件存储列表
|
|
||||||
*/
|
|
||||||
@Log(title = "文件存储", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(SysOaFileBo bo, HttpServletResponse response) {
|
|
||||||
List<SysOaFileVo> list = iSysOaFileService.queryList(bo);
|
|
||||||
ExcelUtil.exportExcel(list, "文件存储", SysOaFileVo.class, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取文件存储详细信息
|
|
||||||
*
|
|
||||||
* @param fileId 主键
|
|
||||||
*/
|
|
||||||
@GetMapping("/{fileId}")
|
|
||||||
public R<SysOaFileVo> getInfo(@NotNull(message = "主键不能为空")
|
|
||||||
@PathVariable Long fileId) {
|
|
||||||
return R.ok(iSysOaFileService.queryById(fileId));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增文件存储
|
|
||||||
*/
|
|
||||||
@Log(title = "文件存储", businessType = BusinessType.INSERT)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping()
|
|
||||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody SysOaFileBo bo) {
|
|
||||||
return toAjax(iSysOaFileService.insertByBo(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改文件存储
|
|
||||||
*/
|
|
||||||
@Log(title = "文件存储", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PutMapping()
|
|
||||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysOaFileBo bo) {
|
|
||||||
return toAjax(iSysOaFileService.updateByBo(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除文件存储
|
|
||||||
*
|
|
||||||
* @param fileIds 主键串
|
|
||||||
*/
|
|
||||||
@Log(title = "文件存储", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{fileIds}")
|
|
||||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
||||||
@PathVariable Long[] fileIds) {
|
|
||||||
return toAjax(iSysOaFileService.deleteWithValidByIds(Arrays.asList(fileIds), true));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -6,13 +6,11 @@ import java.util.Arrays;
|
|||||||
|
|
||||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||||
import com.ruoyi.oa.domain.bo.SysOaWarehouseDetailBo;
|
import com.ruoyi.oa.domain.bo.SysOaWarehouseDetailBo;
|
||||||
import com.ruoyi.oa.domain.vo.SysOaFileVo;
|
|
||||||
import com.ruoyi.oa.domain.vo.SysOaOutWarehouseListVo;
|
import com.ruoyi.oa.domain.vo.SysOaOutWarehouseListVo;
|
||||||
import com.ruoyi.oa.mapper.SysOaTaskMapper;
|
import com.ruoyi.oa.mapper.SysOaTaskMapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class SysOaWarehouseController extends BaseController {
|
|||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody SysOaWarehouseBo bo) {
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody SysOaWarehouseBo bo) {
|
||||||
return toAjax(iSysOaWarehouseService.insertByBo(bo));
|
return toAjax(iSysOaWarehouseService.insertByBo(bo)>0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -55,15 +55,6 @@ public class SysOaWarehouseMasterController extends BaseController {
|
|||||||
return iSysOaWarehouseMasterService.queryPageList(bo, pageQuery);
|
return iSysOaWarehouseMasterService.queryPageList(bo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询出库单管理列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/list-task")
|
|
||||||
public TableDataInfo<SysOaWarehouseMasterVo> listTask(SysOaWarehouseMasterBo bo, PageQuery pageQuery) {
|
|
||||||
bo.setType(2L);
|
|
||||||
return iSysOaWarehouseMasterService.queryPageList(bo, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出出库单管理列表
|
* 导出出库单管理列表
|
||||||
*/
|
*/
|
||||||
@@ -102,8 +93,9 @@ public class SysOaWarehouseMasterController extends BaseController {
|
|||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping("/in")
|
@PostMapping("/in")
|
||||||
public R<Void> addIn(@Validated(AddGroup.class) @RequestBody SysOaWarehouseBo bo) {
|
public R<Void> addIn(@Validated(AddGroup.class) @RequestBody SysOaWarehouseBo bo) {
|
||||||
warehouseService.insertByBo(bo);
|
Long id = warehouseService.insertByBo(bo);
|
||||||
return toAjax(iSysOaWarehouseMasterService.insertInWarehouse(bo));
|
System.out.println(warehouseService.queryById(id));
|
||||||
|
return toAjax(iSysOaWarehouseMasterService.insertInWarehouse(bo,id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.oa.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.oa.domain.vo.SysUserVo;
|
||||||
|
import com.ruoyi.oa.service.SysOssAclService;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.flowable.spring.security.UserDto;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/oa/oss/acl")
|
||||||
|
public class SysOssAclController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysOssAclService aclService;
|
||||||
|
|
||||||
|
/** 授权 */
|
||||||
|
@PostMapping("/grant")
|
||||||
|
public R<?> grant(@RequestBody GrantDto dto) {
|
||||||
|
aclService.grant(dto.getOssId(), dto.getUserId(), dto.getGrantBy());
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 取消共享 */
|
||||||
|
@DeleteMapping("/revoke")
|
||||||
|
public R<?> revoke(@RequestBody RevokeDto dto) {
|
||||||
|
aclService.revoke(dto.getOssId(), dto.getUserId());
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 判断权限(示例) */
|
||||||
|
@GetMapping("/check")
|
||||||
|
public R<Boolean> check(@RequestParam Long ossId,
|
||||||
|
@RequestParam Long userId) {
|
||||||
|
return R.ok(aclService.hasPerm(userId, ossId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<List<SysUserVo>> list(@RequestParam Long ossId) {
|
||||||
|
return R.ok(aclService.listUsersByOssId(ossId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ====================== DTO ======================
|
||||||
|
@Data
|
||||||
|
public static class GrantDto {
|
||||||
|
@NotNull private Long ossId;
|
||||||
|
@NotNull private Long userId;
|
||||||
|
@NotNull private Long grantBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class RevokeDto {
|
||||||
|
@NotNull private Long ossId;
|
||||||
|
@NotNull private Long userId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -76,4 +76,12 @@ public class OaProjectScheduleStep extends BaseEntity {
|
|||||||
@TableLogic
|
@TableLogic
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用标志
|
||||||
|
*/
|
||||||
|
private Long useFlag;
|
||||||
|
|
||||||
|
|
||||||
|
private Long batchId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ package com.ruoyi.oa.domain;
|
|||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
|||||||
26
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SysOssAcl.java
Normal file
26
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SysOssAcl.java
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
package com.ruoyi.oa.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("sys_oss_acl")
|
||||||
|
public class SysOssAcl {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long aclId;
|
||||||
|
|
||||||
|
/** 文件 ID */
|
||||||
|
private Long ossId;
|
||||||
|
|
||||||
|
/** 被授权用户 */
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/** 授权人 */
|
||||||
|
private Long grantBy;
|
||||||
|
|
||||||
|
/** 授权时间 */
|
||||||
|
private LocalDateTime grantTime;
|
||||||
|
}
|
||||||
13
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/BatchBo.java
Normal file
13
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/BatchBo.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package com.ruoyi.oa.domain.bo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BatchBo {
|
||||||
|
|
||||||
|
private Long currentStep;
|
||||||
|
|
||||||
|
private List<OaProjectScheduleStepBo> boList;
|
||||||
|
}
|
||||||
@@ -91,4 +91,11 @@ public class OaProjectScheduleStepBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String header;
|
private String header;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用标志
|
||||||
|
*/
|
||||||
|
private Long useFlag;
|
||||||
|
|
||||||
|
private Long batchId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
12
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/OssUserBo.java
Normal file
12
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/OssUserBo.java
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
package com.ruoyi.oa.domain.bo;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OssUserBo {
|
||||||
|
|
||||||
|
private Long ossId;
|
||||||
|
|
||||||
|
private String userIds;
|
||||||
|
}
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
package com.ruoyi.oa.domain.bo;
|
package com.ruoyi.oa.domain.bo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.core.validate.AddGroup;
|
|
||||||
import com.ruoyi.common.core.validate.EditGroup;
|
|
||||||
import com.ruoyi.oa.domain.SysOaClaimDetail;
|
|
||||||
import com.ruoyi.oa.domain.SysOaFile;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|||||||
@@ -63,4 +63,7 @@ public class SysOaWarehouseDetailBo extends BaseEntity {
|
|||||||
private Double signPrice;
|
private Double signPrice;
|
||||||
|
|
||||||
private Long masterId;
|
private Long masterId;
|
||||||
|
|
||||||
|
// 当为1的时候为入库单
|
||||||
|
private Long type;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,4 +97,14 @@ public class OaProjectScheduleStepVo {
|
|||||||
/** 附件列表(1 步骤可多附件) */
|
/** 附件列表(1 步骤可多附件) */
|
||||||
private List<SysOss> fileList; // 建议用 List
|
private List<SysOss> fileList; // 建议用 List
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用标志
|
||||||
|
*/
|
||||||
|
private Long useFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
private Long batchId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
package com.ruoyi.oa.domain.vo;
|
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
|
||||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
import lombok.Data;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件存储视图对象 sys_oa_file
|
|
||||||
*
|
|
||||||
* @author hdka
|
|
||||||
* @date 2024-12-15
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
public class SysOaFileVo extends BaseEntity {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键id
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "主键id")
|
|
||||||
private Long fileId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件存储路径
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "文件存储路径")
|
|
||||||
private String fileUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件类型0打卡1出入库
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "文件类型", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(dictType = "file_status")
|
|
||||||
private Long status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -15,9 +15,9 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
|
|||||||
*/
|
*/
|
||||||
public interface OaProjectScheduleStepMapper extends BaseMapperPlus<OaProjectScheduleStepMapper, OaProjectScheduleStep, OaProjectScheduleStepVo> {
|
public interface OaProjectScheduleStepMapper extends BaseMapperPlus<OaProjectScheduleStepMapper, OaProjectScheduleStep, OaProjectScheduleStepVo> {
|
||||||
|
|
||||||
Page<OaProjectScheduleStepVo> selectVoPagePlus(@Param("page")Page<Object> build, @Param(Constants.WRAPPER) QueryWrapper<OaProjectScheduleStep> lqw);
|
Page<OaProjectScheduleStepVo> selectVoPagePlus(@Param("page")Page<Object> build, @Param(Constants.WRAPPER) QueryWrapper<OaProjectScheduleStep> lqw, @Param("userId") Long userId);
|
||||||
|
|
||||||
OaProjectScheduleStepVo selectVoPlusById(Long trackId);
|
OaProjectScheduleStepVo selectVoPlusById(@Param("trackId") Long trackId, @Param("userId") Long userId);
|
||||||
|
|
||||||
OaProjectScheduleStepVo maxStepByScheduleId(Long scheduleId);
|
OaProjectScheduleStepVo maxStepByScheduleId(Long scheduleId);
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
package com.ruoyi.oa.mapper;
|
|
||||||
|
|
||||||
import com.ruoyi.oa.domain.SysOaFile;
|
|
||||||
import com.ruoyi.oa.domain.vo.SysOaFileVo;
|
|
||||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件存储Mapper接口
|
|
||||||
*
|
|
||||||
* @author hdka
|
|
||||||
* @date 2024-12-15
|
|
||||||
*/
|
|
||||||
public interface SysOaFileMapper extends BaseMapperPlus<SysOaFileMapper, SysOaFile, SysOaFileVo> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.ruoyi.oa.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ruoyi.oa.domain.SysOssAcl;
|
||||||
|
|
||||||
|
public interface SysOssAclMapper extends BaseMapper<SysOssAcl> {
|
||||||
|
/* 这里通常不需要额外方法,BaseMapper 提供了增删改查 */
|
||||||
|
}
|
||||||
@@ -1,13 +1,11 @@
|
|||||||
package com.ruoyi.oa.service;
|
package com.ruoyi.oa.service;
|
||||||
|
|
||||||
import com.ruoyi.oa.domain.OaProjectScheduleStep;
|
import com.ruoyi.oa.domain.bo.BatchBo;
|
||||||
import com.ruoyi.oa.domain.vo.OaProjectScheduleStepVo;
|
import com.ruoyi.oa.domain.vo.OaProjectScheduleStepVo;
|
||||||
import com.ruoyi.oa.domain.bo.OaProjectScheduleStepBo;
|
import com.ruoyi.oa.domain.bo.OaProjectScheduleStepBo;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -55,4 +53,11 @@ public interface IOaProjectScheduleStepService {
|
|||||||
|
|
||||||
OaProjectScheduleStepVo selectByCurrentStepAndScheduleId(Long currentStep, Long scheduleId);
|
OaProjectScheduleStepVo selectByCurrentStepAndScheduleId(Long currentStep, Long scheduleId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更换进度时间线
|
||||||
|
* @param boList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int changeBatch(BatchBo boList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
package com.ruoyi.oa.service;
|
|
||||||
|
|
||||||
import com.ruoyi.oa.domain.SysOaFile;
|
|
||||||
import com.ruoyi.oa.domain.vo.SysOaFileVo;
|
|
||||||
import com.ruoyi.oa.domain.bo.SysOaFileBo;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件存储Service接口
|
|
||||||
*
|
|
||||||
* @author hdka
|
|
||||||
* @date 2024-12-15
|
|
||||||
*/
|
|
||||||
public interface ISysOaFileService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询文件存储
|
|
||||||
*/
|
|
||||||
SysOaFileVo queryById(Long fileId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询文件存储列表
|
|
||||||
*/
|
|
||||||
TableDataInfo<SysOaFileVo> queryPageList(SysOaFileBo bo, PageQuery pageQuery);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询文件存储列表
|
|
||||||
*/
|
|
||||||
List<SysOaFileVo> queryList(SysOaFileBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增文件存储
|
|
||||||
*/
|
|
||||||
Boolean insertByBo(SysOaFileBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改文件存储
|
|
||||||
*/
|
|
||||||
Boolean updateByBo(SysOaFileBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验并批量删除文件存储信息
|
|
||||||
*/
|
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
|
||||||
|
|
||||||
Long insertByBoReturnId(SysOaFileBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增文件返回他们的ID
|
|
||||||
* @param fileUrls
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
String insertFiles(List<String> fileUrls);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.ruoyi.oa.service;
|
package com.ruoyi.oa.service;
|
||||||
|
|
||||||
import com.ruoyi.oa.domain.SysOaWarehouseMaster;
|
|
||||||
import com.ruoyi.oa.domain.bo.SysOaWarehouseBo;
|
import com.ruoyi.oa.domain.bo.SysOaWarehouseBo;
|
||||||
import com.ruoyi.oa.domain.vo.SysOaWarehouseMasterVo;
|
import com.ruoyi.oa.domain.vo.SysOaWarehouseMasterVo;
|
||||||
import com.ruoyi.oa.domain.bo.SysOaWarehouseMasterBo;
|
import com.ruoyi.oa.domain.bo.SysOaWarehouseMasterBo;
|
||||||
@@ -50,8 +49,10 @@ public interface ISysOaWarehouseMasterService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 单个入库接口
|
* 单个入库接口
|
||||||
|
*
|
||||||
* @param bo
|
* @param bo
|
||||||
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int insertInWarehouse(SysOaWarehouseBo bo);
|
int insertInWarehouse(SysOaWarehouseBo bo, Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public interface ISysOaWarehouseService {
|
|||||||
/**
|
/**
|
||||||
* 新增仓库管理
|
* 新增仓库管理
|
||||||
*/
|
*/
|
||||||
Boolean insertByBo(SysOaWarehouseBo bo);
|
Long insertByBo(SysOaWarehouseBo bo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改仓库管理
|
* 修改仓库管理
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.ruoyi.oa.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ruoyi.oa.domain.SysOssAcl;
|
||||||
|
import com.ruoyi.oa.domain.vo.SysUserVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface SysOssAclService extends IService<SysOssAcl> {
|
||||||
|
|
||||||
|
/** 授权(有则更新,无则插入) */
|
||||||
|
void grant(Long ossId, Long userId, Long grantBy);
|
||||||
|
|
||||||
|
/** 取消共享 */
|
||||||
|
void revoke(Long ossId, Long userId);
|
||||||
|
|
||||||
|
/** 校验用户是否拥有 >= 指定权限 */
|
||||||
|
boolean hasPerm(Long userId, Long ossId);
|
||||||
|
|
||||||
|
List<SysUserVo> listUsersByOssId(Long ossId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -23,6 +23,7 @@ import com.ruoyi.oa.domain.vo.OaProjectScheduleVo;
|
|||||||
import com.ruoyi.oa.domain.OaProjectSchedule;
|
import com.ruoyi.oa.domain.OaProjectSchedule;
|
||||||
import com.ruoyi.oa.mapper.OaProjectScheduleMapper;
|
import com.ruoyi.oa.mapper.OaProjectScheduleMapper;
|
||||||
import com.ruoyi.oa.service.IOaProjectScheduleService;
|
import com.ruoyi.oa.service.IOaProjectScheduleService;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -123,6 +124,7 @@ public class OaProjectScheduleServiceImpl implements IOaProjectScheduleService {
|
|||||||
OaProjectScheduleStepBo step = bo.getSteps().get(i);
|
OaProjectScheduleStepBo step = bo.getSteps().get(i);
|
||||||
step.setScheduleId(add.getScheduleId());
|
step.setScheduleId(add.getScheduleId());
|
||||||
step.setStepOrder((long) (i+1));
|
step.setStepOrder((long) (i+1));
|
||||||
|
step.setBatchId(1L);
|
||||||
if (i==0){
|
if (i==0){
|
||||||
step.setActualStart(new Date());
|
step.setActualStart(new Date());
|
||||||
}
|
}
|
||||||
@@ -172,6 +174,7 @@ public class OaProjectScheduleServiceImpl implements IOaProjectScheduleService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean complete(OaProjectScheduleBo bo) {
|
public boolean complete(OaProjectScheduleBo bo) {
|
||||||
// 0首先判断是否到最后一部
|
// 0首先判断是否到最后一部
|
||||||
OaProjectScheduleStepVo scheduleStepVo = projectScheduleStepService.maxStepByScheduleId(bo.getScheduleId());
|
OaProjectScheduleStepVo scheduleStepVo = projectScheduleStepService.maxStepByScheduleId(bo.getScheduleId());
|
||||||
@@ -180,11 +183,13 @@ public class OaProjectScheduleServiceImpl implements IOaProjectScheduleService {
|
|||||||
// 1未完成全部进度,此时将currentStep更新到下一位 然后将当前的step的完成标志status改为1标志完成
|
// 1未完成全部进度,此时将currentStep更新到下一位 然后将当前的step的完成标志status改为1标志完成
|
||||||
projectScheduleStepService.updateByStepAndScheduleId(bo.getCurrentStep(),bo.getScheduleId());
|
projectScheduleStepService.updateByStepAndScheduleId(bo.getCurrentStep(),bo.getScheduleId());
|
||||||
bo.setCurrentStep(bo.getCurrentStep()+1L);
|
bo.setCurrentStep(bo.getCurrentStep()+1L);
|
||||||
OaProjectScheduleStepVo stepVo = projectScheduleStepService.selectByCurrentStepAndScheduleId(bo.getCurrentStep()+1L,bo.getScheduleId());
|
OaProjectScheduleStepVo stepVo = projectScheduleStepService.selectByCurrentStepAndScheduleId(bo.getCurrentStep(),bo.getScheduleId());
|
||||||
stepVo.setActualStart(new Date());
|
stepVo.setActualStart(new Date());
|
||||||
OaProjectScheduleStepBo update = BeanUtil.toBean(stepVo, OaProjectScheduleStepBo.class);
|
OaProjectScheduleStepBo update = BeanUtil.toBean(stepVo, OaProjectScheduleStepBo.class);
|
||||||
projectScheduleStepService.updateByBo(update);
|
projectScheduleStepService.updateByBo(update);
|
||||||
}else{
|
}else{
|
||||||
|
// 将最后一步完成
|
||||||
|
projectScheduleStepService.updateByStepAndScheduleId(bo.getCurrentStep(),bo.getScheduleId());
|
||||||
// 2完成了全部进度,此时将此对象的status直接改为2代表完成了全部操作
|
// 2完成了全部进度,此时将此对象的status直接改为2代表完成了全部操作
|
||||||
OaProjectScheduleStepVo stepVo = projectScheduleStepService.selectByCurrentStepAndScheduleId(bo.getCurrentStep(),bo.getScheduleId());
|
OaProjectScheduleStepVo stepVo = projectScheduleStepService.selectByCurrentStepAndScheduleId(bo.getCurrentStep(),bo.getScheduleId());
|
||||||
OaProjectScheduleStepBo update = BeanUtil.toBean(stepVo, OaProjectScheduleStepBo.class);
|
OaProjectScheduleStepBo update = BeanUtil.toBean(stepVo, OaProjectScheduleStepBo.class);
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
package com.ruoyi.oa.service.impl;
|
package com.ruoyi.oa.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.ruoyi.oa.domain.OaProjectSchedule;
|
||||||
|
import com.ruoyi.oa.domain.bo.BatchBo;
|
||||||
|
import com.ruoyi.oa.mapper.OaProjectScheduleMapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.oa.domain.bo.OaProjectScheduleStepBo;
|
import com.ruoyi.oa.domain.bo.OaProjectScheduleStepBo;
|
||||||
@@ -15,10 +19,9 @@ import com.ruoyi.oa.domain.vo.OaProjectScheduleStepVo;
|
|||||||
import com.ruoyi.oa.domain.OaProjectScheduleStep;
|
import com.ruoyi.oa.domain.OaProjectScheduleStep;
|
||||||
import com.ruoyi.oa.mapper.OaProjectScheduleStepMapper;
|
import com.ruoyi.oa.mapper.OaProjectScheduleStepMapper;
|
||||||
import com.ruoyi.oa.service.IOaProjectScheduleStepService;
|
import com.ruoyi.oa.service.IOaProjectScheduleStepService;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目进度步骤跟踪Service业务层处理
|
* 项目进度步骤跟踪Service业务层处理
|
||||||
@@ -32,12 +35,14 @@ public class OaProjectScheduleStepServiceImpl implements IOaProjectScheduleStepS
|
|||||||
|
|
||||||
private final OaProjectScheduleStepMapper baseMapper;
|
private final OaProjectScheduleStepMapper baseMapper;
|
||||||
|
|
||||||
|
private final OaProjectScheduleMapper scheduleMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目进度步骤跟踪
|
* 查询项目进度步骤跟踪
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public OaProjectScheduleStepVo queryById(Long trackId){
|
public OaProjectScheduleStepVo queryById(Long trackId){
|
||||||
return baseMapper.selectVoPlusById(trackId);
|
return baseMapper.selectVoPlusById(trackId, LoginHelper.getUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,7 +51,7 @@ public class OaProjectScheduleStepServiceImpl implements IOaProjectScheduleStepS
|
|||||||
@Override
|
@Override
|
||||||
public TableDataInfo<OaProjectScheduleStepVo> queryPageList(OaProjectScheduleStepBo bo, PageQuery pageQuery) {
|
public TableDataInfo<OaProjectScheduleStepVo> queryPageList(OaProjectScheduleStepBo bo, PageQuery pageQuery) {
|
||||||
QueryWrapper<OaProjectScheduleStep> lqw = buildQueryWrapper(bo);
|
QueryWrapper<OaProjectScheduleStep> lqw = buildQueryWrapper(bo);
|
||||||
Page<OaProjectScheduleStepVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
Page<OaProjectScheduleStepVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw,LoginHelper.getUserId());
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,6 +67,7 @@ public class OaProjectScheduleStepServiceImpl implements IOaProjectScheduleStepS
|
|||||||
private QueryWrapper<OaProjectScheduleStep> buildQueryWrapper(OaProjectScheduleStepBo bo) {
|
private QueryWrapper<OaProjectScheduleStep> buildQueryWrapper(OaProjectScheduleStepBo bo) {
|
||||||
Map<String, Object> params = bo.getParams();
|
Map<String, Object> params = bo.getParams();
|
||||||
QueryWrapper<OaProjectScheduleStep> lqw = Wrappers.query();
|
QueryWrapper<OaProjectScheduleStep> lqw = Wrappers.query();
|
||||||
|
lqw.eq("opss.use_flag", 1);
|
||||||
lqw.eq(bo.getScheduleId() != null, "opss.schedule_id", bo.getScheduleId());
|
lqw.eq(bo.getScheduleId() != null, "opss.schedule_id", bo.getScheduleId());
|
||||||
lqw.eq("opss.del_flag", 0);
|
lqw.eq("opss.del_flag", 0);
|
||||||
lqw.eq(bo.getStepOrder() != null, "opss.step_order", bo.getStepOrder());
|
lqw.eq(bo.getStepOrder() != null, "opss.step_order", bo.getStepOrder());
|
||||||
@@ -89,6 +95,8 @@ public class OaProjectScheduleStepServiceImpl implements IOaProjectScheduleStepS
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateByBo(OaProjectScheduleStepBo bo) {
|
public Boolean updateByBo(OaProjectScheduleStepBo bo) {
|
||||||
|
|
||||||
|
// 除了做更新还需要编辑文件权限将涉及到的所有文件 都涉及到userId
|
||||||
OaProjectScheduleStep update = BeanUtil.toBean(bo, OaProjectScheduleStep.class);
|
OaProjectScheduleStep update = BeanUtil.toBean(bo, OaProjectScheduleStep.class);
|
||||||
validEntityBeforeSave(update);
|
validEntityBeforeSave(update);
|
||||||
return baseMapper.updateById(update) > 0;
|
return baseMapper.updateById(update) > 0;
|
||||||
@@ -127,4 +135,56 @@ public class OaProjectScheduleStepServiceImpl implements IOaProjectScheduleStepS
|
|||||||
public OaProjectScheduleStepVo selectByCurrentStepAndScheduleId(Long currentStep, Long scheduleId) {
|
public OaProjectScheduleStepVo selectByCurrentStepAndScheduleId(Long currentStep, Long scheduleId) {
|
||||||
return baseMapper.selectByCurrentStepAndScheduleId(currentStep,scheduleId);
|
return baseMapper.selectByCurrentStepAndScheduleId(currentStep,scheduleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public int changeBatch(BatchBo batchBo) {
|
||||||
|
List<OaProjectScheduleStepBo> boList = batchBo.getBoList();
|
||||||
|
OaProjectScheduleStepBo oaProjectScheduleStepBo = boList.get(0);
|
||||||
|
LambdaQueryWrapper<OaProjectScheduleStep> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(OaProjectScheduleStep::getScheduleId, oaProjectScheduleStepBo.getScheduleId());
|
||||||
|
wrapper.eq(OaProjectScheduleStep::getUseFlag, 1L);
|
||||||
|
List<OaProjectScheduleStep> oaProjectScheduleSteps = baseMapper.selectList(wrapper);
|
||||||
|
Long batchId = 1L;
|
||||||
|
// 首先将上一批次的全部关闭
|
||||||
|
for (OaProjectScheduleStep oaProjectScheduleStep : oaProjectScheduleSteps) {
|
||||||
|
oaProjectScheduleStep.setUseFlag(0L);
|
||||||
|
System.out.println(oaProjectScheduleStep);
|
||||||
|
baseMapper.updateById(oaProjectScheduleStep);
|
||||||
|
batchId = oaProjectScheduleStep.getBatchId();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
OaProjectSchedule oaProjectSchedule = new OaProjectSchedule();
|
||||||
|
oaProjectSchedule.setScheduleId(oaProjectScheduleStepBo.getScheduleId());
|
||||||
|
oaProjectSchedule.setCurrentStep(batchBo.getCurrentStep());
|
||||||
|
scheduleMapper.updateById(oaProjectSchedule);
|
||||||
|
// 新批次进入
|
||||||
|
int flag = 0;
|
||||||
|
batchId = batchId+1;
|
||||||
|
for (OaProjectScheduleStepBo projectScheduleStepBo : boList) {
|
||||||
|
projectScheduleStepBo.setTrackId(null);
|
||||||
|
projectScheduleStepBo.setUseFlag(1L);
|
||||||
|
projectScheduleStepBo.setScheduleId(oaProjectScheduleStepBo.getScheduleId());
|
||||||
|
projectScheduleStepBo.setBatchId(batchId);
|
||||||
|
|
||||||
|
// 将新增后的
|
||||||
|
if (projectScheduleStepBo.getStepOrder()> batchBo.getCurrentStep()){
|
||||||
|
projectScheduleStepBo.setActualStart(null);
|
||||||
|
projectScheduleStepBo.setActualEnd(null);
|
||||||
|
projectScheduleStepBo.setStatus(0L);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将新增后的
|
||||||
|
if (Objects.equals(projectScheduleStepBo.getStepOrder(), batchBo.getCurrentStep())){
|
||||||
|
projectScheduleStepBo.setActualStart(new Date());
|
||||||
|
projectScheduleStepBo.setActualEnd(null);
|
||||||
|
projectScheduleStepBo.setStatus(0L);
|
||||||
|
}
|
||||||
|
this.insertByBo(projectScheduleStepBo);
|
||||||
|
flag =1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,13 +64,12 @@ public class OaScheduleTemplateStepServiceImpl implements IOaScheduleTemplateSte
|
|||||||
QueryWrapper<OaScheduleTemplateStep> lqw = Wrappers.query();
|
QueryWrapper<OaScheduleTemplateStep> lqw = Wrappers.query();
|
||||||
|
|
||||||
lqw.eq(bo.getTemplateId() != null, "template_id", bo.getTemplateId());
|
lqw.eq(bo.getTemplateId() != null, "template_id", bo.getTemplateId());
|
||||||
|
|
||||||
lqw.eq(bo.getStepOrder() != null, "step_order", bo.getStepOrder());
|
lqw.eq(bo.getStepOrder() != null, "step_order", bo.getStepOrder());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getStepName()), "step_name", bo.getStepName());
|
lqw.like(StringUtils.isNotBlank(bo.getStepName()), "step_name", bo.getStepName());
|
||||||
lqw.eq(bo.getExpectedDays() != null,"expected_days", bo.getExpectedDays());
|
lqw.eq(bo.getExpectedDays() != null,"expected_days", bo.getExpectedDays());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getHeader()), "header", bo.getHeader());
|
lqw.eq(StringUtils.isNotBlank(bo.getHeader()), "header", bo.getHeader());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getDescription()), "description", bo.getDescription());
|
lqw.eq(StringUtils.isNotBlank(bo.getDescription()), "description", bo.getDescription());
|
||||||
lqw.groupBy("step_name","header","step_id");
|
lqw.groupBy("step_name","header","expected_days","description");
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import com.ruoyi.oa.domain.bo.SysOaClaimDetailBo;
|
import com.ruoyi.oa.domain.bo.SysOaClaimDetailBo;
|
||||||
import com.ruoyi.oa.domain.bo.SysOaFileBo;
|
import com.ruoyi.oa.domain.bo.SysOaFileBo;
|
||||||
import com.ruoyi.oa.service.ISysOaClaimDetailService;
|
import com.ruoyi.oa.service.ISysOaClaimDetailService;
|
||||||
import com.ruoyi.oa.service.ISysOaFileService;
|
import com.ruoyi.system.service.ISysOssService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -26,6 +26,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 差旅费报销Service业务层处理
|
* 差旅费报销Service业务层处理
|
||||||
@@ -43,7 +44,8 @@ public class SysOaClaimServiceImpl implements ISysOaClaimService {
|
|||||||
private ISysOaClaimDetailService sysOaClaimDetailService;
|
private ISysOaClaimDetailService sysOaClaimDetailService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysOaFileService sysOaFileService;
|
private ISysOssService ossService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询差旅费报销
|
* 查询差旅费报销
|
||||||
@@ -128,15 +130,8 @@ public class SysOaClaimServiceImpl implements ISysOaClaimService {
|
|||||||
validEntityBeforeSave(add);
|
validEntityBeforeSave(add);
|
||||||
|
|
||||||
// 处理文件
|
// 处理文件
|
||||||
List<Long> fileIds = new ArrayList<>();
|
List<String> fileUrls = bo.getFileList().stream().map(SysOaFileBo::getFileUrl).collect(Collectors.toList());
|
||||||
for (SysOaFileBo sysOaFile : bo.getFileList()) {
|
String fileIdsString = ossService.insertFiles(fileUrls);
|
||||||
Long fileId = sysOaFileService.insertByBoReturnId(sysOaFile);
|
|
||||||
fileIds.add(fileId);
|
|
||||||
}
|
|
||||||
String fileIdsString = fileIds.stream()
|
|
||||||
.map(String::valueOf) // 将 Long 转换为 String
|
|
||||||
.reduce((id1, id2) -> id1 + "," + id2) // 合并为一个逗号分隔的字符串
|
|
||||||
.orElse(""); // 如果列表为空,返回空字符串
|
|
||||||
add.setFileIds(fileIdsString);
|
add.setFileIds(fileIdsString);
|
||||||
add.setUserId(LoginHelper.getUserId());
|
add.setUserId(LoginHelper.getUserId());
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
|||||||
@@ -1,149 +0,0 @@
|
|||||||
package com.ruoyi.oa.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.ruoyi.oa.domain.bo.SysOaFileBo;
|
|
||||||
import com.ruoyi.oa.domain.vo.SysOaFileVo;
|
|
||||||
import com.ruoyi.oa.domain.SysOaFile;
|
|
||||||
import com.ruoyi.oa.mapper.SysOaFileMapper;
|
|
||||||
import com.ruoyi.oa.service.ISysOaFileService;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件存储Service业务层处理
|
|
||||||
*
|
|
||||||
* @author hdka
|
|
||||||
* @date 2024-12-15
|
|
||||||
*/
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Service
|
|
||||||
public class SysOaFileServiceImpl implements ISysOaFileService {
|
|
||||||
|
|
||||||
private final SysOaFileMapper baseMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询文件存储
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SysOaFileVo queryById(Long fileId){
|
|
||||||
return baseMapper.selectVoById(fileId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询文件存储列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public TableDataInfo<SysOaFileVo> queryPageList(SysOaFileBo bo, PageQuery pageQuery) {
|
|
||||||
LambdaQueryWrapper<SysOaFile> lqw = buildQueryWrapper(bo);
|
|
||||||
Page<SysOaFileVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
||||||
return TableDataInfo.build(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询文件存储列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<SysOaFileVo> queryList(SysOaFileBo bo) {
|
|
||||||
LambdaQueryWrapper<SysOaFile> lqw = buildQueryWrapper(bo);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
|
||||||
}
|
|
||||||
|
|
||||||
private LambdaQueryWrapper<SysOaFile> buildQueryWrapper(SysOaFileBo bo) {
|
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<SysOaFile> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), SysOaFile::getFileUrl, bo.getFileUrl());
|
|
||||||
lqw.eq(bo.getStatus() != null, SysOaFile::getStatus, bo.getStatus());
|
|
||||||
lqw.like(bo.getQueryCreateTime() != null, SysOaFile::getCreateTime, bo.getQueryCreateTime());
|
|
||||||
return lqw;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增文件存储
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean insertByBo(SysOaFileBo bo) {
|
|
||||||
SysOaFile add = BeanUtil.toBean(bo, SysOaFile.class);
|
|
||||||
validEntityBeforeSave(add);
|
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
|
||||||
if (flag) {
|
|
||||||
bo.setFileId(add.getFileId());
|
|
||||||
}
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增文件存储
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Long insertByBoReturnId(SysOaFileBo bo) {
|
|
||||||
SysOaFile add = BeanUtil.toBean(bo, SysOaFile.class);
|
|
||||||
validEntityBeforeSave(add);
|
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
|
||||||
if (flag) {
|
|
||||||
bo.setFileId(add.getFileId());
|
|
||||||
}
|
|
||||||
return add.getFileId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String insertFiles(List<String> fileUrls) {
|
|
||||||
// 用于存放插入后返回的 fileId
|
|
||||||
List<Long> fileIds = fileUrls.stream().map(fileUrl -> {
|
|
||||||
// 这里假设你有一个插入方法, 返回插入后的主键ID:
|
|
||||||
// Long fileId = fileDao.insertFile(fileUrl);
|
|
||||||
|
|
||||||
// 这里只是示例,假设插入后自增ID就是某个数字:
|
|
||||||
// 为演示,这里用当前时间戳模拟
|
|
||||||
SysOaFile sysOaFile = new SysOaFile();
|
|
||||||
sysOaFile.setFileUrl(fileUrl);
|
|
||||||
baseMapper.insert(sysOaFile);
|
|
||||||
|
|
||||||
// 真实代码中应该返回数据库生成的主键ID
|
|
||||||
return sysOaFile.getFileId();
|
|
||||||
}).collect(Collectors.toList());
|
|
||||||
// 将 fileIds 转为逗号分隔的字符串
|
|
||||||
return fileIds.stream()
|
|
||||||
.map(String::valueOf)
|
|
||||||
.collect(Collectors.joining(","));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改文件存储
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean updateByBo(SysOaFileBo bo) {
|
|
||||||
SysOaFile update = BeanUtil.toBean(bo, SysOaFile.class);
|
|
||||||
validEntityBeforeSave(update);
|
|
||||||
return baseMapper.updateById(update) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存前的数据校验
|
|
||||||
*/
|
|
||||||
private void validEntityBeforeSave(SysOaFile entity){
|
|
||||||
//TODO 做一些数据校验,如唯一约束
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除文件存储
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
||||||
if(isValid){
|
|
||||||
//TODO 做一些业务上的校验,判断是否需要校验
|
|
||||||
}
|
|
||||||
return baseMapper.deleteBatchIds(ids) > 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,7 +7,7 @@ import com.ruoyi.common.core.domain.PageQuery;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.ruoyi.oa.service.ISysOaFileService;
|
import com.ruoyi.system.service.ISysOssService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.oa.domain.bo.SysOaTaskItemBo;
|
import com.ruoyi.oa.domain.bo.SysOaTaskItemBo;
|
||||||
@@ -33,7 +33,9 @@ public class SysOaTaskItemServiceImpl implements ISysOaTaskItemService {
|
|||||||
|
|
||||||
private final SysOaTaskItemMapper baseMapper;
|
private final SysOaTaskItemMapper baseMapper;
|
||||||
|
|
||||||
private final ISysOaFileService fileService;
|
|
||||||
|
|
||||||
|
private final ISysOssService ossService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询报工任务单元
|
* 查询报工任务单元
|
||||||
@@ -133,7 +135,7 @@ public class SysOaTaskItemServiceImpl implements ISysOaTaskItemService {
|
|||||||
List<String> fileUrls = Arrays.stream(bo.getFiles().split(","))
|
List<String> fileUrls = Arrays.stream(bo.getFiles().split(","))
|
||||||
.map(String::valueOf)
|
.map(String::valueOf)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
String fileIds = fileService.insertFiles(fileUrls);
|
String fileIds = ossService.insertFiles(fileUrls);
|
||||||
bo.setFiles(fileIds);
|
bo.setFiles(fileIds);
|
||||||
}
|
}
|
||||||
SysOaTaskItem update = BeanUtil.toBean(bo, SysOaTaskItem.class);
|
SysOaTaskItem update = BeanUtil.toBean(bo, SysOaTaskItem.class);
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
package com.ruoyi.oa.service.impl;
|
package com.ruoyi.oa.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.ruoyi.common.core.domain.R;
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
|
||||||
import com.ruoyi.common.helper.LoginHelper;
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -14,9 +10,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import com.ruoyi.oa.domain.*;
|
import com.ruoyi.oa.domain.*;
|
||||||
import com.ruoyi.oa.domain.bo.SysOaTaskItemBo;
|
import com.ruoyi.oa.domain.bo.SysOaTaskItemBo;
|
||||||
import com.ruoyi.oa.mapper.SysOaTaskItemMapper;
|
import com.ruoyi.oa.mapper.SysOaTaskItemMapper;
|
||||||
import com.ruoyi.oa.service.ISysOaFileService;
|
|
||||||
import com.ruoyi.oa.service.ISysOaTaskItemService;
|
import com.ruoyi.oa.service.ISysOaTaskItemService;
|
||||||
import com.ruoyi.system.service.ISysDictTypeService;
|
import com.ruoyi.system.service.ISysOssService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -43,13 +38,11 @@ public class SysOaTaskServiceImpl implements ISysOaTaskService {
|
|||||||
|
|
||||||
private final SysOaTaskMapper baseMapper;
|
private final SysOaTaskMapper baseMapper;
|
||||||
|
|
||||||
private final ISysDictTypeService dictTypeService;
|
|
||||||
|
|
||||||
private final ISysOaTaskItemService taskItemService;
|
private final ISysOaTaskItemService taskItemService;
|
||||||
|
|
||||||
private final SysOaTaskItemMapper taskItemMapper;
|
private final SysOaTaskItemMapper taskItemMapper;
|
||||||
|
|
||||||
private final ISysOaFileService fileService;
|
private final ISysOssService ossService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询任务管理
|
* 查询任务管理
|
||||||
@@ -175,7 +168,7 @@ public class SysOaTaskServiceImpl implements ISysOaTaskService {
|
|||||||
List<String> fileUrls = Arrays.stream(bo.getAccessory().split(","))
|
List<String> fileUrls = Arrays.stream(bo.getAccessory().split(","))
|
||||||
.map(String::valueOf)
|
.map(String::valueOf)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
String fileIds = fileService.insertFiles(fileUrls);
|
String fileIds = ossService.insertFiles(fileUrls);
|
||||||
|
|
||||||
bo.setAccessory(fileIds);
|
bo.setAccessory(fileIds);
|
||||||
}
|
}
|
||||||
@@ -183,7 +176,7 @@ public class SysOaTaskServiceImpl implements ISysOaTaskService {
|
|||||||
List<String> fileUrls = Arrays.stream(bo.getFiles().split(","))
|
List<String> fileUrls = Arrays.stream(bo.getFiles().split(","))
|
||||||
.map(String::valueOf)
|
.map(String::valueOf)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
String fileIds = fileService.insertFiles(fileUrls);
|
String fileIds = ossService.insertFiles(fileUrls);
|
||||||
|
|
||||||
bo.setFiles(fileIds);
|
bo.setFiles(fileIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,18 +137,21 @@ public class SysOaWarehouseDetailServiceImpl implements ISysOaWarehouseDetailSer
|
|||||||
public Boolean insertByBo(SysOaWarehouseDetailBo bo) {
|
public Boolean insertByBo(SysOaWarehouseDetailBo bo) {
|
||||||
SysOaWarehouseDetail decrease = toBean(bo, SysOaWarehouseDetail.class);
|
SysOaWarehouseDetail decrease = toBean(bo, SysOaWarehouseDetail.class);
|
||||||
validEntityBeforeSave(decrease);
|
validEntityBeforeSave(decrease);
|
||||||
SysOaWarehouse warehouse = warehouseMapper.selectById(decrease.getWarehouseId());
|
|
||||||
// 1 如果对应仓库表项目数量-将要出库数量<0,出库失败, 繁殖 , 增加该条
|
if (!Objects.nonNull(bo.getType()) || bo.getType() != 1) {
|
||||||
if(warehouse == null) {
|
SysOaWarehouse warehouse = warehouseMapper.selectById(decrease.getWarehouseId());
|
||||||
throw new Error("已不存在该物料"+decrease.getWarehouseId());
|
// 1 如果对应仓库表项目数量-将要出库数量<0,出库失败, 繁殖 , 增加该条
|
||||||
}
|
if(warehouse == null) {
|
||||||
if(warehouse.getInventory() - decrease.getAmount() < 0) {
|
throw new Error("已不存在该物料"+decrease.getWarehouseId());
|
||||||
throw new Error("剩余数量不足,出库失败");
|
}
|
||||||
}
|
if(warehouse.getInventory() - decrease.getAmount() < 0) {
|
||||||
else {
|
throw new Error("剩余数量不足,出库失败");
|
||||||
warehouse.setInventory(warehouse.getInventory() - decrease.getAmount());
|
}
|
||||||
warehouse.setUpdateTime(new Date());
|
else {
|
||||||
warehouseMapper.updateById(warehouse);
|
warehouse.setInventory(warehouse.getInventory() - decrease.getAmount());
|
||||||
|
warehouse.setUpdateTime(new Date());
|
||||||
|
warehouseMapper.updateById(warehouse);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2、减少仓库表中对应项目的数量
|
// 2、减少仓库表中对应项目的数量
|
||||||
|
|||||||
@@ -7,14 +7,12 @@ import com.ruoyi.common.utils.StringUtils;
|
|||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.ruoyi.oa.domain.SysOaWarehouseDetail;
|
import com.ruoyi.oa.domain.SysOaWarehouseDetail;
|
||||||
import com.ruoyi.oa.domain.bo.SysOaWarehouseBo;
|
import com.ruoyi.oa.domain.bo.SysOaWarehouseBo;
|
||||||
import com.ruoyi.oa.domain.bo.SysOaWarehouseDetailBo;
|
import com.ruoyi.oa.domain.bo.SysOaWarehouseDetailBo;
|
||||||
import com.ruoyi.oa.mapper.SysOaWarehouseDetailMapper;
|
import com.ruoyi.oa.mapper.SysOaWarehouseDetailMapper;
|
||||||
import com.ruoyi.oa.service.ISysOaWarehouseDetailService;
|
import com.ruoyi.oa.service.ISysOaWarehouseDetailService;
|
||||||
import com.ruoyi.oa.service.ISysOaWarehouseService;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.oa.domain.bo.SysOaWarehouseMasterBo;
|
import com.ruoyi.oa.domain.bo.SysOaWarehouseMasterBo;
|
||||||
@@ -40,7 +38,6 @@ public class SysOaWarehouseMasterServiceImpl implements ISysOaWarehouseMasterSer
|
|||||||
private final SysOaWarehouseMasterMapper baseMapper;
|
private final SysOaWarehouseMasterMapper baseMapper;
|
||||||
|
|
||||||
private final ISysOaWarehouseDetailService warehouseDetailService;
|
private final ISysOaWarehouseDetailService warehouseDetailService;
|
||||||
private final SysOaWarehouseDetailMapper warehouseDetailMapper;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -98,8 +95,7 @@ public class SysOaWarehouseMasterServiceImpl implements ISysOaWarehouseMasterSer
|
|||||||
// 单子新增后 新增出库元素同时减去现有的,这里要记录一个出库时单价
|
// 单子新增后 新增出库元素同时减去现有的,这里要记录一个出库时单价
|
||||||
for (SysOaWarehouseDetailBo sysOaWarehouseDetailBo : bo.getWarehouseList()) {
|
for (SysOaWarehouseDetailBo sysOaWarehouseDetailBo : bo.getWarehouseList()) {
|
||||||
sysOaWarehouseDetailBo.setMasterId(add.getMasterId());
|
sysOaWarehouseDetailBo.setMasterId(add.getMasterId());
|
||||||
SysOaWarehouseDetail add2 = toBean(sysOaWarehouseDetailBo, SysOaWarehouseDetail.class);
|
warehouseDetailService.insertByBo(sysOaWarehouseDetailBo);
|
||||||
warehouseDetailMapper.insert(add2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
@@ -110,6 +106,7 @@ public class SysOaWarehouseMasterServiceImpl implements ISysOaWarehouseMasterSer
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateByBo(SysOaWarehouseMasterBo bo) {
|
public Boolean updateByBo(SysOaWarehouseMasterBo bo) {
|
||||||
|
System.out.println(bo);
|
||||||
// 判断是否为采购单,采购单,用户是直接点击完成按钮,所以直接更新单子状态就可以
|
// 判断是否为采购单,采购单,用户是直接点击完成按钮,所以直接更新单子状态就可以
|
||||||
if (bo.getType()!=2L){
|
if (bo.getType()!=2L){
|
||||||
SysOaWarehouseMaster update = BeanUtil.toBean(bo, SysOaWarehouseMaster.class);
|
SysOaWarehouseMaster update = BeanUtil.toBean(bo, SysOaWarehouseMaster.class);
|
||||||
@@ -119,10 +116,12 @@ public class SysOaWarehouseMasterServiceImpl implements ISysOaWarehouseMasterSer
|
|||||||
List<SysOaWarehouseDetailBo> warehouseList = bo.getWarehouseList();
|
List<SysOaWarehouseDetailBo> warehouseList = bo.getWarehouseList();
|
||||||
for (SysOaWarehouseDetailBo sysOaWarehouseDetailBo : warehouseList) {
|
for (SysOaWarehouseDetailBo sysOaWarehouseDetailBo : warehouseList) {
|
||||||
sysOaWarehouseDetailBo.setMasterId(bo.getMasterId());
|
sysOaWarehouseDetailBo.setMasterId(bo.getMasterId());
|
||||||
|
sysOaWarehouseDetailBo.setType(bo.getType());
|
||||||
warehouseDetailService.insertByBo(sysOaWarehouseDetailBo);
|
warehouseDetailService.insertByBo(sysOaWarehouseDetailBo);
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return flag;
|
return flag;
|
||||||
}else{
|
}else{
|
||||||
SysOaWarehouseMaster update = BeanUtil.toBean(bo, SysOaWarehouseMaster.class);
|
SysOaWarehouseMaster update = BeanUtil.toBean(bo, SysOaWarehouseMaster.class);
|
||||||
@@ -152,7 +151,7 @@ public class SysOaWarehouseMasterServiceImpl implements ISysOaWarehouseMasterSer
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insertInWarehouse(SysOaWarehouseBo bo) {
|
public int insertInWarehouse(SysOaWarehouseBo bo, Long id) {
|
||||||
SysOaWarehouseMaster sysOaWarehouseMaster = new SysOaWarehouseMaster();
|
SysOaWarehouseMaster sysOaWarehouseMaster = new SysOaWarehouseMaster();
|
||||||
sysOaWarehouseMaster.setMasterNum(UUID.randomUUID().toString());
|
sysOaWarehouseMaster.setMasterNum(UUID.randomUUID().toString());
|
||||||
sysOaWarehouseMaster.setRemark(bo.getRemark());
|
sysOaWarehouseMaster.setRemark(bo.getRemark());
|
||||||
@@ -169,7 +168,10 @@ public class SysOaWarehouseMasterServiceImpl implements ISysOaWarehouseMasterSer
|
|||||||
sysOaWarehouseDetailBo.setCreateBy(LoginHelper.getNickName());
|
sysOaWarehouseDetailBo.setCreateBy(LoginHelper.getNickName());
|
||||||
sysOaWarehouseDetailBo.setUpdateBy(LoginHelper.getNickName());
|
sysOaWarehouseDetailBo.setUpdateBy(LoginHelper.getNickName());
|
||||||
sysOaWarehouseDetailBo.setMasterId(sysOaWarehouseMaster.getMasterId());
|
sysOaWarehouseDetailBo.setMasterId(sysOaWarehouseMaster.getMasterId());
|
||||||
|
sysOaWarehouseDetailBo.setType(sysOaWarehouseMaster.getType());
|
||||||
|
sysOaWarehouseDetailBo.setWarehouseId(id);
|
||||||
warehouseDetailService.insertByBo(sysOaWarehouseDetailBo);
|
warehouseDetailService.insertByBo(sysOaWarehouseDetailBo);
|
||||||
|
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,22 +2,18 @@ package com.ruoyi.oa.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.ruoyi.common.core.domain.R;
|
|
||||||
import com.ruoyi.common.excel.ExcelResult;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.oa.domain.bo.SysOaWarehouseDetailBo;
|
import com.ruoyi.oa.domain.bo.SysOaWarehouseDetailBo;
|
||||||
import com.ruoyi.oa.domain.bo.SysOaWarehouseMasterBo;
|
import com.ruoyi.oa.domain.bo.SysOaWarehouseMasterBo;
|
||||||
import com.ruoyi.oa.listener.SysOaWarehouseListener;
|
|
||||||
import com.ruoyi.oa.mapper.SysOaWarehouseDetailMapper;
|
import com.ruoyi.oa.mapper.SysOaWarehouseDetailMapper;
|
||||||
import com.ruoyi.oa.mapper.SysOaWarehouseMasterMapper;
|
|
||||||
import com.ruoyi.oa.service.ISysOaWarehouseMasterService;
|
import com.ruoyi.oa.service.ISysOaWarehouseMasterService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.oa.domain.bo.SysOaWarehouseBo;
|
import com.ruoyi.oa.domain.bo.SysOaWarehouseBo;
|
||||||
import com.ruoyi.oa.domain.vo.SysOaWarehouseVo;
|
import com.ruoyi.oa.domain.vo.SysOaWarehouseVo;
|
||||||
@@ -33,6 +29,7 @@ import java.util.*;
|
|||||||
* @author liuzongkun999
|
* @author liuzongkun999
|
||||||
* @date 2024-11-02
|
* @date 2024-11-02
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
public class SysOaWarehouseServiceImpl implements ISysOaWarehouseService {
|
public class SysOaWarehouseServiceImpl implements ISysOaWarehouseService {
|
||||||
@@ -75,6 +72,7 @@ public class SysOaWarehouseServiceImpl implements ISysOaWarehouseService {
|
|||||||
.like(StringUtils.isNotBlank(bo.getName()), "sow.model", bo.getName());
|
.like(StringUtils.isNotBlank(bo.getName()), "sow.model", bo.getName());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getModel()), "sow.model", bo.getModel());
|
lqw.eq(StringUtils.isNotBlank(bo.getModel()), "sow.model", bo.getModel());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getBrand()), "sow.brand", bo.getBrand());
|
lqw.eq(StringUtils.isNotBlank(bo.getBrand()), "sow.brand", bo.getBrand());
|
||||||
|
lqw.eq("sow.del_flag", 0);
|
||||||
if (b){
|
if (b){
|
||||||
lqw.apply("sow.inventory < sow.threshold");
|
lqw.apply("sow.inventory < sow.threshold");
|
||||||
}else{
|
}else{
|
||||||
@@ -141,7 +139,7 @@ public class SysOaWarehouseServiceImpl implements ISysOaWarehouseService {
|
|||||||
* 新增仓库管理
|
* 新增仓库管理
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean insertByBo(SysOaWarehouseBo bo) {
|
public Long insertByBo(SysOaWarehouseBo bo) {
|
||||||
SysOaWarehouse add = BeanUtil.toBean(bo, SysOaWarehouse.class);
|
SysOaWarehouse add = BeanUtil.toBean(bo, SysOaWarehouse.class);
|
||||||
validEntityBeforeSave(add);
|
validEntityBeforeSave(add);
|
||||||
// 1、查询仓库中是否有已存在项目
|
// 1、查询仓库中是否有已存在项目
|
||||||
@@ -150,17 +148,16 @@ public class SysOaWarehouseServiceImpl implements ISysOaWarehouseService {
|
|||||||
lqw.eq(StringUtils.isNotBlank(bo.getModel()), SysOaWarehouse::getModel, bo.getModel());
|
lqw.eq(StringUtils.isNotBlank(bo.getModel()), SysOaWarehouse::getModel, bo.getModel());
|
||||||
SysOaWarehouse select = baseMapper.selectOne(lqw);
|
SysOaWarehouse select = baseMapper.selectOne(lqw);
|
||||||
// 2、 无则直接新增项目 有则直接增加库存数量
|
// 2、 无则直接新增项目 有则直接增加库存数量
|
||||||
boolean flag;
|
Long flag;
|
||||||
if (select == null) {
|
if (select == null) {
|
||||||
flag = baseMapper.insert(add) > 0;
|
baseMapper.insert(add);
|
||||||
|
flag = add.getId();
|
||||||
} else {
|
} else {
|
||||||
select.setInventory(select.getInventory() + bo.getInventory());
|
select.setInventory(select.getInventory() + bo.getInventory());
|
||||||
select.setPrice((select.getPrice()*select.getInventory() + bo.getPrice()*bo.getInventory())/(select.getInventory()+bo.getInventory()));
|
select.setPrice((select.getPrice()*select.getInventory() + bo.getPrice()*bo.getInventory())/(select.getInventory()+bo.getInventory()));
|
||||||
flag = baseMapper.updateById(select) > 0;
|
flag = select.getId();
|
||||||
}
|
|
||||||
if (flag) {
|
|
||||||
bo.setId(add.getId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,12 +172,14 @@ public class SysOaWarehouseServiceImpl implements ISysOaWarehouseService {
|
|||||||
lqw.eq(SysOaWarehouse::getName, bo.getName());
|
lqw.eq(SysOaWarehouse::getName, bo.getName());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getModel()), SysOaWarehouse::getModel, bo.getModel());
|
lqw.eq(StringUtils.isNotBlank(bo.getModel()), SysOaWarehouse::getModel, bo.getModel());
|
||||||
SysOaWarehouse select = baseMapper.selectOne(lqw);
|
SysOaWarehouse select = baseMapper.selectOne(lqw);
|
||||||
|
System.out.println(select);
|
||||||
// 2、 无则直接新增项目 有则直接增加库存数量
|
// 2、 无则直接新增项目 有则直接增加库存数量
|
||||||
if (select == null) {
|
if (select == null) {
|
||||||
baseMapper.insert(add);
|
baseMapper.insert(add);
|
||||||
return add.getId();
|
return add.getId();
|
||||||
} else {
|
} else {
|
||||||
select.setInventory(select.getInventory() + bo.getInventory());
|
System.out.println(select);
|
||||||
|
select.setInventory(select.getInventory() + bo.getTaskInventory());
|
||||||
select.setPrice((select.getPrice()*select.getInventory() + bo.getPrice()*bo.getInventory())/(select.getInventory()+bo.getInventory()));
|
select.setPrice((select.getPrice()*select.getInventory() + bo.getPrice()*bo.getInventory())/(select.getInventory()+bo.getInventory()));
|
||||||
baseMapper.updateById(select);
|
baseMapper.updateById(select);
|
||||||
return select.getId();
|
return select.getId();
|
||||||
|
|||||||
@@ -0,0 +1,111 @@
|
|||||||
|
package com.ruoyi.oa.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
|
import com.ruoyi.oa.domain.SysOssAcl;
|
||||||
|
import com.ruoyi.oa.domain.vo.SysUserVo;
|
||||||
|
import com.ruoyi.oa.mapper.SysOssAclMapper;
|
||||||
|
import com.ruoyi.oa.service.SysOssAclService;
|
||||||
|
import com.ruoyi.system.domain.SysOss;
|
||||||
|
import com.ruoyi.system.mapper.SysOssMapper;
|
||||||
|
import com.ruoyi.system.mapper.SysUserMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SysOssAclServiceImpl extends ServiceImpl<SysOssAclMapper, SysOssAcl> implements SysOssAclService {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysUserMapper userMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysOssMapper sysOssMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void grant(Long ossId, Long userId, Long grantBy) {
|
||||||
|
grantBy = LoginHelper.getUserId();
|
||||||
|
SysOssAcl acl = lambdaQuery()
|
||||||
|
.eq(SysOssAcl::getOssId, ossId)
|
||||||
|
.eq(SysOssAcl::getUserId, userId)
|
||||||
|
.one();
|
||||||
|
|
||||||
|
if (acl == null) {
|
||||||
|
acl = new SysOssAcl();
|
||||||
|
acl.setOssId(ossId);
|
||||||
|
acl.setUserId(userId);
|
||||||
|
acl.setGrantBy(grantBy);
|
||||||
|
save(acl);
|
||||||
|
} else {
|
||||||
|
updateById(acl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void revoke(Long ossId, Long userId) {
|
||||||
|
lambdaUpdate()
|
||||||
|
.eq(SysOssAcl::getOssId, ossId)
|
||||||
|
.eq(SysOssAcl::getUserId, userId)
|
||||||
|
.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasPerm(Long userId, Long ossId) {
|
||||||
|
SysOssAcl acl = lambdaQuery()
|
||||||
|
.eq(SysOssAcl::getOssId, ossId)
|
||||||
|
.eq(SysOssAcl::getUserId, userId)
|
||||||
|
.one();
|
||||||
|
return acl != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysUserVo> listUsersByOssId(Long ossId) {
|
||||||
|
/* 1. 校验文件是否存在 / 是否已公开 */
|
||||||
|
System.out.println(ossId);
|
||||||
|
SysOss oss = sysOssMapper.selectById(ossId);
|
||||||
|
if (oss == null) {
|
||||||
|
throw new ServiceException("文件不存在");
|
||||||
|
}
|
||||||
|
if (oss.getIsPublic() == 1) {
|
||||||
|
// 公开文件:直接返回空集(前端可用 isPublic 判断)
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 2. 查询 ACL 获得已授权用户 ID */
|
||||||
|
List<SysOssAcl> aclList = this.lambdaQuery()
|
||||||
|
.eq(SysOssAcl::getOssId, ossId)
|
||||||
|
.list();
|
||||||
|
if (aclList.isEmpty()) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Long> userIds = aclList.stream()
|
||||||
|
.map(SysOssAcl::getUserId)
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
/* 3. 批量查询用户表 */
|
||||||
|
List<SysUser> users = userMapper.selectBatchIds(userIds);
|
||||||
|
System.out.println(users);
|
||||||
|
/* 4. 转成 DTO */
|
||||||
|
return users.stream().map(u -> {
|
||||||
|
SysUserVo dto = new SysUserVo();
|
||||||
|
dto.setUserId(u.getUserId());
|
||||||
|
dto.setNickName(u.getNickName());
|
||||||
|
dto.setPhonenumber(u.getPhonenumber());
|
||||||
|
// 若 SysUser 中已有 deptName,可直接取;否则自行拼装
|
||||||
|
if (u.getDept() != null) {
|
||||||
|
dto.setDept(u.getDept());
|
||||||
|
}
|
||||||
|
return dto;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,57 +22,53 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectVoPagePlus" resultType="com.ruoyi.oa.domain.vo.OaProjectScheduleVo">
|
<select id="selectVoPagePlus" resultType="com.ruoyi.oa.domain.vo.OaProjectScheduleVo">
|
||||||
SELECT
|
SELECT ops.schedule_id,
|
||||||
ops.schedule_id,
|
ops.project_id,
|
||||||
ops.project_id,
|
ops.template_id,
|
||||||
ops.template_id,
|
ops.current_step,
|
||||||
ops.current_step,
|
opss.step_name AS currentStepName,
|
||||||
opss.step_name AS currentStepName,
|
ops.start_time,
|
||||||
ops.start_time,
|
ops.end_time,
|
||||||
ops.end_time,
|
ops.status,
|
||||||
ops.status,
|
ops.remark,
|
||||||
ops.remark,
|
|
||||||
|
|
||||||
-- 项目信息
|
/* ======================== 项目信息 ==================== */
|
||||||
op.project_id AS opProjectId,
|
op.project_id AS opProjectId,
|
||||||
op.project_name,
|
op.project_name,
|
||||||
op.project_num,
|
op.project_num,
|
||||||
op.project_type,
|
op.project_type,
|
||||||
op.address,
|
op.address,
|
||||||
op.funds,
|
op.funds,
|
||||||
op.functionary,
|
op.functionary,
|
||||||
op.begin_time,
|
op.begin_time,
|
||||||
op.finish_time,
|
op.finish_time,
|
||||||
op.introduction,
|
op.introduction,
|
||||||
op.project_grade,
|
op.project_grade,
|
||||||
op.project_status,
|
op.project_status,
|
||||||
op.trade_type,
|
op.trade_type,
|
||||||
op.pre_pay,
|
op.pre_pay,
|
||||||
opss.plan_end,
|
opss.plan_end,
|
||||||
|
TIMESTAMPDIFF(DAY, NOW(), opss.plan_end) AS remainTime,
|
||||||
|
ROUND(
|
||||||
|
(
|
||||||
|
(ops.current_step - CASE WHEN opss.status = 0 THEN 1 ELSE 0 END)
|
||||||
|
/ NULLIF(maxs.max_order, 0)
|
||||||
|
) * 100,
|
||||||
|
2
|
||||||
|
) AS schedulePercentage
|
||||||
|
|
||||||
-- 剩余天数
|
FROM oa_project_schedule AS ops
|
||||||
TIMESTAMPDIFF(DAY, NOW(), opss.plan_end) AS remainTime,
|
LEFT JOIN sys_oa_project AS op ON ops.project_id = op.project_id
|
||||||
|
LEFT JOIN oa_project_schedule_step AS opss
|
||||||
-- 进度百分比:当 current_step=1 时强制为0,否则按公式计算
|
|
||||||
CASE
|
|
||||||
WHEN ops.current_step = 1 THEN 0
|
|
||||||
ELSE ROUND((ops.current_step / NULLIF(maxs.max_order,0)) * 100, 2)
|
|
||||||
END AS schedulePercentage -- 添加 NULLIF 防止除以0
|
|
||||||
|
|
||||||
FROM oa_project_schedule ops
|
|
||||||
LEFT JOIN sys_oa_project op ON ops.project_id = op.project_id
|
|
||||||
LEFT JOIN oa_project_schedule_step opss
|
|
||||||
ON ops.schedule_id = opss.schedule_id
|
ON ops.schedule_id = opss.schedule_id
|
||||||
AND opss.step_order = ops.current_step
|
AND opss.step_order = ops.current_step
|
||||||
LEFT JOIN (
|
AND opss.use_flag = '1'
|
||||||
SELECT
|
LEFT JOIN (SELECT schedule_id,
|
||||||
schedule_id,
|
MAX(step_order) AS max_order
|
||||||
MAX(step_order) AS max_order
|
FROM oa_project_schedule_step
|
||||||
FROM oa_project_schedule_step
|
WHERE use_flag = '1'
|
||||||
GROUP BY schedule_id
|
GROUP BY schedule_id) AS maxs ON maxs.schedule_id = ops.schedule_id
|
||||||
) maxs ON maxs.schedule_id = ops.schedule_id
|
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,17 +20,29 @@
|
|||||||
<result property="actualEnd" column="actual_end"/>
|
<result property="actualEnd" column="actual_end"/>
|
||||||
<result property="status" column="status"/>
|
<result property="status" column="status"/>
|
||||||
<result property="expectedDays" column="expected_days"/>
|
<result property="expectedDays" column="expected_days"/>
|
||||||
|
<result property="useFlag" column="use_flag"/>
|
||||||
|
|
||||||
<!-- ========== 附件列表:多对一 折叠 ========= -->
|
<!-- ========== 附件列表:多对一 折叠 ========= -->
|
||||||
<collection property="fileList"
|
<collection property="fileList"
|
||||||
ofType="com.ruoyi.system.domain.SysOss"
|
ofType="com.ruoyi.system.domain.SysOss"
|
||||||
javaType="java.util.ArrayList">
|
javaType="java.util.ArrayList">
|
||||||
<result property="ossId" column="attach_oss_id"/>
|
<result property="ossId" column="oss_id"/>
|
||||||
<result property="url" column="attach_url"/>
|
<result property="url" column="attach_url"/>
|
||||||
<result property="fileName" column="attach_file_name"/>
|
<result property="fileName" column="attach_file_name"/>
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="isPublic" column="is_public"/>
|
||||||
|
<result property="ownerId" column="owner_id"/>
|
||||||
</collection>
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="OssVisibleCondition">
|
||||||
|
( so.is_public = 1
|
||||||
|
OR so.owner_id = #{userId}
|
||||||
|
OR EXISTS (SELECT 1 FROM sys_oss_acl a
|
||||||
|
WHERE a.oss_id = so.oss_id
|
||||||
|
AND a.user_id = #{userId}) )
|
||||||
|
</sql>
|
||||||
|
|
||||||
<update id="updateByStepAndScheduleId">
|
<update id="updateByStepAndScheduleId">
|
||||||
UPDATE oa_project_schedule_step
|
UPDATE oa_project_schedule_step
|
||||||
SET
|
SET
|
||||||
@@ -40,6 +52,7 @@
|
|||||||
schedule_id = #{scheduleId}
|
schedule_id = #{scheduleId}
|
||||||
AND step_order = #{currentStep}
|
AND step_order = #{currentStep}
|
||||||
AND del_flag = '0'
|
AND del_flag = '0'
|
||||||
|
and use_flag = '1'
|
||||||
</update>
|
</update>
|
||||||
<select id="maxStepByScheduleId" resultMap="OaProjectScheduleStepResult">
|
<select id="maxStepByScheduleId" resultMap="OaProjectScheduleStepResult">
|
||||||
SELECT opss.track_id,
|
SELECT opss.track_id,
|
||||||
@@ -54,6 +67,7 @@
|
|||||||
opss.status,
|
opss.status,
|
||||||
opss.del_flag,
|
opss.del_flag,
|
||||||
opss.header,
|
opss.header,
|
||||||
|
opss.use_flag,
|
||||||
osts.expected_days,
|
osts.expected_days,
|
||||||
osts.description
|
osts.description
|
||||||
FROM oa_project_schedule_step opss
|
FROM oa_project_schedule_step opss
|
||||||
@@ -61,12 +75,15 @@
|
|||||||
LEFT JOIN fad_oa.oa_schedule_template_step osts ON osts.template_id = ops.template_id AND osts.step_order = opss.step_order
|
LEFT JOIN fad_oa.oa_schedule_template_step osts ON osts.template_id = ops.template_id AND osts.step_order = opss.step_order
|
||||||
WHERE opss.schedule_id = #{scheduleId}
|
WHERE opss.schedule_id = #{scheduleId}
|
||||||
AND opss.del_flag = '0'
|
AND opss.del_flag = '0'
|
||||||
|
and opss.use_flag = '1'
|
||||||
AND opss.step_order = (
|
AND opss.step_order = (
|
||||||
SELECT MAX(step_order)
|
SELECT MAX(step_order)
|
||||||
FROM oa_project_schedule_step
|
FROM oa_project_schedule_step
|
||||||
WHERE schedule_id = #{scheduleId}
|
WHERE schedule_id = #{scheduleId}
|
||||||
AND del_flag = '0'
|
AND del_flag = '0'
|
||||||
|
and use_flag = '1'
|
||||||
)
|
)
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="selectVoPagePlus" resultMap="OaProjectScheduleStepResult">
|
<select id="selectVoPagePlus" resultMap="OaProjectScheduleStepResult">
|
||||||
select opss.track_id,
|
select opss.track_id,
|
||||||
@@ -81,42 +98,53 @@
|
|||||||
opss.status,
|
opss.status,
|
||||||
opss.del_flag,
|
opss.del_flag,
|
||||||
opss.header,
|
opss.header,
|
||||||
|
opss.use_flag,
|
||||||
osts.expected_days,
|
osts.expected_days,
|
||||||
osts.description,
|
osts.description,
|
||||||
so.oss_id AS oss_id,
|
so.oss_id AS oss_id,
|
||||||
so.url AS attach_url,
|
so.url AS attach_url,
|
||||||
so.original_name AS attach_file_name, -- 如有需要
|
so.original_name AS attach_file_name, -- 如有需要
|
||||||
so.create_by
|
so.create_by,
|
||||||
|
so.is_public,
|
||||||
|
so.owner_id,
|
||||||
|
batch_id
|
||||||
from oa_project_schedule_step opss
|
from oa_project_schedule_step opss
|
||||||
left join fad_oa.oa_project_schedule ops on ops.schedule_id = opss.schedule_id
|
left join fad_oa.oa_project_schedule ops on ops.schedule_id = opss.schedule_id
|
||||||
left join fad_oa.oa_schedule_template_step osts on osts.template_id = ops.template_id and osts.step_order = opss.step_order
|
left join fad_oa.oa_schedule_template_step osts on osts.template_id = ops.template_id and osts.step_order = opss.step_order
|
||||||
LEFT JOIN sys_oss so ON FIND_IN_SET(so.oss_id, opss.accessory)
|
LEFT JOIN sys_oss so ON FIND_IN_SET(so.oss_id, opss.accessory)
|
||||||
|
AND <include refid="OssVisibleCondition"/>
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectVoPlusById" resultMap="OaProjectScheduleStepResult">
|
<select id="selectVoPlusById" resultMap="OaProjectScheduleStepResult">
|
||||||
select opss.track_id,
|
select opss.track_id,
|
||||||
opss.accessory,
|
opss.accessory,
|
||||||
opss.schedule_id,
|
opss.schedule_id,
|
||||||
opss.step_order,
|
opss.step_order,
|
||||||
opss.step_name,
|
opss.step_name,
|
||||||
opss.plan_start,
|
opss.plan_start,
|
||||||
opss.plan_end,
|
opss.plan_end,
|
||||||
opss.actual_start,
|
opss.actual_start,
|
||||||
opss.actual_end,
|
opss.actual_end,
|
||||||
opss.status,
|
opss.status,
|
||||||
opss.del_flag,
|
opss.use_flag,
|
||||||
opss.header,
|
opss.del_flag,
|
||||||
osts.expected_days,
|
opss.header,
|
||||||
osts.description,
|
osts.expected_days,
|
||||||
so.oss_id AS oss_id,
|
osts.description,
|
||||||
so.url AS attach_url,
|
so.oss_id AS oss_id,
|
||||||
so.original_name AS attach_file_name, -- 如有需要
|
so.url AS attach_url,
|
||||||
so.create_by
|
so.original_name AS attach_file_name, -- 如有需要
|
||||||
|
so.create_by,
|
||||||
|
so.owner_id,
|
||||||
|
so.is_public
|
||||||
from oa_project_schedule_step opss
|
from oa_project_schedule_step opss
|
||||||
left join fad_oa.oa_project_schedule ops on ops.schedule_id = opss.schedule_id
|
left join fad_oa.oa_project_schedule ops on ops.schedule_id = opss.schedule_id
|
||||||
left join fad_oa.oa_schedule_template_step osts on osts.template_id = ops.template_id and osts.step_order = opss.step_order
|
left join fad_oa.oa_schedule_template_step osts on osts.template_id = ops.template_id and osts.step_order =
|
||||||
LEFT JOIN sys_oss so ON FIND_IN_SET(so.oss_id, opss.accessory)
|
opss.step_order
|
||||||
where opss.track_id = #{trackId} and opss.del_flag='0'
|
LEFT JOIN sys_oss so ON FIND_IN_SET(so.oss_id, opss.accessory)
|
||||||
|
AND
|
||||||
|
<include refid="OssVisibleCondition"/>
|
||||||
|
where opss.track_id = #{trackId} and opss.del_flag='0' and opss.use_flag = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
@@ -130,11 +158,13 @@
|
|||||||
plan_end,
|
plan_end,
|
||||||
actual_start,
|
actual_start,
|
||||||
actual_end,
|
actual_end,
|
||||||
|
opss.use_flag,
|
||||||
status,
|
status,
|
||||||
header
|
header
|
||||||
from oa_project_schedule_step opss
|
from oa_project_schedule_step opss
|
||||||
WHERE schedule_id = #{scheduleId}
|
WHERE schedule_id = #{scheduleId}
|
||||||
AND step_order = #{currentStep}
|
AND step_order = #{currentStep}
|
||||||
|
and use_flag = '1'
|
||||||
AND del_flag = '0'
|
AND del_flag = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -20,17 +20,12 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="selectVoPagePlus" resultType="com.ruoyi.oa.domain.vo.OaScheduleTemplateStepVo">
|
<select id="selectVoPagePlus" resultType="com.ruoyi.oa.domain.vo.OaScheduleTemplateStepVo">
|
||||||
|
|
||||||
select ANY_VALUE(step_id),
|
select max(step_id) as stepId,
|
||||||
template_id,
|
max(template_id) as templateId,
|
||||||
step_order,
|
max(step_order) as stepOrder,
|
||||||
step_name,
|
step_name,
|
||||||
expected_days,
|
expected_days,
|
||||||
header,
|
header,
|
||||||
create_by,
|
|
||||||
create_time,
|
|
||||||
update_by,
|
|
||||||
update_time,
|
|
||||||
del_flag,
|
|
||||||
description
|
description
|
||||||
from oa_schedule_template_step
|
from oa_schedule_template_step
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="projectName" column="project_name"/>
|
<result property="projectName" column="project_name"/>
|
||||||
<result property="address" column="address"/>
|
<result property="address" column="address"/>
|
||||||
<collection property="detailList" javaType="list" resultMap="SysOaClaimDetailResult"/>
|
<collection property="detailList" javaType="list" resultMap="SysOaClaimDetailResult"/>
|
||||||
<collection property="fileList" javaType="list" resultMap="SysOaFileResult"/>
|
<collection property="fileList" javaType="list" resultMap="SysOssResult"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap type="com.ruoyi.oa.domain.SysOaClaimDetail" id="SysOaClaimDetailResult">
|
<resultMap type="com.ruoyi.oa.domain.SysOaClaimDetail" id="SysOaClaimDetailResult">
|
||||||
@@ -42,16 +42,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<resultMap type="com.ruoyi.oa.domain.SysOaFile" id="SysOaFileResult">
|
<resultMap type="com.ruoyi.system.domain.SysOss" id="SysOssResult">
|
||||||
<result property="fileId" column="file_id"/>
|
<result property="ossId" column="oss_id"/>
|
||||||
<result property="fileUrl" column="file_url"/>
|
<result property="url" column="file_url"/>
|
||||||
<result property="status" column="status"/>
|
<result property="fileName" column="file_name"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="delFlag" column="del_flag"/>
|
|
||||||
<result property="remark" column="remark"/>
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectSysOaClaimVoById" resultMap="SysOaClaimResult" parameterType="Long">
|
<select id="selectSysOaClaimVoById" resultMap="SysOaClaimResult" parameterType="Long">
|
||||||
@@ -73,9 +71,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
soc.del_flag,
|
soc.del_flag,
|
||||||
soc.proc_ins_id,
|
soc.proc_ins_id,
|
||||||
soc.completed_time,
|
soc.completed_time,
|
||||||
sof.file_id,
|
so.oss_id,
|
||||||
file_url,
|
url,
|
||||||
status,
|
so.file_name,
|
||||||
socd.claim_detail_id,
|
socd.claim_detail_id,
|
||||||
claim_type,
|
claim_type,
|
||||||
socd.begin_time ,
|
socd.begin_time ,
|
||||||
@@ -93,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
sop.project_name
|
sop.project_name
|
||||||
FROM sys_oa_claim soc
|
FROM sys_oa_claim soc
|
||||||
left join sys_oa_claim_detail socd on soc.claim_id = socd.claim_id
|
left join sys_oa_claim_detail socd on soc.claim_id = socd.claim_id
|
||||||
left JOIN sys_oa_file sof ON FIND_IN_SET(sof.file_id, soc.file_ids) > 0
|
left join sys_oss so on FIND_IN_SET(so.oss_id, soc.file_ids) > 0
|
||||||
left join sys_oa_project sop on soc.project_id = sop.project_id
|
left join sys_oa_project sop on soc.project_id = sop.project_id
|
||||||
where soc.claim_id = #{claimId}
|
where soc.claim_id = #{claimId}
|
||||||
</select>
|
</select>
|
||||||
@@ -144,9 +142,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
soc.del_flag,
|
soc.del_flag,
|
||||||
soc.proc_ins_id,
|
soc.proc_ins_id,
|
||||||
soc.completed_time,
|
soc.completed_time,
|
||||||
sof.file_id,
|
so.oss_id,
|
||||||
file_url,
|
url,
|
||||||
status,
|
so.file_name,
|
||||||
socd.claim_detail_id,
|
socd.claim_detail_id,
|
||||||
claim_type,
|
claim_type,
|
||||||
socd.begin_time ,
|
socd.begin_time ,
|
||||||
@@ -164,7 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
sop.project_name
|
sop.project_name
|
||||||
FROM sys_oa_claim soc
|
FROM sys_oa_claim soc
|
||||||
left join sys_oa_claim_detail socd on soc.claim_id = socd.claim_id
|
left join sys_oa_claim_detail socd on soc.claim_id = socd.claim_id
|
||||||
left JOIN sys_oa_file sof ON FIND_IN_SET(sof.file_id, soc.file_ids) > 0
|
left join sys_oss so on FIND_IN_SET(so.oss_id, soc.file_ids) > 0
|
||||||
left join sys_oa_project sop on soc.project_id = sop.project_id
|
left join sys_oa_project sop on soc.project_id = sop.project_id
|
||||||
where soc.proc_ins_id = #{procInsId}
|
where soc.proc_ins_id = #{procInsId}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -356,7 +356,7 @@
|
|||||||
end AS sign_time,
|
end AS sign_time,
|
||||||
|
|
||||||
GROUP_CONCAT(
|
GROUP_CONCAT(
|
||||||
f.file_url
|
so.url
|
||||||
SEPARATOR ','
|
SEPARATOR ','
|
||||||
) AS file_urls
|
) AS file_urls
|
||||||
|
|
||||||
@@ -373,11 +373,11 @@
|
|||||||
LEFT JOIN sys_oa_task_item ti
|
LEFT JOIN sys_oa_task_item ti
|
||||||
ON t.task_id = ti.task_id
|
ON t.task_id = ti.task_id
|
||||||
|
|
||||||
LEFT JOIN sys_oa_file f
|
LEFT JOIN sys_oss so
|
||||||
ON (
|
ON (
|
||||||
(t.status = 0 AND FIND_IN_SET(CONCAT(f.file_id, ''), t.files) > 0)
|
(t.status = 0 AND FIND_IN_SET(CONCAT(so.oss_id, ''), t.files) > 0)
|
||||||
OR
|
OR
|
||||||
(t.status = 1 AND FIND_IN_SET(CONCAT(f.file_id, ''), ti.files) > 0)
|
(t.status = 1 AND FIND_IN_SET(CONCAT(so.oss_id, ''), ti.files) > 0)
|
||||||
)
|
)
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
sot.completed_time,
|
sot.completed_time,
|
||||||
sot.content,
|
sot.content,
|
||||||
(
|
(
|
||||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
SELECT GROUP_CONCAT(so.url SEPARATOR ',')
|
||||||
FROM sys_oa_file sof
|
FROM sys_oss so
|
||||||
WHERE FIND_IN_SET(sof.file_id, sot.accessory) > 0
|
WHERE FIND_IN_SET(so.oss_id, sot.accessory) > 0
|
||||||
) AS accessory,
|
) AS accessory,
|
||||||
|
|
||||||
sot.rank_number,
|
sot.rank_number,
|
||||||
@@ -90,9 +90,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
ELSE 0
|
ELSE 0
|
||||||
END AS overDays,
|
END AS overDays,
|
||||||
(
|
(
|
||||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
|
||||||
FROM sys_oa_file sof
|
SELECT GROUP_CONCAT(so.url SEPARATOR ',')
|
||||||
WHERE FIND_IN_SET(sof.file_id, soti.files) > 0
|
FROM sys_oss so
|
||||||
|
WHERE FIND_IN_SET(so.oss_id, soti.files) > 0
|
||||||
) AS files
|
) AS files
|
||||||
|
|
||||||
FROM sys_oa_task sot
|
FROM sys_oa_task sot
|
||||||
@@ -148,9 +149,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
su2.nick_name AS workerNickName,
|
su2.nick_name AS workerNickName,
|
||||||
|
|
||||||
(
|
(
|
||||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
SELECT GROUP_CONCAT(so.url SEPARATOR ',')
|
||||||
FROM sys_oa_file sof
|
FROM sys_oss so
|
||||||
WHERE FIND_IN_SET(sof.file_id, sot.accessory) > 0
|
WHERE FIND_IN_SET(so.oss_id, sot.accessory) > 0
|
||||||
) AS accessory,
|
) AS accessory,
|
||||||
|
|
||||||
sot.rank_number,
|
sot.rank_number,
|
||||||
@@ -177,9 +178,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
soti.end_time AS itemEndTime,
|
soti.end_time AS itemEndTime,
|
||||||
soti.remark AS itemRemark,
|
soti.remark AS itemRemark,
|
||||||
(
|
(
|
||||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
SELECT GROUP_CONCAT(so.url SEPARATOR ',')
|
||||||
FROM sys_oa_file sof
|
FROM sys_oss so
|
||||||
WHERE FIND_IN_SET(sof.file_id, soti.files) > 0
|
WHERE FIND_IN_SET(so.oss_id, soti.files) > 0
|
||||||
) AS files,
|
) AS files,
|
||||||
CASE
|
CASE
|
||||||
WHEN sot.completed_time IS NULL
|
WHEN sot.completed_time IS NULL
|
||||||
@@ -325,9 +326,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
sot.completed_time,
|
sot.completed_time,
|
||||||
sot.content,
|
sot.content,
|
||||||
(
|
(
|
||||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
SELECT GROUP_CONCAT(so.url SEPARATOR ',')
|
||||||
FROM sys_oa_file sof
|
FROM sys_oss so
|
||||||
WHERE FIND_IN_SET(sof.file_id, sot.accessory) > 0
|
WHERE FIND_IN_SET(so.oss_id, sot.accessory) > 0
|
||||||
) AS accessory,
|
) AS accessory,
|
||||||
|
|
||||||
sot.rank_number,
|
sot.rank_number,
|
||||||
@@ -353,9 +354,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
ELSE 0
|
ELSE 0
|
||||||
END AS overDays,
|
END AS overDays,
|
||||||
(
|
(
|
||||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
SELECT GROUP_CONCAT(so.url SEPARATOR ',')
|
||||||
FROM sys_oa_file sof
|
FROM sys_oss so
|
||||||
WHERE FIND_IN_SET(sof.file_id, soti.files) > 0
|
WHERE FIND_IN_SET(so.oss_id, soti.files) > 0
|
||||||
) AS files
|
) AS files
|
||||||
|
|
||||||
FROM sys_oa_task_user sotu
|
FROM sys_oa_task_user sotu
|
||||||
@@ -378,16 +379,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
sot.create_user_id,
|
sot.create_user_id,
|
||||||
sot.worker_id,
|
sot.worker_id,
|
||||||
(
|
(
|
||||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
SELECT GROUP_CONCAT(so.url SEPARATOR ',')
|
||||||
FROM sys_oa_file sof
|
FROM sys_oss so
|
||||||
WHERE FIND_IN_SET(sof.file_id, sot.accessory) > 0
|
WHERE FIND_IN_SET(so.oss_id, sot.accessory) > 0
|
||||||
) AS accessory,
|
) AS accessory,
|
||||||
su1.nick_name AS createUserNickName,
|
su1.nick_name AS createUserNickName,
|
||||||
su2.nick_name AS workerNickName,
|
su2.nick_name AS workerNickName,
|
||||||
(
|
(
|
||||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
SELECT GROUP_CONCAT(so.url SEPARATOR ',')
|
||||||
FROM sys_oa_file sof
|
FROM sys_oss so
|
||||||
WHERE FIND_IN_SET(sof.file_id, soti.files) > 0
|
WHERE FIND_IN_SET(so.oss_id, soti.files) > 0
|
||||||
) AS files
|
) AS files
|
||||||
FROM sys_oa_task sot
|
FROM sys_oa_task sot
|
||||||
LEFT JOIN sys_user su1 ON su1.user_id = sot.create_user_id
|
LEFT JOIN sys_user su1 ON su1.user_id = sot.create_user_id
|
||||||
@@ -399,14 +400,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
AND sot.del_flag = '0'
|
AND sot.del_flag = '0'
|
||||||
AND (
|
AND (
|
||||||
IFNULL((
|
IFNULL((
|
||||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
SELECT GROUP_CONCAT(so.url SEPARATOR ',')
|
||||||
FROM sys_oa_file sof
|
FROM sys_oss so
|
||||||
WHERE FIND_IN_SET(sof.file_id, sot.accessory) > 0
|
WHERE FIND_IN_SET(so.oss_id, sot.accessory) > 0
|
||||||
), '') != ''
|
), '') != ''
|
||||||
OR IFNULL((
|
OR IFNULL((
|
||||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
SELECT GROUP_CONCAT(so.url SEPARATOR ',')
|
||||||
FROM sys_oa_file sof
|
FROM sys_oss so
|
||||||
WHERE FIND_IN_SET(sof.file_id, soti.files) > 0
|
WHERE FIND_IN_SET(so.oss_id, soti.files) > 0
|
||||||
), '') != ''
|
), '') != ''
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -106,4 +106,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -4,69 +4,101 @@
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.oa.mapper.SysOaWarehouseMasterMapper">
|
<mapper namespace="com.ruoyi.oa.mapper.SysOaWarehouseMasterMapper">
|
||||||
|
|
||||||
<resultMap type="com.ruoyi.oa.domain.vo.SysOaWarehouseMasterVo" id="SysOaWarehouseMasterResult">
|
|
||||||
<result property="masterId" column="master_id"/>
|
<!-- ===================================================== -->
|
||||||
<result property="masterNum" column="master_num"/>
|
<!-- 主表 + 子表 统一 ResultMap -->
|
||||||
<result property="type" column="type"/>
|
<!-- ===================================================== -->
|
||||||
<result property="projectId" column="project_id"/>
|
<resultMap id="SysOaWarehouseMasterResult"
|
||||||
<result property="signTime" column="sign_time"/>
|
type="com.ruoyi.oa.domain.vo.SysOaWarehouseMasterVo">
|
||||||
<result property="signUser" column="sign_user"/>
|
|
||||||
<result property="remark" column="remark"/>
|
<id property="masterId" column="master_id"/>
|
||||||
|
<result property="masterNum" column="master_num"/>
|
||||||
|
<result property="type" column="type"/>
|
||||||
|
<result property="projectId" column="project_id"/>
|
||||||
|
<result property="signTime" column="sign_time"/>
|
||||||
|
<result property="signUser" column="sign_user"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
<result property="projectName" column="project_name"/>
|
<result property="projectName" column="project_name"/>
|
||||||
<result property="status" column="status"/>
|
<result property="status" column="status"/>
|
||||||
<collection property="warehouseList" ofType="com.ruoyi.oa.domain.vo.SysOaWarehouseDetailVo" javaType="list">
|
|
||||||
<result property="signPrice" column="sign_price"/>
|
<collection property="warehouseList"
|
||||||
<result property="id" column="outId"/>
|
column="master_id"
|
||||||
<result property="projectName" column="project_name"/>
|
javaType="list"
|
||||||
<result property="model" column="model"/>
|
ofType="com.ruoyi.oa.domain.vo.SysOaWarehouseDetailVo"
|
||||||
<result property="specifications" column="specifications"/>
|
select="selectDetailByMasterId"/>
|
||||||
<result property="projectId" column="project_id"/>
|
|
||||||
<result property="amount" column="amount"/>
|
<collection property="warehouseTaskList"
|
||||||
<result property="warehouseName" column="warehouseName"/>
|
column="master_id"
|
||||||
</collection>
|
javaType="list"
|
||||||
<collection property="warehouseTaskList" resultMap="SysOaWarehouseTaskResult" javaType="list"/>
|
ofType="com.ruoyi.oa.domain.SysOaWarehouseTask"
|
||||||
|
select="selectTaskByMasterId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- ===================================================== -->
|
||||||
<resultMap type="com.ruoyi.oa.domain.SysOaWarehouseTask" id="SysOaWarehouseTaskResult">
|
<!-- 分页查询(只查主表字段,真正参与 LIMIT / OFFSET) -->
|
||||||
<result property="taskId" column="task_id"/>
|
<!-- ===================================================== -->
|
||||||
<result property="masterId" column="master_id"/>
|
<select id="selectVoPagePlus"
|
||||||
<result property="name" column="name"/>
|
resultMap="SysOaWarehouseMasterResult">
|
||||||
<result property="model" column="model"/>
|
SELECT
|
||||||
<result property="taskInventory" column="task_inventory"/>
|
sowm.master_id,
|
||||||
<result property="brand" column="brand"/>
|
sowm.master_num,
|
||||||
<result property="specifications" column="specifications"/>
|
sowm.type,
|
||||||
</resultMap>
|
sowm.project_id,
|
||||||
|
sowm.sign_time,
|
||||||
|
sowm.sign_user,
|
||||||
|
sowm.remark,
|
||||||
<select id="selectVoPagePlus" resultMap="SysOaWarehouseMasterResult">
|
sowm.status,
|
||||||
select sowm.master_id,
|
sop.project_name
|
||||||
sowm.sign_time,
|
FROM sys_oa_warehouse_master sowm
|
||||||
sowm.sign_user,
|
LEFT JOIN sys_oa_project sop
|
||||||
sowd.sign_price,
|
ON sop.project_id = sowm.project_id
|
||||||
sowm.master_num,
|
|
||||||
sowm.type,
|
|
||||||
sowd.amount,
|
|
||||||
sow.name as warehouseName,
|
|
||||||
sowm.remark,
|
|
||||||
sop.project_id,
|
|
||||||
sop.project_name,
|
|
||||||
sowm.status,
|
|
||||||
sowd.id as outId,
|
|
||||||
task_id,
|
|
||||||
sowt.name,
|
|
||||||
COALESCE(sow.model,sowt.model) as model,
|
|
||||||
task_inventory,
|
|
||||||
COALESCE(sow.brand,sowt.brand) as brand,
|
|
||||||
COALESCE(sow.specifications,sowt.specifications) as specifications
|
|
||||||
from sys_oa_warehouse_master sowm
|
|
||||||
left join sys_oa_warehouse_detail sowd on sowd.master_id = sowm.master_id and sowd.del_flag='0'
|
|
||||||
left join sys_oa_warehouse sow on sow.id = sowd.warehouse_id
|
|
||||||
left join sys_oa_warehouse_task sowt on sowm.master_id = sowt.master_id
|
|
||||||
left join sys_oa_project sop on sowm.project_id = sop.project_id
|
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- ===================================================== -->
|
||||||
|
<!-- 子查询:明细列表 by masterId -->
|
||||||
|
<!-- ===================================================== -->
|
||||||
|
<select id="selectDetailByMasterId"
|
||||||
|
parameterType="long"
|
||||||
|
resultType="com.ruoyi.oa.domain.vo.SysOaWarehouseDetailVo">
|
||||||
|
SELECT
|
||||||
|
sowd.id AS outId,
|
||||||
|
sowd.master_id,
|
||||||
|
sowd.sign_price,
|
||||||
|
sowd.amount,
|
||||||
|
sowd.project_id,
|
||||||
|
sow.name AS warehouseName,
|
||||||
|
COALESCE(sow.model, sowt.model) AS model,
|
||||||
|
COALESCE(sow.brand, sowt.brand) AS brand,
|
||||||
|
COALESCE(sow.specifications, sowt.specifications) AS specifications,
|
||||||
|
sowt.task_inventory,
|
||||||
|
sop.project_name
|
||||||
|
FROM sys_oa_warehouse_detail sowd
|
||||||
|
LEFT JOIN sys_oa_warehouse sow ON sow.id = sowd.warehouse_id
|
||||||
|
LEFT JOIN sys_oa_warehouse_task sowt ON sowt.master_id = sowd.master_id
|
||||||
|
LEFT JOIN sys_oa_project sop ON sop.project_id = sowd.project_id
|
||||||
|
WHERE sowd.del_flag = '0'
|
||||||
|
AND sowd.master_id = #{masterId}
|
||||||
|
ORDER BY sowd.id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- ===================================================== -->
|
||||||
|
<!-- 子查询:任务列表 by masterId -->
|
||||||
|
<!-- ===================================================== -->
|
||||||
|
<select id="selectTaskByMasterId"
|
||||||
|
parameterType="long"
|
||||||
|
resultType="com.ruoyi.oa.domain.SysOaWarehouseTask">
|
||||||
|
SELECT
|
||||||
|
task_id,
|
||||||
|
master_id,
|
||||||
|
name,
|
||||||
|
model,
|
||||||
|
task_inventory,
|
||||||
|
brand,
|
||||||
|
specifications
|
||||||
|
FROM sys_oa_warehouse_task
|
||||||
|
WHERE master_id = #{masterId}
|
||||||
|
ORDER BY task_id
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -49,4 +49,8 @@ public class SysOss extends BaseEntity {
|
|||||||
|
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
|
private Long ownerId;
|
||||||
|
|
||||||
|
private Long isPublic;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,10 +24,11 @@ public interface ISysOssService {
|
|||||||
|
|
||||||
SysOssVo getById(Long ossId);
|
SysOssVo getById(Long ossId);
|
||||||
|
|
||||||
SysOssVo upload(MultipartFile file);
|
SysOssVo upload(MultipartFile file, Long isPublic);
|
||||||
|
|
||||||
void download(Long ossId, HttpServletResponse response) throws IOException;
|
void download(Long ossId, HttpServletResponse response) throws IOException;
|
||||||
|
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
String insertFiles(List<String> fileUrls);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.ruoyi.common.core.domain.PageQuery;
|
|||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.service.OssService;
|
import com.ruoyi.common.core.service.OssService;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
import com.ruoyi.common.utils.BeanCopyUtils;
|
import com.ruoyi.common.utils.BeanCopyUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.file.FileUtils;
|
import com.ruoyi.common.utils.file.FileUtils;
|
||||||
@@ -120,7 +121,7 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SysOssVo upload(MultipartFile file) {
|
public SysOssVo upload(MultipartFile file, Long isPublic) {
|
||||||
String originalfileName = file.getOriginalFilename();
|
String originalfileName = file.getOriginalFilename();
|
||||||
String suffix = StringUtils.substring(originalfileName, originalfileName.lastIndexOf("."), originalfileName.length());
|
String suffix = StringUtils.substring(originalfileName, originalfileName.lastIndexOf("."), originalfileName.length());
|
||||||
OssClient storage = OssFactory.instance();
|
OssClient storage = OssFactory.instance();
|
||||||
@@ -137,6 +138,9 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
|
|||||||
oss.setFileName(uploadResult.getFilename());
|
oss.setFileName(uploadResult.getFilename());
|
||||||
oss.setOriginalName(originalfileName);
|
oss.setOriginalName(originalfileName);
|
||||||
oss.setService(storage.getConfigKey());
|
oss.setService(storage.getConfigKey());
|
||||||
|
oss.setCreateBy(LoginHelper.getNickName());
|
||||||
|
oss.setOwnerId(LoginHelper.getUserId());
|
||||||
|
oss.setIsPublic(isPublic == null ? 0 : isPublic);
|
||||||
baseMapper.insert(oss);
|
baseMapper.insert(oss);
|
||||||
SysOssVo sysOssVo = new SysOssVo();
|
SysOssVo sysOssVo = new SysOssVo();
|
||||||
BeanCopyUtils.copy(oss, sysOssVo);
|
BeanCopyUtils.copy(oss, sysOssVo);
|
||||||
@@ -156,6 +160,22 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
|
|||||||
return baseMapper.deleteBatchIds(ids) > 0;
|
return baseMapper.deleteBatchIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String insertFiles(List<String> fileUrls) {
|
||||||
|
List<Long> fileIds = new ArrayList<>();
|
||||||
|
for (String fileUrl : fileUrls) {
|
||||||
|
SysOss sysOss = new SysOss();
|
||||||
|
sysOss.setUrl(fileUrl);
|
||||||
|
sysOss.setCreateBy(LoginHelper.getNickName());
|
||||||
|
baseMapper.insert(sysOss);
|
||||||
|
fileIds.add(sysOss.getOssId());
|
||||||
|
}
|
||||||
|
|
||||||
|
return fileIds.stream()
|
||||||
|
.map(String::valueOf)
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 匹配Url
|
* 匹配Url
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -74,3 +74,54 @@ CREATE TABLE `oa_project_schedule_step` (
|
|||||||
REFERENCES `oa_project_schedule` (`schedule_id`)
|
REFERENCES `oa_project_schedule` (`schedule_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目进度步骤跟踪表';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目进度步骤跟踪表';
|
||||||
``
|
``
|
||||||
|
|
||||||
|
create table if not exists oa_project_schedule_step
|
||||||
|
(
|
||||||
|
track_id bigint auto_increment comment '跟踪记录主键'
|
||||||
|
primary key,
|
||||||
|
accessory varchar(500) null comment '文件列表',
|
||||||
|
schedule_id bigint not null comment '所属项目进度ID',
|
||||||
|
step_order int not null comment '步骤序号',
|
||||||
|
step_name varchar(64) not null comment '步骤名称(冗余存储模板名称)',
|
||||||
|
plan_start datetime null comment '计划开始',
|
||||||
|
plan_end datetime null comment '计划完成',
|
||||||
|
actual_start datetime null,
|
||||||
|
actual_end datetime null,
|
||||||
|
status int default 0 null comment '0进行中 1完成 2暂停',
|
||||||
|
create_by varchar(64) null,
|
||||||
|
create_time datetime default CURRENT_TIMESTAMP null,
|
||||||
|
update_by varchar(64) null,
|
||||||
|
update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP,
|
||||||
|
del_flag char default '0' null,
|
||||||
|
header varchar(40) null comment '进度负责人',
|
||||||
|
use_flag int default 1 null comment '使用标志 1为使用',
|
||||||
|
batch_id int null comment '批次号',
|
||||||
|
constraint uniq_schedule_order
|
||||||
|
unique (schedule_id, step_order,use_flag),
|
||||||
|
constraint fk_project_step_main
|
||||||
|
foreign key (schedule_id) references oa_project_schedule (schedule_id)
|
||||||
|
)
|
||||||
|
comment '项目进度步骤跟踪表' charset = utf8mb4;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE oa_project_schedule_step -- 将其替换成上一步查到的 TABLE_NAME
|
||||||
|
DROP FOREIGN KEY uniq_schedule_order;
|
||||||
|
|
||||||
|
-- 1) 删除旧唯一索引
|
||||||
|
ALTER TABLE oa_project_schedule_step
|
||||||
|
DROP INDEX uniq_schedule_order;
|
||||||
|
|
||||||
|
-- 3.1 新建包含 use_flag 的唯一索引
|
||||||
|
ALTER TABLE oa_project_schedule_step
|
||||||
|
ADD UNIQUE KEY uniq_schedule_order_new (schedule_id, step_order, use_flag);
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
rc.CONSTRAINT_NAME,
|
||||||
|
rc.TABLE_NAME,
|
||||||
|
kcu.COLUMN_NAME
|
||||||
|
FROM information_schema.REFERENTIAL_CONSTRAINTS rc
|
||||||
|
JOIN information_schema.KEY_COLUMN_USAGE kcu
|
||||||
|
ON rc.CONSTRAINT_NAME = kcu.CONSTRAINT_NAME
|
||||||
|
WHERE rc.REFERENCED_TABLE_NAME = ''
|
||||||
|
AND rc.CONSTRAINT_SCHEMA = DATABASE();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user