Commit 56a10604 authored by huangjie's avatar huangjie

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys...

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司
parents a87eaaf5 13a638bf
......@@ -54,5 +54,9 @@ public class DCustomerSearchBo {
* 是否队伍 0:否 1:是
*/
private Integer isTeam;
/**
* 涉诉限用/涉诉禁用
*/
private String badnessState;
}
......@@ -77,6 +77,7 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
PageQuery query = new PageQuery();
List<DCustomerListVo> records = baseMapper.allSearchList(query.build(), bo).getRecords();
if (CollectionUtils.isNotEmpty(records)) {
for (int i = 0; i < records.size(); i++) records.get(i).setNum(i);
records.parallelStream().forEach(item -> {
DCustomerListVo vo = subcontractMapper.selectStatisticByCustomerId(item.getCustomerId());
//企业合作数量
......
......@@ -6,64 +6,66 @@
<select id="allSearchList" resultType="com.dsk.cscec.domain.vo.DCustomerListVo">
select
@row_number:=@row_number + 1 AS num,
customer_key, customer_id, customer_code, customer_name, recommend_org, register_region, register_province, register_city, customer_class, primary_business,
paytax_type, tax_rate, customer_state, leader_name, labor_captain_phone, labor_captain_idcard, service_team_personnum, service_team_speciality,
construct_job_scope, credential, register_capital, contact_person, contact_phone, approve_date2, credit_level, group_specialty
from d_customer , (SELECT @row_number:=0) AS t
where recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475'
<if test="bo.customerName != null and bo.customerName != '' "> and customer_name like concat('%',#{bo.customerName},'%')</if>
dc.customer_key, dc.customer_id, dc.customer_code, dc.customer_name, dc.recommend_org, dc.register_region, dc.register_province, dc.register_city, dc.customer_class, dc.primary_business,
dc.paytax_type, dc.tax_rate, dc.customer_state, dc.leader_name, dc.labor_captain_phone, dc.labor_captain_idcard, dc.service_team_personnum, dc.service_team_speciality,
dc.construct_job_scope, dc.credential, dc.register_capital, dc.contact_person, dc.contact_phone, dc.approve_date2, dc.credit_level, dc.group_specialty, fsl.fstate badnessState
from d_customer dc
left join f_supplier_limited fsl on (fsl.flaowufbid = dc.customer_id
or fsl.fzhuanyefbid = dc.customer_id or fsl.ffgid = dc.customer_id or fsl.fzlid = dc.customer_id)
where dc.recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475'
<if test="bo.customerName != null and bo.customerName != '' "> and dc.customer_name like concat('%',#{bo.customerName},'%')</if>
<if test="bo.province != null and bo.province.size > 0 and (bo.city == null or bo.city.size == 0) ">
and register_province in
and dc.register_province in
<foreach collection="bo.province" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.city != null and bo.city.size > 0 and (bo.province == null or bo.province.size == 0) ">
and register_city in
and dc.register_city in
<foreach collection="bo.city" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.province != null and bo.province.size > 0 and bo.city != null and bo.city.size > 0 " >
and ( register_province in
and ( dc.register_province in
<foreach collection="bo.province" item="item" open="(" separator="," close=")">
#{item}
</foreach>
or register_city in
or dc.register_city in
<foreach collection="bo.city" item="item" open="(" separator="," close=")">
#{item}
</foreach>
)
</if>
<if test="bo.customerClass != null and bo.customerClass.size > 0 ">
and customer_class in
and dc.customer_class in
<foreach collection="bo.customerClass" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.customerState != null and bo.customerState.size > 0 ">
and customer_state in
and dc.customer_state in
<foreach collection="bo.customerState" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.creditLevel != null and bo.creditLevel.size > 0 ">
and credit_level in
and dc.credit_level in
<foreach collection="bo.creditLevel" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.credential != null and bo.credential.size > 0 ">
and credential in
and dc.credential in
<foreach collection="bo.credential" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.approveDateBegion != null and bo.approveDateBegion != '' ">and approve_date2 &gt;= #{bo.approveDateBegion}</if>
<if test="bo.approveDateEnd != null and bo.approveDateEnd != '' ">and approve_date2 &lt;= #{bo.approveDateEnd} </if>
<if test="bo.isTeam != null"> and leader_name is <if test="bo.isTeam == 1">not</if> null </if>
order by approve_date2 desc
<if test="bo.approveDateBegion != null and bo.approveDateBegion != '' ">and dc.approve_date2 &gt;= #{bo.approveDateBegion}</if>
<if test="bo.approveDateEnd != null and bo.approveDateEnd != '' ">and dc.approve_date2 &lt;= #{bo.approveDateEnd} </if>
<if test="bo.isTeam != null"> and dc.leader_name is <if test="bo.isTeam == 1">not</if> null </if>
<if test="bo.badnessState != null and bo.badnessState != ''"> and fsl.fstate = #{bo.badnessState} </if>
order by dc.approve_date2 desc
</select>
<sql id="allColumn">
......
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