|
@@ -3,7 +3,7 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ruoyi.project.invoice.mapper.TInvoiceDeviceMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="TInvoiceDevice" id="TInvoiceDeviceResult">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="devName" column="dev_name" />
|
|
@@ -17,16 +17,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="deptId" column="dept_id" />
|
|
|
<result property="remarks" column="remarks" />
|
|
|
<result property="deptName" column="dept_name" />
|
|
|
+ <result property="createrName" column="creater_name" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTInvoiceDeviceVo">
|
|
|
- select d.id, d.dev_name, d.work_area, d.regional_head, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_invoice_device d
|
|
|
+ select d.id, d.dev_name, d.work_area, d.regional_head, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name,su.nick_name as creater_name from t_invoice_device d
|
|
|
left join sys_dept s on s.dept_id = d.dept_id
|
|
|
+ left join sys_user su on su.user_id=to_number(d.creater_code)
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTInvoiceDeviceList" parameterType="TInvoiceDevice" resultMap="TInvoiceDeviceResult">
|
|
|
<include refid="selectTInvoiceDeviceVo"/>
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="devName != null and devName != ''"> and dev_name like concat(concat('%', #{devName}), '%')</if>
|
|
|
<if test="workArea != null and workArea != ''"> and work_area = #{workArea}</if>
|
|
|
<if test="regionalHead != null and regionalHead != ''"> and regional_head = #{regionalHead}</if>
|
|
@@ -46,13 +48,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
select d.work_area from t_invoice_device d left join sys_dept s on s.dept_id = d.dept_id
|
|
|
where d.del_flag = 0
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectTInvoiceDeviceById" parameterType="Long" resultMap="TInvoiceDeviceResult">
|
|
|
<include refid="selectTInvoiceDeviceVo"/>
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
+
|
|
|
<insert id="insertTInvoiceDevice" parameterType="TInvoiceDevice">
|
|
|
<selectKey keyProperty="id" resultType="long" order="BEFORE">
|
|
|
SELECT seq_t_invoice_device.NEXTVAL as id FROM DUAL
|
|
@@ -113,5 +115,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
-
|
|
|
-</mapper>
|
|
|
+
|
|
|
+</mapper>
|