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},
+
+