| | |
| | | } |
| | | |
| | | /** |
| | | * 工段级 三保延期数量 |
| | | * qsw 2024-3-20 |
| | | */ |
| | | @GetMapping("get3MaintenancePostponeCount") |
| | | public Result<?> get3MaintenancePostponeCount(String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | List<Map<String, Object>> list = null; |
| | | if(USER_TYPE_4.equals(userType)){ |
| | | if(StringUtils.isNotBlank(productionCode)){ |
| | | String orgType = calibrationOrderService.findOrgType(productionCode); |
| | | if(ORG_TYPE_3.equals(orgType)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.get3MaintenancePostponeCount(area.getId()); |
| | | } |
| | | } |
| | | } |
| | | }else if(USER_TYPE_3.equals(userType)){ |
| | | if(StringUtils.isNotBlank(productionCode)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.get3MaintenancePostponeCount(area.getId()); |
| | | } |
| | | } |
| | | }else if(USER_TYPE_2.equals(userType)){ |
| | | String areaProductionCode = calibrationOrderService.findAreaProductionCode(user.getId()); |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, areaProductionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.get3MaintenancePostponeCount(area.getId()); |
| | | } |
| | | } |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | /** |
| | | * 工段级 三保超期数量 |
| | | * qsw 2024-3-20 |
| | | */ |
| | | @GetMapping("get3MaintenanceOverdueCount") |
| | | public Result<?> get3MaintenanceOverdueCount(String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | List<Map<String, Object>> list = null; |
| | | if(USER_TYPE_4.equals(userType)){ |
| | | if(StringUtils.isNotBlank(productionCode)){ |
| | | String orgType = calibrationOrderService.findOrgType(productionCode); |
| | | if(ORG_TYPE_3.equals(orgType)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.get3MaintenanceOverdueCount(area.getId()); |
| | | } |
| | | } |
| | | } |
| | | }else if(USER_TYPE_3.equals(userType)){ |
| | | if(StringUtils.isNotBlank(productionCode)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.get3MaintenanceOverdueCount(area.getId()); |
| | | } |
| | | } |
| | | }else if(USER_TYPE_2.equals(userType)){ |
| | | String areaProductionCode = calibrationOrderService.findAreaProductionCode(user.getId()); |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, areaProductionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.get3MaintenanceOverdueCount(area.getId()); |
| | | } |
| | | } |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | /** |
| | | *首页二保计划展示 |
| | | * qsw 2024-3-15 |
| | | */ |
| | |
| | | List<EquipmentMaintenancePlanDetail> equipmentMaintenancePlanDetails = equipmentMaintenancePlanDetailService.selectByMainId(equipmentMaintenancePlan.getId()); |
| | | for(EquipmentMaintenancePlanDetail equipmentMaintenancePlanDetail:equipmentMaintenancePlanDetails){ |
| | | MaintenanceStandard maintenanceStandard = maintenanceStandardService.getById(equipmentMaintenancePlanDetail.getStandardId()); |
| | | String num = sysIdentityService.getNumByTypeAndLength("DailyMaintenanceOrder",4); |
| | | String num = sysIdentityService.getNumByTypeAndLength("MaintenanceOrder",4); |
| | | DailyMaintenanceOrder dailyMaintenanceOrder = new DailyMaintenanceOrder(); |
| | | dailyMaintenanceOrder.setNum(num); |
| | | dailyMaintenanceOrder.setEquipmentId(maintenanceStandard.getEquipmentId()); |
| | |
| | | import org.jeecg.modules.eam.entity.PlanChangeApply; |
| | | import org.jeecg.modules.eam.service.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | |
| | | return super.importExcel(request, response, PlanChangeApply.class); |
| | | } |
| | | @PostMapping(value = "/addForPlan") |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Result<String> addForPlan(@RequestBody PlanChangeApply planChangeApply) { |
| | | DailyMaintenanceOrder dailyMaintenanceOrder = dailyMaintenanceOrderService |
| | | .getOne(new QueryWrapper<DailyMaintenanceOrder>() |
| | |
| | | .eq("maintenance_order_uda2",planChangeApply.getId()),false); |
| | | if(ObjectUtils.isNull(dailyMaintenanceOrder)){ |
| | | return Result.error("尚未生成工单,无需申请"); |
| | | }else if(!dailyMaintenanceOrder.getStatus().equals(CommonConstant.STATUS_1)){ |
| | | }else if(!dailyMaintenanceOrder.getStatus().equals("3")){ |
| | | return Result.error("工单已下达不允许进行变更"); |
| | | } |
| | | maintenancePlanDetailService.update(new UpdateWrapper<EquipmentMaintenancePlanDetail>().eq("id",planChangeApply.getId()).set("plan_start_time",planChangeApply.getPlanDelayTime())); |
| | |
| | | preInspection.setMeetProcessRequire(precisionInspection.getMeetProcessRequire()); |
| | | preInspection.setSparePart(precisionInspection.getSparePart()); |
| | | preInspection.setUseUnitDirectorUser(userId); |
| | | preInspection.setMeetProcessRequireRemark(precisionInspection.getMeetProcessRequireRemark()); |
| | | |
| | | maintenanceOrder.setPrecisionInspectionStatus("4"); |
| | | }else if("4".equals(precisionInspectionStatus)){ |
| | |
| | | @Excel(name = "第一次检", width = 15) |
| | | @ApiModelProperty(value = "第一次检") |
| | | private java.lang.String firstInspect; |
| | | @Excel(name = "第一次检未通过原因", width = 15) |
| | | @ApiModelProperty(value = "第一次检未通过原因") |
| | | private java.lang.String firstNotPass; |
| | | /**第二次检*/ |
| | | @Excel(name = "第二次检", width = 15) |
| | | @ApiModelProperty(value = "第二次检") |
| | | private java.lang.String secondInspect; |
| | | @Excel(name = "第二次检未通过原因", width = 15) |
| | | @ApiModelProperty(value = "第二次检未通过原因") |
| | | private java.lang.String secondNotPass; |
| | | /**delFlag*/ |
| | | @Excel(name = "delFlag", width = 15) |
| | | @ApiModelProperty(value = "delFlag") |
| | |
| | | @Excel(name = "能否满足加工工艺要求", width = 15) |
| | | @ApiModelProperty(value = "能否满足加工工艺要求") |
| | | private Integer meetProcessRequire; |
| | | @Excel(name = "能否满足加工工艺要求说明", width = 15) |
| | | @ApiModelProperty(value = "能否满足加工工艺要求说明") |
| | | private String meetProcessRequireRemark; |
| | | /**使用单位技术主管*/ |
| | | @Excel(name = "使用单位技术主管", width = 15) |
| | | @ApiModelProperty(value = "使用单位技术主管") |
| | |
| | | List<Map<String, Object>> getThisMonthMaintenanceFinishList(@Param("workCenterId")String workCenterId,@Param("areaId")String areaId); |
| | | |
| | | /** |
| | | *工段级 本月三保延期数量 |
| | | * qsw 2024-3-20 |
| | | */ |
| | | List<Map<String, Object>> get3MaintenancePostponeCount(@Param("areaId")String areaId); |
| | | |
| | | /** |
| | | *工段级 本月三保超期数量 |
| | | * qsw 2024-3-20 |
| | | */ |
| | | List<Map<String, Object>> get3MaintenanceOverdueCount(@Param("areaId")String areaId); |
| | | |
| | | /** |
| | | *首页二级保养展示页面 获取每一个中心下二级保养计划 |
| | | * qsw 2024-3-15 |
| | | */ |
| | |
| | | </select> |
| | | |
| | | <select id="getFactoryThisMonthMaintenanceFinishList" parameterType="String" resultType="Map"> |
| | | select count(0) as totalCount from mom_eam_daily_maintenance_order t1 left join mom_eam_equipment t2 on t1.equipment_id = t2.id |
| | | where t1.del_flag = '0' and t1.status = '5' and SUBSTRING(CONVERT(VARCHAR(10), t1.actual_end_time, 120), 1, 7) = SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 1, 7) |
| | | select count(0) as totalCount from mom_eam_daily_maintenance_order t1 left join mom_eam_equipment t2 on t1.equipment_id = t2.id left join mom_eam_maintenance_cycle t4 on t1.maintenance_cycle_id = t4.id |
| | | where t1.del_flag = '0' and t1.status = '5' and t4.maintenance_type = '3' and SUBSTRING(CONVERT(VARCHAR(10), t1.actual_end_time, 120), 1, 7) = SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 1, 7) |
| | | </select> |
| | | |
| | | <select id="getEquipmentTechnologyStatusList" parameterType="String" resultType="Map"> |
| | |
| | | </select> |
| | | |
| | | <select id="getThisMonthMaintenanceFinishList" parameterType="String" resultType="Map"> |
| | | select count(0) as totalCount from mom_eam_daily_maintenance_order t1 left join mom_eam_equipment t2 on t1.equipment_id = t2.id |
| | | where t1.del_flag = '0' and t1.status = '5' and SUBSTRING(CONVERT(VARCHAR(10), t1.actual_end_time, 120), 1, 7) = SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 1, 7) <if test="workCenterId != null and workCenterId != ''"> and t2.work_center_id = #{workCenterId} </if> <if test="areaId != null and areaId != ''"> and t2.area_id = #{areaId} </if> |
| | | select count(0) as totalCount from mom_eam_daily_maintenance_order t1 left join mom_eam_equipment t2 on t1.equipment_id = t2.id left join mom_eam_maintenance_cycle t4 on t1.maintenance_cycle_id = t4.id |
| | | where t1.del_flag = '0' and t1.status = '5' and t4.maintenance_type = '3' and SUBSTRING(CONVERT(VARCHAR(10), t1.actual_end_time, 120), 1, 7) = SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 1, 7) <if test="workCenterId != null and workCenterId != ''"> and t2.work_center_id = #{workCenterId} </if> <if test="areaId != null and areaId != ''"> and t2.area_id = #{areaId} </if> |
| | | </select> |
| | | |
| | | <select id="get3MaintenancePostponeCount" parameterType="String" resultType="Map"> |
| | | select count(0) as totalCount from (select DISTINCT t2.id from mom_eam_plan_change_apply t1 left join mom_eam_equipment t2 on t1.equipment_id = t2.id |
| | | where SUBSTRING(CONVERT(VARCHAR(10), t2.next_third_maintenance_time, 120), 1, 7) = SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 1, 7) and t2.area_id = #{areaId} ) t4 |
| | | </select> |
| | | |
| | | <select id="get3MaintenanceOverdueCount" parameterType="String" resultType="Map"> |
| | | SELECT |
| | | count(0) as totalCount |
| | | FROM |
| | | mom_eam_daily_maintenance_order t1 |
| | | LEFT JOIN mom_eam_equipment t2 ON t1.equipment_id = t2.id |
| | | left join mom_eam_maintenance_cycle t4 on t1.maintenance_cycle_id = t4.id |
| | | WHERE |
| | | t1.del_flag = '0' |
| | | and t1.status = '3' |
| | | and t4.maintenance_type = '3' |
| | | and SUBSTRING(CONVERT(VARCHAR(10), t1.plan_start_time, 120), 1, 10) < SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 1, 10) |
| | | and SUBSTRING(CONVERT(VARCHAR(10), t2.next_third_maintenance_time, 120), 1, 10) = SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 1, 10) |
| | | <if test="areaId != null and areaId != ''"> and t2.area_id = #{areaId} </if> |
| | | </select> |
| | | |
| | | <select id="getCenterTwoMaintenancePlanList" parameterType="String" resultType="Map"> |
| | |
| | | t3.name AS content, |
| | | t3.standard, |
| | | t4.first_inspect AS firstInspect, |
| | | t4.second_inspect AS secondInspect |
| | | t4.first_not_pass AS firstNotPass, |
| | | t4.second_inspect AS secondInspect, |
| | | t4.second_not_pass as secondNotPass |
| | | FROM |
| | | mom_eam_daily_maintenance_order_detail t1 |
| | | LEFT JOIN mom_eam_maintenance_standard_detail t2 ON t1.maintenance_standard_detail_id = t2.id |
| | |
| | | ISNULL(t1.each_tolerance,'0') AS eachTolerance, |
| | | ISNULL(t1.part_tolerance,'0') AS partTolerance, |
| | | ISNULL(t1.process_pass,'0') AS processPass, |
| | | ISNULL(t1.meet_process_require,'0') AS meetProcessRequire, |
| | | ISNULL(t1.judgment_result,'qualified') AS judgmentResult, |
| | | t1.meet_process_require AS meetProcessRequire, |
| | | t1.meet_process_require_remark AS meetProcessRequireRemark, |
| | | t1.remark, |
| | | t8.name AS equipmentName, |
| | | t8.model AS equipmentModel, |
| | |
| | | List<Map<String, Object>> getThisMonthMaintenanceFinishList(String workCenterId,String areaId); |
| | | |
| | | /** |
| | | *工段级 本月三保延期数量 |
| | | * qsw 2024-3-20 |
| | | */ |
| | | List<Map<String, Object>> get3MaintenancePostponeCount(String areaId); |
| | | |
| | | /** |
| | | *工段级 本月三保超期数量 |
| | | * qsw 2024-3-20 |
| | | */ |
| | | List<Map<String, Object>> get3MaintenanceOverdueCount(String areaId); |
| | | |
| | | /** |
| | | *首页二保计划展示 |
| | | * qsw 2024-3-15 |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | *工段级 本月三保延期数量 |
| | | * qsw 2024-3-20 |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> get3MaintenancePostponeCount(String areaId) { |
| | | return this.baseMapper.get3MaintenancePostponeCount(areaId); |
| | | } |
| | | |
| | | /** |
| | | *工段级 本月三保超期数量 |
| | | * qsw 2024-3-20 |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> get3MaintenanceOverdueCount(String areaId) { |
| | | return this.baseMapper.get3MaintenanceOverdueCount(areaId); |
| | | } |
| | | |
| | | /** |
| | | *首页二保计划展示 |
| | | * qsw 2024-3-15 |
| | | */ |