feat(module): 出库记录
出库记录 & 批量导入
This commit is contained in:
parent
a473018c48
commit
64c2de5d21
@ -19,6 +19,7 @@ import com.zhyc.module.stock.domain.WzStockOut;
|
||||
import com.zhyc.module.stock.service.IWzStockOutService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 出库记录Controller
|
||||
@ -103,4 +104,27 @@ public class WzStockOutController extends BaseController
|
||||
{
|
||||
return toAjax(wzStockOutService.deleteWzStockOutByStockOutCodes(stockOutCodes));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入出库记录
|
||||
*/
|
||||
@Log(title = "出库记录", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('stock:out:import')")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||
{
|
||||
ExcelUtil<WzStockOut> util = new ExcelUtil<>(WzStockOut.class);
|
||||
List<WzStockOut> WzStockOutList = util.importExcel(file.getInputStream());
|
||||
WzStockOutList.removeIf(wzStockOut -> wzStockOut.getDocId() == null);
|
||||
String operName = getUsername();
|
||||
String message;
|
||||
try {
|
||||
message = wzStockOutService.importUser(WzStockOutList, updateSupport, operName);
|
||||
}catch (Exception e) {
|
||||
message = e.getMessage();
|
||||
logger.error(e.getMessage());
|
||||
}
|
||||
// String message = "OK We are testing";
|
||||
return success(message);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.zhyc.module.stock.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@ -12,168 +13,239 @@ import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 出库记录对象 wz_stock_out
|
||||
*
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-05
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class WzStockOut extends BaseEntity
|
||||
{
|
||||
public class WzStockOut extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 序号 */
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
private Long stockOutCode;
|
||||
|
||||
/** 单据日期 */
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "单据日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date docDate;
|
||||
|
||||
/** 创建时间 */
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createDate;
|
||||
|
||||
/** 单据编号 */
|
||||
/**
|
||||
* 单据编号
|
||||
*/
|
||||
@Excel(name = "单据编号")
|
||||
private String docId;
|
||||
|
||||
/** 业务类型 */
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
@Excel(name = "业务类型")
|
||||
private String businessType;
|
||||
|
||||
/** 仓库编码 */
|
||||
/**
|
||||
* 仓库编码
|
||||
*/
|
||||
@Excel(name = "仓库编码")
|
||||
private String repositoryId;
|
||||
|
||||
/** 仓库名称 */
|
||||
@Excel(name = "仓库名称")
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
@Excel(name = "仓库")
|
||||
private String repositoryName;
|
||||
|
||||
/** 项目分类 */
|
||||
/**
|
||||
* 项目分类
|
||||
*/
|
||||
@Excel(name = "项目分类")
|
||||
private String projectClassification;
|
||||
|
||||
/** 项目编码 */
|
||||
/**
|
||||
* 项目编码
|
||||
*/
|
||||
@Excel(name = "项目编码")
|
||||
private String projectId;
|
||||
|
||||
/** 项目 */
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
@Excel(name = "项目")
|
||||
private String projectName;
|
||||
|
||||
/** 生产车间编码 */
|
||||
/**
|
||||
* 生产车间编码
|
||||
*/
|
||||
@Excel(name = "生产车间编码")
|
||||
private String departmentId;
|
||||
|
||||
/** 生产车间 */
|
||||
/**
|
||||
* 生产车间
|
||||
*/
|
||||
@Excel(name = "生产车间")
|
||||
private String departmentName;
|
||||
|
||||
/** 领用人 */
|
||||
/**
|
||||
* 领用人编码
|
||||
*/
|
||||
@Excel(name = "领用人编码")
|
||||
private String receiverId;
|
||||
|
||||
/**
|
||||
* 领用人
|
||||
*/
|
||||
@Excel(name = "领用人")
|
||||
private String receiver;
|
||||
|
||||
/** 制单人 */
|
||||
/**
|
||||
* 制单人
|
||||
*/
|
||||
@Excel(name = "制单人")
|
||||
private String single;
|
||||
|
||||
/** 审核人 */
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
@Excel(name = "审核人")
|
||||
private String reviewer;
|
||||
|
||||
/** 审核时间 */
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date reviewDate;
|
||||
|
||||
/** 修改人 */
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@Excel(name = "修改人")
|
||||
private String modifier;
|
||||
|
||||
/** 材料分类编码 */
|
||||
/**
|
||||
* 材料分类编码
|
||||
*/
|
||||
@Excel(name = "材料分类编码")
|
||||
private String materialClassId;
|
||||
|
||||
/** 材料分类 */
|
||||
/**
|
||||
* 材料分类
|
||||
*/
|
||||
@Excel(name = "材料分类")
|
||||
private String materialClassName;
|
||||
|
||||
/** 材料名称 */
|
||||
/**
|
||||
* 材料编码
|
||||
*/
|
||||
@Excel(name = "材料编码")
|
||||
private String materialId;
|
||||
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
@Excel(name = "材料名称")
|
||||
private String materialName;
|
||||
|
||||
/** 材料规格 */
|
||||
/**
|
||||
* 材料规格
|
||||
*/
|
||||
@Excel(name = "材料规格")
|
||||
private String materialSpecification;
|
||||
|
||||
/** 计量单位 */
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
@Excel(name = "计量单位")
|
||||
private String materialUnit;
|
||||
|
||||
/** 数量 */
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@Excel(name = "数量")
|
||||
private BigDecimal count;
|
||||
|
||||
/** 批号 */
|
||||
/**
|
||||
* 批号
|
||||
*/
|
||||
@Excel(name = "批号")
|
||||
private Long batchId;
|
||||
|
||||
/** 生产日期 */
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date productionDate;
|
||||
|
||||
/** 保质期 */
|
||||
/**
|
||||
* 保质期
|
||||
*/
|
||||
@Excel(name = "保质期")
|
||||
private Long shelfLife;
|
||||
|
||||
/** 保质期单位 */
|
||||
/**
|
||||
* 保质期单位
|
||||
*/
|
||||
@Excel(name = "保质期单位")
|
||||
private String shelfLifeUnit;
|
||||
|
||||
/** 失效日期 */
|
||||
/**
|
||||
* 失效日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "失效日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expirationDate;
|
||||
|
||||
/** 代理人 */
|
||||
/**
|
||||
* 代理人
|
||||
*/
|
||||
@Excel(name = "代理人")
|
||||
private String agent;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockOutCode", getStockOutCode())
|
||||
.append("docDate", getDocDate())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("docId", getDocId())
|
||||
.append("businessType", getBusinessType())
|
||||
.append("repositoryId", getRepositoryId())
|
||||
.append("repositoryName", getRepositoryName())
|
||||
.append("projectClassification", getProjectClassification())
|
||||
.append("projectId", getProjectId())
|
||||
.append("projectName", getProjectName())
|
||||
.append("departmentId", getDepartmentId())
|
||||
.append("departmentName", getDepartmentName())
|
||||
.append("receiver", getReceiver())
|
||||
.append("single", getSingle())
|
||||
.append("reviewer", getReviewer())
|
||||
.append("reviewDate", getReviewDate())
|
||||
.append("modifier", getModifier())
|
||||
.append("materialClassId", getMaterialClassId())
|
||||
.append("materialClassName", getMaterialClassName())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("materialSpecification", getMaterialSpecification())
|
||||
.append("materialUnit", getMaterialUnit())
|
||||
.append("count", getCount())
|
||||
.append("batchId", getBatchId())
|
||||
.append("productionDate", getProductionDate())
|
||||
.append("shelfLife", getShelfLife())
|
||||
.append("shelfLifeUnit", getShelfLifeUnit())
|
||||
.append("expirationDate", getExpirationDate())
|
||||
.append("agent", getAgent())
|
||||
.toString();
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockOutCode", getStockOutCode())
|
||||
.append("docDate", getDocDate())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("docId", getDocId())
|
||||
.append("businessType", getBusinessType())
|
||||
.append("repositoryId", getRepositoryId())
|
||||
.append("repositoryName", getRepositoryName())
|
||||
.append("projectClassification", getProjectClassification())
|
||||
.append("projectId", getProjectId())
|
||||
.append("projectName", getProjectName())
|
||||
.append("departmentId", getDepartmentId())
|
||||
.append("departmentName", getDepartmentName())
|
||||
.append("receiverId", getReceiverId())
|
||||
.append("receiver", getReceiver())
|
||||
.append("single", getSingle())
|
||||
.append("reviewer", getReviewer())
|
||||
.append("reviewDate", getReviewDate())
|
||||
.append("modifier", getModifier())
|
||||
.append("materialClassId", getMaterialClassId())
|
||||
.append("materialClassName", getMaterialClassName())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("materialSpecification", getMaterialSpecification())
|
||||
.append("materialUnit", getMaterialUnit())
|
||||
.append("count", getCount())
|
||||
.append("batchId", getBatchId())
|
||||
.append("productionDate", getProductionDate())
|
||||
.append("shelfLife", getShelfLife())
|
||||
.append("shelfLifeUnit", getShelfLifeUnit())
|
||||
.append("expirationDate", getExpirationDate())
|
||||
.append("agent", getAgent())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -60,4 +60,11 @@ public interface WzStockOutMapper
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWzStockOutByStockOutCodes(Long[] stockOutCodes);
|
||||
|
||||
/**
|
||||
* 查询最近的记录
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
WzStockOut getEarliestStockOut();
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.zhyc.module.stock.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.stock.domain.WzStockOut;
|
||||
|
||||
/**
|
||||
@ -58,4 +59,14 @@ public interface IWzStockOutService
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWzStockOutByStockOutCode(Long stockOutCode);
|
||||
|
||||
/**
|
||||
* 导入入库数据
|
||||
*
|
||||
* @param WzStockOutList 入库数据列表
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
* @param operName 操作用户
|
||||
* @return 结果
|
||||
*/
|
||||
String importUser(List<WzStockOut> WzStockOutList, Boolean isUpdateSupport, String operName) throws Exception;
|
||||
}
|
||||
|
@ -1,21 +1,24 @@
|
||||
package com.zhyc.module.stock.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.common.exception.ServiceException;
|
||||
import com.zhyc.common.utils.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.stock.mapper.WzStockOutMapper;
|
||||
import com.zhyc.module.stock.domain.WzStockOut;
|
||||
import com.zhyc.module.stock.service.IWzStockOutService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 出库记录Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-05
|
||||
*/
|
||||
@Service
|
||||
public class WzStockOutServiceImpl implements IWzStockOutService
|
||||
{
|
||||
public class WzStockOutServiceImpl implements IWzStockOutService {
|
||||
private final WzStockOutMapper wzStockOutMapper;
|
||||
|
||||
public WzStockOutServiceImpl(WzStockOutMapper wzStockOutMapper) {
|
||||
@ -24,73 +27,110 @@ public class WzStockOutServiceImpl implements IWzStockOutService
|
||||
|
||||
/**
|
||||
* 查询出库记录
|
||||
*
|
||||
*
|
||||
* @param stockOutCode 出库记录主键
|
||||
* @return 出库记录
|
||||
*/
|
||||
@Override
|
||||
public WzStockOut selectWzStockOutByStockOutCode(Long stockOutCode)
|
||||
{
|
||||
public WzStockOut selectWzStockOutByStockOutCode(Long stockOutCode) {
|
||||
return wzStockOutMapper.selectWzStockOutByStockOutCode(stockOutCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库记录列表
|
||||
*
|
||||
*
|
||||
* @param wzStockOut 出库记录
|
||||
* @return 出库记录
|
||||
*/
|
||||
@Override
|
||||
public List<WzStockOut> selectWzStockOutList(WzStockOut wzStockOut)
|
||||
{
|
||||
public List<WzStockOut> selectWzStockOutList(WzStockOut wzStockOut) {
|
||||
return wzStockOutMapper.selectWzStockOutList(wzStockOut);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库记录
|
||||
*
|
||||
*
|
||||
* @param wzStockOut 出库记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWzStockOut(WzStockOut wzStockOut)
|
||||
{
|
||||
public int insertWzStockOut(WzStockOut wzStockOut) {
|
||||
return wzStockOutMapper.insertWzStockOut(wzStockOut);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库记录
|
||||
*
|
||||
*
|
||||
* @param wzStockOut 出库记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWzStockOut(WzStockOut wzStockOut)
|
||||
{
|
||||
public int updateWzStockOut(WzStockOut wzStockOut) {
|
||||
return wzStockOutMapper.updateWzStockOut(wzStockOut);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出库记录
|
||||
*
|
||||
*
|
||||
* @param stockOutCodes 需要删除的出库记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWzStockOutByStockOutCodes(Long[] stockOutCodes)
|
||||
{
|
||||
public int deleteWzStockOutByStockOutCodes(Long[] stockOutCodes) {
|
||||
return wzStockOutMapper.deleteWzStockOutByStockOutCodes(stockOutCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库记录信息
|
||||
*
|
||||
*
|
||||
* @param stockOutCode 出库记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWzStockOutByStockOutCode(Long stockOutCode)
|
||||
{
|
||||
public int deleteWzStockOutByStockOutCode(Long stockOutCode) {
|
||||
return wzStockOutMapper.deleteWzStockOutByStockOutCode(stockOutCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入用户数据
|
||||
*
|
||||
* @param WzStockOutList 入库数据列表
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
* @param operName 操作用户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String importUser(List<WzStockOut> WzStockOutList, Boolean isUpdateSupport, String operName) throws Exception {
|
||||
if (StringUtils.isNull(WzStockOutList) || WzStockOutList.isEmpty()) {
|
||||
throw new ServiceException("导入入库数据不能为空!");
|
||||
}
|
||||
int successNum = 0;
|
||||
int sameNum = 0;
|
||||
StringBuilder successMsg = new StringBuilder();
|
||||
WzStockOut earliestStockOut = wzStockOutMapper.getEarliestStockOut();
|
||||
// 确保最近记录有值
|
||||
if (null == earliestStockOut || earliestStockOut.getCreateDate() == null) {
|
||||
if (earliestStockOut != null) {
|
||||
earliestStockOut.setCreateDate(new Date(0));
|
||||
} else {
|
||||
earliestStockOut = new WzStockOut();
|
||||
earliestStockOut.setCreateDate(new Date(0));
|
||||
}
|
||||
}
|
||||
for (WzStockOut wzStockOut : WzStockOutList) {
|
||||
if (null != wzStockOut && null != wzStockOut.getCreateDate()) {
|
||||
if (earliestStockOut.getCreateDate().getTime() >= wzStockOut.getCreateDate().getTime()) {
|
||||
sameNum++;
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
int result = wzStockOutMapper.insertWzStockOut(wzStockOut);
|
||||
if (result > 0) successNum++;
|
||||
}
|
||||
successMsg.append("导入完成 : 导入 ").append(successNum).append(" 条\n跳过 ").append(sameNum).append(" 条(重复记录)");
|
||||
return successMsg.toString();
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="departmentId" column="department_id" />
|
||||
<result property="departmentName" column="department_name" />
|
||||
<result property="receiverId" column="receiver_id" />
|
||||
<result property="receiver" column="receiver" />
|
||||
<result property="single" column="single" />
|
||||
<result property="reviewer" column="reviewer" />
|
||||
@ -24,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="modifier" column="modifier" />
|
||||
<result property="materialClassId" column="material_class_id" />
|
||||
<result property="materialClassName" column="material_class_name" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="materialSpecification" column="material_specification" />
|
||||
<result property="materialUnit" column="material_unit" />
|
||||
@ -37,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWzStockOutVo">
|
||||
select stock_out_code, doc_date, create_date, doc_id, business_type, repository_id, repository_name, project_classification, project_id, project_name, department_id, department_name, receiver, single, reviewer, review_date, modifier, material_class_id, material_class_name, material_name, material_specification, material_unit, count, batch_id, production_date, shelf_life, shelf_life_unit, expiration_date, agent from wz_stock_out
|
||||
select stock_out_code, doc_date, create_date, doc_id, business_type, repository_id, repository_name, project_classification, project_id, project_name, department_id, department_name,receiver_id, receiver, single, reviewer, review_date, modifier, material_class_id, material_class_name, material_id,material_name, material_specification, material_unit, count, batch_id, production_date, shelf_life, shelf_life_unit, expiration_date, agent from wz_stock_out
|
||||
</sql>
|
||||
|
||||
<select id="selectWzStockOutList" parameterType="WzStockOut" resultMap="WzStockOutResult">
|
||||
@ -70,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="projectName != null">project_name,</if>
|
||||
<if test="departmentId != null">department_id,</if>
|
||||
<if test="departmentName != null">department_name,</if>
|
||||
<if test="receiverId != null">receiver_id,</if>
|
||||
<if test="receiver != null">receiver,</if>
|
||||
<if test="single != null">single,</if>
|
||||
<if test="reviewer != null">reviewer,</if>
|
||||
@ -77,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="modifier != null">modifier,</if>
|
||||
<if test="materialClassId != null">material_class_id,</if>
|
||||
<if test="materialClassName != null">material_class_name,</if>
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="materialSpecification != null">material_specification,</if>
|
||||
<if test="materialUnit != null">material_unit,</if>
|
||||
@ -100,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="projectName != null">#{projectName},</if>
|
||||
<if test="departmentId != null">#{departmentId},</if>
|
||||
<if test="departmentName != null">#{departmentName},</if>
|
||||
<if test="receiverId != null">#{receiverId},</if>
|
||||
<if test="receiver != null">#{receiver},</if>
|
||||
<if test="single != null">#{single},</if>
|
||||
<if test="reviewer != null">#{reviewer},</if>
|
||||
@ -107,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="modifier != null">#{modifier},</if>
|
||||
<if test="materialClassId != null">#{materialClassId},</if>
|
||||
<if test="materialClassName != null">#{materialClassName},</if>
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="materialSpecification != null">#{materialSpecification},</if>
|
||||
<if test="materialUnit != null">#{materialUnit},</if>
|
||||
@ -134,6 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="projectName != null">project_name = #{projectName},</if>
|
||||
<if test="departmentId != null">department_id = #{departmentId},</if>
|
||||
<if test="departmentName != null">department_name = #{departmentName},</if>
|
||||
<if test="receiverId != null">receiver_id = #{receiverId},</if>
|
||||
<if test="receiver != null">receiver = #{receiver},</if>
|
||||
<if test="single != null">single = #{single},</if>
|
||||
<if test="reviewer != null">reviewer = #{reviewer},</if>
|
||||
@ -141,6 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="modifier != null">modifier = #{modifier},</if>
|
||||
<if test="materialClassId != null">material_class_id = #{materialClassId},</if>
|
||||
<if test="materialClassName != null">material_class_name = #{materialClassName},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="materialSpecification != null">material_specification = #{materialSpecification},</if>
|
||||
<if test="materialUnit != null">material_unit = #{materialUnit},</if>
|
||||
@ -165,4 +173,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{stockOutCode}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getEarliestStockOut" resultMap="WzStockOutResult">
|
||||
SELECT * FROM wz_stock_out ORDER BY create_date DESC LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user