| | |
| | | import com.ruoyi.project.system.mapper.SysNoticeMapper; |
| | | import com.ruoyi.safe.mapper.SafeTrainingMapper; |
| | | import com.ruoyi.safe.pojo.SafeTraining; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | //定时任务汇总 |
| | | public class ScheduleTask { |
| | | |
| | | @Autowired |
| | | private SafeTrainingMapper safeTrainingMapper; |
| | | private final SafeTrainingMapper safeTrainingMapper; |
| | | |
| | | @Autowired |
| | | private SysNoticeMapper noticeMapper; |
| | | private final SysNoticeMapper noticeMapper; |
| | | |
| | | //定时任务(15分钟执行一次--判断培训计划数据,状态做变更) |
| | | @Scheduled(cron = "0 0/15 * * * ?") |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | |
| | | @Api(tags = "会计核算") |
| | | @RestController |
| | | @RequestMapping("/accounting") |
| | | @AllArgsConstructor |
| | | public class AccountingController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private AccountingServiceImpl accountingService; |
| | | |
| | | @ApiOperation("总计") |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Api(tags = "借款信息表") |
| | | @RestController |
| | | @RequestMapping("/borrowInfo") |
| | | @AllArgsConstructor |
| | | public class BorrowInfoController { |
| | | |
| | | @Autowired |
| | | private BorrowInfoService borrowInfoService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.account.service.impl.SalesReceiptReturnServiceImpl; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/salesReceiptReturn") |
| | | @AllArgsConstructor |
| | | public class SalesReceiptReturnController { |
| | | |
| | | @Autowired |
| | | private SalesReceiptReturnService salesReceiptReturnService; |
| | | |
| | | |
| | |
| | | import com.ruoyi.account.service.SalesRefundAmountOrderService; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/salesRefundAmountOrder") |
| | | @AllArgsConstructor |
| | | public class SalesRefundAmountOrderController { |
| | | |
| | | @Autowired |
| | | private SalesRefundAmountOrderService salesRefundAmountOrderService; |
| | | |
| | | @GetMapping("/page") |
| | |
| | | import com.ruoyi.procurementrecord.pojo.CustomStorage; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementRecordOut; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementRecordStorage; |
| | | import com.ruoyi.procurementrecord.service.impl.ProcurementRecordOutServiceImpl; |
| | | import com.ruoyi.procurementrecord.service.impl.ProcurementRecordServiceImpl; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class AccountingServiceImpl { |
| | | |
| | | @Autowired |
| | | private DeviceLedgerMapper deviceLedgerMapper; |
| | | |
| | | @Autowired |
| | | private BorrowInfoMapper borrowInfoMapper; |
| | | |
| | | @Autowired |
| | | private CustomStorageMapper customStorageMapper; |
| | | |
| | | @Autowired |
| | | private ProcurementRecordMapper procurementRecordMapper; |
| | | |
| | | @Autowired |
| | | private ProcurementRecordOutMapper procurementRecordOutMapper; |
| | | private final DeviceLedgerMapper deviceLedgerMapper; |
| | | private final BorrowInfoMapper borrowInfoMapper; |
| | | private final CustomStorageMapper customStorageMapper; |
| | | private final ProcurementRecordMapper procurementRecordMapper; |
| | | private final ProcurementRecordOutMapper procurementRecordOutMapper; |
| | | |
| | | public AjaxResult total(Integer year) { |
| | | Map<String,Object> map = new HashMap<>(); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.mapper.BorrowInfoMapper; |
| | | import com.ruoyi.account.pojo.AccountExpense; |
| | | import com.ruoyi.account.pojo.AccountIncome; |
| | | import com.ruoyi.account.pojo.BorrowInfo; |
| | | import com.ruoyi.account.mapper.BorrowInfoMapper; |
| | | import com.ruoyi.account.service.AccountExpenseService; |
| | | import com.ruoyi.account.service.AccountIncomeService; |
| | | import com.ruoyi.account.service.BorrowInfoService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.sales.service.ReceiptPaymentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class BorrowInfoServiceImpl extends ServiceImpl<BorrowInfoMapper, BorrowInfo> implements BorrowInfoService { |
| | | |
| | | @Autowired |
| | | private BorrowInfoMapper borrowInfoMapper; |
| | | |
| | | @Autowired |
| | | private AccountIncomeService accountIncomeService; |
| | | |
| | | @Autowired |
| | | private AccountExpenseService accountExpenseService; |
| | | private final BorrowInfoMapper borrowInfoMapper; |
| | | private final AccountIncomeService accountIncomeService; |
| | | private final AccountExpenseService accountExpenseService; |
| | | |
| | | @Override |
| | | public AjaxResult listPage(Page page, BorrowInfo borrowInfo) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.dto.SalesRefundAmountOrderDto; |
| | | import com.ruoyi.account.pojo.SalesRefundAmountOrder; |
| | | import com.ruoyi.account.mapper.SalesRefundAmountOrderMapper; |
| | | import com.ruoyi.account.service.SalesRefundAmountOrderService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.ruoyi.account.dto.SalesRefundAmountOrderDto; |
| | | import com.ruoyi.account.mapper.SalesRefundAmountOrderMapper; |
| | | import com.ruoyi.account.pojo.SalesRefundAmountOrder; |
| | | import com.ruoyi.account.service.SalesRefundAmountOrderService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | * @since 2026-03-07 10:16:47 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SalesRefundAmountOrderServiceImpl extends ServiceImpl<SalesRefundAmountOrderMapper, SalesRefundAmountOrder> implements SalesRefundAmountOrderService { |
| | | |
| | | |
| | | @Autowired |
| | | private SalesRefundAmountOrderMapper salesRefundAmountOrderMapper; |
| | | private final SalesRefundAmountOrderMapper salesRefundAmountOrderMapper; |
| | | |
| | | @Override |
| | | public IPage<SalesRefundAmountOrderDto> pageSalesRefundAmountOrderDto(Page<SalesRefundAmountOrderDto> page, SalesRefundAmountOrderDto salesRefundAmountOrder) { |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | |
| | | @RestController |
| | | @Api(tags = "临期售后管理") |
| | | @RequestMapping("/afterSalesNearExpiryService") |
| | | @AllArgsConstructor |
| | | public class AfterSalesNearExpiryController extends BaseController { |
| | | |
| | | @Autowired |
| | | private AfterSalesNearExpiryService afterSalesNearExpiryService; |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.sales.service.ISalesLedgerService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | @RestController |
| | | @Api(tags = "售后服务") |
| | | @RequestMapping("/afterSalesService") |
| | | @AllArgsConstructor |
| | | public class AfterSalesServiceController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private AfterSalesServiceService afterSalesServiceService; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private ISalesLedgerService salesLedgerService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | @RestController |
| | | @Api(tags = "售后服务附件表") |
| | | @RequestMapping("/afterSalesService/file") |
| | | @AllArgsConstructor |
| | | public class AfterSalesServiceFileController extends BaseController { |
| | | |
| | | @Autowired |
| | | private AfterSalesServiceFileService afterSalesServiceFileService; |
| | | |
| | | @PostMapping("/upload") |
| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | * @since 2026/03/02 11:19 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class AfterSalesServiceFileServiceImpl extends ServiceImpl<AfterSalesServiceFileMapper, AfterSalesServiceFile> implements AfterSalesServiceFileService { |
| | | |
| | | @Autowired |
| | | private AfterSalesServiceService afterSalesServiceService; |
| | | private final AfterSalesServiceService afterSalesServiceService; |
| | | |
| | | @Value("${file.upload-dir}") |
| | | private String uploadDir; |
| | |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.ISalesLedgerProductService; |
| | | import com.ruoyi.sales.service.ISalesLedgerService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class AfterSalesServiceServiceImpl extends ServiceImpl<AfterSalesServiceMapper, AfterSalesService> implements AfterSalesServiceService { |
| | | |
| | | @Autowired |
| | | private AfterSalesServiceMapper afterSalesServiceMapper; |
| | | |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | @Autowired |
| | | private ISalesLedgerProductService salesLedgerProductService; |
| | | @Autowired |
| | | private ISalesLedgerService salesLedgerService; |
| | | private final AfterSalesServiceMapper afterSalesServiceMapper; |
| | | private final SysDeptMapper sysDeptMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final ISalesLedgerProductService salesLedgerProductService; |
| | | private final ISalesLedgerService salesLedgerService; |
| | | |
| | | @Override |
| | | public IPage<AfterSalesServiceNewDto> listPage(Page page, AfterSalesServiceNewDto afterSalesService) { |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @Api(tags = "审批记录") |
| | | @RestController |
| | | @RequestMapping("/approveNode") |
| | | @AllArgsConstructor |
| | | public class ApproveNodeController { |
| | | @Autowired |
| | | |
| | | private IApproveNodeService approveNodeService; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.pojo.AccountExpense; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.approve.service.IApproveProcessService; |
| | | import com.ruoyi.approve.vo.ApproveGetAndUpdateVo; |
| | |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.text.ParseException; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/approveProcess") |
| | | @AllArgsConstructor |
| | | @Api(tags = "审批") |
| | | public class ApproveProcessController { |
| | | |
| | | @GetMapping("/test") |
| | | public AjaxResult test() { |
| | | System.out.println(1111); |
| | | return AjaxResult.success("测试"); |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private IApproveProcessService approveProcessService; |
| | | /**、 |
| | | * 获取部门列表 |
| | |
| | | @RequestMapping("/holidaySettings") |
| | | @AllArgsConstructor |
| | | public class HolidaySettingsController { |
| | | @Autowired |
| | | private HolidaySettingsService holidaySettingsService; |
| | | @Autowired |
| | | private AnnualLeaveSettingMapper annualLeaveSettingMapper; |
| | | @Autowired |
| | | private OvertimeSettingMapper overtimeSettingMapper; |
| | | @Autowired |
| | | private WorkingHoursSettingMapper workingHoursSettingMapper; |
| | | |
| | | /**、 |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.approve.mapper.KnowledgeBaseMapper; |
| | | import com.ruoyi.approve.pojo.KnowledgeBase; |
| | | import com.ruoyi.approve.pojo.RpaProcessAutomation; |
| | | import com.ruoyi.approve.service.KnowledgeBaseService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | |
| | | @AllArgsConstructor |
| | | @Api(tags = "知识库管理") |
| | | public class KnowledgeBaseController { |
| | | @Autowired |
| | | private KnowledgeBaseService knowledgeBaseService; |
| | | |
| | | /**、 |
| | |
| | | @RequestMapping("/notificationManagement") |
| | | @AllArgsConstructor |
| | | public class NotificationManagementController { |
| | | @Autowired |
| | | private NotificationManagementService notificationManagementService ; |
| | | @Autowired |
| | | private OnlineMeetingMapper onlineMeetingMapper; |
| | | @Autowired |
| | | private FileSharingMapper fileSharingMapper; |
| | | /**、 |
| | | * 获取列表 |
| | |
| | | package com.ruoyi.approve.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.approve.pojo.RpaProcessAutomation; |
| | | import com.ruoyi.approve.service.RpaProcessAutomationService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | |
| | | @AllArgsConstructor |
| | | @Api(tags = "RPA流程自动化") |
| | | public class RpaProcessAutomationController { |
| | | @Autowired |
| | | private RpaProcessAutomationService rpaProcessAutomationService; |
| | | /**、 |
| | | * 获取列表 |
| | |
| | | import com.ruoyi.approve.service.IApproveNodeService; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.mapper.DeviceRepairMapper; |
| | | import com.ruoyi.device.pojo.DeviceRepair; |
| | |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.purchase.service.impl.PurchaseLedgerServiceImpl; |
| | | import com.ruoyi.sales.mapper.*; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.mapper.SalesQuotationMapper; |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.pojo.SalesQuotation; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.impl.CommonFileServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | //@RequiredArgsConstructor |
| | | @RequiredArgsConstructor |
| | | public class ApproveNodeServiceImpl extends ServiceImpl<ApproveNodeMapper, ApproveNode> implements IApproveNodeService { |
| | | |
| | | @Autowired |
| | | private ApproveNodeMapper approveNodeMapper; |
| | | @Autowired |
| | | private ApproveProcessMapper approveProcessMapper; |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private TempFileServiceImpl tempFileService; |
| | | @Autowired |
| | | private ISysNoticeService sysNoticeService; |
| | | |
| | | @Autowired |
| | | private CommonFileMapper fileMapper; |
| | | @Autowired |
| | | private DeviceRepairMapper deviceRepairMapper; |
| | | |
| | | @Autowired |
| | | private PurchaseLedgerMapper purchaseLedgerMapper; |
| | | |
| | | @Autowired |
| | | private SalesQuotationMapper salesQuotationMapper; |
| | | |
| | | @Autowired |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | @Autowired |
| | | private CommonFileServiceImpl commonFileService; |
| | | @Autowired |
| | | private StockUtils stockUtils; |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | |
| | | @Autowired |
| | | private PurchaseLedgerServiceImpl purchaseLedgerServiceImpl; |
| | | private final ApproveNodeMapper approveNodeMapper; |
| | | private final ApproveProcessMapper approveProcessMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final TempFileServiceImpl tempFileService; |
| | | private final ISysNoticeService sysNoticeService; |
| | | private final CommonFileMapper fileMapper; |
| | | private final DeviceRepairMapper deviceRepairMapper; |
| | | private final PurchaseLedgerMapper purchaseLedgerMapper; |
| | | private final SalesQuotationMapper salesQuotationMapper; |
| | | private final ShippingInfoMapper shippingInfoMapper; |
| | | private final CommonFileServiceImpl commonFileService; |
| | | private final StockUtils stockUtils; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final PurchaseLedgerServiceImpl purchaseLedgerServiceImpl; |
| | | |
| | | |
| | | public ApproveProcess getApproveById(String id) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void initApproveNodes(String approveUserIds,String approveID,Long tenantId) { |
| | | public void initApproveNodes(String approveUserIds, String approveID, Long tenantId) { |
| | | Long userId = SecurityUtils.getLoginUser().getUser().getUserId(); |
| | | String[] names = approveUserIds.split(","); |
| | | for (int i = 0; i < names.length; i++) { |
| | |
| | | if (sysUser == null) continue; |
| | | ApproveNode approveNode = new ApproveNode(); |
| | | approveNode.setApproveProcessId(approveID); |
| | | approveNode.setApproveNodeOrder(i +1); |
| | | approveNode.setApproveNodeOrder(i + 1); |
| | | approveNode.setApproveNodeUser(sysUser.getNickName()); |
| | | approveNode.setApproveNodeUserId(sysUser.getUserId()); |
| | | approveNode.setApproveNodeTime(new Date()); |
| | |
| | | // .eq(ApproveProcess::getApproveStatus, 0) |
| | | .last("limit 1"); |
| | | ApproveProcess approveProcess = approveProcessMapper.selectOne(approveProcessLambdaQueryWrapper); |
| | | if(approveProcess != null && approveProcess.getApproveStatus() == 3){ |
| | | if (approveProcess != null && approveProcess.getApproveStatus() == 3) { |
| | | return list; |
| | | } |
| | | for (ApproveNode approveNode : list) { |
| | | List<CommonFile> commonFiles = fileMapper.selectList(new LambdaQueryWrapper<CommonFile>() |
| | | .eq(CommonFile::getCommonId, approveNode.getId()) |
| | | .eq(CommonFile::getType, FileNameType.ApproveNode.getValue())); |
| | | if(!CollectionUtils.isEmpty(commonFiles)){ |
| | | if (!CollectionUtils.isEmpty(commonFiles)) { |
| | | approveNode.setUrl(commonFiles.get(0).getUrl()); |
| | | } |
| | | if(approveNode.getApproveNodeStatus() == 1){ |
| | | if (approveNode.getApproveNodeStatus() == 1) { |
| | | continue; |
| | | } |
| | | approveNode.setIsShen(true); |
| | |
| | | return list; |
| | | } |
| | | |
| | | public void updateApproveProcessStatus(ApproveNode approveNode,Integer status) throws IOException { |
| | | public void updateApproveProcessStatus(ApproveNode approveNode, Integer status) throws IOException { |
| | | LambdaQueryWrapper<ApproveProcess> approveProcessLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | approveProcessLambdaQueryWrapper.eq(ApproveProcess::getApproveId, approveNode.getApproveProcessId()) |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | | .last("limit 1"); |
| | | ApproveProcess approveProcess = approveProcessMapper.selectOne(approveProcessLambdaQueryWrapper); |
| | | if(approveProcess == null) throw new RuntimeException("审批不存在"); |
| | | if (approveProcess == null) throw new RuntimeException("审批不存在"); |
| | | LambdaQueryWrapper<ApproveNode> approveNodeLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | approveNodeLambdaQueryWrapper.eq(ApproveNode::getApproveProcessId, approveNode.getApproveProcessId()) |
| | | .eq(ApproveNode::getApproveNodeOrder, approveNode.getApproveNodeOrder() + 1) |
| | |
| | | .last("limit 1"); |
| | | ApproveNode approveNode1 = approveNodeMapper.selectOne(approveNodeLambdaQueryWrapper); |
| | | approveProcess.setApproveStatus(status); |
| | | if(approveNode1 != null){ |
| | | if (approveNode1 != null) { |
| | | approveProcess.setApproveUserCurrentId(approveNode1.getApproveNodeUserId()); |
| | | approveProcess.setApproveUserCurrentName(approveNode1.getApproveNodeUser()); |
| | | } |
| | | if(approveProcess.getApproveStatus().equals(2) || approveProcess.getApproveStatus().equals(3) || approveProcess.getApproveStatus().equals(4)){ |
| | | if (approveProcess.getApproveStatus().equals(2) || approveProcess.getApproveStatus().equals(3) || approveProcess.getApproveStatus().equals(4)) { |
| | | approveProcess.setApproveOverTime(new Date()); |
| | | } |
| | | approveProcessMapper.updateById(approveProcess); |
| | | |
| | | DeviceRepair deviceRepair = deviceRepairMapper.selectById(approveProcess.getDeviceRepairId()); |
| | | if(ObjectUtils.isNotNull(deviceRepair)) { |
| | | if(approveProcess.getApproveStatus().equals(2)){ |
| | | if (ObjectUtils.isNotNull(deviceRepair)) { |
| | | if (approveProcess.getApproveStatus().equals(2)) { |
| | | // 同意 |
| | | deviceRepair.setStatus(1); |
| | | }else if(approveProcess.getApproveStatus().equals(3)){ |
| | | } else if (approveProcess.getApproveStatus().equals(3)) { |
| | | // 拒绝 |
| | | deviceRepair.setStatus(2); |
| | | } |
| | |
| | | } |
| | | |
| | | //采购审核 |
| | | if(approveProcess.getApproveType().equals(5)){ |
| | | if (approveProcess.getApproveType().equals(5)) { |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectOne(new LambdaQueryWrapper<PurchaseLedger>() |
| | | .eq(PurchaseLedger::getPurchaseContractNumber, approveProcess.getApproveReason()) |
| | | .last("limit 1")); |
| | | if(purchaseLedger != null) { |
| | | if (purchaseLedger != null) { |
| | | if (status.equals(2)) { |
| | | // 同意 |
| | | purchaseLedger.setApprovalStatus(3); |
| | |
| | | // 质检 |
| | | if (salesLedgerProduct.getIsChecked()) { |
| | | purchaseLedgerServiceImpl.addQualityInspect(purchaseLedger, salesLedgerProduct); |
| | | }else { |
| | | } else { |
| | | //直接入库 |
| | | stockUtils.addStock(salesLedgerProduct.getProductModelId(), salesLedgerProduct.getQuantity(), StockInQualifiedRecordTypeEnum.PURCHASE_STOCK_IN.getCode(), purchaseLedger.getId()); |
| | | } |
| | |
| | | } |
| | | } |
| | | // 销售报价状态修改 |
| | | if(approveProcess.getApproveType().equals(6)){ |
| | | if (approveProcess.getApproveType().equals(6)) { |
| | | SalesQuotation salesQuote = salesQuotationMapper.selectOne(new LambdaQueryWrapper<SalesQuotation>() |
| | | .eq(SalesQuotation::getQuotationNo, approveProcess.getApproveReason()) |
| | | .last("limit 1")); |
| | | // 同意 |
| | | if(status.equals(2) && salesQuote != null){ |
| | | if (status.equals(2) && salesQuote != null) { |
| | | salesQuote.setStatus("通过"); |
| | | }else if(status.equals(3) && salesQuote != null){ |
| | | } else if (status.equals(3) && salesQuote != null) { |
| | | salesQuote.setStatus("拒绝"); |
| | | }else if(status.equals(1) && salesQuote != null){ |
| | | } else if (status.equals(1) && salesQuote != null) { |
| | | salesQuote.setStatus("审核中"); |
| | | } |
| | | salesQuotationMapper.updateById(salesQuote); |
| | | } |
| | | // 出库审批修改 |
| | | if(approveProcess.getApproveType().equals(7)){ |
| | | if (approveProcess.getApproveType().equals(7)) { |
| | | String[] split = approveProcess.getApproveReason().split(":"); |
| | | ShippingInfo shippingInfo = shippingInfoMapper.selectOne(new LambdaQueryWrapper<ShippingInfo>() |
| | | .eq(ShippingInfo::getShippingNo, split[1]) |
| | | .orderByDesc(ShippingInfo::getCreateTime) |
| | | .last("limit 1")); |
| | | if(shippingInfo != null){ |
| | | if(status.equals(2)){ |
| | | if (shippingInfo != null) { |
| | | if (status.equals(2)) { |
| | | shippingInfo.setStatus("审核通过"); |
| | | }else if(status.equals(3)){ |
| | | } else if (status.equals(3)) { |
| | | shippingInfo.setStatus("审核拒绝"); |
| | | }else if(status.equals(1)){ |
| | | } else if (status.equals(1)) { |
| | | shippingInfo.setStatus("审核中"); |
| | | } |
| | | shippingInfoMapper.updateById(shippingInfo); |
| | |
| | | |
| | | } |
| | | // 绑定附件 |
| | | if(!CollectionUtils.isEmpty(approveNode.getTempFileIds()) && approveNode.getApproveNodeStatus() == 1){ |
| | | if (!CollectionUtils.isEmpty(approveNode.getTempFileIds()) && approveNode.getApproveNodeStatus() == 1) { |
| | | tempFileService.migrateTempFilesToFormal(approveNode.getId(), approveNode.getTempFileIds(), FileNameType.ApproveNode.getValue()); |
| | | } |
| | | } |
| | |
| | | @Override |
| | | public void updateApproveNode(ApproveNode approveNode) throws IOException { |
| | | // 审批节点状态:1同意,2拒绝,0尚未审核 |
| | | switch (approveNode.getApproveNodeStatus()){ |
| | | switch (approveNode.getApproveNodeStatus()) { |
| | | case 1: |
| | | updateApproveProcessStatus(approveNode, Boolean.TRUE.equals(approveNode.getIsLast()) ? 2 : 1); |
| | | /*消息通知*/ |
| | | Integer nodeOrder = approveNode.getApproveNodeOrder(); |
| | | ApproveProcess approveProcess = approveProcessMapper.selectList(Wrappers.<ApproveProcess>lambdaQuery() |
| | | .eq(ApproveProcess::getApproveId, approveNode.getApproveProcessId())).get(0); |
| | | if (approveProcess.getApproveUserIds().split(",").length > nodeOrder){ |
| | | if (approveProcess.getApproveUserIds().split(",").length > nodeOrder) { |
| | | String id = approveProcess.getApproveUserIds().split(",")[nodeOrder]; |
| | | if (approveProcess.getApproveType()==8){ |
| | | if (approveProcess.getApproveType() == 8) { |
| | | sysNoticeService.simpleNoticeByUser(approveProcessType(approveProcess.getApproveType()), |
| | | approveProcess.getApproveId() + "流程编号的审批需要您审核!!!!!", |
| | | Arrays.asList(Long.valueOf(id)), |
| | | "/safeProduction/safeWorkApproval?approveType=" + approveProcess.getApproveType() + "&approveId=" + approveProcess.getApproveId()); |
| | | }else { |
| | | } else { |
| | | sysNoticeService.simpleNoticeByUser(approveProcessType(approveProcess.getApproveType()), |
| | | approveProcess.getApproveId() + "流程编号的审批需要您审核!!!!!", |
| | | Arrays.asList(Long.valueOf(id)), |
| | |
| | | } |
| | | |
| | | //审批类型获取(与前端页面对应) |
| | | private String approveProcessType(Integer approveType){ |
| | | switch (approveType){ |
| | | private String approveProcessType(Integer approveType) { |
| | | switch (approveType) { |
| | | case 1: |
| | | return "公出管理"; |
| | | case 2: |
| | |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.approve.service.IApproveNodeService; |
| | | import com.ruoyi.approve.service.IApproveProcessService; |
| | | import com.ruoyi.approve.utils.DailyRedisCounter; |
| | | import com.ruoyi.approve.vo.ApproveGetAndUpdateVo; |
| | | import com.ruoyi.approve.vo.ApproveProcessVO; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.other.service.impl.TempFileServiceImpl; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.domain.SysNotice; |
| | |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.impl.CommonFileServiceImpl; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.io.IOException; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | //@RequiredArgsConstructor |
| | | @RequiredArgsConstructor |
| | | public class ApproveProcessServiceImpl extends ServiceImpl<ApproveProcessMapper, ApproveProcess> implements IApproveProcessService { |
| | | private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("yyyyMMdd"); |
| | | |
| | | @Autowired |
| | | private StringRedisTemplate redisTemplate; |
| | | @Autowired |
| | | private DailyRedisCounter dailyRedisCounter; |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | @Autowired |
| | | private IApproveNodeService approveNodeService; |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | @Autowired |
| | | private ApproveProcessMapper approveProcessMapper; |
| | | @Autowired |
| | | private TempFileServiceImpl tempFileService; |
| | | @Autowired |
| | | private CommonFileMapper commonFileMapper; |
| | | @Autowired |
| | | private CommonFileServiceImpl commonFileService; |
| | | @Autowired |
| | | private ISysNoticeService sysNoticeService; |
| | | private final SysDeptMapper sysDeptMapper; |
| | | private final IApproveNodeService approveNodeService; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final ApproveProcessMapper approveProcessMapper; |
| | | private final TempFileServiceImpl tempFileService; |
| | | private final CommonFileMapper commonFileMapper; |
| | | private final CommonFileServiceImpl commonFileService; |
| | | private final ISysNoticeService sysNoticeService; |
| | | private final PurchaseLedgerMapper purchaseLedgerMapper; |
| | | private final ShippingInfoMapper shippingInfoMapper; |
| | | private final ApproveNodeMapper approveNodeMapper; |
| | | |
| | | @Override |
| | | public void addApprove(ApproveProcessVO approveProcessVO) throws Exception { |
| | |
| | | } |
| | | return sysDeptList; |
| | | } |
| | | |
| | | @Autowired |
| | | private PurchaseLedgerMapper purchaseLedgerMapper; |
| | | |
| | | @Autowired |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | @Override |
| | | public IPage<ApproveProcess> listAll(Page page, ApproveProcess approveProcess) { |
| | |
| | | return one; |
| | | } |
| | | |
| | | @Autowired |
| | | private ApproveNodeMapper approveNodeMapper; |
| | | |
| | | // 报价审批编辑审核人 |
| | | public void updateApproveUser(ApproveGetAndUpdateVo approveGetAndUpdateVo) { |
| | |
| | | import com.ruoyi.approve.mapper.HolidaySettingsMapper; |
| | | import com.ruoyi.approve.pojo.HolidaySettings; |
| | | import com.ruoyi.approve.service.HolidaySettingsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class HolidaySettingsServiceImpl extends ServiceImpl<HolidaySettingsMapper, HolidaySettings> implements HolidaySettingsService { |
| | | @Autowired |
| | | private HolidaySettingsMapper holidaySettingsMapper; |
| | | private final HolidaySettingsMapper holidaySettingsMapper; |
| | | |
| | | @Override |
| | | public IPage<HolidaySettings> listpage(Page page, HolidaySettings holidaySettings) { |
| | |
| | | import com.ruoyi.approve.mapper.KnowledgeBaseMapper; |
| | | import com.ruoyi.approve.pojo.KnowledgeBase; |
| | | import com.ruoyi.approve.service.KnowledgeBaseService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class KnowledgeBaseServiceImpl extends ServiceImpl<KnowledgeBaseMapper, KnowledgeBase> implements KnowledgeBaseService { |
| | | @Autowired |
| | | private KnowledgeBaseMapper knowledgeBaseMapper; |
| | | private final KnowledgeBaseMapper knowledgeBaseMapper; |
| | | |
| | | @Override |
| | | public IPage<KnowledgeBase> listpage(Page page, KnowledgeBase knowledgeBase) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.approve.mapper.NotificationManagementMapper; |
| | | import com.ruoyi.approve.pojo.NotificationManagement; |
| | | import com.ruoyi.approve.service.NotificationManagementService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class NotificationManagementServiceImpl extends ServiceImpl<NotificationManagementMapper, NotificationManagement> implements NotificationManagementService { |
| | | @Autowired |
| | | private NotificationManagementMapper notificationManagementMapper; |
| | | private final NotificationManagementMapper notificationManagementMapper; |
| | | |
| | | @Override |
| | | public IPage<NotificationManagement> listpage(Page page, NotificationManagement notificationManagement) { |
| | |
| | | package com.ruoyi.approve.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.approve.mapper.RpaProcessAutomationMapper; |
| | | import com.ruoyi.approve.pojo.RpaProcessAutomation; |
| | | import com.ruoyi.approve.service.RpaProcessAutomationService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class RpaProcessAutomationServiceImpl extends ServiceImpl<RpaProcessAutomationMapper, RpaProcessAutomation> implements RpaProcessAutomationService { |
| | | @Autowired |
| | | private RpaProcessAutomationMapper rpaProcessAutomationMapper; |
| | | private final RpaProcessAutomationMapper rpaProcessAutomationMapper; |
| | | @Override |
| | | public IPage<RpaProcessAutomation> listpage(Page page, RpaProcessAutomation rpaProcessAutomation) { |
| | | return rpaProcessAutomationMapper.listpage(page,rpaProcessAutomation); |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.approve.mapper.ApproveProcessMapper; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | //基于redis的一个每日计数器 |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | public class DailyRedisCounter { |
| | | private static final String KEY_PREFIX = "daily_counter:"; |
| | | private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("yyyyMMdd"); |
| | | private final StringRedisTemplate redisTemplate; |
| | | |
| | | public DailyRedisCounter(StringRedisTemplate redisTemplate) { |
| | | this.redisTemplate = redisTemplate; |
| | | } |
| | | |
| | | @Value("${ruoyi.approvalNumberPrefix}") |
| | | private String approvalNumberPrefix; |
| | |
| | | return count; |
| | | } |
| | | |
| | | @Autowired |
| | | private ApproveProcessMapper approveProcessMapper; |
| | | private final ApproveProcessMapper approveProcessMapper; |
| | | |
| | | /** |
| | | * 获取当前时间的 开始日期 ,结束日期 |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpFileDto; |
| | | import com.ruoyi.basic.pojo.CustomerFollowUp; |
| | | import com.ruoyi.basic.pojo.CustomerReturnVisit; |
| | | import com.ruoyi.basic.service.CustomerFollowUpService; |
| | |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpFileDto; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/basic/customer-follow") |
| | | @AllArgsConstructor |
| | | public class CustomerFollowUpController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CustomerFollowUpService customerFollowUpService; |
| | | private final CustomerFollowUpService customerFollowUpService; |
| | | |
| | | @Autowired |
| | | private CustomerReturnVisitService customerReturnVisitService; |
| | | private final CustomerReturnVisitService customerReturnVisitService; |
| | | |
| | | /** |
| | | * 查询客户跟进列表 |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.CustomerDto; |
| | | import com.ruoyi.basic.dto.CustomerPrivateDto; |
| | | import com.ruoyi.basic.dto.CustomerPrivatePoolDto; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.basic.pojo.CustomerPrivate; |
| | | import com.ruoyi.basic.service.CustomerPrivatePoolService; |
| | | import com.ruoyi.basic.service.CustomerPrivateService; |
| | | import com.ruoyi.basic.service.ICustomerService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | import static com.ruoyi.framework.web.domain.AjaxResult.success; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/customerPrivate") |
| | | @AllArgsConstructor |
| | | public class CustomerPrivateController { |
| | | @Autowired |
| | | private CustomerPrivateService customerPrivateService; |
| | | private final CustomerPrivateService customerPrivateService; |
| | | |
| | | @Autowired |
| | | private CustomerPrivatePoolService customerPrivatePoolService; |
| | | private final CustomerPrivatePoolService customerPrivatePoolService; |
| | | |
| | | |
| | | @PostMapping("/add") |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.CustomerPrivatePoolDto; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.basic.pojo.CustomerPrivatePool; |
| | | import com.ruoyi.basic.service.CustomerPrivatePoolService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @Api(tags = "客户(私海)") |
| | | @RequestMapping("/customerPrivatePool") |
| | | @AllArgsConstructor |
| | | public class CustomerPrivatePoolController { |
| | | |
| | | @Autowired |
| | | private CustomerPrivatePoolService customerPrivatePoolService; |
| | | private final CustomerPrivatePoolService customerPrivatePoolService; |
| | | |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | public class ProductController extends BaseController { |
| | | |
| | | private IProductService productService; |
| | | |
| | | private IProductModelService productModelService; |
| | | @Autowired |
| | | private ISalesLedgerProductService salesLedgerProductService; |
| | | /** |
| | | * 查询产品 |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.SupplierManageDto; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.basic.service.ISupplierService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/system/supplier") |
| | | @AllArgsConstructor |
| | | public class SupplierManageController { |
| | | |
| | | @Autowired |
| | | private ISupplierService supplierService; |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.stream.CollectorUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.common.collect.Lists; |
| | |
| | | import com.ruoyi.basic.service.CustomerFollowUpService; |
| | | import com.ruoyi.common.vo.SimpleFileVo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | * @since 2026/03/04 14:53 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class CustomerFollowUpFileServiceImpl extends ServiceImpl<CustomerFollowUpFileMapper, CustomerFollowUpFile> implements CustomerFollowUpFileService { |
| | | |
| | | @Autowired |
| | | @Lazy |
| | | private CustomerFollowUpService customerFollowUpService; |
| | | private final CustomerFollowUpService customerFollowUpService; |
| | | |
| | | |
| | | @Override |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpDto; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpFileDto; |
| | | import com.ruoyi.basic.mapper.CustomerFollowUpMapper; |
| | | import com.ruoyi.basic.pojo.CustomerFollowUp; |
| | | import com.ruoyi.basic.pojo.CustomerFollowUpFile; |
| | |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpFileDto; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.service.ISysUserService; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | * @since 2026/03/04 14:48 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class CustomerFollowUpServiceImpl extends ServiceImpl<CustomerFollowUpMapper, CustomerFollowUp> implements CustomerFollowUpService { |
| | | |
| | | @Autowired |
| | | private CustomerFollowUpFileService customerFollowUpFileService; |
| | | private final CustomerFollowUpFileService customerFollowUpFileService; |
| | | |
| | | @Value("${file.upload-dir}") |
| | | private String uploadDir; |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | private final ISysUserService sysUserService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.CustomerDto; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpDto; |
| | | import com.ruoyi.basic.dto.CustomerPrivatePoolDto; |
| | | import com.ruoyi.basic.mapper.CustomerPrivateMapper; |
| | | import com.ruoyi.basic.pojo.*; |
| | | import com.ruoyi.basic.mapper.CustomerPrivatePoolMapper; |
| | | import com.ruoyi.basic.pojo.*; |
| | | import com.ruoyi.basic.service.*; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequiredArgsConstructor |
| | | public class CustomerPrivatePoolServiceImpl extends ServiceImpl<CustomerPrivatePoolMapper, CustomerPrivatePool> implements CustomerPrivatePoolService { |
| | | |
| | | @Autowired |
| | | private CustomerPrivatePoolMapper customerPrivatePoolMapper; |
| | | private final CustomerPrivatePoolMapper customerPrivatePoolMapper; |
| | | |
| | | @Autowired |
| | | private CustomerFollowUpService customerFollowUpService; |
| | | private final CustomerFollowUpService customerFollowUpService; |
| | | |
| | | @Autowired |
| | | private CustomerReturnVisitService customerReturnVisitService; |
| | | private final CustomerReturnVisitService customerReturnVisitService; |
| | | |
| | | @Autowired |
| | | private ICustomerService customerService; |
| | | private final ICustomerService customerService; |
| | | |
| | | @Autowired |
| | | private CustomerFollowUpFileService customerFollowUpFileService; |
| | | @Autowired |
| | | private CustomerPrivateMapper customerPrivateMapper; |
| | | private final CustomerFollowUpFileService customerFollowUpFileService; |
| | | private final CustomerPrivateMapper customerPrivateMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.CustomerPrivateDto; |
| | | import com.ruoyi.basic.dto.CustomerPrivatePoolDto; |
| | | import com.ruoyi.basic.mapper.CustomerMapper; |
| | | import com.ruoyi.basic.mapper.CustomerPrivatePoolMapper; |
| | | import com.ruoyi.basic.pojo.*; |
| | | import com.ruoyi.basic.mapper.CustomerPrivateMapper; |
| | | import com.ruoyi.basic.mapper.CustomerPrivatePoolMapper; |
| | | import com.ruoyi.basic.pojo.CustomerFollowUp; |
| | | import com.ruoyi.basic.pojo.CustomerPrivate; |
| | | import com.ruoyi.basic.pojo.CustomerPrivatePool; |
| | | import com.ruoyi.basic.pojo.CustomerReturnVisit; |
| | | import com.ruoyi.basic.service.CustomerFollowUpService; |
| | | import com.ruoyi.basic.service.CustomerPrivateService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.service.CustomerReturnVisitService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequiredArgsConstructor |
| | | public class CustomerPrivateServiceImpl extends ServiceImpl<CustomerPrivateMapper, CustomerPrivate> implements CustomerPrivateService { |
| | | |
| | | |
| | | @Autowired |
| | | private CustomerPrivatePoolMapper customerPrivatePoolMapper; |
| | | private final CustomerPrivatePoolMapper customerPrivatePoolMapper; |
| | | |
| | | @Autowired |
| | | private CustomerFollowUpService customerFollowUpService; |
| | | private final CustomerFollowUpService customerFollowUpService; |
| | | |
| | | @Autowired |
| | | private CustomerReturnVisitService customerReturnVisitService; |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | private final CustomerReturnVisitService customerReturnVisitService; |
| | | private final SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | @Autowired |
| | | private CustomerPrivateMapper customerPrivateMapper; |
| | | @Autowired |
| | | private CustomerPrivateService customerPrivateService; |
| | | private final CustomerPrivateMapper customerPrivateMapper; |
| | | private final CustomerPrivateService customerPrivateService; |
| | | |
| | | |
| | | @Override |
| | |
| | | import com.ruoyi.basic.service.CustomerReturnVisitService; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | * @since 2026/03/04 17:58 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class CustomerReturnVisitServiceImpl extends ServiceImpl<CustomerReturnVisitMapper, CustomerReturnVisit> implements CustomerReturnVisitService { |
| | | |
| | | @Autowired |
| | | private ReturnVisitReminderService returnVisitReminderService; |
| | | private final ReturnVisitReminderService returnVisitReminderService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.CustomerDto; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpDto; |
| | | import com.ruoyi.basic.dto.CustomerPrivatePoolDto; |
| | | import com.ruoyi.basic.mapper.CustomerMapper; |
| | | import com.ruoyi.basic.mapper.CustomerPrivatePoolMapper; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.basic.pojo.CustomerFollowUp; |
| | | import com.ruoyi.basic.pojo.CustomerFollowUpFile; |
| | | import com.ruoyi.basic.pojo.CustomerPrivatePool; |
| | | import com.ruoyi.basic.service.CustomerFollowUpFileService; |
| | | import com.ruoyi.basic.service.CustomerFollowUpService; |
| | | import com.ruoyi.basic.service.CustomerReturnVisitService; |
| | | import com.ruoyi.basic.service.ICustomerService; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | * @date 2025-05-07 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | @RequiredArgsConstructor |
| | | @Slf4j |
| | | public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> implements ICustomerService { |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | @Autowired |
| | | private CustomerPrivatePoolMapper customerPrivatePoolMapper; |
| | | @Autowired |
| | | private CustomerMapper customerMapper; |
| | | private final SalesLedgerMapper salesLedgerMapper; |
| | | private final CustomerPrivatePoolMapper customerPrivatePoolMapper; |
| | | private final CustomerMapper customerMapper; |
| | | |
| | | @Autowired |
| | | private CustomerFollowUpService customerFollowUpService; |
| | | @Autowired |
| | | private CustomerFollowUpFileService customerFollowUpFileService; |
| | | @Autowired |
| | | private CustomerReturnVisitService customerReturnVisitService; |
| | | private final CustomerFollowUpService customerFollowUpService; |
| | | private final CustomerReturnVisitService customerReturnVisitService; |
| | | |
| | | /** |
| | | * 查询客户档案 |
| | |
| | | import com.ruoyi.basic.pojo.CustomerReturnVisit; |
| | | import com.ruoyi.basic.service.CustomerReturnVisitService; |
| | | import com.ruoyi.framework.redis.RedisCache; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.ZoneId; |
| | |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class ReturnVisitReminderService { |
| | | |
| | | private static final String REMINDER_QUEUE_KEY = "return_visit:reminder:queue"; |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | private final RedisCache redisCache; |
| | | |
| | | @Autowired |
| | | private CustomerReturnVisitService customerReturnVisitService; |
| | | private final CustomerReturnVisitService customerReturnVisitService; |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public void scheduleReminder(Long returnVisitId) { |
| | |
| | | import com.ruoyi.common.enums.StorageAttachmentRecordType; |
| | | import com.ruoyi.common.utils.MinioUtils; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class StorageAttachmentServiceImpl extends ServiceImpl<StorageAttachmentMapper, StorageAttachment> implements StorageAttachmentService { |
| | | @Autowired |
| | | private StorageBlobMapper storageBlobMapper; |
| | | private final StorageBlobMapper storageBlobMapper; |
| | | |
| | | @Autowired |
| | | private StorageAttachmentMapper storageAttachmentMapper; |
| | | private final StorageAttachmentMapper storageAttachmentMapper; |
| | | |
| | | @Autowired |
| | | private StorageBlobService storageBlobService; |
| | | private final StorageBlobService storageBlobService; |
| | | |
| | | @Autowired |
| | | private MinioUtils minioUtils; |
| | | private final MinioUtils minioUtils; |
| | | |
| | | @Override |
| | | public List<StorageAttachment> selectStorageAttachments(Long recordId, StorageAttachmentRecordType recordType, String fileType) { |
| | |
| | | import com.ruoyi.basic.dto.SupplierManageDto; |
| | | import com.ruoyi.basic.excel.SupplierManageExcelDto; |
| | | import com.ruoyi.basic.mapper.SupplierManageMapper; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.basic.service.ISupplierService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDate; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SupplierServiceImpl extends ServiceImpl<SupplierManageMapper,SupplierManage> implements ISupplierService { |
| | | |
| | | @Autowired |
| | | private SupplierManageMapper supplierMapper; |
| | | @Autowired |
| | | private PurchaseLedgerMapper purchaseLedgerMapper; |
| | | private final SupplierManageMapper supplierMapper; |
| | | private final PurchaseLedgerMapper purchaseLedgerMapper; |
| | | |
| | | /** |
| | | * 供应商新增 |
| | |
| | | import com.ruoyi.project.system.domain.SysUserClient; |
| | | import com.ruoyi.project.system.service.SysUserClientService; |
| | | import com.ruoyi.project.system.service.impl.UnipushService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | public class ReturnVisitReminderTask { |
| | | |
| | | private static final String REMINDER_QUEUE_KEY = "return_visit:reminder:queue"; |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | private final RedisCache redisCache; |
| | | |
| | | @Autowired |
| | | private CustomerReturnVisitService customerReturnVisitService; |
| | | private final CustomerReturnVisitService customerReturnVisitService; |
| | | |
| | | @Autowired |
| | | private UnipushService unipushService; |
| | | private final UnipushService unipushService; |
| | | |
| | | @Autowired |
| | | private SysUserClientService userClientService; |
| | | private final SysUserClientService userClientService; |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | @Scheduled(fixedDelay = 60000) |
| | |
| | | @RequestMapping("/dutyPlan") |
| | | @AllArgsConstructor |
| | | public class DutyPlanController { |
| | | @Autowired |
| | | private DutyPlanService dutyPlanService; |
| | | |
| | | @GetMapping("/getList") |
| | |
| | | import com.ruoyi.collaborativeApproval.pojo.NoticeType; |
| | | import com.ruoyi.collaborativeApproval.service.NoticeTypeService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/noticeType") |
| | | @AllArgsConstructor |
| | | public class NoticeTypeController { |
| | | |
| | | @Autowired |
| | | private NoticeTypeService noticeTypeService; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | @Api(tags = "制度管理") |
| | | public class RulesRegulationsManagementController { |
| | | @Autowired |
| | | private RulesRegulationsManagementService rulesRegulationsManagementService; |
| | | @Autowired |
| | | private ReadingStatusMapper readingStatusMapper; |
| | | |
| | | @GetMapping("/getList") |
| | |
| | | @RequestMapping("/sealApplicationManagement") |
| | | @Api(tags = "用印申请管理") |
| | | public class SealApplicationManagementController { |
| | | @Autowired |
| | | private SealApplicationManagementService sealApplicationManagementService; |
| | | |
| | | @Autowired |
| | | private ISysNoticeService sysNoticeService; |
| | | |
| | | @GetMapping("/getList") |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/staffContactsPersonal") |
| | | @AllArgsConstructor |
| | | public class StaffContactsPersonalController { |
| | | @Autowired |
| | | private StaffContactsPersonalService staffContactsPersonalService; |
| | | |
| | | @GetMapping("/getList") |
| | | @ApiOperation("分页查询") |
| | | public AjaxResult listPage(Page page, StaffContactsPersonalDTO staffContactsPersonalDTO ){ |
| | | public AjaxResult listPage(Page page, StaffContactsPersonalDTO staffContactsPersonalDTO) { |
| | | return AjaxResult.success(staffContactsPersonalService.listPage(page, staffContactsPersonalDTO)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增") |
| | | public AjaxResult add(@RequestBody StaffContactsPersonal staffContactsPersonal){ |
| | | public AjaxResult add(@RequestBody StaffContactsPersonal staffContactsPersonal) { |
| | | return AjaxResult.success(staffContactsPersonalService.save(staffContactsPersonal)); |
| | | } |
| | | |
| | | @DeleteMapping("/delete/{id}") |
| | | @ApiOperation("删除") |
| | | public AjaxResult delete(@PathVariable("id") Long id){ |
| | | public AjaxResult delete(@PathVariable("id") Long id) { |
| | | // if (CollectionUtils.isEmpty(id)) { |
| | | // throw new RuntimeException("请传入要删除的ID"); |
| | | // } |
| | |
| | | import com.ruoyi.collaborativeApproval.pojo.DutyPlan; |
| | | import com.ruoyi.collaborativeApproval.service.DutyPlanService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class DutyPlanServiceImpl extends ServiceImpl<DutyPlanMapper, DutyPlan> implements DutyPlanService { |
| | | @Autowired |
| | | private DutyPlanMapper dutyPlanMapper; |
| | | private final DutyPlanMapper dutyPlanMapper; |
| | | |
| | | @Override |
| | | public IPage listPage(Page page, DutyPlanDTO dutyPlanDTO) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagementFile; |
| | | import com.ruoyi.collaborativeApproval.mapper.RulesRegulationsManagementFileMapper; |
| | | import com.ruoyi.collaborativeApproval.service.RulesRegulationsManagementFileService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.ruoyi.collaborativeApproval.mapper.RulesRegulationsManagementFileMapper; |
| | | import com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagementFile; |
| | | import com.ruoyi.collaborativeApproval.service.RulesRegulationsManagementFileService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | |
| | | * @since 2026-01-13 01:06:41 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class RulesRegulationsManagementFileServiceImpl extends ServiceImpl<RulesRegulationsManagementFileMapper, RulesRegulationsManagementFile> implements RulesRegulationsManagementFileService { |
| | | |
| | | @Autowired |
| | | private RulesRegulationsManagementFileMapper rulesRegulationsManagementFileMapper; |
| | | private final RulesRegulationsManagementFileMapper rulesRegulationsManagementFileMapper; |
| | | |
| | | @Override |
| | | public IPage<RulesRegulationsManagementFile> listPage(Page page, RulesRegulationsManagementFile rulesRegulationsManagementFile) { |
| | |
| | | import com.ruoyi.collaborativeApproval.mapper.RulesRegulationsManagementMapper; |
| | | import com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagement; |
| | | import com.ruoyi.collaborativeApproval.service.RulesRegulationsManagementService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class RulesRegulationsManagementServiceImpl extends ServiceImpl<RulesRegulationsManagementMapper, RulesRegulationsManagement> implements RulesRegulationsManagementService { |
| | | @Autowired |
| | | private RulesRegulationsManagementMapper rulesRegulationsManagementMapper; |
| | | private final RulesRegulationsManagementMapper rulesRegulationsManagementMapper; |
| | | |
| | | @Override |
| | | public IPage<RulesRegulationsManagementDTO> listPage(Page page, RulesRegulationsManagement rulesRegulationsManagement) { |
| | | return rulesRegulationsManagementMapper.listPage(page, rulesRegulationsManagement); |
| | |
| | | import com.ruoyi.collaborativeApproval.mapper.SealApplicationManagementMapper; |
| | | import com.ruoyi.collaborativeApproval.pojo.SealApplicationManagement; |
| | | import com.ruoyi.collaborativeApproval.service.SealApplicationManagementService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SealApplicationManagementServiceImpl extends ServiceImpl<SealApplicationManagementMapper, SealApplicationManagement> implements SealApplicationManagementService { |
| | | @Autowired |
| | | private SealApplicationManagementMapper sealApplicationManagementMapper; |
| | | private final SealApplicationManagementMapper sealApplicationManagementMapper; |
| | | |
| | | @Override |
| | | public IPage<SealApplicationManagementDTO> listPage(Page page, SealApplicationManagement sealApplicationManagement) { |
| | |
| | | package com.ruoyi.collaborativeApproval.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import com.ruoyi.collaborativeApproval.mapper.StaffContactsPersonalMapper; |
| | | import com.ruoyi.collaborativeApproval.pojo.StaffContactsPersonal; |
| | | import com.ruoyi.collaborativeApproval.service.StaffContactsPersonalService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class StaffContactsPersonalServiceImpl extends ServiceImpl<StaffContactsPersonalMapper, StaffContactsPersonal> implements StaffContactsPersonalService { |
| | | @Autowired |
| | | private StaffContactsPersonalMapper staffContactsPersonalMapper; |
| | | private final StaffContactsPersonalMapper staffContactsPersonalMapper; |
| | | |
| | | @Override |
| | | public IPage listPage(Page page, StaffContactsPersonalDTO staffContactsPersonalDTO) { |
| | | return staffContactsPersonalMapper.listPage(page, staffContactsPersonalDTO); |
| | |
| | | import io.minio.http.Method; |
| | | import io.minio.messages.DeleteError; |
| | | import io.minio.messages.DeleteObject; |
| | | import jakarta.servlet.ServletOutputStream; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.Getter; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.FastByteArrayOutputStream; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.ServletOutputStream; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | | import java.nio.charset.StandardCharsets; |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | public class MinioUtils { |
| | | |
| | | @Autowired |
| | | private MinioClient minioClient; |
| | | private final MinioClient minioClient; |
| | | |
| | | @Value("${minio.preview-expiry}") |
| | | private Integer previewExpiry; |
| | |
| | | package com.ruoyi.compensationperformance.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.purchase.dto.PaymentRegistrationDto; |
| | | import com.ruoyi.staff.mapper.StaffOnJobMapper; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | @RestController |
| | | @Api(tags = "薪酬绩效") |
| | | @RequestMapping("/compensationPerformance") |
| | | @AllArgsConstructor |
| | | public class CompensationPerformanceController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CompensationPerformanceService compensationPerformanceService; |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.compensationperformance.mapper.CompensationPerformanceMapper; |
| | | import com.ruoyi.compensationperformance.pojo.CompensationPerformance; |
| | | import com.ruoyi.compensationperformance.service.CompensationPerformanceService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class CompensationPerformanceServiceImpl extends ServiceImpl<CompensationPerformanceMapper, CompensationPerformance> implements CompensationPerformanceService { |
| | | |
| | | @Autowired |
| | | private CompensationPerformanceMapper compensationPerformanceMapper; |
| | | private final CompensationPerformanceMapper compensationPerformanceMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @RestController |
| | | @Api(tags = "客户拜访") |
| | | @RequestMapping("/customerVisits") |
| | | @AllArgsConstructor |
| | | public class CustomerVisitsController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CustomerVisitsServiceImpl customerVisitsService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.customervisits.mapper.CustomerVisitsMapper; |
| | | import com.ruoyi.customervisits.pojo.CustomerVisits; |
| | | import com.ruoyi.customervisits.service.CustomerVisitsService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class CustomerVisitsServiceImpl extends ServiceImpl<CustomerVisitsMapper, CustomerVisits> implements CustomerVisitsService { |
| | | |
| | | @Autowired |
| | | private CustomerVisitsMapper customerVisitsMapper; |
| | | private final CustomerVisitsMapper customerVisitsMapper; |
| | | |
| | | @Override |
| | | public IPage<CustomerVisits> listPage(Page page, CustomerVisits customerVisits) { |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Api(tags = "设备缺陷记录管理") |
| | | @RequestMapping("/defect") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | public class DeviceDefectRecordController { |
| | | @Autowired |
| | | private DeviceDefectRecordService deviceDefectRecordService; |
| | | @ApiOperation("设备缺陷记录列表") |
| | | @GetMapping("/page") |
| | |
| | | import com.ruoyi.device.service.IDeviceLedgerService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Anonymous; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff.dto.StaffOnJobExcelDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | @Api(tags = "设备台账管理") |
| | | @RequestMapping("/device/ledger") |
| | | @RestController |
| | | @AllArgsConstructor |
| | | public class DeviceLedgerController { |
| | | |
| | | @Autowired |
| | | private IDeviceLedgerService deviceLedgerService; |
| | | |
| | | @Autowired |
| | | private DeviceLedgerMapper deviceLedgerMapper; |
| | | |
| | | @Autowired |
| | | private DeviceMaintenanceMapper deviceMaintenanceMapper; |
| | | |
| | | |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | |
| | | @Api(tags = "设备保养") |
| | | @RestController |
| | | @RequestMapping("/device/maintenance") |
| | | @AllArgsConstructor |
| | | public class DeviceMaintenanceController { |
| | | |
| | | |
| | | @Autowired |
| | | private IDeviceMaintenanceService deviceMaintenanceService; |
| | | |
| | | @Autowired |
| | | private IDeviceLedgerService deviceLedgerService; |
| | | |
| | | @ApiOperation("设备保养列表") |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.dto.DeviceRepairDto; |
| | | import com.ruoyi.device.pojo.DeviceRepair; |
| | | import com.ruoyi.device.service.IDeviceLedgerService; |
| | | import com.ruoyi.device.service.IDeviceRepairService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | |
| | | @Api(tags = "设备报修管理") |
| | | @RequestMapping("/device/repair") |
| | | @RestController |
| | | @AllArgsConstructor |
| | | public class DeviceRepairController { |
| | | |
| | | @Autowired |
| | | private IDeviceRepairService deviceRepairService; |
| | | |
| | | @Autowired |
| | | private IDeviceLedgerService deviceLedgerService; |
| | | |
| | | @ApiOperation("设备报修列表") |
| | | @GetMapping("/page") |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @Api(tags = "设备保养定时任务管理") |
| | | @RestController |
| | | @RequestMapping("/deviceMaintenanceTask") |
| | | @AllArgsConstructor |
| | | public class MaintenanceTaskController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private MaintenanceTaskService maintenanceTaskService; |
| | | |
| | | |
| | |
| | | import com.ruoyi.device.pojo.DeviceDefectRecord; |
| | | import com.ruoyi.device.pojo.DeviceRepair; |
| | | import com.ruoyi.device.service.DeviceDefectRecordService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequiredArgsConstructor |
| | | public class DeviceDefectRecordServiceImpl extends ServiceImpl<DeviceDefectRecordMapper, DeviceDefectRecord> implements DeviceDefectRecordService { |
| | | @Autowired |
| | | private DeviceDefectRecordMapper deviceDefectRecordMapper; |
| | | |
| | | @Autowired |
| | | private DeviceRepairMapper deviceRepairMapper; |
| | | private final DeviceDefectRecordMapper deviceDefectRecordMapper; |
| | | private final DeviceRepairMapper deviceRepairMapper; |
| | | |
| | | @Override |
| | | public IPage<DeviceDefectRecordDto> listPage(Page page, DeviceDefectRecordDto deviceDefectRecordDto) { |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | @RequiredArgsConstructor |
| | | @Slf4j |
| | | public class DeviceLedgerServiceImpl extends ServiceImpl<DeviceLedgerMapper, DeviceLedger> implements IDeviceLedgerService { |
| | | |
| | | @Autowired |
| | | private DeviceLedgerMapper deviceLedgerMapper; |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | private final DeviceLedgerMapper deviceLedgerMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | |
| | | @Override |
| | | public IPage<DeviceLedgerDto> queryPage(Page page, DeviceLedgerDto deviceLedger) { |
| | |
| | | import com.ruoyi.measuringinstrumentledger.pojo.SpareParts; |
| | | import com.ruoyi.measuringinstrumentledger.pojo.SparePartsRequisitionRecord; |
| | | import com.ruoyi.measuringinstrumentledger.service.SparePartsRequisitionRecordService; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class DeviceMaintenanceServiceImpl extends ServiceImpl<DeviceMaintenanceMapper, DeviceMaintenance> implements IDeviceMaintenanceService { |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private DeviceMaintenanceMapper deviceMaintenanceMapper; |
| | | @Autowired |
| | | private SparePartsMapper sparePartsMapper; |
| | | @Autowired |
| | | private SparePartsRequisitionRecordService sparePartsRequisitionRecordService; |
| | | private final DeviceMaintenanceMapper deviceMaintenanceMapper; |
| | | private final SparePartsMapper sparePartsMapper; |
| | | private final SparePartsRequisitionRecordService sparePartsRequisitionRecordService; |
| | | |
| | | @Override |
| | | public IPage<DeviceMaintenanceDto> queryPage(Page page, DeviceMaintenanceDto deviceMaintenanceDto) { |
| | |
| | | import com.ruoyi.measuringinstrumentledger.pojo.SpareParts; |
| | | import com.ruoyi.measuringinstrumentledger.pojo.SparePartsRequisitionRecord; |
| | | import com.ruoyi.measuringinstrumentledger.service.SparePartsRequisitionRecordService; |
| | | import lombok.AllArgsConstructor; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | @RequiredArgsConstructor |
| | | @Slf4j |
| | | public class DeviceRepairServiceImpl extends ServiceImpl<DeviceRepairMapper, DeviceRepair> implements IDeviceRepairService { |
| | | |
| | | @Autowired |
| | | private DeviceDefectRecordService deviceDefectRecordService; |
| | | @Autowired |
| | | private DeviceRepairMapper deviceRepairMapper; |
| | | @Autowired |
| | | private IDeviceLedgerService deviceLedgerService; |
| | | @Autowired |
| | | private SparePartsMapper sparePartsMapper; |
| | | @Autowired |
| | | private SparePartsRequisitionRecordService sparePartsRequisitionRecordService; |
| | | private final DeviceDefectRecordService deviceDefectRecordService; |
| | | private final DeviceRepairMapper deviceRepairMapper; |
| | | private final IDeviceLedgerService deviceLedgerService; |
| | | private final SparePartsMapper sparePartsMapper; |
| | | private final SparePartsRequisitionRecordService sparePartsRequisitionRecordService; |
| | | |
| | | @Override |
| | | public IPage<DeviceRepairDto> queryPage(Page page, DeviceRepairDto deviceRepairDto) { |
| | |
| | | |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import com.ruoyi.device.pojo.MaintenanceTask; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.quartz.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.core.BeanPropertyRowMapper; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | @Component |
| | | @DisallowConcurrentExecution // 禁止并发执行同一个Job |
| | | @RequiredArgsConstructor |
| | | public class MaintenanceTaskJob implements Job, Serializable { |
| | | private static final long serialVersionUID = 1L; // 必须定义序列化ID |
| | | |
| | | @Autowired |
| | | private DeviceMaintenanceServiceImpl deviceMaintenanceService; |
| | | private final DeviceMaintenanceServiceImpl deviceMaintenanceService; |
| | | |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | private final JdbcTemplate jdbcTemplate; |
| | | |
| | | @Override |
| | | public void execute(JobExecutionContext context) throws JobExecutionException { |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.ruoyi.device.pojo.MaintenanceTask; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.quartz.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalTime; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class MaintenanceTaskScheduler { |
| | | |
| | | @Autowired |
| | | private Scheduler scheduler; |
| | | private final Scheduler scheduler; |
| | | |
| | | /** |
| | | * 添加新任务到调度器 |
| | |
| | | import com.ruoyi.inspectiontask.service.impl.TimingTaskServiceImpl; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class MaintenanceTaskServiceImpl extends ServiceImpl<MaintenanceTaskMapper, MaintenanceTask> implements MaintenanceTaskService { |
| | | |
| | | @Autowired |
| | | private MaintenanceTaskMapper maintenanceTaskMapper; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private TimingTaskServiceImpl timingTaskService; |
| | | |
| | | @Autowired |
| | | private MaintenanceTaskScheduler maintenanceTaskScheduler; |
| | | private final MaintenanceTaskMapper maintenanceTaskMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final TimingTaskServiceImpl timingTaskService; |
| | | private final MaintenanceTaskScheduler maintenanceTaskScheduler; |
| | | |
| | | @Override |
| | | public AjaxResult listPage(Page page, MaintenanceTask maintenanceTask) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.ProductDto; |
| | | import com.ruoyi.basic.dto.ProductTreeDto; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.device.pojo.DeviceLedger; |
| | | import com.ruoyi.equipmentenergyconsumption.dto.ElectricityConsumptionAreaTreeDto; |
| | | import com.ruoyi.equipmentenergyconsumption.pojo.ElectricityConsumptionArea; |
| | | import com.ruoyi.equipmentenergyconsumption.service.ElectricityConsumptionAreaService; |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Api(tags = "用电区域") |
| | | @RequestMapping("/electricityConsumptionArea") |
| | | @AllArgsConstructor |
| | | public class ElectricityConsumptionAreaController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ElectricityConsumptionAreaService electricityConsumptionAreaService; |
| | | private final ElectricityConsumptionAreaService electricityConsumptionAreaService; |
| | | |
| | | /** |
| | | * 查询树结构 |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.equipmentenergyconsumption.pojo.ElectricityConsumptionArea; |
| | | import com.ruoyi.equipmentenergyconsumption.pojo.EnergyPeriod; |
| | | import com.ruoyi.equipmentenergyconsumption.service.EnergyPeriodService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/energyPeriod") |
| | | @Api(tags = "用电时段") |
| | | @AllArgsConstructor |
| | | public class EnergyPeriodController extends BaseController { |
| | | @Autowired |
| | | private EnergyPeriodService energyPeriodService; |
| | | private final EnergyPeriodService energyPeriodService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("用电时段-分页查询") |
| | | @Log(title = "用电时段-分页查询", businessType = BusinessType.OTHER) |
| | |
| | | @ApiOperation("用电时段-删除") |
| | | @Log(title = "用电时段-删除", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请选择至少一条数据"); |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("请选择至少一条数据"); |
| | | boolean remove = energyPeriodService.removeBatchByIds(ids); |
| | | return remove ? AjaxResult.success() : AjaxResult.error("删除失败"); |
| | | } |
| | |
| | | @PostMapping("/export") |
| | | @ApiOperation("导出用电时段") |
| | | public void export(HttpServletResponse response) { |
| | | Page page = new Page(-1,-1); |
| | | Page page = new Page(-1, -1); |
| | | EnergyPeriod energyPeriod = new EnergyPeriod(); |
| | | IPage<EnergyPeriod> listPage = energyPeriodService.listPage(page, energyPeriod); |
| | | ExcelUtil<EnergyPeriod> util = new ExcelUtil<EnergyPeriod>(EnergyPeriod.class); |
| | | util.exportExcel(response, listPage.getRecords() , "用电时段数据"); |
| | | util.exportExcel(response, listPage.getRecords(), "用电时段数据"); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | @RestController |
| | | @Api(tags = "设备能耗") |
| | | @RequestMapping("/equipmentEnergyConsumption") |
| | | @AllArgsConstructor |
| | | public class EquipmentEnergyConsumptionController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private EquipmentEnergyConsumptionService equipmentEnergyConsumptionService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.ProductTreeDto; |
| | | import com.ruoyi.basic.pojo.Product; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.equipmentenergyconsumption.dto.ElectricityConsumptionAreaTreeDto; |
| | | import com.ruoyi.equipmentenergyconsumption.mapper.ElectricityConsumptionAreaMapper; |
| | | import com.ruoyi.equipmentenergyconsumption.pojo.ElectricityConsumptionArea; |
| | | import com.ruoyi.equipmentenergyconsumption.service.ElectricityConsumptionAreaService; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class ElectricityConsumptionAreaServiceImpl extends ServiceImpl<ElectricityConsumptionAreaMapper, ElectricityConsumptionArea> implements ElectricityConsumptionAreaService { |
| | | |
| | | @Autowired |
| | | private ElectricityConsumptionAreaMapper electricityConsumptionAreaMapper; |
| | | private final ElectricityConsumptionAreaMapper electricityConsumptionAreaMapper; |
| | | |
| | | @Override |
| | | public IPage<ElectricityConsumptionArea> listPage(Page page, ElectricityConsumptionArea electricityConsumptionArea) { |
| | |
| | | import com.ruoyi.equipmentenergyconsumption.mapper.EnergyPeriodMapper; |
| | | import com.ruoyi.equipmentenergyconsumption.pojo.EnergyPeriod; |
| | | import com.ruoyi.equipmentenergyconsumption.service.EnergyPeriodService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class EnergyPeriodServiceImpl extends ServiceImpl<EnergyPeriodMapper, EnergyPeriod> implements EnergyPeriodService { |
| | | @Autowired |
| | | private EnergyPeriodMapper energyPeriodMapper; |
| | | private final EnergyPeriodMapper energyPeriodMapper; |
| | | |
| | | @Override |
| | | public IPage<EnergyPeriod> listPage(Page page, EnergyPeriod energyPeriod) { |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.device.mapper.DeviceLedgerMapper; |
| | | import com.ruoyi.device.pojo.DeviceLedger; |
| | |
| | | import com.ruoyi.equipmentenergyconsumption.pojo.EquipmentEnergyConsumption; |
| | | import com.ruoyi.equipmentenergyconsumption.service.EquipmentEnergyConsumptionService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class EquipmentEnergyConsumptionServiceImpl extends ServiceImpl<EquipmentEnergyConsumptionMapper, EquipmentEnergyConsumption> implements EquipmentEnergyConsumptionService { |
| | | |
| | | |
| | | @Autowired |
| | | private EquipmentEnergyConsumptionMapper equipmentEnergyConsumptionMapper; |
| | | |
| | | @Autowired |
| | | private DeviceLedgerMapper deviceLedgerMapper; |
| | | private final EquipmentEnergyConsumptionMapper equipmentEnergyConsumptionMapper; |
| | | private final DeviceLedgerMapper deviceLedgerMapper; |
| | | |
| | | @Override |
| | | public IPage<EquipmentEnergyConsumption> listPage(Page page, EquipmentEnergyConsumption equipmentEnergyConsumption) { |
| | |
| | | package com.ruoyi.framework.aspectj;
|
| | |
|
| | | import java.lang.reflect.Method;
|
| | | import java.util.Collections;
|
| | | import java.util.List;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.common.utils.ip.IpUtils;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.RateLimiter;
|
| | | import com.ruoyi.framework.aspectj.lang.enums.LimitType;
|
| | | import org.aspectj.lang.JoinPoint;
|
| | | import org.aspectj.lang.annotation.Aspect;
|
| | | import org.aspectj.lang.annotation.Before;
|
| | |
| | | import org.springframework.data.redis.core.RedisTemplate;
|
| | | import org.springframework.data.redis.core.script.RedisScript;
|
| | | import org.springframework.stereotype.Component;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.common.utils.ip.IpUtils;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.RateLimiter;
|
| | | import com.ruoyi.framework.aspectj.lang.enums.LimitType;
|
| | |
|
| | | import java.lang.reflect.Method;
|
| | | import java.util.Collections;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 限流处理
|
| | |
| | | package com.ruoyi.framework.config;
|
| | |
|
| | | import java.util.concurrent.TimeUnit;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import com.ruoyi.common.constant.Constants;
|
| | | import com.ruoyi.framework.interceptor.RepeatSubmitInterceptor;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.context.annotation.Bean;
|
| | | import org.springframework.context.annotation.Configuration;
|
| | | import org.springframework.http.CacheControl;
|
| | |
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
| | | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
| | | import com.ruoyi.common.constant.Constants;
|
| | | import com.ruoyi.framework.interceptor.RepeatSubmitInterceptor;
|
| | |
|
| | | import java.util.concurrent.TimeUnit;
|
| | |
|
| | | /**
|
| | | * 通用配置
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Configuration
|
| | | @RequiredArgsConstructor
|
| | | public class ResourcesConfig implements WebMvcConfigurer
|
| | | {
|
| | | @Autowired
|
| | | private RepeatSubmitInterceptor repeatSubmitInterceptor;
|
| | | private final RepeatSubmitInterceptor repeatSubmitInterceptor;
|
| | |
|
| | | @Override
|
| | | public void addResourceHandlers(ResourceHandlerRegistry registry)
|
| | |
| | | package com.ruoyi.framework.config;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import com.ruoyi.framework.config.properties.PermitAllUrlProperties;
|
| | | import com.ruoyi.framework.security.filter.JwtAuthenticationTokenFilter;
|
| | | import com.ruoyi.framework.security.handle.AuthenticationEntryPointImpl;
|
| | | import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.context.annotation.Bean;
|
| | | import org.springframework.context.annotation.Configuration;
|
| | | import org.springframework.http.HttpMethod;
|
| | |
| | | import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
| | | import org.springframework.security.web.authentication.logout.LogoutFilter;
|
| | | import org.springframework.web.filter.CorsFilter;
|
| | | import com.ruoyi.framework.config.properties.PermitAllUrlProperties;
|
| | | import com.ruoyi.framework.security.filter.JwtAuthenticationTokenFilter;
|
| | | import com.ruoyi.framework.security.handle.AuthenticationEntryPointImpl;
|
| | | import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl;
|
| | |
|
| | | /**
|
| | | * spring security配置
|
| | |
| | | */
|
| | | @EnableMethodSecurity(prePostEnabled = true, securedEnabled = true)
|
| | | @Configuration
|
| | | @RequiredArgsConstructor
|
| | | public class SecurityConfig
|
| | | {
|
| | | /**
|
| | | * 自定义用户认证逻辑
|
| | | */
|
| | | @Autowired
|
| | | private UserDetailsService userDetailsService;
|
| | | private final UserDetailsService userDetailsService;
|
| | |
|
| | | /**
|
| | | * 认证失败处理类
|
| | | */
|
| | | @Autowired
|
| | | private AuthenticationEntryPointImpl unauthorizedHandler;
|
| | | private final AuthenticationEntryPointImpl unauthorizedHandler;
|
| | |
|
| | | /**
|
| | | * 退出处理类
|
| | | */
|
| | | @Autowired
|
| | | private LogoutSuccessHandlerImpl logoutSuccessHandler;
|
| | | private final LogoutSuccessHandlerImpl logoutSuccessHandler;
|
| | |
|
| | | /**
|
| | | * token认证过滤器
|
| | | */
|
| | | @Autowired
|
| | | private JwtAuthenticationTokenFilter authenticationTokenFilter;
|
| | | private final JwtAuthenticationTokenFilter authenticationTokenFilter;
|
| | |
|
| | | /**
|
| | | * 跨域过滤器
|
| | | */
|
| | | @Autowired
|
| | | private CorsFilter corsFilter;
|
| | | private final CorsFilter corsFilter;
|
| | |
|
| | | /**
|
| | | * 允许匿名访问的地址
|
| | | */
|
| | | @Autowired
|
| | | private PermitAllUrlProperties permitAllUrl;
|
| | | private final PermitAllUrlProperties permitAllUrl;
|
| | |
|
| | | /**
|
| | | * 身份验证实现
|
| | |
| | | import jakarta.servlet.ServletException;
|
| | | import jakarta.servlet.http.HttpServletRequest;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.context.annotation.Configuration;
|
| | | import org.springframework.security.core.Authentication;
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Configuration
|
| | | @RequiredArgsConstructor
|
| | | public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler
|
| | | {
|
| | | @Autowired
|
| | | private TokenService tokenService;
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.framework.security.service;
|
| | |
|
| | | import jakarta.annotation.Resource;
|
| | |
|
| | | import com.ruoyi.framework.web.domain.AjaxResult;
|
| | | import com.ruoyi.project.system.mapper.SysUserMapper;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.authentication.AuthenticationManager;
|
| | | import org.springframework.security.authentication.BadCredentialsException;
|
| | | import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
| | | import org.springframework.security.core.Authentication;
|
| | | import org.springframework.security.core.context.SecurityContextHolder;
|
| | | import org.springframework.stereotype.Component;
|
| | | import com.ruoyi.common.constant.CacheConstants;
|
| | | import com.ruoyi.common.constant.Constants;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | | import com.ruoyi.common.exception.user.BlackListException;
|
| | | import com.ruoyi.common.exception.user.CaptchaException;
|
| | | import com.ruoyi.common.exception.user.CaptchaExpireException;
|
| | | import com.ruoyi.common.exception.user.UserNotExistsException;
|
| | | import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
|
| | | import com.ruoyi.common.exception.user.*;
|
| | | import com.ruoyi.common.utils.DateUtils;
|
| | | import com.ruoyi.common.utils.MessageUtils;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | |
| | | import com.ruoyi.framework.security.LoginUser;
|
| | | import com.ruoyi.framework.security.context.AuthenticationContextHolder;
|
| | | import com.ruoyi.project.system.domain.SysUser;
|
| | | import com.ruoyi.project.system.mapper.SysUserMapper;
|
| | | import com.ruoyi.project.system.service.ISysConfigService;
|
| | | import com.ruoyi.project.system.service.ISysUserService;
|
| | | import jakarta.annotation.Resource;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.security.authentication.AuthenticationManager;
|
| | | import org.springframework.security.authentication.BadCredentialsException;
|
| | | import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
| | | import org.springframework.security.core.Authentication;
|
| | | import org.springframework.security.core.context.SecurityContextHolder;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import java.util.Collections;
|
| | | import java.util.HashMap;
|
| | | import java.util.Map;
|
| | |
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Component
|
| | | @RequiredArgsConstructor
|
| | | public class SysLoginService
|
| | | {
|
| | | @Autowired
|
| | | private TokenService tokenService;
|
| | | private final TokenService tokenService;
|
| | |
|
| | | @Resource
|
| | | private AuthenticationManager authenticationManager;
|
| | |
|
| | | @Autowired
|
| | | private RedisCache redisCache;
|
| | | private final RedisCache redisCache;
|
| | | private final ISysUserService userService;
|
| | | private final ISysConfigService configService;
|
| | | private final SysUserMapper sysUserMapper;
|
| | |
|
| | | @Autowired
|
| | | private ISysUserService userService;
|
| | |
|
| | | @Autowired
|
| | | private ISysConfigService configService;
|
| | |
|
| | | /**
|
| | | * 登录验证
|
| | |
| | | return loginUser.getUserId();
|
| | | }
|
| | |
|
| | | @Autowired
|
| | | private SysUserMapper sysUserMapper;
|
| | |
|
| | | /**
|
| | | * 登录验证
|
| | |
| | | package com.ruoyi.framework.security.service;
|
| | |
|
| | | import java.util.concurrent.TimeUnit;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.beans.factory.annotation.Value;
|
| | | import org.springframework.security.core.Authentication;
|
| | | import org.springframework.stereotype.Component;
|
| | | import com.ruoyi.common.constant.CacheConstants;
|
| | | import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
|
| | | import com.ruoyi.common.exception.user.UserPasswordRetryLimitExceedException;
|
| | |
| | | import com.ruoyi.framework.redis.RedisCache;
|
| | | import com.ruoyi.framework.security.context.AuthenticationContextHolder;
|
| | | import com.ruoyi.project.system.domain.SysUser;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Value;
|
| | | import org.springframework.security.core.Authentication;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import java.util.concurrent.TimeUnit;
|
| | |
|
| | | /**
|
| | | * 登录密码方法
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Component
|
| | | @RequiredArgsConstructor
|
| | | public class SysPasswordService
|
| | | {
|
| | | @Autowired
|
| | | private RedisCache redisCache;
|
| | | private final RedisCache redisCache;
|
| | |
|
| | | @Value(value = "${user.password.maxRetryCount}")
|
| | | private int maxRetryCount;
|
| | |
| | | package com.ruoyi.framework.security.service;
|
| | |
|
| | | import java.util.HashSet;
|
| | | import java.util.List;
|
| | | import java.util.Set;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Component;
|
| | | import org.springframework.util.CollectionUtils;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.project.system.domain.SysRole;
|
| | | import com.ruoyi.project.system.domain.SysUser;
|
| | | import com.ruoyi.project.system.service.ISysMenuService;
|
| | | import com.ruoyi.project.system.service.ISysRoleService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Component;
|
| | | import org.springframework.util.CollectionUtils;
|
| | |
|
| | | import java.util.HashSet;
|
| | | import java.util.List;
|
| | | import java.util.Set;
|
| | |
|
| | | /**
|
| | | * 用户权限处理
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Component
|
| | | @RequiredArgsConstructor
|
| | | public class SysPermissionService
|
| | | {
|
| | | @Autowired
|
| | | private ISysRoleService roleService;
|
| | |
|
| | | @Autowired
|
| | | private ISysMenuService menuService;
|
| | | private final ISysRoleService roleService;
|
| | | private final ISysMenuService menuService;
|
| | |
|
| | | /**
|
| | | * 获取角色数据权限
|
| | |
| | | package com.ruoyi.framework.security.service;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Component;
|
| | | import com.ruoyi.common.constant.CacheConstants;
|
| | | import com.ruoyi.common.constant.Constants;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | |
| | | import com.ruoyi.project.system.domain.SysUser;
|
| | | import com.ruoyi.project.system.service.ISysConfigService;
|
| | | import com.ruoyi.project.system.service.ISysUserService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | /**
|
| | | * 注册校验方法
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Component
|
| | | @RequiredArgsConstructor
|
| | | public class SysRegisterService
|
| | | {
|
| | | @Autowired
|
| | | private ISysUserService userService;
|
| | |
|
| | | @Autowired
|
| | | private ISysConfigService configService;
|
| | |
|
| | | @Autowired
|
| | | private RedisCache redisCache;
|
| | | private final ISysUserService userService;
|
| | | private final ISysConfigService configService;
|
| | | private final RedisCache redisCache;
|
| | |
|
| | | /**
|
| | | * 注册
|
| | |
| | | import io.jsonwebtoken.Jwts;
|
| | | import io.jsonwebtoken.security.Keys;
|
| | | import jakarta.servlet.http.HttpServletRequest;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.slf4j.Logger;
|
| | | import org.slf4j.LoggerFactory;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.beans.factory.annotation.Value;
|
| | | import org.springframework.stereotype.Component;
|
| | | import org.springframework.util.CollectionUtils;
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Component
|
| | | @RequiredArgsConstructor
|
| | | public class TokenService
|
| | | {
|
| | | private static final Logger log = LoggerFactory.getLogger(TokenService.class);
|
| | |
| | |
|
| | | private static final Long MILLIS_MINUTE_TWENTY = 20 * 60 * 1000L;
|
| | |
|
| | | @Autowired
|
| | | private RedisCache redisCache;
|
| | | private final RedisCache redisCache;
|
| | |
|
| | | /**
|
| | | * 获取用户身份信息
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Autowired
|
| | | private SysUserDeptMapper sysUserDeptMapper;
|
| | | private final SysUserDeptMapper sysUserDeptMapper;
|
| | |
|
| | | /**
|
| | | * 刷新令牌有效期
|
| | |
| | | package com.ruoyi.framework.security.service;
|
| | |
|
| | | import com.ruoyi.project.system.mapper.SysDeptMapper;
|
| | | import org.slf4j.Logger;
|
| | | import org.slf4j.LoggerFactory;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.core.Authentication;
|
| | | import org.springframework.security.core.context.SecurityContextHolder;
|
| | | import org.springframework.security.core.userdetails.UserDetails;
|
| | | import org.springframework.security.core.userdetails.UserDetailsService;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.common.enums.UserStatus;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | | import com.ruoyi.common.utils.MessageUtils;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.framework.security.LoginUser;
|
| | | import com.ruoyi.project.system.domain.SysUser;
|
| | | import com.ruoyi.project.system.mapper.SysDeptMapper;
|
| | | import com.ruoyi.project.system.service.ISysUserService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.slf4j.Logger;
|
| | | import org.slf4j.LoggerFactory;
|
| | | import org.springframework.security.core.Authentication;
|
| | | import org.springframework.security.core.context.SecurityContextHolder;
|
| | | import org.springframework.security.core.userdetails.UserDetails;
|
| | | import org.springframework.security.core.userdetails.UserDetailsService;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.Map;
|
| | |
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class UserDetailsServiceImpl implements UserDetailsService
|
| | | {
|
| | | private static final Logger log = LoggerFactory.getLogger(UserDetailsServiceImpl.class);
|
| | |
|
| | | @Autowired
|
| | | private ISysUserService userService;
|
| | | |
| | | @Autowired
|
| | | private SysPasswordService passwordService;
|
| | |
|
| | | @Autowired
|
| | | private SysPermissionService permissionService;
|
| | |
|
| | | @Autowired
|
| | | private SysDeptMapper deptMapper;
|
| | | private final ISysUserService userService;
|
| | | private final SysPasswordService passwordService;
|
| | | private final SysPermissionService permissionService;
|
| | | private final SysDeptMapper deptMapper;
|
| | |
|
| | | @Override
|
| | | public UserDetails loadUserByUsername(String username)
|
| | |
| | | package com.ruoyi.home.controller; |
| | | |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.dto.MapDto; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | |
| | | import com.ruoyi.home.annotation.DefaultType; |
| | | import com.ruoyi.home.dto.*; |
| | | import com.ruoyi.home.service.HomeService; |
| | | import com.ruoyi.dto.MapDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | |
| | | @RestController |
| | | @Api(tags = "首页统计") |
| | | @RequestMapping("/home") |
| | | @AllArgsConstructor |
| | | public class HomeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private HomeService homeService; |
| | | private final HomeService homeService; |
| | | |
| | | /********************************************************基础类*****************************************************/ |
| | | @GetMapping("/todos") |
| | |
| | | import com.ruoyi.staff.mapper.StaffOnJobMapper; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import com.ruoyi.stock.mapper.StockInventoryMapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class HomeServiceImpl implements HomeService { |
| | | |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | private final SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | @Autowired |
| | | private PurchaseLedgerMapper purchaseLedgerMapper; |
| | | private final PurchaseLedgerMapper purchaseLedgerMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | |
| | | @Autowired |
| | | private StockInventoryMapper stockInventoryMapper; |
| | | private final StockInventoryMapper stockInventoryMapper; |
| | | |
| | | @Autowired |
| | | private QualityInspectMapper qualityStatisticsMapper; |
| | | private final QualityInspectMapper qualityStatisticsMapper; |
| | | |
| | | @Autowired |
| | | private ApproveProcessMapper approveProcessMapper; |
| | | private final ApproveProcessMapper approveProcessMapper; |
| | | |
| | | @Autowired |
| | | private ReceiptPaymentMapper receiptPaymentMapper; |
| | | private final ReceiptPaymentMapper receiptPaymentMapper; |
| | | |
| | | @Autowired |
| | | private PaymentRegistrationMapper paymentRegistrationMapper; |
| | | private final PaymentRegistrationMapper paymentRegistrationMapper; |
| | | |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | private SysDeptMapper sysDeptMapper; |
| | | |
| | | @Autowired |
| | | private NoticeMapper noticeMapper; |
| | | |
| | | @Autowired |
| | | private ProductionOrderMapper productionOrderMapper; |
| | | |
| | | @Autowired |
| | | private ProductMapper productMapper; |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | @Autowired |
| | | private CustomerMapper customerMapper; |
| | | |
| | | @Autowired |
| | | private SupplierManageMapper supplierManageMapper; |
| | | |
| | | @Autowired |
| | | private HomeMapper homeMapper; |
| | | |
| | | @Autowired |
| | | private ProductionProductOutputMapper productionProductOutputMapper; |
| | | |
| | | @Autowired |
| | | private QualityInspectMapper qualityInspectMapper; |
| | | |
| | | @Autowired |
| | | private QualityUnqualifiedMapper qualityUnqualifiedMapper; |
| | | |
| | | @Autowired |
| | | private ProductionOperationTaskMapper productionOperationTaskMapper; |
| | | private final NoticeMapper noticeMapper; |
| | | |
| | | @Autowired |
| | | private AccountExpenseMapper accountExpenseMapper; |
| | | private final ProductionOrderMapper productionOrderMapper; |
| | | |
| | | @Autowired |
| | | private AccountIncomeMapper accountIncomeMapper; |
| | | private final ProductMapper productMapper; |
| | | |
| | | private final StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | private final CustomerMapper customerMapper; |
| | | |
| | | private final SupplierManageMapper supplierManageMapper; |
| | | |
| | | private final HomeMapper homeMapper; |
| | | |
| | | private final ProductionProductOutputMapper productionProductOutputMapper; |
| | | |
| | | private final QualityInspectMapper qualityInspectMapper; |
| | | |
| | | private final QualityUnqualifiedMapper qualityUnqualifiedMapper; |
| | | |
| | | private final ProductionOperationTaskMapper productionOperationTaskMapper; |
| | | |
| | | private final AccountExpenseMapper accountExpenseMapper; |
| | | |
| | | private final AccountIncomeMapper accountIncomeMapper; |
| | | |
| | | @Override |
| | | public HomeBusinessDto business() { |
| | |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | } |
| | | |
| | | @Autowired |
| | | |
| | | private DeviceRepairMapper deviceRepairMapper; |
| | | |
| | | @Override |
| | |
| | | return dto; |
| | | } |
| | | |
| | | @Autowired |
| | | |
| | | private ProductionProductInputMapper productionProductInputMapper; |
| | | |
| | | @Override |
| | |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | @Autowired |
| | | |
| | | private ProductionAccountMapper salesLedgerProductionAccountingMapper; |
| | | |
| | | @Override |
| | |
| | | import com.ruoyi.inspectiontask.service.InspectionTaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | |
| | | @RestController |
| | | @Api(tags = "巡检任务记录") |
| | | @RequestMapping("/inspectionTask") |
| | | @AllArgsConstructor |
| | | public class InspectionTaskController extends BaseController { |
| | | |
| | | @Autowired |
| | | private InspectionTaskService inspectionTaskService; |
| | | |
| | | /** |
| | |
| | | @GetMapping("/list") |
| | | @ApiOperation("巡检任务表表查询") |
| | | public R<IPage<InspectionTaskDto>> list(Page<InspectionTask> page, InspectionTaskDto inspectionTaskDto) { |
| | | IPage<InspectionTaskDto> list = inspectionTaskService.selectInspectionTaskList(page,inspectionTaskDto); |
| | | IPage<InspectionTaskDto> list = inspectionTaskService.selectInspectionTaskList(page, inspectionTaskDto); |
| | | return R.ok(list); |
| | | } |
| | | |
| | |
| | | @PostMapping("/export") |
| | | @ApiOperation(value = "导出定时任务记录") |
| | | public void export(HttpServletResponse response) { |
| | | Page page = new Page<>(-1,-1); |
| | | Page page = new Page<>(-1, -1); |
| | | InspectionTaskDto timingTask = new InspectionTaskDto(); |
| | | IPage<InspectionTaskDto> list = inspectionTaskService.selectInspectionTaskList(page,timingTask); |
| | | IPage<InspectionTaskDto> list = inspectionTaskService.selectInspectionTaskList(page, timingTask); |
| | | ExcelUtil<InspectionTaskDto> util = new ExcelUtil<>(InspectionTaskDto.class); |
| | | util.exportExcel(response, list.getRecords(), "导出定时任务记录"); |
| | | } |
| | |
| | | import com.ruoyi.inspectiontask.service.QrCodeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | |
| | | @RestController |
| | | @Api(tags = "二维码管理") |
| | | @RequestMapping("/qrCode") |
| | | @AllArgsConstructor |
| | | public class QrCodeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private QrCodeService qrCodeService; |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.inspectiontask.service.QrCodeScanRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RestController |
| | | @Api(tags = "二维码扫描记录管理") |
| | | @RequestMapping("/qrCodeScanRecord") |
| | | @AllArgsConstructor |
| | | public class QrCodeScanRecordController extends BaseController { |
| | | |
| | | @Autowired |
| | | private QrCodeScanRecordService qrCodeScanRecordService; |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.inspectiontask.service.TimingTaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.quartz.SchedulerException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.quartz.SchedulerException; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | @RestController |
| | | @Api(tags = "巡检管理") |
| | | @RequestMapping("/timingTask") |
| | | @AllArgsConstructor |
| | | public class TimingTaskController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private TimingTaskService timingTaskService; |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.sales.service.impl.CommonFileServiceImpl; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class InspectionTaskServiceImpl extends ServiceImpl<InspectionTaskMapper, InspectionTask> implements InspectionTaskService { |
| | | |
| | | |
| | | @Autowired |
| | | private InspectionTaskMapper inspectionTaskMapper; |
| | | private final InspectionTaskMapper inspectionTaskMapper; |
| | | |
| | | @Autowired |
| | | private StorageAttachmentService storageAttachmentService; |
| | | private final StorageAttachmentService storageAttachmentService; |
| | | |
| | | @Autowired |
| | | private StorageBlobMapper storageBlobMapper; |
| | | private final StorageBlobMapper storageBlobMapper; |
| | | |
| | | @Autowired |
| | | private StorageAttachmentMapper storageAttachmentMapper; |
| | | private final StorageAttachmentMapper storageAttachmentMapper; |
| | | |
| | | @Autowired |
| | | private MinioUtils minioUtils; |
| | | private final MinioUtils minioUtils; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private CommonFileMapper commonFileMapper; |
| | | private final CommonFileMapper commonFileMapper; |
| | | |
| | | @Autowired |
| | | private CommonFileServiceImpl commonFileService; |
| | | private final CommonFileServiceImpl commonFileService; |
| | | |
| | | @Override |
| | | public IPage<InspectionTaskDto> selectInspectionTaskList(Page<InspectionTask> page, InspectionTaskDto inspectionTaskDto) { |
| | |
| | | import com.ruoyi.basic.pojo.StorageAttachment; |
| | | import com.ruoyi.basic.pojo.StorageBlob; |
| | | import com.ruoyi.basic.service.StorageAttachmentService; |
| | | import com.ruoyi.common.utils.MinioUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.inspectiontask.dto.QrCodeScanRecordDto; |
| | | import com.ruoyi.inspectiontask.mapper.QrCodeMapper; |
| | |
| | | import com.ruoyi.inspectiontask.service.QrCodeScanRecordService; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class QrCodeScanRecordServiceImpl extends ServiceImpl<QrCodeScanRecordMapper, QrCodeScanRecord> implements QrCodeScanRecordService { |
| | | |
| | | @Autowired |
| | | private QrCodeScanRecordMapper qrCodeScanRecordMapper; |
| | | private final QrCodeScanRecordMapper qrCodeScanRecordMapper; |
| | | |
| | | @Autowired |
| | | private QrCodeMapper qrCodeMapper; |
| | | private final QrCodeMapper qrCodeMapper; |
| | | |
| | | @Autowired |
| | | private StorageAttachmentService storageAttachmentService; |
| | | private final StorageAttachmentService storageAttachmentService; |
| | | |
| | | @Autowired |
| | | private StorageBlobMapper storageBlobMapper; |
| | | private final StorageBlobMapper storageBlobMapper; |
| | | |
| | | @Autowired |
| | | private StorageAttachmentMapper storageAttachmentMapper; |
| | | private final StorageAttachmentMapper storageAttachmentMapper; |
| | | |
| | | @Autowired |
| | | private MinioUtils minioUtils; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | |
| | | @Override |
| | | public IPage<QrCodeScanRecordDto> selectQrCodeScanRecordList(Page<QrCodeScanRecord> page, QrCodeScanRecordDto qrCodeScanRecordDto) { |
| | |
| | | import com.ruoyi.inspectiontask.mapper.QrCodeMapper; |
| | | import com.ruoyi.inspectiontask.pojo.QrCode; |
| | | import com.ruoyi.inspectiontask.service.QrCodeService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class QrCodeServiceImpl extends ServiceImpl<QrCodeMapper, QrCode> implements QrCodeService { |
| | | |
| | | @Autowired |
| | | private QrCodeMapper qrCodeMapper; |
| | | private final QrCodeMapper qrCodeMapper; |
| | | |
| | | @Override |
| | | public IPage<QrCode> selectQrCodeList(Page page, QrCodeDto qrCodeDto) { |
| | |
| | | package com.ruoyi.inspectiontask.service.impl; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.quartz.Scheduler; |
| | | import org.quartz.spi.TriggerFiredBundle; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.config.AutowireCapableBeanFactory; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.context.ApplicationContextAware; |
| | |
| | | |
| | | |
| | | @Configuration |
| | | @RequiredArgsConstructor |
| | | public class QuartzConfig { |
| | | @Autowired |
| | | private ApplicationContext applicationContext; |
| | | private final ApplicationContext applicationContext; |
| | | |
| | | // 假设已配置名为dataSource的数据源Bean |
| | | @Autowired |
| | | private DataSource dataSource; |
| | | private final DataSource dataSource; |
| | | |
| | | @Bean |
| | | public SchedulerFactoryBean schedulerFactoryBean() { |
| | |
| | | package com.ruoyi.inspectiontask.service.impl; |
| | | |
| | | import com.ruoyi.inspectiontask.mapper.InspectionTaskMapper; |
| | | import com.ruoyi.inspectiontask.mapper.TimingTaskMapper; |
| | | import com.ruoyi.inspectiontask.pojo.InspectionTask; |
| | | import com.ruoyi.inspectiontask.pojo.TimingTask; |
| | | import com.ruoyi.inspectiontask.service.TimingTaskService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.quartz.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.core.BeanPropertyRowMapper; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | @Component |
| | | @DisallowConcurrentExecution // 禁止并发执行同一个Job |
| | | @RequiredArgsConstructor |
| | | public class TimingTaskJob implements Job, Serializable { |
| | | private static final long serialVersionUID = 1L; // 必须定义序列化ID |
| | | |
| | | @Autowired |
| | | private TimingTaskMapper timingTaskMapper; |
| | | |
| | | @Autowired |
| | | private TimingTaskService timingTaskService; |
| | | |
| | | @Autowired |
| | | private InspectionTaskMapper inspectionTaskMapper; |
| | | |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | private final InspectionTaskMapper inspectionTaskMapper; |
| | | private final JdbcTemplate jdbcTemplate; |
| | | |
| | | @Override |
| | | public void execute(JobExecutionContext context) throws JobExecutionException { |
| | |
| | | package com.ruoyi.inspectiontask.service.impl; |
| | | |
| | | import com.ruoyi.inspectiontask.pojo.TimingTask; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.quartz.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalTime; |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class TimingTaskScheduler { |
| | | |
| | | @Autowired |
| | | private Scheduler scheduler; |
| | | private final Scheduler scheduler; |
| | | |
| | | /** |
| | | * 添加新任务到调度器 |
| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.inspectiontask.dto.TimingTaskDto; |
| | | import com.ruoyi.inspectiontask.mapper.InspectionTaskMapper; |
| | | import com.ruoyi.inspectiontask.mapper.TimingTaskMapper; |
| | | import com.ruoyi.inspectiontask.pojo.TimingTask; |
| | | import com.ruoyi.inspectiontask.service.TimingTaskService; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.quartz.SchedulerException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class TimingTaskServiceImpl extends ServiceImpl<TimingTaskMapper, TimingTask> implements TimingTaskService { |
| | | |
| | | @Autowired |
| | | private TimingTaskMapper timingTaskMapper; |
| | | |
| | | @Autowired |
| | | private InspectionTaskMapper inspectionTaskMapper; |
| | | |
| | | @Autowired |
| | | private TimingTaskScheduler timingTaskScheduler; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | private final TimingTaskMapper timingTaskMapper; |
| | | private final TimingTaskScheduler timingTaskScheduler; |
| | | private final SysUserMapper sysUserMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | @RestController |
| | | @Api(tags = "劳保发放") |
| | | @RequestMapping("/lavorIssue") |
| | | @AllArgsConstructor |
| | | public class LavorIssueController extends BaseController { |
| | | |
| | | @Autowired |
| | | private LavorIssueService laborIssueService; |
| | | |
| | | @Autowired |
| | | private LavorIssueMapper lavorIssueMapper; |
| | | |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.approve.utils.StartAndEndDateDto; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.excel.ConfigurableMergeStrategy; |
| | | import com.ruoyi.common.utils.excel.CustomCellStyleHandler; |
| | | import com.ruoyi.lavorissue.dto.StatisticsLaborIssue; |
| | |
| | | import com.ruoyi.project.system.domain.SysDictData; |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysDictDataMapper; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ss.util.CellRangeAddress; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class LavorIssueServiceImpl extends ServiceImpl<LavorIssueMapper, LaborIssue> implements LavorIssueService { |
| | | |
| | | @Autowired |
| | | private LavorIssueMapper lavorIssueMapper; |
| | | private final LavorIssueMapper lavorIssueMapper; |
| | | private final SysDictDataMapper sysDictDataMapper; |
| | | private final SysDeptMapper sysDeptMapper; |
| | | |
| | | |
| | | @Override |
| | | public IPage<LaborIssue> listPage(Page page, LaborIssue laborIssue) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> statisticsList(LaborIssue laborIssue){ |
| | | public List<Map<String, Object>> statisticsList(LaborIssue laborIssue) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | StartAndEndDateDto startAndEndDateDto = getStartAndEndDateDto(laborIssue.getSeason(), laborIssue.getIssueDate()); |
| | | laborIssue.setStartDate(startAndEndDateDto.getStartDate()); |
| | |
| | | return records; |
| | | } |
| | | |
| | | public StartAndEndDateDto getStartAndEndDateDto(Integer season,Date payDate){ |
| | | public StartAndEndDateDto getStartAndEndDateDto(Integer season, Date payDate) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | StartAndEndDateDto startAndEndDateDto = new StartAndEndDateDto(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | int currentYear = calendar.get(Calendar.YEAR); |
| | | startAndEndDateDto.setYear(currentYear); |
| | | if(season != null){ |
| | | switch (season){ |
| | | if (season != null) { |
| | | switch (season) { |
| | | case 1: |
| | | startAndEndDateDto.setStartDate(currentYear + "-01-01"); |
| | | startAndEndDateDto.setEndDate(currentYear + "-03-31"); |
| | |
| | | break; |
| | | } |
| | | } |
| | | if(payDate != null){ |
| | | if (payDate != null) { |
| | | Date lastDayOfMonth = getLastDayOfMonth(payDate); |
| | | Date firstDayOfMonth = getFirstDayOfMonth(payDate); |
| | | startAndEndDateDto.setStartDate(sdf.format(firstDayOfMonth)); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public StatisticsLaborIssue statistics(StatisticsLaborIssue req) throws Exception{ |
| | | public StatisticsLaborIssue statistics(StatisticsLaborIssue req) throws Exception { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | StatisticsLaborIssue statisticsLaborIssue = new StatisticsLaborIssue(); |
| | | StartAndEndDateDto startAndEndDateDto = getStartAndEndDateDto(req.getSeason(), req.getIssueDate()); |
| | | LambdaQueryWrapper<LaborIssue> laborIssueLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | if(req.getSeason() != null || req.getIssueDate() != null){ |
| | | if (req.getSeason() != null || req.getIssueDate() != null) { |
| | | laborIssueLambdaQueryWrapper.ge(LaborIssue::getIssueDate, startAndEndDateDto.getStartDate()) |
| | | .le(LaborIssue::getIssueDate, startAndEndDateDto.getEndDate()); |
| | | } |
| | | List<LaborIssue> laborIssues = lavorIssueMapper.selectList(laborIssueLambdaQueryWrapper); |
| | | if(!CollectionUtils.isEmpty(laborIssues)){ |
| | | if (!CollectionUtils.isEmpty(laborIssues)) { |
| | | Long sum = laborIssues.stream() |
| | | .filter(laborIssue -> laborIssue.getAdoptedDate() != null) |
| | | .mapToLong(LaborIssue::getNum) |
| | |
| | | return statisticsLaborIssue; |
| | | } |
| | | |
| | | @Autowired |
| | | private SysDictDataMapper sysDictDataMapper; |
| | | |
| | | @Override |
| | | public void exportCopy(HttpServletResponse response, LaborIssue laborIssue) throws UnsupportedEncodingException { |
| | | List<SysDictData> sys_lavor_issue = sysDictDataMapper.selectDictDataByType("sys_lavor_issue"); |
| | | if(CollectionUtils.isEmpty(sys_lavor_issue)){ |
| | | if (CollectionUtils.isEmpty(sys_lavor_issue)) { |
| | | throw new RuntimeException("字典数据为空"); |
| | | } |
| | | StartAndEndDateDto startAndEndDateDto = getStartAndEndDateDto(laborIssue.getSeason(), laborIssue.getIssueDate()); |
| | |
| | | //新建ExcelWriter |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()) |
| | | .registerWriteHandler(new CustomCellStyleHandler()) |
| | | .registerWriteHandler(new ConfigurableMergeStrategy(exportExternalPackingListGetMerge(4,sys_lavor_issue.size(),laborIssueMap.size()))) |
| | | .registerWriteHandler(new ConfigurableMergeStrategy(exportExternalPackingListGetMerge(4, sys_lavor_issue.size(), laborIssueMap.size()))) |
| | | .build(); |
| | | |
| | | List<List<List<String>>> data = completeExternalPackingList(laborIssueMap, sys_lavor_issue,laborIssue); |
| | | List<List<List<String>>> data = completeExternalPackingList(laborIssueMap, sys_lavor_issue, laborIssue); |
| | | |
| | | for (int i = 0; i < data.size(); i++) { |
| | | List<List<String>> list = data.get(i); |
| | |
| | | } |
| | | } |
| | | |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | |
| | | |
| | | // 处理外部装箱单数据 |
| | | private List<List<List<String>>> completeExternalPackingList(Map<String, List<LaborIssue>> listMap,List<SysDictData> sys_lavor_issue,LaborIssue obj) { |
| | | // 处理外部装箱单数据 |
| | | private List<List<List<String>>> completeExternalPackingList(Map<String, List<LaborIssue>> listMap, List<SysDictData> sys_lavor_issue, LaborIssue obj) { |
| | | List<List<List<String>>> data = new ArrayList<>(); |
| | | int num = sys_lavor_issue.size(); |
| | | |
| | |
| | | list.add(""); |
| | | list.add("企业管理科"); |
| | | list.add(""); |
| | | list.add("企业管理科" + obj.getYear() + "年" + obj.getStartMonth() + "月-" + obj.getYear() + "年" + obj.getEndMonth() +"月劳保发放计划表"); |
| | | for (int i = 1; i <= num; i++){ |
| | | list.add("企业管理科" + obj.getYear() + "年" + obj.getStartMonth() + "月-" + obj.getYear() + "年" + obj.getEndMonth() + "月劳保发放计划表"); |
| | | for (int i = 1; i <= num; i++) { |
| | | list.add(""); |
| | | } |
| | | item.add(list); |
| | |
| | | list1.add(""); |
| | | list1.add("结束年/月"); |
| | | list1.add(""); |
| | | for (int i = 0; i <= num; i++){ |
| | | for (int i = 0; i <= num; i++) { |
| | | list1.add(""); |
| | | } |
| | | item.add(list1); |
| | |
| | | list2.add(obj.getStartMonth().toString()); |
| | | list2.add(obj.getYear().toString()); |
| | | list2.add(obj.getEndMonth().toString()); |
| | | for (int i = 0; i <= num; i++){ |
| | | for (int i = 0; i <= num; i++) { |
| | | list.add(""); |
| | | } |
| | | item.add(list2); |
| | |
| | | .mapToLong(LaborIssue::getNum) |
| | | .sum() |
| | | + ""); |
| | | if(i.get() == 0){ |
| | | if (i.get() == 0) { |
| | | sumList.add(value.stream().filter(laborIssue -> laborIssue.getDictId().equals(sysDictData.getDictValue())) |
| | | .mapToLong(LaborIssue::getNum) |
| | | .sum() |
| | | + ""); |
| | | }else { |
| | | sumList.set(j,(Long.parseLong(sumList.get(j)) + value.stream().filter(laborIssue -> laborIssue.getDictId().equals(sysDictData.getDictValue())) |
| | | } else { |
| | | sumList.set(j, (Long.parseLong(sumList.get(j)) + value.stream().filter(laborIssue -> laborIssue.getDictId().equals(sysDictData.getDictValue())) |
| | | .mapToLong(LaborIssue::getNum) |
| | | .sum()) |
| | | + ""); |
| | |
| | | list5.add(""); |
| | | list5.add(""); |
| | | list5.add(""); |
| | | for (int h = 0; h < sumList.size(); h++){ |
| | | for (int h = 0; h < sumList.size(); h++) { |
| | | list5.add(sumList.get(h)); |
| | | } |
| | | item.add(list5); |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | private List<CellRangeAddress> exportExternalPackingListGetMerge(Integer rowNum,Integer num,Integer listSize) { |
| | | private List<CellRangeAddress> exportExternalPackingListGetMerge(Integer rowNum, Integer num, Integer listSize) { |
| | | List<CellRangeAddress> mergeRegions = new ArrayList<>(); |
| | | mergeRegions.add(new CellRangeAddress(0, 0, 0, 1)); // 合并A1:Q2 |
| | | mergeRegions.add(new CellRangeAddress(0, 0, 2, 3)); // 合并A4:Q4 |
| | |
| | | |
| | | /** |
| | | * 获取当月第一天 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | |
| | | @RestController |
| | | @Api(tags = "计量器具台账") |
| | | @RequestMapping("/measuringInstrumentLedger") |
| | | @AllArgsConstructor |
| | | public class MeasuringInstrumentLedgerController extends BaseController { |
| | | |
| | | @Autowired |
| | | private MeasuringInstrumentLedgerService measuringInstrumentLedgerService; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private MeasuringInstrumentLedgerRecordMapper measuringInstrumentLedgerRecordMapper; |
| | | private final MeasuringInstrumentLedgerService measuringInstrumentLedgerService; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final MeasuringInstrumentLedgerRecordMapper measuringInstrumentLedgerRecordMapper; |
| | | |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import io.jsonwebtoken.lang.Collections; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @RestController |
| | | @Api(tags = "计量器具台账记录") |
| | | @RequestMapping("/measuringInstrumentLedgerRecord") |
| | | @AllArgsConstructor |
| | | public class MeasuringInstrumentLedgerRecordController extends BaseController { |
| | | |
| | | @Autowired |
| | | private MeasuringInstrumentLedgerRecordService measuringInstrumentLedgerRecordService; |
| | | |
| | | |
| | |
| | | import com.ruoyi.measuringinstrumentledger.service.SparePartsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RestController |
| | | @RequestMapping("/spareParts") |
| | | @Api(tags = "备件分类接口") |
| | | @AllArgsConstructor |
| | | public class SparePartsController { |
| | | @Autowired |
| | | private SparePartsService sparePartsService; |
| | | @GetMapping("/getTree") |
| | | @ApiOperation("备件分类-树结构") |
| | |
| | | import com.ruoyi.measuringinstrumentledger.service.SparePartsRequisitionRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | @RestController |
| | | @RequestMapping("/sparePartsRequisitionRecord") |
| | | @Api(tags = "备件领用记录接口") |
| | | @AllArgsConstructor |
| | | public class SparePartsRequisitionRecordController { |
| | | @Autowired |
| | | private SparePartsRequisitionRecordService sparePartsRequisitionRecordService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.other.pojo.TempFile; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Path; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class MeasuringInstrumentLedgerRecordServiceImpl extends ServiceImpl<MeasuringInstrumentLedgerRecordMapper, MeasuringInstrumentLedgerRecord> implements MeasuringInstrumentLedgerRecordService { |
| | | |
| | | @Autowired |
| | | private MeasuringInstrumentLedgerRecordMapper measuringInstrumentLedgerRecordMapper; |
| | | |
| | | @Autowired |
| | | private MeasuringInstrumentLedgerMapper measuringInstrumentLedgerMapper; |
| | | |
| | | @Autowired |
| | | private CommonFileMapper commonFileMapper; |
| | | |
| | | @Autowired |
| | | private TempFileMapper tempFileMapper; |
| | | private final MeasuringInstrumentLedgerRecordMapper measuringInstrumentLedgerRecordMapper; |
| | | private final MeasuringInstrumentLedgerMapper measuringInstrumentLedgerMapper; |
| | | private final CommonFileMapper commonFileMapper; |
| | | private final TempFileMapper tempFileMapper; |
| | | |
| | | @Value("${file.upload-dir}") |
| | | private String uploadDir; |
| | |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Path; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class MeasuringInstrumentLedgerServiceImpl extends ServiceImpl<MeasuringInstrumentLedgerMapper, MeasuringInstrumentLedger> implements MeasuringInstrumentLedgerService { |
| | | |
| | | @Autowired |
| | | private MeasuringInstrumentLedgerMapper measuringInstrumentLedgerMapper; |
| | | |
| | | @Autowired |
| | | private MeasuringInstrumentLedgerRecordMapper measuringInstrumentLedgerRecordMapper; |
| | | |
| | | @Autowired |
| | | private TempFileMapper tempFileMapper; |
| | | |
| | | @Autowired |
| | | private CommonFileMapper commonFileMapper; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | private final MeasuringInstrumentLedgerMapper measuringInstrumentLedgerMapper; |
| | | private final MeasuringInstrumentLedgerRecordMapper measuringInstrumentLedgerRecordMapper; |
| | | private final TempFileMapper tempFileMapper; |
| | | private final CommonFileMapper commonFileMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | |
| | | @Value("${file.upload-dir}") |
| | | private String uploadDir; |
| | |
| | | import com.ruoyi.measuringinstrumentledger.mapper.SparePartsRequisitionRecordMapper; |
| | | import com.ruoyi.measuringinstrumentledger.pojo.SparePartsRequisitionRecord; |
| | | import com.ruoyi.measuringinstrumentledger.service.SparePartsRequisitionRecordService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author 芯导软件(江苏)有限公司 |
| | | * @since 2026-04-02 03:59:56 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SparePartsRequisitionRecordServiceImpl extends ServiceImpl<SparePartsRequisitionRecordMapper, SparePartsRequisitionRecord> implements SparePartsRequisitionRecordService { |
| | | @Autowired |
| | | private SparePartsRequisitionRecordMapper sparePartsRequisitionRecordMapper; |
| | | private final SparePartsRequisitionRecordMapper sparePartsRequisitionRecordMapper; |
| | | |
| | | @Override |
| | | public IPage<SparePartsRequisitionRecordDto> listPage(Page page, SparePartsRequisitionRecordDto sparePartsRequisitionRecordDto) { |
| | |
| | | import com.ruoyi.measuringinstrumentledger.mapper.SparePartsMapper; |
| | | import com.ruoyi.measuringinstrumentledger.pojo.SpareParts; |
| | | import com.ruoyi.measuringinstrumentledger.service.SparePartsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SparePartsServiceImpl extends ServiceImpl<SparePartsMapper, SpareParts> implements SparePartsService { |
| | | @Autowired |
| | | private SparePartsMapper sparePartsMapper; |
| | | |
| | | @Autowired |
| | | private DeviceLedgerMapper deviceLedgerMapper; |
| | | private final SparePartsMapper sparePartsMapper; |
| | | private final DeviceLedgerMapper deviceLedgerMapper; |
| | | |
| | | @Override |
| | | public IPage<SparePartsDto> listPage(Page page, SpareParts spareParts) { |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | |
| | | |
| | | @Api(tags = "oA项目管理") |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/oA/project") |
| | | public class OaProjectController { |
| | | @Autowired |
| | | private OaProjectService oaProjectService; |
| | | private final OaProjectService oaProjectService; |
| | | |
| | | @ApiOperation("获取项目列表") |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.oA.service.OaProjectPhaseService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Api(tags = "oA项目阶段管理") |
| | | @RestController |
| | | @RequestMapping("/oA/projectPhase") |
| | | @AllArgsConstructor |
| | | public class OaProjectPhaseController { |
| | | @Autowired |
| | | private OaProjectPhaseService oaProjectPhaseService; |
| | | private final OaProjectPhaseService oaProjectPhaseService; |
| | | |
| | | @ApiOperation("新增项目阶段") |
| | | @PostMapping("/add") |
| | |
| | | import com.ruoyi.oA.service.OaProjectPhaseTaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Api(tags = "oA项目阶段任务管理") |
| | | @RestController |
| | | @RequestMapping("/oA/projectPhaseTask") |
| | | @AllArgsConstructor |
| | | public class OaProjectPhaseTaskController { |
| | | @Autowired |
| | | private OaProjectPhaseTaskService oaProjectPhaseTaskService; |
| | | private final OaProjectPhaseTaskService oaProjectPhaseTaskService; |
| | | |
| | | @ApiOperation("新增项目阶段任务") |
| | | @PostMapping("/add") |
| | |
| | | package com.ruoyi.oA.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.oA.dto.OaProjectPhaseDto; |
| | | import com.ruoyi.oA.mapper.OaProjectPhaseMapper; |
| | | import com.ruoyi.oA.pojo.OaProjectPhase; |
| | | import com.ruoyi.oA.pojo.OaProjectPhaseTask; |
| | | import com.ruoyi.oA.service.OaProjectPhaseService; |
| | | import com.ruoyi.oA.mapper.OaProjectPhaseMapper; |
| | | import com.ruoyi.oA.service.OaProjectPhaseTaskService; |
| | | import lombok.val; |
| | | import org.hibernate.validator.constraints.br.TituloEleitoral; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | * @createDate 2025-09-24 09:18:46 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class OaProjectPhaseServiceImpl extends ServiceImpl<OaProjectPhaseMapper, OaProjectPhase> |
| | | implements OaProjectPhaseService{ |
| | | @Autowired |
| | | private OaProjectPhaseMapper oaProjectPhaseMapper; |
| | | @Autowired |
| | | private OaProjectPhaseTaskService oaProjectPhaseTaskService; |
| | | private final OaProjectPhaseMapper oaProjectPhaseMapper; |
| | | private final OaProjectPhaseTaskService oaProjectPhaseTaskService; |
| | | |
| | | @Override |
| | | public List<OaProjectPhaseDto> listByProjectId(Integer oaProjectId) { |
| | |
| | | import com.ruoyi.oA.service.OaProjectPhaseService; |
| | | import com.ruoyi.oA.service.OaProjectService; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequiredArgsConstructor |
| | | public class OaProjectServiceImpl extends ServiceImpl<OaProjectMapper, OaProject> |
| | | implements OaProjectService{ |
| | | @Autowired |
| | | private OaProjectMapper oaProjectMapper; |
| | | @Autowired |
| | | private OaProjectPhaseService oaProjectPhaseService; |
| | | private final OaProjectMapper oaProjectMapper; |
| | | private final OaProjectPhaseService oaProjectPhaseService; |
| | | |
| | | @Override |
| | | public IPage<OaProjectDto> listPage(Page page, OaProjectDto oaProjectDto) { |
| | |
| | | import com.ruoyi.officesupplies.service.OfficeSuppliesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | @RestController |
| | | @Api(tags = "办公物资") |
| | | @RequestMapping("/officeSupplies") |
| | | @AllArgsConstructor |
| | | public class OfficeSuppliesController extends BaseController { |
| | | |
| | | @Autowired |
| | | private OfficeSuppliesService officeSuppliesService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.officesupplies.mapper.OfficeSuppliesMapper; |
| | | import com.ruoyi.officesupplies.pojo.OfficeSupplies; |
| | | import com.ruoyi.officesupplies.service.OfficeSuppliesService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class OfficeSuppliesServiceImpl extends ServiceImpl<OfficeSuppliesMapper, OfficeSupplies> implements OfficeSuppliesService { |
| | | |
| | | @Autowired |
| | | private OfficeSuppliesMapper officeSuppliesMapper; |
| | | private final OfficeSuppliesMapper officeSuppliesMapper; |
| | | |
| | | @Override |
| | | public AjaxResult listPage(Page page, OfficeSupplies officeSupplies) { |
| | |
| | | import com.ruoyi.other.service.TempFileService; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class TempFileServiceImpl extends ServiceImpl<TempFileMapper, TempFile> implements TempFileService { |
| | | |
| | | @Autowired |
| | | private TempFileMapper tempFileMapper; |
| | | |
| | | @Autowired |
| | | private CommonFileMapper commonFileMapper; |
| | | private final TempFileMapper tempFileMapper; |
| | | private final CommonFileMapper commonFileMapper; |
| | | |
| | | @Value("${file.upload-dir}") |
| | | private String uploadDir; |
| | | |
| | | @Value("${file.temp-dir}") |
| | | private String tempDir; |
| | | |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.pojo.GasTankWarning; |
| | | import com.ruoyi.procurementrecord.service.GasTankWarningService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/gasTankWarning") |
| | | @AllArgsConstructor |
| | | public class GasTankWarningController { |
| | | @Autowired |
| | | private GasTankWarningService gasTankWarningService; |
| | | |
| | | @GetMapping("/listPage") |
| | | public AjaxResult listPage(Page page, GasTankWarning gasTankWarning) { |
| | | return AjaxResult.success(gasTankWarningService.listPage(page, gasTankWarning)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody GasTankWarning gasTankWarning) { |
| | | return AjaxResult.success(gasTankWarningService.save(gasTankWarning)); |
| | | } |
| | | |
| | | @PostMapping("update") |
| | | public AjaxResult update(@RequestBody GasTankWarning gasTankWarning) { |
| | | return AjaxResult.success(gasTankWarningService.updateById(gasTankWarning)); |
| | | } |
| | | |
| | | @DeleteMapping("delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | | return AjaxResult.success(gasTankWarningService.removeByIds(ids)); |
| | | } |
| | | |
| | | //导出 |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response,@RequestParam(name = "ids", required = false) List<Long> ids){ |
| | | gasTankWarningService.export(response,ids); |
| | | public void export(HttpServletResponse response, @RequestParam(name = "ids", required = false) List<Long> ids) { |
| | | gasTankWarningService.export(response, ids); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.ruoyi.procurementrecord.service.InboundManagementService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RestController |
| | | @Api(tags = "到货管理") |
| | | @RequestMapping("/inboundManagement") |
| | | @AllArgsConstructor |
| | | public class InboundManagementController extends BaseController { |
| | | |
| | | @Autowired |
| | | private InboundManagementService inboundManagementService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @RestController |
| | | @Api(tags = "采购异常记录") |
| | | @RequestMapping("/procurementExceptionRecord") |
| | | @AllArgsConstructor |
| | | public class ProcurementExceptionRecordController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private ProcurementExceptionRecordMapper procurementExceptionRecordMapper; |
| | | |
| | | @PostMapping("/add") |
| | |
| | | import com.ruoyi.procurementrecord.service.ProcurementPlanService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @RestController |
| | | @Api(tags = "采购计划") |
| | | @RequestMapping("/procurementPlan") |
| | | @AllArgsConstructor |
| | | public class ProcurementPlanController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ProcurementPlanService procurementPlanService; |
| | | |
| | | @RequestMapping("/listPage") |
| | |
| | | import com.ruoyi.procurementrecord.service.ProcurementPriceManagementService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @RestController |
| | | @Api(tags = "采购价格管理") |
| | | @RequestMapping("/procurementPriceManagement") |
| | | @AllArgsConstructor |
| | | public class ProcurementPriceManagementController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ProcurementPriceManagementService procurementPriceManagementService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @RestController |
| | | @Api(tags = "采购入库") |
| | | @RequestMapping("/stockin") |
| | | @AllArgsConstructor |
| | | public class ProcurementRecordController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private ProcurementRecordService procurementRecordService; |
| | | |
| | | private CustomStorageMapper customStorageMapper; |
| | | |
| | | /** |
| | | * 通过销售产品id获取入库数量 |
| | | * |
| | | * @param salesProductId |
| | | * @return |
| | | */ |
| | |
| | | IPage<ProcurementPageDto> result = procurementRecordService.listPage(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listReport") |
| | | @ApiOperation(value = "查询库存图表数据") |
| | | public AjaxResult listReport() { |
| | | return AjaxResult.success(procurementRecordService.getReportList()); |
| | | } |
| | | |
| | | @GetMapping("/listPageByProduction") |
| | | @Log(title = "生产入库-入库管理-入库查询", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "入库查询") |
| | |
| | | |
| | | /** |
| | | * 库存管理采购导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopy") |
| | | public void exportCopy(HttpServletResponse response) { |
| | | procurementRecordService.exportCopy(response,1); |
| | | procurementRecordService.exportCopy(response, 1); |
| | | } |
| | | |
| | | /** |
| | | * 库存管理生产导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopyOne") |
| | | public void exportCopyOne(HttpServletResponse response) { |
| | | procurementRecordService.exportCopy(response,2); |
| | | procurementRecordService.exportCopy(response, 2); |
| | | } |
| | | |
| | | /** |
| | | * 库存管理自定义导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopyTwo") |
| | | public void exportCopyTwo(HttpServletResponse response) { |
| | | procurementRecordService.exportCopyTwo(response,3); |
| | | procurementRecordService.exportCopyTwo(response, 3); |
| | | } |
| | | |
| | | /** |
| | | * 入库,出库管理采购导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | procurementRecordService.export(response,1); |
| | | procurementRecordService.export(response, 1); |
| | | } |
| | | |
| | | /** |
| | | * 入库,出库管理生产导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportOne") |
| | | public void exportOne(HttpServletResponse response) { |
| | | procurementRecordService.export(response,2); |
| | | procurementRecordService.export(response, 2); |
| | | } |
| | | |
| | | @Autowired |
| | | private CustomStorageMapper customStorageMapper; |
| | | |
| | | /** |
| | | * 入库,出库管理自定义导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportTwo") |
| | |
| | | @GetMapping("/listPageProductionStock") |
| | | @Log(title = "库存管理-成品库存", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageProductionStock(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProductModel> result = procurementRecordService.listPageProductionStock(page,procurementDto); |
| | | IPage<ProductModel> result = procurementRecordService.listPageProductionStock(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementRecordOutAdd; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementUpdateDto; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementRecordOutMapper; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordOutService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @RestController |
| | | @Api(tags = "采购出库") |
| | | @RequestMapping("/stockmanagement") |
| | | @AllArgsConstructor |
| | | public class ProcurementRecordOutController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ProcurementRecordOutService procurementRecordOutService; |
| | | private ProcurementRecordOutMapper procurementRecordOutMapper; |
| | | |
| | | @PostMapping("/stockout") |
| | | @Log(title = "采购出库-出库管理-出库", businessType = BusinessType.INSERT) |
| | |
| | | |
| | | /** |
| | | * 采购出库导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | public ProcurementRecordOutMapper procurementRecordOutMapper; |
| | | /** |
| | | * 生产出库导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportOne") |
| | |
| | | |
| | | /** |
| | | * 自定义出库导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportTwo") |
| | |
| | | import com.ruoyi.sales.dto.SalesLedgerDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | */ |
| | | @RestController |
| | | @Api(tags = "销售退货") |
| | | @AllArgsConstructor |
| | | @RequestMapping("/returnManagement") |
| | | public class ReturnManagementController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ReturnManagementService returnManagementService; |
| | | @Autowired |
| | | private ReturnSaleProductService returnSaleProductService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDto; |
| | | import com.ruoyi.procurementrecord.mapper.GasTankWarningMapper; |
| | | import com.ruoyi.procurementrecord.pojo.GasTankWarning; |
| | | import com.ruoyi.procurementrecord.service.GasTankWarningService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class GasTankWarningServiceImpl extends ServiceImpl<GasTankWarningMapper, GasTankWarning> implements GasTankWarningService { |
| | | @Autowired |
| | | private GasTankWarningMapper gasTankWarningMapper; |
| | | private final GasTankWarningMapper gasTankWarningMapper; |
| | | |
| | | @Override |
| | | public IPage listPage(Page page, GasTankWarning gasTankWarning) { |
| | | return gasTankWarningMapper.listPage(page,gasTankWarning); |
| | | return gasTankWarningMapper.listPage(page, gasTankWarning); |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response, List<Long> ids) { |
| | | List<GasTankWarning> list = new ArrayList<>(); |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | list = gasTankWarningMapper.selectList(null); |
| | | }else { |
| | | } else { |
| | | list = gasTankWarningMapper.selectBatchIds(ids); |
| | | } |
| | | ExcelUtil<GasTankWarning> util = new ExcelUtil<>(GasTankWarning.class); |
| | |
| | | import com.ruoyi.procurementrecord.mapper.InboundManagementMapper; |
| | | import com.ruoyi.procurementrecord.pojo.InboundManagement; |
| | | import com.ruoyi.procurementrecord.service.InboundManagementService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class InboundManagementServiceImpl extends ServiceImpl<InboundManagementMapper, InboundManagement> implements InboundManagementService { |
| | | |
| | | @Autowired |
| | | private InboundManagementMapper inboundManagementMapper; |
| | | private final InboundManagementMapper inboundManagementMapper; |
| | | |
| | | @Override |
| | | public IPage<InboundManagement> listPage(Page page, InboundManagement inboundManagement) { |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementPlanMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementPlan; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementPriceManagement; |
| | | import com.ruoyi.procurementrecord.service.ProcurementPlanService; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class ProcurementPlanServiceImpl extends ServiceImpl<ProcurementPlanMapper, ProcurementPlan> implements ProcurementPlanService { |
| | | |
| | | @Autowired |
| | | private ProcurementPlanMapper procurementPlanMapper; |
| | | private final ProcurementPlanMapper procurementPlanMapper; |
| | | |
| | | @Override |
| | | public IPage<ProcurementPlan> listPage(Page page, ProcurementPlan procurementPlan) { |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.excel.ExcelUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDto; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementPriceManagementMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementPriceManagement; |
| | | import com.ruoyi.procurementrecord.service.ProcurementPriceManagementService; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class ProcurementPriceManagementServiceImpl extends ServiceImpl<ProcurementPriceManagementMapper, ProcurementPriceManagement> implements ProcurementPriceManagementService { |
| | | |
| | | |
| | | @Autowired |
| | | private ProcurementPriceManagementMapper procurementPriceManagementMapper; |
| | | private final ProcurementPriceManagementMapper procurementPriceManagementMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | package com.ruoyi.procurementrecord.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.dto.SalesRefundAmountOrderDto; |
| | | import com.ruoyi.account.mapper.AccountExpenseMapper; |
| | | import com.ruoyi.account.pojo.AccountExpense; |
| | | import com.ruoyi.account.pojo.SalesRefundAmountOrder; |
| | | import com.ruoyi.account.service.SalesRefundAmountOrderService; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockInUnQualifiedRecordTypeEnum; |
| | |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.ShippingInfoService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class ReturnManagementServiceImpl extends ServiceImpl<ReturnManagementMapper, ReturnManagement> implements ReturnManagementService { |
| | | |
| | | @Autowired |
| | | private ReturnManagementMapper returnManagementMapper; |
| | | |
| | | @Autowired |
| | | private ReturnSaleProductService returnSaleProductService; |
| | | @Autowired |
| | | private ShippingInfoService shippingInfoService; |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | @Autowired |
| | | private SalesRefundAmountOrderService salesRefundAmountOrderService; |
| | | |
| | | @Autowired |
| | | private StockUtils stockUtils; |
| | | |
| | | @Autowired |
| | | private AccountExpenseMapper accountExpenseMapper; |
| | | private final ReturnManagementMapper returnManagementMapper; |
| | | private final ReturnSaleProductService returnSaleProductService; |
| | | private final ShippingInfoService shippingInfoService; |
| | | private final SalesLedgerMapper salesLedgerMapper; |
| | | private final SalesRefundAmountOrderService salesRefundAmountOrderService; |
| | | private final StockUtils stockUtils; |
| | | private final AccountExpenseMapper accountExpenseMapper; |
| | | |
| | | @Override |
| | | public IPage<ReturnManagementDto> listPage(Page page, ReturnManagementDto returnManagement) { |
| | |
| | | package com.ruoyi.procurementrecord.service.impl; |
| | | |
| | | import com.ruoyi.procurementrecord.dto.ReturnSaleProductDto; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnSaleProduct; |
| | | import com.ruoyi.procurementrecord.mapper.ReturnSaleProductMapper; |
| | | import com.ruoyi.procurementrecord.service.ReturnSaleProductService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.ruoyi.procurementrecord.dto.ReturnSaleProductDto; |
| | | import com.ruoyi.procurementrecord.mapper.ReturnSaleProductMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnSaleProduct; |
| | | import com.ruoyi.procurementrecord.service.ReturnSaleProductService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @since 2026-03-05 03:57:42 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class ReturnSaleProductServiceImpl extends ServiceImpl<ReturnSaleProductMapper, ReturnSaleProduct> implements ReturnSaleProductService { |
| | | |
| | | @Autowired |
| | | private ReturnSaleProductMapper returnSaleProductMapper; |
| | | private final ReturnSaleProductMapper returnSaleProductMapper; |
| | | |
| | | @Override |
| | | public List<ReturnSaleProductDto> listReturnSaleProductDto(Long returnManagementId) { |
| | | |
| | |
| | | import com.ruoyi.production.bean.dto.ProductionProductInputDto; |
| | | import com.ruoyi.production.service.ProductionProductInputService; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @RequestMapping("productionProductInput") |
| | | @RestController |
| | | @Api(value = "生产投入") |
| | | @AllArgsConstructor |
| | | public class ProductionProductInputController { |
| | | |
| | | @Autowired |
| | | private ProductionProductInputService productionProductInputService; |
| | | |
| | | @GetMapping("listPage") |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RequestMapping("productionProductMain") |
| | | @RestController |
| | | @Api(value = "生产报工") |
| | | @AllArgsConstructor |
| | | public class ProductionProductMainController { |
| | | |
| | | @Autowired |
| | | private ProductionProductMainService productionProductMainService; |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.production.bean.dto.ProductionProductOutputDto; |
| | | import com.ruoyi.production.service.ProductionProductOutputService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | @RequestMapping("productionProductOutput") |
| | | @RestController |
| | | @Api(value = "生产产出") |
| | | @AllArgsConstructor |
| | | public class ProductionProductOutputController { |
| | | |
| | | @Autowired |
| | | private ProductionProductOutputService productionProductOutputService; |
| | | |
| | | @GetMapping("listPage") |
| | |
| | | import com.ruoyi.production.mapper.ProductionProductInputMapper; |
| | | import com.ruoyi.production.pojo.ProductionProductInput; |
| | | import com.ruoyi.production.service.ProductionProductInputService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | @RequiredArgsConstructor |
| | | public class ProductionProductInputServiceImpl extends ServiceImpl<ProductionProductInputMapper, ProductionProductInput> implements ProductionProductInputService { |
| | | @Autowired |
| | | private ProductionProductInputMapper productionProductInputMapper; |
| | | private final ProductionProductInputMapper productionProductInputMapper; |
| | | |
| | | @Override |
| | | public IPage<ProductionProductInputDto> listPageProductionProductInputDto(Page page, ProductionProductInputDto productionProductInputDto) { |
| | |
| | | import com.ruoyi.production.mapper.ProductionProductOutputMapper; |
| | | import com.ruoyi.production.pojo.ProductionProductOutput; |
| | | import com.ruoyi.production.service.ProductionProductOutputService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | @RequiredArgsConstructor |
| | | public class ProductionProductOutputServiceImpl extends ServiceImpl<ProductionProductOutputMapper, ProductionProductOutput> implements ProductionProductOutputService { |
| | | @Autowired |
| | | private ProductionProductOutputMapper productionProductOutputMapper; |
| | | private final ProductionProductOutputMapper productionProductOutputMapper; |
| | | |
| | | @Override |
| | | public IPage<ProductionProductOutputDto> listPageProductionProductOutputDto(Page page, ProductionProductOutputDto productionProductOutputDto) { |
| | |
| | | package com.ruoyi.project.common;
|
| | |
|
| | | import java.awt.image.BufferedImage;
|
| | | import java.io.IOException;
|
| | | import java.util.concurrent.TimeUnit;
|
| | | import jakarta.annotation.Resource;
|
| | | import javax.imageio.ImageIO;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.beans.factory.annotation.Value;
|
| | | import org.springframework.util.FastByteArrayOutputStream;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.google.code.kaptcha.Producer;
|
| | | import com.ruoyi.common.constant.CacheConstants;
|
| | | import com.ruoyi.common.constant.Constants;
|
| | |
| | | import com.ruoyi.framework.redis.RedisCache;
|
| | | import com.ruoyi.framework.web.domain.AjaxResult;
|
| | | import com.ruoyi.project.system.service.ISysConfigService;
|
| | | import jakarta.annotation.Resource;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Value;
|
| | | import org.springframework.util.FastByteArrayOutputStream;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | |
|
| | | import javax.imageio.ImageIO;
|
| | | import java.awt.image.BufferedImage;
|
| | | import java.io.IOException;
|
| | | import java.util.concurrent.TimeUnit;
|
| | |
|
| | | /**
|
| | | * 验证码操作处理
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @RestController
|
| | | @AllArgsConstructor
|
| | | public class CaptchaController
|
| | | {
|
| | | @Resource(name = "captchaProducer")
|
| | |
| | | @Resource(name = "captchaProducerMath")
|
| | | private Producer captchaProducerMath;
|
| | |
|
| | | @Autowired
|
| | | private RedisCache redisCache;
|
| | |
|
| | | // 验证码类型
|
| | | @Value("${ruoyi.captchaType}")
|
| | | private String captchaType;
|
| | |
|
| | | @Autowired
|
| | | private ISysConfigService configService;
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.project.monitor.controller;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Collection;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Properties;
|
| | | import java.util.Set;
|
| | | import java.util.TreeSet;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.data.redis.core.RedisCallback;
|
| | | import org.springframework.data.redis.core.RedisTemplate;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PathVariable;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.constant.CacheConstants;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.framework.web.domain.AjaxResult;
|
| | | import com.ruoyi.project.monitor.domain.SysCache;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.data.redis.core.RedisCallback;
|
| | | import org.springframework.data.redis.core.RedisTemplate;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.util.*;
|
| | |
|
| | | /**
|
| | | * 缓存监控
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/monitor/cache")
|
| | | @AllArgsConstructor
|
| | | public class CacheController
|
| | | {
|
| | | @Autowired
|
| | | private RedisTemplate<String, String> redisTemplate;
|
| | |
|
| | | private final static List<SysCache> caches = new ArrayList<SysCache>();
|
| | |
| | |
|
| | | import java.util.List;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.quartz.SchedulerException;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/monitor/job")
|
| | | @AllArgsConstructor
|
| | | public class SysJobController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysJobService jobService;
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | import java.util.List;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/monitor/jobLog")
|
| | | @AllArgsConstructor
|
| | | public class SysJobLogController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysJobLogService jobLogService;
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.project.monitor.controller;
|
| | |
|
| | | import java.util.List;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PathVariable;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.utils.poi.ExcelUtil;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
| | |
| | | import com.ruoyi.framework.web.page.TableDataInfo;
|
| | | import com.ruoyi.project.monitor.domain.SysLogininfor;
|
| | | import com.ruoyi.project.monitor.service.ISysLogininforService;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 系统访问记录
|
| | | * |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/monitor/logininfor")
|
| | | public class SysLogininforController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | @AllArgsConstructor
|
| | | public class SysLogininforController extends BaseController {
|
| | | private ISysLogininforService logininforService;
|
| | |
|
| | | @Autowired
|
| | | private SysPasswordService passwordService;
|
| | |
|
| | | @PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
|
| | | @GetMapping("/list")
|
| | | public TableDataInfo list(SysLogininfor logininfor)
|
| | | {
|
| | | public TableDataInfo list(SysLogininfor logininfor) {
|
| | | startPage();
|
| | | List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
|
| | | return getDataTable(list);
|
| | |
| | | @Log(title = "登录日志", businessType = BusinessType.EXPORT)
|
| | | @PreAuthorize("@ss.hasPermi('monitor:logininfor:export')")
|
| | | @PostMapping("/export")
|
| | | public void export(HttpServletResponse response, SysLogininfor logininfor)
|
| | | {
|
| | | public void export(HttpServletResponse response, SysLogininfor logininfor) {
|
| | | List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
|
| | | ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
|
| | | util.exportExcel(response, list, "登录日志");
|
| | |
| | | @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
|
| | | @Log(title = "登录日志", businessType = BusinessType.DELETE)
|
| | | @DeleteMapping("/{infoIds}")
|
| | | public AjaxResult remove(@PathVariable Long[] infoIds)
|
| | | {
|
| | | public AjaxResult remove(@PathVariable Long[] infoIds) {
|
| | | return toAjax(logininforService.deleteLogininforByIds(infoIds));
|
| | | }
|
| | |
|
| | | @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
|
| | | @Log(title = "登录日志", businessType = BusinessType.CLEAN)
|
| | | @DeleteMapping("/clean")
|
| | | public AjaxResult clean()
|
| | | {
|
| | | public AjaxResult clean() {
|
| | | logininforService.cleanLogininfor();
|
| | | return success();
|
| | | }
|
| | |
| | | @PreAuthorize("@ss.hasPermi('monitor:logininfor:unlock')")
|
| | | @Log(title = "账户解锁", businessType = BusinessType.OTHER)
|
| | | @GetMapping("/unlock/{userName}")
|
| | | public AjaxResult unlock(@PathVariable("userName") String userName)
|
| | | {
|
| | | public AjaxResult unlock(@PathVariable("userName") String userName) {
|
| | | passwordService.clearLoginRecordCache(userName);
|
| | | return success();
|
| | | }
|
| | |
| | |
|
| | | import java.util.List;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/monitor/operlog")
|
| | | @AllArgsConstructor
|
| | | public class SysOperlogController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysOperLogService operLogService;
|
| | |
|
| | | @PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
|
| | |
| | | import java.util.Collection;
|
| | | import java.util.Collections;
|
| | | import java.util.List;
|
| | |
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/monitor/online")
|
| | | @AllArgsConstructor
|
| | | public class SysUserOnlineController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysUserOnlineService userOnlineService;
|
| | |
|
| | | @Autowired
|
| | | private RedisCache redisCache;
|
| | |
|
| | | @PreAuthorize("@ss.hasPermi('monitor:online:list')")
|
| | |
| | | package com.ruoyi.project.monitor.service.impl;
|
| | |
|
| | | import java.util.List;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.project.monitor.domain.SysJobLog;
|
| | | import com.ruoyi.project.monitor.mapper.SysJobLogMapper;
|
| | | import com.ruoyi.project.monitor.service.ISysJobLogService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 定时任务调度日志信息 服务层
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysJobLogServiceImpl implements ISysJobLogService
|
| | | {
|
| | | @Autowired
|
| | | private SysJobLogMapper jobLogMapper;
|
| | | private final SysJobLogMapper jobLogMapper;
|
| | |
|
| | | /**
|
| | | * 获取quartz调度器日志的计划任务
|
| | |
| | | import com.ruoyi.project.monitor.mapper.SysJobMapper;
|
| | | import com.ruoyi.project.monitor.service.ISysJobService;
|
| | | import jakarta.annotation.PostConstruct;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.quartz.JobDataMap;
|
| | | import org.quartz.JobKey;
|
| | | import org.quartz.Scheduler;
|
| | | import org.quartz.SchedulerException;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysJobServiceImpl implements ISysJobService
|
| | | {
|
| | | @Autowired
|
| | | private Scheduler scheduler;
|
| | | private final Scheduler scheduler;
|
| | |
|
| | | @Autowired
|
| | | private SysJobMapper jobMapper;
|
| | | private final SysJobMapper jobMapper;
|
| | |
|
| | | /**
|
| | | * 项目启动时,初始化定时器 主要是防止手动修改数据库导致未同步到定时任务处理(注:不能手动修改数据库ID和任务组名,否则会导致脏数据)
|
| | |
| | | package com.ruoyi.project.monitor.service.impl;
|
| | |
|
| | | import java.util.List;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.project.monitor.domain.SysLogininfor;
|
| | | import com.ruoyi.project.monitor.mapper.SysLogininforMapper;
|
| | | import com.ruoyi.project.monitor.service.ISysLogininforService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 系统访问日志情况信息 服务层处理
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysLogininforServiceImpl implements ISysLogininforService
|
| | | {
|
| | |
|
| | | @Autowired
|
| | | private SysLogininforMapper logininforMapper;
|
| | | private final SysLogininforMapper logininforMapper;
|
| | |
|
| | | /**
|
| | | * 新增系统登录日志
|
| | |
| | | package com.ruoyi.project.monitor.service.impl;
|
| | |
|
| | | import java.util.List;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.project.monitor.domain.SysOperLog;
|
| | | import com.ruoyi.project.monitor.mapper.SysOperLogMapper;
|
| | | import com.ruoyi.project.monitor.service.ISysOperLogService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 操作日志 服务层处理
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysOperLogServiceImpl implements ISysOperLogService
|
| | | {
|
| | | @Autowired
|
| | | private SysOperLogMapper operLogMapper;
|
| | | private final SysOperLogMapper operLogMapper;
|
| | |
|
| | | /**
|
| | | * 新增操作日志
|
| | |
| | | package com.ruoyi.project.system.controller;
|
| | |
|
| | | import java.util.List;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PathVariable;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.utils.poi.ExcelUtil;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
| | |
| | | import com.ruoyi.framework.web.page.TableDataInfo;
|
| | | import com.ruoyi.project.system.domain.SysConfig;
|
| | | import com.ruoyi.project.system.service.ISysConfigService;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 参数配置 信息操作处理
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/system/config")
|
| | | @AllArgsConstructor
|
| | | public class SysConfigController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysConfigService configService;
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.project.system.controller;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.apache.commons.lang3.ArrayUtils;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/system/dept")
|
| | | @AllArgsConstructor
|
| | | public class SysDeptController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysDeptService deptService;
|
| | |
|
| | | /**
|
| | |
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/system/dict/data")
|
| | | @AllArgsConstructor
|
| | | public class SysDictDataController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysDictDataService dictDataService;
|
| | |
|
| | | @Autowired
|
| | | private ISysDictTypeService dictTypeService;
|
| | |
|
| | | @PreAuthorize("@ss.hasPermi('system:dict:list')")
|
| | |
| | |
|
| | | import java.util.List;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/system/dict/type")
|
| | | @AllArgsConstructor
|
| | | public class SysDictTypeController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysDictTypeService dictTypeService;
|
| | |
|
| | | @PreAuthorize("@ss.hasPermi('system:dict:list')")
|
| | |
| | | package com.ruoyi.project.system.controller;
|
| | |
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @RestController
|
| | | @AllArgsConstructor
|
| | | public class SysIndexController
|
| | | {
|
| | | /** 系统基础配置 */
|
| | | @Autowired
|
| | | private RuoYiConfig ruoyiConfig;
|
| | |
|
| | | /**
|
| | |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper;
|
| | | import com.ruoyi.project.system.service.ISysMenuService;
|
| | | import com.ruoyi.project.system.service.ISysUserDeptService;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.util.ObjectUtils;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @RestController
|
| | | @AllArgsConstructor
|
| | | public class SysLoginController
|
| | | {
|
| | | @Autowired
|
| | | private SysLoginService loginService;
|
| | |
|
| | | @Autowired
|
| | | private ISysMenuService menuService;
|
| | |
|
| | | @Autowired
|
| | | private SysPermissionService permissionService;
|
| | |
|
| | | @Autowired
|
| | | private TokenService tokenService;
|
| | |
|
| | | @Autowired
|
| | | private ISysUserDeptService userDeptService;
|
| | |
|
| | | @Autowired
|
| | | private SysDeptMapper sysDeptMapper;
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.project.system.controller;
|
| | |
|
| | | import java.util.List;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PathVariable;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult;
|
| | | import com.ruoyi.project.system.domain.SysMenu;
|
| | | import com.ruoyi.project.system.service.ISysMenuService;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 菜单信息
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/system/menu")
|
| | | @AllArgsConstructor
|
| | | public class SysMenuController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysMenuService menuService;
|
| | |
|
| | | /**
|
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
| | | import com.ruoyi.framework.web.domain.R;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/system/notice")
|
| | | public class SysNoticeController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | @AllArgsConstructor
|
| | | public class SysNoticeController extends BaseController {
|
| | | private ISysNoticeService noticeService;
|
| | |
|
| | | /**
|
| | | * 获取通知公告列表
|
| | | */
|
| | | @GetMapping("/list")
|
| | | public R<IPage<SysNotice>> list(SysNotice notice, Page page)
|
| | | {
|
| | | public R<IPage<SysNotice>> list(SysNotice notice, Page page) {
|
| | | IPage<SysNotice> list = noticeService.selectNoticeList(notice, page);
|
| | | return R.ok(list);
|
| | | }
|
| | |
| | | * 获取未读数量
|
| | | */
|
| | | @GetMapping("/getCount")
|
| | | public R getCount(Long consigneeId)
|
| | | {
|
| | | public R getCount(Long consigneeId) {
|
| | | return R.ok(noticeService.getCount(consigneeId));
|
| | | }
|
| | |
|
| | |
| | | * 根据通知公告编号获取详细信息
|
| | | */
|
| | | @GetMapping(value = "/{noticeId}")
|
| | | public AjaxResult getInfo(@PathVariable Long noticeId)
|
| | | {
|
| | | public AjaxResult getInfo(@PathVariable Long noticeId) {
|
| | | return success(noticeService.selectNoticeById(noticeId));
|
| | | }
|
| | |
|
| | |
| | | * 新增通知公告
|
| | | */
|
| | | @PostMapping
|
| | | public AjaxResult add(@Validated @RequestBody SysNotice notice)
|
| | | {
|
| | | public AjaxResult add(@Validated @RequestBody SysNotice notice) {
|
| | | return toAjax(noticeService.insertNotice(notice));
|
| | | }
|
| | |
|
| | |
| | | * 修改通知公告
|
| | | */
|
| | | @PutMapping
|
| | | public AjaxResult edit(@Validated @RequestBody SysNotice notice)
|
| | | {
|
| | | public AjaxResult edit(@Validated @RequestBody SysNotice notice) {
|
| | | return toAjax(noticeService.updateNotice(notice));
|
| | | }
|
| | |
|
| | |
| | | * 删除通知公告
|
| | | */
|
| | | @DeleteMapping("/{noticeIds}")
|
| | | public AjaxResult remove(@PathVariable Long[] noticeIds)
|
| | | {
|
| | | public AjaxResult remove(@PathVariable Long[] noticeIds) {
|
| | | return toAjax(noticeService.deleteNoticeByIds(noticeIds));
|
| | | }
|
| | |
|
| | |
| | | * 一键已读
|
| | | */
|
| | | @PostMapping("/readAll")
|
| | | public AjaxResult readAll()
|
| | | {
|
| | | public AjaxResult readAll() {
|
| | | return toAjax(noticeService.readAll());
|
| | | }
|
| | |
|
| | |
| | |
|
| | | import java.util.List;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/system/post")
|
| | | @AllArgsConstructor
|
| | | public class SysPostController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysPostService postService;
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.project.system.controller;
|
| | |
|
| | | import java.util.Map;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestParam;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.common.utils.file.FileUploadUtils;
|
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult;
|
| | | import com.ruoyi.project.system.domain.SysUser;
|
| | | import com.ruoyi.project.system.service.ISysUserService;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
|
| | | import java.util.Map;
|
| | |
|
| | | /**
|
| | | * 个人信息 业务处理
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/system/user/profile")
|
| | | @AllArgsConstructor
|
| | | public class SysProfileController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysUserService userService;
|
| | |
|
| | | @Autowired
|
| | | private TokenService tokenService;
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.project.system.controller;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.framework.security.RegisterBody;
|
| | | import com.ruoyi.framework.security.service.SysRegisterService;
|
| | | import com.ruoyi.framework.web.controller.BaseController;
|
| | | import com.ruoyi.framework.web.domain.AjaxResult;
|
| | | import com.ruoyi.project.system.service.ISysConfigService;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | |
|
| | | /**
|
| | | * 注册验证
|
| | | * |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | @RestController
|
| | | public class SysRegisterController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | @AllArgsConstructor
|
| | | public class SysRegisterController extends BaseController {
|
| | | private SysRegisterService registerService;
|
| | |
|
| | | @Autowired
|
| | | private ISysConfigService configService;
|
| | |
|
| | | @PostMapping("/register")
|
| | | public AjaxResult register(@RequestBody RegisterBody user)
|
| | | {
|
| | | if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser"))))
|
| | | {
|
| | | public AjaxResult register(@RequestBody RegisterBody user) {
|
| | | if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser")))) {
|
| | | return error("当前系统没有开启注册功能!");
|
| | | }
|
| | | String msg = registerService.register(user);
|
| | |
| | |
|
| | | import java.util.List;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/system/role")
|
| | | @AllArgsConstructor
|
| | | public class SysRoleController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysRoleService roleService;
|
| | |
|
| | | @Autowired
|
| | | private TokenService tokenService;
|
| | |
|
| | | @Autowired
|
| | | private SysPermissionService permissionService;
|
| | |
|
| | | @Autowired
|
| | | private ISysUserService userService;
|
| | |
|
| | | @Autowired
|
| | | private ISysDeptService deptService;
|
| | |
|
| | | @PreAuthorize("@ss.hasPermi('system:role:list')")
|
| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | @Api(tags = "用户设备绑定") |
| | | @RestController |
| | | @RequestMapping("/system/client") |
| | | @AllArgsConstructor |
| | | public class SysUserClientController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SysUserClientService sysUserClientService; |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.project.system.domain.vo.SysUserDeptVo;
|
| | | import com.ruoyi.project.system.mapper.SysUserMapper;
|
| | | import com.ruoyi.project.system.service.*;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.apache.commons.lang3.ArrayUtils;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/system/user")
|
| | | @AllArgsConstructor
|
| | | public class SysUserController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private ISysUserService userService;
|
| | |
|
| | | @Autowired
|
| | | private ISysRoleService roleService;
|
| | |
|
| | | @Autowired
|
| | | private ISysDeptService deptService;
|
| | |
|
| | | @Autowired
|
| | | private ISysPostService postService;
|
| | |
|
| | | @Autowired
|
| | | private ISysUserDeptService userDeptService;
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.util.Collection;
|
| | | import java.util.List;
|
| | | import jakarta.annotation.PostConstruct;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.common.constant.CacheConstants;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.core.text.Convert;
|
| | |
| | | import com.ruoyi.project.system.domain.SysConfig;
|
| | | import com.ruoyi.project.system.mapper.SysConfigMapper;
|
| | | import com.ruoyi.project.system.service.ISysConfigService;
|
| | | import jakarta.annotation.PostConstruct;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.Collection;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 参数配置 服务层实现
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysConfigServiceImpl implements ISysConfigService
|
| | | {
|
| | | @Autowired
|
| | | private SysConfigMapper configMapper;
|
| | |
|
| | | @Autowired
|
| | | private RedisCache redisCache;
|
| | | private final SysConfigMapper configMapper;
|
| | | private final RedisCache redisCache;
|
| | |
|
| | | /**
|
| | | * 项目启动时,初始化参数到缓存
|
| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Iterator;
|
| | | import java.util.List;
|
| | | import java.util.stream.Collectors;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.core.text.Convert;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper;
|
| | | import com.ruoyi.project.system.mapper.SysRoleMapper;
|
| | | import com.ruoyi.project.system.service.ISysDeptService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Iterator;
|
| | | import java.util.List;
|
| | | import java.util.stream.Collectors;
|
| | |
|
| | | /**
|
| | | * 部门管理 服务实现
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysDeptServiceImpl implements ISysDeptService
|
| | | {
|
| | | @Autowired
|
| | | private SysDeptMapper deptMapper;
|
| | | |
| | | @Autowired
|
| | | private SysRoleMapper roleMapper;
|
| | | private final SysDeptMapper deptMapper;
|
| | | private final SysRoleMapper roleMapper;
|
| | |
|
| | | /**
|
| | | * 查询部门管理数据
|
| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.util.List;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.common.utils.DictUtils;
|
| | | import com.ruoyi.project.system.domain.SysDictData;
|
| | | import com.ruoyi.project.system.mapper.SysDictDataMapper;
|
| | | import com.ruoyi.project.system.service.ISysDictDataService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 字典 业务层处理
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysDictDataServiceImpl implements ISysDictDataService
|
| | | {
|
| | | @Autowired
|
| | | private SysDictDataMapper dictDataMapper;
|
| | | private final SysDictDataMapper dictDataMapper;
|
| | |
|
| | | /**
|
| | | * 根据条件分页查询字典数据
|
| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.util.Comparator;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.stream.Collectors;
|
| | | import jakarta.annotation.PostConstruct;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | | import com.ruoyi.common.utils.DictUtils;
|
| | |
| | | import com.ruoyi.project.system.mapper.SysDictDataMapper;
|
| | | import com.ruoyi.project.system.mapper.SysDictTypeMapper;
|
| | | import com.ruoyi.project.system.service.ISysDictTypeService;
|
| | | import jakarta.annotation.PostConstruct;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import java.util.Comparator;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.stream.Collectors;
|
| | |
|
| | | /**
|
| | | * 字典 业务层处理
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysDictTypeServiceImpl implements ISysDictTypeService
|
| | | {
|
| | | @Autowired
|
| | | private SysDictTypeMapper dictTypeMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysDictDataMapper dictDataMapper;
|
| | | private final SysDictTypeMapper dictTypeMapper;
|
| | | private final SysDictDataMapper dictDataMapper;
|
| | |
|
| | | /**
|
| | | * 项目启动时,初始化字典到缓存
|
| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.HashSet;
|
| | | import java.util.Iterator;
|
| | | import java.util.LinkedList;
|
| | | import java.util.List;
|
| | | import java.util.Set;
|
| | | import java.util.stream.Collectors;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.common.constant.Constants;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | |
| | | import com.ruoyi.project.system.mapper.SysRoleMapper;
|
| | | import com.ruoyi.project.system.mapper.SysRoleMenuMapper;
|
| | | import com.ruoyi.project.system.service.ISysMenuService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.*;
|
| | | import java.util.stream.Collectors;
|
| | |
|
| | | /**
|
| | | * 菜单 业务层处理
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysMenuServiceImpl implements ISysMenuService
|
| | | {
|
| | | public static final String PREMISSION_STRING = "perms[\"{0}\"]";
|
| | |
|
| | | @Autowired
|
| | | private SysMenuMapper menuMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysRoleMapper roleMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysRoleMenuMapper roleMenuMapper;
|
| | | private final SysMenuMapper menuMapper;
|
| | | private final SysRoleMapper roleMapper;
|
| | | private final SysRoleMenuMapper roleMenuMapper;
|
| | |
|
| | | /**
|
| | | * 根据用户查询系统菜单列表
|
| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.time.LocalDateTime;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Objects;
|
| | | import java.util.stream.Collectors;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
| | | import com.baomidou.mybatisplus.core.metadata.IPage;
|
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.github.xiaoymin.knife4j.core.util.StrUtil;
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | | import com.ruoyi.project.system.domain.SysDept;
|
| | | import com.ruoyi.project.system.domain.SysNotice;
|
| | | import com.ruoyi.project.system.domain.SysUser;
|
| | | import com.ruoyi.project.system.domain.SysUserDept;
|
| | | import com.ruoyi.project.system.mapper.SysDeptMapper;
|
| | | import com.ruoyi.project.system.mapper.SysNoticeMapper;
|
| | | import com.ruoyi.project.system.mapper.SysUserDeptMapper;
|
| | | import com.ruoyi.project.system.mapper.SysUserMapper;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.context.annotation.Lazy;
|
| | | import org.springframework.scheduling.annotation.Scheduled;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.project.system.domain.SysNotice;
|
| | | import com.ruoyi.project.system.mapper.SysNoticeMapper;
|
| | | import com.ruoyi.project.system.service.ISysNoticeService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.context.annotation.Lazy;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.stream.Collectors;
|
| | |
|
| | | /**
|
| | | * 公告 服务层实现
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice> implements ISysNoticeService {
|
| | |
|
| | | @Autowired
|
| | | private SysNoticeMapper noticeMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysUserMapper userMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysDeptMapper deptMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysUserDeptMapper userDeptMapper;
|
| | |
|
| | | @Autowired
|
| | | private final SysNoticeMapper noticeMapper;
|
| | | private final SysUserMapper userMapper;
|
| | | private final SysDeptMapper deptMapper;
|
| | | private final SysUserDeptMapper userDeptMapper;
|
| | | @Lazy
|
| | | private ISysNoticeService sysNoticeService;
|
| | |
|
| | | @Autowired
|
| | | private UnipushService unipushService;
|
| | | private final ISysNoticeService sysNoticeService;
|
| | | private final UnipushService unipushService;
|
| | |
|
| | | /**
|
| | | * 查询公告信息
|
| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.util.List;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | |
| | | import com.ruoyi.project.system.mapper.SysPostMapper;
|
| | | import com.ruoyi.project.system.mapper.SysUserPostMapper;
|
| | | import com.ruoyi.project.system.service.ISysPostService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 岗位信息 服务层处理
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysPostServiceImpl implements ISysPostService
|
| | | {
|
| | | @Autowired
|
| | | private SysPostMapper postMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysUserPostMapper userPostMapper;
|
| | | private final SysPostMapper postMapper;
|
| | | private final SysUserPostMapper userPostMapper;
|
| | |
|
| | | /**
|
| | | * 查询岗位信息集合
|
| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.HashSet;
|
| | | import java.util.List;
|
| | | import java.util.Set;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.common.utils.spring.SpringUtils;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
|
| | | import com.ruoyi.project.system.domain.SysRole;
|
| | | import com.ruoyi.project.system.domain.SysRoleDept;
|
| | | import com.ruoyi.project.system.domain.SysRoleMenu;
|
| | | import com.ruoyi.project.system.domain.SysUser;
|
| | | import com.ruoyi.project.system.domain.SysUserRole;
|
| | | import com.ruoyi.project.system.domain.*;
|
| | | import com.ruoyi.project.system.mapper.SysRoleDeptMapper;
|
| | | import com.ruoyi.project.system.mapper.SysRoleMapper;
|
| | | import com.ruoyi.project.system.mapper.SysRoleMenuMapper;
|
| | | import com.ruoyi.project.system.mapper.SysUserRoleMapper;
|
| | | import com.ruoyi.project.system.service.ISysRoleService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import java.util.*;
|
| | |
|
| | | /**
|
| | | * 角色 业务层处理
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysRoleServiceImpl implements ISysRoleService
|
| | | {
|
| | | @Autowired
|
| | | private SysRoleMapper roleMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysRoleMenuMapper roleMenuMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysUserRoleMapper userRoleMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysRoleDeptMapper roleDeptMapper;
|
| | | private final SysRoleMapper roleMapper;
|
| | | private final SysRoleMenuMapper roleMenuMapper;
|
| | | private final SysUserRoleMapper userRoleMapper;
|
| | | private final SysRoleDeptMapper roleDeptMapper;
|
| | |
|
| | | /**
|
| | | * 根据条件分页查询角色数据
|
| | |
| | | import com.ruoyi.project.system.domain.vo.SysUserDeptVo; |
| | | import com.ruoyi.project.system.mapper.SysUserDeptMapper; |
| | | import com.ruoyi.project.system.service.ISysUserDeptService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SysUserDeptServiceImpl implements ISysUserDeptService { |
| | | |
| | | @Autowired |
| | | private SysUserDeptMapper sysUserDeptMapper; |
| | | private final SysUserDeptMapper sysUserDeptMapper; |
| | | |
| | | @Override |
| | | public List<SysUserDeptVo> userLoginFacotryList(SysUserDeptVo userDeptVo) { |
| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Collections;
|
| | | import java.util.List;
|
| | | import java.util.stream.Collectors;
|
| | | import jakarta.validation.Validator;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
| | | import com.ruoyi.project.system.domain.*;
|
| | | import com.ruoyi.project.system.mapper.*;
|
| | | import org.slf4j.Logger;
|
| | | import org.slf4j.LoggerFactory;
|
| | | import org.springframework.beans.BeanUtils;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.springframework.util.CollectionUtils;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | |
| | | import com.ruoyi.common.utils.bean.BeanValidators;
|
| | | import com.ruoyi.common.utils.spring.SpringUtils;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
|
| | | import com.ruoyi.project.system.domain.*;
|
| | | import com.ruoyi.project.system.mapper.*;
|
| | | import com.ruoyi.project.system.service.ISysConfigService;
|
| | | import com.ruoyi.project.system.service.ISysDeptService;
|
| | | import com.ruoyi.project.system.service.ISysUserService;
|
| | | import jakarta.validation.Validator;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.slf4j.Logger;
|
| | | import org.slf4j.LoggerFactory;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.springframework.util.CollectionUtils;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | | import java.util.stream.Collectors;
|
| | |
|
| | | /**
|
| | | * 用户 业务层处理
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysUserServiceImpl implements ISysUserService
|
| | | {
|
| | | @Autowired
|
| | | private SysUserDeptMapper sysUserDeptMapper;
|
| | |
|
| | | private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class);
|
| | |
|
| | | @Autowired
|
| | | private SysUserMapper userMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysRoleMapper roleMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysPostMapper postMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysUserRoleMapper userRoleMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysUserPostMapper userPostMapper;
|
| | |
|
| | | @Autowired
|
| | | private ISysConfigService configService;
|
| | |
|
| | | @Autowired
|
| | | private ISysDeptService deptService;
|
| | |
|
| | | @Autowired
|
| | | protected Validator validator;
|
| | | private final SysUserDeptMapper sysUserDeptMapper;
|
| | | private final SysUserMapper userMapper;
|
| | | private final SysRoleMapper roleMapper;
|
| | | private final SysPostMapper postMapper;
|
| | | private final SysUserRoleMapper userRoleMapper;
|
| | | private final SysUserPostMapper userPostMapper;
|
| | | private final ISysConfigService configService;
|
| | | protected final Validator validator;
|
| | |
|
| | | /**
|
| | | * 根据条件分页查询用户列表
|
| | |
| | | import com.ruoyi.project.system.mapper.SysMenuMapper; |
| | | import com.ruoyi.project.system.service.SysUserClientService; |
| | | import jakarta.annotation.PostConstruct; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jetbrains.annotations.NotNull; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | public class UnipushService { |
| | | |
| | | @Autowired |
| | | private SysMenuMapper sysMenuMapper; |
| | | |
| | | @Autowired |
| | | private GetuiConfig getuiConfig; |
| | | |
| | | @Autowired |
| | | private SysUserClientService userClientService; |
| | | private final SysMenuMapper sysMenuMapper; |
| | | private final GetuiConfig getuiConfig; |
| | | private final SysUserClientService userClientService; |
| | | |
| | | private PushApi pushApi; |
| | | |
| | |
| | | package com.ruoyi.project.tool.gen.controller;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import org.apache.commons.io.IOUtils;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PathVariable;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.alibaba.druid.DbType;
|
| | | import com.alibaba.druid.sql.SQLUtils;
|
| | | import com.alibaba.druid.sql.ast.SQLStatement;
|
| | |
| | | import com.ruoyi.project.tool.gen.domain.GenTableColumn;
|
| | | import com.ruoyi.project.tool.gen.service.IGenTableColumnService;
|
| | | import com.ruoyi.project.tool.gen.service.IGenTableService;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.AllArgsConstructor;
|
| | | import org.apache.commons.io.IOUtils;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | /**
|
| | | * 代码生成 操作处理
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/tool/gen")
|
| | | @AllArgsConstructor
|
| | | public class GenController extends BaseController
|
| | | {
|
| | | @Autowired
|
| | | private IGenTableService genTableService;
|
| | |
|
| | | @Autowired
|
| | | private IGenTableColumnService genTableColumnService;
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.project.tool.gen.service;
|
| | |
|
| | | import java.util.List;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.common.core.text.Convert;
|
| | | import com.ruoyi.project.tool.gen.domain.GenTableColumn;
|
| | | import com.ruoyi.project.tool.gen.mapper.GenTableColumnMapper;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 业务字段 服务层实现
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class GenTableColumnServiceImpl implements IGenTableColumnService
|
| | | {
|
| | | @Autowired
|
| | | private GenTableColumnMapper genTableColumnMapper;
|
| | | private final GenTableColumnMapper genTableColumnMapper;
|
| | |
|
| | | /**
|
| | | * 查询业务字段列表
|
| | |
| | | package com.ruoyi.project.tool.gen.service;
|
| | |
|
| | | import java.io.ByteArrayOutputStream;
|
| | | import java.io.File;
|
| | | import java.io.IOException;
|
| | | import java.io.StringWriter;
|
| | | import java.util.LinkedHashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.function.Function;
|
| | | import java.util.stream.Collectors;
|
| | | import java.util.zip.ZipEntry;
|
| | | import java.util.zip.ZipOutputStream;
|
| | | import org.apache.commons.io.FileUtils;
|
| | | import org.apache.commons.io.IOUtils;
|
| | | import org.apache.velocity.Template;
|
| | | import org.apache.velocity.VelocityContext;
|
| | | import org.apache.velocity.app.Velocity;
|
| | | import org.slf4j.Logger;
|
| | | import org.slf4j.LoggerFactory;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import com.alibaba.fastjson2.JSON;
|
| | | import com.alibaba.fastjson2.JSONObject;
|
| | | import com.ruoyi.common.constant.Constants;
|
| | |
| | | import com.ruoyi.project.tool.gen.util.GenUtils;
|
| | | import com.ruoyi.project.tool.gen.util.VelocityInitializer;
|
| | | import com.ruoyi.project.tool.gen.util.VelocityUtils;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.apache.commons.io.FileUtils;
|
| | | import org.apache.commons.io.IOUtils;
|
| | | import org.apache.velocity.Template;
|
| | | import org.apache.velocity.VelocityContext;
|
| | | import org.apache.velocity.app.Velocity;
|
| | | import org.slf4j.Logger;
|
| | | import org.slf4j.LoggerFactory;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import java.io.ByteArrayOutputStream;
|
| | | import java.io.File;
|
| | | import java.io.IOException;
|
| | | import java.io.StringWriter;
|
| | | import java.util.LinkedHashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.function.Function;
|
| | | import java.util.stream.Collectors;
|
| | | import java.util.zip.ZipEntry;
|
| | | import java.util.zip.ZipOutputStream;
|
| | |
|
| | | /**
|
| | | * 业务 服务层实现
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class GenTableServiceImpl implements IGenTableService
|
| | | {
|
| | | private static final Logger log = LoggerFactory.getLogger(GenTableServiceImpl.class);
|
| | |
|
| | | @Autowired
|
| | | private GenTableMapper genTableMapper;
|
| | |
|
| | | @Autowired
|
| | | private GenTableColumnMapper genTableColumnMapper;
|
| | | private final GenTableMapper genTableMapper;
|
| | | private final GenTableColumnMapper genTableColumnMapper;
|
| | |
|
| | | /**
|
| | | * 查询业务信息
|
| | |
| | | import com.ruoyi.projectManagement.vo.*; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.jetbrains.annotations.Nullable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private final PlanNodeMapper planNodeMapper; |
| | | |
| | | @Lazy |
| | | @Autowired |
| | | private PlanService planService; |
| | | private final PlanService planService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | import com.ruoyi.projectManagement.dto.ContractInfoDto; |
| | | import com.ruoyi.projectManagement.mapper.ContractInfoMapper; |
| | | import com.ruoyi.projectManagement.pojo.ContractInfo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import jakarta.annotation.Nullable; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | |
| | | */ |
| | | @Component |
| | | @Transactional(rollbackFor = Exception.class,readOnly = true) |
| | | @RequiredArgsConstructor |
| | | public class ContractInfoHandleService{ |
| | | |
| | | @Autowired |
| | | private ContractInfoMapper contractInfoMapper; |
| | | private final ContractInfoMapper contractInfoMapper; |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void save(@Nullable Long id, @NotNull ContractInfoDto contractInfoDto) { |
| | |
| | | import com.ruoyi.projectManagement.pojo.InfoStage; |
| | | import com.ruoyi.projectManagement.vo.InfoStageVo; |
| | | import com.ruoyi.projectManagement.vo.SaveInfoStageVo; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import jakarta.validation.constraints.NotNull; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | private final InfoStageMapper infoStageMapper; |
| | | private final InfoHandleService infoHandleService; |
| | | private final CustomerFollowUpFileService customerFollowUpFileService; |
| | | @Autowired |
| | | @Lazy |
| | | private InfoStageHandleService infoStageHandleService; |
| | | private final InfoStageHandleService infoStageHandleService; |
| | | |
| | | @Transactional |
| | | public void save(@NotNull SaveInfoStageVo saveInfoStageVo) { |
| | |
| | | @AllArgsConstructor |
| | | public class AccountingReportController { |
| | | |
| | | @Autowired |
| | | private IInvoicePurchaseService invoicePurchaseService; |
| | | |
| | | @GetMapping("/list") |
| | |
| | | import com.ruoyi.purchase.dto.PaymentRegistrationDto; |
| | | import com.ruoyi.purchase.pojo.PaymentRegistration; |
| | | import com.ruoyi.purchase.service.IPaymentRegistrationService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/purchase/paymentRegistration") |
| | | @AllArgsConstructor |
| | | public class PaymentRegistrationController extends BaseController { |
| | | @Autowired |
| | | private IPaymentRegistrationService paymentRegistrationService; |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.purchase.dto.ProcurementBusinessSummaryDto; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.purchase.service.impl.ProcurementBusinessSummaryServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | @Api(tags = "采购业务汇总") |
| | | @RestController |
| | | @RequestMapping("/procurementBusinessSummary") |
| | | @AllArgsConstructor |
| | | public class ProcurementBusinessSummaryController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private ProcurementBusinessSummaryServiceImpl procurementBusinessSummaryService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.purchase.mapper.SalesLedgerProductTemplateMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedgerTemplate; |
| | | import com.ruoyi.purchase.pojo.SalesLedgerProductTemplate; |
| | | import com.ruoyi.purchase.service.PurchaseLedgerTemplateService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @RestController |
| | | @RequestMapping("/purchaseLedgerTemplate") |
| | | @Api(tags = "采购台账模板") |
| | | @AllArgsConstructor |
| | | public class PurchaseLedgerTemplateController { |
| | | |
| | | @Autowired |
| | | private PurchaseLedgerTemplateMapper purchaseLedgerTemplateMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductTemplateMapper salesLedgerProductTemplateMapper; |
| | | |
| | | @PostMapping("/add") |
| | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.projectManagement.mapper.RolesMapper; |
| | | import com.ruoyi.purchase.dto.PurchaseReturnOrderDto; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrdersMapper; |
| | | import com.ruoyi.purchase.service.PurchaseReturnOrdersService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author 芯导软件(江苏)有限公司 |
| | |
| | | @RestController |
| | | @RequestMapping("/purchaseReturnOrders") |
| | | @Api(tags = "采购退货单") |
| | | @AllArgsConstructor |
| | | public class PurchaseReturnOrdersController { |
| | | @Autowired |
| | | private PurchaseReturnOrdersService purchaseReturnOrdersService; |
| | | |
| | | @Autowired |
| | | private PurchaseReturnOrdersMapper purchaseReturnOrdersMapper; |
| | | |
| | | |
| | |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody PurchaseReturnOrderDto purchaseReturnOrderDto) throws Exception { |
| | | if (purchaseReturnOrderDto.getIsDefaultNo()) { |
| | | purchaseReturnOrderDto.setNo(OrderUtils.countTodayByCreateTime(purchaseReturnOrdersMapper, "CGTL","no")); |
| | | purchaseReturnOrderDto.setNo(OrderUtils.countTodayByCreateTime(purchaseReturnOrdersMapper, "CGTL", "no")); |
| | | } |
| | | return AjaxResult.success(purchaseReturnOrdersService.add(purchaseReturnOrderDto)); |
| | | } |
| | |
| | | |
| | | private IProductRecordService productRecordService; |
| | | |
| | | @Autowired |
| | | private IPaymentRegistrationService paymentRegistrationService; |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.mapper.AccountExpenseMapper; |
| | | import com.ruoyi.account.pojo.AccountExpense; |
| | | import com.ruoyi.account.service.AccountExpenseService; |
| | | import com.ruoyi.basic.mapper.SupplierManageMapper; |
| | |
| | | import com.ruoyi.purchase.dto.PaymentHistoryRecordVo; |
| | | import com.ruoyi.purchase.dto.PaymentLedgerDto; |
| | | import com.ruoyi.purchase.dto.PaymentRegistrationDto; |
| | | import com.ruoyi.purchase.mapper.*; |
| | | import com.ruoyi.purchase.mapper.PaymentRegistrationMapper; |
| | | import com.ruoyi.purchase.mapper.ProductRecordMapper; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.mapper.TicketRegistrationMapper; |
| | | import com.ruoyi.purchase.pojo.PaymentRegistration; |
| | | import com.ruoyi.purchase.pojo.ProductRecord; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.purchase.pojo.TicketRegistration; |
| | | import com.ruoyi.purchase.service.IPaymentRegistrationService; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | |
| | | * @date 2025-05-15 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | @RequiredArgsConstructor |
| | | public class PaymentRegistrationServiceImpl extends ServiceImpl<PaymentRegistrationMapper, PaymentRegistration> implements IPaymentRegistrationService { |
| | | private PaymentRegistrationMapper paymentRegistrationMapper; |
| | | |
| | | private PurchaseLedgerMapper purchaseLedgerMapper; |
| | | |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | private SupplierManageMapper supplierManageMapper; |
| | | |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | |
| | | private TicketRegistrationMapper ticketRegistrationMapper; |
| | | |
| | | private ProductRecordMapper productRecordMapper; |
| | | |
| | | private AccountExpenseService accountExpenseService; |
| | | private final PaymentRegistrationMapper paymentRegistrationMapper; |
| | | private final PurchaseLedgerMapper purchaseLedgerMapper; |
| | | private final SupplierManageMapper supplierManageMapper; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final TicketRegistrationMapper ticketRegistrationMapper; |
| | | private final ProductRecordMapper productRecordMapper; |
| | | private final AccountExpenseService accountExpenseService; |
| | | |
| | | /** |
| | | * 查询付款登记 |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.purchase.dto.ProcurementBusinessSummaryDto; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class ProcurementBusinessSummaryServiceImpl { |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | |
| | | public IPage<ProcurementBusinessSummaryDto> listPage(Page page, ProcurementBusinessSummaryDto procurementBusinessSummaryDto) { |
| | | return salesLedgerProductMapper.procurementBusinessSummaryListPage(page, procurementBusinessSummaryDto); |
| | |
| | | import com.ruoyi.purchase.dto.ProductRecordDto; |
| | | import com.ruoyi.purchase.dto.TicketRegistrationDto; |
| | | import com.ruoyi.purchase.mapper.ProductRecordMapper; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.mapper.TicketRegistrationMapper; |
| | | import com.ruoyi.purchase.pojo.ProductRecord; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.purchase.pojo.TicketRegistration; |
| | | import com.ruoyi.purchase.service.IProductRecordService; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | * @date 2025-05-23 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | @RequiredArgsConstructor |
| | | public class ProductRecordServiceImpl extends ServiceImpl<ProductRecordMapper, ProductRecord> implements IProductRecordService { |
| | | |
| | | @Autowired |
| | | private ProductRecordMapper productRecordMapper; |
| | | |
| | | @Autowired |
| | | private CommonFileMapper commonFileMapper; |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | @Autowired |
| | | private PurchaseLedgerMapper purchaseLedgerMapper; |
| | | |
| | | |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final ProductRecordMapper productRecordMapper; |
| | | private final CommonFileMapper commonFileMapper; |
| | | /** |
| | | * 查询采购台账产品开票记录 |
| | | * |
| | |
| | | package com.ruoyi.purchase.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.pojo.AccountExpense; |
| | | import com.ruoyi.account.pojo.AccountIncome; |
| | | import com.ruoyi.account.service.AccountExpenseService; |
| | | import com.ruoyi.account.service.AccountIncomeService; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.approve.service.impl.ApproveProcessServiceImpl; |
| | | import com.ruoyi.approve.vo.ApproveProcessVO; |
| | | import com.ruoyi.basic.mapper.ProductMapper; |
| | | import com.ruoyi.basic.mapper.ProductModelMapper; |
| | | import com.ruoyi.basic.mapper.SupplierManageMapper; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.basic.pojo.Product; |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | import com.ruoyi.purchase.dto.PurchaseLedgerDto; |
| | | import com.ruoyi.purchase.dto.PurchaseLedgerImportDto; |
| | | import com.ruoyi.purchase.dto.PurchaseLedgerProductImportDto; |
| | | import com.ruoyi.purchase.mapper.*; |
| | | import com.ruoyi.purchase.pojo.*; |
| | | import com.ruoyi.purchase.mapper.PaymentRegistrationMapper; |
| | | import com.ruoyi.purchase.mapper.ProductRecordMapper; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.mapper.TicketRegistrationMapper; |
| | | import com.ruoyi.purchase.pojo.PaymentRegistration; |
| | | import com.ruoyi.purchase.pojo.ProductRecord; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.purchase.pojo.TicketRegistration; |
| | | import com.ruoyi.purchase.service.IPurchaseLedgerService; |
| | | import com.ruoyi.quality.mapper.*; |
| | | import com.ruoyi.quality.pojo.*; |
| | | import com.ruoyi.sales.dto.SalesLedgerImportDto; |
| | | import com.ruoyi.sales.dto.SalesLedgerProductImportDto; |
| | | import com.ruoyi.sales.mapper.*; |
| | | import com.ruoyi.quality.mapper.QualityInspectMapper; |
| | | import com.ruoyi.quality.mapper.QualityInspectParamMapper; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardMapper; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardParamMapper; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityInspectParam; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.mapper.InvoiceRegistrationProductMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.sales.pojo.InvoiceRegistrationProduct; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class PurchaseLedgerServiceImpl extends ServiceImpl<PurchaseLedgerMapper, PurchaseLedger> implements IPurchaseLedgerService { |
| | | @Autowired |
| | | private AccountExpenseService accountExpenseService; |
| | | @Autowired |
| | | private PurchaseLedgerMapper purchaseLedgerMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final PurchaseLedgerMapper purchaseLedgerMapper; |
| | | private final SalesLedgerMapper salesLedgerMapper; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final SysUserMapper userMapper; |
| | | private final TempFileMapper tempFileMapper; |
| | | private final CommonFileMapper commonFileMapper; |
| | | private final SupplierManageMapper supplierManageMapper; |
| | | private final ProductMapper productMapper; |
| | | private final ProductModelMapper productModelMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final TicketRegistrationMapper ticketRegistrationMapper; |
| | | private final ProductRecordMapper productRecordMapper; |
| | | private final PaymentRegistrationMapper paymentRegistrationMapper; |
| | | private final InvoiceRegistrationProductMapper invoiceRegistrationProductMapper; |
| | | private final StringRedisTemplate redisTemplate; |
| | | private final QualityInspectMapper qualityInspectMapper; |
| | | private final CommonFileServiceImpl commonFileService; |
| | | private final QualityTestStandardParamMapper qualityTestStandardParamMapper; |
| | | private final QualityTestStandardMapper qualityTestStandardMapper; |
| | | private final QualityInspectParamMapper qualityInspectParamMapper; |
| | | private final ApproveProcessServiceImpl approveProcessService; |
| | | private final ProcurementRecordMapper procurementRecordStorageMapper; |
| | | |
| | | @Autowired |
| | | private SysUserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private TempFileMapper tempFileMapper; |
| | | |
| | | @Autowired |
| | | private CommonFileMapper commonFileMapper; |
| | | |
| | | @Autowired |
| | | private SupplierManageMapper supplierManageMapper; |
| | | |
| | | @Autowired |
| | | private ProductMapper productMapper; |
| | | |
| | | @Autowired |
| | | private ProductModelMapper productModelMapper; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private TicketRegistrationMapper ticketRegistrationMapper; |
| | | |
| | | @Autowired |
| | | private ProductRecordMapper productRecordMapper; |
| | | |
| | | @Autowired |
| | | private PaymentRegistrationMapper paymentRegistrationMapper; |
| | | @Autowired |
| | | private InvoiceRegistrationProductMapper invoiceRegistrationProductMapper; |
| | | @Autowired |
| | | private StringRedisTemplate redisTemplate; |
| | | @Autowired |
| | | private QualityInspectMapper qualityInspectMapper; |
| | | @Autowired |
| | | private CommonFileServiceImpl commonFileService; |
| | | @Autowired |
| | | private QualityTestStandardBindingMapper qualityTestStandardBindingMapper; |
| | | @Autowired |
| | | private QualityTestStandardParamMapper qualityTestStandardParamMapper; |
| | | @Autowired |
| | | private QualityTestStandardMapper qualityTestStandardMapper; |
| | | @Autowired |
| | | private QualityInspectParamMapper qualityInspectParamMapper; |
| | | @Autowired |
| | | private ApproveProcessServiceImpl approveProcessService; |
| | | @Autowired |
| | | private ProcurementRecordMapper procurementRecordStorageMapper; |
| | | @Autowired |
| | | private PurchaseLedgerTemplateMapper purchaseLedgerTemplateMapper; |
| | | @Autowired |
| | | private SalesLedgerProductTemplateMapper salesLedgerProductTemplateMapper; |
| | | @Value("${file.upload-dir}") |
| | | private String uploadDir; |
| | | |
| | |
| | | package com.ruoyi.purchase.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerTemplateMapper; |
| | | import com.ruoyi.purchase.mapper.SalesLedgerProductTemplateMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedgerTemplate; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerTemplateMapper; |
| | | import com.ruoyi.purchase.service.PurchaseLedgerTemplateService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | * @since 2026-01-26 11:21:44 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class PurchaseLedgerTemplateServiceImpl extends ServiceImpl<PurchaseLedgerTemplateMapper, PurchaseLedgerTemplate> implements PurchaseLedgerTemplateService { |
| | | |
| | | @Autowired |
| | | private PurchaseLedgerTemplateMapper purchaseLedgerTemplateMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductTemplateMapper salesLedgerProductTemplateMapper; |
| | | |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.purchase.dto.PurchaseReturnOrderDto; |
| | | import com.ruoyi.purchase.dto.PurchaseReturnOrderProductsDto; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrderProductsMapper; |
| | |
| | | import com.ruoyi.purchase.vo.PurchaseReturnOrderVo; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.ISalesLedgerService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import jakarta.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | |
| | | * @since 2026-03-06 11:44:38 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class PurchaseReturnOrdersServiceImpl extends ServiceImpl<PurchaseReturnOrdersMapper, PurchaseReturnOrders> implements PurchaseReturnOrdersService { |
| | | @Autowired |
| | | private PurchaseReturnOrdersMapper purchaseReturnOrdersMapper; |
| | | @Autowired |
| | | private PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper; |
| | | |
| | | @Autowired |
| | | private ISalesLedgerService salesLedgerService; |
| | | |
| | | @Resource |
| | | private AccountIncomeService accountIncomeService; |
| | | private final PurchaseReturnOrdersMapper purchaseReturnOrdersMapper; |
| | | private final PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper; |
| | | private final ISalesLedgerService salesLedgerService; |
| | | private final AccountIncomeService accountIncomeService; |
| | | |
| | | @Override |
| | | public IPage<PurchaseReturnOrderVo> listPage(Page page, PurchaseReturnOrderDto purchaseReturnOrderDto) { |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | private final ProductRecordMapper productRecordMapper; |
| | | |
| | | @Autowired |
| | | private ISalesLedgerProductService salesLedgerProductService; |
| | | private final ISalesLedgerProductService salesLedgerProductService; |
| | | |
| | | @Autowired |
| | | private PaymentRegistrationMapper paymentRegistrationMapper; |
| | | private final PaymentRegistrationMapper paymentRegistrationMapper; |
| | | |
| | | @Value("${file.upload-dir}") |
| | | private String uploadDir; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.quality.dto.QualityInspectDto; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityInspectFile; |
| | |
| | | import com.ruoyi.quality.service.IQualityInspectFileService; |
| | | import com.ruoyi.quality.service.IQualityInspectParamService; |
| | | import com.ruoyi.quality.service.IQualityInspectService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.annotation.Resource; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/quality/qualityInspect") |
| | | @AllArgsConstructor |
| | | public class QualityInspectController { |
| | | |
| | | @Resource |
| | | private IQualityInspectService qualityInspectService; |
| | | |
| | | @Resource |
| | | private IQualityInspectParamService qualityInspectParamService; |
| | | |
| | | @Resource |
| | | private IQualityInspectFileService qualityInspectFileService; |
| | | @Autowired |
| | | private ProcurementRecordService procurementRecordService; |
| | | @Autowired |
| | | private StockUtils stockUtils; |
| | | |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param qualityInspectDto |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delQualityInspect(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | | } |
| | | //如果已经提交就不允许删除 |
| | | List<QualityInspect> qualityInspects = qualityInspectService.listByIds(ids); |
| | | for (QualityInspect qualityInspect : qualityInspects) { |
| | | if(qualityInspect.getInspectState()==1){ |
| | | throw new RuntimeException("已提交的数据不允许删除"); |
| | | if (qualityInspect.getInspectState() == 1) { |
| | | throw new RuntimeException("已提交的数据不允许删除"); |
| | | } |
| | | } |
| | | //删除检验参数 |
| | | qualityInspectParamService.remove(Wrappers.<QualityInspectParam>lambdaQuery() |
| | | .in(QualityInspectParam::getInspectId,ids)); |
| | | .in(QualityInspectParam::getInspectId, ids)); |
| | | //删除检验附件 |
| | | qualityInspectFileService.remove(Wrappers.<QualityInspectFile>lambdaQuery() |
| | | .in(QualityInspectFile::getInspectId,ids)); |
| | | .in(QualityInspectFile::getInspectId, ids)); |
| | | //删除检验单 |
| | | return AjaxResult.success(qualityInspectService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param qualityInspectDto |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | *分页查询 |
| | | * 分页查询 |
| | | * |
| | | * @param page |
| | | * @param qualityInspect |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 导出 |
| | | * |
| | | * @param response |
| | | * @param qualityInspect |
| | | */ |
| | | @PostMapping("/export") |
| | | public void qualityInspectExport(HttpServletResponse response,QualityInspect qualityInspect) { |
| | | public void qualityInspectExport(HttpServletResponse response, QualityInspect qualityInspect) { |
| | | qualityInspectService.qualityInspectExport(response, qualityInspect); |
| | | } |
| | | |
| | | /** |
| | | * 提交 |
| | | * |
| | | * @param qualityInspect |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 下载 |
| | | * |
| | | * @param response |
| | | * @param qualityInspect |
| | | */ |
| | | @PostMapping("/down") |
| | | public void down(HttpServletResponse response,@RequestBody QualityInspect qualityInspect) { |
| | | public void down(HttpServletResponse response, @RequestBody QualityInspect qualityInspect) { |
| | | qualityInspectService.down(response, qualityInspect); |
| | | } |
| | | } |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @Api(tags = "质量管理") |
| | | @RestController |
| | | @RequestMapping("/qualityReport") |
| | | @AllArgsConstructor |
| | | public class QualityReportController { |
| | | |
| | | @Autowired |
| | | private QualityReportService qualityReportService; |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.quality.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardBinding; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.quality.service.QualityTestStandardBindingService; |
| | | import com.ruoyi.quality.service.QualityTestStandardParamService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/qualityTestStandardBinding") |
| | | @AllArgsConstructor |
| | | public class QualityTestStandardBindingController { |
| | | |
| | | @Autowired |
| | | private QualityTestStandardBindingService qualityTestStandardBindingService; |
| | | |
| | | /** |
| | | * 新增检测标准主表与产品关联表 |
| | | * |
| | | * @param qualityTestStandardBindings |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除检测标准主表与产品关联表 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delQualityTestStandard(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | | } |
| | | return AjaxResult.success(qualityTestStandardBindingService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | *检测指标维护查询 |
| | | * 检测指标维护查询 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/list") |
| | |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.quality.service.QualityTestStandardParamService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/qualityTestStandardParam") |
| | | @AllArgsConstructor |
| | | public class QualityTestStandardParamController { |
| | | |
| | | @Autowired |
| | | private QualityTestStandardParamService qualityTestStandardParamService; |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.quality.dto.*; |
| | | import com.ruoyi.quality.mapper.QualityInspectMapper; |
| | | import com.ruoyi.quality.service.QualityReportService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class QualityReportServiceImpl implements QualityReportService { |
| | | |
| | | @Autowired |
| | | private QualityInspectMapper qualityInspectMapper; |
| | | private final QualityInspectMapper qualityInspectMapper; |
| | | |
| | | @Override |
| | | public List<QualityInspectStatDto> getInspectStatistics() { |
| | |
| | | package com.ruoyi.quality.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.quality.dto.QualityTestStandardBindingDto; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardBinding; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardBindingMapper; |
| | | import com.ruoyi.quality.service.QualityTestStandardBindingService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.ruoyi.quality.dto.QualityTestStandardBindingDto; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardBindingMapper; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardBinding; |
| | | import com.ruoyi.quality.service.QualityTestStandardBindingService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | * @since 2026-01-13 03:39:40 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class QualityTestStandardBindingServiceImpl extends ServiceImpl<QualityTestStandardBindingMapper, QualityTestStandardBinding> implements QualityTestStandardBindingService { |
| | | |
| | | @Autowired |
| | | private QualityTestStandardBindingMapper qualityTestStandardBindingMapper; |
| | | private final QualityTestStandardBindingMapper qualityTestStandardBindingMapper; |
| | | |
| | | @Override |
| | | public List<QualityTestStandardBindingDto> listBinding(Long testStandardId) { |
| | |
| | | package com.ruoyi.quality.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.mapper.ProductModelMapper; |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.quality.mapper.QualityInspectMapper; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardBindingMapper; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardMapper; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardParamMapper; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardMapper; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardBinding; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.quality.service.IQualityTestStandardService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.quality.service.QualityTestStandardParamService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | * @since 2026-01-13 03:40:24 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class QualityTestStandardServiceImpl extends ServiceImpl<QualityTestStandardMapper, QualityTestStandard> implements IQualityTestStandardService { |
| | | |
| | | @Autowired |
| | | private QualityTestStandardMapper qualityTestStandardMapper; |
| | | |
| | | @Autowired |
| | | private QualityTestStandardParamMapper qualityTestStandardParamMapper; |
| | | |
| | | @Autowired |
| | | private QualityTestStandardParamService qualityTestStandardParamService; |
| | | |
| | | @Autowired |
| | | private QualityTestStandardBindingMapper qualityTestStandardBindingMapper; |
| | | |
| | | @Autowired |
| | | private QualityInspectMapper qualityInspectMapper; |
| | | private final QualityTestStandardMapper qualityTestStandardMapper; |
| | | private final QualityTestStandardParamMapper qualityTestStandardParamMapper; |
| | | private final QualityTestStandardParamService qualityTestStandardParamService; |
| | | private final QualityInspectMapper qualityInspectMapper; |
| | | |
| | | @Override |
| | | public IPage<QualityTestStandard> qualityTestStandardListPage(Page page, QualityTestStandard qualityTestStandard) { |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeAccident; |
| | | import com.ruoyi.safe.pojo.SafeContingencyPlan; |
| | | import com.ruoyi.safe.service.SafeAccidentService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/safeAccident") |
| | | @AllArgsConstructor |
| | | @Api(tags = "安全生产--事故上报记录") |
| | | public class SafeAccidentController { |
| | | |
| | | @Autowired |
| | | private SafeAccidentService safeAccidentService; |
| | | |
| | | @GetMapping("/page") |
| | |
| | | import com.ruoyi.safe.service.SafeCertificationService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RestController |
| | | @RequestMapping("/safeCertification") |
| | | @Api(tags = "安全生产--安全规程与资质管理") |
| | | @AllArgsConstructor |
| | | public class SafeCertificationController { |
| | | |
| | | @Autowired |
| | | private SafeCertificationService safeCertificationService; |
| | | |
| | | @GetMapping("/page") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeCertification; |
| | | import com.ruoyi.safe.pojo.SafeContingencyPlan; |
| | | import com.ruoyi.safe.service.SafeCertificationService; |
| | | import com.ruoyi.safe.service.SafeContingencyPlanService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | @RestController |
| | | @RequestMapping("/safeContingencyPlan") |
| | | @Api(tags = "安全生产--应急预案查阅") |
| | | @AllArgsConstructor |
| | | public class SafeContingencyPlanController { |
| | | |
| | | @Autowired |
| | | private SafeContingencyPlanService safeContingencyPlanService; |
| | | private final SafeContingencyPlanService safeContingencyPlanService; |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation("分页查询") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeCertification; |
| | | import com.ruoyi.safe.pojo.SafeHazard; |
| | | import com.ruoyi.safe.service.SafeCertificationService; |
| | | import com.ruoyi.safe.service.SafeHazardService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | @RestController |
| | | @RequestMapping("/safeHazard") |
| | | @Api(tags = "安全生产--危险源台账") |
| | | @AllArgsConstructor |
| | | public class SafeHazardController { |
| | | |
| | | @Autowired |
| | | private SafeHazardService safeHazardService; |
| | | |
| | | @GetMapping("/page") |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.dto.SafeHazardRecordDto; |
| | | import com.ruoyi.safe.pojo.SafeHazard; |
| | | import com.ruoyi.safe.pojo.SafeHazardRecord; |
| | | import com.ruoyi.safe.service.SafeHazardRecordService; |
| | | import com.ruoyi.safe.service.SafeHazardService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | @RestController |
| | | @RequestMapping("/safeHazardRecord") |
| | | @Api(tags = "安全生产--危险物料管控") |
| | | @AllArgsConstructor |
| | | public class SafeHazardRecordController { |
| | | |
| | | @Autowired |
| | | private SafeHazardRecordService safeHazardRecordService; |
| | | |
| | | @GetMapping("/page") |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.dto.SafeHiddenDto; |
| | | import com.ruoyi.safe.pojo.SafeHazard; |
| | | import com.ruoyi.safe.pojo.SafeHidden; |
| | | import com.ruoyi.safe.service.SafeHazardService; |
| | | import com.ruoyi.safe.service.SafeHiddenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/safeHidden") |
| | | @AllArgsConstructor |
| | | @Api(tags = "安全生产--隐患排查上报") |
| | | public class SafeHiddenController { |
| | | |
| | | @Autowired |
| | | private SafeHiddenService safeHiddenService; |
| | | |
| | | @GetMapping("/page") |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.dto.SafeTrainingDto; |
| | | import com.ruoyi.safe.pojo.SafeAccident; |
| | | import com.ruoyi.safe.pojo.SafeTraining; |
| | | import com.ruoyi.safe.pojo.SafeTrainingDetails; |
| | | import com.ruoyi.safe.service.SafeAccidentService; |
| | | import com.ruoyi.safe.service.SafeTrainingDetailsService; |
| | | import com.ruoyi.safe.service.SafeTrainingService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @RestController |
| | | @RequestMapping("/safeTraining") |
| | | @Api(tags = "安全生产--安全培训考核") |
| | | @RequiredArgsConstructor |
| | | public class SafeTrainingController { |
| | | |
| | | @Autowired |
| | | private SafeTrainingService safeTrainingService; |
| | | |
| | | @Autowired |
| | | private SafeTrainingDetailsService safeTrainingDetailsService; |
| | | |
| | | @GetMapping("/page") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.dto.SafeTrainingDto; |
| | | import com.ruoyi.safe.pojo.SafeTraining; |
| | | import com.ruoyi.safe.pojo.SafeTrainingDetails; |
| | | import com.ruoyi.safe.service.SafeTrainingDetailsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/safeTrainingDetails") |
| | | @Api(tags = "安全生产--安全培训考核--记录详情") |
| | | @AllArgsConstructor |
| | | public class SafeTrainingDetailsController { |
| | | |
| | | |
| | | @Autowired |
| | | private SafeTrainingDetailsService safeTrainingDetailsService; |
| | | private final SafeTrainingDetailsService safeTrainingDetailsService; |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation("分页查询") |
| | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | * @author 芯导软件(江苏)有限公司 |
| | | * @since 2026-01-28 11:10:54 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @Data |
| | | @TableName("safe_hidden") |
| | | @ApiModel(value = "SafeHidden对象", description = "安全生产--隐患排查上报") |
| | | public class SafeHidden implements Serializable { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.safe.pojo.SafeAccident; |
| | | import com.ruoyi.safe.mapper.SafeAccidentMapper; |
| | | import com.ruoyi.safe.service.SafeAccidentService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.ruoyi.safe.mapper.SafeAccidentMapper; |
| | | import com.ruoyi.safe.pojo.SafeAccident; |
| | | import com.ruoyi.safe.service.SafeAccidentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | * @since 2026-01-28 02:40:31 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SafeAccidentServiceImpl extends ServiceImpl<SafeAccidentMapper, SafeAccident> implements SafeAccidentService { |
| | | |
| | | @Autowired |
| | | private SafeAccidentMapper safeAccidentMapper; |
| | | private final SafeAccidentMapper safeAccidentMapper; |
| | | |
| | | @Override |
| | | public IPage<SafeAccident> pageSafeAccident(Page page, SafeAccident safeAccident) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.safe.pojo.SafeCertification; |
| | | import com.ruoyi.safe.mapper.SafeCertificationMapper; |
| | | import com.ruoyi.safe.service.SafeCertificationService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.ruoyi.safe.mapper.SafeCertificationMapper; |
| | | import com.ruoyi.safe.pojo.SafeCertification; |
| | | import com.ruoyi.safe.service.SafeCertificationService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | * @since 2026-01-28 09:26:33 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SafeCertificationServiceImpl extends ServiceImpl<SafeCertificationMapper, SafeCertification> implements SafeCertificationService { |
| | | |
| | | @Autowired |
| | | private SafeCertificationMapper safeCertificationMapper; |
| | | private final SafeCertificationMapper safeCertificationMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.safe.pojo.SafeContingencyPlan; |
| | | import com.ruoyi.safe.mapper.SafeContingencyPlanMapper; |
| | | import com.ruoyi.safe.service.SafeContingencyPlanService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.ruoyi.safe.mapper.SafeContingencyPlanMapper; |
| | | import com.ruoyi.safe.pojo.SafeContingencyPlan; |
| | | import com.ruoyi.safe.service.SafeContingencyPlanService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | * @since 2026-01-28 02:07:29 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SafeContingencyPlanServiceImpl extends ServiceImpl<SafeContingencyPlanMapper, SafeContingencyPlan> implements SafeContingencyPlanService { |
| | | |
| | | @Autowired |
| | | private SafeContingencyPlanMapper safeContingencyPlanMapper; |
| | | private final SafeContingencyPlanMapper safeContingencyPlanMapper; |
| | | |
| | | @Override |
| | | public IPage<SafeContingencyPlan> pageSafeContingencyPlan(Page page, SafeContingencyPlan safeContingencyPlan) { |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.safe.dto.SafeHazardRecordDto; |
| | | import com.ruoyi.safe.mapper.SafeHazardMapper; |
| | | import com.ruoyi.safe.mapper.SafeHazardRecordMapper; |
| | | import com.ruoyi.safe.pojo.SafeHazard; |
| | | import com.ruoyi.safe.pojo.SafeHazardRecord; |
| | | import com.ruoyi.safe.mapper.SafeHazardRecordMapper; |
| | | import com.ruoyi.safe.service.SafeHazardRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequiredArgsConstructor |
| | | public class SafeHazardRecordServiceImpl extends ServiceImpl<SafeHazardRecordMapper, SafeHazardRecord> implements SafeHazardRecordService { |
| | | |
| | | @Autowired |
| | | private SafeHazardRecordMapper safeHazardRecordMapper; |
| | | @Autowired |
| | | private SafeHazardMapper safeHazardMapper; |
| | | private final SafeHazardRecordMapper safeHazardRecordMapper; |
| | | private final SafeHazardMapper safeHazardMapper; |
| | | |
| | | @Override |
| | | public IPage<SafeHazardRecordDto> pageSafeHazardRecord(Page page, SafeHazardRecordDto safeHazardRecordDto) { |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.safe.mapper.SafeHazardMapper; |
| | | import com.ruoyi.safe.mapper.SafeHazardRecordMapper; |
| | | import com.ruoyi.safe.pojo.SafeHazard; |
| | | import com.ruoyi.safe.mapper.SafeHazardMapper; |
| | | import com.ruoyi.safe.pojo.SafeHazardRecord; |
| | | import com.ruoyi.safe.service.SafeHazardService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | * @since 2026-01-28 10:09:24 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SafeHazardServiceImpl extends ServiceImpl<SafeHazardMapper, SafeHazard> implements SafeHazardService { |
| | | |
| | | @Autowired |
| | | private SafeHazardMapper safeHazardMapper; |
| | | private final SafeHazardMapper safeHazardMapper; |
| | | |
| | | @Autowired |
| | | private SafeHazardRecordMapper safeHazardRecordMapper; |
| | | private final SafeHazardRecordMapper safeHazardRecordMapper; |
| | | |
| | | @Override |
| | | public IPage<SafeHazard> pageSafeHazard(Page page, SafeHazard safeHazard) { |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.project.system.domain.SysNotice; |
| | | import com.ruoyi.project.system.mapper.SysNoticeMapper; |
| | | import com.ruoyi.project.system.service.ISysDictDataService; |
| | | import com.ruoyi.project.system.service.ISysNoticeService; |
| | | import com.ruoyi.project.system.service.impl.SysNoticeServiceImpl; |
| | | import com.ruoyi.safe.dto.SafeHiddenDto; |
| | | import com.ruoyi.safe.pojo.SafeHidden; |
| | | import com.ruoyi.safe.mapper.SafeHiddenMapper; |
| | | import com.ruoyi.safe.pojo.SafeHidden; |
| | | import com.ruoyi.safe.service.SafeHiddenService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequiredArgsConstructor |
| | | public class SafeHiddenServiceImpl extends ServiceImpl<SafeHiddenMapper, SafeHidden> implements SafeHiddenService { |
| | | |
| | | @Autowired |
| | | private SafeHiddenMapper safeHiddenMapper; |
| | | @Autowired |
| | | private ISysNoticeService sysNoticeService; |
| | | private final SafeHiddenMapper safeHiddenMapper; |
| | | private final ISysNoticeService sysNoticeService; |
| | | |
| | | @Autowired |
| | | private ISysDictDataService sysDictDataService; |
| | | private final ISysDictDataService sysDictDataService; |
| | | |
| | | |
| | | @Override |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.utils.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.safe.dto.SafeTrainingDetailsDto; |
| | | import com.ruoyi.safe.dto.SafeTrainingDto; |
| | | import com.ruoyi.safe.pojo.SafeTrainingDetails; |
| | | import com.ruoyi.safe.mapper.SafeTrainingDetailsMapper; |
| | | import com.ruoyi.safe.pojo.SafeTrainingDetails; |
| | | import com.ruoyi.safe.service.SafeTrainingDetailsService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | |
| | | * @since 2026-01-29 10:54:15 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SafeTrainingDetailsServiceImpl extends ServiceImpl<SafeTrainingDetailsMapper, SafeTrainingDetails> implements SafeTrainingDetailsService { |
| | | |
| | | @Autowired |
| | | private SafeTrainingDetailsMapper safeTrainingDetailsMapper; |
| | | private final SafeTrainingDetailsMapper safeTrainingDetailsMapper; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | |
| | | @Override |
| | | public IPage<SafeTrainingDetails> pageDetails(Page page, SafeTrainingDetails safeTrainingDetails) { |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.utils.HackLoopTableRenderPolicy; |
| | |
| | | import com.ruoyi.safe.dto.SafeTrainingDto; |
| | | import com.ruoyi.safe.mapper.SafeTrainingDetailsMapper; |
| | | import com.ruoyi.safe.mapper.SafeTrainingFileMapper; |
| | | import com.ruoyi.safe.pojo.SafeTraining; |
| | | import com.ruoyi.safe.mapper.SafeTrainingMapper; |
| | | import com.ruoyi.safe.pojo.SafeTraining; |
| | | import com.ruoyi.safe.pojo.SafeTrainingDetails; |
| | | import com.ruoyi.safe.pojo.SafeTrainingFile; |
| | | import com.ruoyi.safe.service.SafeTrainingService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | |
| | | * @since 2026-01-29 10:54:06 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SafeTrainingServiceImpl extends ServiceImpl<SafeTrainingMapper, SafeTraining> implements SafeTrainingService { |
| | | |
| | | @Autowired |
| | | private SafeTrainingMapper safeTrainingMapper; |
| | | private final SafeTrainingMapper safeTrainingMapper; |
| | | |
| | | @Autowired |
| | | private SafeTrainingFileMapper safeTrainingFileMapper; |
| | | private final SafeTrainingFileMapper safeTrainingFileMapper; |
| | | |
| | | @Autowired |
| | | private SafeTrainingDetailsMapper safeTrainingDetailsMapper; |
| | | private final SafeTrainingDetailsMapper safeTrainingDetailsMapper; |
| | | |
| | | @Override |
| | | public IPage<SafeTrainingDto> pageSafeTraining(Page page, SafeTrainingDto safeTrainingDto) { |
| | |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | | import com.ruoyi.sales.dto.InvoiceRegistrationProductDto; |
| | | import com.ruoyi.sales.mapper.InvoiceLedgerFileMapper; |
| | | import com.ruoyi.sales.mapper.InvoiceRegistrationProductMapper; |
| | | import com.ruoyi.sales.pojo.InvoiceRegistrationProduct; |
| | | import com.ruoyi.sales.service.InvoiceLedgerService; |
| | | import io.jsonwebtoken.lang.Collections; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/invoiceLedger") |
| | | @AllArgsConstructor |
| | | public class InvoiceLedgerController { |
| | | |
| | | @Autowired |
| | | private InvoiceLedgerService invoiceLedgerService; |
| | | |
| | | @Autowired |
| | | private InvoiceRegistrationProductMapper invoiceRegistrationProductMapper; |
| | | |
| | | @Autowired |
| | | private InvoiceLedgerFileMapper invoiceLedgerFileMapper; |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.sales.dto.SalesLedgerDto; |
| | | import com.ruoyi.sales.service.InvoiceRegistrationService; |
| | | import io.jsonwebtoken.lang.Collections; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/invoiceRegistration") |
| | | @AllArgsConstructor |
| | | public class InvoiceRegistrationController { |
| | | |
| | | @Autowired |
| | | private InvoiceRegistrationService invoiceRegistrationService; |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.sales.service.impl.MetricStatisticsServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | @Api(tags = "指标统计") |
| | | @RestController |
| | | @RequestMapping("/metricStatistics") |
| | | @AllArgsConstructor |
| | | public class MetricStatisticsController extends BaseController { |
| | | |
| | | @Autowired |
| | | private MetricStatisticsServiceImpl metricStatisticsService; |
| | | |
| | | @ApiOperation("头部总计") |
| | |
| | | import com.ruoyi.sales.service.PaymentShippingService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RestController |
| | | @RequestMapping("/paymentShipping") |
| | | @Api(tags = "支付与发货管理") |
| | | @AllArgsConstructor |
| | | public class PaymentShippingController extends BaseController { |
| | | |
| | | @Autowired |
| | | private PaymentShippingService paymentShippingService; |
| | | |
| | | @Autowired |
| | | private PaymentShippingMapper paymentShippingMapper; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.page.TableDataInfo; |
| | | import com.ruoyi.purchase.dto.InvoicePurchaseDto; |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentRecordDto; |
| | | import com.ruoyi.sales.dto.SalesLedgerDto; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.service.ReceiptPaymentService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | |
| | | |
| | | @RestController |
| | | @RequestMapping("/receiptPayment") |
| | | @AllArgsConstructor |
| | | public class ReceiptPaymentController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ReceiptPaymentService receiptPaymentService; |
| | | |
| | | /** |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | |
| | | public class SalesLedgerController extends BaseController { |
| | | |
| | | private ISalesLedgerService salesLedgerService; |
| | | |
| | | private ICommonFileService commonFileService; |
| | | |
| | | @Autowired |
| | | private InvoiceLedgerMapper invoiceLedgerMapper; |
| | | |
| | | @Autowired |
| | | private ReceiptPaymentMapper receiptPaymentMapper; |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.sales.controller; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.purchase.dto.SimpleReturnOrderGroupDto; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrderProductsMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrderProducts; |
| | | import com.ruoyi.sales.dto.SalesLedgerProductDto; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.ISalesLedgerProductService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.page.TableDataInfo; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.purchase.dto.SimpleReturnOrderGroupDto; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrderProductsMapper; |
| | | import com.ruoyi.sales.dto.SalesLedgerProductDto; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.ISalesLedgerProductService; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | |
| | | * @date 2025-05-08 |
| | | */ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/sales/product") |
| | | public class SalesLedgerProductController extends BaseController |
| | | { |
| | | @Autowired |
| | | private ISalesLedgerProductService salesLedgerProductService; |
| | | @Autowired |
| | | private ProcurementRecordService procurementRecordService; |
| | | @Autowired |
| | | private StockUtils stockUtils; |
| | | |
| | | @Autowired |
| | | private PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper; |
| | | |
| | | |
| | |
| | | package com.ruoyi.sales.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.sales.dto.SalesQuotationDto; |
| | | import com.ruoyi.sales.service.SalesQuotationService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/sales/quotation") |
| | | @AllArgsConstructor |
| | | public class SalesQuotationController { |
| | | @Autowired |
| | | private SalesQuotationService salesQuotationService; |
| | | private final SalesQuotationService salesQuotationService; |
| | | @GetMapping("/list") |
| | | public AjaxResult getList(Page page, SalesQuotationDto salesQuotationDto) { |
| | | return AjaxResult.success(salesQuotationService.listPage(page, salesQuotationDto)); |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | | import com.ruoyi.sales.pojo.SalespersonManagement; |
| | | import com.ruoyi.sales.service.SalespersonManagementService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RestController |
| | | @RequestMapping("/salespersonManagement") |
| | | @Api(tags = "业务员管理") |
| | | @AllArgsConstructor |
| | | public class SalespersonManagementController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private SalespersonManagementService salespersonManagementService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.sales.service.ShipmentApprovalService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/shipmentApproval") |
| | | @Api(tags = "发货审批管理") |
| | | @AllArgsConstructor |
| | | public class ShipmentApprovalController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ShipmentApprovalService shipmentApprovalService; |
| | | @Autowired |
| | | private ShipmentApprovalMapper shipmentApprovalMapper; |
| | | |
| | | @Autowired |
| | | private ISalesLedgerProductService salesLedgerProductService; |
| | | @Autowired |
| | | private StockUtils stockUtils; |
| | | private final ShipmentApprovalService shipmentApprovalService; |
| | | private final ShipmentApprovalMapper shipmentApprovalMapper; |
| | | private final ISalesLedgerProductService salesLedgerProductService; |
| | | private final StockUtils stockUtils; |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("发货审批列表") |
| | |
| | | package com.ruoyi.sales.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.approve.mapper.ApproveProcessMapper; |
| | | import com.ruoyi.approve.service.impl.ApproveProcessServiceImpl; |
| | | import com.ruoyi.approve.vo.ApproveProcessVO; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.other.service.impl.TempFileServiceImpl; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.sales.dto.ShippingInfoDto; |
| | | import com.ruoyi.sales.mapper.ShipmentApprovalMapper; |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.pojo.ShipmentApproval; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.ISalesLedgerProductService; |
| | | import com.ruoyi.sales.service.ISalesLedgerService; |
| | | import com.ruoyi.sales.service.ShippingInfoService; |
| | | import com.ruoyi.sales.service.impl.CommonFileServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | |
| | | @RestController |
| | | @RequestMapping("/shippingInfo") |
| | | @Api(tags = "发货信息管理") |
| | | @AllArgsConstructor |
| | | public class ShippingInfoController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ShippingInfoService shippingInfoService; |
| | | |
| | | @Autowired |
| | | private CommonFileServiceImpl commonFileService; |
| | | |
| | | @Autowired |
| | | private ApproveProcessServiceImpl approveProcessService; |
| | | @Autowired |
| | | private StockUtils stockUtils; |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | |
| | | return shippingInfoService.delete(ids) ? AjaxResult.success("删除成功") : AjaxResult.error("删除失败"); |
| | | } |
| | | |
| | | @Autowired |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | /** |
| | | * 导出发货信息管理 |
| | |
| | | import com.ruoyi.sales.mapper.*; |
| | | import com.ruoyi.sales.pojo.*; |
| | | import com.ruoyi.sales.service.InvoiceLedgerService; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.YearMonth; |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.UUID; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class InvoiceLedgerServiceImpl extends ServiceImpl<InvoiceLedgerMapper, InvoiceLedger> implements InvoiceLedgerService { |
| | | |
| | | @Value("${ruoyi.profile}") |
| | | private String uploadFile; |
| | | |
| | | @Autowired |
| | | private InvoiceLedgerMapper invoiceLedgerMapper; |
| | | |
| | | @Autowired |
| | | private InvoiceLedgerFileMapper invoiceLedgerFileMapper; |
| | | |
| | | @Autowired |
| | | private InvoiceRegistrationProductMapper invoiceRegistrationProductMapper; |
| | | |
| | | @Autowired |
| | | private ReceiptPaymentMapper receiptPaymentMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | @Autowired |
| | | private CommonFileMapper commonFileMapper; |
| | | private final InvoiceLedgerMapper invoiceLedgerMapper; |
| | | private final InvoiceLedgerFileMapper invoiceLedgerFileMapper; |
| | | private final InvoiceRegistrationProductMapper invoiceRegistrationProductMapper; |
| | | private final ReceiptPaymentMapper receiptPaymentMapper; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | |
| | | /** |
| | | * 开票台账新增 |
| | |
| | | import com.ruoyi.sales.pojo.InvoiceRegistrationProduct; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.InvoiceRegistrationService; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class InvoiceRegistrationServiceImpl extends ServiceImpl<InvoiceRegistrationMapper, InvoiceRegistration> implements InvoiceRegistrationService { |
| | | |
| | | @Autowired |
| | | private InvoiceRegistrationMapper invoiceRegistrationMapper; |
| | | private final InvoiceRegistrationMapper invoiceRegistrationMapper; |
| | | |
| | | @Autowired |
| | | private InvoiceRegistrationProductMapper invoiceRegistrationProductMapper; |
| | | private final InvoiceRegistrationProductMapper invoiceRegistrationProductMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | |
| | | @Autowired |
| | | private InvoiceLedgerMapper invoiceLedgerMapper; |
| | | private final InvoiceLedgerMapper invoiceLedgerMapper; |
| | | |
| | | /** |
| | | * 开票登记记录新增 |
| | |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class MetricStatisticsServiceImpl { |
| | | |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | |
| | | @Autowired |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | private final SalesLedgerMapper salesLedgerMapper; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | public AjaxResult total() { |
| | | List<SalesLedger> salesLedgers = salesLedgerMapper.selectList(null); |
| | |
| | | import com.ruoyi.sales.mapper.PaymentShippingMapper; |
| | | import com.ruoyi.sales.pojo.PaymentShipping; |
| | | import com.ruoyi.sales.service.PaymentShippingService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class PaymentShippingServiceImpl extends ServiceImpl<PaymentShippingMapper, PaymentShipping> implements PaymentShippingService { |
| | | |
| | | @Autowired |
| | | private PaymentShippingMapper paymentShippingMapper; |
| | | private final PaymentShippingMapper paymentShippingMapper; |
| | | |
| | | @Override |
| | | public IPage<PaymentShipping> listPage(Page page, PaymentShipping paymentShipping) { |
| | |
| | | import com.ruoyi.account.service.AccountIncomeService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.sales.dto.CustomerInteractionDto; |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentExeclDto; |
| | | import com.ruoyi.sales.mapper.InvoiceLedgerMapper; |
| | | import com.ruoyi.sales.mapper.ReceiptPaymentMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.pojo.InvoiceLedger; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.ReceiptPaymentService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.YearMonth; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class ReceiptPaymentServiceImpl extends ServiceImpl<ReceiptPaymentMapper,ReceiptPayment> implements ReceiptPaymentService { |
| | | |
| | | @Autowired |
| | | private ReceiptPaymentMapper receiptPaymentMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | @Autowired |
| | | private InvoiceLedgerMapper invoiceLedgerMapper; |
| | | |
| | | @Autowired |
| | | private AccountIncomeService accountIncomeService; |
| | | private final ReceiptPaymentMapper receiptPaymentMapper; |
| | | private final SalesLedgerMapper salesLedgerMapper; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final AccountIncomeService accountIncomeService; |
| | | |
| | | /** |
| | | * 回款登记新增 |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockInUnQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.production.mapper.*; |
| | | import com.ruoyi.production.pojo.*; |
| | | import com.ruoyi.production.pojo.ProductionAccount; |
| | | import com.ruoyi.production.pojo.ProductionOperationTask; |
| | | import com.ruoyi.production.pojo.ProductionOrder; |
| | | import com.ruoyi.production.pojo.ProductionProductMain; |
| | | import com.ruoyi.production.service.ProductionOrderService; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | |
| | | import com.ruoyi.technology.mapper.TechnologyBomStructureMapper; |
| | | import com.ruoyi.technology.mapper.TechnologyRoutingMapper; |
| | | import com.ruoyi.technology.pojo.TechnologyRouting; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.Set; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | * @date 2025-05-08 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | @RequiredArgsConstructor |
| | | public class SalesLedgerProductServiceImpl extends ServiceImpl<SalesLedgerProductMapper, SalesLedgerProduct> implements ISalesLedgerProductService { |
| | | |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private ProductionAccountMapper productionAccountMapper; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final ProductionAccountMapper productionAccountMapper; |
| | | private final SalesLedgerMapper salesLedgerMapper; |
| | | private final PurchaseLedgerMapper purchaseLedgerMapper; |
| | | private final ProductionOrderMapper productionOrderMapper; |
| | | private final ProductionOperationTaskMapper productionOperationTaskMapper; |
| | | private final ProductionOrderService productionOrderService; |
| | | private final TechnologyRoutingMapper technologyRoutingMapper; |
| | | private final TechnologyBomStructureMapper technologyBomStructureMapper; |
| | | private final InvoiceRegistrationProductMapper invoiceRegistrationProductMapper; |
| | | private final ProductionProductMainMapper productionProductMainMapper; |
| | | private final ProductionProductOutputMapper productionProductOutputMapper; |
| | | private final ProductionProductInputMapper productionProductInputMapper; |
| | | private final QualityInspectMapper qualityInspectMapper; |
| | | private final ShippingInfoMapper shippingInfoMapper; |
| | | private final ShippingInfoServiceImpl shippingInfoService; |
| | | private final StockUtils stockUtils; |
| | | private final StockInventoryMapper stockInventoryMapper; |
| | | |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | private PurchaseLedgerMapper purchaseLedgerMapper; |
| | | |
| | | private ProductionOrderMapper productionOrderMapper; |
| | | private ProductionOperationTaskMapper productionOperationTaskMapper; |
| | | private ProductionOrderService productionOrderService; |
| | | private TechnologyRoutingMapper technologyRoutingMapper; |
| | | private TechnologyBomStructureMapper technologyBomStructureMapper; |
| | | |
| | | private InvoiceRegistrationProductMapper invoiceRegistrationProductMapper; |
| | | private ProductionProductMainMapper productionProductMainMapper; |
| | | private ProductionProductOutputMapper productionProductOutputMapper; |
| | | private ProductionProductInputMapper productionProductInputMapper; |
| | | private QualityInspectMapper qualityInspectMapper; |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | private ShippingInfoServiceImpl shippingInfoService; |
| | | |
| | | private StockUtils stockUtils; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private StockInventoryMapper stockInventoryMapper; |
| | | @Override |
| | | public SalesLedgerProduct selectSalesLedgerProductById(Long id) { |
| | | return salesLedgerProductMapper.selectById(id); |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.other.mapper.TempFileMapper; |
| | | import com.ruoyi.other.pojo.TempFile; |
| | | import com.ruoyi.production.mapper.*; |
| | | import com.ruoyi.production.mapper.ProductionProductInputMapper; |
| | | import com.ruoyi.production.mapper.ProductionProductMainMapper; |
| | | import com.ruoyi.production.mapper.ProductionProductOutputMapper; |
| | | import com.ruoyi.production.service.ProductionProductMainService; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.jetbrains.annotations.Nullable; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.core.script.DefaultRedisScript; |
| | |
| | | private final ProductionProductInputMapper productionProductInputMapper; |
| | | private final QualityInspectMapper qualityInspectMapper; |
| | | private final RedisTemplate<String, String> redisTemplate; |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | private final SysDeptMapper sysDeptMapper; |
| | | @Value("${file.upload-dir}") |
| | | private String uploadDir; |
| | | @Autowired |
| | | private ProductModelMapper productModelMapper; |
| | | |
| | | @Autowired |
| | | private ProductMapper productMapper; |
| | | @Autowired |
| | | private ProductionProductMainService productionProductMainService; |
| | | @Autowired |
| | | private PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper; |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | @Autowired |
| | | private CustomerPrivatePoolMapper customerPrivatePoolMapper; |
| | | private final ProductMapper productMapper; |
| | | private final ProductionProductMainService productionProductMainService; |
| | | private final PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final CustomerPrivatePoolMapper customerPrivatePoolMapper; |
| | | |
| | | @Override |
| | | public List<SalesLedger> selectSalesLedgerList(SalesLedgerDto salesLedgerDto) { |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.approve.service.IApproveProcessService; |
| | | import com.ruoyi.approve.service.impl.ApproveProcessServiceImpl; |
| | | import com.ruoyi.approve.vo.ApproveGetAndUpdateVo; |
| | | import com.ruoyi.approve.vo.ApproveProcessVO; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.utils.uuid.UUID; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.sales.dto.SalesQuotationDto; |
| | | import com.ruoyi.sales.mapper.SalesQuotationMapper; |
| | |
| | | import com.ruoyi.sales.pojo.SalesQuotationProduct; |
| | | import com.ruoyi.sales.service.SalesQuotationProductService; |
| | | import com.ruoyi.sales.service.SalesQuotationService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequiredArgsConstructor |
| | | public class SalesQuotationServiceImpl extends ServiceImpl<SalesQuotationMapper, SalesQuotation> implements SalesQuotationService { |
| | | @Autowired |
| | | private SalesQuotationMapper salesQuotationMapper; |
| | | @Autowired |
| | | private SalesQuotationProductMapper salesQuotationProductMapper; |
| | | @Autowired |
| | | private SalesQuotationProductService salesQuotationProductService; |
| | | private final SalesQuotationProductMapper salesQuotationProductMapper; |
| | | private final SalesQuotationMapper salesQuotationMapper; |
| | | private final SalesQuotationProductService salesQuotationProductService; |
| | | |
| | | @Autowired |
| | | private ApproveProcessServiceImpl approveProcessService; |
| | | private final ApproveProcessServiceImpl approveProcessService; |
| | | @Override |
| | | public IPage<SalesQuotationDto> listPage(Page page, SalesQuotationDto salesQuotationDto) { |
| | | IPage<SalesQuotationDto> salesQuotationDtoIPage = salesQuotationMapper.listPage(page, salesQuotationDto); |
| | |
| | | import com.ruoyi.sales.mapper.SalespersonManagementMapper; |
| | | import com.ruoyi.sales.pojo.SalespersonManagement; |
| | | import com.ruoyi.sales.service.SalespersonManagementService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class SalespersonManagementServiceImpl extends ServiceImpl<SalespersonManagementMapper, SalespersonManagement> implements SalespersonManagementService { |
| | | |
| | | @Autowired |
| | | private SalespersonManagementMapper salespersonManagementMapper; |
| | | private final SalespersonManagementMapper salespersonManagementMapper; |
| | | |
| | | @Override |
| | | public IPage<SalespersonManagement> listPage(Page page, SalespersonManagement salespersonManagement) { |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.sales.mapper.ShipmentApprovalMapper; |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | | import com.ruoyi.sales.pojo.ShipmentApproval; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.ShipmentApprovalService; |
| | | import com.ruoyi.sales.service.ShippingInfoService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class ShipmentApprovalServiceImpl extends ServiceImpl<ShipmentApprovalMapper, ShipmentApproval> implements ShipmentApprovalService { |
| | | |
| | | @Autowired |
| | | private ShipmentApprovalMapper shipmentApprovalMapper; |
| | | private final ShipmentApprovalMapper shipmentApprovalMapper; |
| | | |
| | | @Override |
| | | public IPage<ShipmentApproval> listPage(Page page, ShipmentApproval req) { |
| | |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.ShippingInfoService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.io.IOException; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class ShippingInfoServiceImpl extends ServiceImpl<ShippingInfoMapper, ShippingInfo> implements ShippingInfoService { |
| | | |
| | | @Autowired |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | @Autowired |
| | | private TempFileServiceImpl tempFileService; |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | @Autowired |
| | | private StockUtils stockUtils; |
| | | @Autowired |
| | | private CommonFileServiceImpl commonFileService; |
| | | |
| | | @Autowired |
| | | private ApproveProcessServiceImpl approveProcessService; |
| | | private final ShippingInfoMapper shippingInfoMapper; |
| | | private final TempFileServiceImpl tempFileService; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final StockUtils stockUtils; |
| | | private final CommonFileServiceImpl commonFileService; |
| | | private final ApproveProcessServiceImpl approveProcessService; |
| | | |
| | | @Override |
| | | public IPage<ShippingInfoDto> listPage(Page page, ShippingInfo req) { |
| | |
| | | import com.ruoyi.staff.service.BankService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @Api(tags = "银行管理表") |
| | | @RestController |
| | | @RequestMapping("/bank") |
| | | @AllArgsConstructor |
| | | public class BankController { |
| | | |
| | | @Autowired |
| | | private BankService bankService; |
| | | |
| | | @GetMapping("/list") |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff.pojo.HolidayApplication; |
| | | import com.ruoyi.staff.service.HolidayApplicationService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/staff/holidayApplication") |
| | | @AllArgsConstructor |
| | | public class HolidayApplicationController { |
| | | @Autowired |
| | | |
| | | private HolidayApplicationService holidayApplicationService; |
| | | /** |
| | | * 请假申请分页查询 |
| | |
| | | import com.ruoyi.staff.service.PersonalAttendanceLocationConfigService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @RestController |
| | | @RequestMapping("/personalAttendanceLocationConfig") |
| | | @Api(tags = "人员打卡规则配置") |
| | | @RequiredArgsConstructor |
| | | public class PersonalAttendanceLocationConfigController { |
| | | |
| | | @Autowired |
| | | private PersonalAttendanceLocationConfigService personalAttendanceLocationConfigService; |
| | | |
| | | @ApiOperation("新增/修改人员打卡规则配置") |
| | |
| | | import com.ruoyi.staff.utils.StyleYearUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RestController |
| | | @RequestMapping("/personalShift") |
| | | @Api(tags = "人员排班") |
| | | @AllArgsConstructor |
| | | public class PersonalShiftController { |
| | | |
| | | @Autowired |
| | | private PersonalShiftService personalShiftService; |
| | | |
| | | @ApiOperation("人员排班") |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | |
| | | import com.ruoyi.staff.service.SchemeApplicableStaffService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @Api(tags = "社保方案适用人员表") |
| | | @RestController |
| | | @RequestMapping("/schemeApplicableStaff") |
| | | @AllArgsConstructor |
| | | public class SchemeApplicableStaffController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private SchemeApplicableStaffService schemeApplicableStaffService; |
| | | |
| | | |
| | |
| | | import com.ruoyi.staff.service.StaffSalaryMainService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.aspectj.weaver.loadtime.Aj; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @Api(tags = "员工工资主表") |
| | | @RestController |
| | | @RequestMapping("/staffSalaryMain") |
| | | @AllArgsConstructor |
| | | public class StaffSalaryMainController { |
| | | |
| | | @Autowired |
| | | private StaffSalaryMainService staffSalaryMainService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.staff.service.AnalyticsService; |
| | | import com.ruoyi.staff.vo.MonthlyTurnoverRateVo; |
| | | import com.ruoyi.staff.vo.TotalTurnoverRateVo; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDate; |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @AllArgsConstructor |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class AnalyticsServiceImpl extends ServiceImpl<StaffLeaveMapper, StaffLeave> implements AnalyticsService { |
| | | @Autowired |
| | | private StaffLeaveMapper staffLeaveMapper; |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | private final StaffLeaveMapper staffLeaveMapper; |
| | | private final StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | @Override |
| | | public List<StaffLeaveDto> staffLeaveReasonAnalytics() { |
| | |
| | | import com.ruoyi.staff.mapper.HolidayApplicationMapper; |
| | | import com.ruoyi.staff.pojo.HolidayApplication; |
| | | import com.ruoyi.staff.service.HolidayApplicationService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class HolidayApplicationServiceImpl extends ServiceImpl<HolidayApplicationMapper, HolidayApplication> implements HolidayApplicationService { |
| | | @Autowired |
| | | private HolidayApplicationMapper holidayApplicationMapper; |
| | | private final HolidayApplicationMapper holidayApplicationMapper; |
| | | |
| | | @Override |
| | | public IPage listPage(Page page, HolidayApplication holidayApplication) { |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper; |
| | | import com.ruoyi.project.system.service.ISysDictDataService; |
| | | import com.ruoyi.staff.dto.PersonalAttendanceRecordsDto; |
| | | import com.ruoyi.staff.dto.StaffOnJobDto; |
| | | import com.ruoyi.staff.mapper.PersonalAttendanceLocationConfigMapper; |
| | | import com.ruoyi.staff.mapper.PersonalAttendanceRecordsMapper; |
| | | import com.ruoyi.staff.mapper.PersonalShiftMapper; |
| | | import com.ruoyi.staff.mapper.StaffOnJobMapper; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceLocationConfig; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceRecords; |
| | | import com.ruoyi.staff.mapper.PersonalAttendanceRecordsMapper; |
| | | import com.ruoyi.staff.pojo.PersonalShift; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import com.ruoyi.staff.service.PersonalAttendanceRecordsService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.staff.task.PersonalAttendanceRecordsTask; |
| | | import com.ruoyi.staff.utils.LocationUtils; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequiredArgsConstructor |
| | | public class PersonalAttendanceRecordsServiceImpl extends ServiceImpl<PersonalAttendanceRecordsMapper, PersonalAttendanceRecords> implements PersonalAttendanceRecordsService { |
| | | @Autowired |
| | | private PersonalAttendanceRecordsMapper personalAttendanceRecordsMapper; |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | @Autowired |
| | | private PersonalAttendanceLocationConfigMapper personalAttendanceLocationConfigMapper; |
| | | |
| | | @Autowired |
| | | private ISysDictDataService dictDataService; |
| | | |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | |
| | | @Autowired |
| | | private PersonalShiftMapper personalShiftMapper; |
| | | private final PersonalAttendanceRecordsMapper personalAttendanceRecordsMapper; |
| | | private final StaffOnJobMapper staffOnJobMapper; |
| | | private final PersonalAttendanceLocationConfigMapper personalAttendanceLocationConfigMapper; |
| | | private final SysDeptMapper sysDeptMapper; |
| | | private final PersonalShiftMapper personalShiftMapper; |
| | | |
| | | @Override |
| | | public int add(PersonalAttendanceRecordsDto personalAttendanceRecordsDto) { |
| | |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.project.system.domain.SysDictData; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.staff.dto.PerformanceShiftAddDto; |
| | | import com.ruoyi.staff.dto.PerformanceShiftMapDto; |
| | | import com.ruoyi.staff.mapper.PersonalAttendanceLocationConfigMapper; |
| | | import com.ruoyi.staff.mapper.PersonalShiftMapper; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceLocationConfig; |
| | | import com.ruoyi.staff.pojo.PersonalShift; |
| | | import com.ruoyi.staff.mapper.PersonalShiftMapper; |
| | | import com.ruoyi.staff.service.PersonalAttendanceLocationConfigService; |
| | | import com.ruoyi.staff.service.PersonalShiftService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.staff.utils.JackSonUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.YearMonth; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.time.temporal.TemporalAdjusters; |
| | |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequiredArgsConstructor |
| | | public class PersonalShiftServiceImpl extends ServiceImpl<PersonalShiftMapper, PersonalShift> implements PersonalShiftService { |
| | | |
| | | @Autowired |
| | | private PersonalAttendanceLocationConfigMapper personalAttendanceLocationConfigMapper; |
| | | private final PersonalAttendanceLocationConfigMapper personalAttendanceLocationConfigMapper; |
| | | |
| | | @Override |
| | | public int performanceShiftAdd(PerformanceShiftAddDto performanceShiftAddDto) { |
| | |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.staff.controller.TaxCalculator; |
| | | import com.ruoyi.staff.mapper.SchemeApplicableStaffMapper; |
| | |
| | | import com.ruoyi.staff.pojo.SchemeInsuranceDetail; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import com.ruoyi.staff.service.SchemeApplicableStaffService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | * @since 2026-03-05 11:50:17 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SchemeApplicableStaffServiceImpl extends ServiceImpl<SchemeApplicableStaffMapper, SchemeApplicableStaff> implements SchemeApplicableStaffService { |
| | | |
| | | @Autowired |
| | | private SchemeApplicableStaffMapper schemeApplicableStaffMapper; |
| | | |
| | | @Autowired |
| | | private SchemeInsuranceDetailMapper schemeInsuranceDetailMapper; |
| | | |
| | | @Autowired |
| | | private SysUserDeptMapper sysUserDeptMapper; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductionAccountingService salesLedgerProductionAccountingService; |
| | | private final SchemeApplicableStaffMapper schemeApplicableStaffMapper; |
| | | private final SchemeInsuranceDetailMapper schemeInsuranceDetailMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final SysDeptMapper sysDeptMapper; |
| | | private final StaffOnJobMapper staffOnJobMapper; |
| | | private final SalesLedgerProductionAccountingService salesLedgerProductionAccountingService; |
| | | |
| | | |
| | | @Override |
| | |
| | | import com.ruoyi.staff.mapper.StaffLeaveMapper; |
| | | import com.ruoyi.staff.mapper.StaffOnJobMapper; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceRecords; |
| | | import com.ruoyi.staff.pojo.StaffLeave; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import com.ruoyi.staff.service.StaffLeaveService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ruoyi.staff.pojo.StaffLeave; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.ruoyi.common.enums.StaffLeaveReason.StaffLeaveReasonOther; |
| | | |
| | | @AllArgsConstructor |
| | | @RequiredArgsConstructor |
| | | @Service |
| | | public class StaffLeaveServiceImpl extends ServiceImpl<StaffLeaveMapper, StaffLeave> implements StaffLeaveService { |
| | | @Autowired |
| | | private StaffLeaveMapper staffLeaveMapper; |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | private final StaffLeaveMapper staffLeaveMapper; |
| | | private final StaffOnJobMapper staffOnJobMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final PersonalAttendanceRecordsMapper personalAttendanceRecordsMapper; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private PersonalAttendanceRecordsMapper personalAttendanceRecordsMapper; |
| | | |
| | | //新增离职列表分页查询 |
| | | @Override |
| | | public IPage<StaffLeaveDto> staffLeaveListPage(Page page, StaffLeaveDto staffLeaveDto) { |
| | | return staffLeaveMapper.staffLeaveListPage(page,staffLeaveDto); |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.dto.WordDateDto; |
| | |
| | | import com.ruoyi.staff.service.IStaffOnJobService; |
| | | import freemarker.template.Configuration; |
| | | import freemarker.template.Template; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.collections4.ListUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.io.File; |
| | | import java.io.FileOutputStream; |
| | | import java.io.OutputStreamWriter; |
| | | import java.io.StringWriter; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.time.Instant; |
| | | import java.time.LocalDate; |
| | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @AllArgsConstructor |
| | | @RequiredArgsConstructor |
| | | @Service |
| | | public class StaffOnJobServiceImpl extends ServiceImpl<StaffOnJobMapper, StaffOnJob> implements IStaffOnJobService { |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | |
| | | @Autowired |
| | | private SysRoleMapper sysRoleMapper; |
| | | |
| | | @Autowired |
| | | private SysPostMapper sysPostMapper; |
| | | |
| | | @Autowired |
| | | private StaffContractMapper staffContractMapper; |
| | | @Autowired |
| | | private StaffLeaveMapper staffLeaveMapper; |
| | | |
| | | @Autowired |
| | | private PersonalAttendanceRecordsMapper personalAttendanceRecordsMapper; |
| | | |
| | | @Autowired |
| | | private SysUserServiceImpl sysUserService; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private StaffEducationServiceImpl staffEducationService; |
| | | |
| | | @Autowired |
| | | private StaffEducationMapper staffEducationMapper; |
| | | |
| | | @Autowired |
| | | private StaffWorkExperienceMapper staffWorkExperienceMapper; |
| | | |
| | | @Autowired |
| | | private StaffWorkExperienceServiceImpl staffWorkExperienceServiceImpl; |
| | | |
| | | @Autowired |
| | | private StaffEmergencyContactMapper staffEmergencyContactMapper; |
| | | |
| | | @Autowired |
| | | private StaffEmergencyContactServiceImpl staffEmergencyContactServiceImpl; |
| | | private final StaffOnJobMapper staffOnJobMapper; |
| | | private final SysDeptMapper sysDeptMapper; |
| | | private final SysRoleMapper sysRoleMapper; |
| | | private final SysPostMapper sysPostMapper; |
| | | private final StaffContractMapper staffContractMapper; |
| | | private final StaffLeaveMapper staffLeaveMapper; |
| | | private final PersonalAttendanceRecordsMapper personalAttendanceRecordsMapper; |
| | | private final SysUserServiceImpl sysUserService; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final StaffEducationServiceImpl staffEducationService; |
| | | private final StaffEducationMapper staffEducationMapper; |
| | | private final StaffWorkExperienceMapper staffWorkExperienceMapper; |
| | | private final StaffWorkExperienceServiceImpl staffWorkExperienceServiceImpl; |
| | | private final StaffEmergencyContactMapper staffEmergencyContactMapper; |
| | | private final StaffEmergencyContactServiceImpl staffEmergencyContactServiceImpl; |
| | | |
| | | |
| | | //在职员工台账分页查询 |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.mapper.AccountExpenseMapper; |
| | | import com.ruoyi.account.pojo.AccountExpense; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.domain.SysUserDept; |
| | | import com.ruoyi.project.system.mapper.SysUserDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.staff.dto.CalculateSalaryDto; |
| | | import com.ruoyi.staff.mapper.StaffLeaveMapper; |
| | | import com.ruoyi.staff.mapper.StaffOnJobMapper; |
| | | import com.ruoyi.staff.mapper.StaffSalaryDetailMapper; |
| | | import com.ruoyi.staff.pojo.*; |
| | | import com.ruoyi.staff.mapper.StaffSalaryMainMapper; |
| | | import com.ruoyi.staff.pojo.StaffLeave; |
| | | import com.ruoyi.staff.pojo.StaffSalaryDetail; |
| | | import com.ruoyi.staff.pojo.StaffSalaryMain; |
| | | import com.ruoyi.staff.service.StaffSalaryDetailService; |
| | | import com.ruoyi.staff.service.StaffSalaryMainService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2026-03-06 01:22:05 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class StaffSalaryMainServiceImpl extends ServiceImpl<StaffSalaryMainMapper, StaffSalaryMain> implements StaffSalaryMainService { |
| | | |
| | | @Autowired |
| | | private StaffSalaryMainMapper staffSalaryMainMapper; |
| | | |
| | | @Autowired |
| | | private StaffSalaryDetailService staffSalaryDetailService; |
| | | |
| | | @Autowired |
| | | private StaffSalaryDetailMapper staffSalaryDetailMapper; |
| | | |
| | | @Autowired |
| | | private SchemeApplicableStaffServiceImpl schemeApplicableStaffService; |
| | | |
| | | @Autowired |
| | | private SysUserDeptMapper sysUserDeptMapper; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | @Autowired |
| | | private StaffLeaveMapper staffLeaveMapper; |
| | | |
| | | @Autowired |
| | | private AccountExpenseMapper accountExpenseMapper; |
| | | private final StaffSalaryMainMapper staffSalaryMainMapper; |
| | | private final StaffSalaryDetailService staffSalaryDetailService; |
| | | private final StaffSalaryDetailMapper staffSalaryDetailMapper; |
| | | private final SchemeApplicableStaffServiceImpl schemeApplicableStaffService; |
| | | private final SysUserDeptMapper sysUserDeptMapper; |
| | | private final StaffLeaveMapper staffLeaveMapper; |
| | | private final AccountExpenseMapper accountExpenseMapper; |
| | | |
| | | @Override |
| | | public AjaxResult listPage(Page page, StaffSalaryMain staffSalaryMain) { |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.staff.dto.PerformanceShiftAddDto; |
| | | import com.ruoyi.staff.mapper.PersonalAttendanceLocationConfigMapper; |
| | | import com.ruoyi.staff.mapper.PersonalShiftMapper; |
| | | import com.ruoyi.staff.mapper.PersonalAttendanceRecordsMapper; |
| | | import com.ruoyi.staff.mapper.StaffOnJobMapper; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceLocationConfig; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceRecords; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import com.ruoyi.staff.service.PersonalAttendanceRecordsService; |
| | | import com.ruoyi.staff.mapper.PersonalAttendanceRecordsMapper; |
| | | import com.ruoyi.staff.service.PersonalShiftService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | |
| | | import java.time.temporal.WeekFields; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | public class PersonalAttendanceRecordsTask { |
| | | |
| | | @Autowired |
| | | private PersonalAttendanceRecordsMapper personalAttendanceRecordsMapper; |
| | | |
| | | @Autowired |
| | | private PersonalAttendanceRecordsService personalAttendanceRecordsService; |
| | | |
| | | @Autowired |
| | | private PersonalAttendanceLocationConfigMapper personalAttendanceLocationConfigMapper; |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | @Autowired |
| | | private PersonalShiftService personalShiftService; |
| | | private final PersonalAttendanceRecordsMapper personalAttendanceRecordsMapper; |
| | | private final PersonalAttendanceRecordsService personalAttendanceRecordsService; |
| | | private final PersonalAttendanceLocationConfigMapper personalAttendanceLocationConfigMapper; |
| | | private final StaffOnJobMapper staffOnJobMapper; |
| | | private final PersonalShiftService personalShiftService; |
| | | |
| | | /** |
| | | * 每天凌晨生成昨日的缺勤记录 |
| | |
| | | import com.ruoyi.stock.service.StockInRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Api(tags = "入库") |
| | | @RequestMapping("/stockInRecord") |
| | | @RequiredArgsConstructor |
| | | public class StockInRecordController { |
| | | @Autowired |
| | | |
| | | private StockInRecordService stockInRecordService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.stock.service.StockInventoryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | @RestController |
| | | @RequestMapping("/stockInventory") |
| | | @Api(tags = "库存表") |
| | | @AllArgsConstructor |
| | | public class StockInventoryController { |
| | | |
| | | @Autowired |
| | | private StockInventoryService stockInventoryService; |
| | | |
| | | @GetMapping("/pagestockInventory") |
| | |
| | | import com.ruoyi.stock.service.StockOutRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Api(tags = "出库") |
| | | @RestController |
| | | @RequestMapping("/stockOutRecord") |
| | | @AllArgsConstructor |
| | | public class StockOutRecordController { |
| | | @Autowired |
| | | private StockOutRecordService stockOutRecordService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.ruoyi.stock.dto.StockUninventoryDto; |
| | | import com.ruoyi.stock.service.StockUninventoryService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/stockUninventory") |
| | | @AllArgsConstructor |
| | | public class StockUninventoryController { |
| | | @Autowired |
| | | private StockUninventoryService stockUninventoryService; |
| | | |
| | | @GetMapping("/pagestockUninventory") |
| | |
| | | package com.ruoyi.warehouse.controller; |
| | | |
| | | import com.ruoyi.basic.dto.ProductDto; |
| | | import com.ruoyi.basic.dto.ProductTreeDto; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.dto.DocumentClassificationDto; |
| | | import com.ruoyi.warehouse.dto.DocumentClassificationTreeDto; |
| | | import com.ruoyi.warehouse.pojo.DocumentClassification; |
| | | import com.ruoyi.warehouse.service.DocumentClassificationService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RestController |
| | | @Api(tags = "文档分类") |
| | | @RequestMapping("/warehouse/documentClassification") |
| | | @AllArgsConstructor |
| | | public class DocumentClassificationController extends BaseController { |
| | | @Autowired |
| | | private DocumentClassificationService documentClassificationService; |
| | | |
| | | //树结构 |
| | | @GetMapping("/getList") |
| | | public AjaxResult getList() { |
| | | public AjaxResult getList() { |
| | | return AjaxResult.success(documentClassificationService.selectDocumentClassificationList()); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("文档分类-添加") |
| | | @Log(title = "文档分类-添加", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody DocumentClassification documentClassification) { |
| | | return AjaxResult.success(documentClassificationService.save(documentClassification)); |
| | | } |
| | | |
| | | @PutMapping("/update") |
| | | @ApiOperation("文档分类-更新") |
| | | @Log(title = "文档分类-更新", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody DocumentClassification documentClassification) { |
| | | return AjaxResult.success(documentClassificationService.updateById(documentClassification)); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @ApiOperation("文档分类删除") |
| | | @Log(title = "文档分类删除", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | | return AjaxResult.success(documentClassificationService.deleteByIds(ids)); |
| | | } |
| | | |
| | |
| | | package com.ruoyi.warehouse.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | |
| | | import com.ruoyi.warehouse.mapper.DocumentationBorrowManagementMapper; |
| | | import com.ruoyi.warehouse.mapper.DocumentationReturnManagementMapper; |
| | | import com.ruoyi.warehouse.pojo.DocumentationBorrowManagement; |
| | | import com.ruoyi.warehouse.pojo.DocumentationReturnManagement; |
| | | import com.ruoyi.warehouse.pojo.Warehouse; |
| | | import com.ruoyi.warehouse.service.DocumentationBorrowManagementService; |
| | | import com.ruoyi.warehouse.service.WarehouseService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Api(tags = "文档借阅管理") |
| | | @RequestMapping("/documentationBorrowManagement") |
| | | @AllArgsConstructor |
| | | public class DocumentationBorrowManagementController extends BaseController { |
| | | @Autowired |
| | | |
| | | private DocumentationBorrowManagementService documentationBorrowManagementService; |
| | | @Autowired |
| | | private DocumentationBorrowManagementMapper documentationBorrowManagementMapper; |
| | | @Autowired |
| | | private DocumentationReturnManagementMapper documentationReturnManagementMapper; |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("文档借阅管理-借阅分页查询") |
| | | @Log(title = "文档借阅管理-借阅分页查询", businessType = BusinessType.OTHER) |
| | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.dto.DocumentationDto; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.ruoyi.warehouse.pojo.Warehouse; |
| | | import com.ruoyi.warehouse.service.DocumentationService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | @RestController |
| | | @RequestMapping("/documentation") |
| | | @Api(tags = "文档信息表") |
| | | @AllArgsConstructor |
| | | public class DocumentationController extends BaseController { |
| | | @Autowired |
| | | private DocumentationService documentationService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("文档信息表-分页查询") |
| | | @Log(title = "文档信息表-分页查询", businessType = BusinessType.OTHER) |
| | |
| | | IPage<DocumentationDto> list = documentationService.listPage(page, documentation); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation("文档信息表查询") |
| | | @Log(title = "文档信息表查询", businessType = BusinessType.OTHER) |
| | |
| | | List<DocumentationDto> list = documentationService.listAll(); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("文档信息表-添加") |
| | | @Log(title = "文档信息表-添加", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody Documentation documentation) { |
| | | return AjaxResult.success(documentationService.save(documentation)); |
| | | } |
| | | |
| | | @PutMapping("/update") |
| | | @ApiOperation("文档信息表-更新") |
| | | @Log(title = "文档信息表-更新", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody Documentation documentation) { |
| | | return AjaxResult.success(documentationService.updateById(documentation)); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @ApiOperation("文档信息表-删除") |
| | | @Log(title = "文档信息表-删除", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | | return AjaxResult.success(documentationService.deleteByIds(ids)); |
| | | } |
| | | |
| | | @PostMapping("/export") |
| | | @ApiOperation("文档信息表-导出") |
| | | @Log(title = "文档信息表-导出", businessType = BusinessType.EXPORT) |
| | | public void export(HttpServletResponse response,Documentation documentation ) { |
| | | documentationService.export(response,documentation); |
| | | public void export(HttpServletResponse response, Documentation documentation) { |
| | | documentationService.export(response, documentation); |
| | | } |
| | | |
| | | @ApiOperation("文档信息表-统计") |
| | | @GetMapping("/overview") |
| | | public AjaxResult getOverviewStatistics() { |
| | |
| | | result.put("monthlyAddedDocsCount", documentationService.getMonthlyAddedDocsCount()); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @ApiOperation("文档信息表-分类统计") |
| | | @GetMapping("/category") |
| | | public AjaxResult getCategoryDistribution() { |
| | | return AjaxResult.success(documentationService.getCategoryDistribution()); |
| | | } |
| | | |
| | | @ApiOperation("文档信息表-状态统计") |
| | | @GetMapping("/status") |
| | | public AjaxResult getStatusDistribution() { |
| | |
| | | package com.ruoyi.warehouse.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.ruoyi.warehouse.pojo.Warehouse; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelves; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesService; |
| | | import com.ruoyi.warehouse.service.WarehouseService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RestController |
| | | @Api(tags = "仓库") |
| | | @RequestMapping("/warehouse") |
| | | @AllArgsConstructor |
| | | public class WarehouseController extends BaseController { |
| | | @Autowired |
| | | private WarehouseService warehouseService; |
| | | |
| | | @GetMapping("/tree") |
| | | @ApiOperation("仓库-查询树") |
| | | @Log(title = "仓库-查询树", businessType = BusinessType.OTHER) |
| | | public AjaxResult listTree() { |
| | | return AjaxResult.success(warehouseService.findListTree()); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation("仓库-查询") |
| | | @Log(title = "仓库-查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult list(Warehouse warehouse) { |
| | | return AjaxResult.success(warehouseService.findList(warehouse)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("仓库-添加") |
| | | @Log(title = "仓库-添加", businessType = BusinessType.INSERT) |
| | |
| | | @ApiOperation("仓库-删除") |
| | | @Log(title = "仓库-删除", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | | return AjaxResult.success(warehouseService.deleteByIds(ids)); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.warehouse.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | @RestController |
| | | @Api(tags = "商品货架") |
| | | @RequestMapping("/warehouse/goodsShelves") |
| | | @AllArgsConstructor |
| | | public class WarehouseGoodsShelvesController extends BaseController { |
| | | @Autowired |
| | | private WarehouseGoodsShelvesService warehouseGoodsShelvesService; |
| | | |
| | | @GetMapping("/listById") |
| | |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesRowcolDto; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesRowcolService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Api(tags = "商品货架行列") |
| | | @RequestMapping("/warehouse/goodsShelvesRowcol") |
| | | @AllArgsConstructor |
| | | public class WarehouseGoodsShelvesRowcolController extends BaseController { |
| | | @Autowired |
| | | private WarehouseGoodsShelvesRowcolService warehouseGoodsShelvesRowcolService; |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation("商品货架行列-查询") |
| | | @Log(title = "商品货架行列-查询", businessType = BusinessType.OTHER) |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.ProductTreeDto; |
| | | import com.ruoyi.basic.pojo.Product; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.warehouse.dto.DocumentClassificationDto; |
| | | import com.ruoyi.warehouse.dto.DocumentClassificationTreeDto; |
| | | import com.ruoyi.warehouse.dto.DocumentationDto; |
| | | import com.ruoyi.warehouse.mapper.DocumentClassificationMapper; |
| | | import com.ruoyi.warehouse.mapper.DocumentationMapper; |
| | | import com.ruoyi.warehouse.pojo.DocumentClassification; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.ruoyi.warehouse.service.DocumentClassificationService; |
| | | import com.ruoyi.warehouse.mapper.DocumentClassificationMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author 86151 |
| | |
| | | * @createDate 2025-08-15 10:44:23 |
| | | */ |
| | | @Service |
| | | public class DocumentClassificationServiceImpl extends ServiceImpl<DocumentClassificationMapper, DocumentClassification> |
| | | implements DocumentClassificationService{ |
| | | @Autowired |
| | | private DocumentationMapper documentationMapper; |
| | | @Autowired |
| | | private DocumentClassificationMapper documentClassificationMapper; |
| | | @RequiredArgsConstructor |
| | | public class DocumentClassificationServiceImpl extends ServiceImpl<DocumentClassificationMapper, DocumentClassification> implements DocumentClassificationService{ |
| | | |
| | | private final DocumentationMapper documentationMapper; |
| | | private final DocumentClassificationMapper documentClassificationMapper; |
| | | |
| | | @Override |
| | | public boolean deleteByIds(List<Long> ids) { |
| | | List<DocumentClassification> list = documentClassificationMapper.selectList(new LambdaQueryWrapper<DocumentClassification>().in(DocumentClassification::getId, ids)); |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.warehouse.dto.DocumentationBorrowManagementDto; |
| | | import com.ruoyi.warehouse.dto.ReturnExportDto; |
| | | import com.ruoyi.warehouse.mapper.DocumentationBorrowManagementMapper; |
| | | import com.ruoyi.warehouse.mapper.DocumentationReturnManagementMapper; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.ruoyi.warehouse.pojo.DocumentationBorrowManagement; |
| | | import com.ruoyi.warehouse.pojo.DocumentationReturnManagement; |
| | | import com.ruoyi.warehouse.service.DocumentationBorrowManagementService; |
| | | import com.ruoyi.warehouse.mapper.DocumentationBorrowManagementMapper; |
| | | import com.ruoyi.warehouse.service.DocumentationService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author 86151 |
| | | * @description 针对表【documentation_borrow_management(文档借阅-归还表)】的数据库操作Service实现 |
| | | * @createDate 2025-08-14 15:55:45 |
| | | */ |
| | | * @author 86151 |
| | | * @description 针对表【documentation_borrow_management(文档借阅-归还表)】的数据库操作Service实现 |
| | | * @createDate 2025-08-14 15:55:45 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequiredArgsConstructor |
| | | public class DocumentationBorrowManagementServiceImpl extends ServiceImpl<DocumentationBorrowManagementMapper, DocumentationBorrowManagement> |
| | | implements DocumentationBorrowManagementService{ |
| | | @Autowired |
| | | private DocumentationBorrowManagementMapper documentationBorrowManagementMapper; |
| | | @Autowired |
| | | private DocumentationReturnManagementMapper documentationReturnManagementMapper; |
| | | @Autowired |
| | | private DocumentationService documentationService; |
| | | @Override |
| | | implements DocumentationBorrowManagementService { |
| | | |
| | | private final DocumentationBorrowManagementMapper documentationBorrowManagementMapper; |
| | | private final DocumentationReturnManagementMapper documentationReturnManagementMapper; |
| | | private final DocumentationService documentationService; |
| | | |
| | | public IPage<DocumentationBorrowManagement> listPage(Page page, DocumentationBorrowManagement documentationBorrowManagement) { |
| | | IPage<DocumentationBorrowManagement> listPage = documentationBorrowManagementMapper.listPage(page, documentationBorrowManagement); |
| | | return listPage; |
| | |
| | | documentationService.updateById(documentation); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public boolean reventdbm(DocumentationReturnManagement documentationReturnManagement) { |
| | | // 更新借阅记录状态为归还 |
| | |
| | | List<DocumentationBorrowManagementDto> list = documentationBorrowManagementMapper.list(new LambdaQueryWrapper<DocumentationBorrowManagementDto>() |
| | | .eq(DocumentationBorrowManagementDto::getDocumentationId, id) |
| | | .eq(DocumentationBorrowManagementDto::getBorrowStatus, "借阅")); |
| | | if (list.isEmpty()){ |
| | | if (list.isEmpty()) { |
| | | throw new RuntimeException("文档未被借阅"); |
| | | } |
| | | return list; |
| | |
| | | Documentation documentation = documentationService.getById(documentationBorrowManagement.getDocumentationId()); |
| | | documentation.setDocStatus("正常"); |
| | | boolean b = documentationService.updateById(documentation); |
| | | if (!b){ |
| | | if (!b) { |
| | | throw new RuntimeException("更新文档状态失败"); |
| | | } |
| | | } |
| | | documentationBorrowManagementMapper.deleteBatchIds(ids); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.warehouse.dto.DocumentationDto; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.ruoyi.warehouse.pojo.DocumentationBorrowManagement; |
| | | import com.ruoyi.warehouse.service.DocumentationService; |
| | | import com.ruoyi.warehouse.mapper.DocumentationMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.ruoyi.warehouse.service.DocumentationService; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author 86151 |
| | | * @description 针对表【documentation(文档信息表)】的数据库操作Service实现 |
| | | * @createDate 2025-08-14 14:05:49 |
| | | */ |
| | | * @author 86151 |
| | | * @description 针对表【documentation(文档信息表)】的数据库操作Service实现 |
| | | * @createDate 2025-08-14 14:05:49 |
| | | */ |
| | | @Service |
| | | public class DocumentationServiceImpl extends ServiceImpl<DocumentationMapper, Documentation> |
| | | implements DocumentationService{ |
| | | @Autowired |
| | | private DocumentationMapper documentationMapper; |
| | | @RequiredArgsConstructor |
| | | public class DocumentationServiceImpl extends ServiceImpl<DocumentationMapper, Documentation> implements DocumentationService { |
| | | private final DocumentationMapper documentationMapper; |
| | | |
| | | @Override |
| | | public IPage<DocumentationDto> listPage(Page page, Documentation documentation) { |
| | | return documentationMapper.listPage(page, documentation); |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response,Documentation documentation) { |
| | | public void export(HttpServletResponse response, Documentation documentation) { |
| | | IPage<DocumentationDto> list = documentationMapper.listPage(null, documentation); |
| | | ExcelUtil<DocumentationDto> util = new ExcelUtil<>(DocumentationDto.class); |
| | | util.exportExcel(response, list.getRecords(), "文档信息表"); |
| | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 列表所有文档 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | List<DocumentationDto> list = documentationMapper.list().stream().filter(documentationDto -> "正常".equals(documentationDto.getDocStatus())).collect(Collectors.toList()); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 获取文档总数 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer getTotalDocsCount() { |
| | | return documentationMapper.countTotalDocs(); |
| | | } |
| | | |
| | | /** |
| | | * 获取文档分类总数 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer getCategoryNumCount() { |
| | | return documentationMapper.countCategoryNum(); |
| | | } |
| | | |
| | | /** |
| | | * 获取已借出文档总数 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer getBorrowedDocsCount() { |
| | | return documentationMapper.countBorrowedDocs(); |
| | | } |
| | | |
| | | /** |
| | | * 获取每月新增文档总数 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer getMonthlyAddedDocsCount() { |
| | | return documentationMapper.countMonthlyAddedDocs(); |
| | | } |
| | | |
| | | /** |
| | | * 获取文档分类分布 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getCategoryDistribution() { |
| | | return documentationMapper.countCategoryDistribution(); |
| | | } |
| | | |
| | | /** |
| | | * 获取文档状态分布 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesRowcolDto; |
| | | import com.ruoyi.warehouse.mapper.DocumentationMapper; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesRowcolMapper; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesRowcolDto; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesRowcolService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * @author 86151 |
| | | * @description 针对表【warehouse_goods_shelves_rowcol(仓库货架层,列表)】的数据库操作Service实现 |
| | | * @createDate 2025-08-13 11:49:02 |
| | | */ |
| | | * @author 86151 |
| | | * @description 针对表【warehouse_goods_shelves_rowcol(仓库货架层,列表)】的数据库操作Service实现 |
| | | * @createDate 2025-08-13 11:49:02 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class WarehouseGoodsShelvesRowcolServiceImpl extends ServiceImpl<WarehouseGoodsShelvesRowcolMapper, WarehouseGoodsShelvesRowcol> |
| | | implements WarehouseGoodsShelvesRowcolService { |
| | | @Autowired |
| | | private WarehouseGoodsShelvesRowcolMapper warehouseGoodsShelvesRowcolMapper; |
| | | @Autowired |
| | | private DocumentationMapper documentationMapper; |
| | | @RequiredArgsConstructor |
| | | public class WarehouseGoodsShelvesRowcolServiceImpl extends ServiceImpl<WarehouseGoodsShelvesRowcolMapper, WarehouseGoodsShelvesRowcol> implements WarehouseGoodsShelvesRowcolService { |
| | | private final WarehouseGoodsShelvesRowcolMapper warehouseGoodsShelvesRowcolMapper; |
| | | private final DocumentationMapper documentationMapper; |
| | | |
| | | @Override |
| | | public List<WarehouseGoodsShelvesRowcolDto> getList(WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { |
| | |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public boolean deleteByIds(List<Long> ids) { |
| | | // 3. 检查是否有商品 |
| | |
| | | warehouseGoodsShelvesRowcolMapper.deleteBatchIds(ids); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.warehouse.service.impl; |
| | | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto; |
| | | import com.ruoyi.warehouse.mapper.DocumentationMapper; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesMapper; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesRowcolMapper; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelves; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import com.ruoyi.warehouse.service.DocumentationService; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesRowcolService; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelves; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | @Service |
| | | @Slf4j |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class WarehouseGoodsShelvesServiceImpl extends ServiceImpl<WarehouseGoodsShelvesMapper, WarehouseGoodsShelves> |
| | | implements WarehouseGoodsShelvesService { |
| | | @Autowired |
| | | private WarehouseGoodsShelvesRowcolService warehouseGoodsShelvesRowcolService; |
| | | @Autowired |
| | | private WarehouseGoodsShelvesRowcolMapper warehouseGoodsShelvesRowcolMapper; |
| | | @Autowired |
| | | private WarehouseGoodsShelvesMapper warehouseGoodsShelvesMapper; |
| | | @Autowired |
| | | private DocumentationService documentationService; |
| | | @Autowired |
| | | private DocumentationMapper documentationMapper; |
| | | @RequiredArgsConstructor |
| | | public class WarehouseGoodsShelvesServiceImpl extends ServiceImpl<WarehouseGoodsShelvesMapper, WarehouseGoodsShelves> implements WarehouseGoodsShelvesService { |
| | | |
| | | private final WarehouseGoodsShelvesRowcolService warehouseGoodsShelvesRowcolService; |
| | | private final WarehouseGoodsShelvesMapper warehouseGoodsShelvesMapper; |
| | | private final DocumentationMapper documentationMapper; |
| | | |
| | | @Override |
| | | public boolean add(WarehouseGoodsShelves warehouseGoodsShelves) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.dto.WarehouseDto; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto; |
| | | import com.ruoyi.warehouse.dto.WarehouseTreeDto; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesMapper; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesRowcolMapper; |
| | |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesService; |
| | | import com.ruoyi.warehouse.service.WarehouseService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.sql.Array; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper, Warehouse> |
| | | implements WarehouseService { |
| | | @Autowired |
| | | private WarehouseMapper warehouseMapper; |
| | | @Autowired |
| | | private WarehouseGoodsShelvesService warehouseGoodsShelvesService; |
| | | @Autowired |
| | | private WarehouseGoodsShelvesMapper warehouseGoodsShelvesMapper; |
| | | @Autowired |
| | | private WarehouseGoodsShelvesRowcolMapper warehouseGoodsShelvesRowcolMapper; |
| | | @RequiredArgsConstructor |
| | | public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper, Warehouse> implements WarehouseService { |
| | | private final WarehouseMapper warehouseMapper; |
| | | private final WarehouseGoodsShelvesService warehouseGoodsShelvesService; |
| | | private final WarehouseGoodsShelvesMapper warehouseGoodsShelvesMapper; |
| | | private final WarehouseGoodsShelvesRowcolMapper warehouseGoodsShelvesRowcolMapper; |
| | | |
| | | @Override |
| | | public boolean deleteByIds(List<Long> ids) { |
| | |
| | | import com.ruoyi.waterrecord.service.WaterRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | @RestController |
| | | @Api(tags = "用水管理") |
| | | @RequestMapping("/waterRecord") |
| | | @AllArgsConstructor |
| | | public class WaterRecordController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WaterRecordService waterRecordService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.equipmentenergyconsumption.pojo.EquipmentEnergyConsumption; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.waterrecord.mapper.WaterRecordMapper; |
| | | import com.ruoyi.waterrecord.pojo.WaterRecord; |
| | | import com.ruoyi.waterrecord.service.WaterRecordService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class WaterRecordServiceImpl extends ServiceImpl<WaterRecordMapper, WaterRecord> implements WaterRecordService { |
| | | |
| | | @Autowired |
| | | private WaterRecordMapper waterRecordMapper; |
| | | private final WaterRecordMapper waterRecordMapper; |
| | | |
| | | |
| | | @Override |