| | |
| | | //处理上报日志 DCA工单 日志存储至子业务 不存在于父级 与跌绊滑 |
| | | String logTitle = Constants.equalsInteger(workorder.getType(), Constants.THREE) ? "跌绊滑风险" : "DCA"; |
| | | workorder.setCreateDate(workorder.getSubmitDate()); |
| | | this.saveLog(null,workorder,Constants.ZERO,workorder.getMemberId(),workOrderStatus.getLogTitle().replace("{title}",logTitle),null,null); |
| | | this.saveLog(null,workorder,Constants.ZERO,workorder.getMemberId(),workOrderStatus.getLogTitle().replace("{title}",logTitle),null,null,null); |
| | | } |
| | | } |
| | | |
| | |
| | | * @param memberId |
| | | * @param paramr2 转交给的处理人 |
| | | */ |
| | | public Integer saveLog(String beforeJson,Workorder afterWorkorder,Integer objType,Integer memberId,String title,String content,String paramr2){ |
| | | public Integer saveLog(String beforeJson,Workorder afterWorkorder,Integer objType,Integer memberId,String title,String content,String paramr2,String remark){ |
| | | WorkorderLog workorderLog = new WorkorderLog(); |
| | | workorderLog.setCreateDate(afterWorkorder.getEditDate()); |
| | | workorderLog.setEditDate(afterWorkorder.getEditDate()); |
| | |
| | | workorderLog.setObjType(objType); |
| | | workorderLog.setTitle(title); |
| | | workorderLog.setContent(content); |
| | | workorderLog.setRemark(remark); |
| | | workorderLogMapper.insert(workorderLog); |
| | | return workorderLog.getId(); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(!Constants.equalsInteger(workorderLog.getObjType(),Constants.FOUR)){ |
| | | //查询附件信息 |
| | | List<Multifile> multifileList = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO) |
| | |
| | | multifile.setFileurlFull(path+multifile.getFileurl()); |
| | | } |
| | | workorderLog.setMultifileList(multifileList); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | .ne(org.apache.commons.lang3.StringUtils.isNotBlank(pageWrap.getQwId()),Workorder::getType,Constants.TWO) |
| | | .in(Objects.nonNull(pageWrap.getDealStatus())&& |
| | | Constants.equalsInteger(pageWrap.getDealStatus(),Constants.ZERO), |
| | | Workorder::getStatus,Constants.WorkOrderStatus.waitConfirm.getKey(),Constants.WorkOrderStatus.waitAllocation.getKey(),Constants.WorkOrderStatus.waitDeal.getKey()) |
| | | Workorder::getStatus,Constants.WorkOrderStatus.waitConfirm.getKey(), |
| | | Constants.WorkOrderStatus.waitAllocation.getKey(),Constants.WorkOrderStatus.waitDeal.getKey()) |
| | | .in(Objects.nonNull(pageWrap.getDealStatus())&& |
| | | Constants.equalsInteger(pageWrap.getDealStatus(),Constants.ONE), |
| | | Workorder::getStatus,Constants.WorkOrderStatus.sheClose.getKey(),Constants.WorkOrderStatus.close.getKey(),Constants.WorkOrderStatus.wtsClose.getKey()) |
| | |
| | | if(workorder.getQwnoticeMemberIds().indexOf(closeDTO.getMember().getQwId())<Constants.ZERO && !workorder.getManagerId().equals(closeDTO.getMember().getQwId())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,当前工单非您的工单,无法进行处理"); |
| | | } |
| | | if(workorder.getManagerId().equals(closeDTO.getMember().getQwId())){ |
| | | workorder.setStatus(Constants.WorkOrderStatus.wtsClose.getKey()); |
| | | }else if(workorder.getQwnoticeMemberIds().indexOf(closeDTO.getMember().getQwId())>Constants.ZERO){ |
| | | workorder.setStatus(Constants.WorkOrderStatus.sheClose.getKey()); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,当前工单非您的工单,无法进行处理"); |
| | | } |
| | | qwIds.addAll(Arrays.asList(workorder.getQwnoticeMemberIds().split(","))); |
| | | qwIds.add(workorder.getManagerId()); |
| | | qwIds.remove(closeDTO.getMember().getQwId()); |
| | |
| | | && !workorder.getDealerId().equals(closeDTO.getMember().getQwId()) ){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,当前工单非您的工单,无法进行处理"); |
| | | } |
| | | if(workorder.getManagerId().equals(closeDTO.getMember().getQwId())){ |
| | | workorder.setStatus(Constants.WorkOrderStatus.wtsClose.getKey()); |
| | | }else if(workorder.getDealerId().equals(closeDTO.getMember().getQwId())){ |
| | | workorder.setStatus(Constants.WorkOrderStatus.close.getKey()); |
| | | }else if(workorder.getQwnoticeMemberIds().indexOf(closeDTO.getMember().getQwId())>Constants.ZERO){ |
| | | workorder.setStatus(Constants.WorkOrderStatus.sheClose.getKey()); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,当前工单非您的工单,无法进行处理"); |
| | | } |
| | | qwIds.addAll(Arrays.asList(workorder.getQwnoticeMemberIds().split(","))); |
| | | qwIds.add(workorder.getManagerId()); |
| | | qwIds.remove(closeDTO.getMember().getQwId()); |
| | |
| | | workorder.setEditDate(new Date()); |
| | | workorder.setDealTime(new Date()); |
| | | workorder.setDealInfo(closeDTO.getInfo()); |
| | | //子工单 则查询父级工单数据 是否付存在未完成的 如果不存在未完成的则进行主工单状态变化 |
| | | if(Constants.equalsInteger(workorder.getType(),Constants.TWO)&& |
| | | workorderMapper.selectCount(new QueryWrapper<Workorder>().lambda().eq(Workorder::getDcaRecordId,workorder.getDcaRecordId()).eq(Workorder::getIsdeleted,Constants.ZERO) |
| | | .ne(Workorder::getId,workorder.getId()).in(Workorder::getStatus, |
| | | Constants.WorkOrderStatus.waitConfirm.getKey(),Constants.WorkOrderStatus.waitAllocation.getKey(),Constants.WorkOrderStatus.waitDeal.getKey() |
| | | ))<=Constants.ZERO){ |
| | | Workorder parentWorkorder = new Workorder(); |
| | | parentWorkorder.setId(workorder.getDcaRecordId()); |
| | | parentWorkorder.setEditDate(new Date()); |
| | | parentWorkorder.setStatus(Constants.WorkOrderStatus.close.getKey()); |
| | | workorderMapper.updateById(parentWorkorder); |
| | | } |
| | | workorderMapper.updateById(workorder); |
| | | //处理上报日志 |
| | | Integer logId = this.saveLog(beforeJson,workorder,Constants.THREE,closeDTO.getMember().getId(),"任务已处理",closeDTO.getInfo(),null); |
| | | Integer logId = this.saveLog(beforeJson,workorder,Constants.THREE,closeDTO.getMember().getId(),"任务已处理",closeDTO.getInfo(),null,closeDTO.getInfo()); |
| | | List<Multifile> multifileList = closeDTO.getMultifileList(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(multifileList)){ |
| | | for (Multifile multifile:multifileList) { |
| | |
| | | //处理上报日志 |
| | | Integer logId = this.saveLog(beforeJson,workorder, |
| | | Constants.equalsInteger(passOnDTO.getPassOnType(),Constants.ZERO)?Constants.ONE:Constants.TWO |
| | | ,passOnDTO.getMember().getId(),"任务分配",passOnDTO.getInfo(),paramr2); |
| | | ,passOnDTO.getMember().getId(),"任务分配",passOnDTO.getInfo(),paramr2,null); |
| | | List<Multifile> multifileList = passOnDTO.getMultifileList(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(multifileList)){ |
| | | for (Multifile multifile:multifileList) { |
| | |
| | | |
| | | this.saveLog(null,workorder, |
| | | Constants.FOUR |
| | | ,member.getId(),"催促","已催促 "+urgeUser.getCompanyName() + "/" + urgeUser.getName(),null); |
| | | ,member.getId(),"催促","已催促 "+urgeUser.getCompanyName() + "/" + urgeUser.getName(),null,null); |
| | | //发送企微通知 |
| | | Category category = categoryMapper.selectById(workorder.getTypeId()); |
| | | if(Objects.nonNull(category)){ |