|
|
@@ -581,9 +581,19 @@
|
|
|
set a.order_receivables=b.money,a.order_arrears =(b.money-c.settlement_amount)
|
|
|
where a.order_no =b.order_no and a.order_no =c.order_no and a.order_receivables !=b.money;
|
|
|
</update>
|
|
|
+
|
|
|
<select id="judgeProjectType" resultType="java.lang.Integer">
|
|
|
select count(*) from t_order_new a left join t_order_task b on a.order_no =b.order_no
|
|
|
left join business_project c on b.commodity_id =c.id left join business_category d on c.cid =d.id
|
|
|
where d.sort =6 and a.order_no = #{orderNo}
|
|
|
</select>
|
|
|
+
|
|
|
+ <update id="updateCountProjectAndType">
|
|
|
+ update t_order_mid a ,(select a.order_no ,GROUP_CONCAT(DISTINCT a.commodity_name )pname, GROUP_CONCAT(DISTINCT c.cname )cname
|
|
|
+ from t_order_task a left join business_project b on a.commodity_id =b.id
|
|
|
+ left join business_category c on b.cid =c.id
|
|
|
+ group by a.order_no )b
|
|
|
+ set a.service_project =b.pname,a.service_type =b.cname
|
|
|
+ where a.order_no=b.order_no and a.order_no = #{orderNo};
|
|
|
+ </update>
|
|
|
</mapper>
|