| | |
| | | if(StringUtils.isNotBlank(equipment.getEquipmentCategoryId())){ |
| | | queryWrapper.eq("equipment_category_id",equipment.getEquipmentCategoryId()); |
| | | } |
| | | if(StringUtils.isNotBlank(equipment.getWorkCenterId())){ |
| | | queryWrapper.eq("work_center_id",equipment.getWorkCenterId()); |
| | | } |
| | | queryWrapper.isNull("line_id"); |
| | | queryWrapper.eq("status","1"); |
| | | queryWrapper.eq("del_flag",0); |
| | |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * 设备保修 获取设备列表组件 |
| | | * qsw 2023-7-14 |
| | | */ |
| | | @GetMapping(value = "/getEquipmentTZList") |
| | | @PermissionData |
| | | public Result<IPage<Equipment>> getEquipmentTZList(Equipment equipment, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<Equipment> queryWrapper = QueryGenerator.initQueryWrapper(equipment, req.getParameterMap()); |
| | | Page<Equipment> page = new Page<Equipment>(pageNo, pageSize); |
| | | IPage<Equipment> pageList = equipmentService.getEquipmentTZList(page, equipment); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | @GetMapping(value = "/pageEquipment") |
| | | public Result<IPage<Equipment>> pageEquipment(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize, @RequestParam Map<String, Object> params) { |
| | | IPage<Equipment> pageList = equipmentService.pageEquipment(pageNo, pageSize, params); |
| | |
| | | return jsonObject; |
| | | } |
| | | |
| | | /** |
| | | * 生产设备平均故障间隔时间MTBF |
| | | */ |
| | | @GetMapping("/get2MTBF") |
| | | public JSONObject get2MTBF(@RequestParam Map<String, Object> query) throws ParseException { |
| | | List<Map<String, Object>> equipmentList = faultIntervalTimeService.getEquipmentList(query); |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * A类生产设备平均故障间隔时间MTBF |
| | | */ |
| | | @GetMapping("/getAMTBF") |
| | | public JSONObject getAMTBF(@RequestParam Map<String, Object> query) throws ParseException { |
| | | query.put("abc","A"); |
| | | List<Map<String, Object>> equipmentList = faultIntervalTimeService.getEquipmentList(query); |
| | | List<FaultIntervalTime> faultIntervalTimeList = new ArrayList<>(); |
| | | for (Map<String, Object> map : equipmentList) { |
| | | query.put("equipmentId",map.get("id")); |
| | | |
| | | List<Map<String, Object>> equipmentMTBF = faultIntervalTimeService.getEquipmentMTBF(query); |
| | | |
| | | FaultIntervalTime faultIntervalTime = new FaultIntervalTime(); |
| | | faultIntervalTime.setEquipmentId((String)map.get("id")); |
| | | faultIntervalTime.setEquipmentNum((String)map.get("num")); |
| | | faultIntervalTime.setEquipmentName((String)map.get("name")); |
| | | faultIntervalTime.setEquipmentModel((String)map.get("model")); |
| | | faultIntervalTime.setUserDepart((String)map.get("departName")); |
| | | if(equipmentMTBF.size()>0){ |
| | | faultIntervalTime.setTotalAvailableTime(equipmentMTBF.get(0).get("totalAvailableTime").toString()); |
| | | faultIntervalTime.setNoFaultTime(equipmentMTBF.get(0).get("noFaultTime").toString()); |
| | | faultIntervalTime.setFaultTime(equipmentMTBF.get(0).get("faultTime").toString()); |
| | | faultIntervalTime.setFaultNumber(equipmentMTBF.get(0).get("faultNumber").toString()); |
| | | faultIntervalTime.setAverageRepairTime(equipmentMTBF.get(0).get("averageRepairTime").toString()); |
| | | faultIntervalTime.setAverageFaultIntervalTime(equipmentMTBF.get(0).get("averageFaultIntervalTime").toString()); |
| | | faultIntervalTime.setRepairTime(equipmentMTBF.get(0).get("repairTime").toString()); |
| | | faultIntervalTimeList.add(faultIntervalTime); |
| | | }else{ |
| | | List<Map<String, Object>> mtbfTotalAvailableTime = faultIntervalTimeService.getMTBFTotalAvailableTime(query); |
| | | if(query.get("startTime") != "" && query.get("endTime") != ""){ |
| | | faultIntervalTime.setTotalAvailableTime(mtbfTotalAvailableTime.get(0).get("totalAvailableTime").toString()); |
| | | faultIntervalTime.setNoFaultTime(mtbfTotalAvailableTime.get(0).get("totalAvailableTime").toString()); |
| | | faultIntervalTime.setAverageFaultIntervalTime(mtbfTotalAvailableTime.get(0).get("totalAvailableTime").toString()); |
| | | }else{ |
| | | faultIntervalTime.setTotalAvailableTime("0"); |
| | | faultIntervalTime.setNoFaultTime("0"); |
| | | faultIntervalTime.setAverageFaultIntervalTime("0"); |
| | | } |
| | | faultIntervalTime.setFaultTime("0"); |
| | | faultIntervalTime.setFaultNumber("0"); |
| | | faultIntervalTime.setAverageRepairTime("0"); |
| | | faultIntervalTime.setRepairTime("0"); |
| | | faultIntervalTimeList.add(faultIntervalTime); |
| | | } |
| | | |
| | | } |
| | | // Map<String,Object> result= new HashMap<>(); |
| | | // IPage<FaultIntervalTime> pageData = new Page<FaultIntervalTime>(); |
| | | // List<FaultIntervalTime> list = faultIntervalTimeService.getMTBF(query); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("data",faultIntervalTimeList); |
| | | return jsonObject; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 关键、重要生产设备平均故障间隔时间MTBF |
| | | */ |
| | | @GetMapping("/getGJZYMTBF") |
| | | public JSONObject getGJZYMTBF(@RequestParam Map<String, Object> query) throws ParseException { |
| | | query.put("specificEquipment","true"); |
| | | List<Map<String, Object>> equipmentList = faultIntervalTimeService.getEquipmentList(query); |
| | | List<FaultIntervalTime> faultIntervalTimeList = new ArrayList<>(); |
| | | for (Map<String, Object> map : equipmentList) { |
| | | query.put("equipmentId",map.get("id")); |
| | | |
| | | List<Map<String, Object>> equipmentMTBF = faultIntervalTimeService.getEquipmentMTBF(query); |
| | | |
| | | FaultIntervalTime faultIntervalTime = new FaultIntervalTime(); |
| | | faultIntervalTime.setEquipmentId((String)map.get("id")); |
| | | faultIntervalTime.setEquipmentNum((String)map.get("num")); |
| | | faultIntervalTime.setEquipmentName((String)map.get("name")); |
| | | faultIntervalTime.setEquipmentModel((String)map.get("model")); |
| | | faultIntervalTime.setUserDepart((String)map.get("departName")); |
| | | if(equipmentMTBF.size()>0){ |
| | | faultIntervalTime.setTotalAvailableTime(equipmentMTBF.get(0).get("totalAvailableTime").toString()); |
| | | faultIntervalTime.setNoFaultTime(equipmentMTBF.get(0).get("noFaultTime").toString()); |
| | | faultIntervalTime.setFaultTime(equipmentMTBF.get(0).get("faultTime").toString()); |
| | | faultIntervalTime.setFaultNumber(equipmentMTBF.get(0).get("faultNumber").toString()); |
| | | faultIntervalTime.setAverageRepairTime(equipmentMTBF.get(0).get("averageRepairTime").toString()); |
| | | faultIntervalTime.setAverageFaultIntervalTime(equipmentMTBF.get(0).get("averageFaultIntervalTime").toString()); |
| | | faultIntervalTime.setRepairTime(equipmentMTBF.get(0).get("repairTime").toString()); |
| | | faultIntervalTimeList.add(faultIntervalTime); |
| | | }else{ |
| | | List<Map<String, Object>> mtbfTotalAvailableTime = faultIntervalTimeService.getMTBFTotalAvailableTime(query); |
| | | if(query.get("startTime") != "" && query.get("endTime") != ""){ |
| | | faultIntervalTime.setTotalAvailableTime(mtbfTotalAvailableTime.get(0).get("totalAvailableTime").toString()); |
| | | faultIntervalTime.setNoFaultTime(mtbfTotalAvailableTime.get(0).get("totalAvailableTime").toString()); |
| | | faultIntervalTime.setAverageFaultIntervalTime(mtbfTotalAvailableTime.get(0).get("totalAvailableTime").toString()); |
| | | }else{ |
| | | faultIntervalTime.setTotalAvailableTime("0"); |
| | | faultIntervalTime.setNoFaultTime("0"); |
| | | faultIntervalTime.setAverageFaultIntervalTime("0"); |
| | | } |
| | | faultIntervalTime.setFaultTime("0"); |
| | | faultIntervalTime.setFaultNumber("0"); |
| | | faultIntervalTime.setAverageRepairTime("0"); |
| | | faultIntervalTime.setRepairTime("0"); |
| | | faultIntervalTimeList.add(faultIntervalTime); |
| | | } |
| | | |
| | | } |
| | | // Map<String,Object> result= new HashMap<>(); |
| | | // IPage<FaultIntervalTime> pageData = new Page<FaultIntervalTime>(); |
| | | // List<FaultIntervalTime> list = faultIntervalTimeService.getMTBF(query); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("data",faultIntervalTimeList); |
| | | return jsonObject; |
| | | } |
| | | |
| | | /** |
| | | * 各生产单位 生产设备平均故障间隔时间MTBF |
| | | */ |
| | | @GetMapping("/getCenterMTBF") |
| | | public JSONObject getCenterMTBF(@RequestParam Map<String, Object> query) throws ParseException { |
| | | List<Map<String, Object>> workCenterList = faultIntervalTimeService.getWorkCenterList(query); |
| | | List<FaultIntervalTime> faultIntervalTimeList = new ArrayList<>(); |
| | | for (Map<String, Object> map : workCenterList) { |
| | | query.put("workCenterId",map.get("workCenterId")); |
| | | |
| | | List<Map<String, Object>> equipmentMTBF = faultIntervalTimeService.getCenterEquipmentMTBF(query); |
| | | |
| | | FaultIntervalTime faultIntervalTime = new FaultIntervalTime(); |
| | | // faultIntervalTime.setEquipmentId((String)map.get("id")); |
| | | // faultIntervalTime.setEquipmentNum((String)map.get("num")); |
| | | // faultIntervalTime.setEquipmentName((String)map.get("name")); |
| | | // faultIntervalTime.setEquipmentModel((String)map.get("model")); |
| | | faultIntervalTime.setUserDepart((String)map.get("workCenterName")); |
| | | if(equipmentMTBF.size()>0){ |
| | | faultIntervalTime.setTotalAvailableTime(equipmentMTBF.get(0).get("totalAvailableTime").toString()); |
| | | faultIntervalTime.setNoFaultTime(equipmentMTBF.get(0).get("noFaultTime").toString()); |
| | | faultIntervalTime.setFaultTime(equipmentMTBF.get(0).get("faultTime").toString()); |
| | | faultIntervalTime.setFaultNumber(equipmentMTBF.get(0).get("faultNumber").toString()); |
| | | faultIntervalTime.setAverageRepairTime(equipmentMTBF.get(0).get("averageRepairTime").toString()); |
| | | faultIntervalTime.setAverageFaultIntervalTime(equipmentMTBF.get(0).get("averageFaultIntervalTime").toString()); |
| | | faultIntervalTime.setRepairTime(equipmentMTBF.get(0).get("repairTime").toString()); |
| | | faultIntervalTimeList.add(faultIntervalTime); |
| | | }else{ |
| | | List<Map<String, Object>> mtbfTotalAvailableTime = faultIntervalTimeService.getCenterMTBFTotalAvailableTime(query); |
| | | if(query.get("startTime") != "" && query.get("endTime") != ""){ |
| | | faultIntervalTime.setTotalAvailableTime(mtbfTotalAvailableTime.get(0).get("totalAvailableTime").toString()); |
| | | faultIntervalTime.setNoFaultTime(mtbfTotalAvailableTime.get(0).get("totalAvailableTime").toString()); |
| | | faultIntervalTime.setAverageFaultIntervalTime(mtbfTotalAvailableTime.get(0).get("totalAvailableTime").toString()); |
| | | }else{ |
| | | faultIntervalTime.setTotalAvailableTime("0"); |
| | | faultIntervalTime.setNoFaultTime("0"); |
| | | faultIntervalTime.setAverageFaultIntervalTime("0"); |
| | | } |
| | | faultIntervalTime.setFaultTime("0"); |
| | | faultIntervalTime.setFaultNumber("0"); |
| | | faultIntervalTime.setAverageRepairTime("0"); |
| | | faultIntervalTime.setRepairTime("0"); |
| | | faultIntervalTimeList.add(faultIntervalTime); |
| | | } |
| | | |
| | | } |
| | | // Map<String,Object> result= new HashMap<>(); |
| | | // IPage<FaultIntervalTime> pageData = new Page<FaultIntervalTime>(); |
| | | // List<FaultIntervalTime> list = faultIntervalTimeService.getMTBF(query); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("data",faultIntervalTimeList); |
| | | return jsonObject; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 各生产单位 A类设备平均故障间隔时间MTBF |
| | | */ |
| | | @GetMapping("/getCenterAMTBF") |
| | | public JSONObject getCenterAMTBF(@RequestParam Map<String, Object> query) throws ParseException { |
| | | query.put("abc","A"); |
| | | List<Map<String, Object>> workCenterList = faultIntervalTimeService.getWorkCenterList(query); |
| | | List<FaultIntervalTime> faultIntervalTimeList = new ArrayList<>(); |
| | | for (Map<String, Object> map : workCenterList) { |
| | | query.put("workCenterId",map.get("workCenterId")); |
| | | |
| | | List<Map<String, Object>> equipmentMTBF = faultIntervalTimeService.getCenterEquipmentMTBF(query); |
| | | |
| | | FaultIntervalTime faultIntervalTime = new FaultIntervalTime(); |
| | | // faultIntervalTime.setEquipmentId((String)map.get("id")); |
| | | // faultIntervalTime.setEquipmentNum((String)map.get("num")); |
| | | // faultIntervalTime.setEquipmentName((String)map.get("name")); |
| | | // faultIntervalTime.setEquipmentModel((String)map.get("model")); |
| | | faultIntervalTime.setUserDepart((String)map.get("workCenterName")); |
| | | if(equipmentMTBF.size()>0){ |
| | | faultIntervalTime.setTotalAvailableTime(equipmentMTBF.get(0).get("totalAvailableTime").toString()); |
| | | faultIntervalTime.setNoFaultTime(equipmentMTBF.get(0).get("noFaultTime").toString()); |
| | | faultIntervalTime.setFaultTime(equipmentMTBF.get(0).get("faultTime").toString()); |
| | | faultIntervalTime.setFaultNumber(equipmentMTBF.get(0).get("faultNumber").toString()); |
| | | faultIntervalTime.setAverageRepairTime(equipmentMTBF.get(0).get("averageRepairTime").toString()); |
| | | faultIntervalTime.setAverageFaultIntervalTime(equipmentMTBF.get(0).get("averageFaultIntervalTime").toString()); |
| | | faultIntervalTime.setRepairTime(equipmentMTBF.get(0).get("repairTime").toString()); |
| | | faultIntervalTimeList.add(faultIntervalTime); |
| | | }else{ |
| | | List<Map<String, Object>> mtbfTotalAvailableTime = faultIntervalTimeService.getCenterMTBFTotalAvailableTime(query); |
| | | if(query.get("startTime") != "" && query.get("endTime") != ""){ |
| | | faultIntervalTime.setTotalAvailableTime(mtbfTotalAvailableTime.get(0).get("totalAvailableTime").toString()); |
| | | faultIntervalTime.setNoFaultTime(mtbfTotalAvailableTime.get(0).get("totalAvailableTime").toString()); |
| | | faultIntervalTime.setAverageFaultIntervalTime(mtbfTotalAvailableTime.get(0).get("totalAvailableTime").toString()); |
| | | }else{ |
| | | faultIntervalTime.setTotalAvailableTime("0"); |
| | | faultIntervalTime.setNoFaultTime("0"); |
| | | faultIntervalTime.setAverageFaultIntervalTime("0"); |
| | | } |
| | | faultIntervalTime.setFaultTime("0"); |
| | | faultIntervalTime.setFaultNumber("0"); |
| | | faultIntervalTime.setAverageRepairTime("0"); |
| | | faultIntervalTime.setRepairTime("0"); |
| | | faultIntervalTimeList.add(faultIntervalTime); |
| | | } |
| | | |
| | | } |
| | | // Map<String,Object> result= new HashMap<>(); |
| | | // IPage<FaultIntervalTime> pageData = new Page<FaultIntervalTime>(); |
| | | // List<FaultIntervalTime> list = faultIntervalTimeService.getMTBF(query); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("data",faultIntervalTimeList); |
| | | return jsonObject; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | orderActualMaterial.setEquipmentId(equipmentId); |
| | | maintenanceOrderActualMaterialService.save(orderActualMaterial); |
| | | //更新出库单的可使用数量 |
| | | List<SparePartOutboundDetail> sparePartOutboundDetailList = sparePartOutboundDetailService.lambdaQuery().eq(SparePartOutboundDetail::getSparePartOutboundId,orderActualMaterial.getOutboundOrderId()) |
| | | .eq(SparePartOutboundDetail::getSparePartId,orderActualMaterial.getSparePartId()).eq(SparePartOutboundDetail::getDelFlag, CommonConstant.DEL_FLAG_0).list(); |
| | | if(CollectionUtils.isNotEmpty(sparePartOutboundDetailList)){ |
| | | SparePartOutboundDetail sparePartOutboundDetail = sparePartOutboundDetailList.get(0); |
| | | sparePartOutboundDetail.setUseQuantity(orderActualMaterial.getQuantity()); |
| | | sparePartOutboundDetailService.updateById(sparePartOutboundDetail); |
| | | } |
| | | // List<SparePartOutboundDetail> sparePartOutboundDetailList = sparePartOutboundDetailService.lambdaQuery().eq(SparePartOutboundDetail::getSparePartOutboundId,orderActualMaterial.getOutboundOrderId()) |
| | | // .eq(SparePartOutboundDetail::getSparePartId,orderActualMaterial.getSparePartId()).eq(SparePartOutboundDetail::getDelFlag, CommonConstant.DEL_FLAG_0).list(); |
| | | // if(CollectionUtils.isNotEmpty(sparePartOutboundDetailList)){ |
| | | // SparePartOutboundDetail sparePartOutboundDetail = sparePartOutboundDetailList.get(0); |
| | | // sparePartOutboundDetail.setUseQuantity(orderActualMaterial.getQuantity()); |
| | | // sparePartOutboundDetailService.updateById(sparePartOutboundDetail); |
| | | // } |
| | | } |
| | | 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.common.util.DateUtils; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.mapper.RepairOrderMapper; |
| | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | repairOrder.getCreateStartTime(), |
| | | repairOrder.getCreateEndTime(), |
| | | repairOrder.getEquipmentImportanceId(), |
| | | repairOrder.getFaultCause()); |
| | | repairOrder.getFaultCause(), |
| | | null |
| | | ); |
| | | |
| | | // Step.3 AutoPoi 导出Excel |
| | | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
| | |
| | | return Result.ok(faultCauseBar); |
| | | } |
| | | |
| | | /** |
| | | * 设备故障折现图 |
| | | * qsw 2024-7-24 |
| | | */ |
| | | @GetMapping("getEquipmentFaultCause") |
| | | public Result<?> getEquipmentFaultCause(@RequestParam Map<String, Object> params) { |
| | | String faultStartTime = (String)params.get("faultStartTime"); |
| | | if(StringUtils.isBlank(faultStartTime)){ |
| | | Date dayAfter = DateUtils.getDayAfter(new Date(),15); |
| | | params.put("faultStartTime",DateUtils.date2Str(DateUtils.getDayAfter(new Date(),-15),new SimpleDateFormat("yyyy-MM-dd hh:MM:ss"))); |
| | | params.put("faultEndTime", DateUtils.getCurrentDateStr()+" 23:59:59"); |
| | | } |
| | | List<Map<String, Object>> equipmentFaultCause = repairOrderService.getEquipmentFaultCause(params); |
| | | return Result.ok(equipmentFaultCause); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * MTPF |
| | |
| | | /**删除状态(0-正常,1-已删除)*/ |
| | | @Excel(name = "删除状态(0-正常,1-已删除)", width = 15) |
| | | @ApiModelProperty(value = "删除状态(0-正常,1-已删除)") |
| | | @TableLogic |
| | | private Integer delFlag = CommonConstant.DEL_FLAG_0; |
| | | /**备注*/ |
| | | @Excel(name = "备注", width = 15) |
| | |
| | | */ |
| | | public interface DailyInspectionStandardMapper extends BaseMapper<DailyInspectionStandard> { |
| | | |
| | | IPage<Map<String, Object>> getInspectionStandardPage(IPage<Map> pageData, @Param("num") String num,@Param("name") String name,@Param("versionStatus") String versionStatus); |
| | | IPage<Map<String, Object>> getInspectionStandardPage(IPage<Map> pageData, @Param("num") String num,@Param("name") String name,@Param("versionStatus") String versionStatus,@Param("workCenterIds")List<String> workCenterIds); |
| | | |
| | | /** |
| | | *创建日常点检工单获取,日常点检标准 |
| | |
| | | @Param("equipNums") List<String> equipNums, |
| | | @Param("sql")String sql |
| | | ); |
| | | |
| | | List<Equipment> getEquipmentTZList( Page<Equipment> page, |
| | | @Param("num") String num, |
| | | @Param("name")String name, |
| | | @Param("model")String model, |
| | | @Param("workCenterIds")List<String> workCenterIds, |
| | | @Param("factoryModelId")String factoryModelId, |
| | | @Param("areaId")String areaId, |
| | | @Param("manageId")String manageId, |
| | | @Param("useId")String useId, |
| | | @Param("equipmentImportanceId")String equipmentImportanceId, |
| | | @Param("technologyStatus")String technologyStatus, |
| | | @Param("equipmentStatus")String equipmentStatus, |
| | | @Param("specificEquipment")String specificEquipment, |
| | | @Param("warrantyStart")Date warrantyStart, |
| | | @Param("warrantyEnd")Date warrantyEnd, |
| | | @Param("lineId")String lineId, |
| | | @Param("isLineEquip")String isLineEquip, |
| | | @Param("isLine")String isLine, |
| | | @Param("equipmentCategoryId")String equipmentCategoryId, |
| | | @Param("equipNums") List<String> equipNums, |
| | | @Param("sql")String sql |
| | | ); |
| | | List<DailyInspectionStandardDetail> getStandardList(Page<DailyInspectionStandardDetail> page,@Param("mainId") String mainId,@Param("type")String type); |
| | | } |
| | |
| | | |
| | | List<Map<String, Object>> getEquipmentList(@Param("params")Map<String, Object> params); |
| | | |
| | | List<Map<String, Object>> getWorkCenterList(@Param("params")Map<String, Object> params); |
| | | |
| | | List<Map<String, Object>> getEquipmentMTBF(@Param("params")Map<String, Object> params); |
| | | |
| | | List<Map<String, Object>> getMTBFTotalAvailableTime(@Param("params")Map<String, Object> params); |
| | | |
| | | List<Map<String, Object>> getCenterEquipmentMTBF(@Param("params")Map<String, Object> params); |
| | | |
| | | List<Map<String, Object>> getCenterMTBFTotalAvailableTime(@Param("params")Map<String, Object> params); |
| | | } |
| | |
| | | @Param("createStartTime")Date createStartTime, |
| | | @Param("createEndTime")Date createEndTime, |
| | | @Param("equipmentImportanceId")String equipmentImportanceId, |
| | | @Param("faultCause")String faultCause |
| | | @Param("faultCause")String faultCause, |
| | | @Param("workCenterIds")List<String> workCenterIds |
| | | |
| | | |
| | | ); |
| | |
| | | |
| | | List<Map<String, Object>> getFaultCauseBar(@Param("params") Map<String,Object> params); |
| | | |
| | | List<Map<String, Object>> getEquipmentFaultCause(@Param("params") Map<String,Object> params); |
| | | |
| | | IPage<Map<String, Object>> getMTPF(IPage<Map> pageData,@Param("params") Map<String,Object> params); |
| | | } |
| | |
| | | <if test="versionStatus == 'null' "> |
| | | and t1.version_status='2' |
| | | </if> |
| | | <if test="workCenterIds != null"> |
| | | and t2.work_center_id in |
| | | <foreach collection="workCenterIds" open="(" separator="," close=")" item="workCenterId"> |
| | | #{workCenterId} |
| | | </foreach> |
| | | </if> |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | | <select id="getInspectionStandardMapList" resultType="java.util.Map"> |
| | |
| | | <if test="params.finishEndTime != null"> |
| | | and t1.actual_end_time <= #{params.finishEndTime} |
| | | </if> |
| | | <if test="params.workCenterIds != null"> |
| | | and t3.work_center_id in |
| | | <foreach collection="params.workCenterIds" open="(" separator="," close=")" item="workCenterId"> |
| | | #{workCenterId} |
| | | </foreach> |
| | | </if> |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | | |
| | |
| | | <if test="params.finishEndTime != null"> |
| | | and t1.actual_end_time <= #{params.finishEndTime} |
| | | </if> |
| | | <if test="params.workCenterIds != null"> |
| | | and t3.work_center_id in |
| | | <foreach collection="params.workCenterIds" open="(" separator="," close=")" item="workCenterId"> |
| | | #{workCenterId} |
| | | </foreach> |
| | | </if> |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | | |
| | |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |
| | | |
| | | <select id="getEquipmentTZList" resultType="org.jeecg.modules.eam.entity.Equipment"> |
| | | select |
| | | t1.id id, |
| | | t1.num num, |
| | | t1.name name, |
| | | t1.model model, |
| | | t1.specification specification, |
| | | t1.equipment_status equipmentStatus, |
| | | t1.technology_status technologyStatus, |
| | | t1.asset_number assetNumber, |
| | | t1.equipment_category_id equipmentCategoryId, |
| | | t1.specific_equipment specificEquipment, |
| | | t1.equipment_photo equipmentPhoto, |
| | | t1.constructor_id constructorId, |
| | | t1.supplier_id supplierId, |
| | | t1.factory_number factoryNumber, |
| | | t1.leave_factory_date leaveFactoryDate, |
| | | t1.acceptance_check_date acceptanceCheckDate, |
| | | t1.affiliation_id affiliationId, |
| | | t1.manage_id manageId, |
| | | t1.manager manager, |
| | | t1.use_id useId, |
| | | t1.functionary functionary, |
| | | t1.location location, |
| | | t1.equipment_importance_id equipmentImportanceId, |
| | | t1.process_parameters processParameters, |
| | | t1.process_parameters_template_id processParametersTemplateId, |
| | | t1.precision_parameters precisionParameters, |
| | | t1.precision_parameters_template_id precisionParametersTemplateId, |
| | | t1.verification verification, |
| | | t1.verification_period verificationPeriod, |
| | | t1.last_verification_date lastVerificationDate, |
| | | t1.next_verification_date nextVerificationDate, |
| | | t1.status status, |
| | | t1.remark remark, |
| | | t1.equipment_uda1 equipmentUda1, |
| | | t1.equipment_uda2 equipmentUda2, |
| | | t1.equipment_uda3 equipmentUda3, |
| | | t1.equipment_uda4 equipmentUda4, |
| | | t1.equipment_uda5 equipmentUda5, |
| | | t1.create_by createBy, |
| | | t1.create_time createTime, |
| | | t1.update_by updateBy, |
| | | t1.update_time updateTime, |
| | | t1.del_flag delFlag, |
| | | t1.team_id teamId, |
| | | t1.source_id sourceId, |
| | | t1.fund_source fundSource, |
| | | t1.factory_no factoryNo, |
| | | t1.mfr mfr, |
| | | t1.source_country sourceCountry, |
| | | t1.gpo gpo, |
| | | t1.key_equipment_identification keyEquipmentIdentification, |
| | | t1.security_configuration securityConfiguration, |
| | | t1.cooling_system coolingSystem, |
| | | t1.fire_extinguisher fireExtinguisher, |
| | | t1.fire_extinguisher_validity_period fireExtinguisherValidityPeriod, |
| | | t1.operating_system operatingSystem, |
| | | t1.system system, |
| | | t1.port port, |
| | | t1.coordinate_num coordinateNum, |
| | | t1.project_approval_no projectApprovalNo, |
| | | t1.standard_a standardA, |
| | | t1.standard_b standardB, |
| | | t1.standard_c standardC, |
| | | t1.standard_d standardD, |
| | | t1.standard_e standardE, |
| | | t1.standard_f standardF, |
| | | t1.factory_model_id factoryModelId, |
| | | t1.work_center_id workCenterId, |
| | | t1.warranty_start warrantyStart, |
| | | t1.warranty_end warrantyEnd, |
| | | t1.property_status propertyStatus, |
| | | t1.check_period checkPeriod, |
| | | t1.next_technology_status_qualification_time nextTechnologyStatusQualificationTime, |
| | | t1.technology_status_qualification_time technologyStatusQualificationTime, |
| | | t1.technology_status_verification_type technologyStatusVerificationType, |
| | | t1.line_id lineId, |
| | | t1.is_meta isMeta, |
| | | t1.id showId, |
| | | t1.is_line isLine, |
| | | t1.is_line_equip isLineEquip, |
| | | t1.is_judging isJudging, |
| | | t1.area_id areaId, |
| | | 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 |
| | | left join(select count(id) sumOfEquipment,line_id from mom_eam_equipment where del_flag=0 group by line_id) t3 on t3.line_id = t1.id |
| | | where t1.del_flag = 0 |
| | | <if test="equipmentCategoryId != null and equipmentCategoryId != ''"> |
| | | and t1.equipment_category_id = #{equipmentCategoryId} |
| | | </if> |
| | | <if test="num != null and num != ''"> |
| | | and t1.num like concat('%',#{num},'%') |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and t1.name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="model != null and model != ''"> |
| | | and t1.model like concat('%',#{model},'%') |
| | | </if> |
| | | <if test="workCenterIds != null"> |
| | | and t1.work_center_id in |
| | | <foreach collection="workCenterIds" open="(" separator="," close=")" item="workCenterId"> |
| | | #{workCenterId} |
| | | </foreach> |
| | | </if> |
| | | -- 根据areaId查询设备 |
| | | <if test="areaId != null and areaId != ''"> |
| | | and t1.area_id = #{areaId} |
| | | </if> |
| | | <if test="factoryModelId != null and factoryModelId != ''"> |
| | | and t1.factory_model_id = #{factoryModelId} |
| | | </if> |
| | | <if test="manageId != null and manageId != ''"> |
| | | and t1.manage_id = #{manageId} |
| | | </if> |
| | | <if test="useId != null and useId != ''"> |
| | | and t1.use_id = #{useId} |
| | | </if> |
| | | <if test="equipmentImportanceId != null and equipmentImportanceId != ''"> |
| | | and t1. equipment_importance_id = #{equipmentImportanceId} |
| | | </if> |
| | | <if test="technologyStatus != null and technologyStatus != ''"> |
| | | and t1.technology_status = #{technologyStatus} |
| | | </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} |
| | | </if> |
| | | <if test="equipNums.size!=0"> |
| | | and t1.num in |
| | | <foreach collection="equipNums" open="(" separator="," close=")" item="num"> |
| | | #{num} |
| | | </foreach> |
| | | </if> |
| | | <if test="warrantyStart != null"> |
| | | and DATEDIFF(day,t1.warranty_start,#{warrantyStart})=0 |
| | | </if> |
| | | <if test="warrantyEnd != null"> |
| | | and DATEDIFF(day,t1.warranty_end,#{warrantyEnd})=0 |
| | | </if> |
| | | <if test="sql != null and sql != ''"> |
| | | and t2.equipment_category_uda1 = #{sql} |
| | | </if> |
| | | <if test="lineId != null and lineId != ''"> |
| | | and t1.line_id = #{lineId} |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |
| | | <!-- order by (CASE WHEN t1.is_meta='yes' then GETDATE() else t1.create_time end) desc--> |
| | | <select id="getStandardList" resultType="org.jeecg.modules.eam.entity.DailyInspectionStandardDetail"> |
| | | select t9.* from ( select |
| | |
| | | #{num} |
| | | </foreach> |
| | | </if> |
| | | <if test="params.workCenterIds != null"> |
| | | and t2.work_center_id in |
| | | <foreach collection="params.workCenterIds" open="(" separator="," close=")" item="workCenterId"> |
| | | #{workCenterId} |
| | | </foreach> |
| | | </if> |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | | <select id="exportList" resultType="org.jeecg.modules.eam.vo.RepairReportExportVo"> |
| | |
| | | t2.depart_name as departName |
| | | FROM |
| | | mom_eam_equipment t1 |
| | | LEFT JOIN sys_depart t2 ON t1.use_id = t2.id |
| | | LEFT JOIN mom_base_area t2 ON t1.work_center_id = t2.id |
| | | WHERE |
| | | t1.del_flag = '0' |
| | | <if test="params.useDepartName != null and params.useDepartName != ''"> |
| | | and t2.depart_name like concat('%',#{params.useDepartName},'%') |
| | | and t2.name =#{params.useDepartName} |
| | | </if> |
| | | <if test="params.useDepartName == ''"> |
| | | and t2.depart_name = '-1' |
| | | <if test="params.abc != null and params.abc != ''"> |
| | | and t1.equipment_importance_id =#{params.abc} |
| | | </if> |
| | | |
| | | <if test="params.specificEquipment != null and params.specificEquipment != ''"> |
| | | and t1.specific_equipment in ('0','1','2') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getWorkCenterList" parameterType="Map" resultType="Map"> |
| | | SELECT COUNT |
| | | ( t1.work_center_id ), |
| | | t1.work_center_id as workCenterId, |
| | | t2.name as workCenterName |
| | | FROM |
| | | mom_eam_equipment t1 |
| | | LEFT JOIN mom_base_area t2 ON t1.work_center_id = t2.id |
| | | WHERE t2.type = '1' and t1.work_center_id IS NOT NULL |
| | | <if test="params.abc != null and params.abc != ''"> |
| | | and t1.equipment_importance_id =#{params.abc} |
| | | </if> |
| | | <if test="params.useDepartName != null and params.useDepartName != ''"> |
| | | and t2.name =#{params.useDepartName} |
| | | </if> |
| | | GROUP BY t1.work_center_id,t2.name |
| | | </select> |
| | | |
| | | <!-- <if test="params.useDepartName == ''">--> |
| | | <!-- and t2.depart_name = '-1'--> |
| | | <!-- </if>--> |
| | | |
| | | <select id="getEquipmentMTBF" parameterType="Map" resultType="Map"> |
| | | SELECT |
| | |
| | | <select id="getMTBFTotalAvailableTime" parameterType="Map" resultType="Map"> |
| | | select datediff( HOUR, #{params.startTime}, #{params.endTime} ) + 24 AS totalAvailableTime |
| | | </select> |
| | | |
| | | <select id="getCenterEquipmentMTBF" parameterType="Map" resultType="Map"> |
| | | SELECT |
| | | COUNT(tt.workCenterId) AS faultNumber, |
| | | tt.totalAvailableTime * COUNT(tt.workCenterId) as totalAvailableTime, |
| | | SUM(tt.faultTime) * COUNT(tt.workCenterId) AS faultTime, |
| | | SUM(tt.repairTime) * COUNT(tt.workCenterId) AS repairTime, |
| | | SUM(tt.noFaultTime) * COUNT(tt.workCenterId) AS noFaultTime, |
| | | SUM(tt.repairTime) /COUNT(tt.workCenterId) * COUNT(tt.workCenterId) AS averageRepairTime, |
| | | SUM(tt.noFaultTime) /COUNT(tt.workCenterId) * COUNT(tt.workCenterId) AS averageFaultIntervalTime |
| | | FROM( |
| | | SELECT |
| | | t3.work_center_id as workCenterId, |
| | | datediff( HOUR, #{params.startTime}, #{params.endTime} ) + 24 AS totalAvailableTime, |
| | | datediff( HOUR, isnull( t1.fault_time, GETDATE( ) ), isnull( t1.accept_time, GETDATE( ) ) ) AS faultTime, |
| | | datediff( HOUR, isnull( t2.actual_start_time, GETDATE( ) ), isnull( t2.actual_end_time, GETDATE( ) ) ) AS repairTime, |
| | | (datediff( HOUR, #{params.startTime}, #{params.endTime}) + 24) - datediff( HOUR, isnull( t1.fault_time, GETDATE( ) ), isnull( t1.accept_time, GETDATE( ) ) ) AS noFaultTime |
| | | FROM |
| | | mom_eam_equipment_report_repair t1 |
| | | LEFT JOIN mom_eam_repair_order t2 ON t2.report_repair_id = t1.id |
| | | left join mom_eam_equipment t3 on t1.equipment_id = t3.id |
| | | WHERE 1=1 |
| | | AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.fault_time, 120 ), 1, 10 ) >= #{params.startTime} |
| | | AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.fault_time, 120 ), 1, 10 ) <= #{params.endTime} |
| | | AND t3.work_center_id = #{params.workCenterId} |
| | | ) AS tt |
| | | GROUP BY |
| | | tt.workCenterId,tt.totalAvailableTime |
| | | </select> |
| | | |
| | | <select id="getCenterMTBFTotalAvailableTime" parameterType="Map" resultType="Map"> |
| | | select datediff( HOUR, #{params.startTime}, #{params.endTime} ) + 24 AS totalAvailableTime |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="params.inspectionEndTime != null"> |
| | | and t1.actual_end_time <= #{params.inspectionEndTime} |
| | | </if> |
| | | <if test="params.workCenterIds != null"> |
| | | and t2.work_center_id in |
| | | <foreach collection="params.workCenterIds" open="(" separator="," close=")" item="workCenterId"> |
| | | #{workCenterId} |
| | | </foreach> |
| | | </if> |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | | |
| | |
| | | t1.maintenance_order_id maintenanceOrderId, |
| | | t1.equipment_id equipmentId, |
| | | t1.outbound_order_detail_id outboundOrderDetailId, |
| | | t2.id as sparePartId, |
| | | t1.spare_part_id as sparePartId, |
| | | t1.quantity, |
| | | t1.is_lock isLock, |
| | | t2.num as sparePartNum, |
| | |
| | | t2.specification as specification, |
| | | t3.name as mainUnitName, |
| | | t4.name as constructorName, |
| | | t6.num num |
| | | t6.num num, |
| | | t1.smoam_uda1 smoamUda1, |
| | | t1.smoam_uda2 smoamUda2 |
| | | FROM |
| | | mom_eam_maintenance_order_actual_material t1 |
| | | LEFT JOIN mom_eam_spare_part t2 ON t1.spare_part_id = t2.id |
| | |
| | | left join mom_base_constructor t4 on t4.id = t2.constructor_id |
| | | left join mom_eam_spare_part_outbound_detail t5 on t1.outbound_order_detail_id = t5.id |
| | | left join mom_eam_spare_part_outbound t6 on t6.id = t5.spare_part_outbound_id |
| | | WHERE t1.del_flag = 0 and t2.del_flag = 0 |
| | | WHERE t1.del_flag = 0 |
| | | <if test="params.maintenanceOrderId != null and params.maintenanceOrderId != ''"> |
| | | and t1.maintenance_order_id = #{params.maintenanceOrderId} |
| | | </if> |
| | |
| | | <if test="params.maintenanceType != null and params.maintenanceType != ''"> |
| | | and t1.maintenance_type = #{params.maintenanceType} |
| | | </if> |
| | | <if test="params.workCenterIds != null"> |
| | | and t2.work_center_id in |
| | | <foreach collection="params.workCenterIds" open="(" separator="," close=")" item="workCenterId"> |
| | | #{workCenterId} |
| | | </foreach> |
| | | </if> |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="createEndTime != null"> |
| | | and t1.create_time <= #{createEndTime} |
| | | </if> |
| | | |
| | | <if test="workCenterIds != null"> |
| | | and t2.work_center_id in |
| | | <foreach collection="workCenterIds" open="(" separator="," close=")" item="workCenterId"> |
| | | #{workCenterId} |
| | | </foreach> |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |
| | | |
| | |
| | | t1.del_flag = 0 |
| | | AND t2.del_flag = 0 |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t11.num = #{params.equipmentNum} |
| | | and t11.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.useId != null and params.useId != ''"> |
| | | and t11.use_id = #{params.useId} |
| | | </if> |
| | | <if test="params.faultStartTime != null"> |
| | | and t2.create_time >= #{params.faultStartTime} |
| | |
| | | t1.del_flag = 0 |
| | | AND t2.del_flag = 0 |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t11.num = #{params.equipmentNum} |
| | | and t11.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.useId != null and params.useId != ''"> |
| | | and t11.use_id = #{params.useId} |
| | | </if> |
| | | <if test="params.faultStartTime != null"> |
| | | and t2.create_time >= #{params.faultStartTime} |
| | |
| | | </if> |
| | | ) t4 ON t3.item_value = t4.repair_order_fault_analysis_uda2 |
| | | group by t3.item_text |
| | | </select> |
| | | |
| | | <select id="getEquipmentFaultCause" parameterType="Map" resultType="Map"> |
| | | select count(SUBSTRING(CONVERT(VARCHAR(10), t1.fault_time, 120), 1, 10)) as '设备故障次数', |
| | | SUBSTRING(CONVERT(VARCHAR(10), t1.fault_time, 120), 1, 10) as type from mom_eam_equipment_report_repair t1 |
| | | left join mom_eam_equipment t2 on t1.equipment_id = t2.id |
| | | where 1=1 |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t2.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.useId != null and params.useId != ''"> |
| | | and t2.use_id = #{params.useId} |
| | | </if> |
| | | <if test="params.faultStartTime != null"> |
| | | and t1.fault_time >= #{params.faultStartTime} |
| | | </if> |
| | | <if test="params.faultEndTime != null"> |
| | | and t1.fault_time <= #{params.faultEndTime} |
| | | </if> |
| | | GROUP BY SUBSTRING(CONVERT(VARCHAR(10), t1.fault_time, 120), 1, 10) |
| | | </select> |
| | | |
| | | <select id="getMTPF" parameterType="Map" resultType="Map"> |
| | |
| | | t1.del_flag = 0 |
| | | AND t2.del_flag = 0 |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t11.num = #{params.equipmentNum} |
| | | and t11.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.useId != null and params.useId != ''"> |
| | | and t11.use_id = #{params.useId} |
| | | </if> |
| | | <if test="params.faultStartTime != null"> |
| | | and t2.create_time >= #{params.faultStartTime} |
| | |
| | | public IPage<Equipment> pageEquipment(Integer pageNo, Integer pageSize, Map<String, Object> params); |
| | | |
| | | Page<Equipment> getEquipmentList(Page<Equipment> page, Equipment equipment); |
| | | |
| | | Page<Equipment> getEquipmentTZList(Page<Equipment> page, Equipment equipment); |
| | | IPage<DailyInspectionStandardDetail> getStandardList(Page<DailyInspectionStandardDetail> page, String mainId,String type); |
| | | |
| | | IPage<Map<String, Object>> getEquipmentListAllStandard(Integer pageNo, Integer pageSize, Map<String, Object> params); |
| | |
| | | |
| | | List<Map<String, Object>> getEquipmentList(Map<String, Object> params); |
| | | |
| | | List<Map<String, Object>> getWorkCenterList(Map<String, Object> params); |
| | | |
| | | List<Map<String, Object>> getEquipmentMTBF(Map<String, Object> params); |
| | | |
| | | List<Map<String, Object>> getMTBFTotalAvailableTime(Map<String, Object> params); |
| | | |
| | | List<Map<String, Object>> getCenterEquipmentMTBF(Map<String, Object> params); |
| | | |
| | | List<Map<String, Object>> getCenterMTBFTotalAvailableTime(Map<String, Object> params); |
| | | |
| | | public List<FaultIntervalTime> getMTBF(Map<String, String> query) throws ParseException; |
| | | } |
| | |
| | | |
| | | List<Map<String, Object>> getFaultCauseBar(Map<String, Object> params); |
| | | |
| | | List<Map<String, Object>> getEquipmentFaultCause(Map<String, Object> params); |
| | | |
| | | IPage<Map<String, Object>> getMTPF(Integer pageNo, Integer pageSize, Map<String, Object> params); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.eam.entity.DailyInspectionStandard; |
| | | import org.jeecg.modules.eam.mapper.DailyInspectionStandardMapper; |
| | | import org.jeecg.modules.eam.service.IDailyInspectionStandardService; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Service |
| | | public class DailyInspectionStandardServiceImpl extends ServiceImpl<DailyInspectionStandardMapper, DailyInspectionStandard> implements IDailyInspectionStandardService { |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getInspectionStandardList(Integer pageNo, Integer pageSize, Map<String, Object> params) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | String num = String.valueOf(params.get("num")); |
| | | String name = String.valueOf(params.get("name")); |
| | | String versionStatus = String.valueOf(params.get("versionStatus")); |
| | | return super.baseMapper.getInspectionStandardPage(pageData,num,name,versionStatus); |
| | | |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | SysUser sysUser = sysUserService.getById(user.getId()); |
| | | String areaId = sysUser.getAreaId(); |
| | | List<String> workCenterIds = null; |
| | | if(StringUtils.isNotBlank(areaId)){ |
| | | String[] split = areaId.split(","); |
| | | workCenterIds = Arrays.asList(split); |
| | | } |
| | | |
| | | return super.baseMapper.getInspectionStandardPage(pageData,num,name,versionStatus,workCenterIds); |
| | | } |
| | | |
| | | /** |
| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.eam.entity.DailyMaintenanceOrder; |
| | | import org.jeecg.modules.eam.mapper.DailyMaintenanceOrderMapper; |
| | | import org.jeecg.modules.eam.model.DepartVo; |
| | | import org.jeecg.modules.eam.model.MaintenanceCycleVo; |
| | | import org.jeecg.modules.eam.service.IDailyMaintenanceOrderService; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Service |
| | | public class DailyMaintenanceOrderServiceImpl extends ServiceImpl<DailyMaintenanceOrderMapper, DailyMaintenanceOrder> implements IDailyMaintenanceOrderService { |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getDailyMaintenanceOrderList(Integer pageNo, Integer pageSize, Map<String, Object> params) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | SysUser sysUser = sysUserService.getById(user.getId()); |
| | | String areaId = sysUser.getAreaId(); |
| | | List<String> workCenterIds = null; |
| | | if(StringUtils.isNotBlank(areaId)){ |
| | | String[] split = areaId.split(","); |
| | | workCenterIds = Arrays.asList(split); |
| | | params.put("workCenterIds",workCenterIds); |
| | | } |
| | | return super.getBaseMapper().getDailyMaintenanceOrderList(pageData,params); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getDailyMaintenanceOrder3List(Integer pageNo, Integer pageSize, Map<String, Object> params) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | SysUser sysUser = sysUserService.getById(user.getId()); |
| | | String areaId = sysUser.getAreaId(); |
| | | List<String> workCenterIds = null; |
| | | if(StringUtils.isNotBlank(areaId)){ |
| | | String[] split = areaId.split(","); |
| | | workCenterIds = Arrays.asList(split); |
| | | params.put("workCenterIds",workCenterIds); |
| | | } |
| | | return super.getBaseMapper().getDailyMaintenanceOrder3List(pageData,params); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.eam.entity.DailyInspectionStandardDetail; |
| | | import org.jeecg.modules.eam.entity.Equipment; |
| | | import org.jeecg.modules.eam.entity.EquipmentCategory; |
| | |
| | | import org.jeecg.modules.eam.mapper.EamEquipmentMapper; |
| | | import org.jeecg.modules.eam.model.DepartVo; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | */ |
| | | @Service |
| | | public class EamEquipmentServiceImpl extends ServiceImpl<EamEquipmentMapper, Equipment> implements IEamEquipmentService { |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | @Override |
| | | public List<DepartVo> getSysDeparts() { |
| | |
| | | |
| | | @Override |
| | | public Page<Equipment> getEquipmentList(Page<Equipment> page, Equipment equipment) { |
| | | |
| | | String sql = equipment.getEquipmentCategoryUda1(); |
| | | List<String> equipNums = new ArrayList<>(); |
| | | if(StringUtils.isNotBlank(equipment.getNums())){ |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Page<Equipment> getEquipmentTZList(Page<Equipment> page, Equipment equipment) { |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | SysUser sysUser = sysUserService.getById(user.getId()); |
| | | String areaId = sysUser.getAreaId(); |
| | | List<String> workCenterIds = null; |
| | | if(StringUtils.isNotBlank(areaId)){ |
| | | // strings = new ArrayList<>(); |
| | | String[] split = areaId.split(","); |
| | | workCenterIds = Arrays.asList(split); |
| | | } |
| | | String sql = equipment.getEquipmentCategoryUda1(); |
| | | List<String> equipNums = new ArrayList<>(); |
| | | if(StringUtils.isNotBlank(equipment.getNums())){ |
| | | equipNums = Arrays.asList(equipment.getNums().trim().split("\n")).stream().filter(num->!num.equals("\n")).collect(Collectors.toList()); |
| | | } |
| | | return page.setRecords(baseMapper.getEquipmentTZList( |
| | | page, |
| | | equipment.getNum(), |
| | | equipment.getName(), |
| | | equipment.getModel(), |
| | | workCenterIds, |
| | | equipment.getFactoryModelId(), |
| | | equipment.getAreaId(), |
| | | equipment.getManageId(), |
| | | equipment.getUseId(), |
| | | equipment.getEquipmentImportanceId(), |
| | | equipment.getTechnologyStatus(), |
| | | equipment.getEquipmentStatus(), |
| | | equipment.getSpecificEquipment(), |
| | | equipment.getWarrantyStart(), |
| | | equipment.getWarrantyEnd(), |
| | | equipment.getLineId(), |
| | | equipment.getIsLineEquip(), |
| | | equipment.getIsLine(), |
| | | equipment.getEquipmentCategoryId(), |
| | | equipNums, |
| | | sql |
| | | |
| | | )); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<DailyInspectionStandardDetail> getStandardList(Page<DailyInspectionStandardDetail> page, String mainId,String type) { |
| | | return page.setRecords(baseMapper.getStandardList(page,mainId,type)); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.system.api.ISysBaseAPI; |
| | | import org.jeecg.common.system.base.entity.SysUpload; |
| | | import org.jeecg.common.system.base.entity.SysUploadRela; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.eam.entity.EquipmentReportRepair; |
| | | import org.jeecg.modules.eam.mapper.EquipmentReportRepairMapper; |
| | | import org.jeecg.modules.eam.service.IEquipmentReportRepairService; |
| | |
| | | import org.jeecg.modules.system.mapper.SysRoleMapper; |
| | | import org.jeecg.modules.system.mapper.SysUserMapper; |
| | | import org.jeecg.modules.system.mapper.SysUserRoleMapper; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | private SysUserRoleMapper sysUserRoleMapper; |
| | | @Autowired |
| | | private SysRoleMapper sysRoleMapper; |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | /** |
| | | * 故障报修添加 |
| | | * |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | SysUser sysUser = sysUserService.getById(user.getId()); |
| | | String areaId = sysUser.getAreaId(); |
| | | List<String> workCenterIds = null; |
| | | if(StringUtils.isNotBlank(areaId)){ |
| | | String[] split = areaId.split(","); |
| | | workCenterIds = Arrays.asList(split); |
| | | params.put("workCenterIds",workCenterIds); |
| | | } |
| | | |
| | | List<String> equipNums = new ArrayList<>(); |
| | | if(StringUtils.isNotBlank((String)params.get("nums"))){ |
| | | equipNums = Arrays.asList(((String) params.get("nums")).trim().split("\n")).stream().filter(num->!num.equals("\n")).collect(Collectors.toList()); |
| | |
| | | public List<Map<String, Object>> getEquipmentList(Map<String, Object> params) { |
| | | return this.baseMapper.getEquipmentList(params); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getCenterEquipmentMTBF(Map<String, Object> params) { |
| | | return this.baseMapper.getCenterEquipmentMTBF(params); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getCenterMTBFTotalAvailableTime(Map<String, Object> params) { |
| | | return this.baseMapper.getCenterMTBFTotalAvailableTime(params); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getWorkCenterList(Map<String, Object> params) { |
| | | return this.baseMapper.getWorkCenterList(params); |
| | | } |
| | | } |
| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.eam.entity.InspectionOrder; |
| | | import org.jeecg.modules.eam.mapper.InspectionOrderMapper; |
| | | import org.jeecg.modules.eam.model.InspectionCycleVo; |
| | | import org.jeecg.modules.eam.service.IInspectionOrderService; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | public class InspectionOrderServiceImpl extends ServiceImpl<InspectionOrderMapper, InspectionOrder> implements IInspectionOrderService { |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | //根据设备获取点检周期 (手动生成日常点检工单) |
| | | @Override |
| | |
| | | @Override |
| | | public IPage<Map<String, Object>> getInspectionOrderList(Integer pageNo, Integer pageSize, Map<String, Object> params) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | SysUser sysUser = sysUserService.getById(user.getId()); |
| | | String areaId = sysUser.getAreaId(); |
| | | List<String> workCenterIds = null; |
| | | if(StringUtils.isNotBlank(areaId)){ |
| | | String[] split = areaId.split(","); |
| | | workCenterIds = Arrays.asList(split); |
| | | params.put("workCenterIds",workCenterIds); |
| | | } |
| | | return super.getBaseMapper().getInspectionOrderList(pageData,params); |
| | | } |
| | | |
| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.eam.entity.DailyInspectionStandard; |
| | | import org.jeecg.modules.eam.entity.MaintenanceStandard; |
| | | import org.jeecg.modules.eam.mapper.DailyInspectionStandardMapper; |
| | |
| | | import org.jeecg.modules.eam.model.MaintenanceCycleVo; |
| | | import org.jeecg.modules.eam.service.IDailyInspectionStandardService; |
| | | import org.jeecg.modules.eam.service.IMaintenanceStandardService; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Service |
| | | public class MaintenanceStandardServiceImpl extends ServiceImpl<MaintenanceStandardMapper, MaintenanceStandard> implements IMaintenanceStandardService { |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getMaintenanceStandardList(Integer pageNo, Integer pageSize, Map<String, Object> params) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | SysUser sysUser = sysUserService.getById(user.getId()); |
| | | String areaId = sysUser.getAreaId(); |
| | | List<String> workCenterIds = null; |
| | | if(StringUtils.isNotBlank(areaId)){ |
| | | String[] split = areaId.split(","); |
| | | workCenterIds = Arrays.asList(split); |
| | | params.put("workCenterIds",workCenterIds); |
| | | } |
| | | return super.baseMapper.getMaintenanceStandardList(pageData,params); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.DateUtils; |
| | | import org.jeecg.modules.eam.entity.Equipment; |
| | | import org.jeecg.modules.eam.entity.EquipmentReportRepair; |
| | |
| | | import org.jeecg.modules.eam.vo.EquipmentAvailabilityVo; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.mapper.SysUserMapper; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | @Autowired |
| | | private IEquipmentReportRepairService equipmentReportRepairService; |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | }else{ |
| | | repairOrder.setTeamId(""); |
| | | } |
| | | |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | SysUser sysUser = sysUserService.getById(user.getId()); |
| | | String areaId = sysUser.getAreaId(); |
| | | List<String> workCenterIds = null; |
| | | if(StringUtils.isNotBlank(areaId)){ |
| | | String[] split = areaId.split(","); |
| | | workCenterIds = Arrays.asList(split); |
| | | } |
| | | |
| | | List<String> equipNums = new ArrayList<>(); |
| | | if(StringUtils.isNotBlank(repairOrder.getNums())){ |
| | | equipNums = Arrays.asList(repairOrder.getNums().trim().split("\n")).stream().filter(num->!num.equals("\n")).collect(Collectors.toList()); |
| | |
| | | repairOrder.getCreateStartTime(), |
| | | repairOrder.getCreateEndTime(), |
| | | repairOrder.getEquipmentImportanceId(), |
| | | repairOrder.getFaultCause() |
| | | repairOrder.getFaultCause(), |
| | | workCenterIds |
| | | )); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getEquipmentFaultCause(Map<String, Object> params) { |
| | | return this.baseMapper.getEquipmentFaultCause(params); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getMTPF(Integer pageNo, Integer pageSize, Map<String, Object> params) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | return this.baseMapper.getMTPF(pageData,params); |