库存管理
This commit is contained in:
parent
e5af4fa564
commit
3b2bea761f
|
|
@ -9,6 +9,7 @@ import com.bonus.canteen.core.ims.domain.ImsIntoInventoryDetail;
|
|||
import com.bonus.canteen.core.ims.domain.param.ImsIntoInventoryAdd;
|
||||
import com.bonus.canteen.core.ims.domain.param.ImsIntoInventoryQuery;
|
||||
import com.bonus.canteen.core.ims.domain.param.ImsIntoInventoryUpdate;
|
||||
import com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryDetailVO;
|
||||
import com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryVO;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
|
|
@ -66,7 +67,7 @@ public class ImsIntoInventoryController extends BaseController
|
|||
public TableDataInfo selectDetailListByWarehouseIdAndMaterialId(@RequestBody ImsIntoInventoryQuery imsIntoInventoryQuery)
|
||||
{
|
||||
startPage();
|
||||
List<ImsIntoInventoryDetail> list = imsIntoInventoryService.
|
||||
List<ImsIntoInventoryDetailVO> list = imsIntoInventoryService.
|
||||
selectDetailListByWarehouseIdAndMaterialId(imsIntoInventoryQuery);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import java.math.BigDecimal;
|
|||
import java.util.List;
|
||||
import com.bonus.canteen.core.ims.domain.ImsIntoInventory;
|
||||
import com.bonus.canteen.core.ims.domain.ImsIntoInventoryDetail;
|
||||
import com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryDetailVO;
|
||||
import com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
|
|
@ -19,7 +21,7 @@ public interface ImsIntoInventoryMapper {
|
|||
* @param intoId 入库记录主键
|
||||
* @return 入库记录
|
||||
*/
|
||||
public ImsIntoInventory selectImsIntoInventoryByIntoId(Long intoId);
|
||||
public ImsIntoInventoryVO selectImsIntoInventoryByIntoId(Long intoId);
|
||||
|
||||
/**
|
||||
* 查询入库记录列表
|
||||
|
|
@ -27,7 +29,7 @@ public interface ImsIntoInventoryMapper {
|
|||
* @param imsIntoInventory 入库记录
|
||||
* @return 入库记录集合
|
||||
*/
|
||||
public List<ImsIntoInventory> selectImsIntoInventoryList(ImsIntoInventory imsIntoInventory);
|
||||
public List<ImsIntoInventoryVO> selectImsIntoInventoryList(ImsIntoInventory imsIntoInventory);
|
||||
|
||||
/**
|
||||
* 新增入库记录
|
||||
|
|
@ -86,11 +88,11 @@ public interface ImsIntoInventoryMapper {
|
|||
*/
|
||||
public int deleteImsIntoInventoryDetailByIntoId(Long intoId);
|
||||
|
||||
public List<ImsIntoInventoryDetail> selectImsIntoInventoryDetailListByInventoryId(Long inventoryId);
|
||||
public List<ImsIntoInventoryDetailVO> selectImsIntoInventoryDetailListByInventoryId(Long inventoryId);
|
||||
|
||||
public int updateIntoInventoryNum(@Param("intoDetailId") Long intoDetailId, @Param("fetchNum") BigDecimal fetchNum);
|
||||
|
||||
public ImsIntoInventoryDetail selectImsIntoInventoryDetailListByIntoDetailId(@Param("intoDetailId") Long intoDetailId);
|
||||
public ImsIntoInventoryDetailVO selectImsIntoInventoryDetailListByIntoDetailId(@Param("intoDetailId") Long intoDetailId);
|
||||
|
||||
public List<ImsIntoInventoryDetail> selectDetailListByWarehouseIdAndMaterialId(ImsIntoInventory imsIntoInventory);
|
||||
public List<ImsIntoInventoryDetailVO> selectDetailListByWarehouseIdAndMaterialId(ImsIntoInventory imsIntoInventory);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.canteen.core.ims.domain.ImsInventory;
|
||||
import com.bonus.canteen.core.ims.domain.vo.ImsInventoryVO;
|
||||
|
||||
/**
|
||||
* 库存Mapper接口
|
||||
|
|
@ -17,7 +18,7 @@ public interface ImsInventoryMapper
|
|||
* @param inventoryId 库存主键
|
||||
* @return 库存
|
||||
*/
|
||||
public ImsInventory selectImsInventoryByInventoryId(Long inventoryId);
|
||||
public ImsInventoryVO selectImsInventoryByInventoryId(Long inventoryId);
|
||||
|
||||
/**
|
||||
* 查询库存列表
|
||||
|
|
@ -25,7 +26,7 @@ public interface ImsInventoryMapper
|
|||
* @param imsInventory 库存
|
||||
* @return 库存集合
|
||||
*/
|
||||
public List<ImsInventory> selectImsInventoryList(ImsInventory imsInventory);
|
||||
public List<ImsInventoryVO> selectImsInventoryList(ImsInventory imsInventory);
|
||||
|
||||
/**
|
||||
* 新增库存
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.bonus.canteen.core.ims.mapper;
|
|||
import java.util.List;
|
||||
import com.bonus.canteen.core.ims.domain.ImsOutInventory;
|
||||
import com.bonus.canteen.core.ims.domain.ImsOutInventoryDetail;
|
||||
import com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryDetailVO;
|
||||
import com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
|
|
@ -18,7 +20,7 @@ public interface ImsOutInventoryMapper {
|
|||
* @param outId 出库记录主键
|
||||
* @return 出库记录
|
||||
*/
|
||||
public ImsOutInventory selectImsOutInventoryByOutId(Long outId);
|
||||
public ImsOutInventoryVO selectImsOutInventoryByOutId(Long outId);
|
||||
|
||||
/**
|
||||
* 查询出库记录列表
|
||||
|
|
@ -26,7 +28,7 @@ public interface ImsOutInventoryMapper {
|
|||
* @param imsOutInventory 出库记录
|
||||
* @return 出库记录集合
|
||||
*/
|
||||
public List<ImsOutInventory> selectImsOutInventoryList(ImsOutInventory imsOutInventory);
|
||||
public List<ImsOutInventoryVO> selectImsOutInventoryList(ImsOutInventory imsOutInventory);
|
||||
|
||||
/**
|
||||
* 新增出库记录
|
||||
|
|
@ -85,7 +87,7 @@ public interface ImsOutInventoryMapper {
|
|||
*/
|
||||
public int deleteImsOutInventoryDetailByOutId(Long outId);
|
||||
|
||||
public List<ImsOutInventoryDetail> selectImsOutInventoryDetailList(@Param("outId") Long outId);
|
||||
public List<ImsOutInventoryDetailVO> selectImsOutInventoryDetailList(@Param("outId") Long outId);
|
||||
|
||||
public List<ImsOutInventoryDetail> selectImsOutInventoryDetailListWithoutIntoId(@Param("outId") Long outId);
|
||||
public List<ImsOutInventoryDetailVO> selectImsOutInventoryDetailListWithoutIntoId(@Param("outId") Long outId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.bonus.canteen.core.ims.domain.ImsIntoInventoryDetail;
|
|||
import com.bonus.canteen.core.ims.domain.param.ImsIntoInventoryAdd;
|
||||
import com.bonus.canteen.core.ims.domain.param.ImsIntoInventoryQuery;
|
||||
import com.bonus.canteen.core.ims.domain.param.ImsIntoInventoryUpdate;
|
||||
import com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryDetailVO;
|
||||
import com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -65,5 +66,5 @@ public interface IImsIntoInventoryService
|
|||
*/
|
||||
public int deleteImsIntoInventoryByIntoId(Long intoId);
|
||||
|
||||
public List<ImsIntoInventoryDetail> selectDetailListByWarehouseIdAndMaterialId(ImsIntoInventoryQuery imsIntoInventoryQuery);
|
||||
public List<ImsIntoInventoryDetailVO> selectDetailListByWarehouseIdAndMaterialId(ImsIntoInventoryQuery imsIntoInventoryQuery);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,23 +50,7 @@ public class ImsIntoInventoryServiceImpl implements IImsIntoInventoryService
|
|||
@Override
|
||||
public ImsIntoInventoryVO selectImsIntoInventoryByIntoId(Long intoId)
|
||||
{
|
||||
ImsIntoInventory imsIntoInventory = imsIntoInventoryMapper.selectImsIntoInventoryByIntoId(intoId);
|
||||
ImsIntoInventoryVO imsIntoInventoryVO = null;
|
||||
if(Objects.nonNull(imsIntoInventory)) {
|
||||
imsIntoInventoryVO = new ImsIntoInventoryVO();
|
||||
BeanUtils.copyProperties(imsIntoInventory, imsIntoInventoryVO);
|
||||
List<ImsIntoInventoryDetail> imsIntoInventoryDetails = imsIntoInventory.getImsIntoInventoryDetailList();
|
||||
if(CollUtil.isNotEmpty(imsIntoInventoryDetails)) {
|
||||
List<ImsIntoInventoryDetailVO> imsIntoInventoryDetailVOList = new ArrayList<>();
|
||||
for(ImsIntoInventoryDetail detail : imsIntoInventoryDetails) {
|
||||
ImsIntoInventoryDetailVO imsIntoInventoryDetailVO = new ImsIntoInventoryDetailVO();
|
||||
BeanUtils.copyProperties(detail, imsIntoInventoryDetailVO);
|
||||
imsIntoInventoryDetailVOList.add(imsIntoInventoryDetailVO);
|
||||
}
|
||||
imsIntoInventoryVO.setImsIntoInventoryDetailVOList(imsIntoInventoryDetailVOList);
|
||||
}
|
||||
}
|
||||
return imsIntoInventoryVO;
|
||||
return imsIntoInventoryMapper.selectImsIntoInventoryByIntoId(intoId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -80,16 +64,7 @@ public class ImsIntoInventoryServiceImpl implements IImsIntoInventoryService
|
|||
{
|
||||
ImsIntoInventory imsIntoInventory = new ImsIntoInventory();
|
||||
BeanUtils.copyProperties(imsIntoInventoryQuery, imsIntoInventory);
|
||||
List<ImsIntoInventory> imsIntoInventoryList = imsIntoInventoryMapper.selectImsIntoInventoryList(imsIntoInventory);
|
||||
List<ImsIntoInventoryVO> imsIntoInventoryVOList = new ArrayList<>();
|
||||
if(CollUtil.isNotEmpty(imsIntoInventoryList)) {
|
||||
for (ImsIntoInventory intoInventory : imsIntoInventoryList) {
|
||||
ImsIntoInventoryVO imsIntoInventoryVO = new ImsIntoInventoryVO();
|
||||
BeanUtils.copyProperties(intoInventory, imsIntoInventoryVO);
|
||||
imsIntoInventoryVOList.add(imsIntoInventoryVO);
|
||||
}
|
||||
}
|
||||
return imsIntoInventoryVOList;
|
||||
return imsIntoInventoryMapper.selectImsIntoInventoryList(imsIntoInventory);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -168,7 +143,7 @@ public class ImsIntoInventoryServiceImpl implements IImsIntoInventoryService
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ImsIntoInventoryDetail> selectDetailListByWarehouseIdAndMaterialId(ImsIntoInventoryQuery imsIntoInventoryQuery) {
|
||||
public List<ImsIntoInventoryDetailVO> selectDetailListByWarehouseIdAndMaterialId(ImsIntoInventoryQuery imsIntoInventoryQuery) {
|
||||
ImsIntoInventory imsIntoInventory = new ImsIntoInventory();
|
||||
BeanUtils.copyProperties(imsIntoInventoryQuery, imsIntoInventory);
|
||||
return imsIntoInventoryMapper.selectDetailListByWarehouseIdAndMaterialId(imsIntoInventory);
|
||||
|
|
@ -221,7 +196,7 @@ public class ImsIntoInventoryServiceImpl implements IImsIntoInventoryService
|
|||
imsIntoInventoryDetail.setInventoryId(inventoryId);
|
||||
}
|
||||
}
|
||||
if (list.size() > 0)
|
||||
if (!list.isEmpty())
|
||||
{
|
||||
imsIntoInventoryMapper.batchImsIntoInventoryDetail(list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,13 +49,7 @@ public class ImsInventoryServiceImpl implements IImsInventoryService
|
|||
@Override
|
||||
public ImsInventoryVO selectImsInventoryByInventoryId(Long inventoryId)
|
||||
{
|
||||
ImsInventory imsInventory = imsInventoryMapper.selectImsInventoryByInventoryId(inventoryId);
|
||||
ImsInventoryVO imsInventoryVO = null;
|
||||
if(Objects.nonNull(imsInventory)) {
|
||||
imsInventoryVO = new ImsInventoryVO();
|
||||
BeanUtils.copyProperties(imsInventory, imsInventoryVO);
|
||||
}
|
||||
return imsInventoryVO;
|
||||
return imsInventoryMapper.selectImsInventoryByInventoryId(inventoryId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -69,18 +63,18 @@ public class ImsInventoryServiceImpl implements IImsInventoryService
|
|||
{
|
||||
ImsInventory imsInventory = new ImsInventory();
|
||||
BeanUtils.copyProperties(imsInventoryQuery, imsInventory);
|
||||
List<ImsInventory> imsInventoryList = imsInventoryMapper.selectImsInventoryList(imsInventory);
|
||||
List<ImsInventoryVO> imsInventoryList = imsInventoryMapper.selectImsInventoryList(imsInventory);
|
||||
List<ImsInventoryVO> imsInventoryVOList = new ArrayList<>();
|
||||
if(CollUtil.isNotEmpty(imsInventoryList)) {
|
||||
Map<Long, BigDecimal> materialIdCountMap = imsInventoryList.stream()
|
||||
.collect(Collectors.groupingBy(ImsInventory::getMaterialId,
|
||||
Collectors.mapping(ImsInventory::getMaterialNum,
|
||||
.collect(Collectors.groupingBy(ImsInventoryVO::getMaterialId,
|
||||
Collectors.mapping(ImsInventoryVO::getMaterialNum,
|
||||
Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
|
||||
for(ImsInventory inventory : imsInventoryList) {
|
||||
List<ImsIntoInventoryDetail> imsIntoInventoryDetailList =
|
||||
for(ImsInventoryVO inventory : imsInventoryList) {
|
||||
List<ImsIntoInventoryDetailVO> imsIntoInventoryDetailVOList =
|
||||
imsIntoInventoryMapper.selectImsIntoInventoryDetailListByInventoryId(inventory.getInventoryId());
|
||||
Map<Long, BigDecimal> inventoryIdToTotalPrice = imsIntoInventoryDetailList.stream()
|
||||
.collect(Collectors.groupingBy(ImsIntoInventoryDetail::getInventoryId,
|
||||
Map<Long, BigDecimal> inventoryIdToTotalPrice = imsIntoInventoryDetailVOList.stream()
|
||||
.collect(Collectors.groupingBy(ImsIntoInventoryDetailVO::getInventoryId,
|
||||
Collectors.mapping(detail -> detail.getInventoryNum().multiply(BigDecimal.valueOf(detail.getUnitPrice())),
|
||||
Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
|
||||
ImsInventoryVO imsInventoryVO = new ImsInventoryVO();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.canteen.core.ims.domain.*;
|
||||
import com.bonus.canteen.core.ims.domain.param.*;
|
||||
import com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryDetailVO;
|
||||
import com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryDetailVO;
|
||||
import com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryVO;
|
||||
import com.bonus.canteen.core.ims.mapper.ImsIntoInventoryMapper;
|
||||
|
|
@ -55,27 +56,15 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
|||
@Override
|
||||
public ImsOutInventoryVO selectImsOutInventoryByOutId(Long outId)
|
||||
{
|
||||
ImsOutInventory imsOutInventory = imsOutInventoryMapper.selectImsOutInventoryByOutId(outId);
|
||||
ImsOutInventoryVO imsOutInventoryVO = null;
|
||||
if(Objects.nonNull(imsOutInventory)) {
|
||||
imsOutInventoryVO = new ImsOutInventoryVO();
|
||||
BeanUtils.copyProperties(imsOutInventory, imsOutInventoryVO);
|
||||
List<ImsOutInventoryDetail> imsOutInventoryDetails;
|
||||
if(imsOutInventory.getStatus() == 1) {
|
||||
ImsOutInventoryVO imsOutInventoryVO = imsOutInventoryMapper.selectImsOutInventoryByOutId(outId);
|
||||
if(Objects.nonNull(imsOutInventoryVO)) {
|
||||
List<ImsOutInventoryDetailVO> imsOutInventoryDetails = null;
|
||||
if(imsOutInventoryVO.getStatus() == 1) {
|
||||
imsOutInventoryDetails = imsOutInventoryMapper.selectImsOutInventoryDetailListWithoutIntoId(outId);
|
||||
}else{
|
||||
imsOutInventoryDetails = imsOutInventoryMapper.selectImsOutInventoryDetailList(outId);
|
||||
}
|
||||
|
||||
if(CollUtil.isNotEmpty(imsOutInventoryDetails)) {
|
||||
List<ImsOutInventoryDetailVO> imsOutInventoryDetailVOList = new ArrayList<>();
|
||||
for(ImsOutInventoryDetail detail : imsOutInventoryDetails) {
|
||||
ImsOutInventoryDetailVO imsIntoInventoryDetailVO = new ImsOutInventoryDetailVO();
|
||||
BeanUtils.copyProperties(detail, imsIntoInventoryDetailVO);
|
||||
imsOutInventoryDetailVOList.add(imsIntoInventoryDetailVO);
|
||||
}
|
||||
imsOutInventoryVO.setImsOutInventoryDetailVOList(imsOutInventoryDetailVOList);
|
||||
}
|
||||
imsOutInventoryVO.setImsOutInventoryDetailVOList(imsOutInventoryDetails);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -93,16 +82,7 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
|||
{
|
||||
ImsOutInventory imsOutInventory = new ImsOutInventory();
|
||||
BeanUtils.copyProperties(imsOutInventoryQuery, imsOutInventory);
|
||||
List<ImsOutInventory> imsOutInventoryList = imsOutInventoryMapper.selectImsOutInventoryList(imsOutInventory);
|
||||
List<ImsOutInventoryVO> imsOutInventoryVOS = new ArrayList<>();
|
||||
if(CollUtil.isNotEmpty(imsOutInventoryList)) {
|
||||
for (ImsOutInventory outInventory : imsOutInventoryList) {
|
||||
ImsOutInventoryVO imsOutInventoryVO = new ImsOutInventoryVO();
|
||||
BeanUtils.copyProperties(outInventory, imsOutInventoryVO);
|
||||
imsOutInventoryVOS.add(imsOutInventoryVO);
|
||||
}
|
||||
}
|
||||
return imsOutInventoryVOS;
|
||||
return imsOutInventoryMapper.selectImsOutInventoryList(imsOutInventory);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -228,11 +208,11 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
|||
throw new ServiceException("库存不足");
|
||||
}
|
||||
if(Objects.isNull(imsOutInventoryDetail.getIntoDetailId())) {
|
||||
List<ImsIntoInventoryDetail> imsIntoInventoryDetailList = imsIntoInventoryMapper
|
||||
List<ImsIntoInventoryDetailVO> imsIntoInventoryDetailList = imsIntoInventoryMapper
|
||||
.selectImsIntoInventoryDetailListByInventoryId(imsOutInventoryDetail.getInventoryId());
|
||||
BigDecimal tempFetchLeftNum = imsOutInventoryDetail.getFetchNum();
|
||||
long totalPrice = 0L;
|
||||
for(ImsIntoInventoryDetail imsIntoInventoryDetail : imsIntoInventoryDetailList) {
|
||||
for(ImsIntoInventoryDetailVO imsIntoInventoryDetail : imsIntoInventoryDetailList) {
|
||||
if(tempFetchLeftNum.compareTo(BigDecimal.ZERO) == 0) {
|
||||
break;
|
||||
}
|
||||
|
|
@ -273,7 +253,7 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
|||
}
|
||||
totalPriceSum += totalPrice;
|
||||
}else {
|
||||
ImsIntoInventoryDetail imsIntoInventoryDetail = imsIntoInventoryMapper
|
||||
ImsIntoInventoryDetailVO imsIntoInventoryDetail = imsIntoInventoryMapper
|
||||
.selectImsIntoInventoryDetailListByIntoDetailId(imsOutInventoryDetail.getIntoDetailId());
|
||||
if(Objects.nonNull(imsIntoInventoryDetail)) {
|
||||
if(Objects.isNull(imsOutInventoryDetail.getFetchNum())) {
|
||||
|
|
@ -303,7 +283,7 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
|||
list.add(imsOutInventoryDetail);
|
||||
}
|
||||
}
|
||||
if (list.size() > 0)
|
||||
if (!list.isEmpty())
|
||||
{
|
||||
imsOutInventoryMapper.batchImsOutInventoryDetail(list);
|
||||
imsOutInventory.setTotalAmount(totalPriceSum);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.canteen.core.ims.mapper.ImsIntoInventoryMapper">
|
||||
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.ImsIntoInventory" id="ImsIntoInventoryResult">
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryVO" id="ImsIntoInventoryResult">
|
||||
<result property="intoId" column="into_id" />
|
||||
<result property="intoCode" column="into_code" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
|
|
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="intoRelateOutId" column="into_relate_out_id" />
|
||||
<result property="goodsAllocationId" column="goods_allocation_id" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<!-- <result property="delFlag" column="del_flag" />-->
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
|
|
@ -30,11 +30,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="areaId" column="area_id" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ImsIntoInventoryImsIntoInventoryDetailResult" type="com.bonus.canteen.core.ims.domain.ImsIntoInventory" extends="ImsIntoInventoryResult">
|
||||
<collection property="imsIntoInventoryDetailList" ofType="com.bonus.canteen.core.ims.domain.ImsIntoInventoryDetail" column="into_id" select="selectImsIntoInventoryDetailList" />
|
||||
<resultMap id="ImsIntoInventoryImsIntoInventoryDetailResult" type="com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryVO" extends="ImsIntoInventoryResult">
|
||||
<collection property="imsIntoInventoryDetailVOList" ofType="com.bonus.canteen.core.ims.domain.ImsIntoInventoryDetail" column="into_id" select="selectImsIntoInventoryDetailList" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.ImsIntoInventoryDetail" id="ImsIntoInventoryDetailResult">
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryDetailVO" id="ImsIntoInventoryDetailResult">
|
||||
<result property="intoDetailId" column="into_detail_id" />
|
||||
<result property="intoId" column="into_id" />
|
||||
<result property="intoCode" column="into_code" />
|
||||
|
|
@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="ifFillInventory" column="if_fill_inventory" />
|
||||
<result property="relateOrderGoodsDetailId" column="relate_order_goods_detail_id" />
|
||||
<result property="relateDeliveryGoodsDetailId" column="relate_delivery_goods_detail_id" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<!-- <result property="delFlag" column="del_flag" />-->
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
|
|
@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select into_id, into_code, iii.warehouse_id, into_date, total_num, into_type,
|
||||
status, refund_out_id, relate_delivery_goods_id, total_amount,
|
||||
relate_order_goods_id, relate_inspect_goods_id, into_relate_out_id,
|
||||
goods_allocation_id, remark, iii.del_flag, iii.create_by, iii.create_time,
|
||||
goods_allocation_id, remark, iii.create_by, iii.create_time,
|
||||
iii.update_by, iii.update_time, iwi.warehouse_name, ba.area_name, ba.area_id
|
||||
from ims_into_inventory iii
|
||||
left join ims_warehouse_info iwi on iii.warehouse_id = iwi.warehouse_id
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.canteen.core.ims.mapper.ImsInventoryMapper">
|
||||
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.ImsInventory" id="ImsInventoryResult">
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.vo.ImsInventoryVO" id="ImsInventoryResult">
|
||||
<result property="inventoryId" column="inventory_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="materialId" column="material_id" />
|
||||
|
|
@ -14,7 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="materialNum" column="material_num" />
|
||||
<result property="inventoryStatus" column="inventory_status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<!-- <result property="delFlag" column="del_flag" />-->
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.canteen.core.ims.mapper.ImsOutInventoryMapper">
|
||||
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.ImsOutInventory" id="ImsOutInventoryResult">
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryVO" id="ImsOutInventoryResult">
|
||||
<result property="outId" column="out_id" />
|
||||
<result property="outCode" column="out_code" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
|
|
@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="fetchMaterialId" column="fetch_material_id" />
|
||||
<result property="goodsAllocationId" column="goods_allocation_id" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<!-- <result property="delFlag" column="del_flag" />-->
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
|
|
@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!-- <collection property="imsOutInventoryDetailList" ofType="com.bonus.canteen.core.ims.domain.ImsOutInventoryDetail" column="out_id" select="selectImsOutInventoryDetailList" />-->
|
||||
<!-- </resultMap>-->
|
||||
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.ImsOutInventoryDetail" id="ImsOutInventoryDetailResult">
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryDetailVO" id="ImsOutInventoryDetailResult">
|
||||
<result property="outDetailId" column="out_detail_id" />
|
||||
<result property="outId" column="out_id" />
|
||||
<result property="outCode" column="out_code" />
|
||||
|
|
@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="imgUrl" column="img_url" />
|
||||
<result property="ifOverdraft" column="if_overdraft" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<!-- <result property="delFlag" column="del_flag" />-->
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
|
|
@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<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,
|
||||
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.create_by, ioi.create_time, ioi.update_by, ioi.update_time,
|
||||
iwi.warehouse_name, ioi.fetch_user, ba.area_id, ba.area_name
|
||||
from ims_out_inventory ioi
|
||||
left join ims_warehouse_info iwi on ioi.warehouse_id = iwi.warehouse_id
|
||||
|
|
@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectImsOutInventoryDetailList" 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.into_detail_id, interval_id, ioid.size, ioid.img_url, if_overdraft, ioid.remark,
|
||||
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, iiid.inventory_num, iiid.expire_time, iii.into_date, iii.into_code
|
||||
|
|
@ -138,7 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<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.into_detail_id, interval_id, ioid.size, ioid.img_url, if_overdraft, ioid.remark,
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue