| | |
| | | message = message + " <div class=\"normal\">"+ DateUtil.formatDate(new Date(),"yyyy-MM-dd HH:mm") +"/"+ workorder.getLocationName() +"/"+ categoryName+"</div>"; |
| | | }else{ |
| | | message = message + " <div class=\"normal\">"+ (org.apache.commons.lang3.StringUtils.isNotBlank(userName)?userName:"系统") + (Constants.equalsInteger(contentType,Constants.ZERO)?"任务分配给你":(Constants.equalsInteger(contentType,Constants.ONE)?"对该工单进行了催促,请尽快处理":((Constants.equalsInteger(contentType,Constants.TWO)?"抄送给你":"已处理一项")))) +"</div>"; |
| | | message = message + " <div class=\"normal\">观察主题"+ categoryName +"</div>"; |
| | | message = message + " <div class=\"normal\">观察主题 "+ categoryName +"</div>"; |
| | | message = message + " <div class=\"normal\">符合:"+ workorder.getDcaYesNum() +" 不符合:"+workorder.getDcaNoNum()+"</div>"; |
| | | if(Constants.equalsInteger(contentType,Constants.TWO)){ |
| | | message = message + " <div class=\"normal\">说明:"+ csInfo +"</div>"; |
| | | message = message + " <div class=\"normal\">说明 "+ csInfo +"</div>"; |
| | | } |
| | | } |
| | | textCard.setDescription(message); |
| | |
| | | if(Objects.isNull(workorder)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | this.dealButton(workorder,member); |
| | | //查询附件信息 |
| | | List<Multifile> multifileList = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda().eq(Multifile::getIsdeleted,Constants.ZERO) |
| | |
| | | } |
| | | workorder.setMultifileList(multifileList); |
| | | } |
| | | |
| | | //查询日志信息 |
| | | workorder.setLogList(this.getLogList(workorder,member)); |
| | | if(Constants.equalsInteger(workorder.getType(),Constants.ONE)){ |
| | |
| | | param.setIsdeleted(Constants.ZERO); |
| | | param.setDcaRecordId(workorder.getId()); |
| | | List<Workorder> dcaChildList = findList(param); |
| | | for (Workorder dcaChild:dcaChildList) { |
| | | this.dealButton(dcaChild,member); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(dcaChildList)){ |
| | | for (Workorder dcaChild:dcaChildList) { |
| | | this.dealButton(dcaChild,member); |
| | | } |
| | | workorder.setManagerId(dcaChildList.stream().filter(i->Objects.nonNull(i.getManagerId())).map(i->i.getManagerId()).collect(Collectors.joining(","))); |
| | | } |
| | | |
| | | workorder.setDcaChildList(dcaChildList); |
| | | } |
| | | return workorder; |
| | |
| | | Boolean canOpenUrgeButton = true; |
| | | for (WorkorderLog workorderLog:logList) { |
| | | workorderLog.setUrgeButton(Constants.ZERO); |
| | | //物业主管处理中 |
| | | if(Constants.equalsInteger(workorder.getStatus(),Constants.ONE)){ |
| | | Member member = memberMapper.selectById(workorderLog.getParam1()); |
| | | if(Objects.nonNull(member) && org.apache.commons.lang3.StringUtils.isNotBlank(member.getQwId()) |
| | | && Objects.nonNull(loginMember) && Constants.equalsInteger(member.getId(),loginMember.getId()) |
| | | && workorder.getQwnoticeMemberIds().indexOf(member.getQwId())>=Constants.ZERO){ |
| | | workorderLog.setUrgeButton(Constants.ONE); |
| | | if(Constants.equalsInteger(workorderLog.getObjType(),Constants.TWO)||Constants.equalsInteger(workorderLog.getObjType(),Constants.ONE)){ |
| | | //物业主管处理中 |
| | | if(Constants.equalsInteger(workorder.getStatus(),Constants.ONE)){ |
| | | Member member = memberMapper.selectById(workorderLog.getParam1()); |
| | | if(Objects.nonNull(member) && org.apache.commons.lang3.StringUtils.isNotBlank(member.getQwId()) |
| | | && Objects.nonNull(loginMember) && Constants.equalsInteger(member.getId(),loginMember.getId()) |
| | | && workorder.getQwnoticeMemberIds().indexOf(member.getQwId())>=Constants.ZERO){ |
| | | workorderLog.setUrgeButton(Constants.ONE); |
| | | } |
| | | } |
| | | //工程师处理中 |
| | | if(Constants.equalsInteger(workorder.getStatus(),Constants.TWO)){ |
| | | Member member = memberMapper.selectById(workorderLog.getParam1()); |
| | | if(Objects.nonNull(member) && org.apache.commons.lang3.StringUtils.isNotBlank(member.getQwId()) |
| | | && canOpenUrgeButton |
| | | && (workorder.getQwnoticeMemberIds().indexOf(member.getQwId()) >= Constants.ZERO || member.getQwId().equals(workorder.getManagerId()) ) |
| | | ){ |
| | | workorderLog.setUrgeButton(Constants.ONE); |
| | | canOpenUrgeButton = false; |
| | | } |
| | | } |
| | | } |
| | | //工程师处理中 |
| | | if(Constants.equalsInteger(workorder.getStatus(),Constants.TWO)){ |
| | | Member member = memberMapper.selectById(workorderLog.getParam1()); |
| | | if(Objects.nonNull(member) && org.apache.commons.lang3.StringUtils.isNotBlank(member.getQwId()) |
| | | && canOpenUrgeButton |
| | | && (workorder.getQwnoticeMemberIds().indexOf(member.getQwId()) >= Constants.ZERO || member.getQwId().equals(workorder.getManagerId()) ) |
| | | ){ |
| | | workorderLog.setUrgeButton(Constants.ONE); |
| | | canOpenUrgeButton = false; |
| | | } |
| | | } |
| | | |
| | | //查询附件信息 |
| | | List<Multifile> multifileList = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO) |
| | |
| | | workorder.setStatus(Constants.WorkOrderStatus.waitDeal.getKey()); |
| | | } |
| | | workorder.setEditDate(new Date()); |
| | | workorder.setUrgeDate(DateUtil.afterMinutesDate(new Date(),2)); |
| | | workorder.setUrgeDate(DateUtil.afterMinutesDate(new Date(),10)); |
| | | workorderMapper.updateById(workorder); |
| | | String paramr2 = member.getCompanyName()+"/"+member.getName(); |
| | | //处理上报日志 |
| | |
| | | public void urge(Integer workorderId,Member member){ |
| | | Workorder workorder = workorderMapper.selectById(workorderId); |
| | | workorder.setEditDate(new Date()); |
| | | workorder.setUrgeDate(DateUtil.afterMinutesDate(new Date(),2));//DateUtil.afterHoursDate(new Date(),24)); |
| | | workorder.setUrgeDate(DateUtil.afterMinutesDate(new Date(),10)); |
| | | workorderMapper.updateById(workorder); |
| | | if(Objects.isNull(workorder)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到工单数据"); |
| | |
| | | public void jobUrge(){ |
| | | List<Workorder> workorderList = workorderMapper.selectList(new QueryWrapper<Workorder>().lambda().eq(Workorder::getIsdeleted,Constants.ZERO) |
| | | .in(Workorder::getStatus,Constants.WorkOrderStatus.waitAllocation.getKey(),Constants.WorkOrderStatus.waitDeal.getKey()) |
| | | .apply(" urge_time > now() ") |
| | | .apply(" URGE_DATE < now() ") |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(workorderList)){ |
| | | for (Workorder workorder:workorderList) { |
| | | this.autoUrge(workorder); |
| | | workorder.setEditDate(new Date()); |
| | | workorder.setUrgeDate(DateUtil.afterMinutesDate(new Date(),2));//DateUtil.afterHoursDate(new Date(),24)); |
| | | workorder.setUrgeDate(DateUtil.afterMinutesDate(new Date(),10));//DateUtil.afterHoursDate(new Date(),24)); |
| | | workorderMapper.updateById(workorder); |
| | | } |
| | | } |