fix(标准法规流程): 79960
This commit is contained in:
+6
@@ -59,4 +59,10 @@ public interface IProcessFbEntryChangeService extends IService<ProcessFbEntryCha
|
||||
* @Description: 查询流程信息
|
||||
**/
|
||||
ProcessInfoVO<ProcessFbEntryChange> queryProcessInfoVO(String draftId, String processInstanceId, String taskId, String projectId);
|
||||
|
||||
/**
|
||||
* 删除校验
|
||||
* @param ids
|
||||
*/
|
||||
void delCheck(String ids);
|
||||
}
|
||||
|
||||
+28
@@ -22,6 +22,7 @@ import com.jero.modules.activiti.process.fb.mapper.ProcessFbEntryChangeMapper;
|
||||
import com.jero.modules.activiti.process.fb.service.IProcessFbEntryChangeService;
|
||||
import com.jero.modules.activiti.process.fb.service.IProcessHandleService;
|
||||
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
||||
import com.jero.modules.activiti.service.ProcessAllService;
|
||||
import com.jero.modules.activiti.service.ProcessApprovalRecordService;
|
||||
import com.jero.modules.activiti.service.WorkCenterService;
|
||||
import com.jero.modules.activiti.util.SpringContextUtil;
|
||||
@@ -93,6 +94,8 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
|
||||
private ILawsDomesticStandardService lawsDomesticStandardService;
|
||||
@Resource
|
||||
private ILawsOverseasStandardService lawsOverseasStandardService;
|
||||
@Resource
|
||||
private ProcessAllService processAllService;
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
@@ -424,6 +427,31 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
|
||||
return processInfoVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delCheck(String ids) {
|
||||
List<String> idsList = Arrays.asList(ids.split(","));
|
||||
List<String> standardNumberList = new ArrayList<>();
|
||||
List<LawsDomesticStandard> lawsStandardizations = lawsDomesticStandardService.listByIds(idsList);
|
||||
List<LawsOverseasStandard> lawsOverseasStandards = lawsOverseasStandardService.listByIds(idsList);
|
||||
standardNumberList.addAll(lawsStandardizations.stream().map(LawsDomesticStandard::getStandardNumber).collect(Collectors.toList()));
|
||||
standardNumberList.addAll(lawsOverseasStandards.stream().map(LawsOverseasStandard::getStandardNumber).collect(Collectors.toList()));
|
||||
|
||||
List<ProcessFbEntryChange> list = list(new LambdaQueryWrapper<ProcessFbEntryChange>()
|
||||
.in(ProcessFbEntryChange::getStandardNumber, standardNumberList)
|
||||
.eq(ProcessFbEntryChange::getOperateType, "2"));
|
||||
if (list.isEmpty()){
|
||||
return;
|
||||
}
|
||||
List<String> idList = list.stream().map(ProcessFbEntryChange::getId).collect(Collectors.toList());
|
||||
int count = processAllService.count(
|
||||
new LambdaQueryWrapper<ProcessAll>()
|
||||
.in(ProcessAll::getProjectId, idList)
|
||||
.eq(ProcessAll::getPrcStatus, "1"));
|
||||
if (count > 0) {
|
||||
throw new JeroBootException("标准编号在标准法规变更流程进行中,不可删除!");
|
||||
}
|
||||
}
|
||||
|
||||
private void toDict(ProcessFbEntryChange processFbEntryChange) {
|
||||
String businessJson = processFbEntryChange.getBusinessJson();
|
||||
String source = processFbEntryChange.getSource();
|
||||
|
||||
+9
-2
@@ -5,10 +5,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
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.fb.service.IProcessFbEntryChangeService;
|
||||
import com.jero.modules.laws.common.constant.FieldCommon;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.modules.laws.common.service.ILawsCommonService;
|
||||
import com.jero.modules.laws.standard.entity.LawsUpdateRecord;
|
||||
import com.jero.modules.laws.standard.service.ILawsNodeRelationService;
|
||||
@@ -17,7 +18,9 @@ import com.jero.modules.personal.service.ILawsStandardCollectionService;
|
||||
import com.jero.modules.personal.service.ILawsStandardSharingService;
|
||||
import com.jero.modules.tag.entity.LawsTag;
|
||||
import com.jero.modules.tag.enums.TableNameEnum;
|
||||
import io.swagger.annotations.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -48,6 +51,8 @@ public class LawsDomesticController {
|
||||
private ILawsUpdateRecordService lawsUpdateRecordService;
|
||||
@Autowired
|
||||
private ILawsStandardSharingService lawsStandardSharingService;
|
||||
@Autowired
|
||||
private IProcessFbEntryChangeService processFbEntryChangeService;
|
||||
|
||||
private static final String MODULE_VALUE = TableNameEnum.DOMESTIC_REGULATIONS.getValue();
|
||||
|
||||
@@ -141,6 +146,8 @@ public class LawsDomesticController {
|
||||
@ApiOperationSupport(order = 8)
|
||||
@RequiresPermissions("domesticStandard:delete")
|
||||
public Result<String> deleteByIdsAndModule(@RequestBody @ApiParam(name = "ids", value = "主键(多个用逗号分隔)") Map<String,Object> parameterMap) {
|
||||
// 删除校验
|
||||
processFbEntryChangeService.delCheck((String) parameterMap.get("ids"));
|
||||
//删除标准时同步删除这个标准的收藏数据
|
||||
lawsStandardCollectionService.deleteByStandardId((String) parameterMap.get("ids"));
|
||||
lawsStandardSharingService.deleteByStandardId((String) parameterMap.get("ids"));
|
||||
|
||||
+9
-2
@@ -5,10 +5,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
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.fb.service.IProcessFbEntryChangeService;
|
||||
import com.jero.modules.laws.common.constant.FieldCommon;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.modules.laws.common.service.ILawsCommonService;
|
||||
import com.jero.modules.laws.standard.entity.LawsUpdateRecord;
|
||||
import com.jero.modules.laws.standard.service.ILawsNodeRelationService;
|
||||
@@ -17,7 +18,9 @@ import com.jero.modules.personal.service.ILawsStandardCollectionService;
|
||||
import com.jero.modules.personal.service.ILawsStandardSharingService;
|
||||
import com.jero.modules.tag.entity.LawsTag;
|
||||
import com.jero.modules.tag.enums.TableNameEnum;
|
||||
import io.swagger.annotations.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -48,6 +51,8 @@ public class LawsOverseasController {
|
||||
private ILawsUpdateRecordService lawsUpdateRecordService;
|
||||
@Autowired
|
||||
private ILawsStandardSharingService lawsStandardSharingService;
|
||||
@Autowired
|
||||
private IProcessFbEntryChangeService processFbEntryChangeService;
|
||||
|
||||
private static final String MODULE_VALUE = TableNameEnum.FOREIGN_REGULATIONS.getValue();
|
||||
|
||||
@@ -141,6 +146,8 @@ public class LawsOverseasController {
|
||||
@ApiOperationSupport(order = 8)
|
||||
@RequiresPermissions("overseasStandard:delete")
|
||||
public Result<String> deleteByIdsAndModule(@RequestBody @ApiParam(name = "ids", value = "主键(多个用逗号分隔)") Map<String,Object> parameterMap) {
|
||||
// 删除校验
|
||||
processFbEntryChangeService.delCheck((String) parameterMap.get("ids"));
|
||||
//删除标准时同步删除这个标准的收藏数据
|
||||
lawsStandardCollectionService.deleteByStandardId((String) parameterMap.get("ids"));
|
||||
lawsStandardSharingService.deleteByStandardId((String) parameterMap.get("ids"));
|
||||
|
||||
Reference in New Issue
Block a user