|
@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.google.gson.reflect.TypeToken;
|
|
|
import com.qmth.sop.business.activiti.service.ActivitiService;
|
|
|
-import com.qmth.sop.business.bean.dto.DataPermissionDto;
|
|
|
import com.qmth.sop.business.bean.params.FlowApproveParam;
|
|
|
import com.qmth.sop.business.bean.result.*;
|
|
|
import com.qmth.sop.business.entity.*;
|
|
@@ -93,10 +92,9 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
|
|
|
CrmProjectResult crmProjectResult = tbCrmService.findCrmProjectBySopNoOrCrmNo(sopNo, crmNo);
|
|
|
Optional.ofNullable(crmProjectResult).orElseThrow(() -> ExceptionResultEnum.CRM_NO_NO_DATA.exception());
|
|
|
|
|
|
- List<SysUserRole> sysUserRoleList = sysUserRoleService.listByServiceId(crmProjectResult.getServiceUnitId());
|
|
|
- Set<String> approveUserIdSet = sysUserRoleList.stream().map(s -> String.valueOf(s.getUserId())).collect(Collectors.toSet());
|
|
|
+ List<String> sysUserRoleList = sysUserRoleService.listByServiceId(crmProjectResult.getServiceUnitId());
|
|
|
List<String> approveUserIds = new ArrayList<>();
|
|
|
- approveUserIds.addAll(approveUserIdSet);
|
|
|
+ approveUserIds.addAll(sysUserRoleList);
|
|
|
FlowApproveParam flowApproveParam = new FlowApproveParam(tbDingApply.getFlowDeploymentId(), FlowApprovePassEnum.START, approveUserIds, crmNo);
|
|
|
flowApproveParam.setApproveRemark(FlowApprovePassEnum.START.getTitle());
|
|
|
Map<String, Object> map = activitiService.taskApprove(flowApproveParam);
|
|
@@ -124,9 +122,10 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
|
|
|
@Override
|
|
|
public IPage<DingApplyUnDoneResult> flowTaskUnDoneList(IPage<Map> iPage, Long serviceId, String name, Long supplierId, String customName, Long startTime, Long endTime, Long applyStartTime, Long applyEndTime) throws Exception {
|
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
- DataPermissionDto dpr = sysUserService.buildUserDataPermission(requestUser.getId());
|
|
|
+// DataPermissionDto dpr = sysUserService.buildUserDataPermission(requestUser.getId());
|
|
|
|
|
|
- IPage<DingApplyUnDoneResult> dingApplyUnDoneResultIPage = this.baseMapper.flowTaskUnDoneList(iPage, Arrays.asList(String.valueOf(requestUser.getId())), serviceId, name, supplierId, customName, startTime, endTime, applyStartTime, applyEndTime, dpr);
|
|
|
+// IPage<DingApplyUnDoneResult> dingApplyUnDoneResultIPage = this.baseMapper.flowTaskUnDoneList(iPage, Arrays.asList(String.valueOf(requestUser.getId())), serviceId, name, supplierId, customName, startTime, endTime, applyStartTime, applyEndTime, dpr);
|
|
|
+ IPage<DingApplyUnDoneResult> dingApplyUnDoneResultIPage = this.baseMapper.flowTaskUnDoneList(iPage, Arrays.asList(String.valueOf(requestUser.getId())), serviceId, name, supplierId, customName, startTime, endTime, applyStartTime, applyEndTime, null);
|
|
|
if (Objects.nonNull(dingApplyUnDoneResultIPage) && !CollectionUtils.isEmpty(dingApplyUnDoneResultIPage.getRecords())) {
|
|
|
for (DingApplyUnDoneResult d : dingApplyUnDoneResultIPage.getRecords()) {
|
|
|
if (Objects.nonNull(d.getAttachmentPaths())) {
|
|
@@ -176,9 +175,10 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
|
|
|
@Override
|
|
|
public IPage<DingApplyDoneResult> flowTaskDoneList(IPage<Map> iPage, Long serviceId, String name, Long supplierId, DingExceptionApproveEnum dingExceptionApprove, String customName, Long startTime, Long endTime, Long applyStartTime, Long applyEndTime) throws Exception {
|
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
- DataPermissionDto dpr = sysUserService.buildUserDataPermission(requestUser.getId());
|
|
|
+// DataPermissionDto dpr = sysUserService.buildUserDataPermission(requestUser.getId());
|
|
|
|
|
|
- IPage<DingApplyDoneResult> dingApplyDoneResultIPage = this.baseMapper.flowTaskDoneList(iPage, Arrays.asList(String.valueOf(requestUser.getId())), serviceId, name, supplierId, Objects.nonNull(dingExceptionApprove) ? dingExceptionApprove.getTitle() : null, customName, startTime, endTime, applyStartTime, applyEndTime, dpr);
|
|
|
+// IPage<DingApplyDoneResult> dingApplyDoneResultIPage = this.baseMapper.flowTaskDoneList(iPage, Arrays.asList(String.valueOf(requestUser.getId())), serviceId, name, supplierId, Objects.nonNull(dingExceptionApprove) ? dingExceptionApprove.getTitle() : null, customName, startTime, endTime, applyStartTime, applyEndTime, dpr);
|
|
|
+ IPage<DingApplyDoneResult> dingApplyDoneResultIPage = this.baseMapper.flowTaskDoneList(iPage, Arrays.asList(String.valueOf(requestUser.getId())), serviceId, name, supplierId, Objects.nonNull(dingExceptionApprove) ? dingExceptionApprove.getTitle() : null, customName, startTime, endTime, applyStartTime, applyEndTime, null);
|
|
|
if (Objects.nonNull(dingApplyDoneResultIPage) && !CollectionUtils.isEmpty(dingApplyDoneResultIPage.getRecords())) {
|
|
|
for (DingApplyDoneResult d : dingApplyDoneResultIPage.getRecords()) {
|
|
|
if (Objects.nonNull(d.getAttachmentPaths())) {
|
|
@@ -316,10 +316,9 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
|
|
|
Optional.ofNullable(crmProjectResult).orElseThrow(() -> ExceptionResultEnum.CRM_NO_NO_DATA.exception());
|
|
|
Optional.ofNullable(crmProjectResult.getRegionCoordinatorId()).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("crm区域协调人数据为空"));
|
|
|
|
|
|
- List<SysUserRole> sysUserRoleList = sysUserRoleService.listByServiceId(crmProjectResult.getServiceUnitId());
|
|
|
- Set<String> approveUserIdSet = sysUserRoleList.stream().map(s -> String.valueOf(s.getUserId())).collect(Collectors.toSet());
|
|
|
+ List<String> sysUserRoleList = sysUserRoleService.listByServiceId(crmProjectResult.getServiceUnitId());
|
|
|
List<String> approveUserIds = new ArrayList<>();
|
|
|
- approveUserIds.addAll(approveUserIdSet);
|
|
|
+ approveUserIds.addAll(sysUserRoleList);
|
|
|
activitiService.taskApprove(new FlowApproveParam(taskId, FlowApprovePassEnum.PASS, approveUserIds, tfCustomFlowEntity.getCrmNo(), dingExceptionApprove.getTitle()));
|
|
|
|
|
|
TBDingApplyService tbDingApplyService = SpringContextHolder.getBean(TBDingApplyService.class);
|