From 0ee68dc9400426c0193b962b996f070324025a20 Mon Sep 17 00:00:00 2001 From: yinq <1345442242@qq.com> Date: Thu, 21 Sep 2023 09:05:19 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20=E4=BB=93=E5=BA=93=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=81=E8=B4=A7=E9=81=93=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BaseSpaceInfoController.java | 103 ++++++ .../controller/BaseStoreInfoController.java | 112 +++++++ .../com/aucma/base/domain/BaseSpaceInfo.java | 294 ++++++++++++++++++ .../com/aucma/base/domain/BaseStoreInfo.java | 219 +++++++++++++ .../base/mapper/BaseSpaceInfoMapper.java | 61 ++++ .../base/mapper/BaseStoreInfoMapper.java | 61 ++++ .../base/service/IBaseSpaceInfoService.java | 61 ++++ .../base/service/IBaseStoreInfoService.java | 61 ++++ .../impl/BaseSpaceInfoServiceImpl.java | 93 ++++++ .../impl/BaseStoreInfoServiceImpl.java | 93 ++++++ .../mapper/base/BaseSpaceInfoMapper.xml | 161 ++++++++++ .../mapper/base/BaseStoreInfoMapper.xml | 129 ++++++++ 12 files changed, 1448 insertions(+) create mode 100644 aucma-base/src/main/java/com/aucma/base/controller/BaseSpaceInfoController.java create mode 100644 aucma-base/src/main/java/com/aucma/base/controller/BaseStoreInfoController.java create mode 100644 aucma-base/src/main/java/com/aucma/base/domain/BaseSpaceInfo.java create mode 100644 aucma-base/src/main/java/com/aucma/base/domain/BaseStoreInfo.java create mode 100644 aucma-base/src/main/java/com/aucma/base/mapper/BaseSpaceInfoMapper.java create mode 100644 aucma-base/src/main/java/com/aucma/base/mapper/BaseStoreInfoMapper.java create mode 100644 aucma-base/src/main/java/com/aucma/base/service/IBaseSpaceInfoService.java create mode 100644 aucma-base/src/main/java/com/aucma/base/service/IBaseStoreInfoService.java create mode 100644 aucma-base/src/main/java/com/aucma/base/service/impl/BaseSpaceInfoServiceImpl.java create mode 100644 aucma-base/src/main/java/com/aucma/base/service/impl/BaseStoreInfoServiceImpl.java create mode 100644 aucma-base/src/main/resources/mapper/base/BaseSpaceInfoMapper.xml create mode 100644 aucma-base/src/main/resources/mapper/base/BaseStoreInfoMapper.xml diff --git a/aucma-base/src/main/java/com/aucma/base/controller/BaseSpaceInfoController.java b/aucma-base/src/main/java/com/aucma/base/controller/BaseSpaceInfoController.java new file mode 100644 index 0000000..94b570d --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/controller/BaseSpaceInfoController.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.BaseSpaceInfo; +import com.aucma.base.service.IBaseSpaceInfoService; +import com.aucma.common.utils.poi.ExcelUtil; +import com.aucma.common.core.page.TableDataInfo; + +/** + * 货道信息Controller + * + * @author Yinq + * @date 2023-09-20 + */ +@RestController +@RequestMapping("/base/spaceInfo" ) +public class BaseSpaceInfoController extends BaseController { + @Autowired + private IBaseSpaceInfoService baseSpaceInfoService; + + /** + * 查询货道信息列表 + */ + @PreAuthorize("@ss.hasPermi('base:spaceInfo:list')" ) + @GetMapping("/list" ) + public TableDataInfo list(BaseSpaceInfo baseSpaceInfo) { + startPage(); + List list = baseSpaceInfoService.selectBaseSpaceInfoList(baseSpaceInfo); + return getDataTable(list); + } + + /** + * 导出货道信息列表 + */ + @PreAuthorize("@ss.hasPermi('base:spaceInfo:export')" ) + @Log(title = "货道信息" , businessType = BusinessType.EXPORT) + @PostMapping("/export" ) + public void export(HttpServletResponse response, BaseSpaceInfo baseSpaceInfo) { + List list = baseSpaceInfoService.selectBaseSpaceInfoList(baseSpaceInfo); + ExcelUtil util = new ExcelUtil(BaseSpaceInfo. class); + util.exportExcel(response, list, "货道信息数据" ); + } + + /** + * 获取货道信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('base:spaceInfo:query')" ) + @GetMapping(value = "/{objId}" ) + public AjaxResult getInfo(@PathVariable("objId" ) Long objId) { + return success(baseSpaceInfoService.selectBaseSpaceInfoByObjId(objId)); + } + + /** + * 新增货道信息 + */ + @PreAuthorize("@ss.hasPermi('base:spaceInfo:add')" ) + @Log(title = "货道信息" , businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BaseSpaceInfo baseSpaceInfo) { + baseSpaceInfo.setCreatedBy(getUsername()); + baseSpaceInfo.setCreatedTime(DateUtils.getNowDate()); + return toAjax(baseSpaceInfoService.insertBaseSpaceInfo(baseSpaceInfo)); + } + + /** + * 修改货道信息 + */ + @PreAuthorize("@ss.hasPermi('base:spaceInfo:edit')" ) + @Log(title = "货道信息" , businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BaseSpaceInfo baseSpaceInfo) { + baseSpaceInfo.setUpdatedBy(getUsername()); + baseSpaceInfo.setUpdatedTime(DateUtils.getNowDate()); + return toAjax(baseSpaceInfoService.updateBaseSpaceInfo(baseSpaceInfo)); + } + + /** + * 删除货道信息 + */ + @PreAuthorize("@ss.hasPermi('base:spaceInfo:remove')" ) + @Log(title = "货道信息" , businessType = BusinessType.DELETE) + @DeleteMapping("/{objIds}" ) + public AjaxResult remove(@PathVariable Long[] objIds) { + return toAjax(baseSpaceInfoService.deleteBaseSpaceInfoByObjIds(objIds)); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/controller/BaseStoreInfoController.java b/aucma-base/src/main/java/com/aucma/base/controller/BaseStoreInfoController.java new file mode 100644 index 0000000..4ff9e54 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/controller/BaseStoreInfoController.java @@ -0,0 +1,112 @@ +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.BaseStoreInfo; +import com.aucma.base.service.IBaseStoreInfoService; +import com.aucma.common.utils.poi.ExcelUtil; +import com.aucma.common.core.page.TableDataInfo; + +/** + * 仓库信息Controller + * + * @author Yinq + * @date 2023-09-20 + */ +@RestController +@RequestMapping("/base/storeInfo") +public class BaseStoreInfoController extends BaseController { + @Autowired + private IBaseStoreInfoService baseStoreInfoService; + + /** + * 查询仓库信息列表 + */ + @PreAuthorize("@ss.hasPermi('base:storeInfo:list')") + @GetMapping("/list") + public TableDataInfo list(BaseStoreInfo baseStoreInfo) { + startPage(); + List list = baseStoreInfoService.selectBaseStoreInfoList(baseStoreInfo); + return getDataTable(list); + } + + /** + * 查询仓库下拉框列表 + */ + @GetMapping("/findStoreList") + public AjaxResult findStoreList(BaseStoreInfo baseStoreInfo) { + List list = baseStoreInfoService.selectBaseStoreInfoList(baseStoreInfo); + return success(list); + } + + /** + * 导出仓库信息列表 + */ + @PreAuthorize("@ss.hasPermi('base:storeInfo:export')") + @Log(title = "仓库信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BaseStoreInfo baseStoreInfo) { + List list = baseStoreInfoService.selectBaseStoreInfoList(baseStoreInfo); + ExcelUtil util = new ExcelUtil(BaseStoreInfo.class); + util.exportExcel(response, list, "仓库信息数据"); + } + + /** + * 获取仓库信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('base:storeInfo:query')") + @GetMapping(value = "/{objId}") + public AjaxResult getInfo(@PathVariable("objId") Long objId) { + return success(baseStoreInfoService.selectBaseStoreInfoByObjId(objId)); + } + + /** + * 新增仓库信息 + */ + @PreAuthorize("@ss.hasPermi('base:storeInfo:add')") + @Log(title = "仓库信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BaseStoreInfo baseStoreInfo) { + baseStoreInfo.setCreatedBy(getUsername()); + baseStoreInfo.setCreatedTime(DateUtils.getNowDate()); + return toAjax(baseStoreInfoService.insertBaseStoreInfo(baseStoreInfo)); + } + + /** + * 修改仓库信息 + */ + @PreAuthorize("@ss.hasPermi('base:storeInfo:edit')") + @Log(title = "仓库信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BaseStoreInfo baseStoreInfo) { + baseStoreInfo.setUpdatedBy(getUsername()); + baseStoreInfo.setUpdatedTime(DateUtils.getNowDate()); + return toAjax(baseStoreInfoService.updateBaseStoreInfo(baseStoreInfo)); + } + + /** + * 删除仓库信息 + */ + @PreAuthorize("@ss.hasPermi('base:storeInfo:remove')") + @Log(title = "仓库信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{objIds}") + public AjaxResult remove(@PathVariable Long[] objIds) { + return toAjax(baseStoreInfoService.deleteBaseStoreInfoByObjIds(objIds)); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/domain/BaseSpaceInfo.java b/aucma-base/src/main/java/com/aucma/base/domain/BaseSpaceInfo.java new file mode 100644 index 0000000..49a4b34 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/domain/BaseSpaceInfo.java @@ -0,0 +1,294 @@ +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_spaceinfo + * + * @author Yinq + * @date 2023-09-20 + */ +public class BaseSpaceInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键标识 + */ + private Long objId; + + /** + * 货道编号 + */ + @Excel(name = "货道编号") + private String spaceCode; + + /** + * 货道名称 + */ + @Excel(name = "货道名称") + private String spaceName; + + /** + * 货道容量 + */ + @Excel(name = "货道容量") + private Long spaceCapacity; + + /** + * 货道库存 + */ + @Excel(name = "货道库存") + private Long spaceStock; + + /** + * 货道状态 + */ + @Excel(name = "货道状态") + private Long spaceStatus; + + /** + * 货道类型 + */ + @Excel(name = "货道类型") + private Long spaceType; + + /** + * 所属仓库编号 + */ + @Excel(name = "所属仓库编号") + private String storeCode; + + /** + * 所属仓库 + */ + @Excel(name = "所属仓库名称") + private String storeName; + + /** + * 物料编号 + */ + @Excel(name = "物料编号") + private String materialCode; + + /** + * 物料名称 + */ + @Excel(name = "物料名称") + private String materialName; + + /** + * 工单编号 + */ + @Excel(name = "工单编号") + private String orderCode; + + /** + * 条码编号 + */ + @Excel(name = "条码编号") + private String barcodeCode; + + /** + * 是否标识 + */ + @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 getStoreName() { + return storeName; + } + + public void setStoreName(String storeName) { + this.storeName = storeName; + } + + public String getMaterialCode() { + return materialCode; + } + + public void setMaterialCode(String materialCode) { + this.materialCode = materialCode; + } + + public void setObjId(Long objId) { + this.objId = objId; + } + + public Long getObjId() { + return objId; + } + + public void setSpaceCode(String spaceCode) { + this.spaceCode = spaceCode; + } + + public String getSpaceCode() { + return spaceCode; + } + + public void setSpaceName(String spaceName) { + this.spaceName = spaceName; + } + + public String getSpaceName() { + return spaceName; + } + + public void setSpaceCapacity(Long spaceCapacity) { + this.spaceCapacity = spaceCapacity; + } + + public Long getSpaceCapacity() { + return spaceCapacity; + } + + public void setSpaceStock(Long spaceStock) { + this.spaceStock = spaceStock; + } + + public Long getSpaceStock() { + return spaceStock; + } + + public void setSpaceStatus(Long spaceStatus) { + this.spaceStatus = spaceStatus; + } + + public Long getSpaceStatus() { + return spaceStatus; + } + + public void setSpaceType(Long spaceType) { + this.spaceType = spaceType; + } + + public Long getSpaceType() { + return spaceType; + } + + public void setStoreCode(String storeCode) { + this.storeCode = storeCode; + } + + public String getStoreCode() { + return storeCode; + } + + 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 setMaterialName(String materialName) { + this.materialName = materialName; + } + + public String getMaterialName() { + return materialName; + } + + public void setOrderCode(String orderCode) { + this.orderCode = orderCode; + } + + public String getOrderCode() { + return orderCode; + } + + public void setBarcodeCode(String barcodeCode) { + this.barcodeCode = barcodeCode; + } + + public String getBarcodeCode() { + return barcodeCode; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("objId", getObjId()) + .append("spaceCode", getSpaceCode()) + .append("spaceName", getSpaceName()) + .append("spaceCapacity", getSpaceCapacity()) + .append("spaceStock", getSpaceStock()) + .append("spaceStatus", getSpaceStatus()) + .append("spaceType", getSpaceType()) + .append("storeCode", getStoreCode()) + .append("isFlag", getIsFlag()) + .append("createdBy", getCreatedBy()) + .append("createdTime", getCreatedTime()) + .append("updatedBy", getUpdatedBy()) + .append("updatedTime", getUpdatedTime()) + .append("materialName", getMaterialName()) + .append("orderCode", getOrderCode()) + .append("barcodeCode", getBarcodeCode()) + .toString(); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/domain/BaseStoreInfo.java b/aucma-base/src/main/java/com/aucma/base/domain/BaseStoreInfo.java new file mode 100644 index 0000000..1cbe3e7 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/domain/BaseStoreInfo.java @@ -0,0 +1,219 @@ +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_storeinfo + * + * @author Yinq + * @date 2023-09-20 + */ +public class BaseStoreInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键标识 + */ + private Long objId; + + /** + * 仓库编号 + */ + @Excel(name = "仓库编号") + private String storeCode; + + /** + * 仓库名称 + */ + @Excel(name = "仓库名称") + private String storeName; + + /** + * 仓库类型 + */ + @Excel(name = "仓库类型") + private Long storeType; + + /** + * 仓库区域 + */ + @Excel(name = "仓库区域") + private String storeArea; + + /** + * 仓库状态 + */ + @Excel(name = "仓库状态") + private Long storeStatus; + + /** + * 所属工厂编号 + */ + @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 getPlantCode() { + return plantCode; + } + + public void setPlantCode(String plantCode) { + this.plantCode = plantCode; + } + + 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 setStoreCode(String storeCode) { + this.storeCode = storeCode; + } + + public String getStoreCode() { + return storeCode; + } + + public void setStoreName(String storeName) { + this.storeName = storeName; + } + + public String getStoreName() { + return storeName; + } + + public void setStoreType(Long storeType) { + this.storeType = storeType; + } + + public Long getStoreType() { + return storeType; + } + + public void setStoreArea(String storeArea) { + this.storeArea = storeArea; + } + + public String getStoreArea() { + return storeArea; + } + + public void setStoreStatus(Long storeStatus) { + this.storeStatus = storeStatus; + } + + public Long getStoreStatus() { + return storeStatus; + } + + 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("storeCode", getStoreCode()) + .append("storeName", getStoreName()) + .append("storeType", getStoreType()) + .append("storeArea", getStoreArea()) + .append("storeStatus", getStoreStatus()) + .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/BaseSpaceInfoMapper.java b/aucma-base/src/main/java/com/aucma/base/mapper/BaseSpaceInfoMapper.java new file mode 100644 index 0000000..34d355f --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/mapper/BaseSpaceInfoMapper.java @@ -0,0 +1,61 @@ +package com.aucma.base.mapper; + +import java.util.List; +import com.aucma.base.domain.BaseSpaceInfo; + +/** + * 货道信息Mapper接口 + * + * @author Yinq + * @date 2023-09-20 + */ +public interface BaseSpaceInfoMapper +{ + /** + * 查询货道信息 + * + * @param objId 货道信息主键 + * @return 货道信息 + */ + public BaseSpaceInfo selectBaseSpaceInfoByObjId(Long objId); + + /** + * 查询货道信息列表 + * + * @param baseSpaceInfo 货道信息 + * @return 货道信息集合 + */ + public List selectBaseSpaceInfoList(BaseSpaceInfo baseSpaceInfo); + + /** + * 新增货道信息 + * + * @param baseSpaceInfo 货道信息 + * @return 结果 + */ + public int insertBaseSpaceInfo(BaseSpaceInfo baseSpaceInfo); + + /** + * 修改货道信息 + * + * @param baseSpaceInfo 货道信息 + * @return 结果 + */ + public int updateBaseSpaceInfo(BaseSpaceInfo baseSpaceInfo); + + /** + * 删除货道信息 + * + * @param objId 货道信息主键 + * @return 结果 + */ + public int deleteBaseSpaceInfoByObjId(Long objId); + + /** + * 批量删除货道信息 + * + * @param objIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBaseSpaceInfoByObjIds(Long[] objIds); +} diff --git a/aucma-base/src/main/java/com/aucma/base/mapper/BaseStoreInfoMapper.java b/aucma-base/src/main/java/com/aucma/base/mapper/BaseStoreInfoMapper.java new file mode 100644 index 0000000..a0709d8 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/mapper/BaseStoreInfoMapper.java @@ -0,0 +1,61 @@ +package com.aucma.base.mapper; + +import java.util.List; +import com.aucma.base.domain.BaseStoreInfo; + +/** + * 仓库信息Mapper接口 + * + * @author Yinq + * @date 2023-09-20 + */ +public interface BaseStoreInfoMapper +{ + /** + * 查询仓库信息 + * + * @param objId 仓库信息主键 + * @return 仓库信息 + */ + public BaseStoreInfo selectBaseStoreInfoByObjId(Long objId); + + /** + * 查询仓库信息列表 + * + * @param baseStoreInfo 仓库信息 + * @return 仓库信息集合 + */ + public List selectBaseStoreInfoList(BaseStoreInfo baseStoreInfo); + + /** + * 新增仓库信息 + * + * @param baseStoreInfo 仓库信息 + * @return 结果 + */ + public int insertBaseStoreInfo(BaseStoreInfo baseStoreInfo); + + /** + * 修改仓库信息 + * + * @param baseStoreInfo 仓库信息 + * @return 结果 + */ + public int updateBaseStoreInfo(BaseStoreInfo baseStoreInfo); + + /** + * 删除仓库信息 + * + * @param objId 仓库信息主键 + * @return 结果 + */ + public int deleteBaseStoreInfoByObjId(Long objId); + + /** + * 批量删除仓库信息 + * + * @param objIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBaseStoreInfoByObjIds(Long[] objIds); +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/IBaseSpaceInfoService.java b/aucma-base/src/main/java/com/aucma/base/service/IBaseSpaceInfoService.java new file mode 100644 index 0000000..3a94cfe --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/IBaseSpaceInfoService.java @@ -0,0 +1,61 @@ +package com.aucma.base.service; + +import java.util.List; +import com.aucma.base.domain.BaseSpaceInfo; + +/** + * 货道信息Service接口 + * + * @author Yinq + * @date 2023-09-20 + */ +public interface IBaseSpaceInfoService +{ + /** + * 查询货道信息 + * + * @param objId 货道信息主键 + * @return 货道信息 + */ + public BaseSpaceInfo selectBaseSpaceInfoByObjId(Long objId); + + /** + * 查询货道信息列表 + * + * @param baseSpaceInfo 货道信息 + * @return 货道信息集合 + */ + public List selectBaseSpaceInfoList(BaseSpaceInfo baseSpaceInfo); + + /** + * 新增货道信息 + * + * @param baseSpaceInfo 货道信息 + * @return 结果 + */ + public int insertBaseSpaceInfo(BaseSpaceInfo baseSpaceInfo); + + /** + * 修改货道信息 + * + * @param baseSpaceInfo 货道信息 + * @return 结果 + */ + public int updateBaseSpaceInfo(BaseSpaceInfo baseSpaceInfo); + + /** + * 批量删除货道信息 + * + * @param objIds 需要删除的货道信息主键集合 + * @return 结果 + */ + public int deleteBaseSpaceInfoByObjIds(Long[] objIds); + + /** + * 删除货道信息信息 + * + * @param objId 货道信息主键 + * @return 结果 + */ + public int deleteBaseSpaceInfoByObjId(Long objId); +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/IBaseStoreInfoService.java b/aucma-base/src/main/java/com/aucma/base/service/IBaseStoreInfoService.java new file mode 100644 index 0000000..88fa629 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/IBaseStoreInfoService.java @@ -0,0 +1,61 @@ +package com.aucma.base.service; + +import java.util.List; +import com.aucma.base.domain.BaseStoreInfo; + +/** + * 仓库信息Service接口 + * + * @author Yinq + * @date 2023-09-20 + */ +public interface IBaseStoreInfoService +{ + /** + * 查询仓库信息 + * + * @param objId 仓库信息主键 + * @return 仓库信息 + */ + public BaseStoreInfo selectBaseStoreInfoByObjId(Long objId); + + /** + * 查询仓库信息列表 + * + * @param baseStoreInfo 仓库信息 + * @return 仓库信息集合 + */ + public List selectBaseStoreInfoList(BaseStoreInfo baseStoreInfo); + + /** + * 新增仓库信息 + * + * @param baseStoreInfo 仓库信息 + * @return 结果 + */ + public int insertBaseStoreInfo(BaseStoreInfo baseStoreInfo); + + /** + * 修改仓库信息 + * + * @param baseStoreInfo 仓库信息 + * @return 结果 + */ + public int updateBaseStoreInfo(BaseStoreInfo baseStoreInfo); + + /** + * 批量删除仓库信息 + * + * @param objIds 需要删除的仓库信息主键集合 + * @return 结果 + */ + public int deleteBaseStoreInfoByObjIds(Long[] objIds); + + /** + * 删除仓库信息信息 + * + * @param objId 仓库信息主键 + * @return 结果 + */ + public int deleteBaseStoreInfoByObjId(Long objId); +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/impl/BaseSpaceInfoServiceImpl.java b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseSpaceInfoServiceImpl.java new file mode 100644 index 0000000..0985446 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseSpaceInfoServiceImpl.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.BaseSpaceInfoMapper; +import com.aucma.base.domain.BaseSpaceInfo; +import com.aucma.base.service.IBaseSpaceInfoService; + +/** + * 货道信息Service业务层处理 + * + * @author Yinq + * @date 2023-09-20 + */ +@Service +public class BaseSpaceInfoServiceImpl implements IBaseSpaceInfoService +{ + @Autowired + private BaseSpaceInfoMapper baseSpaceInfoMapper; + + /** + * 查询货道信息 + * + * @param objId 货道信息主键 + * @return 货道信息 + */ + @Override + public BaseSpaceInfo selectBaseSpaceInfoByObjId(Long objId) + { + return baseSpaceInfoMapper.selectBaseSpaceInfoByObjId(objId); + } + + /** + * 查询货道信息列表 + * + * @param baseSpaceInfo 货道信息 + * @return 货道信息 + */ + @Override + public List selectBaseSpaceInfoList(BaseSpaceInfo baseSpaceInfo) + { + return baseSpaceInfoMapper.selectBaseSpaceInfoList(baseSpaceInfo); + } + + /** + * 新增货道信息 + * + * @param baseSpaceInfo 货道信息 + * @return 结果 + */ + @Override + public int insertBaseSpaceInfo(BaseSpaceInfo baseSpaceInfo) + { + return baseSpaceInfoMapper.insertBaseSpaceInfo(baseSpaceInfo); + } + + /** + * 修改货道信息 + * + * @param baseSpaceInfo 货道信息 + * @return 结果 + */ + @Override + public int updateBaseSpaceInfo(BaseSpaceInfo baseSpaceInfo) + { + return baseSpaceInfoMapper.updateBaseSpaceInfo(baseSpaceInfo); + } + + /** + * 批量删除货道信息 + * + * @param objIds 需要删除的货道信息主键 + * @return 结果 + */ + @Override + public int deleteBaseSpaceInfoByObjIds(Long[] objIds) + { + return baseSpaceInfoMapper.deleteBaseSpaceInfoByObjIds(objIds); + } + + /** + * 删除货道信息信息 + * + * @param objId 货道信息主键 + * @return 结果 + */ + @Override + public int deleteBaseSpaceInfoByObjId(Long objId) + { + return baseSpaceInfoMapper.deleteBaseSpaceInfoByObjId(objId); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/impl/BaseStoreInfoServiceImpl.java b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseStoreInfoServiceImpl.java new file mode 100644 index 0000000..cf3815d --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseStoreInfoServiceImpl.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.BaseStoreInfoMapper; +import com.aucma.base.domain.BaseStoreInfo; +import com.aucma.base.service.IBaseStoreInfoService; + +/** + * 仓库信息Service业务层处理 + * + * @author Yinq + * @date 2023-09-20 + */ +@Service +public class BaseStoreInfoServiceImpl implements IBaseStoreInfoService +{ + @Autowired + private BaseStoreInfoMapper baseStoreInfoMapper; + + /** + * 查询仓库信息 + * + * @param objId 仓库信息主键 + * @return 仓库信息 + */ + @Override + public BaseStoreInfo selectBaseStoreInfoByObjId(Long objId) + { + return baseStoreInfoMapper.selectBaseStoreInfoByObjId(objId); + } + + /** + * 查询仓库信息列表 + * + * @param baseStoreInfo 仓库信息 + * @return 仓库信息 + */ + @Override + public List selectBaseStoreInfoList(BaseStoreInfo baseStoreInfo) + { + return baseStoreInfoMapper.selectBaseStoreInfoList(baseStoreInfo); + } + + /** + * 新增仓库信息 + * + * @param baseStoreInfo 仓库信息 + * @return 结果 + */ + @Override + public int insertBaseStoreInfo(BaseStoreInfo baseStoreInfo) + { + return baseStoreInfoMapper.insertBaseStoreInfo(baseStoreInfo); + } + + /** + * 修改仓库信息 + * + * @param baseStoreInfo 仓库信息 + * @return 结果 + */ + @Override + public int updateBaseStoreInfo(BaseStoreInfo baseStoreInfo) + { + return baseStoreInfoMapper.updateBaseStoreInfo(baseStoreInfo); + } + + /** + * 批量删除仓库信息 + * + * @param objIds 需要删除的仓库信息主键 + * @return 结果 + */ + @Override + public int deleteBaseStoreInfoByObjIds(Long[] objIds) + { + return baseStoreInfoMapper.deleteBaseStoreInfoByObjIds(objIds); + } + + /** + * 删除仓库信息信息 + * + * @param objId 仓库信息主键 + * @return 结果 + */ + @Override + public int deleteBaseStoreInfoByObjId(Long objId) + { + return baseStoreInfoMapper.deleteBaseStoreInfoByObjId(objId); + } +} diff --git a/aucma-base/src/main/resources/mapper/base/BaseSpaceInfoMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseSpaceInfoMapper.xml new file mode 100644 index 0000000..e73676d --- /dev/null +++ b/aucma-base/src/main/resources/mapper/base/BaseSpaceInfoMapper.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select sp.obj_id, + sp.space_code, + sp.space_name, + sp.space_capacity, + sp.space_stock, + sp.space_status, + sp.space_type, + sp.store_code, + sp.is_flag, + sp.created_by, + sp.created_time, + sp.updated_by, + sp.updated_time, + sp.material_code, + sp.order_code, + sp.barcode_code, + si.STORE_NAME + from base_spaceinfo sp + left join base_storeinfo si on si.STORE_CODE = sp.STORE_CODE + + + + + + + + + SELECT seq_base_spaceinfo.NEXTVAL as objId FROM DUAL + + insert into base_spaceinfo + + obj_id, + space_code, + space_name, + space_capacity, + space_stock, + space_status, + space_type, + store_code, + is_flag, + created_by, + created_time, + updated_by, + updated_time, + material_code, + order_code, + barcode_code, + + + #{objId}, + #{spaceCode}, + #{spaceName}, + #{spaceCapacity}, + #{spaceStock}, + #{spaceStatus}, + #{spaceType}, + #{storeCode}, + #{isFlag}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{materialCode}, + #{orderCode}, + #{barcodeCode}, + + + + + update base_spaceinfo + + space_code = #{spaceCode}, + space_name = #{spaceName}, + space_capacity = #{spaceCapacity}, + space_stock = #{spaceStock}, + space_status = #{spaceStatus}, + space_type = #{spaceType}, + store_code = #{storeCode}, + is_flag = #{isFlag}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + material_code = #{materialCode}, + order_code = #{orderCode}, + barcode_code = #{barcodeCode}, + + where obj_id = #{objId} + + + + delete + from base_spaceinfo + where obj_id = #{objId} + + + + delete from base_spaceinfo where obj_id in + + #{objId} + + + \ No newline at end of file diff --git a/aucma-base/src/main/resources/mapper/base/BaseStoreInfoMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseStoreInfoMapper.xml new file mode 100644 index 0000000..fc554c7 --- /dev/null +++ b/aucma-base/src/main/resources/mapper/base/BaseStoreInfoMapper.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + select si.obj_id, + si.store_code, + si.store_name, + si.store_type, + si.store_area, + si.store_status, + si.is_flag, + si.created_by, + si.created_time, + si.updated_by, + si.updated_time, + si.factory_code, + bf.factory_name + from base_storeinfo si + left join base_factory bf on bf.factory_code = si.factory_code + + + + + + + + + SELECT seq_base_storeinfo.NEXTVAL as objId FROM DUAL + + insert into base_storeinfo + + obj_id, + store_code, + store_name, + store_type, + store_area, + store_status, + is_flag, + created_by, + created_time, + updated_by, + updated_time, + factory_code, + + + #{objId}, + #{storeCode}, + #{storeName}, + #{storeType}, + #{storeArea}, + #{storeStatus}, + #{isFlag}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{plantCode}, + + + + + update base_storeinfo + + store_code = #{storeCode}, + store_name = #{storeName}, + store_type = #{storeType}, + store_area = #{storeArea}, + store_status = #{storeStatus}, + is_flag = #{isFlag}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + factory_code = #{plantCode}, + + where obj_id = #{objId} + + + + delete + from base_storeinfo + where obj_id = #{objId} + + + + delete from base_storeinfo where obj_id in + + #{objId} + + + \ No newline at end of file