add 国内海外权限
This commit is contained in:
@@ -125,4 +125,10 @@ public class ProcessNode {
|
||||
@TableField(value = "branch_type")
|
||||
@ApiModelProperty(value = "企标立项变更 1 普通立项 2 普通变更 3 责任部门变更")
|
||||
private String branchType;
|
||||
/**
|
||||
* 是否显示(0否,1是)
|
||||
*/
|
||||
@TableField(value = "is_view")
|
||||
@ApiModelProperty(value = "是否显示(0否,1是)")
|
||||
private Integer isView;
|
||||
}
|
||||
+47
-2
@@ -3,6 +3,9 @@ package com.jero.modules.activiti.process.fb.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.common.util.UUIDUtils;
|
||||
import com.jero.modules.activiti.entity.ProcessNode;
|
||||
import com.jero.modules.activiti.entity.ProcessNodeLink;
|
||||
import com.jero.modules.activiti.enums.CommitFlagEnum;
|
||||
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
||||
import com.jero.modules.activiti.process.fb.common.ConsultationTaskKey;
|
||||
import com.jero.modules.activiti.process.fb.common.ProcessDefinitionKey;
|
||||
@@ -17,6 +20,8 @@ import com.jero.modules.activiti.process.fb.service.IProcessFbStandardConsultati
|
||||
import com.jero.modules.activiti.process.fb.service.IProcessHandleService;
|
||||
import com.jero.modules.activiti.process.fb.vo.ProcessFbStandardConsultationVO;
|
||||
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
||||
import com.jero.modules.activiti.service.ProcessNodeLinkService;
|
||||
import com.jero.modules.activiti.service.ProcessNodeService;
|
||||
import com.jero.modules.laws.common.util.CurrentUserUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.activiti.engine.RuntimeService;
|
||||
@@ -53,6 +58,10 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
private TaskService taskService;
|
||||
@Resource
|
||||
private RuntimeService runtimeService;
|
||||
@Resource
|
||||
private ProcessNodeService processNodeService;
|
||||
@Resource
|
||||
private ProcessNodeLinkService processNodeLinkService;
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
@@ -170,6 +179,8 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
default:
|
||||
throw new JeroBootException("目前还未开发,请联系管理员");
|
||||
}
|
||||
taskInfo.setCommitFlag(CommitFlagEnum.PASS.getValue());
|
||||
processHandleService.updateApprovalRecord(processInfoVO);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -178,6 +189,12 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
* @Description: 设计工程师填写征求意见(直接)
|
||||
**/
|
||||
private void processEngineer_2(ProcessInfoVO<ProcessFbStandardConsultationVO> processInfoVO) {
|
||||
ProcessFbStandardConsultationVO businessInfoDTO = processInfoVO.getBusinessInfoDTO(); // 全部业务信息
|
||||
ProcessFbConsultationUserLink userLink = businessInfoDTO.getProcessFbConsultationUserLink(); // 业务分派信息
|
||||
|
||||
String taskId = processInfoVO.getBasicTaskInfoDTO().getTaskId();
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
String processInstanceId = task.getProcessInstanceId();
|
||||
|
||||
}
|
||||
|
||||
@@ -192,7 +209,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
|
||||
String taskId = processInfoVO.getBasicTaskInfoDTO().getTaskId();
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
String subProcessInstanceId = task.getProcessInstanceId();
|
||||
String processInstanceId = task.getProcessInstanceId();
|
||||
|
||||
LambdaQueryWrapper<ProcessFbConsultationUserLink> removeWrapper = new LambdaQueryWrapper<>();
|
||||
removeWrapper.eq(ProcessFbConsultationUserLink::getBusinessId, processInfoVO.getBusinessId());
|
||||
@@ -216,6 +233,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
processFbConsultationUserLinkService.saveBatch(linkList, linkList.size());
|
||||
variables.put("passFirst", true);
|
||||
variables.put("moduleOwnerList", moduleOwnerIds);
|
||||
saveNodeUserLink(processInstanceId, 3, moduleOwnerIds);
|
||||
} else { // 设计工程师
|
||||
if (StringUtils.isBlank(userLink.getDesignEngineerId())) {
|
||||
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "designEngineerId");
|
||||
@@ -231,11 +249,38 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
processFbConsultationUserLinkService.saveBatch(linkList, linkList.size());
|
||||
variables.put("passFirst", false);
|
||||
variables.put("designEngineerList", designEngineerIds);
|
||||
saveNodeUserLink(processInstanceId, 4, designEngineerIds);
|
||||
}
|
||||
|
||||
runtimeService.setVariablesLocal(subProcessInstanceId, variables);
|
||||
runtimeService.setVariablesLocal(processInstanceId, variables);
|
||||
// 完成任务
|
||||
taskService.complete(taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/17 15:09
|
||||
* @Description: 保存流程定义节点用户
|
||||
**/
|
||||
private void saveNodeUserLink(String processInstanceId, Integer sort, List<String> userIdList) {
|
||||
String processDefinitionId = runtimeService.createProcessInstanceQuery()
|
||||
.processInstanceId(processInstanceId).singleResult().getProcessDefinitionId();
|
||||
|
||||
LambdaQueryWrapper<ProcessNode> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ProcessNode::getProcessDefinitionId, processDefinitionId);
|
||||
queryWrapper.eq(ProcessNode::getIsView, 1);
|
||||
queryWrapper.eq(ProcessNode::getSort, sort);
|
||||
ProcessNode processNode = processNodeService.getOne(queryWrapper, false);
|
||||
|
||||
List<ProcessNodeLink> linkList = new ArrayList<>();
|
||||
userIdList.forEach(userId -> {
|
||||
ProcessNodeLink link = new ProcessNodeLink();
|
||||
link.setProcessDefinitionId(processDefinitionId);
|
||||
link.setProcessNodeId(processNode.getId());
|
||||
link.setProcessInstanceId(processInstanceId);
|
||||
link.setUserId(userId);
|
||||
linkList.add(link);
|
||||
});
|
||||
processNodeLinkService.saveBatch(linkList, linkList.size());
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -19,6 +19,7 @@ import com.jero.modules.tag.entity.LawsTag;
|
||||
import com.jero.modules.tag.enums.TableNameEnum;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -55,6 +56,7 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-分页列表查询", notes="国内法规标准-分页列表查询")
|
||||
@PostMapping(value = "/getCommonPage")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@RequiresPermissions("domesticStandard:search")
|
||||
public Result<IPage<Map<String,Object>>> getCommonPage(@RequestBody Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
return Result.OK(lawsCommonService.getCommonPage(parameterMap));
|
||||
@@ -72,6 +74,7 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-新增数据", notes="国内法规标准-新增数据")
|
||||
@PostMapping(value = "/commonAdd")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@RequiresPermissions("domesticStandard:add")
|
||||
public Result<String> commonAdd(@RequestBody Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
return Result.OK(lawsCommonService.commonAdd(parameterMap));
|
||||
@@ -81,6 +84,7 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-编辑数据", notes="国内法规标准-编辑数据")
|
||||
@PostMapping(value = "/commonEdit")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@RequiresPermissions("domesticStandard:edit")
|
||||
public Result<String> commonEdit(@RequestBody Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
return Result.OK(lawsCommonService.commonEdit(parameterMap));
|
||||
@@ -106,6 +110,7 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-根据id和模块标识获取信息", notes="国内法规标准-根据id和模块标识获取信息")
|
||||
@GetMapping(value = "getByIdAndModule")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@RequiresPermissions("domesticStandard:search")
|
||||
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") String id,
|
||||
@RequestParam(name="type") String type) {
|
||||
lawsCommonService.addLookHistory(id, type, MODULE_VALUE);
|
||||
@@ -116,6 +121,7 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-根据ids和模块标识删除信息", notes="国内法规标准-根据ids和模块标识删除信息")
|
||||
@PostMapping(value = "deleteByIdsAndModule")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@RequiresPermissions("domesticStandard:delete")
|
||||
public Result<String> deleteByIdsAndModule(@RequestBody Map<String,Object> parameterMap) {
|
||||
//删除标准时同步删除这个标准的收藏数据
|
||||
lawsStandardCollectionService.deleteByStandardId((String) parameterMap.get("ids"));
|
||||
@@ -127,6 +133,7 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-配置标准", notes="国内法规标准-配置标准")
|
||||
@GetMapping(value = "relatedStandard")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@RequiresPermissions("domesticStandard:configStandard")
|
||||
public Result<String> relatedStandard(@RequestParam(name="nodeCode") String nodeCode,
|
||||
@RequestParam("ids") String ids) {
|
||||
lawsNodeRelationService.relatedStandard(nodeCode, ids);
|
||||
@@ -137,6 +144,7 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-移除标准", notes="国内法规标准-移除标准")
|
||||
@GetMapping(value = "removeStandard")
|
||||
@ApiOperationSupport(order = 10)
|
||||
@RequiresPermissions("domesticStandard:removeStandard")
|
||||
public Result<String> removeStandard(@RequestParam(name="nodeCode") String nodeCode,
|
||||
@RequestParam("ids") String ids) {
|
||||
lawsNodeRelationService.removeStandard(nodeCode, ids);
|
||||
@@ -147,6 +155,7 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-法规更新记录", notes="国内法规标准-法规更新记录")
|
||||
@GetMapping(value = "/getUpdateRecordList")
|
||||
@ApiOperationSupport(order = 11)
|
||||
@RequiresPermissions("domesticStandard:updateRecord")
|
||||
public Result<List<LawsUpdateRecord>> getUpdateRecordList(@RequestParam("standardNumber") String standardNumber) {
|
||||
LambdaQueryWrapper<LawsUpdateRecord> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(LawsUpdateRecord::getUniqueRelationFlag, standardNumber);
|
||||
@@ -158,6 +167,7 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-导出", notes="国内法规标准-导出")
|
||||
@PostMapping("/exportData")
|
||||
@ApiOperationSupport(order = 12)
|
||||
@RequiresPermissions("domesticStandard:export")
|
||||
public void exportData(HttpServletResponse response, @RequestBody(required = false) Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
lawsCommonService.commonExport(response, parameterMap, "国内标准", "国内标准");
|
||||
@@ -167,6 +177,7 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-带文件导出", notes="国内法规标准-带文件导出")
|
||||
@PostMapping("/exportDataWithFile")
|
||||
@ApiOperationSupport(order = 13)
|
||||
@RequiresPermissions("domesticStandard:exportFile")
|
||||
public void exportDataWithFile(HttpServletResponse response, @RequestBody(required = false) Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
lawsCommonService.exportDataWithFile(response, parameterMap, "国内标准", "国内标准");
|
||||
@@ -176,6 +187,7 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-模板下载", notes="国内法规标准-模板下载")
|
||||
@GetMapping("/templateDownload")
|
||||
@ApiOperationSupport(order = 14)
|
||||
@RequiresPermissions("domesticStandard:downTemplate")
|
||||
public void templateDownload(HttpServletResponse response) {
|
||||
lawsCommonService.templateDownload(response, TableNameEnum.DOMESTIC_REGULATIONS.getTableName());
|
||||
}
|
||||
@@ -184,6 +196,7 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-导入", notes="国内法规标准-导入")
|
||||
@PostMapping("/importExcelWithData")
|
||||
@ApiOperationSupport(order = 15)
|
||||
@RequiresPermissions("domesticStandard:import")
|
||||
public Result<?> importExcelWithData(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = lawsCommonService.importExcelWithData(file, TableNameEnum.DOMESTIC_REGULATIONS.getValue());
|
||||
if (errorMessages.size() > 0) {
|
||||
|
||||
+13
@@ -19,6 +19,7 @@ import com.jero.modules.tag.entity.LawsTag;
|
||||
import com.jero.modules.tag.enums.TableNameEnum;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -55,6 +56,7 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-分页列表查询", notes="海外法规标准-分页列表查询")
|
||||
@PostMapping(value = "/getCommonPage")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@RequiresPermissions("overseasStandard:search")
|
||||
public Result<IPage<Map<String,Object>>> getCommonPage(@RequestBody Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
return Result.OK(lawsCommonService.getCommonPage(parameterMap));
|
||||
@@ -72,6 +74,7 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-新增数据", notes="海外法规标准-新增数据")
|
||||
@PostMapping(value = "/commonAdd")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@RequiresPermissions("overseasStandard:add")
|
||||
public Result<String> commonAdd(@RequestBody Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
return Result.OK(lawsCommonService.commonAdd(parameterMap));
|
||||
@@ -81,6 +84,7 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-编辑数据", notes="海外法规标准-编辑数据")
|
||||
@PostMapping(value = "/commonEdit")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@RequiresPermissions("overseasStandard:edit")
|
||||
public Result<String> commonEdit(@RequestBody Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
return Result.OK(lawsCommonService.commonEdit(parameterMap));
|
||||
@@ -106,6 +110,7 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-根据id和模块标识获取信息", notes="海外法规标准-根据id和模块标识获取信息")
|
||||
@GetMapping(value = "getByIdAndModule")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@RequiresPermissions("overseasStandard:search")
|
||||
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") String id,
|
||||
@RequestParam(name="type") String type) {
|
||||
lawsCommonService.addLookHistory(id, type, MODULE_VALUE);
|
||||
@@ -116,6 +121,7 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-根据ids和模块标识删除信息", notes="海外法规标准-根据ids和模块标识删除信息")
|
||||
@PostMapping(value = "deleteByIdsAndModule")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@RequiresPermissions("overseasStandard:delete")
|
||||
public Result<String> deleteByIdsAndModule(@RequestBody Map<String,Object> parameterMap) {
|
||||
//删除标准时同步删除这个标准的收藏数据
|
||||
lawsStandardCollectionService.deleteByStandardId((String) parameterMap.get("ids"));
|
||||
@@ -127,6 +133,7 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-配置标准", notes="海外法规标准-配置标准")
|
||||
@GetMapping(value = "relatedStandard")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@RequiresPermissions("overseasStandard:configStandard")
|
||||
public Result<String> relatedStandard(@RequestParam(name="nodeCode") String nodeCode,
|
||||
@RequestParam("ids") String ids) {
|
||||
lawsNodeRelationService.relatedStandard(nodeCode, ids);
|
||||
@@ -137,6 +144,7 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-移除标准", notes="海外法规标准-移除标准")
|
||||
@GetMapping(value = "removeStandard")
|
||||
@ApiOperationSupport(order = 10)
|
||||
@RequiresPermissions("overseasStandard:removeStandard")
|
||||
public Result<String> removeStandard(@RequestParam(name="nodeCode") String nodeCode,
|
||||
@RequestParam("ids") String ids) {
|
||||
lawsNodeRelationService.removeStandard(nodeCode, ids);
|
||||
@@ -147,6 +155,7 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-法规更新记录", notes="海外法规标准-法规更新记录")
|
||||
@GetMapping(value = "/getUpdateRecordList")
|
||||
@ApiOperationSupport(order = 11)
|
||||
@RequiresPermissions("overseasStandard:updateRecord")
|
||||
public Result<List<LawsUpdateRecord>> getUpdateRecordList(@RequestParam("standardNumber") String standardNumber) {
|
||||
LambdaQueryWrapper<LawsUpdateRecord> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(LawsUpdateRecord::getUniqueRelationFlag, standardNumber);
|
||||
@@ -158,6 +167,7 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-导出", notes="海外法规标准-导出")
|
||||
@PostMapping("/exportData")
|
||||
@ApiOperationSupport(order = 12)
|
||||
@RequiresPermissions("overseasStandard:export")
|
||||
public void exportData(HttpServletResponse response, @RequestBody(required = false) Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
lawsCommonService.commonExport(response, parameterMap, "海外标准", "海外标准");
|
||||
@@ -167,6 +177,7 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-带文件导出", notes="海外法规标准-带文件导出")
|
||||
@PostMapping("/exportDataWithFile")
|
||||
@ApiOperationSupport(order = 13)
|
||||
@RequiresPermissions("overseasStandard:exportFile")
|
||||
public void exportDataWithFile(HttpServletResponse response, @RequestBody(required = false) Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
lawsCommonService.exportDataWithFile(response, parameterMap, "海外标准", "海外标准");
|
||||
@@ -176,6 +187,7 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-模板下载", notes="海外法规标准-模板下载")
|
||||
@GetMapping("/templateDownload")
|
||||
@ApiOperationSupport(order = 14)
|
||||
@RequiresPermissions("overseasStandard:downTemplate")
|
||||
public void templateDownload(HttpServletResponse response) {
|
||||
lawsCommonService.templateDownload(response, TableNameEnum.FOREIGN_REGULATIONS.getTableName());
|
||||
}
|
||||
@@ -184,6 +196,7 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-导入", notes="海外法规标准-导入")
|
||||
@PostMapping("/importExcelWithData")
|
||||
@ApiOperationSupport(order = 15)
|
||||
@RequiresPermissions("overseasStandard:import")
|
||||
public Result<?> importExcelWithData(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = lawsCommonService.importExcelWithData(file, TableNameEnum.FOREIGN_REGULATIONS.getValue());
|
||||
if (errorMessages.size() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user