工具发布流程和使用申请流程细节优化

This commit is contained in:
liukang
2024-08-27 18:17:42 +08:00
parent fbc96e81e3
commit 0e18f96534
11 changed files with 71 additions and 20 deletions

View File

@@ -84,7 +84,7 @@ public class ToolController extends BaseController
@ApiOperation("判断文件名称是否存在 true 存在 false 不存在")
@GetMapping("/checkToolExist")
public AjaxResult checkToolExist(Tool tTool) {
return AjaxResult.success(toolService.checkToolExist(tTool.getToolCode(), tTool.getToolRespDept()));
return AjaxResult.success(toolService.checkToolExist(tTool));
}
/**
@@ -117,6 +117,11 @@ public class ToolController extends BaseController
toolService.insertTool(tTool);
}else if (BooleanUtil.isTrue(tTool.getEditStatus())){
toolService.updateTool(tTool);
}else {
Tool tool = new Tool();
tool.setToolId(tTool.getToolId());
tool.setRecordStatus(tTool.getRecordStatus());
toolService.updateTool(tool);
}
return AjaxResult.success("操作成功",processInstanceModel);
}else {

View File

@@ -9,6 +9,7 @@ import com.blueland.bpmclient.model.ProcessInstanceModel;
import com.rzdata.common.enums.RecordStatusEnum;
import com.rzdata.common.utils.DateUtils;
import com.rzdata.common.utils.StringUtils;
import com.rzdata.web.domain.Tool;
import com.rzdata.web.service.IUseApplyItemService;
import com.rzdata.web.service.WorkflowService;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -126,6 +127,11 @@ public class UseApplyController extends BaseController
}else if (BooleanUtil.isTrue(useApply.getEditStatus())){
useApplyService.updateUseApply(useApply);
useApplyItemService.updateItemList(useApply.getItemList(),useApply.getId());
}else {
UseApply updateStatus = new UseApply();
useApply.setId(useApply.getId());
useApply.setRecordStatus(useApply.getRecordStatus());
useApplyService.updateUseApply(updateStatus);
}
return AjaxResult.success("操作成功",processInstanceModel);
}else {

View File

@@ -75,6 +75,12 @@ public class Tool extends BaseEntity
@Excel(name = "状态")
private String status;
/** 备注 */
private String remark;
/** 发布时间 */
private String releaseTime;
/** 部门对象 */
@Excels({
@Excel(name = "部门名称", targetAttr = "deptName", type = Excel.Type.EXPORT),

View File

@@ -21,14 +21,20 @@ public class UseApply extends BaseEntity
/** 主键 */
private String id;
/** 申请人 */
@Excel(name = "申请人")
private String userName;
@Excel(name = "申请人id")
private String userId;
@Excel(name = "申请人名称")
private String nickName;
/** 申请部门 */
@Excel(name = "申请部门")
@Excel(name = "申请部门id")
private String deptId;
@Excel(name = "申请部门名称")
private String deptName;
/** 申请理由 */
@Excel(name = "申请理由")
private String reason;

View File

@@ -22,6 +22,8 @@ public interface ToolMapper
Tool getInfoByBpmcId(String bpmcId);
int checkToolExist(Tool tool);
/**
* 查询工具信息列表
*

View File

@@ -38,7 +38,7 @@ public interface IToolService
*/
public int insertTool(Tool tool);
public boolean checkToolExist(String toolCode, String toolRespDept);
public boolean checkToolExist(Tool tTool);
/**
* 修改工具信息

View File

@@ -2,6 +2,7 @@ package com.rzdata.web.service.impl;
import cn.hutool.core.util.IdUtil;
import com.rzdata.common.utils.DateUtils;
import com.rzdata.common.utils.SecurityUtils;
import com.rzdata.web.domain.Tool;
import com.rzdata.web.mapper.ToolMapper;
import com.rzdata.web.service.IToolService;
@@ -60,18 +61,15 @@ public class ToolServiceImpl implements IToolService
@Override
public int insertTool(Tool tool)
{
tool.setCreateBy(SecurityUtils.getUserId().toString());
tool.setCreateTime(DateUtils.getNowDate());
return toolMapper.insertTool(tool);
}
@Override
public boolean checkToolExist(String toolCode, String toolRespDept)
public boolean checkToolExist(Tool tTool)
{
Tool tool = new Tool();
tool.setToolCode(toolCode);
tool.setToolRespDept(toolRespDept);
List<Tool> toolList = toolMapper.selectToolList(tool);
return toolList.size() > 0;
return toolMapper.checkToolExist(tTool)> 0;
}
/**
@@ -83,6 +81,7 @@ public class ToolServiceImpl implements IToolService
@Override
public int updateTool(Tool tool)
{
tool.setUpdateBy(SecurityUtils.getUserId().toString());
tool.setUpdateTime(DateUtils.getNowDate());
return toolMapper.updateTool(tool);
}

View File

@@ -2,6 +2,7 @@ package com.rzdata.web.service.impl;
import java.util.List;
import com.rzdata.common.utils.DateUtils;
import com.rzdata.common.utils.SecurityUtils;
import com.rzdata.web.domain.Tool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -58,6 +59,7 @@ public class UseApplyServiceImpl implements IUseApplyService
@Override
public int insertUseApply(UseApply useApply)
{
useApply.setCreateBy(SecurityUtils.getUserId().toString());
useApply.setCreateTime(DateUtils.getNowDate());
return useApplyMapper.insertUseApply(useApply);
}
@@ -71,6 +73,7 @@ public class UseApplyServiceImpl implements IUseApplyService
@Override
public int updateUseApply(UseApply useApply)
{
useApply.setUpdateBy(SecurityUtils.getUserId().toString());
useApply.setUpdateTime(DateUtils.getNowDate());
return useApplyMapper.updateUseApply(useApply);
}