diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesComplaintNoticeDetailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesComplaintNoticeDetailServiceImpl.java index 364fc969..05f0b630 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesComplaintNoticeDetailServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesComplaintNoticeDetailServiceImpl.java @@ -143,6 +143,7 @@ public class AftersalesComplaintNoticeDetailServiceImpl implements IAftersalesCo aftersalesComplaintNotice.setRemark(aftersalesComplaintNoticeDetail.getRemark()); aftersalesComplaintNotice.setCustomerName(aftersalesComplaintNoticeDetail.getCustomerName()); aftersalesComplaintNotice.setCustomerId(aftersalesComplaintNoticeDetail.getCustomerId()); + aftersalesComplaintNotice.setClosingProcedures(aftersalesComplaintNoticeDetail.getClosingProcedures()); complaintNoticeMapper.updateAftersalesComplaintNotice(aftersalesComplaintNotice); String complaintNoticeCode = aftersalesComplaintNoticeDetail.getComplaintNoticeCode(); List aftersalesMaterialVOs = aftersalesComplaintNoticeDetail.getAftersalesMaterialVOs(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityComplaintNoticeController.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityComplaintNoticeController.java new file mode 100644 index 00000000..2984298a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityComplaintNoticeController.java @@ -0,0 +1,188 @@ +package com.ruoyi.quality.controller; + +import com.ruoyi.aftersales.domain.AftersalesComplaintNotice; +import com.ruoyi.aftersales.domain.AftersalesComplaintNoticeDetail; +import com.ruoyi.aftersales.domain.vo.AftersalesMaterialVO; +import com.ruoyi.aftersales.service.IAftersalesComplaintNoticeDetailService; +import com.ruoyi.aftersales.service.IAftersalesComplaintNoticeService; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.domain.SysMakeOrder; +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 java.util.List; + + +/** + * 售后客诉通知单Controller + * + * @author 刘晓旭 + * @date 2024-05-22 + */ +@Controller +@RequestMapping("/quality/complaintNotice") +public class QualityComplaintNoticeController extends BaseController { + + + private String prefix = "quality/complaintNotice"; + + @Autowired + private IAftersalesComplaintNoticeService aftersalesComplaintNoticeService; + + @Autowired + private IAftersalesComplaintNoticeDetailService complaintNoticeDetailService; + + @RequiresPermissions("quality:complaintNotice:view") + @GetMapping() + public String complaintNotice() + { + return prefix + "/complaintNotice"; + } + + /** + * 查询售后客诉通知单列表 + */ + @RequiresPermissions("quality:complaintNotice:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(AftersalesComplaintNotice complaintNotice) + { + startPage(); + List list = aftersalesComplaintNoticeService.selectAftersalesComplaintNoticeList(complaintNotice); + return getDataTable(list); + } + + /** + * 导出售后客诉通知单列表 + */ + @RequiresPermissions("quality:complaintNotice:export") + @Log(title = "售后客诉通知单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail) + { + List complaintNoticeDetails = complaintNoticeDetailService.selectAftersalesComplaintNoticeDetailList(aftersalesComplaintNoticeDetail); + ExcelUtil util = new ExcelUtil(AftersalesComplaintNoticeDetail.class); + return util.exportExcel(complaintNoticeDetails, "售后客诉通知单数据"); + } + + /** + * 新增售后客诉通知单 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存售后客诉通知单 + */ + @RequiresPermissions("quality:complaintNotice:add") + @Log(title = "售后客诉通知单", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(@RequestBody AftersalesComplaintNoticeDetail complaintNoticeDetail) + { + return toAjax(complaintNoticeDetailService.insertAftersalesComplaintNoticeDetail(complaintNoticeDetail)); + } + + /** + * 修改售后客诉通知单 + */ + @GetMapping("/returnInspectionProcessing/{complaintNoticeId}") + public String edit(@PathVariable("complaintNoticeId") Long complaintNoticeId, ModelMap mmap) + { + AftersalesComplaintNotice aftersalesComplaintNotice = aftersalesComplaintNoticeService.selectAftersalesComplaintNoticeById(complaintNoticeId); + mmap.put("aftersalesComplaintNotice", aftersalesComplaintNotice); + return prefix + "/returnInspectionProcessing"; + } + + /** + * 修改保存售后客诉通知单 + */ + @RequiresPermissions("quality:complaintNotice:returnInspectionProcessing") + @Log(title = "售后客诉通知单", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(@RequestBody AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail) + { + return toAjax(complaintNoticeDetailService.updateAftersalesComplaintNoticeDetail(aftersalesComplaintNoticeDetail)); + } + + /** + * 售后客诉通知单详情 + */ + @GetMapping("/detail/{complaintNoticeId}") + public String detail(@PathVariable("complaintNoticeId") Long complaintNoticeId, ModelMap mmap) + { + AftersalesComplaintNotice aftersalesComplaintNotice = aftersalesComplaintNoticeService.selectAftersalesComplaintNoticeById(complaintNoticeId); + mmap.put("aftersalesComplaintNotice", aftersalesComplaintNotice); + return prefix + "/detail"; + } + + + /** + * 删除售后客诉通知单 + */ + @RequiresPermissions("quality:complaintNotice:remove") + @Log(title = "售后客诉通知单", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(aftersalesComplaintNoticeService.deleteAftersalesComplaintNoticeByIds(ids)); + } + + /** + * 查找与客户id关联的生产单号 + * */ + @ResponseBody + @GetMapping("/getMakeNosByCustomerId/{customerId}") + public List getCustomers(@PathVariable String customerId) { + List list = aftersalesComplaintNoticeService.selectMakeOrdersByCustomerId(customerId); + return list; + } + + + /** + * 查找与客户生产单号有关的物料信息 + */ + @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 = aftersalesComplaintNoticeService.selectMaterialInfoByMakeNo(makeNo); + return getDataTable(list); + } + + /** + * 编辑操作的时候查询数据库中已有的物料信息 + * */ + @ResponseBody + @PostMapping("/getMaterialListByNoticeCode") + public TableDataInfo getMaterialListByNoticeCode(AftersalesComplaintNoticeDetail complaintNoticeDetail){ + startPage(); + List list = complaintNoticeDetailService.selectMaterialListByNoticeCode(complaintNoticeDetail.getComplaintNoticeCode()); + return getDataTable(list); + } + +} diff --git a/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/complaintNotice.html b/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/complaintNotice.html new file mode 100644 index 00000000..8a58c195 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/complaintNotice.html @@ -0,0 +1,174 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/detail.html b/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/detail.html new file mode 100644 index 00000000..7d312c8e --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/detail.html @@ -0,0 +1,336 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/returnInspectionProcessing.html b/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/returnInspectionProcessing.html new file mode 100644 index 00000000..78192768 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/returnInspectionProcessing.html @@ -0,0 +1,382 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file