| | |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.service.*; |
| | | import org.jeecg.modules.eam.vo.CalibrationOrderPage; |
| | | import org.jeecg.modules.eam.vo.SysFileNameVo; |
| | | import org.jeecg.modules.system.entity.SysDepart; |
| | | import org.jeecg.modules.system.service.ISysDepartService; |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | |
| | | |
| | | @Autowired |
| | | private IPrecisionParametersTemplateDetailService precisionParametersTemplateDetailService; |
| | | |
| | | @Autowired |
| | | private ITechnologyStatusService technologyStatusService; |
| | | |
| | | @Autowired |
| | | private ISysFileNameService sysFileNameService; |
| | | |
| | | @Autowired |
| | | private ISysDepartService sysDepartService; |
| | | // @Autowired |
| | | // private IUploadRelaService uploadRelaService; |
| | | // @Autowired |
| | |
| | | String managementMode = record.getManagementMode(); |
| | | String equipmentId = record.getEquipmentId(); |
| | | Equipment equipment = equipmentService.getById(equipmentId); |
| | | String useId = equipment.getUseId(); |
| | | SysDepart depart = sysDepartService.getById(useId); |
| | | if(equipment != null){ |
| | | record.setEquipmentNum(equipment.getNum()); |
| | | record.setEquipmentName(equipment.getName()); |
| | | record.setEquipmentModel(equipment.getModel()); |
| | | record.setEquipmentSpecification(equipment.getSpecification()); |
| | | record.setEquipmentImportance(equipment.getEquipmentImportanceId()); |
| | | record.setUseDepartName(depart.getDepartName()); |
| | | } |
| | | // List<Map<String, Object>> precisionParameterList = calibrationOrderService.getPrecisionParameterList(equipmentId); |
| | | // record.setPrecisionParameterList(precisionParameterList); |
| | |
| | | for (CalibrationOrderDetail calibrationOrderDetail : calibrationOrderDetails) { |
| | | calibrationOrderDetailService.removeById(calibrationOrderDetail); |
| | | } |
| | | addAndEdit(calibrationOrder); |
| | | // addAndEdit(calibrationOrder); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | |
| | | public Result<String> addNew(@RequestBody CalibrationOrder calibrationOrder) { |
| | | calibrationOrder.setStatus("1"); |
| | | calibrationOrderService.save(calibrationOrder); |
| | | addAndEdit(calibrationOrder); |
| | | |
| | | String equipmentId = calibrationOrder.getEquipmentId(); |
| | | Equipment equipment = equipmentService.getById(equipmentId); |
| | | String equipmentImportance = equipment.getEquipmentImportanceId(); |
| | | if("D".equals(equipmentImportance)){ |
| | | this.createTechnologyStatus(calibrationOrder); |
| | | } |
| | | |
| | | // addAndEdit(calibrationOrder); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | void createTechnologyStatus(CalibrationOrder calibrationOrder){ |
| | | List<SysFileNameVo> sysFileName = sysFileNameService.getSysFileName("9"); |
| | | TechnologyStatus technologyStatus = new TechnologyStatus(); |
| | | technologyStatus.setOrderId(calibrationOrder.getId()); |
| | | technologyStatus.setReceipts(sysFileName.get(0).getReceipts()); |
| | | technologyStatusService.save(technologyStatus); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ£å®å·¥å å建æ¶éè¿è®¾å¤è·å设å¤ç²¾åº¦åæ° |
| | | * qsw 2023-7-18 |
| | |
| | | public Result<String> add(@RequestBody DailyInspectionStandard dailyInspectionStandard) { |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | dailyInspectionStandard.setWritePerson(sysUser.getRealname()); |
| | | dailyInspectionStandard.setAssignMode("1"); |
| | | dailyInspectionStandardService.save(dailyInspectionStandard); |
| | | List<DailyInspectionStandardDetail> dailyInspectionStandardDetaillist = dailyInspectionStandard.getDailyInspectionStandardDetaillist(); |
| | | DailyInspectionStandardDetail isd = null; |
| | |
| | | return Result.error("å®¡æ ¸å¤±è´¥!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¹é ç¾å®¡æµç¨ |
| | | * qsw 2023-12-12 |
| | | */ |
| | | @RequestMapping(value = "/auditApprovalBatch", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | @Transactional(rollbackFor = { Exception.class }) |
| | | public Result<String> auditApprovalBatch(@RequestBody DailyInspectionStandard dailyInspectionStandard) { |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | List<DailyInspectionStandard> dailyInspectionStandardlist = dailyInspectionStandard.getDailyInspectionStandardlist(); |
| | | for (DailyInspectionStandard inspectionStandard : dailyInspectionStandardlist) { |
| | | String approvalStatus = inspectionStandard.getApprovalStatus(); |
| | | if("5".equals(approvalStatus)){//å®¡æ ¸éè¿åï¼çæ¬çæ |
| | | List<DailyInspectionStandard> dailyInspectionStandards = dailyInspectionStandardService.lambdaQuery() |
| | | .eq(DailyInspectionStandard::getNum, inspectionStandard.getNum()) |
| | | .eq(DailyInspectionStandard::getVersionStatus, "2").list(); |
| | | for (DailyInspectionStandard standard : dailyInspectionStandards) { |
| | | standard.setVersionStatus("3"); |
| | | standard.setLoseEfficacyTime(new Date()); |
| | | standard.setLoseEfficacyPerson(sysUser.getRealname()); |
| | | dailyInspectionStandardService.updateById(standard); |
| | | } |
| | | inspectionStandard.setApprovalPerson(sysUser.getRealname()); |
| | | inspectionStandard.setVersionStatus("2"); |
| | | inspectionStandard.setTakeEffectTime(new Date()); |
| | | }else if("3".equals(approvalStatus)){ |
| | | inspectionStandard.setAuditPerson(sysUser.getRealname()); |
| | | } |
| | | boolean b = dailyInspectionStandardService.updateById(inspectionStandard); |
| | | if (!b){ |
| | | return Result.error("å®¡æ ¸å¤±è´¥!"); |
| | | } |
| | | } |
| | | return Result.OK("å®¡æ ¸æå!"); |
| | | } |
| | | } |
| | |
| | | private IMaintenanceStoveExemptService maintenanceStoveExemptService; |
| | | |
| | | @Autowired |
| | | private ITechnologyStatusService technologyStatusService; |
| | | |
| | | @Autowired |
| | | private ISysFileNameService sysFileNameService; |
| | | |
| | | @Resource |
| | |
| | | maintenanceStoveExemptService.removeById(maintenanceStoveExempt); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç²¾åº¦æ£éªå |
| | | */ |
| | | List<TechnologyStatus> technologyStatusList = technologyStatusService.lambdaQuery() |
| | | .eq(TechnologyStatus::getOrderId, id) |
| | | .eq(TechnologyStatus::getDelFlag, 0).list(); |
| | | for (TechnologyStatus technologyStatus : technologyStatusList) { |
| | | technologyStatusService.removeById(technologyStatus); |
| | | } |
| | | |
| | | if (b) { |
| | | return Result.OK("æ¤éæå!"); |
| | | } else { |
| | |
| | | finishTransferOrder.setDelFlag(0); |
| | | finishTransferOrderService.save(finishTransferOrder); |
| | | |
| | | String equipmentId = maintenanceOrder.getEquipmentId(); |
| | | Equipment equipment = equipmentService.getById(equipmentId); |
| | | String precisionParameters = equipment.getPrecisionParameters(); |
| | | if(!"1".equals(precisionParameters)){ |
| | | this.createTechnologyStatus(maintenanceOrder); |
| | | } |
| | | |
| | | this.createPrecisionInspection(maintenanceOrder); |
| | | |
| | | this.createMaintenanceStoveExempt(maintenanceOrder); |
| | |
| | | maintenanceStoveExemptService.save(maintenanceStoveExempt); |
| | | } |
| | | |
| | | void createTechnologyStatus(DailyMaintenanceOrder dailyMaintenanceOrder){ |
| | | List<SysFileNameVo> sysFileName = sysFileNameService.getSysFileName("9"); |
| | | TechnologyStatus technologyStatus = new TechnologyStatus(); |
| | | technologyStatus.setOrderId(dailyMaintenanceOrder.getId()); |
| | | technologyStatus.setReceipts(sysFileName.get(0).getReceipts()); |
| | | technologyStatusService.save(technologyStatus); |
| | | } |
| | | |
| | | /** |
| | | * æ¥å¸¸ä¿å
»å·¥å è·å设å¤å°ç«å·²ç»å®ç对象é¨é¨ |
| | | * qsw 2023-7-11 |
| | |
| | | // exceptionNum++; |
| | | // } |
| | | else{ |
| | | SysDepart use = departService.getOne(new QueryWrapper<SysDepart>().eq("depart_name",useId.trim()),false); |
| | | SysDepart use = departService.getOne(new QueryWrapper<SysDepart>().eq("depart_name",useId.trim()).eq("del_flag",0),false); |
| | | if(ObjectUtils.isNotNull(use)){ |
| | | equipment.setUseId(use.getId()); |
| | | }else { |
| | |
| | | exceptionNum++; |
| | | continue; |
| | | } |
| | | Area area = areaService.getOne(new QueryWrapper<Area>().eq("name",areaId.trim())); |
| | | Area area1 = areaService.getOne(new QueryWrapper<Area>().eq("num",areaId.trim())); |
| | | Area area = areaService.getOne(new QueryWrapper<Area>().eq("name",areaId.trim()).eq("del_flag",0)); |
| | | Area area1 = areaService.getOne(new QueryWrapper<Area>().eq("num",areaId.trim()).eq("del_flag",0)); |
| | | if(ObjectUtils.isNotNull(area)){ |
| | | equipment.setFactoryModelId(area.getId()); |
| | | }else if(ObjectUtils.isNotNull(area1)) { |
| | |
| | | exceptionNum++; |
| | | continue; |
| | | } |
| | | SysDepart manage = departService.getOne(new QueryWrapper<SysDepart>().eq("depart_name",manageId.trim())); |
| | | SysDepart manage = departService.getOne(new QueryWrapper<SysDepart>().eq("depart_name",manageId.trim()).eq("del_flag",0)); |
| | | if(ObjectUtils.isNotNull(manage)){ |
| | | equipment.setManageId(manage.getId()); |
| | | }else{ |
| | |
| | | exceptionNum++; |
| | | continue; |
| | | } |
| | | EquipmentCategory equipmentCategory = equipmentCategoryService.getOne(new QueryWrapper<EquipmentCategory>().eq("name",equipmentCategoryName.trim()),false); |
| | | EquipmentCategory equipmentCategory = equipmentCategoryService |
| | | .getOne(new QueryWrapper<EquipmentCategory>() |
| | | .eq("name",equipmentCategoryName.trim()).eq("del_flag",0),false); |
| | | if(ObjectUtils.isNotNull(equipmentCategory)){ |
| | | equipment.setEquipmentCategoryId(equipmentCategory.getId()); |
| | | } |
| | |
| | | exceptionNum++; |
| | | continue; |
| | | } |
| | | Team team = teamService.getOne(new QueryWrapper<Team>().eq("name",teamId.trim()),false); |
| | | Team team1 = teamService.getOne(new QueryWrapper<Team>().eq("num",teamId.trim()),false); |
| | | Team team = teamService.getOne(new QueryWrapper<Team>().eq("name",teamId.trim()).eq("del_flag",0),false); |
| | | Team team1 = teamService.getOne(new QueryWrapper<Team>().eq("num",teamId.trim()).eq("del_flag",0),false); |
| | | if(ObjectUtils.isNotNull(team)){ |
| | | equipment.setTeamId(team.getId()); |
| | | }else if(ObjectUtils.isNotNull(team1)) { |
| | |
| | | }else{ |
| | | Equipment oriEquipment = equipmentService |
| | | .getOne(new QueryWrapper<Equipment>() |
| | | .eq("num",equipmentImportVo.getNum()),false); |
| | | .eq("num",equipmentImportVo.getNum()).eq("del_flag",0),false); |
| | | if(ObjectUtils.isNull(oriEquipment)){ |
| | | equipment.setNum(equipmentImportVo.getNum()) |
| | | .setName(equipmentImportVo.getName()) |
| | |
| | | .setPropertyStatus(equipmentImportVo.getPropertyStatus()) |
| | | .setWarrantyStart(equipmentImportVo.getWarrantyStart()) |
| | | .setWarrantyEnd(equipmentImportVo.getWarrantyEnd()) |
| | | .setIsLineEquip("no") |
| | | .setIsLine("no") |
| | | .setNextTechnologyStatusQualificationTime(equipmentImportVo.getNextTechnologyStatusQualificationTime()) |
| | | .setGpo(equipmentImportVo.getGpo()); |
| | | if(equipmentCategory.getEquipmentCategoryUda1().equals("weldingMachine")){ |
| | |
| | | HttpServletRequest req) { |
| | | QueryWrapper<DailyInspectionStandardDetail> queryWrapper = QueryGenerator.initQueryWrapper(standardDetail, req.getParameterMap()); |
| | | Page<DailyInspectionStandardDetail> page = new Page<DailyInspectionStandardDetail>(pageNo, pageSize); |
| | | IPage<DailyInspectionStandardDetail> pageList = equipmentService.getStandardList(page,standardDetail.getEquipmentId()); |
| | | IPage<DailyInspectionStandardDetail> pageList = equipmentService.getStandardList(page,standardDetail.getEquipmentId(),standardDetail.getType()); |
| | | return Result.OK(pageList); |
| | | } |
| | | @PostMapping("addLine") |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Result<?> addLine(@RequestBody Equipment equipment){ |
| | | equipment.setIsLineEquip("no"); |
| | | equipment.setIsLine("yes"); |
| | | equipmentService.save(equipment); |
| | | List<Equipment> equipmentList = equipment.getEquipmentOfLineTable(); |
| | | for(Equipment equipment1:equipmentList){ |
| | | equipment1.setId(equipment1.getShowId()); |
| | | equipment1.setIsLineEquip("yes"); |
| | | equipment1.setLineId(equipment.getId()); |
| | | } |
| | | equipmentService.updateBatchById(equipmentList); |
| | |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Result<?> editLine(@RequestBody Equipment equipment){ |
| | | equipmentService.updateById(equipment); |
| | | equipmentService.update(new UpdateWrapper<Equipment>().eq("line_id",equipment.getId()).set("line_id",null).set("is_meta",null)); |
| | | equipmentService.update(new UpdateWrapper<Equipment>() |
| | | .eq("line_id",equipment.getId()) |
| | | .set("line_id",null) |
| | | .set("is_meta",null) |
| | | .set("is_line_equip","no")); |
| | | List<Equipment> equipmentList = equipment.getEquipmentOfLineTable(); |
| | | for(Equipment equipment1:equipmentList){ |
| | | equipment1.setLineId(equipment.getId()); |
| | | String id = equipment1.getId(); |
| | | if(StringUtils.isBlank(id)){ |
| | | equipment1.setId(equipment1.getShowId()); |
| | | } |
| | | equipment1.setIsLineEquip("yes"); |
| | | } |
| | | equipmentService.updateBatchById(equipmentList); |
| | | return Result.OK("ç¼è¾æå"); |
| | |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.eam.entity.Equipment; |
| | | import org.jeecg.modules.eam.entity.EquipmentReportRepair; |
| | | import org.jeecg.modules.eam.entity.FaultDescription; |
| | | import org.jeecg.modules.eam.entity.QuanlityConfirm; |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.service.*; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Autowired |
| | | @Lazy |
| | | private IdentityService sysIdentityService; |
| | | @Autowired |
| | | private IFaultInfoService faultInfoService; |
| | | |
| | | |
| | | /** |
| | |
| | | quanlityConfirm.setQuantity(equipmentReportRepair.getQuantity()); |
| | | quanlityConfirm.setOperator(curUser.getId()); |
| | | quanlityConfirmService.save(quanlityConfirm); |
| | | String fNum = sysIdentityService.getNumByTypeAndLength("FaultInfo",4); |
| | | FaultInfo faultInfo = new FaultInfo(); |
| | | faultInfo.setNum(fNum); |
| | | faultInfo.setQuanlityId(quanlityConfirm.getId()); |
| | | faultInfo.setOperater(quanlityConfirm.getOperator()); |
| | | faultInfo.setIsConfirm(IS_PRODUCT_NO); |
| | | String eId = equipmentReportRepair.getEquipmentId(); |
| | | Equipment equipment = equipmentService.getById(eId); |
| | | faultInfo.setEquipModel(equipment.getModel()); |
| | | faultInfo.setEquipName(equipment.getName()); |
| | | faultInfo.setEquipNum(equipment.getNum()); |
| | | faultInfoService.save(faultInfo); |
| | | |
| | | } |
| | | Equipment equipment = equipmentService.getById(equipmentReportRepair.getEquipmentId()); |
| | | equipment.setEquipmentStatus("2"); |
| | |
| | | IPage<Map<String, Object>> equipmentReportRepairList = equipmentReportRepairService.getReportRepairList(pageNo, pageSize, params); |
| | | return Result.ok(equipmentReportRepairList); |
| | | } |
| | | |
| | | @PutMapping("/accept") |
| | | public Result<?> accept(@RequestBody EquipmentReportRepair equipmentReportRepair ){ |
| | | if(equipmentReportRepair.getErrUda1().equals("yes")){ |
| | | QuanlityConfirm quanlityConfirm = quanlityConfirmService.getOne(new QueryWrapper<QuanlityConfirm>().eq("report_id",equipmentReportRepair.getId()),false); |
| | | if(ObjectUtils.isNotNull(quanlityConfirm)){ |
| | | String isConfirm1 = quanlityConfirm.getIsConfirm(); |
| | | FaultInfo faultInfo = faultInfoService.getOne(new QueryWrapper<FaultInfo>().eq("quanlity_id",quanlityConfirm.getId()),false); |
| | | if(ObjectUtils.isNotNull(faultInfo)){ |
| | | String isConfirm2 = faultInfo.getIsConfirm(); |
| | | if(!isConfirm1.equals("yes")||isConfirm2.equals("yes")){ |
| | | return Result.error("éªæ¶å¤±è´¥ï¼äº§åè´¨ééæ£ç¡®è®¤åäºæ
ç»è®°å°æªå®åºï¼è¯·å®æç¡®è®¤ååè¿è¡éªæ¶"); |
| | | } |
| | | }else { |
| | | return Result.error("éªæ¶å¤±è´¥ï¼æªçæäºæ
ç»è®°å"); |
| | | } |
| | | }else { |
| | | return Result.error("éªæ¶å¤±è´¥ï¼æªçæäº§å¹³è´¨é确认"); |
| | | } |
| | | } |
| | | LoginUser user= (LoginUser)SecurityUtils.getSubject().getPrincipal(); |
| | | equipmentReportRepair.setStatus("5"); |
| | | equipmentReportRepair.setAcceptTime(new Date()); |
| | | Date start = equipmentReportRepair.getFaultTime(); |
| | | Date end = equipmentReportRepair.getAcceptTime(); |
| | | if(ObjectUtils.isNotNull(start)){ |
| | | long timeDifference =end.getTime() - start.getTime(); |
| | | BigDecimal hours = new BigDecimal(timeDifference) |
| | | .divide(new BigDecimal(60 * 60 * 1000), 3, BigDecimal.ROUND_HALF_EVEN); |
| | | equipmentReportRepair.setFaultHour(hours); |
| | | } |
| | | equipmentReportRepairService.updateById(equipmentReportRepair); |
| | | String equipmentId = equipmentReportRepair.getEquipmentId(); |
| | | if(StringUtils.isNotBlank(equipmentId)){ |
| | | Equipment equipment = equipmentService.getById(equipmentId); |
| | | equipment.setEquipmentStatus("1"); |
| | | equipmentService.updateById(equipment); |
| | | } |
| | | return Result.OK("éªæ¶æå"); |
| | | } |
| | | } |
| | |
| | | //import org.jeecg.modules.system.entity.SysUploadRela; |
| | | //import org.jeecg.modules.system.service.IUploadRelaService; |
| | | //import org.jeecg.modules.system.service.IUploadService; |
| | | import org.jeecg.modules.eam.vo.SysFileNameVo; |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | |
| | | @Autowired |
| | | @Lazy |
| | | private IdentityService sysIdentityService; |
| | | |
| | | @Autowired |
| | | @Lazy |
| | | private IEamEquipmentService equipmentService; |
| | | |
| | | @Autowired |
| | | @Lazy |
| | | private IDailyInspectionStandardService dailyInspectionStandardService; |
| | | |
| | | // @Autowired |
| | | // private IUploadRelaService uploadRelaService; |
| | |
| | | inspectionOrder.setInspectionDeadline(date); |
| | | inspectionOrder.setInspectionStandardType("1"); |
| | | inspectionOrderService.save(inspectionOrder); |
| | | List<InspectionOrderDetail> inspectionOrderDetailList = inspectionOrder.getInspectionOrderDetailList(); |
| | | for (InspectionOrderDetail inspectionOrderDetail : inspectionOrderDetailList) { |
| | | String id = inspectionOrder.getId(); |
| | | String inspectionStandardDetailId = inspectionOrderDetail.getInspectionStandardDetailId(); |
| | | String inspectionProjectId = inspectionOrderDetail.getInspectionProjectId(); |
| | | |
| | | DailyInspectionStandardDetail dailyInspectionStandardDetail = dailyInspectionStandardDetailService.getById(inspectionStandardDetailId); |
| | | InspectionProject inspectionProject = inspectionProjectService.getById(inspectionProjectId); |
| | | String equipmentId = inspectionOrder.getEquipmentId(); |
| | | Equipment equipment = equipmentService.getById(equipmentId); |
| | | String isLineEquip = equipment.getIsLineEquip(); |
| | | if("no".equals(isLineEquip)){ |
| | | List<InspectionOrderDetail> inspectionOrderDetailList = inspectionOrder.getInspectionOrderDetailList(); |
| | | for (InspectionOrderDetail inspectionOrderDetail : inspectionOrderDetailList) { |
| | | String id = inspectionOrder.getId(); |
| | | String inspectionStandardDetailId = inspectionOrderDetail.getInspectionStandardDetailId(); |
| | | String inspectionProjectId = inspectionOrderDetail.getInspectionProjectId(); |
| | | |
| | | inspectionOrderDetail.setId(""); |
| | | inspectionOrderDetail.setInspectionOrderId(id); |
| | | inspectionOrderDetail.setLocation(dailyInspectionStandardDetail.getLocation()); |
| | | inspectionOrderDetail.setPhoto(dailyInspectionStandardDetail.getPhoto()); |
| | | inspectionOrderDetail.setInspectionMethod(inspectionProject.getInspectionMethod()); |
| | | inspectionOrderDetail.setInspectionTool(inspectionProject.getInspectionTool()); |
| | | inspectionOrderDetail.setAnalysisMethod(inspectionProject.getAnalysisMethod()); |
| | | inspectionOrderDetail.setTestValueType(inspectionProject.getTestValueType()); |
| | | inspectionOrderDetail.setDetectionStandard(inspectionProject.getDetectionStandard()); |
| | | inspectionOrderDetail.setAcceptabilityLimit(inspectionProject.getAcceptabilityLimit()); |
| | | DailyInspectionStandardDetail dailyInspectionStandardDetail = dailyInspectionStandardDetailService.getById(inspectionStandardDetailId); |
| | | InspectionProject inspectionProject = inspectionProjectService.getById(inspectionProjectId); |
| | | |
| | | inspectionOrderDetailService.save(inspectionOrderDetail); |
| | | inspectionOrderDetail.setId(""); |
| | | inspectionOrderDetail.setInspectionOrderId(id); |
| | | inspectionOrderDetail.setLocation(dailyInspectionStandardDetail.getLocation()); |
| | | inspectionOrderDetail.setPhoto(dailyInspectionStandardDetail.getPhoto()); |
| | | inspectionOrderDetail.setInspectionMethod(inspectionProject.getInspectionMethod()); |
| | | inspectionOrderDetail.setInspectionTool(inspectionProject.getInspectionTool()); |
| | | inspectionOrderDetail.setAnalysisMethod(inspectionProject.getAnalysisMethod()); |
| | | inspectionOrderDetail.setTestValueType(inspectionProject.getTestValueType()); |
| | | inspectionOrderDetail.setDetectionStandard(inspectionProject.getDetectionStandard()); |
| | | inspectionOrderDetail.setAcceptabilityLimit(inspectionProject.getAcceptabilityLimit()); |
| | | |
| | | inspectionOrderDetailService.save(inspectionOrderDetail); |
| | | } |
| | | }else{ |
| | | String lineId = equipment.getLineId(); |
| | | List<DailyInspectionStandard> dailyInspectionStandards = dailyInspectionStandardService.lambdaQuery() |
| | | .eq(DailyInspectionStandard::getEquipmentId, lineId) |
| | | .eq(DailyInspectionStandard::getVersionStatus, "2") |
| | | .eq(DailyInspectionStandard::getDelFlag, "0").list(); |
| | | if(dailyInspectionStandards.size()>0) { |
| | | DailyInspectionStandard dailyInspectionStandard = dailyInspectionStandards.get(0); |
| | | //ä¿åç¹æ£å·¥ååè¡¨æ°æ® |
| | | List<DailyInspectionStandardDetail> dailyInspectionStandardDetailList = dailyInspectionStandardDetailService.lambdaQuery() |
| | | .eq(DailyInspectionStandardDetail::getDailyInspectionStandardId,dailyInspectionStandard.getId()) |
| | | .eq(DailyInspectionStandardDetail::getInspectionCycleId,inspectionOrder.getInspectionCycleId()) |
| | | .eq(DailyInspectionStandardDetail::getDelFlag,"0").list(); |
| | | for(DailyInspectionStandardDetail dailyInspectionStandardDetail : dailyInspectionStandardDetailList){ |
| | | String inspectionProjectId = dailyInspectionStandardDetail.getInspectionProjectId(); |
| | | |
| | | InspectionOrderDetail inspectionOrderDetail = new InspectionOrderDetail(); |
| | | inspectionOrderDetail.setInspectionOrderId(inspectionOrder.getId()); |
| | | inspectionOrderDetail.setInspectionProjectId(inspectionProjectId); |
| | | inspectionOrderDetail.setInspectionStandardDetailId(dailyInspectionStandardDetail.getId()); |
| | | inspectionOrderDetail.setLocation(dailyInspectionStandardDetail.getLocation()); |
| | | inspectionOrderDetail.setPhoto(dailyInspectionStandardDetail.getPhoto()); |
| | | InspectionProject inspectionProject = inspectionProjectService.getById(inspectionProjectId); |
| | | if(inspectionProject != null){ |
| | | inspectionOrderDetail.setDetectionStandard(inspectionProject.getDetectionStandard()); |
| | | } |
| | | inspectionOrderDetailService.save(inspectionOrderDetail); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | |
| | | inspectionOrderDetailService.updateById(inspectionOrderDetail); |
| | | } |
| | | |
| | | List<InspectionOrderDetail> inspectionOrderDetailList = inspectionOrder.getInspectionOrderDetailList(); |
| | | for (InspectionOrderDetail inspectionOrderDetail : inspectionOrderDetailList) { |
| | | String inspectionStandardDetailId = inspectionOrderDetail.getInspectionStandardDetailId(); |
| | | String inspectionProjectId = inspectionOrderDetail.getInspectionProjectId(); |
| | | String equipmentId = inspectionOrder.getEquipmentId(); |
| | | Equipment equipment = equipmentService.getById(equipmentId); |
| | | String isLineEquip = equipment.getIsLineEquip(); |
| | | if("no".equals(isLineEquip)){ |
| | | List<InspectionOrderDetail> inspectionOrderDetailList = inspectionOrder.getInspectionOrderDetailList(); |
| | | for (InspectionOrderDetail inspectionOrderDetail : inspectionOrderDetailList) { |
| | | String inspectionStandardDetailId = inspectionOrderDetail.getInspectionStandardDetailId(); |
| | | String inspectionProjectId = inspectionOrderDetail.getInspectionProjectId(); |
| | | |
| | | DailyInspectionStandardDetail dailyInspectionStandardDetail = dailyInspectionStandardDetailService.getById(inspectionStandardDetailId); |
| | | InspectionProject inspectionProject = inspectionProjectService.getById(inspectionProjectId); |
| | | DailyInspectionStandardDetail dailyInspectionStandardDetail = dailyInspectionStandardDetailService.getById(inspectionStandardDetailId); |
| | | InspectionProject inspectionProject = inspectionProjectService.getById(inspectionProjectId); |
| | | |
| | | inspectionOrderDetail.setId(""); |
| | | inspectionOrderDetail.setInspectionOrderId(id); |
| | | inspectionOrderDetail.setLocation(dailyInspectionStandardDetail.getLocation()); |
| | | inspectionOrderDetail.setInspectionMethod(inspectionProject.getInspectionMethod()); |
| | | inspectionOrderDetail.setInspectionTool(inspectionProject.getInspectionTool()); |
| | | inspectionOrderDetail.setAnalysisMethod(inspectionProject.getAnalysisMethod()); |
| | | inspectionOrderDetail.setTestValueType(inspectionProject.getTestValueType()); |
| | | inspectionOrderDetail.setDetectionStandard(inspectionProject.getDetectionStandard()); |
| | | inspectionOrderDetail.setAcceptabilityLimit(inspectionProject.getAcceptabilityLimit()); |
| | | inspectionOrderDetail.setId(""); |
| | | inspectionOrderDetail.setInspectionOrderId(id); |
| | | inspectionOrderDetail.setLocation(dailyInspectionStandardDetail.getLocation()); |
| | | inspectionOrderDetail.setInspectionMethod(inspectionProject.getInspectionMethod()); |
| | | inspectionOrderDetail.setInspectionTool(inspectionProject.getInspectionTool()); |
| | | inspectionOrderDetail.setAnalysisMethod(inspectionProject.getAnalysisMethod()); |
| | | inspectionOrderDetail.setTestValueType(inspectionProject.getTestValueType()); |
| | | inspectionOrderDetail.setDetectionStandard(inspectionProject.getDetectionStandard()); |
| | | inspectionOrderDetail.setAcceptabilityLimit(inspectionProject.getAcceptabilityLimit()); |
| | | |
| | | inspectionOrderDetailService.save(inspectionOrderDetail); |
| | | inspectionOrderDetailService.save(inspectionOrderDetail); |
| | | } |
| | | }else{ |
| | | String lineId = equipment.getLineId(); |
| | | List<DailyInspectionStandard> dailyInspectionStandards = dailyInspectionStandardService.lambdaQuery() |
| | | .eq(DailyInspectionStandard::getEquipmentId, lineId) |
| | | .eq(DailyInspectionStandard::getVersionStatus, "2") |
| | | .eq(DailyInspectionStandard::getDelFlag, "0").list(); |
| | | if(dailyInspectionStandards.size()>0) { |
| | | DailyInspectionStandard dailyInspectionStandard = dailyInspectionStandards.get(0); |
| | | //ä¿åç¹æ£å·¥ååè¡¨æ°æ® |
| | | List<DailyInspectionStandardDetail> dailyInspectionStandardDetailList = dailyInspectionStandardDetailService.lambdaQuery() |
| | | .eq(DailyInspectionStandardDetail::getDailyInspectionStandardId,dailyInspectionStandard.getId()) |
| | | .eq(DailyInspectionStandardDetail::getInspectionCycleId,inspectionOrder.getInspectionCycleId()) |
| | | .eq(DailyInspectionStandardDetail::getDelFlag,"0").list(); |
| | | for(DailyInspectionStandardDetail dailyInspectionStandardDetail : dailyInspectionStandardDetailList){ |
| | | String inspectionProjectId = dailyInspectionStandardDetail.getInspectionProjectId(); |
| | | |
| | | InspectionOrderDetail inspectionOrderDetail = new InspectionOrderDetail(); |
| | | inspectionOrderDetail.setInspectionOrderId(inspectionOrder.getId()); |
| | | inspectionOrderDetail.setInspectionProjectId(inspectionProjectId); |
| | | inspectionOrderDetail.setInspectionStandardDetailId(dailyInspectionStandardDetail.getId()); |
| | | inspectionOrderDetail.setLocation(dailyInspectionStandardDetail.getLocation()); |
| | | inspectionOrderDetail.setPhoto(dailyInspectionStandardDetail.getPhoto()); |
| | | InspectionProject inspectionProject = inspectionProjectService.getById(inspectionProjectId); |
| | | if(inspectionProject != null){ |
| | | inspectionOrderDetail.setDetectionStandard(inspectionProject.getDetectionStandard()); |
| | | } |
| | | inspectionOrderDetailService.save(inspectionOrderDetail); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | String inspectionUserId = inspectionOrder.getInspectionUserId(); |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ss.usermodel.*; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | import org.apache.poi.xwpf.usermodel.*; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.model.MaintenanceCycleVo; |
| | | import org.jeecg.modules.eam.service.*; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.math.BigDecimal; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | |
| | | @Autowired |
| | | @Lazy |
| | | private IMaintenanceStandardWorkInstructionService maintenanceStandardWorkInstructionService; |
| | | |
| | | @Autowired |
| | | private IMaintenanceProjectService maintenanceProjectService; |
| | | |
| | | @Autowired |
| | | @Lazy |
| | | private IdentityService sysIdentityService; |
| | | @Autowired |
| | | @Lazy |
| | | private IMaintenanceProjectCategoryService maintenanceProjectCategoryService; |
| | | @Lazy |
| | | @Autowired |
| | | private IMaintenanceCycleService maintenanceCycleService; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * æ¥å¸¸ä¿å
»å·¥åå建 ç»ä»¶éè¿ä½¿ç¨é¨é¨è¿æ»¤è·åä¿å
»æ å |
| | | * äºä¿ ç»ä»¶éè¿ä½¿ç¨é¨é¨è¿æ»¤è·åä¿å
»æ å |
| | | * qsw 2023-4-26 |
| | | */ |
| | | @GetMapping("getMaintenanceStandard2List") |
| | | public Result<?> getMaintenanceStandard2List(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize, @RequestParam Map<String, Object> params) { |
| | | IPage<Map<String, Object>> maintenanceStandardList = maintenanceStandardService.getMaintenanceStandard2List(pageNo, pageSize, params); |
| | | return Result.ok(maintenanceStandardList); |
| | | } |
| | | |
| | | /** |
| | | * ä¸ä¿ ç»ä»¶éè¿ä½¿ç¨é¨é¨è¿æ»¤è·åä¿å
»æ å |
| | | * qsw 2023-12-12 |
| | | */ |
| | | @GetMapping("getMaintenanceStandard3List") |
| | | public Result<?> getMaintenanceStandard3List(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize, @RequestParam Map<String, Object> params) { |
| | | IPage<Map<String, Object>> maintenanceStandardList = maintenanceStandardService.getMaintenanceStandard3List(pageNo, pageSize, params); |
| | | return Result.ok(maintenanceStandardList); |
| | | } |
| | | |
| | |
| | | // maintenanceStandard.setType("daily"); |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | maintenanceStandard.setWritePerson(sysUser.getRealname()); |
| | | maintenanceStandard.setAssignMode("1"); |
| | | maintenanceStandardService.save(maintenanceStandard); |
| | | |
| | | Equipment equipment = equipmentService.getById(maintenanceStandard.getEquipmentId()); |
| | | List<MaintenanceCycleVo> maintenanceCycle = maintenanceStandardService.getPeriodicMaintenanceCycle(equipment.getEquipmentImportanceId(), maintenanceStandard.getMaintenanceType()); |
| | | List<MaintenanceStandardDetail> maintenanceStandardDetaillist = maintenanceStandard.getMaintenanceStandardDetaillist(); |
| | | for (MaintenanceStandardDetail maintenanceStandardDetail : maintenanceStandardDetaillist) { |
| | | if(maintenanceCycle.size() > 0){ |
| | | maintenanceStandardDetail.setMaintenanceCycleId(maintenanceCycle.get(0).getValue()); |
| | | } |
| | | maintenanceStandardDetail.setMaintenanceStandardId(maintenanceStandard.getId()); |
| | | maintenanceStandardDetail.setPhoto(maintenanceStandardDetail.getPhoto()); |
| | | maintenanceStandardDetailService.saveOrUpdate(maintenanceStandardDetail); |
| | |
| | | maintenanceStandardDetailService.updateById(dailyInspectionStandardDetail); |
| | | } |
| | | //2.éæ°æä¹
ä¿å
»é¡¹ç® |
| | | Equipment equipment = equipmentService.getById(maintenanceStandard.getEquipmentId()); |
| | | List<MaintenanceCycleVo> maintenanceCycle = maintenanceStandardService.getPeriodicMaintenanceCycle(equipment.getEquipmentImportanceId(), maintenanceStandard.getMaintenanceType()); |
| | | List<MaintenanceStandardDetail> maintenanceStandardDetails = maintenanceStandard.getMaintenanceStandardDetaillist(); |
| | | for (MaintenanceStandardDetail maintenanceStandardDetail : maintenanceStandardDetails) { |
| | | if(maintenanceCycle.size() > 0){ |
| | | maintenanceStandardDetail.setMaintenanceCycleId(maintenanceCycle.get(0).getValue()); |
| | | } |
| | | maintenanceStandardDetail.setMaintenanceStandardId(maintenanceStandard.getId()); |
| | | maintenanceStandardDetailService.saveOrUpdate(maintenanceStandardDetail); |
| | | } |
| | |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, MaintenanceStandard.class); |
| | | @RequestMapping(value = "/importExcelOfTwoMaintenance", method = RequestMethod.POST) |
| | | public Result<?> importExcelOfTwoMaintenance(HttpServletRequest request, HttpServletResponse response) { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); |
| | | String exceptionInfo = ""; |
| | | int exceptionNum = 0; |
| | | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { |
| | | MultipartFile file = entity.getValue(); |
| | | try { |
| | | InputStream fis = file.getInputStream(); |
| | | XWPFDocument document = new XWPFDocument(fis); |
| | | XWPFParagraph mainTitleParagraph = document.getParagraphs().get(0); |
| | | if (mainTitleParagraph != null) { |
| | | // è·å主æ 颿æ¬å
容 |
| | | String mainTitle = mainTitleParagraph.getText(); |
| | | if(mainTitle.equals("ç产设å¤äºçº§ä¿å
»è§è")){ |
| | | for (XWPFTable table : document.getTables()) { |
| | | // éåè¡¨æ ¼ä¸çææè¡ |
| | | int rowNumber = 0; |
| | | String equipmentNum = ""; |
| | | Equipment equipment = null; |
| | | MaintenanceStandard maintenanceStandard = null; |
| | | XWPFTableRow row0= table.getRow(0); |
| | | if(ObjectUtils.isNotNull(row0)){ |
| | | XWPFTableCell cellEquipmentNum = row0.getCell(3); |
| | | if(ObjectUtils.isNotNull(cellEquipmentNum)){ |
| | | equipmentNum =cellEquipmentNum.getText(); |
| | | equipment = equipmentService.getOne(new QueryWrapper<Equipment>().eq("num",equipmentNum).eq("del_flag",0),false); |
| | | if(ObjectUtils.isNotNull(equipment)){ |
| | | maintenanceStandard = maintenanceStandardService.getOne(new QueryWrapper<MaintenanceStandard>().eq("version_status","2").eq("del_flag",0).eq("equipment_id",equipment.getId()),false); |
| | | if(ObjectUtils.isNull(maintenanceStandard)){ |
| | | maintenanceStandard = new MaintenanceStandard(); |
| | | maintenanceStandard.setNum(sysIdentityService.getNumByTypeAndLength("DailyMaintenanceStandard",4)); |
| | | maintenanceStandard.setEquipmentId(equipment.getId()); |
| | | maintenanceStandard.setAssignMode("1"); |
| | | maintenanceStandard.setVersion("1.0"); |
| | | maintenanceStandard.setType("daily"); |
| | | maintenanceStandard.setVersionStatus("2"); |
| | | maintenanceStandard.setDelFlag(0); |
| | | maintenanceStandard.setApprovalStatus("5"); |
| | | maintenanceStandardService.save(maintenanceStandard); |
| | | } |
| | | else { |
| | | continue; |
| | | } |
| | | } |
| | | else { |
| | | continue; |
| | | } |
| | | } |
| | | else { |
| | | continue; |
| | | } |
| | | } |
| | | else { |
| | | continue; |
| | | } |
| | | String role0 = ""; |
| | | for (XWPFTableRow row : table.getRows()) { |
| | | XWPFTableCell cell0 = row.getCell(0); |
| | | XWPFTableCell cell2 = row.getCell(2); |
| | | if(rowNumber>1){ |
| | | String role = cell0.getText(); |
| | | if(StringUtils.isNotBlank(role)){ |
| | | role0=role; |
| | | } |
| | | } |
| | | if(rowNumber>2){ |
| | | String projectName = cell2.getText(); |
| | | MaintenanceStandardDetail maintenanceStandardDetail = new MaintenanceStandardDetail(); |
| | | MaintenanceProjectCategory maintenanceProjectCategory = maintenanceProjectCategoryService.getOne(new QueryWrapper<MaintenanceProjectCategory>().eq("name","äºçº§ä¿å
»").eq("del_flag",0),false); |
| | | if(ObjectUtils.isNotNull(maintenanceProjectCategory)){ |
| | | MaintenanceProject maintenanceProject = maintenanceProjectService.getOne(new QueryWrapper<MaintenanceProject>().eq("name",projectName).eq("del_flag",0).eq("maintenance_project_category_id",maintenanceProjectCategory.getId()),false); |
| | | MaintenanceCycle maintenanceCycle = maintenanceCycleService.getOne(new QueryWrapper<MaintenanceCycle>().eq("name","6æ").eq("version_status",2).eq("del_flag",0),false); |
| | | if (!ObjectUtils.isNotNull(maintenanceProject)) { |
| | | maintenanceProject = new MaintenanceProject(); |
| | | maintenanceProject.setNum(sysIdentityService.getNumByTypeAndLength("MainOfTwo", 4)); |
| | | maintenanceProject.setName(projectName); |
| | | maintenanceProject.setMaintenanceProjectCategoryId(maintenanceProjectCategory.getId()); |
| | | maintenanceProject.setDelFlag(0); |
| | | maintenanceProjectService.save(maintenanceProject); |
| | | } |
| | | maintenanceStandardDetail.setMaintenanceProjectId(maintenanceProject.getId()); |
| | | if(role0.equals("维修人åä¿å
Ȍ
容")){ |
| | | maintenanceStandardDetail.setMaintenanceRole("maintenance"); |
| | | } else if(role0.equals("æä½äººåä¿å
Ȍ
容")){ |
| | | maintenanceStandardDetail.setMaintenanceRole("operator"); |
| | | } |
| | | if(ObjectUtils.isNotNull(maintenanceCycle)){ |
| | | maintenanceStandardDetail.setMaintenanceCycleId(maintenanceCycle.getId()); |
| | | } |
| | | maintenanceStandardDetail.setDelFlag(0); |
| | | maintenanceStandardDetail.setMaintenanceStandardId(maintenanceStandard.getId()); |
| | | maintenanceStandardDetailService.save(maintenanceStandardDetail); |
| | | |
| | | } |
| | | |
| | | } |
| | | rowNumber++; |
| | | } |
| | | } |
| | | } |
| | | return Result.OK("导å
¥æå"); |
| | | } else { |
| | | System.out.println("æ æ³è§£æè¯¥æä»¶"); |
| | | } |
| | | |
| | | fis.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | return Result.error("æä»¶å¯¼å
¥å¤±è´¥ï¼"); |
| | | } |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importExcelOfThreeMaintenance", method = RequestMethod.POST) |
| | | public Result<?> importExcelOfThreeMaintenance(HttpServletRequest request, HttpServletResponse response) { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); |
| | | String exceptionInfo = ""; |
| | | int exceptionNum = 0; |
| | | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { |
| | | MultipartFile file = entity.getValue(); |
| | | try { |
| | | InputStream fis = file.getInputStream(); |
| | | XWPFDocument document = new XWPFDocument(fis); |
| | | XWPFParagraph mainTitleParagraph = document.getParagraphs().get(0); |
| | | if (mainTitleParagraph != null) { |
| | | // è·å主æ 颿æ¬å
容 |
| | | String mainTitle = mainTitleParagraph.getText(); |
| | | if(mainTitle.equals("ç产设å¤ä¸çº§ä¿å
»è§è")){ |
| | | for (XWPFTable table : document.getTables()) { |
| | | // éåè¡¨æ ¼ä¸çææè¡ |
| | | int rowNumber = 0; |
| | | String equipmentNum = ""; |
| | | Equipment equipment = null; |
| | | MaintenanceStandard maintenanceStandard = null; |
| | | XWPFTableRow row0= table.getRow(0); |
| | | if(ObjectUtils.isNotNull(row0)){ |
| | | XWPFTableCell cellEquipmentNum = row0.getCell(3); |
| | | if(ObjectUtils.isNotNull(cellEquipmentNum)){ |
| | | equipmentNum =cellEquipmentNum.getText(); |
| | | equipment = equipmentService.getOne(new QueryWrapper<Equipment>().eq("num",equipmentNum).eq("del_flag",0),false); |
| | | if(ObjectUtils.isNotNull(equipment)){ |
| | | maintenanceStandard = maintenanceStandardService.getOne(new QueryWrapper<MaintenanceStandard>().eq("version_status",2).eq("del_flag",0).eq("equipment_id",equipment.getId()),false); |
| | | if(ObjectUtils.isNull(maintenanceStandard)){ |
| | | maintenanceStandard = new MaintenanceStandard(); |
| | | maintenanceStandard.setNum(sysIdentityService.getNumByTypeAndLength("DailyMaintenanceStandard",4)); |
| | | maintenanceStandard.setEquipmentId(equipment.getId()); |
| | | maintenanceStandard.setAssignMode("1"); |
| | | maintenanceStandard.setVersion("1.0"); |
| | | maintenanceStandard.setVersionStatus("2"); |
| | | maintenanceStandard.setType("daily"); |
| | | maintenanceStandard.setApprovalStatus("5"); |
| | | maintenanceStandardService.save(maintenanceStandard); |
| | | } |
| | | else { |
| | | continue; |
| | | } |
| | | } |
| | | else { |
| | | continue; |
| | | } |
| | | } |
| | | else { |
| | | continue; |
| | | } |
| | | } |
| | | else { |
| | | continue; |
| | | } |
| | | for (XWPFTableRow row : table.getRows()) { |
| | | XWPFTableCell cell0 = row.getCell(0); |
| | | XWPFTableCell cell1 = row.getCell(1); |
| | | XWPFTableCell cell2 = row.getCell(2); |
| | | if(rowNumber>2){ |
| | | String location = getMergedCellValue(cell0); |
| | | String projectName = cell1.getText(); |
| | | String projectStandard = cell2.getText(); |
| | | MaintenanceStandardDetail maintenanceStandardDetail = new MaintenanceStandardDetail(); |
| | | MaintenanceProjectCategory maintenanceProjectCategory = maintenanceProjectCategoryService.getOne(new QueryWrapper<MaintenanceProjectCategory>().eq("name","ä¸çº§ä¿å
»").eq("del_flag",0),false); |
| | | if(ObjectUtils.isNotNull(maintenanceProjectCategory)){ |
| | | MaintenanceProject maintenanceProject = maintenanceProjectService.getOne(new QueryWrapper<MaintenanceProject>().eq("name",projectName).eq("standard",projectStandard).eq("del_flag",0).eq("maintenance_project_category_id",maintenanceProjectCategory.getId()),false); |
| | | MaintenanceCycle maintenanceCycle = null; |
| | | if(equipment.getEquipmentImportanceId().equals("A")){ |
| | | maintenanceCycle = maintenanceCycleService.getOne(new QueryWrapper<MaintenanceCycle>().eq("name","3å¹´").eq("version_status",2).eq("del_flag",0),false); |
| | | }else { |
| | | maintenanceCycle = maintenanceCycleService.getOne(new QueryWrapper<MaintenanceCycle>().eq("name","4å¹´").eq("version_status",2).eq("del_flag",0),false); |
| | | } |
| | | if (!ObjectUtils.isNotNull(maintenanceProject)) { |
| | | maintenanceProject = new MaintenanceProject(); |
| | | maintenanceProject.setNum(sysIdentityService.getNumByTypeAndLength("MainOfTwo", 4)); |
| | | maintenanceProject.setName(projectName); |
| | | maintenanceProject.setLocation(location); |
| | | maintenanceProject.setMaintenanceProjectCategoryId(maintenanceProjectCategory.getId()); |
| | | maintenanceProject.setDelFlag(0); |
| | | maintenanceProjectService.save(maintenanceProject); |
| | | } |
| | | maintenanceStandardDetail.setMaintenanceProjectId(maintenanceProject.getId()); |
| | | maintenanceStandardDetail.setLocation(location); |
| | | maintenanceStandardDetail.setMaintenanceCycleId(maintenanceCycle.getId()); |
| | | maintenanceStandardDetail.setMaintenanceStandardId(maintenanceStandard.getId()); |
| | | maintenanceStandardDetailService.save(maintenanceStandardDetail); |
| | | } |
| | | |
| | | } |
| | | rowNumber++; |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | System.out.println("æ æ³è§£æè¯¥æä»¶"); |
| | | } |
| | | |
| | | fis.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | return Result.error("æä»¶å¯¼å
¥å¤±è´¥ï¼"); |
| | | } |
| | | |
| | | /** |
| | |
| | | //æç»ä¿¡æ¯ |
| | | List<MaintenanceStandardDetail> maintenanceStandardDetailList = maintenanceStandard.getMaintenanceStandardDetaillist(); |
| | | MaintenanceStandardDetail isd = null; |
| | | Equipment equipment = equipmentService.getById(maintenanceStandard.getEquipmentId()); |
| | | List<MaintenanceCycleVo> maintenanceCycle = maintenanceStandardService.getPeriodicMaintenanceCycle(equipment.getEquipmentImportanceId(), maintenanceStandard.getMaintenanceType()); |
| | | for (MaintenanceStandardDetail maintenanceStandardDetail : maintenanceStandardDetailList) { |
| | | isd = new MaintenanceStandardDetail(); |
| | | isd.setMaintenanceStandardId(maintenanceStandard.getId()); |
| | | isd.setLocation(maintenanceStandardDetail.getLocation()); |
| | | isd.setPhoto(maintenanceStandardDetail.getPhoto()); |
| | | isd.setMaintenanceProjectId(maintenanceStandardDetail.getMaintenanceProjectId()); |
| | | isd.setMaintenanceCycleId(maintenanceStandardDetail.getMaintenanceCycleId()); |
| | | // isd.setMaintenanceCycleId(maintenanceStandardDetail.getMaintenanceCycleId()); |
| | | isd.setMaintenanceMode(maintenanceStandardDetail.getMaintenanceMode()); |
| | | isd.setMaintenanceRequire(maintenanceStandardDetail.getMaintenanceRequire()); |
| | | if(maintenanceCycle.size() > 0){ |
| | | isd.setMaintenanceCycleId(maintenanceCycle.get(0).getValue()); |
| | | } |
| | | maintenanceStandardDetailService.save(isd); |
| | | } |
| | | if(CollectionUtils.isNotEmpty(maintenanceStandardPlanningMaterialList)){ |
| | |
| | | return Result.error("å®¡æ ¸å¤±è´¥!"); |
| | | } |
| | | } |
| | | // è·ååå¹¶åå
æ ¼çå¼ |
| | | private String getMergedCellValue(XWPFTableCell cell) { |
| | | // 对äºåå¹¶åå
æ ¼ï¼è·å第ä¸ä¸ªæ®µè½çææ¬ä½ä¸ºåå¹¶åå
æ ¼çå¼ |
| | | return cell.getParagraphs().get(0).getText(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @GetMapping("getPeriodicMaintenanceCycle") |
| | | public Result<?> getPeriodicMaintenanceCycle(@RequestParam("equipmentId") String equipmentId) { |
| | | Equipment equipment = equipmentService.getById(equipmentId); |
| | | Equipment equipment = equipmentService.getById(equipmentId); |
| | | List<MaintenanceCycleVo> maintenanceCycles = maintenanceStandardDetailService.getPeriodicMaintenanceCycle(equipment.getEquipmentImportanceId()); |
| | | return Result.ok(maintenanceCycles); |
| | | } |
| | |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.StrUtils; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.entity.Equipment; |
| | | import org.jeecg.modules.eam.entity.MaintenanceStandardDetail; |
| | | import org.jeecg.modules.eam.entity.MaintenanceStandardWorkInstruction; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | | import org.jeecg.modules.eam.service.IMaintenanceStandardWorkInstructionService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | |
| | | @Autowired |
| | | private ISysBaseAPI sysBaseApi; |
| | | |
| | | @Autowired |
| | | private IEamEquipmentService equipmentService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | |
| | | return Result.ok("ä¸ä¼ æå!"); |
| | | } |
| | | |
| | | |
| | | @PostMapping(value = "/addStoveCategoryReport") |
| | | public Result<?> addStoveCategoryReport(MultipartHttpServletRequest request, HttpServletResponse response) throws Exception { |
| | | String str = request.getParameter("data"); |
| | | JSONObject json = JSONObject.parseObject(str); |
| | | MaintenanceStandardWorkInstruction maintenanceStandardWorkInstruction = json.toJavaObject(MaintenanceStandardWorkInstruction.class); |
| | | |
| | | boolean isFileChange = true; |
| | | String uploadId = json.getString("uploadId"); |
| | | String fileType = json.getString("fileType"); |
| | | String description = json.getString("description"); |
| | | String type = json.getString("type"); |
| | | // æä»¶åæ´ |
| | | if (isFileChange) { |
| | | |
| | | String workInstructionId = ""; |
| | | if (StrUtils.isNotBlankOrNull(uploadId)) { |
| | | // æ
å½¢ä¸ãä»æä»¶ç®¡çä¸éæ© |
| | | // uploadRelaService.saveOrUpdateUploadRale(partRouteFile.getId(), partRouteFile.getType(), uploadId); |
| | | } else { |
| | | // æ
å½¢äºãéæ°ä¸ä¼ |
| | | // 1ãæä¹
upload |
| | | MultipartFile multipartFile = request.getFile("file"); |
| | | List<MultipartFile> multipartFileList = new ArrayList<>(); |
| | | multipartFileList.add(multipartFile); |
| | | // List<SysUpload> sysUploads = uploadService.batchUploadFile(fileType, multipartFileList, description); |
| | | List<SysUpload> sysUploads = sysBaseApi.batchUploadFile(fileType, multipartFileList, description); |
| | | |
| | | //æä¹
ä½ä¸æå¯¼ä¹¦ |
| | | workInstructionId = sysUploads.get(0).getId(); |
| | | maintenanceStandardWorkInstruction.setWorkInstructionId(workInstructionId); |
| | | maintenanceStandardWorkInstructionService.save(maintenanceStandardWorkInstruction); |
| | | |
| | | String equipmentId = maintenanceStandardWorkInstruction.getEquipmentId(); |
| | | String technologyStatus = maintenanceStandardWorkInstruction.getTechnologyStatus(); |
| | | Equipment equipment = equipmentService.getById(equipmentId); |
| | | equipment.setTechnologyStatus(technologyStatus); |
| | | equipmentService.updateById(equipment); |
| | | |
| | | |
| | | // 2ãå建/ä¿®æ¹ uploadRela |
| | | // 注ï¼å½åè§ä¸ºåæä»¶ä¸ä¼ æ§å¶ï¼åç»å¯è½ä¼æå个产åå·¥èºæä»¶å¯¹åºå¤ä¸ªä¸ä¼ æä»¶çåçº§è°æ´ï¼ä¿®æ¹åæ³¨ææ´ç»æ¤æ®µæ³¨é |
| | | // uploadRelaService.saveOrUpdateUploadRale(maintenanceStandardWorkInstruction.getId(), type, sysUploads.get(0).getId()); |
| | | sysBaseApi.saveOrUpdateUploadRale(maintenanceStandardWorkInstruction.getId(), type, sysUploads.get(0).getId()); |
| | | } |
| | | } |
| | | |
| | | return Result.ok("ä¸ä¼ æå!"); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | quanlityConfirm.setLeader(curUser.getId()); |
| | | quanlityConfirm.setConfirmTime(new Date()); |
| | | quanlityConfirmService.updateById(quanlityConfirm); |
| | | if(quanlityConfirm.getCondition().equals("yes")){ |
| | | String num = sysIdentityService.getNumByTypeAndLength("FaultInfo",4); |
| | | FaultInfo faultInfo = new FaultInfo(); |
| | | faultInfo.setNum(num); |
| | | faultInfo.setQuanlityId(quanlityConfirm.getId()); |
| | | faultInfo.setOperater(quanlityConfirm.getOperator()); |
| | | faultInfo.setIsConfirm("no"); |
| | | String rId = quanlityConfirm.getReportId(); |
| | | EquipmentReportRepair equipmentReportRepair = equipmentReportRepairService.getById(rId); |
| | | String eId = equipmentReportRepair.getEquipmentId(); |
| | | Equipment equipment = equipmentService.getById(eId); |
| | | faultInfo.setEquipModel(equipment.getModel()); |
| | | faultInfo.setEquipName(equipment.getName()); |
| | | faultInfo.setEquipNum(equipment.getNum()); |
| | | faultInfoService.save(faultInfo); |
| | | } |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | |
| | | @PutMapping(value = "/report") |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Result<?> orderReport(@RequestBody RepairOrder repairOrder){ |
| | | String id = repairOrder.getId(); |
| | | List<RepairOrderActualWorkHours> hoursList = repairOrderActualWorkHoursService.list(new QueryWrapper<RepairOrderActualWorkHours>().eq("repair_order_id",id).eq("del_flag",0)); |
| | | List<RepairOrderActualWorkHours> mainStuff = repairOrderActualWorkHoursService.list(new QueryWrapper<RepairOrderActualWorkHours>().eq("repair_order_id",id).eq("del_flag",0).eq("principal_contractor","1")); |
| | | if(hoursList.size()<2){ |
| | | return Result.error("æä½å¤±è´¥ï¼è¯·è³å°æ·»å 两个æ¿ä¿®äºº"); |
| | | } |
| | | if(mainStuff.size()!=1){ |
| | | return Result.error("æä½å¤±è´¥ï¼è¯·æ·»å 主æ¿ä¿®äººï¼æä¸åªæä¸ä¸ª"); |
| | | } |
| | | if(StringUtils.isNotBlank(repairOrder.getProjectMaintenanceOrderId())){ |
| | | //å¤æé¡¹ç®æ§ç»´ä¿®åè¡¨ç¶æ |
| | | ProjectMaintenanceOrderDetail projectMaintenanceOrderDetail = projectMaintenanceOrderDetailService.getById(repairOrder.getProjectMaintenanceOrderId()); |
| | |
| | | repairOrder.setStatus("4"); |
| | | repairOrder.setActualEndTime(now); |
| | | repairOrder.setActualHour(hours); |
| | | repairOrder.setRecipientUserId(user.getId()); |
| | | repairOrder.setRecipientUserId(mainStuff.get(0).getUserId()); |
| | | repairOrderService.updateById(repairOrder); |
| | | if(StringUtils.isNotBlank(repairOrder.getEquipmentId())){ |
| | | Equipment equipment = equipmentService.getById(repairOrder.getEquipmentId()); |
| | | equipment.setEquipmentStatus("4"); |
| | | equipmentService.updateById(equipment); |
| | | } |
| | | return Result.OK("æ¥å·¥æå"); |
| | | } |
| | | /** |
| | |
| | | repairOrder.setRepairOrderUda2(new Date()); |
| | | repairOrder.setRepairOrderUda1("needSpare"); |
| | | repairOrderService.updateById(repairOrder); |
| | | if(StringUtils.isNotBlank(repairOrder.getEquipmentId())){ |
| | | Equipment equipment = equipmentService.getById(repairOrder.getEquipmentId()); |
| | | equipment.setEquipmentStatus("8"); |
| | | equipmentService.updateById(equipment); |
| | | } |
| | | return Result.OK("æä½æå"); |
| | | } |
| | | /** |
| | |
| | | repairOrder.setRepairOrderUda1("normal"); |
| | | repairOrder.setSpareTime(hours); |
| | | repairOrderService.updateById(repairOrder); |
| | | if(StringUtils.isNotBlank(repairOrder.getEquipmentId())){ |
| | | Equipment equipment = equipmentService.getById(repairOrder.getEquipmentId()); |
| | | equipment.setEquipmentStatus("7"); |
| | | equipmentService.updateById(equipment); |
| | | } |
| | | return Result.OK("æä½æå"); |
| | | } |
| | | /** |
| | |
| | | repairOrder.setRepairOrderUda4(new Date()); |
| | | repairOrder.setRepairOrderUda1("needPart"); |
| | | repairOrderService.updateById(repairOrder); |
| | | if(StringUtils.isNotBlank(repairOrder.getEquipmentId())){ |
| | | Equipment equipment = equipmentService.getById(repairOrder.getEquipmentId()); |
| | | equipment.setEquipmentStatus("9"); |
| | | equipmentService.updateById(equipment); |
| | | } |
| | | return Result.OK("æä½æå"); |
| | | } |
| | | /** |
| | |
| | | repairOrder.setRepairOrderUda1("normal"); |
| | | repairOrder.setPartTime(hours); |
| | | repairOrderService.updateById(repairOrder); |
| | | if(StringUtils.isNotBlank(repairOrder.getEquipmentId())){ |
| | | Equipment equipment = equipmentService.getById(repairOrder.getEquipmentId()); |
| | | equipment.setEquipmentStatus("7"); |
| | | equipmentService.updateById(equipment); |
| | | } |
| | | return Result.OK("æä½æå"); |
| | | } |
| | | |
| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.jeecg.dingtalk.api.user.vo.User; |
| | | import com.jeecg.dingtalk.api.user.vo.UserRole; |
| | | import org.jeecg.common.api.dto.message.MessageDTO; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.modules.eam.entity.Equipment; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.service.*; |
| | | import org.jeecg.modules.eam.vo.ButtonVo; |
| | | import org.jeecg.modules.system.entity.*; |
| | | import org.jeecg.modules.system.service.*; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.*; |
| | | |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.entity.StreamOperation; |
| | | import org.jeecg.modules.eam.entity.ABCAssessment; |
| | | import org.jeecg.modules.eam.entity.Stream; |
| | | import org.jeecg.modules.eam.service.IStreamService; |
| | | import org.jeecg.modules.eam.service.IStreamOperationService; |
| | | import org.jeecg.modules.eam.service.IABCAssessmentService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | |
| | | @Autowired |
| | | private IEamEquipmentService equipmentService; |
| | | |
| | | @Autowired |
| | | private IdentityService sysIdentityService; |
| | | |
| | | @Autowired |
| | | private IEquipmentMaintenancePlanDetailService planDetailService; |
| | | |
| | | @Autowired |
| | | private IEquipmentMaintenancePlanService planService; |
| | | |
| | | @Autowired |
| | | private IMaintenanceStandardService maintenanceStandardService; |
| | | @Autowired |
| | | private IEquipmentUpdateInfoService updateInfoService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /*---------------------------------主表å¤ç-begin-------------------------------------*/ |
| | |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | SysUser sysUser = userService.getById(user.getId()); |
| | | if(StringUtils.isNotBlank(sysUser.getAreaId())){ |
| | | stream.setAreaId(sysUser.getAreaId()); |
| | | } |
| | | QueryWrapper<Stream> queryWrapper = QueryGenerator.initQueryWrapper(stream, req.getParameterMap()); |
| | | Page<Stream> page = new Page<Stream>(pageNo, pageSize); |
| | | IPage<Stream> pageList = streamService.page(page, queryWrapper); |
| | | IPage<Stream> pageList = streamService.myPage(page, stream); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | |
| | | for(SysDictItem nodeOperationItem:nodeOperationItems){ |
| | | if(roleNodeItem.getItemValue().equals(nodeOperationItem.getItemValue())){ |
| | | if(ObjectUtils.isNotNull(operation)){ |
| | | List<String> buttonvalues = Arrays.asList(nodeOperationItem.getItemText().split(",")); |
| | | List<String> buttonValues = Arrays.asList(nodeOperationItem.getItemText().split(",")); |
| | | List<SysDictItem> operations = sysDictItemService.selectItemsByMainId(operation.getId()); |
| | | List<ButtonVo> buttons = new ArrayList<>(); |
| | | for(String value:buttonvalues){ |
| | | for(String value:buttonValues){ |
| | | for(SysDictItem name:operations){ |
| | | |
| | | if(name.getItemValue().equals(value)){ |
| | | ButtonVo button = new ButtonVo(); |
| | | button.setName(name.getItemText()); |
| | |
| | | List<SysDictItem> nodes = sysDictItemService.selectItemsByMainId(streamNode.getId()); |
| | | if(buttonVo.getNodeSort()+1==nodes.size()){ |
| | | List<ABCAssessment> abcAssessments = aBCAssessmentService.selectByMainId(buttonVo.getStreamId()); |
| | | EquipmentMaintenancePlan plan = new EquipmentMaintenancePlan(); |
| | | UUID uuid = UUID.randomUUID(); |
| | | long mostSignificantBits = uuid.getMostSignificantBits(); |
| | | long leastSignificantBits = uuid.getLeastSignificantBits(); |
| | | |
| | | // å°æé«ä½åæä½ä½ååºï¼ç¶åå并为ä¸ä¸ªlongç±»åçå¼ |
| | | long combinedBits = mostSignificantBits ^ leastSignificantBits; |
| | | |
| | | // å°åå¹¶åçlongå¼è½¬æ¢ä¸º16è¿å¶å符串 |
| | | String hexString = Long.toHexString(combinedBits); |
| | | String planNum = sysIdentityService.getNumByTypeAndLength("MaintenancePlan",4); |
| | | plan.setId(hexString); |
| | | plan.setNum(planNum); |
| | | plan.setType("3"); |
| | | plan.setStatus("created"); |
| | | plan.setCreateReason("å ABCæ è¯ä»BæCåæ´ä¸ºAè导è´ä¸æ¬¡ä¸ä¿æ¶é´è¿æï¼å°±è¿äºè®¾å¤çæç临æ¶ä¿å
»è®¡å"); |
| | | List<EquipmentMaintenancePlanDetail> details = new ArrayList<>(); |
| | | for(ABCAssessment abcAssessment:abcAssessments){ |
| | | Equipment equipment = equipmentService.getById(abcAssessment.getEquipmentId()); |
| | | String oldStandard = equipment.getEquipmentImportanceId(); |
| | | String newStandard = abcAssessment.getFinalStandard(); |
| | | LocalDate currentDate = LocalDate.now(); |
| | | |
| | | // å°å½åæ¥æå ä¸å¤© |
| | | LocalDate nextDay = currentDate.plusDays(1); |
| | | LocalDate nextMonth = currentDate.plusMonths(1); |
| | | |
| | | // å°LocalDate转æ¢ä¸ºDate |
| | | Date currentDateAsDate = Date.from(currentDate.atStartOfDay(ZoneId.systemDefault()).toInstant()); |
| | | Date nextDayAsDate =Date.from(nextDay.atStartOfDay(ZoneId.systemDefault()).toInstant()); |
| | | Date nextMonthAsDate = Date.from(nextMonth.atStartOfDay(ZoneId.systemDefault()).toInstant()); |
| | | Date needingDate = equipment.getNextThirdMaintenanceTime(); |
| | | Boolean a = StringUtils.isNotBlank(oldStandard); |
| | | Boolean b = oldStandard.equals("B")||oldStandard.equals("C"); |
| | | Boolean c = newStandard.equals("A"); |
| | | Boolean d = ObjectUtils.isNotNull(needingDate)&&needingDate.compareTo(currentDateAsDate)<0; |
| | | if(a&&b&&c&&d){ |
| | | EquipmentMaintenancePlanDetail equipmentMaintenancePlanDetail = new EquipmentMaintenancePlanDetail(); |
| | | equipmentMaintenancePlanDetail.setPlanId(hexString); |
| | | equipmentMaintenancePlanDetail.setEquipmentId(equipment.getId()); |
| | | equipmentMaintenancePlanDetail.setPlanStartTime(nextDayAsDate); |
| | | equipmentMaintenancePlanDetail.setPlanEndTime(nextMonthAsDate); |
| | | MaintenanceStandard maintenanceStandard = maintenanceStandardService.getOne(new QueryWrapper<MaintenanceStandard>() |
| | | .eq("equipment_id",equipment.getId()) |
| | | .eq("maintenance_type","3") |
| | | .eq("version_status","2") |
| | | .eq("del_flag",0),false); |
| | | if(ObjectUtils.isNotNull(maintenanceStandard)){ |
| | | equipmentMaintenancePlanDetail.setStandardId(maintenanceStandard.getId()); |
| | | details.add(equipmentMaintenancePlanDetail); |
| | | } |
| | | } |
| | | equipment.setEquipmentImportanceId(abcAssessment.getFinalStandard()); |
| | | equipment.setStandardA(abcAssessment.getStandardA()); |
| | | equipment.setStandardB(abcAssessment.getStandardB()); |
| | | equipment.setStandardC(abcAssessment.getStandardC()); |
| | | equipment.setStandardD(abcAssessment.getStandardD()); |
| | | equipment.setStandardE(abcAssessment.getStandardE()); |
| | | equipment.setStandardF(abcAssessment.getStandardF()); |
| | | equipmentService.updateById(equipment); |
| | | EquipmentUpdateInfo equipmentUpdateInfo = new EquipmentUpdateInfo(); |
| | | equipmentUpdateInfo.setOldAbcTag(oldStandard); |
| | | equipmentUpdateInfo.setNewAbcTag(newStandard); |
| | | equipmentUpdateInfo.setEquipmentId(equipment.getId()); |
| | | equipmentUpdateInfo.setUpdatePerson(user.getId()); |
| | | equipmentUpdateInfo.setUpdateType("ABC"); |
| | | equipmentUpdateInfo.setUpdateDate(currentDateAsDate); |
| | | updateInfoService.save(equipmentUpdateInfo); |
| | | |
| | | } |
| | | if(details.size()>0){ |
| | | planService.save(plan); |
| | | planDetailService.saveBatch(details); |
| | | } |
| | | } |
| | | |
| | | SysDictItem nextStreamNodeItem = sysDictItemService.getOne(new QueryWrapper<SysDictItem>().eq("dict_id",streamNode.getId()).eq("sort_order",buttonVo.getNodeSort()+1),false); |
| | | return getResult(buttonVo, user, streamOperations, nextStreamNodeItem); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import javax.naming.ldap.PagedResultsControl; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.service.ICalibrationOrderService; |
| | | import org.jeecg.modules.eam.service.IDailyMaintenanceOrderService; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | | import org.jeecg.modules.eam.service.ITechnologyStatusService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import com.alibaba.fastjson.JSON; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | /** |
| | | * @Description: mom_eam_technology_status |
| | | * @Author: jeecg-boot |
| | | * @Date: 2023-12-11 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="mom_eam_technology_status") |
| | | @RestController |
| | | @RequestMapping("/eam/technologyStatus") |
| | | @Slf4j |
| | | public class TechnologyStatusController extends JeecgController<TechnologyStatus, ITechnologyStatusService> { |
| | | @Autowired |
| | | private ITechnologyStatusService technologyStatusService; |
| | | |
| | | @Autowired |
| | | private IEamEquipmentService equipmentService; |
| | | |
| | | @Autowired |
| | | private ICalibrationOrderService calibrationOrderService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param technologyStatus |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "mom_eam_technology_status-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="mom_eam_technology_status-å页å表æ¥è¯¢", notes="mom_eam_technology_status-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<TechnologyStatus>> queryPageList(TechnologyStatus technologyStatus, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<TechnologyStatus> queryWrapper = QueryGenerator.initQueryWrapper(technologyStatus, req.getParameterMap()); |
| | | Page<TechnologyStatus> page = new Page<TechnologyStatus>(pageNo, pageSize); |
| | | IPage<TechnologyStatus> pageList = technologyStatusService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param technologyStatus |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "mom_eam_technology_status-æ·»å ") |
| | | @ApiOperation(value="mom_eam_technology_status-æ·»å ", notes="mom_eam_technology_status-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_technology_status:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody TechnologyStatus technologyStatus) { |
| | | technologyStatusService.save(technologyStatus); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param technologyStatus |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "mom_eam_technology_status-ç¼è¾") |
| | | @ApiOperation(value="mom_eam_technology_status-ç¼è¾", notes="mom_eam_technology_status-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_technology_status:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody TechnologyStatus technologyStatus) { |
| | | technologyStatusService.updateById(technologyStatus); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "mom_eam_technology_status-éè¿idå é¤") |
| | | @ApiOperation(value="mom_eam_technology_status-éè¿idå é¤", notes="mom_eam_technology_status-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_technology_status:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | technologyStatusService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "mom_eam_technology_status-æ¹éå é¤") |
| | | @ApiOperation(value="mom_eam_technology_status-æ¹éå é¤", notes="mom_eam_technology_status-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_technology_status:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.technologyStatusService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "mom_eam_technology_status-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value="mom_eam_technology_status-éè¿idæ¥è¯¢", notes="mom_eam_technology_status-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<TechnologyStatus> queryById(@RequestParam(name="id",required=true) String id) { |
| | | TechnologyStatus technologyStatus = technologyStatusService.getById(id); |
| | | if(technologyStatus==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(technologyStatus); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param technologyStatus |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_technology_status:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, TechnologyStatus technologyStatus) { |
| | | return super.exportXls(request, technologyStatus, TechnologyStatus.class, "mom_eam_technology_status"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("mom_eam_technology_status:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, TechnologyStatus.class); |
| | | } |
| | | |
| | | @GetMapping("getTechnologyStatus") |
| | | public Result<?> getTechnologyStatus(@RequestParam(name = "orderId", required = true) String orderId) { |
| | | List<Map<String, Object>> technologyStatusList = technologyStatusService.getTechnologyStatusList(orderId); |
| | | return Result.ok(technologyStatusList); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¸ä¿æ ç²¾åº¦åæ° çäº§è®¾å¤ææ¯ç¶æé´å®è¡¨ |
| | | */ |
| | | @RequestMapping(value = "/technologyStatusAuthenticate", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public Result<String> technologyStatusAuthenticate(@RequestBody TechnologyStatus technologyStatus) { |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String realname = sysUser.getRealname(); |
| | | String flag = technologyStatus.getFlag(); |
| | | Equipment equipment = equipmentService.getById(technologyStatus.getEquipmentId()); |
| | | if("1".equals(flag)){//1管çåæé |
| | | technologyStatus.setAppraiser(realname); |
| | | technologyStatus.setLeadership(realname); |
| | | |
| | | equipment.setTechnologyStatus(technologyStatus.getTechnologyStatus()); |
| | | }else if("2".equals(flag)){//2æ£å®äººåç¾åæé |
| | | technologyStatus.setAppraiser(realname); |
| | | }else{//3é¢å¯¼ç¾åæé |
| | | technologyStatus.setLeadership(realname); |
| | | |
| | | equipment.setTechnologyStatus(technologyStatus.getTechnologyStatus()); |
| | | } |
| | | technologyStatusService.updateById(technologyStatus); |
| | | equipmentService.updateById(equipment); |
| | | return Result.OK("确认æå!"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Dç±»è®¾å¤ çäº§è®¾å¤ææ¯ç¶æé´å®è¡¨ |
| | | */ |
| | | @RequestMapping(value = "/technologyStatusAuthenticateD", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public Result<String> technologyStatusAuthenticateD(@RequestBody TechnologyStatus technologyStatus) { |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String realname = sysUser.getRealname(); |
| | | String flag = technologyStatus.getFlag(); |
| | | Equipment equipment = equipmentService.getById(technologyStatus.getEquipmentId()); |
| | | CalibrationOrder calibrationOrder = calibrationOrderService.getById(technologyStatus.getOrderId()); |
| | | if("1".equals(flag)){//1管çåæé |
| | | technologyStatus.setAppraiser(realname); |
| | | technologyStatus.setLeadership(realname); |
| | | |
| | | equipment.setTechnologyStatus(technologyStatus.getTechnologyStatus()); |
| | | |
| | | calibrationOrder.setCalibrationResult(technologyStatus.getTechnologyStatus()); |
| | | calibrationOrder.setCalibrationTime(new Date()); |
| | | }else if("2".equals(flag)){//2æ£å®äººåç¾åæé |
| | | technologyStatus.setAppraiser(realname); |
| | | }else{//3é¢å¯¼ç¾åæé |
| | | technologyStatus.setLeadership(realname); |
| | | |
| | | equipment.setTechnologyStatus(technologyStatus.getTechnologyStatus()); |
| | | |
| | | calibrationOrder.setCalibrationResult(technologyStatus.getTechnologyStatus()); |
| | | calibrationOrder.setCalibrationTime(new Date()); |
| | | } |
| | | technologyStatusService.updateById(technologyStatus); |
| | | equipmentService.updateById(equipment); |
| | | calibrationOrderService.updateById(calibrationOrder); |
| | | return Result.OK("确认æå!"); |
| | | } |
| | | |
| | | } |
| | |
| | | private String equipmentSpecification; |
| | | |
| | | @TableField(exist = false) |
| | | private String useDepartName; |
| | | /** |
| | | * ABCæ è¯ |
| | | */ |
| | | @TableField(exist = false) |
| | | private String equipmentImportance; |
| | | |
| | | @TableField(exist = false) |
| | | private List<Map<String, Object>> precisionParameterList; |
| | | /** |
| | | * 设å¤åç§° |
| | |
| | | @TableField(exist = false) |
| | | private List<DailyInspectionStandardDetail> dailyInspectionStandardDetaillist; |
| | | |
| | | @TableField(exist = false) |
| | | private List<DailyInspectionStandard> dailyInspectionStandardlist; |
| | | |
| | | } |
| | |
| | | private java.util.Date nextThirdMaintenanceTime; |
| | | |
| | | @ApiModelProperty(value = "ç产线ID") |
| | | @Dict(dictTable = "mom_eam_equipment",dicText = "num",dicCode = "id") |
| | | private String lineId; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦ä¸»è®¾å¤") |
| | |
| | | private String showId; |
| | | @TableField(exist = false) |
| | | private Integer sumOfEquipment; |
| | | @Dict(dicCode = "is_product") |
| | | private String isLineEquip; |
| | | @Dict(dicCode = "is_product") |
| | | private String isJudging; |
| | | @Dict(dicCode = "is_product") |
| | | private String isLine; |
| | | |
| | | |
| | | } |
| | |
| | | private java.lang.Integer delFlag; |
| | | @TableField(exist = false) |
| | | private List<EquipmentMaintenancePlanDetail> equipmentMaintenancePlanDetailList; |
| | | |
| | | private String createReason; |
| | | } |
| | |
| | | |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date finishTime; |
| | | private Double faultHour; |
| | | private BigDecimal faultHour; |
| | | /** |
| | | * éä»¶ä¸ä¼ å表 |
| | | */ |
| | |
| | | |
| | | @ApiModelProperty(value = "审æ¹å¤±æäºº") |
| | | private String loseEfficacyPerson; |
| | | /** |
| | | * åºåäºçº§ä¿å
»æ å å ä¸çº§ä¿å
»æ å |
| | | */ |
| | | @ApiModelProperty(value = "åå
¸ï¼ä¿å
»ç±»åï¼2äºçº§ä¿å
»ï¼3ä¸çº§ä¿å
»ï¼") |
| | | private String maintenanceType; |
| | | |
| | | /** |
| | | * çææ¶é´ |
| | |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | |
| | | @Excel(name = "å é¤ç¶æ(0-æ£å¸¸,1-å·²å é¤)", width = 15) |
| | | @ApiModelProperty(value = "å é¤ç¶æ(0-æ£å¸¸,1-å·²å é¤)") |
| | | private Integer delFlag = CommonConstant.DEL_FLAG_0; |
| | | |
| | | @TableField(exist = false) |
| | | private String equipmentId; |
| | | |
| | | @TableField(exist = false) |
| | | private String technologyStatus; |
| | | } |
| | |
| | | private java.lang.String type; |
| | | @TableField(exist = false) |
| | | private List<ABCAssessment> assessmentList; |
| | | @TableField(exist = false) |
| | | private String areaId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.base.entity.JeecgEntity; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: mom_eam_technology_status |
| | | * @Author: jeecg-boot |
| | | * @Date: 2023-12-11 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("mom_eam_technology_status") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="mom_eam_technology_status对象", description="mom_eam_technology_status") |
| | | public class TechnologyStatus extends JeecgEntity implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**ä¸ä¿åæ®/ææ¯ç¶æé´å®åæ®id*/ |
| | | @Excel(name = "ä¸ä¿åæ®/ææ¯ç¶æé´å®åæ®id", width = 15) |
| | | @ApiModelProperty(value = "ä¸ä¿åæ®/ææ¯ç¶æé´å®åæ®id") |
| | | private java.lang.String orderId; |
| | | /**é´å®ç»è®ºï¼ææ¯ç¶æï¼*/ |
| | | @Excel(name = "é´å®ç»è®ºï¼ææ¯ç¶æï¼", width = 15) |
| | | @ApiModelProperty(value = "é´å®ç»è®ºï¼ææ¯ç¶æï¼") |
| | | private java.lang.String technologyStatus; |
| | | /**é´å®äººç¾å*/ |
| | | @Excel(name = "é´å®äººç¾å", width = 15) |
| | | @ApiModelProperty(value = "é´å®äººç¾å") |
| | | private java.lang.String appraiser; |
| | | /**é¢å¯¼ç¾å*/ |
| | | @Excel(name = "é¢å¯¼ç¾å", width = 15) |
| | | @ApiModelProperty(value = "é¢å¯¼ç¾å") |
| | | private java.lang.String leadership; |
| | | /**çäº§è®¾å¤ææ¯ç¶æé´å®åæ®id*/ |
| | | @Excel(name = "çäº§è®¾å¤ææ¯ç¶æé´å®åæ®id", width = 15) |
| | | @ApiModelProperty(value = "çäº§è®¾å¤ææ¯ç¶æé´å®åæ®id") |
| | | private java.lang.String receipts; |
| | | /**result_1*/ |
| | | @Excel(name = "result_1", width = 15) |
| | | @ApiModelProperty(value = "result_1") |
| | | private java.lang.String result_1; |
| | | /**result_2*/ |
| | | @Excel(name = "result_2", width = 15) |
| | | @ApiModelProperty(value = "result_2") |
| | | private java.lang.String result_2; |
| | | /**result_3*/ |
| | | @Excel(name = "result_3", width = 15) |
| | | @ApiModelProperty(value = "result_3") |
| | | private java.lang.String result_3; |
| | | /**result_4*/ |
| | | @Excel(name = "result_4", width = 15) |
| | | @ApiModelProperty(value = "result_4") |
| | | private java.lang.String result_4; |
| | | /**result_5*/ |
| | | @Excel(name = "result_5", width = 15) |
| | | @ApiModelProperty(value = "result_5") |
| | | private java.lang.String result_5; |
| | | /**result_6*/ |
| | | @Excel(name = "result_6", width = 15) |
| | | @ApiModelProperty(value = "result_6") |
| | | private java.lang.String result_6; |
| | | /**result_7*/ |
| | | @Excel(name = "result_7", width = 15) |
| | | @ApiModelProperty(value = "result_7") |
| | | private java.lang.String result_7; |
| | | /**delFlag*/ |
| | | @Excel(name = "delFlag", width = 15) |
| | | @ApiModelProperty(value = "delFlag") |
| | | @TableLogic |
| | | private java.lang.Integer delFlag = CommonConstant.DEL_FLAG_0; |
| | | |
| | | @TableField(exist = false) |
| | | private String flag; |
| | | |
| | | @TableField(exist = false) |
| | | private String equipmentId; |
| | | } |
| | |
| | | private IInspectionOrderDetailService inspectionOrderDetailService; |
| | | @Autowired |
| | | private IDailyInspectionStandardDetailService dailyInspectionStandardDetailService; |
| | | @Autowired |
| | | private IEamEquipmentService equipmentService; |
| | | |
| | | @Autowired |
| | | private IDailyInspectionStandardService dailyInspectionStandardService; |
| | | |
| | | @Autowired |
| | | private IInspectionProjectService inspectionProjectService; |
| | | |
| | | @Override |
| | | public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { |
| | |
| | | inspectionOrder.setEquipmentId(inspectionCycle.getEquipmentId()); |
| | | inspectionOrder.setTeamId(inspectionCycle.getTeamId()); |
| | | inspectionOrderService.save(inspectionOrder); |
| | | //ä¿åç¹æ£å·¥ååè¡¨æ°æ® |
| | | List<DailyInspectionStandardDetail> dailyInspectionStandardDetailList = dailyInspectionStandardDetailService.lambdaQuery() |
| | | .eq(DailyInspectionStandardDetail::getDailyInspectionStandardId,inspectionOrder.getInspectionStandardId()) |
| | | .eq(DailyInspectionStandardDetail::getInspectionCycleId,inspectionOrder.getInspectionCycleId()).list(); |
| | | for(DailyInspectionStandardDetail dailyInspectionStandardDetail : dailyInspectionStandardDetailList){ |
| | | InspectionOrderDetail inspectionOrderDetail = new InspectionOrderDetail(); |
| | | inspectionOrderDetail.setInspectionOrderId(inspectionOrder.getId()); |
| | | inspectionOrderDetail.setInspectionProjectId(dailyInspectionStandardDetail.getInspectionProjectId()); |
| | | inspectionOrderDetail.setInspectionStandardDetailId(dailyInspectionStandardDetail.getId()); |
| | | inspectionOrderDetail.setLocation(dailyInspectionStandardDetail.getLocation()); |
| | | inspectionOrderDetail.setPhoto(dailyInspectionStandardDetail.getPhoto()); |
| | | inspectionOrderDetailService.save(inspectionOrderDetail); |
| | | |
| | | Equipment equipment = equipmentService.getById(inspectionCycle.getEquipmentId()); |
| | | String isLineEquip = equipment.getIsLineEquip(); |
| | | if("no".equals(isLineEquip)){ |
| | | //ä¿åç¹æ£å·¥ååè¡¨æ°æ® |
| | | List<DailyInspectionStandardDetail> dailyInspectionStandardDetailList = dailyInspectionStandardDetailService.lambdaQuery() |
| | | .eq(DailyInspectionStandardDetail::getDailyInspectionStandardId,inspectionOrder.getInspectionStandardId()) |
| | | .eq(DailyInspectionStandardDetail::getInspectionCycleId,inspectionOrder.getInspectionCycleId()).list(); |
| | | for(DailyInspectionStandardDetail dailyInspectionStandardDetail : dailyInspectionStandardDetailList){ |
| | | String inspectionProjectId = dailyInspectionStandardDetail.getInspectionProjectId(); |
| | | |
| | | InspectionOrderDetail inspectionOrderDetail = new InspectionOrderDetail(); |
| | | inspectionOrderDetail.setInspectionOrderId(inspectionOrder.getId()); |
| | | inspectionOrderDetail.setInspectionProjectId(inspectionProjectId); |
| | | inspectionOrderDetail.setInspectionStandardDetailId(dailyInspectionStandardDetail.getId()); |
| | | inspectionOrderDetail.setLocation(dailyInspectionStandardDetail.getLocation()); |
| | | inspectionOrderDetail.setPhoto(dailyInspectionStandardDetail.getPhoto()); |
| | | InspectionProject inspectionProject = inspectionProjectService.getById(inspectionProjectId); |
| | | if(inspectionProject != null){ |
| | | inspectionOrderDetail.setDetectionStandard(inspectionProject.getDetectionStandard()); |
| | | } |
| | | inspectionOrderDetailService.save(inspectionOrderDetail); |
| | | } |
| | | }else{ |
| | | String lineId = equipment.getLineId(); |
| | | List<DailyInspectionStandard> dailyInspectionStandards = dailyInspectionStandardService.lambdaQuery() |
| | | .eq(DailyInspectionStandard::getEquipmentId, lineId) |
| | | .eq(DailyInspectionStandard::getVersionStatus, "2") |
| | | .eq(DailyInspectionStandard::getDelFlag, "0").list(); |
| | | if(dailyInspectionStandards.size()>0){ |
| | | DailyInspectionStandard dailyInspectionStandard = dailyInspectionStandards.get(0); |
| | | //ä¿åç¹æ£å·¥ååè¡¨æ°æ® |
| | | List<DailyInspectionStandardDetail> dailyInspectionStandardDetailList = dailyInspectionStandardDetailService.lambdaQuery() |
| | | .eq(DailyInspectionStandardDetail::getDailyInspectionStandardId,dailyInspectionStandard.getId()) |
| | | .eq(DailyInspectionStandardDetail::getInspectionCycleId,inspectionOrder.getInspectionCycleId()) |
| | | .eq(DailyInspectionStandardDetail::getDelFlag,"0").list(); |
| | | for(DailyInspectionStandardDetail dailyInspectionStandardDetail : dailyInspectionStandardDetailList){ |
| | | String inspectionProjectId = dailyInspectionStandardDetail.getInspectionProjectId(); |
| | | |
| | | InspectionOrderDetail inspectionOrderDetail = new InspectionOrderDetail(); |
| | | inspectionOrderDetail.setInspectionOrderId(inspectionOrder.getId()); |
| | | inspectionOrderDetail.setInspectionProjectId(inspectionProjectId); |
| | | inspectionOrderDetail.setInspectionStandardDetailId(dailyInspectionStandardDetail.getId()); |
| | | inspectionOrderDetail.setLocation(dailyInspectionStandardDetail.getLocation()); |
| | | inspectionOrderDetail.setPhoto(dailyInspectionStandardDetail.getPhoto()); |
| | | InspectionProject inspectionProject = inspectionProjectService.getById(inspectionProjectId); |
| | | if(inspectionProject != null){ |
| | | inspectionOrderDetail.setDetectionStandard(inspectionProject.getDetectionStandard()); |
| | | } |
| | | inspectionOrderDetailService.save(inspectionOrderDetail); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | }else if("week".equals(inspectionCycle.getCycleUnit()) && dayOfWeek == DayOfWeek.FRIDAY){ |
| | | //ä¿åç¹æ£å·¥åä¸»è¡¨æ°æ® |
| | | InspectionOrder inspectionOrder = new InspectionOrder(); |
| | |
| | | .eq(DailyInspectionStandardDetail::getDailyInspectionStandardId,inspectionOrder.getInspectionStandardId()) |
| | | .eq(DailyInspectionStandardDetail::getInspectionCycleId,inspectionOrder.getInspectionCycleId()).list(); |
| | | for(DailyInspectionStandardDetail dailyInspectionStandardDetail : dailyInspectionStandardDetailList){ |
| | | String inspectionProjectId = dailyInspectionStandardDetail.getInspectionProjectId(); |
| | | |
| | | InspectionOrderDetail inspectionOrderDetail = new InspectionOrderDetail(); |
| | | inspectionOrderDetail.setInspectionOrderId(inspectionOrder.getId()); |
| | | inspectionOrderDetail.setInspectionProjectId(dailyInspectionStandardDetail.getInspectionProjectId()); |
| | | inspectionOrderDetail.setInspectionProjectId(inspectionProjectId); |
| | | inspectionOrderDetail.setInspectionStandardDetailId(dailyInspectionStandardDetail.getId()); |
| | | inspectionOrderDetail.setLocation(dailyInspectionStandardDetail.getLocation()); |
| | | inspectionOrderDetail.setPhoto(dailyInspectionStandardDetail.getPhoto()); |
| | | |
| | | InspectionProject inspectionProject = inspectionProjectService.getById(inspectionProjectId); |
| | | if(inspectionProject != null){ |
| | | inspectionOrderDetail.setDetectionStandard(inspectionProject.getDetectionStandard()); |
| | | } |
| | | inspectionOrderDetailService.save(inspectionOrderDetail); |
| | | } |
| | | } |
| | |
| | | @Param("warrantyStart")Date warrantyStart, |
| | | @Param("warrantyEnd")Date warrantyEnd, |
| | | @Param("lineId")String lineId, |
| | | @Param("isLineEquip")String isLineEquip, |
| | | @Param("isLine")String isLine, |
| | | @Param("sql")String sql |
| | | ); |
| | | List<DailyInspectionStandardDetail> getStandardList(Page<DailyInspectionStandardDetail> page,@Param("mainId") String mainId); |
| | | List<DailyInspectionStandardDetail> getStandardList(Page<DailyInspectionStandardDetail> page,@Param("mainId") String mainId,@Param("type")String type); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.jeecg.modules.eam.entity.DailyInspectionStandard; |
| | | import org.jeecg.modules.eam.entity.MaintenanceStandard; |
| | | import org.jeecg.modules.eam.model.MaintenanceCycleVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | IPage<Map<String, Object>> getMaintenanceStandard2List(IPage<Map> pageData, @Param("params") Map<String,Object> params); |
| | | |
| | | IPage<Map<String, Object>> getMaintenanceStandard3List(IPage<Map> pageData, @Param("params") Map<String,Object> params); |
| | | |
| | | @Select("select t1.id as value,t1.name as text,t1.name as title from mom_eam_maintenance_cycle t1 where t1.del_flag = '0' and t1.version_status = '2' and t1.maintenance_type = #{maintenanceType} and t1.equipment_importance_id like concat('%',#{importanceFlag},'%')") |
| | | List<MaintenanceCycleVo> getPeriodicMaintenanceCycle(String importanceFlag,String maintenanceType); |
| | | } |
| | |
| | | package org.jeecg.modules.eam.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.eam.entity.Stream; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: 设å¤ABCè¯ä»· |
| | |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface StreamMapper extends BaseMapper<Stream> { |
| | | List<Stream> myPage(Page<Stream> page,@Param("areaId") String areaId); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.eam.entity.TechnologyStatus; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: mom_eam_technology_status |
| | | * @Author: jeecg-boot |
| | | * @Date: 2023-12-11 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface TechnologyStatusMapper extends BaseMapper<TechnologyStatus> { |
| | | |
| | | List<Map<String, Object>> getTechnologyStatusList(@Param("orderId")String orderId); |
| | | } |
| | |
| | | t1.port port, |
| | | t1.coordinate_num coordinateNum, |
| | | t1.project_approval_no projectApprovalNo, |
| | | t1.standard_a tandardA, |
| | | t1.standard_a standardA, |
| | | t1.standard_b standardB, |
| | | t1.standard_c standardC, |
| | | t1.standard_d standardD, |
| | |
| | | t1.line_id lineId, |
| | | t1.is_meta isMeta, |
| | | t1.id showId, |
| | | t1.is_line_equip isLineEquip, |
| | | t1.is_judging isJudging, |
| | | t3.sumOfEquipment |
| | | from mom_eam_equipment t1 |
| | | left join (select * from mom_eam_equipment_category where del_flag = 0) t2 on t1.equipment_category_id = t2.id |
| | |
| | | </if> |
| | | <if test="equipmentStatus != null and equipmentStatus != ''"> |
| | | and t1.equipment_status = #{equipmentStatus} |
| | | </if> |
| | | <if test="isLineEquip != null and isLineEquip != ''"> |
| | | and t1.is_line_equip = #{isLineEquip} |
| | | </if> |
| | | <if test="isLine != null and isLine != ''"> |
| | | and t1.is_line = #{isLine} |
| | | </if> |
| | | <if test="specificEquipment != null and specificEquipment != ''"> |
| | | and t1.specific_equipment = #{specificEquipment} |
| | |
| | | on t8.id = t3.maintenance_cycle_id |
| | | where t4.version_status = '2') t9 where |
| | | t9.equipmentId = #{mainId} |
| | | and t9.type = #{type} |
| | | order by t9.type |
| | | </select> |
| | | |
| | |
| | | t1.num, |
| | | t1.inspection_time as inspectionDate, |
| | | t1.inspection_time as inspectionTime, |
| | | DATEADD(DAY,+7,t1.inspection_time) as redWarningTime, |
| | | CONVERT(varchar(100), GETDATE(), 20) AS currentDateTime, |
| | | t1.inspection_deadline as inspectionDeadline, |
| | | t1.start_work_condition as startWorkCondition, |
| | | t1.status, |
| | |
| | | left join sys_depart t4 on t2.use_id = t4.id |
| | | left join mom_base_team t5 on t2.team_id = t5.id |
| | | left join (select * from v_sys_dict where dict_code = 'assign_mode') t6 on t1.assign_mode = t6.item_value |
| | | where t1.del_flag = 0 and t1.type = #{params.type} and t2.use_id = #{params.useId} |
| | | where t1.del_flag = 0 and t1.type = #{params.type} |
| | | <if test="params.useId != null and params.useId != ''"> |
| | | and t2.use_id = #{params.useId} |
| | | </if> |
| | | <if test="params.num != null and params.num != ''"> |
| | | and t1.num like concat('%',#{params.num},'%') |
| | | </if> |
| | |
| | | </if> |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t2.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.maintenanceType != null and params.maintenanceType != ''"> |
| | | and t1.maintenance_type = #{params.maintenanceType} |
| | | </if> |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | | |
| | | <select id="getMaintenanceStandard3List" parameterType="Map" resultType="Map"> |
| | | SELECT |
| | | t1.id, |
| | | t1.num, |
| | | t1.version, |
| | | t1.depart_id as departId, |
| | | t1.equipment_id AS equipmentId, |
| | | t2.num AS equipmentNum, |
| | | t2.NAME AS equipmentName, |
| | | t2.model AS equipmentModel, |
| | | t3.item_text as specificEquipment, |
| | | t1.create_by AS createBy, |
| | | t1.create_time AS createTime, |
| | | t1.update_by AS updateBy, |
| | | t1.update_time AS updateTime, |
| | | t4.depart_name as useDepartName, |
| | | t5.id as teamId, |
| | | t5.name as teamName, |
| | | t1.assign_mode as assignMode, |
| | | t6.item_text as assignModeName |
| | | FROM |
| | | mom_eam_maintenance_standard t1 |
| | | LEFT JOIN mom_eam_equipment t2 ON t1.equipment_id = t2.id |
| | | LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'specific_equipment' ) t3 ON t3.item_value = t2.specific_equipment |
| | | left join sys_depart t4 on t2.use_id = t4.id |
| | | left join mom_base_team t5 on t2.team_id = t5.id |
| | | left join (select * from v_sys_dict where dict_code = 'assign_mode') t6 on t1.assign_mode = t6.item_value |
| | | where t1.del_flag = 0 and t1.type = #{params.type} and t2.equipment_importance_id in ('A','B','C') |
| | | <if test="params.useId != null and params.useId != ''"> |
| | | and t2.use_id = #{params.useId} |
| | | </if> |
| | | <if test="params.num != null and params.num != ''"> |
| | | and t1.num like concat('%',#{params.num},'%') |
| | | </if> |
| | | <if test="params.versionStatus != null and params.versionStatus != ''"> |
| | | and t1.version_status = #{params.versionStatus} |
| | | </if> |
| | | <if test="params.equipmentName != null and params.equipmentName != ''"> |
| | | and t2.name like concat('%',#{params.equipmentName},'%') |
| | | </if> |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t2.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.maintenanceType != null and params.maintenanceType != ''"> |
| | | and t1.maintenance_type = #{params.maintenanceType} |
| | | </if> |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | |
| | | t1.lose_efficacy_time as loseEfficacyTime, |
| | | t1.approval_status as approvalStatus, |
| | | t8.item_text as approvalStatusName, |
| | | t1.maintenance_type as maintenanceType, |
| | | t9.item_text as maintenanceTypeName, |
| | | t1.audit_feedback as auditFeedback, |
| | | t1.approval_feedback as approvalFeedback, |
| | | t1.write_person as writePerson, |
| | |
| | | left join (select * from v_sys_dict where dict_code = 'assign_mode') t6 on t1.assign_mode = t6.item_value |
| | | left join sys_depart t7 on t2.use_id = t7.id |
| | | left join (select * from v_sys_dict where dict_code = 'approval_status') t8 on t1.approval_status = t8.item_value |
| | | left join (select * from v_sys_dict where dict_code = 'maintenance_type') t9 on t1.maintenance_type = t9.item_value |
| | | where t1.del_flag = 0 and t1.type = #{params.type} |
| | | <if test="params.num != null and params.num != ''"> |
| | | and t1.num like concat('%',#{params.num},'%') |
| | |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t2.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.maintenanceType != null and params.maintenanceType != ''"> |
| | | and t1.maintenance_type = #{params.maintenanceType} |
| | | </if> |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | t1.theoretical_time theoreticalTime, |
| | | t7.item_text principalContractor_dictText, |
| | | t1.user_num as userNum, |
| | | t2.id userId, |
| | | t1.user_id userId, |
| | | t1.repair_order_id as repairOrderId, |
| | | t1.actual_hour,---------- |
| | | t2.username username, |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.eam.mapper.StreamMapper"> |
| | | <select id="myPage" resultType="org.jeecg.modules.eam.entity.Stream"> |
| | | select t1.* |
| | | from mom_eam_stream t1 |
| | | left join sys_user t2 on t2.id = t1.create_by |
| | | where 1=1 |
| | | <choose> |
| | | <when test="areaId != null and areaId != ''"> |
| | | and t2.area_id = #{areaId} |
| | | </when> |
| | | <otherwise> |
| | | and t2.area_id = '-1' |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.eam.mapper.TechnologyStatusMapper"> |
| | | |
| | | <select id="getTechnologyStatusList" parameterType="Map" resultType="Map"> |
| | | SELECT |
| | | t1.id AS id, |
| | | t1.order_id AS orderId, |
| | | t1.technology_status AS technologyStatus, |
| | | t1.appraiser, |
| | | t1.leadership, |
| | | ISNULL( t1.result_1, 0 ) AS result_1, |
| | | ISNULL( t1.result_2, 0 ) AS result_2, |
| | | ISNULL( t1.result_3, 0 ) AS result_3, |
| | | ISNULL( t1.result_4, 0 ) AS result_4, |
| | | ISNULL( t1.result_5, 0 ) AS result_5, |
| | | ISNULL( t1.result_6, 0 ) AS result_6, |
| | | ISNULL( t1.result_7, 0 ) AS result_7, |
| | | t1.receipts, |
| | | t2.num AS receiptsNum, |
| | | t3.item_text AS receiptsName, |
| | | t1.update_time AS updateTime |
| | | FROM |
| | | mom_eam_technology_status t1 |
| | | LEFT JOIN sys_file_name t2 ON t1.receipts = t2.id |
| | | LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'sys_file_name' ) t3 ON t3.item_value = t2.name |
| | | where t1.del_flag = '0' and t1.order_id = #{orderId} |
| | | </select> |
| | | </mapper> |
| | |
| | | public IPage<Equipment> pageEquipment(Integer pageNo, Integer pageSize, Map<String, Object> params); |
| | | |
| | | Page<Equipment> getEquipmentList(Page<Equipment> page, Equipment equipment); |
| | | IPage<DailyInspectionStandardDetail> getStandardList(Page<DailyInspectionStandardDetail> page, String mainId); |
| | | IPage<DailyInspectionStandardDetail> getStandardList(Page<DailyInspectionStandardDetail> page, String mainId,String type); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.eam.entity.MaintenanceStandard; |
| | | import org.jeecg.modules.eam.model.MaintenanceCycleVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | IPage<Map<String, Object>> getMaintenanceStandardList(Integer pageNo, Integer pageSize, Map<String, Object> params); |
| | | |
| | | IPage<Map<String, Object>> getMaintenanceStandard2List(Integer pageNo, Integer pageSize, Map<String, Object> params); |
| | | |
| | | IPage<Map<String, Object>> getMaintenanceStandard3List(Integer pageNo, Integer pageSize, Map<String, Object> params); |
| | | |
| | | List<MaintenanceCycleVo> getPeriodicMaintenanceCycle(String importanceFlag,String maintenanceType); |
| | | } |
| | |
| | | package org.jeecg.modules.eam.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.jeecg.modules.eam.entity.Stream; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | |
| | | * @param idList |
| | | */ |
| | | public void delBatchMain (Collection<? extends Serializable> idList); |
| | | public Page<Stream> myPage(Page<Stream> page,Stream stream); |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.service; |
| | | |
| | | import org.jeecg.modules.eam.entity.TechnologyStatus; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: mom_eam_technology_status |
| | | * @Author: jeecg-boot |
| | | * @Date: 2023-12-11 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface ITechnologyStatusService extends IService<TechnologyStatus> { |
| | | |
| | | List<Map<String, Object>> getTechnologyStatusList(String orderId); |
| | | } |
| | |
| | | equipment.getWarrantyStart(), |
| | | equipment.getWarrantyEnd(), |
| | | equipment.getLineId(), |
| | | equipment.getIsLineEquip(), |
| | | equipment.getIsLine(), |
| | | sql |
| | | )); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<DailyInspectionStandardDetail> getStandardList(Page<DailyInspectionStandardDetail> page, String mainId) { |
| | | return page.setRecords(baseMapper.getStandardList(page,mainId)); |
| | | public IPage<DailyInspectionStandardDetail> getStandardList(Page<DailyInspectionStandardDetail> page, String mainId,String type) { |
| | | return page.setRecords(baseMapper.getStandardList(page,mainId,type)); |
| | | } |
| | | } |
| | |
| | | if(equipmentReportRepair.getFaultTime() != null && equipmentReportRepair.getFaultTime().compareTo(endDate) < 0 && equipmentReportRepair.getFaultTime().compareTo(startDate) > 0){ |
| | | //2ãéªæ¶æ¶é´å¨æ¥è¯¢æ¶é´æ®µå
|
| | | if(equipmentReportRepair.getAcceptTime() != null && equipmentReportRepair.getAcceptTime().compareTo(endDate) < 0){ |
| | | equipmentFaultTime = equipmentFaultTime.add(new BigDecimal(equipmentReportRepair.getFaultHour())); |
| | | equipmentFaultTime = equipmentFaultTime.add(equipmentReportRepair.getFaultHour()); |
| | | count++; |
| | | //3ãéªæ¶æ¶é´å¤§äºæ¥è¯¢ç»ææ¶é´ |
| | | }else { |
| | |
| | | import org.jeecg.modules.eam.entity.MaintenanceStandard; |
| | | import org.jeecg.modules.eam.mapper.DailyInspectionStandardMapper; |
| | | import org.jeecg.modules.eam.mapper.MaintenanceStandardMapper; |
| | | import org.jeecg.modules.eam.model.MaintenanceCycleVo; |
| | | import org.jeecg.modules.eam.service.IDailyInspectionStandardService; |
| | | import org.jeecg.modules.eam.service.IMaintenanceStandardService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | return super.baseMapper.getMaintenanceStandard2List(pageData,params); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getMaintenanceStandard3List(Integer pageNo, Integer pageSize, Map<String, Object> params) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | return super.baseMapper.getMaintenanceStandard3List(pageData,params); |
| | | } |
| | | |
| | | /** |
| | | * 卿æ§ä¿å
» æ ¹æ®è®¾å¤å°è´¦ABCæ è¯è·åä¸ä¿ä¿å
»å¨æ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MaintenanceCycleVo> getPeriodicMaintenanceCycle(String importanceFlag, String maintenanceType) { |
| | | return super.baseMapper.getPeriodicMaintenanceCycle(importanceFlag,maintenanceType); |
| | | } |
| | | } |
| | |
| | | if(equipmentReportRepair.getFaultTime() != null && equipmentReportRepair.getFaultTime().compareTo(endDate) < 0 && equipmentReportRepair.getFaultTime().compareTo(startDate) > 0){ |
| | | //2ãéªæ¶æ¶é´å¨æ¥è¯¢æ¶é´æ®µå
|
| | | if(equipmentReportRepair.getAcceptTime() != null && equipmentReportRepair.getAcceptTime().compareTo(endDate) < 0){ |
| | | equipmentFaultTime = equipmentFaultTime.add(new BigDecimal(equipmentReportRepair.getFaultHour())); |
| | | equipmentFaultTime = equipmentFaultTime.add(equipmentReportRepair.getFaultHour()); |
| | | int flag = 0; |
| | | if(CollectionUtils.isNotEmpty(faultTimeList)){ |
| | | for(String faultTime : faultTimeList){ |
| | |
| | | if(equipmentReportRepair.getFaultTime() != null && equipmentReportRepair.getFaultTime().compareTo(endDate) < 0 && equipmentReportRepair.getFaultTime().compareTo(startDate) > 0){ |
| | | //2ãéªæ¶æ¶é´å¨æ¥è¯¢æ¶é´æ®µå
|
| | | if(equipmentReportRepair.getAcceptTime() != null && equipmentReportRepair.getAcceptTime().compareTo(endDate) < 0){ |
| | | equipmentFaultTime = equipmentFaultTime.add(new BigDecimal(equipmentReportRepair.getFaultHour())); |
| | | equipmentFaultTime = equipmentFaultTime.add(equipmentReportRepair.getFaultHour()); |
| | | //3ãéªæ¶æ¶é´å¤§äºæ¥è¯¢ç»ææ¶é´ |
| | | }else { |
| | | long diff2 = endDate.getTime() - equipmentReportRepair.getFaultTime().getTime(); |
| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.jeecg.modules.eam.entity.Stream; |
| | | import org.jeecg.modules.eam.mapper.StreamOperationMapper; |
| | | import org.jeecg.modules.eam.mapper.ABCAssessmentMapper; |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Page<Stream> myPage(Page<Stream> page, Stream stream) { |
| | | return page.setRecords(baseMapper.myPage(page,stream.getAreaId())); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import org.jeecg.modules.eam.entity.TechnologyStatus; |
| | | import org.jeecg.modules.eam.mapper.TechnologyStatusMapper; |
| | | import org.jeecg.modules.eam.service.ITechnologyStatusService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: mom_eam_technology_status |
| | | * @Author: jeecg-boot |
| | | * @Date: 2023-12-11 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class TechnologyStatusServiceImpl extends ServiceImpl<TechnologyStatusMapper, TechnologyStatus> implements ITechnologyStatusService { |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getTechnologyStatusList(String orderId) { |
| | | return this.baseMapper.getTechnologyStatusList(orderId); |
| | | } |
| | | } |
| | |
| | | private String homePath; |
| | | @Dict(dicCode = "id",dictTable = "mom_base_team",dicText = "name") |
| | | private String teamId; |
| | | @Dict(dicCode = "id",dictTable = "mom_base_area",dicText = "name") |
| | | private String areaId; |
| | | |
| | | /** |
| | | * å¯ç 馿¬¡ä½¿ç¨æ è¯ 1æ¯ 0å¦ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | ALTER TABLE [dbo].[mom_eam_equipment_report_repair] DROP CONSTRAINT [DF__mom_eam_e__err_u__00AD44A9] |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[mom_eam_equipment_report_repair] ALTER COLUMN [err_uda5] text NULL |
| | | GO |
| | | |
| | | IF ((SELECT COUNT(*) FROM ::fn_listextendedproperty('MS_Description', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'mom_eam_equipment_report_repair', |
| | | 'COLUMN', N'err_uda5')) > 0) |
| | | EXEC sp_updateextendedproperty |
| | | 'MS_Description', N'éªæ¶æè§', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'mom_eam_equipment_report_repair', |
| | | 'COLUMN', N'err_uda5' |
| | | ELSE |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'éªæ¶æè§', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'mom_eam_equipment_report_repair', |
| | | 'COLUMN', N'err_uda5' |
| | | ALTER TABLE [dbo].[sys_user] ADD [area_id] nvarchar(32) NULL |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'ä¸å¿ID', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'sys_user', |
| | | 'COLUMN', N'area_id' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | -- èå维修履åä¿®æ¹ |
| | | UPDATE [dbo].[sys_permission] SET [parent_id] = N'1647845086853693442', [name] = N'维修履å', [url] = N'/eam/RepairOrder', [component] = N'eam/RepairOrderList', [component_name] = NULL, [redirect] = NULL, [menu_type] = 1, [perms] = NULL, [perms_type] = N'1', [sort_no] = 1.2, [always_show] = 0, [icon] = NULL, [is_route] = 1, [is_leaf] = 1, [keep_alive] = 0, [hidden] = 0, [hide_tab] = 0, [description] = NULL, [create_by] = N'admin', [create_time] = '2023-04-24 16:56:44.0000000', [update_by] = N'admin', [update_time] = '2023-12-11 11:32:06.0090000', [del_flag] = 0, [rule_flag] = 0, [status] = N'1', [internal_or_external] = 0 WHERE CONVERT(NVARCHAR(MAX), [id]) = N'1650423515662295042'; |
| | | -- èå设å¤äºæ
ç»è®°è¡¨ä¿®æ¹ |
| | | UPDATE [dbo].[sys_permission] SET [parent_id] = N'1647845086853693442', [name] = N'设å¤äºæ
ç»è®°è¡¨', [url] = N'/eam/FaultInfoList', [component] = N'eam/FaultInfoList', [component_name] = NULL, [redirect] = NULL, [menu_type] = 1, [perms] = NULL, [perms_type] = N'1', [sort_no] = 2.1, [always_show] = 0, [icon] = NULL, [is_route] = 1, [is_leaf] = 1, [keep_alive] = 0, [hidden] = 0, [hide_tab] = 0, [description] = NULL, [create_by] = N'admin', [create_time] = '2023-11-13 09:39:39.0000000', [update_by] = N'admin', [update_time] = '2023-12-11 11:38:21.9880000', [del_flag] = 0, [rule_flag] = NULL, [status] = N'1', [internal_or_external] = 0 WHERE CONVERT(NVARCHAR(MAX), [id]) = N'1723878256194232322'; |
| | | --ABCæ è¯åæ´ååæ®å· |
| | | INSERT INTO [dbo].[mom_sys_identity] ([id], [num], [month_value], [year_value], [type], [remark], [create_by], [create_time], [update_by], [update_time], [prifix], [encode_rule_id]) VALUES (N'1726910264274141186', 10, N'12', N'2023', N'ABCAssement', NULL, N'admin', '2023-11-21 18:27:46', N'admin', '2023-12-12 15:52:18', NULL, NULL); |
| | | -- ä¿å
»è®¡åçæåå åæ®µæ·»å |
| | | ALTER TABLE [dbo].[mom_eam_equipment_maintenance_plan] ADD [create_reason] varchar(255) NULL |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'ç产åå ', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'mom_eam_equipment_maintenance_plan', |
| | | 'COLUMN', N'create_reason' |
| | | -- 设å¤å°è´¦å¢å ä¸¤ä¸ªåæ®µ |
| | | ALTER TABLE [dbo].[mom_eam_equipment] ADD [is_line_equip] nvarchar(32) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[mom_eam_equipment] ADD [is_judging] nvarchar(32) NULL |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'æ¯å¦ç产线设å¤ï¼æ¯ï¼yesï¼å¦ï¼noï¼', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'mom_eam_equipment', |
| | | 'COLUMN', N'is_line_equip' |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'æ¯å¦å¨è¯åå½ä¸ï¼æ¯ï¼yesï¼å¦ï¼noï¼', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'mom_eam_equipment', |
| | | 'COLUMN', N'is_judging' |
| | | -- æ¯å¦ç产线 |
| | | ALTER TABLE [dbo].[mom_eam_equipment] ADD [is_line] nvarchar NULL |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'æ¯å¦çäº§çº¿ï¼æ¯ï¼yesï¼å¦ï¼noï¼', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'mom_eam_equipment', |
| | | 'COLUMN', N'is_line' |
| | | -- ä¿®æ¹å段é¿åº¦ |
| | | ALTER TABLE [dbo].[mom_eam_equipment] ALTER COLUMN [is_line] nvarchar(32) COLLATE Chinese_PRC_CI_AS NULL |
| | | -- ç产线æ°å¢ç¼è¾å 餿鮿é |
| | | INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734844168171163649', N'1726425666842873858', N'ç产线æ°å¢ç¼è¾å é¤', NULL, NULL, NULL, NULL, 2, N'line:add&edit&delete', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 15:54:16.2070000', NULL, NULL, 0, NULL, N'1', 0); |
| | | -- æ
éæ¥ä¿®æé®æé |
| | | INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734845810551558146', N'1647845301102936065', N'æ
éæ¥ä¿®æ°å¢ç¼è¾æé®æé', NULL, NULL, NULL, NULL, 2, N'report:add&edit', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:00:47.7700000', NULL, NULL, 0, NULL, N'1', 0); |
| | | INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734846510299877378', N'1647845301102936065', N'æ
éæ¥ä¿®éªæ¶æé®æé', NULL, NULL, NULL, NULL, 2, N'report:accept', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:03:34.6030000', NULL, NULL, 0, NULL, N'1', 0); |
| | | -- 维修履åæé®æé |
| | | INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734847324137459714', N'1650423515662295042', N'维修履åé¢åæé®æé', NULL, NULL, NULL, NULL, 2, N'repair:accept', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:06:48.6370000', NULL, NULL, 0, NULL, N'1', 0); |
| | | INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734847789482905601', N'1650423515662295042', N'ç»´ä¿®å±¥åæ§è¡æé®æé', NULL, NULL, NULL, NULL, 2, N'repair:excute', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:08:39.5970000', NULL, NULL, 0, NULL, N'1', 0); |
| | | -- äºæ
ç»è®°æé®æé |
| | | INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734851460430041089', N'1723876722224013314', N'确认æé®æé', NULL, NULL, NULL, NULL, 2, N'quanlity:confirm', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:23:14.8040000', NULL, NULL, 0, NULL, N'1', 0); |
| | | INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734851932285046785', N'1723878256194232322', N'确认æé®æé', NULL, NULL, NULL, NULL, 2, N'fault:confirm', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:25:07.3090000', NULL, NULL, 0, NULL, N'1', 0); |
| | | INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734852409726865409', N'1723878256194232322', N'å½å
¥æé®æé', NULL, NULL, NULL, NULL, 2, N'fault:update', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:27:01.1330000', NULL, NULL, 0, NULL, N'1', 0); |
| | | |