|
@@ -687,7 +687,7 @@
|
|
|
<select id="selectTechProjectDetail" resultType="com.goafanti.techproject.bo.ProjectDetailBo">
|
|
<select id="selectTechProjectDetail" resultType="com.goafanti.techproject.bo.ProjectDetailBo">
|
|
|
<choose>
|
|
<choose>
|
|
|
<when test="buyerType == 0">
|
|
<when test="buyerType == 0">
|
|
|
- select
|
|
|
|
|
|
|
+ select
|
|
|
a.id,
|
|
a.id,
|
|
|
a.serial_number as serialNumber,
|
|
a.serial_number as serialNumber,
|
|
|
date_format( a.sign_date, '%Y-%m-%d %H:%i:%S' ) as signDate,
|
|
date_format( a.sign_date, '%Y-%m-%d %H:%i:%S' ) as signDate,
|
|
@@ -702,7 +702,8 @@
|
|
|
d.name as principalName,
|
|
d.name as principalName,
|
|
|
f.name as buyerProvince,
|
|
f.name as buyerProvince,
|
|
|
g.cname as projectType,
|
|
g.cname as projectType,
|
|
|
- t.contract_no as contractNo
|
|
|
|
|
|
|
+ t.contract_no as contractNo,
|
|
|
|
|
+ h.name as salesmanName
|
|
|
from
|
|
from
|
|
|
contract a left join user b on
|
|
contract a left join user b on
|
|
|
a.uid = b.id left join admin d on
|
|
a.uid = b.id left join admin d on
|
|
@@ -710,11 +711,12 @@ from
|
|
|
a.uid = e.uid left join district_glossory f on
|
|
a.uid = e.uid left join district_glossory f on
|
|
|
e.province = f.id left join business_varieties g on
|
|
e.province = f.id left join business_varieties g on
|
|
|
a.type = g.id left join t_order t on
|
|
a.type = g.id left join t_order t on
|
|
|
- a.order_no=t.order_no
|
|
|
|
|
|
|
+ a.order_no=t.order_no left join admin h on
|
|
|
|
|
+ t.salesman_id=h.id
|
|
|
where a.id = #{contractId,jdbcType=VARCHAR}
|
|
where a.id = #{contractId,jdbcType=VARCHAR}
|
|
|
</when>
|
|
</when>
|
|
|
<when test="buyerType == 1">
|
|
<when test="buyerType == 1">
|
|
|
- select
|
|
|
|
|
|
|
+ select
|
|
|
a.id,
|
|
a.id,
|
|
|
a.serial_number as serialNumber,
|
|
a.serial_number as serialNumber,
|
|
|
date_format(a.sign_date,'%Y-%m-%d %H:%i:%S') as signDate,
|
|
date_format(a.sign_date,'%Y-%m-%d %H:%i:%S') as signDate,
|
|
@@ -729,7 +731,8 @@ from
|
|
|
d.name as principalName,
|
|
d.name as principalName,
|
|
|
f.name as buyerProvince,
|
|
f.name as buyerProvince,
|
|
|
g.cname as projectType,
|
|
g.cname as projectType,
|
|
|
- t.contract_no as contractNo
|
|
|
|
|
|
|
+ t.contract_no as contractNo,
|
|
|
|
|
+ h.name as salesmanName
|
|
|
from
|
|
from
|
|
|
contract a left join user b on
|
|
contract a left join user b on
|
|
|
a.uid = b.id left join admin d on
|
|
a.uid = b.id left join admin d on
|
|
@@ -737,7 +740,8 @@ from
|
|
|
a.uid = e.uid left join district_glossory f on
|
|
a.uid = e.uid left join district_glossory f on
|
|
|
e.location_province = f.id left join business_varieties g on
|
|
e.location_province = f.id left join business_varieties g on
|
|
|
a.type = g.id left join t_order t on
|
|
a.type = g.id left join t_order t on
|
|
|
- a.order_no=t.order_no
|
|
|
|
|
|
|
+ a.order_no=t.order_no left join admin h on
|
|
|
|
|
+ t.salesman_id=h.id
|
|
|
where a.id = #{contractId,jdbcType=VARCHAR}
|
|
where a.id = #{contractId,jdbcType=VARCHAR}
|
|
|
</when>
|
|
</when>
|
|
|
</choose>
|
|
</choose>
|
|
@@ -751,6 +755,7 @@ from
|
|
|
a.task_status as taskStatus,
|
|
a.task_status as taskStatus,
|
|
|
a.deleted_sign as deletedSign,
|
|
a.deleted_sign as deletedSign,
|
|
|
a.task_comment as taskComment,
|
|
a.task_comment as taskComment,
|
|
|
|
|
+ a.publish_status as publishStatus,
|
|
|
b.name as technicianName
|
|
b.name as technicianName
|
|
|
from
|
|
from
|
|
|
contract_task a left join admin b on
|
|
contract_task a left join admin b on
|
|
@@ -788,6 +793,9 @@ from
|
|
|
<if test="deletedSign != null">
|
|
<if test="deletedSign != null">
|
|
|
and d.deleted_sign = #{deletedSign,jdbcType=VARCHAR}
|
|
and d.deleted_sign = #{deletedSign,jdbcType=VARCHAR}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="publishStatus != null">
|
|
|
|
|
+ and a.publish_status = #{publishStatus,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
<if test="taskStatus != null">
|
|
<if test="taskStatus != null">
|
|
|
and a.task_status = #{taskStatus,jdbcType=VARCHAR}
|
|
and a.task_status = #{taskStatus,jdbcType=VARCHAR}
|
|
|
</if>
|
|
</if>
|
|
@@ -832,6 +840,9 @@ from
|
|
|
<if test="deletedSign != null">
|
|
<if test="deletedSign != null">
|
|
|
and d.deleted_sign = #{deletedSign,jdbcType=VARCHAR}
|
|
and d.deleted_sign = #{deletedSign,jdbcType=VARCHAR}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="publishStatus != null">
|
|
|
|
|
+ and a.publish_status = #{publishStatus,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
<if test="taskStatus != null">
|
|
<if test="taskStatus != null">
|
|
|
and a.task_status = #{taskStatus,jdbcType=VARCHAR}
|
|
and a.task_status = #{taskStatus,jdbcType=VARCHAR}
|
|
|
</if>
|
|
</if>
|