diff --git a/aucma-base/src/main/java/com/aucma/base/controller/RecordInStoreController.java b/aucma-base/src/main/java/com/aucma/base/controller/RecordInStoreController.java new file mode 100644 index 0000000..4b433e6 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/controller/RecordInStoreController.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.RecordInStore; +import com.aucma.base.service.IRecordInStoreService; +import com.aucma.common.utils.poi.ExcelUtil; +import com.aucma.common.core.page.TableDataInfo; + +/** + * 入库记录Controller + * + * @author Yinq + * @date 2023-09-21 + */ +@RestController +@RequestMapping("/base/inStore" ) +public class RecordInStoreController extends BaseController { + @Autowired + private IRecordInStoreService recordInStoreService; + + /** + * 查询入库记录列表 + */ + @PreAuthorize("@ss.hasPermi('base:inStore:list')" ) + @GetMapping("/list" ) + public TableDataInfo list(RecordInStore recordInStore) { + startPage(); + List list = recordInStoreService.selectRecordInStoreList(recordInStore); + return getDataTable(list); + } + + /** + * 导出入库记录列表 + */ + @PreAuthorize("@ss.hasPermi('base:inStore:export')" ) + @Log(title = "入库记录" , businessType = BusinessType.EXPORT) + @PostMapping("/export" ) + public void export(HttpServletResponse response, RecordInStore recordInStore) { + List list = recordInStoreService.selectRecordInStoreList(recordInStore); + ExcelUtil util = new ExcelUtil(RecordInStore. class); + util.exportExcel(response, list, "入库记录数据" ); + } + + /** + * 获取入库记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('base:inStore:query')" ) + @GetMapping(value = "/{objId}" ) + public AjaxResult getInfo(@PathVariable("objId" ) Long objId) { + return success(recordInStoreService.selectRecordInStoreByObjId(objId)); + } + + /** + * 新增入库记录 + */ + @PreAuthorize("@ss.hasPermi('base:inStore:add')" ) + @Log(title = "入库记录" , businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody RecordInStore recordInStore) { + recordInStore.setCreatedBy(getUsername()); + recordInStore.setCreatedTime(DateUtils.getNowDate()); + return toAjax(recordInStoreService.insertRecordInStore(recordInStore)); + } + + /** + * 修改入库记录 + */ + @PreAuthorize("@ss.hasPermi('base:inStore:edit')" ) + @Log(title = "入库记录" , businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody RecordInStore recordInStore) { + recordInStore.setUpdatedBy(getUsername()); + recordInStore.setUpdatedTime(DateUtils.getNowDate()); + return toAjax(recordInStoreService.updateRecordInStore(recordInStore)); + } + + /** + * 删除入库记录 + */ + @PreAuthorize("@ss.hasPermi('base:inStore:remove')" ) + @Log(title = "入库记录" , businessType = BusinessType.DELETE) + @DeleteMapping("/{objIds}" ) + public AjaxResult remove(@PathVariable Long[] objIds) { + return toAjax(recordInStoreService.deleteRecordInStoreByObjIds(objIds)); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/controller/RecordOutStoreController.java b/aucma-base/src/main/java/com/aucma/base/controller/RecordOutStoreController.java new file mode 100644 index 0000000..cec1d34 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/controller/RecordOutStoreController.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.RecordOutStore; +import com.aucma.base.service.IRecordOutStoreService; +import com.aucma.common.utils.poi.ExcelUtil; +import com.aucma.common.core.page.TableDataInfo; + +/** + * 出库记录Controller + * + * @author Yinq + * @date 2023-09-21 + */ +@RestController +@RequestMapping("/base/outStore" ) +public class RecordOutStoreController extends BaseController { + @Autowired + private IRecordOutStoreService recordOutStoreService; + + /** + * 查询出库记录列表 + */ + @PreAuthorize("@ss.hasPermi('base:outStore:list')" ) + @GetMapping("/list" ) + public TableDataInfo list(RecordOutStore recordOutStore) { + startPage(); + List list = recordOutStoreService.selectRecordOutStoreList(recordOutStore); + return getDataTable(list); + } + + /** + * 导出出库记录列表 + */ + @PreAuthorize("@ss.hasPermi('base:outStore:export')" ) + @Log(title = "出库记录" , businessType = BusinessType.EXPORT) + @PostMapping("/export" ) + public void export(HttpServletResponse response, RecordOutStore recordOutStore) { + List list = recordOutStoreService.selectRecordOutStoreList(recordOutStore); + ExcelUtil util = new ExcelUtil(RecordOutStore. class); + util.exportExcel(response, list, "出库记录数据" ); + } + + /** + * 获取出库记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('base:outStore:query')" ) + @GetMapping(value = "/{objId}" ) + public AjaxResult getInfo(@PathVariable("objId" ) Long objId) { + return success(recordOutStoreService.selectRecordOutStoreByObjId(objId)); + } + + /** + * 新增出库记录 + */ + @PreAuthorize("@ss.hasPermi('base:outStore:add')" ) + @Log(title = "出库记录" , businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody RecordOutStore recordOutStore) { + recordOutStore.setCreatedBy(getUsername()); + recordOutStore.setCreatedTime(DateUtils.getNowDate()); + return toAjax(recordOutStoreService.insertRecordOutStore(recordOutStore)); + } + + /** + * 修改出库记录 + */ + @PreAuthorize("@ss.hasPermi('base:outStore:edit')" ) + @Log(title = "出库记录" , businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody RecordOutStore recordOutStore) { + recordOutStore.setUpdatedBy(getUsername()); + recordOutStore.setUpdatedTime(DateUtils.getNowDate()); + return toAjax(recordOutStoreService.updateRecordOutStore(recordOutStore)); + } + + /** + * 删除出库记录 + */ + @PreAuthorize("@ss.hasPermi('base:outStore:remove')" ) + @Log(title = "出库记录" , businessType = BusinessType.DELETE) + @DeleteMapping("/{objIds}" ) + public AjaxResult remove(@PathVariable Long[] objIds) { + return toAjax(recordOutStoreService.deleteRecordOutStoreByObjIds(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 index 49a4b34..ca47bd7 100644 --- a/aucma-base/src/main/java/com/aucma/base/domain/BaseSpaceInfo.java +++ b/aucma-base/src/main/java/com/aucma/base/domain/BaseSpaceInfo.java @@ -3,8 +3,6 @@ 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; @@ -71,28 +69,11 @@ public class BaseSpaceInfo extends BaseEntity { private String storeName; /** - * 物料编号 + * 物料类型 */ - @Excel(name = "物料编号") - private String materialCode; + @Excel(name = "物料类型") + private String materialType; - /** - * 物料名称 - */ - @Excel(name = "物料名称") - private String materialName; - - /** - * 工单编号 - */ - @Excel(name = "工单编号") - private String orderCode; - - /** - * 条码编号 - */ - @Excel(name = "条码编号") - private String barcodeCode; /** * 是否标识 @@ -134,12 +115,12 @@ public class BaseSpaceInfo extends BaseEntity { this.storeName = storeName; } - public String getMaterialCode() { - return materialCode; + public String getMaterialType() { + return materialType; } - public void setMaterialCode(String materialCode) { - this.materialCode = materialCode; + public void setMaterialType(String materialType) { + this.materialType = materialType; } public void setObjId(Long objId) { @@ -246,49 +227,25 @@ public class BaseSpaceInfo extends BaseEntity { 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(); + return "BaseSpaceInfo{" + + "objId=" + objId + + ", spaceCode='" + spaceCode + '\'' + + ", spaceName='" + spaceName + '\'' + + ", spaceCapacity=" + spaceCapacity + + ", spaceStock=" + spaceStock + + ", spaceStatus=" + spaceStatus + + ", spaceType=" + spaceType + + ", storeCode='" + storeCode + '\'' + + ", storeName='" + storeName + '\'' + + ", materialType='" + materialType + '\'' + + ", isFlag=" + isFlag + + ", createdBy='" + createdBy + '\'' + + ", createdTime=" + createdTime + + ", updatedBy='" + updatedBy + '\'' + + ", updatedTime=" + updatedTime + + '}'; } } diff --git a/aucma-base/src/main/java/com/aucma/base/domain/RecordInStore.java b/aucma-base/src/main/java/com/aucma/base/domain/RecordInStore.java new file mode 100644 index 0000000..d464d12 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/domain/RecordInStore.java @@ -0,0 +1,267 @@ +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; + +/** + * 入库记录对象 record_instore + * + * @author Yinq + * @date 2023-09-21 + */ +public class RecordInStore extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键标识 + */ + private Long objId; + + /** + * 仓库编号 + */ + @Excel(name = "仓库编号") + private String storeCode; + + /** + * 仓库区域 + */ + @Excel(name = "仓库区域") + private String storeArea; + + /** + * 货道编号 + */ + @Excel(name = "货道编号") + private String spaceCode; + + /** + * 物料类型 + */ + @Excel(name = "物料类型") + private String materialType; + + /** + * 物料编号 + */ + @Excel(name = "物料编号") + private String materialCode; + + /** + * 入库数量 + */ + @Excel(name = "入库数量") + private Long inStoreAmount; + + /** + * 入库时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date inStoreTime; + + /** + * 是否标识 + */ + @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 barcodeCode; + + /** + * 物料名称 + */ + @Excel(name = "物料名称") + private String materialName; + + /** + * 入库方式(0-正常,1-异常) + */ + @Excel(name = "入库方式", readConverterExp = "0=-正常,1-异常") + private Long entryPattern; + + 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 setStoreArea(String storeArea) { + this.storeArea = storeArea; + } + + public String getStoreArea() { + return storeArea; + } + + public void setSpaceCode(String spaceCode) { + this.spaceCode = spaceCode; + } + + public String getSpaceCode() { + return spaceCode; + } + + public void setMaterialType(String materialType) { + this.materialType = materialType; + } + + public String getMaterialType() { + return materialType; + } + + public void setMaterialCode(String materialCode) { + this.materialCode = materialCode; + } + + public String getMaterialCode() { + return materialCode; + } + + public void setInStoreAmount(Long inStoreAmount) { + this.inStoreAmount = inStoreAmount; + } + + public Long getInStoreAmount() { + return inStoreAmount; + } + + public void setInStoreTime(Date inStoreTime) { + this.inStoreTime = inStoreTime; + } + + public Date getInStoreTime() { + return inStoreTime; + } + + 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 setBarcodeCode(String barcodeCode) { + this.barcodeCode = barcodeCode; + } + + public String getBarcodeCode() { + return barcodeCode; + } + + public void setMaterialName(String materialName) { + this.materialName = materialName; + } + + public String getMaterialName() { + return materialName; + } + + public void setEntryPattern(Long entryPattern) { + this.entryPattern = entryPattern; + } + + public Long getEntryPattern() { + return entryPattern; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("objId", getObjId()) + .append("storeCode", getStoreCode()) + .append("storeArea", getStoreArea()) + .append("spaceCode", getSpaceCode()) + .append("materialType", getMaterialType()) + .append("materialCode", getMaterialCode()) + .append("inStoreAmount", getInStoreAmount()) + .append("inStoreTime", getInStoreTime()) + .append("isFlag", getIsFlag()) + .append("createdBy", getCreatedBy()) + .append("createdTime", getCreatedTime()) + .append("updatedBy", getUpdatedBy()) + .append("updatedTime", getUpdatedTime()) + .append("barcodeCode", getBarcodeCode()) + .append("materialName", getMaterialName()) + .append("entryPattern", getEntryPattern()) + .toString(); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/domain/RecordOutStore.java b/aucma-base/src/main/java/com/aucma/base/domain/RecordOutStore.java new file mode 100644 index 0000000..e8dbdf8 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/domain/RecordOutStore.java @@ -0,0 +1,267 @@ +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; + +/** + * 出库记录对象 record_outstore + * + * @author Yinq + * @date 2023-09-21 + */ +public class RecordOutStore extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键标识 + */ + private Long objId; + + /** + * 仓库编号 + */ + @Excel(name = "仓库编号") + private String storeCode; + + /** + * 仓库区域 + */ + @Excel(name = "仓库区域") + private String storeArea; + + /** + * 货道编号 + */ + @Excel(name = "货道编号") + private String spaceCode; + + /** + * 物料编号 + */ + @Excel(name = "物料编号") + private String materialCode; + + /** + * 物料名称 + */ + @Excel(name = "物料名称") + private String materialName; + + /** + * 出库数量 + */ + @Excel(name = "出库数量") + private Long outStoreAmount; + + /** + * 出库时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date outStoreTime; + + /** + * 是否标识 + */ + @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 barcodeCode; + + /** + * 物料类型 + */ + @Excel(name = "物料类型") + private String materialType; + + /** + * 出库方式(0-正常,1-异常) + */ + @Excel(name = "出库方式", readConverterExp = "0=-正常,1-异常") + private Long exitPattern; + + 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 setStoreArea(String storeArea) { + this.storeArea = storeArea; + } + + public String getStoreArea() { + return storeArea; + } + + public void setSpaceCode(String spaceCode) { + this.spaceCode = spaceCode; + } + + public String getSpaceCode() { + return spaceCode; + } + + 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 setOutStoreAmount(Long outStoreAmount) { + this.outStoreAmount = outStoreAmount; + } + + public Long getOutStoreAmount() { + return outStoreAmount; + } + + public void setOutStoreTime(Date outStoreTime) { + this.outStoreTime = outStoreTime; + } + + public Date getOutStoreTime() { + return outStoreTime; + } + + 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 setBarcodeCode(String barcodeCode) { + this.barcodeCode = barcodeCode; + } + + public String getBarcodeCode() { + return barcodeCode; + } + + public void setMaterialType(String materialType) { + this.materialType = materialType; + } + + public String getMaterialType() { + return materialType; + } + + public void setExitPattern(Long exitPattern) { + this.exitPattern = exitPattern; + } + + public Long getExitPattern() { + return exitPattern; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("objId", getObjId()) + .append("storeCode", getStoreCode()) + .append("storeArea", getStoreArea()) + .append("spaceCode", getSpaceCode()) + .append("materialCode", getMaterialCode()) + .append("materialName", getMaterialName()) + .append("outStoreAmount", getOutStoreAmount()) + .append("outStoreTime", getOutStoreTime()) + .append("isFlag", getIsFlag()) + .append("createdBy", getCreatedBy()) + .append("createdTime", getCreatedTime()) + .append("updatedBy", getUpdatedBy()) + .append("updatedTime", getUpdatedTime()) + .append("barcodeCode", getBarcodeCode()) + .append("materialType", getMaterialType()) + .append("exitPattern", getExitPattern()) + .toString(); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/mapper/RecordInStoreMapper.java b/aucma-base/src/main/java/com/aucma/base/mapper/RecordInStoreMapper.java new file mode 100644 index 0000000..8d1055a --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/mapper/RecordInStoreMapper.java @@ -0,0 +1,61 @@ +package com.aucma.base.mapper; + +import java.util.List; +import com.aucma.base.domain.RecordInStore; + +/** + * 入库记录Mapper接口 + * + * @author Yinq + * @date 2023-09-21 + */ +public interface RecordInStoreMapper +{ + /** + * 查询入库记录 + * + * @param objId 入库记录主键 + * @return 入库记录 + */ + public RecordInStore selectRecordInStoreByObjId(Long objId); + + /** + * 查询入库记录列表 + * + * @param recordInStore 入库记录 + * @return 入库记录集合 + */ + public List selectRecordInStoreList(RecordInStore recordInStore); + + /** + * 新增入库记录 + * + * @param recordInStore 入库记录 + * @return 结果 + */ + public int insertRecordInStore(RecordInStore recordInStore); + + /** + * 修改入库记录 + * + * @param recordInStore 入库记录 + * @return 结果 + */ + public int updateRecordInStore(RecordInStore recordInStore); + + /** + * 删除入库记录 + * + * @param objId 入库记录主键 + * @return 结果 + */ + public int deleteRecordInStoreByObjId(Long objId); + + /** + * 批量删除入库记录 + * + * @param objIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteRecordInStoreByObjIds(Long[] objIds); +} diff --git a/aucma-base/src/main/java/com/aucma/base/mapper/RecordOutStoreMapper.java b/aucma-base/src/main/java/com/aucma/base/mapper/RecordOutStoreMapper.java new file mode 100644 index 0000000..1a7e2a7 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/mapper/RecordOutStoreMapper.java @@ -0,0 +1,61 @@ +package com.aucma.base.mapper; + +import java.util.List; +import com.aucma.base.domain.RecordOutStore; + +/** + * 出库记录Mapper接口 + * + * @author Yinq + * @date 2023-09-21 + */ +public interface RecordOutStoreMapper +{ + /** + * 查询出库记录 + * + * @param objId 出库记录主键 + * @return 出库记录 + */ + public RecordOutStore selectRecordOutStoreByObjId(Long objId); + + /** + * 查询出库记录列表 + * + * @param recordOutStore 出库记录 + * @return 出库记录集合 + */ + public List selectRecordOutStoreList(RecordOutStore recordOutStore); + + /** + * 新增出库记录 + * + * @param recordOutStore 出库记录 + * @return 结果 + */ + public int insertRecordOutStore(RecordOutStore recordOutStore); + + /** + * 修改出库记录 + * + * @param recordOutStore 出库记录 + * @return 结果 + */ + public int updateRecordOutStore(RecordOutStore recordOutStore); + + /** + * 删除出库记录 + * + * @param objId 出库记录主键 + * @return 结果 + */ + public int deleteRecordOutStoreByObjId(Long objId); + + /** + * 批量删除出库记录 + * + * @param objIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteRecordOutStoreByObjIds(Long[] objIds); +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/IRecordInStoreService.java b/aucma-base/src/main/java/com/aucma/base/service/IRecordInStoreService.java new file mode 100644 index 0000000..5c42b8d --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/IRecordInStoreService.java @@ -0,0 +1,61 @@ +package com.aucma.base.service; + +import java.util.List; +import com.aucma.base.domain.RecordInStore; + +/** + * 入库记录Service接口 + * + * @author Yinq + * @date 2023-09-21 + */ +public interface IRecordInStoreService +{ + /** + * 查询入库记录 + * + * @param objId 入库记录主键 + * @return 入库记录 + */ + public RecordInStore selectRecordInStoreByObjId(Long objId); + + /** + * 查询入库记录列表 + * + * @param recordInStore 入库记录 + * @return 入库记录集合 + */ + public List selectRecordInStoreList(RecordInStore recordInStore); + + /** + * 新增入库记录 + * + * @param recordInStore 入库记录 + * @return 结果 + */ + public int insertRecordInStore(RecordInStore recordInStore); + + /** + * 修改入库记录 + * + * @param recordInStore 入库记录 + * @return 结果 + */ + public int updateRecordInStore(RecordInStore recordInStore); + + /** + * 批量删除入库记录 + * + * @param objIds 需要删除的入库记录主键集合 + * @return 结果 + */ + public int deleteRecordInStoreByObjIds(Long[] objIds); + + /** + * 删除入库记录信息 + * + * @param objId 入库记录主键 + * @return 结果 + */ + public int deleteRecordInStoreByObjId(Long objId); +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/IRecordOutStoreService.java b/aucma-base/src/main/java/com/aucma/base/service/IRecordOutStoreService.java new file mode 100644 index 0000000..d3b9133 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/IRecordOutStoreService.java @@ -0,0 +1,61 @@ +package com.aucma.base.service; + +import java.util.List; +import com.aucma.base.domain.RecordOutStore; + +/** + * 出库记录Service接口 + * + * @author Yinq + * @date 2023-09-21 + */ +public interface IRecordOutStoreService +{ + /** + * 查询出库记录 + * + * @param objId 出库记录主键 + * @return 出库记录 + */ + public RecordOutStore selectRecordOutStoreByObjId(Long objId); + + /** + * 查询出库记录列表 + * + * @param recordOutStore 出库记录 + * @return 出库记录集合 + */ + public List selectRecordOutStoreList(RecordOutStore recordOutStore); + + /** + * 新增出库记录 + * + * @param recordOutStore 出库记录 + * @return 结果 + */ + public int insertRecordOutStore(RecordOutStore recordOutStore); + + /** + * 修改出库记录 + * + * @param recordOutStore 出库记录 + * @return 结果 + */ + public int updateRecordOutStore(RecordOutStore recordOutStore); + + /** + * 批量删除出库记录 + * + * @param objIds 需要删除的出库记录主键集合 + * @return 结果 + */ + public int deleteRecordOutStoreByObjIds(Long[] objIds); + + /** + * 删除出库记录信息 + * + * @param objId 出库记录主键 + * @return 结果 + */ + public int deleteRecordOutStoreByObjId(Long objId); +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/impl/RecordInStoreServiceImpl.java b/aucma-base/src/main/java/com/aucma/base/service/impl/RecordInStoreServiceImpl.java new file mode 100644 index 0000000..df5021a --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/impl/RecordInStoreServiceImpl.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.RecordInStoreMapper; +import com.aucma.base.domain.RecordInStore; +import com.aucma.base.service.IRecordInStoreService; + +/** + * 入库记录Service业务层处理 + * + * @author Yinq + * @date 2023-09-21 + */ +@Service +public class RecordInStoreServiceImpl implements IRecordInStoreService +{ + @Autowired + private RecordInStoreMapper recordInStoreMapper; + + /** + * 查询入库记录 + * + * @param objId 入库记录主键 + * @return 入库记录 + */ + @Override + public RecordInStore selectRecordInStoreByObjId(Long objId) + { + return recordInStoreMapper.selectRecordInStoreByObjId(objId); + } + + /** + * 查询入库记录列表 + * + * @param recordInStore 入库记录 + * @return 入库记录 + */ + @Override + public List selectRecordInStoreList(RecordInStore recordInStore) + { + return recordInStoreMapper.selectRecordInStoreList(recordInStore); + } + + /** + * 新增入库记录 + * + * @param recordInStore 入库记录 + * @return 结果 + */ + @Override + public int insertRecordInStore(RecordInStore recordInStore) + { + return recordInStoreMapper.insertRecordInStore(recordInStore); + } + + /** + * 修改入库记录 + * + * @param recordInStore 入库记录 + * @return 结果 + */ + @Override + public int updateRecordInStore(RecordInStore recordInStore) + { + return recordInStoreMapper.updateRecordInStore(recordInStore); + } + + /** + * 批量删除入库记录 + * + * @param objIds 需要删除的入库记录主键 + * @return 结果 + */ + @Override + public int deleteRecordInStoreByObjIds(Long[] objIds) + { + return recordInStoreMapper.deleteRecordInStoreByObjIds(objIds); + } + + /** + * 删除入库记录信息 + * + * @param objId 入库记录主键 + * @return 结果 + */ + @Override + public int deleteRecordInStoreByObjId(Long objId) + { + return recordInStoreMapper.deleteRecordInStoreByObjId(objId); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/impl/RecordOutStoreServiceImpl.java b/aucma-base/src/main/java/com/aucma/base/service/impl/RecordOutStoreServiceImpl.java new file mode 100644 index 0000000..63f03eb --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/impl/RecordOutStoreServiceImpl.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.RecordOutStoreMapper; +import com.aucma.base.domain.RecordOutStore; +import com.aucma.base.service.IRecordOutStoreService; + +/** + * 出库记录Service业务层处理 + * + * @author Yinq + * @date 2023-09-21 + */ +@Service +public class RecordOutStoreServiceImpl implements IRecordOutStoreService +{ + @Autowired + private RecordOutStoreMapper recordOutStoreMapper; + + /** + * 查询出库记录 + * + * @param objId 出库记录主键 + * @return 出库记录 + */ + @Override + public RecordOutStore selectRecordOutStoreByObjId(Long objId) + { + return recordOutStoreMapper.selectRecordOutStoreByObjId(objId); + } + + /** + * 查询出库记录列表 + * + * @param recordOutStore 出库记录 + * @return 出库记录 + */ + @Override + public List selectRecordOutStoreList(RecordOutStore recordOutStore) + { + return recordOutStoreMapper.selectRecordOutStoreList(recordOutStore); + } + + /** + * 新增出库记录 + * + * @param recordOutStore 出库记录 + * @return 结果 + */ + @Override + public int insertRecordOutStore(RecordOutStore recordOutStore) + { + return recordOutStoreMapper.insertRecordOutStore(recordOutStore); + } + + /** + * 修改出库记录 + * + * @param recordOutStore 出库记录 + * @return 结果 + */ + @Override + public int updateRecordOutStore(RecordOutStore recordOutStore) + { + return recordOutStoreMapper.updateRecordOutStore(recordOutStore); + } + + /** + * 批量删除出库记录 + * + * @param objIds 需要删除的出库记录主键 + * @return 结果 + */ + @Override + public int deleteRecordOutStoreByObjIds(Long[] objIds) + { + return recordOutStoreMapper.deleteRecordOutStoreByObjIds(objIds); + } + + /** + * 删除出库记录信息 + * + * @param objId 出库记录主键 + * @return 结果 + */ + @Override + public int deleteRecordOutStoreByObjId(Long objId) + { + return recordOutStoreMapper.deleteRecordOutStoreByObjId(objId); + } +} diff --git a/aucma-base/src/main/resources/mapper/base/BaseSpaceInfoMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseSpaceInfoMapper.xml index e73676d..7ac16f1 100644 --- a/aucma-base/src/main/resources/mapper/base/BaseSpaceInfoMapper.xml +++ b/aucma-base/src/main/resources/mapper/base/BaseSpaceInfoMapper.xml @@ -19,10 +19,7 @@ - - - - + @@ -39,9 +36,7 @@ sp.created_time, sp.updated_by, sp.updated_time, - sp.material_code, - sp.order_code, - sp.barcode_code, + sp.material_type, si.STORE_NAME from base_spaceinfo sp left join base_storeinfo si on si.STORE_CODE = sp.STORE_CODE @@ -66,13 +61,6 @@ and sp.created_time = #{createdTime} and sp.updated_by = #{updatedBy} and sp.updated_time = #{updatedTime} - and sp.material_name like concat(concat('%', - #{materialName}), '%') - - and sp.order_code like concat(concat('%', #{orderCode}), - '%') - - and sp.barcode_code = #{barcodeCode} @@ -100,9 +88,7 @@ created_time, updated_by, updated_time, - material_code, - order_code, - barcode_code, + material_type, #{objId}, @@ -118,9 +104,7 @@ #{createdTime}, #{updatedBy}, #{updatedTime}, - #{materialCode}, - #{orderCode}, - #{barcodeCode}, + #{materialType}, @@ -139,9 +123,7 @@ created_time = #{createdTime}, updated_by = #{updatedBy}, updated_time = #{updatedTime}, - material_code = #{materialCode}, - order_code = #{orderCode}, - barcode_code = #{barcodeCode}, + material_type = #{materialType}, where obj_id = #{objId} diff --git a/aucma-base/src/main/resources/mapper/base/RecordInStoreMapper.xml b/aucma-base/src/main/resources/mapper/base/RecordInStoreMapper.xml new file mode 100644 index 0000000..62f0d4c --- /dev/null +++ b/aucma-base/src/main/resources/mapper/base/RecordInStoreMapper.xml @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select obj_id, store_code, store_area, space_code, material_type, material_code, in_store_amount, in_store_time, is_flag, created_by, created_time, updated_by, updated_time, barcode_code, material_name, entry_pattern from record_instore + + + + + + + + + SELECT seq_record_instore.NEXTVAL as objId FROM DUAL + + insert into record_instore + + obj_id, + store_code, + store_area, + space_code, + material_type, + material_code, + in_store_amount, + in_store_time, + is_flag, + created_by, + created_time, + updated_by, + updated_time, + barcode_code, + material_name, + entry_pattern, + + + #{objId}, + #{storeCode}, + #{storeArea}, + #{spaceCode}, + #{materialType}, + #{materialCode}, + #{inStoreAmount}, + #{inStoreTime}, + #{isFlag}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{barcodeCode}, + #{materialName}, + #{entryPattern}, + + + + + update record_instore + + store_code = #{storeCode}, + store_area = #{storeArea}, + space_code = #{spaceCode}, + material_type = #{materialType}, + material_code = #{materialCode}, + in_store_amount = #{inStoreAmount}, + in_store_time = #{inStoreTime}, + is_flag = #{isFlag}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + barcode_code = #{barcodeCode}, + material_name = #{materialName}, + entry_pattern = #{entryPattern}, + + where obj_id = #{objId} + + + + delete from record_instore where obj_id = #{objId} + + + + delete from record_instore where obj_id in + + #{objId} + + + \ No newline at end of file diff --git a/aucma-base/src/main/resources/mapper/base/RecordOutStoreMapper.xml b/aucma-base/src/main/resources/mapper/base/RecordOutStoreMapper.xml new file mode 100644 index 0000000..c627be5 --- /dev/null +++ b/aucma-base/src/main/resources/mapper/base/RecordOutStoreMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select obj_id, + store_code, + store_area, + space_code, + material_code, + material_name, + out_store_amount, + out_store_time, + is_flag, + created_by, + created_time, + updated_by, + updated_time, + barcode_code, + material_type, + exit_pattern + from record_outstore + + + + + + + + + SELECT seq_record_outstore.NEXTVAL as objId FROM DUAL + + insert into record_outstore + + obj_id, + store_code, + store_area, + space_code, + material_code, + material_name, + out_store_amount, + out_store_time, + is_flag, + created_by, + created_time, + updated_by, + updated_time, + barcode_code, + material_type, + exit_pattern, + + + #{objId}, + #{storeCode}, + #{storeArea}, + #{spaceCode}, + #{materialCode}, + #{materialName}, + #{outStoreAmount}, + #{outStoreTime}, + #{isFlag}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{barcodeCode}, + #{materialType}, + #{exitPattern}, + + + + + update record_outstore + + store_code = #{storeCode}, + store_area = #{storeArea}, + space_code = #{spaceCode}, + material_code = #{materialCode}, + material_name = #{materialName}, + out_store_amount = #{outStoreAmount}, + out_store_time = #{outStoreTime}, + is_flag = #{isFlag}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + barcode_code = #{barcodeCode}, + material_type = #{materialType}, + exit_pattern = #{exitPattern}, + + where obj_id = #{objId} + + + + delete + from record_outstore + where obj_id = #{objId} + + + + delete from record_outstore where obj_id in + + #{objId} + + + \ No newline at end of file