From 2a717dbea11e2fa8cfd0d7bb76da6385859ac11d Mon Sep 17 00:00:00 2001 From: dingjie Date: Sun, 24 Dec 2023 00:13:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=A5=E5=BA=93=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E8=AF=A6=E7=BB=86=E8=AE=B0=E5=BD=95=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/domain/InputApplyDetails.java | 141 ++++++++++++++++++ .../mapper/PurchaseMacodeInfoMapper.java | 4 + .../impl/PurchaseMacodeInfoServiceImpl.java | 20 ++- .../material/PurchaseMacodeInfoMapper.xml | 31 ++++ .../bonus/sgzb/system/domain/TreeNode.java | 4 + .../resources/mapper/system/SelectMapper.xml | 4 +- 6 files changed, 199 insertions(+), 5 deletions(-) create mode 100644 sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputApplyDetails.java diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputApplyDetails.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputApplyDetails.java new file mode 100644 index 00000000..97d431f2 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputApplyDetails.java @@ -0,0 +1,141 @@ +package com.bonus.sgzb.material.domain; + +import java.math.BigDecimal; +import com.bonus.sgzb.common.core.annotation.Excel; +import com.bonus.sgzb.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 入库任务详细input_apply_details对象 input_apply_details + * + * @author bonus + * @date 2023-12-24 + */ +public class InputApplyDetails extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 任务ID */ + @Excel(name = "任务ID") + private Long taskId; + + /** 机具ID */ + @Excel(name = "机具ID") + private Long maId; + + /** 规格ID */ + @Excel(name = "规格ID") + private Long typeId; + + /** 上级任务ID */ + @Excel(name = "上级任务ID") + private Long parentId; + + /** 入库数量 */ + @Excel(name = "入库数量") + private BigDecimal inputNum; + + /** 入库类型(1新购,2退料,3修试后,4盘点) */ + @Excel(name = "入库类型", readConverterExp = "1=新购,2退料,3修试后,4盘点") + private String inputType; + + /** 数据所属组织 */ + @Excel(name = "数据所属组织") + private Long companyId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setTaskId(Long taskId) + { + this.taskId = taskId; + } + + public Long getTaskId() + { + return taskId; + } + public void setMaId(Long maId) + { + this.maId = maId; + } + + public Long getMaId() + { + return maId; + } + public void setTypeId(Long typeId) + { + this.typeId = typeId; + } + + public Long getTypeId() + { + return typeId; + } + public void setParentId(Long parentId) + { + this.parentId = parentId; + } + + public Long getParentId() + { + return parentId; + } + public void setInputNum(BigDecimal inputNum) + { + this.inputNum = inputNum; + } + + public BigDecimal getInputNum() + { + return inputNum; + } + public void setInputType(String inputType) + { + this.inputType = inputType; + } + + public String getInputType() + { + return inputType; + } + public void setCompanyId(Long companyId) + { + this.companyId = companyId; + } + + public Long getCompanyId() + { + return companyId; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("taskId", getTaskId()) + .append("maId", getMaId()) + .append("typeId", getTypeId()) + .append("parentId", getParentId()) + .append("inputNum", getInputNum()) + .append("inputType", getInputType()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("companyId", getCompanyId()) + .toString(); + } +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseMacodeInfoMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseMacodeInfoMapper.java index f59dd9ef..d4b44869 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseMacodeInfoMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseMacodeInfoMapper.java @@ -5,6 +5,7 @@ import com.bonus.sgzb.base.api.domain.MaLabelBind; import com.bonus.sgzb.base.api.domain.MaMachine; import com.bonus.sgzb.base.api.domain.MaMachineLabel; import com.bonus.sgzb.base.api.domain.MaType; +import com.bonus.sgzb.material.domain.InputApplyDetails; import com.bonus.sgzb.material.domain.MaInputRecord; import com.bonus.sgzb.material.domain.PurchaseMacodeInfo; import org.apache.ibatis.annotations.Mapper; @@ -110,4 +111,7 @@ public interface PurchaseMacodeInfoMapper { int insertMaMachineLabel(MaMachineLabel maMachineLabel); int insertMaLabelBind(MaLabelBind maLabelBind); + + int insertInputApplyDetails(InputApplyDetails applyDetails); + } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java index 77dcba89..44b24c83 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java @@ -11,10 +11,7 @@ import com.bonus.sgzb.base.api.domain.*; import com.bonus.sgzb.common.core.utils.StringUtils; import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.security.utils.SecurityUtils; -import com.bonus.sgzb.material.domain.BmQrcodeInfo; -import com.bonus.sgzb.material.domain.MaInputRecord; -import com.bonus.sgzb.material.domain.PurchaseCheckDetails; -import com.bonus.sgzb.material.domain.PurchaseMacodeInfo; +import com.bonus.sgzb.material.domain.*; import com.bonus.sgzb.material.mapper.*; import com.bonus.sgzb.material.service.IPurchaseMacodeInfoService; import com.bonus.sgzb.common.core.utils.DateUtils; @@ -300,6 +297,18 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService purchaseCheckDetails.setInputNum(inputNum.add(maInputRecord.getInputNum() == null ? new BigDecimal(0):maInputRecord.getInputNum())); purchaseCheckDetails.setStatus(4); checkDetailsMapper.updateByTaskIdTypeId(purchaseCheckDetails); + + // 新增入库任务详细表 + InputApplyDetails applyDetails = new InputApplyDetails(); + applyDetails.setTaskId(taskId); + applyDetails.setTypeId(typeId); + applyDetails.setInputNum(maInputRecord.getInputNum() == null ? new BigDecimal(0):maInputRecord.getInputNum()); + applyDetails.setMaId(maInputRecord.getMaId()); + applyDetails.setInputType("1"); + applyDetails.setCreateTime(new Date()); + applyDetails.setCreateBy(SecurityUtils.getUsername()); + applyDetails.setCompanyId(maInputRecord.getCompanyId()); + purchaseMacodeInfoMapper.insertInputApplyDetails(applyDetails); } // 修改编码管理表入库状态 @@ -311,6 +320,9 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService purchaseMacodeInfoMapper.updateMacodeByType(purchaseMacodeInfo); // 新增入库记录 purchaseMacodeInfoMapper.insertMaInputRecord(maInputRecord); + + + } diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseMacodeInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseMacodeInfoMapper.xml index 693a1143..4c6e96ee 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseMacodeInfoMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseMacodeInfoMapper.xml @@ -277,6 +277,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, + + insert into input_apply_details + + task_id, + ma_id, + type_id, + parent_id, + input_num, + input_type, + create_by, + create_time, + update_by, + update_time, + remark, + company_id, + + + #{taskId}, + #{maId}, + #{typeId}, + #{parentId}, + #{inputNum}, + #{inputType}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{companyId}, + +