You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
3.0 KiB
XML
77 lines
3.0 KiB
XML
<?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.glxp.api.dao.inv.DeptDeviceDetailDao">
|
|
<select id="selectMaxCode" resultType="java.lang.String">
|
|
select IFNULL(max(code), 10000000)
|
|
from dept_device_detail
|
|
</select>
|
|
|
|
<select id="filterList" resultType="com.glxp.api.res.inv.DeptDeviceDetailResponse">
|
|
select t.id,
|
|
t.deptCode,
|
|
t.invCode,
|
|
t.originCode,
|
|
t.code,
|
|
t.relId,
|
|
t.deviceName,
|
|
t.ggxh,
|
|
t.batchNo,
|
|
t.serialNo,
|
|
t.productionDate,
|
|
t.expireDate,
|
|
t.manufactory,
|
|
t.measname,
|
|
t.zczbhhzbapzbh,
|
|
t.supId,
|
|
t.supName,
|
|
t.status,
|
|
t.addType,
|
|
t.maTime,
|
|
t.remark,
|
|
(select employeeName from auth_user where id = t.createUser) creatUserName,
|
|
(select employeeName from auth_user where id = t.manager) managerName,
|
|
(select `name` from auth_dept where code = t.deptCode) deptName,
|
|
(select `name` from auth_warehouse where code = t.invCode) invName
|
|
from dept_device_detail t
|
|
<where>
|
|
<if test="deptCode != null and deptCode != ''">
|
|
AND t.deptCode = #{deptCode}
|
|
</if>
|
|
<if test="invCode != null and invCode != ''">
|
|
AND t.invCode = #{invCode}
|
|
</if>
|
|
<if test="deviceName != null and deviceName != ''">
|
|
AND t.deviceName like concat('%', #{deviceName}, '%')
|
|
</if>
|
|
<if test="code != null and code != ''">
|
|
AND t.code like concat('%', #{code}, '%')
|
|
</if>
|
|
<if test="originCode != null and originCode != ''">
|
|
AND t.originCode like concat('%', #{originCode}, '%')
|
|
</if>
|
|
<if test="ggxh != null and ggxh != ''">
|
|
AND t.ggxh like concat('%', #{ggxh}, '%')
|
|
</if>
|
|
<if test="batchNo != null and batchNo != ''">
|
|
AND t.batchNo like concat('%', #{batchNo}, '%')
|
|
</if>
|
|
<if test="status != null">
|
|
AND t.status = #{status}
|
|
</if>
|
|
<if test="addType != null">
|
|
AND t.addType = #{addType}
|
|
</if>
|
|
</where>
|
|
group by t.code
|
|
order by t.updateTime desc
|
|
</select>
|
|
|
|
<select id="selectInspectSet" resultType="com.glxp.api.res.inv.DeviceInspectSetResponse">
|
|
select (select `name` from auth_dept where code = t.deptCode) deptName,
|
|
(select `name` from auth_warehouse where code = t.invCode) invName,
|
|
t.deviceName,
|
|
t.code
|
|
from dept_device_detail t
|
|
where t.code = #{code}
|
|
</select>
|
|
</mapper> |