Commit fec43058 authored by duanruiming's avatar duanruiming

[update] 方案管理-方案下发日计划优化

parent f643e783
...@@ -106,9 +106,11 @@ public class PlanSendServiceImpl implements PlanSendService { ...@@ -106,9 +106,11 @@ public class PlanSendServiceImpl implements PlanSendService {
List<PlanSendVO.Plan.Section> sectionList = new ArrayList<>(crossSectionPOS.size()); List<PlanSendVO.Plan.Section> sectionList = new ArrayList<>(crossSectionPOS.size());
for (CrossSectionPO sectionPO : crossSectionPOS) { for (CrossSectionPO sectionPO : crossSectionPOS) {
Integer schemeId = sectionPO.getSchemeId(); Integer schemeId = sectionPO.getSchemeId();
CrossSchemePO crossSchemePO = crossSchemeMapper.selectById(schemeId);
String patternNo = crossSchemePO.getSchemeNo();
PlanSendVO.Plan.Section section = new PlanSendVO.Plan.Section(); PlanSendVO.Plan.Section section = new PlanSendVO.Plan.Section();
section.setSectionNo(sectionPO.getSectionNo()); section.setSectionNo(sectionPO.getSectionNo());
section.setPatternNo(String.valueOf(schemeId)); section.setPatternNo(patternNo);
section.setBeginTime(sectionPO.getStartTime()); section.setBeginTime(sectionPO.getStartTime());
section.setEndTime(sectionPO.getEndTime()); section.setEndTime(sectionPO.getEndTime());
section.setControlMode(String.valueOf(sectionPO.getControlMode())); section.setControlMode(String.valueOf(sectionPO.getControlMode()));
......
...@@ -23,8 +23,10 @@ import net.wanji.utc.po.ManufacturerInfoPO; ...@@ -23,8 +23,10 @@ import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.po.hk.response.HKResponse; import net.wanji.utc.po.hk.response.HKResponse;
import net.wanji.utc.service.control.ControlCommandService; import net.wanji.utc.service.control.ControlCommandService;
import net.wanji.utc.service.runninginfo.HkLightsStatusService; import net.wanji.utc.service.runninginfo.HkLightsStatusService;
import net.wanji.utc.service.runninginfo.impl.HkLightsStatusServiceImpl;
import net.wanji.utc.util.FieldUtil; import net.wanji.utc.util.FieldUtil;
import net.wanji.utc.util.PathUtil; import net.wanji.utc.util.PathUtil;
import net.wanji.utc.util.StringUtils;
import net.wanji.utc.vo.*; import net.wanji.utc.vo.*;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -127,7 +129,16 @@ public class HKControlCommandServiceImpl implements ControlCommandService { ...@@ -127,7 +129,16 @@ public class HKControlCommandServiceImpl implements ControlCommandService {
DownloadTimeSpandsDTO.Data.Plan.Section section1 = new DownloadTimeSpandsDTO.Data.Plan.Section(); DownloadTimeSpandsDTO.Data.Plan.Section section1 = new DownloadTimeSpandsDTO.Data.Plan.Section();
section1.setTimeSecNo(section.getSectionNo()); section1.setTimeSecNo(section.getSectionNo());
section1.setPatternNo(section.getPatternNo()); section1.setPatternNo(section.getPatternNo());
section1.setControlType(section.getControlMode()); String controtype = "4";
if (StringUtils.isNotBlank(section.getControlMode()) && !StringUtils.equals("1", section.getControlMode())) {
for (Map.Entry<String, String> item : HkLightsStatusServiceImpl.runModeParseMap.entrySet()) {
if (StringUtils.equals(item.getValue(), section.getControlMode())) {
controtype = item.getKey();
break;
}
}
}
section1.setControlType(controtype);
section1.setBeginTime(section.getBeginTime()); section1.setBeginTime(section.getBeginTime());
sectionList.add(section1); sectionList.add(section1);
}); });
......
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