<?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.BarcodeSgExtMapper">
|
|
<!-- 管理页面查询 -->
|
<resultMap id="BarcodeSgExtListVO" type="doumeemes.dao.ext.vo.BarcodeSgExtListVO" autoMapping="true">
|
<id column="ID" jdbcType="INTEGER" property="id"/>
|
<association property="dmodel" javaType="doumeemes.dao.business.model.Department">
|
<id column="DMODEL_ID" jdbcType="INTEGER" property="id"/>
|
<result column="DMODEL_DELETED" jdbcType="TINYINT" property="deleted"/>
|
<result column="DMODEL_CREATE_USER" jdbcType="INTEGER" property="createUser"/>
|
<result column="DMODEL_CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
<result column="DMODEL_UPDATE_USER" jdbcType="INTEGER" property="updateUser"/>
|
<result column="DMODEL_UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
|
<result column="DMODEL_NAME" jdbcType="VARCHAR" property="name"/>
|
<result column="DMODEL_REMARK" jdbcType="VARCHAR" property="remark"/>
|
<result column="DMODEL_ROOT_ID" jdbcType="INTEGER" property="rootId"/>
|
<result column="DMODEL_PARENT_ID" jdbcType="INTEGER" property="parentId"/>
|
<result column="DMODEL_COMPANY_ID" jdbcType="INTEGER" property="companyId"/>
|
<result column="DMODEL_TYPE" jdbcType="TINYINT" property="type"/>
|
<result column="DMODEL_ERP_ID" jdbcType="VARCHAR" property="erpId"/>
|
<result column="DMODEL_STATUS" jdbcType="INTEGER" property="status"/>
|
<result column="DMODEL_VALID_TIME" jdbcType="TIMESTAMP" property="validTime"/>
|
<result column="DMODEL_INVALID_TIME" jdbcType="TIMESTAMP" property="invalidTime"/>
|
</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="devmodel" javaType="doumeemes.dao.business.model.Device">
|
<id column="DEVMODEL_ID" jdbcType="INTEGER" property="id"/>
|
<result column="DEVMODEL_DELETED" jdbcType="TINYINT" property="deleted"/>
|
<result column="DEVMODEL_CREATE_USER" jdbcType="INTEGER" property="createUser"/>
|
<result column="DEVMODEL_CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
<result column="DEVMODEL_UPDATE_USER" jdbcType="INTEGER" property="updateUser"/>
|
<result column="DEVMODEL_UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
|
<result column="DEVMODEL_REMARK" jdbcType="VARCHAR" property="remark"/>
|
<result column="DEVMODEL_ROOT_DEPART_ID" jdbcType="INTEGER" property="rootDepartId"/>
|
<result column="DEVMODEL_DEPART_ID" jdbcType="INTEGER" property="departId"/>
|
<result column="DEVMODEL_PROCEDURE_ID" jdbcType="INTEGER" property="procedureId"/>
|
<result column="DEVMODEL_CODE" jdbcType="INTEGER" property="code"/>
|
<result column="DEVMODEL_TYPE" jdbcType="TINYINT" property="type"/>
|
<result column="DEVMODEL_NAME" jdbcType="VARCHAR" property="name"/>
|
<result column="DEVMODEL_MODEL" jdbcType="VARCHAR" property="model"/>
|
<result column="DEVMODEL_STATUS" jdbcType="TINYINT" property="status"/>
|
<result column="DEVMODEL_SUPPLIER" jdbcType="VARCHAR" property="supplier"/>
|
<result column="DEVMODEL_STATION_CODE" jdbcType="VARCHAR" property="stationCode"/>
|
<result column="DEVMODEL_GROUP_ID" jdbcType="INTEGER" property="groupId"/>
|
<result column="DEVMODEL_SERIAL_NUM" jdbcType="VARCHAR" property="serialNum"/>
|
</association>
|
</resultMap>
|
<select id="selectList" parameterType="doumeemes.dao.ext.dto.QueryBarcodeSgExtDTO" resultMap="BarcodeSgExtListVO">
|
SELECT
|
`a`.`ID`,
|
`a`.`DELETED`,
|
`a`.`CREATE_USER`,
|
`a`.`CREATE_TIME`,
|
`a`.`UPDATE_USER`,
|
`a`.`UPDATE_TIME`,
|
`a`.`REMARK`,
|
`a`.`ROOT_DEPART_ID`,
|
`a`.`DEPART_ID`,
|
`a`.`MATERIAL_ID`,
|
`a`.`CODE`,
|
`a`.`BRAND`,
|
`a`.`TYPE`,
|
`a`.`IP`,
|
`a`.`MODEL`,
|
`a`.`SERIAL_NUM`,
|
`a`.`DEVICE_ID`,
|
`a`.`STATION_CODE`,
|
`a`.`POSITION_TYPE`,
|
`a`.`REG_TIME`,
|
`a`.`BIND_TIME`,
|
`a`.`STATUS`,
|
`dmodel`.`ID` AS DMODEL_ID,
|
`dmodel`.`DELETED` AS DMODEL_DELETED,
|
`dmodel`.`CREATE_USER` AS DMODEL_CREATE_USER,
|
`dmodel`.`CREATE_TIME` AS DMODEL_CREATE_TIME,
|
`dmodel`.`UPDATE_USER` AS DMODEL_UPDATE_USER,
|
`dmodel`.`UPDATE_TIME` AS DMODEL_UPDATE_TIME,
|
`dmodel`.`NAME` AS DMODEL_NAME,
|
`dmodel`.`REMARK` AS DMODEL_REMARK,
|
`dmodel`.`ROOT_ID` AS DMODEL_ROOT_ID,
|
`dmodel`.`PARENT_ID` AS DMODEL_PARENT_ID,
|
`dmodel`.`COMPANY_ID` AS DMODEL_COMPANY_ID,
|
`dmodel`.`TYPE` AS DMODEL_TYPE,
|
`dmodel`.`ERP_ID` AS DMODEL_ERP_ID,
|
`dmodel`.`STATUS` AS DMODEL_STATUS,
|
`dmodel`.`VALID_TIME` AS DMODEL_VALID_TIME,
|
`dmodel`.`INVALID_TIME` AS DMODEL_INVALID_TIME,
|
`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,
|
`devmodel`.`ID` AS DEVMODEL_ID,
|
`devmodel`.`DELETED` AS DEVMODEL_DELETED,
|
`devmodel`.`CREATE_USER` AS DEVMODEL_CREATE_USER,
|
`devmodel`.`CREATE_TIME` AS DEVMODEL_CREATE_TIME,
|
`devmodel`.`UPDATE_USER` AS DEVMODEL_UPDATE_USER,
|
`devmodel`.`UPDATE_TIME` AS DEVMODEL_UPDATE_TIME,
|
`devmodel`.`REMARK` AS DEVMODEL_REMARK,
|
`devmodel`.`ROOT_DEPART_ID` AS DEVMODEL_ROOT_DEPART_ID,
|
`devmodel`.`DEPART_ID` AS DEVMODEL_DEPART_ID,
|
`devmodel`.`PROCEDURE_ID` AS DEVMODEL_PROCEDURE_ID,
|
`devmodel`.`CODE` AS DEVMODEL_CODE,
|
`devmodel`.`TYPE` AS DEVMODEL_TYPE,
|
`devmodel`.`NAME` AS DEVMODEL_NAME,
|
`devmodel`.`MODEL` AS DEVMODEL_MODEL,
|
`devmodel`.`STATUS` AS DEVMODEL_STATUS,
|
`devmodel`.`SUPPLIER` AS DEVMODEL_SUPPLIER,
|
`devmodel`.`STATION_CODE` AS DEVMODEL_STATION_CODE,
|
`devmodel`.`GROUP_ID` AS DEVMODEL_GROUP_ID,
|
`devmodel`.`SERIAL_NUM` AS DEVMODEL_SERIAL_NUM
|
FROM `barcode_sg` `a`
|
LEFT JOIN `department` `dmodel` ON a.DEPART_ID=dmodel.ID
|
LEFT JOIN `material` `mmodel` ON a.MATERIAL_ID=mmodel.ID
|
LEFT JOIN `device` `devmodel` ON a.DEVICE_ID=devmodel.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="departId != null">
|
AND `a`.`DEPART_ID` = #{departId}
|
</if>
|
<if test="materialId != null">
|
AND `a`.`MATERIAL_ID` = #{materialId}
|
</if>
|
<if test="code != null">
|
AND `a`.`CODE` = #{code}
|
</if>
|
<if test="brand != null">
|
AND `a`.`BRAND` = #{brand}
|
</if>
|
<if test="type != null">
|
AND `a`.`TYPE` = #{type}
|
</if>
|
<if test="ip != null and ip != ''">
|
AND `a`.`IP` = #{ip}
|
</if>
|
<if test="model != null and model != ''">
|
AND `a`.`MODEL` = #{model}
|
</if>
|
<if test="serialNum != null and serialNum != ''">
|
AND `a`.`SERIAL_NUM` = #{serialNum}
|
</if>
|
<if test="deviceId != null">
|
AND `a`.`DEVICE_ID` = #{deviceId}
|
</if>
|
<if test="stationCode != null and stationCode != ''">
|
AND `a`.`STATION_CODE` = #{stationCode}
|
</if>
|
<if test="positionType != null">
|
AND `a`.`POSITION_TYPE` = #{positionType}
|
</if>
|
<if test="regTime != null">
|
AND `a`.`REG_TIME` = #{regTime}
|
</if>
|
<if test="bindTime != null">
|
AND `a`.`BIND_TIME` = #{bindTime}
|
</if>
|
<if test="status != null">
|
AND `a`.`STATUS` = #{status}
|
</if>
|
<if test="dmodelId != null">
|
AND `dmodel`.`ID` = #{dmodelId}
|
</if>
|
<if test="dmodelDeleted != null">
|
AND `dmodel`.`DELETED` = #{dmodelDeleted}
|
</if>
|
<if test="dmodelCreateUser != null">
|
AND `dmodel`.`CREATE_USER` = #{dmodelCreateUser}
|
</if>
|
<if test="dmodelCreateTime != null">
|
AND `dmodel`.`CREATE_TIME` = #{dmodelCreateTime}
|
</if>
|
<if test="dmodelUpdateUser != null">
|
AND `dmodel`.`UPDATE_USER` = #{dmodelUpdateUser}
|
</if>
|
<if test="dmodelUpdateTime != null">
|
AND `dmodel`.`UPDATE_TIME` = #{dmodelUpdateTime}
|
</if>
|
<if test="dmodelName != null and dmodelName != ''">
|
AND `dmodel`.`NAME` = #{dmodelName}
|
</if>
|
<if test="dmodelRemark != null and dmodelRemark != ''">
|
AND `dmodel`.`REMARK` = #{dmodelRemark}
|
</if>
|
<if test="dmodelRootId != null">
|
AND `dmodel`.`ROOT_ID` = #{dmodelRootId}
|
</if>
|
<if test="dmodelParentId != null">
|
AND `dmodel`.`PARENT_ID` = #{dmodelParentId}
|
</if>
|
<if test="dmodelCompanyId != null">
|
AND `dmodel`.`COMPANY_ID` = #{dmodelCompanyId}
|
</if>
|
<if test="dmodelType != null">
|
AND `dmodel`.`TYPE` = #{dmodelType}
|
</if>
|
<if test="dmodelErpId != null and dmodelErpId != ''">
|
AND `dmodel`.`ERP_ID` = #{dmodelErpId}
|
</if>
|
<if test="dmodelStatus != null">
|
AND `dmodel`.`STATUS` = #{dmodelStatus}
|
</if>
|
<if test="dmodelValidTime != null">
|
AND `dmodel`.`VALID_TIME` = #{dmodelValidTime}
|
</if>
|
<if test="dmodelInvalidTime != null">
|
AND `dmodel`.`INVALID_TIME` = #{dmodelInvalidTime}
|
</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="devmodelId != null">
|
AND `devmodel`.`ID` = #{devmodelId}
|
</if>
|
<if test="devmodelDeleted != null">
|
AND `devmodel`.`DELETED` = #{devmodelDeleted}
|
</if>
|
<if test="devmodelCreateUser != null">
|
AND `devmodel`.`CREATE_USER` = #{devmodelCreateUser}
|
</if>
|
<if test="devmodelCreateTime != null">
|
AND `devmodel`.`CREATE_TIME` = #{devmodelCreateTime}
|
</if>
|
<if test="devmodelUpdateUser != null">
|
AND `devmodel`.`UPDATE_USER` = #{devmodelUpdateUser}
|
</if>
|
<if test="devmodelUpdateTime != null">
|
AND `devmodel`.`UPDATE_TIME` = #{devmodelUpdateTime}
|
</if>
|
<if test="devmodelRemark != null and devmodelRemark != ''">
|
AND `devmodel`.`REMARK` = #{devmodelRemark}
|
</if>
|
<if test="devmodelRootDepartId != null">
|
AND `devmodel`.`ROOT_DEPART_ID` = #{devmodelRootDepartId}
|
</if>
|
<if test="devmodelDepartId != null">
|
AND `devmodel`.`DEPART_ID` = #{devmodelDepartId}
|
</if>
|
<if test="devmodelProcedureId != null">
|
AND `devmodel`.`PROCEDURE_ID` = #{devmodelProcedureId}
|
</if>
|
<if test="devmodelCode != null">
|
AND `devmodel`.`CODE` = #{devmodelCode}
|
</if>
|
<if test="devmodelType != null">
|
AND `devmodel`.`TYPE` = #{devmodelType}
|
</if>
|
<if test="devmodelName != null and devmodelName != ''">
|
AND `devmodel`.`NAME` = #{devmodelName}
|
</if>
|
<if test="devmodelModel != null and devmodelModel != ''">
|
AND `devmodel`.`MODEL` = #{devmodelModel}
|
</if>
|
<if test="devmodelStatus != null">
|
AND `devmodel`.`STATUS` = #{devmodelStatus}
|
</if>
|
<if test="devmodelSupplier != null and devmodelSupplier != ''">
|
AND `devmodel`.`SUPPLIER` = #{devmodelSupplier}
|
</if>
|
<if test="devmodelStationCode != null and devmodelStationCode != ''">
|
AND `devmodel`.`STATION_CODE` = #{devmodelStationCode}
|
</if>
|
<if test="devmodelGroupId != null">
|
AND `devmodel`.`GROUP_ID` = #{devmodelGroupId}
|
</if>
|
<if test="devmodelSerialNum != null and devmodelSerialNum != ''">
|
AND `devmodel`.`SERIAL_NUM` = #{devmodelSerialNum}
|
</if>
|
</where>
|
</select>
|
</mapper>
|