| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | 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.procurementrecord.service.ProcurementRecordService; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增检验单") |
| | | @Log(title = "新增检验单", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody QualityInspectDto qualityInspectDto) { |
| | | return AjaxResult.success(qualityInspectService.add(qualityInspectDto)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("删除检验单") |
| | | @Log(title = "删除检验单", businessType = BusinessType.DELETE) |
| | | public AjaxResult delQualityInspect(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation("检验单详情") |
| | | @Log(title = "检验单详情", businessType = BusinessType.OTHER) |
| | | public AjaxResult QualityInspectDetail(@PathVariable("id") Integer id) { |
| | | return AjaxResult.success(qualityInspectService.getDetailById(id)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperation("修改检验单") |
| | | @Log(title = "修改检验单", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody QualityInspectDto qualityInspectDto) { |
| | | return AjaxResult.success(qualityInspectService.updateQualityInspect(qualityInspectDto)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("检验单分页查询") |
| | | @Log(title = "检验单分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult qualityInspectListPage(Page page, QualityInspect qualityInspect) { |
| | | return AjaxResult.success(qualityInspectService.qualityInspectListPage(page, qualityInspect)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("导出检验单") |
| | | @Log(title = "导出检验单", businessType = BusinessType.EXPORT) |
| | | public void qualityInspectExport(HttpServletResponse response,QualityInspect qualityInspect) { |
| | | qualityInspectService.qualityInspectExport(response, qualityInspect); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperation("提交检验单") |
| | | @Log(title = "提交检验单", businessType = BusinessType.UPDATE) |
| | | public AjaxResult submit(@RequestBody QualityInspect qualityInspect) { |
| | | return AjaxResult.success(qualityInspectService.submit(qualityInspect)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/down") |
| | | @ApiOperation("下载检验单") |
| | | @Log(title = "下载检验单", businessType = BusinessType.OTHER) |
| | | public void down(HttpServletResponse response,@RequestBody QualityInspect qualityInspect) { |
| | | qualityInspectService.down(response, qualityInspect); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityInspectFile; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增检验附件") |
| | | @Log(title = "新增检验附件", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody QualityInspectFile qualityInspectFile) { |
| | | return AjaxResult.success(qualityInspectFileService.save(qualityInspectFile)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("删除检验附件") |
| | | @DeleteMapping("/del") |
| | | @Log(title = "删除检验附件", businessType = BusinessType.DELETE) |
| | | public AjaxResult delQualityUnqualified(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | |
| | | */ |
| | | @ApiOperation("分页查询检验附件") |
| | | @GetMapping("/listPage") |
| | | @Log(title = "分页查询检验附件", businessType = BusinessType.OTHER) |
| | | public AjaxResult qualityInspectFileListPage(Page page, QualityInspectFile qualityInspectFile) { |
| | | return AjaxResult.success(qualityInspectFileService.qualityInspectFileListPage(page, qualityInspectFile)); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityInspectFile; |
| | |
| | | */ |
| | | @ApiOperation("查询检验参数项详情") |
| | | @GetMapping("/{inspectId}") |
| | | @Log(title = "查询检验参数项详情", businessType = BusinessType.OTHER) |
| | | public AjaxResult QualityInspectParamDetail(@PathVariable("inspectId") Integer inspectId) { |
| | | return AjaxResult.success(qualityInspectParamService.qualityInspectParamDetail(inspectId)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperation("修改") |
| | | @Log(title = "修改检验参数项", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody List<QualityInspectParam> qualityInspectParams) { |
| | | return AjaxResult.success(qualityInspectParamService.updateBatchById(qualityInspectParams)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("删除") |
| | | @Log(title = "删除检验参数项", businessType = BusinessType.DELETE) |
| | | public AjaxResult delQualityUnqualified(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | |
| | | package com.ruoyi.quality.controller; |
| | | |
| | | 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.quality.service.QualityReportService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | */ |
| | | @ApiOperation("获取检验统计数据") |
| | | @GetMapping("/getInspectStatistics") |
| | | @Log(title = "获取检验统计数据", businessType = BusinessType.OTHER) |
| | | public AjaxResult getInspectStatistics() { |
| | | return AjaxResult.success(qualityReportService.getInspectStatistics()); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("获取合格率统计数据") |
| | | @GetMapping("/getPassRateStatistics") |
| | | @Log(title = "获取合格率统计数据", businessType = BusinessType.OTHER) |
| | | public AjaxResult getPassRateStatistics() { |
| | | return AjaxResult.success(qualityReportService.getPassRateStatistics()); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("获取月度合格率统计数据") |
| | | @GetMapping("/getMonthlyPassRateStatistics") |
| | | @Log(title = "获取月度合格率统计数据", businessType = BusinessType.OTHER) |
| | | public AjaxResult getMonthlyPassRateStatistics(@RequestParam("year") String year) { |
| | | return AjaxResult.success(qualityReportService.getMonthlyPassRateStatistics(year)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("获取年度总合格率统计数据") |
| | | @GetMapping("/getYearlyPassRateStatistics") |
| | | @Log(title = "获取年度总合格率统计数据", businessType = BusinessType.OTHER) |
| | | public AjaxResult getYearlyPassRateStatistics(@RequestParam("year") String year) { |
| | | return AjaxResult.success(qualityReportService.getYearlyPassRateStatistics(year)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("获取月度完成明细数据") |
| | | @GetMapping("/getMonthlyCompletionDetails") |
| | | @Log(title = "获取月度完成明细数据", businessType = BusinessType.OTHER) |
| | | public AjaxResult getMonthlyCompletionDetails(@RequestParam("year") String year) { |
| | | return AjaxResult.success(qualityReportService.getMonthlyCompletionDetails(year)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("获取热点检测指标统计") |
| | | @GetMapping("/getTopParameters") |
| | | @Log(title = "获取热点检测指标统计", businessType = BusinessType.OTHER) |
| | | public AjaxResult getTopParameters(@RequestParam("modelType") Integer modelType) { |
| | | return AjaxResult.success(qualityReportService.getTopParameters(modelType)); |
| | | } |
| | |
| | | package com.ruoyi.quality.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | 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.quality.pojo.QualityTestStandardBinding; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增检测标准主表与产品关联表") |
| | | @Log(title = "新增检测标准主表与产品关联表", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody List<QualityTestStandardBinding> qualityTestStandardBindings) { |
| | | return AjaxResult.success(qualityTestStandardBindingService.add(qualityTestStandardBindings)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("删除检测标准主表与产品关联表") |
| | | @Log(title = "删除检测标准主表与产品关联表", businessType = BusinessType.DELETE) |
| | | public AjaxResult delQualityTestStandard(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation("检测指标维护查询") |
| | | @Log(title = "检测指标维护查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listBinding(Long testStandardId) { |
| | | return AjaxResult.success(qualityTestStandardBindingService.listBinding(testStandardId)); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增检测标准主表") |
| | | @Log(title = "新增检测标准主表", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody QualityTestStandard qualityTestStandard) { |
| | | return AjaxResult.success(qualityTestStandardService.save(qualityTestStandard)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("删除检测标准主表") |
| | | @Log(title = "删除检测标准主表", businessType = BusinessType.DELETE) |
| | | public AjaxResult delQualityTestStandard(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperation("检测标准主表修改") |
| | | @Log(title = "检测标准主表修改", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody QualityTestStandard qualityTestStandard) { |
| | | return AjaxResult.success(qualityTestStandardService.updateById(qualityTestStandard)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("检测标准主表分页查询") |
| | | @Log(title = "检测标准主表分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult qualityTestStandardListPage(Page page, QualityTestStandard qualityTestStandard) { |
| | | return AjaxResult.success(qualityTestStandardService.qualityTestStandardListPage(page, qualityTestStandard)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/copyParam") |
| | | @ApiOperation("检测标准复制参数") |
| | | @Log(title = "检测标准复制参数", businessType = BusinessType.OTHER) |
| | | public AjaxResult copyParam(@RequestBody QualityTestStandard qualityTestStandard) { |
| | | return AjaxResult.success(qualityTestStandardService.copyParam(qualityTestStandard)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/qualityTestStandardAudit") |
| | | @ApiOperation("检测标准批量审核") |
| | | @Log(title = "检测标准批量审核", businessType = BusinessType.OTHER) |
| | | public AjaxResult qualityTestStandardAudit(@RequestBody List<QualityTestStandard> qualityTestStandards) { |
| | | return AjaxResult.success(qualityTestStandardService.updateBatchById(qualityTestStandards)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/getQualityTestStandardByProductId") |
| | | @ApiOperation("根据产品id查询相关的检验标准") |
| | | @Log(title = "根据产品id查询相关的检验标准", businessType = BusinessType.OTHER) |
| | | public AjaxResult getQualityTestStandardByProductId(@Nonnull Long productId, @Nonnull Integer inspectType, String process) { |
| | | return AjaxResult.success(qualityTestStandardService.getQualityTestStandardByProductId(productId,inspectType,process)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/getQualityTestStandardParamByTestStandardId") |
| | | @ApiOperation("根据检测标准id查询相关的检验标准参数") |
| | | @Log(title = "根据检测标准id查询相关的检验标准参数", businessType = BusinessType.OTHER) |
| | | public AjaxResult getQualityTestStandardParamByTestStandardId(Long testStandardId) { |
| | | return AjaxResult.success(qualityTestStandardParamService.list(Wrappers.<QualityTestStandardParam>lambdaQuery().eq(QualityTestStandardParam::getTestStandardId, testStandardId))); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增检测标准参数") |
| | | @Log(title = "新增检测标准参数", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody QualityTestStandardParam qualityTestStandardParam) { |
| | | return AjaxResult.success(qualityTestStandardParamService.save(qualityTestStandardParam)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("删除检测指标维护") |
| | | @DeleteMapping("/del") |
| | | @Log(title = "删除检测指标维护", businessType = BusinessType.DELETE) |
| | | public AjaxResult delQualityTestStandard(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperation("检测指标维护修改") |
| | | @Log(title = "检测指标维护修改", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody QualityTestStandardParam qualityTestStandardParam) { |
| | | return AjaxResult.success(qualityTestStandardParamService.updateById(qualityTestStandardParam)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation("检测指标维护查询") |
| | | @Log(title = "检测指标维护查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult list(Long testStandardId) { |
| | | return AjaxResult.success(qualityTestStandardParamService.list(Wrappers.<QualityTestStandardParam>lambdaQuery().eq(QualityTestStandardParam::getTestStandardId,testStandardId))); |
| | | } |
| | |
| | | package com.ruoyi.quality.controller; |
| | | |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityUnqualified; |
| | | import com.ruoyi.quality.service.IQualityUnqualifiedService; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增不合格管理") |
| | | @Log(title = "新增不合格管理", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody QualityUnqualified qualityUnqualified) { |
| | | qualityUnqualified.setInspectState(0); |
| | | return AjaxResult.success(qualityUnqualifiedService.save(qualityUnqualified)); |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("删除不合格管理") |
| | | @Log(title = "删除不合格管理", businessType = BusinessType.DELETE) |
| | | public AjaxResult delQualityUnqualified(@RequestBody List<Integer> ids) { |
| | | qualityUnqualifiedService.listByIds(ids).stream().forEach(qualityUnqualified -> { |
| | | if (qualityUnqualified.getInspectState()==1){ |
| | |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation("不合格管理详情") |
| | | @Log(title = "不合格管理详情", businessType = BusinessType.OTHER) |
| | | public AjaxResult QualityUnqualifiedDetail(@PathVariable("id") Integer id) { |
| | | return AjaxResult.success(qualityUnqualifiedService.getUnqualified(id)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperation("不合格管理修改") |
| | | @Log(title = "不合格管理修改", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody QualityUnqualified qualityUnqualified) { |
| | | return AjaxResult.success(qualityUnqualifiedService.updateById(qualityUnqualified)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/listPage") |
| | | @ApiOperation("不合格管理分页查询") |
| | | @Log(title = "不合格管理分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult qualityUnqualifiedListPage(Page page, QualityUnqualified qualityUnqualified) { |
| | | return AjaxResult.success(qualityUnqualifiedService.qualityUnqualifiedListPage(page, qualityUnqualified)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("不合格管理导出") |
| | | @Log(title = "不合格管理导出", businessType = BusinessType.EXPORT) |
| | | public void qualityUnqualifiedExport(HttpServletResponse response,QualityUnqualified qualityUnqualified) { |
| | | qualityUnqualifiedService.qualityUnqualifiedExport(response, qualityUnqualified); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/deal") |
| | | @ApiOperation("不合格管理处理") |
| | | @Log(title = "不合格管理处理", businessType = BusinessType.UPDATE) |
| | | public AjaxResult deal(@RequestBody QualityUnqualified qualityUnqualified) { |
| | | return AjaxResult.success(qualityUnqualifiedService.deal(qualityUnqualified)); |
| | | } |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | 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.staff.service.AnalyticsService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @ApiOperation("离职原因分析") |
| | | @GetMapping("/reason") |
| | | @Log(title = "离职原因分析", businessType = BusinessType.OTHER) |
| | | public AjaxResult staffLeaveReasonAnalytics() { |
| | | return AjaxResult.success(analyticsService.staffLeaveReasonAnalytics()); |
| | | } |
| | | |
| | | @ApiOperation("12个月离职率分析") |
| | | @GetMapping("/monthly_turnover_rate") |
| | | @Log(title = "12个月离职率分析", businessType = BusinessType.OTHER) |
| | | public AjaxResult getMonthlyTurnoverRateFor12Months() { |
| | | return AjaxResult.success(analyticsService.getMonthlyTurnoverRateFor12Months()); |
| | | } |
| | | |
| | | @ApiOperation("总统计分析") |
| | | @GetMapping("/total_statistic") |
| | | @Log(title = "总统计分析", businessType = BusinessType.OTHER) |
| | | public AjaxResult getTotalStatistic() { |
| | | return AjaxResult.success(analyticsService.getTotalStatistic()); |
| | | } |
| | |
| | | private BankService bankService; |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation("银行管理表列表") |
| | | @Log(title = "银行管理表列表", businessType = BusinessType.OTHER) |
| | | public AjaxResult list() { |
| | | return AjaxResult.success(bankService.list()); |
| | | } |
| | |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增银行管理表") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "银行管理表", businessType = BusinessType.INSERT) |
| | | @Log(title = "新增银行管理表", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody Bank bank) { |
| | | return AjaxResult.success(bankService.save(bank)); |
| | | } |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.staff.pojo.HolidayApplication; |
| | | import com.ruoyi.staff.service.HolidayApplicationService; |
| | |
| | | */ |
| | | @ApiOperation("请假申请分页查询") |
| | | @GetMapping("/listPage") |
| | | @Log(title = "请假申请分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, HolidayApplication holidayApplication){ |
| | | return AjaxResult.success(holidayApplicationService.listPage(page, holidayApplication)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("新增请假申请") |
| | | @PostMapping("/add") |
| | | @Log(title = "新增请假申请", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody HolidayApplication holidayApplication){ |
| | | return AjaxResult.success(holidayApplicationService.save(holidayApplication)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("修改请假申请") |
| | | @PostMapping("/update") |
| | | @Log(title = "修改请假申请", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody HolidayApplication holidayApplication){ |
| | | return AjaxResult.success(holidayApplicationService.updateById(holidayApplication)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("删除请假申请") |
| | | @DeleteMapping("/delete/{id}") |
| | | @Log(title = "删除请假申请", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@PathVariable("id") Long id){ |
| | | return AjaxResult.success(holidayApplicationService.removeById(id)); |
| | | } |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.staff.dto.PersonalAttendanceRecordsDto; |
| | |
| | | |
| | | @ApiOperation("新增/修改人员打卡规则配置") |
| | | @PostMapping("/add") |
| | | @Log(title = "新增/修改人员打卡规则配置", businessType = BusinessType.INSERT) |
| | | public R add(@RequestBody PersonalAttendanceLocationConfig personalAttendanceLocationConfig){ |
| | | |
| | | |
| | |
| | | |
| | | @ApiOperation("分页查询人员打卡规则配置") |
| | | @GetMapping("/listPage") |
| | | @Log(title = "分页查询人员打卡规则配置", businessType = BusinessType.OTHER) |
| | | public R listPage(Page page){ |
| | | return R.ok(personalAttendanceLocationConfigService.page(page)); |
| | | } |
| | |
| | | |
| | | @ApiOperation("删除人员打卡规则配置") |
| | | @DeleteMapping("/del") |
| | | @Log(title = "删除人员打卡规则配置", businessType = BusinessType.DELETE) |
| | | public R del(@RequestBody List<Integer> ids) { |
| | | return R.ok(personalAttendanceLocationConfigService.removeBatchByIds(ids)); |
| | | } |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.staff.dto.PersonalAttendanceRecordsDto; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceRecords; |
| | |
| | | |
| | | @ApiOperation("新增打卡签到") |
| | | @PostMapping("") |
| | | @Log(title = "新增打卡签到", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody PersonalAttendanceRecordsDto personalAttendanceRecordsDto){ |
| | | return AjaxResult.success(personalAttendanceRecordsService.add(personalAttendanceRecordsDto)); |
| | | } |
| | | |
| | | @ApiOperation("分页查询打卡签到") |
| | | @GetMapping("/listPage") |
| | | @Log(title = "分页查询打卡签到", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, PersonalAttendanceRecordsDto personalAttendanceRecordsDto){ |
| | | return AjaxResult.success(personalAttendanceRecordsService.listPage(page, personalAttendanceRecordsDto)); |
| | | } |
| | | |
| | | @ApiOperation("获取当前人的考勤相关数据") |
| | | @GetMapping("/today") |
| | | @Log(title = "获取当前人的考勤相关数据", businessType = BusinessType.OTHER) |
| | | public AjaxResult todayInfo(PersonalAttendanceRecordsDto personalAttendanceRecordsDto){ |
| | | return AjaxResult.success(personalAttendanceRecordsService.todayInfo(personalAttendanceRecordsDto)); |
| | | } |
| | | |
| | | @ApiOperation("导出打卡签到") |
| | | @PostMapping("/export") |
| | | @Log(title = "导出打卡签到", businessType = BusinessType.EXPORT) |
| | | public void export(HttpServletResponse response, PersonalAttendanceRecordsDto personalAttendanceRecordsDto) { |
| | | personalAttendanceRecordsService.export(response, personalAttendanceRecordsDto); |
| | | } |
| | |
| | | import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | 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.domain.R; |
| | | import com.ruoyi.staff.dto.PerformanceShiftAddDto; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceLocationConfig; |
| | |
| | | |
| | | @ApiOperation("人员排班") |
| | | @PostMapping("/add") |
| | | @Log(title = "人员排班", businessType = BusinessType.INSERT) |
| | | public R add(@RequestBody PerformanceShiftAddDto performanceShiftAddDto){ |
| | | return R.ok(personalShiftService.performanceShiftAdd(performanceShiftAddDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "月份分页查询") |
| | | @GetMapping("page") |
| | | @Log(title = "月份分页查询", businessType = BusinessType.OTHER) |
| | | public R performanceShiftPage(Integer size, Integer current, String time, String userName, Integer sysDeptId) { |
| | | return R.ok(personalShiftService.performanceShiftPage(new Page<>(current, size), time, userName, sysDeptId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "年份分页查询") |
| | | @GetMapping("pageYear") |
| | | @Log(title = "年份分页查询", businessType = BusinessType.OTHER) |
| | | public R performanceShiftPageYear(Integer size, Integer current, String time, String userName, Integer sysDeptId) { |
| | | return R.ok(personalShiftService.performanceShiftPageYear(new Page<>(current, size), time, userName, sysDeptId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "班次状态修改") |
| | | @PostMapping("update") |
| | | @Log(title = "班次状态修改", businessType = BusinessType.UPDATE) |
| | | public R performanceShiftUpdate(@RequestBody PersonalShift personalShift) { |
| | | personalShiftService.performanceShiftUpdate(personalShift); |
| | | return R.ok(); |
| | |
| | | |
| | | @ApiOperation(value = "导出") |
| | | @GetMapping("export") |
| | | @Log(title = "导出", businessType = BusinessType.EXPORT) |
| | | public void exportToExcel(@NotNull(message = "时间不能为空!") String time, String userName, Integer sysDeptId, Boolean isMonth, HttpServletResponse response) throws Exception { |
| | | ServletOutputStream out = response.getOutputStream(); |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
| | |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation(value = "分页查询") |
| | | @Log(title = "分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, SchemeApplicableStaff schemeApplicableStaff) { |
| | | return schemeApplicableStaffService.listPage(page,schemeApplicableStaff); |
| | | } |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.staff.pojo.StaffContract; |
| | | import com.ruoyi.staff.service.StaffContractService; |
| | |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("员工合同分页查询") |
| | | @Log(title = "员工合同分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult staffContractListPage(Page page, StaffContract staffContract) { |
| | | return AjaxResult.success(staffContractService.staffContractListPage(page, staffContract)); |
| | | } |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.staff.dto.StaffLeaveDto; |
| | | import com.ruoyi.staff.service.StaffLeaveService; |
| | |
| | | */ |
| | | @ApiOperation("新增离职分页查询") |
| | | @GetMapping("/listPage") |
| | | @Log(title = "离职分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult staffLeaveListPage(Page page, StaffLeaveDto staffLeaveDto) { |
| | | return AjaxResult.success(staffLeaveService.staffLeaveListPage(page, staffLeaveDto)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("") |
| | | @ApiOperation("新增离职") |
| | | @Log(title = "新增离职", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody StaffLeaveDto staffLeaveDto) { |
| | | return AjaxResult.success(staffLeaveService.add(staffLeaveDto)); |
| | | } |
| | |
| | | */ |
| | | @PutMapping("/{id}") |
| | | @ApiOperation("更新离职信息") |
| | | @Log(title = "更新离职信息", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@PathVariable("id") Long id, @RequestBody StaffLeaveDto staffLeaveDto) { |
| | | return AjaxResult.success(staffLeaveService.update(id, staffLeaveDto)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("删除入职") |
| | | @Log(title = "删除入职", businessType = BusinessType.DELETE) |
| | | public AjaxResult del(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | |
| | | */ |
| | | @ApiOperation("离职导出") |
| | | @PostMapping("/export") |
| | | @Log(title = "离职导出", businessType = BusinessType.EXPORT) |
| | | public void export(HttpServletResponse response, StaffLeaveDto staffLeaveDto) { |
| | | staffLeaveService.export(response, staffLeaveDto); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("在职员工台账分页查询") |
| | | @Log(title = "在职员工台账分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult staffOnJobListPage(Page page, StaffOnJob staffOnJob) { |
| | | return AjaxResult.success(staffOnJobService.staffOnJobListPage(page, staffOnJob)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation("在职员工下拉(新增离职用)") |
| | | @Log(title = "在职员工下拉(新增离职用)", businessType = BusinessType.OTHER) |
| | | public AjaxResult staffOnJobList(StaffOnJob staffOnJob) { |
| | | return AjaxResult.success(staffOnJobService.staffOnJobList(staffOnJob)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("") |
| | | @ApiOperation("新增入职") |
| | | @Log(title = "新增入职", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody StaffOnJobDto staffOnJob) { |
| | | return AjaxResult.success(staffOnJobService.add(staffOnJob)); |
| | | } |
| | |
| | | */ |
| | | @PutMapping("/{id}") |
| | | @ApiOperation("更新入职信息") |
| | | @Log(title = "更新入职信息", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@PathVariable("id") Long id, @RequestBody StaffOnJobDto staffOnJobDto) { |
| | | return AjaxResult.success(staffOnJobService.update(id, staffOnJobDto)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("删除入职") |
| | | @Log(title = "删除入职", businessType = BusinessType.DELETE) |
| | | public AjaxResult delStaffOnJobs(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation("在职员工详情") |
| | | @Log(title = "在职员工详情", businessType = BusinessType.OTHER) |
| | | public AjaxResult staffOnJobDetail(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(staffOnJobService.staffOnJobDetail(id)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/renewContract/{id}") |
| | | @ApiOperation("续签合同") |
| | | @Log(title = "续签合同", businessType = BusinessType.UPDATE) |
| | | public AjaxResult renewContract(@PathVariable("id") Long id, @RequestBody StaffContract staffContract) { |
| | | return AjaxResult.success(staffOnJobService.renewContract(id, staffContract)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("在职员工导出") |
| | | @Log(title = "在职员工导出", businessType = BusinessType.EXPORT) |
| | | public void staffOnJobExport(HttpServletResponse response,StaffOnJob staffOnJob) { |
| | | staffOnJobService.staffOnJobExport(response, staffOnJob); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/exportCopy") |
| | | @ApiOperation("word模板合同在职员工导出") |
| | | @Log(title = "word模板合同在职员工导出", businessType = BusinessType.EXPORT) |
| | | public AjaxResult exportCopy(HttpServletResponse response,@RequestBody StaffOnJob staffOnJob) throws Exception{ |
| | | return AjaxResult.success(staffOnJobService.exportCopy(response, staffOnJob)); |
| | | } |
| | |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("员工工资主表分页查询") |
| | | @Log(title = "员工工资主表分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, StaffSalaryMain staffSalaryMain) { |
| | | return staffSalaryMainService.listPage(page, staffSalaryMain); |
| | | } |
| | | |
| | | @ApiOperation("通过部门ids获取用户信息计算每个员工的工资") |
| | | @PostMapping("/calculateSalary") |
| | | @Log(title = "通过部门ids获取用户信息计算每个员工的工资", businessType = BusinessType.UPDATE) |
| | | public AjaxResult calculateSalary(@RequestBody CalculateSalaryDto calculateSalaryDto) { |
| | | return staffSalaryMainService.calculateSalary(calculateSalaryDto); |
| | | } |
| | |
| | | |
| | | @PostMapping("/listPage") |
| | | @ApiOperation("分页查询排班") |
| | | @Log(title = "分页查询排班", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(@RequestBody SearchSchedulingVo vo){ |
| | | return AjaxResult.success(staffSchedulingService.listPage(vo)); |
| | | } |
| | | |
| | | @PostMapping("/save") |
| | | @ApiOperation("新增排班") |
| | | @Log(title = "新增排班", businessType = BusinessType.INSERT) |
| | | public AjaxResult save(@RequestBody @Validated SaveStaffSchedulingDto saveStaffSchedulingDto){ |
| | | staffSchedulingService.saveStaffScheduling(saveStaffSchedulingDto); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @DeleteMapping("/delByIds") |
| | | @ApiOperation("批量删除排班") |
| | | @Log(title = "批量删除排班", businessType = BusinessType.DELETE) |
| | | public AjaxResult delByIds(@RequestBody List<Integer> ids){ |
| | | staffSchedulingService.removeByIds(ids); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @DeleteMapping("/del/{id}") |
| | | @ApiOperation("删除排班") |
| | | @Log(title = "删除排班", businessType = BusinessType.DELETE) |
| | | public AjaxResult del(@PathVariable("id") Integer id){ |
| | | staffSchedulingService.removeById(id); |
| | | return AjaxResult.success(); |
| | |
| | | * 获取当前用户最新排班记录 |
| | | */ |
| | | @GetMapping("/getCurrentUserLatestScheduling") |
| | | @ApiOperation("获取当前用户最新排班记录") |
| | | @Log(title = "获取当前用户最新排班记录", businessType = BusinessType.OTHER) |
| | | public AjaxResult getCurrentUserLatestScheduling(){ |
| | | return AjaxResult.success(staffSchedulingService.getCurrentUserLatestScheduling()); |
| | | } |
| | | |
| | | @Log(title = "导出人员排班列表", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | @ApiOperation("导出人员排班列表") |
| | | public void export(HttpServletResponse response ) { |
| | | SearchSchedulingVo vo = new SearchSchedulingVo(); |
| | | vo.setCurrent(-1); |