Commit 5e058812 authored by duanruiming's avatar duanruiming

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

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