| | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.flowable.engine.HistoryService; |
| | | import org.flowable.engine.TaskService; |
| | | import org.flowable.engine.impl.el.DateUtil; |
| | | import org.flowable.task.api.Task; |
| | | import org.flowable.task.api.history.HistoricTaskInstance; |
| | | import org.flowable.variable.api.persistence.entity.VariableInstance; |
| | | import org.jeecg.common.api.vo.FileUploadResult; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.constant.DataBaseConstant; |
| | | import org.jeecg.common.exception.JeecgBootException; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.aspect.annotation.EquipmentHistoryLog; |
| | | import org.jeecg.modules.eam.constant.BusinessCodeConst; |
| | | import org.jeecg.modules.eam.constant.EquipmentMaintenanceStatus; |
| | | import org.jeecg.modules.eam.constant.EquipmentOperationTagEnum; |
| | | import org.jeecg.modules.eam.constant.InspectionStatus; |
| | | import org.jeecg.modules.eam.entity.EamEquipment; |
| | | import org.jeecg.modules.eam.entity.EamInspectionOrder; |
| | |
| | | import org.jeecg.modules.eam.mapper.EamInspectionOrderMapper; |
| | | import org.jeecg.modules.eam.request.EamInspectionOrderQuery; |
| | | import org.jeecg.modules.eam.request.EamInspectionOrderRequest; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | | import org.jeecg.modules.eam.service.IEamInspectionOrderDetailService; |
| | | import org.jeecg.modules.eam.service.IEamInspectionOrderService; |
| | | import org.jeecg.modules.eam.service.IEamReportRepairService; |
| | | import org.jeecg.modules.eam.service.*; |
| | | import org.jeecg.modules.eam.vo.EquipmentInspectionStatistics; |
| | | import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness; |
| | | import org.jeecg.modules.flowable.apithird.business.service.impl.FlowMyBusinessServiceImpl; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCommonService; |
| | | import org.jeecg.modules.flowable.domain.vo.FlowTaskVo; |
| | | import org.jeecg.modules.flowable.domain.vo.WorkTaskDataVo; |
| | | import org.jeecg.modules.flowable.service.IFlowDefinitionService; |
| | | import org.jeecg.modules.flowable.service.IFlowTaskService; |
| | | import org.jeecg.modules.qywx.message.vo.TemplateCard; |
| | | import org.jeecg.modules.qywx.message.vo.TemplateCardEntity; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.IMdcProductionService; |
| | | import org.jeecg.modules.system.service.IMdcUserProductionService; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.jeecg.modules.system.service.IThirdAppService; |
| | | import org.jeecg.modules.system.service.impl.ThirdAppWechatEnterpriseServiceImpl; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | private IMdcUserProductionService mdcUserProductionService; |
| | | @Autowired |
| | | private IEamReportRepairService eamReportRepairService; |
| | | @Autowired |
| | | private IEamEquipmentExtendService eamEquipmentExtendService; |
| | | @Autowired |
| | | private IMdcProductionService mdcProductionService; |
| | | @Autowired |
| | | private ThirdAppWechatEnterpriseServiceImpl wechatEnterpriseService; |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | @Autowired |
| | | private HistoryService historyService; |
| | | |
| | | @Value("${wechatEnterprise.cardActionUrl}") |
| | | private String cardActionUrl; |
| | | |
| | | @Override |
| | | public IPage<EamInspectionOrder> queryPageList(Page<EamInspectionOrder> page, EamInspectionOrderQuery query) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<EquipmentInspectionStatistics> equipmentInspectionStatistics(String productionId, LocalDate firstOfMonth, LocalDate today) { |
| | | if (StringUtils.isNotBlank(productionId)) { |
| | | //车间编码不为空 |
| | | List<String> productIds = mdcProductionService.recursionChildren(productionId); |
| | | if (CollectionUtil.isEmpty(productIds)) { |
| | | return Collections.emptyList(); |
| | | } |
| | | List<EquipmentInspectionStatistics> list = this.baseMapper.equipmentInspectionStatistics(productIds, firstOfMonth.toString(), today.plusDays(1).toString()); |
| | | if (CollectionUtil.isEmpty(list)) { |
| | | return Collections.emptyList(); |
| | | } |
| | | return list; |
| | | } |
| | | List<EquipmentInspectionStatistics> list = this.baseMapper.equipmentInspectionStatistics(null, firstOfMonth.toString(), today.plusDays(1).toString()); |
| | | if (CollectionUtil.isEmpty(list)) { |
| | | return Collections.emptyList(); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<EamInspectionOrder> selectUnReceivedInspectionOrder() { |
| | | return this.baseMapper.selectUnReceivedInspectionOrder(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean addInspectionOrder(EamInspectionOrderRequest eamInspectionOrderRequest) { |
| | | EamInspectionOrder eamInspectionOrder = new EamInspectionOrder(); |
| | |
| | | } |
| | | if (StrUtil.isNotBlank(eamInspectionOrderRequest.getOperator())) { |
| | | triggerProcess(eamInspectionOrder); |
| | | //更新设备保养状态 |
| | | eamEquipmentExtendService.updateEquipmentInspectionStatus(eamInspectionOrder.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_INSPECTION.name()); |
| | | //推送企业微信消息 |
| | | sendQywxTemplateCardMessage(eamInspectionOrder, null); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | private void sendQywxTemplateCardMessage(EamInspectionOrder eamInspectionOrder, EamInspectionOrderRequest request) { |
| | | TemplateCard templateCard = new TemplateCard(); |
| | | String inspectionStatus = eamInspectionOrder.getInspectionStatus(); |
| | | EamEquipment equipment = eamEquipmentService.getById(eamInspectionOrder.getEquipmentId()); |
| | | eamInspectionOrder.setEquipmentCode(equipment.getEquipmentCode()); |
| | | //todo 目前确认,待领取工单不推送 |
| | | //if (InspectionStatus.WAIT_INSPECTION.name().equals(inspectionStatus)) { |
| | | // //工单待领取,推送消息给所有操作工 |
| | | // String orgId = Optional.ofNullable(eamEquipmentService.getById(eamInspectionOrder.getEquipmentId())) |
| | | // .map(EamEquipment::getOrgId) |
| | | // .orElse(null); |
| | | // if (orgId == null) { |
| | | // throw new IllegalArgumentException("未找到设备的组织 ID"); |
| | | // } |
| | | // //查询该设备所属产线的所有操作工 |
| | | // List<SysUser> sysUserList = mdcUserProductionService.queryByPostAndProId("PCR0001", orgId); |
| | | // List<String> usernameList = sysUserList.stream().map(SysUser::getUsername).collect(Collectors.toList()); |
| | | // if (usernameList.isEmpty()) { |
| | | // throw new IllegalArgumentException("未找到该设备所属产线的操作工,请联系管理员处理"); |
| | | // } |
| | | // String nextAssigneeStr = usernameList.stream() |
| | | // .filter(Objects::nonNull) // 可选:过滤 null 值 |
| | | // .collect(Collectors.joining(",")); |
| | | // String touser = wechatEnterpriseService.getTouser(nextAssigneeStr, false); |
| | | // templateCard.setTouser(touser); |
| | | //} |
| | | if (InspectionStatus.UNDER_INSPECTION.name().equals(inspectionStatus)) { |
| | | //工单已开始点检,推送消息给具体操作工(新增工单时指定、领取工单的操作工) |
| | | String operator = eamInspectionOrder.getOperator(); |
| | | if (StrUtil.isNotBlank(operator)) { |
| | | //新增工单时、工单领取时已指定点检人 |
| | | String touser = wechatEnterpriseService.getTouser(operator, false); |
| | | templateCard.setTouser(touser); |
| | | } |
| | | } |
| | | if (InspectionStatus.WAIT_CONFIRM.name().equals(inspectionStatus)) { |
| | | //工单已点检完成,推送消息给班组长确认 |
| | | List<String> nextAssignee = (List<String>) request.getValues().get("NextAssignee"); |
| | | String nextAssigneeStr = nextAssignee.stream() |
| | | .filter(Objects::nonNull) // 可选:过滤 null 值 |
| | | .collect(Collectors.joining(",")); |
| | | String touser = wechatEnterpriseService.getTouser(nextAssigneeStr, false); |
| | | templateCard.setTouser(touser); |
| | | } |
| | | //todo 工单完成,不推送消息 |
| | | //if (InspectionStatus.COMPLETE.name().equals(inspectionStatus)) { |
| | | // //工单已确认完成,推送消息给点检人 |
| | | // String touser = wechatEnterpriseService.getTouser(eamInspectionOrder.getOperator(), false); |
| | | // templateCard.setTouser(touser); |
| | | //} |
| | | |
| | | TemplateCardEntity templateCardEntity = new TemplateCardEntity(); |
| | | templateCard.setTemplate_card(templateCardEntity); |
| | | templateCardEntity.setTask_id(eamInspectionOrder.getId()); |
| | | TemplateCardEntity.MainTitle mainTitle = new TemplateCardEntity.MainTitle(); |
| | | mainTitle.setTitle("设备点检"); |
| | | templateCardEntity.setMain_title(mainTitle); |
| | | |
| | | //if (InspectionStatus.WAIT_INSPECTION.name().equals(inspectionStatus)) { |
| | | // templateCardEntity.setSub_title_text("新增设备点检工单: " + eamInspectionOrder.getOrderNum() + " ,请进入系统领取"); |
| | | //} |
| | | if (InspectionStatus.UNDER_INSPECTION.name().equals(inspectionStatus)) { |
| | | if (Objects.nonNull(request) && StrUtil.isNotBlank(request.getConfirmDealType())) { |
| | | //是驳回的单子 |
| | | templateCardEntity.setSub_title_text("工单: " + eamInspectionOrder.getOrderNum() + " 被驳回,请重新进行设备点检"); |
| | | } else { |
| | | templateCardEntity.setSub_title_text("已领取工单: " + eamInspectionOrder.getOrderNum() + ",开始进行设备点检"); |
| | | } |
| | | } |
| | | if (InspectionStatus.WAIT_CONFIRM.name().equals(inspectionStatus)) { |
| | | templateCardEntity.setSub_title_text("工单: " + eamInspectionOrder.getOrderNum() + " 已完成设备点检,请进入系统确认"); |
| | | } |
| | | //if (InspectionStatus.COMPLETE.name().equals(inspectionStatus)) { |
| | | // templateCardEntity.setSub_title_text("工单: " + eamInspectionOrder.getOrderNum() + " 已完成点检后确认"); |
| | | //} |
| | | |
| | | List<TemplateCardEntity.HorizontalContent> horizontalContentList = CollectionUtil.newArrayList(); |
| | | TemplateCardEntity.HorizontalContent content1 = new TemplateCardEntity.HorizontalContent(); |
| | | content1.setKeyname("工单号"); |
| | | content1.setValue(eamInspectionOrder.getOrderNum()); |
| | | horizontalContentList.add(content1); |
| | | TemplateCardEntity.HorizontalContent content2 = new TemplateCardEntity.HorizontalContent(); |
| | | content2.setKeyname("设备编号"); |
| | | content2.setValue(eamInspectionOrder.getEquipmentCode()); |
| | | horizontalContentList.add(content2); |
| | | |
| | | //如果工单状态为待点检(没指定点检人的未领取状态),流程是没有启动的,无法获取节点信息 |
| | | if (!InspectionStatus.WAIT_INSPECTION.name().equals(inspectionStatus)) { |
| | | WorkTaskDataVo previousFlowInfo = flowTaskService.getPreviousFlowInfo(eamInspectionOrder.getId()); |
| | | TemplateCardEntity.HorizontalContent content3 = new TemplateCardEntity.HorizontalContent(); |
| | | content3.setKeyname("前驱节点"); |
| | | content3.setValue(previousFlowInfo.getPreNode()); |
| | | horizontalContentList.add(content3); |
| | | TemplateCardEntity.HorizontalContent content4 = new TemplateCardEntity.HorizontalContent(); |
| | | content4.setKeyname("当前节点"); |
| | | if (InspectionStatus.COMPLETE.name().equals(inspectionStatus)) { |
| | | content4.setValue("已完成"); |
| | | } else { |
| | | content4.setValue(previousFlowInfo.getName()); |
| | | } |
| | | horizontalContentList.add(content4); |
| | | } |
| | | |
| | | //if (InspectionStatus.WAIT_INSPECTION.name().equals(inspectionStatus)) { |
| | | // TemplateCardEntity.HorizontalContent content3 = new TemplateCardEntity.HorizontalContent(); |
| | | // content3.setKeyname("发起人"); |
| | | // SysUser sysUser = sysUserService.getUserByName(eamInspectionOrder.getCreateBy()); |
| | | // content3.setValue(sysUser.getRealname()); |
| | | // horizontalContentList.add(content3); |
| | | //} |
| | | if (InspectionStatus.UNDER_INSPECTION.name().equals(inspectionStatus)) { |
| | | if (Objects.isNull(request)) { |
| | | TemplateCardEntity.HorizontalContent content = new TemplateCardEntity.HorizontalContent(); |
| | | content.setKeyname("领取人"); |
| | | SysUser sysUser = sysUserService.getUserByName(eamInspectionOrder.getOperator()); |
| | | content.setValue(sysUser.getRealname()); |
| | | horizontalContentList.add(content); |
| | | } else { |
| | | TemplateCardEntity.HorizontalContent content3 = new TemplateCardEntity.HorizontalContent(); |
| | | TemplateCardEntity.HorizontalContent content4 = new TemplateCardEntity.HorizontalContent(); |
| | | content3.setKeyname("确认人"); |
| | | String confirmAssignee = request.getAssignee(); |
| | | SysUser confirmUser = sysUserService.getUserByName(confirmAssignee); |
| | | content3.setValue(confirmUser.getRealname()); |
| | | horizontalContentList.add(content3); |
| | | content4.setKeyname("确认意见"); |
| | | content4.setValue("驳回"); |
| | | horizontalContentList.add(content4); |
| | | } |
| | | } |
| | | if (InspectionStatus.WAIT_CONFIRM.name().equals(inspectionStatus)) { |
| | | TemplateCardEntity.HorizontalContent content3 = new TemplateCardEntity.HorizontalContent(); |
| | | content3.setKeyname("点检人"); |
| | | SysUser sysUser = sysUserService.getUserByName(eamInspectionOrder.getOperator()); |
| | | content3.setValue(sysUser.getRealname()); |
| | | horizontalContentList.add(content3); |
| | | } |
| | | //if ((InspectionStatus.COMPLETE.name().equals(inspectionStatus))) { |
| | | // TemplateCardEntity.HorizontalContent content3 = new TemplateCardEntity.HorizontalContent(); |
| | | // TemplateCardEntity.HorizontalContent content4 = new TemplateCardEntity.HorizontalContent(); |
| | | // content3.setKeyname("确认人"); |
| | | // SysUser sysUser = sysUserService.getUserByName(eamInspectionOrder.getCreateBy()); |
| | | // content3.setValue(sysUser.getRealname()); |
| | | // horizontalContentList.add(content3); |
| | | // content4.setKeyname("确认意见"); |
| | | // content4.setValue("通过"); |
| | | // horizontalContentList.add(content4); |
| | | //} |
| | | |
| | | templateCardEntity.setHorizontal_content_list(horizontalContentList); |
| | | |
| | | TemplateCardEntity.CardAction cardAction = new TemplateCardEntity.CardAction(); |
| | | cardAction.setType(1); |
| | | cardAction.setUrl(cardActionUrl); |
| | | templateCardEntity.setCard_action(cardAction); |
| | | |
| | | wechatEnterpriseService.sendTemplateCardMsg(templateCard, true); |
| | | } |
| | | |
| | | /** |
| | |
| | | eamInspectionOrder.setEquipmentCode(equipment.getEquipmentCode()); |
| | | } |
| | | System.out.println("设备点检:" + eamInspectionOrder.getId()); |
| | | flowCommonService.initActBusiness("工单号:" + eamInspectionOrder.getOrderNum() + "设备编号" + eamInspectionOrder.getEquipmentCode() + "进行设备点检", |
| | | flowCommonService.initActBusiness("工单号: " + eamInspectionOrder.getOrderNum() + ";设备编号: " + eamInspectionOrder.getEquipmentCode() + ";安装位置: " + equipment.getInstallationPosition(), |
| | | eamInspectionOrder.getId(), "IEamInspectionOrderService", "eam_inspection", null); |
| | | Map<String, Object> variables = new HashMap<>(); |
| | | variables.put("dataId", eamInspectionOrder.getId()); |
| | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public boolean editInspectionOrder(EamInspectionOrderRequest eamInspectionOrderRequest) { |
| | | EamInspectionOrder eamInspectionOrder = new EamInspectionOrder(); |
| | | BeanUtils.copyProperties(eamInspectionOrderRequest, eamInspectionOrder); |
| | | if (StrUtil.isNotEmpty(eamInspectionOrder.getOperator())) { |
| | | eamInspectionOrder.setInspectionStatus(InspectionStatus.UNDER_INSPECTION.name()); |
| | | triggerProcess(eamInspectionOrder); |
| | | //更新设备保养状态 |
| | | eamEquipmentExtendService.updateEquipmentInspectionStatus(eamInspectionOrder.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_INSPECTION.name()); |
| | | } |
| | | super.updateById(eamInspectionOrder); |
| | | //处理明细数据 |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean takeInspectionOrder(String id) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | if(user == null || !BusinessCodeConst.PCR0001.equals(user.getPost())) { |
| | | throw new JeecgBootException("不是操作工,无法领取此工单!"); |
| | | } |
| | | EamInspectionOrder eamInspectionOrder = this.getById(id); |
| | | if (eamInspectionOrder == null) { |
| | | return false; |
| | |
| | | eamInspectionOrder.setInspectionStatus(InspectionStatus.UNDER_INSPECTION.name()); |
| | | this.triggerProcess(eamInspectionOrder); |
| | | this.updateById(eamInspectionOrder); |
| | | //更新设备保养状态 |
| | | eamEquipmentExtendService.updateEquipmentInspectionStatus(eamInspectionOrder.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_INSPECTION.name()); |
| | | //推送企业微信消息 |
| | | sendQywxTemplateCardMessage(eamInspectionOrder, null); |
| | | return true; |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result<?> inspectionProcess(EamInspectionOrderRequest eamInspectionOrderRequest) { |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @EquipmentHistoryLog(operationTag = EquipmentOperationTagEnum.POINT_INSPECTION, businessTable = "eam_inspection_order") |
| | | public EamInspectionOrder inspectionProcess(EamInspectionOrderRequest eamInspectionOrderRequest) { |
| | | try { |
| | | // 检查请求参数 |
| | | if (!isValidRequest(eamInspectionOrderRequest)) { |
| | | return Result.error("非法参数"); |
| | | throw new JeecgBootException("非法参数"); |
| | | } |
| | | |
| | | // 获取当前登录用户 |
| | | LoginUser user = getCurrentUser(); |
| | | if (user == null || StrUtil.isBlank(user.getId())) { |
| | | return Result.error("账号不存在"); |
| | | throw new JeecgBootException("账号不存在"); |
| | | } |
| | | eamInspectionOrderRequest.setAssignee(user.getUsername()); |
| | | |
| | | // 获取点检工单信息 |
| | | EamInspectionOrder eamInspectionOrder = getEamInspectionOrder(eamInspectionOrderRequest.getDataId()); |
| | | if (eamInspectionOrder == null) { |
| | | return Result.error("未找到对应数据"); |
| | | throw new JeecgBootException("未找到对应数据"); |
| | | } |
| | | |
| | | // 获取流程业务记录 |
| | | FlowMyBusiness flowMyBusiness = getFlowMyBusiness(eamInspectionOrderRequest.getInstanceId()); |
| | | if (flowMyBusiness == null) { |
| | | return Result.error("流程记录不存在"); |
| | | throw new JeecgBootException("流程记录不存在"); |
| | | } |
| | | |
| | | // 检查用户是否有权限操作任务 |
| | | if (!isUserAuthorized(flowMyBusiness, user)) { |
| | | return Result.error("用户无权操作此任务"); |
| | | throw new JeecgBootException("用户无权操作此任务"); |
| | | } |
| | | |
| | | // 认领任务 |
| | | if (!claimTask(flowMyBusiness.getTaskId(), user)) { |
| | | return Result.error("任务不存在、已完成或已被他人认领"); |
| | | throw new JeecgBootException("任务不存在、已完成或已被他人认领"); |
| | | } |
| | | |
| | | // 设置流程变量 |
| | |
| | | // 更新工单信息 |
| | | updateEamInspectionOrder(eamInspectionOrder); |
| | | |
| | | //微信消息推送(工单完成不推送) |
| | | if (!InspectionStatus.COMPLETE.name().equals(eamInspectionOrder.getInspectionStatus())) { |
| | | sendQywxTemplateCardMessage(eamInspectionOrder, eamInspectionOrderRequest); |
| | | } |
| | | |
| | | //查询数据,进行设备维修处理 |
| | | if (eamInspectionOrder.getInspectionStatus().equals(InspectionStatus.WAIT_CONFIRM.name())) { |
| | | updateEamInspectionOrderDetail(eamInspectionOrder); |
| | | } |
| | | |
| | | return Result.OK("操作成功"); |
| | | return eamInspectionOrder; |
| | | } catch (Exception e) { |
| | | return Result.error("操作失败:" + e.getMessage()); |
| | | throw new JeecgBootException("操作失败:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | eamInspectionOrderDetailService.remove(new QueryWrapper<EamInspectionOrderDetail>().eq("order_id", order.getId())); |
| | | eamInspectionOrderDetailService.saveBatch(request.getTableDetailList()); |
| | | //更新设备保养状态 |
| | | eamEquipmentExtendService.updateEquipmentInspectionStatus(order.getEquipmentId(), EquipmentMaintenanceStatus.INSPECTION_CONFIRM.name()); |
| | | } else if (InspectionStatus.WAIT_CONFIRM.name().equals(order.getInspectionStatus()) && StrUtil.isNotEmpty(request.getConfirmDealType())) { |
| | | // 班组长确认任务 |
| | | order.setInspectionStatus(InspectionStatus.COMPLETE.name()); |
| | |
| | | order.setConfirmComment(request.getConfirmComment()); |
| | | order.setConfirmDealType(request.getConfirmDealType()); |
| | | order.setConfirmTime(new Date()); |
| | | //更新设备保养状态 |
| | | eamEquipmentExtendService.updateEquipmentInspectionStatus(order.getEquipmentId(), EquipmentMaintenanceStatus.NORMAL.name()); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (InspectionStatus.UNDER_INSPECTION.name().equals(type)) { |
| | | eamInspectionOrder.setOperator(loginUser.getUsername()); |
| | | this.triggerProcess(eamInspectionOrder); |
| | | //更新设备保养状态 |
| | | eamEquipmentExtendService.updateEquipmentInspectionStatus(eamInspectionOrder.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_INSPECTION.name()); |
| | | } else { |
| | | eamInspectionOrder.setOperator(null); |
| | | } |