| | |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.exception.JeecgBootException; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.system.entity.BaseFactory; |
| | | import org.jeecg.modules.system.entity.BaseFactoryUser; |
| | | import org.jeecg.modules.system.entity.SysParams; |
| | | import org.jeecg.modules.system.service.*; |
| | | import org.jeecg.modules.eam.constant.BusinessCodeConst; |
| | | import org.jeecg.modules.eam.constant.EamMaintenanceStandardDetailCategory; |
| | | import org.jeecg.modules.eam.constant.MaintenanceStandardStatusEnum; |
| | |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | | import org.jeecg.modules.eam.service.IEamMaintenanceStandardDetailService; |
| | | import org.jeecg.modules.eam.service.IEamMaintenanceStandardService; |
| | | import org.jeecg.modules.eam.vo.*; |
| | | import org.jeecg.modules.eam.vo.EamMaintenanceStandardVo; |
| | | import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness; |
| | | import org.jeecg.modules.flowable.apithird.business.service.IFlowMyBusinessService; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCommonService; |
| | | import org.jeecg.modules.flowable.service.IFlowDefinitionService; |
| | | import org.jeecg.modules.flowable.service.IFlowTaskService; |
| | | import org.jeecg.modules.system.entity.BaseFactory; |
| | | import org.jeecg.modules.system.entity.BaseFactoryUser; |
| | | import org.jeecg.modules.system.entity.SysParams; |
| | | import org.jeecg.modules.system.service.*; |
| | | import org.jeecg.modules.system.vo.UserSelector; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | /** |
| | | * 查询标准列表-前端展示该用户拥有的标准 |
| | | * |
| | | * @param keyword 设备编号 |
| | | * @param maintenanceCategory 保养类型 |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 流程启动,保存对应的数据 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | FlowMyBusiness flowMyBusiness = businessList.get(0); |
| | | EamEquipment eamEquipment=eamEquipmentService.getById(maintenanceStandard.getEquipmentId()); |
| | | BaseFactory baseFactory=baseFactoryService.getOne(new QueryWrapper<BaseFactory>().eq("org_code", eamEquipment.getFactoryOrgCode())); |
| | | List<UserSelector> userSelectorList=sysUserService.selectOperatorFactoryList(eamEquipment.getEquipmentCode(),baseFactory.getId(), BusinessCodeConst.PCR0008); |
| | | List<UserSelector> userSelectorList = sysUserService.selectOperatorList(eamEquipment.getEquipmentCode(), eamEquipment.getFactoryOrgCode(), BusinessCodeConst.PCR0008); |
| | | if (!CollectionUtils.isEmpty(userSelectorList)) { |
| | | List<String> usernameList=userSelectorList.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | flowMyBusiness.setTodoUsers(JSON.toJSONString(usernameList)); |
| | |
| | | |
| | | /** |
| | | * 审批操作 |
| | | * |
| | | * @param eamMaintenanceStandardVo |
| | | * @return |
| | | */ |
| | |
| | | //获取flow的流程实例id,设置下一步的处理人员 |
| | | EamMaintenanceStandard maintenanceStandard=this.getById(eamMaintenanceStandardVo.getDataId()); |
| | | EamEquipment eamEquipment=eamEquipmentService.getById(maintenanceStandard.getEquipmentId()); |
| | | BaseFactory baseFactory=baseFactoryService.getOne(new QueryWrapper<BaseFactory>().eq("org_code", eamEquipment.getFactoryOrgCode())); |
| | | List<UserSelector> userSelectorList=sysUserService.selectOperatorFactoryList(eamEquipment.getEquipmentCode(),baseFactory.getId(), BusinessCodeConst.PCR0009); |
| | | List<UserSelector> userSelectorList = sysUserService.selectOperatorList(eamEquipment.getEquipmentCode(), eamEquipment.getFactoryOrgCode(), BusinessCodeConst.PCR0009); |
| | | if (!CollectionUtils.isEmpty(userSelectorList)) { |
| | | List<String> usernameList=userSelectorList.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | newflowMyBusiness.setTodoUsers(JSON.toJSONString(usernameList)); |
| | |
| | | |
| | | |
| | | /*导入点检文件Excel--------------------------开始*/ |
| | | |
| | | /** |
| | | * 点检表导入入口 |
| | | */ |
| | |
| | | if (cellValue == null) return ""; |
| | | |
| | | switch (cellValue.getCellType()) { |
| | | case STRING: return cellValue.getStringValue(); |
| | | case NUMERIC: return String.valueOf((int) cellValue.getNumberValue()); |
| | | case BOOLEAN: return String.valueOf(cellValue.getBooleanValue()); |
| | | default: return ""; |
| | | case STRING: |
| | | return cellValue.getStringValue(); |
| | | case NUMERIC: |
| | | return String.valueOf((int) cellValue.getNumberValue()); |
| | | case BOOLEAN: |
| | | return String.valueOf(cellValue.getBooleanValue()); |
| | | default: |
| | | return ""; |
| | | } |
| | | } catch (Exception e) { |
| | | return ""; |
| | |
| | | |
| | | /** |
| | | * 统一保养规范导入入口 |
| | | * |
| | | * @param file 上传文件 |
| | | * @param type 保养类型 (SECOND/THIRD) |
| | | * @return 导入结果(包含成功/失败信息) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 提取二级保养项目(区分第一页和后续页面) |
| | | */ |