Merge remote-tracking branch 'origin/dev_New_pro' into dev_New_pro
| | |
| | | |
| | | 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.R; |
| | | import com.ruoyi.quality.dto.QualityInspectDto; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @Operation(summary = "新增检验") |
| | | @Log(title = "新增检验", businessType = BusinessType.INSERT) |
| | | public R<?> add(@RequestBody QualityInspectDto qualityInspectDto) { |
| | | return R.ok(qualityInspectService.add(qualityInspectDto)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "删除检验") |
| | | @Log(title = "删除检验", businessType = BusinessType.DELETE) |
| | | public R<?> delQualityInspect(@RequestBody List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return R.fail("请选择至少一条数据"); |
| | |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @Operation(summary = "检验详情") |
| | | @Log(title = "检验详情", businessType = BusinessType.OTHER) |
| | | public R<?> QualityInspectDetail(@PathVariable("id") Integer id) { |
| | | return R.ok(qualityInspectService.getDetailById(id)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @Operation(summary = "修改检验") |
| | | @Log(title = "修改检验", businessType = BusinessType.UPDATE) |
| | | public R<?> update(@RequestBody QualityInspectDto qualityInspectDto) { |
| | | return R.ok(qualityInspectService.updateQualityInspect(qualityInspectDto)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "分页查询检验") |
| | | @Log(title = "分页查询检验", businessType = BusinessType.OTHER) |
| | | public R<?> qualityInspectListPage(Page page, QualityInspectDto qualityInspect) { |
| | | return R.ok(qualityInspectService.qualityInspectListPage(page, qualityInspect)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/export") |
| | | @Operation(summary = "导出检验") |
| | | @Log(title = "导出检验", businessType = BusinessType.EXPORT) |
| | | public void qualityInspectExport(HttpServletResponse response, QualityInspect qualityInspect) { |
| | | qualityInspectService.qualityInspectExport(response, qualityInspect); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/submit") |
| | | @Operation(summary = "提交检验") |
| | | @Log(title = "提交检验", businessType = BusinessType.OTHER) |
| | | public R<?> submit(@RequestBody QualityInspect qualityInspect) { |
| | | return R.ok(qualityInspectService.submit(qualityInspect)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/down") |
| | | @Operation(summary = "下载检验") |
| | | @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.R; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityInspectFile; |
| | |
| | | */ |
| | | @GetMapping("/{inspectId}") |
| | | @Operation(summary = "检验参数项详情") |
| | | @Log(title = "检验参数项详情", businessType = BusinessType.OTHER) |
| | | public R<?> QualityInspectParamDetail(@PathVariable("inspectId") Integer inspectId) { |
| | | return R.ok(qualityInspectParamService.qualityInspectParamDetail(inspectId)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @Operation(summary = "修改检验参数项") |
| | | @Log(title = "修改检验参数项", businessType = BusinessType.UPDATE) |
| | | public R<?> update(@RequestBody List<QualityInspectParam> qualityInspectParams) { |
| | | return R.ok(qualityInspectParamService.updateBatchById(qualityInspectParams)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "删除检验参数项") |
| | | @Log(title = "删除检验参数项", businessType = BusinessType.DELETE) |
| | | public R<?> delQualityUnqualified(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return R.fail("请选择至少一条数据"); |
| | |
| | | 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.R; |
| | | import com.ruoyi.quality.service.QualityReportService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | |
| | | */ |
| | | @Operation(summary = "获取检验统计数据") |
| | | @GetMapping("/getInspectStatistics") |
| | | @Log(title = "获取检验统计数据", businessType = BusinessType.OTHER) |
| | | public R<?> getInspectStatistics() { |
| | | return R.ok(qualityReportService.getInspectStatistics()); |
| | | } |
| | |
| | | */ |
| | | @Operation(summary = "获取合格率统计数据") |
| | | @GetMapping("/getPassRateStatistics") |
| | | @Log(title = "获取合格率统计数据", businessType = BusinessType.OTHER) |
| | | public R<?> getPassRateStatistics() { |
| | | return R.ok(qualityReportService.getPassRateStatistics()); |
| | | } |
| | |
| | | */ |
| | | @Operation(summary = "获取月度合格率统计数据") |
| | | @GetMapping("/getMonthlyPassRateStatistics") |
| | | @Log(title = "获取月度合格率统计数据", businessType = BusinessType.OTHER) |
| | | public R<?> getMonthlyPassRateStatistics(@RequestParam("year") String year) { |
| | | return R.ok(qualityReportService.getMonthlyPassRateStatistics(year)); |
| | | } |
| | |
| | | */ |
| | | @Operation(summary = "获取年度总合格率统计数据") |
| | | @GetMapping("/getYearlyPassRateStatistics") |
| | | @Log(title = "获取年度总合格率统计数据", businessType = BusinessType.OTHER) |
| | | public R<?> getYearlyPassRateStatistics(@RequestParam("year") String year) { |
| | | return R.ok(qualityReportService.getYearlyPassRateStatistics(year)); |
| | | } |
| | |
| | | */ |
| | | @Operation(summary = "获取月度完成明细数据") |
| | | @GetMapping("/getMonthlyCompletionDetails") |
| | | @Log(title = "获取月度完成明细数据", businessType = BusinessType.OTHER) |
| | | public R<?> getMonthlyCompletionDetails(@RequestParam("year") String year) { |
| | | return R.ok(qualityReportService.getMonthlyCompletionDetails(year)); |
| | | } |
| | |
| | | */ |
| | | @Operation(summary = "获取热点检测指标统计") |
| | | @GetMapping("/getTopParameters") |
| | | @Log(title = "获取热点检测指标统计", businessType = BusinessType.OTHER) |
| | | public R<?> getTopParameters(@RequestParam("modelType") Integer modelType) { |
| | | return R.ok(qualityReportService.getTopParameters(modelType)); |
| | | } |
| | |
| | | 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.R; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardBinding; |
| | | import com.ruoyi.quality.service.QualityTestStandardBindingService; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @Operation(summary = "新增检测标准主表与产品关联表") |
| | | @Log(title = "新增检测标准主表与产品关联表", businessType = BusinessType.INSERT) |
| | | public R<?> add(@RequestBody List<QualityTestStandardBinding> qualityTestStandardBindings) { |
| | | return R.ok(qualityTestStandardBindingService.add(qualityTestStandardBindings)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "删除检测标准主表与产品关联表") |
| | | @Log(title = "删除检测标准主表与产品关联表", businessType = BusinessType.DELETE) |
| | | public R<?> delQualityTestStandard(@RequestBody List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return R.fail("请选择至少一条数据"); |
| | |
| | | */ |
| | | @GetMapping("/list") |
| | | @Operation(summary = "检测指标维护查询") |
| | | @Log(title = "检测指标维护查询", businessType = BusinessType.OTHER) |
| | | public R<?> listBinding(Long testStandardId) { |
| | | return R.ok(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.R; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @Operation(summary = "新增检测标准主表") |
| | | @Log(title = "新增检测标准主表", businessType = BusinessType.INSERT) |
| | | public R<?> add(@RequestBody QualityTestStandard qualityTestStandard) { |
| | | return R.ok(qualityTestStandardService.save(qualityTestStandard)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "删除检测标准主表") |
| | | @Log(title = "删除检测标准主表", businessType = BusinessType.DELETE) |
| | | public R<?> delQualityTestStandard(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return R.fail("请选择至少一条数据"); |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @Operation(summary = "检测标准主表修改") |
| | | @Log(title = "检测标准主表修改", businessType = BusinessType.UPDATE) |
| | | public R<?> update(@RequestBody QualityTestStandard qualityTestStandard) { |
| | | return R.ok(qualityTestStandardService.updateById(qualityTestStandard)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "检测标准主表分页查询") |
| | | @Log(title = "检测标准主表分页查询", businessType = BusinessType.OTHER) |
| | | public R<?> qualityTestStandardListPage(Page page, QualityTestStandard qualityTestStandard) { |
| | | return R.ok(qualityTestStandardService.qualityTestStandardListPage(page, qualityTestStandard)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/copyParam") |
| | | @Operation(summary = "检测标准复制参数") |
| | | @Log(title = "检测标准复制参数", businessType = BusinessType.OTHER) |
| | | public R<?> copyParam(@RequestBody QualityTestStandard qualityTestStandard) { |
| | | return R.ok(qualityTestStandardService.copyParam(qualityTestStandard)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/qualityTestStandardAudit") |
| | | @Operation(summary = "检测标准批量审核") |
| | | @Log(title = "检测标准批量审核", businessType = BusinessType.OTHER) |
| | | public R<?> qualityTestStandardAudit(@RequestBody List<QualityTestStandard> qualityTestStandards) { |
| | | return R.ok(qualityTestStandardService.updateBatchById(qualityTestStandards)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/getQualityTestStandardByProductId") |
| | | @Operation(summary = "根据产品id查询相关的检验标准") |
| | | @Log(title = "根据产品id查询相关的检验标准", businessType = BusinessType.OTHER) |
| | | public R<?> getQualityTestStandardByProductId(@Nonnull Long productId, @Nonnull Integer inspectType, String process) { |
| | | return R.ok(qualityTestStandardService.getQualityTestStandardByProductId(productId,inspectType,process)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/getQualityTestStandardParamByTestStandardId") |
| | | @Operation(summary = "根据检测标准id查询相关的检验标准参数") |
| | | @Log(title = "根据检测标准id查询相关的检验标准参数", businessType = BusinessType.OTHER) |
| | | public R<?> getQualityTestStandardParamByTestStandardId(Long testStandardId) { |
| | | return R.ok(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.R; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @Operation(summary = "新增检测标准参数") |
| | | @Log(title = "新增检测标准参数", businessType = BusinessType.INSERT) |
| | | public R<?> add(@RequestBody QualityTestStandardParam qualityTestStandardParam) { |
| | | return R.ok(qualityTestStandardParamService.save(qualityTestStandardParam)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "删除检测指标维护") |
| | | @Log(title = "删除检测指标维护", businessType = BusinessType.DELETE) |
| | | public R<?> delQualityTestStandard(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return R.fail("请选择至少一条数据"); |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @Operation(summary = "检测指标维护修改") |
| | | @Log(title = "检测指标维护修改", businessType = BusinessType.UPDATE) |
| | | public R<?> update(@RequestBody QualityTestStandardParam qualityTestStandardParam) { |
| | | return R.ok(qualityTestStandardParamService.updateById(qualityTestStandardParam)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/list") |
| | | @Operation(summary = "检测指标维护查询") |
| | | @Log(title = "检测指标维护查询", businessType = BusinessType.OTHER) |
| | | public R<?> list(Long testStandardId) { |
| | | return R.ok(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.R; |
| | | import com.ruoyi.quality.pojo.QualityUnqualified; |
| | | import com.ruoyi.quality.service.IQualityUnqualifiedService; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @Operation(summary = "新增不合格管理") |
| | | @Log(title = "新增不合格管理", businessType = BusinessType.INSERT) |
| | | public R<?> add(@RequestBody QualityUnqualified qualityUnqualified) { |
| | | qualityUnqualified.setInspectState(0); |
| | | return R.ok(qualityUnqualifiedService.save(qualityUnqualified)); |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "删除不合格管理") |
| | | @Log(title = "删除不合格管理", businessType = BusinessType.DELETE) |
| | | public R<?> delQualityUnqualified(@RequestBody List<Integer> ids) { |
| | | qualityUnqualifiedService.listByIds(ids).stream().forEach(qualityUnqualified -> { |
| | | if (qualityUnqualified.getInspectState()==1){ |
| | |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @Operation(summary = "不合格管理详情") |
| | | @Log(title = "不合格管理详情", businessType = BusinessType.OTHER) |
| | | public R<?> QualityUnqualifiedDetail(@PathVariable("id") Integer id) { |
| | | return R.ok(qualityUnqualifiedService.getUnqualified(id)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @Operation(summary = "不合格管理修改") |
| | | @Log(title = "不合格管理修改", businessType = BusinessType.UPDATE) |
| | | public R<?> update(@RequestBody QualityUnqualified qualityUnqualified) { |
| | | return R.ok(qualityUnqualifiedService.updateById(qualityUnqualified)); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "不合格管理分页查询") |
| | | @Log(title = "不合格管理分页查询", businessType = BusinessType.OTHER) |
| | | public R<?> qualityUnqualifiedListPage(Page page, QualityUnqualified qualityUnqualified) { |
| | | return R.ok(qualityUnqualifiedService.qualityUnqualifiedListPage(page, qualityUnqualified)); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/export") |
| | | @Operation(summary = "不合格管理导出") |
| | | @Log(title = "不合格管理导出", businessType = BusinessType.EXPORT) |
| | | public void qualityUnqualifiedExport(HttpServletResponse response,QualityUnqualified qualityUnqualified) { |
| | | qualityUnqualifiedService.qualityUnqualifiedExport(response, qualityUnqualified); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/deal") |
| | | @Operation(summary = "不合格管理处理") |
| | | @Log(title = "不合格管理处理", businessType = BusinessType.OTHER) |
| | | public R<?> deal(@RequestBody QualityUnqualified qualityUnqualified) { |
| | | return R.ok(qualityUnqualifiedService.deal(qualityUnqualified)); |
| | | } |