From 11ba920fcc89c41d8df33bbb30e86421939caf9d Mon Sep 17 00:00:00 2001 From: mashuai Date: Sat, 9 Dec 2023 16:37:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zlpt-modules/zlpt-bigScreen/pom.xml | 12 +++++++ .../impl/BmCompanyInfoServiceImpl.java | 25 +++++++++++---- .../service/impl/MaDevInfoServiceImpl.java | 31 ++++++++++++++++--- .../resources/mapper/BmCompanyInfoMapper.xml | 4 +-- .../main/resources/mapper/MaDevInfoMapper.xml | 8 ++--- 5 files changed, 64 insertions(+), 16 deletions(-) diff --git a/zlpt-modules/zlpt-bigScreen/pom.xml b/zlpt-modules/zlpt-bigScreen/pom.xml index fecdbc0..eefd4f5 100644 --- a/zlpt-modules/zlpt-bigScreen/pom.xml +++ b/zlpt-modules/zlpt-bigScreen/pom.xml @@ -82,6 +82,18 @@ com.bonus.zlpt zlpt-common-security + + com.bonus.zlpt + zlpt-api-equip + 3.6.3 + compile + + + com.bonus.zlpt + zlpt-api-company + 3.6.3 + compile + diff --git a/zlpt-modules/zlpt-bigScreen/src/main/java/com/bonus/zlpt/bigscreen/service/impl/BmCompanyInfoServiceImpl.java b/zlpt-modules/zlpt-bigScreen/src/main/java/com/bonus/zlpt/bigscreen/service/impl/BmCompanyInfoServiceImpl.java index e6bd0ba..2fe98b0 100644 --- a/zlpt-modules/zlpt-bigScreen/src/main/java/com/bonus/zlpt/bigscreen/service/impl/BmCompanyInfoServiceImpl.java +++ b/zlpt-modules/zlpt-bigScreen/src/main/java/com/bonus/zlpt/bigscreen/service/impl/BmCompanyInfoServiceImpl.java @@ -1,14 +1,14 @@ package com.bonus.zlpt.bigscreen.service.impl; -import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo; -import com.bonus.zlpt.bigscreen.domain.vo.ColtdTypeVo; -import com.bonus.zlpt.bigscreen.domain.vo.LatVo; -import com.bonus.zlpt.bigscreen.domain.vo.LonVo; +import com.bonus.zlpt.bigscreen.domain.vo.*; import com.bonus.zlpt.bigscreen.mapper.BmCompanyInfoMapper; import com.bonus.zlpt.bigscreen.service.BmCompanyInfoService; +import com.bonus.zlpt.company.api.enums.CompanyTypeEnum; +import com.bonus.zlpt.equip.api.enums.MaStatusEnum; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; /** @@ -30,7 +30,13 @@ public class BmCompanyInfoServiceImpl implements BmCompanyInfoService { */ @Override public List selectTypeList() { - return bmCompanyInfoMapper.selectTypeList(); + List list = bmCompanyInfoMapper.selectTypeList(); + ArrayList typeVos = new ArrayList<>(); + for (CoTypeVo coTypeVo : list) { + coTypeVo.setCoType(CompanyTypeEnum.getNameByCode(Integer.parseInt(coTypeVo.getCoType()))); + typeVos.add(coTypeVo); + } + return typeVos; } /** @@ -39,7 +45,14 @@ public class BmCompanyInfoServiceImpl implements BmCompanyInfoService { */ @Override public List selectColtdList() { - return bmCompanyInfoMapper.selectColtdList(); + List list = bmCompanyInfoMapper.selectColtdList(); + ArrayList coltdTypeVos = new ArrayList<>(); + for (ColtdTypeVo coltdTypeVo : list) { + coltdTypeVo.setMaStatus(MaStatusEnum.getNameByCode(Integer.parseInt(coltdTypeVo.getMaStatus()))); + coltdTypeVo.setCompanyType(CompanyTypeEnum.getNameByCode(Integer.parseInt(coltdTypeVo.getCompanyType()))); + coltdTypeVos.add(coltdTypeVo); + } + return coltdTypeVos; } /** diff --git a/zlpt-modules/zlpt-bigScreen/src/main/java/com/bonus/zlpt/bigscreen/service/impl/MaDevInfoServiceImpl.java b/zlpt-modules/zlpt-bigScreen/src/main/java/com/bonus/zlpt/bigscreen/service/impl/MaDevInfoServiceImpl.java index 6d45694..5a74339 100644 --- a/zlpt-modules/zlpt-bigScreen/src/main/java/com/bonus/zlpt/bigscreen/service/impl/MaDevInfoServiceImpl.java +++ b/zlpt-modules/zlpt-bigScreen/src/main/java/com/bonus/zlpt/bigscreen/service/impl/MaDevInfoServiceImpl.java @@ -6,9 +6,12 @@ import com.bonus.zlpt.bigscreen.domain.vo.MaIdVo; import com.bonus.zlpt.bigscreen.domain.vo.TypeVo; import com.bonus.zlpt.bigscreen.mapper.MaDevInfoMapper; import com.bonus.zlpt.bigscreen.service.MaDevInfoService; +import com.bonus.zlpt.company.api.enums.CompanyLtdEnum; +import com.bonus.zlpt.equip.api.enums.MaStatusEnum; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; /** @@ -29,7 +32,13 @@ public class MaDevInfoServiceImpl implements MaDevInfoService { */ @Override public List selectMaDevInfoList() { - return maDevInfoMapper.selectMaDevInfoList(); + List typeVos = maDevInfoMapper.selectMaDevInfoList(); + List coTypeVos = new ArrayList<>(); + for (CoTypeVo typeVo : typeVos) { + typeVo.setCoType(CompanyLtdEnum.getNameByCode(Integer.parseInt(typeVo.getCoType()))); + coTypeVos.add(typeVo); + } + return coTypeVos; } /** @@ -58,7 +67,13 @@ public class MaDevInfoServiceImpl implements MaDevInfoService { */ @Override public List selectTypeList() { - return maDevInfoMapper.selectTypeList(); + List list = maDevInfoMapper.selectTypeList(); + ArrayList typeVos = new ArrayList<>(); + for (TypeVo typeVo : list) { + typeVo.setMaStatus(MaStatusEnum.getNameByCode(Integer.parseInt(typeVo.getMaStatus()))); + typeVos.add(typeVo); + } + return typeVos; } /** @@ -68,7 +83,13 @@ public class MaDevInfoServiceImpl implements MaDevInfoService { */ @Override public List selectMaTypeList() { - return maDevInfoMapper.selectMaTypeList(); + List list = maDevInfoMapper.selectMaTypeList(); + ArrayList typeVos = new ArrayList<>(); + for (TypeVo typeVo : list) { + typeVo.setMaStatus(MaStatusEnum.getNameByCode(Integer.parseInt(typeVo.getMaStatus()))); + typeVos.add(typeVo); + } + return typeVos; } /** @@ -87,7 +108,9 @@ public class MaDevInfoServiceImpl implements MaDevInfoService { */ @Override public MaIdVo selectListById(String maId) { - return maDevInfoMapper.selectListById(maId); + MaIdVo maIdVo = maDevInfoMapper.selectListById(maId); + maIdVo.setMaStatus(MaStatusEnum.getNameByCode(Integer.parseInt(maIdVo.getMaStatus()))); + return maIdVo; } } diff --git a/zlpt-modules/zlpt-bigScreen/src/main/resources/mapper/BmCompanyInfoMapper.xml b/zlpt-modules/zlpt-bigScreen/src/main/resources/mapper/BmCompanyInfoMapper.xml index e102a7d..d781919 100644 --- a/zlpt-modules/zlpt-bigScreen/src/main/resources/mapper/BmCompanyInfoMapper.xml +++ b/zlpt-modules/zlpt-bigScreen/src/main/resources/mapper/BmCompanyInfoMapper.xml @@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" JOIN bm_company_info c ON m.own_co = c.company_id JOIN gps_real_info g ON m.gps_code = g.gps_code WHERE - m.ma_status IN ('在租', '自有', '待租') and m.is_active = '1' + m.ma_status IN ('16', '17', '43') and m.is_active = '1' GROUP BY c.company_ltd, m.ma_status, g.lon, g.lat,maId diff --git a/zlpt-modules/zlpt-bigScreen/src/main/resources/mapper/MaDevInfoMapper.xml b/zlpt-modules/zlpt-bigScreen/src/main/resources/mapper/MaDevInfoMapper.xml index 2e61017..f8a0133 100644 --- a/zlpt-modules/zlpt-bigScreen/src/main/resources/mapper/MaDevInfoMapper.xml +++ b/zlpt-modules/zlpt-bigScreen/src/main/resources/mapper/MaDevInfoMapper.xml @@ -9,7 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT bc.company_ltd AS coType, COUNT(*) AS Count FROM ma_dev_info md JOIN bm_company_info bc ON md.own_co = bc.company_id - WHERE md.ma_status = '自有' and md.is_active = '1' + WHERE md.ma_status = '43' and md.is_active = '1' GROUP BY bc.company_ltd @@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT mti.type_name as ownCo, COUNT(*) as count FROM ma_type_info mti INNER JOIN ma_dev_info mdi ON mti.type_id = mdi.type_id - WHERE mdi.ma_status = '在租' and mdi.is_active = '1' + WHERE mdi.ma_status = '17' and mdi.is_active = '1' GROUP BY mti.type_name ORDER BY count DESC @@ -32,14 +32,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"