From 5b720be4b9bd28dd2d2e4d7be677500b0ca5040a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?yinjinlu-pc=5C=E5=B0=B9=E9=87=91=E8=B7=AF?= <411641505@qq.com> Date: Sun, 15 Dec 2024 19:36:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E6=96=99=E9=80=9A=E7=9F=A5=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E5=8A=9F=E8=83=BD=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WmMaterialrequestNoticeController.java | 104 ++++++ ...WmMaterialrequestNoticeLineController.java | 104 ++++++ .../wm/domain/WmMaterialrequestNotice.java | 336 ++++++++++++++++++ .../domain/WmMaterialrequestNoticeLine.java | 206 +++++++++++ .../WmMaterialrequestNoticeLineMapper.java | 61 ++++ .../mapper/WmMaterialrequestNoticeMapper.java | 61 ++++ .../IWmMaterialrequestNoticeLineService.java | 61 ++++ .../IWmMaterialrequestNoticeService.java | 61 ++++ ...mMaterialrequestNoticeLineServiceImpl.java | 96 +++++ .../WmMaterialrequestNoticeServiceImpl.java | 96 +++++ .../wm/WmMaterialrequestNoticeLineMapper.xml | 127 +++++++ .../wm/WmMaterialrequestNoticeMapper.xml | 142 ++++++++ 12 files changed, 1455 insertions(+) create mode 100644 ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmMaterialrequestNoticeController.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmMaterialrequestNoticeLineController.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmMaterialrequestNotice.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmMaterialrequestNoticeLine.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmMaterialrequestNoticeLineMapper.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmMaterialrequestNoticeMapper.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/wm/service/IWmMaterialrequestNoticeLineService.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/wm/service/IWmMaterialrequestNoticeService.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmMaterialrequestNoticeLineServiceImpl.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmMaterialrequestNoticeServiceImpl.java create mode 100644 ktg-mes/src/main/resources/mapper/wm/WmMaterialrequestNoticeLineMapper.xml create mode 100644 ktg-mes/src/main/resources/mapper/wm/WmMaterialrequestNoticeMapper.xml diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmMaterialrequestNoticeController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmMaterialrequestNoticeController.java new file mode 100644 index 0000000..1d2c90d --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmMaterialrequestNoticeController.java @@ -0,0 +1,104 @@ +package com.ktg.mes.wm.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +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.ktg.common.annotation.Log; +import com.ktg.common.core.controller.BaseController; +import com.ktg.common.core.domain.AjaxResult; +import com.ktg.common.enums.BusinessType; +import com.ktg.mes.wm.domain.WmMaterialrequestNotice; +import com.ktg.mes.wm.service.IWmMaterialrequestNoticeService; +import com.ktg.common.utils.poi.ExcelUtil; +import com.ktg.common.core.page.TableDataInfo; + +/** + * 备料通知单Controller + * + * @author yinjinlu + * @date 2024-12-13 + */ +@RestController +@RequestMapping("/mes/wm/mrnotice") +public class WmMaterialrequestNoticeController extends BaseController +{ + @Autowired + private IWmMaterialrequestNoticeService wmMaterialrequestNoticeService; + + /** + * 查询备料通知单列表 + */ + @PreAuthorize("@ss.hasPermi('wm:mrnotice:list')") + @GetMapping("/list") + public TableDataInfo list(WmMaterialrequestNotice wmMaterialrequestNotice) + { + startPage(); + List list = wmMaterialrequestNoticeService.selectWmMaterialrequestNoticeList(wmMaterialrequestNotice); + return getDataTable(list); + } + + /** + * 导出备料通知单列表 + */ + @PreAuthorize("@ss.hasPermi('wm:mrnotice:export')") + @Log(title = "备料通知单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, WmMaterialrequestNotice wmMaterialrequestNotice) + { + List list = wmMaterialrequestNoticeService.selectWmMaterialrequestNoticeList(wmMaterialrequestNotice); + ExcelUtil util = new ExcelUtil(WmMaterialrequestNotice.class); + util.exportExcel(response, list, "备料通知单数据"); + } + + /** + * 获取备料通知单详细信息 + */ + @PreAuthorize("@ss.hasPermi('wm:mrnotice:query')") + @GetMapping(value = "/{noticeId}") + public AjaxResult getInfo(@PathVariable("noticeId") Long noticeId) + { + return AjaxResult.success(wmMaterialrequestNoticeService.selectWmMaterialrequestNoticeByNoticeId(noticeId)); + } + + /** + * 新增备料通知单 + */ + @PreAuthorize("@ss.hasPermi('wm:mrnotice:add')") + @Log(title = "备料通知单", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WmMaterialrequestNotice wmMaterialrequestNotice) + { + return toAjax(wmMaterialrequestNoticeService.insertWmMaterialrequestNotice(wmMaterialrequestNotice)); + } + + /** + * 修改备料通知单 + */ + @PreAuthorize("@ss.hasPermi('wm:mrnotice:edit')") + @Log(title = "备料通知单", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WmMaterialrequestNotice wmMaterialrequestNotice) + { + return toAjax(wmMaterialrequestNoticeService.updateWmMaterialrequestNotice(wmMaterialrequestNotice)); + } + + /** + * 删除备料通知单 + */ + @PreAuthorize("@ss.hasPermi('wm:mrnotice:remove')") + @Log(title = "备料通知单", businessType = BusinessType.DELETE) + @DeleteMapping("/{noticeIds}") + public AjaxResult remove(@PathVariable Long[] noticeIds) + { + return toAjax(wmMaterialrequestNoticeService.deleteWmMaterialrequestNoticeByNoticeIds(noticeIds)); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmMaterialrequestNoticeLineController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmMaterialrequestNoticeLineController.java new file mode 100644 index 0000000..8397986 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmMaterialrequestNoticeLineController.java @@ -0,0 +1,104 @@ +package com.ktg.mes.wm.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +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.ktg.common.annotation.Log; +import com.ktg.common.core.controller.BaseController; +import com.ktg.common.core.domain.AjaxResult; +import com.ktg.common.enums.BusinessType; +import com.ktg.mes.wm.domain.WmMaterialrequestNoticeLine; +import com.ktg.mes.wm.service.IWmMaterialrequestNoticeLineService; +import com.ktg.common.utils.poi.ExcelUtil; +import com.ktg.common.core.page.TableDataInfo; + +/** + * 备料通知单明细Controller + * + * @author yinjinlu + * @date 2024-12-13 + */ +@RestController +@RequestMapping("/mes/wm/mrnoticeline") +public class WmMaterialrequestNoticeLineController extends BaseController +{ + @Autowired + private IWmMaterialrequestNoticeLineService wmMaterialrequestNoticeLineService; + + /** + * 查询备料通知单明细列表 + */ + @PreAuthorize("@ss.hasPermi('wm:mrnoticeline:list')") + @GetMapping("/list") + public TableDataInfo list(WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine) + { + startPage(); + List list = wmMaterialrequestNoticeLineService.selectWmMaterialrequestNoticeLineList(wmMaterialrequestNoticeLine); + return getDataTable(list); + } + + /** + * 导出备料通知单明细列表 + */ + @PreAuthorize("@ss.hasPermi('wm:mrnoticeline:export')") + @Log(title = "备料通知单明细", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine) + { + List list = wmMaterialrequestNoticeLineService.selectWmMaterialrequestNoticeLineList(wmMaterialrequestNoticeLine); + ExcelUtil util = new ExcelUtil(WmMaterialrequestNoticeLine.class); + util.exportExcel(response, list, "备料通知单明细数据"); + } + + /** + * 获取备料通知单明细详细信息 + */ + @PreAuthorize("@ss.hasPermi('wm:mrnoticeline:query')") + @GetMapping(value = "/{lineId}") + public AjaxResult getInfo(@PathVariable("lineId") Long lineId) + { + return AjaxResult.success(wmMaterialrequestNoticeLineService.selectWmMaterialrequestNoticeLineByLineId(lineId)); + } + + /** + * 新增备料通知单明细 + */ + @PreAuthorize("@ss.hasPermi('wm:mrnoticeline:add')") + @Log(title = "备料通知单明细", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine) + { + return toAjax(wmMaterialrequestNoticeLineService.insertWmMaterialrequestNoticeLine(wmMaterialrequestNoticeLine)); + } + + /** + * 修改备料通知单明细 + */ + @PreAuthorize("@ss.hasPermi('wm:mrnoticeline:edit')") + @Log(title = "备料通知单明细", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine) + { + return toAjax(wmMaterialrequestNoticeLineService.updateWmMaterialrequestNoticeLine(wmMaterialrequestNoticeLine)); + } + + /** + * 删除备料通知单明细 + */ + @PreAuthorize("@ss.hasPermi('wm:mrnoticeline:remove')") + @Log(title = "备料通知单明细", businessType = BusinessType.DELETE) + @DeleteMapping("/{lineIds}") + public AjaxResult remove(@PathVariable Long[] lineIds) + { + return toAjax(wmMaterialrequestNoticeLineService.deleteWmMaterialrequestNoticeLineByLineIds(lineIds)); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmMaterialrequestNotice.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmMaterialrequestNotice.java new file mode 100644 index 0000000..dcf8e8a --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmMaterialrequestNotice.java @@ -0,0 +1,336 @@ +package com.ktg.mes.wm.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.ktg.common.annotation.Excel; +import com.ktg.common.core.domain.BaseEntity; + +/** + * 备料通知单对象 wm_materialrequest_notice + * + * @author yinjinlu + * @date 2024-12-13 + */ +public class WmMaterialrequestNotice extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 通知ID */ + private Long noticeId; + + /** 工作站ID */ + @Excel(name = "工作站ID") + private Long workstationId; + + /** 工作站编号 */ + @Excel(name = "工作站编号") + private String workstaitonCode; + + /** 生产工单ID */ + @Excel(name = "生产工单ID") + private Long workorderId; + + /** 生产工单编号 */ + @Excel(name = "生产工单编号") + private String workorderCode; + + /** 需求人 */ + @Excel(name = "需求人") + private Long userId; + + /** 用户名 */ + @Excel(name = "用户名") + private String userName; + + /** 昵称 */ + @Excel(name = "昵称") + private String nickName; + + /** 需求时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "需求时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date requestTime; + + /** 开始备料时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "开始备料时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date startTime; + + /** 完成时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date endTime; + + + private Long itemId; + + /** 产品物料编码 */ + @Excel(name = "产品物料编码") + private String itemCode; + + /** 产品物料名称 */ + @Excel(name = "产品物料名称") + private String itemName; + + /** 规格型号 */ + @Excel(name = "规格型号") + private String specification; + + /** 单位 */ + @Excel(name = "单位") + private String unitOfMeasure; + + /** 单位名称 */ + @Excel(name = "单位名称") + private String unitName; + + /** 需求数量 */ + @Excel(name = "需求数量") + private Long quantity; + + /** 状态 */ + @Excel(name = "状态") + private String status; + + /** 预留字段1 */ + private String attr1; + + /** 预留字段2 */ + private String attr2; + + /** 预留字段3 */ + private Long attr3; + + /** 预留字段4 */ + private Long attr4; + + public void setNoticeId(Long noticeId) + { + this.noticeId = noticeId; + } + + public Long getNoticeId() + { + return noticeId; + } + public void setWorkstationId(Long workstationId) + { + this.workstationId = workstationId; + } + + public Long getWorkstationId() + { + return workstationId; + } + public void setWorkstaitonCode(String workstaitonCode) + { + this.workstaitonCode = workstaitonCode; + } + + public String getWorkstaitonCode() + { + return workstaitonCode; + } + public void setWorkorderId(Long workorderId) + { + this.workorderId = workorderId; + } + + public Long getWorkorderId() + { + return workorderId; + } + public void setWorkorderCode(String workorderCode) + { + this.workorderCode = workorderCode; + } + + public String getWorkorderCode() + { + return workorderCode; + } + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + public void setUserName(String userName) + { + this.userName = userName; + } + + public String getUserName() + { + return userName; + } + public void setNickName(String nickName) + { + this.nickName = nickName; + } + + public String getNickName() + { + return nickName; + } + public void setRequestTime(Date requestTime) + { + this.requestTime = requestTime; + } + + public Date getRequestTime() + { + return requestTime; + } + public void setStartTime(Date startTime) + { + this.startTime = startTime; + } + + public Date getStartTime() + { + return startTime; + } + public void setEndTime(Date endTime) + { + this.endTime = endTime; + } + + public Date getEndTime() + { + return endTime; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + public void setAttr1(String attr1) + { + this.attr1 = attr1; + } + + public String getAttr1() + { + return attr1; + } + public void setAttr2(String attr2) + { + this.attr2 = attr2; + } + + public String getAttr2() + { + return attr2; + } + public void setAttr3(Long attr3) + { + this.attr3 = attr3; + } + + public Long getAttr3() + { + return attr3; + } + public void setAttr4(Long attr4) + { + this.attr4 = attr4; + } + + public Long getAttr4() + { + return attr4; + } + + public Long getItemId() { + return itemId; + } + + public void setItemId(Long itemId) { + this.itemId = itemId; + } + + public String getItemCode() { + return itemCode; + } + + public void setItemCode(String itemCode) { + this.itemCode = itemCode; + } + + public String getItemName() { + return itemName; + } + + public void setItemName(String itemName) { + this.itemName = itemName; + } + + public String getSpecification() { + return specification; + } + + public void setSpecification(String specification) { + this.specification = specification; + } + + public String getUnitOfMeasure() { + return unitOfMeasure; + } + + public void setUnitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + } + + public String getUnitName() { + return unitName; + } + + public void setUnitName(String unitName) { + this.unitName = unitName; + } + + public Long getQuantity() { + return quantity; + } + + public void setQuantity(Long quantity) { + this.quantity = quantity; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("noticeId", getNoticeId()) + .append("workstationId", getWorkstationId()) + .append("workstaitonCode", getWorkstaitonCode()) + .append("workorderId", getWorkorderId()) + .append("workorderCode", getWorkorderCode()) + .append("userId", getUserId()) + .append("userName", getUserName()) + .append("nickName", getNickName()) + .append("requestTime", getRequestTime()) + .append("startTime", getStartTime()) + .append("endTime", getEndTime()) + .append("status", getStatus()) + .append("remark", getRemark()) + .append("attr1", getAttr1()) + .append("attr2", getAttr2()) + .append("attr3", getAttr3()) + .append("attr4", getAttr4()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmMaterialrequestNoticeLine.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmMaterialrequestNoticeLine.java new file mode 100644 index 0000000..9069678 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmMaterialrequestNoticeLine.java @@ -0,0 +1,206 @@ +package com.ktg.mes.wm.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ktg.common.annotation.Excel; +import com.ktg.common.core.domain.BaseEntity; + +/** + * 备料通知单明细对象 wm_materialrequest_notice_line + * + * @author yinjinlu + * @date 2024-12-13 + */ +public class WmMaterialrequestNoticeLine extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 行ID */ + private Long lineId; + + /** 通知ID */ + @Excel(name = "通知ID") + private Long noticeId; + + /** 产品物料ID */ + @Excel(name = "产品物料ID") + private Long itemId; + + /** 产品物料编码 */ + @Excel(name = "产品物料编码") + private String itemCode; + + /** 产品物料名称 */ + @Excel(name = "产品物料名称") + private String itemName; + + /** 规格型号 */ + @Excel(name = "规格型号") + private String specification; + + /** 单位 */ + @Excel(name = "单位") + private String unitOfMeasure; + + /** 单位名称 */ + @Excel(name = "单位名称") + private String unitName; + + /** 需求数量 */ + @Excel(name = "需求数量") + private Long quantity; + + /** 预留字段1 */ + private String attr1; + + /** 预留字段2 */ + private String attr2; + + /** 预留字段3 */ + private Long attr3; + + /** 预留字段4 */ + private Long attr4; + + public void setLineId(Long lineId) + { + this.lineId = lineId; + } + + public Long getLineId() + { + return lineId; + } + public void setNoticeId(Long noticeId) + { + this.noticeId = noticeId; + } + + public Long getNoticeId() + { + return noticeId; + } + public void setItemId(Long itemId) + { + this.itemId = itemId; + } + + public Long getItemId() + { + return itemId; + } + public void setItemCode(String itemCode) + { + this.itemCode = itemCode; + } + + public String getItemCode() + { + return itemCode; + } + public void setItemName(String itemName) + { + this.itemName = itemName; + } + + public String getItemName() + { + return itemName; + } + public void setSpecification(String specification) + { + this.specification = specification; + } + + public String getSpecification() + { + return specification; + } + public void setUnitOfMeasure(String unitOfMeasure) + { + this.unitOfMeasure = unitOfMeasure; + } + + public String getUnitOfMeasure() + { + return unitOfMeasure; + } + public void setUnitName(String unitName) + { + this.unitName = unitName; + } + + public String getUnitName() + { + return unitName; + } + public void setQuantity(Long quantity) + { + this.quantity = quantity; + } + + public Long getQuantity() + { + return quantity; + } + public void setAttr1(String attr1) + { + this.attr1 = attr1; + } + + public String getAttr1() + { + return attr1; + } + public void setAttr2(String attr2) + { + this.attr2 = attr2; + } + + public String getAttr2() + { + return attr2; + } + public void setAttr3(Long attr3) + { + this.attr3 = attr3; + } + + public Long getAttr3() + { + return attr3; + } + public void setAttr4(Long attr4) + { + this.attr4 = attr4; + } + + public Long getAttr4() + { + return attr4; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("lineId", getLineId()) + .append("noticeId", getNoticeId()) + .append("itemId", getItemId()) + .append("itemCode", getItemCode()) + .append("itemName", getItemName()) + .append("specification", getSpecification()) + .append("unitOfMeasure", getUnitOfMeasure()) + .append("unitName", getUnitName()) + .append("quantity", getQuantity()) + .append("remark", getRemark()) + .append("attr1", getAttr1()) + .append("attr2", getAttr2()) + .append("attr3", getAttr3()) + .append("attr4", getAttr4()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmMaterialrequestNoticeLineMapper.java b/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmMaterialrequestNoticeLineMapper.java new file mode 100644 index 0000000..e970164 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmMaterialrequestNoticeLineMapper.java @@ -0,0 +1,61 @@ +package com.ktg.mes.wm.mapper; + +import java.util.List; +import com.ktg.mes.wm.domain.WmMaterialrequestNoticeLine; + +/** + * 备料通知单明细Mapper接口 + * + * @author yinjinlu + * @date 2024-12-13 + */ +public interface WmMaterialrequestNoticeLineMapper +{ + /** + * 查询备料通知单明细 + * + * @param lineId 备料通知单明细主键 + * @return 备料通知单明细 + */ + public WmMaterialrequestNoticeLine selectWmMaterialrequestNoticeLineByLineId(Long lineId); + + /** + * 查询备料通知单明细列表 + * + * @param wmMaterialrequestNoticeLine 备料通知单明细 + * @return 备料通知单明细集合 + */ + public List selectWmMaterialrequestNoticeLineList(WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine); + + /** + * 新增备料通知单明细 + * + * @param wmMaterialrequestNoticeLine 备料通知单明细 + * @return 结果 + */ + public int insertWmMaterialrequestNoticeLine(WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine); + + /** + * 修改备料通知单明细 + * + * @param wmMaterialrequestNoticeLine 备料通知单明细 + * @return 结果 + */ + public int updateWmMaterialrequestNoticeLine(WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine); + + /** + * 删除备料通知单明细 + * + * @param lineId 备料通知单明细主键 + * @return 结果 + */ + public int deleteWmMaterialrequestNoticeLineByLineId(Long lineId); + + /** + * 批量删除备料通知单明细 + * + * @param lineIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteWmMaterialrequestNoticeLineByLineIds(Long[] lineIds); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmMaterialrequestNoticeMapper.java b/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmMaterialrequestNoticeMapper.java new file mode 100644 index 0000000..3895b3f --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmMaterialrequestNoticeMapper.java @@ -0,0 +1,61 @@ +package com.ktg.mes.wm.mapper; + +import java.util.List; +import com.ktg.mes.wm.domain.WmMaterialrequestNotice; + +/** + * 备料通知单Mapper接口 + * + * @author yinjinlu + * @date 2024-12-13 + */ +public interface WmMaterialrequestNoticeMapper +{ + /** + * 查询备料通知单 + * + * @param noticeId 备料通知单主键 + * @return 备料通知单 + */ + public WmMaterialrequestNotice selectWmMaterialrequestNoticeByNoticeId(Long noticeId); + + /** + * 查询备料通知单列表 + * + * @param wmMaterialrequestNotice 备料通知单 + * @return 备料通知单集合 + */ + public List selectWmMaterialrequestNoticeList(WmMaterialrequestNotice wmMaterialrequestNotice); + + /** + * 新增备料通知单 + * + * @param wmMaterialrequestNotice 备料通知单 + * @return 结果 + */ + public int insertWmMaterialrequestNotice(WmMaterialrequestNotice wmMaterialrequestNotice); + + /** + * 修改备料通知单 + * + * @param wmMaterialrequestNotice 备料通知单 + * @return 结果 + */ + public int updateWmMaterialrequestNotice(WmMaterialrequestNotice wmMaterialrequestNotice); + + /** + * 删除备料通知单 + * + * @param noticeId 备料通知单主键 + * @return 结果 + */ + public int deleteWmMaterialrequestNoticeByNoticeId(Long noticeId); + + /** + * 批量删除备料通知单 + * + * @param noticeIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteWmMaterialrequestNoticeByNoticeIds(Long[] noticeIds); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/IWmMaterialrequestNoticeLineService.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/IWmMaterialrequestNoticeLineService.java new file mode 100644 index 0000000..0ed0d00 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/IWmMaterialrequestNoticeLineService.java @@ -0,0 +1,61 @@ +package com.ktg.mes.wm.service; + +import java.util.List; +import com.ktg.mes.wm.domain.WmMaterialrequestNoticeLine; + +/** + * 备料通知单明细Service接口 + * + * @author yinjinlu + * @date 2024-12-13 + */ +public interface IWmMaterialrequestNoticeLineService +{ + /** + * 查询备料通知单明细 + * + * @param lineId 备料通知单明细主键 + * @return 备料通知单明细 + */ + public WmMaterialrequestNoticeLine selectWmMaterialrequestNoticeLineByLineId(Long lineId); + + /** + * 查询备料通知单明细列表 + * + * @param wmMaterialrequestNoticeLine 备料通知单明细 + * @return 备料通知单明细集合 + */ + public List selectWmMaterialrequestNoticeLineList(WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine); + + /** + * 新增备料通知单明细 + * + * @param wmMaterialrequestNoticeLine 备料通知单明细 + * @return 结果 + */ + public int insertWmMaterialrequestNoticeLine(WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine); + + /** + * 修改备料通知单明细 + * + * @param wmMaterialrequestNoticeLine 备料通知单明细 + * @return 结果 + */ + public int updateWmMaterialrequestNoticeLine(WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine); + + /** + * 批量删除备料通知单明细 + * + * @param lineIds 需要删除的备料通知单明细主键集合 + * @return 结果 + */ + public int deleteWmMaterialrequestNoticeLineByLineIds(Long[] lineIds); + + /** + * 删除备料通知单明细信息 + * + * @param lineId 备料通知单明细主键 + * @return 结果 + */ + public int deleteWmMaterialrequestNoticeLineByLineId(Long lineId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/IWmMaterialrequestNoticeService.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/IWmMaterialrequestNoticeService.java new file mode 100644 index 0000000..31d5baf --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/IWmMaterialrequestNoticeService.java @@ -0,0 +1,61 @@ +package com.ktg.mes.wm.service; + +import java.util.List; +import com.ktg.mes.wm.domain.WmMaterialrequestNotice; + +/** + * 备料通知单Service接口 + * + * @author yinjinlu + * @date 2024-12-13 + */ +public interface IWmMaterialrequestNoticeService +{ + /** + * 查询备料通知单 + * + * @param noticeId 备料通知单主键 + * @return 备料通知单 + */ + public WmMaterialrequestNotice selectWmMaterialrequestNoticeByNoticeId(Long noticeId); + + /** + * 查询备料通知单列表 + * + * @param wmMaterialrequestNotice 备料通知单 + * @return 备料通知单集合 + */ + public List selectWmMaterialrequestNoticeList(WmMaterialrequestNotice wmMaterialrequestNotice); + + /** + * 新增备料通知单 + * + * @param wmMaterialrequestNotice 备料通知单 + * @return 结果 + */ + public int insertWmMaterialrequestNotice(WmMaterialrequestNotice wmMaterialrequestNotice); + + /** + * 修改备料通知单 + * + * @param wmMaterialrequestNotice 备料通知单 + * @return 结果 + */ + public int updateWmMaterialrequestNotice(WmMaterialrequestNotice wmMaterialrequestNotice); + + /** + * 批量删除备料通知单 + * + * @param noticeIds 需要删除的备料通知单主键集合 + * @return 结果 + */ + public int deleteWmMaterialrequestNoticeByNoticeIds(Long[] noticeIds); + + /** + * 删除备料通知单信息 + * + * @param noticeId 备料通知单主键 + * @return 结果 + */ + public int deleteWmMaterialrequestNoticeByNoticeId(Long noticeId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmMaterialrequestNoticeLineServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmMaterialrequestNoticeLineServiceImpl.java new file mode 100644 index 0000000..0307b50 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmMaterialrequestNoticeLineServiceImpl.java @@ -0,0 +1,96 @@ +package com.ktg.mes.wm.service.impl; + +import java.util.List; +import com.ktg.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ktg.mes.wm.mapper.WmMaterialrequestNoticeLineMapper; +import com.ktg.mes.wm.domain.WmMaterialrequestNoticeLine; +import com.ktg.mes.wm.service.IWmMaterialrequestNoticeLineService; + +/** + * 备料通知单明细Service业务层处理 + * + * @author yinjinlu + * @date 2024-12-13 + */ +@Service +public class WmMaterialrequestNoticeLineServiceImpl implements IWmMaterialrequestNoticeLineService +{ + @Autowired + private WmMaterialrequestNoticeLineMapper wmMaterialrequestNoticeLineMapper; + + /** + * 查询备料通知单明细 + * + * @param lineId 备料通知单明细主键 + * @return 备料通知单明细 + */ + @Override + public WmMaterialrequestNoticeLine selectWmMaterialrequestNoticeLineByLineId(Long lineId) + { + return wmMaterialrequestNoticeLineMapper.selectWmMaterialrequestNoticeLineByLineId(lineId); + } + + /** + * 查询备料通知单明细列表 + * + * @param wmMaterialrequestNoticeLine 备料通知单明细 + * @return 备料通知单明细 + */ + @Override + public List selectWmMaterialrequestNoticeLineList(WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine) + { + return wmMaterialrequestNoticeLineMapper.selectWmMaterialrequestNoticeLineList(wmMaterialrequestNoticeLine); + } + + /** + * 新增备料通知单明细 + * + * @param wmMaterialrequestNoticeLine 备料通知单明细 + * @return 结果 + */ + @Override + public int insertWmMaterialrequestNoticeLine(WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine) + { + wmMaterialrequestNoticeLine.setCreateTime(DateUtils.getNowDate()); + return wmMaterialrequestNoticeLineMapper.insertWmMaterialrequestNoticeLine(wmMaterialrequestNoticeLine); + } + + /** + * 修改备料通知单明细 + * + * @param wmMaterialrequestNoticeLine 备料通知单明细 + * @return 结果 + */ + @Override + public int updateWmMaterialrequestNoticeLine(WmMaterialrequestNoticeLine wmMaterialrequestNoticeLine) + { + wmMaterialrequestNoticeLine.setUpdateTime(DateUtils.getNowDate()); + return wmMaterialrequestNoticeLineMapper.updateWmMaterialrequestNoticeLine(wmMaterialrequestNoticeLine); + } + + /** + * 批量删除备料通知单明细 + * + * @param lineIds 需要删除的备料通知单明细主键 + * @return 结果 + */ + @Override + public int deleteWmMaterialrequestNoticeLineByLineIds(Long[] lineIds) + { + return wmMaterialrequestNoticeLineMapper.deleteWmMaterialrequestNoticeLineByLineIds(lineIds); + } + + /** + * 删除备料通知单明细信息 + * + * @param lineId 备料通知单明细主键 + * @return 结果 + */ + @Override + public int deleteWmMaterialrequestNoticeLineByLineId(Long lineId) + { + return wmMaterialrequestNoticeLineMapper.deleteWmMaterialrequestNoticeLineByLineId(lineId); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmMaterialrequestNoticeServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmMaterialrequestNoticeServiceImpl.java new file mode 100644 index 0000000..1c681da --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmMaterialrequestNoticeServiceImpl.java @@ -0,0 +1,96 @@ +package com.ktg.mes.wm.service.impl; + +import java.util.List; +import com.ktg.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ktg.mes.wm.mapper.WmMaterialrequestNoticeMapper; +import com.ktg.mes.wm.domain.WmMaterialrequestNotice; +import com.ktg.mes.wm.service.IWmMaterialrequestNoticeService; + +/** + * 备料通知单Service业务层处理 + * + * @author yinjinlu + * @date 2024-12-13 + */ +@Service +public class WmMaterialrequestNoticeServiceImpl implements IWmMaterialrequestNoticeService +{ + @Autowired + private WmMaterialrequestNoticeMapper wmMaterialrequestNoticeMapper; + + /** + * 查询备料通知单 + * + * @param noticeId 备料通知单主键 + * @return 备料通知单 + */ + @Override + public WmMaterialrequestNotice selectWmMaterialrequestNoticeByNoticeId(Long noticeId) + { + return wmMaterialrequestNoticeMapper.selectWmMaterialrequestNoticeByNoticeId(noticeId); + } + + /** + * 查询备料通知单列表 + * + * @param wmMaterialrequestNotice 备料通知单 + * @return 备料通知单 + */ + @Override + public List selectWmMaterialrequestNoticeList(WmMaterialrequestNotice wmMaterialrequestNotice) + { + return wmMaterialrequestNoticeMapper.selectWmMaterialrequestNoticeList(wmMaterialrequestNotice); + } + + /** + * 新增备料通知单 + * + * @param wmMaterialrequestNotice 备料通知单 + * @return 结果 + */ + @Override + public int insertWmMaterialrequestNotice(WmMaterialrequestNotice wmMaterialrequestNotice) + { + wmMaterialrequestNotice.setCreateTime(DateUtils.getNowDate()); + return wmMaterialrequestNoticeMapper.insertWmMaterialrequestNotice(wmMaterialrequestNotice); + } + + /** + * 修改备料通知单 + * + * @param wmMaterialrequestNotice 备料通知单 + * @return 结果 + */ + @Override + public int updateWmMaterialrequestNotice(WmMaterialrequestNotice wmMaterialrequestNotice) + { + wmMaterialrequestNotice.setUpdateTime(DateUtils.getNowDate()); + return wmMaterialrequestNoticeMapper.updateWmMaterialrequestNotice(wmMaterialrequestNotice); + } + + /** + * 批量删除备料通知单 + * + * @param noticeIds 需要删除的备料通知单主键 + * @return 结果 + */ + @Override + public int deleteWmMaterialrequestNoticeByNoticeIds(Long[] noticeIds) + { + return wmMaterialrequestNoticeMapper.deleteWmMaterialrequestNoticeByNoticeIds(noticeIds); + } + + /** + * 删除备料通知单信息 + * + * @param noticeId 备料通知单主键 + * @return 结果 + */ + @Override + public int deleteWmMaterialrequestNoticeByNoticeId(Long noticeId) + { + return wmMaterialrequestNoticeMapper.deleteWmMaterialrequestNoticeByNoticeId(noticeId); + } +} diff --git a/ktg-mes/src/main/resources/mapper/wm/WmMaterialrequestNoticeLineMapper.xml b/ktg-mes/src/main/resources/mapper/wm/WmMaterialrequestNoticeLineMapper.xml new file mode 100644 index 0000000..66a7133 --- /dev/null +++ b/ktg-mes/src/main/resources/mapper/wm/WmMaterialrequestNoticeLineMapper.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select line_id, notice_id, item_id, item_code, item_name, specification, unit_of_measure, unit_name, quantity, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_materialrequest_notice_line + + + + + + + + insert into wm_materialrequest_notice_line + + notice_id, + item_id, + item_code, + item_name, + specification, + unit_of_measure, + unit_name, + quantity, + remark, + attr1, + attr2, + attr3, + attr4, + create_by, + create_time, + update_by, + update_time, + + + #{noticeId}, + #{itemId}, + #{itemCode}, + #{itemName}, + #{specification}, + #{unitOfMeasure}, + #{unitName}, + #{quantity}, + #{remark}, + #{attr1}, + #{attr2}, + #{attr3}, + #{attr4}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update wm_materialrequest_notice_line + + notice_id = #{noticeId}, + item_id = #{itemId}, + item_code = #{itemCode}, + item_name = #{itemName}, + specification = #{specification}, + unit_of_measure = #{unitOfMeasure}, + unit_name = #{unitName}, + quantity = #{quantity}, + remark = #{remark}, + attr1 = #{attr1}, + attr2 = #{attr2}, + attr3 = #{attr3}, + attr4 = #{attr4}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where line_id = #{lineId} + + + + delete from wm_materialrequest_notice_line where line_id = #{lineId} + + + + delete from wm_materialrequest_notice_line where line_id in + + #{lineId} + + + \ No newline at end of file diff --git a/ktg-mes/src/main/resources/mapper/wm/WmMaterialrequestNoticeMapper.xml b/ktg-mes/src/main/resources/mapper/wm/WmMaterialrequestNoticeMapper.xml new file mode 100644 index 0000000..7dedf75 --- /dev/null +++ b/ktg-mes/src/main/resources/mapper/wm/WmMaterialrequestNoticeMapper.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select notice_id, workstation_id, workstaiton_code, workorder_id, workorder_code, user_id, user_name, nick_name, request_time, start_time, end_time, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_materialrequest_notice + + + + + + + + insert into wm_materialrequest_notice + + workstation_id, + workstaiton_code, + workorder_id, + workorder_code, + user_id, + user_name, + nick_name, + request_time, + start_time, + end_time, + status, + remark, + attr1, + attr2, + attr3, + attr4, + create_by, + create_time, + update_by, + update_time, + + + #{workstationId}, + #{workstaitonCode}, + #{workorderId}, + #{workorderCode}, + #{userId}, + #{userName}, + #{nickName}, + #{requestTime}, + #{startTime}, + #{endTime}, + #{status}, + #{remark}, + #{attr1}, + #{attr2}, + #{attr3}, + #{attr4}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update wm_materialrequest_notice + + workstation_id = #{workstationId}, + workstaiton_code = #{workstaitonCode}, + workorder_id = #{workorderId}, + workorder_code = #{workorderCode}, + user_id = #{userId}, + user_name = #{userName}, + nick_name = #{nickName}, + request_time = #{requestTime}, + start_time = #{startTime}, + end_time = #{endTime}, + status = #{status}, + remark = #{remark}, + attr1 = #{attr1}, + attr2 = #{attr2}, + attr3 = #{attr3}, + attr4 = #{attr4}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where notice_id = #{noticeId} + + + + delete from wm_materialrequest_notice where notice_id = #{noticeId} + + + + delete from wm_materialrequest_notice where notice_id in + + #{noticeId} + + + \ No newline at end of file