Commit 5e058812 authored by duanruiming's avatar duanruiming

[update] utc静态数据保存优化

parent 5b13fa8f
...@@ -399,6 +399,8 @@ public class StaticInfoServiceImpl implements StaticInfoService { ...@@ -399,6 +399,8 @@ public class StaticInfoServiceImpl implements StaticInfoService {
crossLightsPO.setType(0); crossLightsPO.setType(0);
if (wjPerson != 0) { if (wjPerson != 0) {
crossLightsPO.setType(3); crossLightsPO.setType(3);
} else if (wjPerson == 0 && wjLightsDir > 0) {
crossLightsPO.setType(1);
} }
crossLightsPO.setDir(wjLightsDir); crossLightsPO.setDir(wjLightsDir);
crossLightsPO.setTurn(wjLightsTurn); crossLightsPO.setTurn(wjLightsTurn);
......
...@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service; ...@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
...@@ -135,8 +136,10 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe ...@@ -135,8 +136,10 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
Integer id = crossPlanMapper.selectIdByNo(crossSectionPO.getCrossId(), crossSectionPO.getPlanId()); Integer id = crossPlanMapper.selectIdByNo(crossSectionPO.getCrossId(), crossSectionPO.getPlanId());
crossSectionPO.setPlanId(id); crossSectionPO.setPlanId(id);
CrossSchemePO baseCrossSchemePO = crossSchemeMapper.selectByCrossIdAndSchemeNo(crossId, crossSectionPO.getSchemeId()); CrossSchemePO baseCrossSchemePO = crossSchemeMapper.selectByCrossIdAndSchemeNo(crossId, crossSectionPO.getSchemeId());
crossSectionPO.setSchemeId(baseCrossSchemePO.getId()); if (Objects.nonNull(baseCrossSchemePO)) {
crossSectionMapper.insertOne(crossSectionPO); crossSectionPO.setSchemeId(baseCrossSchemePO.getId());
crossSectionMapper.insertOne(crossSectionPO);
}
}); });
} }
} }
...@@ -162,8 +165,10 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe ...@@ -162,8 +165,10 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
Integer planId = crossSchedulesPO.getPlanId(); Integer planId = crossSchedulesPO.getPlanId();
Integer id = crossPlanMapper.selectIdByNo(crossId, planId); Integer id = crossPlanMapper.selectIdByNo(crossId, planId);
crossSchedulesPO.setPlanId(id); crossSchedulesPO.setPlanId(id);
if (Objects.nonNull(id)) {
crossSchedulesMapper.insertBatch(Collections.singletonList(crossSchedulesPO));
}
} }
crossSchedulesMapper.insertBatch(content);
} }
} }
return Result.success(content); return Result.success(content);
......
package net.wanji.databus.dao.entity; package net.wanji.databus.dao.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -25,8 +26,10 @@ public class CrossPlanPO { ...@@ -25,8 +26,10 @@ public class CrossPlanPO {
private String crossId ; private String crossId ;
/** 创建时间 */ /** 创建时间 */
@ApiModelProperty(value = "创建时间",notes = "") @ApiModelProperty(value = "创建时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtCreate ; private Date gmtCreate ;
/** 修改时间 */ /** 修改时间 */
@ApiModelProperty(value = "修改时间",notes = "") @ApiModelProperty(value = "修改时间",notes = "")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtModified ; private Date gmtModified ;
} }
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