ReceiptContainerHeaderMapper.xml 4.13 KB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.huaheng.pc.receipt.receiptContainerHeader.mapper.ReceiptContainerHeaderMapper">
  <resultMap id="BaseResultMap" type="com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader">
    <!--@mbg.generated-->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
    <result column="companyCode" jdbcType="VARCHAR" property="companyCode" />
    <result column="containerCode" jdbcType="VARCHAR" property="containerCode" />
    <result column="containerType" jdbcType="VARCHAR" property="containerType" />
    <result column="taskType" jdbcType="VARCHAR" property="taskType" />
    <result column="weight" jdbcType="VARCHAR" property="weight" />
    <result column="projectNo" jdbcType="VARCHAR" property="projectNo" />
    <result column="locatingRule" jdbcType="VARCHAR" property="locatingRule" />
    <result column="fromLocation" jdbcType="VARCHAR" property="fromLocation" />
    <result column="toLocation" jdbcType="VARCHAR" property="toLocation" />
    <result column="waveId" jdbcType="INTEGER" property="waveId" />
    <result column="taskCreated" jdbcType="INTEGER" property="taskCreated" />
    <result column="created" jdbcType="TIMESTAMP" property="created" />
    <result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
    <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" />
    <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" />
    <result column="version" jdbcType="INTEGER" property="version" />
    <result column="userDef1" jdbcType="VARCHAR" property="userDef1" />
    <result column="userDef2" jdbcType="VARCHAR" property="userDef2" />
    <result column="userDef3" jdbcType="VARCHAR" property="userDef3" />
    <result column="userDef4" jdbcType="VARCHAR" property="userDef4" />
    <result column="userDef5" jdbcType="VARCHAR" property="userDef5" />
    <result column="userDef6" jdbcType="VARCHAR" property="userDef6" />
    <result column="userDef7" jdbcType="VARCHAR" property="userDef7" />
    <result column="userDef8" jdbcType="VARCHAR" property="userDef8" />
    <result column="processStamp" jdbcType="VARCHAR" property="processStamp" />
    <result column="status" jdbcType="SMALLINT" property="status" />
    <result column="recvDock" jdbcType="VARCHAR" property="recvDock" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, warehouseCode, companyCode, containerCode, containerType, taskType, weight, projectNo, 
    locatingRule, fromLocation, toLocation, waveId, taskCreated, created, createdBy, 
    lastUpdated, lastUpdatedBy, version, userDef1, userDef2, userDef3, userDef4, userDef5, 
    userDef6, userDef7, userDef8, processStamp, `status`, recvDock
  </sql>

  <select id="getAGVDetail" resultType="java.util.Map">
    SELECT d.id, d.receiptId, d.receiptCodegetReceiptInfoByBill, d.materialCode, d.batch, d.project, d.qtyCompleted, d.qty, d.project, m.name, s.dictLabel inventoryStatus, '个' unit
    FROM receipt_detail d
           INNER JOIN material m ON d.materialCode = m.code and m.deleted = FALSE AND d.receiptCode = #{receiptCode} and d.zoneCode='AGV'
      AND m.warehouseCode=d.warehouseCode AND d.warehouseCode=#{warehouseCode}
           INNER JOIN sys_dict_data s ON s.dictType = 'inventoryStatus' AND d.inventoryStatus = s.dictValue
      AND s.enable = TRUE AND s.deleted = FALSE
  </select>
  <select id="getAGVReceiptInfoByBill" resultType="java.util.Map">
    select rch.receiptContainerCode as 'containerCode', rch.locationCode, rch.taskType, rch.status,
           rcd.id, rcd.materialCode, rcd.materialName as 'materialName', rcd.materialSpec as 'materialSpec',
           rcd.qty, rcd.created, rcd.createdBy, rcd.headerId, rcd.receiptDetailId, rcd.project
    from receipt_container_header rch
           inner join receipt_container_detail rcd ON
      rcd.headerId=rch.id
    where rch.zoneCode='AGV' AND  rch.warehouseCode=#{warehouseCode} and rcd.receiptCode=#{receiptCode}
  </select>
</mapper>