Commit b87a2284 authored by duanruiming's avatar duanruiming

[update] 时段同步优化

parent a2f85eae
......@@ -123,16 +123,16 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
ObjectMapper mapper = JacksonUtils.getInstance();
List<PlanSectionVO> content = mapper.convertValue(jsonViewObject.getContent(), new TypeReference<List<PlanSectionVO>>() {});
if (!CollectionUtils.isEmpty(content)) {
crossSectionMapper.deleteOne(crossId, null,null);
for (PlanSectionVO planSectionVO : content) {
List<CrossPlanPO> crossPlanPOList = planSectionVO.getCrossPlanPOList();
crossPlanPOList.forEach(crossPlanPO -> {
crossPlanMapper.deleteOne(crossId, Integer.parseInt(crossPlanPO.getPlanNo()));
crossPlanMapper.insertOne(crossPlanPO);
});
List<CrossSectionPO> crossSectionPOList = planSectionVO.getCrossSectionPOList();
crossSectionPOList.forEach(crossSectionPO -> {
crossSectionMapper.deleteOne(crossId, Integer.parseInt(crossSectionPO.getSectionNo()), null);
//crossSectionMapper.deleteOne(crossId, Integer.parseInt(crossSectionPO.getSectionNo()), null);
Integer id = crossPlanMapper.selectIdByNo(crossSectionPO.getCrossId(), crossSectionPO.getPlanId());
crossSectionPO.setPlanId(id);
CrossSchemePO baseCrossSchemePO = crossSchemeMapper.selectByCrossIdAndSchemeNo(crossId, crossSectionPO.getSchemeId());
......
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