From 453216006b5017b79c8faa7e582652fba70305bd Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Thu, 16 May 2024 19:07:23 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E9=87=87=E8=B4=AD:=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A1=E5=88=92=E7=89=A9=E6=96=99=E6=B8=85?= =?UTF-8?q?=E5=8D=95=E8=A1=A8=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=8D=95=EF=BC=8C=E9=87=87=E8=B4=AD=E6=8A=A5?= =?UTF-8?q?=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchasePlanChildController.java | 151 ++++++++++ .../controller/PurchasePlanController.java | 34 ++- .../PurchaseQuoteChildController.java} | 59 ++-- .../controller/PurchaseQuoteController.java | 16 +- .../purchase/domain/PurchasePlanChild.java | 261 ++++++++++++++++++ .../ruoyi/purchase/domain/PurchaseQuote.java | 8 +- .../domain/PurchaseQuoteChild.java} | 6 +- .../mapper/PurchasePlanChildMapper.java | 77 ++++++ .../mapper/PurchaseQuoteChildMapper.java} | 22 +- .../service/IPurchasePlanChildService.java | 75 +++++ .../service/IPurchaseQuoteChildService.java} | 22 +- .../impl/PurchasePlanChildServiceImpl.java | 126 +++++++++ .../impl/PurchaseQuoteChildServiceImpl.java | 126 +++++++++ .../impl/PurchaseQuoteServiceImpl.java | 19 +- .../SysPurchaseQuoteChildServiceImpl.java | 126 --------- .../purchase/PurchasePlanChildMapper.xml | 154 +++++++++++ .../PurchaseQuoteChildMapper.xml} | 81 +++--- .../purchase/{plan => purchasePlan}/add.html | 4 +- .../purchase/purchasePlan/detail.html | 119 ++++++++ .../purchase/{plan => purchasePlan}/edit.html | 0 .../purchase/purchasePlan/purchasePlan.html | 165 +++++++++++ .../purchase/purchasePlanChild/add.html | 138 +++++++++ .../purchase/purchasePlanChild/edit.html | 133 +++++++++ .../purchasePlanChild.html} | 142 +++++----- .../templates/purchase/purchaseQuote/add.html | 42 ++- .../purchase/purchaseQuote/edit.html | 150 +++++++++- .../purchaseQuoteChild/add.html | 2 +- .../purchaseQuoteChild/edit.html | 2 +- .../purchaseQuoteChild.html | 2 +- 29 files changed, 1890 insertions(+), 372 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanChildController.java rename ruoyi-admin/src/main/java/com/ruoyi/{system/controller/SysPurchaseQuoteChildController.java => purchase/controller/PurchaseQuoteChildController.java} (58%) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlanChild.java rename ruoyi-admin/src/main/java/com/ruoyi/{system/domain/SysPurchaseQuoteChild.java => purchase/domain/PurchaseQuoteChild.java} (97%) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchasePlanChildMapper.java rename ruoyi-admin/src/main/java/com/ruoyi/{system/mapper/SysPurchaseQuoteChildMapper.java => purchase/mapper/PurchaseQuoteChildMapper.java} (62%) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchasePlanChildService.java rename ruoyi-admin/src/main/java/com/ruoyi/{system/service/ISysPurchaseQuoteChildService.java => purchase/service/IPurchaseQuoteChildService.java} (62%) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanChildServiceImpl.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteChildServiceImpl.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPurchaseQuoteChildServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml rename ruoyi-admin/src/main/resources/mapper/{system/SysPurchaseQuoteChildMapper.xml => purchase/PurchaseQuoteChildMapper.xml} (67%) rename ruoyi-admin/src/main/resources/templates/purchase/{plan => purchasePlan}/add.html (98%) create mode 100644 ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/detail.html rename ruoyi-admin/src/main/resources/templates/purchase/{plan => purchasePlan}/edit.html (100%) create mode 100644 ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html create mode 100644 ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/add.html create mode 100644 ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/edit.html rename ruoyi-admin/src/main/resources/templates/purchase/{plan/plan.html => purchasePlanChild/purchasePlanChild.html} (52%) rename ruoyi-admin/src/main/resources/templates/{system => purchase}/purchaseQuoteChild/add.html (99%) rename ruoyi-admin/src/main/resources/templates/{system => purchase}/purchaseQuoteChild/edit.html (99%) rename ruoyi-admin/src/main/resources/templates/{system => purchase}/purchaseQuoteChild/purchaseQuoteChild.html (99%) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanChildController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanChildController.java new file mode 100644 index 00000000..52910238 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanChildController.java @@ -0,0 +1,151 @@ +package com.ruoyi.purchase.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.purchase.domain.PurchasePlanChild; +import com.ruoyi.purchase.service.IPurchasePlanChildService; +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 zhang + * @date 2024-05-16 + */ +@Controller +@RequestMapping("/purchase/purchasePlanChild") +public class PurchasePlanChildController extends BaseController +{ + private String prefix = "purchase/purchasePlanChild"; + + @Autowired + private IPurchasePlanChildService purchasePlanChildService; + + @RequiresPermissions("purchase:purchasePlanChild:view") + @GetMapping() + public String purchasePlanChild() + { + return prefix + "/purchasePlanChild"; + } + + /** + * 查询采购计划单物料信息列表 + */ + @RequiresPermissions("purchase:purchasePlanChild:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(PurchasePlanChild purchasePlanChild) + { + startPage(); + List list = purchasePlanChildService.selectPurchasePlanChildList(purchasePlanChild); + return getDataTable(list); + } + + /** + * 导出采购计划单物料信息列表 + */ + @RequiresPermissions("purchase:purchasePlanChild:export") + @Log(title = "采购计划单物料信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(PurchasePlanChild purchasePlanChild) + { + List list = purchasePlanChildService.selectPurchasePlanChildList(purchasePlanChild); + ExcelUtil util = new ExcelUtil(PurchasePlanChild.class); + return util.exportExcel(list, "采购计划单物料信息数据"); + } + + /** + * 新增采购计划单物料信息 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存采购计划单物料信息 + */ + @RequiresPermissions("purchase:purchasePlanChild:add") + @Log(title = "采购计划单物料信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(PurchasePlanChild purchasePlanChild) + { + return toAjax(purchasePlanChildService.insertPurchasePlanChild(purchasePlanChild)); + } + + /** + * 修改采购计划单物料信息 + */ + @GetMapping("/edit/{purchasePlanChildId}") + public String edit(@PathVariable("purchasePlanChildId") Long purchasePlanChildId, ModelMap mmap) + { + PurchasePlanChild purchasePlanChild = purchasePlanChildService.selectPurchasePlanChildById(purchasePlanChildId); + mmap.put("purchasePlanChild", purchasePlanChild); + return prefix + "/edit"; + } + + /** + * 修改保存采购计划单物料信息 + */ + @RequiresPermissions("purchase:purchasePlanChild:edit") + @Log(title = "采购计划单物料信息", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(PurchasePlanChild purchasePlanChild) + { + return toAjax(purchasePlanChildService.updatePurchasePlanChild(purchasePlanChild)); + } + + /** + * 删除采购计划单物料信息 + */ + @RequiresPermissions("purchase:purchasePlanChild:remove") + @Log(title = "采购计划单物料信息", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(purchasePlanChildService.deletePurchasePlanChildByIds(ids)); + } + + /** + * 作废采购计划单物料信息 + */ + @RequiresPermissions("purchase:purchasePlanChild:cancel") + @Log(title = "采购计划单物料信息", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(purchasePlanChildService.cancelPurchasePlanChildById(id)); + } + + /** + * 恢复采购计划单物料信息 + */ + @RequiresPermissions("purchase:purchasePlanChild:restore") + @Log(title = "采购计划单物料信息", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(purchasePlanChildService.restorePurchasePlanChildById(id)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanController.java index 3babbb00..cbad3563 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanController.java @@ -27,25 +27,25 @@ import com.ruoyi.common.core.page.TableDataInfo; * @date 2024-04-15 */ @Controller -@RequestMapping("/purchase/plan") +@RequestMapping("/purchase/purchasePlan") public class PurchasePlanController extends BaseController { - private String prefix = "purchase/plan"; + private String prefix = "purchase/purchasePlan"; @Autowired private IPurchasePlanService purchasePlanService; - @RequiresPermissions("purchase:plan:view") + @RequiresPermissions("purchase:purchasePlan:view") @GetMapping() - public String plan() + public String purchasePlan() { - return prefix + "/plan"; + return prefix + "/purchasePlan"; } /** * 查询采购计划单列表 */ - @RequiresPermissions("purchase:plan:list") + @RequiresPermissions("purchase:purchasePlan:list") @PostMapping("/list") @ResponseBody public TableDataInfo list(PurchasePlan purchasePlan) @@ -58,7 +58,7 @@ public class PurchasePlanController extends BaseController /** * 导出采购计划单列表 */ - @RequiresPermissions("purchase:plan:export") + @RequiresPermissions("purchase:purchasePlan:export") @Log(title = "采购计划单", businessType = BusinessType.EXPORT) @PostMapping("/export") @ResponseBody @@ -81,7 +81,7 @@ public class PurchasePlanController extends BaseController /** * 新增保存采购计划单 */ - @RequiresPermissions("purchase:plan:add") + @RequiresPermissions("purchase:purchasePlan:add") @Log(title = "采购计划单", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody @@ -100,11 +100,17 @@ public class PurchasePlanController extends BaseController mmap.put("purchasePlan", purchasePlan); return prefix + "/edit"; } - + @GetMapping("/detail/{purchasePlanId}") + public String detail(@PathVariable("purchasePlanId") Long purchasePlanId, ModelMap mmap) + { + PurchasePlan purchasePlan = purchasePlanService.selectPurchasePlanById(purchasePlanId); + mmap.put("purchasePlan", purchasePlan); + return prefix + "/detail"; + } /** * 修改保存采购计划单 */ - @RequiresPermissions("purchase:plan:edit") + @RequiresPermissions("purchase:purchasePlan:edit") @Log(title = "采购计划单", businessType = BusinessType.UPDATE) @PostMapping("/edit") @ResponseBody @@ -116,7 +122,7 @@ public class PurchasePlanController extends BaseController /** * 删除采购计划单 */ - @RequiresPermissions("purchase:plan:remove") + @RequiresPermissions("purchase:purchasePlan:remove") @Log(title = "采购计划单", businessType = BusinessType.DELETE) @PostMapping( "/remove") @ResponseBody @@ -128,7 +134,7 @@ public class PurchasePlanController extends BaseController /** * 作废采购计划单 */ - @RequiresPermissions("purchase:plan:cancel") + @RequiresPermissions("purchase:purchasePlan:cancel") @Log(title = "采购计划单", businessType = BusinessType.CANCEL) @GetMapping( "/cancel/{id}") @ResponseBody @@ -139,7 +145,7 @@ public class PurchasePlanController extends BaseController /** * 恢复采购计划单 */ - @RequiresPermissions("purchase:plan:restore") + @RequiresPermissions("purchase:purchasePlan:restore") @Log(title = "采购计划单", businessType = BusinessType.RESTORE) @GetMapping( "/restore/{id}") @ResponseBody @@ -147,6 +153,4 @@ public class PurchasePlanController extends BaseController { return toAjax(purchasePlanService.restorePurchasePlanById(id)); } - - } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysPurchaseQuoteChildController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteChildController.java similarity index 58% rename from ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysPurchaseQuoteChildController.java rename to ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteChildController.java index c1a2ed2c..294c9e0d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysPurchaseQuoteChildController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteChildController.java @@ -1,6 +1,7 @@ -package com.ruoyi.system.controller; +package com.ruoyi.purchase.controller; import java.util.List; + import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -12,8 +13,8 @@ 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.system.domain.SysPurchaseQuoteChild; -import com.ruoyi.system.service.ISysPurchaseQuoteChildService; +import com.ruoyi.purchase.domain.PurchaseQuoteChild; +import com.ruoyi.purchase.service.IPurchaseQuoteChildService; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.poi.ExcelUtil; @@ -26,15 +27,15 @@ import com.ruoyi.common.core.page.TableDataInfo; * @date 2024-05-15 */ @Controller -@RequestMapping("/system/purchaseQuoteChild") -public class SysPurchaseQuoteChildController extends BaseController +@RequestMapping("/purchase/purchaseQuoteChild") +public class PurchaseQuoteChildController extends BaseController { - private String prefix = "system/purchaseQuoteChild"; + private String prefix = "purchase/purchaseQuoteChild"; @Autowired - private ISysPurchaseQuoteChildService sysPurchaseQuoteChildService; + private IPurchaseQuoteChildService purchaseQuoteChildService; - @RequiresPermissions("system:purchaseQuoteChild:view") + @RequiresPermissions("purchase:purchaseQuoteChild:view") @GetMapping() public String purchaseQuoteChild() { @@ -44,27 +45,27 @@ public class SysPurchaseQuoteChildController extends BaseController /** * 查询采购报价单物料信息列表 */ - @RequiresPermissions("system:purchaseQuoteChild:list") + @RequiresPermissions("purchase:purchaseQuoteChild:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(SysPurchaseQuoteChild sysPurchaseQuoteChild) + public TableDataInfo list(PurchaseQuoteChild purchaseQuoteChild) { startPage(); - List list = sysPurchaseQuoteChildService.selectSysPurchaseQuoteChildList(sysPurchaseQuoteChild); + List list = purchaseQuoteChildService.selectPurchaseQuoteChildList(purchaseQuoteChild); return getDataTable(list); } /** * 导出采购报价单物料信息列表 */ - @RequiresPermissions("system:purchaseQuoteChild:export") + @RequiresPermissions("purchase:purchaseQuoteChild:export") @Log(title = "采购报价单物料信息", businessType = BusinessType.EXPORT) @PostMapping("/export") @ResponseBody - public AjaxResult export(SysPurchaseQuoteChild sysPurchaseQuoteChild) + public AjaxResult export(PurchaseQuoteChild purchaseQuoteChild) { - List list = sysPurchaseQuoteChildService.selectSysPurchaseQuoteChildList(sysPurchaseQuoteChild); - ExcelUtil util = new ExcelUtil(SysPurchaseQuoteChild.class); + List list = purchaseQuoteChildService.selectPurchaseQuoteChildList(purchaseQuoteChild); + ExcelUtil util = new ExcelUtil(PurchaseQuoteChild.class); return util.exportExcel(list, "采购报价单物料信息数据"); } @@ -80,13 +81,13 @@ public class SysPurchaseQuoteChildController extends BaseController /** * 新增保存采购报价单物料信息 */ - @RequiresPermissions("system:purchaseQuoteChild:add") + @RequiresPermissions("purchase:purchaseQuoteChild:add") @Log(title = "采购报价单物料信息", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody - public AjaxResult addSave(SysPurchaseQuoteChild sysPurchaseQuoteChild) + public AjaxResult addSave(PurchaseQuoteChild purchaseQuoteChild) { - return toAjax(sysPurchaseQuoteChildService.insertSysPurchaseQuoteChild(sysPurchaseQuoteChild)); + return toAjax(purchaseQuoteChildService.insertPurchaseQuoteChild(purchaseQuoteChild)); } /** @@ -95,56 +96,56 @@ public class SysPurchaseQuoteChildController extends BaseController @GetMapping("/edit/{purchaseQuoteChildId}") public String edit(@PathVariable("purchaseQuoteChildId") Long purchaseQuoteChildId, ModelMap mmap) { - SysPurchaseQuoteChild sysPurchaseQuoteChild = sysPurchaseQuoteChildService.selectSysPurchaseQuoteChildById(purchaseQuoteChildId); - mmap.put("sysPurchaseQuoteChild", sysPurchaseQuoteChild); + PurchaseQuoteChild purchaseQuoteChild = purchaseQuoteChildService.selectPurchaseQuoteChildById(purchaseQuoteChildId); + mmap.put("purchaseQuoteChild", purchaseQuoteChild); return prefix + "/edit"; } /** * 修改保存采购报价单物料信息 */ - @RequiresPermissions("system:purchaseQuoteChild:edit") + @RequiresPermissions("purchase:purchaseQuoteChild:edit") @Log(title = "采购报价单物料信息", businessType = BusinessType.UPDATE) @PostMapping("/edit") @ResponseBody - public AjaxResult editSave(SysPurchaseQuoteChild sysPurchaseQuoteChild) + public AjaxResult editSave(PurchaseQuoteChild purchaseQuoteChild) { - return toAjax(sysPurchaseQuoteChildService.updateSysPurchaseQuoteChild(sysPurchaseQuoteChild)); + return toAjax(purchaseQuoteChildService.updatePurchaseQuoteChild(purchaseQuoteChild)); } /** * 删除采购报价单物料信息 */ - @RequiresPermissions("system:purchaseQuoteChild:remove") + @RequiresPermissions("purchase:purchaseQuoteChild:remove") @Log(title = "采购报价单物料信息", businessType = BusinessType.DELETE) @PostMapping( "/remove") @ResponseBody public AjaxResult remove(String ids) { - return toAjax(sysPurchaseQuoteChildService.deleteSysPurchaseQuoteChildByIds(ids)); + return toAjax(purchaseQuoteChildService.deletePurchaseQuoteChildByIds(ids)); } /** * 作废采购报价单物料信息 */ - @RequiresPermissions("system:purchaseQuoteChild:cancel") + @RequiresPermissions("purchase:purchaseQuoteChild:cancel") @Log(title = "采购报价单物料信息", businessType = BusinessType.CANCEL) @GetMapping( "/cancel/{id}") @ResponseBody public AjaxResult cancel(@PathVariable("id") Long id){ - return toAjax(sysPurchaseQuoteChildService.cancelSysPurchaseQuoteChildById(id)); + return toAjax(purchaseQuoteChildService.cancelPurchaseQuoteChildById(id)); } /** * 恢复采购报价单物料信息 */ - @RequiresPermissions("system:purchaseQuoteChild:restore") + @RequiresPermissions("purchase:purchaseQuoteChild:restore") @Log(title = "采购报价单物料信息", businessType = BusinessType.RESTORE) @GetMapping( "/restore/{id}") @ResponseBody public AjaxResult restore(@PathVariable("id")Long id) { - return toAjax(sysPurchaseQuoteChildService.restoreSysPurchaseQuoteChildById(id)); + return toAjax(purchaseQuoteChildService.restorePurchaseQuoteChildById(id)); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java index 206d66e1..3b4a99db 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java @@ -5,11 +5,7 @@ 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 org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.purchase.domain.PurchaseQuote; @@ -84,9 +80,10 @@ public class PurchaseQuoteController extends BaseController @Log(title = "采购报价单", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody - public AjaxResult addSave(PurchaseQuote purchaseQuote) + public AjaxResult addSave(@RequestBody PurchaseQuote purchaseQuote) { - return toAjax(purchaseQuoteService.insertPurchaseQuote(purchaseQuote)); + purchaseQuoteService.insertPurchaseQuote(purchaseQuote); + return AjaxResult.success(); } /** @@ -107,9 +104,10 @@ public class PurchaseQuoteController extends BaseController @Log(title = "采购报价单", businessType = BusinessType.UPDATE) @PostMapping("/edit") @ResponseBody - public AjaxResult editSave(PurchaseQuote purchaseQuote) + public AjaxResult editSave(@RequestBody PurchaseQuote purchaseQuote) { - return toAjax(purchaseQuoteService.updatePurchaseQuote(purchaseQuote)); + purchaseQuoteService.updatePurchaseQuote(purchaseQuote); + return AjaxResult.success(); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlanChild.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlanChild.java new file mode 100644 index 00000000..98116ed5 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlanChild.java @@ -0,0 +1,261 @@ +package com.ruoyi.purchase.domain; + +import java.math.BigDecimal; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 采购计划单物料信息对象 purchase_plan_child + * + * @author zhang + * @date 2024-05-16 + */ +public class PurchasePlanChild extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 采购计划物料清单索引 */ + private Long purchasePlanChildId; + + /** 关联采购计划编号字段 */ + @Excel(name = "关联采购计划编号字段") + private String purchasePlanCode; + + /** 物料表中的id */ + @Excel(name = "物料表中的id") + private Long materialId; + + /** 物料表中的编号 */ + @Excel(name = "物料表中的编号") + private String materialCode; + + /** 物料的名称 */ + @Excel(name = "物料的名称") + private String materialName; + + /** 物料的类型 */ + @Excel(name = "物料的类型") + private String materialType; + + /** 物料的加工方式 */ + @Excel(name = "物料的加工方式") + private String processMethod; + + /** 物料的品牌 */ + @Excel(name = "物料的品牌") + private String brand; + + /** 物料的图片 */ + @Excel(name = "物料的图片") + private String photoUrl; + + /** 物料的描述 */ + @Excel(name = "物料的描述") + private String describe; + + /** 采购计划数 */ + @Excel(name = "采购计划数") + private Long materialNum; + + /** 物料的对外报价 */ + private Long materialSole; + + /** 物料的不含税单价(RMB) */ + private BigDecimal materialRmb; + + /** 物料的含税单价(RMB) */ + private BigDecimal materialNormb; + + /** 使用状态 */ + private String useStatus; + + /** 审核状态 */ + private String auditStatus; + + /** 删除标志 */ + private String delFlag; + + public void setPurchasePlanChildId(Long purchasePlanChildId) + { + this.purchasePlanChildId = purchasePlanChildId; + } + + public Long getPurchasePlanChildId() + { + return purchasePlanChildId; + } + public void setPurchasePlanCode(String purchasePlanCode) + { + this.purchasePlanCode = purchasePlanCode; + } + + public String getPurchasePlanCode() + { + return purchasePlanCode; + } + public void setMaterialId(Long materialId) + { + this.materialId = materialId; + } + + public Long getMaterialId() + { + return materialId; + } + public void setMaterialCode(String materialCode) + { + this.materialCode = materialCode; + } + + public String getMaterialCode() + { + return materialCode; + } + public void setMaterialName(String materialName) + { + this.materialName = materialName; + } + + public String getMaterialName() + { + return materialName; + } + public void setMaterialType(String materialType) + { + this.materialType = materialType; + } + + public String getMaterialType() + { + return materialType; + } + public void setProcessMethod(String processMethod) + { + this.processMethod = processMethod; + } + + public String getProcessMethod() + { + return processMethod; + } + public void setBrand(String brand) + { + this.brand = brand; + } + + public String getBrand() + { + return brand; + } + public void setPhotoUrl(String photoUrl) + { + this.photoUrl = photoUrl; + } + + public String getPhotoUrl() + { + return photoUrl; + } + public void setDescribe(String describe) + { + this.describe = describe; + } + + public String getDescribe() + { + return describe; + } + public void setMaterialNum(Long materialNum) + { + this.materialNum = materialNum; + } + + public Long getMaterialNum() + { + return materialNum; + } + public void setMaterialSole(Long materialSole) + { + this.materialSole = materialSole; + } + + public Long getMaterialSole() + { + return materialSole; + } + public void setMaterialRmb(BigDecimal materialRmb) + { + this.materialRmb = materialRmb; + } + + public BigDecimal getMaterialRmb() + { + return materialRmb; + } + public void setMaterialNormb(BigDecimal materialNormb) + { + this.materialNormb = materialNormb; + } + + public BigDecimal getMaterialNormb() + { + return materialNormb; + } + public void setUseStatus(String useStatus) + { + this.useStatus = useStatus; + } + + public String getUseStatus() + { + return useStatus; + } + public void setAuditStatus(String auditStatus) + { + this.auditStatus = auditStatus; + } + + public String getAuditStatus() + { + return auditStatus; + } + public void setDelFlag(String delFlag) + { + this.delFlag = delFlag; + } + + public String getDelFlag() + { + return delFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("purchasePlanChildId", getPurchasePlanChildId()) + .append("purchasePlanCode", getPurchasePlanCode()) + .append("materialId", getMaterialId()) + .append("materialCode", getMaterialCode()) + .append("materialName", getMaterialName()) + .append("materialType", getMaterialType()) + .append("processMethod", getProcessMethod()) + .append("brand", getBrand()) + .append("photoUrl", getPhotoUrl()) + .append("describe", getDescribe()) + .append("materialNum", getMaterialNum()) + .append("materialSole", getMaterialSole()) + .append("materialRmb", getMaterialRmb()) + .append("materialNormb", getMaterialNormb()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("useStatus", getUseStatus()) + .append("auditStatus", getAuditStatus()) + .append("delFlag", getDelFlag()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuote.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuote.java index d3f95436..12b682af 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuote.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuote.java @@ -1,9 +1,7 @@ package com.ruoyi.purchase.domain; -import java.math.BigDecimal; import java.util.List; -import com.ruoyi.system.domain.SysPurchaseQuoteChild; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -83,14 +81,14 @@ public class PurchaseQuote extends BaseEntity private String removeFileIdStr; - private List purchaseQuoteChildList; + private List purchaseQuoteChildList; - public List getPurchaseQuoteChildList() { + public List getPurchaseQuoteChildList() { return purchaseQuoteChildList; } - public void setPurchaseQuoteChildList(List purchaseQuoteChildList) { + public void setPurchaseQuoteChildList(List purchaseQuoteChildList) { this.purchaseQuoteChildList = purchaseQuoteChildList; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPurchaseQuoteChild.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteChild.java similarity index 97% rename from ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPurchaseQuoteChild.java rename to ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteChild.java index 12bd48ce..b1a187cb 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPurchaseQuoteChild.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteChild.java @@ -1,4 +1,4 @@ -package com.ruoyi.system.domain; +package com.ruoyi.purchase.domain; import java.math.BigDecimal; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -7,12 +7,12 @@ import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; /** - * 采购报价单物料信息对象 sys_purchase_quote_child + * 采购报价单物料信息对象 purchase_quote_child * * @author zhang * @date 2024-05-15 */ -public class SysPurchaseQuoteChild extends BaseEntity +public class PurchaseQuoteChild extends BaseEntity { private static final long serialVersionUID = 1L; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchasePlanChildMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchasePlanChildMapper.java new file mode 100644 index 00000000..ec86ae0f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchasePlanChildMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.purchase.mapper; + +import java.util.List; +import com.ruoyi.purchase.domain.PurchasePlanChild; + +/** + * 采购计划单物料信息Mapper接口 + * + * @author zhang + * @date 2024-05-16 + */ +public interface PurchasePlanChildMapper +{ + /** + * 查询采购计划单物料信息 + * + * @param purchasePlanChildId 采购计划单物料信息ID + * @return 采购计划单物料信息 + */ + public PurchasePlanChild selectPurchasePlanChildById(Long purchasePlanChildId); + + /** + * 查询采购计划单物料信息列表 + * + * @param purchasePlanChild 采购计划单物料信息 + * @return 采购计划单物料信息集合 + */ + public List selectPurchasePlanChildList(PurchasePlanChild purchasePlanChild); + + /** + * 新增采购计划单物料信息 + * + * @param purchasePlanChild 采购计划单物料信息 + * @return 结果 + */ + public int insertPurchasePlanChild(PurchasePlanChild purchasePlanChild); + + /** + * 修改采购计划单物料信息 + * + * @param purchasePlanChild 采购计划单物料信息 + * @return 结果 + */ + public int updatePurchasePlanChild(PurchasePlanChild purchasePlanChild); + + /** + * 删除采购计划单物料信息 + * + * @param purchasePlanChildId 采购计划单物料信息ID + * @return 结果 + */ + public int deletePurchasePlanChildById(Long purchasePlanChildId); + + /** + * 批量删除采购计划单物料信息 + * + * @param purchasePlanChildIds 需要删除的数据ID + * @return 结果 + */ + public int deletePurchasePlanChildByIds(String[] purchasePlanChildIds); + + /** + * 作废采购计划单物料信息 + * + * @param purchasePlanChildId 采购计划单物料信息ID + * @return 结果 + */ + public int cancelPurchasePlanChildById(Long purchasePlanChildId); + + /** + * 恢复采购计划单物料信息 + * + * @param purchasePlanChildId 采购计划单物料信息ID + * @return 结果 + */ + public int restorePurchasePlanChildById(Long purchasePlanChildId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysPurchaseQuoteChildMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteChildMapper.java similarity index 62% rename from ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysPurchaseQuoteChildMapper.java rename to ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteChildMapper.java index 1c09a506..1fc3830f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysPurchaseQuoteChildMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteChildMapper.java @@ -1,7 +1,7 @@ -package com.ruoyi.system.mapper; +package com.ruoyi.purchase.mapper; import java.util.List; -import com.ruoyi.system.domain.SysPurchaseQuoteChild; +import com.ruoyi.purchase.domain.PurchaseQuoteChild; /** * 采购报价单物料信息Mapper接口 @@ -9,7 +9,7 @@ import com.ruoyi.system.domain.SysPurchaseQuoteChild; * @author zhang * @date 2024-05-15 */ -public interface SysPurchaseQuoteChildMapper +public interface PurchaseQuoteChildMapper { /** * 查询采购报价单物料信息 @@ -17,7 +17,7 @@ public interface SysPurchaseQuoteChildMapper * @param purchaseQuoteChildId 采购报价单物料信息ID * @return 采购报价单物料信息 */ - public SysPurchaseQuoteChild selectSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + public PurchaseQuoteChild selectPurchaseQuoteChildById(Long purchaseQuoteChildId); /** * 查询采购报价单物料信息列表 @@ -25,7 +25,7 @@ public interface SysPurchaseQuoteChildMapper * @param sysPurchaseQuoteChild 采购报价单物料信息 * @return 采购报价单物料信息集合 */ - public List selectSysPurchaseQuoteChildList(SysPurchaseQuoteChild sysPurchaseQuoteChild); + public List selectPurchaseQuoteChildList(PurchaseQuoteChild sysPurchaseQuoteChild); /** * 新增采购报价单物料信息 @@ -33,7 +33,7 @@ public interface SysPurchaseQuoteChildMapper * @param sysPurchaseQuoteChild 采购报价单物料信息 * @return 结果 */ - public int insertSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild); + public int insertPurchaseQuoteChild(PurchaseQuoteChild sysPurchaseQuoteChild); /** * 修改采购报价单物料信息 @@ -41,7 +41,7 @@ public interface SysPurchaseQuoteChildMapper * @param sysPurchaseQuoteChild 采购报价单物料信息 * @return 结果 */ - public int updateSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild); + public int updatePurchaseQuoteChild(PurchaseQuoteChild sysPurchaseQuoteChild); /** * 删除采购报价单物料信息 @@ -49,7 +49,7 @@ public interface SysPurchaseQuoteChildMapper * @param purchaseQuoteChildId 采购报价单物料信息ID * @return 结果 */ - public int deleteSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + public int deletePurchaseQuoteChildById(Long purchaseQuoteChildId); /** * 批量删除采购报价单物料信息 @@ -57,7 +57,7 @@ public interface SysPurchaseQuoteChildMapper * @param purchaseQuoteChildIds 需要删除的数据ID * @return 结果 */ - public int deleteSysPurchaseQuoteChildByIds(String[] purchaseQuoteChildIds); + public int deletePurchaseQuoteChildByIds(String[] purchaseQuoteChildIds); /** * 作废采购报价单物料信息 @@ -65,7 +65,7 @@ public interface SysPurchaseQuoteChildMapper * @param purchaseQuoteChildId 采购报价单物料信息ID * @return 结果 */ - public int cancelSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + public int cancelPurchaseQuoteChildById(Long purchaseQuoteChildId); /** * 恢复采购报价单物料信息 @@ -73,5 +73,5 @@ public interface SysPurchaseQuoteChildMapper * @param purchaseQuoteChildId 采购报价单物料信息ID * @return 结果 */ - public int restoreSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + public int restorePurchaseQuoteChildById(Long purchaseQuoteChildId); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchasePlanChildService.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchasePlanChildService.java new file mode 100644 index 00000000..6f3e4629 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchasePlanChildService.java @@ -0,0 +1,75 @@ +package com.ruoyi.purchase.service; + +import java.util.List; +import com.ruoyi.purchase.domain.PurchasePlanChild; + +/** + * 采购计划单物料信息Service接口 + * + * @author zhang + * @date 2024-05-16 + */ +public interface IPurchasePlanChildService +{ + /** + * 查询采购计划单物料信息 + * + * @param purchasePlanChildId 采购计划单物料信息ID + * @return 采购计划单物料信息 + */ + public PurchasePlanChild selectPurchasePlanChildById(Long purchasePlanChildId); + + /** + * 查询采购计划单物料信息列表 + * + * @param purchasePlanChild 采购计划单物料信息 + * @return 采购计划单物料信息集合 + */ + public List selectPurchasePlanChildList(PurchasePlanChild purchasePlanChild); + + /** + * 新增采购计划单物料信息 + * + * @param purchasePlanChild 采购计划单物料信息 + * @return 结果 + */ + public int insertPurchasePlanChild(PurchasePlanChild purchasePlanChild); + + /** + * 修改采购计划单物料信息 + * + * @param purchasePlanChild 采购计划单物料信息 + * @return 结果 + */ + public int updatePurchasePlanChild(PurchasePlanChild purchasePlanChild); + + /** + * 批量删除采购计划单物料信息 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deletePurchasePlanChildByIds(String ids); + + /** + * 删除采购计划单物料信息信息 + * + * @param purchasePlanChildId 采购计划单物料信息ID + * @return 结果 + */ + public int deletePurchasePlanChildById(Long purchasePlanChildId); + + /** + * 作废采购计划单物料信息 + * @param purchasePlanChildId 采购计划单物料信息ID + * @return + */ + int cancelPurchasePlanChildById(Long purchasePlanChildId); + + /** + * 恢复采购计划单物料信息 + * @param purchasePlanChildId 采购计划单物料信息ID + * @return + */ + int restorePurchasePlanChildById(Long purchasePlanChildId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPurchaseQuoteChildService.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteChildService.java similarity index 62% rename from ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPurchaseQuoteChildService.java rename to ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteChildService.java index 41ca15d0..b6e25db6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPurchaseQuoteChildService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteChildService.java @@ -1,7 +1,7 @@ -package com.ruoyi.system.service; +package com.ruoyi.purchase.service; import java.util.List; -import com.ruoyi.system.domain.SysPurchaseQuoteChild; +import com.ruoyi.purchase.domain.PurchaseQuoteChild; /** * 采购报价单物料信息Service接口 @@ -9,7 +9,7 @@ import com.ruoyi.system.domain.SysPurchaseQuoteChild; * @author zhang * @date 2024-05-15 */ -public interface ISysPurchaseQuoteChildService +public interface IPurchaseQuoteChildService { /** * 查询采购报价单物料信息 @@ -17,7 +17,7 @@ public interface ISysPurchaseQuoteChildService * @param purchaseQuoteChildId 采购报价单物料信息ID * @return 采购报价单物料信息 */ - public SysPurchaseQuoteChild selectSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + public PurchaseQuoteChild selectPurchaseQuoteChildById(Long purchaseQuoteChildId); /** * 查询采购报价单物料信息列表 @@ -25,7 +25,7 @@ public interface ISysPurchaseQuoteChildService * @param sysPurchaseQuoteChild 采购报价单物料信息 * @return 采购报价单物料信息集合 */ - public List selectSysPurchaseQuoteChildList(SysPurchaseQuoteChild sysPurchaseQuoteChild); + public List selectPurchaseQuoteChildList(PurchaseQuoteChild sysPurchaseQuoteChild); /** * 新增采购报价单物料信息 @@ -33,7 +33,7 @@ public interface ISysPurchaseQuoteChildService * @param sysPurchaseQuoteChild 采购报价单物料信息 * @return 结果 */ - public int insertSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild); + public int insertPurchaseQuoteChild(PurchaseQuoteChild sysPurchaseQuoteChild); /** * 修改采购报价单物料信息 @@ -41,7 +41,7 @@ public interface ISysPurchaseQuoteChildService * @param sysPurchaseQuoteChild 采购报价单物料信息 * @return 结果 */ - public int updateSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild); + public int updatePurchaseQuoteChild(PurchaseQuoteChild sysPurchaseQuoteChild); /** * 批量删除采购报价单物料信息 @@ -49,7 +49,7 @@ public interface ISysPurchaseQuoteChildService * @param ids 需要删除的数据ID * @return 结果 */ - public int deleteSysPurchaseQuoteChildByIds(String ids); + public int deletePurchaseQuoteChildByIds(String ids); /** * 删除采购报价单物料信息信息 @@ -57,19 +57,19 @@ public interface ISysPurchaseQuoteChildService * @param purchaseQuoteChildId 采购报价单物料信息ID * @return 结果 */ - public int deleteSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + public int deletePurchaseQuoteChildById(Long purchaseQuoteChildId); /** * 作废采购报价单物料信息 * @param purchaseQuoteChildId 采购报价单物料信息ID * @return */ - int cancelSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + int cancelPurchaseQuoteChildById(Long purchaseQuoteChildId); /** * 恢复采购报价单物料信息 * @param purchaseQuoteChildId 采购报价单物料信息ID * @return */ - int restoreSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + int restorePurchaseQuoteChildById(Long purchaseQuoteChildId); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanChildServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanChildServiceImpl.java new file mode 100644 index 00000000..254246e2 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanChildServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.purchase.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.purchase.mapper.PurchasePlanChildMapper; +import com.ruoyi.purchase.domain.PurchasePlanChild; +import com.ruoyi.purchase.service.IPurchasePlanChildService; +import com.ruoyi.common.core.text.Convert; + +/** + * 采购计划单物料信息Service业务层处理 + * + * @author zhang + * @date 2024-05-16 + */ +@Service +public class PurchasePlanChildServiceImpl implements IPurchasePlanChildService +{ + @Autowired + private PurchasePlanChildMapper purchasePlanChildMapper; + + /** + * 查询采购计划单物料信息 + * + * @param purchasePlanChildId 采购计划单物料信息ID + * @return 采购计划单物料信息 + */ + @Override + public PurchasePlanChild selectPurchasePlanChildById(Long purchasePlanChildId) + { + return purchasePlanChildMapper.selectPurchasePlanChildById(purchasePlanChildId); + } + + /** + * 查询采购计划单物料信息列表 + * + * @param purchasePlanChild 采购计划单物料信息 + * @return 采购计划单物料信息 + */ + @Override + public List selectPurchasePlanChildList(PurchasePlanChild purchasePlanChild) + { + return purchasePlanChildMapper.selectPurchasePlanChildList(purchasePlanChild); + } + + /** + * 新增采购计划单物料信息 + * + * @param purchasePlanChild 采购计划单物料信息 + * @return 结果 + */ + @Override + public int insertPurchasePlanChild(PurchasePlanChild purchasePlanChild) + { + String loginName = ShiroUtils.getLoginName(); + purchasePlanChild.setCreateBy(loginName); + purchasePlanChild.setCreateTime(DateUtils.getNowDate()); + return purchasePlanChildMapper.insertPurchasePlanChild(purchasePlanChild); + } + + /** + * 修改采购计划单物料信息 + * + * @param purchasePlanChild 采购计划单物料信息 + * @return 结果 + */ + @Override + public int updatePurchasePlanChild(PurchasePlanChild purchasePlanChild) + { + String loginName = ShiroUtils.getLoginName(); + purchasePlanChild.setUpdateBy(loginName); + purchasePlanChild.setUpdateTime(DateUtils.getNowDate()); + return purchasePlanChildMapper.updatePurchasePlanChild(purchasePlanChild); + } + + /** + * 删除采购计划单物料信息对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deletePurchasePlanChildByIds(String ids) + { + return purchasePlanChildMapper.deletePurchasePlanChildByIds(Convert.toStrArray(ids)); + } + + /** + * 删除采购计划单物料信息信息 + * + * @param purchasePlanChildId 采购计划单物料信息ID + * @return 结果 + */ + @Override + public int deletePurchasePlanChildById(Long purchasePlanChildId) + { + return purchasePlanChildMapper.deletePurchasePlanChildById(purchasePlanChildId); + } + + /** + * 作废采购计划单物料信息 + * + * @param purchasePlanChildId 采购计划单物料信息ID + * @return 结果 + */ + @Override + public int cancelPurchasePlanChildById(Long purchasePlanChildId) + { + return purchasePlanChildMapper.cancelPurchasePlanChildById(purchasePlanChildId); + } + + /** + * 恢复采购计划单物料信息信息 + * + * @param purchasePlanChildId 采购计划单物料信息ID + * @return 结果 + */ + @Override + public int restorePurchasePlanChildById(Long purchasePlanChildId) + { + return purchasePlanChildMapper.restorePurchasePlanChildById(purchasePlanChildId); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteChildServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteChildServiceImpl.java new file mode 100644 index 00000000..1a944771 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteChildServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.purchase.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.purchase.mapper.PurchaseQuoteChildMapper; +import com.ruoyi.purchase.domain.PurchaseQuoteChild; +import com.ruoyi.purchase.service.IPurchaseQuoteChildService; +import com.ruoyi.common.core.text.Convert; + +/** + * 采购报价单物料信息Service业务层处理 + * + * @author zhang + * @date 2024-05-15 + */ +@Service +public class PurchaseQuoteChildServiceImpl implements IPurchaseQuoteChildService +{ + @Autowired + private PurchaseQuoteChildMapper purchaseQuoteChildMapper; + + /** + * 查询采购报价单物料信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 采购报价单物料信息 + */ + @Override + public PurchaseQuoteChild selectPurchaseQuoteChildById(Long purchaseQuoteChildId) + { + return purchaseQuoteChildMapper.selectPurchaseQuoteChildById(purchaseQuoteChildId); + } + + /** + * 查询采购报价单物料信息列表 + * + * @param purchaseQuoteChild 采购报价单物料信息 + * @return 采购报价单物料信息 + */ + @Override + public List selectPurchaseQuoteChildList(PurchaseQuoteChild purchaseQuoteChild) + { + return purchaseQuoteChildMapper.selectPurchaseQuoteChildList(purchaseQuoteChild); + } + + /** + * 新增采购报价单物料信息 + * + * @param purchaseQuoteChild 采购报价单物料信息 + * @return 结果 + */ + @Override + public int insertPurchaseQuoteChild(PurchaseQuoteChild purchaseQuoteChild) + { + String loginName = ShiroUtils.getLoginName(); + purchaseQuoteChild.setCreateBy(loginName); + purchaseQuoteChild.setCreateTime(DateUtils.getNowDate()); + return purchaseQuoteChildMapper.insertPurchaseQuoteChild(purchaseQuoteChild); + } + + /** + * 修改采购报价单物料信息 + * + * @param purchaseQuoteChild 采购报价单物料信息 + * @return 结果 + */ + @Override + public int updatePurchaseQuoteChild(PurchaseQuoteChild purchaseQuoteChild) + { + String loginName = ShiroUtils.getLoginName(); + purchaseQuoteChild.setUpdateBy(loginName); + purchaseQuoteChild.setUpdateTime(DateUtils.getNowDate()); + return purchaseQuoteChildMapper.updatePurchaseQuoteChild(purchaseQuoteChild); + } + + /** + * 删除采购报价单物料信息对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deletePurchaseQuoteChildByIds(String ids) + { + return purchaseQuoteChildMapper.deletePurchaseQuoteChildByIds(Convert.toStrArray(ids)); + } + + /** + * 删除采购报价单物料信息信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 结果 + */ + @Override + public int deletePurchaseQuoteChildById(Long purchaseQuoteChildId) + { + return purchaseQuoteChildMapper.deletePurchaseQuoteChildById(purchaseQuoteChildId); + } + + /** + * 作废采购报价单物料信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 结果 + */ + @Override + public int cancelPurchaseQuoteChildById(Long purchaseQuoteChildId) + { + return purchaseQuoteChildMapper.cancelPurchaseQuoteChildById(purchaseQuoteChildId); + } + + /** + * 恢复采购报价单物料信息信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 结果 + */ + @Override + public int restorePurchaseQuoteChildById(Long purchaseQuoteChildId) + { + return purchaseQuoteChildMapper.restorePurchaseQuoteChildById(purchaseQuoteChildId); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java index 0597010a..8fddb547 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java @@ -1,7 +1,6 @@ package com.ruoyi.purchase.service.impl; import java.util.Arrays; -import java.util.Date; import java.util.List; import com.ruoyi.common.service.ICommonService; @@ -11,11 +10,11 @@ import com.ruoyi.common.utils.StringUtils; import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; import com.ruoyi.system.domain.SysAttach; -import com.ruoyi.system.domain.SysPurchaseQuoteChild; +import com.ruoyi.purchase.domain.PurchaseQuoteChild; import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.service.ISysAttachFileService; import com.ruoyi.system.service.ISysAttachService; -import com.ruoyi.system.service.ISysPurchaseQuoteChildService; +import com.ruoyi.purchase.service.IPurchaseQuoteChildService; import com.ruoyi.system.service.ISysRoleService; import org.activiti.engine.TaskService; import org.springframework.beans.factory.annotation.Autowired; @@ -63,7 +62,7 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService private ISysRoleService roleService; @Autowired - private ISysPurchaseQuoteChildService purchaseQuoteChildService; + private IPurchaseQuoteChildService purchaseQuoteChildService; /** * 查询采购报价单 * @@ -118,15 +117,15 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService List fileIdList = Arrays.asList(fileIdStr.split(";")); attachFileService.updateAttachIdByIdList(attachId,fileIdList); } - List childList = purchaseQuote.getPurchaseQuoteChildList(); + List childList = purchaseQuote.getPurchaseQuoteChildList(); int childResult = childList.size(); if(childResult >= 1){ - for(SysPurchaseQuoteChild child : purchaseQuote.getPurchaseQuoteChildList()){ + for(PurchaseQuoteChild child : purchaseQuote.getPurchaseQuoteChildList()){ child.setPurchaseQuoteCode(purchaseQuote.getPurchaseQuoteCode()); child.setCreateBy(loginName); child.setCreateTime(DateUtils.getNowDate()); child.setTaxRate(purchaseQuote.getTaxRate()); - purchaseQuoteChildService.insertSysPurchaseQuoteChild(child); + purchaseQuoteChildService.insertPurchaseQuoteChild(child); } } return result; @@ -169,15 +168,15 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService } attachFileService.updateAttachIdByIdList(photoAttachId, fileIdList); } - List childList = purchaseQuote.getPurchaseQuoteChildList(); + List childList = purchaseQuote.getPurchaseQuoteChildList(); int childResult = childList.size(); if(childResult >= 1){ - for(SysPurchaseQuoteChild child : purchaseQuote.getPurchaseQuoteChildList()){ + for(PurchaseQuoteChild child : purchaseQuote.getPurchaseQuoteChildList()){ child.setPurchaseQuoteCode(purchaseQuote.getPurchaseQuoteCode()); child.setCreateBy(loginName); child.setCreateTime(DateUtils.getNowDate()); child.setTaxRate(purchaseQuote.getTaxRate()); - purchaseQuoteChildService.updateSysPurchaseQuoteChild(child); + purchaseQuoteChildService.updatePurchaseQuoteChild(child); } } return purchaseQuoteMapper.updatePurchaseQuote(purchaseQuote); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPurchaseQuoteChildServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPurchaseQuoteChildServiceImpl.java deleted file mode 100644 index a2061ea6..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPurchaseQuoteChildServiceImpl.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.ShiroUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.SysPurchaseQuoteChildMapper; -import com.ruoyi.system.domain.SysPurchaseQuoteChild; -import com.ruoyi.system.service.ISysPurchaseQuoteChildService; -import com.ruoyi.common.core.text.Convert; - -/** - * 采购报价单物料信息Service业务层处理 - * - * @author zhang - * @date 2024-05-15 - */ -@Service -public class SysPurchaseQuoteChildServiceImpl implements ISysPurchaseQuoteChildService -{ - @Autowired - private SysPurchaseQuoteChildMapper sysPurchaseQuoteChildMapper; - - /** - * 查询采购报价单物料信息 - * - * @param purchaseQuoteChildId 采购报价单物料信息ID - * @return 采购报价单物料信息 - */ - @Override - public SysPurchaseQuoteChild selectSysPurchaseQuoteChildById(Long purchaseQuoteChildId) - { - return sysPurchaseQuoteChildMapper.selectSysPurchaseQuoteChildById(purchaseQuoteChildId); - } - - /** - * 查询采购报价单物料信息列表 - * - * @param sysPurchaseQuoteChild 采购报价单物料信息 - * @return 采购报价单物料信息 - */ - @Override - public List selectSysPurchaseQuoteChildList(SysPurchaseQuoteChild sysPurchaseQuoteChild) - { - return sysPurchaseQuoteChildMapper.selectSysPurchaseQuoteChildList(sysPurchaseQuoteChild); - } - - /** - * 新增采购报价单物料信息 - * - * @param sysPurchaseQuoteChild 采购报价单物料信息 - * @return 结果 - */ - @Override - public int insertSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild) - { - String loginName = ShiroUtils.getLoginName(); - sysPurchaseQuoteChild.setCreateBy(loginName); - sysPurchaseQuoteChild.setCreateTime(DateUtils.getNowDate()); - return sysPurchaseQuoteChildMapper.insertSysPurchaseQuoteChild(sysPurchaseQuoteChild); - } - - /** - * 修改采购报价单物料信息 - * - * @param sysPurchaseQuoteChild 采购报价单物料信息 - * @return 结果 - */ - @Override - public int updateSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild) - { - String loginName = ShiroUtils.getLoginName(); - sysPurchaseQuoteChild.setUpdateBy(loginName); - sysPurchaseQuoteChild.setUpdateTime(DateUtils.getNowDate()); - return sysPurchaseQuoteChildMapper.updateSysPurchaseQuoteChild(sysPurchaseQuoteChild); - } - - /** - * 删除采购报价单物料信息对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteSysPurchaseQuoteChildByIds(String ids) - { - return sysPurchaseQuoteChildMapper.deleteSysPurchaseQuoteChildByIds(Convert.toStrArray(ids)); - } - - /** - * 删除采购报价单物料信息信息 - * - * @param purchaseQuoteChildId 采购报价单物料信息ID - * @return 结果 - */ - @Override - public int deleteSysPurchaseQuoteChildById(Long purchaseQuoteChildId) - { - return sysPurchaseQuoteChildMapper.deleteSysPurchaseQuoteChildById(purchaseQuoteChildId); - } - - /** - * 作废采购报价单物料信息 - * - * @param purchaseQuoteChildId 采购报价单物料信息ID - * @return 结果 - */ - @Override - public int cancelSysPurchaseQuoteChildById(Long purchaseQuoteChildId) - { - return sysPurchaseQuoteChildMapper.cancelSysPurchaseQuoteChildById(purchaseQuoteChildId); - } - - /** - * 恢复采购报价单物料信息信息 - * - * @param purchaseQuoteChildId 采购报价单物料信息ID - * @return 结果 - */ - @Override - public int restoreSysPurchaseQuoteChildById(Long purchaseQuoteChildId) - { - return sysPurchaseQuoteChildMapper.restoreSysPurchaseQuoteChildById(purchaseQuoteChildId); - } -} diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml new file mode 100644 index 00000000..93606865 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select purchase_plan_child_id, purchase_plan_code, material_id, material_code, material_name, material_type, process_method, brand, photoUrl, describe, material_num, material_sole, material_rmb, material_noRmb, create_by, create_time, update_by, update_time, remark, use_status, audit_status, del_flag from purchase_plan_child + + + + + + + + insert into purchase_plan_child + + purchase_plan_code, + material_id, + material_code, + material_name, + material_type, + process_method, + brand, + photoUrl, + describe, + material_num, + material_sole, + material_rmb, + material_noRmb, + create_by, + create_time, + update_by, + update_time, + remark, + use_status, + audit_status, + del_flag, + + + #{purchasePlanCode}, + #{materialId}, + #{materialCode}, + #{materialName}, + #{materialType}, + #{processMethod}, + #{brand}, + #{photoUrl}, + #{describe}, + #{materialNum}, + #{materialSole}, + #{materialRmb}, + #{materialNormb}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{useStatus}, + #{auditStatus}, + #{delFlag}, + + + + + update purchase_plan_child + + purchase_plan_code = #{purchasePlanCode}, + material_id = #{materialId}, + material_code = #{materialCode}, + material_name = #{materialName}, + material_type = #{materialType}, + process_method = #{processMethod}, + brand = #{brand}, + photoUrl = #{photoUrl}, + describe = #{describe}, + material_num = #{materialNum}, + material_sole = #{materialSole}, + material_rmb = #{materialRmb}, + material_noRmb = #{materialNormb}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + use_status = #{useStatus}, + audit_status = #{auditStatus}, + del_flag = #{delFlag}, + + where purchase_plan_child_id = #{purchasePlanChildId} + + + + delete from purchase_plan_child where purchase_plan_child_id = #{purchasePlanChildId} + + + + delete from purchase_plan_child where purchase_plan_child_id in + + #{purchasePlanChildId} + + + + + update purchase_plan_child set del_flag = '1' where purchase_plan_child_id = #{purchasePlanChildId} + + + + update purchase_plan_child set del_flag = '0' where purchase_plan_child_id = #{purchasePlanChildId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysPurchaseQuoteChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml similarity index 67% rename from ruoyi-admin/src/main/resources/mapper/system/SysPurchaseQuoteChildMapper.xml rename to ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml index bdf17ef3..2c753d7d 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/SysPurchaseQuoteChildMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml @@ -2,40 +2,43 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - select purchase_quote_child_id, purchase_quote_code, material_id, material_code, material_name, material_type, processMethod, brand, photoUrl, describe, tax_rate, usd_rate, material_num, material_sole, material_rmb, material_noRmb, create_by, create_time, update_by, update_time, remark, use_status, audit_status, del_flag from sys_purchase_quote_child + select purchase_quote_child_id, purchase_quote_code, material_id, material_code, + material_name, material_type, processMethod, brand, photoUrl, `describe`, tax_rate, usd_rate, + material_num, material_sole, material_rmb, material_noRmb, + create_by, create_time, update_by, update_time, remark, use_status, audit_status, + del_flag from purchase_quote_child - and purchase_quote_code = #{purchaseQuoteCode} @@ -56,13 +59,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - where purchase_quote_child_id = #{purchaseQuoteChildId} - - insert into sys_purchase_quote_child + + insert into purchase_quote_child purchase_quote_code, material_id, @@ -115,8 +118,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - update sys_purchase_quote_child + + update purchase_quote_child purchase_quote_code = #{purchaseQuoteCode}, material_id = #{materialId}, @@ -126,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" processMethod = #{processMethod}, brand = #{brand}, photoUrl = #{photoUrl}, - describe = #{describe}, + `describe` = #{describe}, tax_rate = #{taxRate}, usd_rate = #{usdRate}, material_num = #{materialNum}, @@ -146,22 +149,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from sys_purchase_quote_child where purchase_quote_child_id = #{purchaseQuoteChildId} + delete from purchase_quote_child where purchase_quote_child_id = #{purchaseQuoteChildId} - delete from sys_purchase_quote_child where purchase_quote_child_id in + delete from purchase_quote_child where purchase_quote_child_id in #{purchaseQuoteChildId} - update sys_purchase_quote_child set del_flag = '1' where purchase_quote_child_id = #{purchaseQuoteChildId} + update purchase_quote_child set del_flag = '1' where purchase_quote_child_id = #{purchaseQuoteChildId} - update sys_purchase_quote_child set del_flag = '0' where purchase_quote_child_id = #{purchaseQuoteChildId} + update purchase_quote_child set del_flag = '0' where purchase_quote_child_id = #{purchaseQuoteChildId} \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/purchase/plan/add.html b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/add.html similarity index 98% rename from ruoyi-admin/src/main/resources/templates/purchase/plan/add.html rename to ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/add.html index 414e5434..ec8747dd 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/plan/add.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/add.html @@ -104,9 +104,7 @@ + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/purchase/plan/edit.html b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/edit.html similarity index 100% rename from ruoyi-admin/src/main/resources/templates/purchase/plan/edit.html rename to ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/edit.html diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html new file mode 100644 index 00000000..4c881cb0 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html @@ -0,0 +1,165 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/add.html b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/add.html new file mode 100644 index 00000000..bfb03f5f --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/add.html @@ -0,0 +1,138 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/edit.html b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/edit.html new file mode 100644 index 00000000..cc8ffd1d --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/edit.html @@ -0,0 +1,133 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/purchase/plan/plan.html b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/purchasePlanChild.html similarity index 52% rename from ruoyi-admin/src/main/resources/templates/purchase/plan/plan.html rename to ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/purchasePlanChild.html index 0725b3a7..29392df8 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/plan/plan.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/purchasePlanChild.html @@ -1,7 +1,7 @@ - +
@@ -11,37 +11,53 @@
  • - + + +
  • +
  • +
  • - - +
  • +
  • + + +
  • +
  • + + +
  • +
  • + +
  • - - + +
  • - - + +
  • - - + +
  • - - -
  • -
  • - - - - - + +
  •  搜索 @@ -53,16 +69,16 @@
@@ -73,14 +89,11 @@
@@ -206,7 +208,7 @@ } }, {title: '最新报价',field: 'materialSole',align: 'center',}, - {title: '物料的数量', field: 'materialNum',align: 'center',editable: true,}, + {title: '物料的数量', field: 'materialNum',align: 'center',editable: true}, {title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',}, {title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',}, {title: '录入人',field: 'createBy',align: 'center',visible: false}, @@ -224,7 +226,6 @@ ] }; $.table.init(options); - selectSupplierCode(); selectSupplierName(); }); function doSubmit(index, layero,uniqueId){ @@ -266,38 +267,27 @@ } /* 删除指定表格行 */ function removeRow(id){ - $("#bootstrap-sub-table-requisitionChild").bootstrapTable('remove', { + $("#bootstrap-sub-table-requisitionChild").bootstrapTable('RemoveByUniqueId', { field: 'id', values: id }) } function submitHandler() { if ($.validate.form()) { - $.operate.save(prefix + "/add", $('#form-purchaseQuote-add').serialize()); + var formData = $("#form-purchaseQuote-add").serializeArray(); + console.log("formData",formData); + var tableData = $("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('getData'); + var rows = tableData.length; + if(rows==0){ + $.modal.msgError("子表数据不能为空!"); + }else{ + formData.push({"name": "purchaseQuoteChildList", "value": tableData}); + var jsonData = $.common.formDataToJson(formData); + $.operate.saveJson(prefix + "/add", jsonData); + } } } //获取供应商 - function selectSupplierCode(){ - $.ajax({ - url: ctx + 'system/supplier/getSupplier', - type: "post", - dataType: "json", - success: function (res) { - if (res.rows.length > 0) { - var usertData = res.rows; - //alert(JSON.stringify(data)); - for (let i in usertData) { - // console.log(finishProductData[i].finishProductCode) - $("#form-purchaseQuote-add select[name='supplierCode']").append( - ""); - } - } else { - $.modal.msgError(res.msg); - } - } - }); - } - function selectSupplierName(){ $.ajax({ url: ctx + 'system/supplier/getSupplier', @@ -308,6 +298,8 @@ var usertData = res.rows; //alert(JSON.stringify(data)); for (let i in usertData) { + $("#form-purchaseQuote-add select[name='supplierQuoteCode']").append( + ""); // console.log(finishProductData[i].finishProductCode) $("#form-purchaseQuote-add select[name='supplierName']").append( ""); diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html index f56c09bc..64db2cca 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html @@ -2,12 +2,16 @@ + + + + -
+
-
+