|
|
@@ -1893,7 +1893,7 @@ date_format(e.create_time ,'%Y-%m-%d')creteTime
|
|
|
</if>
|
|
|
sum(a.commodity_price)amountCount,sum(ttm.cost_amount)costAmount, (sum(a.commodity_price)-sum(ttm.cost_amount))profit
|
|
|
from t_order_task a left join t_order_new b on a.order_no =b.order_no left join t_task_mid ttm on a.id=ttm.tid
|
|
|
- left join department dep on b.order_dep =dep.id left join admin ad on a.task_receiver =ad.id
|
|
|
+ left join department dep on b.order_dep =dep.id inner join admin ad on a.task_receiver =ad.id
|
|
|
left join business_project bp on a.commodity_id =bp.id
|
|
|
left join (select id,commodity_quantity cq from t_order_task where project_status BETWEEN 1 and 3)kcs on a.id=kcs.id
|
|
|
left join (select id,commodity_quantity cq from t_order_task where task_status in (1,2,3))pds on a.id=pds.id
|
|
|
@@ -1937,8 +1937,8 @@ date_format(e.create_time ,'%Y-%m-%d')creteTime
|
|
|
<if test="projectId !=null">
|
|
|
and a.commodity_id = #{projectId}
|
|
|
</if>
|
|
|
- group by dep.province,ad.department_id,bp.cid )x left join district_glossory dg on x.province=dg.id
|
|
|
-left join department de on x.department_id=de.id left join business_category bc on x.cid=bc.id
|
|
|
+ group by dep.province,ad.department_id,bp.cid )x inner join district_glossory dg on x.province=dg.id
|
|
|
+inner join department de on x.department_id=de.id left join business_category bc on x.cid=bc.id
|
|
|
<if test="page_sql!=null">
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
@@ -1948,7 +1948,7 @@ left join department de on x.department_id=de.id left join business_category bc
|
|
|
select count(*)
|
|
|
from (select dep.province, ad.department_id,bp.cid
|
|
|
from t_order_task a left join t_order_new b on a.order_no =b.order_no left join t_task_mid ttm on a.id=ttm.tid
|
|
|
- left join department dep on b.order_dep =dep.id left join admin ad on a.task_receiver =ad.id
|
|
|
+ left join department dep on b.order_dep =dep.id inner join admin ad on a.task_receiver =ad.id
|
|
|
left join business_project bp on a.commodity_id =bp.id
|
|
|
where a.split_status in(0,2)
|
|
|
<if test="startDate != null and endDate != null">
|
|
|
@@ -1969,7 +1969,8 @@ left join department de on x.department_id=de.id left join business_category bc
|
|
|
<if test="projectId !=null">
|
|
|
and a.commodity_id = #{projectId}
|
|
|
</if>
|
|
|
- group by dep.province,ad.department_id,bp.cid )x
|
|
|
+ group by dep.province,ad.department_id,bp.cid )x inner join district_glossory dg on x.province=dg.id
|
|
|
+inner join department de on x.department_id=de.id left join business_category bc on x.cid=bc.id
|
|
|
</select>
|
|
|
|
|
|
<select id="managerSelectByPage" resultType="com.goafanti.order.bo.managerListBo">
|