Commit f40d98be authored by 竹天卫's avatar 竹天卫

11111

parent 169620c3
......@@ -187,9 +187,55 @@
(@i:=@i+1) as 序号,
IF(ISNULL(e.id),'',e.id) as entrustId,
IF(ISNULL(e.entrust_code),'',e.entrust_code) as 委托单号,
IF(ISNULL(c.name),'',c.name) as 委托单位,
IF(ISNULL(p.code),'',p.code) as 项目编号,
IF(ISNULL(p.name),'',p.name) as 项目名称,
IF(ISNULL(su.name),'',su.name) as 委托人,
IF(ISNULL(e.sample_num),'',e.sample_num) as 样品数量,
IF(ISNULL(e.entrust_date),'',e.entrust_date) as 委托日期,
IF(ISNULL(e.is_urgent),'',e.is_urgent) as isUrgent,
(
CASE e.is_urgent
WHEN 0 THEN '不加急'
WHEN 1 THEN '加急'
ELSE ''
END
) as 是否加急
from entrust e
left join project p on p.id = e.project_id
left join client c on c.id = e.client_id
left join sys_user su on su.id = e.user_id
,(select @i:=0)aa
where e.status != 0 and e.project_type is not null
<if test="params.clientId != null">
and e.clientId = #{clientId}
</if>
<if test="params.clientName != null and params.clientName != ''">
and c.name like concat('%', #{params.clientName}, '%')
</if>
<if test="params.startDate != null and params.startDate != ''">
and DATE(e.create_time) &gt;= #{params.startDate}
</if>
<if test="params.endDate != null and params.endDate != ''">
and DATE(e.create_time) &lt;= #{params.endDate}
</if>
order by 序号
</select>
<select id="exportEntrustNewList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
e.id as entrustId,
IF(ISNULL(e.entrust_code),'',e.entrust_code) as 委托单号,
(
CASE e.is_urgent
WHEN 0 THEN '不加急'
WHEN 1 THEN '加急'
ELSE NULL
END
) as 是否加急,
IF(ISNULL(p.name),'',p.name) as 项目名称,
IF(ISNULL(p.name),'',p.name) as 项目编号,
IF(ISNULL(e.project_type),'',e.project_type) as 项目类型,
IF(ISNULL(p.code),'',p.code) as 项目编号,
IF(ISNULL(su.name),'',su.name) as 委托人,
IF(ISNULL(c.name),'',c.name) as 委托单位,
IF(ISNULL(e.entrust_date),'',e.entrust_date) as 委托日期,
......@@ -206,6 +252,7 @@
WHEN 7 THEN '校核中'
WHEN 8 THEN '校核完成'
WHEN 9 THEN '修改待确认'
WHEN 10 THEN '已作废'
ELSE ''
END
) as 状态
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment