数据同步
parent
95eb4ac9bd
commit
93241dd2b9
|
|
@ -0,0 +1,383 @@
|
||||||
|
package net.juntech.modules.ysdp.controller;
|
||||||
|
|
||||||
|
import com.jeeplus.aop.logging.annotation.ApiLog;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import net.juntech.modules.ysdp.service.DrivingScreenService;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpClerEvt;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpOperIndx;
|
||||||
|
import net.juntech.modules.ysdp.utils.Constant;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行车界面API接口
|
||||||
|
* 数据来源:
|
||||||
|
* - erp_cler_evt:线路运营数据(在线数/备车数/计划、实际运营数)
|
||||||
|
* - erp_oper_indx:运营指标(线路长度、车站数、正点率、兑现率)
|
||||||
|
*/
|
||||||
|
@Tag(name = "行车界面API接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "/api/driving")
|
||||||
|
public class DrivingApiController extends BaseApiController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DrivingScreenService drivingScreenService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行车页面重点关注的线路列表
|
||||||
|
*/
|
||||||
|
private static final List<String> TARGET_LINES = Arrays.asList("03", "04", "07", "15");
|
||||||
|
|
||||||
|
private static final SimpleDateFormat DATE_FMT = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1、(运营线路指标)获取线路当日运营数据
|
||||||
|
* 表:erp_cler_evt
|
||||||
|
* 字段映射:
|
||||||
|
* ln_id -> 线路
|
||||||
|
* stmt_dy -> 日期
|
||||||
|
* onln_trn_nr -> 在线数
|
||||||
|
* spar_trn_nr -> 备车数
|
||||||
|
* pln_oper_nr -> 计划运营数
|
||||||
|
* actl_oper_nr -> 实际运营数
|
||||||
|
*/
|
||||||
|
@ApiLog("1、(用车信息)获取线路当日运营数据")
|
||||||
|
@Operation(summary = "1、(用车信息)获取线路当日运营数据")
|
||||||
|
@PostMapping("getLineOperateIndicators/v1")
|
||||||
|
public ResponseEntity<JSONObject> getLineOperateIndicators(
|
||||||
|
@RequestParam(value = "lineId", required = false, defaultValue = "") String lineId,
|
||||||
|
HttpServletRequest request) {
|
||||||
|
if (!checkRequest(request)) {
|
||||||
|
return checkResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> queryLines = resolveQueryLines(lineId);
|
||||||
|
if (queryLines.isEmpty()) {
|
||||||
|
return badJsonResponse("参数lineId不在支持范围内(03、04、07、15)");
|
||||||
|
}
|
||||||
|
|
||||||
|
String cacheKey = Constant.API_CACHE_NAME_DRIVING_LINE_INDICATORS
|
||||||
|
+ (lineId == null || lineId.trim().isEmpty() ? "all" : lineId.trim());
|
||||||
|
JSONArray resultArray = new JSONArray();
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (useCache(cacheKey, request)) {
|
||||||
|
return okJsonResponse(redisUtils.getJSONArray(cacheKey), cacheKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: 新的 erp_cler_evt 表结构已更改,暂时返回空数据
|
||||||
|
Date latest = drivingScreenService.findLatestClerEvtDate(queryLines);
|
||||||
|
List<ErpClerEvt> list = drivingScreenService.listClerEvt(queryLines, latest);
|
||||||
|
|
||||||
|
Map<String, ErpClerEvt> byLine = new HashMap<>();
|
||||||
|
for (ErpClerEvt e : list) {
|
||||||
|
// TODO: 新的 ErpClerEvt 没有 getLnId() 方法
|
||||||
|
// byLine.put(e.getLnId(), e);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (String ln : queryLines) {
|
||||||
|
ErpClerEvt e = byLine.get(ln);
|
||||||
|
JSONObject row = new JSONObject();
|
||||||
|
row.put("lineId", ln);
|
||||||
|
row.put("date", latest != null ? DATE_FMT.format(latest) : "");
|
||||||
|
// TODO: 新的 ErpClerEvt 没有这些字段
|
||||||
|
row.put("onlineTrainNr", "");
|
||||||
|
row.put("spareTrainNr", "");
|
||||||
|
row.put("planOperateNr", "");
|
||||||
|
row.put("actualOperateNr", "");
|
||||||
|
resultArray.add(row);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
return badJsonResponse("获取用车信息异常", ex);
|
||||||
|
}
|
||||||
|
return okJsonResponse(resultArray, cacheKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2、(正点率)获取近一周正点率
|
||||||
|
* 表:erp_oper_indx 字段:qlt_ontime_day
|
||||||
|
* @param lineId 线路编号(可选,为空返回 3、4、7、15 号线)
|
||||||
|
* @param date 截止日期 yyyy-MM-dd(可选,为空取该线路最新一天)
|
||||||
|
*/
|
||||||
|
@ApiLog("2、(正点率)获取近一周正点率")
|
||||||
|
@Operation(summary = "2、(正点率)获取近一周正点率")
|
||||||
|
@PostMapping("getWeekOntimeRate/v1")
|
||||||
|
public ResponseEntity<JSONObject> getWeekOntimeRate(
|
||||||
|
@RequestParam(value = "lineId", required = false, defaultValue = "") String lineId,
|
||||||
|
@RequestParam(value = "date", required = false, defaultValue = "") String date,
|
||||||
|
HttpServletRequest request) {
|
||||||
|
if (!checkRequest(request)) {
|
||||||
|
return checkResult;
|
||||||
|
}
|
||||||
|
return getWeekQualityRate(request, Constant.API_CACHE_NAME_DRIVING_WEEK_ONTIME, true, lineId, date);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 3、(兑现率)获取近一周兑现率
|
||||||
|
* 表:erp_oper_indx 字段:qlt_onwork_day
|
||||||
|
* @param lineId 线路编号(可选,为空返回 3、4、7、15 号线)
|
||||||
|
* @param date 截止日期 yyyy-MM-dd(可选,为空取该线路最新一天)
|
||||||
|
*/
|
||||||
|
@ApiLog("3、(兑现率)获取近一周兑现率")
|
||||||
|
@Operation(summary = "3、(兑现率)获取近一周兑现率")
|
||||||
|
@PostMapping("getWeekOnworkRate/v1")
|
||||||
|
public ResponseEntity<JSONObject> getWeekOnworkRate(
|
||||||
|
@RequestParam(value = "lineId", required = false, defaultValue = "") String lineId,
|
||||||
|
@RequestParam(value = "date", required = false, defaultValue = "") String date,
|
||||||
|
HttpServletRequest request) {
|
||||||
|
if (!checkRequest(request)) {
|
||||||
|
return checkResult;
|
||||||
|
}
|
||||||
|
return getWeekQualityRate(request, Constant.API_CACHE_NAME_DRIVING_WEEK_ONWORK, false, lineId, date);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4、(运营信息)获取线路长度、车站数汇总
|
||||||
|
* 表:erp_oper_indx(3、4、7、15号线最新一天)
|
||||||
|
* 汇总字段:
|
||||||
|
* scl_line_lenth / 1000 -> 公里数(保留2位小数)
|
||||||
|
* scl_station_count -> 车站数
|
||||||
|
*/
|
||||||
|
@ApiLog("4、(运营信息)获取线路长度、车站数汇总")
|
||||||
|
@Operation(summary = "4、(运营信息)获取线路长度、车站数汇总")
|
||||||
|
@PostMapping("getOperateSummary/v1")
|
||||||
|
public ResponseEntity<JSONObject> getOperateSummary(HttpServletRequest request) {
|
||||||
|
if (!checkRequest(request)) {
|
||||||
|
return checkResult;
|
||||||
|
}
|
||||||
|
String cacheKey = Constant.API_CACHE_NAME_DRIVING_OPERATE_SUMMARY;
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (useCache(cacheKey, request)) {
|
||||||
|
return okJsonResponse(redisUtils.getJSON(cacheKey), cacheKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
Date latest = drivingScreenService.findLatestOperIndxDate(TARGET_LINES);
|
||||||
|
List<ErpOperIndx> list = drivingScreenService.listOperIndx(TARGET_LINES, latest);
|
||||||
|
|
||||||
|
long totalLenth = 0L;
|
||||||
|
int totalStation = 0;
|
||||||
|
for (ErpOperIndx e : list) {
|
||||||
|
if (e.getSclLineLenth() != null) {
|
||||||
|
totalLenth += e.getSclLineLenth();
|
||||||
|
}
|
||||||
|
if (e.getSclStationCount() != null) {
|
||||||
|
totalStation += e.getSclStationCount();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BigDecimal km = BigDecimal.valueOf(totalLenth)
|
||||||
|
.divide(BigDecimal.valueOf(1000), 2, RoundingMode.HALF_UP);
|
||||||
|
|
||||||
|
result.put("date", latest != null ? DATE_FMT.format(latest) : "");
|
||||||
|
result.put("totalLineLengthKm", km.toPlainString());
|
||||||
|
result.put("totalStationCount", totalStation);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
return badJsonResponse("获取运营信息汇总异常", ex);
|
||||||
|
}
|
||||||
|
return okJsonResponse(result, cacheKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5、(车辆信息)获取在线车、备车数汇总
|
||||||
|
* 表:erp_cler_evt(3、4、7、15号线最新一天)
|
||||||
|
* 汇总字段:
|
||||||
|
* onln_trn_nr -> 配属车站值(在线列车数汇总)
|
||||||
|
* spar_trn_nr -> 备车数
|
||||||
|
*/
|
||||||
|
@ApiLog("5、(车辆信息)获取在线车、备车数汇总")
|
||||||
|
@Operation(summary = "5、(车辆信息)获取在线车、备车数汇总")
|
||||||
|
@PostMapping("getVehicleSummary/v1")
|
||||||
|
public ResponseEntity<JSONObject> getVehicleSummary(HttpServletRequest request) {
|
||||||
|
if (!checkRequest(request)) {
|
||||||
|
return checkResult;
|
||||||
|
}
|
||||||
|
String cacheKey = Constant.API_CACHE_NAME_DRIVING_VEHICLE_SUMMARY;
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (useCache(cacheKey, request)) {
|
||||||
|
return okJsonResponse(redisUtils.getJSON(cacheKey), cacheKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: 新的 erp_cler_evt 表结构已更改,暂时返回空数据
|
||||||
|
Date latest = drivingScreenService.findLatestClerEvtDate(TARGET_LINES);
|
||||||
|
List<ErpClerEvt> list = drivingScreenService.listClerEvt(TARGET_LINES, latest);
|
||||||
|
|
||||||
|
BigDecimal onlineTotal = BigDecimal.ZERO;
|
||||||
|
BigDecimal spareTotal = BigDecimal.ZERO;
|
||||||
|
// 新的 ErpClerEvt 没有 onlnTrnNr/sparTrnNr 字段
|
||||||
|
// for (ErpClerEvt e : list) { ... }
|
||||||
|
|
||||||
|
result.put("date", latest != null ? DATE_FMT.format(latest) : "");
|
||||||
|
result.put("onlineTrainTotal", onlineTotal.stripTrailingZeros().toPlainString());
|
||||||
|
result.put("spareTrainTotal", spareTotal.stripTrailingZeros().toPlainString());
|
||||||
|
} catch (Exception ex) {
|
||||||
|
return badJsonResponse("获取车辆信息汇总异常", ex);
|
||||||
|
}
|
||||||
|
return okJsonResponse(result, cacheKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清理行车页面所有接口缓存
|
||||||
|
*/
|
||||||
|
@ApiLog("清理行车页面接口缓存")
|
||||||
|
@Operation(summary = "清理行车页面接口缓存")
|
||||||
|
@PostMapping("cleanCache")
|
||||||
|
public ResponseEntity<JSONObject> cleanCache(HttpServletRequest request) {
|
||||||
|
if (!checkRequest(request)) {
|
||||||
|
return checkResult;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
redisUtils.delPattern(Constant.API_CACHE_NAME_DRIVING_PREFIX + "*");
|
||||||
|
return okJsonResponse("缓存清理成功");
|
||||||
|
} catch (Exception ex) {
|
||||||
|
return badJsonResponse("清理缓存异常", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 一周质量指标通用方法
|
||||||
|
* @param onTime true=正点率(qlt_ontime_day),false=兑现率(qlt_onwork_day)
|
||||||
|
* @param lineId 线路编号(可选)
|
||||||
|
* @param date 截止日期 yyyy-MM-dd(可选)
|
||||||
|
*/
|
||||||
|
private ResponseEntity<JSONObject> getWeekQualityRate(HttpServletRequest request,
|
||||||
|
String cachePrefix,
|
||||||
|
boolean onTime,
|
||||||
|
String lineId,
|
||||||
|
String date) {
|
||||||
|
List<String> queryLines = resolveQueryLines(lineId);
|
||||||
|
if (queryLines.isEmpty()) {
|
||||||
|
return badJsonResponse("参数lineId不在支持范围内(03、04、07、15)");
|
||||||
|
}
|
||||||
|
Date endDate = parseDate(date);
|
||||||
|
if (date != null && !date.trim().isEmpty() && endDate == null) {
|
||||||
|
return badJsonResponse("参数date格式错误,需为yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
|
||||||
|
String cacheKey = cachePrefix
|
||||||
|
+ (lineId == null || lineId.trim().isEmpty() ? "all" : lineId.trim())
|
||||||
|
+ "_" + (endDate != null ? DATE_FMT.format(endDate) : "latest");
|
||||||
|
JSONArray resultArray = new JSONArray();
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (useCache(cacheKey, request)) {
|
||||||
|
return okJsonResponse(redisUtils.getJSONArray(cacheKey), cacheKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 未指定 date:以数据库中该线路最新一天为截止
|
||||||
|
Date effectiveEnd = endDate != null ? endDate : drivingScreenService.findLatestOperIndxDate(queryLines);
|
||||||
|
|
||||||
|
List<ErpOperIndx> list = effectiveEnd != null
|
||||||
|
? drivingScreenService.listOperIndxLatestNDaysEndingAt(queryLines, 7, effectiveEnd)
|
||||||
|
: Collections.emptyList();
|
||||||
|
|
||||||
|
// 按线路分组:lineId -> (date -> rate)
|
||||||
|
Map<Integer, Map<String, BigDecimal>> group = new HashMap<>();
|
||||||
|
for (ErpOperIndx e : list) {
|
||||||
|
if (e.getLineId() == null || e.getDtDate() == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String dateStr = e.getDtDate(); // dtDate 已经是 String 格式
|
||||||
|
BigDecimal rate = onTime ? e.getQltOntimeDay() : e.getQltOnworkDay();
|
||||||
|
group.computeIfAbsent(e.getLineId(), k -> new HashMap<>())
|
||||||
|
.put(dateStr, rate);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> weekDates = buildWeekDates(effectiveEnd);
|
||||||
|
for (String ln : queryLines) {
|
||||||
|
Integer lineIdInt = Integer.parseInt(ln);
|
||||||
|
Map<String, BigDecimal> lineMap = group.getOrDefault(lineIdInt, Collections.emptyMap());
|
||||||
|
JSONObject lineObj = new JSONObject();
|
||||||
|
lineObj.put("lineId", ln);
|
||||||
|
JSONArray points = new JSONArray();
|
||||||
|
for (String d : weekDates) {
|
||||||
|
JSONObject p = new JSONObject();
|
||||||
|
p.put("date", d);
|
||||||
|
BigDecimal rate = lineMap.get(d);
|
||||||
|
p.put("rate", rate != null ? rate.toPlainString() : "");
|
||||||
|
points.add(p);
|
||||||
|
}
|
||||||
|
lineObj.put("points", points);
|
||||||
|
resultArray.add(lineObj);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
return badJsonResponse(onTime ? "获取一周正点率异常" : "获取一周兑现率异常", ex);
|
||||||
|
}
|
||||||
|
return okJsonResponse(resultArray, cacheKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据截止日期生成升序的近 7 天日期列表
|
||||||
|
*/
|
||||||
|
private List<String> buildWeekDates(Date endDate) {
|
||||||
|
List<String> result = new ArrayList<>();
|
||||||
|
if (endDate == null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
LocalDate endLd = endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||||
|
for (int i = 6; i >= 0; i--) {
|
||||||
|
result.add(endLd.minusDays(i).toString());
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析查询线路列表:
|
||||||
|
* - 为空:返回全部关注线路
|
||||||
|
* - 非空:必须为 TARGET_LINES 中的补零字符串(如 "03"),否则返回空
|
||||||
|
*/
|
||||||
|
private List<String> resolveQueryLines(String lineId) {
|
||||||
|
if (lineId == null || lineId.trim().isEmpty()) {
|
||||||
|
return TARGET_LINES;
|
||||||
|
}
|
||||||
|
String s = lineId.trim();
|
||||||
|
if (!TARGET_LINES.contains(s)) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
return Collections.singletonList(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Date parseDate(String s) {
|
||||||
|
if (s == null || s.trim().isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
LocalDate ld = LocalDate.parse(s.trim(), DateTimeFormatter.ISO_LOCAL_DATE);
|
||||||
|
return Date.from(ld.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String bdToPlain(BigDecimal value) {
|
||||||
|
if (value == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return value.stripTrailingZeros().toPlainString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -64,11 +64,10 @@ public class TrafficApiController extends BaseApiController {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取进出站客流排名TOP10
|
* 获取单车站客流排名TOP10(该站点只有一条线路)
|
||||||
* 规则:只统计单线路站点(lineId不含逗号)
|
|
||||||
*/
|
*/
|
||||||
@ApiLog("1、(排名)获取进出站客流排名TOP10")
|
@ApiLog("1、(排名)获取单车站客流排名TOP10")
|
||||||
@Operation(summary = "1、(排名)获取进出站客流排名TOP10")
|
@Operation(summary = "1、(排名)获取单车站客流排名TOP10")
|
||||||
@PostMapping("getInOutStationRank/v1")
|
@PostMapping("getInOutStationRank/v1")
|
||||||
public ResponseEntity<JSONObject> getInOutStationRank(HttpServletRequest request) {
|
public ResponseEntity<JSONObject> getInOutStationRank(HttpServletRequest request) {
|
||||||
if (!checkRequest(request)) {
|
if (!checkRequest(request)) {
|
||||||
|
|
@ -96,11 +95,10 @@ public class TrafficApiController extends BaseApiController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取换乘站客流排名TOP10
|
* 获取多线路客流排名TOP10(该站点有多条线路)
|
||||||
* 规则:只统计多线路站点(lineId含逗号)
|
|
||||||
*/
|
*/
|
||||||
@ApiLog("1、(排名)获取换乘站客流排名TOP10")
|
@ApiLog("2、(排名)获取多线路客流排名TOP10")
|
||||||
@Operation(summary = "1、(排名)获取换乘站客流排名TOP10")
|
@Operation(summary = "2、(排名)获取多线路客流排名TOP10")
|
||||||
@PostMapping("getTransferStationRank/v1")
|
@PostMapping("getTransferStationRank/v1")
|
||||||
public ResponseEntity<JSONObject> getTransferStationRank(HttpServletRequest request) {
|
public ResponseEntity<JSONObject> getTransferStationRank(HttpServletRequest request) {
|
||||||
if (!checkRequest(request)) {
|
if (!checkRequest(request)) {
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@
|
||||||
LIMIT 10
|
LIMIT 10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 客运页面接口:获取进出站客流排名TOP10(单线路站点,统计所有线路) -->
|
<!-- 客运页面大屏接口:单车站客流排名TOP10(该站点只有一条线路,lineId 不含逗号) -->
|
||||||
<select id="getInOutStationMaxList" resultType="net.juntech.modules.ysdp.service.dto.YsYunyingDTO">
|
<select id="getInOutStationMaxList" resultType="net.juntech.modules.ysdp.service.dto.YsYunyingDTO">
|
||||||
SELECT
|
SELECT
|
||||||
lineId,
|
lineId,
|
||||||
|
|
@ -254,6 +254,7 @@
|
||||||
LIMIT 10
|
LIMIT 10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 客运页面大屏接口:多线路客流排名TOP10(该站点有多条线路,lineId 含逗号) -->
|
||||||
<select id="getTransferStationMaxList" resultType="net.juntech.modules.ysdp.service.dto.YsYunyingDTO">
|
<select id="getTransferStationMaxList" resultType="net.juntech.modules.ysdp.service.dto.YsYunyingDTO">
|
||||||
SELECT
|
SELECT
|
||||||
lineId,
|
lineId,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,201 @@
|
||||||
|
package net.juntech.modules.ysdp.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpClerEvt;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpOperIndx;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpClerEvtMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpOperIndxMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行车界面数据查询服务
|
||||||
|
* 数据来源:
|
||||||
|
* - erp_cler_evt:线路运营数据(在线数/备车数/计划、实际运营数)
|
||||||
|
* - erp_oper_indx:运营指标(线路长度、车站数、正点率、兑现率)
|
||||||
|
*
|
||||||
|
* 线路编号兼容:
|
||||||
|
* 数据中心两张表中 line_id / ln_id 存在混合格式:
|
||||||
|
* erp_oper_indx 中 line_id 为 "3","4","7","15",erp_cler_evt 中 ln_id 为 "01","02" 等。
|
||||||
|
* 为兼容两种格式,SQL 中同时匹配补零和未补零两种值,返回后统一归一化为补零形式。
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DrivingScreenService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpClerEvtMapper erpClerEvtMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpOperIndxMapper erpOperIndxMapper;
|
||||||
|
|
||||||
|
public Date findLatestClerEvtDate(List<String> lineIds) {
|
||||||
|
// TODO: 新的 erp_cler_evt 表结构已更改,需要根据新字段重新实现
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ErpClerEvt> listClerEvt(List<String> lineIds, Date stmtDy) {
|
||||||
|
// TODO: 新的 erp_cler_evt 表结构已更改,需要根据新字段重新实现
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date findLatestOperIndxDate(List<String> lineIds) {
|
||||||
|
List<String> expanded = expandLineIds(lineIds);
|
||||||
|
if (expanded.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// 将 lineIds 转换为 Integer 进行查询
|
||||||
|
List<Integer> lineIdInts = new ArrayList<>();
|
||||||
|
for (String s : expanded) {
|
||||||
|
try {
|
||||||
|
lineIdInts.add(Integer.parseInt(s));
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 忽略无法转换的值
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineIdInts.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
QueryWrapper<ErpOperIndx> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.select("MAX(dt_date) AS dt_date")
|
||||||
|
.in("line_id", lineIdInts);
|
||||||
|
Map<String, Object> row = erpOperIndxMapper.selectMaps(wrapper).stream().findFirst().orElse(null);
|
||||||
|
return extractDate(row, "dt_date");
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ErpOperIndx> listOperIndx(List<String> lineIds, Date dtDate) {
|
||||||
|
List<String> expanded = expandLineIds(lineIds);
|
||||||
|
if (expanded.isEmpty() || dtDate == null) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
// 将 lineIds 转换为 Integer 进行查询
|
||||||
|
List<Integer> lineIdInts = new ArrayList<>();
|
||||||
|
for (String s : expanded) {
|
||||||
|
try {
|
||||||
|
lineIdInts.add(Integer.parseInt(s));
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 忽略无法转换的值
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineIdInts.isEmpty()) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
QueryWrapper<ErpOperIndx> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.in("line_id", lineIdInts).eq("dt_date", dtDate);
|
||||||
|
List<ErpOperIndx> list = erpOperIndxMapper.selectList(wrapper);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ErpOperIndx> listOperIndxLatestNDays(List<String> lineIds, int days) {
|
||||||
|
List<String> expanded = expandLineIds(lineIds);
|
||||||
|
if (expanded.isEmpty() || days <= 0) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
Date latest = findLatestOperIndxDate(lineIds);
|
||||||
|
if (latest == null) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
return listOperIndxLatestNDaysEndingAt(lineIds, days, latest);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ErpOperIndx> listOperIndxLatestNDaysEndingAt(List<String> lineIds, int days, Date endDate) {
|
||||||
|
List<String> expanded = expandLineIds(lineIds);
|
||||||
|
if (expanded.isEmpty() || days <= 0 || endDate == null) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
// 将 lineIds 转换为 Integer 进行查询
|
||||||
|
List<Integer> lineIdInts = new ArrayList<>();
|
||||||
|
for (String s : expanded) {
|
||||||
|
try {
|
||||||
|
lineIdInts.add(Integer.parseInt(s));
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 忽略无法转换的值
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineIdInts.isEmpty()) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
LocalDate endLd = endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||||
|
LocalDate start = endLd.minusDays(days - 1L);
|
||||||
|
String startDateStr = start.toString();
|
||||||
|
String endDateStr = endLd.toString();
|
||||||
|
|
||||||
|
QueryWrapper<ErpOperIndx> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.in("line_id", lineIdInts)
|
||||||
|
.ge("dt_date", startDateStr)
|
||||||
|
.le("dt_date", endDateStr)
|
||||||
|
.orderByAsc("dt_date");
|
||||||
|
List<ErpOperIndx> list = erpOperIndxMapper.selectList(wrapper);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将补零 lineIds 扩展为同时包含补零和未补零两种形式(用于 IN 查询)。
|
||||||
|
* 例:"03" -> ["03","3"];"15" -> ["15"]
|
||||||
|
*/
|
||||||
|
private List<String> expandLineIds(List<String> lineIds) {
|
||||||
|
if (lineIds == null || lineIds.isEmpty()) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
Set<String> result = new LinkedHashSet<>();
|
||||||
|
for (String s : lineIds) {
|
||||||
|
if (s == null) continue;
|
||||||
|
String trimmed = s.trim();
|
||||||
|
if (trimmed.isEmpty()) continue;
|
||||||
|
result.add(trimmed);
|
||||||
|
// 尝试去掉前导零加入
|
||||||
|
if (trimmed.length() == 2 && trimmed.startsWith("0")) {
|
||||||
|
result.add(trimmed.substring(1));
|
||||||
|
}
|
||||||
|
// 尝试补零加入
|
||||||
|
if (trimmed.length() == 1) {
|
||||||
|
result.add("0" + trimmed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new ArrayList<>(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归一化 line_id:单个数字补零为两位("3" -> "03"),其它保持不变。
|
||||||
|
*/
|
||||||
|
private String padLineId(String s) {
|
||||||
|
if (s == null) return null;
|
||||||
|
String t = s.trim();
|
||||||
|
if (t.length() == 1 && Character.isDigit(t.charAt(0))) {
|
||||||
|
return "0" + t;
|
||||||
|
}
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Date extractDate(Map<String, Object> row, String key) {
|
||||||
|
if (row == null || row.get(key) == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
Object v = row.get(key);
|
||||||
|
if (v instanceof Date) {
|
||||||
|
return (Date) v;
|
||||||
|
}
|
||||||
|
if (v instanceof java.time.LocalDate) {
|
||||||
|
return Date.from(((java.time.LocalDate) v).atStartOfDay(ZoneId.systemDefault()).toInstant());
|
||||||
|
}
|
||||||
|
if (v instanceof String) {
|
||||||
|
try {
|
||||||
|
java.time.LocalDate ld = java.time.LocalDate.parse((String) v);
|
||||||
|
return Date.from(ld.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
/**
|
||||||
|
* Copyright © 2021-2025 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
|
||||||
|
*/
|
||||||
|
package net.juntech.modules.ysdp.sync.config;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据中心 API 鉴权配置
|
||||||
|
* 为避免 YAML 对特殊字符(如 #、$、%)的解析问题,鉴权信息直接硬编码在代码中
|
||||||
|
*
|
||||||
|
* @author Claude
|
||||||
|
* @version 2026-10-13
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class ApiAuthConfig {
|
||||||
|
|
||||||
|
// ==================== 第一组鉴权(默认) ====================
|
||||||
|
private static final String DEFAULT_HW_ID = "8976335e-4658-496b-b9b6-42c50d33e0aa";
|
||||||
|
private static final String DEFAULT_APP_KEY = "kR5RX.iheC%24X%#=4cvk+2a0.0vqSf/h.rf7/da8/9q0a-N$b6a$BG89sc2670$";
|
||||||
|
|
||||||
|
// ==================== 第二组鉴权(用于故障相关接口) ====================
|
||||||
|
private static final String GROUP2_HW_ID = "1d824af6-6988-4350-b704-5ca347b8ab47";
|
||||||
|
private static final String GROUP2_APP_KEY = "#/Fr#G/#N@9/$Sii79!$jX%#Y7e=nnO-4%2bon@.jC/#1#j56974l4L7W$Gov4dL";
|
||||||
|
|
||||||
|
private final AuthInfo defaultAuth;
|
||||||
|
private final Map<String, AuthInfo> apis = new HashMap<>();
|
||||||
|
|
||||||
|
public ApiAuthConfig() {
|
||||||
|
// 初始化默认鉴权
|
||||||
|
this.defaultAuth = new AuthInfo(DEFAULT_HW_ID, DEFAULT_APP_KEY);
|
||||||
|
|
||||||
|
// 初始化第二组鉴权的接口
|
||||||
|
AuthInfo group2 = new AuthInfo(GROUP2_HW_ID, GROUP2_APP_KEY);
|
||||||
|
apis.put("erp_record_sheet", group2);
|
||||||
|
apis.put("erp_work_order", group2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据 API 名称获取鉴权信息
|
||||||
|
*/
|
||||||
|
public AuthInfo getAuth(String apiName) {
|
||||||
|
return apis.getOrDefault(apiName, defaultAuth);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AuthInfo getDefaultAuth() {
|
||||||
|
return defaultAuth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, AuthInfo> getApis() {
|
||||||
|
return apis;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鉴权信息
|
||||||
|
*/
|
||||||
|
public static class AuthInfo {
|
||||||
|
private final String hwId;
|
||||||
|
private final String appKey;
|
||||||
|
|
||||||
|
public AuthInfo(String hwId, String appKey) {
|
||||||
|
this.hwId = hwId;
|
||||||
|
this.appKey = appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHwId() {
|
||||||
|
return hwId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppKey() {
|
||||||
|
return appKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
/**
|
||||||
|
* Copyright © 2021-2025 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
|
||||||
|
*/
|
||||||
|
package net.juntech.modules.ysdp.sync.config;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据中心 API 配置
|
||||||
|
* 从 application.yml 读取配置
|
||||||
|
*
|
||||||
|
* @author Claude
|
||||||
|
* @version 2026-08-28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Component
|
||||||
|
@ConfigurationProperties(prefix = "datacenter.api")
|
||||||
|
public class DataCenterConfig {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据中心 API 地址
|
||||||
|
*/
|
||||||
|
private String url = "http://roma.gpaas.shmetro.com/pro-data-admin/apiData/getData";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API Key
|
||||||
|
*/
|
||||||
|
private String apiKey = "c21ec9750d5b4033adac0335e3638aca";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 连接超时时间(毫秒)
|
||||||
|
*/
|
||||||
|
private int connectTimeout = 30000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取超时时间(毫秒)
|
||||||
|
*/
|
||||||
|
private int readTimeout = 60000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每页大小
|
||||||
|
*/
|
||||||
|
private int pageSize = 100;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,139 @@
|
||||||
|
/**
|
||||||
|
* Copyright © 2021-2025 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
|
||||||
|
*/
|
||||||
|
package net.juntech.modules.ysdp.sync.controller;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.service.Erp5minsTrnKmSyncService;
|
||||||
|
import net.juntech.modules.ysdp.sync.service.ErpClerEvtSyncService;
|
||||||
|
import net.juntech.modules.ysdp.sync.service.ErpOperIndxSyncService;
|
||||||
|
import net.juntech.modules.ysdp.sync.task.DataCenterSyncTaskRegistrar;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据中心同步管理接口
|
||||||
|
* 定时调度由 jeeplus-quartz 框架承担,任务注册在 sys_schedule。
|
||||||
|
* 本接口仅提供手动触发能力。
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ysdp/dataSync")
|
||||||
|
@Tag(name = "数据中心同步管理")
|
||||||
|
public class DataSyncController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpOperIndxSyncService operIndxSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Erp5minsTrnKmSyncService trnKmSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpClerEvtSyncService clerEvtSyncService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步所有表(指定日期)
|
||||||
|
*/
|
||||||
|
@Operation(summary = "同步所有表数据")
|
||||||
|
@PreAuthorize("hasAnyAuthority('ysdp:dataSync:manual')")
|
||||||
|
@PostMapping("/syncAll")
|
||||||
|
public ResponseEntity<Map<String, Object>> syncAll(@RequestParam String date) {
|
||||||
|
log.info("同步所有表,日期:{}", date);
|
||||||
|
Map<String, Object> response = new HashMap<>();
|
||||||
|
try {
|
||||||
|
operIndxSyncService.syncByDate(date);
|
||||||
|
trnKmSyncService.syncByDate(date);
|
||||||
|
clerEvtSyncService.syncByDate(date);
|
||||||
|
response.put("success", true);
|
||||||
|
response.put("message", "同步完成");
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("同步失败", e);
|
||||||
|
response.put("success", false);
|
||||||
|
response.put("message", e.getMessage());
|
||||||
|
}
|
||||||
|
return ResponseEntity.ok(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步昨天所有数据
|
||||||
|
*/
|
||||||
|
@Operation(summary = "同步昨天所有表数据")
|
||||||
|
@PreAuthorize("hasAnyAuthority('ysdp:dataSync:manual')")
|
||||||
|
@PostMapping("/syncYesterday")
|
||||||
|
public ResponseEntity<Map<String, Object>> syncYesterday() {
|
||||||
|
return syncAll(yesterday());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步5分钟列车公里数
|
||||||
|
*/
|
||||||
|
@Operation(summary = "同步5分钟列车公里数")
|
||||||
|
@PreAuthorize("hasAnyAuthority('ysdp:dataSync:manual')")
|
||||||
|
@PostMapping("/sync5minsTrnKm")
|
||||||
|
public ResponseEntity<Map<String, Object>> sync5minsTrnKm(@RequestParam String date) {
|
||||||
|
Map<String, Object> response = new HashMap<>();
|
||||||
|
try {
|
||||||
|
int count = trnKmSyncService.syncByDate(date);
|
||||||
|
response.put("success", true);
|
||||||
|
response.put("count", count);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("同步失败", e);
|
||||||
|
response.put("success", false);
|
||||||
|
response.put("message", e.getMessage());
|
||||||
|
}
|
||||||
|
return ResponseEntity.ok(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步清客事件
|
||||||
|
*/
|
||||||
|
@Operation(summary = "同步清客事件")
|
||||||
|
@PreAuthorize("hasAnyAuthority('ysdp:dataSync:manual')")
|
||||||
|
@PostMapping("/syncClerEvt")
|
||||||
|
public ResponseEntity<Map<String, Object>> syncClerEvt(@RequestParam String date) {
|
||||||
|
Map<String, Object> response = new HashMap<>();
|
||||||
|
try {
|
||||||
|
int count = clerEvtSyncService.syncByDate(date);
|
||||||
|
response.put("success", true);
|
||||||
|
response.put("count", count);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("同步失败", e);
|
||||||
|
response.put("success", false);
|
||||||
|
response.put("message", e.getMessage());
|
||||||
|
}
|
||||||
|
return ResponseEntity.ok(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取同步任务当前配置(读取 sys_schedule)
|
||||||
|
*/
|
||||||
|
@Operation(summary = "获取同步状态")
|
||||||
|
@PreAuthorize("hasAnyAuthority('ysdp:dataSync:view')")
|
||||||
|
@GetMapping("/status")
|
||||||
|
public ResponseEntity<Map<String, Object>> getStatus() {
|
||||||
|
Map<String, Object> response = new HashMap<>();
|
||||||
|
response.put("currentTime", new Date());
|
||||||
|
response.put("jobName", DataCenterSyncTaskRegistrar.JOB_NAME);
|
||||||
|
response.put("jobGroup", DataCenterSyncTaskRegistrar.JOB_GROUP);
|
||||||
|
response.put("defaultCron", DataCenterSyncTaskRegistrar.DEFAULT_CRON);
|
||||||
|
response.put("tables", new String[]{"erp_oper_indx", "erp_5mins_trn_km", "erp_cler_evt"});
|
||||||
|
response.put("message", "调度由 jeeplus-quartz 管理,请在 /quartz/scheduleJob 页面查看/修改");
|
||||||
|
return ResponseEntity.ok(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String yesterday() {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||||
|
return new SimpleDateFormat("yyyy-MM-dd").format(calendar.getTime());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运管5分钟晚点事件
|
||||||
|
* apiName: erp_5mins_delay
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_5mins_delay")
|
||||||
|
public class Erp5minsDelay implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("line_name")
|
||||||
|
private String lineName; // 线路名称
|
||||||
|
@TableField("five_date")
|
||||||
|
private String fiveDate; // 发生日期
|
||||||
|
@TableField("five_content")
|
||||||
|
private String fiveContent; // 事件内容1
|
||||||
|
@TableField("five_contenta")
|
||||||
|
private String fiveContenta; // 事件内容2
|
||||||
|
@TableField("five_contentb")
|
||||||
|
private String fiveContentb; // 事件内容3
|
||||||
|
@TableField("five_contentc")
|
||||||
|
private String fiveContentc; // 事件内容4
|
||||||
|
@TableField("five_contentd")
|
||||||
|
private String fiveContentd; // 事件内容5
|
||||||
|
@TableField("five_originating")
|
||||||
|
private String fiveOriginating; // 始发列次
|
||||||
|
@TableField("five_into")
|
||||||
|
private String fiveInto; // 终到列次
|
||||||
|
@TableField("five_rescue")
|
||||||
|
private String fiveRescue; // 救援列次
|
||||||
|
@TableField("five_time")
|
||||||
|
private String fiveTime; // 事件时间
|
||||||
|
@TableField("yyglid")
|
||||||
|
private String yyglid; // 事件ID
|
||||||
|
@TableField("line_id")
|
||||||
|
private String lineId; // 线路编号
|
||||||
|
@TableField("ins_ts")
|
||||||
|
private String insTs; // 插入时间
|
||||||
|
@TableField("upd_ts")
|
||||||
|
private String updTs; // 更新时间
|
||||||
|
@TableField("dta_tm")
|
||||||
|
private String dtaTm; // 数据时间
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5分钟客流同比环比
|
||||||
|
* apiName: erp_5mins_flx_rate
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_5mins_flx_rate")
|
||||||
|
public class Erp5minsFlxRate implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("ln_id")
|
||||||
|
private String lnId; // 线路编号
|
||||||
|
@TableField("statn_id")
|
||||||
|
private String statnId; // 车站编号
|
||||||
|
@TableField("dta_strt_tm")
|
||||||
|
private String dtaStrtTm; // 分时开始时间
|
||||||
|
@TableField("dta_end_tm")
|
||||||
|
private String dtaEndTm; // 分时结束时间
|
||||||
|
@TableField("ct_trm_in_flx_nr")
|
||||||
|
private Integer ctTrmInFlxNr; // 分时进站人数
|
||||||
|
@TableField("ct_trm_out_flx_nr")
|
||||||
|
private Integer ctTrmOutFlxNr; // 分时出站人数
|
||||||
|
@TableField("sam_trm_in_flx_nr")
|
||||||
|
private Integer samTrmInFlxNr; // 同比昨日进站人数
|
||||||
|
@TableField("sam_trm_out_flx_nr")
|
||||||
|
private Integer samTrmOutFlxNr; // 同比昨日出站人数
|
||||||
|
@TableField("chn_trm_in_flx_nr")
|
||||||
|
private Integer chnTrmInFlxNr; // 环比上周进站人数
|
||||||
|
@TableField("chn_trm_out_flx_nr")
|
||||||
|
private Integer chnTrmOutFlxNr; // 环比上周出站人数
|
||||||
|
@TableField("sam_trm_in_flx_rate")
|
||||||
|
private BigDecimal samTrmInFlxRate; // sam_trm_in_flx_rate
|
||||||
|
@TableField("sam_trm_out_flx_rate")
|
||||||
|
private BigDecimal samTrmOutFlxRate; // sam_trm_out_flx_rate
|
||||||
|
@TableField("chn_trm_in_flx_rate")
|
||||||
|
private BigDecimal chnTrmInFlxRate; // chn_trm_in_flx_rate
|
||||||
|
@TableField("chn_trm_out_flx_rate")
|
||||||
|
private BigDecimal chnTrmOutFlxRate; // chn_trm_out_flx_rate
|
||||||
|
@TableField("ins_ts")
|
||||||
|
private Date insTs; // ins_ts
|
||||||
|
@TableField("upd_ts")
|
||||||
|
private Date updTs; // upd_ts
|
||||||
|
@TableField("dta_tm")
|
||||||
|
private String dtaTm; // 数据日期
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运管5分钟晚点车公里
|
||||||
|
* apiName: erp_5mins_trn_km
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_5mins_trn_km")
|
||||||
|
public class Erp5minsTrnKm implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private String sourceId; // source_id
|
||||||
|
@TableField("line_name")
|
||||||
|
private String lineName; // line_name
|
||||||
|
@TableField("date")
|
||||||
|
private String date; // date
|
||||||
|
@TableField("km")
|
||||||
|
private BigDecimal km; // km
|
||||||
|
@TableField("line")
|
||||||
|
private Integer line; // line
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运管清客事件
|
||||||
|
* apiName: erp_cler_evt
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_cler_evt")
|
||||||
|
public class ErpClerEvt implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private String sourceId; // source_id
|
||||||
|
@TableField("event_effect")
|
||||||
|
private String eventEffect; // event_effect
|
||||||
|
@TableField("event_survey")
|
||||||
|
private String eventSurvey; // event_survey
|
||||||
|
@TableField("fifteen_location")
|
||||||
|
private String fifteenLocation; // fifteen_location
|
||||||
|
@TableField("fifteen_rescue")
|
||||||
|
private String fifteenRescue; // fifteen_rescue
|
||||||
|
@TableField("line_name")
|
||||||
|
private String lineName; // line_name
|
||||||
|
@TableField("duty_company")
|
||||||
|
private String dutyCompany; // duty_company
|
||||||
|
@TableField("duty")
|
||||||
|
private String duty; // duty
|
||||||
|
@TableField("fifteen_content")
|
||||||
|
private String fifteenContent; // fifteen_content
|
||||||
|
@TableField("rectify_suggest")
|
||||||
|
private String rectifySuggest; // rectify_suggest
|
||||||
|
@TableField("event_cause")
|
||||||
|
private String eventCause; // event_cause
|
||||||
|
@TableField("date")
|
||||||
|
private String date; // date
|
||||||
|
@TableField("handle_suggest")
|
||||||
|
private String handleSuggest; // handle_suggest
|
||||||
|
@TableField("fifteen_time")
|
||||||
|
private String fifteenTime; // fifteen_time
|
||||||
|
@TableField("fifteen_company")
|
||||||
|
private String fifteenCompany; // fifteen_company
|
||||||
|
@TableField("line")
|
||||||
|
private String line; // line
|
||||||
|
@TableField("yygl_id")
|
||||||
|
private String yyglId; // yygl_id
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划轨行区配合要求表
|
||||||
|
* apiName: erp_corequirements
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_corequirements")
|
||||||
|
public class ErpCorequirements implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("plan_no")
|
||||||
|
private String planNo; // plan_no
|
||||||
|
@TableField("company_code")
|
||||||
|
private String companyCode; // company_code
|
||||||
|
@TableField("company_name")
|
||||||
|
private String companyName; // company_name
|
||||||
|
@TableField("corperation_requirement")
|
||||||
|
private String corperationRequirement; // corperation_requirement
|
||||||
|
@TableField("create_user")
|
||||||
|
private Integer createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private Integer updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted; // is_deleted
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,181 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工执行计划
|
||||||
|
* apiName: erp_exec_plan
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_exec_plan")
|
||||||
|
public class ErpExecPlan implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("plan_no")
|
||||||
|
private String planNo; // plan_no
|
||||||
|
@TableField("plan_type")
|
||||||
|
private Integer planType; // plan_type
|
||||||
|
@TableField("construction_category")
|
||||||
|
private Integer constructionCategory; // construction_category
|
||||||
|
@TableField("multijob")
|
||||||
|
private Integer multijob; // multijob
|
||||||
|
@TableField("work_position")
|
||||||
|
private Integer workPosition; // work_position
|
||||||
|
@TableField("pinpoint_type")
|
||||||
|
private String pinpointType; // pinpoint_type
|
||||||
|
@TableField("dispatch_type")
|
||||||
|
private String dispatchType; // dispatch_type
|
||||||
|
@TableField("line_no")
|
||||||
|
private Integer lineNo; // line_no
|
||||||
|
@TableField("logout_station")
|
||||||
|
private String logoutStation; // logout_station
|
||||||
|
@TableField("logout_sequence")
|
||||||
|
private String logoutSequence; // logout_sequence
|
||||||
|
@TableField("register_sequence")
|
||||||
|
private Integer registerSequence; // register_sequence
|
||||||
|
@TableField("register_station")
|
||||||
|
private String registerStation; // register_station
|
||||||
|
@TableField("assist_register_station")
|
||||||
|
private String assistRegisterStation; // assist_register_station
|
||||||
|
@TableField("construction_section")
|
||||||
|
private String constructionSection; // construction_section
|
||||||
|
@TableField("impact_section")
|
||||||
|
private String impactSection; // impact_section
|
||||||
|
@TableField("power_section")
|
||||||
|
private String powerSection; // power_section
|
||||||
|
@TableField("power_section_json")
|
||||||
|
private String powerSectionJson; // power_section_json
|
||||||
|
@TableField("construction_section_json")
|
||||||
|
private String constructionSectionJson; // construction_section_json
|
||||||
|
@TableField("construction_unit_code")
|
||||||
|
private String constructionUnitCode; // construction_unit_code
|
||||||
|
@TableField("construction_principal_code")
|
||||||
|
private String constructionPrincipalCode; // construction_principal_code
|
||||||
|
@TableField("construction_name")
|
||||||
|
private String constructionName; // construction_name
|
||||||
|
@TableField("actual_start_time")
|
||||||
|
private Date actualStartTime; // actual_start_time
|
||||||
|
@TableField("actual_end_time")
|
||||||
|
private Date actualEndTime; // actual_end_time
|
||||||
|
@TableField("plan_start_time")
|
||||||
|
private Date planStartTime; // plan_start_time
|
||||||
|
@TableField("plan_end_time")
|
||||||
|
private Date planEndTime; // plan_end_time
|
||||||
|
@TableField("traction_power")
|
||||||
|
private Integer tractionPower; // traction_power
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status; // status
|
||||||
|
@TableField("assist_flag")
|
||||||
|
private Integer assistFlag; // assist_flag
|
||||||
|
@TableField("subline_flag")
|
||||||
|
private Integer sublineFlag; // subline_flag
|
||||||
|
@TableField("reason")
|
||||||
|
private String reason; // reason
|
||||||
|
@TableField("abnormal_reason")
|
||||||
|
private String abnormalReason; // abnormal_reason
|
||||||
|
@TableField("delay_status")
|
||||||
|
private Integer delayStatus; // delay_status
|
||||||
|
@TableField("delay_end_time")
|
||||||
|
private String delayEndTime; // delay_end_time
|
||||||
|
@TableField("delay_time")
|
||||||
|
private String delayTime; // delay_time
|
||||||
|
@TableField("delay_duration")
|
||||||
|
private String delayDuration; // delay_duration
|
||||||
|
@TableField("send_down_status")
|
||||||
|
private Integer sendDownStatus; // send_down_status
|
||||||
|
@TableField("plan_zone_type")
|
||||||
|
private Integer planZoneType; // plan_zone_type
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
@TableField("order_no")
|
||||||
|
private String orderNo; // order_no
|
||||||
|
@TableField("delay_order_no")
|
||||||
|
private String delayOrderNo; // delay_order_no
|
||||||
|
@TableField("construction_description_detail")
|
||||||
|
private String constructionDescriptionDetail; // construction_description_detail
|
||||||
|
@TableField("quotation_unit")
|
||||||
|
private String quotationUnit; // quotation_unit
|
||||||
|
@TableField("declarer")
|
||||||
|
private String declarer; // declarer
|
||||||
|
@TableField("create_user")
|
||||||
|
private String createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private String updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("deleted")
|
||||||
|
private Integer deleted; // deleted
|
||||||
|
@TableField("logout_order_no")
|
||||||
|
private String logoutOrderNo; // logout_order_no
|
||||||
|
@TableField("wander_status")
|
||||||
|
private String wanderStatus; // wander_status
|
||||||
|
@TableField("power_status")
|
||||||
|
private String powerStatus; // power_status
|
||||||
|
@TableField("cancle_type")
|
||||||
|
private String cancleType; // cancle_type
|
||||||
|
@TableField("cancle_reason")
|
||||||
|
private String cancleReason; // cancle_reason
|
||||||
|
@TableField("cancle_order_no")
|
||||||
|
private String cancleOrderNo; // cancle_order_no
|
||||||
|
@TableField("cancle_status")
|
||||||
|
private String cancleStatus; // cancle_status
|
||||||
|
@TableField("send_down_time")
|
||||||
|
private String sendDownTime; // send_down_time
|
||||||
|
@TableField("register_time")
|
||||||
|
private String registerTime; // register_time
|
||||||
|
@TableField("is_delay")
|
||||||
|
private Integer isDelay; // is_delay
|
||||||
|
@TableField("is_conflict")
|
||||||
|
private Integer isConflict; // is_conflict
|
||||||
|
@TableField("special_work_type")
|
||||||
|
private String specialWorkType; // special_work_type
|
||||||
|
@TableField("touch_rail_impact")
|
||||||
|
private String touchRailImpact; // touch_rail_impact
|
||||||
|
@TableField("affected_section_json")
|
||||||
|
private String affectedSectionJson; // affected_section_json
|
||||||
|
@TableField("construction_manager_info")
|
||||||
|
private String constructionManagerInfo; // construction_manager_info
|
||||||
|
@TableField("main_registration_station_name")
|
||||||
|
private String mainRegistrationStationName; // main_registration_station_name
|
||||||
|
@TableField("special_work_type_name")
|
||||||
|
private String specialWorkTypeName; // special_work_type_name
|
||||||
|
@TableField("construction_impact_name")
|
||||||
|
private String constructionImpactName; // construction_impact_name
|
||||||
|
@TableField("plan_type2")
|
||||||
|
private Integer planType2; // plan_type2
|
||||||
|
@TableField("empty_time")
|
||||||
|
private String emptyTime; // empty_time
|
||||||
|
@TableField("empty_user")
|
||||||
|
private String emptyUser; // empty_user
|
||||||
|
@TableField("before_cancel_status")
|
||||||
|
private String beforeCancelStatus; // before_cancel_status
|
||||||
|
@TableField("abnormal_cancel_time")
|
||||||
|
private String abnormalCancelTime; // abnormal_cancel_time
|
||||||
|
@TableField("main_line_no")
|
||||||
|
private String mainLineNo; // main_line_no
|
||||||
|
@TableField("need_out_scheme")
|
||||||
|
private Integer needOutScheme; // need_out_scheme
|
||||||
|
@TableField("out_shceme_line")
|
||||||
|
private String outShcemeLine; // out_shceme_line
|
||||||
|
@TableField("out_scheme_train")
|
||||||
|
private String outSchemeTrain; // out_scheme_train
|
||||||
|
@TableField("abnormal_type")
|
||||||
|
private String abnormalType; // abnormal_type
|
||||||
|
@TableField("stop_confirm_time")
|
||||||
|
private String stopConfirmTime; // stop_confirm_time
|
||||||
|
@TableField("reason_type")
|
||||||
|
private String reasonType; // reason_type
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列车间隔计划
|
||||||
|
* apiName: erp_line_interval
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_line_interval")
|
||||||
|
public class ErpLineInterval implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("line_no")
|
||||||
|
private Integer lineNo; // line_no
|
||||||
|
@TableField("start_station")
|
||||||
|
private Integer startStation; // start_station
|
||||||
|
@TableField("end_station")
|
||||||
|
private Integer endStation; // end_station
|
||||||
|
@TableField("start_station_name")
|
||||||
|
private String startStationName; // start_station_name
|
||||||
|
@TableField("end_station_name")
|
||||||
|
private String endStationName; // end_station_name
|
||||||
|
@TableField("max_interval")
|
||||||
|
private Date maxInterval; // max_interval
|
||||||
|
@TableField("min_interval")
|
||||||
|
private Date minInterval; // min_interval
|
||||||
|
@TableField("time_description")
|
||||||
|
private String timeDescription; // time_description
|
||||||
|
@TableField("time_period")
|
||||||
|
private String timePeriod; // time_period
|
||||||
|
@TableField("event_type")
|
||||||
|
private String eventType; // event_type
|
||||||
|
@TableField("cycle_type")
|
||||||
|
private String cycleType; // cycle_type
|
||||||
|
@TableField("station_details")
|
||||||
|
private String stationDetails; // station_details
|
||||||
|
@TableField("direction")
|
||||||
|
private Integer direction; // direction
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线路
|
||||||
|
* apiName: erp_ln
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_ln")
|
||||||
|
public class ErpLn implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("ln_id")
|
||||||
|
private String lnId; // 线路编码
|
||||||
|
@TableField("ln_nm_cn")
|
||||||
|
private String lnNmCn; // 线路中文名
|
||||||
|
@TableField("ln_nm_en")
|
||||||
|
private String lnNmEn; // 线路英文名
|
||||||
|
@TableField("opn_dt")
|
||||||
|
private Date opnDt; // 线路开通时间
|
||||||
|
@TableField("oprn_totl_lgt")
|
||||||
|
private BigDecimal oprnTotlLgt; // oprn_totl_lgt
|
||||||
|
@TableField("oprn_statn_nr")
|
||||||
|
private BigDecimal oprnStatnNr; // oprn_statn_nr
|
||||||
|
@TableField("trnsfr_statn_nr")
|
||||||
|
private BigDecimal trnsfrStatnNr; // trnsfr_statn_nr
|
||||||
|
@TableField("grnd_lgt")
|
||||||
|
private BigDecimal grndLgt; // grnd_lgt
|
||||||
|
@TableField("tnel_lgt")
|
||||||
|
private BigDecimal tnelLgt; // tnel_lgt
|
||||||
|
@TableField("vdct_lgt")
|
||||||
|
private BigDecimal vdctLgt; // vdct_lgt
|
||||||
|
@TableField("asng_veh_nr")
|
||||||
|
private BigDecimal asngVehNr; // asng_veh_nr
|
||||||
|
@TableField("unt_id")
|
||||||
|
private String untId; // 公司机构编码
|
||||||
|
@TableField("ln_clr")
|
||||||
|
private String lnClr; // 线路颜色线路颜色。十六进制颜色
|
||||||
|
@TableField("veh_tp")
|
||||||
|
private String vehTp; // 车辆类型
|
||||||
|
@TableField("veh_grp")
|
||||||
|
private String vehGrp; // 车辆编制
|
||||||
|
@TableField("crg_ld")
|
||||||
|
private String crgLd; // 车厢定员
|
||||||
|
@TableField("jb_id")
|
||||||
|
private Long jbId; // 作业编号
|
||||||
|
@TableField("ins_ts")
|
||||||
|
private Date insTs; // 插入时间
|
||||||
|
@TableField("upd_ts")
|
||||||
|
private Date updTs; // 更新时间
|
||||||
|
@TableField("unt_nm")
|
||||||
|
private String untNm; // unt_nm
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,130 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营线路指标(日)
|
||||||
|
* apiName: erp_ln_indx
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_ln_indx")
|
||||||
|
public class ErpLnIndx implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("ln_id")
|
||||||
|
private Integer lnId; // ln_id
|
||||||
|
@TableField("oper_trn_nr_dly_acmlt")
|
||||||
|
private String operTrnNrDlyAcmlt; // oper_trn_nr_dly_acmlt
|
||||||
|
@TableField("oper_trn_nr_mthly_acmlt")
|
||||||
|
private String operTrnNrMthlyAcmlt; // oper_trn_nr_mthly_acmlt
|
||||||
|
@TableField("oper_trn_nr_yrly_acmlt")
|
||||||
|
private String operTrnNrYrlyAcmlt; // oper_trn_nr_yrly_acmlt
|
||||||
|
@TableField("oper_kmag_dly_acmlt")
|
||||||
|
private String operKmagDlyAcmlt; // oper_kmag_dly_acmlt
|
||||||
|
@TableField("oper_kmag_mthly_acmlt")
|
||||||
|
private String operKmagMthlyAcmlt; // oper_kmag_mthly_acmlt
|
||||||
|
@TableField("oper_kmag_yrly_acmlt")
|
||||||
|
private String operKmagYrlyAcmlt; // oper_kmag_yrly_acmlt
|
||||||
|
@TableField("pasgr_vol_dly_acmlt")
|
||||||
|
private String pasgrVolDlyAcmlt; // pasgr_vol_dly_acmlt
|
||||||
|
@TableField("pasgr_vol_mthly_acmlt")
|
||||||
|
private String pasgrVolMthlyAcmlt; // pasgr_vol_mthly_acmlt
|
||||||
|
@TableField("pasgr_vol_yrly_acmlt")
|
||||||
|
private String pasgrVolYrlyAcmlt; // pasgr_vol_yrly_acmlt
|
||||||
|
@TableField("trnsfr_nr_dly_acmlt")
|
||||||
|
private String trnsfrNrDlyAcmlt; // trnsfr_nr_dly_acmlt
|
||||||
|
@TableField("trnsfr_nr_mthly_acmlt")
|
||||||
|
private String trnsfrNrMthlyAcmlt; // trnsfr_nr_mthly_acmlt
|
||||||
|
@TableField("trnsfr_nr_yrly_acmlt")
|
||||||
|
private String trnsfrNrYrlyAcmlt; // trnsfr_nr_yrly_acmlt
|
||||||
|
@TableField("oper_rvn_dly_acmlt")
|
||||||
|
private String operRvnDlyAcmlt; // oper_rvn_dly_acmlt
|
||||||
|
@TableField("oper_rvn_mthly_acmlt")
|
||||||
|
private String operRvnMthlyAcmlt; // oper_rvn_mthly_acmlt
|
||||||
|
@TableField("oper_rvn_yrly_acmlt")
|
||||||
|
private String operRvnYrlyAcmlt; // oper_rvn_yrly_acmlt
|
||||||
|
@TableField("onln_trn_8_nr")
|
||||||
|
private String onlnTrn8Nr; // onln_trn_8_nr
|
||||||
|
@TableField("onln_trn_7_nr")
|
||||||
|
private String onlnTrn7Nr; // onln_trn_7_nr
|
||||||
|
@TableField("onln_trn_6_nr")
|
||||||
|
private String onlnTrn6Nr; // onln_trn_6_nr
|
||||||
|
@TableField("onln_trn_4_nr")
|
||||||
|
private String onlnTrn4Nr; // onln_trn_4_nr
|
||||||
|
@TableField("onln_trn_3_nr")
|
||||||
|
private String onlnTrn3Nr; // onln_trn_3_nr
|
||||||
|
@TableField("spar_trn_8_nr")
|
||||||
|
private String sparTrn8Nr; // spar_trn_8_nr
|
||||||
|
@TableField("spar_trn_7_nr")
|
||||||
|
private String sparTrn7Nr; // spar_trn_7_nr
|
||||||
|
@TableField("spar_trn_6_nr")
|
||||||
|
private String sparTrn6Nr; // spar_trn_6_nr
|
||||||
|
@TableField("spar_trn_4_nr")
|
||||||
|
private String sparTrn4Nr; // spar_trn_4_nr
|
||||||
|
@TableField("spar_trn_3_nr")
|
||||||
|
private String sparTrn3Nr; // spar_trn_3_nr
|
||||||
|
@TableField("on_tm_rate_dly_acmlt")
|
||||||
|
private String onTmRateDlyAcmlt; // on_tm_rate_dly_acmlt
|
||||||
|
@TableField("on_tm_rate_mthly_acmlt")
|
||||||
|
private String onTmRateMthlyAcmlt; // on_tm_rate_mthly_acmlt
|
||||||
|
@TableField("on_tm_rate_yrly_acmlt")
|
||||||
|
private String onTmRateYrlyAcmlt; // on_tm_rate_yrly_acmlt
|
||||||
|
@TableField("flflm_rate_dly_acmlt")
|
||||||
|
private String flflmRateDlyAcmlt; // flflm_rate_dly_acmlt
|
||||||
|
@TableField("flflm_rate_mthly_acmlt")
|
||||||
|
private String flflmRateMthlyAcmlt; // flflm_rate_mthly_acmlt
|
||||||
|
@TableField("flflm_rate_yrly_acmlt")
|
||||||
|
private String flflmRateYrlyAcmlt; // flflm_rate_yrly_acmlt
|
||||||
|
@TableField("lgt")
|
||||||
|
private String lgt; // lgt
|
||||||
|
@TableField("statn_cnt")
|
||||||
|
private String statnCnt; // statn_cnt
|
||||||
|
@TableField("alct_trn_nr_8")
|
||||||
|
private String alctTrnNr8; // alct_trn_nr_8
|
||||||
|
@TableField("alct_trn_nr_7")
|
||||||
|
private String alctTrnNr7; // alct_trn_nr_7
|
||||||
|
@TableField("alct_trn_nr_6")
|
||||||
|
private String alctTrnNr6; // alct_trn_nr_6
|
||||||
|
@TableField("alct_trn_nr_4")
|
||||||
|
private String alctTrnNr4; // alct_trn_nr_4
|
||||||
|
@TableField("alct_trn_nr_3")
|
||||||
|
private String alctTrnNr3; // alct_trn_nr_3
|
||||||
|
@TableField("km_5mins_dly")
|
||||||
|
private BigDecimal km5minsDly; // km_5mins_dly
|
||||||
|
@TableField("onln_trn_nr")
|
||||||
|
private BigDecimal onlnTrnNr; // onln_trn_nr
|
||||||
|
@TableField("spar_trn_nr")
|
||||||
|
private BigDecimal sparTrnNr; // spar_trn_nr
|
||||||
|
@TableField("actl_oper_nr")
|
||||||
|
private BigDecimal actlOperNr; // actl_oper_nr
|
||||||
|
@TableField("addn_oper_nr")
|
||||||
|
private BigDecimal addnOperNr; // addn_oper_nr
|
||||||
|
@TableField("pln_empty_nr")
|
||||||
|
private BigDecimal plnEmptyNr; // pln_empty_nr
|
||||||
|
@TableField("actl_empty_nr")
|
||||||
|
private BigDecimal actlEmptyNr; // actl_empty_nr
|
||||||
|
@TableField("addn_empty_nr")
|
||||||
|
private BigDecimal addnEmptyNr; // addn_empty_nr
|
||||||
|
@TableField("cnl_oper_nr")
|
||||||
|
private BigDecimal cnlOperNr; // cnl_oper_nr
|
||||||
|
@TableField("cnl_empty_nr")
|
||||||
|
private BigDecimal cnlEmptyNr; // cnl_empty_nr
|
||||||
|
@TableField("pln_oper_nr")
|
||||||
|
private BigDecimal plnOperNr; // pln_oper_nr
|
||||||
|
@TableField("ins_ts")
|
||||||
|
private Date insTs; // ins_ts
|
||||||
|
@TableField("upd_ts")
|
||||||
|
private Date updTs; // upd_ts
|
||||||
|
@TableField("stmt_dy")
|
||||||
|
private String stmtDy; // stmt_dy
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,239 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划轨行区基本信息表
|
||||||
|
* apiName: erp_main
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_main")
|
||||||
|
public class ErpMain implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("plan_no")
|
||||||
|
private String planNo; // plan_no
|
||||||
|
@TableField("line_no")
|
||||||
|
private Integer lineNo; // line_no
|
||||||
|
@TableField("construction_category")
|
||||||
|
private Integer constructionCategory; // construction_category
|
||||||
|
@TableField("work_position")
|
||||||
|
private Integer workPosition; // work_position
|
||||||
|
@TableField("action_type")
|
||||||
|
private Integer actionType; // action_type
|
||||||
|
@TableField("is_multipoint_work")
|
||||||
|
private Integer isMultipointWork; // is_multipoint_work
|
||||||
|
@TableField("traction_power")
|
||||||
|
private Integer tractionPower; // traction_power
|
||||||
|
@TableField("vehicle_route_desc")
|
||||||
|
private String vehicleRouteDesc; // vehicle_route_desc
|
||||||
|
@TableField("trains_num")
|
||||||
|
private String trainsNum; // trains_num
|
||||||
|
@TableField("start_date")
|
||||||
|
private Date startDate; // start_date
|
||||||
|
@TableField("end_date")
|
||||||
|
private Date endDate; // end_date
|
||||||
|
@TableField("main_registration_station")
|
||||||
|
private String mainRegistrationStation; // main_registration_station
|
||||||
|
@TableField("assist_registration_station")
|
||||||
|
private Integer assistRegistrationStation; // assist_registration_station
|
||||||
|
@TableField("construction_name")
|
||||||
|
private String constructionName; // construction_name
|
||||||
|
@TableField("construction_manager")
|
||||||
|
private String constructionManager; // construction_manager
|
||||||
|
@TableField("construction_unit")
|
||||||
|
private String constructionUnit; // construction_unit
|
||||||
|
@TableField("maintenance_department")
|
||||||
|
private String maintenanceDepartment; // maintenance_department
|
||||||
|
@TableField("maintenance_department_name")
|
||||||
|
private String maintenanceDepartmentName; // maintenance_department_name
|
||||||
|
@TableField("team_department")
|
||||||
|
private String teamDepartment; // team_department
|
||||||
|
@TableField("quotation_unit")
|
||||||
|
private String quotationUnit; // quotation_unit
|
||||||
|
@TableField("construction_description_detail")
|
||||||
|
private String constructionDescriptionDetail; // construction_description_detail
|
||||||
|
@TableField("declarer")
|
||||||
|
private String declarer; // declarer
|
||||||
|
@TableField("speciality_option_one")
|
||||||
|
private String specialityOptionOne; // speciality_option_one
|
||||||
|
@TableField("speciality_option_two")
|
||||||
|
private String specialityOptionTwo; // speciality_option_two
|
||||||
|
@TableField("major_scheme")
|
||||||
|
private String majorScheme; // major_scheme
|
||||||
|
@TableField("supplementation_reason")
|
||||||
|
private String supplementationReason; // supplementation_reason
|
||||||
|
@TableField("change_reason")
|
||||||
|
private String changeReason; // change_reason
|
||||||
|
@TableField("plan_type")
|
||||||
|
private Integer planType; // plan_type
|
||||||
|
@TableField("is_cycle_plan")
|
||||||
|
private Integer isCyclePlan; // is_cycle_plan
|
||||||
|
@TableField("pinpoint_type")
|
||||||
|
private String pinpointType; // pinpoint_type
|
||||||
|
@TableField("plan_zone_type")
|
||||||
|
private Integer planZoneType; // plan_zone_type
|
||||||
|
@TableField("touch_rail_status")
|
||||||
|
private Integer touchRailStatus; // touch_rail_status
|
||||||
|
@TableField("touch_rail_impact")
|
||||||
|
private Integer touchRailImpact; // touch_rail_impact
|
||||||
|
@TableField("depot_stop_power_type")
|
||||||
|
private Integer depotStopPowerType; // depot_stop_power_type
|
||||||
|
@TableField("power_outage_mode")
|
||||||
|
private String powerOutageMode; // power_outage_mode
|
||||||
|
@TableField("construction_impact")
|
||||||
|
private String constructionImpact; // construction_impact
|
||||||
|
@TableField("signal_concentration_station")
|
||||||
|
private String signalConcentrationStation; // signal_concentration_station
|
||||||
|
@TableField("transformer")
|
||||||
|
private String transformer; // transformer
|
||||||
|
@TableField("other_impact")
|
||||||
|
private String otherImpact; // other_impact
|
||||||
|
@TableField("power_outage_range")
|
||||||
|
private String powerOutageRange; // power_outage_range
|
||||||
|
@TableField("order_no")
|
||||||
|
private Integer orderNo; // order_no
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status; // status
|
||||||
|
@TableField("apply_publish_status")
|
||||||
|
private Integer applyPublishStatus; // apply_publish_status
|
||||||
|
@TableField("construction_impact_zone")
|
||||||
|
private String constructionImpactZone; // construction_impact_zone
|
||||||
|
@TableField("patrol_vehicle_advance_flag")
|
||||||
|
private Integer patrolVehicleAdvanceFlag; // patrol_vehicle_advance_flag
|
||||||
|
@TableField("special_work_type")
|
||||||
|
private String specialWorkType; // special_work_type
|
||||||
|
@TableField("safety_measures")
|
||||||
|
private String safetyMeasures; // safety_measures
|
||||||
|
@TableField("centralized_ups_construction")
|
||||||
|
private Integer centralizedUpsConstruction; // centralized_ups_construction
|
||||||
|
@TableField("initial_prepare_requirement")
|
||||||
|
private String initialPrepareRequirement; // initial_prepare_requirement
|
||||||
|
@TableField("ats_flag")
|
||||||
|
private Integer atsFlag; // ats_flag
|
||||||
|
@TableField("ats_detail")
|
||||||
|
private String atsDetail; // ats_detail
|
||||||
|
@TableField("construction_organization_command_system")
|
||||||
|
private String constructionOrganizationCommandSystem; // construction_organization_command_system
|
||||||
|
@TableField("operation_progress")
|
||||||
|
private Integer operationProgress; // operation_progress
|
||||||
|
@TableField("other_requirements_desc")
|
||||||
|
private String otherRequirementsDesc; // other_requirements_desc
|
||||||
|
@TableField("other_operation_progress")
|
||||||
|
private String otherOperationProgress; // other_operation_progress
|
||||||
|
@TableField("other_requirements")
|
||||||
|
private String otherRequirements; // other_requirements
|
||||||
|
@TableField("approval_unit")
|
||||||
|
private String approvalUnit; // approval_unit
|
||||||
|
@TableField("related_item")
|
||||||
|
private String relatedItem; // related_item
|
||||||
|
@TableField("is_template")
|
||||||
|
private Integer isTemplate; // is_template
|
||||||
|
@TableField("is_train_tacks_poweroff")
|
||||||
|
private String isTrainTacksPoweroff; // is_train_tacks_poweroff
|
||||||
|
@TableField("train_tracks_proweroff_zone")
|
||||||
|
private String trainTracksProweroffZone; // train_tracks_proweroff_zone
|
||||||
|
@TableField("create_user")
|
||||||
|
private Integer createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private String updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("applicant_affiliation")
|
||||||
|
private String applicantAffiliation; // applicant_affiliation
|
||||||
|
@TableField("graph_id")
|
||||||
|
private String graphId; // graph_id
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
@TableField("template_type")
|
||||||
|
private String templateType; // template_type
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted; // is_deleted
|
||||||
|
@TableField("construction_zone_string")
|
||||||
|
private String constructionZoneString; // construction_zone_string
|
||||||
|
@TableField("fas_bus_firepump_worktype")
|
||||||
|
private Integer fasBusFirepumpWorktype; // fas_bus_firepump_worktype
|
||||||
|
@TableField("is_self_report_approve")
|
||||||
|
private Integer isSelfReportApprove; // is_self_report_approve
|
||||||
|
@TableField("bidirectional_flag")
|
||||||
|
private Integer bidirectionalFlag; // bidirectional_flag
|
||||||
|
@TableField("repair_type")
|
||||||
|
private Integer repairType; // repair_type
|
||||||
|
@TableField("affect_section_up_down")
|
||||||
|
private Integer affectSectionUpDown; // affect_section_up_down
|
||||||
|
@TableField("power_outage_status")
|
||||||
|
private String powerOutageStatus; // power_outage_status
|
||||||
|
@TableField("cooperation_requirement")
|
||||||
|
private String cooperationRequirement; // cooperation_requirement
|
||||||
|
@TableField("blockade_flag")
|
||||||
|
private Integer blockadeFlag; // blockade_flag
|
||||||
|
@TableField("all_blockade_flag")
|
||||||
|
private Integer allBlockadeFlag; // all_blockade_flag
|
||||||
|
@TableField("construction_manager_text")
|
||||||
|
private String constructionManagerText; // construction_manager_text
|
||||||
|
@TableField("plan_source_code")
|
||||||
|
private String planSourceCode; // plan_source_code
|
||||||
|
@TableField("quotation_unit_code")
|
||||||
|
private String quotationUnitCode; // quotation_unit_code
|
||||||
|
@TableField("construction_unit_name")
|
||||||
|
private String constructionUnitName; // construction_unit_name
|
||||||
|
@TableField("declarer_account")
|
||||||
|
private String declarerAccount; // declarer_account
|
||||||
|
@TableField("org_id")
|
||||||
|
private Integer orgId; // org_id
|
||||||
|
@TableField("user_id")
|
||||||
|
private String userId; // user_id
|
||||||
|
@TableField("zone_type")
|
||||||
|
private Integer zoneType; // zone_type
|
||||||
|
@TableField("is_continuous")
|
||||||
|
private Integer isContinuous; // is_continuous
|
||||||
|
@TableField("construction_manager_info")
|
||||||
|
private String constructionManagerInfo; // construction_manager_info
|
||||||
|
@TableField("main_registration_station_name")
|
||||||
|
private String mainRegistrationStationName; // main_registration_station_name
|
||||||
|
@TableField("special_work_type_name")
|
||||||
|
private String specialWorkTypeName; // special_work_type_name
|
||||||
|
@TableField("construction_impact_name")
|
||||||
|
private String constructionImpactName; // construction_impact_name
|
||||||
|
@TableField("plan_type2")
|
||||||
|
private Integer planType2; // plan_type2
|
||||||
|
@TableField("work_point_position")
|
||||||
|
private String workPointPosition; // work_point_position
|
||||||
|
@TableField("protect_info")
|
||||||
|
private String protectInfo; // protect_info
|
||||||
|
@TableField("single_no")
|
||||||
|
private String singleNo; // single_no
|
||||||
|
@TableField("exec_group")
|
||||||
|
private String execGroup; // exec_group
|
||||||
|
@TableField("exec_attribute")
|
||||||
|
private Integer execAttribute; // exec_attribute
|
||||||
|
@TableField("rollback_tag")
|
||||||
|
private String rollbackTag; // rollback_tag
|
||||||
|
@TableField("cross_line_no")
|
||||||
|
private String crossLineNo; // cross_line_no
|
||||||
|
@TableField("important_status")
|
||||||
|
private String importantStatus; // important_status
|
||||||
|
@TableField("break_skylight")
|
||||||
|
private Integer breakSkylight; // break_skylight
|
||||||
|
@TableField("protect_single_no")
|
||||||
|
private String protectSingleNo; // protect_single_no
|
||||||
|
@TableField("plan_tag")
|
||||||
|
private Integer planTag; // plan_tag
|
||||||
|
@TableField("assess")
|
||||||
|
private Integer assess; // assess
|
||||||
|
@TableField("special")
|
||||||
|
private Integer special; // special
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划历史信息表
|
||||||
|
* apiName: erp_main_history
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_main_history")
|
||||||
|
public class ErpMainHistory implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("plan_no")
|
||||||
|
private String planNo; // plan_no
|
||||||
|
@TableField("version")
|
||||||
|
private Integer version; // version
|
||||||
|
@TableField("apply_type")
|
||||||
|
private Integer applyType; // apply_type
|
||||||
|
@TableField("apply_reason")
|
||||||
|
private String applyReason; // apply_reason
|
||||||
|
@TableField("order_no")
|
||||||
|
private Integer orderNo; // order_no
|
||||||
|
@TableField("history_data")
|
||||||
|
private String historyData; // history_data
|
||||||
|
@TableField("order_opinion")
|
||||||
|
private String orderOpinion; // order_opinion
|
||||||
|
@TableField("create_user")
|
||||||
|
private Integer createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private String updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted; // is_deleted
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
@TableField("reason_type")
|
||||||
|
private String reasonType; // reason_type
|
||||||
|
@TableField("reason_content")
|
||||||
|
private String reasonContent; // reason_content
|
||||||
|
@TableField("advance")
|
||||||
|
private Integer advance; // advance
|
||||||
|
@TableField("train_json")
|
||||||
|
private String trainJson; // train_json
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,103 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重大施工方案基本信息表
|
||||||
|
* apiName: erp_major_scheme_basicinfo
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_major_scheme_basicinfo")
|
||||||
|
public class ErpMajorSchemeBasicinfo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("scheme_no")
|
||||||
|
private String schemeNo; // scheme_no
|
||||||
|
@TableField("apply_unit_no")
|
||||||
|
private String applyUnitNo; // apply_unit_no
|
||||||
|
@TableField("apply_unit")
|
||||||
|
private String applyUnit; // apply_unit
|
||||||
|
@TableField("apply_person")
|
||||||
|
private String applyPerson; // apply_person
|
||||||
|
@TableField("tel")
|
||||||
|
private String tel; // tel
|
||||||
|
@TableField("involve_lines")
|
||||||
|
private String involveLines; // involve_lines
|
||||||
|
@TableField("involve_lines_label")
|
||||||
|
private String involveLinesLabel; // involve_lines_label
|
||||||
|
@TableField("cm_subject")
|
||||||
|
private String cmSubject; // cm_subject
|
||||||
|
@TableField("cm_subject_label")
|
||||||
|
private String cmSubjectLabel; // cm_subject_label
|
||||||
|
@TableField("zone_type")
|
||||||
|
private String zoneType; // zone_type
|
||||||
|
@TableField("zone_type_label")
|
||||||
|
private String zoneTypeLabel; // zone_type_label
|
||||||
|
@TableField("construction_name")
|
||||||
|
private String constructionName; // construction_name
|
||||||
|
@TableField("start_time")
|
||||||
|
private Date startTime; // start_time
|
||||||
|
@TableField("end_time")
|
||||||
|
private Date endTime; // end_time
|
||||||
|
@TableField("major_source_code")
|
||||||
|
private String majorSourceCode; // major_source_code
|
||||||
|
@TableField("construction_unit")
|
||||||
|
private String constructionUnit; // construction_unit
|
||||||
|
@TableField("construction_zone")
|
||||||
|
private String constructionZone; // construction_zone
|
||||||
|
@TableField("scheme_detail")
|
||||||
|
private String schemeDetail; // scheme_detail
|
||||||
|
@TableField("phase_content")
|
||||||
|
private String phaseContent; // phase_content
|
||||||
|
@TableField("project_info")
|
||||||
|
private String projectInfo; // project_info
|
||||||
|
@TableField("project_level")
|
||||||
|
private Integer projectLevel; // project_level
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status; // status
|
||||||
|
@TableField("business_put_under")
|
||||||
|
private Integer businessPutUnder; // business_put_under
|
||||||
|
@TableField("order_status")
|
||||||
|
private String orderStatus; // order_status
|
||||||
|
@TableField("order_id")
|
||||||
|
private Integer orderId; // order_id
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted; // is_deleted
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
@TableField("create_user")
|
||||||
|
private String createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private Integer updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("delay_status")
|
||||||
|
private Integer delayStatus; // delay_status
|
||||||
|
@TableField("delay_order_id")
|
||||||
|
private String delayOrderId; // delay_order_id
|
||||||
|
@TableField("number_of_delays")
|
||||||
|
private Integer numberOfDelays; // number_of_delays
|
||||||
|
@TableField("number_of_citation")
|
||||||
|
private Integer numberOfCitation; // number_of_citation
|
||||||
|
@TableField("apply_scheme_plan_time")
|
||||||
|
private Date applySchemePlanTime; // apply_scheme_plan_time
|
||||||
|
@TableField("files_config_type")
|
||||||
|
private Integer filesConfigType; // files_config_type
|
||||||
|
@TableField("three_new_device")
|
||||||
|
private Date threeNewDevice; // three_new_device
|
||||||
|
@TableField("construction_time")
|
||||||
|
private String constructionTime; // construction_time
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地铁路网信息表
|
||||||
|
* apiName: erp_mtr_ntwk
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_mtr_ntwk")
|
||||||
|
public class ErpMtrNtwk implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("oprn_ln_nr")
|
||||||
|
private Integer oprnLnNr; // 路网运营线路数
|
||||||
|
@TableField("oprn_statn_nr")
|
||||||
|
private Integer oprnStatnNr; // 路网运营车站数
|
||||||
|
@TableField("oprn_totl_lgt")
|
||||||
|
private BigDecimal oprnTotlLgt; // oprn_totl_lgt
|
||||||
|
@TableField("grnd_lgt")
|
||||||
|
private BigDecimal grndLgt; // grnd_lgt
|
||||||
|
@TableField("tnel_lgt")
|
||||||
|
private BigDecimal tnelLgt; // tnel_lgt
|
||||||
|
@TableField("vdct_lgt")
|
||||||
|
private BigDecimal vdctLgt; // vdct_lgt
|
||||||
|
@TableField("trnsfr_statn_nr")
|
||||||
|
private Integer trnsfrStatnNr; // 换乘车站数
|
||||||
|
@TableField("clinr_statn_nr")
|
||||||
|
private Integer clinrStatnNr; // 共线重复车站数
|
||||||
|
@TableField("vrsn_id")
|
||||||
|
private String vrsnId; // 版本号
|
||||||
|
@TableField("jb_id")
|
||||||
|
private Long jbId; // 作业编号
|
||||||
|
@TableField("ins_ts")
|
||||||
|
private Date insTs; // 插入时间
|
||||||
|
@TableField("upd_ts")
|
||||||
|
private Date updTs; // 更新时间
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,105 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营指标
|
||||||
|
* apiName: erp_oper_indx
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_oper_indx")
|
||||||
|
public class ErpOperIndx implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private String sourceId; // source_id
|
||||||
|
@TableField("dt_date")
|
||||||
|
private String dtDate; // dt_date
|
||||||
|
@TableField("line_id")
|
||||||
|
private Integer lineId; // line_id
|
||||||
|
@TableField("pro_metro_column_day")
|
||||||
|
private Integer proMetroColumnDay; // pro_metro_column_day
|
||||||
|
@TableField("pro_metro_column_month")
|
||||||
|
private Integer proMetroColumnMonth; // pro_metro_column_month
|
||||||
|
@TableField("pro_metro_column_year")
|
||||||
|
private Integer proMetroColumnYear; // pro_metro_column_year
|
||||||
|
@TableField("pro_metro_distance_day")
|
||||||
|
private BigDecimal proMetroDistanceDay; // pro_metro_distance_day
|
||||||
|
@TableField("pro_metro_distance_month")
|
||||||
|
private BigDecimal proMetroDistanceMonth; // pro_metro_distance_month
|
||||||
|
@TableField("pro_metro_distance_year")
|
||||||
|
private BigDecimal proMetroDistanceYear; // pro_metro_distance_year
|
||||||
|
@TableField("pro_passenger_capacity_day")
|
||||||
|
private Integer proPassengerCapacityDay; // pro_passenger_capacity_day
|
||||||
|
@TableField("pro_passenger_capacity_month")
|
||||||
|
private Integer proPassengerCapacityMonth; // pro_passenger_capacity_month
|
||||||
|
@TableField("pro_passenger_capacity_year")
|
||||||
|
private Long proPassengerCapacityYear; // pro_passenger_capacity_year
|
||||||
|
@TableField("pro_passenger_transfer_day")
|
||||||
|
private Integer proPassengerTransferDay; // pro_passenger_transfer_day
|
||||||
|
@TableField("pro_passenger_transfer_month")
|
||||||
|
private Integer proPassengerTransferMonth; // pro_passenger_transfer_month
|
||||||
|
@TableField("pro_passenger_transfer_year")
|
||||||
|
private Integer proPassengerTransferYear; // pro_passenger_transfer_year
|
||||||
|
@TableField("pro_ticket_income_day")
|
||||||
|
private BigDecimal proTicketIncomeDay; // pro_ticket_income_day
|
||||||
|
@TableField("pro_ticket_income_month")
|
||||||
|
private BigDecimal proTicketIncomeMonth; // pro_ticket_income_month
|
||||||
|
@TableField("pro_ticket_income_year")
|
||||||
|
private BigDecimal proTicketIncomeYear; // pro_ticket_income_year
|
||||||
|
@TableField("pro_online_8_sect")
|
||||||
|
private Integer proOnline8Sect; // pro_online_8_sect
|
||||||
|
@TableField("pro_online_7_sect")
|
||||||
|
private Integer proOnline7Sect; // pro_online_7_sect
|
||||||
|
@TableField("pro_online_6_sect")
|
||||||
|
private Integer proOnline6Sect; // pro_online_6_sect
|
||||||
|
@TableField("pro_online_4_sect")
|
||||||
|
private Integer proOnline4Sect; // pro_online_4_sect
|
||||||
|
@TableField("pro_online_3_sect")
|
||||||
|
private Integer proOnline3Sect; // pro_online_3_sect
|
||||||
|
@TableField("pro_backup_8_sect")
|
||||||
|
private Integer proBackup8Sect; // pro_backup_8_sect
|
||||||
|
@TableField("pro_backup_7_sect")
|
||||||
|
private Integer proBackup7Sect; // pro_backup_7_sect
|
||||||
|
@TableField("pro_backup_6_sect")
|
||||||
|
private Integer proBackup6Sect; // pro_backup_6_sect
|
||||||
|
@TableField("pro_backup_4_sect")
|
||||||
|
private Integer proBackup4Sect; // pro_backup_4_sect
|
||||||
|
@TableField("pro_backup_3_sect")
|
||||||
|
private Integer proBackup3Sect; // pro_backup_3_sect
|
||||||
|
@TableField("qlt_ontime_day")
|
||||||
|
private BigDecimal qltOntimeDay; // qlt_ontime_day
|
||||||
|
@TableField("qlt_ontime_month")
|
||||||
|
private BigDecimal qltOntimeMonth; // qlt_ontime_month
|
||||||
|
@TableField("qlt_ontime_year")
|
||||||
|
private BigDecimal qltOntimeYear; // qlt_ontime_year
|
||||||
|
@TableField("qlt_onwork_day")
|
||||||
|
private BigDecimal qltOnworkDay; // qlt_onwork_day
|
||||||
|
@TableField("qlt_onwork_month")
|
||||||
|
private BigDecimal qltOnworkMonth; // qlt_onwork_month
|
||||||
|
@TableField("qlt_onwork_year")
|
||||||
|
private BigDecimal qltOnworkYear; // qlt_onwork_year
|
||||||
|
@TableField("scl_line_lenth")
|
||||||
|
private Integer sclLineLenth; // scl_line_lenth
|
||||||
|
@TableField("scl_station_count")
|
||||||
|
private Integer sclStationCount; // scl_station_count
|
||||||
|
@TableField("scl_8_sect")
|
||||||
|
private Integer scl8Sect; // scl_8_sect
|
||||||
|
@TableField("scl_7_sect")
|
||||||
|
private Integer scl7Sect; // scl_7_sect
|
||||||
|
@TableField("scl_6_sect")
|
||||||
|
private Integer scl6Sect; // scl_6_sect
|
||||||
|
@TableField("scl_4_sect")
|
||||||
|
private Integer scl4Sect; // scl_4_sect
|
||||||
|
@TableField("scl_3_sect")
|
||||||
|
private Integer scl3Sect; // scl_3_sect
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车场施工计划停电范围
|
||||||
|
* apiName: erp_outage_depot
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_outage_depot")
|
||||||
|
public class ErpOutageDepot implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("plan_no")
|
||||||
|
private String planNo; // plan_no
|
||||||
|
@TableField("line_no")
|
||||||
|
private Integer lineNo; // line_no
|
||||||
|
@TableField("construction_object_type")
|
||||||
|
private Integer constructionObjectType; // construction_object_type
|
||||||
|
@TableField("construction_object_code")
|
||||||
|
private String constructionObjectCode; // construction_object_code
|
||||||
|
@TableField("create_user")
|
||||||
|
private String createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private String createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private String updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted; // is_deleted
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
@TableField("depot_no")
|
||||||
|
private String depotNo; // depot_no
|
||||||
|
@TableField("depot_name")
|
||||||
|
private String depotName; // depot_name
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划停电范围
|
||||||
|
* apiName: erp_outage_range
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_outage_range")
|
||||||
|
public class ErpOutageRange implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("plan_no")
|
||||||
|
private String planNo; // plan_no
|
||||||
|
@TableField("line_no")
|
||||||
|
private Integer lineNo; // line_no
|
||||||
|
@TableField("start_site_code")
|
||||||
|
private String startSiteCode; // start_site_code
|
||||||
|
@TableField("start_site_name")
|
||||||
|
private String startSiteName; // start_site_name
|
||||||
|
@TableField("start_site_sequence_no")
|
||||||
|
private Integer startSiteSequenceNo; // start_site_sequence_no
|
||||||
|
@TableField("include_start_site_flag")
|
||||||
|
private Integer includeStartSiteFlag; // include_start_site_flag
|
||||||
|
@TableField("end_site_code")
|
||||||
|
private Integer endSiteCode; // end_site_code
|
||||||
|
@TableField("end_site_name")
|
||||||
|
private String endSiteName; // end_site_name
|
||||||
|
@TableField("end_site_sequence_no")
|
||||||
|
private Integer endSiteSequenceNo; // end_site_sequence_no
|
||||||
|
@TableField("include_end_site_flag")
|
||||||
|
private Integer includeEndSiteFlag; // include_end_site_flag
|
||||||
|
@TableField("up_down_flag")
|
||||||
|
private Integer upDownFlag; // up_down_flag
|
||||||
|
@TableField("bifurcation_flag")
|
||||||
|
private Integer bifurcationFlag; // bifurcation_flag
|
||||||
|
@TableField("out_exit_flag")
|
||||||
|
private Integer outExitFlag; // out_exit_flag
|
||||||
|
@TableField("supplementary_explanation")
|
||||||
|
private String supplementaryExplanation; // supplementary_explanation
|
||||||
|
@TableField("switch_name")
|
||||||
|
private String switchName; // switch_name
|
||||||
|
@TableField("impact_type")
|
||||||
|
private Integer impactType; // impact_type
|
||||||
|
@TableField("type")
|
||||||
|
private Integer type; // type
|
||||||
|
@TableField("create_user")
|
||||||
|
private Integer createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private Integer updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted; // is_deleted
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
@TableField("parent_site_no")
|
||||||
|
private String parentSiteNo; // parent_site_no
|
||||||
|
@TableField("is_all_park")
|
||||||
|
private Integer isAllPark; // is_all_park
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工执行计划登记注销
|
||||||
|
* apiName: erp_plan_register_cancel
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_plan_register_cancel")
|
||||||
|
public class ErpPlanRegisterCancel implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private String sourceId; // source_id
|
||||||
|
@TableField("plan_zone_type")
|
||||||
|
private String planZoneType; // plan_zone_type
|
||||||
|
@TableField("plan_no")
|
||||||
|
private String planNo; // plan_no
|
||||||
|
@TableField("principal_mobile")
|
||||||
|
private String principalMobile; // principal_mobile
|
||||||
|
@TableField("principal_no")
|
||||||
|
private String principalNo; // principal_no
|
||||||
|
@TableField("principal")
|
||||||
|
private String principal; // principal
|
||||||
|
@TableField("unit")
|
||||||
|
private String unit; // unit
|
||||||
|
@TableField("register_number")
|
||||||
|
private String registerNumber; // register_number
|
||||||
|
@TableField("register_status")
|
||||||
|
private String registerStatus; // register_status
|
||||||
|
@TableField("single_no")
|
||||||
|
private String singleNo; // single_no
|
||||||
|
@TableField("ground_lead")
|
||||||
|
private String groundLead; // ground_lead
|
||||||
|
@TableField("station_no")
|
||||||
|
private String stationNo; // station_no
|
||||||
|
@TableField("out_station_no")
|
||||||
|
private String outStationNo; // out_station_no
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
@TableField("create_user")
|
||||||
|
private String createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private String createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private String updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private String updateTime; // update_time
|
||||||
|
@TableField("deleted")
|
||||||
|
private String deleted; // deleted
|
||||||
|
@TableField("construction_result")
|
||||||
|
private String constructionResult; // construction_result
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,290 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划明细表
|
||||||
|
* apiName: erp_pln_dtl
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_pln_dtl")
|
||||||
|
public class ErpPlnDtl implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("mr_line_id")
|
||||||
|
private String mrLineId; // 申请单行号
|
||||||
|
@TableField("tracing_id")
|
||||||
|
private String tracingId; // 计划追踪号
|
||||||
|
@TableField("mr_id")
|
||||||
|
private String mrId; // 申请单号
|
||||||
|
@TableField("line_no")
|
||||||
|
private BigDecimal lineNo; // line_no
|
||||||
|
@TableField("mr_type")
|
||||||
|
private String mrType; // MR计划类型
|
||||||
|
@TableField("expense_type")
|
||||||
|
private String expenseType; // 费用类别
|
||||||
|
@TableField("ship_to_id")
|
||||||
|
private String shipToId; // 到货点
|
||||||
|
@TableField("ship_to_name")
|
||||||
|
private String shipToName; // 到货点名称
|
||||||
|
@TableField("company_code")
|
||||||
|
private String companyCode; // 公司别
|
||||||
|
@TableField("company_name")
|
||||||
|
private String companyName; // 公司别名称
|
||||||
|
@TableField("dd_bill_to")
|
||||||
|
private String ddBillTo; // 领用帐套
|
||||||
|
@TableField("dd_bill_to_name")
|
||||||
|
private String ddBillToName; // 领用帐套名称
|
||||||
|
@TableField("org_id")
|
||||||
|
private String orgId; // 组织代码
|
||||||
|
@TableField("org_name")
|
||||||
|
private String orgName; // 组织名称
|
||||||
|
@TableField("dept_id")
|
||||||
|
private String deptId; // 申请部门
|
||||||
|
@TableField("requested_id")
|
||||||
|
private String requestedId; // 申请人岗位号
|
||||||
|
@TableField("requested_no")
|
||||||
|
private String requestedNo; // 申请人工号
|
||||||
|
@TableField("item_id")
|
||||||
|
private String itemId; // 物料代码
|
||||||
|
@TableField("item_name")
|
||||||
|
private String itemName; // 物料名称
|
||||||
|
@TableField("item_desc")
|
||||||
|
private String itemDesc; // 物料描述
|
||||||
|
@TableField("material_type")
|
||||||
|
private String materialType; // 供应方式
|
||||||
|
@TableField("class1")
|
||||||
|
private String class1; // 物料大类
|
||||||
|
@TableField("class2")
|
||||||
|
private String class2; // 物料中类
|
||||||
|
@TableField("class3")
|
||||||
|
private String class3; // 物料细类
|
||||||
|
@TableField("cls_id")
|
||||||
|
private String clsId; // 物料叶级类
|
||||||
|
@TableField("uom")
|
||||||
|
private String uom; // 单位
|
||||||
|
@TableField("qty")
|
||||||
|
private BigDecimal qty; // qty
|
||||||
|
@TableField("delivery_date")
|
||||||
|
private String deliveryDate; // 要货期
|
||||||
|
@TableField("days_late")
|
||||||
|
private BigDecimal daysLate; // days_late
|
||||||
|
@TableField("days_early")
|
||||||
|
private BigDecimal daysEarly; // days_early
|
||||||
|
@TableField("replace_model")
|
||||||
|
private String replaceModel; // 替代型规
|
||||||
|
@TableField("inv_id")
|
||||||
|
private String invId; // 库存记录编号
|
||||||
|
@TableField("dd_id")
|
||||||
|
private String ddId; // 领用单号
|
||||||
|
@TableField("budget_check")
|
||||||
|
private String budgetCheck; // 是否预算检核
|
||||||
|
@TableField("budget_price")
|
||||||
|
private BigDecimal budgetPrice; // budget_price
|
||||||
|
@TableField("budget_amt")
|
||||||
|
private BigDecimal budgetAmt; // budget_amt
|
||||||
|
@TableField("cost_center")
|
||||||
|
private String costCenter; // 成本中心
|
||||||
|
@TableField("dd_acc_code")
|
||||||
|
private String ddAccCode; // 物料类别码
|
||||||
|
@TableField("src_buyer_code")
|
||||||
|
private String srcBuyerCode; // 寻源采购员
|
||||||
|
@TableField("buyer_code")
|
||||||
|
private String buyerCode; // 执行采购员
|
||||||
|
@TableField("pur_dept_id")
|
||||||
|
private String purDeptId; // 采购部门
|
||||||
|
@TableField("state_id")
|
||||||
|
private String stateId; // 状态
|
||||||
|
@TableField("app_state_id")
|
||||||
|
private String appStateId; // 审批状态
|
||||||
|
@TableField("state_history")
|
||||||
|
private String stateHistory; // 状态历史
|
||||||
|
@TableField("auto_reserved")
|
||||||
|
private String autoReserved; // 自动预约标记
|
||||||
|
@TableField("change_reason_code")
|
||||||
|
private String changeReasonCode; // 变更理由
|
||||||
|
@TableField("change_reason_others")
|
||||||
|
private String changeReasonOthers; // 其他退单理由
|
||||||
|
@TableField("bpo_line_id")
|
||||||
|
private String bpoLineId; // 合同行号
|
||||||
|
@TableField("inq_line_id")
|
||||||
|
private String inqLineId; // 询价单号
|
||||||
|
@TableField("pick_line_id")
|
||||||
|
private String pickLineId; // 对应拟选单号
|
||||||
|
@TableField("order_line_id")
|
||||||
|
private String orderLineId; // 订单号
|
||||||
|
@TableField("mr_state")
|
||||||
|
private String mrState; // MR状态(拟选、合同、订单等)
|
||||||
|
@TableField("inv_type")
|
||||||
|
private String invType; // 库存属性
|
||||||
|
@TableField("delivery_type")
|
||||||
|
private String deliveryType; // 派送方式
|
||||||
|
@TableField("delivery_to")
|
||||||
|
private String deliveryTo; // 派送地点编号
|
||||||
|
@TableField("delivery_name")
|
||||||
|
private String deliveryName; // 派送地点名称
|
||||||
|
@TableField("is_accident_flag")
|
||||||
|
private String isAccidentFlag; // 事故件
|
||||||
|
@TableField("dd_purpose")
|
||||||
|
private String ddPurpose; // 领用去向
|
||||||
|
@TableField("statistic_type")
|
||||||
|
private String statisticType; // 统计分类
|
||||||
|
@TableField("import_domestic_flag")
|
||||||
|
private String importDomesticFlag; // 是否建议进口
|
||||||
|
@TableField("orign_factory")
|
||||||
|
private String orignFactory; // 原制造厂
|
||||||
|
@TableField("equipment_no")
|
||||||
|
private String equipmentNo; // 设备编号
|
||||||
|
@TableField("project_no")
|
||||||
|
private String projectNo; // 项目编号
|
||||||
|
@TableField("proxy_dept_id")
|
||||||
|
private String proxyDeptId; // 代理公司别 二期还原计划标记
|
||||||
|
@TableField("ext_sys_src")
|
||||||
|
private String extSysSrc; // 外部系统来源
|
||||||
|
@TableField("ext_sys_id")
|
||||||
|
private String extSysId; // 外部系统对应编号
|
||||||
|
@TableField("mr_remark")
|
||||||
|
private String mrRemark; // 计划备注
|
||||||
|
@TableField("version_no")
|
||||||
|
private BigDecimal versionNo; // version_no
|
||||||
|
@TableField("reserve1")
|
||||||
|
private String reserve1; // 保留字段1
|
||||||
|
@TableField("reserve2")
|
||||||
|
private String reserve2; // 保留字段2
|
||||||
|
@TableField("reserve3")
|
||||||
|
private String reserve3; // 保留字段3
|
||||||
|
@TableField("reserve4")
|
||||||
|
private String reserve4; // 保留字段4
|
||||||
|
@TableField("reserve5")
|
||||||
|
private String reserve5; // 保留字段5
|
||||||
|
@TableField("reserve6")
|
||||||
|
private String reserve6; // 保留字段6
|
||||||
|
@TableField("reserve7")
|
||||||
|
private BigDecimal reserve7; // reserve7
|
||||||
|
@TableField("reserve8")
|
||||||
|
private BigDecimal reserve8; // reserve8
|
||||||
|
@TableField("reserve9")
|
||||||
|
private BigDecimal reserve9; // reserve9
|
||||||
|
@TableField("rec_creator")
|
||||||
|
private String recCreator; // 记录创建者
|
||||||
|
@TableField("rec_create_time")
|
||||||
|
private String recCreateTime; // 记录创建时间
|
||||||
|
@TableField("rec_revisor")
|
||||||
|
private String recRevisor; // 记录修改人员
|
||||||
|
@TableField("rec_revise_time")
|
||||||
|
private String recReviseTime; // 记录修改时间
|
||||||
|
@TableField("archive_flag")
|
||||||
|
private String archiveFlag; // 归档标记
|
||||||
|
@TableField("delivery_remark")
|
||||||
|
private String deliveryRemark; // 派送备注
|
||||||
|
@TableField("pur_company_code")
|
||||||
|
private String purCompanyCode; // 采购公司别
|
||||||
|
@TableField("pur_company_name")
|
||||||
|
private String purCompanyName; // 采购公司别名称
|
||||||
|
@TableField("pur_bill_to")
|
||||||
|
private String purBillTo; // 采购领用帐套
|
||||||
|
@TableField("pur_bill_to_name")
|
||||||
|
private String purBillToName; // 采购领用帐套名称
|
||||||
|
@TableField("dept_name")
|
||||||
|
private String deptName; // 部门名称
|
||||||
|
@TableField("pur_dept_name")
|
||||||
|
private String purDeptName; // 采购部门名称
|
||||||
|
@TableField("task_id")
|
||||||
|
private String taskId; // 任务号
|
||||||
|
@TableField("project_id")
|
||||||
|
private String projectId; // 项目号
|
||||||
|
@TableField("ys_obj_id")
|
||||||
|
private String ysObjId; // 预算主键
|
||||||
|
@TableField("former_plan_num")
|
||||||
|
private BigDecimal formerPlanNum; // former_plan_num
|
||||||
|
@TableField("transmit_flag")
|
||||||
|
private String transmitFlag; // 是否下达
|
||||||
|
@TableField("plan_job")
|
||||||
|
private String planJob; // 计划员
|
||||||
|
@TableField("order_num")
|
||||||
|
private BigDecimal orderNum; // order_num
|
||||||
|
@TableField("plan_take_num")
|
||||||
|
private BigDecimal planTakeNum; // plan_take_num
|
||||||
|
@TableField("out_num")
|
||||||
|
private BigDecimal outNum; // out_num
|
||||||
|
@TableField("instock_num")
|
||||||
|
private BigDecimal instockNum; // instock_num
|
||||||
|
@TableField("jh_job_id")
|
||||||
|
private String jhJobId; // 计划员岗位号
|
||||||
|
@TableField("cg_job_id")
|
||||||
|
private String cgJobId; // 执行采购员岗位号
|
||||||
|
@TableField("line_id")
|
||||||
|
private String lineId; // 线路名
|
||||||
|
@TableField("wo_no")
|
||||||
|
private BigDecimal woNo; // wo_no
|
||||||
|
@TableField("part_no")
|
||||||
|
private String partNo; // EAM物资编码
|
||||||
|
@TableField("destination_id")
|
||||||
|
private String destinationId; // 内部目的地(物理库区)
|
||||||
|
@TableField("destination_description")
|
||||||
|
private String destinationDescription; // 内部目的地描述
|
||||||
|
@TableField("material_order_no")
|
||||||
|
private BigDecimal materialOrderNo; // material_order_no
|
||||||
|
@TableField("maint_material_order_no")
|
||||||
|
private BigDecimal maintMaterialOrderNo; // maint_material_order_no
|
||||||
|
@TableField("line_seq_no")
|
||||||
|
private BigDecimal lineSeqNo; // line_seq_no
|
||||||
|
@TableField("release_no")
|
||||||
|
private BigDecimal releaseNo; // release_no
|
||||||
|
@TableField("line_item_no")
|
||||||
|
private BigDecimal lineItemNo; // line_item_no
|
||||||
|
@TableField("inv_physic")
|
||||||
|
private String invPhysic; // 物理库区
|
||||||
|
@TableField("out_flag")
|
||||||
|
private String outFlag; // 是否超预算
|
||||||
|
@TableField("sn_flag")
|
||||||
|
private String snFlag; // 是否序列号跟踪
|
||||||
|
@TableField("is_bpoing")
|
||||||
|
private String isBpoing; // 是否已寻源
|
||||||
|
@TableField("work_team")
|
||||||
|
private String workTeam; // 班组
|
||||||
|
@TableField("to_purchase")
|
||||||
|
private String toPurchase; // 转请购标记
|
||||||
|
@TableField("manufacture_dealer")
|
||||||
|
private String manufactureDealer; // 生产厂商/品牌
|
||||||
|
@TableField("urgency_type")
|
||||||
|
private String urgencyType; // 紧急程度
|
||||||
|
@TableField("last_price")
|
||||||
|
private BigDecimal lastPrice; // last_price
|
||||||
|
@TableField("package_spec")
|
||||||
|
private String packageSpec; // 包装规格
|
||||||
|
@TableField("eam_id")
|
||||||
|
private String eamId; // EAM物资编码
|
||||||
|
@TableField("div_date")
|
||||||
|
private String divDate; // 分员日期
|
||||||
|
@TableField("bid_qty")
|
||||||
|
private BigDecimal bidQty; // bid_qty
|
||||||
|
@TableField("jh_qty")
|
||||||
|
private BigDecimal jhQty; // jh_qty
|
||||||
|
@TableField("is_module_dep")
|
||||||
|
private String isModuleDep; // 是否已模块分员
|
||||||
|
@TableField("contract_type")
|
||||||
|
private String contractType; // 合同明细确定00-确定10-待定
|
||||||
|
@TableField("mr_next")
|
||||||
|
private String mrNext; // 下一步部门
|
||||||
|
@TableField("belong_to")
|
||||||
|
private String belongTo; // 计划归属STCG-食堂采购
|
||||||
|
@TableField("db_num")
|
||||||
|
private BigDecimal dbNum; // db_num
|
||||||
|
@TableField("job_id")
|
||||||
|
private Long jobId; // 数据抽取作业ID
|
||||||
|
@TableField("ins_ts")
|
||||||
|
private Date insTs; // 数据插入时间
|
||||||
|
@TableField("upd_ts")
|
||||||
|
private Date updTs; // 数据更新时间
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,102 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划主表
|
||||||
|
* apiName: erp_pln_mstr
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_pln_mstr")
|
||||||
|
public class ErpPlnMstr implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("mr_id")
|
||||||
|
private String mrId; // 申请单号
|
||||||
|
@TableField("dept_id")
|
||||||
|
private String deptId; // 申请部门
|
||||||
|
@TableField("requested_id")
|
||||||
|
private String requestedId; // 申请人岗位号
|
||||||
|
@TableField("requested_no")
|
||||||
|
private String requestedNo; // 申请人工号
|
||||||
|
@TableField("pr_type")
|
||||||
|
private String prType; // 计划类型(IU、IS、FA、SS、ZZ自助采购)
|
||||||
|
@TableField("urgency_type")
|
||||||
|
private String urgencyType; // 紧急程度
|
||||||
|
@TableField("expense_type")
|
||||||
|
private String expenseType; // 费用类别
|
||||||
|
@TableField("usage_type")
|
||||||
|
private String usageType; // 使用性质
|
||||||
|
@TableField("state_id")
|
||||||
|
private String stateId; // 状态
|
||||||
|
@TableField("state_history")
|
||||||
|
private String stateHistory; // 状态历史
|
||||||
|
@TableField("app_state_id")
|
||||||
|
private String appStateId; // 审批状态
|
||||||
|
@TableField("dd_bill_to")
|
||||||
|
private String ddBillTo; // 领用帐套
|
||||||
|
@TableField("dd_bill_to_name")
|
||||||
|
private String ddBillToName; // 领用帐套名称
|
||||||
|
@TableField("ship_to_id")
|
||||||
|
private String shipToId; // 到货点
|
||||||
|
@TableField("ship_to_name")
|
||||||
|
private String shipToName; // 到货点名称
|
||||||
|
@TableField("org_id")
|
||||||
|
private String orgId; // 组织代码
|
||||||
|
@TableField("org_name")
|
||||||
|
private String orgName; // 组织名称
|
||||||
|
@TableField("auto_approve")
|
||||||
|
private String autoApprove; // 是否自动审批
|
||||||
|
@TableField("version_no")
|
||||||
|
private BigDecimal versionNo; // version_no
|
||||||
|
@TableField("reserve1")
|
||||||
|
private String reserve1; // 保留字段1
|
||||||
|
@TableField("reserve2")
|
||||||
|
private String reserve2; // 保留字段2
|
||||||
|
@TableField("reserve3")
|
||||||
|
private String reserve3; // 保留字段3
|
||||||
|
@TableField("reserve4")
|
||||||
|
private BigDecimal reserve4; // reserve4
|
||||||
|
@TableField("reserve5")
|
||||||
|
private BigDecimal reserve5; // reserve5
|
||||||
|
@TableField("rec_creator")
|
||||||
|
private String recCreator; // 记录创建者
|
||||||
|
@TableField("rec_create_time")
|
||||||
|
private String recCreateTime; // 记录创建时间
|
||||||
|
@TableField("rec_revisor")
|
||||||
|
private String recRevisor; // 记录修改人员
|
||||||
|
@TableField("rec_revise_time")
|
||||||
|
private String recReviseTime; // 记录修改时间
|
||||||
|
@TableField("archive_flag")
|
||||||
|
private String archiveFlag; // 归档标记
|
||||||
|
@TableField("tracing_id")
|
||||||
|
private String tracingId; // 计划追踪号
|
||||||
|
@TableField("company_code")
|
||||||
|
private String companyCode; // 公司编号
|
||||||
|
@TableField("company_name")
|
||||||
|
private String companyName; // 公司名称
|
||||||
|
@TableField("dept_name")
|
||||||
|
private String deptName; // 部门名称
|
||||||
|
@TableField("project_id")
|
||||||
|
private String projectId; // 项目号
|
||||||
|
@TableField("transmit_flag")
|
||||||
|
private String transmitFlag; // 是否下达
|
||||||
|
@TableField("contract_type")
|
||||||
|
private String contractType; // 合同明细确定00-确定10-待定
|
||||||
|
@TableField("job_id")
|
||||||
|
private Long jobId; // 作业编号
|
||||||
|
@TableField("ins_ts")
|
||||||
|
private Date insTs; // 插入时间
|
||||||
|
@TableField("upd_ts")
|
||||||
|
private Date updTs; // 更新时间
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划安全措施表
|
||||||
|
* apiName: erp_safety_regulation
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_safety_regulation")
|
||||||
|
public class ErpSafetyRegulation implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("plan_no")
|
||||||
|
private String planNo; // plan_no
|
||||||
|
@TableField("line_no")
|
||||||
|
private Integer lineNo; // line_no
|
||||||
|
@TableField("transformer_no")
|
||||||
|
private String transformerNo; // transformer_no
|
||||||
|
@TableField("is_stop_back")
|
||||||
|
private Integer isStopBack; // is_stop_back
|
||||||
|
@TableField("canonical_no")
|
||||||
|
private String canonicalNo; // canonical_no
|
||||||
|
@TableField("task_name")
|
||||||
|
private String taskName; // task_name
|
||||||
|
@TableField("is_self_define")
|
||||||
|
private String isSelfDefine; // is_self_define
|
||||||
|
@TableField("create_user")
|
||||||
|
private Integer createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private Integer updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted; // is_deleted
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工影响区段表
|
||||||
|
* apiName: erp_section
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_section")
|
||||||
|
public class ErpSection implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("plan_no")
|
||||||
|
private String planNo; // plan_no
|
||||||
|
@TableField("line_no")
|
||||||
|
private Integer lineNo; // line_no
|
||||||
|
@TableField("start_site_no")
|
||||||
|
private String startSiteNo; // start_site_no
|
||||||
|
@TableField("start_site_sequence_no")
|
||||||
|
private Integer startSiteSequenceNo; // start_site_sequence_no
|
||||||
|
@TableField("start_station_name")
|
||||||
|
private String startStationName; // start_station_name
|
||||||
|
@TableField("include_start_site_flag")
|
||||||
|
private Integer includeStartSiteFlag; // include_start_site_flag
|
||||||
|
@TableField("end_site_no")
|
||||||
|
private String endSiteNo; // end_site_no
|
||||||
|
@TableField("end_site_sequence_no")
|
||||||
|
private Integer endSiteSequenceNo; // end_site_sequence_no
|
||||||
|
@TableField("end_station_name")
|
||||||
|
private String endStationName; // end_station_name
|
||||||
|
@TableField("include_end_site_flag")
|
||||||
|
private Integer includeEndSiteFlag; // include_end_site_flag
|
||||||
|
@TableField("up_down_flag")
|
||||||
|
private Integer upDownFlag; // up_down_flag
|
||||||
|
@TableField("bifurcation_flag")
|
||||||
|
private Integer bifurcationFlag; // bifurcation_flag
|
||||||
|
@TableField("out_exit_flag")
|
||||||
|
private Integer outExitFlag; // out_exit_flag
|
||||||
|
@TableField("supplementary_explanation")
|
||||||
|
private String supplementaryExplanation; // supplementary_explanation
|
||||||
|
@TableField("switch_name")
|
||||||
|
private String switchName; // switch_name
|
||||||
|
@TableField("impact_type")
|
||||||
|
private Integer impactType; // impact_type
|
||||||
|
@TableField("impact_type_name")
|
||||||
|
private String impactTypeName; // impact_type_name
|
||||||
|
@TableField("type")
|
||||||
|
private Integer type; // type
|
||||||
|
@TableField("create_user")
|
||||||
|
private Integer createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private Integer updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted; // is_deleted
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
@TableField("affect_region")
|
||||||
|
private String affectRegion; // affect_region
|
||||||
|
@TableField("station_type")
|
||||||
|
private Integer stationType; // station_type
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车场施工影响区段表
|
||||||
|
* apiName: erp_section_depot
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_section_depot")
|
||||||
|
public class ErpSectionDepot implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("plan_no")
|
||||||
|
private String planNo; // plan_no
|
||||||
|
@TableField("line_no")
|
||||||
|
private Integer lineNo; // line_no
|
||||||
|
@TableField("depot_no")
|
||||||
|
private String depotNo; // depot_no
|
||||||
|
@TableField("depot_name")
|
||||||
|
private String depotName; // depot_name
|
||||||
|
@TableField("construction_object_type")
|
||||||
|
private Integer constructionObjectType; // construction_object_type
|
||||||
|
@TableField("construction_object_code")
|
||||||
|
private String constructionObjectCode; // construction_object_code
|
||||||
|
@TableField("create_user")
|
||||||
|
private String createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private String createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private String updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted; // is_deleted
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,135 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线路站点表
|
||||||
|
* apiName: erp_station
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_station")
|
||||||
|
public class ErpStation implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("station_name_cn")
|
||||||
|
private String stationNameCn; // station_name_cn
|
||||||
|
@TableField("station_name_en")
|
||||||
|
private String stationNameEn; // station_name_en
|
||||||
|
@TableField("station_no")
|
||||||
|
private Integer stationNo; // station_no
|
||||||
|
@TableField("line_no")
|
||||||
|
private Integer lineNo; // line_no
|
||||||
|
@TableField("line_name")
|
||||||
|
private String lineName; // line_name
|
||||||
|
@TableField("unit_no")
|
||||||
|
private String unitNo; // unit_no
|
||||||
|
@TableField("unit_name")
|
||||||
|
private String unitName; // unit_name
|
||||||
|
@TableField("sequence_no")
|
||||||
|
private Integer sequenceNo; // sequence_no
|
||||||
|
@TableField("station_type1")
|
||||||
|
private Integer stationType1; // station_type1
|
||||||
|
@TableField("station_type2")
|
||||||
|
private Integer stationType2; // station_type2
|
||||||
|
@TableField("branch_type")
|
||||||
|
private Integer branchType; // branch_type
|
||||||
|
@TableField("transfer_line_no")
|
||||||
|
private String transferLineNo; // transfer_line_no
|
||||||
|
@TableField("branch_no")
|
||||||
|
private String branchNo; // branch_no
|
||||||
|
@TableField("is_join_station")
|
||||||
|
private Integer isJoinStation; // is_join_station
|
||||||
|
@TableField("up_and_down")
|
||||||
|
private String upAndDown; // up_and_down
|
||||||
|
@TableField("up_insulation_point")
|
||||||
|
private Integer upInsulationPoint; // up_insulation_point
|
||||||
|
@TableField("down_insulation_point")
|
||||||
|
private Integer downInsulationPoint; // down_insulation_point
|
||||||
|
@TableField("is_up_down_affect")
|
||||||
|
private Integer isUpDownAffect; // is_up_down_affect
|
||||||
|
@TableField("up_knife_position")
|
||||||
|
private Integer upKnifePosition; // up_knife_position
|
||||||
|
@TableField("down_knife_position")
|
||||||
|
private Integer downKnifePosition; // down_knife_position
|
||||||
|
@TableField("turning_position")
|
||||||
|
private Integer turningPosition; // turning_position
|
||||||
|
@TableField("is_ups_station")
|
||||||
|
private String isUpsStation; // is_ups_station
|
||||||
|
@TableField("ups_station_no")
|
||||||
|
private String upsStationNo; // ups_station_no
|
||||||
|
@TableField("is_signal_station")
|
||||||
|
private Integer isSignalStation; // is_signal_station
|
||||||
|
@TableField("signal_station_no")
|
||||||
|
private Integer signalStationNo; // signal_station_no
|
||||||
|
@TableField("is_inter_station")
|
||||||
|
private Integer isInterStation; // is_inter_station
|
||||||
|
@TableField("depot_no")
|
||||||
|
private String depotNo; // depot_no
|
||||||
|
@TableField("depot_position")
|
||||||
|
private String depotPosition; // depot_position
|
||||||
|
@TableField("up_latest_clear_time")
|
||||||
|
private String upLatestClearTime; // up_latest_clear_time
|
||||||
|
@TableField("down_latest_clear_time")
|
||||||
|
private String downLatestClearTime; // down_latest_clear_time
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted; // is_deleted
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
@TableField("create_user")
|
||||||
|
private String createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private Integer updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("update_date")
|
||||||
|
private String updateDate; // update_date
|
||||||
|
@TableField("construction_start_time_up")
|
||||||
|
private Date constructionStartTimeUp; // construction_start_time_up
|
||||||
|
@TableField("construction_end_time_up")
|
||||||
|
private Date constructionEndTimeUp; // construction_end_time_up
|
||||||
|
@TableField("construction_power_start_time_up")
|
||||||
|
private Date constructionPowerStartTimeUp; // construction_power_start_time_up
|
||||||
|
@TableField("construction_power_end_time_up")
|
||||||
|
private Date constructionPowerEndTimeUp; // construction_power_end_time_up
|
||||||
|
@TableField("construction_lazy_start_time_up")
|
||||||
|
private Date constructionLazyStartTimeUp; // construction_lazy_start_time_up
|
||||||
|
@TableField("construction_lazy_end_time_up")
|
||||||
|
private Date constructionLazyEndTimeUp; // construction_lazy_end_time_up
|
||||||
|
@TableField("construction_lazy_power_start_time_up")
|
||||||
|
private Date constructionLazyPowerStartTimeUp; // construction_lazy_power_start_time_up
|
||||||
|
@TableField("construction_lazy_power_end_time_up")
|
||||||
|
private Date constructionLazyPowerEndTimeUp; // construction_lazy_power_end_time_up
|
||||||
|
@TableField("construction_start_time_down")
|
||||||
|
private Date constructionStartTimeDown; // construction_start_time_down
|
||||||
|
@TableField("construction_end_time_down")
|
||||||
|
private Date constructionEndTimeDown; // construction_end_time_down
|
||||||
|
@TableField("construction_power_start_time_down")
|
||||||
|
private Date constructionPowerStartTimeDown; // construction_power_start_time_down
|
||||||
|
@TableField("construction_power_end_time_down")
|
||||||
|
private Date constructionPowerEndTimeDown; // construction_power_end_time_down
|
||||||
|
@TableField("construction_lazy_start_time_down")
|
||||||
|
private Date constructionLazyStartTimeDown; // construction_lazy_start_time_down
|
||||||
|
@TableField("construction_lazy_end_time_down")
|
||||||
|
private Date constructionLazyEndTimeDown; // construction_lazy_end_time_down
|
||||||
|
@TableField("construction_lazy_power_start_time_down")
|
||||||
|
private Date constructionLazyPowerStartTimeDown; // construction_lazy_power_start_time_down
|
||||||
|
@TableField("construction_lazy_power_end_time_down")
|
||||||
|
private Date constructionLazyPowerEndTimeDown; // construction_lazy_power_end_time_down
|
||||||
|
@TableField("separate_power")
|
||||||
|
private Integer separatePower; // separate_power
|
||||||
|
@TableField("is_site_attendant")
|
||||||
|
private Integer isSiteAttendant; // is_site_attendant
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列车时刻表
|
||||||
|
* apiName: erp_trn_tm
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_trn_tm")
|
||||||
|
public class ErpTrnTm implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("sqn_nr")
|
||||||
|
private Long sqnNr; // 排序号
|
||||||
|
@TableField("trn_no")
|
||||||
|
private String trnNo; // 计划图里的车的顺序
|
||||||
|
@TableField("statn_nm_cn")
|
||||||
|
private String statnNmCn; // 车站名称
|
||||||
|
@TableField("arrl_tm_scnd")
|
||||||
|
private Long arrlTmScnd; // 到站时间(秒)
|
||||||
|
@TableField("depat_tm_scnd")
|
||||||
|
private Long depatTmScnd; // 发车时间(秒)
|
||||||
|
@TableField("stop_trk")
|
||||||
|
private String stopTrk; // 停站股道
|
||||||
|
@TableField("trn_dgrm_vrsn")
|
||||||
|
private String trnDgrmVrsn; // 运行图版本号
|
||||||
|
@TableField("nt_vrsn")
|
||||||
|
private String ntVrsn; // 网络版本号
|
||||||
|
@TableField("ln_id")
|
||||||
|
private String lnId; // 线路编码。03/04
|
||||||
|
@TableField("trn_id")
|
||||||
|
private String trnId; // 列车编码
|
||||||
|
@TableField("statn_id")
|
||||||
|
private String statnId; // 车站编码。与车站表无关系
|
||||||
|
@TableField("jb_id")
|
||||||
|
private Long jbId; // 作业编号
|
||||||
|
@TableField("ins_ts")
|
||||||
|
private Date insTs; // 插入时间
|
||||||
|
@TableField("upd_ts")
|
||||||
|
private Date updTs; // 更新时间
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天气预警信息
|
||||||
|
* apiName: erp_weather_warning
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_weather_warning")
|
||||||
|
public class ErpWeatherWarning implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private String sourceId; // source_id
|
||||||
|
@TableField("sender")
|
||||||
|
private String sender; // sender
|
||||||
|
@TableField("pub_time")
|
||||||
|
private String pubTime; // pub_time
|
||||||
|
@TableField("title")
|
||||||
|
private String title; // title
|
||||||
|
@TableField("start_time")
|
||||||
|
private String startTime; // start_time
|
||||||
|
@TableField("end_time")
|
||||||
|
private String endTime; // end_time
|
||||||
|
@TableField("status")
|
||||||
|
private String status; // status
|
||||||
|
@TableField("severity")
|
||||||
|
private String severity; // severity
|
||||||
|
@TableField("severity_color")
|
||||||
|
private String severityColor; // severity_color
|
||||||
|
@TableField("type")
|
||||||
|
private String type; // type
|
||||||
|
@TableField("type_name")
|
||||||
|
private String typeName; // type_name
|
||||||
|
@TableField("urgency")
|
||||||
|
private String urgency; // urgency
|
||||||
|
@TableField("certainty")
|
||||||
|
private String certainty; // certainty
|
||||||
|
@TableField("text")
|
||||||
|
private String text; // text
|
||||||
|
@TableField("related")
|
||||||
|
private String related; // related
|
||||||
|
@TableField("warning_updatetime")
|
||||||
|
private String warningUpdatetime; // warning_updatetime
|
||||||
|
@TableField("warning_fxlink")
|
||||||
|
private String warningFxlink; // warning_fxlink
|
||||||
|
@TableField("ins_ts")
|
||||||
|
private String insTs; // ins_ts
|
||||||
|
@TableField("upd_ts")
|
||||||
|
private String updTs; // upd_ts
|
||||||
|
@TableField("dta_tm")
|
||||||
|
private String dtaTm; // dta_tm
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,89 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划轨行区施工站点表
|
||||||
|
* apiName: erp_zone
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_zone")
|
||||||
|
public class ErpZone implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("plan_no")
|
||||||
|
private String planNo; // plan_no
|
||||||
|
@TableField("line_no")
|
||||||
|
private Integer lineNo; // line_no
|
||||||
|
@TableField("start_site_no")
|
||||||
|
private Integer startSiteNo; // start_site_no
|
||||||
|
@TableField("start_site_name")
|
||||||
|
private String startSiteName; // start_site_name
|
||||||
|
@TableField("start_site_sequence_no")
|
||||||
|
private Integer startSiteSequenceNo; // start_site_sequence_no
|
||||||
|
@TableField("end_site_no")
|
||||||
|
private Integer endSiteNo; // end_site_no
|
||||||
|
@TableField("end_site_name")
|
||||||
|
private String endSiteName; // end_site_name
|
||||||
|
@TableField("end_site_sequence_no")
|
||||||
|
private Integer endSiteSequenceNo; // end_site_sequence_no
|
||||||
|
@TableField("include_start_site_flag")
|
||||||
|
private String includeStartSiteFlag; // include_start_site_flag
|
||||||
|
@TableField("include_end_site_flag")
|
||||||
|
private String includeEndSiteFlag; // include_end_site_flag
|
||||||
|
@TableField("up_down_flag")
|
||||||
|
private String upDownFlag; // up_down_flag
|
||||||
|
@TableField("bifurcation_flag")
|
||||||
|
private Integer bifurcationFlag; // bifurcation_flag
|
||||||
|
@TableField("out_exit_flag")
|
||||||
|
private Integer outExitFlag; // out_exit_flag
|
||||||
|
@TableField("supplementary_explanation")
|
||||||
|
private String supplementaryExplanation; // supplementary_explanation
|
||||||
|
@TableField("site_type")
|
||||||
|
private Integer siteType; // site_type
|
||||||
|
@TableField("site_no")
|
||||||
|
private String siteNo; // site_no
|
||||||
|
@TableField("site_name")
|
||||||
|
private String siteName; // site_name
|
||||||
|
@TableField("site_position")
|
||||||
|
private String sitePosition; // site_position
|
||||||
|
@TableField("depot_no")
|
||||||
|
private String depotNo; // depot_no
|
||||||
|
@TableField("regional_category")
|
||||||
|
private String regionalCategory; // regional_category
|
||||||
|
@TableField("construction_site_type")
|
||||||
|
private Integer constructionSiteType; // construction_site_type
|
||||||
|
@TableField("ups_code")
|
||||||
|
private String upsCode; // ups_code
|
||||||
|
@TableField("create_user")
|
||||||
|
private Integer createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private Integer updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted; // is_deleted
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
@TableField("repair_type")
|
||||||
|
private String repairType; // repair_type
|
||||||
|
@TableField("train_number")
|
||||||
|
private String trainNumber; // train_number
|
||||||
|
@TableField("track_number")
|
||||||
|
private String trackNumber; // track_number
|
||||||
|
@TableField("station_type")
|
||||||
|
private String stationType; // station_type
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划车场施工区域表
|
||||||
|
* apiName: erp_zone_depot
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("erp_zone_depot")
|
||||||
|
public class ErpZoneDepot implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // id
|
||||||
|
@TableField("source_id")
|
||||||
|
private Integer sourceId; // source_id
|
||||||
|
@TableField("plan_no")
|
||||||
|
private String planNo; // plan_no
|
||||||
|
@TableField("line_no")
|
||||||
|
private Integer lineNo; // line_no
|
||||||
|
@TableField("depot_no")
|
||||||
|
private String depotNo; // depot_no
|
||||||
|
@TableField("depot_name")
|
||||||
|
private String depotName; // depot_name
|
||||||
|
@TableField("supplementary_explanation")
|
||||||
|
private String supplementaryExplanation; // supplementary_explanation
|
||||||
|
@TableField("construction_object_type")
|
||||||
|
private Integer constructionObjectType; // construction_object_type
|
||||||
|
@TableField("construction_type")
|
||||||
|
private String constructionType; // construction_type
|
||||||
|
@TableField("construction_object_code")
|
||||||
|
private String constructionObjectCode; // construction_object_code
|
||||||
|
@TableField("train_number")
|
||||||
|
private Integer trainNumber; // train_number
|
||||||
|
@TableField("construction_train_type")
|
||||||
|
private Integer constructionTrainType; // construction_train_type
|
||||||
|
@TableField("protection_code")
|
||||||
|
private String protectionCode; // protection_code
|
||||||
|
@TableField("create_user")
|
||||||
|
private String createUser; // create_user
|
||||||
|
@TableField("create_time")
|
||||||
|
private String createTime; // create_time
|
||||||
|
@TableField("update_user")
|
||||||
|
private String updateUser; // update_user
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime; // update_time
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted; // is_deleted
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark; // remark
|
||||||
|
@TableField("construction_object_name")
|
||||||
|
private String constructionObjectName; // construction_object_name
|
||||||
|
@TableField("protection_name")
|
||||||
|
private String protectionName; // protection_name
|
||||||
|
@TableField("line_name")
|
||||||
|
private String lineName; // line_name
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.Erp5minsDelay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运管5分钟晚点事件 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface Erp5minsDelayMapper extends BaseMapper<Erp5minsDelay> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.Erp5minsFlxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5分钟客流同比环比 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface Erp5minsFlxRateMapper extends BaseMapper<Erp5minsFlxRate> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.Erp5minsTrnKm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运管5分钟晚点车公里 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface Erp5minsTrnKmMapper extends BaseMapper<Erp5minsTrnKm> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpClerEvt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运管清客事件 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpClerEvtMapper extends BaseMapper<ErpClerEvt> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpCorequirements;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划轨行区配合要求表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpCorequirementsMapper extends BaseMapper<ErpCorequirements> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpExecPlan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工执行计划 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpExecPlanMapper extends BaseMapper<ErpExecPlan> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpLineInterval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列车间隔计划 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpLineIntervalMapper extends BaseMapper<ErpLineInterval> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpLnIndx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营线路指标(日) Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpLnIndxMapper extends BaseMapper<ErpLnIndx> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpLn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线路 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpLnMapper extends BaseMapper<ErpLn> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpMainHistory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划历史信息表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpMainHistoryMapper extends BaseMapper<ErpMainHistory> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpMain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划轨行区基本信息表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpMainMapper extends BaseMapper<ErpMain> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpMajorSchemeBasicinfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重大施工方案基本信息表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpMajorSchemeBasicinfoMapper extends BaseMapper<ErpMajorSchemeBasicinfo> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpMtrNtwk;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地铁路网信息表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpMtrNtwkMapper extends BaseMapper<ErpMtrNtwk> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpOperIndx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营指标 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpOperIndxMapper extends BaseMapper<ErpOperIndx> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpOutageDepot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车场施工计划停电范围 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpOutageDepotMapper extends BaseMapper<ErpOutageDepot> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpOutageRange;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划停电范围 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpOutageRangeMapper extends BaseMapper<ErpOutageRange> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpPlanRegisterCancel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工执行计划登记注销 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpPlanRegisterCancelMapper extends BaseMapper<ErpPlanRegisterCancel> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpPlnDtl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划明细表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpPlnDtlMapper extends BaseMapper<ErpPlnDtl> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpPlnMstr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划主表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpPlnMstrMapper extends BaseMapper<ErpPlnMstr> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpSafetyRegulation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划安全措施表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpSafetyRegulationMapper extends BaseMapper<ErpSafetyRegulation> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpSectionDepot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车场施工影响区段表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpSectionDepotMapper extends BaseMapper<ErpSectionDepot> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpSection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工影响区段表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpSectionMapper extends BaseMapper<ErpSection> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpStation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线路站点表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpStationMapper extends BaseMapper<ErpStation> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpTrnTm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列车时刻表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpTrnTmMapper extends BaseMapper<ErpTrnTm> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpWeatherWarning;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天气预警信息 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpWeatherWarningMapper extends BaseMapper<ErpWeatherWarning> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpZoneDepot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划车场施工区域表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpZoneDepotMapper extends BaseMapper<ErpZoneDepot> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpZone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划轨行区施工站点表 Mapper
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public interface ErpZoneMapper extends BaseMapper<ErpZone> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="net.juntech.modules.ysdp.sync.mapper.ErpOperIndxMapper">
|
||||||
|
|
||||||
|
<!-- 基础 ResultMap -->
|
||||||
|
<resultMap id="BaseResultMap" type="net.juntech.modules.ysdp.sync.domain.ErpOperIndx">
|
||||||
|
<id column="id" property="id"/>
|
||||||
|
<result column="dt_date" property="dtDate"/>
|
||||||
|
<result column="line_id" property="lineId"/>
|
||||||
|
|
||||||
|
<!-- 列车运行指标 -->
|
||||||
|
<result column="pro_metro_column_day" property="proMetroColumnDay"/>
|
||||||
|
<result column="pro_metro_column_month" property="proMetroColumnMonth"/>
|
||||||
|
<result column="pro_metro_column_year" property="proMetroColumnYear"/>
|
||||||
|
|
||||||
|
<!-- 列车运行距离 -->
|
||||||
|
<result column="pro_metro_distance_day" property="proMetroDistanceDay"/>
|
||||||
|
<result column="pro_metro_distance_month" property="proMetroDistanceMonth"/>
|
||||||
|
<result column="pro_metro_distance_year" property="proMetroDistanceYear"/>
|
||||||
|
|
||||||
|
<!-- 客运量指标 -->
|
||||||
|
<result column="pro_passenger_capacity_day" property="proPassengerCapacityDay"/>
|
||||||
|
<result column="pro_passenger_capacity_month" property="proPassengerCapacityMonth"/>
|
||||||
|
<result column="pro_passenger_capacity_year" property="proPassengerCapacityYear"/>
|
||||||
|
|
||||||
|
<!-- 换乘客流量 -->
|
||||||
|
<result column="pro_passenger_transfer_day" property="proPassengerTransferDay"/>
|
||||||
|
<result column="pro_passenger_transfer_month" property="proPassengerTransferMonth"/>
|
||||||
|
<result column="pro_passenger_transfer_year" property="proPassengerTransferYear"/>
|
||||||
|
|
||||||
|
<!-- 票款收入 -->
|
||||||
|
<result column="pro_ticket_income_day" property="proTicketIncomeDay"/>
|
||||||
|
<result column="pro_ticket_income_month" property="proTicketIncomeMonth"/>
|
||||||
|
<result column="pro_ticket_income_year" property="proTicketIncomeYear"/>
|
||||||
|
|
||||||
|
<!-- 车辆在线数 -->
|
||||||
|
<result column="pro_online_8_sect" property="proOnline8Sect"/>
|
||||||
|
<result column="pro_online_7_sect" property="proOnline7Sect"/>
|
||||||
|
<result column="pro_online_6_sect" property="proOnline6Sect"/>
|
||||||
|
<result column="pro_online_4_sect" property="proOnline4Sect"/>
|
||||||
|
<result column="pro_online_3_sect" property="proOnline3Sect"/>
|
||||||
|
|
||||||
|
<!-- 车辆备用数 -->
|
||||||
|
<result column="pro_backup_8_sect" property="proBackup8Sect"/>
|
||||||
|
<result column="pro_backup_7_sect" property="proBackup7Sect"/>
|
||||||
|
<result column="pro_backup_6_sect" property="proBackup6Sect"/>
|
||||||
|
<result column="pro_backup_4_sect" property="proBackup4Sect"/>
|
||||||
|
<result column="pro_backup_3_sect" property="proBackup3Sect"/>
|
||||||
|
|
||||||
|
<!-- 准点率 -->
|
||||||
|
<result column="qlt_ontime_day" property="qltOntimeDay"/>
|
||||||
|
<result column="qlt_ontime_month" property="qltOntimeMonth"/>
|
||||||
|
<result column="qlt_ontime_year" property="qltOntimeYear"/>
|
||||||
|
|
||||||
|
<!-- 正点率 -->
|
||||||
|
<result column="qlt_onwork_day" property="qltOnworkDay"/>
|
||||||
|
<result column="qlt_onwork_month" property="qltOnworkMonth"/>
|
||||||
|
<result column="qlt_onwork_year" property="qltOnworkYear"/>
|
||||||
|
|
||||||
|
<!-- 规模指标 -->
|
||||||
|
<result column="scl_line_lenth" property="sclLineLenth"/>
|
||||||
|
<result column="scl_station_count" property="sclStationCount"/>
|
||||||
|
<result column="scl_8_sect" property="scl8Sect"/>
|
||||||
|
<result column="scl_7_sect" property="scl7Sect"/>
|
||||||
|
<result column="scl_6_sect" property="scl6Sect"/>
|
||||||
|
<result column="scl_4_sect" property="scl4Sect"/>
|
||||||
|
<result column="scl_3_sect" property="scl3Sect"/>
|
||||||
|
|
||||||
|
<result column="create_time" property="createTime"/>
|
||||||
|
<result column="update_time" property="updateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,231 @@
|
||||||
|
/**
|
||||||
|
* Copyright © 2021-2025 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
|
||||||
|
*/
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.config.ApiAuthConfig;
|
||||||
|
import net.juntech.modules.ysdp.sync.config.DataCenterConfig;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.*;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据中心同步服务基类
|
||||||
|
* 提供通用的API调用和数据转换方法
|
||||||
|
*
|
||||||
|
* @author Claude
|
||||||
|
* @version 2026-08-28
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class DataCenterSyncBase {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected DataCenterConfig config;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected ApiAuthConfig apiAuthConfig;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected RestTemplate restTemplate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调用数据中心 API
|
||||||
|
*/
|
||||||
|
protected JSONObject callApi(String apiName, JSONObject apiParam, int currentPage, int pageSize) {
|
||||||
|
try {
|
||||||
|
JSONObject requestBody = new JSONObject();
|
||||||
|
requestBody.put("apiName", apiName);
|
||||||
|
requestBody.put("apiParam", apiParam == null ? new JSONObject() : apiParam);
|
||||||
|
requestBody.put("countNum", "0");
|
||||||
|
requestBody.put("currentPage", String.valueOf(currentPage));
|
||||||
|
requestBody.put("pageSize", String.valueOf(pageSize));
|
||||||
|
|
||||||
|
// 根据 API 名称获取对应的鉴权信息
|
||||||
|
ApiAuthConfig.AuthInfo authInfo = apiAuthConfig.getAuth(apiName);
|
||||||
|
if (authInfo == null) {
|
||||||
|
throw new RuntimeException("未找到接口 " + apiName + " 的鉴权配置");
|
||||||
|
}
|
||||||
|
|
||||||
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||||
|
headers.set("ApiKey", config.getApiKey());
|
||||||
|
headers.set("X-HW-ID", authInfo.getHwId());
|
||||||
|
headers.set("X-HW-AppKey", authInfo.getAppKey());
|
||||||
|
|
||||||
|
// INFO 级别打印鉴权信息,方便定位问题
|
||||||
|
String appKey = authInfo.getAppKey();
|
||||||
|
log.info("调用 API: {}, ApiKey长度={}, X-HW-ID: {}, X-HW-AppKey长度={}, AppKey前10位={}, AppKey后10位={}",
|
||||||
|
apiName,
|
||||||
|
config.getApiKey() == null ? 0 : config.getApiKey().length(),
|
||||||
|
authInfo.getHwId(),
|
||||||
|
appKey == null ? 0 : appKey.length(),
|
||||||
|
appKey == null ? "null" : appKey.substring(0, Math.min(10, appKey.length())),
|
||||||
|
appKey == null ? "null" : appKey.substring(Math.max(0, appKey.length() - 10)));
|
||||||
|
|
||||||
|
HttpEntity<String> entity = new HttpEntity<>(requestBody.toString(), headers);
|
||||||
|
|
||||||
|
ResponseEntity<String> response = restTemplate.postForEntity(config.getUrl(), entity, String.class);
|
||||||
|
|
||||||
|
if (response.getStatusCode() == HttpStatus.OK) {
|
||||||
|
JSONObject result = JSONObject.fromObject(response.getBody());
|
||||||
|
if (result.getInt("code") == 200) {
|
||||||
|
// 打印 API 响应概要(WARN 级别避免被过滤)
|
||||||
|
int totalSize = result.optInt("totalSize", 0);
|
||||||
|
JSONArray data = result.optJSONArray("data");
|
||||||
|
int dataLen = data == null ? 0 : data.size();
|
||||||
|
log.warn("API [{}] 响应成功:totalSize={}, 本页返回 {} 条", apiName, totalSize, dataLen);
|
||||||
|
return result;
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException("API 返回错误:" + result.getString("message"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException("HTTP 请求失败:" + response.getStatusCode());
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("调用数据中心 API 失败:{}", apiName, e);
|
||||||
|
throw new RuntimeException("调用数据中心 API 失败:" + e.getMessage(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页获取所有数据
|
||||||
|
*
|
||||||
|
* @param apiName 接口名
|
||||||
|
* @param dateField 用于过滤的日期字段(可为 null,为 null 时返回所有数据)
|
||||||
|
* @param dateValue 过滤的日期值 yyyy-MM-dd(可为 null,为 null 时不过滤)
|
||||||
|
* 使用前缀匹配:datetime 字段如 "2026-10-12 15:30:00" 也能匹配上 "2026-10-12"
|
||||||
|
*/
|
||||||
|
protected JSONArray fetchAllData(String apiName, String dateField, String dateValue) {
|
||||||
|
JSONArray resultArray = new JSONArray();
|
||||||
|
int currentPage = 1;
|
||||||
|
int totalPages = 1;
|
||||||
|
int totalFetched = 0; // API 返回的总数(未过滤前)
|
||||||
|
int totalFiltered = 0; // 过滤掉的数量
|
||||||
|
|
||||||
|
do {
|
||||||
|
JSONObject response = callApi(apiName, new JSONObject(), currentPage, config.getPageSize());
|
||||||
|
JSONArray dataArray = response.optJSONArray("data");
|
||||||
|
|
||||||
|
if (dataArray != null && !dataArray.isEmpty()) {
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
totalFetched++;
|
||||||
|
|
||||||
|
// 判断是否需要过滤:dateField 和 dateValue 都不为空且 API 数据里真的有该字段
|
||||||
|
boolean shouldFilter = dateField != null && !dateField.isEmpty()
|
||||||
|
&& dateValue != null && !dateValue.isEmpty()
|
||||||
|
&& json.has(dateField);
|
||||||
|
|
||||||
|
if (shouldFilter) {
|
||||||
|
String itemDate = json.optString(dateField);
|
||||||
|
// 前缀匹配:既支持 "2026-10-12" 也支持 "2026-10-12 15:30:00"
|
||||||
|
if (itemDate != null && itemDate.startsWith(dateValue)) {
|
||||||
|
resultArray.add(json);
|
||||||
|
} else {
|
||||||
|
totalFiltered++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 没有日期字段或不需要过滤:直接添加
|
||||||
|
resultArray.add(json);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int totalSize = response.optInt("totalSize");
|
||||||
|
if (totalSize > 0) {
|
||||||
|
totalPages = (int) Math.ceil((double) totalSize / config.getPageSize());
|
||||||
|
}
|
||||||
|
currentPage++;
|
||||||
|
|
||||||
|
} while (currentPage <= totalPages && resultArray.size() < 1000);
|
||||||
|
|
||||||
|
// 用 WARN 级别打印数据统计(避免被日志级别过滤)
|
||||||
|
log.warn("接口 {} 数据统计:API返回 {} 条,日期过滤器 [{}={}] 过滤掉 {} 条,最终保留 {} 条",
|
||||||
|
apiName, totalFetched, dateField, dateValue, totalFiltered, resultArray.size());
|
||||||
|
|
||||||
|
return resultArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 辅助方法
|
||||||
|
protected Integer parseInteger(Object value) {
|
||||||
|
if (value == null || "".equals(value)) return null;
|
||||||
|
if (value instanceof Integer) return (Integer) value;
|
||||||
|
try {
|
||||||
|
return Integer.parseInt(value.toString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Long parseLong(Object value) {
|
||||||
|
if (value == null || "".equals(value)) return null;
|
||||||
|
if (value instanceof Long) return (Long) value;
|
||||||
|
try {
|
||||||
|
return Long.parseLong(value.toString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected BigDecimal parseBigDecimal(Object value) {
|
||||||
|
if (value == null || "".equals(value)) return null;
|
||||||
|
if (value instanceof BigDecimal) return (BigDecimal) value;
|
||||||
|
try {
|
||||||
|
return new BigDecimal(value.toString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Date parseDate(String dateStr, String format) {
|
||||||
|
if (dateStr == null || dateStr.isEmpty()) return null;
|
||||||
|
try {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||||
|
return sdf.parse(dateStr);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断 JSON 是否为空数据
|
||||||
|
* - 如果传了 keyFields:只要有一个字段非空就返回 false(不为空)
|
||||||
|
* - 如果没传 keyFields:遍历 JSON 全部字段,只要有一个非空就返回 false(不为空)
|
||||||
|
*
|
||||||
|
* 修复:此前当 keyFields 为空时直接返回 true,导致所有数据被判定为空而跳过保存
|
||||||
|
*/
|
||||||
|
protected boolean isEmptyData(JSONObject json, String... keyFields) {
|
||||||
|
if (json == null || json.isEmpty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 若未指定关键字段,则遍历 JSON 所有字段
|
||||||
|
if (keyFields == null || keyFields.length == 0) {
|
||||||
|
for (Object key : json.keySet()) {
|
||||||
|
String value = json.optString((String) key);
|
||||||
|
if (value != null && !value.isEmpty() && !"null".equalsIgnoreCase(value)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 指定了关键字段:只要有一个关键字段非空就视为非空数据
|
||||||
|
for (String field : keyFields) {
|
||||||
|
String value = json.optString(field);
|
||||||
|
if (value != null && !value.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.Erp5minsDelay;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.Erp5minsDelayMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运管5分钟晚点事件数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class Erp5minsDelaySyncService extends ServiceImpl<Erp5minsDelayMapper, Erp5minsDelay> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_5mins_delay,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_5mins_delay", "dta_tm", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
Erp5minsDelay entity = new Erp5minsDelay();
|
||||||
|
entity.setLineName(json.optString("line_name"));
|
||||||
|
entity.setFiveDate(json.optString("five_date"));
|
||||||
|
entity.setFiveContent(json.optString("five_content"));
|
||||||
|
entity.setFiveContenta(json.optString("five_contenta"));
|
||||||
|
entity.setFiveContentb(json.optString("five_contentb"));
|
||||||
|
entity.setFiveContentc(json.optString("five_contentc"));
|
||||||
|
entity.setFiveContentd(json.optString("five_contentd"));
|
||||||
|
entity.setFiveOriginating(json.optString("five_originating"));
|
||||||
|
entity.setFiveInto(json.optString("five_into"));
|
||||||
|
entity.setFiveRescue(json.optString("five_rescue"));
|
||||||
|
entity.setFiveTime(json.optString("five_time"));
|
||||||
|
entity.setYyglid(json.optString("yyglid"));
|
||||||
|
entity.setLineId(json.optString("line_id"));
|
||||||
|
entity.setInsTs(json.optString("ins_ts"));
|
||||||
|
entity.setUpdTs(json.optString("upd_ts"));
|
||||||
|
entity.setDtaTm(json.optString("dta_tm"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.Erp5minsFlxRate;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.Erp5minsFlxRateMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5分钟客流同比环比数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class Erp5minsFlxRateSyncService extends ServiceImpl<Erp5minsFlxRateMapper, Erp5minsFlxRate> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_5mins_flx_rate,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_5mins_flx_rate", "dta_tm", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
Erp5minsFlxRate entity = new Erp5minsFlxRate();
|
||||||
|
entity.setLnId(json.optString("ln_id"));
|
||||||
|
entity.setStatnId(json.optString("statn_id"));
|
||||||
|
entity.setDtaStrtTm(json.optString("dta_strt_tm"));
|
||||||
|
entity.setDtaEndTm(json.optString("dta_end_tm"));
|
||||||
|
entity.setCtTrmInFlxNr(syncBase.parseInteger(json.opt("ct_trm_in_flx_nr")));
|
||||||
|
entity.setCtTrmOutFlxNr(syncBase.parseInteger(json.opt("ct_trm_out_flx_nr")));
|
||||||
|
entity.setSamTrmInFlxNr(syncBase.parseInteger(json.opt("sam_trm_in_flx_nr")));
|
||||||
|
entity.setSamTrmOutFlxNr(syncBase.parseInteger(json.opt("sam_trm_out_flx_nr")));
|
||||||
|
entity.setChnTrmInFlxNr(syncBase.parseInteger(json.opt("chn_trm_in_flx_nr")));
|
||||||
|
entity.setChnTrmOutFlxNr(syncBase.parseInteger(json.opt("chn_trm_out_flx_nr")));
|
||||||
|
entity.setSamTrmInFlxRate(syncBase.parseBigDecimal(json.opt("sam_trm_in_flx_rate")));
|
||||||
|
entity.setSamTrmOutFlxRate(syncBase.parseBigDecimal(json.opt("sam_trm_out_flx_rate")));
|
||||||
|
entity.setChnTrmInFlxRate(syncBase.parseBigDecimal(json.opt("chn_trm_in_flx_rate")));
|
||||||
|
entity.setChnTrmOutFlxRate(syncBase.parseBigDecimal(json.opt("chn_trm_out_flx_rate")));
|
||||||
|
entity.setInsTs(syncBase.parseDate(json.optString("ins_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdTs(syncBase.parseDate(json.optString("upd_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setDtaTm(json.optString("dta_tm"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.Erp5minsTrnKm;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.Erp5minsTrnKmMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运管5分钟晚点车公里数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class Erp5minsTrnKmSyncService extends ServiceImpl<Erp5minsTrnKmMapper, Erp5minsTrnKm> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_5mins_trn_km,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_5mins_trn_km", "date", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
Erp5minsTrnKm entity = new Erp5minsTrnKm();
|
||||||
|
entity.setSourceId(json.optString("id"));
|
||||||
|
entity.setLineName(json.optString("line_name"));
|
||||||
|
entity.setDate(json.optString("date"));
|
||||||
|
entity.setKm(syncBase.parseBigDecimal(json.opt("km")));
|
||||||
|
entity.setLine(syncBase.parseInteger(json.opt("line")));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpClerEvt;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpClerEvtMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运管清客事件数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpClerEvtSyncService extends ServiceImpl<ErpClerEvtMapper, ErpClerEvt> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_cler_evt,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_cler_evt", "date", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpClerEvt entity = new ErpClerEvt();
|
||||||
|
entity.setSourceId(json.optString("id"));
|
||||||
|
entity.setEventEffect(json.optString("event_effect"));
|
||||||
|
entity.setEventSurvey(json.optString("event_survey"));
|
||||||
|
entity.setFifteenLocation(json.optString("fifteen_location"));
|
||||||
|
entity.setFifteenRescue(json.optString("fifteen_rescue"));
|
||||||
|
entity.setLineName(json.optString("line_name"));
|
||||||
|
entity.setDutyCompany(json.optString("duty_company"));
|
||||||
|
entity.setDuty(json.optString("duty"));
|
||||||
|
entity.setFifteenContent(json.optString("fifteen_content"));
|
||||||
|
entity.setRectifySuggest(json.optString("rectify_suggest"));
|
||||||
|
entity.setEventCause(json.optString("event_cause"));
|
||||||
|
entity.setDate(json.optString("date"));
|
||||||
|
entity.setHandleSuggest(json.optString("handle_suggest"));
|
||||||
|
entity.setFifteenTime(json.optString("fifteen_time"));
|
||||||
|
entity.setFifteenCompany(json.optString("fifteen_company"));
|
||||||
|
entity.setLine(json.optString("line"));
|
||||||
|
entity.setYyglId(json.optString("yygl_id"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpCorequirements;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpCorequirementsMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划轨行区配合要求表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpCorequirementsSyncService extends ServiceImpl<ErpCorequirementsMapper, ErpCorequirements> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_corequirements,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_corequirements", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpCorequirements entity = new ErpCorequirements();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setPlanNo(json.optString("plan_no"));
|
||||||
|
entity.setCompanyCode(json.optString("company_code"));
|
||||||
|
entity.setCompanyName(json.optString("company_name"));
|
||||||
|
entity.setCorperationRequirement(json.optString("corperation_requirement"));
|
||||||
|
entity.setCreateUser(syncBase.parseInteger(json.opt("create_user")));
|
||||||
|
entity.setCreateTime(syncBase.parseDate(json.optString("create_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdateUser(syncBase.parseInteger(json.opt("update_user")));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setIsDeleted(syncBase.parseInteger(json.opt("is_deleted")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,121 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpExecPlan;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpExecPlanMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工执行计划数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpExecPlanSyncService extends ServiceImpl<ErpExecPlanMapper, ErpExecPlan> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_exec_plan,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_exec_plan", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpExecPlan entity = new ErpExecPlan();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setPlanNo(json.optString("plan_no"));
|
||||||
|
entity.setPlanType(syncBase.parseInteger(json.opt("plan_type")));
|
||||||
|
entity.setConstructionCategory(syncBase.parseInteger(json.opt("construction_category")));
|
||||||
|
entity.setMultijob(syncBase.parseInteger(json.opt("multijob")));
|
||||||
|
entity.setWorkPosition(syncBase.parseInteger(json.opt("work_position")));
|
||||||
|
entity.setPinpointType(json.optString("pinpoint_type"));
|
||||||
|
entity.setDispatchType(json.optString("dispatch_type"));
|
||||||
|
entity.setLineNo(syncBase.parseInteger(json.opt("line_no")));
|
||||||
|
entity.setLogoutStation(json.optString("logout_station"));
|
||||||
|
entity.setLogoutSequence(json.optString("logout_sequence"));
|
||||||
|
entity.setRegisterSequence(syncBase.parseInteger(json.opt("register_sequence")));
|
||||||
|
entity.setRegisterStation(json.optString("register_station"));
|
||||||
|
entity.setAssistRegisterStation(json.optString("assist_register_station"));
|
||||||
|
entity.setConstructionSection(json.optString("construction_section"));
|
||||||
|
entity.setImpactSection(json.optString("impact_section"));
|
||||||
|
entity.setPowerSection(json.optString("power_section"));
|
||||||
|
entity.setPowerSectionJson(json.optString("power_section_json"));
|
||||||
|
entity.setConstructionSectionJson(json.optString("construction_section_json"));
|
||||||
|
entity.setConstructionUnitCode(json.optString("construction_unit_code"));
|
||||||
|
entity.setConstructionPrincipalCode(json.optString("construction_principal_code"));
|
||||||
|
entity.setConstructionName(json.optString("construction_name"));
|
||||||
|
entity.setActualStartTime(syncBase.parseDate(json.optString("actual_start_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setActualEndTime(syncBase.parseDate(json.optString("actual_end_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setPlanStartTime(syncBase.parseDate(json.optString("plan_start_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setPlanEndTime(syncBase.parseDate(json.optString("plan_end_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setTractionPower(syncBase.parseInteger(json.opt("traction_power")));
|
||||||
|
entity.setStatus(syncBase.parseInteger(json.opt("status")));
|
||||||
|
entity.setAssistFlag(syncBase.parseInteger(json.opt("assist_flag")));
|
||||||
|
entity.setSublineFlag(syncBase.parseInteger(json.opt("subline_flag")));
|
||||||
|
entity.setReason(json.optString("reason"));
|
||||||
|
entity.setAbnormalReason(json.optString("abnormal_reason"));
|
||||||
|
entity.setDelayStatus(syncBase.parseInteger(json.opt("delay_status")));
|
||||||
|
entity.setDelayEndTime(json.optString("delay_end_time"));
|
||||||
|
entity.setDelayTime(json.optString("delay_time"));
|
||||||
|
entity.setDelayDuration(json.optString("delay_duration"));
|
||||||
|
entity.setSendDownStatus(syncBase.parseInteger(json.opt("send_down_status")));
|
||||||
|
entity.setPlanZoneType(syncBase.parseInteger(json.opt("plan_zone_type")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
entity.setOrderNo(json.optString("order_no"));
|
||||||
|
entity.setDelayOrderNo(json.optString("delay_order_no"));
|
||||||
|
entity.setConstructionDescriptionDetail(json.optString("construction_description_detail"));
|
||||||
|
entity.setQuotationUnit(json.optString("quotation_unit"));
|
||||||
|
entity.setDeclarer(json.optString("declarer"));
|
||||||
|
entity.setCreateUser(json.optString("create_user"));
|
||||||
|
entity.setCreateTime(syncBase.parseDate(json.optString("create_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdateUser(json.optString("update_user"));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setDeleted(syncBase.parseInteger(json.opt("deleted")));
|
||||||
|
entity.setLogoutOrderNo(json.optString("logout_order_no"));
|
||||||
|
entity.setWanderStatus(json.optString("wander_status"));
|
||||||
|
entity.setPowerStatus(json.optString("power_status"));
|
||||||
|
entity.setCancleType(json.optString("cancle_type"));
|
||||||
|
entity.setCancleReason(json.optString("cancle_reason"));
|
||||||
|
entity.setCancleOrderNo(json.optString("cancle_order_no"));
|
||||||
|
entity.setCancleStatus(json.optString("cancle_status"));
|
||||||
|
entity.setSendDownTime(json.optString("send_down_time"));
|
||||||
|
entity.setRegisterTime(json.optString("register_time"));
|
||||||
|
entity.setIsDelay(syncBase.parseInteger(json.opt("is_delay")));
|
||||||
|
entity.setIsConflict(syncBase.parseInteger(json.opt("is_conflict")));
|
||||||
|
entity.setSpecialWorkType(json.optString("special_work_type"));
|
||||||
|
entity.setTouchRailImpact(json.optString("touch_rail_impact"));
|
||||||
|
entity.setAffectedSectionJson(json.optString("affected_section_json"));
|
||||||
|
entity.setConstructionManagerInfo(json.optString("construction_manager_info"));
|
||||||
|
entity.setMainRegistrationStationName(json.optString("main_registration_station_name"));
|
||||||
|
entity.setSpecialWorkTypeName(json.optString("special_work_type_name"));
|
||||||
|
entity.setConstructionImpactName(json.optString("construction_impact_name"));
|
||||||
|
entity.setPlanType2(syncBase.parseInteger(json.opt("plan_type2")));
|
||||||
|
entity.setEmptyTime(json.optString("empty_time"));
|
||||||
|
entity.setEmptyUser(json.optString("empty_user"));
|
||||||
|
entity.setBeforeCancelStatus(json.optString("before_cancel_status"));
|
||||||
|
entity.setAbnormalCancelTime(json.optString("abnormal_cancel_time"));
|
||||||
|
entity.setMainLineNo(json.optString("main_line_no"));
|
||||||
|
entity.setNeedOutScheme(syncBase.parseInteger(json.opt("need_out_scheme")));
|
||||||
|
entity.setOutShcemeLine(json.optString("out_shceme_line"));
|
||||||
|
entity.setOutSchemeTrain(json.optString("out_scheme_train"));
|
||||||
|
entity.setAbnormalType(json.optString("abnormal_type"));
|
||||||
|
entity.setStopConfirmTime(json.optString("stop_confirm_time"));
|
||||||
|
entity.setReasonType(json.optString("reason_type"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpLineInterval;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpLineIntervalMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列车间隔计划数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpLineIntervalSyncService extends ServiceImpl<ErpLineIntervalMapper, ErpLineInterval> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_line_interval,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_line_interval", "dta_tm", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpLineInterval entity = new ErpLineInterval();
|
||||||
|
entity.setLineNo(syncBase.parseInteger(json.opt("line_no")));
|
||||||
|
entity.setStartStation(syncBase.parseInteger(json.opt("start_station")));
|
||||||
|
entity.setEndStation(syncBase.parseInteger(json.opt("end_station")));
|
||||||
|
entity.setStartStationName(json.optString("start_station_name"));
|
||||||
|
entity.setEndStationName(json.optString("end_station_name"));
|
||||||
|
entity.setMaxInterval(syncBase.parseDate(json.optString("max_interval"), "yyyy-MM-dd"));
|
||||||
|
entity.setMinInterval(syncBase.parseDate(json.optString("min_interval"), "yyyy-MM-dd"));
|
||||||
|
entity.setTimeDescription(json.optString("time_description"));
|
||||||
|
entity.setTimePeriod(json.optString("time_period"));
|
||||||
|
entity.setEventType(json.optString("event_type"));
|
||||||
|
entity.setCycleType(json.optString("cycle_type"));
|
||||||
|
entity.setStationDetails(json.optString("station_details"));
|
||||||
|
entity.setDirection(syncBase.parseInteger(json.opt("direction")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpLnIndx;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpLnIndxMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营线路指标(日)数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpLnIndxSyncService extends ServiceImpl<ErpLnIndxMapper, ErpLnIndx> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_ln_indx,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_ln_indx", "stmt_dy", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpLnIndx entity = new ErpLnIndx();
|
||||||
|
entity.setLnId(syncBase.parseInteger(json.opt("ln_id")));
|
||||||
|
entity.setOperTrnNrDlyAcmlt(json.optString("oper_trn_nr_dly_acmlt"));
|
||||||
|
entity.setOperTrnNrMthlyAcmlt(json.optString("oper_trn_nr_mthly_acmlt"));
|
||||||
|
entity.setOperTrnNrYrlyAcmlt(json.optString("oper_trn_nr_yrly_acmlt"));
|
||||||
|
entity.setOperKmagDlyAcmlt(json.optString("oper_kmag_dly_acmlt"));
|
||||||
|
entity.setOperKmagMthlyAcmlt(json.optString("oper_kmag_mthly_acmlt"));
|
||||||
|
entity.setOperKmagYrlyAcmlt(json.optString("oper_kmag_yrly_acmlt"));
|
||||||
|
entity.setPasgrVolDlyAcmlt(json.optString("pasgr_vol_dly_acmlt"));
|
||||||
|
entity.setPasgrVolMthlyAcmlt(json.optString("pasgr_vol_mthly_acmlt"));
|
||||||
|
entity.setPasgrVolYrlyAcmlt(json.optString("pasgr_vol_yrly_acmlt"));
|
||||||
|
entity.setTrnsfrNrDlyAcmlt(json.optString("trnsfr_nr_dly_acmlt"));
|
||||||
|
entity.setTrnsfrNrMthlyAcmlt(json.optString("trnsfr_nr_mthly_acmlt"));
|
||||||
|
entity.setTrnsfrNrYrlyAcmlt(json.optString("trnsfr_nr_yrly_acmlt"));
|
||||||
|
entity.setOperRvnDlyAcmlt(json.optString("oper_rvn_dly_acmlt"));
|
||||||
|
entity.setOperRvnMthlyAcmlt(json.optString("oper_rvn_mthly_acmlt"));
|
||||||
|
entity.setOperRvnYrlyAcmlt(json.optString("oper_rvn_yrly_acmlt"));
|
||||||
|
entity.setOnlnTrn8Nr(json.optString("onln_trn_8_nr"));
|
||||||
|
entity.setOnlnTrn7Nr(json.optString("onln_trn_7_nr"));
|
||||||
|
entity.setOnlnTrn6Nr(json.optString("onln_trn_6_nr"));
|
||||||
|
entity.setOnlnTrn4Nr(json.optString("onln_trn_4_nr"));
|
||||||
|
entity.setOnlnTrn3Nr(json.optString("onln_trn_3_nr"));
|
||||||
|
entity.setSparTrn8Nr(json.optString("spar_trn_8_nr"));
|
||||||
|
entity.setSparTrn7Nr(json.optString("spar_trn_7_nr"));
|
||||||
|
entity.setSparTrn6Nr(json.optString("spar_trn_6_nr"));
|
||||||
|
entity.setSparTrn4Nr(json.optString("spar_trn_4_nr"));
|
||||||
|
entity.setSparTrn3Nr(json.optString("spar_trn_3_nr"));
|
||||||
|
entity.setOnTmRateDlyAcmlt(json.optString("on_tm_rate_dly_acmlt"));
|
||||||
|
entity.setOnTmRateMthlyAcmlt(json.optString("on_tm_rate_mthly_acmlt"));
|
||||||
|
entity.setOnTmRateYrlyAcmlt(json.optString("on_tm_rate_yrly_acmlt"));
|
||||||
|
entity.setFlflmRateDlyAcmlt(json.optString("flflm_rate_dly_acmlt"));
|
||||||
|
entity.setFlflmRateMthlyAcmlt(json.optString("flflm_rate_mthly_acmlt"));
|
||||||
|
entity.setFlflmRateYrlyAcmlt(json.optString("flflm_rate_yrly_acmlt"));
|
||||||
|
entity.setLgt(json.optString("lgt"));
|
||||||
|
entity.setStatnCnt(json.optString("statn_cnt"));
|
||||||
|
entity.setAlctTrnNr8(json.optString("alct_trn_nr_8"));
|
||||||
|
entity.setAlctTrnNr7(json.optString("alct_trn_nr_7"));
|
||||||
|
entity.setAlctTrnNr6(json.optString("alct_trn_nr_6"));
|
||||||
|
entity.setAlctTrnNr4(json.optString("alct_trn_nr_4"));
|
||||||
|
entity.setAlctTrnNr3(json.optString("alct_trn_nr_3"));
|
||||||
|
entity.setKm5minsDly(syncBase.parseBigDecimal(json.opt("km_5mins_dly")));
|
||||||
|
entity.setOnlnTrnNr(syncBase.parseBigDecimal(json.opt("onln_trn_nr")));
|
||||||
|
entity.setSparTrnNr(syncBase.parseBigDecimal(json.opt("spar_trn_nr")));
|
||||||
|
entity.setActlOperNr(syncBase.parseBigDecimal(json.opt("actl_oper_nr")));
|
||||||
|
entity.setAddnOperNr(syncBase.parseBigDecimal(json.opt("addn_oper_nr")));
|
||||||
|
entity.setPlnEmptyNr(syncBase.parseBigDecimal(json.opt("pln_empty_nr")));
|
||||||
|
entity.setActlEmptyNr(syncBase.parseBigDecimal(json.opt("actl_empty_nr")));
|
||||||
|
entity.setAddnEmptyNr(syncBase.parseBigDecimal(json.opt("addn_empty_nr")));
|
||||||
|
entity.setCnlOperNr(syncBase.parseBigDecimal(json.opt("cnl_oper_nr")));
|
||||||
|
entity.setCnlEmptyNr(syncBase.parseBigDecimal(json.opt("cnl_empty_nr")));
|
||||||
|
entity.setPlnOperNr(syncBase.parseBigDecimal(json.opt("pln_oper_nr")));
|
||||||
|
entity.setInsTs(syncBase.parseDate(json.optString("ins_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdTs(syncBase.parseDate(json.optString("upd_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setStmtDy(json.optString("stmt_dy"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpLn;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpLnMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线路数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpLnSyncService extends ServiceImpl<ErpLnMapper, ErpLn> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_ln,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_ln", "dta_tm", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpLn entity = new ErpLn();
|
||||||
|
entity.setLnId(json.optString("ln_id"));
|
||||||
|
entity.setLnNmCn(json.optString("ln_nm_cn"));
|
||||||
|
entity.setLnNmEn(json.optString("ln_nm_en"));
|
||||||
|
entity.setOpnDt(syncBase.parseDate(json.optString("opn_dt"), "yyyy-MM-dd"));
|
||||||
|
entity.setOprnTotlLgt(syncBase.parseBigDecimal(json.opt("oprn_totl_lgt")));
|
||||||
|
entity.setOprnStatnNr(syncBase.parseBigDecimal(json.opt("oprn_statn_nr")));
|
||||||
|
entity.setTrnsfrStatnNr(syncBase.parseBigDecimal(json.opt("trnsfr_statn_nr")));
|
||||||
|
entity.setGrndLgt(syncBase.parseBigDecimal(json.opt("grnd_lgt")));
|
||||||
|
entity.setTnelLgt(syncBase.parseBigDecimal(json.opt("tnel_lgt")));
|
||||||
|
entity.setVdctLgt(syncBase.parseBigDecimal(json.opt("vdct_lgt")));
|
||||||
|
entity.setAsngVehNr(syncBase.parseBigDecimal(json.opt("asng_veh_nr")));
|
||||||
|
entity.setUntId(json.optString("unt_id"));
|
||||||
|
entity.setLnClr(json.optString("ln_clr"));
|
||||||
|
entity.setVehTp(json.optString("veh_tp"));
|
||||||
|
entity.setVehGrp(json.optString("veh_grp"));
|
||||||
|
entity.setCrgLd(json.optString("crg_ld"));
|
||||||
|
entity.setJbId(syncBase.parseLong(json.opt("jb_id")));
|
||||||
|
entity.setInsTs(syncBase.parseDate(json.optString("ins_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdTs(syncBase.parseDate(json.optString("upd_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUntNm(json.optString("unt_nm"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpMainHistory;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpMainHistoryMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划历史信息表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpMainHistorySyncService extends ServiceImpl<ErpMainHistoryMapper, ErpMainHistory> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_main_history,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_main_history", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpMainHistory entity = new ErpMainHistory();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setPlanNo(json.optString("plan_no"));
|
||||||
|
entity.setVersion(syncBase.parseInteger(json.opt("version")));
|
||||||
|
entity.setApplyType(syncBase.parseInteger(json.opt("apply_type")));
|
||||||
|
entity.setApplyReason(json.optString("apply_reason"));
|
||||||
|
entity.setOrderNo(syncBase.parseInteger(json.opt("order_no")));
|
||||||
|
entity.setHistoryData(json.optString("history_data"));
|
||||||
|
entity.setOrderOpinion(json.optString("order_opinion"));
|
||||||
|
entity.setCreateUser(syncBase.parseInteger(json.opt("create_user")));
|
||||||
|
entity.setCreateTime(syncBase.parseDate(json.optString("create_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdateUser(json.optString("update_user"));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setIsDeleted(syncBase.parseInteger(json.opt("is_deleted")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
entity.setReasonType(json.optString("reason_type"));
|
||||||
|
entity.setReasonContent(json.optString("reason_content"));
|
||||||
|
entity.setAdvance(syncBase.parseInteger(json.opt("advance")));
|
||||||
|
entity.setTrainJson(json.optString("train_json"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,150 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpMain;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpMainMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划轨行区基本信息表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpMainSyncService extends ServiceImpl<ErpMainMapper, ErpMain> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_main,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_main", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpMain entity = new ErpMain();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setPlanNo(json.optString("plan_no"));
|
||||||
|
entity.setLineNo(syncBase.parseInteger(json.opt("line_no")));
|
||||||
|
entity.setConstructionCategory(syncBase.parseInteger(json.opt("construction_category")));
|
||||||
|
entity.setWorkPosition(syncBase.parseInteger(json.opt("work_position")));
|
||||||
|
entity.setActionType(syncBase.parseInteger(json.opt("action_type")));
|
||||||
|
entity.setIsMultipointWork(syncBase.parseInteger(json.opt("is_multipoint_work")));
|
||||||
|
entity.setTractionPower(syncBase.parseInteger(json.opt("traction_power")));
|
||||||
|
entity.setVehicleRouteDesc(json.optString("vehicle_route_desc"));
|
||||||
|
entity.setTrainsNum(json.optString("trains_num"));
|
||||||
|
entity.setStartDate(syncBase.parseDate(json.optString("start_date"), "yyyy-MM-dd"));
|
||||||
|
entity.setEndDate(syncBase.parseDate(json.optString("end_date"), "yyyy-MM-dd"));
|
||||||
|
entity.setMainRegistrationStation(json.optString("main_registration_station"));
|
||||||
|
entity.setAssistRegistrationStation(syncBase.parseInteger(json.opt("assist_registration_station")));
|
||||||
|
entity.setConstructionName(json.optString("construction_name"));
|
||||||
|
entity.setConstructionManager(json.optString("construction_manager"));
|
||||||
|
entity.setConstructionUnit(json.optString("construction_unit"));
|
||||||
|
entity.setMaintenanceDepartment(json.optString("maintenance_department"));
|
||||||
|
entity.setMaintenanceDepartmentName(json.optString("maintenance_department_name"));
|
||||||
|
entity.setTeamDepartment(json.optString("team_department"));
|
||||||
|
entity.setQuotationUnit(json.optString("quotation_unit"));
|
||||||
|
entity.setConstructionDescriptionDetail(json.optString("construction_description_detail"));
|
||||||
|
entity.setDeclarer(json.optString("declarer"));
|
||||||
|
entity.setSpecialityOptionOne(json.optString("speciality_option_one"));
|
||||||
|
entity.setSpecialityOptionTwo(json.optString("speciality_option_two"));
|
||||||
|
entity.setMajorScheme(json.optString("major_scheme"));
|
||||||
|
entity.setSupplementationReason(json.optString("supplementation_reason"));
|
||||||
|
entity.setChangeReason(json.optString("change_reason"));
|
||||||
|
entity.setPlanType(syncBase.parseInteger(json.opt("plan_type")));
|
||||||
|
entity.setIsCyclePlan(syncBase.parseInteger(json.opt("is_cycle_plan")));
|
||||||
|
entity.setPinpointType(json.optString("pinpoint_type"));
|
||||||
|
entity.setPlanZoneType(syncBase.parseInteger(json.opt("plan_zone_type")));
|
||||||
|
entity.setTouchRailStatus(syncBase.parseInteger(json.opt("touch_rail_status")));
|
||||||
|
entity.setTouchRailImpact(syncBase.parseInteger(json.opt("touch_rail_impact")));
|
||||||
|
entity.setDepotStopPowerType(syncBase.parseInteger(json.opt("depot_stop_power_type")));
|
||||||
|
entity.setPowerOutageMode(json.optString("power_outage_mode"));
|
||||||
|
entity.setConstructionImpact(json.optString("construction_impact"));
|
||||||
|
entity.setSignalConcentrationStation(json.optString("signal_concentration_station"));
|
||||||
|
entity.setTransformer(json.optString("transformer"));
|
||||||
|
entity.setOtherImpact(json.optString("other_impact"));
|
||||||
|
entity.setPowerOutageRange(json.optString("power_outage_range"));
|
||||||
|
entity.setOrderNo(syncBase.parseInteger(json.opt("order_no")));
|
||||||
|
entity.setStatus(syncBase.parseInteger(json.opt("status")));
|
||||||
|
entity.setApplyPublishStatus(syncBase.parseInteger(json.opt("apply_publish_status")));
|
||||||
|
entity.setConstructionImpactZone(json.optString("construction_impact_zone"));
|
||||||
|
entity.setPatrolVehicleAdvanceFlag(syncBase.parseInteger(json.opt("patrol_vehicle_advance_flag")));
|
||||||
|
entity.setSpecialWorkType(json.optString("special_work_type"));
|
||||||
|
entity.setSafetyMeasures(json.optString("safety_measures"));
|
||||||
|
entity.setCentralizedUpsConstruction(syncBase.parseInteger(json.opt("centralized_ups_construction")));
|
||||||
|
entity.setInitialPrepareRequirement(json.optString("initial_prepare_requirement"));
|
||||||
|
entity.setAtsFlag(syncBase.parseInteger(json.opt("ats_flag")));
|
||||||
|
entity.setAtsDetail(json.optString("ats_detail"));
|
||||||
|
entity.setConstructionOrganizationCommandSystem(json.optString("construction_organization_command_system"));
|
||||||
|
entity.setOperationProgress(syncBase.parseInteger(json.opt("operation_progress")));
|
||||||
|
entity.setOtherRequirementsDesc(json.optString("other_requirements_desc"));
|
||||||
|
entity.setOtherOperationProgress(json.optString("other_operation_progress"));
|
||||||
|
entity.setOtherRequirements(json.optString("other_requirements"));
|
||||||
|
entity.setApprovalUnit(json.optString("approval_unit"));
|
||||||
|
entity.setRelatedItem(json.optString("related_item"));
|
||||||
|
entity.setIsTemplate(syncBase.parseInteger(json.opt("is_template")));
|
||||||
|
entity.setIsTrainTacksPoweroff(json.optString("is_train_tacks_poweroff"));
|
||||||
|
entity.setTrainTracksProweroffZone(json.optString("train_tracks_proweroff_zone"));
|
||||||
|
entity.setCreateUser(syncBase.parseInteger(json.opt("create_user")));
|
||||||
|
entity.setCreateTime(syncBase.parseDate(json.optString("create_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdateUser(json.optString("update_user"));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setApplicantAffiliation(json.optString("applicant_affiliation"));
|
||||||
|
entity.setGraphId(json.optString("graph_id"));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
entity.setTemplateType(json.optString("template_type"));
|
||||||
|
entity.setIsDeleted(syncBase.parseInteger(json.opt("is_deleted")));
|
||||||
|
entity.setConstructionZoneString(json.optString("construction_zone_string"));
|
||||||
|
entity.setFasBusFirepumpWorktype(syncBase.parseInteger(json.opt("fas_bus_firepump_worktype")));
|
||||||
|
entity.setIsSelfReportApprove(syncBase.parseInteger(json.opt("is_self_report_approve")));
|
||||||
|
entity.setBidirectionalFlag(syncBase.parseInteger(json.opt("bidirectional_flag")));
|
||||||
|
entity.setRepairType(syncBase.parseInteger(json.opt("repair_type")));
|
||||||
|
entity.setAffectSectionUpDown(syncBase.parseInteger(json.opt("affect_section_up_down")));
|
||||||
|
entity.setPowerOutageStatus(json.optString("power_outage_status"));
|
||||||
|
entity.setCooperationRequirement(json.optString("cooperation_requirement"));
|
||||||
|
entity.setBlockadeFlag(syncBase.parseInteger(json.opt("blockade_flag")));
|
||||||
|
entity.setAllBlockadeFlag(syncBase.parseInteger(json.opt("all_blockade_flag")));
|
||||||
|
entity.setConstructionManagerText(json.optString("construction_manager_text"));
|
||||||
|
entity.setPlanSourceCode(json.optString("plan_source_code"));
|
||||||
|
entity.setQuotationUnitCode(json.optString("quotation_unit_code"));
|
||||||
|
entity.setConstructionUnitName(json.optString("construction_unit_name"));
|
||||||
|
entity.setDeclarerAccount(json.optString("declarer_account"));
|
||||||
|
entity.setOrgId(syncBase.parseInteger(json.opt("org_id")));
|
||||||
|
entity.setUserId(json.optString("user_id"));
|
||||||
|
entity.setZoneType(syncBase.parseInteger(json.opt("zone_type")));
|
||||||
|
entity.setIsContinuous(syncBase.parseInteger(json.opt("is_continuous")));
|
||||||
|
entity.setConstructionManagerInfo(json.optString("construction_manager_info"));
|
||||||
|
entity.setMainRegistrationStationName(json.optString("main_registration_station_name"));
|
||||||
|
entity.setSpecialWorkTypeName(json.optString("special_work_type_name"));
|
||||||
|
entity.setConstructionImpactName(json.optString("construction_impact_name"));
|
||||||
|
entity.setPlanType2(syncBase.parseInteger(json.opt("plan_type2")));
|
||||||
|
entity.setWorkPointPosition(json.optString("work_point_position"));
|
||||||
|
entity.setProtectInfo(json.optString("protect_info"));
|
||||||
|
entity.setSingleNo(json.optString("single_no"));
|
||||||
|
entity.setExecGroup(json.optString("exec_group"));
|
||||||
|
entity.setExecAttribute(syncBase.parseInteger(json.opt("exec_attribute")));
|
||||||
|
entity.setRollbackTag(json.optString("rollback_tag"));
|
||||||
|
entity.setCrossLineNo(json.optString("cross_line_no"));
|
||||||
|
entity.setImportantStatus(json.optString("important_status"));
|
||||||
|
entity.setBreakSkylight(syncBase.parseInteger(json.opt("break_skylight")));
|
||||||
|
entity.setProtectSingleNo(json.optString("protect_single_no"));
|
||||||
|
entity.setPlanTag(syncBase.parseInteger(json.opt("plan_tag")));
|
||||||
|
entity.setAssess(syncBase.parseInteger(json.opt("assess")));
|
||||||
|
entity.setSpecial(syncBase.parseInteger(json.opt("special")));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpMajorSchemeBasicinfo;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpMajorSchemeBasicinfoMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重大施工方案基本信息表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpMajorSchemeBasicinfoSyncService extends ServiceImpl<ErpMajorSchemeBasicinfoMapper, ErpMajorSchemeBasicinfo> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_major_scheme_basicinfo,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_major_scheme_basicinfo", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpMajorSchemeBasicinfo entity = new ErpMajorSchemeBasicinfo();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setSchemeNo(json.optString("scheme_no"));
|
||||||
|
entity.setApplyUnitNo(json.optString("apply_unit_no"));
|
||||||
|
entity.setApplyUnit(json.optString("apply_unit"));
|
||||||
|
entity.setApplyPerson(json.optString("apply_person"));
|
||||||
|
entity.setTel(json.optString("tel"));
|
||||||
|
entity.setInvolveLines(json.optString("involve_lines"));
|
||||||
|
entity.setInvolveLinesLabel(json.optString("involve_lines_label"));
|
||||||
|
entity.setCmSubject(json.optString("cm_subject"));
|
||||||
|
entity.setCmSubjectLabel(json.optString("cm_subject_label"));
|
||||||
|
entity.setZoneType(json.optString("zone_type"));
|
||||||
|
entity.setZoneTypeLabel(json.optString("zone_type_label"));
|
||||||
|
entity.setConstructionName(json.optString("construction_name"));
|
||||||
|
entity.setStartTime(syncBase.parseDate(json.optString("start_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setEndTime(syncBase.parseDate(json.optString("end_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setMajorSourceCode(json.optString("major_source_code"));
|
||||||
|
entity.setConstructionUnit(json.optString("construction_unit"));
|
||||||
|
entity.setConstructionZone(json.optString("construction_zone"));
|
||||||
|
entity.setSchemeDetail(json.optString("scheme_detail"));
|
||||||
|
entity.setPhaseContent(json.optString("phase_content"));
|
||||||
|
entity.setProjectInfo(json.optString("project_info"));
|
||||||
|
entity.setProjectLevel(syncBase.parseInteger(json.opt("project_level")));
|
||||||
|
entity.setStatus(syncBase.parseInteger(json.opt("status")));
|
||||||
|
entity.setBusinessPutUnder(syncBase.parseInteger(json.opt("business_put_under")));
|
||||||
|
entity.setOrderStatus(json.optString("order_status"));
|
||||||
|
entity.setOrderId(syncBase.parseInteger(json.opt("order_id")));
|
||||||
|
entity.setIsDeleted(syncBase.parseInteger(json.opt("is_deleted")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
entity.setCreateUser(json.optString("create_user"));
|
||||||
|
entity.setCreateTime(syncBase.parseDate(json.optString("create_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdateUser(syncBase.parseInteger(json.opt("update_user")));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setDelayStatus(syncBase.parseInteger(json.opt("delay_status")));
|
||||||
|
entity.setDelayOrderId(json.optString("delay_order_id"));
|
||||||
|
entity.setNumberOfDelays(syncBase.parseInteger(json.opt("number_of_delays")));
|
||||||
|
entity.setNumberOfCitation(syncBase.parseInteger(json.opt("number_of_citation")));
|
||||||
|
entity.setApplySchemePlanTime(syncBase.parseDate(json.optString("apply_scheme_plan_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setFilesConfigType(syncBase.parseInteger(json.opt("files_config_type")));
|
||||||
|
entity.setThreeNewDevice(syncBase.parseDate(json.optString("three_new_device"), "yyyy-MM-dd"));
|
||||||
|
entity.setConstructionTime(json.optString("construction_time"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpMtrNtwk;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpMtrNtwkMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地铁路网信息表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpMtrNtwkSyncService extends ServiceImpl<ErpMtrNtwkMapper, ErpMtrNtwk> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_mtr_ntwk,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_mtr_ntwk", "dta_tm", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpMtrNtwk entity = new ErpMtrNtwk();
|
||||||
|
entity.setOprnLnNr(syncBase.parseInteger(json.opt("oprn_ln_nr")));
|
||||||
|
entity.setOprnStatnNr(syncBase.parseInteger(json.opt("oprn_statn_nr")));
|
||||||
|
entity.setOprnTotlLgt(syncBase.parseBigDecimal(json.opt("oprn_totl_lgt")));
|
||||||
|
entity.setGrndLgt(syncBase.parseBigDecimal(json.opt("grnd_lgt")));
|
||||||
|
entity.setTnelLgt(syncBase.parseBigDecimal(json.opt("tnel_lgt")));
|
||||||
|
entity.setVdctLgt(syncBase.parseBigDecimal(json.opt("vdct_lgt")));
|
||||||
|
entity.setTrnsfrStatnNr(syncBase.parseInteger(json.opt("trnsfr_statn_nr")));
|
||||||
|
entity.setClinrStatnNr(syncBase.parseInteger(json.opt("clinr_statn_nr")));
|
||||||
|
entity.setVrsnId(json.optString("vrsn_id"));
|
||||||
|
entity.setJbId(syncBase.parseLong(json.opt("jb_id")));
|
||||||
|
entity.setInsTs(syncBase.parseDate(json.optString("ins_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdTs(syncBase.parseDate(json.optString("upd_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpOperIndx;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpOperIndxMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营指标数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpOperIndxSyncService extends ServiceImpl<ErpOperIndxMapper, ErpOperIndx> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_oper_indx,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_oper_indx", "dt_date", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpOperIndx entity = new ErpOperIndx();
|
||||||
|
entity.setSourceId(json.optString("id"));
|
||||||
|
entity.setDtDate(json.optString("dt_date"));
|
||||||
|
entity.setLineId(syncBase.parseInteger(json.opt("line_id")));
|
||||||
|
entity.setProMetroColumnDay(syncBase.parseInteger(json.opt("pro_metro_column_day")));
|
||||||
|
entity.setProMetroColumnMonth(syncBase.parseInteger(json.opt("pro_metro_column_month")));
|
||||||
|
entity.setProMetroColumnYear(syncBase.parseInteger(json.opt("pro_metro_column_year")));
|
||||||
|
entity.setProMetroDistanceDay(syncBase.parseBigDecimal(json.opt("pro_metro_distance_day")));
|
||||||
|
entity.setProMetroDistanceMonth(syncBase.parseBigDecimal(json.opt("pro_metro_distance_month")));
|
||||||
|
entity.setProMetroDistanceYear(syncBase.parseBigDecimal(json.opt("pro_metro_distance_year")));
|
||||||
|
entity.setProPassengerCapacityDay(syncBase.parseInteger(json.opt("pro_passenger_capacity_day")));
|
||||||
|
entity.setProPassengerCapacityMonth(syncBase.parseInteger(json.opt("pro_passenger_capacity_month")));
|
||||||
|
entity.setProPassengerCapacityYear(syncBase.parseLong(json.opt("pro_passenger_capacity_year")));
|
||||||
|
entity.setProPassengerTransferDay(syncBase.parseInteger(json.opt("pro_passenger_transfer_day")));
|
||||||
|
entity.setProPassengerTransferMonth(syncBase.parseInteger(json.opt("pro_passenger_transfer_month")));
|
||||||
|
entity.setProPassengerTransferYear(syncBase.parseInteger(json.opt("pro_passenger_transfer_year")));
|
||||||
|
entity.setProTicketIncomeDay(syncBase.parseBigDecimal(json.opt("pro_ticket_income_day")));
|
||||||
|
entity.setProTicketIncomeMonth(syncBase.parseBigDecimal(json.opt("pro_ticket_income_month")));
|
||||||
|
entity.setProTicketIncomeYear(syncBase.parseBigDecimal(json.opt("pro_ticket_income_year")));
|
||||||
|
entity.setProOnline8Sect(syncBase.parseInteger(json.opt("pro_online_8_sect")));
|
||||||
|
entity.setProOnline7Sect(syncBase.parseInteger(json.opt("pro_online_7_sect")));
|
||||||
|
entity.setProOnline6Sect(syncBase.parseInteger(json.opt("pro_online_6_sect")));
|
||||||
|
entity.setProOnline4Sect(syncBase.parseInteger(json.opt("pro_online_4_sect")));
|
||||||
|
entity.setProOnline3Sect(syncBase.parseInteger(json.opt("pro_online_3_sect")));
|
||||||
|
entity.setProBackup8Sect(syncBase.parseInteger(json.opt("pro_backup_8_sect")));
|
||||||
|
entity.setProBackup7Sect(syncBase.parseInteger(json.opt("pro_backup_7_sect")));
|
||||||
|
entity.setProBackup6Sect(syncBase.parseInteger(json.opt("pro_backup_6_sect")));
|
||||||
|
entity.setProBackup4Sect(syncBase.parseInteger(json.opt("pro_backup_4_sect")));
|
||||||
|
entity.setProBackup3Sect(syncBase.parseInteger(json.opt("pro_backup_3_sect")));
|
||||||
|
entity.setQltOntimeDay(syncBase.parseBigDecimal(json.opt("qlt_ontime_day")));
|
||||||
|
entity.setQltOntimeMonth(syncBase.parseBigDecimal(json.opt("qlt_ontime_month")));
|
||||||
|
entity.setQltOntimeYear(syncBase.parseBigDecimal(json.opt("qlt_ontime_year")));
|
||||||
|
entity.setQltOnworkDay(syncBase.parseBigDecimal(json.opt("qlt_onwork_day")));
|
||||||
|
entity.setQltOnworkMonth(syncBase.parseBigDecimal(json.opt("qlt_onwork_month")));
|
||||||
|
entity.setQltOnworkYear(syncBase.parseBigDecimal(json.opt("qlt_onwork_year")));
|
||||||
|
entity.setSclLineLenth(syncBase.parseInteger(json.opt("scl_line_lenth")));
|
||||||
|
entity.setSclStationCount(syncBase.parseInteger(json.opt("scl_station_count")));
|
||||||
|
entity.setScl8Sect(syncBase.parseInteger(json.opt("scl_8_sect")));
|
||||||
|
entity.setScl7Sect(syncBase.parseInteger(json.opt("scl_7_sect")));
|
||||||
|
entity.setScl6Sect(syncBase.parseInteger(json.opt("scl_6_sect")));
|
||||||
|
entity.setScl4Sect(syncBase.parseInteger(json.opt("scl_4_sect")));
|
||||||
|
entity.setScl3Sect(syncBase.parseInteger(json.opt("scl_3_sect")));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpOutageDepot;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpOutageDepotMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车场施工计划停电范围数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpOutageDepotSyncService extends ServiceImpl<ErpOutageDepotMapper, ErpOutageDepot> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_outage_depot,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_outage_depot", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpOutageDepot entity = new ErpOutageDepot();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setPlanNo(json.optString("plan_no"));
|
||||||
|
entity.setLineNo(syncBase.parseInteger(json.opt("line_no")));
|
||||||
|
entity.setConstructionObjectType(syncBase.parseInteger(json.opt("construction_object_type")));
|
||||||
|
entity.setConstructionObjectCode(json.optString("construction_object_code"));
|
||||||
|
entity.setCreateUser(json.optString("create_user"));
|
||||||
|
entity.setCreateTime(json.optString("create_time"));
|
||||||
|
entity.setUpdateUser(json.optString("update_user"));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setIsDeleted(syncBase.parseInteger(json.opt("is_deleted")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
entity.setDepotNo(json.optString("depot_no"));
|
||||||
|
entity.setDepotName(json.optString("depot_name"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpOutageRange;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpOutageRangeMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划停电范围数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpOutageRangeSyncService extends ServiceImpl<ErpOutageRangeMapper, ErpOutageRange> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_outage_range,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_outage_range", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpOutageRange entity = new ErpOutageRange();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setPlanNo(json.optString("plan_no"));
|
||||||
|
entity.setLineNo(syncBase.parseInteger(json.opt("line_no")));
|
||||||
|
entity.setStartSiteCode(json.optString("start_site_code"));
|
||||||
|
entity.setStartSiteName(json.optString("start_site_name"));
|
||||||
|
entity.setStartSiteSequenceNo(syncBase.parseInteger(json.opt("start_site_sequence_no")));
|
||||||
|
entity.setIncludeStartSiteFlag(syncBase.parseInteger(json.opt("include_start_site_flag")));
|
||||||
|
entity.setEndSiteCode(syncBase.parseInteger(json.opt("end_site_code")));
|
||||||
|
entity.setEndSiteName(json.optString("end_site_name"));
|
||||||
|
entity.setEndSiteSequenceNo(syncBase.parseInteger(json.opt("end_site_sequence_no")));
|
||||||
|
entity.setIncludeEndSiteFlag(syncBase.parseInteger(json.opt("include_end_site_flag")));
|
||||||
|
entity.setUpDownFlag(syncBase.parseInteger(json.opt("up_down_flag")));
|
||||||
|
entity.setBifurcationFlag(syncBase.parseInteger(json.opt("bifurcation_flag")));
|
||||||
|
entity.setOutExitFlag(syncBase.parseInteger(json.opt("out_exit_flag")));
|
||||||
|
entity.setSupplementaryExplanation(json.optString("supplementary_explanation"));
|
||||||
|
entity.setSwitchName(json.optString("switch_name"));
|
||||||
|
entity.setImpactType(syncBase.parseInteger(json.opt("impact_type")));
|
||||||
|
entity.setType(syncBase.parseInteger(json.opt("type")));
|
||||||
|
entity.setCreateUser(syncBase.parseInteger(json.opt("create_user")));
|
||||||
|
entity.setCreateTime(syncBase.parseDate(json.optString("create_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdateUser(syncBase.parseInteger(json.opt("update_user")));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setIsDeleted(syncBase.parseInteger(json.opt("is_deleted")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
entity.setParentSiteNo(json.optString("parent_site_no"));
|
||||||
|
entity.setIsAllPark(syncBase.parseInteger(json.opt("is_all_park")));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpPlanRegisterCancel;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpPlanRegisterCancelMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工执行计划登记注销数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpPlanRegisterCancelSyncService extends ServiceImpl<ErpPlanRegisterCancelMapper, ErpPlanRegisterCancel> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_plan_register_cancel,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_plan_register_cancel", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpPlanRegisterCancel entity = new ErpPlanRegisterCancel();
|
||||||
|
entity.setSourceId(json.optString("id"));
|
||||||
|
entity.setPlanZoneType(json.optString("plan_zone_type"));
|
||||||
|
entity.setPlanNo(json.optString("plan_no"));
|
||||||
|
entity.setPrincipalMobile(json.optString("principal_mobile"));
|
||||||
|
entity.setPrincipalNo(json.optString("principal_no"));
|
||||||
|
entity.setPrincipal(json.optString("principal"));
|
||||||
|
entity.setUnit(json.optString("unit"));
|
||||||
|
entity.setRegisterNumber(json.optString("register_number"));
|
||||||
|
entity.setRegisterStatus(json.optString("register_status"));
|
||||||
|
entity.setSingleNo(json.optString("single_no"));
|
||||||
|
entity.setGroundLead(json.optString("ground_lead"));
|
||||||
|
entity.setStationNo(json.optString("station_no"));
|
||||||
|
entity.setOutStationNo(json.optString("out_station_no"));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
entity.setCreateUser(json.optString("create_user"));
|
||||||
|
entity.setCreateTime(json.optString("create_time"));
|
||||||
|
entity.setUpdateUser(json.optString("update_user"));
|
||||||
|
entity.setUpdateTime(json.optString("update_time"));
|
||||||
|
entity.setDeleted(json.optString("deleted"));
|
||||||
|
entity.setConstructionResult(json.optString("construction_result"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,175 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpPlnDtl;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpPlnDtlMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划明细表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpPlnDtlSyncService extends ServiceImpl<ErpPlnDtlMapper, ErpPlnDtl> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_pln_dtl,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_pln_dtl", "dta_tm", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpPlnDtl entity = new ErpPlnDtl();
|
||||||
|
entity.setMrLineId(json.optString("mr_line_id"));
|
||||||
|
entity.setTracingId(json.optString("tracing_id"));
|
||||||
|
entity.setMrId(json.optString("mr_id"));
|
||||||
|
entity.setLineNo(syncBase.parseBigDecimal(json.opt("line_no")));
|
||||||
|
entity.setMrType(json.optString("mr_type"));
|
||||||
|
entity.setExpenseType(json.optString("expense_type"));
|
||||||
|
entity.setShipToId(json.optString("ship_to_id"));
|
||||||
|
entity.setShipToName(json.optString("ship_to_name"));
|
||||||
|
entity.setCompanyCode(json.optString("company_code"));
|
||||||
|
entity.setCompanyName(json.optString("company_name"));
|
||||||
|
entity.setDdBillTo(json.optString("dd_bill_to"));
|
||||||
|
entity.setDdBillToName(json.optString("dd_bill_to_name"));
|
||||||
|
entity.setOrgId(json.optString("org_id"));
|
||||||
|
entity.setOrgName(json.optString("org_name"));
|
||||||
|
entity.setDeptId(json.optString("dept_id"));
|
||||||
|
entity.setRequestedId(json.optString("requested_id"));
|
||||||
|
entity.setRequestedNo(json.optString("requested_no"));
|
||||||
|
entity.setItemId(json.optString("item_id"));
|
||||||
|
entity.setItemName(json.optString("item_name"));
|
||||||
|
entity.setItemDesc(json.optString("item_desc"));
|
||||||
|
entity.setMaterialType(json.optString("material_type"));
|
||||||
|
entity.setClass1(json.optString("class1"));
|
||||||
|
entity.setClass2(json.optString("class2"));
|
||||||
|
entity.setClass3(json.optString("class3"));
|
||||||
|
entity.setClsId(json.optString("cls_id"));
|
||||||
|
entity.setUom(json.optString("uom"));
|
||||||
|
entity.setQty(syncBase.parseBigDecimal(json.opt("qty")));
|
||||||
|
entity.setDeliveryDate(json.optString("delivery_date"));
|
||||||
|
entity.setDaysLate(syncBase.parseBigDecimal(json.opt("days_late")));
|
||||||
|
entity.setDaysEarly(syncBase.parseBigDecimal(json.opt("days_early")));
|
||||||
|
entity.setReplaceModel(json.optString("replace_model"));
|
||||||
|
entity.setInvId(json.optString("inv_id"));
|
||||||
|
entity.setDdId(json.optString("dd_id"));
|
||||||
|
entity.setBudgetCheck(json.optString("budget_check"));
|
||||||
|
entity.setBudgetPrice(syncBase.parseBigDecimal(json.opt("budget_price")));
|
||||||
|
entity.setBudgetAmt(syncBase.parseBigDecimal(json.opt("budget_amt")));
|
||||||
|
entity.setCostCenter(json.optString("cost_center"));
|
||||||
|
entity.setDdAccCode(json.optString("dd_acc_code"));
|
||||||
|
entity.setSrcBuyerCode(json.optString("src_buyer_code"));
|
||||||
|
entity.setBuyerCode(json.optString("buyer_code"));
|
||||||
|
entity.setPurDeptId(json.optString("pur_dept_id"));
|
||||||
|
entity.setStateId(json.optString("state_id"));
|
||||||
|
entity.setAppStateId(json.optString("app_state_id"));
|
||||||
|
entity.setStateHistory(json.optString("state_history"));
|
||||||
|
entity.setAutoReserved(json.optString("auto_reserved"));
|
||||||
|
entity.setChangeReasonCode(json.optString("change_reason_code"));
|
||||||
|
entity.setChangeReasonOthers(json.optString("change_reason_others"));
|
||||||
|
entity.setBpoLineId(json.optString("bpo_line_id"));
|
||||||
|
entity.setInqLineId(json.optString("inq_line_id"));
|
||||||
|
entity.setPickLineId(json.optString("pick_line_id"));
|
||||||
|
entity.setOrderLineId(json.optString("order_line_id"));
|
||||||
|
entity.setMrState(json.optString("mr_state"));
|
||||||
|
entity.setInvType(json.optString("inv_type"));
|
||||||
|
entity.setDeliveryType(json.optString("delivery_type"));
|
||||||
|
entity.setDeliveryTo(json.optString("delivery_to"));
|
||||||
|
entity.setDeliveryName(json.optString("delivery_name"));
|
||||||
|
entity.setIsAccidentFlag(json.optString("is_accident_flag"));
|
||||||
|
entity.setDdPurpose(json.optString("dd_purpose"));
|
||||||
|
entity.setStatisticType(json.optString("statistic_type"));
|
||||||
|
entity.setImportDomesticFlag(json.optString("import_domestic_flag"));
|
||||||
|
entity.setOrignFactory(json.optString("orign_factory"));
|
||||||
|
entity.setEquipmentNo(json.optString("equipment_no"));
|
||||||
|
entity.setProjectNo(json.optString("project_no"));
|
||||||
|
entity.setProxyDeptId(json.optString("proxy_dept_id"));
|
||||||
|
entity.setExtSysSrc(json.optString("ext_sys_src"));
|
||||||
|
entity.setExtSysId(json.optString("ext_sys_id"));
|
||||||
|
entity.setMrRemark(json.optString("mr_remark"));
|
||||||
|
entity.setVersionNo(syncBase.parseBigDecimal(json.opt("version_no")));
|
||||||
|
entity.setReserve1(json.optString("reserve1"));
|
||||||
|
entity.setReserve2(json.optString("reserve2"));
|
||||||
|
entity.setReserve3(json.optString("reserve3"));
|
||||||
|
entity.setReserve4(json.optString("reserve4"));
|
||||||
|
entity.setReserve5(json.optString("reserve5"));
|
||||||
|
entity.setReserve6(json.optString("reserve6"));
|
||||||
|
entity.setReserve7(syncBase.parseBigDecimal(json.opt("reserve7")));
|
||||||
|
entity.setReserve8(syncBase.parseBigDecimal(json.opt("reserve8")));
|
||||||
|
entity.setReserve9(syncBase.parseBigDecimal(json.opt("reserve9")));
|
||||||
|
entity.setRecCreator(json.optString("rec_creator"));
|
||||||
|
entity.setRecCreateTime(json.optString("rec_create_time"));
|
||||||
|
entity.setRecRevisor(json.optString("rec_revisor"));
|
||||||
|
entity.setRecReviseTime(json.optString("rec_revise_time"));
|
||||||
|
entity.setArchiveFlag(json.optString("archive_flag"));
|
||||||
|
entity.setDeliveryRemark(json.optString("delivery_remark"));
|
||||||
|
entity.setPurCompanyCode(json.optString("pur_company_code"));
|
||||||
|
entity.setPurCompanyName(json.optString("pur_company_name"));
|
||||||
|
entity.setPurBillTo(json.optString("pur_bill_to"));
|
||||||
|
entity.setPurBillToName(json.optString("pur_bill_to_name"));
|
||||||
|
entity.setDeptName(json.optString("dept_name"));
|
||||||
|
entity.setPurDeptName(json.optString("pur_dept_name"));
|
||||||
|
entity.setTaskId(json.optString("task_id"));
|
||||||
|
entity.setProjectId(json.optString("project_id"));
|
||||||
|
entity.setYsObjId(json.optString("ys_obj_id"));
|
||||||
|
entity.setFormerPlanNum(syncBase.parseBigDecimal(json.opt("former_plan_num")));
|
||||||
|
entity.setTransmitFlag(json.optString("transmit_flag"));
|
||||||
|
entity.setPlanJob(json.optString("plan_job"));
|
||||||
|
entity.setOrderNum(syncBase.parseBigDecimal(json.opt("order_num")));
|
||||||
|
entity.setPlanTakeNum(syncBase.parseBigDecimal(json.opt("plan_take_num")));
|
||||||
|
entity.setOutNum(syncBase.parseBigDecimal(json.opt("out_num")));
|
||||||
|
entity.setInstockNum(syncBase.parseBigDecimal(json.opt("instock_num")));
|
||||||
|
entity.setJhJobId(json.optString("jh_job_id"));
|
||||||
|
entity.setCgJobId(json.optString("cg_job_id"));
|
||||||
|
entity.setLineId(json.optString("line_id"));
|
||||||
|
entity.setWoNo(syncBase.parseBigDecimal(json.opt("wo_no")));
|
||||||
|
entity.setPartNo(json.optString("part_no"));
|
||||||
|
entity.setDestinationId(json.optString("destination_id"));
|
||||||
|
entity.setDestinationDescription(json.optString("destination_description"));
|
||||||
|
entity.setMaterialOrderNo(syncBase.parseBigDecimal(json.opt("material_order_no")));
|
||||||
|
entity.setMaintMaterialOrderNo(syncBase.parseBigDecimal(json.opt("maint_material_order_no")));
|
||||||
|
entity.setLineSeqNo(syncBase.parseBigDecimal(json.opt("line_seq_no")));
|
||||||
|
entity.setReleaseNo(syncBase.parseBigDecimal(json.opt("release_no")));
|
||||||
|
entity.setLineItemNo(syncBase.parseBigDecimal(json.opt("line_item_no")));
|
||||||
|
entity.setInvPhysic(json.optString("inv_physic"));
|
||||||
|
entity.setOutFlag(json.optString("out_flag"));
|
||||||
|
entity.setSnFlag(json.optString("sn_flag"));
|
||||||
|
entity.setIsBpoing(json.optString("is_bpoing"));
|
||||||
|
entity.setWorkTeam(json.optString("work_team"));
|
||||||
|
entity.setToPurchase(json.optString("to_purchase"));
|
||||||
|
entity.setManufactureDealer(json.optString("manufacture_dealer"));
|
||||||
|
entity.setUrgencyType(json.optString("urgency_type"));
|
||||||
|
entity.setLastPrice(syncBase.parseBigDecimal(json.opt("last_price")));
|
||||||
|
entity.setPackageSpec(json.optString("package_spec"));
|
||||||
|
entity.setEamId(json.optString("eam_id"));
|
||||||
|
entity.setDivDate(json.optString("div_date"));
|
||||||
|
entity.setBidQty(syncBase.parseBigDecimal(json.opt("bid_qty")));
|
||||||
|
entity.setJhQty(syncBase.parseBigDecimal(json.opt("jh_qty")));
|
||||||
|
entity.setIsModuleDep(json.optString("is_module_dep"));
|
||||||
|
entity.setContractType(json.optString("contract_type"));
|
||||||
|
entity.setMrNext(json.optString("mr_next"));
|
||||||
|
entity.setBelongTo(json.optString("belong_to"));
|
||||||
|
entity.setDbNum(syncBase.parseBigDecimal(json.opt("db_num")));
|
||||||
|
entity.setJobId(syncBase.parseLong(json.opt("job_id")));
|
||||||
|
entity.setInsTs(syncBase.parseDate(json.optString("ins_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdTs(syncBase.parseDate(json.optString("upd_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpPlnMstr;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpPlnMstrMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划主表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpPlnMstrSyncService extends ServiceImpl<ErpPlnMstrMapper, ErpPlnMstr> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_pln_mstr,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_pln_mstr", "dta_tm", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpPlnMstr entity = new ErpPlnMstr();
|
||||||
|
entity.setMrId(json.optString("mr_id"));
|
||||||
|
entity.setDeptId(json.optString("dept_id"));
|
||||||
|
entity.setRequestedId(json.optString("requested_id"));
|
||||||
|
entity.setRequestedNo(json.optString("requested_no"));
|
||||||
|
entity.setPrType(json.optString("pr_type"));
|
||||||
|
entity.setUrgencyType(json.optString("urgency_type"));
|
||||||
|
entity.setExpenseType(json.optString("expense_type"));
|
||||||
|
entity.setUsageType(json.optString("usage_type"));
|
||||||
|
entity.setStateId(json.optString("state_id"));
|
||||||
|
entity.setStateHistory(json.optString("state_history"));
|
||||||
|
entity.setAppStateId(json.optString("app_state_id"));
|
||||||
|
entity.setDdBillTo(json.optString("dd_bill_to"));
|
||||||
|
entity.setDdBillToName(json.optString("dd_bill_to_name"));
|
||||||
|
entity.setShipToId(json.optString("ship_to_id"));
|
||||||
|
entity.setShipToName(json.optString("ship_to_name"));
|
||||||
|
entity.setOrgId(json.optString("org_id"));
|
||||||
|
entity.setOrgName(json.optString("org_name"));
|
||||||
|
entity.setAutoApprove(json.optString("auto_approve"));
|
||||||
|
entity.setVersionNo(syncBase.parseBigDecimal(json.opt("version_no")));
|
||||||
|
entity.setReserve1(json.optString("reserve1"));
|
||||||
|
entity.setReserve2(json.optString("reserve2"));
|
||||||
|
entity.setReserve3(json.optString("reserve3"));
|
||||||
|
entity.setReserve4(syncBase.parseBigDecimal(json.opt("reserve4")));
|
||||||
|
entity.setReserve5(syncBase.parseBigDecimal(json.opt("reserve5")));
|
||||||
|
entity.setRecCreator(json.optString("rec_creator"));
|
||||||
|
entity.setRecCreateTime(json.optString("rec_create_time"));
|
||||||
|
entity.setRecRevisor(json.optString("rec_revisor"));
|
||||||
|
entity.setRecReviseTime(json.optString("rec_revise_time"));
|
||||||
|
entity.setArchiveFlag(json.optString("archive_flag"));
|
||||||
|
entity.setTracingId(json.optString("tracing_id"));
|
||||||
|
entity.setCompanyCode(json.optString("company_code"));
|
||||||
|
entity.setCompanyName(json.optString("company_name"));
|
||||||
|
entity.setDeptName(json.optString("dept_name"));
|
||||||
|
entity.setProjectId(json.optString("project_id"));
|
||||||
|
entity.setTransmitFlag(json.optString("transmit_flag"));
|
||||||
|
entity.setContractType(json.optString("contract_type"));
|
||||||
|
entity.setJobId(syncBase.parseLong(json.opt("job_id")));
|
||||||
|
entity.setInsTs(syncBase.parseDate(json.optString("ins_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdTs(syncBase.parseDate(json.optString("upd_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpSafetyRegulation;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpSafetyRegulationMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划安全措施表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpSafetyRegulationSyncService extends ServiceImpl<ErpSafetyRegulationMapper, ErpSafetyRegulation> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_safety_regulation,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_safety_regulation", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpSafetyRegulation entity = new ErpSafetyRegulation();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setPlanNo(json.optString("plan_no"));
|
||||||
|
entity.setLineNo(syncBase.parseInteger(json.opt("line_no")));
|
||||||
|
entity.setTransformerNo(json.optString("transformer_no"));
|
||||||
|
entity.setIsStopBack(syncBase.parseInteger(json.opt("is_stop_back")));
|
||||||
|
entity.setCanonicalNo(json.optString("canonical_no"));
|
||||||
|
entity.setTaskName(json.optString("task_name"));
|
||||||
|
entity.setIsSelfDefine(json.optString("is_self_define"));
|
||||||
|
entity.setCreateUser(syncBase.parseInteger(json.opt("create_user")));
|
||||||
|
entity.setCreateTime(syncBase.parseDate(json.optString("create_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdateUser(syncBase.parseInteger(json.opt("update_user")));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setIsDeleted(syncBase.parseInteger(json.opt("is_deleted")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpSectionDepot;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpSectionDepotMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车场施工影响区段表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpSectionDepotSyncService extends ServiceImpl<ErpSectionDepotMapper, ErpSectionDepot> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_section_depot,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_section_depot", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpSectionDepot entity = new ErpSectionDepot();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setPlanNo(json.optString("plan_no"));
|
||||||
|
entity.setLineNo(syncBase.parseInteger(json.opt("line_no")));
|
||||||
|
entity.setDepotNo(json.optString("depot_no"));
|
||||||
|
entity.setDepotName(json.optString("depot_name"));
|
||||||
|
entity.setConstructionObjectType(syncBase.parseInteger(json.opt("construction_object_type")));
|
||||||
|
entity.setConstructionObjectCode(json.optString("construction_object_code"));
|
||||||
|
entity.setCreateUser(json.optString("create_user"));
|
||||||
|
entity.setCreateTime(json.optString("create_time"));
|
||||||
|
entity.setUpdateUser(json.optString("update_user"));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setIsDeleted(syncBase.parseInteger(json.opt("is_deleted")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpSection;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpSectionMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工影响区段表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpSectionSyncService extends ServiceImpl<ErpSectionMapper, ErpSection> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_section,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_section", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpSection entity = new ErpSection();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setPlanNo(json.optString("plan_no"));
|
||||||
|
entity.setLineNo(syncBase.parseInteger(json.opt("line_no")));
|
||||||
|
entity.setStartSiteNo(json.optString("start_site_no"));
|
||||||
|
entity.setStartSiteSequenceNo(syncBase.parseInteger(json.opt("start_site_sequence_no")));
|
||||||
|
entity.setStartStationName(json.optString("start_station_name"));
|
||||||
|
entity.setIncludeStartSiteFlag(syncBase.parseInteger(json.opt("include_start_site_flag")));
|
||||||
|
entity.setEndSiteNo(json.optString("end_site_no"));
|
||||||
|
entity.setEndSiteSequenceNo(syncBase.parseInteger(json.opt("end_site_sequence_no")));
|
||||||
|
entity.setEndStationName(json.optString("end_station_name"));
|
||||||
|
entity.setIncludeEndSiteFlag(syncBase.parseInteger(json.opt("include_end_site_flag")));
|
||||||
|
entity.setUpDownFlag(syncBase.parseInteger(json.opt("up_down_flag")));
|
||||||
|
entity.setBifurcationFlag(syncBase.parseInteger(json.opt("bifurcation_flag")));
|
||||||
|
entity.setOutExitFlag(syncBase.parseInteger(json.opt("out_exit_flag")));
|
||||||
|
entity.setSupplementaryExplanation(json.optString("supplementary_explanation"));
|
||||||
|
entity.setSwitchName(json.optString("switch_name"));
|
||||||
|
entity.setImpactType(syncBase.parseInteger(json.opt("impact_type")));
|
||||||
|
entity.setImpactTypeName(json.optString("impact_type_name"));
|
||||||
|
entity.setType(syncBase.parseInteger(json.opt("type")));
|
||||||
|
entity.setCreateUser(syncBase.parseInteger(json.opt("create_user")));
|
||||||
|
entity.setCreateTime(syncBase.parseDate(json.optString("create_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdateUser(syncBase.parseInteger(json.opt("update_user")));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setIsDeleted(syncBase.parseInteger(json.opt("is_deleted")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
entity.setAffectRegion(json.optString("affect_region"));
|
||||||
|
entity.setStationType(syncBase.parseInteger(json.opt("station_type")));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpStation;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpStationMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线路站点表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpStationSyncService extends ServiceImpl<ErpStationMapper, ErpStation> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_station,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_station", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpStation entity = new ErpStation();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setStationNameCn(json.optString("station_name_cn"));
|
||||||
|
entity.setStationNameEn(json.optString("station_name_en"));
|
||||||
|
entity.setStationNo(syncBase.parseInteger(json.opt("station_no")));
|
||||||
|
entity.setLineNo(syncBase.parseInteger(json.opt("line_no")));
|
||||||
|
entity.setLineName(json.optString("line_name"));
|
||||||
|
entity.setUnitNo(json.optString("unit_no"));
|
||||||
|
entity.setUnitName(json.optString("unit_name"));
|
||||||
|
entity.setSequenceNo(syncBase.parseInteger(json.opt("sequence_no")));
|
||||||
|
entity.setStationType1(syncBase.parseInteger(json.opt("station_type1")));
|
||||||
|
entity.setStationType2(syncBase.parseInteger(json.opt("station_type2")));
|
||||||
|
entity.setBranchType(syncBase.parseInteger(json.opt("branch_type")));
|
||||||
|
entity.setTransferLineNo(json.optString("transfer_line_no"));
|
||||||
|
entity.setBranchNo(json.optString("branch_no"));
|
||||||
|
entity.setIsJoinStation(syncBase.parseInteger(json.opt("is_join_station")));
|
||||||
|
entity.setUpAndDown(json.optString("up_and_down"));
|
||||||
|
entity.setUpInsulationPoint(syncBase.parseInteger(json.opt("up_insulation_point")));
|
||||||
|
entity.setDownInsulationPoint(syncBase.parseInteger(json.opt("down_insulation_point")));
|
||||||
|
entity.setIsUpDownAffect(syncBase.parseInteger(json.opt("is_up_down_affect")));
|
||||||
|
entity.setUpKnifePosition(syncBase.parseInteger(json.opt("up_knife_position")));
|
||||||
|
entity.setDownKnifePosition(syncBase.parseInteger(json.opt("down_knife_position")));
|
||||||
|
entity.setTurningPosition(syncBase.parseInteger(json.opt("turning_position")));
|
||||||
|
entity.setIsUpsStation(json.optString("is_ups_station"));
|
||||||
|
entity.setUpsStationNo(json.optString("ups_station_no"));
|
||||||
|
entity.setIsSignalStation(syncBase.parseInteger(json.opt("is_signal_station")));
|
||||||
|
entity.setSignalStationNo(syncBase.parseInteger(json.opt("signal_station_no")));
|
||||||
|
entity.setIsInterStation(syncBase.parseInteger(json.opt("is_inter_station")));
|
||||||
|
entity.setDepotNo(json.optString("depot_no"));
|
||||||
|
entity.setDepotPosition(json.optString("depot_position"));
|
||||||
|
entity.setUpLatestClearTime(json.optString("up_latest_clear_time"));
|
||||||
|
entity.setDownLatestClearTime(json.optString("down_latest_clear_time"));
|
||||||
|
entity.setIsDeleted(syncBase.parseInteger(json.opt("is_deleted")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
entity.setCreateUser(json.optString("create_user"));
|
||||||
|
entity.setCreateTime(syncBase.parseDate(json.optString("create_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdateUser(syncBase.parseInteger(json.opt("update_user")));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdateDate(json.optString("update_date"));
|
||||||
|
entity.setConstructionStartTimeUp(syncBase.parseDate(json.optString("construction_start_time_up"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionEndTimeUp(syncBase.parseDate(json.optString("construction_end_time_up"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionPowerStartTimeUp(syncBase.parseDate(json.optString("construction_power_start_time_up"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionPowerEndTimeUp(syncBase.parseDate(json.optString("construction_power_end_time_up"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionLazyStartTimeUp(syncBase.parseDate(json.optString("construction_lazy_start_time_up"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionLazyEndTimeUp(syncBase.parseDate(json.optString("construction_lazy_end_time_up"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionLazyPowerStartTimeUp(syncBase.parseDate(json.optString("construction_lazy_power_start_time_up"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionLazyPowerEndTimeUp(syncBase.parseDate(json.optString("construction_lazy_power_end_time_up"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionStartTimeDown(syncBase.parseDate(json.optString("construction_start_time_down"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionEndTimeDown(syncBase.parseDate(json.optString("construction_end_time_down"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionPowerStartTimeDown(syncBase.parseDate(json.optString("construction_power_start_time_down"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionPowerEndTimeDown(syncBase.parseDate(json.optString("construction_power_end_time_down"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionLazyStartTimeDown(syncBase.parseDate(json.optString("construction_lazy_start_time_down"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionLazyEndTimeDown(syncBase.parseDate(json.optString("construction_lazy_end_time_down"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionLazyPowerStartTimeDown(syncBase.parseDate(json.optString("construction_lazy_power_start_time_down"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setConstructionLazyPowerEndTimeDown(syncBase.parseDate(json.optString("construction_lazy_power_end_time_down"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setSeparatePower(syncBase.parseInteger(json.opt("separate_power")));
|
||||||
|
entity.setIsSiteAttendant(syncBase.parseInteger(json.opt("is_site_attendant")));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpTrnTm;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpTrnTmMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列车时刻表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpTrnTmSyncService extends ServiceImpl<ErpTrnTmMapper, ErpTrnTm> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_trn_tm,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_trn_tm", "dta_tm", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpTrnTm entity = new ErpTrnTm();
|
||||||
|
entity.setSqnNr(syncBase.parseLong(json.opt("sqn_nr")));
|
||||||
|
entity.setTrnNo(json.optString("trn_no"));
|
||||||
|
entity.setStatnNmCn(json.optString("statn_nm_cn"));
|
||||||
|
entity.setArrlTmScnd(syncBase.parseLong(json.opt("arrl_tm_scnd")));
|
||||||
|
entity.setDepatTmScnd(syncBase.parseLong(json.opt("depat_tm_scnd")));
|
||||||
|
entity.setStopTrk(json.optString("stop_trk"));
|
||||||
|
entity.setTrnDgrmVrsn(json.optString("trn_dgrm_vrsn"));
|
||||||
|
entity.setNtVrsn(json.optString("nt_vrsn"));
|
||||||
|
entity.setLnId(json.optString("ln_id"));
|
||||||
|
entity.setTrnId(json.optString("trn_id"));
|
||||||
|
entity.setStatnId(json.optString("statn_id"));
|
||||||
|
entity.setJbId(syncBase.parseLong(json.opt("jb_id")));
|
||||||
|
entity.setInsTs(syncBase.parseDate(json.optString("ins_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdTs(syncBase.parseDate(json.optString("upd_ts"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpWeatherWarning;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpWeatherWarningMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天气预警信息数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpWeatherWarningSyncService extends ServiceImpl<ErpWeatherWarningMapper, ErpWeatherWarning> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_weather_warning,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_weather_warning", "dta_tm", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpWeatherWarning entity = new ErpWeatherWarning();
|
||||||
|
entity.setSourceId(json.optString("id"));
|
||||||
|
entity.setSender(json.optString("sender"));
|
||||||
|
entity.setPubTime(json.optString("pub_time"));
|
||||||
|
entity.setTitle(json.optString("title"));
|
||||||
|
entity.setStartTime(json.optString("start_time"));
|
||||||
|
entity.setEndTime(json.optString("end_time"));
|
||||||
|
entity.setStatus(json.optString("status"));
|
||||||
|
entity.setSeverity(json.optString("severity"));
|
||||||
|
entity.setSeverityColor(json.optString("severity_color"));
|
||||||
|
entity.setType(json.optString("type"));
|
||||||
|
entity.setTypeName(json.optString("type_name"));
|
||||||
|
entity.setUrgency(json.optString("urgency"));
|
||||||
|
entity.setCertainty(json.optString("certainty"));
|
||||||
|
entity.setText(json.optString("text"));
|
||||||
|
entity.setRelated(json.optString("related"));
|
||||||
|
entity.setWarningUpdatetime(json.optString("warning_updatetime"));
|
||||||
|
entity.setWarningFxlink(json.optString("warning_fxlink"));
|
||||||
|
entity.setInsTs(json.optString("ins_ts"));
|
||||||
|
entity.setUpdTs(json.optString("upd_ts"));
|
||||||
|
entity.setDtaTm(json.optString("dta_tm"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpZoneDepot;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpZoneDepotMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划车场施工区域表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpZoneDepotSyncService extends ServiceImpl<ErpZoneDepotMapper, ErpZoneDepot> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_zone_depot,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_zone_depot", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpZoneDepot entity = new ErpZoneDepot();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setPlanNo(json.optString("plan_no"));
|
||||||
|
entity.setLineNo(syncBase.parseInteger(json.opt("line_no")));
|
||||||
|
entity.setDepotNo(json.optString("depot_no"));
|
||||||
|
entity.setDepotName(json.optString("depot_name"));
|
||||||
|
entity.setSupplementaryExplanation(json.optString("supplementary_explanation"));
|
||||||
|
entity.setConstructionObjectType(syncBase.parseInteger(json.opt("construction_object_type")));
|
||||||
|
entity.setConstructionType(json.optString("construction_type"));
|
||||||
|
entity.setConstructionObjectCode(json.optString("construction_object_code"));
|
||||||
|
entity.setTrainNumber(syncBase.parseInteger(json.opt("train_number")));
|
||||||
|
entity.setConstructionTrainType(syncBase.parseInteger(json.opt("construction_train_type")));
|
||||||
|
entity.setProtectionCode(json.optString("protection_code"));
|
||||||
|
entity.setCreateUser(json.optString("create_user"));
|
||||||
|
entity.setCreateTime(json.optString("create_time"));
|
||||||
|
entity.setUpdateUser(json.optString("update_user"));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setIsDeleted(syncBase.parseInteger(json.opt("is_deleted")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
entity.setConstructionObjectName(json.optString("construction_object_name"));
|
||||||
|
entity.setProtectionName(json.optString("protection_name"));
|
||||||
|
entity.setLineName(json.optString("line_name"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.domain.ErpZone;
|
||||||
|
import net.juntech.modules.ysdp.sync.mapper.ErpZoneMapper;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工计划轨行区施工站点表数据同步服务
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ErpZoneSyncService extends ServiceImpl<ErpZoneMapper, ErpZone> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataCenterSyncBase syncBase;
|
||||||
|
|
||||||
|
public int syncByDate(String date) {
|
||||||
|
log.info("同步 erp_zone,日期:{}", date);
|
||||||
|
|
||||||
|
JSONArray dataArray = syncBase.fetchAllData("erp_zone", "create_time", date);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
JSONObject json = dataArray.getJSONObject(i);
|
||||||
|
if (syncBase.isEmptyData(json)) continue;
|
||||||
|
|
||||||
|
ErpZone entity = new ErpZone();
|
||||||
|
entity.setSourceId(syncBase.parseInteger(json.opt("id")));
|
||||||
|
entity.setPlanNo(json.optString("plan_no"));
|
||||||
|
entity.setLineNo(syncBase.parseInteger(json.opt("line_no")));
|
||||||
|
entity.setStartSiteNo(syncBase.parseInteger(json.opt("start_site_no")));
|
||||||
|
entity.setStartSiteName(json.optString("start_site_name"));
|
||||||
|
entity.setStartSiteSequenceNo(syncBase.parseInteger(json.opt("start_site_sequence_no")));
|
||||||
|
entity.setEndSiteNo(syncBase.parseInteger(json.opt("end_site_no")));
|
||||||
|
entity.setEndSiteName(json.optString("end_site_name"));
|
||||||
|
entity.setEndSiteSequenceNo(syncBase.parseInteger(json.opt("end_site_sequence_no")));
|
||||||
|
entity.setIncludeStartSiteFlag(json.optString("include_start_site_flag"));
|
||||||
|
entity.setIncludeEndSiteFlag(json.optString("include_end_site_flag"));
|
||||||
|
entity.setUpDownFlag(json.optString("up_down_flag"));
|
||||||
|
entity.setBifurcationFlag(syncBase.parseInteger(json.opt("bifurcation_flag")));
|
||||||
|
entity.setOutExitFlag(syncBase.parseInteger(json.opt("out_exit_flag")));
|
||||||
|
entity.setSupplementaryExplanation(json.optString("supplementary_explanation"));
|
||||||
|
entity.setSiteType(syncBase.parseInteger(json.opt("site_type")));
|
||||||
|
entity.setSiteNo(json.optString("site_no"));
|
||||||
|
entity.setSiteName(json.optString("site_name"));
|
||||||
|
entity.setSitePosition(json.optString("site_position"));
|
||||||
|
entity.setDepotNo(json.optString("depot_no"));
|
||||||
|
entity.setRegionalCategory(json.optString("regional_category"));
|
||||||
|
entity.setConstructionSiteType(syncBase.parseInteger(json.opt("construction_site_type")));
|
||||||
|
entity.setUpsCode(json.optString("ups_code"));
|
||||||
|
entity.setCreateUser(syncBase.parseInteger(json.opt("create_user")));
|
||||||
|
entity.setCreateTime(syncBase.parseDate(json.optString("create_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setUpdateUser(syncBase.parseInteger(json.opt("update_user")));
|
||||||
|
entity.setUpdateTime(syncBase.parseDate(json.optString("update_time"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
entity.setIsDeleted(syncBase.parseInteger(json.opt("is_deleted")));
|
||||||
|
entity.setRemark(json.optString("remark"));
|
||||||
|
entity.setRepairType(json.optString("repair_type"));
|
||||||
|
entity.setTrainNumber(json.optString("train_number"));
|
||||||
|
entity.setTrackNumber(json.optString("track_number"));
|
||||||
|
entity.setStationType(json.optString("station_type"));
|
||||||
|
|
||||||
|
save(entity);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
log.info("同步完成:{} 条", count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package net.juntech.modules.ysdp.sync.task;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jeeplus.quartz.domain.ScheduleJob;
|
||||||
|
import com.jeeplus.quartz.service.ScheduleJobService;
|
||||||
|
import com.jeeplus.sys.constant.CommonConstants;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.task.DataCenterSyncTask;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.CommandLineRunner;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用启动时确保数据中心同步任务已注册到 sys_schedule。
|
||||||
|
* 已存在则保留数据库现有 Cron 和状态,可在 /quartz/scheduleJob 修改。
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class DataCenterSyncTaskRegistrar implements CommandLineRunner {
|
||||||
|
|
||||||
|
public static final String JOB_NAME = "dataCenterSync";
|
||||||
|
public static final String JOB_GROUP = "ysdp";
|
||||||
|
public static final String DEFAULT_CRON = "0 0 6 * * ?";
|
||||||
|
/**
|
||||||
|
* 与现有任务保持一致的租户 ID
|
||||||
|
*/
|
||||||
|
private static final String TENANT_ID = "10000";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ScheduleJobService scheduleJobService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(String... args) {
|
||||||
|
try {
|
||||||
|
QueryWrapper<ScheduleJob> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("name", JOB_NAME)
|
||||||
|
.eq("job_group", JOB_GROUP)
|
||||||
|
.and(w -> w.isNull("del_flag").or().ne("del_flag", 1));
|
||||||
|
ScheduleJob existing = scheduleJobService.getOne(wrapper);
|
||||||
|
if (existing != null) {
|
||||||
|
log.info("数据中心同步任务已注册(name={}, cron={}, status={}),跳过初始化",
|
||||||
|
JOB_NAME, existing.getCronExpression(), existing.getStatus());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ScheduleJob job = new ScheduleJob();
|
||||||
|
job.setName(JOB_NAME);
|
||||||
|
job.setJobGroup(JOB_GROUP);
|
||||||
|
job.setCronExpression(DEFAULT_CRON);
|
||||||
|
// "1" = 启用,"0" = 暂停
|
||||||
|
job.setStatus(CommonConstants.YES);
|
||||||
|
job.setIsInfo(CommonConstants.NO);
|
||||||
|
job.setClassName(DataCenterSyncTask.class.getName());
|
||||||
|
job.setRemarks("数据中心三张表同步(erp_oper_indx / erp_5mins_trn_km / erp_cler_evt)");
|
||||||
|
job.setTenantId(TENANT_ID);
|
||||||
|
scheduleJobService.saveOrUpdate(job);
|
||||||
|
log.warn("数据中心同步任务已自动注册:name={}, cron={}", JOB_NAME, DEFAULT_CRON);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("数据中心同步任务自动注册失败,请通过 /quartz/scheduleJob 手动创建", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,162 @@
|
||||||
|
package net.juntech.modules.ysdp.task;
|
||||||
|
|
||||||
|
import com.jeeplus.quartz.domain.Task;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.juntech.modules.ysdp.sync.service.*;
|
||||||
|
import org.quartz.DisallowConcurrentExecution;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据中心同步任务
|
||||||
|
* 通过 jeeplus-quartz 框架调度,任务配置在 sys_schedule。
|
||||||
|
* 每次触发同步"前一天"的所有表数据。
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component("dataCenterSyncTask")
|
||||||
|
@DisallowConcurrentExecution
|
||||||
|
public class DataCenterSyncTask extends Task {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Erp5minsDelaySyncService erp5minsDelaySyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Erp5minsFlxRateSyncService erp5minsFlxRateSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Erp5minsTrnKmSyncService erp5minsTrnKmSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpClerEvtSyncService erpClerEvtSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpCorequirementsSyncService erpCorequirementsSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpExecPlanSyncService erpExecPlanSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpLineIntervalSyncService erpLineIntervalSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpLnSyncService erpLnSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpLnIndxSyncService erpLnIndxSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpMainSyncService erpMainSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpMainHistorySyncService erpMainHistorySyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpMajorSchemeBasicinfoSyncService erpMajorSchemeBasicinfoSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpMtrNtwkSyncService erpMtrNtwkSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpOperIndxSyncService erpOperIndxSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpOutageDepotSyncService erpOutageDepotSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpOutageRangeSyncService erpOutageRangeSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpPlanRegisterCancelSyncService erpPlanRegisterCancelSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpPlnDtlSyncService erpPlnDtlSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpPlnMstrSyncService erpPlnMstrSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpSafetyRegulationSyncService erpSafetyRegulationSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpSectionSyncService erpSectionSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpSectionDepotSyncService erpSectionDepotSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpStationSyncService erpStationSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpTrnTmSyncService erpTrnTmSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpWeatherWarningSyncService erpWeatherWarningSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpZoneSyncService erpZoneSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ErpZoneDepotSyncService erpZoneDepotSyncService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
log.warn("==================== 【Quartz 任务】数据中心同步开始 ====================");
|
||||||
|
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||||
|
String dateStr = new SimpleDateFormat("yyyy-MM-dd").format(calendar.getTime());
|
||||||
|
log.info("同步日期:{}", dateStr);
|
||||||
|
|
||||||
|
syncTable("运管5分钟晚点事件", () -> erp5minsDelaySyncService.syncByDate(dateStr));
|
||||||
|
syncTable("5分钟客流同比环比", () -> erp5minsFlxRateSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("5分钟列车公里数", () -> erp5minsTrnKmSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("清客事件", () -> erpClerEvtSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("核心要求", () -> erpCorequirementsSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("施工执行计划", () -> erpExecPlanSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("列车间隔计划", () -> erpLineIntervalSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("线路信息", () -> erpLnSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("运营线路指标(日)", () -> erpLnIndxSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("计划主表", () -> erpMainSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("计划历史信息", () -> erpMainHistorySyncService.syncByDate(dateStr));
|
||||||
|
syncTable("重大方案基本信息", () -> erpMajorSchemeBasicinfoSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("网络信息", () -> erpMtrNtwkSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("运营指标", () -> erpOperIndxSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("停电影响车场", () -> erpOutageDepotSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("停电范围", () -> erpOutageRangeSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("施工执行计划登记注销", () -> erpPlanRegisterCancelSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("计划明细表", () -> erpPlnDtlSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("计划主表", () -> erpPlnMstrSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("安全规章", () -> erpSafetyRegulationSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("施工影响区段", () -> erpSectionSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("施工影响区段车场", () -> erpSectionDepotSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("车站信息", () -> erpStationSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("列车时刻表", () -> erpTrnTmSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("天气预警", () -> erpWeatherWarningSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("施工区域", () -> erpZoneSyncService.syncByDate(dateStr));
|
||||||
|
syncTable("施工区域车场", () -> erpZoneDepotSyncService.syncByDate(dateStr));
|
||||||
|
|
||||||
|
log.warn("==================== 【Quartz 任务】数据中心同步结束 ====================");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步单个表,统一处理异常
|
||||||
|
* 用 WARN 级别打印同步结果,避免被 net.juntech=WARN 日志级别过滤掉
|
||||||
|
*/
|
||||||
|
private void syncTable(String tableName, SyncFunction syncFunction) {
|
||||||
|
try {
|
||||||
|
int count = syncFunction.sync();
|
||||||
|
log.warn("{}同步完成:{} 条", tableName, count);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("{}同步失败", tableName, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@FunctionalInterface
|
||||||
|
private interface SyncFunction {
|
||||||
|
int sync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -81,4 +81,34 @@ Constant {
|
||||||
*/
|
*/
|
||||||
public static final String API_CACHE_NAME_TRAFFIC_BIG_ACTIVITY = "api_traffic_bigActivityV1_";
|
public static final String API_CACHE_NAME_TRAFFIC_BIG_ACTIVITY = "api_traffic_bigActivityV1_";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行车页面缓存键前缀
|
||||||
|
*/
|
||||||
|
public static final String API_CACHE_NAME_DRIVING_PREFIX = "api_driving_";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行车页面-运营线路指标(每条线路当日数据)
|
||||||
|
*/
|
||||||
|
public static final String API_CACHE_NAME_DRIVING_LINE_INDICATORS = "api_driving_lineIndicatorsV1_";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行车页面-一周正点率
|
||||||
|
*/
|
||||||
|
public static final String API_CACHE_NAME_DRIVING_WEEK_ONTIME = "api_driving_weekOntimeV1_";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行车页面-一周兑现率
|
||||||
|
*/
|
||||||
|
public static final String API_CACHE_NAME_DRIVING_WEEK_ONWORK = "api_driving_weekOnworkV1_";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行车页面-运营信息汇总(线路长度、车站数)
|
||||||
|
*/
|
||||||
|
public static final String API_CACHE_NAME_DRIVING_OPERATE_SUMMARY = "api_driving_operateSummaryV1_";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行车页面-车辆信息汇总(在线车、备车数)
|
||||||
|
*/
|
||||||
|
public static final String API_CACHE_NAME_DRIVING_VEHICLE_SUMMARY = "api_driving_vehicleSummaryV1_";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,12 @@ import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
import org.springframework.transaction.PlatformTransactionManager;
|
import org.springframework.transaction.PlatformTransactionManager;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
@EnableScheduling
|
||||||
@ServletComponentScan({"com.jeeplus", "net.juntech"})
|
@ServletComponentScan({"com.jeeplus", "net.juntech"})
|
||||||
@SpringBootApplication(scanBasePackages = {"com.jeeplus","net.juntech","cn.hutool.extra.spring"},
|
@SpringBootApplication(scanBasePackages = {"com.jeeplus","net.juntech","cn.hutool.extra.spring"},
|
||||||
exclude = {
|
exclude = {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ server:
|
||||||
context-path:
|
context-path:
|
||||||
tomcat:
|
tomcat:
|
||||||
uri-encoding: UTF-8
|
uri-encoding: UTF-8
|
||||||
basedir: /Users/wyh/Documents/code/juntechysdp2/be
|
basedir: /User/liugf
|
||||||
accesslog:
|
accesslog:
|
||||||
pattern: common
|
pattern: common
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
@ -22,6 +22,9 @@ logging:
|
||||||
# org.flowable: DEBUG
|
# org.flowable: DEBUG
|
||||||
com.jeeplus: WARN
|
com.jeeplus: WARN
|
||||||
net.juntech: WARN
|
net.juntech: WARN
|
||||||
|
# 数据中心同步相关日志开启 INFO 级别,便于观察同步进度
|
||||||
|
net.juntech.modules.ysdp.sync: INFO
|
||||||
|
net.juntech.modules.ysdp.task: INFO
|
||||||
org.apache.shiro.cache.ehcache.EhCacheManager: WARN
|
org.apache.shiro.cache.ehcache.EhCacheManager: WARN
|
||||||
spring:
|
spring:
|
||||||
main:
|
main:
|
||||||
|
|
@ -44,6 +47,11 @@ spring:
|
||||||
password: enix
|
password: enix
|
||||||
url: jdbc:mysql://127.0.0.1:3306/juntech_ysdp_v2?useUnicode=true&characterEncoding=utf-8&useSSL=false&nullCatalogMeansCurrent=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://127.0.0.1:3306/juntech_ysdp_v2?useUnicode=true&characterEncoding=utf-8&useSSL=false&nullCatalogMeansCurrent=true&serverTimezone=GMT%2B8
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
ysdp:
|
||||||
|
username: root
|
||||||
|
password: enix
|
||||||
|
url: jdbc:mysql://127.0.0.1:3306/juntech_ysdp?useUnicode=true&characterEncoding=utf-8&useSSL=false&nullCatalogMeansCurrent=true&serverTimezone=GMT%2B8
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# driver-class-name: com.p6spy.engine.spy.P6SpyDriver
|
# driver-class-name: com.p6spy.engine.spy.P6SpyDriver
|
||||||
|
|
||||||
#oracle database settings
|
#oracle database settings
|
||||||
|
|
@ -167,6 +175,18 @@ knife4j:
|
||||||
setting:
|
setting:
|
||||||
language: zh_cn
|
language: zh_cn
|
||||||
|
|
||||||
|
# 数据中心 API 配置
|
||||||
|
# 注意:鉴权信息(hw-id、app-key)已硬编码在 ApiAuthConfig.java 中
|
||||||
|
# 原因:YAML 对特殊字符(如 #、$、%)的解析可能有问题,直接硬编码可以避免此类问题
|
||||||
|
datacenter:
|
||||||
|
api:
|
||||||
|
url: http://roma.gpaas.shmetro.com/pro-data-admin/apiData/getData
|
||||||
|
api-key: c21ec9750d5b4033adac0335e3638aca
|
||||||
|
connect-timeout: 30000
|
||||||
|
read-timeout: 60000
|
||||||
|
page-size: 100
|
||||||
|
|
||||||
|
|
||||||
#cas服务端的地址
|
#cas服务端的地址
|
||||||
cas:
|
cas:
|
||||||
server-url-prefix: https://www.cainiao.com:8443/cas
|
server-url-prefix: https://www.cainiao.com:8443/cas
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
# active: dev
|
||||||
#active: prod
|
active: prod
|
||||||
##############################################
|
##############################################
|
||||||
#
|
#
|
||||||
# thymeleaf静态资源配置
|
# thymeleaf静态资源配置
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ VITE_APP_ENV = 'development'
|
||||||
VITE_APP_API= '/api'
|
VITE_APP_API= '/api'
|
||||||
|
|
||||||
#页面基础路径
|
#页面基础路径
|
||||||
VITE_APP_BASE= 'http://localhost:8082'
|
VITE_APP_BASE= 'http://localhost:8082/juntech-ysdp'
|
||||||
|
|
||||||
#单点登录设置
|
#单点登录设置
|
||||||
VITE_APP_SSO_LOGIN = 'false'
|
VITE_APP_SSO_LOGIN = 'false'
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ VITE_APP_API=
|
||||||
#Jeeplus快速开发平台/后台地址, 使用多租户时,相对地址,解决跨域问题。
|
#Jeeplus快速开发平台/后台地址, 使用多租户时,相对地址,解决跨域问题。
|
||||||
#VITE_APP_BASE= '/api'
|
#VITE_APP_BASE= '/api'
|
||||||
#VITE_APP_BASE = 'http://192.168.16.193:8888/juntech-ysdp'
|
#VITE_APP_BASE = 'http://192.168.16.193:8888/juntech-ysdp'
|
||||||
VITE_APP_BASE = 'http://10.104.10.151:8888/juntech-ysdp'
|
VITE_APP_BASE = '/juntech-ysdp'
|
||||||
|
|
||||||
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
||||||
VITE_BUILD_COMPRESS = gzip
|
VITE_BUILD_COMPRESS = gzip
|
||||||
|
|
|
||||||
BIN
fe/dist.zip
BIN
fe/dist.zip
Binary file not shown.
|
|
@ -4,7 +4,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "set NODE_OPTIONS=–max_old_space_size=8096 && yarn pre-build",
|
"build": "node --max-old-space-size=8192 ./node_modules/vite/bin/vite.js build",
|
||||||
"pre-build": "increase-memory-limit && vite build",
|
"pre-build": "increase-memory-limit && vite build",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue