<?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="doumeemes.dao.ext.WInventoryDetailExtMapper"> 
 | 
  
 | 
  <!-- 管理页面查询 --> 
 | 
  <resultMap id="WInventoryDetailExtListVO" type="doumeemes.dao.ext.vo.WInventoryDetailExtListVO" autoMapping="true"> 
 | 
    <id column="ID" jdbcType="INTEGER" property="id"/> 
 | 
    <association property="imodel" javaType="doumeemes.dao.business.model.WInventory"> 
 | 
      <id column="IMODEL_ID" jdbcType="INTEGER" property="id"/> 
 | 
      <result column="IMODEL_DELETED" jdbcType="TINYINT" property="deleted"/> 
 | 
      <result column="IMODEL_CREATE_USER" jdbcType="INTEGER" property="createUser"/> 
 | 
      <result column="IMODEL_CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/> 
 | 
      <result column="IMODEL_UPDATE_USER" jdbcType="INTEGER" property="updateUser"/> 
 | 
      <result column="IMODEL_UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/> 
 | 
      <result column="IMODEL_REMARK" jdbcType="VARCHAR" property="remark"/> 
 | 
      <result column="IMODEL_ROOT_DEPART_ID" jdbcType="INTEGER" property="rootDepartId"/> 
 | 
      <result column="IMODEL_DEPART_ID" jdbcType="INTEGER" property="departId"/> 
 | 
      <result column="IMODEL_CODE" jdbcType="VARCHAR" property="code"/> 
 | 
      <result column="IMODEL_PALN_DATE" jdbcType="TIMESTAMP" property="palnDate"/> 
 | 
      <result column="IMODEL_USER_ID" jdbcType="INTEGER" property="userId"/> 
 | 
      <result column="IMODEL_WAREHOUSE_ID" jdbcType="INTEGER" property="warehouseId"/> 
 | 
      <result column="IMODEL_COLD_DATE" jdbcType="TIMESTAMP" property="coldDate"/> 
 | 
      <result column="IMODEL_ABSTRACT" jdbcType="VARCHAR" property="abstract"/> 
 | 
      <result column="IMODEL_RECHECK_USER_ID" jdbcType="INTEGER" property="recheckUserId"/> 
 | 
      <result column="IMODEL_DEAL_DATE" jdbcType="TIMESTAMP" property="dealDate"/> 
 | 
      <result column="IMODEL_STATUS" jdbcType="TINYINT" property="status"/> 
 | 
    </association> 
 | 
    <association property="mmodel" javaType="doumeemes.dao.business.model.Material"> 
 | 
      <id column="MMODEL_ID" jdbcType="INTEGER" property="id"/> 
 | 
      <result column="MMODEL_DELETED" jdbcType="TINYINT" property="deleted"/> 
 | 
      <result column="MMODEL_CREATE_USER" jdbcType="INTEGER" property="createUser"/> 
 | 
      <result column="MMODEL_CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/> 
 | 
      <result column="MMODEL_UPDATE_USER" jdbcType="INTEGER" property="updateUser"/> 
 | 
      <result column="MMODEL_UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/> 
 | 
      <result column="MMODEL_REMARK" jdbcType="VARCHAR" property="remark"/> 
 | 
      <result column="MMODEL_ROOT_DEPART_ID" jdbcType="INTEGER" property="rootDepartId"/> 
 | 
      <result column="MMODEL_NAME" jdbcType="VARCHAR" property="name"/> 
 | 
      <result column="MMODEL_CODE" jdbcType="VARCHAR" property="code"/> 
 | 
      <result column="MMODEL_ATTR" jdbcType="VARCHAR" property="attr"/> 
 | 
      <result column="MMODEL_UNION_NAME" jdbcType="VARCHAR" property="unionName"/> 
 | 
      <result column="MMODEL_UNIT_ID" jdbcType="INTEGER" property="unitId"/> 
 | 
      <result column="MMODEL_CATE_UNION_ID" jdbcType="INTEGER" property="cateUnionId"/> 
 | 
      <result column="MMODEL_FORMATION" jdbcType="TINYINT" property="formation"/> 
 | 
      <result column="MMODEL_QRCODE_ID" jdbcType="VARCHAR" property="qrcodeId"/> 
 | 
      <result column="MMODEL_STATUS" jdbcType="TINYINT" property="status"/> 
 | 
      <result column="MMODEL_VALID_TIME" jdbcType="TIMESTAMP" property="validTime"/> 
 | 
      <result column="MMODEL_INVALID_TIME" jdbcType="TIMESTAMP" property="invalidTime"/> 
 | 
      <result column="MMODEL_CHECK_WAY" jdbcType="TINYINT" property="checkWay"/> 
 | 
      <result column="MMODEL_QUALITY_REQUIRE" jdbcType="VARCHAR" property="qualityRequire"/> 
 | 
      <result column="MMODEL_CHECK_NOTE" jdbcType="VARCHAR" property="checkNote"/> 
 | 
    </association> 
 | 
    <association property="umodel" javaType="doumeemes.dao.system.model.SystemUser"> 
 | 
      <id column="UMODEL_ID" jdbcType="INTEGER" property="id"/> 
 | 
      <result column="UMODEL_DELETED" jdbcType="TINYINT" property="deleted"/> 
 | 
      <result column="UMODEL_CREATE_USER" jdbcType="INTEGER" property="createUser"/> 
 | 
      <result column="UMODEL_CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/> 
 | 
      <result column="UMODEL_UPDATE_USER" jdbcType="INTEGER" property="updateUser"/> 
 | 
      <result column="UMODEL_UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/> 
 | 
      <result column="UMODEL_FIXED" jdbcType="TINYINT" property="fixed"/> 
 | 
      <result column="UMODEL_PASSWORD" jdbcType="VARCHAR" property="password"/> 
 | 
      <result column="UMODEL_SALT" jdbcType="VARCHAR" property="salt"/> 
 | 
      <result column="UMODEL_AVATAR" jdbcType="VARCHAR" property="avatar"/> 
 | 
      <result column="UMODEL_MOBILE" jdbcType="VARCHAR" property="mobile"/> 
 | 
      <result column="UMODEL_EMAIL" jdbcType="VARCHAR" property="email"/> 
 | 
      <result column="UMODEL_SEX" jdbcType="VARCHAR" property="sex"/> 
 | 
      <result column="UMODEL_BIRTHDAY" jdbcType="DATE" property="birthday"/> 
 | 
      <result column="UMODEL_EMP_NO" jdbcType="VARCHAR" property="empNo"/> 
 | 
      <result column="UMODEL_REALNAME" jdbcType="VARCHAR" property="realname"/> 
 | 
      <result column="UMODEL_USERNAME" jdbcType="VARCHAR" property="username"/> 
 | 
      <result column="UMODEL_SYSTEMID" jdbcType="VARCHAR" property="systemid"/> 
 | 
      <result column="UMODEL_INVALID_TIME" jdbcType="TIMESTAMP" property="invalidTime"/> 
 | 
      <result column="UMODEL_TYPE" jdbcType="INTEGER" property="type"/> 
 | 
    </association> 
 | 
    <association property="wmodel" javaType="doumeemes.dao.business.model.Warehouse"> 
 | 
      <id column="WMODEL_ID" jdbcType="INTEGER" property="id"/> 
 | 
      <result column="WMODEL_DELETED" jdbcType="TINYINT" property="deleted"/> 
 | 
      <result column="WMODEL_CREATE_USER" jdbcType="INTEGER" property="createUser"/> 
 | 
      <result column="WMODEL_CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/> 
 | 
      <result column="WMODEL_UPDATE_USER" jdbcType="INTEGER" property="updateUser"/> 
 | 
      <result column="WMODEL_UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/> 
 | 
      <result column="WMODEL_REMARK" jdbcType="VARCHAR" property="remark"/> 
 | 
      <result column="WMODEL_ROOT_DEPART_ID" jdbcType="INTEGER" property="rootDepartId"/> 
 | 
      <result column="WMODEL_DEPART_ID" jdbcType="INTEGER" property="departId"/> 
 | 
      <result column="WMODEL_PROCEDURE_ID" jdbcType="INTEGER" property="procedureId"/> 
 | 
      <result column="WMODEL_QRCODE" jdbcType="INTEGER" property="qrcode"/> 
 | 
      <result column="WMODEL_NAME" jdbcType="VARCHAR" property="name"/> 
 | 
      <result column="WMODEL_USE_LOCATION" jdbcType="TINYINT" property="useLocation"/> 
 | 
      <result column="WMODEL_STATUS" jdbcType="TINYINT" property="status"/> 
 | 
      <result column="WMODEL_ADDR" jdbcType="VARCHAR" property="addr"/> 
 | 
    </association> 
 | 
  </resultMap> 
 | 
  <select id="selectList" parameterType="doumeemes.dao.ext.dto.QueryWInventoryDetailExtDTO" resultMap="WInventoryDetailExtListVO"> 
 | 
    SELECT 
 | 
      `a`.`ID`, 
 | 
      `a`.`DELETED`, 
 | 
      `a`.`CREATE_USER`, 
 | 
      `a`.`CREATE_TIME`, 
 | 
      `a`.`UPDATE_USER`, 
 | 
      `a`.`UPDATE_TIME`, 
 | 
      `a`.`REMARK`, 
 | 
      `a`.`ROOT_DEPART_ID`, 
 | 
      `a`.`INVENTORY_ID`, 
 | 
      `a`.`MATERIAL_ID`, 
 | 
      `a`.`UNIT_ID`, 
 | 
      `a`.`USER_ID`, 
 | 
      `a`.`WAREHOUSE_ID`, 
 | 
      `a`.`BATCH`, 
 | 
      `a`.`COLD_NUM`, 
 | 
      `a`.`CHECK_NUM`, 
 | 
      `a`.`DIFF_NUM`, 
 | 
      `imodel`.`ID` AS IMODEL_ID, 
 | 
      `imodel`.`DELETED` AS IMODEL_DELETED, 
 | 
      `imodel`.`CREATE_USER` AS IMODEL_CREATE_USER, 
 | 
      `imodel`.`CREATE_TIME` AS IMODEL_CREATE_TIME, 
 | 
      `imodel`.`UPDATE_USER` AS IMODEL_UPDATE_USER, 
 | 
      `imodel`.`UPDATE_TIME` AS IMODEL_UPDATE_TIME, 
 | 
      `imodel`.`REMARK` AS IMODEL_REMARK, 
 | 
      `imodel`.`ROOT_DEPART_ID` AS IMODEL_ROOT_DEPART_ID, 
 | 
      `imodel`.`DEPART_ID` AS IMODEL_DEPART_ID, 
 | 
      `imodel`.`CODE` AS IMODEL_CODE, 
 | 
      `imodel`.`PALN_DATE` AS IMODEL_PALN_DATE, 
 | 
      `imodel`.`USER_ID` AS IMODEL_USER_ID, 
 | 
      `imodel`.`WAREHOUSE_ID` AS IMODEL_WAREHOUSE_ID, 
 | 
      `imodel`.`COLD_DATE` AS IMODEL_COLD_DATE, 
 | 
      `imodel`.`ABSTRACT` AS IMODEL_ABSTRACT, 
 | 
      `imodel`.`RECHECK_USER_ID` AS IMODEL_RECHECK_USER_ID, 
 | 
      `imodel`.`DEAL_DATE` AS IMODEL_DEAL_DATE, 
 | 
      `imodel`.`STATUS` AS IMODEL_STATUS, 
 | 
      `mmodel`.`ID` AS MMODEL_ID, 
 | 
      `mmodel`.`DELETED` AS MMODEL_DELETED, 
 | 
      `mmodel`.`CREATE_USER` AS MMODEL_CREATE_USER, 
 | 
      `mmodel`.`CREATE_TIME` AS MMODEL_CREATE_TIME, 
 | 
      `mmodel`.`UPDATE_USER` AS MMODEL_UPDATE_USER, 
 | 
      `mmodel`.`UPDATE_TIME` AS MMODEL_UPDATE_TIME, 
 | 
      `mmodel`.`REMARK` AS MMODEL_REMARK, 
 | 
      `mmodel`.`ROOT_DEPART_ID` AS MMODEL_ROOT_DEPART_ID, 
 | 
      `mmodel`.`NAME` AS MMODEL_NAME, 
 | 
      `mmodel`.`CODE` AS MMODEL_CODE, 
 | 
      `mmodel`.`ATTR` AS MMODEL_ATTR, 
 | 
      `mmodel`.`UNION_NAME` AS MMODEL_UNION_NAME, 
 | 
      `mmodel`.`UNIT_ID` AS MMODEL_UNIT_ID, 
 | 
      `mmodel`.`CATE_UNION_ID` AS MMODEL_CATE_UNION_ID, 
 | 
      `mmodel`.`FORMATION` AS MMODEL_FORMATION, 
 | 
      `mmodel`.`QRCODE_ID` AS MMODEL_QRCODE_ID, 
 | 
      `mmodel`.`STATUS` AS MMODEL_STATUS, 
 | 
      `mmodel`.`VALID_TIME` AS MMODEL_VALID_TIME, 
 | 
      `mmodel`.`INVALID_TIME` AS MMODEL_INVALID_TIME, 
 | 
      `mmodel`.`CHECK_WAY` AS MMODEL_CHECK_WAY, 
 | 
      `mmodel`.`QUALITY_REQUIRE` AS MMODEL_QUALITY_REQUIRE, 
 | 
      `mmodel`.`CHECK_NOTE` AS MMODEL_CHECK_NOTE, 
 | 
      `umodel`.`ID` AS UMODEL_ID, 
 | 
      `umodel`.`DELETED` AS UMODEL_DELETED, 
 | 
      `umodel`.`CREATE_USER` AS UMODEL_CREATE_USER, 
 | 
      `umodel`.`CREATE_TIME` AS UMODEL_CREATE_TIME, 
 | 
      `umodel`.`UPDATE_USER` AS UMODEL_UPDATE_USER, 
 | 
      `umodel`.`UPDATE_TIME` AS UMODEL_UPDATE_TIME, 
 | 
      `umodel`.`FIXED` AS UMODEL_FIXED, 
 | 
      `umodel`.`PASSWORD` AS UMODEL_PASSWORD, 
 | 
      `umodel`.`SALT` AS UMODEL_SALT, 
 | 
      `umodel`.`AVATAR` AS UMODEL_AVATAR, 
 | 
      `umodel`.`MOBILE` AS UMODEL_MOBILE, 
 | 
      `umodel`.`EMAIL` AS UMODEL_EMAIL, 
 | 
      `umodel`.`SEX` AS UMODEL_SEX, 
 | 
      `umodel`.`BIRTHDAY` AS UMODEL_BIRTHDAY, 
 | 
      `umodel`.`EMP_NO` AS UMODEL_EMP_NO, 
 | 
      `umodel`.`REALNAME` AS UMODEL_REALNAME, 
 | 
      `umodel`.`USERNAME` AS UMODEL_USERNAME, 
 | 
      `umodel`.`SYSTEMID` AS UMODEL_SYSTEMID, 
 | 
      `umodel`.`INVALID_TIME` AS UMODEL_INVALID_TIME, 
 | 
      `umodel`.`TYPE` AS UMODEL_TYPE, 
 | 
      `wmodel`.`ID` AS WMODEL_ID, 
 | 
      `wmodel`.`DELETED` AS WMODEL_DELETED, 
 | 
      `wmodel`.`CREATE_USER` AS WMODEL_CREATE_USER, 
 | 
      `wmodel`.`CREATE_TIME` AS WMODEL_CREATE_TIME, 
 | 
      `wmodel`.`UPDATE_USER` AS WMODEL_UPDATE_USER, 
 | 
      `wmodel`.`UPDATE_TIME` AS WMODEL_UPDATE_TIME, 
 | 
      `wmodel`.`REMARK` AS WMODEL_REMARK, 
 | 
      `wmodel`.`ROOT_DEPART_ID` AS WMODEL_ROOT_DEPART_ID, 
 | 
      `wmodel`.`DEPART_ID` AS WMODEL_DEPART_ID, 
 | 
      `wmodel`.`PROCEDURE_ID` AS WMODEL_PROCEDURE_ID, 
 | 
      `wmodel`.`QRCODE` AS WMODEL_QRCODE, 
 | 
      `wmodel`.`NAME` AS WMODEL_NAME, 
 | 
      `wmodel`.`USE_LOCATION` AS WMODEL_USE_LOCATION, 
 | 
      `wmodel`.`STATUS` AS WMODEL_STATUS, 
 | 
      `wmodel`.`ADDR` AS WMODEL_ADDR 
 | 
    FROM `w_inventory_detail` `a` 
 | 
    LEFT JOIN `w_inventory` `imodel` ON a.INVENTORY_ID=imodel.ID 
 | 
    LEFT JOIN `material` `mmodel` ON a.MATERIAL_ID=mmodel.ID 
 | 
    LEFT JOIN `system_user` `umodel` ON a.USER_ID=umodel.ID 
 | 
    LEFT JOIN `warehouse` `wmodel` ON a.WAREHOUSE_ID=wmodel.ID 
 | 
    <where> 
 | 
      <if test="id != null"> 
 | 
        AND `a`.`ID` = #{id} 
 | 
      </if> 
 | 
      <if test="deleted != null"> 
 | 
        AND `a`.`DELETED` = #{deleted} 
 | 
      </if> 
 | 
      <if test="createUser != null"> 
 | 
        AND `a`.`CREATE_USER` = #{createUser} 
 | 
      </if> 
 | 
      <if test="createTime != null"> 
 | 
        AND `a`.`CREATE_TIME` = #{createTime} 
 | 
      </if> 
 | 
      <if test="updateUser != null"> 
 | 
        AND `a`.`UPDATE_USER` = #{updateUser} 
 | 
      </if> 
 | 
      <if test="updateTime != null"> 
 | 
        AND `a`.`UPDATE_TIME` = #{updateTime} 
 | 
      </if> 
 | 
      <if test="remark != null and remark != ''"> 
 | 
        AND `a`.`REMARK` = #{remark} 
 | 
      </if> 
 | 
      <if test="rootDepartId != null"> 
 | 
        AND `a`.`ROOT_DEPART_ID` = #{rootDepartId} 
 | 
      </if> 
 | 
      <if test="inventoryId != null"> 
 | 
        AND `a`.`INVENTORY_ID` = #{inventoryId} 
 | 
      </if> 
 | 
      <if test="materialId != null"> 
 | 
        AND `a`.`MATERIAL_ID` = #{materialId} 
 | 
      </if> 
 | 
      <if test="unitId != null"> 
 | 
        AND `a`.`UNIT_ID` = #{unitId} 
 | 
      </if> 
 | 
      <if test="userId != null"> 
 | 
        AND `a`.`USER_ID` = #{userId} 
 | 
      </if> 
 | 
      <if test="warehouseId != null"> 
 | 
        AND `a`.`WAREHOUSE_ID` = #{warehouseId} 
 | 
      </if> 
 | 
      <if test="batch != null and batch != ''"> 
 | 
        AND `a`.`BATCH` = #{batch} 
 | 
      </if> 
 | 
      <if test="coldNum != null"> 
 | 
        AND `a`.`COLD_NUM` = #{coldNum} 
 | 
      </if> 
 | 
      <if test="checkNum != null"> 
 | 
        AND `a`.`CHECK_NUM` = #{checkNum} 
 | 
      </if> 
 | 
      <if test="diffNum != null"> 
 | 
        AND `a`.`DIFF_NUM` = #{diffNum} 
 | 
      </if> 
 | 
      <if test="imodelId != null"> 
 | 
        AND `imodel`.`ID` = #{imodelId} 
 | 
      </if> 
 | 
      <if test="imodelDeleted != null"> 
 | 
        AND `imodel`.`DELETED` = #{imodelDeleted} 
 | 
      </if> 
 | 
      <if test="imodelCreateUser != null"> 
 | 
        AND `imodel`.`CREATE_USER` = #{imodelCreateUser} 
 | 
      </if> 
 | 
      <if test="imodelCreateTime != null"> 
 | 
        AND `imodel`.`CREATE_TIME` = #{imodelCreateTime} 
 | 
      </if> 
 | 
      <if test="imodelUpdateUser != null"> 
 | 
        AND `imodel`.`UPDATE_USER` = #{imodelUpdateUser} 
 | 
      </if> 
 | 
      <if test="imodelUpdateTime != null"> 
 | 
        AND `imodel`.`UPDATE_TIME` = #{imodelUpdateTime} 
 | 
      </if> 
 | 
      <if test="imodelRemark != null and imodelRemark != ''"> 
 | 
        AND `imodel`.`REMARK` = #{imodelRemark} 
 | 
      </if> 
 | 
      <if test="imodelRootDepartId != null"> 
 | 
        AND `imodel`.`ROOT_DEPART_ID` = #{imodelRootDepartId} 
 | 
      </if> 
 | 
      <if test="imodelDepartId != null"> 
 | 
        AND `imodel`.`DEPART_ID` = #{imodelDepartId} 
 | 
      </if> 
 | 
      <if test="imodelCode != null and imodelCode != ''"> 
 | 
        AND `imodel`.`CODE` = #{imodelCode} 
 | 
      </if> 
 | 
      <if test="imodelPalnDate != null"> 
 | 
        AND `imodel`.`PALN_DATE` = #{imodelPalnDate} 
 | 
      </if> 
 | 
      <if test="imodelUserId != null"> 
 | 
        AND `imodel`.`USER_ID` = #{imodelUserId} 
 | 
      </if> 
 | 
      <if test="imodelWarehouseId != null"> 
 | 
        AND `imodel`.`WAREHOUSE_ID` = #{imodelWarehouseId} 
 | 
      </if> 
 | 
      <if test="imodelColdDate != null"> 
 | 
        AND `imodel`.`COLD_DATE` = #{imodelColdDate} 
 | 
      </if> 
 | 
      <if test="imodelAbstract != null and imodelAbstract != ''"> 
 | 
        AND `imodel`.`ABSTRACT` = #{imodelAbstract} 
 | 
      </if> 
 | 
      <if test="imodelRecheckUserId != null"> 
 | 
        AND `imodel`.`RECHECK_USER_ID` = #{imodelRecheckUserId} 
 | 
      </if> 
 | 
      <if test="imodelDealDate != null"> 
 | 
        AND `imodel`.`DEAL_DATE` = #{imodelDealDate} 
 | 
      </if> 
 | 
      <if test="imodelStatus != null"> 
 | 
        AND `imodel`.`STATUS` = #{imodelStatus} 
 | 
      </if> 
 | 
      <if test="mmodelId != null"> 
 | 
        AND `mmodel`.`ID` = #{mmodelId} 
 | 
      </if> 
 | 
      <if test="mmodelDeleted != null"> 
 | 
        AND `mmodel`.`DELETED` = #{mmodelDeleted} 
 | 
      </if> 
 | 
      <if test="mmodelCreateUser != null"> 
 | 
        AND `mmodel`.`CREATE_USER` = #{mmodelCreateUser} 
 | 
      </if> 
 | 
      <if test="mmodelCreateTime != null"> 
 | 
        AND `mmodel`.`CREATE_TIME` = #{mmodelCreateTime} 
 | 
      </if> 
 | 
      <if test="mmodelUpdateUser != null"> 
 | 
        AND `mmodel`.`UPDATE_USER` = #{mmodelUpdateUser} 
 | 
      </if> 
 | 
      <if test="mmodelUpdateTime != null"> 
 | 
        AND `mmodel`.`UPDATE_TIME` = #{mmodelUpdateTime} 
 | 
      </if> 
 | 
      <if test="mmodelRemark != null and mmodelRemark != ''"> 
 | 
        AND `mmodel`.`REMARK` = #{mmodelRemark} 
 | 
      </if> 
 | 
      <if test="mmodelRootDepartId != null"> 
 | 
        AND `mmodel`.`ROOT_DEPART_ID` = #{mmodelRootDepartId} 
 | 
      </if> 
 | 
      <if test="mmodelName != null and mmodelName != ''"> 
 | 
        AND `mmodel`.`NAME` = #{mmodelName} 
 | 
      </if> 
 | 
      <if test="mmodelCode != null and mmodelCode != ''"> 
 | 
        AND `mmodel`.`CODE` = #{mmodelCode} 
 | 
      </if> 
 | 
      <if test="mmodelAttr != null and mmodelAttr != ''"> 
 | 
        AND `mmodel`.`ATTR` = #{mmodelAttr} 
 | 
      </if> 
 | 
      <if test="mmodelUnionName != null and mmodelUnionName != ''"> 
 | 
        AND `mmodel`.`UNION_NAME` = #{mmodelUnionName} 
 | 
      </if> 
 | 
      <if test="mmodelUnitId != null"> 
 | 
        AND `mmodel`.`UNIT_ID` = #{mmodelUnitId} 
 | 
      </if> 
 | 
      <if test="mmodelCateUnionId != null"> 
 | 
        AND `mmodel`.`CATE_UNION_ID` = #{mmodelCateUnionId} 
 | 
      </if> 
 | 
      <if test="mmodelFormation != null"> 
 | 
        AND `mmodel`.`FORMATION` = #{mmodelFormation} 
 | 
      </if> 
 | 
      <if test="mmodelQrcodeId != null and mmodelQrcodeId != ''"> 
 | 
        AND `mmodel`.`QRCODE_ID` = #{mmodelQrcodeId} 
 | 
      </if> 
 | 
      <if test="mmodelStatus != null"> 
 | 
        AND `mmodel`.`STATUS` = #{mmodelStatus} 
 | 
      </if> 
 | 
      <if test="mmodelValidTime != null"> 
 | 
        AND `mmodel`.`VALID_TIME` = #{mmodelValidTime} 
 | 
      </if> 
 | 
      <if test="mmodelInvalidTime != null"> 
 | 
        AND `mmodel`.`INVALID_TIME` = #{mmodelInvalidTime} 
 | 
      </if> 
 | 
      <if test="mmodelCheckWay != null"> 
 | 
        AND `mmodel`.`CHECK_WAY` = #{mmodelCheckWay} 
 | 
      </if> 
 | 
      <if test="mmodelQualityRequire != null and mmodelQualityRequire != ''"> 
 | 
        AND `mmodel`.`QUALITY_REQUIRE` = #{mmodelQualityRequire} 
 | 
      </if> 
 | 
      <if test="mmodelCheckNote != null and mmodelCheckNote != ''"> 
 | 
        AND `mmodel`.`CHECK_NOTE` = #{mmodelCheckNote} 
 | 
      </if> 
 | 
      <if test="umodelId != null"> 
 | 
        AND `umodel`.`ID` = #{umodelId} 
 | 
      </if> 
 | 
      <if test="umodelDeleted != null"> 
 | 
        AND `umodel`.`DELETED` = #{umodelDeleted} 
 | 
      </if> 
 | 
      <if test="umodelCreateUser != null"> 
 | 
        AND `umodel`.`CREATE_USER` = #{umodelCreateUser} 
 | 
      </if> 
 | 
      <if test="umodelCreateTime != null"> 
 | 
        AND `umodel`.`CREATE_TIME` = #{umodelCreateTime} 
 | 
      </if> 
 | 
      <if test="umodelUpdateUser != null"> 
 | 
        AND `umodel`.`UPDATE_USER` = #{umodelUpdateUser} 
 | 
      </if> 
 | 
      <if test="umodelUpdateTime != null"> 
 | 
        AND `umodel`.`UPDATE_TIME` = #{umodelUpdateTime} 
 | 
      </if> 
 | 
      <if test="umodelFixed != null"> 
 | 
        AND `umodel`.`FIXED` = #{umodelFixed} 
 | 
      </if> 
 | 
      <if test="umodelPassword != null and umodelPassword != ''"> 
 | 
        AND `umodel`.`PASSWORD` = #{umodelPassword} 
 | 
      </if> 
 | 
      <if test="umodelSalt != null and umodelSalt != ''"> 
 | 
        AND `umodel`.`SALT` = #{umodelSalt} 
 | 
      </if> 
 | 
      <if test="umodelAvatar != null and umodelAvatar != ''"> 
 | 
        AND `umodel`.`AVATAR` = #{umodelAvatar} 
 | 
      </if> 
 | 
      <if test="umodelMobile != null and umodelMobile != ''"> 
 | 
        AND `umodel`.`MOBILE` = #{umodelMobile} 
 | 
      </if> 
 | 
      <if test="umodelEmail != null and umodelEmail != ''"> 
 | 
        AND `umodel`.`EMAIL` = #{umodelEmail} 
 | 
      </if> 
 | 
      <if test="umodelSex != null and umodelSex != ''"> 
 | 
        AND `umodel`.`SEX` = #{umodelSex} 
 | 
      </if> 
 | 
      <if test="umodelBirthday != null"> 
 | 
        AND `umodel`.`BIRTHDAY` = #{umodelBirthday} 
 | 
      </if> 
 | 
      <if test="umodelEmpNo != null and umodelEmpNo != ''"> 
 | 
        AND `umodel`.`EMP_NO` = #{umodelEmpNo} 
 | 
      </if> 
 | 
      <if test="umodelRealname != null and umodelRealname != ''"> 
 | 
        AND `umodel`.`REALNAME` = #{umodelRealname} 
 | 
      </if> 
 | 
      <if test="umodelUsername != null and umodelUsername != ''"> 
 | 
        AND `umodel`.`USERNAME` = #{umodelUsername} 
 | 
      </if> 
 | 
      <if test="umodelSystemid != null and umodelSystemid != ''"> 
 | 
        AND `umodel`.`SYSTEMID` = #{umodelSystemid} 
 | 
      </if> 
 | 
      <if test="umodelInvalidTime != null"> 
 | 
        AND `umodel`.`INVALID_TIME` = #{umodelInvalidTime} 
 | 
      </if> 
 | 
      <if test="umodelType != null"> 
 | 
        AND `umodel`.`TYPE` = #{umodelType} 
 | 
      </if> 
 | 
      <if test="wmodelId != null"> 
 | 
        AND `wmodel`.`ID` = #{wmodelId} 
 | 
      </if> 
 | 
      <if test="wmodelDeleted != null"> 
 | 
        AND `wmodel`.`DELETED` = #{wmodelDeleted} 
 | 
      </if> 
 | 
      <if test="wmodelCreateUser != null"> 
 | 
        AND `wmodel`.`CREATE_USER` = #{wmodelCreateUser} 
 | 
      </if> 
 | 
      <if test="wmodelCreateTime != null"> 
 | 
        AND `wmodel`.`CREATE_TIME` = #{wmodelCreateTime} 
 | 
      </if> 
 | 
      <if test="wmodelUpdateUser != null"> 
 | 
        AND `wmodel`.`UPDATE_USER` = #{wmodelUpdateUser} 
 | 
      </if> 
 | 
      <if test="wmodelUpdateTime != null"> 
 | 
        AND `wmodel`.`UPDATE_TIME` = #{wmodelUpdateTime} 
 | 
      </if> 
 | 
      <if test="wmodelRemark != null and wmodelRemark != ''"> 
 | 
        AND `wmodel`.`REMARK` = #{wmodelRemark} 
 | 
      </if> 
 | 
      <if test="wmodelRootDepartId != null"> 
 | 
        AND `wmodel`.`ROOT_DEPART_ID` = #{wmodelRootDepartId} 
 | 
      </if> 
 | 
      <if test="wmodelDepartId != null"> 
 | 
        AND `wmodel`.`DEPART_ID` = #{wmodelDepartId} 
 | 
      </if> 
 | 
      <if test="wmodelProcedureId != null"> 
 | 
        AND `wmodel`.`PROCEDURE_ID` = #{wmodelProcedureId} 
 | 
      </if> 
 | 
      <if test="wmodelQrcode != null"> 
 | 
        AND `wmodel`.`QRCODE` = #{wmodelQrcode} 
 | 
      </if> 
 | 
      <if test="wmodelName != null and wmodelName != ''"> 
 | 
        AND `wmodel`.`NAME` = #{wmodelName} 
 | 
      </if> 
 | 
      <if test="wmodelUseLocation != null"> 
 | 
        AND `wmodel`.`USE_LOCATION` = #{wmodelUseLocation} 
 | 
      </if> 
 | 
      <if test="wmodelStatus != null"> 
 | 
        AND `wmodel`.`STATUS` = #{wmodelStatus} 
 | 
      </if> 
 | 
      <if test="wmodelAddr != null and wmodelAddr != ''"> 
 | 
        AND `wmodel`.`ADDR` = #{wmodelAddr} 
 | 
      </if> 
 | 
    </where> 
 | 
  </select> 
 | 
</mapper> 
 |