库存管理
This commit is contained in:
parent
ba3489dc8c
commit
e5af4fa564
|
|
@ -65,9 +65,6 @@ public class ImsIntoInventoryController extends BaseController
|
||||||
@PostMapping("/warehouse/materials")
|
@PostMapping("/warehouse/materials")
|
||||||
public TableDataInfo selectDetailListByWarehouseIdAndMaterialId(@RequestBody ImsIntoInventoryQuery imsIntoInventoryQuery)
|
public TableDataInfo selectDetailListByWarehouseIdAndMaterialId(@RequestBody ImsIntoInventoryQuery imsIntoInventoryQuery)
|
||||||
{
|
{
|
||||||
if(Objects.isNull(imsIntoInventoryQuery.getMaterialId()) || Objects.isNull(imsIntoInventoryQuery.getWarehouseId())) {
|
|
||||||
throw new ServiceException("参数错误");
|
|
||||||
}
|
|
||||||
startPage();
|
startPage();
|
||||||
List<ImsIntoInventoryDetail> list = imsIntoInventoryService.
|
List<ImsIntoInventoryDetail> list = imsIntoInventoryService.
|
||||||
selectDetailListByWarehouseIdAndMaterialId(imsIntoInventoryQuery);
|
selectDetailListByWarehouseIdAndMaterialId(imsIntoInventoryQuery);
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,24 @@ public class ImsIntoInventory extends BaseEntity
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime endDateTime;
|
private LocalDateTime endDateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "供应商id")
|
||||||
|
private Long supplierId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "材料名称")
|
||||||
|
@Excel(name = "材料名称")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "货品编码")
|
||||||
|
@Excel(name = "货品编码")
|
||||||
|
private String materialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "条码")
|
||||||
|
@Excel(name = "条码")
|
||||||
|
private String barCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "货品名称")
|
||||||
|
private List<Long> materialTypeIds;
|
||||||
|
|
||||||
/** 入库记录明细信息 */
|
/** 入库记录明细信息 */
|
||||||
private List<ImsIntoInventoryDetail> imsIntoInventoryDetailList;
|
private List<ImsIntoInventoryDetail> imsIntoInventoryDetailList;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,4 +131,8 @@ public class ImsOutInventoryDetail extends BaseEntity
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@Excel(name = "到期时间(保质期)", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "到期时间(保质期)", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private LocalDate expireTime;
|
private LocalDate expireTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "库存数量")
|
||||||
|
@Excel(name = "库存数量")
|
||||||
|
private BigDecimal materialNum;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ package com.bonus.canteen.core.ims.domain.param;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import com.bonus.common.core.annotation.Excel;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
@ -93,4 +95,22 @@ public class ImsIntoInventoryQuery implements Serializable
|
||||||
|
|
||||||
@ApiModelProperty(value = "原料id")
|
@ApiModelProperty(value = "原料id")
|
||||||
private Long materialId;
|
private Long materialId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "供应商id")
|
||||||
|
private Long supplierId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "材料名称")
|
||||||
|
@Excel(name = "材料名称")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "货品编码")
|
||||||
|
@Excel(name = "货品编码")
|
||||||
|
private String materialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "条码")
|
||||||
|
@Excel(name = "条码")
|
||||||
|
private String barCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "货品名称")
|
||||||
|
private List<Long> materialTypeIds;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import lombok.ToString;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.Min;
|
import javax.validation.constraints.Min;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库记录对象 ims_into_inventory
|
* 入库记录对象 ims_into_inventory
|
||||||
|
|
@ -94,6 +93,6 @@ public class ImsIntoInventoryUpdate implements Serializable
|
||||||
|
|
||||||
/** 入库记录明细信息 */
|
/** 入库记录明细信息 */
|
||||||
@Valid
|
@Valid
|
||||||
private List<ImsIntoInventoryDetailAdd> imsIntoInventoryDetailUpdateList;
|
private List<ImsIntoInventoryDetailAdd> imsIntoInventoryDetailAddList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,7 @@ import lombok.Data;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.Min;
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出库记录对象 ims_out_inventory
|
* 出库记录对象 ims_out_inventory
|
||||||
|
|
@ -90,6 +88,6 @@ public class ImsOutInventoryUpdate implements Serializable
|
||||||
|
|
||||||
/** 出库记录明细信息 */
|
/** 出库记录明细信息 */
|
||||||
@Valid
|
@Valid
|
||||||
private List<ImsOutInventoryDetailAdd> imsOutInventoryDetailUpdateList;
|
private List<ImsOutInventoryDetailAdd> imsOutInventoryDetailAddList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -129,4 +129,8 @@ public class ImsOutInventoryDetailVO extends BaseEntity
|
||||||
@Excel(name = "到期时间(保质期)", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "到期时间(保质期)", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private LocalDate expireTime;
|
private LocalDate expireTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "库存数量")
|
||||||
|
@Excel(name = "库存数量")
|
||||||
|
private BigDecimal materialNum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.bonus.canteen.core.ims.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.canteen.core.ims.domain.ImsOutInventory;
|
import com.bonus.canteen.core.ims.domain.ImsOutInventory;
|
||||||
import com.bonus.canteen.core.ims.domain.ImsOutInventoryDetail;
|
import com.bonus.canteen.core.ims.domain.ImsOutInventoryDetail;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出库记录Mapper接口
|
* 出库记录Mapper接口
|
||||||
|
|
@ -10,8 +11,7 @@ import com.bonus.canteen.core.ims.domain.ImsOutInventoryDetail;
|
||||||
* @author gaowdong
|
* @author gaowdong
|
||||||
* @date 2025-07-07
|
* @date 2025-07-07
|
||||||
*/
|
*/
|
||||||
public interface ImsOutInventoryMapper
|
public interface ImsOutInventoryMapper {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* 查询出库记录
|
* 查询出库记录
|
||||||
*
|
*
|
||||||
|
|
@ -84,4 +84,8 @@ public interface ImsOutInventoryMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteImsOutInventoryDetailByOutId(Long outId);
|
public int deleteImsOutInventoryDetailByOutId(Long outId);
|
||||||
|
|
||||||
|
public List<ImsOutInventoryDetail> selectImsOutInventoryDetailList(@Param("outId") Long outId);
|
||||||
|
|
||||||
|
public List<ImsOutInventoryDetail> selectImsOutInventoryDetailListWithoutIntoId(@Param("outId") Long outId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.bonus.canteen.core.ims.service.impl;
|
package com.bonus.canteen.core.ims.service.impl;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
|
@ -15,7 +14,6 @@ import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.core.utils.DateUtils;
|
import com.bonus.common.core.utils.DateUtils;
|
||||||
import com.bonus.common.houqin.constant.DelFlagEnum;
|
import com.bonus.common.houqin.constant.DelFlagEnum;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -137,7 +135,7 @@ public class ImsIntoInventoryServiceImpl implements IImsIntoInventoryService
|
||||||
imsIntoInventory.setUpdateBy(SecurityUtils.getUsername());
|
imsIntoInventory.setUpdateBy(SecurityUtils.getUsername());
|
||||||
imsIntoInventory.setIntoCode(imsIntoInventoryVO.getIntoCode());
|
imsIntoInventory.setIntoCode(imsIntoInventoryVO.getIntoCode());
|
||||||
imsIntoInventoryMapper.deleteImsIntoInventoryDetailByIntoId(imsIntoInventory.getIntoId());
|
imsIntoInventoryMapper.deleteImsIntoInventoryDetailByIntoId(imsIntoInventory.getIntoId());
|
||||||
insertImsIntoInventoryDetail(imsIntoInventoryUpdate.getImsIntoInventoryDetailUpdateList(), imsIntoInventory);
|
insertImsIntoInventoryDetail(imsIntoInventoryUpdate.getImsIntoInventoryDetailAddList(), imsIntoInventory);
|
||||||
return imsIntoInventoryMapper.updateImsIntoInventory(imsIntoInventory);
|
return imsIntoInventoryMapper.updateImsIntoInventory(imsIntoInventory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import java.util.List;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.bonus.canteen.core.ims.domain.*;
|
import com.bonus.canteen.core.ims.domain.*;
|
||||||
import com.bonus.canteen.core.ims.domain.param.*;
|
import com.bonus.canteen.core.ims.domain.param.*;
|
||||||
import com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryVO;
|
|
||||||
import com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryDetailVO;
|
import com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryDetailVO;
|
||||||
import com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryVO;
|
import com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryVO;
|
||||||
import com.bonus.canteen.core.ims.mapper.ImsIntoInventoryMapper;
|
import com.bonus.canteen.core.ims.mapper.ImsIntoInventoryMapper;
|
||||||
|
|
@ -61,7 +60,13 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
||||||
if(Objects.nonNull(imsOutInventory)) {
|
if(Objects.nonNull(imsOutInventory)) {
|
||||||
imsOutInventoryVO = new ImsOutInventoryVO();
|
imsOutInventoryVO = new ImsOutInventoryVO();
|
||||||
BeanUtils.copyProperties(imsOutInventory, imsOutInventoryVO);
|
BeanUtils.copyProperties(imsOutInventory, imsOutInventoryVO);
|
||||||
List<ImsOutInventoryDetail> imsOutInventoryDetails = imsOutInventory.getImsOutInventoryDetailList();
|
List<ImsOutInventoryDetail> imsOutInventoryDetails;
|
||||||
|
if(imsOutInventory.getStatus() == 1) {
|
||||||
|
imsOutInventoryDetails = imsOutInventoryMapper.selectImsOutInventoryDetailListWithoutIntoId(outId);
|
||||||
|
}else{
|
||||||
|
imsOutInventoryDetails = imsOutInventoryMapper.selectImsOutInventoryDetailList(outId);
|
||||||
|
}
|
||||||
|
|
||||||
if(CollUtil.isNotEmpty(imsOutInventoryDetails)) {
|
if(CollUtil.isNotEmpty(imsOutInventoryDetails)) {
|
||||||
List<ImsOutInventoryDetailVO> imsOutInventoryDetailVOList = new ArrayList<>();
|
List<ImsOutInventoryDetailVO> imsOutInventoryDetailVOList = new ArrayList<>();
|
||||||
for(ImsOutInventoryDetail detail : imsOutInventoryDetails) {
|
for(ImsOutInventoryDetail detail : imsOutInventoryDetails) {
|
||||||
|
|
@ -144,8 +149,7 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
||||||
imsOutInventory.setUpdateBy(SecurityUtils.getUsername());
|
imsOutInventory.setUpdateBy(SecurityUtils.getUsername());
|
||||||
imsOutInventory.setOutCode(imsOutInventoryVO.getOutCode());
|
imsOutInventory.setOutCode(imsOutInventoryVO.getOutCode());
|
||||||
imsOutInventoryMapper.deleteImsOutInventoryDetailByOutId(imsOutInventory.getOutId());
|
imsOutInventoryMapper.deleteImsOutInventoryDetailByOutId(imsOutInventory.getOutId());
|
||||||
insertImsOutInventoryDetail(imsOutInventoryUpdate.getImsOutInventoryDetailUpdateList(), imsOutInventory);
|
return insertImsOutInventoryDetail(imsOutInventoryUpdate.getImsOutInventoryDetailAddList(), imsOutInventory);
|
||||||
return imsOutInventoryMapper.updateImsOutInventory(imsOutInventory);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -181,7 +185,7 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
||||||
*
|
*
|
||||||
* @param imsOutInventory 出库记录对象
|
* @param imsOutInventory 出库记录对象
|
||||||
*/
|
*/
|
||||||
public void insertImsOutInventoryDetail(List<ImsOutInventoryDetailAdd> imsOutInventoryDetailAddList, ImsOutInventory imsOutInventory)
|
public int insertImsOutInventoryDetail(List<ImsOutInventoryDetailAdd> imsOutInventoryDetailAddList, ImsOutInventory imsOutInventory)
|
||||||
{
|
{
|
||||||
Long outId = imsOutInventory.getOutId();
|
Long outId = imsOutInventory.getOutId();
|
||||||
if (StringUtils.isNotNull(imsOutInventoryDetailAddList))
|
if (StringUtils.isNotNull(imsOutInventoryDetailAddList))
|
||||||
|
|
@ -295,17 +299,17 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateFetchMaterialOrderStatus(imsOutInventory);
|
updateFetchMaterialOrderStatus(imsOutInventory);
|
||||||
|
}else {
|
||||||
|
list.add(imsOutInventoryDetail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (list.size() > 0)
|
if (list.size() > 0)
|
||||||
{
|
{
|
||||||
imsOutInventoryMapper.batchImsOutInventoryDetail(list);
|
imsOutInventoryMapper.batchImsOutInventoryDetail(list);
|
||||||
ImsOutInventory imsOutInventoryUpdate = new ImsOutInventory();
|
imsOutInventory.setTotalAmount(totalPriceSum);
|
||||||
imsOutInventoryUpdate.setOutId(outId);
|
|
||||||
imsOutInventoryUpdate.setTotalAmount(totalPriceSum);
|
|
||||||
imsOutInventoryMapper.updateImsOutInventory(imsOutInventoryUpdate);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return imsOutInventoryMapper.updateImsOutInventory(imsOutInventory);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateFetchMaterialOrderStatus(ImsOutInventory imsOutInventory) {
|
private void updateFetchMaterialOrderStatus(ImsOutInventory imsOutInventory) {
|
||||||
|
|
|
||||||
|
|
@ -189,14 +189,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join cook_material_type cmt on cm.material_type_id = cmt.material_type_id
|
left join cook_material_type cmt on cm.material_type_id = cmt.material_type_id
|
||||||
left join ims_unit iu on iiid.unit_id = iu.unit_id
|
left join ims_unit iu on iiid.unit_id = iu.unit_id
|
||||||
left join ims_warehouse_info iwi on iii.warehouse_id = iwi.warehouse_id
|
left join ims_warehouse_info iwi on iii.warehouse_id = iwi.warehouse_id
|
||||||
where iiid.material_id = #{materialId}
|
where iii.warehouse_id = #{warehouseId}
|
||||||
and iii.warehouse_id = #{warehouseId}
|
|
||||||
and iii.status = '2'
|
and iii.status = '2'
|
||||||
and iiid.inventory_num > 0
|
and iiid.inventory_num > 0
|
||||||
and iiid.del_flag = '0'
|
and iiid.del_flag = '0'
|
||||||
|
<if test="materialTypeIds != null and materialTypeIds.size() > 0">
|
||||||
|
and cmt.material_type_id in
|
||||||
|
<foreach collection="materialTypeIds" item="materialTypeId" separator="," open="(" close=")">
|
||||||
|
#{materialTypeId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="materialName != null and materialName != ''">
|
||||||
|
and cm.material_name like CONCAT('%',#{materialName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="materialCode != null and materialCode != ''">
|
||||||
|
and cm.material_code = #{materialCode}
|
||||||
|
</if>
|
||||||
|
<if test="barCode != null and barCode != ''">
|
||||||
|
and cm.bar_code = #{barCode}
|
||||||
|
</if>
|
||||||
|
<if test="materialId != null">
|
||||||
|
and iiid.material_id = #{materialId}
|
||||||
|
</if>
|
||||||
<if test="intoCode != null and intoCode != ''">
|
<if test="intoCode != null and intoCode != ''">
|
||||||
and iii.into_code = #{intoCode}
|
and iii.into_code = #{intoCode}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="supplierId != null">
|
||||||
|
and iiid.supplier_id = #{supplierId}
|
||||||
|
</if>
|
||||||
<if test="startDateTime != null">
|
<if test="startDateTime != null">
|
||||||
and iii.into_date <![CDATA[ >= ]]> #{startDateTime}
|
and iii.into_date <![CDATA[ >= ]]> #{startDateTime}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectImsInventoryVo"/>
|
<include refid="selectImsInventoryVo"/>
|
||||||
<where>
|
<where>
|
||||||
ii.del_flag = '0'
|
ii.del_flag = '0'
|
||||||
|
<if test="inventoryId != null "> and ii.inventory_id = #{inventoryId}</if>
|
||||||
<if test="areaId != null "> and ba.area_id = #{areaId}</if>
|
<if test="areaId != null "> and ba.area_id = #{areaId}</if>
|
||||||
<if test="warehouseId != null "> and ii.warehouse_id = #{warehouseId}</if>
|
<if test="warehouseId != null "> and ii.warehouse_id = #{warehouseId}</if>
|
||||||
<if test="materialId != null "> and ii.material_id = #{materialId}</if>
|
<if test="materialId != null "> and ii.material_id = #{materialId}</if>
|
||||||
|
|
@ -61,11 +62,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{materialTypeId}
|
#{materialTypeId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="materialName != null">
|
<if test="materialName != null and materialName != ''">
|
||||||
and cm.material_name like CONCAT('%',#{materialName},'%')
|
and cm.material_name like CONCAT('%',#{materialName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="barCode != null">
|
<if test="materialCode != null and materialCode != ''">
|
||||||
and cm.bar_code like CONCAT('%',#{barCode},'%')
|
and cm.material_code = #{materialCode}
|
||||||
|
</if>
|
||||||
|
<if test="barCode != null and barCode != ''">
|
||||||
|
and cm.bar_code = #{barCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="startDateTime != null">
|
<if test="startDateTime != null">
|
||||||
and ii.create_time <![CDATA[ >= ]]> #{startDateTime}
|
and ii.create_time <![CDATA[ >= ]]> #{startDateTime}
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="areaId" column="area_id" />
|
<result property="areaId" column="area_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="ImsOutInventoryImsOutInventoryDetailResult" type="com.bonus.canteen.core.ims.domain.ImsOutInventory" extends="ImsOutInventoryResult">
|
<!-- <resultMap id="ImsOutInventoryImsOutInventoryDetailResult" type="com.bonus.canteen.core.ims.domain.ImsOutInventory" extends="ImsOutInventoryResult">-->
|
||||||
<collection property="imsOutInventoryDetailList" ofType="com.bonus.canteen.core.ims.domain.ImsOutInventoryDetail" column="out_id" select="selectImsOutInventoryDetailList" />
|
<!-- <collection property="imsOutInventoryDetailList" ofType="com.bonus.canteen.core.ims.domain.ImsOutInventoryDetail" column="out_id" select="selectImsOutInventoryDetailList" />-->
|
||||||
</resultMap>
|
<!-- </resultMap>-->
|
||||||
|
|
||||||
<resultMap type="com.bonus.canteen.core.ims.domain.ImsOutInventoryDetail" id="ImsOutInventoryDetailResult">
|
<resultMap type="com.bonus.canteen.core.ims.domain.ImsOutInventoryDetail" id="ImsOutInventoryDetailResult">
|
||||||
<result property="outDetailId" column="out_detail_id" />
|
<result property="outDetailId" column="out_detail_id" />
|
||||||
|
|
@ -65,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="inventoryNum" column="inventory_num" />
|
<result property="inventoryNum" column="inventory_num" />
|
||||||
<result property="intoCode" column="into_code" />
|
<result property="intoCode" column="into_code" />
|
||||||
<result property="intoDate" column="into_date" />
|
<result property="intoDate" column="into_date" />
|
||||||
|
<result property="materialNum" column="material_num" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectImsOutInventoryVo">
|
<sql id="selectImsOutInventoryVo">
|
||||||
|
|
@ -106,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
order by ioi.out_date desc
|
order by ioi.out_date desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectImsOutInventoryByOutId" parameterType="Long" resultMap="ImsOutInventoryImsOutInventoryDetailResult">
|
<select id="selectImsOutInventoryByOutId" parameterType="Long" resultMap="ImsOutInventoryResult">
|
||||||
select out_id, out_code, ioi.warehouse_id, out_date, ioi.fetch_user_id, total_num, out_type,
|
select out_id, out_code, ioi.warehouse_id, out_date, ioi.fetch_user_id, total_num, out_type,
|
||||||
ioi.status, order_id, total_amount, plan_id, fetch_material_id, goods_allocation_id,
|
ioi.status, order_id, total_amount, plan_id, fetch_material_id, goods_allocation_id,
|
||||||
ioi.remark, ioi.del_flag, ioi.create_by, ioi.create_time, ioi.update_by, ioi.update_time,
|
ioi.remark, ioi.del_flag, ioi.create_by, ioi.create_time, ioi.update_by, ioi.update_time,
|
||||||
|
|
@ -131,7 +132,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join cook_material cm on iiid.material_id = cm.material_id
|
left join cook_material cm on iiid.material_id = cm.material_id
|
||||||
left join cook_material_type cmt on cm.material_type_id = cmt.material_type_id
|
left join cook_material_type cmt on cm.material_type_id = cmt.material_type_id
|
||||||
left join ims_unit iu on iiid.unit_id = iu.unit_id
|
left join ims_unit iu on iiid.unit_id = iu.unit_id
|
||||||
where out_id = #{out_id} and ioid.del_flag = '0'
|
where out_id = #{outId} and ioid.del_flag = '0'
|
||||||
|
order by ioid.out_detail_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectImsOutInventoryDetailListWithoutIntoId" resultMap="ImsOutInventoryDetailResult">
|
||||||
|
select out_detail_id, out_id, out_code, ioid.inventory_id, fetch_num, ioid.total_price,
|
||||||
|
ioid.into_detail_id, interval_id, ioid.size, ioid.img_url, if_overdraft, ioid.remark, ioid.del_flag,
|
||||||
|
ioid.create_by, ioid.create_time, ioid.update_by, ioid.update_time,
|
||||||
|
cm.material_name, cmt.material_type_name, iu.unit_name, cm.bar_code,
|
||||||
|
cm.size AS material_size, cm.material_code, ii.material_num
|
||||||
|
from ims_out_inventory_detail ioid
|
||||||
|
left join ims_inventory ii on ioid.inventory_id = ii.inventory_id
|
||||||
|
left join cook_material cm on ii.material_id = cm.material_id
|
||||||
|
left join cook_material_type cmt on cm.material_type_id = cmt.material_type_id
|
||||||
|
left join ims_unit iu on cm.unit_id = iu.unit_id
|
||||||
|
where out_id = #{outId} and ioid.del_flag = '0'
|
||||||
order by ioid.out_detail_id
|
order by ioid.out_detail_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue