From 9ff0880773f13be8eded358af0fc9d78b8274746 Mon Sep 17 00:00:00 2001 From: yinq <1345442242@qq.com> Date: Mon, 18 Sep 2023 16:00:31 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20=E5=B7=A5=E5=8E=82=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E3=80=81=E4=BA=A7=E7=BA=BF=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BaseFactoryController.java | 114 +++++++++++ .../controller/BaseProductlineController.java | 103 ++++++++++ .../com/aucma/base/domain/BaseFactory.java | 162 +++++++++++++++ .../aucma/base/domain/BaseProductline.java | 191 ++++++++++++++++++ .../aucma/base/mapper/BaseFactoryMapper.java | 61 ++++++ .../base/mapper/BaseProductlineMapper.java | 61 ++++++ .../base/service/IBaseFactoryService.java | 61 ++++++ .../base/service/IBaseProductlineService.java | 61 ++++++ .../service/impl/BaseFactoryServiceImpl.java | 96 +++++++++ .../impl/BaseProductlineServiceImpl.java | 93 +++++++++ .../mapper/base/BaseFactoryMapper.xml | 101 +++++++++ .../mapper/base/BaseProductlineMapper.xml | 118 +++++++++++ 12 files changed, 1222 insertions(+) create mode 100644 aucma-base/src/main/java/com/aucma/base/controller/BaseFactoryController.java create mode 100644 aucma-base/src/main/java/com/aucma/base/controller/BaseProductlineController.java create mode 100644 aucma-base/src/main/java/com/aucma/base/domain/BaseFactory.java create mode 100644 aucma-base/src/main/java/com/aucma/base/domain/BaseProductline.java create mode 100644 aucma-base/src/main/java/com/aucma/base/mapper/BaseFactoryMapper.java create mode 100644 aucma-base/src/main/java/com/aucma/base/mapper/BaseProductlineMapper.java create mode 100644 aucma-base/src/main/java/com/aucma/base/service/IBaseFactoryService.java create mode 100644 aucma-base/src/main/java/com/aucma/base/service/IBaseProductlineService.java create mode 100644 aucma-base/src/main/java/com/aucma/base/service/impl/BaseFactoryServiceImpl.java create mode 100644 aucma-base/src/main/java/com/aucma/base/service/impl/BaseProductlineServiceImpl.java create mode 100644 aucma-base/src/main/resources/mapper/base/BaseFactoryMapper.xml create mode 100644 aucma-base/src/main/resources/mapper/base/BaseProductlineMapper.xml diff --git a/aucma-base/src/main/java/com/aucma/base/controller/BaseFactoryController.java b/aucma-base/src/main/java/com/aucma/base/controller/BaseFactoryController.java new file mode 100644 index 0000000..c9bc04c --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/controller/BaseFactoryController.java @@ -0,0 +1,114 @@ +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.BaseFactory; +import com.aucma.base.service.IBaseFactoryService; +import com.aucma.common.utils.poi.ExcelUtil; +import com.aucma.common.core.page.TableDataInfo; + +/** + * 工厂管理Controller + * + * @author Yinq + * @date 2023-09-18 + */ +@RestController +@RequestMapping("/base/factory") +public class BaseFactoryController extends BaseController { + @Autowired + private IBaseFactoryService baseFactoryService; + + /** + * 查询工厂管理列表 + */ + @PreAuthorize("@ss.hasPermi('base:factory:list')") + @GetMapping("/list") + public TableDataInfo list(BaseFactory baseFactory) { + startPage(); + List list = baseFactoryService.selectBaseFactoryList(baseFactory); + return getDataTable(list); + } + + /** + * 查询工厂下拉框列表 + * @param baseFactory + * @return + */ + @GetMapping("/findFactoryList") + public AjaxResult findFactoryList(BaseFactory baseFactory) { + List list = baseFactoryService.selectBaseFactoryList(baseFactory); + return success(list); + } + + /** + * 导出工厂管理列表 + */ + @PreAuthorize("@ss.hasPermi('base:factory:export')") + @Log(title = "工厂管理" , businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BaseFactory baseFactory) { + List list = baseFactoryService.selectBaseFactoryList(baseFactory); + ExcelUtil util = new ExcelUtil(BaseFactory.class); + util.exportExcel(response, list, "工厂管理数据"); + } + + /** + * 获取工厂管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('base:factory:query')") + @GetMapping(value = "/{objId}") + public AjaxResult getInfo(@PathVariable("objId") Long objId) { + return success(baseFactoryService.selectBaseFactoryByObjId(objId)); + } + + /** + * 新增工厂管理 + */ + @PreAuthorize("@ss.hasPermi('base:factory:add')") + @Log(title = "工厂管理" , businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BaseFactory baseFactory) { + baseFactory.setCreatedBy(getUsername()); + baseFactory.setCreatedTime(DateUtils.getNowDate()); + return toAjax(baseFactoryService.insertBaseFactory(baseFactory)); + } + + /** + * 修改工厂管理 + */ + @PreAuthorize("@ss.hasPermi('base:factory:edit')") + @Log(title = "工厂管理" , businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BaseFactory baseFactory) { + baseFactory.setUpdatedBy(getUsername()); + baseFactory.setUpdatedTime(DateUtils.getNowDate()); + return toAjax(baseFactoryService.updateBaseFactory(baseFactory)); + } + + /** + * 删除工厂管理 + */ + @PreAuthorize("@ss.hasPermi('base:factory:remove')") + @Log(title = "工厂管理" , businessType = BusinessType.DELETE) + @DeleteMapping("/{objIds}") + public AjaxResult remove(@PathVariable Long[] objIds) { + return toAjax(baseFactoryService.deleteBaseFactoryByObjIds(objIds)); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/controller/BaseProductlineController.java b/aucma-base/src/main/java/com/aucma/base/controller/BaseProductlineController.java new file mode 100644 index 0000000..02721c9 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/controller/BaseProductlineController.java @@ -0,0 +1,103 @@ +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.BaseProductline; +import com.aucma.base.service.IBaseProductlineService; +import com.aucma.common.utils.poi.ExcelUtil; +import com.aucma.common.core.page.TableDataInfo; + +/** + * 产线信息Controller + * + * @author Yinq + * @date 2023-09-18 + */ +@RestController +@RequestMapping("/base/productline") +public class BaseProductlineController extends BaseController { + @Autowired + private IBaseProductlineService baseProductlineService; + + /** + * 查询产线信息列表 + */ + @PreAuthorize("@ss.hasPermi('base:productline:list')") + @GetMapping("/list") + public TableDataInfo list(BaseProductline baseProductline) { + startPage(); + List list = baseProductlineService.selectBaseProductlineList(baseProductline); + return getDataTable(list); + } + + /** + * 导出产线信息列表 + */ + @PreAuthorize("@ss.hasPermi('base:productline:export')") + @Log(title = "产线信息" , businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BaseProductline baseProductline) { + List list = baseProductlineService.selectBaseProductlineList(baseProductline); + ExcelUtil util = new ExcelUtil(BaseProductline.class); + util.exportExcel(response, list, "产线信息数据"); + } + + /** + * 获取产线信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('base:productline:query')") + @GetMapping(value = "/{objid}") + public AjaxResult getInfo(@PathVariable("objid") Long objid) { + return success(baseProductlineService.selectBaseProductlineByObjid(objid)); + } + + /** + * 新增产线信息 + */ + @PreAuthorize("@ss.hasPermi('base:productline:add')") + @Log(title = "产线信息" , businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BaseProductline baseProductline) { + baseProductline.setCreatedBy(getUsername()); + baseProductline.setCreatedTime(DateUtils.getNowDate()); + return toAjax(baseProductlineService.insertBaseProductline(baseProductline)); + } + + /** + * 修改产线信息 + */ + @PreAuthorize("@ss.hasPermi('base:productline:edit')") + @Log(title = "产线信息" , businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BaseProductline baseProductline) { + baseProductline.setUpdatedBy(getUsername()); + baseProductline.setUpdatedTime(DateUtils.getNowDate()); + return toAjax(baseProductlineService.updateBaseProductline(baseProductline)); + } + + /** + * 删除产线信息 + */ + @PreAuthorize("@ss.hasPermi('base:productline:remove')") + @Log(title = "产线信息" , businessType = BusinessType.DELETE) + @DeleteMapping("/{objids}") + public AjaxResult remove(@PathVariable Long[] objids) { + return toAjax(baseProductlineService.deleteBaseProductlineByObjids(objids)); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/domain/BaseFactory.java b/aucma-base/src/main/java/com/aucma/base/domain/BaseFactory.java new file mode 100644 index 0000000..8d65d1f --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/domain/BaseFactory.java @@ -0,0 +1,162 @@ +package com.aucma.base.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; + +/** + * 工厂管理对象 base_factory + * + * @author Yinq + * @date 2023-09-18 + */ +public class BaseFactory extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键标识 + */ + private Long objId; + + /** + * 公司名称 + */ + @Excel(name = "公司名称") + private String companyName; + + /** + * 工厂编号 + */ + @Excel(name = "工厂编号") + private String factoryCode; + + /** + * 工厂名称 + */ + @Excel(name = "工厂名称") + private String factoryName; + + /** + * 工厂状态 + */ + @Excel(name = "工厂状态") + private String factoryStatus; + + /** + * 创建人 + */ + @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; + + public void setObjId(Long objId) { + this.objId = objId; + } + + public Long getObjId() { + return objId; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public String getCompanyName() { + return companyName; + } + + public void setFactoryCode(String factoryCode) { + this.factoryCode = factoryCode; + } + + public String getFactoryCode() { + return factoryCode; + } + + public void setFactoryName(String factoryName) { + this.factoryName = factoryName; + } + + public String getFactoryName() { + return factoryName; + } + + public void setFactoryStatus(String factoryStatus) { + this.factoryStatus = factoryStatus; + } + + public String getFactoryStatus() { + return factoryStatus; + } + + 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; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("objId" , getObjId()) + .append("companyName" , getCompanyName()) + .append("factoryCode" , getFactoryCode()) + .append("factoryName" , getFactoryName()) + .append("factoryStatus" , getFactoryStatus()) + .append("remark" , getRemark()) + .append("createdBy" , getCreatedBy()) + .append("createdTime" , getCreatedTime()) + .append("updatedBy" , getUpdatedBy()) + .append("updatedTime" , getUpdatedTime()) + .toString(); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/domain/BaseProductline.java b/aucma-base/src/main/java/com/aucma/base/domain/BaseProductline.java new file mode 100644 index 0000000..b6cdb26 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/domain/BaseProductline.java @@ -0,0 +1,191 @@ +package com.aucma.base.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; + +/** + * 产线信息对象 base_productline + * + * @author Yinq + * @date 2023-09-18 + */ +public class BaseProductline extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键标识 + */ + private Long objid; + + /** + * 产线编号 + */ + @Excel(name = "产线编号") + private String productlineCode; + + /** + * 产线名称 + */ + @Excel(name = "产线名称") + private String productlineName; + + /** + * 产线类别(1-产线;2-工位) + */ + @Excel(name = "产线类别" , readConverterExp = "1=-产线;2-工位") + private Long productlineType; + + /** + * 所属工厂 + */ + @Excel(name = "所属工厂编号") + private String plantCode; + + /** + * 所属工厂 + */ + @Excel(name = "所属工厂名称") + private String plantName; + + /** + * 启用标识 + */ + @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; + + + public String getPlantName() { + return plantName; + } + + public void setPlantName(String plantName) { + this.plantName = plantName; + } + + public void setObjid(Long objid) { + this.objid = objid; + } + + public Long getObjid() { + return objid; + } + + public void setProductlineCode(String productlineCode) { + this.productlineCode = productlineCode; + } + + public String getProductlineCode() { + return productlineCode; + } + + public void setProductlineName(String productlineName) { + this.productlineName = productlineName; + } + + public String getProductlineName() { + return productlineName; + } + + public void setProductlineType(Long productlineType) { + this.productlineType = productlineType; + } + + public Long getProductlineType() { + return productlineType; + } + + public void setPlantCode(String plantCode) { + this.plantCode = plantCode; + } + + public String getPlantCode() { + return plantCode; + } + + 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; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("objid" , getObjid()) + .append("productlineCode" , getProductlineCode()) + .append("productlineName" , getProductlineName()) + .append("productlineType" , getProductlineType()) + .append("plantCode" , getPlantCode()) + .append("isFlag" , getIsFlag()) + .append("createdBy" , getCreatedBy()) + .append("createdTime" , getCreatedTime()) + .append("updatedBy" , getUpdatedBy()) + .append("updatedTime" , getUpdatedTime()) + .toString(); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/mapper/BaseFactoryMapper.java b/aucma-base/src/main/java/com/aucma/base/mapper/BaseFactoryMapper.java new file mode 100644 index 0000000..e6067da --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/mapper/BaseFactoryMapper.java @@ -0,0 +1,61 @@ +package com.aucma.base.mapper; + +import java.util.List; +import com.aucma.base.domain.BaseFactory; + +/** + * 工厂管理Mapper接口 + * + * @author Yinq + * @date 2023-09-18 + */ +public interface BaseFactoryMapper +{ + /** + * 查询工厂管理 + * + * @param objId 工厂管理主键 + * @return 工厂管理 + */ + public BaseFactory selectBaseFactoryByObjId(Long objId); + + /** + * 查询工厂管理列表 + * + * @param baseFactory 工厂管理 + * @return 工厂管理集合 + */ + public List selectBaseFactoryList(BaseFactory baseFactory); + + /** + * 新增工厂管理 + * + * @param baseFactory 工厂管理 + * @return 结果 + */ + public int insertBaseFactory(BaseFactory baseFactory); + + /** + * 修改工厂管理 + * + * @param baseFactory 工厂管理 + * @return 结果 + */ + public int updateBaseFactory(BaseFactory baseFactory); + + /** + * 删除工厂管理 + * + * @param objId 工厂管理主键 + * @return 结果 + */ + public int deleteBaseFactoryByObjId(Long objId); + + /** + * 批量删除工厂管理 + * + * @param objIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBaseFactoryByObjIds(Long[] objIds); +} diff --git a/aucma-base/src/main/java/com/aucma/base/mapper/BaseProductlineMapper.java b/aucma-base/src/main/java/com/aucma/base/mapper/BaseProductlineMapper.java new file mode 100644 index 0000000..2c6944b --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/mapper/BaseProductlineMapper.java @@ -0,0 +1,61 @@ +package com.aucma.base.mapper; + +import java.util.List; +import com.aucma.base.domain.BaseProductline; + +/** + * 产线信息Mapper接口 + * + * @author Yinq + * @date 2023-09-18 + */ +public interface BaseProductlineMapper +{ + /** + * 查询产线信息 + * + * @param objid 产线信息主键 + * @return 产线信息 + */ + public BaseProductline selectBaseProductlineByObjid(Long objid); + + /** + * 查询产线信息列表 + * + * @param baseProductline 产线信息 + * @return 产线信息集合 + */ + public List selectBaseProductlineList(BaseProductline baseProductline); + + /** + * 新增产线信息 + * + * @param baseProductline 产线信息 + * @return 结果 + */ + public int insertBaseProductline(BaseProductline baseProductline); + + /** + * 修改产线信息 + * + * @param baseProductline 产线信息 + * @return 结果 + */ + public int updateBaseProductline(BaseProductline baseProductline); + + /** + * 删除产线信息 + * + * @param objid 产线信息主键 + * @return 结果 + */ + public int deleteBaseProductlineByObjid(Long objid); + + /** + * 批量删除产线信息 + * + * @param objids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBaseProductlineByObjids(Long[] objids); +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/IBaseFactoryService.java b/aucma-base/src/main/java/com/aucma/base/service/IBaseFactoryService.java new file mode 100644 index 0000000..1ca8c38 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/IBaseFactoryService.java @@ -0,0 +1,61 @@ +package com.aucma.base.service; + +import java.util.List; +import com.aucma.base.domain.BaseFactory; + +/** + * 工厂管理Service接口 + * + * @author Yinq + * @date 2023-09-18 + */ +public interface IBaseFactoryService +{ + /** + * 查询工厂管理 + * + * @param objId 工厂管理主键 + * @return 工厂管理 + */ + public BaseFactory selectBaseFactoryByObjId(Long objId); + + /** + * 查询工厂管理列表 + * + * @param baseFactory 工厂管理 + * @return 工厂管理集合 + */ + public List selectBaseFactoryList(BaseFactory baseFactory); + + /** + * 新增工厂管理 + * + * @param baseFactory 工厂管理 + * @return 结果 + */ + public int insertBaseFactory(BaseFactory baseFactory); + + /** + * 修改工厂管理 + * + * @param baseFactory 工厂管理 + * @return 结果 + */ + public int updateBaseFactory(BaseFactory baseFactory); + + /** + * 批量删除工厂管理 + * + * @param objIds 需要删除的工厂管理主键集合 + * @return 结果 + */ + public int deleteBaseFactoryByObjIds(Long[] objIds); + + /** + * 删除工厂管理信息 + * + * @param objId 工厂管理主键 + * @return 结果 + */ + public int deleteBaseFactoryByObjId(Long objId); +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/IBaseProductlineService.java b/aucma-base/src/main/java/com/aucma/base/service/IBaseProductlineService.java new file mode 100644 index 0000000..67e2664 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/IBaseProductlineService.java @@ -0,0 +1,61 @@ +package com.aucma.base.service; + +import java.util.List; +import com.aucma.base.domain.BaseProductline; + +/** + * 产线信息Service接口 + * + * @author Yinq + * @date 2023-09-18 + */ +public interface IBaseProductlineService +{ + /** + * 查询产线信息 + * + * @param objid 产线信息主键 + * @return 产线信息 + */ + public BaseProductline selectBaseProductlineByObjid(Long objid); + + /** + * 查询产线信息列表 + * + * @param baseProductline 产线信息 + * @return 产线信息集合 + */ + public List selectBaseProductlineList(BaseProductline baseProductline); + + /** + * 新增产线信息 + * + * @param baseProductline 产线信息 + * @return 结果 + */ + public int insertBaseProductline(BaseProductline baseProductline); + + /** + * 修改产线信息 + * + * @param baseProductline 产线信息 + * @return 结果 + */ + public int updateBaseProductline(BaseProductline baseProductline); + + /** + * 批量删除产线信息 + * + * @param objids 需要删除的产线信息主键集合 + * @return 结果 + */ + public int deleteBaseProductlineByObjids(Long[] objids); + + /** + * 删除产线信息信息 + * + * @param objid 产线信息主键 + * @return 结果 + */ + public int deleteBaseProductlineByObjid(Long objid); +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/impl/BaseFactoryServiceImpl.java b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseFactoryServiceImpl.java new file mode 100644 index 0000000..223a436 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseFactoryServiceImpl.java @@ -0,0 +1,96 @@ +package com.aucma.base.service.impl; + +import java.util.Date; +import java.util.List; + +import com.aucma.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.aucma.base.mapper.BaseFactoryMapper; +import com.aucma.base.domain.BaseFactory; +import com.aucma.base.service.IBaseFactoryService; + +/** + * 工厂管理Service业务层处理 + * + * @author Yinq + * @date 2023-09-18 + */ +@Service +public class BaseFactoryServiceImpl implements IBaseFactoryService +{ + @Autowired + private BaseFactoryMapper baseFactoryMapper; + + /** + * 查询工厂管理 + * + * @param objId 工厂管理主键 + * @return 工厂管理 + */ + @Override + public BaseFactory selectBaseFactoryByObjId(Long objId) + { + return baseFactoryMapper.selectBaseFactoryByObjId(objId); + } + + /** + * 查询工厂管理列表 + * + * @param baseFactory 工厂管理 + * @return 工厂管理 + */ + @Override + public List selectBaseFactoryList(BaseFactory baseFactory) + { + return baseFactoryMapper.selectBaseFactoryList(baseFactory); + } + + /** + * 新增工厂管理 + * + * @param baseFactory 工厂管理 + * @return 结果 + */ + @Override + public int insertBaseFactory(BaseFactory baseFactory) + { + return baseFactoryMapper.insertBaseFactory(baseFactory); + } + + /** + * 修改工厂管理 + * + * @param baseFactory 工厂管理 + * @return 结果 + */ + @Override + public int updateBaseFactory(BaseFactory baseFactory) + { + return baseFactoryMapper.updateBaseFactory(baseFactory); + } + + /** + * 批量删除工厂管理 + * + * @param objIds 需要删除的工厂管理主键 + * @return 结果 + */ + @Override + public int deleteBaseFactoryByObjIds(Long[] objIds) + { + return baseFactoryMapper.deleteBaseFactoryByObjIds(objIds); + } + + /** + * 删除工厂管理信息 + * + * @param objId 工厂管理主键 + * @return 结果 + */ + @Override + public int deleteBaseFactoryByObjId(Long objId) + { + return baseFactoryMapper.deleteBaseFactoryByObjId(objId); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/impl/BaseProductlineServiceImpl.java b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseProductlineServiceImpl.java new file mode 100644 index 0000000..333e8dd --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseProductlineServiceImpl.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.BaseProductlineMapper; +import com.aucma.base.domain.BaseProductline; +import com.aucma.base.service.IBaseProductlineService; + +/** + * 产线信息Service业务层处理 + * + * @author Yinq + * @date 2023-09-18 + */ +@Service +public class BaseProductlineServiceImpl implements IBaseProductlineService +{ + @Autowired + private BaseProductlineMapper baseProductlineMapper; + + /** + * 查询产线信息 + * + * @param objid 产线信息主键 + * @return 产线信息 + */ + @Override + public BaseProductline selectBaseProductlineByObjid(Long objid) + { + return baseProductlineMapper.selectBaseProductlineByObjid(objid); + } + + /** + * 查询产线信息列表 + * + * @param baseProductline 产线信息 + * @return 产线信息 + */ + @Override + public List selectBaseProductlineList(BaseProductline baseProductline) + { + return baseProductlineMapper.selectBaseProductlineList(baseProductline); + } + + /** + * 新增产线信息 + * + * @param baseProductline 产线信息 + * @return 结果 + */ + @Override + public int insertBaseProductline(BaseProductline baseProductline) + { + return baseProductlineMapper.insertBaseProductline(baseProductline); + } + + /** + * 修改产线信息 + * + * @param baseProductline 产线信息 + * @return 结果 + */ + @Override + public int updateBaseProductline(BaseProductline baseProductline) + { + return baseProductlineMapper.updateBaseProductline(baseProductline); + } + + /** + * 批量删除产线信息 + * + * @param objids 需要删除的产线信息主键 + * @return 结果 + */ + @Override + public int deleteBaseProductlineByObjids(Long[] objids) + { + return baseProductlineMapper.deleteBaseProductlineByObjids(objids); + } + + /** + * 删除产线信息信息 + * + * @param objid 产线信息主键 + * @return 结果 + */ + @Override + public int deleteBaseProductlineByObjid(Long objid) + { + return baseProductlineMapper.deleteBaseProductlineByObjid(objid); + } +} diff --git a/aucma-base/src/main/resources/mapper/base/BaseFactoryMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseFactoryMapper.xml new file mode 100644 index 0000000..4fa65ea --- /dev/null +++ b/aucma-base/src/main/resources/mapper/base/BaseFactoryMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + select obj_id, company_name, factory_code, factory_name, factory_status, + remark, created_by, created_time, updated_by, updated_time from base_factory + + + + + + + + + SELECT seq_base_factory.NEXTVAL as objId FROM DUAL + + insert into base_factory + + obj_id, + company_name, + factory_code, + factory_name, + factory_status, + remark, + created_by, + created_time, + updated_by, + updated_time, + + + #{objId}, + #{companyName}, + #{factoryCode}, + #{factoryName}, + #{factoryStatus}, + #{remark}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + + + + + update base_factory + + company_name = #{companyName}, + factory_code = #{factoryCode}, + factory_name = #{factoryName}, + factory_status = #{factoryStatus}, + remark = #{remark}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + + where obj_id = #{objId} + + + + delete from base_factory where obj_id = #{objId} + + + + delete from base_factory where obj_id in + + #{objId} + + + \ No newline at end of file diff --git a/aucma-base/src/main/resources/mapper/base/BaseProductlineMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseProductlineMapper.xml new file mode 100644 index 0000000..0a48696 --- /dev/null +++ b/aucma-base/src/main/resources/mapper/base/BaseProductlineMapper.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + select bpl.objid, + bpl.productline_code, + bpl.productline_name, + bpl.productline_type, + bpl.plant_code, + bf.factory_name plantName, + bpl.is_flag, + bpl.created_by, + bpl.created_time, + bpl.updated_by, + bpl.updated_time + from base_productline bpl + left join base_factory bf on bf.factory_code = bpl.plant_code + + + + + + + + + SELECT seq_base_productline.NEXTVAL as objid FROM DUAL + + insert into base_productline + + objid, + productline_code, + productline_name, + productline_type, + plant_code, + is_flag, + created_by, + created_time, + updated_by, + updated_time, + + + #{objid}, + #{productlineCode}, + #{productlineName}, + #{productlineType}, + #{plantCode}, + #{isFlag}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + + + + + update base_productline + + productline_code = #{productlineCode}, + productline_name = #{productlineName}, + productline_type = #{productlineType}, + plant_code = #{plantCode}, + is_flag = #{isFlag}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + + where objid = #{objid} + + + + delete + from base_productline + where objid = #{objid} + + + + delete from base_productline where objid in + + #{objid} + + + \ No newline at end of file