From c0ce049b578d1bff0be56f391c13b5180726f801 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Tue, 14 May 2024 19:47:37 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E5=9F=BA=E7=A1=80=E8=B5=84=E6=96=99?= =?UTF-8?q?=E6=A8=A1=E5=9D=97:=E6=B7=BB=E5=8A=A0=E5=91=98=E5=B7=A5?= =?UTF-8?q?=E9=A2=86=E6=96=99=E5=8D=95=EF=BC=8C=E6=96=B0=E5=A2=9E=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2,=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=8D=95=E6=8A=A5=E4=BB=B7=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2;=E5=A2=9E=E5=8A=A0=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E6=8A=A5=E4=BB=B7=E7=89=A9=E6=96=99=E4=BF=A1=E6=81=AF=E8=A1=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD;=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=AF=B7=E8=B4=AD=E5=8D=95=E6=8A=A5=E4=BB=B7=E7=89=A9=E6=96=99?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=AD=90=E8=A1=A8=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=AF=B7=E8=B4=AD=E5=8D=95=E7=89=A9=E6=96=99=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=AD=90=E8=A1=A8=E5=AF=B9=E8=B1=A1=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseEmpRequisiteOrderController.java | 151 ++++++++++ ...aseRequisitioningOrderChildController.java | 151 ++++++++++ .../BaseRequisitioningOrderController.java | 19 +- .../system/domain/BaseEmpRequisiteOrder.java | 183 ++++++++++++ .../domain/BaseRequisitioningOrder.java | 14 +- .../domain/BaseRequisitioningOrderChild.java | 282 ++++++++++++++++++ .../mapper/BaseEmpRequisiteOrderMapper.java | 77 +++++ .../BaseRequisitioningOrderChildMapper.java | 82 +++++ .../mapper/BaseRequisitioningOrderMapper.java | 4 + .../IBaseEmpRequisiteOrderService.java | 75 +++++ .../IBaseRequisitioningOrderChildService.java | 79 +++++ .../IBaseRequisitioningOrderService.java | 5 + .../BaseEmpRequisiteOrderServiceImpl.java | 126 ++++++++ ...seRequisitioningOrderChildServiceImpl.java | 135 +++++++++ .../BaseRequisitioningOrderServiceImpl.java | 40 +++ .../system/BaseEmpRequisiteOrderMapper.xml | 126 ++++++++ .../BaseRequisitioningOrderChildMapper.xml | 182 +++++++++++ .../system/BaseRequisitioningOrderMapper.xml | 12 +- .../templates/purchase/purchaseQuote/add.html | 251 ++++++++++++---- .../purchase/purchaseQuote/edit.html | 193 ++++++++---- .../purchase/purchaseQuote/purchaseQuote.html | 1 - .../system/empRequisiteOrder/add.html | 173 +++++++++++ .../system/empRequisiteOrder/edit.html | 171 +++++++++++ .../empRequisiteOrder/empRequisiteOrder.html | 161 ++++++++++ .../system/requesitioningChild/add.html | 144 +++++++++ .../system/requesitioningChild/edit.html | 145 +++++++++ .../requesitioningChild.html | 250 ++++++++++++++++ .../templates/system/requisitioning/add.html | 9 +- .../templates/system/requisitioning/edit.html | 17 +- 29 files changed, 3110 insertions(+), 148 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEmpRequisiteOrderController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseRequisitioningOrderChildController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseEmpRequisiteOrder.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseRequisitioningOrderChild.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseRequisitioningOrderChildMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEmpRequisiteOrderService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderChildService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEmpRequisiteOrderServiceImpl.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderChildServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderMapper.xml create mode 100644 ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderChildMapper.xml create mode 100644 ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/add.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/edit.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/requesitioningChild/add.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/requesitioningChild/edit.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/requesitioningChild/requesitioningChild.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEmpRequisiteOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEmpRequisiteOrderController.java new file mode 100644 index 00000000..85a087c5 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEmpRequisiteOrderController.java @@ -0,0 +1,151 @@ +package com.ruoyi.system.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.system.domain.BaseEmpRequisiteOrder; +import com.ruoyi.system.service.IBaseEmpRequisiteOrderService; +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-14 + */ +@Controller +@RequestMapping("/system/empRequisiteOrder") +public class BaseEmpRequisiteOrderController extends BaseController +{ + private String prefix = "system/empRequisiteOrder"; + + @Autowired + private IBaseEmpRequisiteOrderService baseEmpRequisiteOrderService; + + @RequiresPermissions("system:empRequisiteOrder:view") + @GetMapping() + public String empRequisiteOrder() + { + return prefix + "/empRequisiteOrder"; + } + + /** + * 查询员工领料单列表 + */ + @RequiresPermissions("system:empRequisiteOrder:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + { + startPage(); + List list = baseEmpRequisiteOrderService.selectBaseEmpRequisiteOrderList(baseEmpRequisiteOrder); + return getDataTable(list); + } + + /** + * 导出员工领料单列表 + */ + @RequiresPermissions("system:empRequisiteOrder:export") + @Log(title = "员工领料单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + { + List list = baseEmpRequisiteOrderService.selectBaseEmpRequisiteOrderList(baseEmpRequisiteOrder); + ExcelUtil util = new ExcelUtil(BaseEmpRequisiteOrder.class); + return util.exportExcel(list, "员工领料单数据"); + } + + /** + * 新增员工领料单 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存员工领料单 + */ + @RequiresPermissions("system:empRequisiteOrder:add") + @Log(title = "员工领料单", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + { + return toAjax(baseEmpRequisiteOrderService.insertBaseEmpRequisiteOrder(baseEmpRequisiteOrder)); + } + + /** + * 修改员工领料单 + */ + @GetMapping("/edit/{requisiteId}") + public String edit(@PathVariable("requisiteId") Long requisiteId, ModelMap mmap) + { + BaseEmpRequisiteOrder baseEmpRequisiteOrder = baseEmpRequisiteOrderService.selectBaseEmpRequisiteOrderById(requisiteId); + mmap.put("baseEmpRequisiteOrder", baseEmpRequisiteOrder); + return prefix + "/edit"; + } + + /** + * 修改保存员工领料单 + */ + @RequiresPermissions("system:empRequisiteOrder:edit") + @Log(title = "员工领料单", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + { + return toAjax(baseEmpRequisiteOrderService.updateBaseEmpRequisiteOrder(baseEmpRequisiteOrder)); + } + + /** + * 删除员工领料单 + */ + @RequiresPermissions("system:empRequisiteOrder:remove") + @Log(title = "员工领料单", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(baseEmpRequisiteOrderService.deleteBaseEmpRequisiteOrderByIds(ids)); + } + + /** + * 作废员工领料单 + */ + @RequiresPermissions("system:empRequisiteOrder:cancel") + @Log(title = "员工领料单", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(baseEmpRequisiteOrderService.cancelBaseEmpRequisiteOrderById(id)); + } + + /** + * 恢复员工领料单 + */ + @RequiresPermissions("system:empRequisiteOrder:restore") + @Log(title = "员工领料单", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(baseEmpRequisiteOrderService.restoreBaseEmpRequisiteOrderById(id)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseRequisitioningOrderChildController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseRequisitioningOrderChildController.java new file mode 100644 index 00000000..a2b98c0c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseRequisitioningOrderChildController.java @@ -0,0 +1,151 @@ +package com.ruoyi.system.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.system.domain.BaseRequisitioningOrderChild; +import com.ruoyi.system.service.IBaseRequisitioningOrderChildService; +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-13 + */ +@Controller +//@RequestMapping("/system/requesitioningChild") +public class BaseRequisitioningOrderChildController extends BaseController +{ + private String prefix = "system/requesitioningChild"; + + @Autowired + private IBaseRequisitioningOrderChildService baseRequisitioningOrderChildService; + +// @RequiresPermissions("system:requesitioningChild:view") + @GetMapping() + public String requesitioningChild() + { + return prefix + "/requesitioningChild"; + } + + /** + * 查询请购单列表 + */ + @RequiresPermissions("system:requesitioningChild:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(BaseRequisitioningOrderChild baseRequisitioningOrderChild) + { + startPage(); + List list = baseRequisitioningOrderChildService.selectBaseRequisitioningOrderChildList(baseRequisitioningOrderChild); + return getDataTable(list); + } + + /** + * 导出请购单列表 + */ +// @RequiresPermissions("system:requesitioningChild:export") + @Log(title = "请购单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(BaseRequisitioningOrderChild baseRequisitioningOrderChild) + { + List list = baseRequisitioningOrderChildService.selectBaseRequisitioningOrderChildList(baseRequisitioningOrderChild); + ExcelUtil util = new ExcelUtil(BaseRequisitioningOrderChild.class); + return util.exportExcel(list, "请购单数据"); + } + + /** + * 新增请购单 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存请购单 + */ +// @RequiresPermissions("system:requesitioningChild:add") + @Log(title = "请购单", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(BaseRequisitioningOrderChild baseRequisitioningOrderChild) + { + return toAjax(baseRequisitioningOrderChildService.insertBaseRequisitioningOrderChild(baseRequisitioningOrderChild)); + } + + /** + * 修改请购单 + */ + @GetMapping("/edit/{requisitioningChildId}") + public String edit(@PathVariable("requisitioningChildId") Long requisitioningChildId, ModelMap mmap) + { + BaseRequisitioningOrderChild baseRequisitioningOrderChild = baseRequisitioningOrderChildService.selectBaseRequisitioningOrderChildById(requisitioningChildId); + mmap.put("baseRequisitioningOrderChild", baseRequisitioningOrderChild); + return prefix + "/edit"; + } + + /** + * 修改保存请购单 + */ +// @RequiresPermissions("system:requesitioningChild:edit") + @Log(title = "请购单", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(BaseRequisitioningOrderChild baseRequisitioningOrderChild) + { + return toAjax(baseRequisitioningOrderChildService.updateBaseRequisitioningOrderChild(baseRequisitioningOrderChild)); + } + + /** + * 删除请购单 + */ +// @RequiresPermissions("system:requesitioningChild:remove") + @Log(title = "请购单", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(baseRequisitioningOrderChildService.deleteBaseRequisitioningOrderChildByIds(ids)); + } + + /** + * 作废请购单 + */ +// @RequiresPermissions("system:requesitioningChild:cancel") + @Log(title = "请购单", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(baseRequisitioningOrderChildService.cancelBaseRequisitioningOrderChildById(id)); + } + + /** + * 恢复请购单 + */ +// @RequiresPermissions("system:requesitioningChild:restore") + @Log(title = "请购单", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(baseRequisitioningOrderChildService.restoreBaseRequisitioningOrderChildById(id)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseRequisitioningOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseRequisitioningOrderController.java index d6a59c19..7042cc77 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseRequisitioningOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseRequisitioningOrderController.java @@ -1,6 +1,8 @@ package com.ruoyi.system.controller; import java.util.List; + +import com.ruoyi.system.service.IBaseRequisitioningOrderChildService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -34,6 +36,9 @@ public class BaseRequisitioningOrderController extends BaseController @Autowired private IBaseRequisitioningOrderService baseRequisitioningOrderService; + @Autowired + private IBaseRequisitioningOrderChildService baseRequisitioningOrderChildService; + @RequiresPermissions("system:requisitioning:view") @GetMapping() public String requisitioning() @@ -67,16 +72,20 @@ public class BaseRequisitioningOrderController extends BaseController ExcelUtil util = new ExcelUtil(BaseRequisitioningOrder.class); return util.exportExcel(list, "请购单数据"); } - /** * 新增请购单 */ @GetMapping("/add") - public String add() - { - return prefix + "/add"; - } + public String add(){return prefix + "/add";} + + @GetMapping("/detail/{id}") + public String detail(@PathVariable("id") Long id){ + BaseRequisitioningOrder baseRequisitioningOrder = baseRequisitioningOrderService.selectBaseRequisitioningOrderById(id); + baseRequisitioningOrder.setRequisitioningId(id); + baseRequisitioningOrderService.selectBaseRequisitioningOrderList(baseRequisitioningOrder); + return prefix + "/detail"; + } /** * 新增保存请购单 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseEmpRequisiteOrder.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseEmpRequisiteOrder.java new file mode 100644 index 00000000..32f0ca33 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseEmpRequisiteOrder.java @@ -0,0 +1,183 @@ +package com.ruoyi.system.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; + +/** + * 员工领料单对象 base_emp_requisite_order + * + * @author zhang + * @date 2024-05-14 + */ +public class BaseEmpRequisiteOrder extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 员工号领料单索引id */ + private Long requisiteId; + + /** 审核状态 */ + @Excel(name = "审核状态") + private String auditStatus; + + /** 领料状态 */ + @Excel(name = "领料状态") + private String requisitieStatus; + + /** 领料单编号 */ + @Excel(name = "领料单编号") + private String requisitieCode; + + /** 关联销售订单号 */ + @Excel(name = "关联销售订单号") + private String correlationCode; + + /** 物料合计 */ + @Excel(name = "物料合计") + private Long materialAmount; + + /** 数量总计 */ + @Excel(name = "数量总计") + private Long materialSum; + + /** 不含税总价(RMB) */ + @Excel(name = "不含税总价(RMB)") + private BigDecimal noRmbSum; + + /** 含税总价(RMB) */ + @Excel(name = "含税总价(RMB)") + private BigDecimal rmbSum; + + /** 申请人 */ + @Excel(name = "申请人") + private String applyUser; + + /** 使用状态 */ + @Excel(name = "使用状态") + private String useStatus; + + public void setRequisiteId(Long requisiteId) + { + this.requisiteId = requisiteId; + } + + public Long getRequisiteId() + { + return requisiteId; + } + public void setAuditStatus(String auditStatus) + { + this.auditStatus = auditStatus; + } + + public String getAuditStatus() + { + return auditStatus; + } + public void setRequisitieStatus(String requisitieStatus) + { + this.requisitieStatus = requisitieStatus; + } + + public String getRequisitieStatus() + { + return requisitieStatus; + } + public void setRequisitieCode(String requisitieCode) + { + this.requisitieCode = requisitieCode; + } + + public String getRequisitieCode() + { + return requisitieCode; + } + public void setCorrelationCode(String correlationCode) + { + this.correlationCode = correlationCode; + } + + public String getCorrelationCode() + { + return correlationCode; + } + public void setMaterialAmount(Long materialAmount) + { + this.materialAmount = materialAmount; + } + + public Long getMaterialAmount() + { + return materialAmount; + } + public void setMaterialSum(Long materialSum) + { + this.materialSum = materialSum; + } + + public Long getMaterialSum() + { + return materialSum; + } + public void setNoRmbSum(BigDecimal noRmbSum) + { + this.noRmbSum = noRmbSum; + } + + public BigDecimal getNoRmbSum() + { + return noRmbSum; + } + public void setRmbSum(BigDecimal rmbSum) + { + this.rmbSum = rmbSum; + } + + public BigDecimal getRmbSum() + { + return rmbSum; + } + public void setApplyUser(String applyUser) + { + this.applyUser = applyUser; + } + + public String getApplyUser() + { + return applyUser; + } + public void setUseStatus(String useStatus) + { + this.useStatus = useStatus; + } + + public String getUseStatus() + { + return useStatus; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("requisiteId", getRequisiteId()) + .append("auditStatus", getAuditStatus()) + .append("requisitieStatus", getRequisitieStatus()) + .append("requisitieCode", getRequisitieCode()) + .append("correlationCode", getCorrelationCode()) + .append("materialAmount", getMaterialAmount()) + .append("materialSum", getMaterialSum()) + .append("noRmbSum", getNoRmbSum()) + .append("rmbSum", getRmbSum()) + .append("applyUser", getApplyUser()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("useStatus", getUseStatus()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseRequisitioningOrder.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseRequisitioningOrder.java index 6def6612..f2fcbb65 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseRequisitioningOrder.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseRequisitioningOrder.java @@ -60,7 +60,19 @@ public class BaseRequisitioningOrder extends BaseEntity /** 使用状态 */ private String useStatus; - public void setRequisitioningId(Long requisitioningId) + + private List baseRequisitioningOrderChildList; + + + public List getBaseRequisitioningOrderChildList() { + return baseRequisitioningOrderChildList; + } + + public void setBaseRequisitioningOrderChildList(List baseRequisitioningOrderChildList) { + this.baseRequisitioningOrderChildList = baseRequisitioningOrderChildList; + } + + public void setRequisitioningId(Long requisitioningId) { this.requisitioningId = requisitioningId; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseRequisitioningOrderChild.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseRequisitioningOrderChild.java new file mode 100644 index 00000000..32ad2e63 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseRequisitioningOrderChild.java @@ -0,0 +1,282 @@ +package com.ruoyi.system.domain; + +import java.math.BigDecimal; +import java.util.List; +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; + +/** + * 请购单对象 base_requisitioning_order_child + * + * @author zhang + * @date 2024-05-13 + */ +public class BaseRequisitioningOrderChild extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 客户报价子表id */ + private Long requisitioningChildId; + + /** 关联请购单编号字段 */ + @Excel(name = "关联请购单编号字段") + private String quoteId; + + /** 物料表中的id */ + @Excel(name = "物料表中的id") + private Long materialId; + + /** 料号 */ + @Excel(name = "料号") + private String materialCode; + + /** 物料的图片 */ + @Excel(name = "物料的图片") + private String photoUrl; + + /** 物料的名称 */ + @Excel(name = "物料的名称") + private String materialName; + + /** 物料的类型 */ + @Excel(name = "物料的类型") + private String materialType; + + /** 物料的型号 */ + @Excel(name = "物料的型号") + private String materialModel; + + /** 物料的规格 */ + @Excel(name = "物料的规格") + private String specifications; + + /** 物料的品牌 */ + @Excel(name = "物料的品牌") + private String brand; + + /** 物料的描述 */ + @Excel(name = "物料的描述") + private String describe; + + /** 物料的数量 */ + @Excel(name = "物料的数量") + private Long materialNum; + + /** 物料的不含税单价(RMB) */ + @Excel(name = "物料的不含税单价(RMB)") + private BigDecimal materialRmb; + + /** 物料的含税单价(RMB) */ + @Excel(name = "物料的含税单价(RMB)") + private BigDecimal materialNoRmb; + + /** 物料的含税总价(RMB) */ + @Excel(name = "物料的含税总价(RMB)") + private BigDecimal materialNoRmbSum; + + /** 物料的不含税总价(RMB) */ + @Excel(name = "物料的不含税总价(RMB)") + private Long materialRmbSum; + + /** 删除状态 */ + @Excel(name = "删除状态") + private String useStatus; + + /** 审核状态 */ + @Excel(name = "审核状态") + private String auditStatus; + + public void setRequisitioningChildId(Long requisitioningChildId) + { + this.requisitioningChildId = requisitioningChildId; + } + + public Long getRequisitioningChildId() + { + return requisitioningChildId; + } + public void setQuoteId(String quoteId) + { + this.quoteId = quoteId; + } + + public String getQuoteId() + { + return quoteId; + } + 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 setPhotoUrl(String photoUrl) + { + this.photoUrl = photoUrl; + } + + public String getPhotoUrl() + { + return photoUrl; + } + 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 setMaterialModel(String materialModel) + { + this.materialModel = materialModel; + } + + public String getMaterialModel() + { + return materialModel; + } + public void setSpecifications(String specifications) + { + this.specifications = specifications; + } + + public String getSpecifications() + { + return specifications; + } + public void setBrand(String brand) + { + this.brand = brand; + } + + public String getBrand() + { + return brand; + } + 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 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 setMaterialNoRmbSum(BigDecimal materialNoRmbSum) + { + this.materialNoRmbSum = materialNoRmbSum; + } + + public BigDecimal getMaterialNoRmbSum() + { + return materialNoRmbSum; + } + public void setMaterialRmbSum(Long materialRmbSum) + { + this.materialRmbSum = materialRmbSum; + } + + public Long getMaterialRmbSum() + { + return materialRmbSum; + } + 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; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("requisitioningChildId", getRequisitioningChildId()) + .append("quoteId", getQuoteId()) + .append("materialId", getMaterialId()) + .append("materialCode", getMaterialCode()) + .append("photoUrl", getPhotoUrl()) + .append("materialName", getMaterialName()) + .append("materialType", getMaterialType()) + .append("materialModel", getMaterialModel()) + .append("specifications", getSpecifications()) + .append("brand", getBrand()) + .append("describe", getDescribe()) + .append("materialNum", getMaterialNum()) + .append("materialRmb", getMaterialRmb()) + .append("materialNoRmb", getMaterialNoRmb()) + .append("materialNoRmbSum", getMaterialNoRmbSum()) + .append("materialRmbSum", getMaterialRmbSum()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("useStatus", getUseStatus()) + .append("auditStatus", getAuditStatus()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderMapper.java new file mode 100644 index 00000000..49b1551d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.BaseEmpRequisiteOrder; + +/** + * 员工领料单Mapper接口 + * + * @author zhang + * @date 2024-05-14 + */ +public interface BaseEmpRequisiteOrderMapper +{ + /** + * 查询员工领料单 + * + * @param requisiteId 员工领料单ID + * @return 员工领料单 + */ + public BaseEmpRequisiteOrder selectBaseEmpRequisiteOrderById(Long requisiteId); + + /** + * 查询员工领料单列表 + * + * @param baseEmpRequisiteOrder 员工领料单 + * @return 员工领料单集合 + */ + public List selectBaseEmpRequisiteOrderList(BaseEmpRequisiteOrder baseEmpRequisiteOrder); + + /** + * 新增员工领料单 + * + * @param baseEmpRequisiteOrder 员工领料单 + * @return 结果 + */ + public int insertBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder); + + /** + * 修改员工领料单 + * + * @param baseEmpRequisiteOrder 员工领料单 + * @return 结果 + */ + public int updateBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder); + + /** + * 删除员工领料单 + * + * @param requisiteId 员工领料单ID + * @return 结果 + */ + public int deleteBaseEmpRequisiteOrderById(Long requisiteId); + + /** + * 批量删除员工领料单 + * + * @param requisiteIds 需要删除的数据ID + * @return 结果 + */ + public int deleteBaseEmpRequisiteOrderByIds(String[] requisiteIds); + + /** + * 作废员工领料单 + * + * @param requisiteId 员工领料单ID + * @return 结果 + */ + public int cancelBaseEmpRequisiteOrderById(Long requisiteId); + + /** + * 恢复员工领料单 + * + * @param requisiteId 员工领料单ID + * @return 结果 + */ + public int restoreBaseEmpRequisiteOrderById(Long requisiteId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseRequisitioningOrderChildMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseRequisitioningOrderChildMapper.java new file mode 100644 index 00000000..fdb2611b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseRequisitioningOrderChildMapper.java @@ -0,0 +1,82 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.BaseRequisitioningOrderChild; + +/** + * 请购单Mapper接口 + * + * @author zhang + * @date 2024-05-13 + */ +public interface BaseRequisitioningOrderChildMapper +{ + /** + * 查询请购单 + * + * @param requisitioningChildId 请购单ID + * @return 请购单 + */ + public BaseRequisitioningOrderChild selectBaseRequisitioningOrderChildById(Long requisitioningChildId); + + /** + * 查询请购单列表 + * + * @param baseRequisitioningOrderChild 请购单 + * @return 请购单集合 + */ + public List selectBaseRequisitioningOrderChildList(BaseRequisitioningOrderChild baseRequisitioningOrderChild); + + /** + * 新增请购单 + * + * @param baseRequisitioningOrderChild 请购单 + * @return 结果 + */ + public int insertBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild); + + /** + * 修改请购单 + * + * @param baseRequisitioningOrderChild 请购单 + * @return 结果 + */ + public int updateBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild); + + /** + * 删除请购单 + * + * @param requisitioningChildId 请购单ID + * @return 结果 + */ + public int deleteBaseRequisitioningOrderChildById(Long requisitioningChildId); + + /** + * 批量删除请购单 + * + * @param requisitioningChildIds 需要删除的数据ID + * @return 结果 + */ + public int deleteBaseRequisitioningOrderChildByIds(String[] requisitioningChildIds); + + /** + * 作废请购单 + * + * @param requisitioningChildId 请购单ID + * @return 结果 + */ + public int cancelBaseRequisitioningOrderChildById(Long requisitioningChildId); + + /** + * 恢复请购单 + * + * @param requisitioningChildId 请购单ID + * @return 结果 + */ + public int restoreBaseRequisitioningOrderChildById(Long requisitioningChildId); + + + public int deleteBaseRequisitioningOrderChildByQuoteId(String quoteId); + + public int deleteBaseRequisitioningOrderChildByQuoteIds(String[] quoteIds); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseRequisitioningOrderMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseRequisitioningOrderMapper.java index 4b4f67cb..b620b422 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseRequisitioningOrderMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseRequisitioningOrderMapper.java @@ -74,4 +74,8 @@ public interface BaseRequisitioningOrderMapper * @return 结果 */ public int restoreBaseRequisitioningOrderById(Long requisitioningId); + + int deleteBaseRequisitioningOrderByCode(String requisitioningCode); + + List selectBaseRequisitioningOrderByIds(String[] ids); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEmpRequisiteOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEmpRequisiteOrderService.java new file mode 100644 index 00000000..e3f853d3 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEmpRequisiteOrderService.java @@ -0,0 +1,75 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.BaseEmpRequisiteOrder; + +/** + * 员工领料单Service接口 + * + * @author zhang + * @date 2024-05-14 + */ +public interface IBaseEmpRequisiteOrderService +{ + /** + * 查询员工领料单 + * + * @param requisiteId 员工领料单ID + * @return 员工领料单 + */ + public BaseEmpRequisiteOrder selectBaseEmpRequisiteOrderById(Long requisiteId); + + /** + * 查询员工领料单列表 + * + * @param baseEmpRequisiteOrder 员工领料单 + * @return 员工领料单集合 + */ + public List selectBaseEmpRequisiteOrderList(BaseEmpRequisiteOrder baseEmpRequisiteOrder); + + /** + * 新增员工领料单 + * + * @param baseEmpRequisiteOrder 员工领料单 + * @return 结果 + */ + public int insertBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder); + + /** + * 修改员工领料单 + * + * @param baseEmpRequisiteOrder 员工领料单 + * @return 结果 + */ + public int updateBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder); + + /** + * 批量删除员工领料单 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteBaseEmpRequisiteOrderByIds(String ids); + + /** + * 删除员工领料单信息 + * + * @param requisiteId 员工领料单ID + * @return 结果 + */ + public int deleteBaseEmpRequisiteOrderById(Long requisiteId); + + /** + * 作废员工领料单 + * @param requisiteId 员工领料单ID + * @return + */ + int cancelBaseEmpRequisiteOrderById(Long requisiteId); + + /** + * 恢复员工领料单 + * @param requisiteId 员工领料单ID + * @return + */ + int restoreBaseEmpRequisiteOrderById(Long requisiteId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderChildService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderChildService.java new file mode 100644 index 00000000..130cebc9 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderChildService.java @@ -0,0 +1,79 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.BaseRequisitioningOrderChild; + +/** + * 请购单Service接口 + * + * @author zhang + * @date 2024-05-13 + */ +public interface IBaseRequisitioningOrderChildService +{ + /** + * 查询请购单 + * + * @param requisitioningChildId 请购单ID + * @return 请购单 + */ + public BaseRequisitioningOrderChild selectBaseRequisitioningOrderChildById(Long requisitioningChildId); + + /** + * 查询请购单列表 + * + * @param baseRequisitioningOrderChild 请购单 + * @return 请购单集合 + */ + public List selectBaseRequisitioningOrderChildList(BaseRequisitioningOrderChild baseRequisitioningOrderChild); + + /** + * 新增请购单 + * + * @param baseRequisitioningOrderChild 请购单 + * @return 结果 + */ + public int insertBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild); + + /** + * 修改请购单 + * + * @param baseRequisitioningOrderChild 请购单 + * @return 结果 + */ + public int updateBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild); + + /** + * 批量删除请购单 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteBaseRequisitioningOrderChildByIds(String ids); + + /** + * 删除请购单信息 + * + * @param requisitioningChildId 请购单ID + * @return 结果 + */ + public int deleteBaseRequisitioningOrderChildById(Long requisitioningChildId); + + /** + * 作废请购单 + * @param requisitioningChildId 请购单ID + * @return + */ + int cancelBaseRequisitioningOrderChildById(Long requisitioningChildId); + + /** + * 恢复请购单 + * @param requisitioningChildId 请购单ID + * @return + */ + int restoreBaseRequisitioningOrderChildById(Long requisitioningChildId); + + int deleteBaseRequisitioningOrderChildByQuoteId(String quoteId); + + int deleteBaseRequisitioningOrderChildByQuoteIds(String quoteIds); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderService.java index de5ed817..8d367dd1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderService.java @@ -72,4 +72,9 @@ public interface IBaseRequisitioningOrderService * @return */ int restoreBaseRequisitioningOrderById(Long requisitioningId); + + int deleteBaseRequisitioningOrderByCode(String requisitioningCode); + + + List selectBaseRequisitioningOrderByIds(String ids); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEmpRequisiteOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEmpRequisiteOrderServiceImpl.java new file mode 100644 index 00000000..613286a0 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEmpRequisiteOrderServiceImpl.java @@ -0,0 +1,126 @@ +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.BaseEmpRequisiteOrderMapper; +import com.ruoyi.system.domain.BaseEmpRequisiteOrder; +import com.ruoyi.system.service.IBaseEmpRequisiteOrderService; +import com.ruoyi.common.core.text.Convert; + +/** + * 员工领料单Service业务层处理 + * + * @author zhang + * @date 2024-05-14 + */ +@Service +public class BaseEmpRequisiteOrderServiceImpl implements IBaseEmpRequisiteOrderService +{ + @Autowired + private BaseEmpRequisiteOrderMapper baseEmpRequisiteOrderMapper; + + /** + * 查询员工领料单 + * + * @param requisiteId 员工领料单ID + * @return 员工领料单 + */ + @Override + public BaseEmpRequisiteOrder selectBaseEmpRequisiteOrderById(Long requisiteId) + { + return baseEmpRequisiteOrderMapper.selectBaseEmpRequisiteOrderById(requisiteId); + } + + /** + * 查询员工领料单列表 + * + * @param baseEmpRequisiteOrder 员工领料单 + * @return 员工领料单 + */ + @Override + public List selectBaseEmpRequisiteOrderList(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + { + return baseEmpRequisiteOrderMapper.selectBaseEmpRequisiteOrderList(baseEmpRequisiteOrder); + } + + /** + * 新增员工领料单 + * + * @param baseEmpRequisiteOrder 员工领料单 + * @return 结果 + */ + @Override + public int insertBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + { + String loginName = ShiroUtils.getLoginName(); + baseEmpRequisiteOrder.setCreateBy(loginName); + baseEmpRequisiteOrder.setCreateTime(DateUtils.getNowDate()); + return baseEmpRequisiteOrderMapper.insertBaseEmpRequisiteOrder(baseEmpRequisiteOrder); + } + + /** + * 修改员工领料单 + * + * @param baseEmpRequisiteOrder 员工领料单 + * @return 结果 + */ + @Override + public int updateBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + { + String loginName = ShiroUtils.getLoginName(); + baseEmpRequisiteOrder.setUpdateBy(loginName); + baseEmpRequisiteOrder.setUpdateTime(DateUtils.getNowDate()); + return baseEmpRequisiteOrderMapper.updateBaseEmpRequisiteOrder(baseEmpRequisiteOrder); + } + + /** + * 删除员工领料单对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteBaseEmpRequisiteOrderByIds(String ids) + { + return baseEmpRequisiteOrderMapper.deleteBaseEmpRequisiteOrderByIds(Convert.toStrArray(ids)); + } + + /** + * 删除员工领料单信息 + * + * @param requisiteId 员工领料单ID + * @return 结果 + */ + @Override + public int deleteBaseEmpRequisiteOrderById(Long requisiteId) + { + return baseEmpRequisiteOrderMapper.deleteBaseEmpRequisiteOrderById(requisiteId); + } + + /** + * 作废员工领料单 + * + * @param requisiteId 员工领料单ID + * @return 结果 + */ + @Override + public int cancelBaseEmpRequisiteOrderById(Long requisiteId) + { + return baseEmpRequisiteOrderMapper.cancelBaseEmpRequisiteOrderById(requisiteId); + } + + /** + * 恢复员工领料单信息 + * + * @param requisiteId 员工领料单ID + * @return 结果 + */ + @Override + public int restoreBaseEmpRequisiteOrderById(Long requisiteId) + { + return baseEmpRequisiteOrderMapper.restoreBaseEmpRequisiteOrderById(requisiteId); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderChildServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderChildServiceImpl.java new file mode 100644 index 00000000..e537d41e --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderChildServiceImpl.java @@ -0,0 +1,135 @@ +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.BaseRequisitioningOrderChildMapper; +import com.ruoyi.system.domain.BaseRequisitioningOrderChild; +import com.ruoyi.system.service.IBaseRequisitioningOrderChildService; +import com.ruoyi.common.core.text.Convert; + +/** + * 请购单Service业务层处理 + * + * @author zhang + * @date 2024-05-13 + */ +@Service +public class BaseRequisitioningOrderChildServiceImpl implements IBaseRequisitioningOrderChildService +{ + @Autowired + private BaseRequisitioningOrderChildMapper baseRequisitioningOrderChildMapper; + + /** + * 查询请购单 + * + * @param requisitioningChildId 请购单ID + * @return 请购单 + */ + @Override + public BaseRequisitioningOrderChild selectBaseRequisitioningOrderChildById(Long requisitioningChildId) + { + return baseRequisitioningOrderChildMapper.selectBaseRequisitioningOrderChildById(requisitioningChildId); + } + + /** + * 查询请购单列表 + * + * @param baseRequisitioningOrderChild 请购单 + * @return 请购单 + */ + @Override + public List selectBaseRequisitioningOrderChildList(BaseRequisitioningOrderChild baseRequisitioningOrderChild) + { + return baseRequisitioningOrderChildMapper.selectBaseRequisitioningOrderChildList(baseRequisitioningOrderChild); + } + + /** + * 新增请购单 + * + * @param baseRequisitioningOrderChild 请购单 + * @return 结果 + */ + @Override + public int insertBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild) + { + String loginName = ShiroUtils.getLoginName(); + baseRequisitioningOrderChild.setCreateBy(loginName); + baseRequisitioningOrderChild.setCreateTime(DateUtils.getNowDate()); + return baseRequisitioningOrderChildMapper.insertBaseRequisitioningOrderChild(baseRequisitioningOrderChild); + } + + /** + * 修改请购单 + * + * @param baseRequisitioningOrderChild 请购单 + * @return 结果 + */ + @Override + public int updateBaseRequisitioningOrderChild(BaseRequisitioningOrderChild baseRequisitioningOrderChild) + { + String loginName = ShiroUtils.getLoginName(); + baseRequisitioningOrderChild.setUpdateBy(loginName); + baseRequisitioningOrderChild.setUpdateTime(DateUtils.getNowDate()); + return baseRequisitioningOrderChildMapper.updateBaseRequisitioningOrderChild(baseRequisitioningOrderChild); + } + + /** + * 删除请购单对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteBaseRequisitioningOrderChildByIds(String ids) + { + return baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByIds(Convert.toStrArray(ids)); + } + + /** + * 删除请购单信息 + * + * @param requisitioningChildId 请购单ID + * @return 结果 + */ + @Override + public int deleteBaseRequisitioningOrderChildById(Long requisitioningChildId) + { + return baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildById(requisitioningChildId); + } + + /** + * 作废请购单 + * + * @param requisitioningChildId 请购单ID + * @return 结果 + */ + @Override + public int cancelBaseRequisitioningOrderChildById(Long requisitioningChildId) + { + return baseRequisitioningOrderChildMapper.cancelBaseRequisitioningOrderChildById(requisitioningChildId); + } + + /** + * 恢复请购单信息 + * + * @param requisitioningChildId 请购单ID + * @return 结果 + */ + @Override + public int restoreBaseRequisitioningOrderChildById(Long requisitioningChildId) + { + return baseRequisitioningOrderChildMapper.restoreBaseRequisitioningOrderChildById(requisitioningChildId); + } + @Override + public int deleteBaseRequisitioningOrderChildByQuoteId(String quoteId) { + return baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByQuoteId(quoteId); + } + + @Override + public int deleteBaseRequisitioningOrderChildByQuoteIds(String quoteIds) { + return baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByQuoteIds(Convert.toStrArray(quoteIds)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java index b3a4bf95..22506a53 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java @@ -1,8 +1,13 @@ package com.ruoyi.system.service.impl; +import java.util.ArrayList; import java.util.List; + +import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.system.domain.BaseRequisitioningOrderChild; +import com.ruoyi.system.mapper.BaseRequisitioningOrderChildMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.BaseRequisitioningOrderMapper; @@ -22,6 +27,12 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr @Autowired private BaseRequisitioningOrderMapper baseRequisitioningOrderMapper; + @Autowired + private BaseRequisitioningOrderChildMapper baseRequisitioningOrderChildMapper; + + + @Autowired + private RedisCache redisCache; /** * 查询请购单 * @@ -58,6 +69,14 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr String loginName = ShiroUtils.getLoginName(); baseRequisitioningOrder.setCreateBy(loginName); baseRequisitioningOrder.setCreateTime(DateUtils.getNowDate()); + baseRequisitioningOrder.setRequisitioningCode(redisCache.generateBillNo("QG")); + List childList = baseRequisitioningOrder.getBaseRequisitioningOrderChildList(); + for (BaseRequisitioningOrderChild child: childList) { + child.setQuoteId(baseRequisitioningOrder.getRequisitioningCode()); + child.setCreateBy(loginName); + child.setCreateTime(DateUtils.getNowDate()); + baseRequisitioningOrderChildMapper.insertBaseRequisitioningOrderChild(child); + } return baseRequisitioningOrderMapper.insertBaseRequisitioningOrder(baseRequisitioningOrder); } @@ -73,6 +92,17 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr String loginName = ShiroUtils.getLoginName(); baseRequisitioningOrder.setUpdateBy(loginName); baseRequisitioningOrder.setUpdateTime(DateUtils.getNowDate()); + String requisitioningCode = baseRequisitioningOrder.getRequisitioningCode(); + baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByQuoteId(baseRequisitioningOrder.getRequisitioningCode()); + if (baseRequisitioningOrder.getBaseRequisitioningOrderChildList() != null) { + List childList = baseRequisitioningOrder.getBaseRequisitioningOrderChildList(); + for (BaseRequisitioningOrderChild child: childList) { + child.setQuoteId(requisitioningCode); + child.setUpdateBy(loginName); + child.setUpdateTime(DateUtils.getNowDate()); + baseRequisitioningOrderChildMapper.insertBaseRequisitioningOrderChild(child); + } + } return baseRequisitioningOrderMapper.updateBaseRequisitioningOrder(baseRequisitioningOrder); } @@ -123,4 +153,14 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr { return baseRequisitioningOrderMapper.restoreBaseRequisitioningOrderById(requisitioningId); } + + @Override + public int deleteBaseRequisitioningOrderByCode(String requisitioningCode) { + baseRequisitioningOrderChildMapper.deleteBaseRequisitioningOrderChildByQuoteId(requisitioningCode); + return baseRequisitioningOrderMapper.deleteBaseRequisitioningOrderByCode(requisitioningCode); + } + @Override + public List selectBaseRequisitioningOrderByIds(String ids){ + return baseRequisitioningOrderMapper.selectBaseRequisitioningOrderByIds(Convert.toStrArray(ids)); + } } diff --git a/ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderMapper.xml new file mode 100644 index 00000000..703c418b --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderMapper.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select requisite_id, audit_status, requisitie_status, requisitie_code, correlation_code, material_amount, material_sum, noRmbSum, rmbSum, apply_user, create_by, create_time, update_by, update_time, remark, use_status from base_emp_requisite_order + + + + + + + + insert into base_emp_requisite_order + + audit_status, + requisitie_status, + requisitie_code, + correlation_code, + material_amount, + material_sum, + noRmbSum, + rmbSum, + apply_user, + create_by, + create_time, + update_by, + update_time, + remark, + use_status, + + + #{auditStatus}, + #{requisitieStatus}, + #{requisitieCode}, + #{correlationCode}, + #{materialAmount}, + #{materialSum}, + #{noRmbSum}, + #{rmbSum}, + #{applyUser}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{useStatus}, + + + + + update base_emp_requisite_order + + audit_status = #{auditStatus}, + requisitie_status = #{requisitieStatus}, + requisitie_code = #{requisitieCode}, + correlation_code = #{correlationCode}, + material_amount = #{materialAmount}, + material_sum = #{materialSum}, + noRmbSum = #{noRmbSum}, + rmbSum = #{rmbSum}, + apply_user = #{applyUser}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + use_status = #{useStatus}, + + where requisite_id = #{requisiteId} + + + + delete from base_emp_requisite_order where requisite_id = #{requisiteId} + + + + delete from base_emp_requisite_order where requisite_id in + + #{requisiteId} + + + + + update base_emp_requisite_order set del_flag = '1' where requisite_id = #{requisiteId} + + + + update base_emp_requisite_order set del_flag = '0' where requisite_id = #{requisiteId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderChildMapper.xml new file mode 100644 index 00000000..58a3a8a5 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderChildMapper.xml @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select requisitioning_child_id, quote_id, material_id, material_code, photoUrl, + material_name, material_type, material_model, specifications, brand, + `describe`, materialNum, materialRmb, materialNoRmb, materialNoRmbSum, materialRmbSum, remark, + create_by, create_time, update_by, update_time, use_status, audit_status + from base_requisitioning_order_child + + + + + + + + insert into base_requisitioning_order_child + + quote_id, + material_id, + material_code, + photoUrl, + material_name, + material_type, + material_model, + specifications, + brand, + describe, + materialNum, + materialRmb, + materialNoRmb, + materialNoRmbSum, + materialRmbSum, + remark, + create_by, + create_time, + update_by, + update_time, + use_status, + audit_status, + + + #{quoteId}, + #{materialId}, + #{materialCode}, + #{photoUrl}, + #{materialName}, + #{materialType}, + #{materialModel}, + #{specifications}, + #{brand}, + #{describe}, + #{materialNum}, + #{materialRmb}, + #{materialNoRmb}, + #{materialNoRmbSum}, + #{materialRmbSum}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{useStatus}, + #{auditStatus}, + + + + + update base_requisitioning_order_child + + quote_id = #{quoteId}, + material_id = #{materialId}, + material_code = #{materialCode}, + photoUrl = #{photoUrl}, + material_name = #{materialName}, + material_type = #{materialType}, + material_model = #{materialModel}, + specifications = #{specifications}, + brand = #{brand}, + `describe` = #{describe}, + materialNum = #{materialNum}, + materialRmb = #{materialRmb}, + materialNoRmb = #{materialNoRmb}, + materialNoRmbSum = #{materialNoRmbSum}, + materialRmbSum = #{materialRmbSum}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + use_status = #{useStatus}, + audit_status = #{auditStatus}, + + where requisitioning_child_id = #{requisitioningChildId} + + + + delete from base_requisitioning_order_child where requisitioning_child_id = #{requisitioningChildId} + + + delete from base_requisitioning_order_child where quote_id = #{qoteId} + + + delete from base_requisitioning_order_child where quote_id in + + #{quoteId} + + + + + delete from base_requisitioning_order_child where requisitioning_child_id in + + #{requisitioningChildId} + + + + + update base_requisitioning_order_child set del_flag = '1' where requisitioning_child_id = #{requisitioningChildId} + + + + update base_requisitioning_order_child set del_flag = '0' where requisitioning_child_id = #{requisitioningChildId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderMapper.xml index a2101985..c23c9231 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderMapper.xml @@ -60,7 +60,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where requisitioning_id = #{requisitioningId} - + insert into base_requisitioning_order @@ -131,6 +138,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{requisitioningId} + + delete from base_requisitioning_order where requisitioning_code = #{requisitioningId} + update base_requisitioning_order set del_flag = '1' where requisitioning_id = #{requisitioningId} diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html index a99ada9d..4fed281f 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html @@ -7,112 +7,231 @@
- -
- -
-
-
- + +
- - 代码生成请选择字典属性 +
- +
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- +
- -
- + +
+ +
-
- -
- -
-
-
- +
+
- +
- -
- -
+
- +
-
- - +
+ + %
-
- -
-
- - -
+ +
+
+
+ 选择报价信息 + + 添加物料 +
-
- -
- +
+
+
- +
\ No newline at end of file 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 e923863e..f56c09bc 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html @@ -13,102 +13,165 @@
-
- -
- - 代码生成请选择字典属性 -
-
- +
- -
-
-
- -
- -
-
-
- -
- +
+
-
- -
- -
-
-
- -
- -
-
-
- +
+
- +
-
- -
- -
+
+ 附件:
-
- +
+
-
- - -
+
-
-
- -
-
- - -
+
+ +
+
+
+ 选择报价信息 + + 添加物料 +
-
- -
- +
+
+
- +
+ + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/edit.html b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/edit.html new file mode 100644 index 00000000..4aab6d11 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/edit.html @@ -0,0 +1,171 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+ 选择报价信息 + + 添加物料 + +
+
+
+
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html new file mode 100644 index 00000000..0188759f --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html @@ -0,0 +1,161 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/requesitioningChild/add.html b/ruoyi-admin/src/main/resources/templates/system/requesitioningChild/add.html new file mode 100644 index 00000000..a4a8500c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/requesitioningChild/add.html @@ -0,0 +1,144 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/requesitioningChild/edit.html b/ruoyi-admin/src/main/resources/templates/system/requesitioningChild/edit.html new file mode 100644 index 00000000..47c8008c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/requesitioningChild/edit.html @@ -0,0 +1,145 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/requesitioningChild/requesitioningChild.html b/ruoyi-admin/src/main/resources/templates/system/requesitioningChild/requesitioningChild.html new file mode 100644 index 00000000..2e953df0 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/requesitioningChild/requesitioningChild.html @@ -0,0 +1,250 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/requisitioning/add.html b/ruoyi-admin/src/main/resources/templates/system/requisitioning/add.html index 29b89fd7..d7ef1ee2 100644 --- a/ruoyi-admin/src/main/resources/templates/system/requisitioning/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/requisitioning/add.html @@ -15,13 +15,13 @@
- +
- +
@@ -59,7 +59,6 @@ $(function() { var options = { id:'bootstrap-sub-table-requisitionChild', - // url: ctx + "system/quoteChild/list", pagination: false, sidePagination: "client", model: "物料报价信息", @@ -84,6 +83,8 @@ return $.table.selectCategoryLabel(materialTypeDatas, value); } }, + {title: '型号',field: 'materialModel',align: 'center'}, + {title: '规格',field: 'specification',align: 'center'}, { title: '描述',field: 'describe',align: 'center'}, {title: '品牌',field: 'brand',align: 'center'}, { title: '单位',field: 'unit',align: 'center', @@ -115,8 +116,6 @@ } ], onEditableSave:function(field, row, oldValue, $el){ - row.materialNoRmb = Number(row.materialNoRmb).toFixed(2); - row.materialRmb = Number(row.materialNoRmb * Number(1)); row.materialNoRmbSum = Number(row.materialNum * Number(row.materialNoRmb)).toFixed(2); row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2); }, diff --git a/ruoyi-admin/src/main/resources/templates/system/requisitioning/edit.html b/ruoyi-admin/src/main/resources/templates/system/requisitioning/edit.html index 75eabdcb..4b16a1ee 100644 --- a/ruoyi-admin/src/main/resources/templates/system/requisitioning/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/requisitioning/edit.html @@ -22,13 +22,13 @@
- +
- +
@@ -117,8 +117,6 @@ } ], onEditableSave:function(field, row, oldValue, $el){ - row.materialNoRmb = Number(row.materialNoRmb).toFixed(2); - row.materialRmb = Number(row.materialNoRmb * Number(1)); row.materialNoRmbSum = Number(row.materialNum * Number(row.materialNoRmb)).toFixed(2); row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2); }, @@ -173,6 +171,17 @@ $.operate.save(prefix + "/edit", $('#form-requisitioning-edit').serialize()); } } + + function getDeptSelect(){ + + } + function getPostSelect(){ + + } + + function getUserName(){ + + } \ No newline at end of file