Commit d7b97761 authored by zhouleilei's avatar zhouleilei

命名规范

parent 3c778239
...@@ -2,12 +2,12 @@ package net.wanji.utc.hisense.mapper; ...@@ -2,12 +2,12 @@ package net.wanji.utc.hisense.mapper;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.wanji.utc.hisense.pojo.view.VIntersectionEntity; import net.wanji.utc.hisense.pojo.view.VIntersectionView;
/** /**
* @author duanruiming * @author duanruiming
* @date 2024/11/07 9:50 * @date 2024/11/07 9:50
*/ */
@DS("oracle") @DS("oracle")
public interface VIntersectionMapper extends BaseMapper<VIntersectionEntity> { public interface VIntersectionMapper extends BaseMapper<VIntersectionView> {
} }
...@@ -2,7 +2,7 @@ package net.wanji.utc.hisense.mapper; ...@@ -2,7 +2,7 @@ package net.wanji.utc.hisense.mapper;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.wanji.utc.hisense.pojo.view.VNtcipTimeBaseAscAction; import net.wanji.utc.hisense.pojo.view.VNtcipTimeBaseAscActionView;
/** /**
* @ClassName VNtcipTimeBaseAscActionMapper * @ClassName VNtcipTimeBaseAscActionMapper
...@@ -11,5 +11,5 @@ import net.wanji.utc.hisense.pojo.view.VNtcipTimeBaseAscAction; ...@@ -11,5 +11,5 @@ import net.wanji.utc.hisense.pojo.view.VNtcipTimeBaseAscAction;
* @Date 2024/11/12 09:30 * @Date 2024/11/12 09:30
*/ */
@DS("oracle") @DS("oracle")
public interface VNtcipTimeBaseAscActionMapper extends BaseMapper<VNtcipTimeBaseAscAction> { public interface VNtcipTimeBaseAscActionMapper extends BaseMapper<VNtcipTimeBaseAscActionView> {
} }
...@@ -2,7 +2,7 @@ package net.wanji.utc.hisense.mapper; ...@@ -2,7 +2,7 @@ package net.wanji.utc.hisense.mapper;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.wanji.utc.hisense.pojo.view.VNtcipTimeBaseDayplan; import net.wanji.utc.hisense.pojo.view.VNtcipTimeBaseDayplanView;
import java.util.List; import java.util.List;
...@@ -13,7 +13,7 @@ import java.util.List; ...@@ -13,7 +13,7 @@ import java.util.List;
* @Date 2024/11/11 20:12 * @Date 2024/11/11 20:12
*/ */
@DS("oracle") @DS("oracle")
public interface VNtcipTimeBaseDayplanMapper extends BaseMapper<VNtcipTimeBaseDayplan> { public interface VNtcipTimeBaseDayplanMapper extends BaseMapper<VNtcipTimeBaseDayplanView> {
/** /**
* 根据路口编号和计划ID获取时段信息 * 根据路口编号和计划ID获取时段信息
...@@ -21,5 +21,5 @@ public interface VNtcipTimeBaseDayplanMapper extends BaseMapper<VNtcipTimeBaseD ...@@ -21,5 +21,5 @@ public interface VNtcipTimeBaseDayplanMapper extends BaseMapper<VNtcipTimeBaseD
* @param dayPlanId 计划ID * @param dayPlanId 计划ID
* @return 时段信息 * @return 时段信息
*/ */
List<VNtcipTimeBaseDayplan> listByCrossIdAndDayPlanId(String crossId, Integer dayPlanId); List<VNtcipTimeBaseDayplanView> listByCrossIdAndDayPlanId(String crossId, Integer dayPlanId);
} }
...@@ -2,12 +2,12 @@ package net.wanji.utc.hisense.mapper; ...@@ -2,12 +2,12 @@ package net.wanji.utc.hisense.mapper;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.wanji.utc.hisense.pojo.view.VNtcipTimeBaseSchedule; import net.wanji.utc.hisense.pojo.view.VNtcipTimeBaseScheduleView;
/** /**
* @author duanruiming * @author duanruiming
* @date 2024/11/07 11:23 * @date 2024/11/07 11:23
*/ */
@DS("oracle") @DS("oracle")
public interface VNtcipTimeBaseScheduleMapper extends BaseMapper<VNtcipTimeBaseSchedule> { public interface VNtcipTimeBaseScheduleMapper extends BaseMapper<VNtcipTimeBaseScheduleView> {
} }
...@@ -11,7 +11,7 @@ import lombok.Data; ...@@ -11,7 +11,7 @@ import lombok.Data;
*/ */
@Data @Data
@TableName("hicon.v_intersection") @TableName("hicon.v_intersection")
public class VIntersectionEntity { public class VIntersectionView {
@TableField("CINTSID") @TableField("CINTSID")
private String cIntsID; private String cIntsID;
@TableField("CINTSNAME") @TableField("CINTSNAME")
......
...@@ -12,7 +12,7 @@ import lombok.Data; ...@@ -12,7 +12,7 @@ import lombok.Data;
*/ */
@Data @Data
@TableName("hicon.V_NTCIPTIMEBASEASCACTION") @TableName("hicon.V_NTCIPTIMEBASEASCACTION")
public class VNtcipTimeBaseAscAction { public class VNtcipTimeBaseAscActionView {
/** 所属路口编号 */ /** 所属路口编号 */
@TableField("CINTSID") @TableField("CINTSID")
private String cIntsID; private String cIntsID;
......
...@@ -12,7 +12,7 @@ import lombok.Data; ...@@ -12,7 +12,7 @@ import lombok.Data;
*/ */
@Data @Data
@TableName("hicon.V_NTCIPTIMEBASEDAYPLAN") @TableName("hicon.V_NTCIPTIMEBASEDAYPLAN")
public class VNtcipTimeBaseDayplan { public class VNtcipTimeBaseDayplanView {
/** 所属路口编号 NC(6) Y */ /** 所属路口编号 NC(6) Y */
@TableField("CINTSID") @TableField("CINTSID")
private String cIntsID; private String cIntsID;
......
...@@ -11,7 +11,7 @@ import lombok.Data; ...@@ -11,7 +11,7 @@ import lombok.Data;
*/ */
@Data @Data
@TableName("hicon.V_NTCIPTIMEBASESCHEDULE") @TableName("hicon.V_NTCIPTIMEBASESCHEDULE")
public class VNtcipTimeBaseSchedule { public class VNtcipTimeBaseScheduleView {
@TableField("CINTSID") @TableField("CINTSID")
private String cIntsID; private String cIntsID;
@TableField("NTIMEBASESCHEDULENUMBER") @TableField("NTIMEBASESCHEDULENUMBER")
......
...@@ -21,10 +21,10 @@ import net.wanji.utc.hisense.common.constants.HttpConstants; ...@@ -21,10 +21,10 @@ import net.wanji.utc.hisense.common.constants.HttpConstants;
import net.wanji.utc.hisense.mapper.*; import net.wanji.utc.hisense.mapper.*;
import net.wanji.utc.hisense.pojo.result.CoordinationStatus; import net.wanji.utc.hisense.pojo.result.CoordinationStatus;
import net.wanji.utc.hisense.pojo.result.CrossSchemeRings; import net.wanji.utc.hisense.pojo.result.CrossSchemeRings;
import net.wanji.utc.hisense.pojo.view.VIntersectionEntity; import net.wanji.utc.hisense.pojo.view.VIntersectionView;
import net.wanji.utc.hisense.pojo.view.VNtcipChannelPhaseDTO; import net.wanji.utc.hisense.pojo.view.VNtcipChannelPhaseDTO;
import net.wanji.utc.hisense.pojo.view.VNtcipTimeBaseDayplan; import net.wanji.utc.hisense.pojo.view.VNtcipTimeBaseDayplanView;
import net.wanji.utc.hisense.pojo.view.VNtcipTimeBaseSchedule; import net.wanji.utc.hisense.pojo.view.VNtcipTimeBaseScheduleView;
import net.wanji.utc.hisense.service.StaticInfoService; import net.wanji.utc.hisense.service.StaticInfoService;
import net.wanji.utc.hisense.util.OkHttpClientUtil; import net.wanji.utc.hisense.util.OkHttpClientUtil;
import org.dom4j.Document; import org.dom4j.Document;
...@@ -77,19 +77,19 @@ public class StaticInfoServiceImpl implements StaticInfoService { ...@@ -77,19 +77,19 @@ public class StaticInfoServiceImpl implements StaticInfoService {
Map<String, String> codeCrossIdMap = crossInfoPOList.stream().collect(Collectors.toMap(CrossInfoPO::getCode, CrossInfoPO::getId)); Map<String, String> codeCrossIdMap = crossInfoPOList.stream().collect(Collectors.toMap(CrossInfoPO::getCode, CrossInfoPO::getId));
List<CrossInfoPO> crossInfoPOS = new ArrayList<>(); List<CrossInfoPO> crossInfoPOS = new ArrayList<>();
if (StringUtils.equalsIgnoreCase("HISENSE", crossInfoDTO.getManufacturerCode())) { if (StringUtils.equalsIgnoreCase("HISENSE", crossInfoDTO.getManufacturerCode())) {
LambdaQueryWrapper<VIntersectionEntity> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<VIntersectionView> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(VIntersectionEntity::getCIntsID, codeList); queryWrapper.in(VIntersectionView::getCIntsID, codeList);
List<VIntersectionEntity> vIntersectionEntities = vIntersectionMapper.selectList(queryWrapper); List<VIntersectionView> vIntersectionEntities = vIntersectionMapper.selectList(queryWrapper);
for (VIntersectionEntity vIntersectionEntity : vIntersectionEntities) { for (VIntersectionView vIntersectionView : vIntersectionEntities) {
String cIntsID = vIntersectionEntity.getCIntsID(); String cIntsID = vIntersectionView.getCIntsID();
CrossInfoPO crossInfoPO = new CrossInfoPO(); CrossInfoPO crossInfoPO = new CrossInfoPO();
crossInfoPO.setId(codeCrossIdMap.get(cIntsID)); crossInfoPO.setId(codeCrossIdMap.get(cIntsID));
crossInfoPO.setCode(cIntsID); crossInfoPO.setCode(cIntsID);
crossInfoPO.setName(vIntersectionEntity.getCIntsName()); crossInfoPO.setName(vIntersectionView.getCIntsName());
crossInfoPO.setIp(vIntersectionEntity.getCCONTROLLERIP()); crossInfoPO.setIp(vIntersectionView.getCCONTROLLERIP());
String[] array = {String.valueOf(vIntersectionEntity.getLongitude()), String.valueOf(vIntersectionEntity.getLatitude())}; String[] array = {String.valueOf(vIntersectionView.getLongitude()), String.valueOf(vIntersectionView.getLatitude())};
crossInfoPO.setLocation(StringUtils.join(array, ",")); crossInfoPO.setLocation(StringUtils.join(array, ","));
crossInfoPO.setVersion(vIntersectionEntity.getCControllerModel()); crossInfoPO.setVersion(vIntersectionView.getCControllerModel());
crossInfoPO.setManufacturerId(22); crossInfoPO.setManufacturerId(22);
crossInfoPOS.add(crossInfoPO); crossInfoPOS.add(crossInfoPO);
} }
...@@ -110,14 +110,14 @@ public class StaticInfoServiceImpl implements StaticInfoService { ...@@ -110,14 +110,14 @@ public class StaticInfoServiceImpl implements StaticInfoService {
@Override @Override
public List<PlanSectionVO> planSection(PlanSectionDTO planSectionDTO) throws Exception { public List<PlanSectionVO> planSection(PlanSectionDTO planSectionDTO) throws Exception {
LambdaQueryWrapper<VNtcipTimeBaseDayplan> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<VNtcipTimeBaseDayplanView> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(VNtcipTimeBaseDayplan::getCIntsID, planSectionDTO.getCrossId()); queryWrapper.eq(VNtcipTimeBaseDayplanView::getCIntsID, planSectionDTO.getCrossId());
//planNo = -1 时查询所有计划 //planNo = -1 时查询所有计划
if (planSectionDTO.getPlanNo() != -1) { if (planSectionDTO.getPlanNo() != -1) {
queryWrapper.eq(VNtcipTimeBaseDayplan::getCIntsID, planSectionDTO.getCrossId()); queryWrapper.eq(VNtcipTimeBaseDayplanView::getCIntsID, planSectionDTO.getCrossId());
} }
List<VNtcipTimeBaseDayplan> vNtcipTimeBaseDayplans = vNtcipTimeBaseDayplanMapper.selectList(queryWrapper); List<VNtcipTimeBaseDayplanView> vNtcipTimeBaseDayplanViews = vNtcipTimeBaseDayplanMapper.selectList(queryWrapper);
...@@ -136,24 +136,24 @@ public class StaticInfoServiceImpl implements StaticInfoService { ...@@ -136,24 +136,24 @@ public class StaticInfoServiceImpl implements StaticInfoService {
for (String code : crossCodeList) { for (String code : crossCodeList) {
CrossInfoPO crossInfoBySignalCode = CrossInfoCache.getCrossInfoBySignalCode(code); CrossInfoPO crossInfoBySignalCode = CrossInfoCache.getCrossInfoBySignalCode(code);
String crossId = crossInfoBySignalCode.getId(); String crossId = crossInfoBySignalCode.getId();
LambdaQueryWrapper<VNtcipTimeBaseSchedule> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<VNtcipTimeBaseScheduleView> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(VNtcipTimeBaseSchedule::getCIntsID, code); queryWrapper.eq(VNtcipTimeBaseScheduleView::getCIntsID, code);
List<VNtcipTimeBaseSchedule> vNtcipTimeBaseSchedules = vNtcipTimeBaseScheduleMapper.selectList(queryWrapper); List<VNtcipTimeBaseScheduleView> vNtcipTimeBaseScheduleViews = vNtcipTimeBaseScheduleMapper.selectList(queryWrapper);
if (!CollectionUtils.isEmpty(vNtcipTimeBaseSchedules)) { if (!CollectionUtils.isEmpty(vNtcipTimeBaseScheduleViews)) {
for (VNtcipTimeBaseSchedule vNtcipTimeBaseSchedule : vNtcipTimeBaseSchedules) { for (VNtcipTimeBaseScheduleView vNtcipTimeBaseScheduleView : vNtcipTimeBaseScheduleViews) {
if (Objects.nonNull(vNtcipTimeBaseSchedule)) { if (Objects.nonNull(vNtcipTimeBaseScheduleView)) {
CrossSchedulesPO crossSchedulesPO = new CrossSchedulesPO(); CrossSchedulesPO crossSchedulesPO = new CrossSchedulesPO();
crossSchedulesPO.setCrossId(crossId); crossSchedulesPO.setCrossId(crossId);
crossSchedulesPO.setScheduleNo(vNtcipTimeBaseSchedule.getNTimeBaseScheduleNumber()); crossSchedulesPO.setScheduleNo(vNtcipTimeBaseScheduleView.getNTimeBaseScheduleNumber());
crossSchedulesPO.setName("海信调度" + vNtcipTimeBaseSchedule.getNTimeBaseScheduleNumber()); crossSchedulesPO.setName("海信调度" + vNtcipTimeBaseScheduleView.getNTimeBaseScheduleNumber());
// 海信月份 // 海信月份
Integer hisenseMonth = vNtcipTimeBaseSchedule.getNTimeBaseScheduleMonth(); Integer hisenseMonth = vNtcipTimeBaseScheduleView.getNTimeBaseScheduleMonth();
// 星期 // 星期
Integer hisenseWeek = vNtcipTimeBaseSchedule.getNTimeBaseScheduleDay(); Integer hisenseWeek = vNtcipTimeBaseScheduleView.getNTimeBaseScheduleDay();
// 日期 2147483647 // 日期 2147483647
Integer hisenseDays = vNtcipTimeBaseSchedule.getNTimeBaseScheduleDate(); Integer hisenseDays = vNtcipTimeBaseScheduleView.getNTimeBaseScheduleDate();
// 时段表号 // 时段表号
Integer hisensePlanId = vNtcipTimeBaseSchedule.getNTimeBaseScheduleDayPlan(); Integer hisensePlanId = vNtcipTimeBaseScheduleView.getNTimeBaseScheduleDayPlan();
String monthsStr = ScheduleUtil.getSchedule(hisenseMonth.longValue(), 1); String monthsStr = ScheduleUtil.getSchedule(hisenseMonth.longValue(), 1);
String daysStr = ScheduleUtil.getSchedule(hisenseDays.longValue(), 2); String daysStr = ScheduleUtil.getSchedule(hisenseDays.longValue(), 2);
String weekStr = ScheduleUtil.getSchedule(hisenseWeek.longValue(), 3); String weekStr = ScheduleUtil.getSchedule(hisenseWeek.longValue(), 3);
...@@ -162,8 +162,8 @@ public class StaticInfoServiceImpl implements StaticInfoService { ...@@ -162,8 +162,8 @@ public class StaticInfoServiceImpl implements StaticInfoService {
for (String oneWeek : weekSplit) { for (String oneWeek : weekSplit) {
CrossSchedulesPO crossSchedulesPOWeek = new CrossSchedulesPO(); CrossSchedulesPO crossSchedulesPOWeek = new CrossSchedulesPO();
crossSchedulesPOWeek.setCrossId(crossId); crossSchedulesPOWeek.setCrossId(crossId);
crossSchedulesPOWeek.setScheduleNo(vNtcipTimeBaseSchedule.getNTimeBaseScheduleNumber()); crossSchedulesPOWeek.setScheduleNo(vNtcipTimeBaseScheduleView.getNTimeBaseScheduleNumber());
crossSchedulesPOWeek.setName("海信调度" + vNtcipTimeBaseSchedule.getNTimeBaseScheduleNumber()); crossSchedulesPOWeek.setName("海信调度" + vNtcipTimeBaseScheduleView.getNTimeBaseScheduleNumber());
crossSchedulesPOWeek.setWeek(Integer.valueOf(oneWeek)); crossSchedulesPOWeek.setWeek(Integer.valueOf(oneWeek));
crossSchedulesPOWeek.setMonths(monthsStr); crossSchedulesPOWeek.setMonths(monthsStr);
crossSchedulesPOWeek.setDays(daysStr); crossSchedulesPOWeek.setDays(daysStr);
...@@ -174,8 +174,8 @@ public class StaticInfoServiceImpl implements StaticInfoService { ...@@ -174,8 +174,8 @@ public class StaticInfoServiceImpl implements StaticInfoService {
// 不执行周调度 // 不执行周调度
CrossSchedulesPO crossSchedulesPOMonthDays = new CrossSchedulesPO(); CrossSchedulesPO crossSchedulesPOMonthDays = new CrossSchedulesPO();
crossSchedulesPOMonthDays.setCrossId(crossId); crossSchedulesPOMonthDays.setCrossId(crossId);
crossSchedulesPOMonthDays.setScheduleNo(vNtcipTimeBaseSchedule.getNTimeBaseScheduleNumber()); crossSchedulesPOMonthDays.setScheduleNo(vNtcipTimeBaseScheduleView.getNTimeBaseScheduleNumber());
crossSchedulesPOMonthDays.setName("海信调度" + vNtcipTimeBaseSchedule.getNTimeBaseScheduleNumber()); crossSchedulesPOMonthDays.setName("海信调度" + vNtcipTimeBaseScheduleView.getNTimeBaseScheduleNumber());
crossSchedulesPOMonthDays.setWeek(null); crossSchedulesPOMonthDays.setWeek(null);
crossSchedulesPOMonthDays.setMonths(monthsStr); crossSchedulesPOMonthDays.setMonths(monthsStr);
crossSchedulesPOMonthDays.setDays(daysStr); crossSchedulesPOMonthDays.setDays(daysStr);
......
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