wms-acq-inventory-info.xml 977 B

12345678910111213141516171819202122232425262728293031
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.emato.cus.supervise.mapper.WmsAcqInventoryInfoMapper">
  4. <!-- 企业库存信息查询 -->
  5. <select id="getWmsAcqInventoryInfo" parameterType="java.util.Map"
  6. resultType="com.emato.cus.supervise.domain.WmsAcqInventoryInfo">
  7. SELECT
  8. li.companyCode AS merchSn,
  9. li.itemName AS goodsName,
  10. li.itemCode AS codeTs,
  11. i.unitDesc AS gUnit,
  12. SUM(li.onHandQty) AS gQty,
  13. CONCAT(i.itemSize,'-',i.itemColor,'-',i.itemStyle) as goodsModel
  14. FROM location_inventory li
  15. LEFT JOIN item i ON li.itemCode = i.CODE
  16. LEFT JOIN location l ON li.locationCode = l.CODE
  17. <where>
  18. 1 = 1
  19. and l.zoneCode in ('A区', 'B区', 'C区', 'GQ区', 'F区', 'P区')
  20. <if test="thisTime != null">
  21. and li.lastUpdated &gt;= #{thisTime}
  22. </if>
  23. </where>
  24. GROUP BY li.itemCode
  25. </select>
  26. </mapper>