commit
3ca337ad07
15 changed files with 268 additions and 60 deletions
@ -0,0 +1,29 @@ |
||||
/** |
||||
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). |
||||
* <p> |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* <p> |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p> |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.energy.modules.system.service; |
||||
|
||||
import org.energy.modules.system.vo.HomePageVO; |
||||
|
||||
/** |
||||
* 服务类 |
||||
* |
||||
* @author DafX |
||||
*/ |
||||
public interface IRoleDataService { |
||||
|
||||
HomePageVO findCurrHomePageInfo(); |
||||
|
||||
} |
@ -0,0 +1,141 @@ |
||||
/** |
||||
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). |
||||
* <p> |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* <p> |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p> |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.energy.modules.system.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.dayu.daf.core.tool.constant.DafConstant; |
||||
import org.energy.modules.inspection.entity.InspectionTasks; |
||||
import org.energy.modules.inspection.service.IInspectionTasksService; |
||||
import org.energy.modules.leger.entity.EquipmentLedger; |
||||
import org.energy.modules.leger.entity.ToolInventoryRecord; |
||||
import org.energy.modules.leger.service.IEquipmentLedgerService; |
||||
import org.energy.modules.leger.service.IToolInventoryRecordService; |
||||
import org.energy.modules.smart.entity.OperationTicket; |
||||
import org.energy.modules.smart.entity.WorkOrder; |
||||
import org.energy.modules.smart.entity.WorkPermit; |
||||
import org.energy.modules.smart.service.IOperationTicketService; |
||||
import org.energy.modules.smart.service.IWorkOrderService; |
||||
import org.energy.modules.smart.service.IWorkPermitService; |
||||
import org.energy.modules.spares.entity.ManufacturerInfo; |
||||
import org.energy.modules.spares.entity.Material; |
||||
import org.energy.modules.spares.entity.SupplierInfo; |
||||
import org.energy.modules.spares.entity.Warehouse; |
||||
import org.energy.modules.spares.service.IManufacturerInfoService; |
||||
import org.energy.modules.spares.service.IMaterialService; |
||||
import org.energy.modules.spares.service.ISupplierInfoService; |
||||
import org.energy.modules.spares.service.IWarehouseService; |
||||
import org.energy.modules.system.service.IRoleDataService; |
||||
import org.energy.modules.system.vo.HomePageVO; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* 服务实现类 |
||||
* |
||||
* @author DafX |
||||
*/ |
||||
@Service |
||||
public class RoleDataServiceImpl implements IRoleDataService { |
||||
|
||||
@Autowired |
||||
private IEquipmentLedgerService equipmentLedgerService; |
||||
@Autowired |
||||
private IToolInventoryRecordService toolInventoryRecordService; |
||||
@Autowired |
||||
private IOperationTicketService operationTicketService; |
||||
@Autowired |
||||
private IWorkPermitService workPermitService; |
||||
@Autowired |
||||
private IWarehouseService warehouseService; |
||||
@Autowired |
||||
private IManufacturerInfoService manufacturerInfoService; |
||||
@Autowired |
||||
private ISupplierInfoService supplierInfoService; |
||||
@Autowired |
||||
private IMaterialService materialService; |
||||
@Autowired |
||||
private IWorkOrderService workOrderService; |
||||
@Autowired |
||||
private IInspectionTasksService inspectionTasksService; |
||||
|
||||
@Override |
||||
public HomePageVO findCurrHomePageInfo() { |
||||
HomePageVO hp = new HomePageVO(); |
||||
|
||||
// Equipment Ledger Service
|
||||
QueryWrapper<EquipmentLedger> qw1 = new QueryWrapper<>(); |
||||
qw1.lambda().eq(EquipmentLedger::getCheckStatus, 1); |
||||
qw1.lambda().eq(EquipmentLedger::getIsDeleted, DafConstant.DB_NOT_DELETED); |
||||
hp.setEquipmentLedgerAudit(equipmentLedgerService.list(qw1)); |
||||
|
||||
// Tool Inventory Record Service
|
||||
QueryWrapper<ToolInventoryRecord> qw2 = new QueryWrapper<>(); |
||||
qw2.lambda().eq(ToolInventoryRecord::getCheckStatus, 1); |
||||
qw2.lambda().eq(ToolInventoryRecord::getIsDeleted, DafConstant.DB_NOT_DELETED); |
||||
hp.setToolInventoryRecordsAudit(toolInventoryRecordService.list(qw2)); |
||||
|
||||
// Operation Ticket Service
|
||||
QueryWrapper<OperationTicket> qw3 = new QueryWrapper<>(); |
||||
qw3.lambda().eq(OperationTicket::getReviewStatus, 1); |
||||
qw3.lambda().eq(OperationTicket::getIsDeleted, DafConstant.DB_NOT_DELETED); |
||||
hp.setOperationTicketAudit(operationTicketService.list(qw3)); |
||||
|
||||
// Work Permit Service
|
||||
QueryWrapper<WorkPermit> qw4 = new QueryWrapper<>(); |
||||
qw4.lambda().eq(WorkPermit::getCheckStatus, 1); |
||||
qw4.lambda().eq(WorkPermit::getIsDeleted, DafConstant.DB_NOT_DELETED); |
||||
hp.setWorkPermitAudit(workPermitService.list(qw4)); |
||||
|
||||
// Warehouse Service
|
||||
QueryWrapper<Warehouse> qw5 = new QueryWrapper<>(); |
||||
qw5.lambda().eq(Warehouse::getApprovalStatus, 1); |
||||
qw5.lambda().eq(Warehouse::getIsDeleted, DafConstant.DB_NOT_DELETED); |
||||
hp.setWarehouseAudit(warehouseService.list(qw5)); |
||||
|
||||
// Manufacturer Info Service
|
||||
QueryWrapper<ManufacturerInfo> qw6 = new QueryWrapper<>(); |
||||
qw6.lambda().eq(ManufacturerInfo::getApprovalStatus, 1); |
||||
qw6.lambda().eq(ManufacturerInfo::getIsDeleted, DafConstant.DB_NOT_DELETED); |
||||
hp.setManufacturerInfoAudit(manufacturerInfoService.list(qw6)); |
||||
|
||||
// Supplier Info Service
|
||||
QueryWrapper<SupplierInfo> qw7 = new QueryWrapper<>(); |
||||
qw7.lambda().eq(SupplierInfo::getApprovalStatus, 1); |
||||
qw7.lambda().eq(SupplierInfo::getIsDeleted, DafConstant.DB_NOT_DELETED); |
||||
hp.setSupplierInfoAudit(supplierInfoService.list(qw7)); |
||||
|
||||
// Material Service
|
||||
QueryWrapper<Material> qw8 = new QueryWrapper<>(); |
||||
qw8.lambda().eq(Material::getIstatus, 1L); |
||||
qw8.lambda().eq(Material::getIsDeleted, DafConstant.DB_NOT_DELETED); |
||||
hp.setMaterialAudit(materialService.list(qw8)); |
||||
|
||||
// Work Order Service (already implemented)
|
||||
QueryWrapper<WorkOrder> qw9 = new QueryWrapper<>(); |
||||
qw9.lambda().eq(WorkOrder::getApprovalStatus, 1); |
||||
qw9.lambda().eq(WorkOrder::getIsDeleted, DafConstant.DB_NOT_DELETED); |
||||
hp.setWorkOrderAudit(workOrderService.list(qw9)); |
||||
|
||||
// Inspection Tasks Service
|
||||
QueryWrapper<InspectionTasks> qw10 = new QueryWrapper<>(); |
||||
qw10.lambda().eq(InspectionTasks::getTaskStatus, 1); |
||||
qw10.lambda().eq(InspectionTasks::getIsDeleted, DafConstant.DB_NOT_DELETED); |
||||
hp.setInspectionTasksAudit(inspectionTasksService.list(qw10)); |
||||
|
||||
return hp; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,36 @@ |
||||
package org.energy.modules.system.vo; |
||||
|
||||
import lombok.Data; |
||||
import org.energy.modules.inspection.entity.InspectionTasks; |
||||
import org.energy.modules.leger.entity.EquipmentLedger; |
||||
import org.energy.modules.leger.entity.ToolInventoryRecord; |
||||
import org.energy.modules.smart.entity.OperationTicket; |
||||
import org.energy.modules.smart.entity.WorkOrder; |
||||
import org.energy.modules.smart.entity.WorkPermit; |
||||
import org.energy.modules.spares.entity.ManufacturerInfo; |
||||
import org.energy.modules.spares.entity.Material; |
||||
import org.energy.modules.spares.entity.SupplierInfo; |
||||
import org.energy.modules.spares.entity.Warehouse; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class HomePageVO { |
||||
|
||||
// 巡检任务
|
||||
private List<InspectionTasks> inspectionTasksAudit; |
||||
|
||||
// 设备台账
|
||||
private List<EquipmentLedger> equipmentLedgerAudit; |
||||
private List<ToolInventoryRecord> toolInventoryRecordsAudit; |
||||
// 智能两票
|
||||
private List<OperationTicket> operationTicketAudit; |
||||
private List<WorkPermit> workPermitAudit; |
||||
// 备件管理
|
||||
private List<Warehouse> warehouseAudit; |
||||
private List<ManufacturerInfo> manufacturerInfoAudit; |
||||
private List<SupplierInfo> supplierInfoAudit; |
||||
private List<Material> materialAudit; |
||||
// 工单
|
||||
private List<WorkOrder> workOrderAudit; |
||||
} |
Loading…
Reference in new issue