fix(企标流程): 临时提交
This commit is contained in:
+5
@@ -214,6 +214,7 @@ public class EsInspectFlowServiceImpl implements IEsInspectFlowService {
|
||||
enterpriseStandardInspectRectifyPlan.setId(String.valueOf(SnowflakeUtils.snowflake()));
|
||||
enterpriseStandardInspectRectifyPlan.setInspectId(processEsInspect.getId());
|
||||
}
|
||||
enterpriseStandardInspectRectifyPlanService.saveOrUpdateBatch(enterpriseStandardInspectRectifyPlanList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,6 +345,10 @@ public class EsInspectFlowServiceImpl implements IEsInspectFlowService {
|
||||
.eq(StringUtils.isNotBlank(taskId), ProcessApprovalRecord::getTaskId, taskId)
|
||||
, false);
|
||||
}
|
||||
// 业务表数据
|
||||
ProcessEsInspectVO processEsInspectVO = new ProcessEsInspectVO();
|
||||
processEsInspectVO.setProjectId(projectId);
|
||||
esInspectFlowVO.setProcessEsInspectVOList(processEsInspectService.queryByList(processEsInspectVO));
|
||||
esInspectFlowVO.setProcessAll(processAll);
|
||||
esInspectFlowVO.setProcessApprovalRecord(processApprovalRecord);
|
||||
return esInspectFlowVO;
|
||||
|
||||
+19
@@ -16,6 +16,9 @@ import com.jero.modules.activiti.process.esinspect.service.IProcessEsInspectServ
|
||||
import com.jero.modules.activiti.process.esinspect.vo.ProcessEsInspectVO;
|
||||
import com.jero.modules.laws.common.constant.FieldCommon;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspect;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspectContent;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspectRectifyPlan;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspectReport;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardInspectContentService;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardInspectRectifyPlanService;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardInspectReportService;
|
||||
@@ -25,6 +28,7 @@ import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -184,6 +188,21 @@ public class ProcessEsInspectServiceImpl extends ServiceImpl<ProcessEsInspectMap
|
||||
|
||||
private void setProperty(List<ProcessEsInspectVO> processEsInspectVOList) {
|
||||
for (ProcessEsInspectVO processEsInspectVO : processEsInspectVOList) {
|
||||
// 稽查内容
|
||||
List<EnterpriseStandardInspectContent> enterpriseStandardInspectContents = enterpriseStandardInspectContentService.queryClauseByEsInspectId(processEsInspectVO.getId());
|
||||
if (CollectionUtils.isNotEmpty(enterpriseStandardInspectContents)){
|
||||
processEsInspectVO.setEnterpriseStandardInspectContentList(enterpriseStandardInspectContents);
|
||||
}
|
||||
// 稽查报告
|
||||
List<EnterpriseStandardInspectReport> enterpriseStandardInspectReports = enterpriseStandardInspectReportService.queryByProcessEsInspectId(processEsInspectVO.getId());
|
||||
if (CollectionUtils.isNotEmpty(enterpriseStandardInspectReports)){
|
||||
processEsInspectVO.setEnterpriseStandardInspectReportList(enterpriseStandardInspectReports);
|
||||
}
|
||||
// 整改计划
|
||||
List<EnterpriseStandardInspectRectifyPlan> enterpriseStandardInspectRectifyPlanList = enterpriseStandardInspectRectifyPlanService.queryByProcessEsInspectId(processEsInspectVO.getId());
|
||||
if (CollectionUtils.isNotEmpty(enterpriseStandardInspectRectifyPlanList)){
|
||||
processEsInspectVO.setEnterpriseStandardInspectRectifyPlanList(enterpriseStandardInspectRectifyPlanList);
|
||||
}
|
||||
processEsInspectVO.setInspectUserDictText(sysUserService.dictByIdsOrUserNames(processEsInspectVO.getInspectUser(), ""));
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -27,6 +27,9 @@ public class EsInspectFlowVO {
|
||||
/**业务基本信息*/
|
||||
@ApiModelProperty(value = "业务基本信息")
|
||||
private List<ProcessEsInspect> processEsInspectList;
|
||||
/**业务基本信息 展示用*/
|
||||
@ApiModelProperty(value = "业务基本信息 展示用")
|
||||
private List<ProcessEsInspectVO> processEsInspectVOList;
|
||||
/**map*/
|
||||
@ApiModelProperty(value = "map")
|
||||
private Map<String, Object> map;
|
||||
|
||||
+18
@@ -1,7 +1,11 @@
|
||||
package com.jero.modules.activiti.process.esinspect.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspectContent;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspectRectifyPlan;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspectReport;
|
||||
import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardInspectVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -9,6 +13,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: ProcessEsInspectVO
|
||||
@@ -45,4 +50,17 @@ public class ProcessEsInspectVO extends EnterpriseStandardInspectVo {
|
||||
/** 稽查负责人 翻译*/
|
||||
@ApiModelProperty(value = "稽查负责人 翻译")
|
||||
private String inspectUserDictText;
|
||||
|
||||
/**稽查内容*/
|
||||
@ApiModelProperty(value = "稽查内容")
|
||||
@TableField(exist = false)
|
||||
private List<EnterpriseStandardInspectContent> enterpriseStandardInspectContentList;
|
||||
/**稽查报告*/
|
||||
@ApiModelProperty(value = "稽查报告")
|
||||
@TableField(exist = false)
|
||||
private List<EnterpriseStandardInspectReport> enterpriseStandardInspectReportList;
|
||||
/**整改计划*/
|
||||
@ApiModelProperty(value = "整改计划")
|
||||
@TableField(exist = false)
|
||||
private List<EnterpriseStandardInspectRectifyPlan> enterpriseStandardInspectRectifyPlanList;
|
||||
}
|
||||
|
||||
+6
@@ -16,6 +16,7 @@ import com.jero.modules.activiti.process.esinspectdelayapply.entity.ProcessEsIns
|
||||
import com.jero.modules.activiti.process.esinspectdelayapply.service.IEsInspectDelayApplyFlowService;
|
||||
import com.jero.modules.activiti.process.esinspectdelayapply.service.IProcessEsInspectDelayApplyService;
|
||||
import com.jero.modules.activiti.process.esinspectdelayapply.vo.EsInspectDelayApplyFlowVO;
|
||||
import com.jero.modules.activiti.process.esinspectdelayapply.vo.ProcessEsInspectDelayApplyVO;
|
||||
import com.jero.modules.activiti.service.ProcessAllService;
|
||||
import com.jero.modules.activiti.service.ProcessApprovalRecordService;
|
||||
import com.jero.modules.activiti.service.ProcessNodeLinkService;
|
||||
@@ -252,6 +253,11 @@ public class EsInspectDelayApplyFlowServiceImpl implements IEsInspectDelayApplyF
|
||||
.eq(StringUtils.isNotBlank(taskId), ProcessApprovalRecord::getTaskId, taskId)
|
||||
, false);
|
||||
}
|
||||
// 业务表数据
|
||||
ProcessEsInspectDelayApplyVO processEsInspectDelayApplyVO = new ProcessEsInspectDelayApplyVO();
|
||||
processEsInspectDelayApplyVO.setProjectId(projectId);
|
||||
processEsInspectDelayApplyVO.setNodeId(processAll.getNodeId());
|
||||
esInspectDelayApplyFlowVO.setProcessEsInspectDelayApplyVOList(processEsInspectDelayApplyService.queryByList(processEsInspectDelayApplyVO));
|
||||
esInspectDelayApplyFlowVO.setProcessAll(processAll);
|
||||
esInspectDelayApplyFlowVO.setProcessApprovalRecord(processApprovalRecord);
|
||||
return esInspectDelayApplyFlowVO;
|
||||
|
||||
+3
@@ -27,6 +27,9 @@ public class EsInspectDelayApplyFlowVO {
|
||||
/**业务基本信息*/
|
||||
@ApiModelProperty(value = "业务基本信息")
|
||||
private List<ProcessEsInspectDelayApply> processEsInspectDelayApplyList;
|
||||
/**业务基本信息 展示用*/
|
||||
@ApiModelProperty(value = "业务基本信息 展示用")
|
||||
private List<ProcessEsInspectDelayApplyVO> processEsInspectDelayApplyVOList;
|
||||
/**map*/
|
||||
@ApiModelProperty(value = "map")
|
||||
private Map<String, Object> map;
|
||||
|
||||
+2
@@ -201,6 +201,7 @@ public class ProcessEsInspectPlanController extends JeroController<ProcessEsInsp
|
||||
@AutoLog(value = "企标稽查计划业务表-通过excel导入数据(稽查联络人发起计划)")
|
||||
@ApiOperation(value="企标稽查计划业务表-通过excel导入数据(稽查联络人发起计划)", notes="企标稽查计划业务表-通过excel导入数据(稽查联络人发起计划)")
|
||||
@PostMapping(value = "/importExcelByStart")
|
||||
@Translation
|
||||
public Result<List<ProcessEsInspectPlan>> importExcelByStart(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
return processEsInspectPlanService.importExcelByStart(request, response);
|
||||
}
|
||||
@@ -215,6 +216,7 @@ public class ProcessEsInspectPlanController extends JeroController<ProcessEsInsp
|
||||
@AutoLog(value = "企标稽查计划业务表-通过excel导入数据(稽查征求意见对象填写意见)")
|
||||
@ApiOperation(value="企标稽查计划业务表-通过excel导入数据(稽查征求意见对象填写意见)", notes="企标稽查计划业务表-通过excel导入数据(稽查征求意见对象填写意见)")
|
||||
@PostMapping(value = "/importExcelByOpinionFill")
|
||||
@Translation
|
||||
public Result<List<ProcessEsInspectPlan>> importExcelByOpinionFill(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
return processEsInspectPlanService.importExcelByOpinionFill(request, response);
|
||||
}
|
||||
|
||||
-1
@@ -34,7 +34,6 @@ public interface IProcessEsInspectPlanService extends IService<ProcessEsInspectP
|
||||
* 列表查询
|
||||
*
|
||||
* @param processEsInspectPlan
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<ProcessEsInspectPlan> queryList(ProcessEsInspectPlan processEsInspectPlan);
|
||||
|
||||
+5
@@ -307,6 +307,11 @@ public class EsInspectPlanFlowServiceImpl implements IEsInspectPlanFlowService {
|
||||
}
|
||||
// 会签信息
|
||||
countersign(taskId, esInspectPlanFlowVO);
|
||||
// 业务表信息
|
||||
ProcessEsInspectPlan processEsInspectPlan = new ProcessEsInspectPlan();
|
||||
processEsInspectPlan.setProjectId(projectId);
|
||||
processEsInspectPlan.setNodeId(processAll.getNodeId());
|
||||
esInspectPlanFlowVO.setProcessEsInspectPlanList(processEsInspectPlanService.queryList(processEsInspectPlan));
|
||||
esInspectPlanFlowVO.setProcessAll(processAll);
|
||||
esInspectPlanFlowVO.setProcessApprovalRecord(processApprovalRecord);
|
||||
return esInspectPlanFlowVO;
|
||||
|
||||
+2
@@ -249,6 +249,7 @@ public class ProcessEsInspectPlanServiceImpl extends ServiceImpl<ProcessEsInspec
|
||||
if (errorMSG.length() > 0){
|
||||
throw new JeroBootException("文件导入失败:<br/>" + errorMSG);
|
||||
}else {
|
||||
fillProperty(list);
|
||||
return Result.OK("文件导入成功!数据行数:" + list.size(), list);
|
||||
}
|
||||
}
|
||||
@@ -318,6 +319,7 @@ public class ProcessEsInspectPlanServiceImpl extends ServiceImpl<ProcessEsInspec
|
||||
if (errorMSG.length() > 0){
|
||||
throw new JeroBootException("文件导入失败:<br/>" + errorMSG);
|
||||
}else {
|
||||
fillProperty(list);
|
||||
return Result.OK("文件导入成功!数据行数:" + list.size(), list);
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -223,6 +223,9 @@ public class LawsCustomCompareInfoController {
|
||||
@PostMapping(value = "/save")
|
||||
@RequiresPermissions("customComparison:edit")
|
||||
public Result<T> save(@RequestBody LawsCustomCompareInfo lawsCustomCompareInfo) {
|
||||
if (StringUtils.isNotBlank(lawsCustomCompareInfo.getId())){
|
||||
lawsCustomCompareInfoService.isHorizontalOverstep(lawsCustomCompareInfo.getId());
|
||||
}
|
||||
lawsCustomCompareInfoService.saveOrUpdate(lawsCustomCompareInfo);
|
||||
lawsCustomCompareInfoService.editCompareCreateTime(lawsCustomCompareInfo.getId());
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
@@ -240,6 +243,7 @@ public class LawsCustomCompareInfoController {
|
||||
if (StringUtils.isBlank(map.getId())) {
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
lawsCustomCompareInfoService.isHorizontalOverstep(map.getId());
|
||||
lawsCustomCompareInfoService.delById(map.getId());
|
||||
lawsCustomCompareInfoService.editCompareCreateTime(map.getId());
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
|
||||
+5
@@ -113,5 +113,10 @@ public interface ILawsCustomCompareInfoService extends IService<LawsCustomCompar
|
||||
* @param id
|
||||
*/
|
||||
void editCompareCreateTime(String id);
|
||||
|
||||
/**
|
||||
* 自定义对比-是否水平越权
|
||||
*/
|
||||
void isHorizontalOverstep(String ids);
|
||||
}
|
||||
|
||||
|
||||
+25
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.LanguageEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.*;
|
||||
@@ -447,6 +448,30 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl<LawsCustomComp
|
||||
.set(LawsCustomCompareInfo::getCreateTime, new Date()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void isHorizontalOverstep(String ids) {
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<String> roleIds = Arrays.asList(loginUser.getRoleIds().split(","));
|
||||
QueryWrapper<LawsCustomCompareInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.in("id", Arrays.asList(ids.split(",")));
|
||||
if (!roleIds.contains("admin")){
|
||||
queryWrapper.and(qw ->
|
||||
qw.and(qwi -> qwi.eq(IS_SHOW, LawsCustomCompareCommon.IS_SHOW_0)
|
||||
.eq("create_by", loginUser.getUsername()))
|
||||
.or().eq(IS_SHOW, LawsCustomCompareCommon.IS_SHOW_1));
|
||||
}else {
|
||||
return;
|
||||
}
|
||||
int count = count(queryWrapper);
|
||||
if (count <= 0){
|
||||
if(LanguageEnum.CN.equals(MessageUtils.getLanguage())) {
|
||||
throw new JeroBootException("无权限!");
|
||||
}else{
|
||||
throw new JeroBootException("No access!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void createTableCellContent(HSSFSheet sheet, List<StandardVO> standardVOS, List<LawsCustomCompareInventory> featureList, List<LawsCustomCompareInventory> compareList, List<LawsCustomCompareCell> list, CellStyle cellStyle) {
|
||||
for (int i = 2; i <= compareList.size() + 2; i++) {
|
||||
// 创建行
|
||||
|
||||
+8
-2
@@ -1,14 +1,12 @@
|
||||
package com.jero.modules.laws.documenttool.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.util.MessageUtils;
|
||||
import com.jero.modules.activiti.process.projectassess.entity.ProcessProjectAssessTerm;
|
||||
import com.jero.modules.laws.documenttool.entity.DocumentSplitInfo;
|
||||
import com.jero.modules.laws.documenttool.entity.LawsDocumentSplitView;
|
||||
import com.jero.modules.laws.documenttool.entity.SplitFileInfo;
|
||||
@@ -196,6 +194,7 @@ public class DocumentSplitController {
|
||||
if (StringUtils.isBlank(map.getId())) {
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
documentSplitService.isHorizontalOverstep(map.getId());
|
||||
documentSplitService.checkOutOperation(Collections.singletonList(map.getId()));
|
||||
sarFileSplitInfoService.deleteById(map.getId());
|
||||
|
||||
@@ -217,6 +216,7 @@ public class DocumentSplitController {
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
List<String> list = Arrays.asList(map.getIds().split(","));
|
||||
documentSplitService.isHorizontalOverstep(map.getIds());
|
||||
documentSplitService.checkOutOperation(list);
|
||||
sarFileSplitInfoService.deleteByIds(list);
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.SUCCESSFULLY_DELETED_IN_BULK));
|
||||
@@ -292,6 +292,7 @@ public class DocumentSplitController {
|
||||
@RequiresPermissions("split:sarFileSplitItems:update")
|
||||
@ApiOperationSupport(order = 14)
|
||||
public Result<T> editDocumentSplitDetail(@RequestBody @ApiParam("标签管理") Map<String, Object> parameter) {
|
||||
documentSplitService.isHorizontalOverstep((String) parameter.get("id"));
|
||||
documentSplitService.editDocumentSplitDetail(parameter);
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
@@ -307,6 +308,7 @@ public class DocumentSplitController {
|
||||
@RequiresPermissions("split:sarFileSplitItems:batchDelete")
|
||||
@ApiOperationSupport(order = 15)
|
||||
public Result<T> editBatchDocumentSplitDetail(@RequestBody @ApiParam("标签管理") Map<String, Object> parameter) {
|
||||
documentSplitService.isHorizontalOverstep((String) parameter.get("ids"));
|
||||
try {
|
||||
documentSplitService.editBatchDocumentSplitDetail(parameter);
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
@@ -327,6 +329,7 @@ public class DocumentSplitController {
|
||||
@RequiresPermissions("split:sarFileSplitItems:delete")
|
||||
@ApiOperationSupport(order = 16)
|
||||
public Result<T> deleteDocumentSplitDetail(@RequestBody Map<String, Object> parameter) {
|
||||
documentSplitService.isHorizontalOverstep((String) parameter.get("id"));
|
||||
documentSplitService.deleteDocumentSplitDetail(parameter);
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
@@ -341,6 +344,7 @@ public class DocumentSplitController {
|
||||
@PostMapping(value = "/deleteBatchDocumentSplitDetail")
|
||||
@ApiOperationSupport(order = 17)
|
||||
public Result<T> deleteBatchDocumentSplitDetail(@RequestBody Map<String, Object> parameter) {
|
||||
documentSplitService.isHorizontalOverstep((String) parameter.get("ids"));
|
||||
documentSplitService.deleteBatchDocumentSplitDetail(parameter);
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
@@ -371,6 +375,7 @@ public class DocumentSplitController {
|
||||
@RequiresPermissions("split:sarFileSplitItems:copy")
|
||||
@ApiOperationSupport(order = 19)
|
||||
public Result<T> copyDocumentSplitDetail(String id) {
|
||||
documentSplitService.isHorizontalOverstep(id);
|
||||
documentSplitService.copyDocumentSplitDetail(id);
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
@@ -386,6 +391,7 @@ public class DocumentSplitController {
|
||||
@RequiresPermissions("split:sarFileSplitItems:batchCopy")
|
||||
@ApiOperationSupport(order = 20)
|
||||
public Result<T> copyBatchDocumentSplitDetail(String ids) {
|
||||
documentSplitService.isHorizontalOverstep(ids);
|
||||
documentSplitService.copyBatchDocumentSplitDetail(ids);
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
|
||||
+6
@@ -200,4 +200,10 @@ public interface IDocumentSplitService {
|
||||
* @return
|
||||
*/
|
||||
List<SarFileSplitMenuEO> queryTreeMenuByInfoId(String infoId);
|
||||
|
||||
/**
|
||||
* 文档拆分-是否水平越权
|
||||
* @return
|
||||
*/
|
||||
void isHorizontalOverstep(String ids);
|
||||
}
|
||||
|
||||
+22
@@ -1185,6 +1185,28 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void isHorizontalOverstep(String ids) {
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// 发布的只有自己可见,发布的数据所有人可见
|
||||
String roleIds = loginUser.getRoleIds();
|
||||
QueryWrapper<LawsDocumentSplit> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.in("id", Arrays.asList(ids.split(",")));
|
||||
queryWrapper.and(qw ->
|
||||
qw.and(qwi -> qwi.eq(SPLIT_STATUS, DocumentSplitCommon.SPLIT_STATUS1)
|
||||
.eq("author", loginUser.calcNameWorkNo()))
|
||||
.or().eq(SPLIT_STATUS, DocumentSplitCommon.SPLIT_STATUS2)
|
||||
.or().eq(roleIds.contains("admin"), "author", "云平台"));
|
||||
int count = lawsDocumentSplitMapper.selectCount(queryWrapper);
|
||||
if (count <= 0) {
|
||||
if(LanguageEnum.CN.equals(MessageUtils.getLanguage())) {
|
||||
throw new JeroBootException("无权限!");
|
||||
}else{
|
||||
throw new JeroBootException("No access!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void manageData(Map<String, Object> resultMap, StringBuilder fieldsBuilder, StringBuilder valuesBuilder) {
|
||||
// 所有key(字段名)
|
||||
resultMap.forEach((k, v) -> {
|
||||
|
||||
Reference in New Issue
Block a user