From 497e14c9653c20944b043d9e61a32514619b715a Mon Sep 17 00:00:00 2001 From: A0010407 Date: Mon, 16 Oct 2023 14:13:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E5=93=81=E5=A4=87=E4=BB=B6=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WmsOdsMateStorageNewsController.java | 97 +++ .../device/domain/WmsOdsMateStorageNews.java | 568 ++++++++++++++++++ .../mapper/WmsOdsMateStorageNewsMapper.java | 61 ++ .../IWmsOdsMateStorageNewsService.java | 60 ++ .../WmsOdsMateStorageNewsServiceImpl.java | 95 +++ .../device/WmsOdsMateStorageNewsMapper.xml | 258 ++++++++ 6 files changed, 1139 insertions(+) create mode 100644 op-modules/op-device/src/main/java/com/op/device/controller/WmsOdsMateStorageNewsController.java create mode 100644 op-modules/op-device/src/main/java/com/op/device/domain/WmsOdsMateStorageNews.java create mode 100644 op-modules/op-device/src/main/java/com/op/device/mapper/WmsOdsMateStorageNewsMapper.java create mode 100644 op-modules/op-device/src/main/java/com/op/device/service/IWmsOdsMateStorageNewsService.java create mode 100644 op-modules/op-device/src/main/java/com/op/device/service/impl/WmsOdsMateStorageNewsServiceImpl.java create mode 100644 op-modules/op-device/src/main/resources/mapper/device/WmsOdsMateStorageNewsMapper.xml diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/WmsOdsMateStorageNewsController.java b/op-modules/op-device/src/main/java/com/op/device/controller/WmsOdsMateStorageNewsController.java new file mode 100644 index 00000000..16841303 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/controller/WmsOdsMateStorageNewsController.java @@ -0,0 +1,97 @@ +package com.op.device.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +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.op.common.log.annotation.Log; +import com.op.common.log.enums.BusinessType; +import com.op.common.security.annotation.RequiresPermissions; +import com.op.device.domain.WmsOdsMateStorageNews; +import com.op.device.service.IWmsOdsMateStorageNewsService; +import com.op.common.core.web.controller.BaseController; +import com.op.common.core.web.domain.AjaxResult; +import com.op.common.core.utils.poi.ExcelUtil; +import com.op.common.core.web.page.TableDataInfo; + +/** + * 备品备件台账管理Controller + * + * @author Open Platform + * @date 2023-10-13 + */ +@RestController +@RequestMapping("/sparePartsLedger") +public class WmsOdsMateStorageNewsController extends BaseController { + @Autowired + private IWmsOdsMateStorageNewsService wmsOdsMateStorageNewsService; + + /** + * 查询备品备件台账管理列表 + */ + @RequiresPermissions("device:sparePartsLedger:list") + @GetMapping("/list") + public TableDataInfo list(WmsOdsMateStorageNews wmsOdsMateStorageNews) { + startPage(); + List list = wmsOdsMateStorageNewsService.selectWmsOdsMateStorageNewsList(wmsOdsMateStorageNews); + return getDataTable(list); + } + + /** + * 导出备品备件台账管理列表 + */ + @RequiresPermissions("device:sparePartsLedger:export") + @Log(title = "备品备件台账管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, WmsOdsMateStorageNews wmsOdsMateStorageNews) { + List list = wmsOdsMateStorageNewsService.selectWmsOdsMateStorageNewsList(wmsOdsMateStorageNews); + ExcelUtil util = new ExcelUtil(WmsOdsMateStorageNews.class); + util.exportExcel(response, list, "备品备件台账管理数据"); + } + + /** + * 获取备品备件台账管理详细信息 + */ + @RequiresPermissions("device:sparePartsLedger:query") + @GetMapping(value = "/{storageId}") + public AjaxResult getInfo(@PathVariable("storageId") String storageId) { + return success(wmsOdsMateStorageNewsService.selectWmsOdsMateStorageNewsByStorageId(storageId)); + } + + /** + * 新增备品备件台账管理 + */ + @RequiresPermissions("device:sparePartsLedger:add") + @Log(title = "备品备件台账管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WmsOdsMateStorageNews wmsOdsMateStorageNews) { + return toAjax(wmsOdsMateStorageNewsService.insertWmsOdsMateStorageNews(wmsOdsMateStorageNews)); + } + + /** + * 修改备品备件台账管理 + */ + @RequiresPermissions("device:sparePartsLedger:edit") + @Log(title = "备品备件台账管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WmsOdsMateStorageNews wmsOdsMateStorageNews) { + return toAjax(wmsOdsMateStorageNewsService.updateWmsOdsMateStorageNews(wmsOdsMateStorageNews)); + } + + /** + * 删除备品备件台账管理 + */ + @RequiresPermissions("device:sparePartsLedger:remove") + @Log(title = "备品备件台账管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{storageIds}") + public AjaxResult remove(@PathVariable String[] storageIds) { + return toAjax(wmsOdsMateStorageNewsService.deleteWmsOdsMateStorageNewsByStorageIds(storageIds)); + } +} diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/WmsOdsMateStorageNews.java b/op-modules/op-device/src/main/java/com/op/device/domain/WmsOdsMateStorageNews.java new file mode 100644 index 00000000..f95271c0 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/domain/WmsOdsMateStorageNews.java @@ -0,0 +1,568 @@ +package com.op.device.domain; + +import java.math.BigDecimal; +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.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; + +/** + * 备品备件台账管理对象 wms_ods_mate_storage_news + * + * @author Open Platform + * @date 2023-10-13 + */ +public class WmsOdsMateStorageNews extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 唯一序列 */ + @Excel(name = "唯一序列") + private String storageId; + + /** 仓库编码 */ + @Excel(name = "仓库编码") + private String whCode; + + /** 区域编号 */ + @Excel(name = "区域编号") + private String regionCode; + + /** 库区编码 */ + @Excel(name = "库区编码") + private String waCode; + + /** 库存类型:BC-包材 */ + @Excel(name = "库存类型:BC-包材") + private String storageType; + + /** 库位编码 */ + @Excel(name = "库位编码") + private String wlCode; + + /** 物料号 */ + @Excel(name = "物料号") + private String materialCode; + + /** 物料描述 */ + @Excel(name = "物料描述") + private String materialDesc; + + /** 总数量 */ + @Excel(name = "总数量") + private BigDecimal amount; + + /** 冻结数量(预留) */ + @Excel(name = "冻结数量", readConverterExp = "预=留") + private BigDecimal storageAmount; + + /** 占用数量 */ + @Excel(name = "占用数量") + private BigDecimal occupyAmount; + + /** LPN(预留) */ + @Excel(name = "LPN", readConverterExp = "预=留") + private String lpn; + + /** 入库批次号(预留) */ + @Excel(name = "入库批次号", readConverterExp = "预=留") + private String productBatch; + + /** 入库时间x(预留) */ + @Excel(name = "入库时间x", readConverterExp = "预=留") + private Date receiveDate; + + /** 生产时间(预留) */ + @Excel(name = "生产时间", readConverterExp = "预=留") + private Date productDate; + + /** 单位 */ + @Excel(name = "单位") + private String userDefined1; + + /** SAP库位 */ + @Excel(name = "SAP库位") + private String userDefined2; + + /** 备用3 */ + @Excel(name = "备用3") + private String userDefined3; + + /** 备用4 */ + @Excel(name = "备用4") + private String userDefined4; + + /** 备用5 */ + @Excel(name = "备用5") + private String userDefined5; + + /** 备用6 */ + @Excel(name = "备用6") + private String userDefined6; + + /** 备用7 */ + @Excel(name = "备用7") + private String userDefined7; + + /** 备用8 */ + @Excel(name = "备用8") + private String userDefined8; + + /** 备用9 */ + @Excel(name = "备用9") + private String userDefined9; + + /** 备用10 */ + @Excel(name = "备用10") + private String userDefined10; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date gmtCreate; + + /** 最后更新人 */ + @Excel(name = "最后更新人") + private String lastModifiedBy; + + /** 最后更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date gmtModified; + + /** 有效标记 */ + @Excel(name = "有效标记") + private String activeFlag; + + /** 工厂号 */ + @Excel(name = "工厂号") + private String factoryCode; + + /** SAP工厂号 */ + @Excel(name = "SAP工厂号") + private String sapFactoryCode; + + /** 库位名称 */ + @Excel(name = "库位名称") + private String wlName; + + /** 0存在 */ + private String delFlag; + + /** 使用寿命(备件用) */ + @Excel(name = "使用寿命", readConverterExp = "备=件用") + private String spareUseLife; + + /** 备件名称(备件用) */ + @Excel(name = "备件名称", readConverterExp = "备=件用") + private String spareName; + + /** 规格型号(备件用) */ + @Excel(name = "规格型号", readConverterExp = "备=件用") + private String spareMode; + + /** 生产厂商(备件用) */ + @Excel(name = "生产厂商", readConverterExp = "备=件用") + private String spareManufacturer; + + /** 供应商(备件用) */ + @Excel(name = "供应商", readConverterExp = "备=件用") + private String spareSupplier; + + /** 循环周期(备件用) */ + @Excel(name = "循环周期", readConverterExp = "备=件用") + private String spareReplacementCycle; + + /** 计量单位(备件用) */ + @Excel(name = "计量单位", readConverterExp = "备=件用") + private String spareMeasurementUnit; + + /** 换算单位(备件用) */ + @Excel(name = "换算单位", readConverterExp = "备=件用") + private String spareConversionUnit; + + /** 换算比例(备件用) */ + @Excel(name = "换算比例", readConverterExp = "备=件用") + private String spareConversionRatio; + + /** 库存上限(备件用) */ + @Excel(name = "库存上限", readConverterExp = "备=件用") + private String spareInventoryFloor; + + /** 库存下限(备件用) */ + @Excel(name = "库存下限", readConverterExp = "备=件用") + private String spareInventoryUpper; + + /** 备件类型 */ + @Excel(name = "备件类型", readConverterExp = "备=件用") + private String spareType; + + public void setSpareType(String spareType) { + this.spareType = spareType; + } + + public String getSpareType() { + return spareType; + } + + public void setStorageId(String storageId) { + this.storageId = storageId; + } + + public String getStorageId() { + return storageId; + } + public void setWhCode(String whCode) { + this.whCode = whCode; + } + + public String getWhCode() { + return whCode; + } + public void setRegionCode(String regionCode) { + this.regionCode = regionCode; + } + + public String getRegionCode() { + return regionCode; + } + public void setWaCode(String waCode) { + this.waCode = waCode; + } + + public String getWaCode() { + return waCode; + } + public void setStorageType(String storageType) { + this.storageType = storageType; + } + + public String getStorageType() { + return storageType; + } + public void setWlCode(String wlCode) { + this.wlCode = wlCode; + } + + public String getWlCode() { + return wlCode; + } + public void setMaterialCode(String materialCode) { + this.materialCode = materialCode; + } + + public String getMaterialCode() { + return materialCode; + } + public void setMaterialDesc(String materialDesc) { + this.materialDesc = materialDesc; + } + + public String getMaterialDesc() { + return materialDesc; + } + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public BigDecimal getAmount() { + return amount; + } + public void setStorageAmount(BigDecimal storageAmount) { + this.storageAmount = storageAmount; + } + + public BigDecimal getStorageAmount() { + return storageAmount; + } + public void setOccupyAmount(BigDecimal occupyAmount) { + this.occupyAmount = occupyAmount; + } + + public BigDecimal getOccupyAmount() { + return occupyAmount; + } + public void setLpn(String lpn) { + this.lpn = lpn; + } + + public String getLpn() { + return lpn; + } + public void setProductBatch(String productBatch) { + this.productBatch = productBatch; + } + + public String getProductBatch() { + return productBatch; + } + public void setReceiveDate(Date receiveDate) { + this.receiveDate = receiveDate; + } + + public Date getReceiveDate() { + return receiveDate; + } + public void setProductDate(Date productDate) { + this.productDate = productDate; + } + + public Date getProductDate() { + return productDate; + } + public void setUserDefined1(String userDefined1) { + this.userDefined1 = userDefined1; + } + + public String getUserDefined1() { + return userDefined1; + } + public void setUserDefined2(String userDefined2) { + this.userDefined2 = userDefined2; + } + + public String getUserDefined2() { + return userDefined2; + } + public void setUserDefined3(String userDefined3) { + this.userDefined3 = userDefined3; + } + + public String getUserDefined3() { + return userDefined3; + } + public void setUserDefined4(String userDefined4) { + this.userDefined4 = userDefined4; + } + + public String getUserDefined4() { + return userDefined4; + } + public void setUserDefined5(String userDefined5) { + this.userDefined5 = userDefined5; + } + + public String getUserDefined5() { + return userDefined5; + } + public void setUserDefined6(String userDefined6) { + this.userDefined6 = userDefined6; + } + + public String getUserDefined6() { + return userDefined6; + } + public void setUserDefined7(String userDefined7) { + this.userDefined7 = userDefined7; + } + + public String getUserDefined7() { + return userDefined7; + } + public void setUserDefined8(String userDefined8) { + this.userDefined8 = userDefined8; + } + + public String getUserDefined8() { + return userDefined8; + } + public void setUserDefined9(String userDefined9) { + this.userDefined9 = userDefined9; + } + + public String getUserDefined9() { + return userDefined9; + } + public void setUserDefined10(String userDefined10) { + this.userDefined10 = userDefined10; + } + + public String getUserDefined10() { + return userDefined10; + } + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtCreate() { + return gmtCreate; + } + public void setLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public String getLastModifiedBy() { + return lastModifiedBy; + } + public void setGmtModified(Date gmtModified) { + this.gmtModified = gmtModified; + } + + public Date getGmtModified() { + return gmtModified; + } + public void setActiveFlag(String activeFlag) { + this.activeFlag = activeFlag; + } + + public String getActiveFlag() { + return activeFlag; + } + public void setFactoryCode(String factoryCode) { + this.factoryCode = factoryCode; + } + + public String getFactoryCode() { + return factoryCode; + } + public void setSapFactoryCode(String sapFactoryCode) { + this.sapFactoryCode = sapFactoryCode; + } + + public String getSapFactoryCode() { + return sapFactoryCode; + } + public void setWlName(String wlName) { + this.wlName = wlName; + } + + public String getWlName() { + return wlName; + } + public void setDelFlag(String delFlag) { + this.delFlag = delFlag; + } + + public String getDelFlag() { + return delFlag; + } + public void setSpareUseLife(String spareUseLife) { + this.spareUseLife = spareUseLife; + } + + public String getSpareUseLife() { + return spareUseLife; + } + public void setSpareName(String spareName) { + this.spareName = spareName; + } + + public String getSpareName() { + return spareName; + } + public void setSpareMode(String spareMode) { + this.spareMode = spareMode; + } + + public String getSpareMode() { + return spareMode; + } + public void setSpareManufacturer(String spareManufacturer) { + this.spareManufacturer = spareManufacturer; + } + + public String getSpareManufacturer() { + return spareManufacturer; + } + public void setSpareSupplier(String spareSupplier) { + this.spareSupplier = spareSupplier; + } + + public String getSpareSupplier() { + return spareSupplier; + } + public void setSpareReplacementCycle(String spareReplacementCycle) { + this.spareReplacementCycle = spareReplacementCycle; + } + + public String getSpareReplacementCycle() { + return spareReplacementCycle; + } + public void setSpareMeasurementUnit(String spareMeasurementUnit) { + this.spareMeasurementUnit = spareMeasurementUnit; + } + + public String getSpareMeasurementUnit() { + return spareMeasurementUnit; + } + public void setSpareConversionUnit(String spareConversionUnit) { + this.spareConversionUnit = spareConversionUnit; + } + + public String getSpareConversionUnit() { + return spareConversionUnit; + } + public void setSpareConversionRatio(String spareConversionRatio) { + this.spareConversionRatio = spareConversionRatio; + } + + public String getSpareConversionRatio() { + return spareConversionRatio; + } + public void setSpareInventoryFloor(String spareInventoryFloor) { + this.spareInventoryFloor = spareInventoryFloor; + } + + public String getSpareInventoryFloor() { + return spareInventoryFloor; + } + public void setSpareInventoryUpper(String spareInventoryUpper) { + this.spareInventoryUpper = spareInventoryUpper; + } + + public String getSpareInventoryUpper() { + return spareInventoryUpper; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("storageId", getStorageId()) + .append("whCode", getWhCode()) + .append("regionCode", getRegionCode()) + .append("waCode", getWaCode()) + .append("storageType", getStorageType()) + .append("wlCode", getWlCode()) + .append("materialCode", getMaterialCode()) + .append("materialDesc", getMaterialDesc()) + .append("amount", getAmount()) + .append("storageAmount", getStorageAmount()) + .append("occupyAmount", getOccupyAmount()) + .append("lpn", getLpn()) + .append("productBatch", getProductBatch()) + .append("receiveDate", getReceiveDate()) + .append("productDate", getProductDate()) + .append("userDefined1", getUserDefined1()) + .append("userDefined2", getUserDefined2()) + .append("userDefined3", getUserDefined3()) + .append("userDefined4", getUserDefined4()) + .append("userDefined5", getUserDefined5()) + .append("userDefined6", getUserDefined6()) + .append("userDefined7", getUserDefined7()) + .append("userDefined8", getUserDefined8()) + .append("userDefined9", getUserDefined9()) + .append("userDefined10", getUserDefined10()) + .append("createBy", getCreateBy()) + .append("gmtCreate", getGmtCreate()) + .append("lastModifiedBy", getLastModifiedBy()) + .append("gmtModified", getGmtModified()) + .append("activeFlag", getActiveFlag()) + .append("factoryCode", getFactoryCode()) + .append("sapFactoryCode", getSapFactoryCode()) + .append("wlName", getWlName()) + .append("delFlag", getDelFlag()) + .append("spareUseLife", getSpareUseLife()) + .append("spareName", getSpareName()) + .append("spareMode", getSpareMode()) + .append("spareManufacturer", getSpareManufacturer()) + .append("spareSupplier", getSpareSupplier()) + .append("spareReplacementCycle", getSpareReplacementCycle()) + .append("spareMeasurementUnit", getSpareMeasurementUnit()) + .append("spareConversionUnit", getSpareConversionUnit()) + .append("spareConversionRatio", getSpareConversionRatio()) + .append("spareInventoryFloor", getSpareInventoryFloor()) + .append("spareInventoryUpper", getSpareInventoryUpper()) + .toString(); + } +} diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/WmsOdsMateStorageNewsMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/WmsOdsMateStorageNewsMapper.java new file mode 100644 index 00000000..cafa5899 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/WmsOdsMateStorageNewsMapper.java @@ -0,0 +1,61 @@ +package com.op.device.mapper; + +import java.util.List; + +import com.op.device.domain.WmsOdsMateStorageNews; + +/** + * 备品备件台账管理Mapper接口 + * + * @author Open Platform + * @date 2023-10-13 + */ +public interface WmsOdsMateStorageNewsMapper { + /** + * 查询备品备件台账管理 + * + * @param storageId 备品备件台账管理主键 + * @return 备品备件台账管理 + */ + public WmsOdsMateStorageNews selectWmsOdsMateStorageNewsByStorageId(String storageId); + + /** + * 查询备品备件台账管理列表 + * + * @param wmsOdsMateStorageNews 备品备件台账管理 + * @return 备品备件台账管理集合 + */ + public List selectWmsOdsMateStorageNewsList(WmsOdsMateStorageNews wmsOdsMateStorageNews); + + /** + * 新增备品备件台账管理 + * + * @param wmsOdsMateStorageNews 备品备件台账管理 + * @return 结果 + */ + public int insertWmsOdsMateStorageNews(WmsOdsMateStorageNews wmsOdsMateStorageNews); + + /** + * 修改备品备件台账管理 + * + * @param wmsOdsMateStorageNews 备品备件台账管理 + * @return 结果 + */ + public int updateWmsOdsMateStorageNews(WmsOdsMateStorageNews wmsOdsMateStorageNews); + + /** + * 删除备品备件台账管理 + * + * @param storageId 备品备件台账管理主键 + * @return 结果 + */ + public int deleteWmsOdsMateStorageNewsByStorageId(String storageId); + + /** + * 批量删除备品备件台账管理 + * + * @param storageIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteWmsOdsMateStorageNewsByStorageIds(String[] storageIds); +} diff --git a/op-modules/op-device/src/main/java/com/op/device/service/IWmsOdsMateStorageNewsService.java b/op-modules/op-device/src/main/java/com/op/device/service/IWmsOdsMateStorageNewsService.java new file mode 100644 index 00000000..1330881f --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/service/IWmsOdsMateStorageNewsService.java @@ -0,0 +1,60 @@ +package com.op.device.service; + +import java.util.List; +import com.op.device.domain.WmsOdsMateStorageNews; + +/** + * 备品备件台账管理Service接口 + * + * @author Open Platform + * @date 2023-10-13 + */ +public interface IWmsOdsMateStorageNewsService { + /** + * 查询备品备件台账管理 + * + * @param storageId 备品备件台账管理主键 + * @return 备品备件台账管理 + */ + public WmsOdsMateStorageNews selectWmsOdsMateStorageNewsByStorageId(String storageId); + + /** + * 查询备品备件台账管理列表 + * + * @param wmsOdsMateStorageNews 备品备件台账管理 + * @return 备品备件台账管理集合 + */ + public List selectWmsOdsMateStorageNewsList(WmsOdsMateStorageNews wmsOdsMateStorageNews); + + /** + * 新增备品备件台账管理 + * + * @param wmsOdsMateStorageNews 备品备件台账管理 + * @return 结果 + */ + public int insertWmsOdsMateStorageNews(WmsOdsMateStorageNews wmsOdsMateStorageNews); + + /** + * 修改备品备件台账管理 + * + * @param wmsOdsMateStorageNews 备品备件台账管理 + * @return 结果 + */ + public int updateWmsOdsMateStorageNews(WmsOdsMateStorageNews wmsOdsMateStorageNews); + + /** + * 批量删除备品备件台账管理 + * + * @param storageIds 需要删除的备品备件台账管理主键集合 + * @return 结果 + */ + public int deleteWmsOdsMateStorageNewsByStorageIds(String[] storageIds); + + /** + * 删除备品备件台账管理信息 + * + * @param storageId 备品备件台账管理主键 + * @return 结果 + */ + public int deleteWmsOdsMateStorageNewsByStorageId(String storageId); +} diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/WmsOdsMateStorageNewsServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/WmsOdsMateStorageNewsServiceImpl.java new file mode 100644 index 00000000..af7c4c86 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/WmsOdsMateStorageNewsServiceImpl.java @@ -0,0 +1,95 @@ +package com.op.device.service.impl; + +import java.util.List; + +import com.baomidou.dynamic.datasource.annotation.DS; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.op.device.mapper.WmsOdsMateStorageNewsMapper; +import com.op.device.domain.WmsOdsMateStorageNews; +import com.op.device.service.IWmsOdsMateStorageNewsService; + +/** + * 备品备件台账管理Service业务层处理 + * + * @author Open Platform + * @date 2023-10-13 + */ +@Service +public class WmsOdsMateStorageNewsServiceImpl implements IWmsOdsMateStorageNewsService { + @Autowired + private WmsOdsMateStorageNewsMapper wmsOdsMateStorageNewsMapper; + + /** + * 查询备品备件台账管理 + * + * @param storageId 备品备件台账管理主键 + * @return 备品备件台账管理 + */ + @Override + @DS("#header.poolName") + public WmsOdsMateStorageNews selectWmsOdsMateStorageNewsByStorageId(String storageId) { + return wmsOdsMateStorageNewsMapper.selectWmsOdsMateStorageNewsByStorageId(storageId); + } + + /** + * 查询备品备件台账管理列表 + * + * @param wmsOdsMateStorageNews 备品备件台账管理 + * @return 备品备件台账管理 + */ + @Override + @DS("#header.poolName") + public List selectWmsOdsMateStorageNewsList(WmsOdsMateStorageNews wmsOdsMateStorageNews) { + wmsOdsMateStorageNews.setStorageType("SP"); + return wmsOdsMateStorageNewsMapper.selectWmsOdsMateStorageNewsList(wmsOdsMateStorageNews); + } + + /** + * 新增备品备件台账管理 + * + * @param wmsOdsMateStorageNews 备品备件台账管理 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int insertWmsOdsMateStorageNews(WmsOdsMateStorageNews wmsOdsMateStorageNews) { + return wmsOdsMateStorageNewsMapper.insertWmsOdsMateStorageNews(wmsOdsMateStorageNews); + } + + /** + * 修改备品备件台账管理 + * + * @param wmsOdsMateStorageNews 备品备件台账管理 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int updateWmsOdsMateStorageNews(WmsOdsMateStorageNews wmsOdsMateStorageNews) { + return wmsOdsMateStorageNewsMapper.updateWmsOdsMateStorageNews(wmsOdsMateStorageNews); + } + + /** + * 批量删除备品备件台账管理 + * + * @param storageIds 需要删除的备品备件台账管理主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteWmsOdsMateStorageNewsByStorageIds(String[] storageIds) { + return wmsOdsMateStorageNewsMapper.deleteWmsOdsMateStorageNewsByStorageIds(storageIds); + } + + /** + * 删除备品备件台账管理信息 + * + * @param storageId 备品备件台账管理主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteWmsOdsMateStorageNewsByStorageId(String storageId) { + return wmsOdsMateStorageNewsMapper.deleteWmsOdsMateStorageNewsByStorageId(storageId); + } +} diff --git a/op-modules/op-device/src/main/resources/mapper/device/WmsOdsMateStorageNewsMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/WmsOdsMateStorageNewsMapper.xml new file mode 100644 index 00000000..c402c2fb --- /dev/null +++ b/op-modules/op-device/src/main/resources/mapper/device/WmsOdsMateStorageNewsMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select storage_type, material_code, material_desc, amount,sap_factory_code, wl_name, del_flag, spare_use_life, spare_name, spare_mode, spare_manufacturer, spare_supplier, spare_replacement_cycle, spare_measurement_unit, spare_conversion_unit, spare_conversion_ratio, spare_inventory_floor, spare_inventory_upper,spare_type,create_by, gmt_create, last_modified_by, gmt_modified, active_flag, factory_code from wms_ods_mate_storage_news + + + + + + + + insert into wms_ods_mate_storage_news + + storage_id, + wh_code, + region_code, + wa_code, + storage_type, + wl_code, + material_code, + material_desc, + amount, + storage_amount, + occupy_amount, + lpn, + product_batch, + receive_date, + product_date, + user_defined1, + user_defined2, + user_defined3, + user_defined4, + user_defined5, + user_defined6, + user_defined7, + user_defined8, + user_defined9, + user_defined10, + create_by, + gmt_create, + last_modified_by, + gmt_modified, + active_flag, + factory_code, + sap_factory_code, + wl_name, + del_flag, + spare_use_life, + spare_name, + spare_mode, + spare_manufacturer, + spare_supplier, + spare_replacement_cycle, + spare_measurement_unit, + spare_conversion_unit, + spare_conversion_ratio, + spare_inventory_floor, + spare_inventory_upper, + spare_type, + + + #{storageId}, + #{whCode}, + #{regionCode}, + #{waCode}, + #{storageType}, + #{wlCode}, + #{materialCode}, + #{materialDesc}, + #{amount}, + #{storageAmount}, + #{occupyAmount}, + #{lpn}, + #{productBatch}, + #{receiveDate}, + #{productDate}, + #{userDefined1}, + #{userDefined2}, + #{userDefined3}, + #{userDefined4}, + #{userDefined5}, + #{userDefined6}, + #{userDefined7}, + #{userDefined8}, + #{userDefined9}, + #{userDefined10}, + #{createBy}, + #{gmtCreate}, + #{lastModifiedBy}, + #{gmtModified}, + #{activeFlag}, + #{factoryCode}, + #{sapFactoryCode}, + #{wlName}, + #{delFlag}, + #{spareUseLife}, + #{spareName}, + #{spareMode}, + #{spareManufacturer}, + #{spareSupplier}, + #{spareReplacementCycle}, + #{spareMeasurementUnit}, + #{spareConversionUnit}, + #{spareConversionRatio}, + #{spareInventoryFloor}, + #{spareInventoryUpper}, + #{spareType}, + + + + + update wms_ods_mate_storage_news + + wh_code = #{whCode}, + region_code = #{regionCode}, + wa_code = #{waCode}, + storage_type = #{storageType}, + wl_code = #{wlCode}, + material_code = #{materialCode}, + material_desc = #{materialDesc}, + amount = #{amount}, + storage_amount = #{storageAmount}, + occupy_amount = #{occupyAmount}, + lpn = #{lpn}, + product_batch = #{productBatch}, + receive_date = #{receiveDate}, + product_date = #{productDate}, + user_defined1 = #{userDefined1}, + user_defined2 = #{userDefined2}, + user_defined3 = #{userDefined3}, + user_defined4 = #{userDefined4}, + user_defined5 = #{userDefined5}, + user_defined6 = #{userDefined6}, + user_defined7 = #{userDefined7}, + user_defined8 = #{userDefined8}, + user_defined9 = #{userDefined9}, + user_defined10 = #{userDefined10}, + create_by = #{createBy}, + gmt_create = #{gmtCreate}, + last_modified_by = #{lastModifiedBy}, + gmt_modified = #{gmtModified}, + active_flag = #{activeFlag}, + factory_code = #{factoryCode}, + sap_factory_code = #{sapFactoryCode}, + wl_name = #{wlName}, + del_flag = #{delFlag}, + spare_use_life = #{spareUseLife}, + spare_name = #{spareName}, + spare_mode = #{spareMode}, + spare_manufacturer = #{spareManufacturer}, + spare_supplier = #{spareSupplier}, + spare_replacement_cycle = #{spareReplacementCycle}, + spare_measurement_unit = #{spareMeasurementUnit}, + spare_conversion_unit = #{spareConversionUnit}, + spare_conversion_ratio = #{spareConversionRatio}, + spare_inventory_floor = #{spareInventoryFloor}, + spare_inventory_upper = #{spareInventoryUpper}, + spare_type = #{spareType}, + + where storage_id = #{storageId} + + + + delete from wms_ods_mate_storage_news where storage_id = #{storageId} + + + + delete from wms_ods_mate_storage_news where storage_id in + + #{storageId} + + + \ No newline at end of file