diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityManufacturingCheckoutController.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityManufacturingCheckoutController.java new file mode 100644 index 00000000..52671004 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityManufacturingCheckoutController.java @@ -0,0 +1,232 @@ +package com.ruoyi.quality.controller; + +import java.util.List; + +import com.ruoyi.aftersales.domain.AftersalesComplaintNoticeDetail; +import com.ruoyi.aftersales.domain.vo.AftersalesMaterialVO; +import com.ruoyi.quality.domain.QualityManufacturingCheckoutMaterial; +import com.ruoyi.quality.domain.QualityManufacturingProcess; +import com.ruoyi.quality.domain.VO.CheckoutMaterialVO; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.quality.domain.QualityManufacturingCheckout; +import com.ruoyi.quality.service.IQualityManufacturingCheckoutService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 品质管理制程检验Controller + * + * @author 刘晓旭 + * @date 2024-05-13 + */ +@Controller +@RequestMapping("/quality/manufacturingCheckout") +public class QualityManufacturingCheckoutController extends BaseController +{ + private String prefix = "quality/manufacturingCheckout"; + + @Autowired + private IQualityManufacturingCheckoutService qualityManufacturingCheckoutService; + + @RequiresPermissions("quality:manufacturingCheckout:view") + @GetMapping() + public String manufacturingCheckout() + { + return prefix + "/manufacturingCheckout"; + } + + /** + * 查询品质管理制程检验列表 + */ + @RequiresPermissions("quality:manufacturingCheckout:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(QualityManufacturingCheckout qualityManufacturingCheckout) + { + startPage(); + List list = qualityManufacturingCheckoutService.selectQualityManufacturingCheckoutList(qualityManufacturingCheckout); + return getDataTable(list); + } + + /** + * 导出品质管理制程检验列表 + */ + @RequiresPermissions("quality:manufacturingCheckout:export") + @Log(title = "品质管理制程检验", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(QualityManufacturingCheckout qualityManufacturingCheckout) + { + List list = qualityManufacturingCheckoutService.selectQualityManufacturingCheckoutList(qualityManufacturingCheckout); + ExcelUtil util = new ExcelUtil(QualityManufacturingCheckout.class); + return util.exportExcel(list, "品质管理制程检验数据"); + } + + /** + * 新增品质管理制程检验 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存品质管理制程检验 + */ + @RequiresPermissions("quality:manufacturingCheckout:add") + @Log(title = "品质管理制程检验", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(@RequestBody QualityManufacturingCheckout qualityManufacturingCheckout) + { + return toAjax(qualityManufacturingCheckoutService.insertQualityManufacturingCheckout(qualityManufacturingCheckout)); + } + + /** + * 修改品质管理制程检验 + */ + @GetMapping("/edit/{manufacturingCheckoutId}") + public String edit(@PathVariable("manufacturingCheckoutId") Long manufacturingCheckoutId, ModelMap mmap) + { + QualityManufacturingCheckout qualityManufacturingCheckout = qualityManufacturingCheckoutService.selectQualityManufacturingCheckoutById(manufacturingCheckoutId); + mmap.put("qualityManufacturingCheckout", qualityManufacturingCheckout); + return prefix + "/edit"; + } + + /** + * 修改保存品质管理制程检验 + */ + @RequiresPermissions("quality:manufacturingCheckout:edit") + @Log(title = "品质管理制程检验", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(QualityManufacturingCheckout qualityManufacturingCheckout) + { + return toAjax(qualityManufacturingCheckoutService.updateQualityManufacturingCheckout(qualityManufacturingCheckout)); + } + + + /** + * 品质管理制程检验详情 + */ + @GetMapping("/detail/{manufacturingCheckoutCode}") + public String detail(@PathVariable("manufacturingCheckoutCode") String manufacturingCheckoutCode, ModelMap mmap) + { + QualityManufacturingCheckout qualityManufacturingCheckout = qualityManufacturingCheckoutService.selectQualityManufacturingCheckoutByCode(manufacturingCheckoutCode); + mmap.put("qualityManufacturingCheckout", qualityManufacturingCheckout); + return prefix + "/detail"; + } + + /** + * 修改保存品质管理制程检验 + */ + @RequiresPermissions("quality:manufacturingCheckout:detail") + @Log(title = "品质管理制程检验", businessType = BusinessType.UPDATE) + @PostMapping("/detail") + @ResponseBody + public AjaxResult detailSave(QualityManufacturingCheckout qualityManufacturingCheckout) + { + return toAjax(qualityManufacturingCheckoutService.detailQualityManufacturingCheckout(qualityManufacturingCheckout)); + } + + + + /** + * 制程检验报告 + */ + @GetMapping("/checkoutReport/{materialNo}/{makeNo}") + public String checkoutReport(@PathVariable("materialNo") String materialNo, @PathVariable("makeNo") String makeNo,ModelMap mmap) + { + QualityManufacturingCheckoutMaterial qualityManufacturingCheckoutMaterial = qualityManufacturingCheckoutService.selectManufacturingCheckoutMaterial(materialNo,makeNo); + mmap.put("qualityManufacturingCheckoutMaterial", qualityManufacturingCheckoutMaterial); + return prefix + "/checkoutReport"; + } + + /** + * 制程检验报告保存 + */ + @RequiresPermissions("quality:manufacturingCheckout:checkoutReport") + @Log(title = "品质管理制程检验", businessType = BusinessType.UPDATE) + @PostMapping("/checkoutReport") + @ResponseBody + public AjaxResult checkoutReportSave(QualityManufacturingCheckout qualityManufacturingCheckout) + { + return toAjax(qualityManufacturingCheckoutService.updateQualityManufacturingCheckout(qualityManufacturingCheckout)); + } + + + /** + * 查找与客户生产单号有关的物料信息 + */ + @GetMapping("/materialSelect") + public String materialSelect(@RequestParam String makeNo, ModelMap modelMap) + { + modelMap.put("makeNo",makeNo); + return prefix + "/materialSelect"; + } + + /** + * 查找与客户生产单号有关的物料信息 + * */ + @ResponseBody + @PostMapping("/getMaterialInfoByMakeNo") + public TableDataInfo getMaterialInfoByMakeNo(@RequestParam String makeNo){ + startPage(); + List list = qualityManufacturingCheckoutService.selectMaterialInfoByMakeNo(makeNo); + return getDataTable(list); + } + + + /** + * 查找制程工序列表 + */ + @GetMapping("/manufacturingProcessSelect") + public String manufacturingProcessSelect() + { + + return prefix + "/manufacturingProcessSelect"; + } + + /** + * 查找制程工序列表 + * */ + @ResponseBody + @PostMapping("/getAllProcess") + public TableDataInfo getAllProcess(){ + startPage(); + List list = qualityManufacturingCheckoutService.selectAllProcess(); + return getDataTable(list); + } + + + /* + * 查找制程工序编号列表 + * */ + @ResponseBody + @PostMapping("/getProcessCodeList") + public TableDataInfo getProcessCodeList(){ + startPage(); + List list = qualityManufacturingCheckoutService.selectAllProcess(); + return getDataTable(list); + } + + /** + * 点击详情的时候查询数据库中已有的物料信息 + * */ + @ResponseBody + @PostMapping("/getMaterialListByCode") + public TableDataInfo getMaterialListByCode(QualityManufacturingCheckout qualityManufacturingCheckout){ + startPage(); + List list = qualityManufacturingCheckoutService.selectMaterialListByCode(qualityManufacturingCheckout.getManufacturingCheckoutCode()); + return getDataTable(list); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityManufacturingProcessController.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityManufacturingProcessController.java new file mode 100644 index 00000000..8cfc366c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityManufacturingProcessController.java @@ -0,0 +1,186 @@ +package com.ruoyi.quality.controller; + +import java.util.List; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +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.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.quality.domain.QualityManufacturingProcess; +import com.ruoyi.quality.service.IQualityManufacturingProcessService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 品质管理制程工序Controller + * + * @author 刘晓旭 + * @date 2024-05-10 + */ +@Controller +@RequestMapping("/quality/manufacturingProcess") +public class QualityManufacturingProcessController extends BaseController +{ + private String prefix = "quality/manufacturingProcess"; + + @Autowired + private IQualityManufacturingProcessService qualityManufacturingProcessService; + + @RequiresPermissions("quality:manufacturingProcess:view") + @GetMapping() + public String manufacturingProcess() + { + return prefix + "/manufacturingProcess"; + } + + /** + * 查询品质管理制程工序列表 + */ + @RequiresPermissions("quality:manufacturingProcess:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(QualityManufacturingProcess qualityManufacturingProcess) + { + startPage(); + List list = qualityManufacturingProcessService.selectQualityManufacturingProcessList(qualityManufacturingProcess); + return getDataTable(list); + } + + /** + * 导出品质管理制程工序列表 + */ + @RequiresPermissions("quality:manufacturingProcess:export") + @Log(title = "品质管理制程工序", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(QualityManufacturingProcess qualityManufacturingProcess) + { + List list = qualityManufacturingProcessService.selectQualityManufacturingProcessList(qualityManufacturingProcess); + ExcelUtil util = new ExcelUtil(QualityManufacturingProcess.class); + return util.exportExcel(list, "品质管理制程工序数据"); + } + + /** + * 新增品质管理制程工序 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存品质管理制程工序 + */ + @RequiresPermissions("quality:manufacturingProcess:add") + @Log(title = "品质管理制程工序", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(QualityManufacturingProcess qualityManufacturingProcess) + { + return toAjax(qualityManufacturingProcessService.insertQualityManufacturingProcess(qualityManufacturingProcess)); + } + + /** + * 修改品质管理制程工序 + */ + @GetMapping("/edit/{manufacturingProcessAutoid}") + public String edit(@PathVariable("manufacturingProcessAutoid") Long manufacturingProcessAutoid, ModelMap mmap) + { + QualityManufacturingProcess qualityManufacturingProcess = qualityManufacturingProcessService.selectQualityManufacturingProcessById(manufacturingProcessAutoid); + mmap.put("qualityManufacturingProcess", qualityManufacturingProcess); + return prefix + "/edit"; + } + + /** + * 修改保存品质管理制程工序 + */ + @RequiresPermissions("quality:manufacturingProcess:edit") + @Log(title = "品质管理制程工序", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(QualityManufacturingProcess qualityManufacturingProcess) + { + return toAjax(qualityManufacturingProcessService.updateQualityManufacturingProcess(qualityManufacturingProcess)); + } + + /** + * 品质管理制程工序详情 + */ + @GetMapping("/detail/{manufacturingProcessAutoid}") + public String detail(@PathVariable("manufacturingProcessAutoid") Long manufacturingProcessAutoid, ModelMap mmap) + { + QualityManufacturingProcess qualityManufacturingProcess = qualityManufacturingProcessService.selectQualityManufacturingProcessById(manufacturingProcessAutoid); + mmap.put("qualityManufacturingProcess", qualityManufacturingProcess); + return prefix + "/detail"; + } + + + /** + * 品质管理制程工序详情 + */ + @RequiresPermissions("quality:manufacturingProcess:detail") + @Log(title = "品质管理制程工序", businessType = BusinessType.UPDATE) + @PostMapping("/detail") + @ResponseBody + public AjaxResult detailSave(QualityManufacturingProcess qualityManufacturingProcess) + { + return toAjax(qualityManufacturingProcessService.qualityManufacturingProcessDetail(qualityManufacturingProcess)); + } + + + /** + * 删除品质管理制程工序 + */ + @RequiresPermissions("quality:manufacturingProcess:remove") + @Log(title = "品质管理制程工序", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(qualityManufacturingProcessService.deleteQualityManufacturingProcessByIds(ids)); + } + + /** + * 作废品质管理制程工序 + */ + @RequiresPermissions("quality:manufacturingProcess:cancel") + @Log(title = "品质管理制程工序", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(qualityManufacturingProcessService.cancelQualityManufacturingProcessById(id)); + } + + /** + * 恢复品质管理制程工序 + */ + @RequiresPermissions("quality:manufacturingProcess:restore") + @Log(title = "品质管理制程工序", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(qualityManufacturingProcessService.restoreQualityManufacturingProcessById(id)); + } + + /* + * 查找与制程检验有关的制程工序通过制程工序编号 + * */ + @GetMapping("/getProcessByCode/{manufacturingProcessCode}") + @ResponseBody + public AjaxResult getProcessByCode(@PathVariable("manufacturingProcessCode") String manufacturingProcessCode) + { + QualityManufacturingProcess qualityManufacturingProcess = qualityManufacturingProcessService.selectQualityManufacturingProcessByCode(manufacturingProcessCode); + return AjaxResult.success(qualityManufacturingProcess); + } + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityReturnInspectionController.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityReturnInspectionController.java new file mode 100644 index 00000000..87308f3d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityReturnInspectionController.java @@ -0,0 +1,163 @@ +package com.ruoyi.quality.controller; + +import java.util.List; + +import com.ruoyi.erp.domain.ErpMaterialReturnInspection; +import com.ruoyi.erp.domain.ErpMaterialReturnInspectionExcelDto; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +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.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.quality.service.IQualityReturnInspectionService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 物料退检单Controller + * + * @author 刘晓旭 + * @date 2024-05-15 + */ +@Controller +@RequestMapping("/quality/returnInspection") +public class QualityReturnInspectionController extends BaseController +{ + private String prefix = "quality/returnInspection"; + + @Autowired + private IQualityReturnInspectionService qualityReturnInspectionService; + + @RequiresPermissions("quality:returnInspection:view") + @GetMapping() + public String returnInspection() + { + return prefix + "/returnInspection"; + } + + /** + * 查询物料退检单列表 + */ + @RequiresPermissions("quality:returnInspection:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(ErpMaterialReturnInspection erpMaterialReturnInspection) + { + startPage(); + List list = qualityReturnInspectionService.selectQualityReturnInspectionList(erpMaterialReturnInspection); + return getDataTable(list); + } + + /** + * 导出物料退检单列表 + */ + @RequiresPermissions("quality:returnInspection:export") + @Log(title = "物料退检单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(ErpMaterialReturnInspection erpMaterialReturnInspection) + { + List list = qualityReturnInspectionService.selectExportList(erpMaterialReturnInspection); + ExcelUtil util = new ExcelUtil(ErpMaterialReturnInspectionExcelDto.class); + return util.exportExcel(list, "物料退检单数据"); + } + + /** + * 新增物料退检单 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存物料退检单 + */ + @RequiresPermissions("quality:returnInspection:add") + @Log(title = "物料退检单", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(ErpMaterialReturnInspection erpMaterialReturnInspection) + { + return toAjax(qualityReturnInspectionService.insertQualityReturnInspection(erpMaterialReturnInspection)); + } + + /** + * 修改物料退检单 + */ + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) + { + ErpMaterialReturnInspection erpMaterialReturnInspection = qualityReturnInspectionService.selectQualityReturnInspectionById(id); + mmap.put("erpMaterialReturnInspection", erpMaterialReturnInspection); + return prefix + "/edit"; + } + + /** + * 修改保存物料退检单 + */ + @RequiresPermissions("quality:returnInspection:edit") + @Log(title = "物料退检单", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(ErpMaterialReturnInspection erpMaterialReturnInspection) + { + return toAjax(qualityReturnInspectionService.updateQualityReturnInspection(erpMaterialReturnInspection)); + } + + /** + * 退检管理列表详情 + */ + @GetMapping("/detail/{id}") + public String detail(@PathVariable("id") Long id, ModelMap mmap) + { + ErpMaterialReturnInspection erpMaterialReturnInspection = qualityReturnInspectionService.selectQualityReturnInspectionById(id); + mmap.put("erpMaterialReturnInspection", erpMaterialReturnInspection); + return prefix + "/detail"; + } + + /** + * 修改保存退检管理单详情 + */ + @RequiresPermissions("quality:returnInspection:detail") + @Log(title = "物料退检单", businessType = BusinessType.UPDATE) + @PostMapping("/detail") + @ResponseBody + public AjaxResult detailSave(ErpMaterialReturnInspection erpMaterialReturnInspection) + { + return toAjax(qualityReturnInspectionService.detailQualityReturnInspection(erpMaterialReturnInspection)); + } + + /** + * 修改物料退检单 + */ + @GetMapping("/processing/{id}") + public String processing(@PathVariable("id") Long id, ModelMap mmap) + { + ErpMaterialReturnInspection erpMaterialReturnInspection = qualityReturnInspectionService.selectQualityReturnInspectionById(id); + mmap.put("erpMaterialReturnInspection", erpMaterialReturnInspection); + return prefix + "/returnInspectionProcessing"; + } + + /** + * 修改保存物料退检单 + */ + @RequiresPermissions("quality:returnInspection:processing") + @Log(title = "物料退检单", businessType = BusinessType.UPDATE) + @PostMapping("/processing") + @ResponseBody + public AjaxResult processingSave(ErpMaterialReturnInspection erpMaterialReturnInspection) + { + return toAjax(qualityReturnInspectionService.processingQualityReturnInspection(erpMaterialReturnInspection)); + } + +}