From 170354eee050534636e4f54d787e7b13b2e5730f Mon Sep 17 00:00:00 2001
From: yinq <1345442242@qq.com>
Date: Thu, 28 Sep 2023 13:58:59 +0800
Subject: [PATCH] =?UTF-8?q?add=20-=20=E8=AE=A2=E5=8D=95BOM=E3=80=81?=
=?UTF-8?q?=E7=94=9F=E4=BA=A7BOM?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
aucma-admin/pom.xml | 6 +
.../controller/OrderBomInfoController.java | 101 +++++++
.../com/aucma/base/domain/OrderBomInfo.java | 253 ++++++++++++++++++
.../aucma/base/mapper/OrderBomInfoMapper.java | 61 +++++
.../base/service/IOrderBomInfoService.java | 61 +++++
.../service/impl/OrderBomInfoServiceImpl.java | 93 +++++++
.../mapper/base/OrderBomInfoMapper.xml | 131 +++++++++
.../core/domain/model/TreeStringEntity.java | 81 ++++++
aucma-production/pom.xml | 31 +++
.../controller/BaseBomInfoController.java | 103 +++++++
.../aucma/production/domain/BaseBomInfo.java | 251 +++++++++++++++++
.../production/mapper/BaseBomInfoMapper.java | 61 +++++
.../service/IBaseBomInfoService.java | 61 +++++
.../service/impl/BaseBomInfoServiceImpl.java | 93 +++++++
.../mapper/production/BaseBomInfoMapper.xml | 126 +++++++++
pom.xml | 8 +
16 files changed, 1521 insertions(+)
create mode 100644 aucma-base/src/main/java/com/aucma/base/controller/OrderBomInfoController.java
create mode 100644 aucma-base/src/main/java/com/aucma/base/domain/OrderBomInfo.java
create mode 100644 aucma-base/src/main/java/com/aucma/base/mapper/OrderBomInfoMapper.java
create mode 100644 aucma-base/src/main/java/com/aucma/base/service/IOrderBomInfoService.java
create mode 100644 aucma-base/src/main/java/com/aucma/base/service/impl/OrderBomInfoServiceImpl.java
create mode 100644 aucma-base/src/main/resources/mapper/base/OrderBomInfoMapper.xml
create mode 100644 aucma-common/src/main/java/com/aucma/common/core/domain/model/TreeStringEntity.java
create mode 100644 aucma-production/pom.xml
create mode 100644 aucma-production/src/main/java/com/aucma/production/controller/BaseBomInfoController.java
create mode 100644 aucma-production/src/main/java/com/aucma/production/domain/BaseBomInfo.java
create mode 100644 aucma-production/src/main/java/com/aucma/production/mapper/BaseBomInfoMapper.java
create mode 100644 aucma-production/src/main/java/com/aucma/production/service/IBaseBomInfoService.java
create mode 100644 aucma-production/src/main/java/com/aucma/production/service/impl/BaseBomInfoServiceImpl.java
create mode 100644 aucma-production/src/main/resources/mapper/production/BaseBomInfoMapper.xml
diff --git a/aucma-admin/pom.xml b/aucma-admin/pom.xml
index 261a3b3..09a73f3 100644
--- a/aucma-admin/pom.xml
+++ b/aucma-admin/pom.xml
@@ -85,6 +85,12 @@
aucma-api
+
+
+ com.aucma
+ aucma-production
+
+
diff --git a/aucma-base/src/main/java/com/aucma/base/controller/OrderBomInfoController.java b/aucma-base/src/main/java/com/aucma/base/controller/OrderBomInfoController.java
new file mode 100644
index 0000000..5fa7235
--- /dev/null
+++ b/aucma-base/src/main/java/com/aucma/base/controller/OrderBomInfoController.java
@@ -0,0 +1,101 @@
+package com.aucma.base.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.aucma.common.utils.DateUtils;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.aucma.common.annotation.Log;
+import com.aucma.common.core.controller.BaseController;
+import com.aucma.common.core.domain.AjaxResult;
+import com.aucma.common.enums.BusinessType;
+import com.aucma.base.domain.OrderBomInfo;
+import com.aucma.base.service.IOrderBomInfoService;
+import com.aucma.common.utils.poi.ExcelUtil;
+
+/**
+ * 订单BOMController
+ *
+ * @author Yinq
+ * @date 2023-09-28
+ */
+@RestController
+@RequestMapping("/base/orderBomInfo")
+public class OrderBomInfoController extends BaseController {
+ @Autowired
+ private IOrderBomInfoService orderBomInfoService;
+
+ /**
+ * 查询订单BOM列表
+ */
+ @PreAuthorize("@ss.hasPermi('base:orderBomInfo:list')")
+ @GetMapping("/list")
+ public AjaxResult list(OrderBomInfo orderBomInfo) {
+ List list = orderBomInfoService.selectOrderBomInfoList(orderBomInfo);
+ return success(list);
+ }
+
+ /**
+ * 导出订单BOM列表
+ */
+ @PreAuthorize("@ss.hasPermi('base:orderBomInfo:export')")
+ @Log(title = "订单BOM", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, OrderBomInfo orderBomInfo) {
+ List list = orderBomInfoService.selectOrderBomInfoList(orderBomInfo);
+ ExcelUtil util = new ExcelUtil(OrderBomInfo.class);
+ util.exportExcel(response, list, "订单BOM数据");
+ }
+
+ /**
+ * 获取订单BOM详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('base:orderBomInfo:query')")
+ @GetMapping(value = "/{objId}")
+ public AjaxResult getInfo(@PathVariable("objId") Long objId) {
+ return success(orderBomInfoService.selectOrderBomInfoByObjId(objId));
+ }
+
+ /**
+ * 新增订单BOM
+ */
+ @PreAuthorize("@ss.hasPermi('base:orderBomInfo:add')")
+ @Log(title = "订单BOM", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody OrderBomInfo orderBomInfo) {
+ orderBomInfo.setCreatedBy(getUsername());
+ orderBomInfo.setCreatedTime(DateUtils.getNowDate());
+ return toAjax(orderBomInfoService.insertOrderBomInfo(orderBomInfo));
+ }
+
+ /**
+ * 修改订单BOM
+ */
+ @PreAuthorize("@ss.hasPermi('base:orderBomInfo:edit')")
+ @Log(title = "订单BOM", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody OrderBomInfo orderBomInfo) {
+ orderBomInfo.setUpdatedBy(getUsername());
+ orderBomInfo.setUpdatedTime(DateUtils.getNowDate());
+ return toAjax(orderBomInfoService.updateOrderBomInfo(orderBomInfo));
+ }
+
+ /**
+ * 删除订单BOM
+ */
+ @PreAuthorize("@ss.hasPermi('base:orderBomInfo:remove')")
+ @Log(title = "订单BOM", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{objIds}")
+ public AjaxResult remove(@PathVariable Long[] objIds) {
+ return toAjax(orderBomInfoService.deleteOrderBomInfoByObjIds(objIds));
+ }
+}
diff --git a/aucma-base/src/main/java/com/aucma/base/domain/OrderBomInfo.java b/aucma-base/src/main/java/com/aucma/base/domain/OrderBomInfo.java
new file mode 100644
index 0000000..271e569
--- /dev/null
+++ b/aucma-base/src/main/java/com/aucma/base/domain/OrderBomInfo.java
@@ -0,0 +1,253 @@
+package com.aucma.base.domain;
+
+import java.util.Date;
+
+import com.aucma.common.core.domain.model.TreeStringEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.aucma.common.annotation.Excel;
+import com.aucma.common.core.domain.TreeEntity;
+
+/**
+ * 订单BOM对象 order_bominfo
+ *
+ * @author Yinq
+ * @date 2023-09-28
+ */
+public class OrderBomInfo extends TreeStringEntity {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键标识
+ */
+ private Long objId;
+
+ /**
+ * BOM编号
+ */
+ @Excel(name = "BOM编号")
+ private String bomCode;
+
+ /**
+ * 物料编码
+ */
+ @Excel(name = "物料编码")
+ private String materialCode;
+
+ /**
+ * 物料名称
+ */
+ @Excel(name = "物料名称")
+ private String materialName;
+
+ /**
+ * 物料类别
+ */
+ @Excel(name = "物料类别")
+ private String materialType;
+
+ /**
+ * 标准数量
+ */
+ @Excel(name = "标准数量")
+ private Long standardAmount;
+
+ /**
+ * 启用标识
+ */
+ @Excel(name = "启用标识")
+ private Long isFlag;
+
+ /**
+ * 创建人
+ */
+ @Excel(name = "创建人")
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ @Excel(name = "更新人")
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date updatedTime;
+
+ /**
+ * 工厂编号
+ */
+ @Excel(name = "工厂编号")
+ private String factoryCode;
+
+ /**
+ * 排序
+ */
+ @Excel(name = "排序")
+ private String sort;
+
+ /**
+ * 销售凭证
+ */
+ @Excel(name = "销售凭证")
+ private String vbeln;
+
+ /**
+ * 销售单据项目
+ */
+ @Excel(name = "销售单据项目")
+ private String vbpos;
+
+ public void setObjId(Long objId) {
+ this.objId = objId;
+ }
+
+ public Long getObjId() {
+ return objId;
+ }
+
+ public void setBomCode(String bomCode) {
+ this.bomCode = bomCode;
+ }
+
+ public String getBomCode() {
+ return bomCode;
+ }
+
+ 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 setStandardAmount(Long standardAmount) {
+ this.standardAmount = standardAmount;
+ }
+
+ public Long getStandardAmount() {
+ return standardAmount;
+ }
+
+ public void setIsFlag(Long isFlag) {
+ this.isFlag = isFlag;
+ }
+
+ public Long getIsFlag() {
+ return isFlag;
+ }
+
+ public void setCreatedBy(String createdBy) {
+ this.createdBy = createdBy;
+ }
+
+ public String getCreatedBy() {
+ return createdBy;
+ }
+
+ public void setCreatedTime(Date createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ public Date getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setUpdatedBy(String updatedBy) {
+ this.updatedBy = updatedBy;
+ }
+
+ public String getUpdatedBy() {
+ return updatedBy;
+ }
+
+ public void setUpdatedTime(Date updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ public Date getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setFactoryCode(String factoryCode) {
+ this.factoryCode = factoryCode;
+ }
+
+ public String getFactoryCode() {
+ return factoryCode;
+ }
+
+ public void setSort(String sort) {
+ this.sort = sort;
+ }
+
+ public String getSort() {
+ return sort;
+ }
+
+ public void setVbeln(String vbeln) {
+ this.vbeln = vbeln;
+ }
+
+ public String getVbeln() {
+ return vbeln;
+ }
+
+ public void setVbpos(String vbpos) {
+ this.vbpos = vbpos;
+ }
+
+ public String getVbpos() {
+ return vbpos;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+ .append("objId", getObjId())
+ .append("bomCode", getBomCode())
+ .append("materialCode", getMaterialCode())
+ .append("materialName", getMaterialName())
+ .append("materialType", getMaterialType())
+ .append("standardAmount", getStandardAmount())
+ .append("parentId", getParentId())
+ .append("isFlag", getIsFlag())
+ .append("createdBy", getCreatedBy())
+ .append("createdTime", getCreatedTime())
+ .append("updatedBy", getUpdatedBy())
+ .append("updatedTime", getUpdatedTime())
+ .append("factoryCode", getFactoryCode())
+ .append("sort", getSort())
+ .append("vbeln", getVbeln())
+ .append("vbpos", getVbpos())
+ .toString();
+ }
+}
diff --git a/aucma-base/src/main/java/com/aucma/base/mapper/OrderBomInfoMapper.java b/aucma-base/src/main/java/com/aucma/base/mapper/OrderBomInfoMapper.java
new file mode 100644
index 0000000..62d30a3
--- /dev/null
+++ b/aucma-base/src/main/java/com/aucma/base/mapper/OrderBomInfoMapper.java
@@ -0,0 +1,61 @@
+package com.aucma.base.mapper;
+
+import java.util.List;
+import com.aucma.base.domain.OrderBomInfo;
+
+/**
+ * 订单BOMMapper接口
+ *
+ * @author Yinq
+ * @date 2023-09-28
+ */
+public interface OrderBomInfoMapper
+{
+ /**
+ * 查询订单BOM
+ *
+ * @param objId 订单BOM主键
+ * @return 订单BOM
+ */
+ public OrderBomInfo selectOrderBomInfoByObjId(Long objId);
+
+ /**
+ * 查询订单BOM列表
+ *
+ * @param orderBomInfo 订单BOM
+ * @return 订单BOM集合
+ */
+ public List selectOrderBomInfoList(OrderBomInfo orderBomInfo);
+
+ /**
+ * 新增订单BOM
+ *
+ * @param orderBomInfo 订单BOM
+ * @return 结果
+ */
+ public int insertOrderBomInfo(OrderBomInfo orderBomInfo);
+
+ /**
+ * 修改订单BOM
+ *
+ * @param orderBomInfo 订单BOM
+ * @return 结果
+ */
+ public int updateOrderBomInfo(OrderBomInfo orderBomInfo);
+
+ /**
+ * 删除订单BOM
+ *
+ * @param objId 订单BOM主键
+ * @return 结果
+ */
+ public int deleteOrderBomInfoByObjId(Long objId);
+
+ /**
+ * 批量删除订单BOM
+ *
+ * @param objIds 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteOrderBomInfoByObjIds(Long[] objIds);
+}
diff --git a/aucma-base/src/main/java/com/aucma/base/service/IOrderBomInfoService.java b/aucma-base/src/main/java/com/aucma/base/service/IOrderBomInfoService.java
new file mode 100644
index 0000000..d2fed59
--- /dev/null
+++ b/aucma-base/src/main/java/com/aucma/base/service/IOrderBomInfoService.java
@@ -0,0 +1,61 @@
+package com.aucma.base.service;
+
+import java.util.List;
+import com.aucma.base.domain.OrderBomInfo;
+
+/**
+ * 订单BOMService接口
+ *
+ * @author Yinq
+ * @date 2023-09-28
+ */
+public interface IOrderBomInfoService
+{
+ /**
+ * 查询订单BOM
+ *
+ * @param objId 订单BOM主键
+ * @return 订单BOM
+ */
+ public OrderBomInfo selectOrderBomInfoByObjId(Long objId);
+
+ /**
+ * 查询订单BOM列表
+ *
+ * @param orderBomInfo 订单BOM
+ * @return 订单BOM集合
+ */
+ public List selectOrderBomInfoList(OrderBomInfo orderBomInfo);
+
+ /**
+ * 新增订单BOM
+ *
+ * @param orderBomInfo 订单BOM
+ * @return 结果
+ */
+ public int insertOrderBomInfo(OrderBomInfo orderBomInfo);
+
+ /**
+ * 修改订单BOM
+ *
+ * @param orderBomInfo 订单BOM
+ * @return 结果
+ */
+ public int updateOrderBomInfo(OrderBomInfo orderBomInfo);
+
+ /**
+ * 批量删除订单BOM
+ *
+ * @param objIds 需要删除的订单BOM主键集合
+ * @return 结果
+ */
+ public int deleteOrderBomInfoByObjIds(Long[] objIds);
+
+ /**
+ * 删除订单BOM信息
+ *
+ * @param objId 订单BOM主键
+ * @return 结果
+ */
+ public int deleteOrderBomInfoByObjId(Long objId);
+}
diff --git a/aucma-base/src/main/java/com/aucma/base/service/impl/OrderBomInfoServiceImpl.java b/aucma-base/src/main/java/com/aucma/base/service/impl/OrderBomInfoServiceImpl.java
new file mode 100644
index 0000000..a45e69e
--- /dev/null
+++ b/aucma-base/src/main/java/com/aucma/base/service/impl/OrderBomInfoServiceImpl.java
@@ -0,0 +1,93 @@
+package com.aucma.base.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.aucma.base.mapper.OrderBomInfoMapper;
+import com.aucma.base.domain.OrderBomInfo;
+import com.aucma.base.service.IOrderBomInfoService;
+
+/**
+ * 订单BOMService业务层处理
+ *
+ * @author Yinq
+ * @date 2023-09-28
+ */
+@Service
+public class OrderBomInfoServiceImpl implements IOrderBomInfoService
+{
+ @Autowired
+ private OrderBomInfoMapper orderBomInfoMapper;
+
+ /**
+ * 查询订单BOM
+ *
+ * @param objId 订单BOM主键
+ * @return 订单BOM
+ */
+ @Override
+ public OrderBomInfo selectOrderBomInfoByObjId(Long objId)
+ {
+ return orderBomInfoMapper.selectOrderBomInfoByObjId(objId);
+ }
+
+ /**
+ * 查询订单BOM列表
+ *
+ * @param orderBomInfo 订单BOM
+ * @return 订单BOM
+ */
+ @Override
+ public List selectOrderBomInfoList(OrderBomInfo orderBomInfo)
+ {
+ return orderBomInfoMapper.selectOrderBomInfoList(orderBomInfo);
+ }
+
+ /**
+ * 新增订单BOM
+ *
+ * @param orderBomInfo 订单BOM
+ * @return 结果
+ */
+ @Override
+ public int insertOrderBomInfo(OrderBomInfo orderBomInfo)
+ {
+ return orderBomInfoMapper.insertOrderBomInfo(orderBomInfo);
+ }
+
+ /**
+ * 修改订单BOM
+ *
+ * @param orderBomInfo 订单BOM
+ * @return 结果
+ */
+ @Override
+ public int updateOrderBomInfo(OrderBomInfo orderBomInfo)
+ {
+ return orderBomInfoMapper.updateOrderBomInfo(orderBomInfo);
+ }
+
+ /**
+ * 批量删除订单BOM
+ *
+ * @param objIds 需要删除的订单BOM主键
+ * @return 结果
+ */
+ @Override
+ public int deleteOrderBomInfoByObjIds(Long[] objIds)
+ {
+ return orderBomInfoMapper.deleteOrderBomInfoByObjIds(objIds);
+ }
+
+ /**
+ * 删除订单BOM信息
+ *
+ * @param objId 订单BOM主键
+ * @return 结果
+ */
+ @Override
+ public int deleteOrderBomInfoByObjId(Long objId)
+ {
+ return orderBomInfoMapper.deleteOrderBomInfoByObjId(objId);
+ }
+}
diff --git a/aucma-base/src/main/resources/mapper/base/OrderBomInfoMapper.xml b/aucma-base/src/main/resources/mapper/base/OrderBomInfoMapper.xml
new file mode 100644
index 0000000..113e210
--- /dev/null
+++ b/aucma-base/src/main/resources/mapper/base/OrderBomInfoMapper.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select obj_id, bom_code, material_code, material_name, material_type, standard_amount, parent_id, is_flag, created_by, created_time, updated_by, updated_time, factory_code, sort, vbeln, vbpos from order_bominfo
+
+
+
+
+
+
+
+
+ SELECT seq_order_bominfo.NEXTVAL as objId FROM DUAL
+
+ insert into order_bominfo
+
+ obj_id,
+ bom_code,
+ material_code,
+ material_name,
+ material_type,
+ standard_amount,
+ parent_id,
+ is_flag,
+ created_by,
+ created_time,
+ updated_by,
+ updated_time,
+ factory_code,
+ sort,
+ vbeln,
+ vbpos,
+
+
+ #{objId},
+ #{bomCode},
+ #{materialCode},
+ #{materialName},
+ #{materialType},
+ #{standardAmount},
+ #{parentId},
+ #{isFlag},
+ #{createdBy},
+ #{createdTime},
+ #{updatedBy},
+ #{updatedTime},
+ #{factoryCode},
+ #{sort},
+ #{vbeln},
+ #{vbpos},
+
+
+
+
+ update order_bominfo
+
+ bom_code = #{bomCode},
+ material_code = #{materialCode},
+ material_name = #{materialName},
+ material_type = #{materialType},
+ standard_amount = #{standardAmount},
+ parent_id = #{parentId},
+ is_flag = #{isFlag},
+ created_by = #{createdBy},
+ created_time = #{createdTime},
+ updated_by = #{updatedBy},
+ updated_time = #{updatedTime},
+ factory_code = #{factoryCode},
+ sort = #{sort},
+ vbeln = #{vbeln},
+ vbpos = #{vbpos},
+
+ where obj_id = #{objId}
+
+
+
+ delete from order_bominfo where obj_id = #{objId}
+
+
+
+ delete from order_bominfo where obj_id in
+
+ #{objId}
+
+
+
\ No newline at end of file
diff --git a/aucma-common/src/main/java/com/aucma/common/core/domain/model/TreeStringEntity.java b/aucma-common/src/main/java/com/aucma/common/core/domain/model/TreeStringEntity.java
new file mode 100644
index 0000000..6394d6f
--- /dev/null
+++ b/aucma-common/src/main/java/com/aucma/common/core/domain/model/TreeStringEntity.java
@@ -0,0 +1,81 @@
+package com.aucma.common.core.domain.model;
+
+import com.aucma.common.core.domain.BaseEntity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Tree基类
+ *
+ * @author ruoyi
+ */
+public class TreeStringEntity extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 父菜单名称 */
+ private String parentName;
+
+ /** 父菜单ID */
+ private String parentId;
+
+ /** 显示顺序 */
+ private Integer orderNum;
+
+ /** 祖级列表 */
+ private String ancestors;
+
+ /** 子部门 */
+ private List> children = new ArrayList<>();
+
+ public String getParentName()
+ {
+ return parentName;
+ }
+
+ public void setParentName(String parentName)
+ {
+ this.parentName = parentName;
+ }
+
+ public String getParentId()
+ {
+ return parentId;
+ }
+
+ public void setParentId(String parentId)
+ {
+ this.parentId = parentId;
+ }
+
+ public Integer getOrderNum()
+ {
+ return orderNum;
+ }
+
+ public void setOrderNum(Integer orderNum)
+ {
+ this.orderNum = orderNum;
+ }
+
+ public String getAncestors()
+ {
+ return ancestors;
+ }
+
+ public void setAncestors(String ancestors)
+ {
+ this.ancestors = ancestors;
+ }
+
+ public List> getChildren()
+ {
+ return children;
+ }
+
+ public void setChildren(List> children)
+ {
+ this.children = children;
+ }
+}
diff --git a/aucma-production/pom.xml b/aucma-production/pom.xml
new file mode 100644
index 0000000..6af234d
--- /dev/null
+++ b/aucma-production/pom.xml
@@ -0,0 +1,31 @@
+
+
+
+ aucma
+ com.aucma
+ 3.8.6
+
+ 4.0.0
+
+ aucma-production
+
+
+
+ system系统模块
+
+
+
+
+
+
+
+ com.aucma
+ aucma-base
+
+
+
+
+
+
\ No newline at end of file
diff --git a/aucma-production/src/main/java/com/aucma/production/controller/BaseBomInfoController.java b/aucma-production/src/main/java/com/aucma/production/controller/BaseBomInfoController.java
new file mode 100644
index 0000000..d94943f
--- /dev/null
+++ b/aucma-production/src/main/java/com/aucma/production/controller/BaseBomInfoController.java
@@ -0,0 +1,103 @@
+package com.aucma.production.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.aucma.common.utils.DateUtils;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.aucma.common.annotation.Log;
+import com.aucma.common.core.controller.BaseController;
+import com.aucma.common.core.domain.AjaxResult;
+import com.aucma.common.enums.BusinessType;
+import com.aucma.production.domain.BaseBomInfo;
+import com.aucma.production.service.IBaseBomInfoService;
+import com.aucma.common.utils.poi.ExcelUtil;
+import com.aucma.common.core.page.TableDataInfo;
+
+/**
+ * 生产BOMController
+ *
+ * @author Yinq
+ * @date 2023-09-28
+ */
+@RestController
+@RequestMapping("/production/baseBomInfo" )
+public class BaseBomInfoController extends BaseController {
+ @Autowired
+ private IBaseBomInfoService baseBomInfoService;
+
+ /**
+ * 查询生产BOM列表
+ */
+ @PreAuthorize("@ss.hasPermi('production:baseBomInfo:list')" )
+ @GetMapping("/list" )
+ public TableDataInfo list(BaseBomInfo baseBomInfo) {
+ startPage();
+ List list = baseBomInfoService.selectBaseBomInfoList(baseBomInfo);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出生产BOM列表
+ */
+ @PreAuthorize("@ss.hasPermi('production:baseBomInfo:export')" )
+ @Log(title = "生产BOM" , businessType = BusinessType.EXPORT)
+ @PostMapping("/export" )
+ public void export(HttpServletResponse response, BaseBomInfo baseBomInfo) {
+ List list = baseBomInfoService.selectBaseBomInfoList(baseBomInfo);
+ ExcelUtil util = new ExcelUtil(BaseBomInfo. class);
+ util.exportExcel(response, list, "生产BOM数据" );
+ }
+
+ /**
+ * 获取生产BOM详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('production:baseBomInfo:query')" )
+ @GetMapping(value = "/{objId}" )
+ public AjaxResult getInfo(@PathVariable("objId" ) Long objId) {
+ return success(baseBomInfoService.selectBaseBomInfoByObjId(objId));
+ }
+
+ /**
+ * 新增生产BOM
+ */
+ @PreAuthorize("@ss.hasPermi('production:baseBomInfo:add')" )
+ @Log(title = "生产BOM" , businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody BaseBomInfo baseBomInfo) {
+ baseBomInfo.setCreatedBy(getUsername());
+ baseBomInfo.setCreatedTime(DateUtils.getNowDate());
+ return toAjax(baseBomInfoService.insertBaseBomInfo(baseBomInfo));
+ }
+
+ /**
+ * 修改生产BOM
+ */
+ @PreAuthorize("@ss.hasPermi('production:baseBomInfo:edit')" )
+ @Log(title = "生产BOM" , businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody BaseBomInfo baseBomInfo) {
+ baseBomInfo.setUpdatedBy(getUsername());
+ baseBomInfo.setUpdatedTime(DateUtils.getNowDate());
+ return toAjax(baseBomInfoService.updateBaseBomInfo(baseBomInfo));
+ }
+
+ /**
+ * 删除生产BOM
+ */
+ @PreAuthorize("@ss.hasPermi('production:baseBomInfo:remove')" )
+ @Log(title = "生产BOM" , businessType = BusinessType.DELETE)
+ @DeleteMapping("/{objIds}" )
+ public AjaxResult remove(@PathVariable Long[] objIds) {
+ return toAjax(baseBomInfoService.deleteBaseBomInfoByObjIds(objIds));
+ }
+}
diff --git a/aucma-production/src/main/java/com/aucma/production/domain/BaseBomInfo.java b/aucma-production/src/main/java/com/aucma/production/domain/BaseBomInfo.java
new file mode 100644
index 0000000..8afab60
--- /dev/null
+++ b/aucma-production/src/main/java/com/aucma/production/domain/BaseBomInfo.java
@@ -0,0 +1,251 @@
+package com.aucma.production.domain;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.aucma.common.annotation.Excel;
+import com.aucma.common.core.domain.BaseEntity;
+
+/**
+ * 生产BOM对象 base_bominfo
+ *
+ * @author Yinq
+ * @date 2023-09-28
+ */
+public class BaseBomInfo extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键标识
+ */
+ private Long objId;
+
+ /**
+ * BOM编号
+ */
+ @Excel(name = "BOM编号")
+ private String bomCode;
+
+ /**
+ * 子物料编号
+ */
+ @Excel(name = "子物料编号")
+ private String materialCode;
+
+ /**
+ * 物料名称
+ */
+ @Excel(name = "物料名称")
+ private String materialName;
+
+ /**
+ * 物料类型
+ */
+ @Excel(name = "物料类型")
+ private String materialType;
+
+ /**
+ * 标准数量
+ */
+ @Excel(name = "标准数量")
+ private Long standardAmount;
+
+ /**
+ * 父物料编号
+ */
+ @Excel(name = "父物料编号")
+ private String parentId;
+
+ /**
+ * 工厂编号
+ */
+ @Excel(name = "工厂编号")
+ private String plantCode;
+
+ /**
+ * 产线/工位
+ */
+ @Excel(name = "产线/工位")
+ private String productLineCode;
+
+ /**
+ * 是否标识
+ */
+ @Excel(name = "是否标识")
+ private Long isFlag;
+
+ /**
+ * 创建人
+ */
+ @Excel(name = "创建人")
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ @Excel(name = "更新人")
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date updatedTime;
+
+ /**
+ * 工单编号
+ */
+ @Excel(name = "工单编号")
+ private String orderCode;
+
+ public void setObjId(Long objId) {
+ this.objId = objId;
+ }
+
+ public Long getObjId() {
+ return objId;
+ }
+
+ public void setBomCode(String bomCode) {
+ this.bomCode = bomCode;
+ }
+
+ public String getBomCode() {
+ return bomCode;
+ }
+
+ 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 setStandardAmount(Long standardAmount) {
+ this.standardAmount = standardAmount;
+ }
+
+ public Long getStandardAmount() {
+ return standardAmount;
+ }
+
+ public void setParentId(String parentId) {
+ this.parentId = parentId;
+ }
+
+ public String getParentId() {
+ return parentId;
+ }
+
+ public void setPlantCode(String plantCode) {
+ this.plantCode = plantCode;
+ }
+
+ public String getPlantCode() {
+ return plantCode;
+ }
+
+ public void setProductLineCode(String productLineCode) {
+ this.productLineCode = productLineCode;
+ }
+
+ public String getProductLineCode() {
+ return productLineCode;
+ }
+
+ public void setIsFlag(Long isFlag) {
+ this.isFlag = isFlag;
+ }
+
+ public Long getIsFlag() {
+ return isFlag;
+ }
+
+ public void setCreatedBy(String createdBy) {
+ this.createdBy = createdBy;
+ }
+
+ public String getCreatedBy() {
+ return createdBy;
+ }
+
+ public void setCreatedTime(Date createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ public Date getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setUpdatedBy(String updatedBy) {
+ this.updatedBy = updatedBy;
+ }
+
+ public String getUpdatedBy() {
+ return updatedBy;
+ }
+
+ public void setUpdatedTime(Date updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ public Date getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setOrderCode(String orderCode) {
+ this.orderCode = orderCode;
+ }
+
+ public String getOrderCode() {
+ return orderCode;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+ .append("objId", getObjId())
+ .append("bomCode", getBomCode())
+ .append("materialCode", getMaterialCode())
+ .append("materialName", getMaterialName())
+ .append("materialType", getMaterialType())
+ .append("standardAmount", getStandardAmount())
+ .append("parentId", getParentId())
+ .append("plantCode", getPlantCode())
+ .append("productLineCode", getProductLineCode())
+ .append("isFlag", getIsFlag())
+ .append("createdBy", getCreatedBy())
+ .append("createdTime", getCreatedTime())
+ .append("updatedBy", getUpdatedBy())
+ .append("updatedTime", getUpdatedTime())
+ .append("orderCode", getOrderCode())
+ .toString();
+ }
+}
diff --git a/aucma-production/src/main/java/com/aucma/production/mapper/BaseBomInfoMapper.java b/aucma-production/src/main/java/com/aucma/production/mapper/BaseBomInfoMapper.java
new file mode 100644
index 0000000..59f6425
--- /dev/null
+++ b/aucma-production/src/main/java/com/aucma/production/mapper/BaseBomInfoMapper.java
@@ -0,0 +1,61 @@
+package com.aucma.production.mapper;
+
+import java.util.List;
+import com.aucma.production.domain.BaseBomInfo;
+
+/**
+ * 生产BOMMapper接口
+ *
+ * @author Yinq
+ * @date 2023-09-28
+ */
+public interface BaseBomInfoMapper
+{
+ /**
+ * 查询生产BOM
+ *
+ * @param objId 生产BOM主键
+ * @return 生产BOM
+ */
+ public BaseBomInfo selectBaseBomInfoByObjId(Long objId);
+
+ /**
+ * 查询生产BOM列表
+ *
+ * @param baseBomInfo 生产BOM
+ * @return 生产BOM集合
+ */
+ public List selectBaseBomInfoList(BaseBomInfo baseBomInfo);
+
+ /**
+ * 新增生产BOM
+ *
+ * @param baseBomInfo 生产BOM
+ * @return 结果
+ */
+ public int insertBaseBomInfo(BaseBomInfo baseBomInfo);
+
+ /**
+ * 修改生产BOM
+ *
+ * @param baseBomInfo 生产BOM
+ * @return 结果
+ */
+ public int updateBaseBomInfo(BaseBomInfo baseBomInfo);
+
+ /**
+ * 删除生产BOM
+ *
+ * @param objId 生产BOM主键
+ * @return 结果
+ */
+ public int deleteBaseBomInfoByObjId(Long objId);
+
+ /**
+ * 批量删除生产BOM
+ *
+ * @param objIds 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteBaseBomInfoByObjIds(Long[] objIds);
+}
diff --git a/aucma-production/src/main/java/com/aucma/production/service/IBaseBomInfoService.java b/aucma-production/src/main/java/com/aucma/production/service/IBaseBomInfoService.java
new file mode 100644
index 0000000..54fe001
--- /dev/null
+++ b/aucma-production/src/main/java/com/aucma/production/service/IBaseBomInfoService.java
@@ -0,0 +1,61 @@
+package com.aucma.production.service;
+
+import java.util.List;
+import com.aucma.production.domain.BaseBomInfo;
+
+/**
+ * 生产BOMService接口
+ *
+ * @author Yinq
+ * @date 2023-09-28
+ */
+public interface IBaseBomInfoService
+{
+ /**
+ * 查询生产BOM
+ *
+ * @param objId 生产BOM主键
+ * @return 生产BOM
+ */
+ public BaseBomInfo selectBaseBomInfoByObjId(Long objId);
+
+ /**
+ * 查询生产BOM列表
+ *
+ * @param baseBomInfo 生产BOM
+ * @return 生产BOM集合
+ */
+ public List selectBaseBomInfoList(BaseBomInfo baseBomInfo);
+
+ /**
+ * 新增生产BOM
+ *
+ * @param baseBomInfo 生产BOM
+ * @return 结果
+ */
+ public int insertBaseBomInfo(BaseBomInfo baseBomInfo);
+
+ /**
+ * 修改生产BOM
+ *
+ * @param baseBomInfo 生产BOM
+ * @return 结果
+ */
+ public int updateBaseBomInfo(BaseBomInfo baseBomInfo);
+
+ /**
+ * 批量删除生产BOM
+ *
+ * @param objIds 需要删除的生产BOM主键集合
+ * @return 结果
+ */
+ public int deleteBaseBomInfoByObjIds(Long[] objIds);
+
+ /**
+ * 删除生产BOM信息
+ *
+ * @param objId 生产BOM主键
+ * @return 结果
+ */
+ public int deleteBaseBomInfoByObjId(Long objId);
+}
diff --git a/aucma-production/src/main/java/com/aucma/production/service/impl/BaseBomInfoServiceImpl.java b/aucma-production/src/main/java/com/aucma/production/service/impl/BaseBomInfoServiceImpl.java
new file mode 100644
index 0000000..aab9d5c
--- /dev/null
+++ b/aucma-production/src/main/java/com/aucma/production/service/impl/BaseBomInfoServiceImpl.java
@@ -0,0 +1,93 @@
+package com.aucma.production.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.aucma.production.mapper.BaseBomInfoMapper;
+import com.aucma.production.domain.BaseBomInfo;
+import com.aucma.production.service.IBaseBomInfoService;
+
+/**
+ * 生产BOMService业务层处理
+ *
+ * @author Yinq
+ * @date 2023-09-28
+ */
+@Service
+public class BaseBomInfoServiceImpl implements IBaseBomInfoService
+{
+ @Autowired
+ private BaseBomInfoMapper baseBomInfoMapper;
+
+ /**
+ * 查询生产BOM
+ *
+ * @param objId 生产BOM主键
+ * @return 生产BOM
+ */
+ @Override
+ public BaseBomInfo selectBaseBomInfoByObjId(Long objId)
+ {
+ return baseBomInfoMapper.selectBaseBomInfoByObjId(objId);
+ }
+
+ /**
+ * 查询生产BOM列表
+ *
+ * @param baseBomInfo 生产BOM
+ * @return 生产BOM
+ */
+ @Override
+ public List selectBaseBomInfoList(BaseBomInfo baseBomInfo)
+ {
+ return baseBomInfoMapper.selectBaseBomInfoList(baseBomInfo);
+ }
+
+ /**
+ * 新增生产BOM
+ *
+ * @param baseBomInfo 生产BOM
+ * @return 结果
+ */
+ @Override
+ public int insertBaseBomInfo(BaseBomInfo baseBomInfo)
+ {
+ return baseBomInfoMapper.insertBaseBomInfo(baseBomInfo);
+ }
+
+ /**
+ * 修改生产BOM
+ *
+ * @param baseBomInfo 生产BOM
+ * @return 结果
+ */
+ @Override
+ public int updateBaseBomInfo(BaseBomInfo baseBomInfo)
+ {
+ return baseBomInfoMapper.updateBaseBomInfo(baseBomInfo);
+ }
+
+ /**
+ * 批量删除生产BOM
+ *
+ * @param objIds 需要删除的生产BOM主键
+ * @return 结果
+ */
+ @Override
+ public int deleteBaseBomInfoByObjIds(Long[] objIds)
+ {
+ return baseBomInfoMapper.deleteBaseBomInfoByObjIds(objIds);
+ }
+
+ /**
+ * 删除生产BOM信息
+ *
+ * @param objId 生产BOM主键
+ * @return 结果
+ */
+ @Override
+ public int deleteBaseBomInfoByObjId(Long objId)
+ {
+ return baseBomInfoMapper.deleteBaseBomInfoByObjId(objId);
+ }
+}
diff --git a/aucma-production/src/main/resources/mapper/production/BaseBomInfoMapper.xml b/aucma-production/src/main/resources/mapper/production/BaseBomInfoMapper.xml
new file mode 100644
index 0000000..155ce10
--- /dev/null
+++ b/aucma-production/src/main/resources/mapper/production/BaseBomInfoMapper.xml
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select obj_id, bom_code, material_code, material_name, material_type, standard_amount, parent_id, plant_code, product_line_code, is_flag, created_by, created_time, updated_by, updated_time, order_code from base_bominfo
+
+
+
+
+
+
+
+
+ SELECT seq_base_bominfo.NEXTVAL as objId FROM DUAL
+
+ insert into base_bominfo
+
+ obj_id,
+ bom_code,
+ material_code,
+ material_name,
+ material_type,
+ standard_amount,
+ parent_id,
+ plant_code,
+ product_line_code,
+ is_flag,
+ created_by,
+ created_time,
+ updated_by,
+ updated_time,
+ order_code,
+
+
+ #{objId},
+ #{bomCode},
+ #{materialCode},
+ #{materialName},
+ #{materialType},
+ #{standardAmount},
+ #{parentId},
+ #{plantCode},
+ #{productLineCode},
+ #{isFlag},
+ #{createdBy},
+ #{createdTime},
+ #{updatedBy},
+ #{updatedTime},
+ #{orderCode},
+
+
+
+
+ update base_bominfo
+
+ bom_code = #{bomCode},
+ material_code = #{materialCode},
+ material_name = #{materialName},
+ material_type = #{materialType},
+ standard_amount = #{standardAmount},
+ parent_id = #{parentId},
+ plant_code = #{plantCode},
+ product_line_code = #{productLineCode},
+ is_flag = #{isFlag},
+ created_by = #{createdBy},
+ created_time = #{createdTime},
+ updated_by = #{updatedBy},
+ updated_time = #{updatedTime},
+ order_code = #{orderCode},
+
+ where obj_id = #{objId}
+
+
+
+ delete from base_bominfo where obj_id = #{objId}
+
+
+
+ delete from base_bominfo where obj_id in
+
+ #{objId}
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 9538364..17f35b7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -184,6 +184,13 @@
${aucma.version}
+
+
+ com.aucma
+ aucma-production
+ ${aucma.version}
+
+
@@ -196,6 +203,7 @@
aucma-common
aucma-base
aucma-api
+ aucma-production
pom