| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.aspectj.lang.JoinPoint; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.annotation.*; |
| | | import org.aspectj.lang.annotation.Around; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.annotation.Pointcut; |
| | | import org.aspectj.lang.reflect.MethodSignature; |
| | | import org.jeecg.modules.eam.aspect.annotation.EquipmentHistoryLog; |
| | | import org.jeecg.modules.eam.constant.*; |
| | |
| | | } |
| | | break; |
| | | case SECOND_MAINTENANCE: |
| | | if (result instanceof EamSecondMaintenanceOrder) { |
| | | EamSecondMaintenanceOrder order = (EamSecondMaintenanceOrder) result; |
| | | if (SecondMaintenanceStatusEnum.COMPLETE.name().equals(order.getMaintenanceStatus())) { |
| | | log.setEquipmentId(order.getEquipmentId()); |
| | | log.setBusinessId(order.getId()); |
| | | log.setOperator(order.getOperator()); |
| | | log.setDescription(order.getConfirmComment()); |
| | | log.setCreateTime(order.getActualEndTime()); |
| | | } |
| | | } |
| | | break; |
| | | case THIRD_MAINTENANCE: |
| | | if (result instanceof EamThirdMaintenanceOrder) { |
| | | EamThirdMaintenanceOrder order = (EamThirdMaintenanceOrder) result; |
| | | if (ThirdMaintenanceStatusEnum.COMPLETE.name().equals(order.getMaintenanceStatus())) { |
| | | log.setEquipmentId(order.getEquipmentId()); |
| | | log.setBusinessId(order.getId()); |
| | | log.setOperator(order.getOperator()); |
| | | log.setDescription(order.getLeaderConfirmComment()); |
| | | log.setCreateTime(order.getActualEndTime()); |
| | | } |
| | | } |
| | | break; |
| | | case REPORT_REPAIR: |
| | | if (result instanceof EamReportRepair) { |
| | |
| | | case PARTIAL_REPAIR: |
| | | break; |
| | | case LEAN_OUT: |
| | | if (result instanceof EamEquipmentLeanOut) { |
| | | EamEquipmentLeanOut order = (EamEquipmentLeanOut) result; |
| | | if (EquipmentLeanOutStatusEnum.COMPLETE.name().equals(order.getLeanStatus())) { |
| | | log.setEquipmentId(order.getEquipmentId()); |
| | | log.setBusinessId(order.getId()); |
| | | log.setOperator(order.getLeanPerson()); |
| | | log.setDescription(order.getLeanReason()); |
| | | log.setCreateTime(order.getLeanStartTime()); |
| | | } |
| | | } |
| | | break; |
| | | case GIVE_BACK: |
| | | break; |
| | | case SEAL_UP: |
| | | if (result instanceof EamEquipmentSealUp) { |
| | | EamEquipmentSealUp order = (EamEquipmentSealUp) result; |
| | | if (EquipmentSealUpStatusEnum.COMPLETE.name().equals(order.getSealStatus())) { |
| | | log.setEquipmentId(order.getEquipmentId()); |
| | | log.setBusinessId(order.getId()); |
| | | log.setOperator(order.getReportUser()); |
| | | log.setDescription(order.getSealUpReason()); |
| | | log.setCreateTime(order.getSealEndTime()); |
| | | } |
| | | } |
| | | break; |
| | | case UNSEALED: |
| | | break; |
| | |
| | | } |
| | | break; |
| | | case SCRAPPED: |
| | | if (result instanceof EamEquipmentScrap) { |
| | | EamEquipmentScrap order = (EamEquipmentScrap) result; |
| | | if (EquipmentScrapStatusEnum.COMPLETE.name().equals(order.getScrapStatus())) { |
| | | log.setEquipmentId(order.getEquipmentId()); |
| | | log.setBusinessId(order.getId()); |
| | | log.setOperator(order.getReportUser()); |
| | | log.setDescription(order.getScrapReason()); |
| | | log.setCreateTime(order.getScrapTime()); |
| | | } |
| | | } |
| | | break; |
| | | default: |
| | | break; |