系统更新

This commit is contained in:
马三炮 2025-08-11 15:58:32 +08:00
parent 9d46f884bc
commit 7ae9d8e8a2
3 changed files with 106 additions and 33 deletions

View File

@ -408,11 +408,11 @@ public class GetBasicData {
logBean.setEvent_detection_content(data + logContentArrayArray[3].trim() + data2 + logContentArrayArray[4].trim());
logBean.setPower_work_title(logContentArrayArray[6]);
logBean.setPower_work_content(data + logContentArrayArray[7]);
logBean.setResource_check_title("开展县公司应急车辆及应急物资储备情况核查");
logBean.setResource_check_title("开展本部资源核查工作");
logBean.setResource_check_content(data + checkContentArrayArray[num]);
logBean.setCommunications_test_title("今日开展通信测试1项,均正常");
logBean.setCommunications_test_title("今日开展通信测试1项");
logBean.setCommunications_test_content(logContentArrayArray[11]);
logBean.setDaily_operation_title("今日开展日常操练1次");
logBean.setDaily_operation_title("今日开展队伍操练核查1项");
logBean.setDaily_operation_content(logContentArrayArray[13]);
logBean.setDaily_submission_title(logContentArrayArray[15]);
logBean.setDaily_submission_content(data + logContentArrayArray[16]);
@ -464,11 +464,11 @@ public class GetBasicData {
logBean.setEvent_detection_content(data + logContentArrayArray[3].trim() + data2 + logContentArrayArray[4].trim());
logBean.setPower_work_title(logContentArrayArray[6]);
logBean.setPower_work_content(data + logContentArrayArray[7]);
logBean.setResource_check_title("开展县公司应急车辆及应急物资储备情况核查");
logBean.setResource_check_title("开展本部资源核查工作");
logBean.setResource_check_content(data + checkContentArrayArray[num]);
logBean.setCommunications_test_title("今日开展通信测试1项,均正常");
logBean.setCommunications_test_title("今日开展通信测试1项");
logBean.setCommunications_test_content(logContentArrayArray[11]);
logBean.setDaily_operation_title("今日开展日常操练1次");
logBean.setDaily_operation_title("今日开展队伍操练核查1项");
logBean.setDaily_operation_content(logContentArrayArray[13]);
logBean.setDaily_submission_title(logContentArrayArray[15]);
logBean.setDaily_submission_content(data + logContentArrayArray[16]);
@ -622,15 +622,16 @@ public class GetBasicData {
dailyBean.getTwoBean().setVerification_team_num("8");
dailyBean.getTwoBean().setVerification_equip_num("501");
insertData(dailyBean, null, type);
logBean.setEvent_detection_content(data + logContentArrayArray[3].trim() + data2 + logContentArrayArray[4].trim());
logBean.setPower_work_title(logContentArrayArray[6]);
logBean.setPower_work_content(data + logContentArrayArray[7]);
logBean.setResource_check_title("开展县公司应急车辆及应急物资储备情况核查");
logBean.setResource_check_title("开展本部资源核查工作");
logBean.setResource_check_content(data + logContentArrayArray[9]);
logBean.setCommunications_test_title("今日开展通信测试1项,均正常");
logBean.setCommunications_test_title("今日开展通信测试1项");
logBean.setCommunications_test_content(logContentArrayArray[11]);
logBean.setDaily_operation_title("今日开展日常操练1次");
logBean.setDaily_operation_title("今日开展队伍操练核查1项");
logBean.setDaily_operation_content(logContentArrayArray[13]);
logBean.setDaily_submission_title(logContentArrayArray[15]);
logBean.setDaily_submission_content(data + logContentArrayArray[16]);

View File

@ -160,18 +160,36 @@ public class AutoMain {
WebElement wegl = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/div[1]/div[6]/div/div/div[6]/span/span" +
"/div"));
action.moveToElement(wegl).build().perform();
Thread.sleep(300);
Thread.sleep(2000);
//获取管理标签中的aria-describedby属性
String attributeId = wegl.getAttribute("aria-describedby");
log.info("管理标签的ID值为" + attributeId);
Thread.sleep(300);
Thread.sleep(2000);
//执行鼠标悬停动作-常态值班
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[4]";
WebElement wectzb = webDriver.findElement(By.xpath(ctzbXpath));
action.moveToElement(wectzb).build().perform();
//判断是否有相应的元素
try {
Thread.sleep(2000);
//执行鼠标悬停动作-常态值班
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[4]";
WebElement wectzb = webDriver.findElement(By.xpath(ctzbXpath));
action.moveToElement(wectzb).build().perform();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
//判断是否有相应的元素
try {
Thread.sleep(2000);
//执行鼠标悬停动作-常态值班
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div/div[4]/div";
WebElement wectzb = webDriver.findElement(By.xpath(ctzbXpath));
action.moveToElement(wectzb).build().perform();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
Thread.sleep(300);
@ -211,9 +229,23 @@ public class AutoMain {
//获取管理标签中的aria-describedby属性 el-popover-7909
String attributeId = wegl.getAttribute("aria-describedby");
log.info("管理标签的ID值为" + attributeId);
Thread.sleep(300);
String zbglXpath = "//*[@id=\"" + attributeId + "\"]/div/div/div[2]/div[3]";
webDriver.findElement(By.xpath(zbglXpath)).click();
//判断是否有相应的元素
try {
Thread.sleep(2000);
String zbglXpath = "//*[@id=\"" + attributeId + "\"]/div/div/div[2]/div[3]";
webDriver.findElement(By.xpath(zbglXpath)).click();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
//判断是否有相应的元素
try {
Thread.sleep(2000);
String zbglXpath = "//*[@id=\"" + attributeId + "\"]/div/div/div/div[3]/div";
webDriver.findElement(By.xpath(zbglXpath)).click();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
log.info("打开预警页面------------");
Thread.sleep(800);
@ -240,7 +272,7 @@ public class AutoMain {
//获取管理标签中的aria-describedby属性 el-popover-7909
String attributeId = wegl.getAttribute("aria-describedby");
log.info("管理标签的ID值为" + attributeId);
Thread.sleep(300);
Thread.sleep(2000);
// //执行鼠标悬停动作-预警行动
@ -267,7 +299,8 @@ public class AutoMain {
/**
* 打开检查操练管理页面,并定位到日常操练的iframe
*/
private void openCheckTheDrills() throws InterruptedException {
private void
openCheckTheDrills() throws InterruptedException {
try {
webDriver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);
} catch (Exception e) {
@ -279,16 +312,29 @@ public class AutoMain {
WebElement wegl = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/div[1]/div[6]/div/div/div[6]/span/span" +
"/div"));
action.moveToElement(wegl).build().perform();
Thread.sleep(300);
Thread.sleep(2000);
//获取管理标签中的aria-describedby属性
String attributeId = wegl.getAttribute("aria-describedby");
log.info("管理标签的ID值为" + attributeId);
Thread.sleep(300);
Thread.sleep(2000);
//执行鼠标悬停动作-检查操练管理
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[5]";
webDriver.findElement(By.xpath(ctzbXpath)).click();
//判断是否有相应的元素
try {
Thread.sleep(2000);
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[5]";
webDriver.findElement(By.xpath(ctzbXpath)).click();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
try {
Thread.sleep(2000);
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div/div/div[5]/div";
webDriver.findElement(By.xpath(ctzbXpath)).click();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
// WebElement wectzb = webDriver.findElement(By.xpath(ctzbXpath));
// action.moveToElement(wectzb).build().perform();
Thread.sleep(300);
@ -343,18 +389,32 @@ public class AutoMain {
WebElement wegl = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/div[1]/div[6]/div/div/div[6]/span/span" +
"/div"));
action.moveToElement(wegl).build().perform();
Thread.sleep(300);
Thread.sleep(2000);
//获取管理标签中的aria-describedby属性
String attributeId = wegl.getAttribute("aria-describedby");
log.info("管理标签的ID值为" + attributeId);
Thread.sleep(300);
//执行鼠标悬停动作-检查操练管理
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[5]";
webDriver.findElement(By.xpath(ctzbXpath)).click();
// WebElement wectzb =
// action.moveToElement(wectzb).build().perform();
//判断是否有相应的元素
try {
Thread.sleep(2000);
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[5]";
webDriver.findElement(By.xpath(ctzbXpath)).click();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
//判断是否有相应的元素
try {
Thread.sleep(2000);
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div/div/div[5]/div";
webDriver.findElement(By.xpath(ctzbXpath)).click();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
Thread.sleep(300);
// //打开检查计划页面

View File

@ -37,7 +37,7 @@ public class DutyLogIOp {
*
* @param type 1 2晚
*/
public void openDutyLog(int type) throws Exception {
public void openDutyLog(int type) throws Exception {
if (type == 1) {
//早上填写前一天的日志,将标签改为前一天
changeDay();
@ -49,11 +49,23 @@ public class DutyLogIOp {
Thread.sleep(5000);
// /html/body/div[2] 弹窗 您没有填写值班日志的排班班次
try {
//定位写日志标签打开日志页面
webDriver.findElement(By.xpath("//*[@id=\"pane-5\"]/div/div[2]/div[2]/button")).click();
log.info("定位写日志标签,打开日志页面----------/div/div[2]/div[2]/button");
Thread.sleep(1500);
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
try {
//定位写日志标签打开日志页面
webDriver.findElement(By.xpath("//*[@id=\"pane-5\"]/div/div[2]/div[2]/button/span")).click();
log.info("定位写日志标签,打开日志页面----------");
Thread.sleep(1500);
} catch (Exception e) {
log.info("无确认框,在时间范围内----------/div/div[2]/div[2]/button/span");
}
//定位写日志标签打开日志页面
webDriver.findElement(By.xpath("//*[@id=\"pane-5\"]/div/div[2]/div[2]/button")).click();
log.info("定位写日志标签,打开日志页面----------");
Thread.sleep(1500);
//退出当前iframe,进入到日报编辑iframe