Browse Source

预警评估-企业综合评价-企业车辆数统计修改

master
CMM 2 weeks ago
parent
commit
3b302152bc
2 changed files with 7 additions and 3 deletions
  1. +1
    -2
      ningda-yw-api/src/main/java/com/ningdatech/carapi/analysis/manage/WarnAnalysisManage.java
  2. +6
    -1
      ningda-yw-api/src/main/java/com/ningdatech/carapi/analysis/mapper/WarnAnalysisCarMapper.xml

+ 1
- 2
ningda-yw-api/src/main/java/com/ningdatech/carapi/analysis/manage/WarnAnalysisManage.java View File

@@ -84,8 +84,6 @@ public class WarnAnalysisManage {
* 企业综合预警分析列表
*/
public PageVo<WarnAnalysisByCompanyVo> listCompanyWarnAnalysis(WarnAnalysisListReq req) {
String companyName = req.getCompanyName();
Integer carCount = warnAnalysisCarMapper.selectVehiclesNum(companyName);
LambdaQueryWrapper<WarnAnalysisCompany> query = Wrappers.lambdaQuery(WarnAnalysisCompany.class);
WarnAnalysisManage context = (WarnAnalysisManage) AopContext.currentProxy();
context.buildCompanyWarnAnalysisQuery(query, req);
@@ -98,6 +96,7 @@ public class WarnAnalysisManage {
if (Objects.nonNull(w.getRegionId())) {
vo.setRegions(regionsCacheHelper.listParents(w.getRegionId()));
}
Integer carCount = warnAnalysisCarMapper.selectVehiclesNum(w.getCompanyName());
vo.setCarCount(carCount);
CodeUtil.searchCompanyName(vo);
return vo;


+ 6
- 1
ningda-yw-api/src/main/java/com/ningdatech/carapi/analysis/mapper/WarnAnalysisCarMapper.xml View File

@@ -3,7 +3,12 @@
<mapper namespace="com.ningdatech.carapi.analysis.mapper.WarnAnalysisCarMapper">

<select id="selectVehiclesNum" resultType="java.lang.Integer">
select sum(vehicle_num) as carCount from nd_company_info where `name` = #{companyName}
select count(car_plate) as carCount from nd_vehicle_base_info b
left join nd_company_info c on b.company_id = c.id
where 1 = 1
<if test="companyName != null and companyName != ''">
and c.name = #{companyName}
</if>
</select>

<select id="pageCarAnalysis" resultType="com.ningdatech.carapi.analysis.entity.WarnAnalysisCar">


Loading…
Cancel
Save