Commit 5b25a1ff authored by 史志龙's avatar 史志龙

道岔检查解析--shizhilong

parent f5869112
......@@ -274,7 +274,7 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC
if (str.contains("道岔编号")) {
//截取最后一个:号之后的字符串并去除首位空格
switchCode = str.substring(str.indexOf("道岔编号") + 5).trim();
} else if(str.contains("道岔号数")){
} else if (str.contains("道岔号数")) {
switchCodeNum = str.substring(str.indexOf("道岔号数") + 5).trim();
} else if (str.contains("备注")) {
sort = sort + 1;
......@@ -295,17 +295,25 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC
model.setSort(sort);
recordsMasterTurnoutInfoList.add(model);
} else if (str.equals("轨距")) {
this.uploadTrackGauge(recordsMasterTurnoutInfoList, i, realname, rowRecords, id, "1", switchCode,switchCodeNum);
this.uploadTrackGauge(recordsMasterTurnoutInfoList, i, realname, rowRecords, id, "1", switchCode, switchCodeNum);
} else if (str.equals("水平")) {
this.uploadTrackGauge(recordsMasterTurnoutInfoList, i, realname, rowRecords, id, "2", switchCode,switchCodeNum);
this.uploadTrackGauge(recordsMasterTurnoutInfoList, i, realname, rowRecords, id, "2", switchCode, switchCodeNum);
} else if (str.equals("支距")) {
//获取支距下一行的数据
List<Object> offsetList = rowRecords.get(i + 1);
this.uploadOffset(recordsMasterTurnoutInfoList, offsetList, realname, id, switchCode,switchCodeNum);
this.uploadOffset(recordsMasterTurnoutInfoList, offsetList, realname, id, switchCode, switchCodeNum);
} else if (str.equals("轮缘槽")) {
//获取支距下两行的数据
List<Object> flangeList = rowRecords.get(i + 2);
this.uploadFlange(recordsMasterTurnoutInfoList, flangeList, realname, id, switchCode,switchCodeNum);
this.uploadFlange(recordsMasterTurnoutInfoList, flangeList, realname, id, switchCode, switchCodeNum);
} else if (str.equals("2.1")) {
this.uploadSwitchPlate(recordsMasterTurnoutInfoList, list, realname, id, "5",switchCode, switchCodeNum);
} else if (str.equals("2.2")) {
this.uploadSwitchPlate(recordsMasterTurnoutInfoList, list, realname, id, "6",switchCode, switchCodeNum);
} else if (str.equals("3.1")) {
this.uploadSwitchPlate(recordsMasterTurnoutInfoList, list, realname, id, "7",switchCode, switchCodeNum);
} else if (str.equals("3.2")) {
this.uploadSwitchPlate(recordsMasterTurnoutInfoList, list, realname, id, "8",switchCode, switchCodeNum);
} else {
if (i != rowRecords.size() - 1) {
continue;
......@@ -315,15 +323,7 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC
}
}
}
// else if (str.equals("2.1")) {
// this.uploadSwitchPlate(recordsMasterTurnoutInfoList,list,realname,id,"5");
// }else if (str.equals("2.2")) {
// this.uploadSwitchPlate(recordsMasterTurnoutInfoList,list,realname,id,"6");
// }else if (str.equals("3.1")) {
// this.uploadSwitchPlate(recordsMasterTurnoutInfoList,list,realname,id,"7");
// }else if (str.equals("3.2")) {
// this.uploadSwitchPlate(recordsMasterTurnoutInfoList,list,realname,id,"8");
// }
//维护道岔使用情况检查数据表
if (recordsMasterTurnoutInfoList != null && recordsMasterTurnoutInfoList.size() > 0) {
recordsMasterTurnoutInfoService.saveBatch(recordsMasterTurnoutInfoList);
......@@ -544,6 +544,40 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC
recordsMasterCorrWaveList.add(model);
}
/**
* 处理滑床板部分
*
* @param recordsMasterTurnoutInfoList
* @param list
* @param realname
* @param id
*/
public void uploadSwitchPlate(List<RecordsMasterTurnoutInfo> recordsMasterTurnoutInfoList, List<Object> list, String realname, String id, String type,String switchCode, String switchCodeNum) {
String str1 = list.get(1).toString().trim();
String[] n = str1.split("þ");
String s = n[0];
String s1 = n[1];
RecordsMasterTurnoutInfo model = new RecordsMasterTurnoutInfo();
model.setId(IdWorker.get32UUID());
model.setDelFlag("0");
model.setRecordsMasterId(id);
model.setSwitchCodeNum(switchCodeNum);
model.setSwitchCode(switchCode);
model.setCreateTime(new Date());
model.setUpdateTime(new Date());
model.setCreateBy(realname);
model.setUpdateBy(realname);
model.setType(type);
if (s.contains("不合格")) {
model.setQualified("2");
String noQualifiedRemark = "";
noQualifiedRemark = s1.substring(s1.indexOf("不合格说明") + 6).trim();
model.setNoQualifiedRemark(noQualifiedRemark);
} else {
model.setQualified("1");
}
recordsMasterTurnoutInfoList.add(model);
}
/**
* 处理轮缘槽部分
......@@ -553,7 +587,7 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC
* @param realname
* @param id
*/
public void uploadFlange(List<RecordsMasterTurnoutInfo> recordsMasterTurnoutInfoList, List<Object> list, String realname, String id, String switchCode,String switchCodeNum) {
public void uploadFlange(List<RecordsMasterTurnoutInfo> recordsMasterTurnoutInfoList, List<Object> list, String realname, String id, String switchCode, String switchCodeNum) {
RecordsMasterTurnoutInfo model = new RecordsMasterTurnoutInfo();
model.setId(IdWorker.get32UUID());
model.setDelFlag("0");
......@@ -626,7 +660,7 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC
* @param realname
* @param id
*/
public void uploadOffset(List<RecordsMasterTurnoutInfo> recordsMasterTurnoutInfoList, List<Object> offsetList, String realname, String id, String switchCode,String switchCodeNum) {
public void uploadOffset(List<RecordsMasterTurnoutInfo> recordsMasterTurnoutInfoList, List<Object> offsetList, String realname, String id, String switchCode, String switchCodeNum) {
RecordsMasterTurnoutInfo model = new RecordsMasterTurnoutInfo();
model.setId(IdWorker.get32UUID());
model.setDelFlag("0");
......@@ -684,7 +718,7 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC
* @param id 主表id
* @param type 导入子类型
*/
public void uploadTrackGauge(List<RecordsMasterTurnoutInfo> recordsMasterTurnoutInfoList, int i, String realname, List<List<Object>> rowRecords, String id, String type, String switchCode,String switchCodeNum) {
public void uploadTrackGauge(List<RecordsMasterTurnoutInfo> recordsMasterTurnoutInfoList, int i, String realname, List<List<Object>> rowRecords, String id, String type, String switchCode, String switchCodeNum) {
//初始化公里总结报告表
RecordsMasterTurnoutInfo model = new RecordsMasterTurnoutInfo();
model.setId(IdWorker.get32UUID());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment