select count(1) as count from tb_contract where 1=1
select count(1) as count from tb_contract where 1=1
<iftest="contract_unid !=null and contract_unid !=''">
and
contract_unid=#{contract_unid}
</if>
<iftest="salesperson_unids !=null">
<iftest="salesperson_unids !=null">
and
and
salesperson_unid in
salesperson_unid in
...
@@ -418,6 +422,10 @@
...
@@ -418,6 +422,10 @@
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
from tb_contract where 1=1
from tb_contract where 1=1
<iftest="contract_unid !=null and contract_unid !=''">
and
contract_unid=#{contract_unid}
</if>
<iftest="salesperson_unids !=null">
<iftest="salesperson_unids !=null">
and
and
salesperson_unid in
salesperson_unid in
...
@@ -559,6 +567,10 @@
...
@@ -559,6 +567,10 @@
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
from tb_contract where 1=1
from tb_contract where 1=1
<iftest="contract_unid !=null and contract_unid !=''">