提交 f9213492 作者: han

Merge branch 'develop' of ssh://git.mmcuav.cn:8222/iuav/cms into develop

流水线 #7860 已通过 于阶段
in 2 分 30 秒
......@@ -39,6 +39,7 @@ public interface PilotCertificationDao {
List<PilotCertificationDO> pilotList(PilotCertificationQO param);
int pilotListCount(PilotCertificationQO param);
/**
* 查询这个用户是否绑定飞手团队
* @param userId 飞手id
......@@ -53,6 +54,7 @@ public interface PilotCertificationDao {
* @return {@link String}
*/
FlyingTeam selectCompanyNameByFlyingUserId(Integer userId);
Integer getPilotAuditSum(Integer status);
List<PilotAbilityVO> selectAbilityList(Integer pilotCertificationId);
......
......@@ -138,6 +138,13 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
@Override
public PageResult pilotList(PilotCertificationQO param) {
int pilotListSize = certificationDao.pilotListCount(param);
if(pilotListSize < 1) {
return PageResult.buildPage(param.getPageNo(), param.getPageSize(), pilotListSize, null);
}
Integer pageNo = param.getPageNo();
param.buildCurrentPage();
List<PilotCertificationDO> pilotList = certificationDao.pilotList(param);
......@@ -169,8 +176,6 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
return pilotCertificationDTO;
})
.collect(Collectors.toList());
collect = collect.stream().skip((pageNo - 1) * param.getPageSize()).limit(param.getPageSize()).
collect(Collectors.toList());
Integer tokenUserId = param.getTokenUserId();
if (tokenUserId!=null){
......@@ -191,7 +196,7 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
}
}
}
PageResult pageResult = PageResult.buildPage(pageNo, param.getPageSize(), pilotList.size(), collect);
PageResult pageResult = PageResult.buildPage(pageNo, param.getPageSize(), pilotListSize, collect);
return pageResult;
}
......@@ -284,7 +289,6 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
FlyingTeam flyingTeam = certificationDao.selectCompanyNameByFlyingUserId(userAccountId);
certificationDTO.setFlyingTeam(flyingTeam.getCompanyName());
certificationDTO.setBackUserId(flyingTeam.getBackUserId());
}
}
Integer backUserId = param.getBackUserId();
......
......@@ -511,10 +511,10 @@
select ci.company_name,
cbu.back_user_account_id as backUserId,
cm.user_account_id as messageId
from company_info ci
inner join company_back_user cbu on ci.id = cbu.company_info_id
inner join pilot_join_team pjt on cbu.back_user_account_id = pjt.back_user_id
inner join company_member cm on ci.id = cm.company_info_id
from pilot_join_team pjt
left join company_back_user cbu on cbu.back_user_account_id = pjt.back_user_id
left join company_info ci on ci.id = cbu.company_info_id
left join company_member cm on ci.id = cm.company_info_id
where pjt.pilot_user_id = #{userId} and cm.is_leader = 1
</select>
<select id="selectPilotIdList" resultType="java.lang.Integer">
......@@ -556,6 +556,54 @@
inner join company_member cm on cm.company_info_id = cbu.company_info_id
where cm.user_account_id = #{userId} limit 1
</select>
<select id="pilotListCount" resultType="java.lang.Integer">
SELECT
count(*)
FROM
pilot_certification pc
LEFT JOIN real_name_auth rna ON pc.user_account_id = rna.user_account_id
LEFT JOIN user_account ua ON pc.user_account_id = ua.id
LEFT JOIN pilot_reason pr ON pc.reason_id = pr.id
left join pilot_join_team pjt on pjt.pilot_user_id = ua.id
WHERE
1 = 1
AND ua.`disable` = 0
AND rna.is_deleted =0
<if test=" areaNumber != null and areaNumber != '' ">
and pc.area_number =#{areaNumber}
</if>
<if test=" id != null ">
and pc.id =#{id}
</if>
<if test=" licenseType != null and licenseType != '' ">
and pc.license_type =#{licenseType}
</if>
<if test=" auditStatus != null ">
and pc.audit_status =#{auditStatus}
</if>
<if test="accountNumber != null and accountNumber != '' ">
and ( pc.user_account_id like concat('%',#{accountNumber},'%')
or rna.user_name like concat('%',#{accountNumber},'%')
or ua.phone_num like concat('%',#{accountNumber},'%'))
</if>
<if test="backUserId != null">
and pjt.back_user_id = #{backUserId} and pjt.pilot_status = 1
</if>
<if test="isTeam == 1">
and pjt.back_user_id is not null and pjt.pilot_status = 1
</if>
</select>
<select id="selectCompanyNameByFlyingUserIdOnlyOne"
resultType="com.mmc.iuav.user.model.dto.dronepilot.FlyingTeam">
select ci.company_name,
cbu.back_user_account_id as backUserId,
cm.user_account_id as messageId
from company_info ci
inner join company_back_user cbu on ci.id = cbu.company_info_id
inner join pilot_join_team pjt on cbu.back_user_account_id = pjt.back_user_id
inner join company_member cm on ci.id = cm.company_info_id
where pjt.pilot_user_id = #{userId} and cm.is_leader = 1
</select>
</mapper>
......@@ -18,4 +18,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag: bcbb780e01ea45e7995837afec4ad62c87babdd1
newTag: f653ed1f3002804d5d8f9ce65976e8e90bb55bb9
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论