Commit 0232bbca authored by duanruiming's avatar duanruiming

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

parent b7a76557
...@@ -118,27 +118,6 @@ public class ControlCommandStrategyServiceImpl implements ControlCommandStrategy ...@@ -118,27 +118,6 @@ public class ControlCommandStrategyServiceImpl implements ControlCommandStrategy
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public JsonViewObject planSendStrategy(PlanSendVO planSendVO) throws Exception { public JsonViewObject planSendStrategy(PlanSendVO planSendVO) throws Exception {
PlanSendVO.Plan plan = new PlanSendVO.Plan();
plan.setPlanNo("1");
plan.setPlanDescribe("date1111");
List<PlanSendVO.Plan.Section> sectionList = new ArrayList<>();
PlanSendVO.Plan.Section section = new PlanSendVO.Plan.Section();
section.setPatternNo("1");
section.setSectionNo("1");
section.setControlMode("4"); // runMode
section.setBeginTime("7:00");
section.setEndTime("18:00");
sectionList.add(section);
plan.setSectionList(sectionList);
List<PlanSendVO.Plan> plans = new ArrayList<>();
plans.add(plan);
planSendVO.setPlanList(plans);
planSendVO.setCrossCode("14Q1409IRF0");
JsonViewObject jsonViewObject; JsonViewObject jsonViewObject;
String manufacturerIdCode = getManufacturerCodeByCrossId(planSendVO.getCrossCode()); String manufacturerIdCode = getManufacturerCodeByCrossId(planSendVO.getCrossCode());
if (StringUtils.equals(BasicEnum.ManufacturerEnum.HK.getCode(), manufacturerIdCode)) { if (StringUtils.equals(BasicEnum.ManufacturerEnum.HK.getCode(), manufacturerIdCode)) {
......
...@@ -110,11 +110,13 @@ public class HkPlanSectionServiceImpl implements HkPlanSectionService { ...@@ -110,11 +110,13 @@ public class HkPlanSectionServiceImpl implements HkPlanSectionService {
// 获取方案ID // 获取方案ID
Integer schemeNo = sectionPO.getPatternNo(); Integer schemeNo = sectionPO.getPatternNo();
CrossSchemePO crossSchemePO = crossSchemeMapper.selectByCrossIdAndSchemeNo(crossId, schemeNo); CrossSchemePO crossSchemePO = crossSchemeMapper.selectByCrossIdAndSchemeNo(crossId, schemeNo);
Integer schemePOId = crossSchemePO.getId(); if (Objects.nonNull(crossSchemePO)) {
crossSectionPO.setScemeId(schemePOId); Integer schemePOId = crossSchemePO.getId();
// 写入数据库 crossSectionPO.setScemeId(schemePOId);
crossSectionMapper.deleteOne(crossId, sectionPO.getTimeSecNo(), planId); // 写入数据库
crossSectionMapper.insertOne(crossSectionPO); crossSectionMapper.deleteOne(crossId, sectionPO.getTimeSecNo(), planId);
crossSectionMapper.insertOne(crossSectionPO);
}
} }
} }
} }
......
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