From 0bb0575106f0c48b805f66439071d8261f6ee590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=B8=89=E7=82=AE?= <15856818120@163.com> Date: Thu, 20 Mar 2025 10:29:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9java=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=BAclass=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bonus/autoweb/GetBasicData.java | 453 +++- src/main/java/com/bonus/autoweb/TestMain.java | 768 +++--- .../autoweb/UI/entity/AnnexEightBean.java | 2 +- .../bonus/autoweb/UI/entity/WeatherData.java | 117 + .../bonus/autoweb/UI/frame/DailyAction.java | 2406 ++--------------- .../com/bonus/autoweb/UI/frame/LogAction.java | 2 +- .../java/com/bonus/autoweb/base/AutoMain.java | 181 +- .../com/bonus/autoweb/base/DataConfig.java | 40 +- .../bonus/autoweb/base/DutyChangeShifts.java | 26 +- .../com/bonus/autoweb/base/DutyClock.java | 40 +- .../bonus/autoweb/base/DutyDailyCheck.java | 6 +- .../com/bonus/autoweb/base/DutyDailyOp.java | 19 +- .../com/bonus/autoweb/base/DutyLogIOp.java | 211 +- .../com/bonus/autoweb/task/AutoWebTask.java | 374 +-- src/main/resources/META-INF/MANIFEST.MF | 3 + 15 files changed, 1359 insertions(+), 3289 deletions(-) create mode 100644 src/main/java/com/bonus/autoweb/UI/entity/WeatherData.java create mode 100644 src/main/resources/META-INF/MANIFEST.MF diff --git a/src/main/java/com/bonus/autoweb/GetBasicData.java b/src/main/java/com/bonus/autoweb/GetBasicData.java index 1e85798..9eeb773 100644 --- a/src/main/java/com/bonus/autoweb/GetBasicData.java +++ b/src/main/java/com/bonus/autoweb/GetBasicData.java @@ -2,9 +2,6 @@ package com.bonus.autoweb; import com.bonus.autoweb.UI.entity.DailyBean; import com.bonus.autoweb.UI.entity.LogBean; -import com.bonus.autoweb.UI.frame.StringHelper; -import com.bonus.autoweb.base.AutoMain; -import com.bonus.autoweb.base.AutoUtils; import com.bonus.autoweb.base.DataConfig; import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver; @@ -14,17 +11,17 @@ import org.openqa.selenium.WebElement; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.activation.DataHandler; import java.io.*; import java.nio.charset.Charset; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.*; - -import static java.lang.Integer.parseInt; +import java.util.Date; +import java.util.HashSet; +import java.util.Random; +import java.util.Set; /** - * 项目名称: autoWebForGuoYang + * 项目名称: autoWebForSuZhou * 文件名称: getBasicData * 文件描述: @Description: 定时获取新一代应急系统内的数据 * 创建人: @author tqzhang @@ -38,6 +35,8 @@ public class GetBasicData { this.webDriver = webDriver; } + int num; + /** * 解决乱码问题 * @@ -72,23 +71,36 @@ public class GetBasicData { * @author tqzhang * @data 2024/01/16 */ - public static void getYuJingActionBasicData(int classes) throws ParseException, InterruptedException { + public void getYuJingActionBasicData(int classes) throws ParseException, InterruptedException { Thread.sleep(5000); -// webDriver.findElement(By.xpath("//*[@id=\"app\"]/section/header/form/div/div[2]/button[1]")).click(); -// Thread.sleep(300); -// String date1 = DateTimeUtils.getLastDayYYYYMMDD() + " 00:00"; -// String date2 = DateTimeUtils.getLastDayYYYYMMDD() + " 23:59"; + //点击按钮 展示查询选项 + webDriver.findElement(By.xpath("//*[@id=\"app\"]/section/header/form/div/div[2]/button[1]")).click(); + Thread.sleep(300); + //设置时间段 + String date1 = DateTimeUtils.getCurrentDay() + " 00:00"; + String date2 = DateTimeUtils.getCurrentDay() + " 23:59"; // if (classes == 2) { // date1 = DateTimeUtils.getCurrentDay() + " 00:00"; // date2 = DateTimeUtils.getCurrentDay() + " 23:59"; // } -// webDriver.findElement(By.xpath("//*[@id=\"app\"]/section/header/form/div/div[1]/div[3]/div[1]/div/div/div/input[1]")).sendKeys(date1); -// Thread.sleep(300); -// webDriver.findElement(By.xpath("//*[@id=\"app\"]/section/header/form/div/div[1]/div[3]/div[1]/div/div/div/input[2]")).sendKeys(date2); -// Thread.sleep(300); -// webDriver.findElement(By.xpath("//*[@id=\"app\"]/section/header/form/div/div[2]/button[2]")).click(); -// Thread.sleep(1000); -// WebElement numEle = webDriver.findElement(By.xpath("//*[@id=\"tab-已完工\"]/div/span")); + //将时间放入时间框 + webDriver.findElement(By.xpath("//*[@id=\"app\"]/section/header/form/div/div[1]/div[3]/div[1]/div/div/div/input[1]")).sendKeys(date1); + Thread.sleep(300); + webDriver.findElement(By.xpath("//*[@id=\"app\"]/section/header/form/div/div[1]/div[3]/div[1]/div/div/div/input[2]")).sendKeys(date2); + Thread.sleep(300); + //点击搜索按钮 搜索当天的数据 + webDriver.findElement(By.xpath("//*[@id=\"app\"]/section/header/form/div/div[2]/button[2]")).click(); + Thread.sleep(1000); + //获取已完工的数量 + WebElement numEle = webDriver.findElement(By.xpath("//*[@id=\"tab-已完工\"]/div/span")); + //如果数量等于0 过滤 + if (Integer.parseInt(numEle.getText()) > 0) { + //对人员进行塞值为0 + } else { + //获取 + } + + DailyBean dailyBean = readDailyBean("morning_daily"); DailyBean dailyBean2 = readDailyBean("evening_daily"); LogBean logBean = readDutyBean(); @@ -310,7 +322,7 @@ public class GetBasicData { //判断是否有发布数据 WebElement numClasses = webDriver.findElement(By.xpath("//*[@id=\"tab-3\"]/div/span")); if ("0".equals(numClasses.getText())) { - code = "利辛县未发布预警,"; + code = "泗县未发布预警,"; } else { WebElement weatherEle = webDriver.findElement(By.xpath("/html/body/div[1]/div/section/main/div[1]/div[2]/div[1]/section/main/div/div[3]/table/tbody/tr[1]/td[6]/div/div")); Thread.sleep(300); @@ -330,7 +342,7 @@ public class GetBasicData { Date date1 = inputFormat.parse(endTime); SimpleDateFormat outputFormat = new SimpleDateFormat("MM月dd日"); - code = "利辛县供电公司发布" + weatherEle.getText() + "预警1项,"; + code = "泗县供电公司发布" + weatherEle.getText() + "预警1项,"; } log.info("code:" + code); @@ -339,8 +351,10 @@ public class GetBasicData { LogBean logBean = readDutyBean(); String dailyContent = resolveGarbledCode("E:\\bns\\config\\日报基本信息.txt"); String logContent = resolveGarbledCode("E:\\bns\\config\\日志基本信息.txt"); + String videoContent = resolveGarbledCode("D:\\bns\\config\\变电站名称.txt"); String[] dailyContentArrayArray = dailyContent.split("--头部不可修改--"); String[] logContentArrayArray = logContent.split("--头部不可修改--"); + String[] videoContentArrayArray = videoContent.split("--头部不可修改--"); log.info("dailyContent:" + dailyContent); log.info("logContent:" + logContent); log.info("logContentArrayArray[18]:" + logContentArrayArray[18]); @@ -360,15 +374,15 @@ public class GetBasicData { //一、总体情况 dailyBean.setOverall(data + dailyContentArrayArray[2].trim()); - dailyBean.setWarning_company(code + dailyContentArrayArray[18]); + dailyBean.setWarning_company(code + dailyContentArrayArray[19]); } else { data = data2 + "07:00至" + data2 + "18:00,"; dailyBean2.setOverall(data + dailyContentArrayArray[2].trim()); - dailyBean2.setWarning_company(code + dailyContentArrayArray[18]); + dailyBean2.setWarning_company(code + dailyContentArrayArray[19]); } - logBean.setWarning_disposal_title("利辛县未发布预警,".equals(code) ? "今日预警情况" : "预警一项"); + logBean.setWarning_disposal_title("泗县未发布预警,".equals(code) ? "今日预警情况" : "预警一项"); logBean.setWarning_disposal_content(logData + code + logContentArrayArray[20]); insertData(null, logBean, "log"); log.info("天气预警日志更新完成"); @@ -379,7 +393,7 @@ public class GetBasicData { log.info("天气预警日报更新完成"); } - public void getCaoLianBasicData(int classes) throws InterruptedException, ParseException { + public void getCaoLianBasicData(int classes) throws InterruptedException, ParseException, IOException { Thread.sleep(5000); DailyBean dailyBean = readDailyBean("morning_daily"); DailyBean dailyBean2 = readDailyBean("evening_daily"); @@ -387,21 +401,66 @@ public class GetBasicData { String dailyContent = resolveGarbledCode("E:\\bns\\config\\日报基本信息.txt"); String checkContent = resolveGarbledCode("E:\\bns\\config\\资源核查情况.txt"); String logContent = resolveGarbledCode("E:\\bns\\config\\日志基本信息.txt"); - String videoContent = resolveGarbledCode("E:\\bns\\config\\变电站名称.txt"); + String videoContent = resolveGarbledCode("E:\\bns\\config\\供电所名称.txt"); String[] dailyContentArrayArray = dailyContent.split("--头部不可修改--"); String[] logContentArrayArray = logContent.split("--头部不可修改--"); String[] checkContentArrayArray = checkContent.split("资源核查情况:"); String[] videoContentArrayArray = videoContent.split("--头部不可修改--"); -// log.info("读取本地模板数据成功"); + log.info("读取本地模板数据成功"); + + +// OkHttpClient client = new OkHttpClient().newBuilder() +// .connectTimeout(180, TimeUnit.SECONDS) +// .readTimeout(180, TimeUnit.SECONDS) +// .writeTimeout(180, TimeUnit.SECONDS) +// .build(); +// + String dataUrl = DataConfig.weatherUrl + DateTimeUtils.getCurrentDay(); +// log.info("dataUrl:" + dataUrl); +// Request request = new Request.Builder() +// .url(dataUrl) +// .get() +// .build(); +// Response response; +// String result; +// String city; +// String weatherNoon; +// String weatherNight; +// String minTemperature; +// String maxTemperature; +// try { +// response = client.newCall(request).execute(); +// log.info("response:" + response); +// result = response.body().string(); +// log.info("result:" + result); +// Gson gson = new Gson(); +// WeatherData weatherData = gson.fromJson(result, WeatherData.class); +// log.info("------weatherData:" + weatherData); +// WeatherData.WeatherDataChild weatherDataChild = weatherData.getData(); +// log.info("------weatherDataChild:" + weatherDataChild); +// city = weatherDataChild.getCity(); +// log.info("city:" + city); +// weatherNoon = weatherDataChild.getWeatherNoon(); +// log.info("weatherNoon:" + weatherNoon); +// weatherNight = weatherDataChild.getWeatherNight(); +// log.info("weatherNight:" + weatherNight); +// minTemperature = weatherDataChild.getMinTemperature(); +// log.info("minTemperature:" + minTemperature); +// maxTemperature = weatherDataChild.getMaxTemperature(); +// log.info("maxTemperature:" + maxTemperature); +// } catch (IOException e) { +// throw new IOException("天气get请求失败", e); +// } + //昨天的日期 String data1 = DateTimeUtils.getLastDay(); -// log.info("昨天的日期:" + data1); + log.info("昨天的日期:" + data1); //今天的日期 String data2 = DateTimeUtils.getCurrentDay2(); -// log.info("今天的日期:" + data2); + log.info("今天的日期:" + data2); //明天的日期 String data3 = DateTimeUtils.getTomorrowDate(); -// log.info("明天的日期:" + data2); + log.info("明天的日期:" + data2); //日志时间 String logData = data2 + "08:15至" + data3 + "8:15,"; /** @@ -425,6 +484,124 @@ public class GetBasicData { } else { time = DateTimeUtils.getCurrentDay(); } + +// webDriver.findElement(By.xpath("/html/body/div/div/header/form/div[4]/div/button[1]")).click(); +// Thread.sleep(800); +// webDriver.findElement(By.xpath("/html/body/div[1]/div/header/form/div[6]/div/div/input[1]")).sendKeys(DateTimeUtils.getCurrentDay()); +// Thread.sleep(800); +// webDriver.findElement(By.xpath("/html/body/div[1]/div/header/form/div[6]/div/div/input[2]")).sendKeys(DateTimeUtils.getCurrentDay()); +// Thread.sleep(800); +// webDriver.findElement(By.xpath("/html/body/div[1]/div/header/form/div[8]/div/button[2]")).click(); +// Thread.sleep(2000); +// int i = 1; +// while (tf) { +// Thread.sleep(10000); +// WebElement numberEle = webDriver.findElement(By.xpath("/html/body/div[1]/div/main/div/div/footer/span")); +// log.info("numberEle:" + numberEle.getText()); +//// String num = numberEle.getText().substring(2, 3); +// String num1 = numberEle.getText().substring(2, numberEle.getText().length()); +// String num = num1.substring(0, num1.length() - 2); +// log.info("num:" + num); +// if ("0".equals(num)) { +// tf = false; +// } else { +// WebElement timeEle; +//// if ("1".equals(num)) { +//// timeEle = webDriver.findElement(By.xpath("/html/body/div/div/main/div/div/div[2]/div/div[3]/table/tbody/tr/td[8]/div")); +//// } else { +// timeEle = webDriver.findElement(By.xpath("/html/body/div[1]/div/main/div/div/div[2]/div/div[3" + +// "]/table/tbody/tr[" + i + "]/td[8]/div")); +//// } +// +// System.out.println(timeEle.getText()); +// if (time.equals(timeEle.getText())) { +// //操练环节 -通信测试 日常操练 +// WebElement drillSessionEle; +//// if ("1".equals(num)) { +//// drillSessionEle = webDriver.findElement(By.xpath("/html/body/div/div/main/div/div/div[2]/div/div[3]/table/tbody/tr/td[6]/div")); +//// } else { +// drillSessionEle = webDriver.findElement(By.xpath("/html/body/div[1]/div/main/div/div/div[2" + +// "]/div/div[3]/table/tbody/tr[" + i + "]/td[6]/div")); +//// } +// log.info("操练环节:" + drillSessionEle.getText()); +// //供电公司 +// WebElement powerSupplyCompaniesEle; +//// if ("1".equals(num)) { +//// powerSupplyCompaniesEle = webDriver.findElement(By.xpath("/html/body/div/div/main/div/div/div[2]/div/div[3]/table/tbody/tr/td[5]/div")); +//// } else { +// powerSupplyCompaniesEle = webDriver.findElement(By.xpath("/html/body/div[1]/div/main/div/div" + +// "/div[2]/div/div[3]/table/tbody/tr[" + i + "]/td[5]/div")); +//// } +// log.info("供电公司:" + powerSupplyCompaniesEle.getText()); +// if ("通信测试".equals(drillSessionEle.getText())) { +// communicationTestNum++; +// communicationTestName1 += getDailyName(powerSupplyCompaniesEle.getText()) + "、"; +// } else if ("重要站线视频连线检查".equals(drillSessionEle.getText())) { +// dailyExercisesNum++; +//// dailyExercisesName1 += powerSupplyCompaniesEle.getText().substring(0, powerSupplyCompaniesEle.getText().length() - 4) + "、"; +// dailyExercisesName1 += getDailyName(powerSupplyCompaniesEle.getText()) + "、"; +// } else { +// dailyExercisesNum++; +//// dailyExercisesName2 += powerSupplyCompaniesEle.getText().substring(0, powerSupplyCompaniesEle.getText().length() - 4) + "、"; +// WebElement ele = webDriver.findElement(By.xpath("/html/body/div[1]/div/main/div/div/div[2" + +// "]/div/div[3]/table/tbody/tr[" + i + "]/td[7]/div")); +// if ("物资".equals(ele.getText())) +// materialName += getDailyName(powerSupplyCompaniesEle.getText()) + "、"; +// if ("车辆".equals(ele.getText())) +// carName += getDailyName(powerSupplyCompaniesEle.getText()) + "、"; +// if ("队伍".equals(ele.getText())) +// contingentName += getDailyName(powerSupplyCompaniesEle.getText()) + "、"; +// dailyExercisesName2 += getDailyName(powerSupplyCompaniesEle.getText()) + "、"; +// } +// int x = parseInt(num); +// if (i == parseInt(num)) { +// tf = false; +// } +// i++; +// } else { +// tf = false; +// } +// } +// } +// log.info("communicationTestName1:" + communicationTestName1); +// if (communicationTestNum > 0) { +// communicationTestName = "今日市公司本部对所属" + communicationTestNum + "家县公司(" + communicationTestName1.substring(0, communicationTestName1.length() - 1) + ")进行通信测试"; +// } else { +// communicationTestName = "今日市公司本部对所属县公司无通信测试"; +// } +// if (dailyExercisesName1.length() > 0) { +// dailyExercisesName1 = dailyExercisesName1.substring(0, dailyExercisesName1.length() - 1); +// } +// if (dailyExercisesName2.length() > 0) { +// dailyExercisesName2 = dailyExercisesName2.substring(0, dailyExercisesName2.length() - 1); +// } +// String fourElementVerification = ""; +// if (materialName.length() > 0) { +// materialName = materialName.substring(0, materialName.length() - 1); +// fourElementVerification += materialName + "公司四要素物资核查、"; +// } +// if (carName.length() > 0) { +// carName = carName.substring(0, carName.length() - 1); +// fourElementVerification += carName + "公司四要素车辆核查、"; +// } +// if (contingentName.length() > 0) { +// contingentName = contingentName.substring(0, contingentName.length() - 1); +// fourElementVerification += contingentName + "公司四要素队伍核查、"; +// } +// if (dailyExercisesName1.length() > 0 && dailyExercisesName2.length() > 0) { +// dailyExercisesName = "今日市公司本部对所属" + dailyExercisesNum + "家县公司进行日常操练(" + fourElementVerification + dailyExercisesName1 + "公司重要站连线检查)"; +// } else if (dailyExercisesName1.length() == 0 && dailyExercisesName2.length() > 0) { +// dailyExercisesName = "今日市公司本部对所属" + dailyExercisesNum + "家县公司进行日常操练(" + fourElementVerification + ")"; +// } else if (dailyExercisesName1.length() > 0 && fourElementVerification.length() == 0) { +// dailyExercisesName = "今日市公司本部对所属" + dailyExercisesNum + "家县公司进行日常操练(" + dailyExercisesName1 + "公司重要站连线检查)"; +// } else { +// dailyExercisesName = "今日市公司本部对所属" + dailyExercisesNum + "家县公司进行日常操练"; +// } +//// dailyExercisesName = "今日市公司本部对所属" + 0 + "家县公司进行日常操练"; +// log.info("communicationTestName:" + communicationTestName); +// log.info("dailyExercisesName:" + dailyExercisesName); +// log.info("communicationTestNum:" + communicationTestNum); +// log.info("dailyExercisesNum:" + dailyExercisesNum); String type = ""; Random rand = new Random(); Set generated = new HashSet<>(); @@ -433,15 +610,15 @@ public class GetBasicData { // As we're adding to a set, this will automatically do a containment check generated.add(next); } - StringBuilder video = new StringBuilder(); - for (Integer integer : generated) { - video.append(videoContentArrayArray[integer]).append("、"); - } +// StringBuilder video = new StringBuilder(); +// for (Integer integer : generated) { +// video.append(videoContentArrayArray[integer]).append("、"); +// } if (classes == 1) { type = "morning_daily"; //早报 boolean t = true; - int num = getRandom(0, 10); + num = getRandom(1, 11); String data = data2 + "18:00至" + data3 + "07:00,"; //二、重要事项 @@ -449,8 +626,8 @@ public class GetBasicData { //三、安全生产情况 dailyBean.setSafety_production(data + dailyContentArrayArray[6].trim()); //四、值班员日常工作情况 - dailyBean.setPersonnel_daily_work(data + dailyContentArrayArray[8].trim() + "(5)资源核查情况:" + checkContentArrayArray[num].trim() - + "(6)检查"+video+"视频显示清晰,无异常情况(7)09:00-11:00,值班人员视频轮询供电所值班情况。"); + + dailyBean.setPersonnel_daily_work(data + dailyContentArrayArray[8].replace("@@@@@", videoContentArrayArray[num].trim())); //五、供电保障情况 //(一)今日重大活动保电情况 dailyBean.setPower_guarantee_today_work(dailyContentArrayArray[11]); @@ -476,58 +653,57 @@ public class GetBasicData { insertData(dailyBean, null, type); -// log.info("日报数据更新完成"); + log.info("日报数据更新完成"); //事件监测内容 - logBean.setEvent_detection_content(logData + logContentArrayArray[3].trim()); logBean.setEvent_detection_title(logContentArrayArray[2].trim()); -// logBean.setEvent_detection_content(data + logContentArrayArray[3].trim() + data2 + logContentArrayArray[4].trim()); + logBean.setEvent_detection_content(logData + logContentArrayArray[3].trim()); logBean.setPower_work_title(logContentArrayArray[5]); logBean.setPower_work_content(logData + logContentArrayArray[6]); logBean.setResource_check_title(logContentArrayArray[8]); - logBean.setResource_check_content(logData + logContentArrayArray[9]); - logBean.setCommunications_test_title(logContentArrayArray[10]); - logBean.setCommunications_test_content(logContentArrayArray[11]); - logBean.setDaily_operation_title(logContentArrayArray[13]); - logBean.setDaily_operation_content(logContentArrayArray[14]); - logBean.setDaily_submission_title(logContentArrayArray[16]); - logBean.setDaily_submission_content(logData + logContentArrayArray[17]); - logBean.setGeneral_chronicles_title(logContentArrayArray[21]); - logBean.setGeneral_chronicles_content(logContentArrayArray[22]); + logBean.setResource_check_content(logData + logContentArrayArray[9].replace("@@@@@", videoContentArrayArray[num].trim())); + logBean.setCommunications_test_title(logContentArrayArray[11]); + logBean.setCommunications_test_content(logData + logContentArrayArray[12].replace("@@@@@", videoContentArrayArray[num].trim())); + logBean.setDaily_operation_title(logContentArrayArray[14]); + logBean.setDaily_operation_content(logData + logContentArrayArray[15]); + logBean.setDaily_submission_title(logContentArrayArray[17]); + logBean.setDaily_submission_content(logData + logContentArrayArray[18]); + logBean.setGeneral_chronicles_title(logContentArrayArray[22]); + logBean.setGeneral_chronicles_content(logContentArrayArray[23]); insertData(null, logBean, "log"); log.info("日志数据更新完成"); - log.info("日报数据:{}", dailyBean); - log.info("日志数据:{}", logBean); + log.info("日报数据:" + dailyBean); + log.info("日志数据:" + logBean); } else { type = "evening_daily"; //晚报 boolean t = true; - int num = getRandom(1, 3); +// int num = getRandom(1, 11); String data = data2 + "07:00至" + data2 + "18:00,"; //一、总体情况 // dailyBean2.setOverall(data + dailyContentArrayArray[2].trim() + data2 + "17:30," + dailyContentArrayArray[3].trim()); //二、重要事项 - dailyBean2.setImportant_matters(data + dailyContentArrayArray[4].trim()); + dailyBean.setImportant_matters(data + dailyContentArrayArray[4].trim()); //三、安全生产情况 - dailyBean2.setSafety_production(data + dailyContentArrayArray[6].trim()); + dailyBean.setSafety_production(data + dailyContentArrayArray[6].trim()); //四、值班员日常工作情况 - dailyBean2.setPersonnel_daily_work(data + dailyContentArrayArray[8].trim() + "(5)资源核查情况:" + checkContentArrayArray[num].trim() - + "(6)检查"+video+"视频显示清晰,无异常情况(7)09:00-11:00,值班人员视频轮询供电所值班情况。"); + + dailyBean.setPersonnel_daily_work(data + dailyContentArrayArray[8].replace("@@@@@", videoContentArrayArray[num].trim())); //五、供电保障情况 //(一)今日重大活动保电情况 - dailyBean2.setPower_guarantee_today_work(dailyContentArrayArray[11]); + dailyBean.setPower_guarantee_today_work(dailyContentArrayArray[11]); //(二)明日重大活动保电安排 - dailyBean2.setPower_guarantee_tomorrow_work(dailyContentArrayArray[13]); + dailyBean.setPower_guarantee_tomorrow_work(dailyContentArrayArray[13]); //(三)今日疫情防控应急保电情况 - dailyBean2.setPower_guarantee_today_pestilence(dailyContentArrayArray[15]); + dailyBean.setPower_guarantee_today_pestilence(dailyContentArrayArray[15]); //六、预警及应急响应情况 //(一)公司预警情况 --另外一个方法使用 //(二)公司应急响应情况 - dailyBean2.setWarning_company_impatient(data + dailyContentArrayArray[20]); + dailyBean.setWarning_company_impatient(data + dailyContentArrayArray[20]); //(三)社会突发事件救援及处置情况 - dailyBean2.setWarning_society_emergency(data + dailyContentArrayArray[22]); + dailyBean.setWarning_society_emergency(data + dailyContentArrayArray[22]); //七、其他情况说明 - dailyBean2.setOther_situations(data + dailyContentArrayArray[24]); + dailyBean.setOther_situations(data + dailyContentArrayArray[24]); //附件表一 dailyBean2.getOneBean().setExercise_person_num(getRandom(1, 50) + ""); dailyBean2.getOneBean().setExercise_vehicle_num(getRandom(1, 20) + ""); @@ -537,23 +713,27 @@ public class GetBasicData { insertData(dailyBean2, null, type); -// log.info("日报数据更新完成"); - logBean.setEvent_detection_title(logContentArrayArray[2].trim()); + log.info("日报数据更新完成"); //事件监测内容 + logBean.setEvent_detection_title(logContentArrayArray[2].trim()); logBean.setEvent_detection_content(logData + logContentArrayArray[3].trim()); -// logBean.setEvent_detection_content(data + logContentArrayArray[3].trim() + data2 + logContentArrayArray[4].trim()); logBean.setPower_work_title(logContentArrayArray[5]); logBean.setPower_work_content(logData + logContentArrayArray[6]); logBean.setResource_check_title(logContentArrayArray[8]); - logBean.setResource_check_content(logData + checkContentArrayArray[num]); - logBean.setCommunications_test_title(logContentArrayArray[10]); - logBean.setCommunications_test_content(logContentArrayArray[11]); - logBean.setDaily_operation_title(logContentArrayArray[13]); - logBean.setDaily_operation_content(logContentArrayArray[14]); - logBean.setDaily_submission_title(logContentArrayArray[16]); - logBean.setDaily_submission_content(logData + logContentArrayArray[17]); + logBean.setResource_check_content(logData + logContentArrayArray[9].replace("@@@@@", videoContentArrayArray[num].trim())); + logBean.setCommunications_test_title(logContentArrayArray[11]); + logBean.setCommunications_test_content(logData + logContentArrayArray[12].replace("@@@@@", videoContentArrayArray[num].trim())); + logBean.setDaily_operation_title(logContentArrayArray[14]); + logBean.setDaily_operation_content(logData + logContentArrayArray[15]); + logBean.setDaily_submission_title(logContentArrayArray[17]); + logBean.setDaily_submission_content(logData + logContentArrayArray[18]); logBean.setGeneral_chronicles_title(logContentArrayArray[22]); logBean.setGeneral_chronicles_content(logContentArrayArray[23]); + +// logBean.setWeather(weatherNight); +// logBean.setMax_temperature(maxTemperature); +// logBean.setMin_temperature(minTemperature); + insertData(null, logBean, "log"); } } @@ -650,6 +830,77 @@ public class GetBasicData { public static void main(String[] args) throws ParseException, InterruptedException { + int num = getRandom(1, 11); + DailyBean dailyBean = readDailyBean("morning_daily"); + LogBean logBean = readDutyBean(); + String dailyContent = resolveGarbledCode("D:\\config\\日报基本信息.txt"); + String checkContent = resolveGarbledCode("D:\\config\\资源核查情况.txt"); + String logContent = resolveGarbledCode("D:\\config\\日志基本信息.txt"); + String videoContent = resolveGarbledCode("D:\\config\\供电所名称.txt"); + String[] dailyContentArrayArray = dailyContent.split("--头部不可修改--"); + String[] logContentArrayArray = logContent.split("--头部不可修改--"); + String[] checkContentArrayArray = checkContent.split("资源核查情况:"); + String[] videoContentArrayArray = videoContent.split("--头部不可修改--"); + //昨天的日期 + String data1 = DateTimeUtils.getLastDay(); + //今天的日期 + String data2 = DateTimeUtils.getCurrentDay2(); + //明天的日期 + String data3 = DateTimeUtils.getTomorrowDate(); + //日志时间 + String logData = data2 + "08:30至" + data3 + "8:30,"; + String data = data2 + "17:30至" + data3 + "08:30,"; + + String type = "morning_daily"; + + //二、重要事项 + dailyBean.setImportant_matters(data + dailyContentArrayArray[4].trim()); + //三、安全生产情况 + dailyBean.setSafety_production(data + dailyContentArrayArray[6].trim()); + //四、值班员日常工作情况 + + dailyBean.setPersonnel_daily_work(data + dailyContentArrayArray[8].replace("@@@@@", videoContentArrayArray[num].trim())); + //五、供电保障情况 + //(一)今日重大活动保电情况 + dailyBean.setPower_guarantee_today_work(dailyContentArrayArray[11]); + //(二)明日重大活动保电安排 + dailyBean.setPower_guarantee_tomorrow_work(dailyContentArrayArray[13]); + //(三)今日疫情防控应急保电情况 + dailyBean.setPower_guarantee_today_pestilence(dailyContentArrayArray[15]); + //六、预警及应急响应情况 + //(一)公司预警情况 --另外一个方法使用 + + //(二)公司应急响应情况 + dailyBean.setWarning_company_impatient(data + dailyContentArrayArray[20]); + //(三)社会突发事件救援及处置情况 + dailyBean.setWarning_society_emergency(data + dailyContentArrayArray[22]); + //七、其他情况说明 + dailyBean.setOther_situations(data + dailyContentArrayArray[24]); + //附件表一 + dailyBean.getOneBean().setExercise_person_num(getRandom(1, 50) + ""); + dailyBean.getOneBean().setExercise_vehicle_num(getRandom(1, 20) + ""); + dailyBean.getOneBean().setExercise_power_vehicle_num(getRandom(1, 3) + ""); + dailyBean.getOneBean().setExercise_dynamo_num(getRandom(1, 10) + ""); + dailyBean.getOneBean().setExercise_find_problems("0"); + + insertData(dailyBean, null, type); + + //事件监测内容 + logBean.setEvent_detection_title(logContentArrayArray[2].trim()); + logBean.setEvent_detection_content(logData + logContentArrayArray[3].trim()); + logBean.setPower_work_title(logContentArrayArray[5]); + logBean.setPower_work_content(logData + logContentArrayArray[6]); + logBean.setResource_check_title(logContentArrayArray[8]); + logBean.setResource_check_content(logData + logContentArrayArray[9].replace("@@@@@", videoContentArrayArray[num].trim())); + logBean.setCommunications_test_title(logContentArrayArray[11]); + logBean.setCommunications_test_content(logData + logContentArrayArray[12].replace("@@@@@", videoContentArrayArray[num].trim())); + logBean.setDaily_operation_title(logContentArrayArray[14]); + logBean.setDaily_operation_content(logData + logContentArrayArray[15]); + logBean.setDaily_submission_title(logContentArrayArray[17]); + logBean.setDaily_submission_content(logData + logContentArrayArray[18]); + logBean.setGeneral_chronicles_title(logContentArrayArray[22]); + logBean.setGeneral_chronicles_content(logContentArrayArray[23]); + insertData(null, logBean, "log"); } private String getDailyName(String text) { @@ -867,14 +1118,15 @@ public class GetBasicData { // Thread.sleep(500); // projectName = "车辆"; // } -//// int i =getRandom(1,3); -//// webDriver.findElement(By.xpath("/html/body/div[5]/div[1]/div[1]/ul/li[" + i + "]")).click(); -//// log.info("选择操作内容----------"); -//// Thread.sleep(500); -//// if (i == 1) projectName = "队伍"; -//// if (i == 2) projectName = "装备"; -//// if (i == 3) projectName = "车辆"; -//// Thread.sleep(300); + + /// / int i =getRandom(1,3); + /// / webDriver.findElement(By.xpath("/html/body/div[5]/div[1]/div[1]/ul/li[" + i + "]")).click(); + /// / log.info("选择操作内容----------"); + /// / Thread.sleep(500); + /// / if (i == 1) projectName = "队伍"; + /// / if (i == 2) projectName = "装备"; + /// / if (i == 3) projectName = "车辆"; + /// / Thread.sleep(300); // } // //选择被检查单位 // webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/div/div")).click(); @@ -895,7 +1147,6 @@ public class GetBasicData { // // return projectName; // } - public void addExercisePlan(String type, String company, int code) throws InterruptedException { Thread.sleep(3000); //添加计划 @@ -916,20 +1167,17 @@ public class GetBasicData { // } } - private void executePlan(String type, String company, String projectName,int code) throws InterruptedException { - Thread.sleep(5000); - webDriver.findElement(By.xpath("//*[@id=\"pane-sec\"]/section/header/form/div[1]/div[8]/div/div/button[2]")).click(); - Thread.sleep(10000); + private void executePlan(String type, String company, String projectName, int code) throws InterruptedException { + Thread.sleep(2000); String checkContent = resolveGarbledCode("E:\\bns\\config\\检查计划评价.txt"); String[] checkContentArrayArray = checkContent.split("检查评价:"); //勾选计划 - webDriver.findElement(By.xpath("//*[@id=\"pane-sec\"]/section/main/section/main/div/div[3]/table/tbody/tr[1]")).click(); + webDriver.findElement(By.xpath("/html/body/div[1]/section/div[1]/div[2]/div[2]/section/main/section/main/div/div[3]/table/tbody/tr[1]")).click(); Thread.sleep(800); //点击执行按钮--打开选择被检查对象 webDriver.findElement(By.xpath("/html/body/div[1]/section/div[1]/div[2]/div[2]/section/main/section/header/button[4]")).click(); Thread.sleep(2000); - webDriver.switchTo().defaultContent(); // 退出第一个同级 iframe WebElement body = webDriver.findElement(By.tagName("body")); // 定位主文档的 body 元素 WebElement dutyIframe = body.findElement(By.id("plancheck-to-rccl")); @@ -938,7 +1186,11 @@ public class GetBasicData { Thread.sleep(1500); //填写项目评价 String appraise = ""; - if("日常操练".equals(type)){ + webDriver.findElement(By.xpath("/html/body/div[1]/section/main/section/header/div/div/div")).click(); + Thread.sleep(1000); + webDriver.findElement(By.xpath("/html/body/div[2]/div[1]/div[1]/ul/li")).click(); + Thread.sleep(1000); + if ("日常操练".equals(type)) { if (code > 1){ if (code == 2){ //装备 @@ -957,18 +1209,16 @@ public class GetBasicData { webDriver.findElement(By.xpath("/html/body/div/section/main/header/div/div[1]/div/div/div/div[4]")).click(); appraise = checkContentArrayArray[3].trim(); } - - - }else{ - webDriver.findElement(By.xpath("/html/body/div/section/main/header/div/div[1]/div/div/div/div[3]")).click(); + } else { appraise = checkContentArrayArray[4].trim(); + webDriver.findElement(By.xpath("/html/body/div/section/main/header/div/div[1]/div/div/div/div[3]")).click(); } Thread.sleep(800); //填写发现的问题 webDriver.findElement(By.xpath("/html/body/div/section/main/section/form/div[2]/div[1]/div/div/textarea")).sendKeys("未发现问题"); Thread.sleep(500); //填写项目评分 - webDriver.findElement(By.xpath("/html/body/div/section/main/section/form/div[3]/div[1]/div/div/div/input")).sendKeys(getRandom(95, 100) + ""); + webDriver.findElement(By.xpath("/html/body/div/section/main/section/form/div[3]/div[1]/div/div/div/input")).sendKeys(getRandom(90, 97) + ""); Thread.sleep(500); log.info("appraise:" + appraise); @@ -1036,12 +1286,13 @@ public class GetBasicData { "/button[1]")).click(); Thread.sleep(2000); //填写主题 - if("通信测试".equals(type)){ - webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/section/header/form/div/div[1]/div/div[2]/div[1" + - "]/input")).sendKeys("对"+company+"公司开展通信测试"); - }else { - webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/section/header/form/div/div[1]/div/div[2]/div[1" + - "]/input")).sendKeys("对"+company+"公司开展日常操练"); + if ("通信测试".equals(type)) { + //"/html/body/div[4]/div/div[2]/section/header/form/div/div[1]/div/div[2]/div[1]/input" + webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/section/header/form/div/div[1]/div/div[2" + + "]/div[1]/input")).sendKeys("日常通信测试"); + } else { + webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/section/header/form/div/div[1]/div/div[2" + + "]/div[1]/input")).sendKeys("日常队伍检查"); } Thread.sleep(500); //选择操练环节 @@ -1066,12 +1317,12 @@ public class GetBasicData { webDriver.findElement(By.xpath("/html/body/div[6]/div[1]/div/div/div[1]/div[1]/span[2]")).click(); log.info("选择被检查单位----------"); Thread.sleep(3000); - Thread.sleep(2000); //提交 try { webDriver.findElement(By.xpath("/html/body/div[4]/div/div[2]/section/div/button[3]")).click(); } catch (Exception e) { webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/section/div/button[3]")).click(); } + Thread.sleep(3000); } } diff --git a/src/main/java/com/bonus/autoweb/TestMain.java b/src/main/java/com/bonus/autoweb/TestMain.java index e6c1b41..3a9f673 100644 --- a/src/main/java/com/bonus/autoweb/TestMain.java +++ b/src/main/java/com/bonus/autoweb/TestMain.java @@ -1,27 +1,27 @@ package com.bonus.autoweb; -import com.bonus.autoweb.base.AutoUtils; +import com.bonus.autoweb.UI.entity.WeatherData; import com.bonus.autoweb.base.DataConfig; import com.bonus.autoweb.task.AutoWebTask; +import com.google.gson.Gson; import com.jacob.activeX.ActiveXComponent; import com.jacob.com.ComFailException; import com.jacob.com.Dispatch; import com.jacob.com.Variant; import lombok.SneakyThrows; -import org.apache.poi.ss.usermodel.Cell; -import org.apache.poi.ss.usermodel.Row; -import org.apache.poi.ss.usermodel.Sheet; -import org.apache.poi.ss.usermodel.Workbook; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; -import org.openqa.selenium.By; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.awt.image.DataBufferFloat; import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.text.ParseException; -import java.util.*; +import java.util.Date; +import java.util.Random; +import java.util.concurrent.TimeUnit; import javax.sound.sampled.*; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; @@ -31,17 +31,15 @@ import javax.sound.sampled.AudioSystem; * @author 24526 */ public class TestMain { + private static Logger log = LoggerFactory.getLogger(TestMain.class); public static void main(String[] args) throws Exception { log.info("执行任务开始。。。。。。"); +// testWeather(); // testqd(); -// testjjb(); -// testGetData(); -// testAccounters(); // testDailrb(); -// testRCCL(); -// testLog(); +// start("工作人员请注意,桌号8001顾客正在寻求帮助!!"); new Thread(new Runnable() { @SneakyThrows @Override @@ -54,102 +52,97 @@ public class TestMain { } } }).start(); +// testqd(); +// testRCCL(); +// testGetData(); } - private static void testAccounters() { - try { - AutoWebTask autoWebTask = new AutoWebTask(); - String content = GetBasicData.resolveGarbledCode("E:\\bns\\config\\值班账号.txt"); - // 应急值班账号 - String emergencyPerson = content.toString().split(";")[0].split(":")[1]; - String emergencyPersonPassword = content.toString().split(";")[1].split(":")[1]; - autoWebTask.changeTodayPersonaTask(1,emergencyPerson,emergencyPersonPassword); - //TODO 昨日的账号在今日的签退任务完成后,拿取今天的打卡人员数据放入昨日值班账号txt即可 - - } catch (IOException e) { - e.printStackTrace(); - } - } - - - private static void testQt() { - try { - AutoWebTask autoWebTask = new AutoWebTask(); - String content = GetBasicData.resolveGarbledCode("E:\\bns\\config\\值班账号.txt"); - // 应急值班账号 - String emergencyPerson = content.toString().split(";")[0].split(":")[1]; - String emergencyPersonPassword = content.toString().split(";")[1].split(":")[1]; - autoWebTask.changeTodayPersonaTask(1,emergencyPerson,emergencyPersonPassword); - // TODO 更新昨日签退人员账号 - String value = GetBasicData.resolveGarbledCode("D\\bns\\config\\今日值班账号.txt"); - AutoUtils.write("E:\\bns\\config\\昨日值班账号.txt", value.replaceAll("今日","昨日")); - - } catch (IOException e) { - e.printStackTrace(); - } - } - - //签到签退测试 - private static void testqd() { - String content = GetBasicData.resolveGarbledCode("E:\\bns\\config\\account.txt"); - String date = content.toString().split(";")[0].split(":")[1]; - String num = content.toString().split(";")[1].split(":")[1]; - if("1".equals(num)){ - log.info("xgd,yj签到签退任务"); - }else { - log.info("zkj,zh签到签退任务"); - } -// AutoWebTask autoWebTask = new AutoWebTask(); -// autoWebTask.dutyClockTask(2); - } - - //交接班测试 - private static void testjjb() { - AutoWebTask autoWebTask = new AutoWebTask(); - autoWebTask.dutyChangeTask1(2,DataConfig.USER_NAME1,DataConfig.PASS1); - } private static void testRCCL() throws InterruptedException { AutoWebTask autoWebTask = new AutoWebTask(); - String content = GetBasicData.resolveGarbledCode("E:\\bns\\config\\值班账号.txt"); - // 应急值班账号 - String emergencyPerson = content.toString().split(";")[0].split(":")[1]; - String emergencyPersonPassword = content.toString().split(";")[1].split(":")[1]; -// autoWebTask.addExercisePlan("通信测试", "", 1, emergencyPerson, -// emergencyPersonPassword); -// Thread.sleep(5000); -// autoWebTask.addExercisePlan("日常操练", "", 1, emergencyPerson, -// emergencyPersonPassword); -// Thread.sleep(5000); -// autoWebTask.addExercisePlan("日常操练", "", 2, emergencyPerson, -// emergencyPersonPassword); -// Thread.sleep(5000); - autoWebTask.addExercisePlan("日常操练", "", 2, emergencyPerson, - emergencyPersonPassword); + Thread.sleep(2000); +// autoWebTask.addExercisePlan("日常操练", "", 1, DataConfig.USER_NAME1, +// DataConfig.PASS1); +// autoWebTask.addExercisePlan("通信测试", "", 0, DataConfig.USER_NAME1, +// DataConfig.PASS1); +// Thread.sleep(1000); + autoWebTask.addExercisePlan("通信测试", "", 1, DataConfig.USER_NAME1, DataConfig.PASS1); + Thread.sleep(1000); +// autoWebTask.addExercisePlan("日常操练", "", 3, DataConfig.USER_NAME1, +// DataConfig.PASS1); +// Thread.sleep(2000); // autoWebTask.addExercisePlan("日常操练", "", 0, emergencyPerson, emergencyPersonPassword); // Thread.sleep(2000); } - //自动获取数据测试 + /** + * 自动获取数据测试 + * @throws ParseException 获取数据异常 + * @throws InterruptedException 线程等待异常 + */ private static void testGetData() throws ParseException, InterruptedException { AutoWebTask autoWebTask = new AutoWebTask(); - String content = GetBasicData.resolveGarbledCode("E:\\bns\\config\\值班账号.txt"); - // 应急值班账号 - String emergencyPerson = content.toString().split(";")[0].split(":")[1]; - String emergencyPersonPassword = content.toString().split(";")[1].split(":")[1]; - Thread.sleep(2000); - autoWebTask.getYuJingData(1,emergencyPerson,emergencyPersonPassword); - Thread.sleep(2000); - autoWebTask.getCaoLianData(1,emergencyPerson,emergencyPersonPassword); - Thread.sleep(2000); -// GetBasicData.getYuJingActionBasicData(1); -//登录操作---杨军账号 -// autoWebTask.addExercisePlan("日常操练","灵璧",5,DataConfig.USER_NAME3,DataConfig.PASS3); // Thread.sleep(2000); -// autoWebTask.addExercisePlan("日常操练","城郊",6,DataConfig.USER_NAME3,DataConfig.PASS3); -//// Thread.sleep(2000); -// autoWebTask.addExercisePlan("日常操练","砀山",3,DataConfig.USER_NAME3,DataConfig.PASS3); -// autoWebTask.addExercisePlan("通信测试","城郊",6,DataConfig.USER_NAME3,DataConfig.PASS3); +// autoWebTask.getYuJingData(1); + Thread.sleep(2000); + autoWebTask.getCaoLianData(1); + Thread.sleep(2000); + } + + + //签到签退测试 + private static void testWeather() throws InterruptedException, IOException { + OkHttpClient client = new OkHttpClient().newBuilder() + .connectTimeout(180, TimeUnit.SECONDS) + .readTimeout(180, TimeUnit.SECONDS) + .writeTimeout(180, TimeUnit.SECONDS) + .build(); + + String dataUrl = DataConfig.weatherUrl; + log.info("dataUrl:" + dataUrl); + Request request = new Request.Builder() + .url(dataUrl) + .get() + .build(); + Response response; + String result; + try { + response = client.newCall(request).execute(); + log.info("response:" + response); + result = response.body().string(); + log.info("result:" + result); + Gson gson = new Gson(); + WeatherData weatherData = gson.fromJson(result, WeatherData.class); + log.info("------weatherData:" + weatherData); + WeatherData.WeatherDataChild weatherDataChild = weatherData.getData(); + log.info("------weatherDataChild:" + weatherDataChild); + String city = weatherDataChild.getCity(); + log.info("city:"+city); + String weatherNoon = weatherDataChild.getWeatherNoon(); + log.info("weatherNoon:"+weatherNoon); + String weatherNight = weatherDataChild.getWeatherNight(); + log.info("weatherNight:"+weatherNight); + String minTemperature = weatherDataChild.getMinTemperature(); + log.info("minTemperature:"+minTemperature); + String maxTemperature = weatherDataChild.getMaxTemperature(); + log.info("maxTemperature:"+maxTemperature); + } catch (IOException e) { + throw new IOException("天气get请求失败", e); + } + } + + + //签到签退测试 + private static void testqd() { + AutoWebTask autoWebTask = new AutoWebTask(); + autoWebTask.testLogin(2); + } + + + //交接班测试 + private static void testjjb() { + AutoWebTask autoWebTask = new AutoWebTask(); + autoWebTask.dutyChangeTask(2); } //日报填写测试 @@ -158,13 +151,9 @@ public class TestMain { //操作日报 //日报审核工作 AutoWebTask autoWebTask = new AutoWebTask(); - String todayContent = GetBasicData.resolveGarbledCode("E:\\bns\\config\\今日值班账号.txt"); - //今日签到值班人员 - String todaySignInLeaderPerson = todayContent.toString().split(";")[0].split(":")[1]; - String todaySignInLeaderPersonPassword = todayContent.toString().split(";")[1].split(":")[1]; - Thread.sleep(2000); - autoWebTask.dutyAddDailyLogsTask(2,todaySignInLeaderPerson,todaySignInLeaderPersonPassword); + autoWebTask.dutyAddDailyLogsTask(2); Thread.sleep(1000); + } catch (Exception e) { e.printStackTrace(); } @@ -176,13 +165,7 @@ public class TestMain { try { //操作日志 AutoWebTask autoWebTask = new AutoWebTask(); - String yesterdayContent = GetBasicData.resolveGarbledCode("E:\\bns\\config\\昨日值班账号.txt"); - - String yesterdayLeaderSignOutPerson = yesterdayContent.toString().split(";")[0].split(":")[1]; - String yesterdayLeaderSignOutPersonPassword = yesterdayContent.toString().split(";")[1].split(":")[1]; - // 应急值班账号 - Thread.sleep(2000); - autoWebTask.dutyAddLogsTask(1,yesterdayLeaderSignOutPerson,yesterdayLeaderSignOutPersonPassword); + autoWebTask.dutyAddLogsTask(2); count = 1; Thread.sleep(1000); log.info("count",count); @@ -199,55 +182,27 @@ public class TestMain { * * @throws Exception */ - private void autoJob() throws InterruptedException, IOException { + private void autoJob() throws InterruptedException { AutoWebTask autoWebTask = new AutoWebTask(); - int logGatherCount = 0; int dailyGatherCount = 0; int logGatherCount1 = 0; int dailyGatherCount1 = 0; - int signInzao = 0; int signInzao2 = 0; + int signInwan = 0; + int signInwan2 = 0; int dailyzao = 0; int dailywan = 0; int jjbzao = 0; - int jjbzao2 = 0; + int jjbwan = 0; int signOutzao = 0; int signOutzao2 = 0; + int signOutwan = 0; + int signOutwan2 = 0; int logzao = 0; - int resetCode = 0; - - int changeTodayPerson = 0; - + int logwan = 0; int addExercisePlan = 0; - - boolean initializationCode = true; - - if(initializationCode){ - String content = GetBasicData.resolveGarbledCode("E:\\bns\\config\\值班账号.txt"); - // 应急值班账号 - String emergencyPerson = content.toString().split(";")[0].split(":")[1]; - String emergencyPersonPassword = content.toString().split(";")[1].split(":")[1]; - - //TODO 更新今日 - try { - if (changeTodayPerson == 0){ - changeTodayPerson = autoWebTask.changeTodayPersonaTask(1,emergencyPerson,emergencyPersonPassword); - } - } catch (IOException e) { - log.error("更新早上打卡人员", e); - } - - - initializationCode = false; - } - - - - - - while (true) { //延迟30s---120s int time = randNum(30, 120); @@ -258,240 +213,316 @@ public class TestMain { log.error("时间", e); } log.info("服务正在运行。。。" + new Date()); - String content = GetBasicData.resolveGarbledCode("E:\\bns\\config\\值班账号.txt"); - String todayContent = GetBasicData.resolveGarbledCode("E:\\bns\\config\\今日值班账号.txt"); - String yesterdayContent = GetBasicData.resolveGarbledCode("E:\\bns\\config\\昨日值班账号.txt"); - // 应急值班账号 - String emergencyPerson = content.toString().split(";")[0].split(":")[1]; - String emergencyPersonPassword = content.toString().split(";")[1].split(":")[1]; - - //今日签到值班人员 - String todaySignInLeaderPerson = todayContent.toString().split(";")[0].split(":")[1]; - String todaySignInLeaderPersonPassword = todayContent.toString().split(";")[1].split(":")[1]; - String todaySignInPerson = todayContent.toString().split(";")[2].split(":")[1]; - String todaySignInPersonPassword = todayContent.toString().split(";")[3].split(":")[1]; - //昨日签退人员 - String yesterdayLeaderSignOutPerson = yesterdayContent.toString().split(";")[0].split(":")[1]; - String yesterdayLeaderSignOutPersonPassword = yesterdayContent.toString().split(";")[1].split(":")[1]; - String yesterdaySignOutPerson = yesterdayContent.toString().split(";")[2].split(":")[1]; - String yesterdaySignOutPersonPassword = yesterdayContent.toString().split(";")[3].split(":")[1]; - - if(DateTimeUtils.isEffectiveDate("18:22", "18:55")){ - //进行日报信息系统采集及获取工作 - try { - if (logGatherCount == 0){ - logGatherCount = autoWebTask.getYuJingData(1,emergencyPerson,emergencyPersonPassword); - } - Thread.sleep(3000); - if (dailyGatherCount == 0){ - dailyGatherCount = autoWebTask.getCaoLianData(1,emergencyPerson,emergencyPersonPassword); - Thread.sleep(2000); - } - }catch (Exception e) { - log.error("信息采集工作", e); + //判断当前时间是否在早上7:30到8点之间 + if(DateTimeUtils.isEffectiveDate("07:00", "07:15")){ + //延迟100s + if (signInzao == 0 && signInzao2 == 0){ + getTime(550); } - }else if (DateTimeUtils.isEffectiveDate("05:00", "05:30")) { - //TODO 更新今日 - try { - if (changeTodayPerson == 0){ - changeTodayPerson = autoWebTask.changeTodayPersonaTask(1,emergencyPerson,emergencyPersonPassword); - } - } catch (IOException e) { - log.error("更新早上打卡人员", e); - } - }else if (DateTimeUtils.isEffectiveDate("06:29", "06:59")) { - //自动完成当值值班日报(早报)填写上报 - if (dailyzao == 0) { - getTime(600); + if (signInzao == 0) { + log.info("房万春账号开始打卡任务---------------------"); + //使用房万春账号签到 try { - dailyzao = autoWebTask.dutyAddDailyLogsTask(1,yesterdayLeaderSignOutPerson,yesterdayLeaderSignOutPersonPassword); - - + signInzao = autoWebTask.dutySigin(1, 1, DataConfig.USER_NAME2, DataConfig.PASS2); + }catch (Exception e){ + log.error("房万春打卡任务", e); + } + } + try { + Thread.sleep(1000 * 2); + } catch (Exception e) { + log.error("打卡任务", e); + } + if (signInzao2 == 0){ + //使用韩宏宇账号签到 + log.info("韩宏宇账号开始打卡任务---------------------"); + try { + signInzao2 = autoWebTask.dutySigin(1, 1, DataConfig.USER_NAME1, DataConfig.PASS1); + }catch (Exception e){ + log.error("韩宏宇打卡任务", e); + } + } + }else if (DateTimeUtils.isEffectiveDate("16:31", "16:45")) {//签到 晚 + if(signInwan == 0 && signInwan2 == 0){ + getTime(550); + } + if (signInwan == 0) { + log.info("房万春账号开始打卡任务---------------------"); + //使用房万春账号签到 + try { + signInwan = autoWebTask.dutySigin(2, 1, DataConfig.USER_NAME2, DataConfig.PASS2); + }catch (Exception e) { + log.error("房万春打卡任务", e); + } + } + try { + Thread.sleep(1000 * 2); + } catch (Exception e) { + log.error("房万春打卡任务", e); + } + if (signInwan2 == 0){ + //使用韩宏宇账号签到 + log.info("韩宏宇账号开始打卡任务---------------------"); + try { + signInwan2 = autoWebTask.dutySigin(2, 1, DataConfig.USER_NAME1, DataConfig.PASS1); + }catch (Exception e) { + log.error("韩宏宇打卡任务", e); + } + } + }else if (DateTimeUtils.isEffectiveDate("06:29", "06:59")) {//日报工作 + if (dailyzao == 0) { + try { + getTime(1000); + dailyzao = autoWebTask.dutyAddDailyLogsTask(1); }catch (Exception e){ log.error("日报工作", e); } } - }else if (DateTimeUtils.isEffectiveDate("07:01", "07:29")) { - //完成值班日志填写提交(晚班日志,此次值班日志为总结前一天晚上的情况) + }else if (DateTimeUtils.isEffectiveDate("07:16", "07:30")) {//日志工作 if (logzao == 0) { - getTime(600); try { - logzao = autoWebTask.dutyAddLogsTask(1,yesterdayLeaderSignOutPerson,yesterdayLeaderSignOutPersonPassword); + getTime(500); + logzao = autoWebTask.dutyAddLogsTask(1); }catch (Exception e){ log.error("日志工作", e); } } - }else if (DateTimeUtils.isEffectiveDate("07:30", "07:59")) { - //自动完成当值值班签到(值班主任、值班人员都要签到) - if ("error".equals(content)) { - log.error("读取打卡人员数据错误"); - }else { - if (signInzao == 0 && signInzao2 == 0){ - getTime(900); - } - if (signInzao == 0) { - log.info("应急值班账号开始打卡任务---------------------"); - //使用应急值班账号签到 - try { - signInzao = autoWebTask.dutySigin(1, 1, todaySignInLeaderPerson, todaySignInLeaderPersonPassword); - - - } catch (Exception e) { - log.error("应急值班打卡任务", e); - } - } - try { - Thread.sleep(1000 * 2); - } catch (Exception e) { - log.error("打卡任务", e); - } - if (signInzao2 == 0) { - //使用其他账号签到 - log.info("其他账号开始打卡任务---------------------"); - try { - signInzao2 = autoWebTask.dutySigin(1, 1,todaySignInPerson , todaySignInPersonPassword); - } catch (Exception e) { - log.error("其他账号打卡任务", e); - } - } - } - }else if (DateTimeUtils.isEffectiveDate("08:00", "08:30")) { - if (jjbzao == 0 && jjbzao2 == 0){ - getTime(600); - } - //自动在系统内完成接班(上一值完成交班后) - if (jjbzao == 0 || jjbzao2 == 0){ - try { - if (jjbzao == 0){ - jjbzao = autoWebTask.dutyChangeTask1(1,yesterdayLeaderSignOutPerson,yesterdayLeaderSignOutPersonPassword); - } - if (jjbzao2 == 0){ - jjbzao2 = autoWebTask.dutyChangeTask2(2,todaySignInLeaderPerson,todaySignInLeaderPersonPassword); - } - }catch (Exception e){ - log.error("接接班任务", e); - } - } - }else if (DateTimeUtils.isEffectiveDate("09:00", "09:20")) { - if(signOutzao == 0 && signOutzao2 == 0){ - getTime(900); - } - //自动在系统内完成签退 - try { - if (signOutzao == 0) { - try { - signOutzao = autoWebTask.dutySignOutTask(1,yesterdayLeaderSignOutPerson,yesterdayLeaderSignOutPersonPassword); - }catch (Exception e){ - log.error("签退",e); - } - } - try { - Thread.sleep(1000 * 3); - } catch (Exception e) { - log.error("时间", e); - } - if (signOutzao2 == 0){ - try { - signOutzao2 = autoWebTask.dutySignOutTask(1, yesterdaySignOutPerson, yesterdaySignOutPersonPassword); - }catch (Exception e){ - log.error("签退",e); - } - } - }catch (Exception e){ - log.error("签退", e); - } - } else if (DateTimeUtils.isEffectiveDate("09:30", "10:00")) { + }else if (DateTimeUtils.isEffectiveDate("09:30", "10:00")) { if(addExercisePlan == 0){ getTime(1200); } if(addExercisePlan == 0) { -// String[] array = {"蒙城","利辛","涡阳"}; -// Random random = new Random(); -// int index = random.nextInt(array.length); -// log.info("随机值为:" + index); -// log.info("随机值为:" + array[index]); Thread.sleep(2000); - addExercisePlan = autoWebTask.addExercisePlan("通信测试", "", 1, todaySignInLeaderPerson, - todaySignInLeaderPersonPassword); + addExercisePlan = autoWebTask.addExercisePlan("通信测试", "", 1, DataConfig.USER_NAME1, DataConfig.PASS1); Thread.sleep(1000 * 700); - addExercisePlan = autoWebTask.addExercisePlan("日常操练", "", 1, todaySignInLeaderPerson, - todaySignInLeaderPersonPassword); - Thread.sleep(1000 * 700); - addExercisePlan = autoWebTask.addExercisePlan("日常操练", "", 2, todaySignInLeaderPerson, - todaySignInLeaderPersonPassword); - Thread.sleep(1000 * 700); - addExercisePlan = autoWebTask.addExercisePlan("日常操练", "", 3, todaySignInLeaderPerson, - todaySignInLeaderPersonPassword); + Random rand = new Random(); + int randomNum = rand.nextInt(3) + 1; + addExercisePlan = autoWebTask.addExercisePlan("日常操练", "", randomNum, DataConfig.USER_NAME1, DataConfig.PASS1); Thread.sleep(2000); } - }else if (DateTimeUtils.isEffectiveDate("10:30", "10:35")) { - autoWebTask.changeTodayPersonaTask(1,emergencyPerson,emergencyPersonPassword); - // TODO 更新昨日签退人员账号 - String value = GetBasicData.resolveGarbledCode("E:\\bns\\config\\今日值班账号.txt"); - AutoUtils.write("E:\\bns\\config\\昨日值班账号.txt", value.replaceAll("今日","昨日")); + } else if (DateTimeUtils.isEffectiveDate("17:01", "17:10")) {//日报工作 + if (dailywan == 0) { + try { + getTime(300); + dailywan = autoWebTask.dutyAddDailyLogsTask(2); + }catch (Exception e){ + log.error("日报工作", e); + } + } + } else if (DateTimeUtils.isEffectiveDate("16:16", "16:30")) {//日志工作 + if (logwan == 0) { + try { + getTime(500); + logwan = autoWebTask.dutyAddLogsTask(2); + }catch (Exception e){ + log.error("日志工作", e); + } + } + } else if (DateTimeUtils.isEffectiveDate("08:00", "08:15")) {//交接班早 + if (jjbzao == 0) { + try { + getTime(500); + jjbzao = autoWebTask.dutyChangeTask(1); + }catch (Exception e){ + log.error("交接班早失败",e); + } + } + }else if(DateTimeUtils.isEffectiveDate("08:16", "08:20")){ + if(jjbzao == 0){ + start("值班管理播报提示:交接班未成功"); + }else{ + start("值班管理播报提示:交接班已完成"); + } + }else if (DateTimeUtils.isEffectiveDate("16:46", "17:00")) {//交接班晚 + if (jjbwan == 0) { + try { + getTime(500); + jjbwan = autoWebTask.dutyChangeTask(2); + }catch (Exception e){ + log.error("交接班晚",e); + } + } + }else if (DateTimeUtils.isEffectiveDate("08:45", "09:00")) {//签退 早 + if (signOutzao == 0 && signOutzao2 == 0) { + getTime(450); + } + if (signOutzao == 0) { + try { + signOutzao = autoWebTask.dutySignOutTask(1, DataConfig.USER_NAME1, DataConfig.PASS1); + }catch (Exception e){ + log.error("签退",e); + } + } + try { + Thread.sleep(1000 * 3); + } catch (Exception e) { + log.error("时间", e); + } + if (signOutzao2 == 0){ + try { + signOutzao2 = autoWebTask.dutySignOutTask(1, DataConfig.USER_NAME2, DataConfig.PASS2); + }catch (Exception e){ + log.error("签退",e); + } + } + }else if(DateTimeUtils.isEffectiveDate("09:01", "09:05")){ + try { + String str = "值班管理播报提示:"; + if (signOutzao == 0){ + str += "韩宏宇账号签退失败;"; + } + if (signOutzao2 == 0){ + str += "房万春账号签退失败;"; + } + if(signOutzao == 1 && signOutzao2 == 1){ + str += "签退成功"; + } + start(str); + } catch (Exception e) { + System.out.println("播报错误"); + } + + } else if (DateTimeUtils.isEffectiveDate("17:45", "18:10")) {//签退 晚 + if (signOutwan == 0 && signOutwan2 == 0) { + getTime(600); + } + if (signOutwan == 0) { + try { + signOutwan = autoWebTask.dutySignOutTask(2, DataConfig.USER_NAME1, DataConfig.PASS1); + }catch (Exception e){ + log.error("签退",e); + } + } + try { + Thread.sleep(1000 * 3); + } catch (Exception e) { + log.error("时间", e); + } + if (signOutwan2 == 0) { + try { + signOutwan2 = autoWebTask.dutySignOutTask(2, DataConfig.USER_NAME2, DataConfig.PASS2); + }catch (Exception e){ + log.error("签退",e); + } + } + }else if(DateTimeUtils.isEffectiveDate("18:11", "18:15")){ + try { + String str = "值班管理播报提示:"; + if (signOutwan == 0){ + str += "韩宏宇账号签退失败;"; + } + if (signOutwan2 == 0){ + str += "房万春账号签退失败;"; + } + if(signOutwan == 1 && signOutwan2 == 1){ + str += "签退成功"; + } + start(str); + } catch (Exception e) { + System.out.println("播报错误"); + } + } else if (DateTimeUtils.isEffectiveDate("07:31", "07:35")) { + try { + String str = "值班管理播报提示:"; + if (signInzao == 0){ + str += "房万春账号打卡失败;"; + } + if (signInzao2 == 0){ + str += "韩宏宇账号打卡失败;"; + } + if (dailyzao == 0){ + str += "日报未提交成功;"; + } + if (logzao == 0){ + str += "日志未提交成功;"; + } + if (signInzao == 1 && signInzao2 == 1 && dailyzao == 1 && logzao == 1){ + str += "打卡、日报、日志填写完成"; + } + start(str); + } catch (Exception e) { + System.out.println("播报错误"); + } + } else if (DateTimeUtils.isEffectiveDate("17:13", "17:17")) { + try { + String str = "值班管理播报提示:"; + if (signInwan == 0){ + str += "房万春账号签到失败;"; + } + if (signInwan2 == 0){ + str += "韩宏宇账号签到失败;"; + } + if (dailywan == 0){ + str += "日报未提交成功;"; + } + if (logwan == 0){ + str += "日志未提交成功;"; + } + if(jjbwan == 0){ + start("交接班未成功"); + } + if (signInwan == 1 && signInwan2 == 1 && dailywan == 1 && logwan == 1){ + str += "打卡、日报、日志、交接班填写完成"; + } + start(str); + } catch (Exception e) { + System.out.println("播报错误"); + } }else if (DateTimeUtils.isEffectiveDate("12:30", "14:30")) { //进行日志信息系统采集及获取工作 try { if (logGatherCount1 == 0){ - logGatherCount1= autoWebTask.getYuJingData(2,emergencyPerson,emergencyPersonPassword); + logGatherCount1= autoWebTask.getYuJingData(2); } Thread.sleep(3000); if (dailyGatherCount1 == 0){ - dailyGatherCount1 = autoWebTask.getCaoLianData(2,emergencyPerson,emergencyPersonPassword); + dailyGatherCount1 = autoWebTask.getCaoLianData(2); Thread.sleep(2000); } }catch (Exception e) { log.error("信息采集工作", e); } - }else if (DateTimeUtils.isEffectiveDate("17:01", "17:25")) { - //自动完成当值值班日报(晚报)填写上报 - if (dailywan == 0) { - getTime(1200); - try { - dailywan = autoWebTask.dutyAddDailyLogsTask(2,todaySignInLeaderPerson,todaySignInLeaderPersonPassword); - }catch (Exception e){ - log.error("日报工作", e); + }else if(DateTimeUtils.isEffectiveDate("18:22", "18:55")){ + //进行日报信息系统采集及获取工作 + try { + if (logGatherCount == 0){ + logGatherCount = autoWebTask.getYuJingData(1); } + Thread.sleep(3000); + if (dailyGatherCount == 0){ + dailyGatherCount = autoWebTask.getCaoLianData(1); + Thread.sleep(2000); + } + }catch (Exception e) { + log.error("信息采集工作", e); } - } else if (DateTimeUtils.isEffectiveDate("20:05", "20:08")) {//重置标识 - log.info("-----开始重置各标识符-----"); + }else if (DateTimeUtils.isEffectiveDate("20:05", "20:08")) { + //重置标识 logGatherCount = 0; logGatherCount1 = 0; dailyGatherCount = 0; dailyGatherCount1 = 0; signInzao = 0; signInzao2 = 0; + signInwan = 0; + signInwan2 = 0; dailyzao = 0; dailywan = 0; jjbzao = 0; - jjbzao2 = 0; + jjbwan = 0; signOutzao = 0; signOutzao2 = 0; + signOutwan = 0; + signOutwan2 = 0; logzao = 0; + logwan = 0; addExercisePlan = 0; - changeTodayPerson = 0; } else { continue; } } } - private static List getARandomCollectionOfData() { - Random random = new Random(); - int minCount = 3; // 最小数量 - int maxCount = 5; // 最大数量 - int count = random.nextInt(maxCount - minCount + 1) + minCount; // 随机生成数量 - List numbers = new ArrayList<>(); - while (numbers.size() < count) { - int randomNumber = random.nextInt(6) + 2; // 随机生成2到7的数字 - if (!numbers.contains(randomNumber)) { - numbers.add(randomNumber); - } - } - Collections.shuffle(numbers); - return numbers; - } - private void getTime(int code){ int time = randNum(0, code); log.info("随机时间为:" + time); @@ -513,7 +544,86 @@ public class TestMain { int result = (int) (num1 + Math.random() * (num2 - num1 + 1)); return result; } + + + public static void start(String text) { + log.info("进入播报模式"); + ActiveXComponent ax = null; + try { + ax = new ActiveXComponent("Sapi.SpVoice"); + // 运行时输出语音内容 + Dispatch spVoice = ax.getObject(); + // 音量 0-100 + ax.setProperty("Volume", new Variant(100)); + // 语音朗读速度 -10 到 +10 + ax.setProperty("Rate", new Variant(1)); + // 执行朗读 +// Dispatch.call(spVoice, "Speak", new Variant(text)); + // 下面是构建文件流把生成语音文件 + ax = new ActiveXComponent("Sapi.SpFileStream"); + Dispatch spFileStream = ax.getObject(); + ax = new ActiveXComponent("Sapi.SpAudioFormat"); + Dispatch spAudioFormat = ax.getObject(); + + // 设置音频流格式 + Dispatch.put(spAudioFormat, "Type", new Variant(22)); + // 设置文件输出流格式 + Dispatch.putRef(spFileStream, "Format", spAudioFormat); + // 调用输出 文件流打开方法,创建一个.wav文件 + Dispatch.call(spFileStream, "Open", new Variant("E:\\bns\\audio.wav"), new Variant(3), new Variant(true)); + // 设置声音对象的音频输出流为输出文件对象 + Dispatch.putRef(spVoice, "AudioOutputStream", spFileStream); + // 设置音量 0到100 + Dispatch.put(spVoice, "Volume", new Variant(100)); + // 设置朗读速度 + Dispatch.put(spVoice, "Rate", new Variant(1)); + // 开始朗读 + Dispatch.call(spVoice, "Speak", new Variant(text)); + + // 关闭输出文件 + Dispatch.call(spFileStream, "Close"); + Dispatch.putRef(spVoice, "AudioOutputStream", null); + + spAudioFormat.safeRelease(); + spFileStream.safeRelease(); + spVoice.safeRelease(); + ax.safeRelease(); + showVoice(); + } catch (ComFailException e) { + log.error(e.getMessage(), e); + log.error("没有可用的音频,请连接外接设备(耳机或音箱播放)"); + } catch (Exception e) { + e.printStackTrace(); + log.error("语音播放错误:" + e.getMessage()); + } + } + + public static void showVoice() { + try { + // 获取音频输入流 + AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File("E:\\bns\\audio.wav")); + // 获取音频格式 + AudioFormat audioFormat = audioInputStream.getFormat(); + // 准备数据行格式 + DataLine.Info info = new DataLine.Info(SourceDataLine.class, audioFormat); + // 打开数据行 + SourceDataLine dataLine = (SourceDataLine) AudioSystem.getLine(info); + dataLine.open(audioFormat); + // 开始播放音频 + dataLine.start(); + // 缓冲区大小 + int bufferSize = 4096; + byte[] buffer = new byte[bufferSize]; + int bytesRead = 0; + // 从输入流读取数据并写入数据行进行播放 + while ((bytesRead = audioInputStream.read(buffer)) != -1) { + dataLine.write(buffer, 0, bytesRead); + } + // 等待播放完成 + dataLine.drain(); + } catch (Exception e) { + e.printStackTrace(); + } + } } - - diff --git a/src/main/java/com/bonus/autoweb/UI/entity/AnnexEightBean.java b/src/main/java/com/bonus/autoweb/UI/entity/AnnexEightBean.java index 1447f4d..577758e 100644 --- a/src/main/java/com/bonus/autoweb/UI/entity/AnnexEightBean.java +++ b/src/main/java/com/bonus/autoweb/UI/entity/AnnexEightBean.java @@ -9,7 +9,7 @@ import lombok.Data; */ @Data public class AnnexEightBean { - + /** * 特高压 */ diff --git a/src/main/java/com/bonus/autoweb/UI/entity/WeatherData.java b/src/main/java/com/bonus/autoweb/UI/entity/WeatherData.java new file mode 100644 index 0000000..ecb6bc5 --- /dev/null +++ b/src/main/java/com/bonus/autoweb/UI/entity/WeatherData.java @@ -0,0 +1,117 @@ +package com.bonus.autoweb.UI.entity; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; + +/** + * FileName: WeatherData + * + * @author tqzhang + * Date: 2024/4/9 14:11 + * Description:天气 + */ +@Data +public class WeatherData { + private int code; + private WeatherDataChild data; + + public static class WeatherDataChild { + private int page; + private int rows; + private String city; + @SerializedName("weather12") // 使用注解指定 JSON 中的字段名 + private String weatherNoon; + @SerializedName("weather24") // 使用注解指定 JSON 中的字段名 + private String weatherNight; + @SerializedName("temperature1") // 使用注解指定 JSON 中的字段名 + private String minTemperature; + @SerializedName("temperature2") // 使用注解指定 JSON 中的字段名 + private String maxTemperature; + private String rectime; + + public int getPage() { + return page; + } + + public void setPage(int page) { + this.page = page; + } + + public int getRows() { + return rows; + } + + public void setRows(int rows) { + this.rows = rows; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public String getWeatherNoon() { + return weatherNoon; + } + + public void setWeatherNoon(String weatherNoon) { + this.weatherNoon = weatherNoon; + } + + public String getWeatherNight() { + return weatherNight; + } + + public void setWeatherNight(String weatherNight) { + this.weatherNight = weatherNight; + } + + public String getMinTemperature() { + return minTemperature; + } + + public void setMinTemperature(String minTemperature) { + this.minTemperature = minTemperature; + } + + public String getMaxTemperature() { + return maxTemperature; + } + + public void setMaxTemperature(String maxTemperature) { + this.maxTemperature = maxTemperature; + } + + public String getRectime() { + return rectime; + } + + public void setRectime(String rectime) { + this.rectime = rectime; + } + + @Override + public String toString() { + return "WeatherDataChild{" + + "page=" + page + + ", rows=" + rows + + ", city='" + city + '\'' + + ", weatherNoon='" + weatherNoon + '\'' + + ", weatherNight='" + weatherNight + '\'' + + ", minTemperature='" + minTemperature + '\'' + + ", maxTemperature='" + maxTemperature + '\'' + + ", rectime='" + rectime + '\'' + + '}'; + } + } + @Override + public String toString() { + return "WeatherData{" + + "code=" + code + + ", data=" + data + + '}'; + } +} diff --git a/src/main/java/com/bonus/autoweb/UI/frame/DailyAction.java b/src/main/java/com/bonus/autoweb/UI/frame/DailyAction.java index 3ff2a68..cb9a30b 100644 --- a/src/main/java/com/bonus/autoweb/UI/frame/DailyAction.java +++ b/src/main/java/com/bonus/autoweb/UI/frame/DailyAction.java @@ -4,7 +4,6 @@ import com.bonus.autoweb.UI.entity.*; import com.bonus.autoweb.base.DataConfig; import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver; - import javax.swing.*; import java.awt.*; import java.awt.event.FocusEvent; @@ -13,6 +12,7 @@ import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.io.*; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; @@ -51,20 +51,9 @@ public class DailyAction extends JFrame implements MouseListener { transmitElectricityCumulativeRepairOutageUvhJt,transmitElectricityCumulativeRepairOutageFiveJt,transmitElectricityCumulativeRepairOutageTwoJt,transmitElectricityCumulativeRepairOutageOneJt,transmitElectricityCumulativeRepairOutageThreeJt,transmitElectricityCumulativeRepairOutageTenJt, transmitElectricityCumulativeNoRepairOutageUvhJt,transmitElectricityCumulativeNoRepairOutageFiveJt,transmitElectricityCumulativeNoRepairOutageTwoJt,transmitElectricityCumulativeNoRepairOutageOneJt,transmitElectricityCumulativeNoRepairOutageThreeJt,transmitElectricityCumulativeNoRepairOutageTenJt, nineAddTaiDistrictDisasterJt,nineAddPersonnelDisasterJt,nineAddTaiDistrictRepairJt,nineAddPersonnelRepairJt,nineAddTaiDistrictNoRepairJt,nineAddPersonnelNoRepairJt,powerPersonnelAddNineJt,powerVehicleAddNineJt, - nineCumulativeTaiDistrictDisasterJt,nineCumulativePersonnelDisasterJt,nineCumulativeTaiDistrictRepairJt,nineCumulativePersonnelRepairJt,nineCumulativeTaiDistrictNoRepairJt,nineCumulativePersonnelNoRepairJt,powerPersonnelCumulativeNineJt,powerVehicleCumulativeNineJt, - totalAddDiagnosedJt, totalAddHealJt , totalAddSuspectedJt,totalExistingDiagnosedJt, totalExistingHealJt , totalExistingSuspectedJt, - dispatchAddDiagnosedJt, dispatchAddHealJt , dispatchAddSuspectedJt,dispatchExistingDiagnosedJt, dispatchExistingHealJt , dispatchExistingSuspectedJt, - repairAddDiagnosedJt, repairAddHealJt , repairAddSuspectedJt,repairExistingDiagnosedJt, repairExistingHealJt , repairExistingSuspectedJt, - marketingAddDiagnosedJt, marketingAddHealJt , marketingAddSuspectedJt,marketingExistingDiagnosedJt, marketingExistingHealJt , marketingExistingSuspectedJt, - constructionAddDiagnosedJt, constructionAddHealJt , constructionAddSuspectedJt,constructionExistingDiagnosedJt, constructionExistingHealJt , constructionExistingSuspectedJt, - airportPortJt,venueHospitalJt,guesthouseHotelJt,safeguardPersonnelJt, electricallyGuaranteedVehiclesJt,powerGenerationVehiclesJt,dynamoJt,fiveRemarkJt, + nineCumulativeTaiDistrictDisasterJt,nineCumulativePersonnelDisasterJt,nineCumulativeTaiDistrictRepairJt,nineCumulativePersonnelRepairJt,nineCumulativeTaiDistrictNoRepairJt,nineCumulativePersonnelNoRepairJt,powerPersonnelCumulativeNineJt,powerVehicleCumulativeNineJt + ; - tenUhvJt,tenFiveHundredKvJt,tenTwoHundredTwentyKvJt,tenOneHundredTenKvJt,tenThirtyFiveKvJt,tenTenKvJt,tenAverageWaterLevelJt,tenMeasuredValueJt,tenDesignValuesJt,tenActionHasBeenTakenJt, - - elevenUhvJt,elevenFiveHundredKvJt,elevenTwoHundredTwentyKvJt,elevenOneHundredTenKvJt,elevenThirtyFiveKvJt,elevenTenKvJt,elevenAverageWaterLevelJt,elevenMeasuredValueJt,elevenActionHasBeenTakenJt, - twelveUhvJt,twelveFiveHundredKvJt,twelveTwoHundredTwentyKvJt,twelveOneHundredTenKvJt,twelveThirtyFiveKvJt,twelveTenKvJt,twelveAverageWaterLevelJt,twelveMeasuredValueJt,twelveDesignValuesJt,twelveActionHasBeenTakenJt, - thirteenUhvJt,thirteenFiveHundredKvJt,thirteenTwoHundredTwentyKvJt,thirteenOneHundredTenKvJt,thirteenThirtyFiveKvJt,thirteenTenKvJt,thirteenAverageWaterLevelJt,thirteenMeasuredValueJt,thirteenDesignValuesJt,thirteenActionHasBeenTakenJt, - fourteenUhvJt,fourteenFiveHundredKvJt,fourteenTwoHundredTwentyKvJt,fourteenOneHundredTenKvJt,fourteenThirtyFiveKvJt,fourteenTenKvJt,fourteenAverageWaterLevelJt,fourteenMeasuredValueJt,fourteenDesignValuesJt,fourteenActionHasBeenTakenJt; String[] strArray = {"“四要素”检查", "通信测试", "重要站线视频连线检查"}; @@ -77,7 +66,7 @@ public class DailyAction extends JFrame implements MouseListener { * morning_daily * evening_daily */ - new DailyAction("evening_daily"); + new DailyAction("morning_daily"); } public DailyAction(String value) { @@ -144,13 +133,6 @@ public class DailyAction extends JFrame implements MouseListener { AnnexSevenBean sevenBean = bean.getSevenBean(); AnnexEightBean eightBean = bean.getEightBean(); AnnexNineBean nineBean = bean.getNineBean(); - AnnexThreeBean threeBean = bean.getThreeBean(); - AnnexFiveBean fiveBean = bean.getFiveBean(); - AnnexTenBean tenBean = bean.getTenBean(); - AnnexElevenBean elevenBean = bean.getElevenBean(); - AnnexTwelveBean twelveBean = bean.getTwelveBean(); - AnnexThirteenBean thirteenBean = bean.getThirteenBean(); - AnnexFourteenBean fourteenBean = bean.getFourteenBean(); overallJt.setText(bean.getOverall()); importantMattersJt.setText(bean.getImportant_matters()); safetyProductionJt.setText(bean.getSafety_production()); @@ -222,7 +204,7 @@ public class DailyAction extends JFrame implements MouseListener { powerSubstationCumulativeRepairOutageFiveJt.setText(sevenBean.getPower_substation_cumulative_repair_five()); powerSubstationCumulativeRepairOutageTwoJt.setText(sevenBean.getPower_substation_cumulative_repair_two()); powerSubstationCumulativeRepairOutageOneJt.setText(sevenBean.getPower_substation_cumulative_repair_one()); - powerSubstationCumulativeRepairOutageThreeJt.setText(sevenBean.getPower_substation_cumulative_repair_three()); + powerSubstationCumulativeRepairOutageThreeJt.setText(sevenBean.getPower_substation_cumulative_no_repair_three()); powerSubstationCumulativeNoRepairOutageUvhJt.setText(sevenBean.getPower_substation_cumulative_no_repair_uvh()); powerSubstationCumulativeNoRepairOutageFiveJt.setText(sevenBean.getPower_substation_cumulative_no_repair_five()); powerSubstationCumulativeNoRepairOutageTwoJt.setText(sevenBean.getPower_substation_cumulative_no_repair_two()); @@ -282,112 +264,11 @@ public class DailyAction extends JFrame implements MouseListener { nineCumulativePersonnelNoRepairJt.setText(nineBean.getCumulative_no_repair_user()); powerPersonnelCumulativeNineJt.setText(nineBean.getCumulative_power_personnel()); powerVehicleCumulativeNineJt.setText(nineBean.getCumulative_power_vehicle()); - - /** - * 附件三 五 十二 十三 十四 赋值 - */ - totalAddDiagnosedJt.setText(threeBean.getTotalAddDiagnosed()); - totalAddHealJt.setText(threeBean.getTotalAddHeal()); - totalAddSuspectedJt.setText(threeBean.getTotalAddSuspected()); - totalExistingDiagnosedJt.setText(threeBean.getTotalExistingDiagnosed()); - totalExistingHealJt.setText(threeBean.getTotalExistingHeal()); - totalExistingSuspectedJt.setText(threeBean.getTotalExistingSuspected()); - - dispatchAddDiagnosedJt.setText(threeBean.getDispatchAddDiagnosed()); - dispatchAddHealJt.setText(threeBean.getDispatchAddHeal()); - dispatchAddSuspectedJt.setText(threeBean.getDispatchAddSuspected()); - dispatchExistingDiagnosedJt.setText(threeBean.getDispatchExistingDiagnosed()); - dispatchExistingHealJt.setText(threeBean.getDispatchExistingHeal()); - dispatchExistingSuspectedJt.setText(threeBean.getDispatchExistingSuspected()); - - repairAddDiagnosedJt.setText(threeBean.getRepairAddDiagnosed()); - repairAddHealJt.setText(threeBean.getRepairAddHeal()); - repairAddSuspectedJt.setText(threeBean.getRepairAddSuspected()); - repairExistingDiagnosedJt.setText(threeBean.getRepairExistingDiagnosed()); - repairExistingHealJt.setText(threeBean.getRepairExistingHeal()); - repairExistingSuspectedJt.setText(threeBean.getRepairExistingSuspected()); - - marketingAddDiagnosedJt.setText(threeBean.getMarketingAddDiagnosed()); - marketingAddHealJt.setText(threeBean.getMarketingAddHeal()); - marketingAddSuspectedJt.setText(threeBean.getMarketingAddSuspected()); - marketingExistingDiagnosedJt.setText(threeBean.getMarketingExistingDiagnosed()); - marketingExistingHealJt.setText(threeBean.getMarketingExistingHeal()); - marketingExistingSuspectedJt.setText(threeBean.getMarketingExistingSuspected()); - - constructionAddDiagnosedJt.setText(threeBean.getConstructionAddDiagnosed()); - constructionAddHealJt.setText(threeBean.getConstructionAddHeal()); - constructionAddSuspectedJt.setText(threeBean.getConstructionAddSuspected()); - constructionExistingDiagnosedJt.setText(threeBean.getConstructionExistingDiagnosed()); - constructionExistingHealJt.setText(threeBean.getConstructionExistingHeal()); - constructionExistingSuspectedJt.setText(threeBean.getConstructionExistingSuspected()); - - airportPortJt.setText(fiveBean.getAirportPort()); - venueHospitalJt.setText(fiveBean.getVenueHospital()); - guesthouseHotelJt.setText(fiveBean.getGuesthouseHotel()); - safeguardPersonnelJt.setText(fiveBean.getSafeguardPersonnel()); - electricallyGuaranteedVehiclesJt.setText(fiveBean.getElectricallyGuaranteedVehicles()); - powerGenerationVehiclesJt.setText(fiveBean.getPowerGenerationVehicles()); - dynamoJt.setText(fiveBean.getDynamo()); - fiveRemarkJt.setText(fiveBean.getRemark()); - - tenUhvJt.setText(tenBean.getUhv()); - tenFiveHundredKvJt.setText(tenBean.getFiveHundredKv()); - tenTwoHundredTwentyKvJt.setText(tenBean.getTwoHundredTwentyKv()); - tenOneHundredTenKvJt.setText(tenBean.getOneHundredTenKv()); - tenThirtyFiveKvJt.setText(tenBean.getThirtyFiveKv()); - tenTenKvJt.setText(tenBean.getTenKv()); - tenAverageWaterLevelJt.setText(tenBean.getAverageWaterLevel()); - tenMeasuredValueJt.setText(tenBean.getMeasuredValue()); - tenDesignValuesJt.setText(tenBean.getDesignValues()); - tenActionHasBeenTakenJt.setText(tenBean.getActionHasBeenTaken()); - - elevenUhvJt.setText(elevenBean.getUhv()); - elevenFiveHundredKvJt.setText(elevenBean.getFiveHundredKv()); - elevenTwoHundredTwentyKvJt.setText(elevenBean.getTwoHundredTwentyKv()); - elevenOneHundredTenKvJt.setText(elevenBean.getOneHundredTenKv()); - elevenThirtyFiveKvJt.setText(elevenBean.getThirtyFiveKv()); - elevenTenKvJt.setText(elevenBean.getTenKv()); - elevenAverageWaterLevelJt.setText(elevenBean.getAverageWaterLevel()); - elevenMeasuredValueJt.setText(elevenBean.getMeasuredValue()); - elevenActionHasBeenTakenJt.setText(elevenBean.getActionHasBeenTaken()); - - twelveUhvJt.setText(twelveBean.getUhv()); - twelveFiveHundredKvJt.setText(twelveBean.getFiveHundredKv()); - twelveTwoHundredTwentyKvJt.setText(twelveBean.getTwoHundredTwentyKv()); - twelveOneHundredTenKvJt.setText(twelveBean.getOneHundredTenKv()); - twelveThirtyFiveKvJt.setText(twelveBean.getThirtyFiveKv()); - twelveTenKvJt.setText(twelveBean.getTenKv()); - twelveAverageWaterLevelJt.setText(twelveBean.getAverageWaterLevel()); - twelveMeasuredValueJt.setText(twelveBean.getMeasuredValue()); - twelveDesignValuesJt.setText(twelveBean.getDesignValues()); - twelveActionHasBeenTakenJt.setText(twelveBean.getActionHasBeenTaken()); - - thirteenUhvJt.setText(thirteenBean.getUhv()); - thirteenFiveHundredKvJt.setText(thirteenBean.getFiveHundredKv()); - thirteenTwoHundredTwentyKvJt.setText(thirteenBean.getTwoHundredTwentyKv()); - thirteenOneHundredTenKvJt.setText(thirteenBean.getOneHundredTenKv()); - thirteenThirtyFiveKvJt.setText(thirteenBean.getThirtyFiveKv()); - thirteenTenKvJt.setText(thirteenBean.getTenKv()); - thirteenAverageWaterLevelJt.setText(thirteenBean.getAverageWaterLevel()); - thirteenMeasuredValueJt.setText(thirteenBean.getMeasuredValue()); - thirteenDesignValuesJt.setText(thirteenBean.getDesignValues()); - thirteenActionHasBeenTakenJt.setText(thirteenBean.getActionHasBeenTaken()); - - fourteenUhvJt.setText(fourteenBean.getUhv()); - fourteenFiveHundredKvJt.setText(fourteenBean.getFiveHundredKv()); - fourteenTwoHundredTwentyKvJt.setText(fourteenBean.getTwoHundredTwentyKv()); - fourteenOneHundredTenKvJt.setText(fourteenBean.getOneHundredTenKv()); - fourteenThirtyFiveKvJt.setText(fourteenBean.getThirtyFiveKv()); - fourteenTenKvJt.setText(fourteenBean.getTenKv()); - fourteenAverageWaterLevelJt.setText(fourteenBean.getAverageWaterLevel()); - fourteenMeasuredValueJt.setText(fourteenBean.getMeasuredValue()); - fourteenDesignValuesJt.setText(fourteenBean.getDesignValues()); - fourteenActionHasBeenTakenJt.setText(fourteenBean.getActionHasBeenTaken()); } } private JPanel initMainJpanel() { - int height = 176 * 156 + 120; //此处调节整个长度,可适当增大或减小70 + int height = 120 * 155 + 35; //此处调节整个长度,可适当增大或减小70 Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); jp = new JPanel(); jp.setOpaque(false); @@ -1050,646 +931,6 @@ public class DailyAction extends JFrame implements MouseListener { verificationRemarkJt.addFocusListener(new MyFocusListener("请输入核查备注", verificationRemarkJt)); } - /** - * 附件三-电网生产相关专业员工感染情况统计 - */ - JLabel annexThreeLabel = new JLabel("附件三-电网生产相关专业员工感染情况统计"); - annexThreeLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - annexThreeLabel.setForeground(new Color(11, 24, 76)); - int annexThreeJlx = 30; - int annexThreeJly = verificationRemarkJtY + 150; - annexThreeLabel.setBounds(annexThreeJlx, annexThreeJly, 1000, 100); - - /** - * 合计 - 新增 - */ - JLabel totalAddition = new JLabel("合计-新增"); - totalAddition.setFont(new Font("微软雅黑", Font.BOLD, 50)); - totalAddition.setForeground(new Color(11, 24, 76)); - int totalAdditionJlx = 30; - int totalAdditionJly = annexThreeJly + 120; - totalAddition.setBounds(totalAdditionJlx, totalAdditionJly, 800, 100); - - /** - * 确诊 - */ - JLabel totalAddDiagnosedLabel = new JLabel("确诊"); - totalAddDiagnosedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - totalAddDiagnosedLabel.setForeground(new Color(11, 24, 76)); - int totalAddDiagnosedJlx = 30; - int totalAddDiagnosedJly = totalAdditionJly + 120; - totalAddDiagnosedLabel.setBounds(totalAddDiagnosedJlx, totalAddDiagnosedJly, 800, 100); - /** - * 治愈 - */ - JLabel totalAddHealLabel = new JLabel("治愈"); - totalAddHealLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - totalAddHealLabel.setForeground(new Color(11, 24, 76)); - int totalAddHealJlx = totalAddDiagnosedJlx + 350; - int totalAddHealJly = totalAdditionJly + 120; - totalAddHealLabel.setBounds(totalAddHealJlx, totalAddHealJly, 800, 100); - - /** - * 疑似 - */ - JLabel totalAddSuspectedLabel = new JLabel("疑似"); - totalAddSuspectedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - totalAddSuspectedLabel.setForeground(new Color(11, 24, 76)); - int totalAddSuspectedJlx = totalAddHealJlx + 350; - int totalAddSuspectedJly = totalAdditionJly + 120; - totalAddSuspectedLabel.setBounds(totalAddSuspectedJlx, totalAddSuspectedJly, 800, 100); - - /** - * 确诊 - */ - totalAddDiagnosedJt = new JTextField(); - setTextFiledColor(totalAddDiagnosedJt); - int totalAddDiagnosedJtY = totalAddSuspectedJly + 120; - totalAddDiagnosedJt.setBounds(totalAdditionJlx, totalAddDiagnosedJtY, 300, 120); - - /** - * 治愈 - */ - totalAddHealJt = new JTextField(); - setTextFiledColor(totalAddHealJt); - int totalAddHealJtY = totalAddSuspectedJly + 120; - totalAddHealJt.setBounds(totalAdditionJlx + 350, totalAddHealJtY, 300, 120); - - /** - * 疑似 - */ - totalAddSuspectedJt = new JTextField(); - setTextFiledColor(totalAddSuspectedJt); - int totalAddSuspectedJtY = totalAddSuspectedJly + 120; - totalAddSuspectedJt.setBounds(totalAdditionJlx + 700, totalAddSuspectedJtY, 300, 120); - - /** - * 合计 - 现有 - */ - JLabel totalExisting = new JLabel("合计-现有"); - totalExisting.setFont(new Font("微软雅黑", Font.BOLD, 50)); - totalExisting.setForeground(new Color(11, 24, 76)); - int totalExistingJlx = 30; - int totalExistingJly = totalAddSuspectedJtY + 120; - totalExisting.setBounds(totalExistingJlx, totalExistingJly, 800, 100); - - /** - * 确诊 - */ - JLabel totalExistingDiagnosedLabel = new JLabel("确诊"); - totalExistingDiagnosedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - totalExistingDiagnosedLabel.setForeground(new Color(11, 24, 76)); - int totalExistingDiagnosedJlx = 30; - int totalExistingDiagnosedJly = totalExistingJly + 120; - totalExistingDiagnosedLabel.setBounds(totalExistingDiagnosedJlx, totalExistingDiagnosedJly, 800, 100); - /** - * 治愈 - */ - JLabel totalExistingHealLabel = new JLabel("治愈"); - totalExistingHealLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - totalExistingHealLabel.setForeground(new Color(11, 24, 76)); - int totalExistingHealJlx = totalExistingDiagnosedJlx + 350; - int totalExistingHealJly = totalExistingJly + 120; - totalExistingHealLabel.setBounds(totalExistingHealJlx, totalExistingHealJly, 800, 100); - - /** - * 疑似 - */ - JLabel totalExistingSuspectedLabel = new JLabel("疑似"); - totalExistingSuspectedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - totalExistingSuspectedLabel.setForeground(new Color(11, 24, 76)); - int totalExistingSuspectedJlx = totalExistingHealJlx + 350; - int totalExistingSuspectedJly = totalExistingJly + 120; - totalExistingSuspectedLabel.setBounds(totalExistingSuspectedJlx, totalExistingSuspectedJly, 800, 100); - - /** - * 确诊 - */ - totalExistingDiagnosedJt = new JTextField(); - setTextFiledColor(totalExistingDiagnosedJt); - int totalExistingDiagnosedJtY = totalExistingSuspectedJly + 120; - totalExistingDiagnosedJt.setBounds(totalExistingDiagnosedJlx, totalExistingDiagnosedJtY, 300, 120); - - /** - * 治愈 - */ - totalExistingHealJt = new JTextField(); - setTextFiledColor(totalExistingHealJt); - int totalExistingHealJtY = totalExistingSuspectedJly + 120; - totalExistingHealJt.setBounds(totalExistingDiagnosedJlx + 350, totalExistingHealJtY, 300, 120); - - /** - * 疑似 - */ - totalExistingSuspectedJt = new JTextField(); - setTextFiledColor(totalExistingSuspectedJt); - int totalExistingSuspectedJtY = totalExistingSuspectedJly + 120; - totalExistingSuspectedJt.setBounds(totalExistingDiagnosedJlx + 700, totalExistingSuspectedJtY, 300, 120); - - /** - * 电网调度 - 新增 - */ - JLabel dispatchAddition = new JLabel("电网调度-新增"); - dispatchAddition.setFont(new Font("微软雅黑", Font.BOLD, 50)); - dispatchAddition.setForeground(new Color(11, 24, 76)); - int dispatchAdditionJlx = 30; - int dispatchAdditionJly = totalExistingSuspectedJtY + 120; - dispatchAddition.setBounds(dispatchAdditionJlx, dispatchAdditionJly, 800, 100); - - /** - * 确诊 - */ - JLabel dispatchAddDiagnosedLabel = new JLabel("确诊"); - dispatchAddDiagnosedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - dispatchAddDiagnosedLabel.setForeground(new Color(11, 24, 76)); - int dispatchAddDiagnosedJlx = 30; - int dispatchAddDiagnosedJly = dispatchAdditionJly + 120; - dispatchAddDiagnosedLabel.setBounds(dispatchAddDiagnosedJlx, dispatchAddDiagnosedJly, 800, 100); - /** - * 治愈 - */ - JLabel dispatchAddHealLabel = new JLabel("治愈"); - dispatchAddHealLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - dispatchAddHealLabel.setForeground(new Color(11, 24, 76)); - int dispatchAddHealJlx = dispatchAddDiagnosedJlx + 350; - int dispatchAddHealJly = dispatchAdditionJly + 120; - dispatchAddHealLabel.setBounds(dispatchAddHealJlx, dispatchAddHealJly, 800, 100); - - /** - * 疑似 - */ - JLabel dispatchAddSuspectedLabel = new JLabel("疑似"); - dispatchAddSuspectedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - dispatchAddSuspectedLabel.setForeground(new Color(11, 24, 76)); - int dispatchAddSuspectedJlx = dispatchAddHealJlx + 350; - int dispatchAddSuspectedJly = dispatchAdditionJly + 120; - dispatchAddSuspectedLabel.setBounds(dispatchAddSuspectedJlx, dispatchAddSuspectedJly, 800, 100); - - /** - * 确诊 - */ - dispatchAddDiagnosedJt = new JTextField(); - setTextFiledColor(dispatchAddDiagnosedJt); - int dispatchAddDiagnosedJtY = dispatchAddSuspectedJly + 120; - dispatchAddDiagnosedJt.setBounds(dispatchAdditionJlx, dispatchAddDiagnosedJtY, 300, 120); - - /** - * 治愈 - */ - dispatchAddHealJt = new JTextField(); - setTextFiledColor(dispatchAddHealJt); - int dispatchAddHealJtY = dispatchAddSuspectedJly + 120; - dispatchAddHealJt.setBounds(dispatchAdditionJlx + 350, dispatchAddHealJtY, 300, 120); - - /** - * 疑似 - */ - dispatchAddSuspectedJt = new JTextField(); - setTextFiledColor(dispatchAddSuspectedJt); - int dispatchAddSuspectedJtY = dispatchAddSuspectedJly + 120; - dispatchAddSuspectedJt.setBounds(dispatchAdditionJlx + 700,dispatchAddSuspectedJtY, 300, 120); - - /** - * 电网调度 - 现有 - */ - JLabel dispatchExisting = new JLabel("电网调度-现有"); - dispatchExisting.setFont(new Font("微软雅黑", Font.BOLD, 50)); - dispatchExisting.setForeground(new Color(11, 24, 76)); - int dispatchExistingJlx = 30; - int dispatchExistingJly = dispatchAddSuspectedJtY + 120; - dispatchExisting.setBounds(dispatchExistingJlx, dispatchExistingJly, 800, 100); - - /** - * 确诊 - */ - JLabel dispatchExistingDiagnosedLabel = new JLabel("确诊"); - dispatchExistingDiagnosedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - dispatchExistingDiagnosedLabel.setForeground(new Color(11, 24, 76)); - int dispatchExistingDiagnosedJlx = 30; - int dispatchExistingDiagnosedJly = dispatchExistingJly + 120; - dispatchExistingDiagnosedLabel.setBounds(dispatchExistingDiagnosedJlx, dispatchExistingDiagnosedJly, 800, 100); - /** - * 治愈 - */ - JLabel dispatchExistingHealLabel = new JLabel("治愈"); - dispatchExistingHealLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - dispatchExistingHealLabel.setForeground(new Color(11, 24, 76)); - int dispatchExistingHealJlx = dispatchExistingDiagnosedJlx + 350; - int dispatchExistingHealJly = dispatchExistingJly + 120; - dispatchExistingHealLabel.setBounds(dispatchExistingHealJlx, dispatchExistingHealJly, 800, 100); - - /** - * 疑似 - */ - JLabel dispatchExistingSuspectedLabel = new JLabel("疑似"); - dispatchExistingSuspectedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - dispatchExistingSuspectedLabel.setForeground(new Color(11, 24, 76)); - int dispatchExistingSuspectedJlx = dispatchExistingHealJlx + 350; - int dispatchExistingSuspectedJly = dispatchExistingJly + 120; - dispatchExistingSuspectedLabel.setBounds(dispatchExistingSuspectedJlx, dispatchExistingSuspectedJly, 800, 100); - - /** - * 确诊 - */ - dispatchExistingDiagnosedJt = new JTextField(); - setTextFiledColor(dispatchExistingDiagnosedJt); - int dispatchExistingDiagnosedJtY = dispatchExistingSuspectedJly + 120; - dispatchExistingDiagnosedJt.setBounds(dispatchExistingDiagnosedJlx, dispatchExistingDiagnosedJtY, 300, 120); - - /** - * 治愈 - */ - dispatchExistingHealJt = new JTextField(); - setTextFiledColor(dispatchExistingHealJt); - int dispatchExistingHealJtY = dispatchExistingSuspectedJly + 120; - dispatchExistingHealJt.setBounds(dispatchExistingDiagnosedJlx + 350, dispatchExistingHealJtY, 300, 120); - - /** - * 疑似 - */ - dispatchExistingSuspectedJt = new JTextField(); - setTextFiledColor(dispatchExistingSuspectedJt); - int dispatchExistingSuspectedJtY = dispatchExistingSuspectedJly + 120; - dispatchExistingSuspectedJt.setBounds(dispatchExistingDiagnosedJlx + 700, dispatchExistingSuspectedJtY, 300, 120); - /** - * 运维检修 - 新增 - */ - JLabel repairAddition = new JLabel("运维检修-新增"); - repairAddition.setFont(new Font("微软雅黑", Font.BOLD, 50)); - repairAddition.setForeground(new Color(11, 24, 76)); - int repairAdditionJlx = 30; - int repairAdditionJly = dispatchExistingSuspectedJtY + 120; - repairAddition.setBounds(repairAdditionJlx, repairAdditionJly, 800, 100); - - /** - * 确诊 - */ - JLabel repairAddDiagnosedLabel = new JLabel("确诊"); - repairAddDiagnosedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - repairAddDiagnosedLabel.setForeground(new Color(11, 24, 76)); - int repairAddDiagnosedJlx = 30; - int repairAddDiagnosedJly = repairAdditionJly + 120; - repairAddDiagnosedLabel.setBounds(repairAddDiagnosedJlx, repairAddDiagnosedJly, 800, 100); - /** - * 治愈 - */ - JLabel repairAddHealLabel = new JLabel("治愈"); - repairAddHealLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - repairAddHealLabel.setForeground(new Color(11, 24, 76)); - int repairAddHealJlx = repairAddDiagnosedJlx + 350; - int repairAddHealJly = repairAdditionJly + 120; - repairAddHealLabel.setBounds(repairAddHealJlx, repairAddHealJly, 800, 100); - - /** - * 疑似 - */ - JLabel repairAddSuspectedLabel = new JLabel("疑似"); - repairAddSuspectedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - repairAddSuspectedLabel.setForeground(new Color(11, 24, 76)); - int repairAddSuspectedJlx = repairAddHealJlx + 350; - int repairAddSuspectedJly = repairAdditionJly + 120; - repairAddSuspectedLabel.setBounds(repairAddSuspectedJlx, repairAddSuspectedJly, 800, 100); - - /** - * 确诊 - */ - repairAddDiagnosedJt = new JTextField(); - setTextFiledColor(repairAddDiagnosedJt); - int repairAddDiagnosedJtY = repairAddSuspectedJly + 120; - repairAddDiagnosedJt.setBounds(repairAdditionJlx, repairAddDiagnosedJtY, 300, 120); - - /** - * 治愈 - */ - repairAddHealJt = new JTextField(); - setTextFiledColor(repairAddHealJt); - int repairAddHealJtY = repairAddSuspectedJly + 120; - repairAddHealJt.setBounds(repairAdditionJlx + 350, repairAddHealJtY, 300, 120); - - /** - * 疑似 - */ - repairAddSuspectedJt = new JTextField(); - setTextFiledColor(repairAddSuspectedJt); - int repairAddSuspectedJtY = repairAddSuspectedJly + 120; - repairAddSuspectedJt.setBounds(repairAdditionJlx + 700,repairAddSuspectedJtY, 300, 120); - - /** - * 运维检修 - 现有 - */ - JLabel repairExisting = new JLabel("运维检修-现有"); - repairExisting.setFont(new Font("微软雅黑", Font.BOLD, 50)); - repairExisting.setForeground(new Color(11, 24, 76)); - int repairExistingJlx = 30; - int repairExistingJly = repairAddSuspectedJtY + 120; - repairExisting.setBounds(repairExistingJlx, repairExistingJly, 800, 100); - - /** - * 确诊 - */ - JLabel repairExistingDiagnosedLabel = new JLabel("确诊"); - repairExistingDiagnosedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - repairExistingDiagnosedLabel.setForeground(new Color(11, 24, 76)); - int repairExistingDiagnosedJlx = 30; - int repairExistingDiagnosedJly = repairExistingJly + 120; - repairExistingDiagnosedLabel.setBounds(repairExistingDiagnosedJlx, repairExistingDiagnosedJly, 800, 100); - /** - * 治愈 - */ - JLabel repairExistingHealLabel = new JLabel("治愈"); - repairExistingHealLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - repairExistingHealLabel.setForeground(new Color(11, 24, 76)); - int repairExistingHealJlx = repairExistingDiagnosedJlx + 350; - int repairExistingHealJly = repairExistingJly + 120; - repairExistingHealLabel.setBounds(repairExistingHealJlx, repairExistingHealJly, 800, 100); - - /** - * 疑似 - */ - JLabel repairExistingSuspectedLabel = new JLabel("疑似"); - repairExistingSuspectedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - repairExistingSuspectedLabel.setForeground(new Color(11, 24, 76)); - int repairExistingSuspectedJlx = repairExistingHealJlx + 350; - int repairExistingSuspectedJly = repairExistingJly + 120; - repairExistingSuspectedLabel.setBounds(repairExistingSuspectedJlx, repairExistingSuspectedJly, 800, 100); - - /** - * 确诊 - */ - repairExistingDiagnosedJt = new JTextField(); - setTextFiledColor(repairExistingDiagnosedJt); - int repairExistingDiagnosedJtY = repairExistingSuspectedJly + 120; - repairExistingDiagnosedJt.setBounds(repairExistingDiagnosedJlx, repairExistingDiagnosedJtY, 300, 120); - - /** - * 治愈 - */ - repairExistingHealJt = new JTextField(); - setTextFiledColor(repairExistingHealJt); - int repairExistingHealJtY = repairExistingSuspectedJly + 120; - repairExistingHealJt.setBounds(repairExistingDiagnosedJlx + 350, repairExistingHealJtY, 300, 120); - - /** - * 疑似 - */ - repairExistingSuspectedJt = new JTextField(); - setTextFiledColor(repairExistingSuspectedJt); - int repairExistingSuspectedJtY = repairExistingSuspectedJly + 120; - repairExistingSuspectedJt.setBounds(repairExistingDiagnosedJlx + 700, repairExistingSuspectedJtY, 300, 120); - -/** - * 营销服务 - 新增 - */ - JLabel marketingAddition = new JLabel("营销服务-新增"); - marketingAddition.setFont(new Font("微软雅黑", Font.BOLD, 50)); - marketingAddition.setForeground(new Color(11, 24, 76)); - int marketingAdditionJlx = 30; - int marketingAdditionJly = repairExistingSuspectedJtY + 120; - marketingAddition.setBounds(marketingAdditionJlx, marketingAdditionJly, 800, 100); - - /** - * 确诊 - */ - JLabel marketingAddDiagnosedLabel = new JLabel("确诊"); - marketingAddDiagnosedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - marketingAddDiagnosedLabel.setForeground(new Color(11, 24, 76)); - int marketingAddDiagnosedJlx = 30; - int marketingAddDiagnosedJly = marketingAdditionJly + 120; - marketingAddDiagnosedLabel.setBounds(marketingAddDiagnosedJlx, marketingAddDiagnosedJly, 800, 100); - /** - * 治愈 - */ - JLabel marketingAddHealLabel = new JLabel("治愈"); - marketingAddHealLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - marketingAddHealLabel.setForeground(new Color(11, 24, 76)); - int marketingAddHealJlx = marketingAddDiagnosedJlx + 350; - int marketingAddHealJly = marketingAdditionJly + 120; - marketingAddHealLabel.setBounds(marketingAddHealJlx, marketingAddHealJly, 800, 100); - - /** - * 疑似 - */ - JLabel marketingAddSuspectedLabel = new JLabel("疑似"); - marketingAddSuspectedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - marketingAddSuspectedLabel.setForeground(new Color(11, 24, 76)); - int marketingAddSuspectedJlx = marketingAddHealJlx + 350; - int marketingAddSuspectedJly = marketingAdditionJly + 120; - marketingAddSuspectedLabel.setBounds(marketingAddSuspectedJlx, marketingAddSuspectedJly, 800, 100); - - /** - * 确诊 - */ - marketingAddDiagnosedJt = new JTextField(); - setTextFiledColor(marketingAddDiagnosedJt); - int marketingAddDiagnosedJtY = marketingAddSuspectedJly + 120; - marketingAddDiagnosedJt.setBounds(marketingAdditionJlx, marketingAddDiagnosedJtY, 300, 120); - - /** - * 治愈 - */ - marketingAddHealJt = new JTextField(); - setTextFiledColor(marketingAddHealJt); - int marketingAddHealJtY = marketingAddSuspectedJly + 120; - marketingAddHealJt.setBounds(marketingAdditionJlx + 350, marketingAddHealJtY, 300, 120); - - /** - * 疑似 - */ - marketingAddSuspectedJt = new JTextField(); - setTextFiledColor(marketingAddSuspectedJt); - int marketingAddSuspectedJtY = marketingAddSuspectedJly + 120; - marketingAddSuspectedJt.setBounds(marketingAdditionJlx + 700,marketingAddSuspectedJtY, 300, 120); - - /** - * 营销服务 - 现有 - */ - JLabel marketingExisting = new JLabel("营销服务-现有"); - marketingExisting.setFont(new Font("微软雅黑", Font.BOLD, 50)); - marketingExisting.setForeground(new Color(11, 24, 76)); - int marketingExistingJlx = 30; - int marketingExistingJly = marketingAddSuspectedJtY + 120; - marketingExisting.setBounds(marketingExistingJlx, marketingExistingJly, 800, 100); - - /** - * 确诊 - */ - JLabel marketingExistingDiagnosedLabel = new JLabel("确诊"); - marketingExistingDiagnosedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - marketingExistingDiagnosedLabel.setForeground(new Color(11, 24, 76)); - int marketingExistingDiagnosedJlx = 30; - int marketingExistingDiagnosedJly = marketingExistingJly + 120; - marketingExistingDiagnosedLabel.setBounds(marketingExistingDiagnosedJlx, marketingExistingDiagnosedJly, 800, 100); - /** - * 治愈 - */ - JLabel marketingExistingHealLabel = new JLabel("治愈"); - marketingExistingHealLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - marketingExistingHealLabel.setForeground(new Color(11, 24, 76)); - int marketingExistingHealJlx = marketingExistingDiagnosedJlx + 350; - int marketingExistingHealJly = marketingExistingJly + 120; - marketingExistingHealLabel.setBounds(marketingExistingHealJlx, marketingExistingHealJly, 800, 100); - - /** - * 疑似 - */ - JLabel marketingExistingSuspectedLabel = new JLabel("疑似"); - marketingExistingSuspectedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - marketingExistingSuspectedLabel.setForeground(new Color(11, 24, 76)); - int marketingExistingSuspectedJlx = marketingExistingHealJlx + 350; - int marketingExistingSuspectedJly = marketingExistingJly + 120; - marketingExistingSuspectedLabel.setBounds(marketingExistingSuspectedJlx, marketingExistingSuspectedJly, 800, 100); - - /** - * 确诊 - */ - marketingExistingDiagnosedJt = new JTextField(); - setTextFiledColor(marketingExistingDiagnosedJt); - int marketingExistingDiagnosedJtY = marketingExistingSuspectedJly + 120; - marketingExistingDiagnosedJt.setBounds(marketingExistingDiagnosedJlx, marketingExistingDiagnosedJtY, 300, 120); - - /** - * 治愈 - */ - marketingExistingHealJt = new JTextField(); - setTextFiledColor(marketingExistingHealJt); - int marketingExistingHealJtY = marketingExistingSuspectedJly + 120; - marketingExistingHealJt.setBounds(marketingExistingDiagnosedJlx + 350, marketingExistingHealJtY, 300, 120); - - /** - * 疑似 - */ - marketingExistingSuspectedJt = new JTextField(); - setTextFiledColor(marketingExistingSuspectedJt); - int marketingExistingSuspectedJtY = marketingExistingSuspectedJly + 120; - marketingExistingSuspectedJt.setBounds(marketingExistingDiagnosedJlx + 700, marketingExistingSuspectedJtY, 300, 120); - - /** - * 电网建设 - 新增 - */ - JLabel constructionAddition = new JLabel("电网建设-新增"); - constructionAddition.setFont(new Font("微软雅黑", Font.BOLD, 50)); - constructionAddition.setForeground(new Color(11, 24, 76)); - int constructionAdditionJlx = 30; - int constructionAdditionJly = marketingExistingSuspectedJtY + 120; - constructionAddition.setBounds(constructionAdditionJlx, constructionAdditionJly, 800, 100); - - /** - * 确诊 - */ - JLabel constructionAddDiagnosedLabel = new JLabel("确诊"); - constructionAddDiagnosedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - constructionAddDiagnosedLabel.setForeground(new Color(11, 24, 76)); - int constructionAddDiagnosedJlx = 30; - int constructionAddDiagnosedJly = constructionAdditionJly + 120; - constructionAddDiagnosedLabel.setBounds(constructionAddDiagnosedJlx, constructionAddDiagnosedJly, 800, 100); - /** - * 治愈 - */ - JLabel constructionAddHealLabel = new JLabel("治愈"); - constructionAddHealLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - constructionAddHealLabel.setForeground(new Color(11, 24, 76)); - int constructionAddHealJlx = constructionAddDiagnosedJlx + 350; - int constructionAddHealJly = constructionAdditionJly + 120; - constructionAddHealLabel.setBounds(constructionAddHealJlx, constructionAddHealJly, 800, 100); - - /** - * 疑似 - */ - JLabel constructionAddSuspectedLabel = new JLabel("疑似"); - constructionAddSuspectedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - constructionAddSuspectedLabel.setForeground(new Color(11, 24, 76)); - int constructionAddSuspectedJlx = constructionAddHealJlx + 350; - int constructionAddSuspectedJly = constructionAdditionJly + 120; - constructionAddSuspectedLabel.setBounds(constructionAddSuspectedJlx, constructionAddSuspectedJly, 800, 100); - - /** - * 确诊 - */ - constructionAddDiagnosedJt = new JTextField(); - setTextFiledColor(constructionAddDiagnosedJt); - int constructionAddDiagnosedJtY = constructionAddSuspectedJly + 120; - constructionAddDiagnosedJt.setBounds(constructionAdditionJlx, constructionAddDiagnosedJtY, 300, 120); - - /** - * 治愈 - */ - constructionAddHealJt = new JTextField(); - setTextFiledColor(constructionAddHealJt); - int constructionAddHealJtY = constructionAddSuspectedJly + 120; - constructionAddHealJt.setBounds(constructionAdditionJlx + 350, constructionAddHealJtY, 300, 120); - - /** - * 疑似 - */ - constructionAddSuspectedJt = new JTextField(); - setTextFiledColor(constructionAddSuspectedJt); - int constructionAddSuspectedJtY = constructionAddSuspectedJly + 120; - constructionAddSuspectedJt.setBounds(constructionAdditionJlx + 700,constructionAddSuspectedJtY, 300, 120); - - /** - * 电网建设 - 现有 - */ - JLabel constructionExisting = new JLabel("电网建设-现有"); - constructionExisting.setFont(new Font("微软雅黑", Font.BOLD, 50)); - constructionExisting.setForeground(new Color(11, 24, 76)); - int constructionExistingJlx = 30; - int constructionExistingJly = constructionAddSuspectedJtY + 120; - constructionExisting.setBounds(constructionExistingJlx, constructionExistingJly, 800, 100); - - /** - * 确诊 - */ - JLabel constructionExistingDiagnosedLabel = new JLabel("确诊"); - constructionExistingDiagnosedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - constructionExistingDiagnosedLabel.setForeground(new Color(11, 24, 76)); - int constructionExistingDiagnosedJlx = 30; - int constructionExistingDiagnosedJly = constructionExistingJly + 120; - constructionExistingDiagnosedLabel.setBounds(constructionExistingDiagnosedJlx, constructionExistingDiagnosedJly, 800, 100); - /** - * 治愈 - */ - JLabel constructionExistingHealLabel = new JLabel("治愈"); - constructionExistingHealLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - constructionExistingHealLabel.setForeground(new Color(11, 24, 76)); - int constructionExistingHealJlx = constructionExistingDiagnosedJlx + 350; - int constructionExistingHealJly = constructionExistingJly + 120; - constructionExistingHealLabel.setBounds(constructionExistingHealJlx, constructionExistingHealJly, 800, 100); - - /** - * 疑似 - */ - JLabel constructionExistingSuspectedLabel = new JLabel("疑似"); - constructionExistingSuspectedLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - constructionExistingSuspectedLabel.setForeground(new Color(11, 24, 76)); - int constructionExistingSuspectedJlx = constructionExistingHealJlx + 350; - int constructionExistingSuspectedJly = constructionExistingJly + 120; - constructionExistingSuspectedLabel.setBounds(constructionExistingSuspectedJlx, constructionExistingSuspectedJly, 800, 100); - - /** - * 确诊 - */ - constructionExistingDiagnosedJt = new JTextField(); - setTextFiledColor(constructionExistingDiagnosedJt); - int constructionExistingDiagnosedJtY = constructionExistingSuspectedJly + 120; - constructionExistingDiagnosedJt.setBounds(constructionExistingDiagnosedJlx, constructionExistingDiagnosedJtY, 300, 120); - - /** - * 治愈 - */ - constructionExistingHealJt = new JTextField(); - setTextFiledColor(constructionExistingHealJt); - int constructionExistingHealJtY = constructionExistingSuspectedJly + 120; - constructionExistingHealJt.setBounds(constructionExistingDiagnosedJlx + 350, constructionExistingHealJtY, 300, 120); - - /** - * 疑似 - */ - constructionExistingSuspectedJt = new JTextField(); - setTextFiledColor(constructionExistingSuspectedJt); - int constructionExistingSuspectedJtY = constructionExistingSuspectedJly + 120; - constructionExistingSuspectedJt.setBounds(constructionExistingDiagnosedJlx + 700, constructionExistingSuspectedJtY, 300, 120); - - /** * 附件四-疫情防控供电保障情况统计表 */ @@ -1697,7 +938,7 @@ public class DailyAction extends JFrame implements MouseListener { annexFourLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); annexFourLabel.setForeground(new Color(11, 24, 76)); int annexFourJlx = 30; - int annexFourJly = constructionExistingSuspectedJtY + 120; + int annexFourJly = verificationRemarkJtY + 120; annexFourLabel.setBounds(annexFourJlx, annexFourJly, 1000, 100); /** @@ -1862,159 +1103,6 @@ public class DailyAction extends JFrame implements MouseListener { int emergencyGeneratorJtY = electricallyVehiclesJly + 120; emergencyGeneratorJt.setBounds(verificationPersonNumJlx + 700, emergencyGeneratorJtY, 300, 120); - /** - * 附表五 入境筛查和集中观察场所供电保障情况表 - */ - JLabel annexFiveLabel = new JLabel("附表五-入境筛查和集中观察场所供电保障情况表"); - annexFiveLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - annexFiveLabel.setForeground(new Color(11, 24, 76)); - int annexFiveJlx = 30; - int annexFiveJly = emergencyGeneratorJtY + 120; - annexFiveLabel.setBounds(annexFiveJlx, annexFiveJly, 1000, 100); - - /** - * 入境筛查和集中观察场所数量-机场/港口 - */ - JLabel airportPortLabel = new JLabel("机场/港口"); - airportPortLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - airportPortLabel.setForeground(new Color(11, 24, 76)); - int airportPortJlx = 30; - int airportPortJly = annexFiveJly + 120; - airportPortLabel.setBounds(airportPortJlx, airportPortJly, 800, 100); - - /** - * 入境筛查和集中观察场所数量-场馆/医院 - */ - JLabel venueHospitalLabel = new JLabel("场馆/医院"); - venueHospitalLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - venueHospitalLabel.setForeground(new Color(11, 24, 76)); - int venueHospitalJlx = airportPortJlx + 350; - int venueHospitalJly = annexFiveJly + 120; - venueHospitalLabel.setBounds(venueHospitalJlx, venueHospitalJly, 800, 100); - - /** - * 入境筛查和集中观察场所数量-宾馆酒店 - */ - JLabel guesthouseHotelLabel = new JLabel("宾馆酒店"); - guesthouseHotelLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - guesthouseHotelLabel.setForeground(new Color(11, 24, 76)); - int guesthouseHotelJlx = venueHospitalJlx + 300; - int guesthouseHotelJly = annexFiveJly + 120; - guesthouseHotelLabel.setBounds(guesthouseHotelJlx, guesthouseHotelJly, 800, 100); - - /** - * 入境筛查和集中观察场所数量-保障人员 - */ - JLabel safeguardPersonnelLabel = new JLabel("保障人员"); - safeguardPersonnelLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - safeguardPersonnelLabel.setForeground(new Color(11, 24, 76)); - int safeguardPersonnelJlx = guesthouseHotelJlx + 350; - int safeguardPersonnelJly = annexFiveJly + 120; - safeguardPersonnelLabel.setBounds(safeguardPersonnelJlx, safeguardPersonnelJly, 800, 100); - - /** - * 入境筛查和集中观察场所数量-机场/港口 - */ - airportPortJt = new JTextField(); - setTextFiledColor(airportPortJt); - int airportPortJtY = safeguardPersonnelJly + 120; - airportPortJt.setBounds(airportPortJlx, airportPortJtY, 260, 120); - - /** - * 入境筛查和集中观察场所数量-场馆/医院 - */ - venueHospitalJt = new JTextField(); - setTextFiledColor(venueHospitalJt); - int venueHospitalJtY = safeguardPersonnelJly + 120; - venueHospitalJt.setBounds(airportPortJlx + 350, venueHospitalJtY, 260, 120); - - /** - * 入境筛查和集中观察场所数量-场馆/医院 - */ - guesthouseHotelJt = new JTextField(); - setTextFiledColor(guesthouseHotelJt); - int guesthouseHotelJtY = safeguardPersonnelJly + 120; - guesthouseHotelJt.setBounds(airportPortJlx + 650, guesthouseHotelJtY, 260, 120); - - /** - * 入境筛查和集中观察场所数量-保障人员 - */ - safeguardPersonnelJt = new JTextField(); - setTextFiledColor(safeguardPersonnelJt); - int safeguardPersonnelJtY = safeguardPersonnelJly + 120; - safeguardPersonnelJt.setBounds(airportPortJlx + 1000, safeguardPersonnelJtY, 260, 120); - - - - /** - * 投入力量-保电车辆 - */ - JLabel electricallyGuaranteedVehiclesLabel = new JLabel("保电车辆"); - electricallyGuaranteedVehiclesLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - electricallyGuaranteedVehiclesLabel.setForeground(new Color(11, 24, 76)); - int electricallyGuaranteedVehiclesJlx = 30; - int electricallyGuaranteedVehiclesJly = safeguardPersonnelJtY + 120; - electricallyGuaranteedVehiclesLabel.setBounds(electricallyGuaranteedVehiclesJlx, electricallyGuaranteedVehiclesJly, 800, 100); - - /** - * 投入力量-发电车 - */ - JLabel powerGenerationVehiclesLabel = new JLabel("发电车"); - powerGenerationVehiclesLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - powerGenerationVehiclesLabel.setForeground(new Color(11, 24, 76)); - int powerGenerationVehiclesJlx = electricallyGuaranteedVehiclesJlx + 350; - int powerGenerationVehiclesJly = safeguardPersonnelJtY + 120; - powerGenerationVehiclesLabel.setBounds(powerGenerationVehiclesJlx, powerGenerationVehiclesJly, 800, 100); - - /** - * 投入力量-发电机 - */ - JLabel dynamoLabel = new JLabel("发电机"); - dynamoLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - dynamoLabel.setForeground(new Color(11, 24, 76)); - int dynamoJlx = powerGenerationVehiclesJlx + 300; - int dynamoJly = safeguardPersonnelJtY + 120; - dynamoLabel.setBounds(dynamoJlx, dynamoJly, 800, 100); - - - /** - * 投入力量-保电车辆 - */ - electricallyGuaranteedVehiclesJt = new JTextField(); - setTextFiledColor(electricallyGuaranteedVehiclesJt); - int electricallyGuaranteedVehiclesJtY = dynamoJly + 120; - electricallyGuaranteedVehiclesJt.setBounds(airportPortJlx, electricallyGuaranteedVehiclesJtY, 260, 120); - - /** - * 投入力量-发电车 - */ - powerGenerationVehiclesJt = new JTextField(); - setTextFiledColor(powerGenerationVehiclesJt); - int powerGenerationVehiclesJtY = dynamoJly + 120; - powerGenerationVehiclesJt.setBounds(airportPortJlx + 350, powerGenerationVehiclesJtY, 260, 120); - - /** - * 投入力量-发电机 - */ - dynamoJt = new JTextField(); - setTextFiledColor(dynamoJt); - int dynamoJtY = dynamoJly + 120; - dynamoJt.setBounds(airportPortJlx + 650, dynamoJtY, 260, 120); - - JLabel fiveRemarkLabel = new JLabel("备注"); - fiveRemarkLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - fiveRemarkLabel.setForeground(new Color(11, 24, 76)); - int fiveRemarkJlx = 30; - int fiveRemarkJly = dynamoJtY + 120; - fiveRemarkLabel.setBounds(fiveRemarkJlx, fiveRemarkJly, 800, 100); - /** - * 备注 - */ - fiveRemarkJt = new JTextField(); - setTextFiledColor(fiveRemarkJt); - int fiveRemarkJtY = fiveRemarkJly + 120; - fiveRemarkJt.setBounds(30, fiveRemarkJtY, 1310, 120); - /** * 附件六-预警及应急响应情况跟踪表 */ @@ -2022,7 +1110,7 @@ public class DailyAction extends JFrame implements MouseListener { annexSixLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); annexSixLabel.setForeground(new Color(11, 24, 76)); int annexSixJlx = 30; - int annexSixJly = fiveRemarkJtY + 120; + int annexSixJly = emergencyGeneratorJtY + 120; annexSixLabel.setBounds(annexSixJlx, annexSixJly, 1000, 100); /** @@ -2211,7 +1299,7 @@ public class DailyAction extends JFrame implements MouseListener { * 变电站停运及恢复-新增-因灾停运-特高压 */ - powerSubstationAddOutageUvhJt = new JTextField(); + powerSubstationAddOutageUvhJt = new JTextField("0"); setTextFiledColor(powerSubstationAddOutageUvhJt); int powerSubstationAddOutageUvhJtY = threeKVDisasterJly + 120; powerSubstationAddOutageUvhJt.setBounds(annexSevenJlx, powerSubstationAddOutageUvhJtY, 240, 120); @@ -2219,7 +1307,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-因灾停运-500 */ - powerSubstationAddOutageFiveJt = new JTextField(); + powerSubstationAddOutageFiveJt = new JTextField("0"); setTextFiledColor(powerSubstationAddOutageFiveJt); int powerSubstationAddOutageFiveJtY = threeKVDisasterJly + 120; powerSubstationAddOutageFiveJt.setBounds(annexSevenJlx + 250, powerSubstationAddOutageFiveJtY, 240, 120); @@ -2227,7 +1315,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-因灾停运-300 */ - powerSubstationAddOutageTwoJt = new JTextField(); + powerSubstationAddOutageTwoJt = new JTextField("0"); setTextFiledColor(powerSubstationAddOutageTwoJt); int powerSubstationAddOutageTwoJtY = threeKVDisasterJly + 120; powerSubstationAddOutageTwoJt.setBounds(annexSevenJlx + 500, powerSubstationAddOutageTwoJtY, 240, 120); @@ -2235,7 +1323,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-因灾停运-110 */ - powerSubstationAddOutageOneJt = new JTextField(); + powerSubstationAddOutageOneJt = new JTextField("0"); setTextFiledColor(powerSubstationAddOutageOneJt); int powerSubstationAddOutageOneJtY = threeKVDisasterJly + 120; powerSubstationAddOutageOneJt.setBounds(annexSevenJlx + 750, powerSubstationAddOutageOneJtY, 240, 120); @@ -2243,7 +1331,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-因灾停运-35 */ - powerSubstationAddOutageThreeJt = new JTextField(); + powerSubstationAddOutageThreeJt = new JTextField("0"); setTextFiledColor(powerSubstationAddOutageThreeJt); int powerSubstationAddOutageThreeJtY = threeKVDisasterJly + 120; powerSubstationAddOutageThreeJt.setBounds(annexSevenJlx + 1000, powerSubstationAddOutageThreeJtY, 240, 120); @@ -2311,7 +1399,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-特高压 */ - powerSubstationAddRepairOutageUvhJt = new JTextField(); + powerSubstationAddRepairOutageUvhJt = new JTextField("0"); setTextFiledColor(powerSubstationAddRepairOutageUvhJt); int powerSubstationRepairOutageUvhJtY = powerSubstationAddRepairThreeJly + 120; powerSubstationAddRepairOutageUvhJt.setBounds(powerSubstationAddRepairUvhJlx, powerSubstationRepairOutageUvhJtY, 240, 120); @@ -2319,7 +1407,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-500 */ - powerSubstationAddRepairOutageFiveJt = new JTextField(); + powerSubstationAddRepairOutageFiveJt = new JTextField("0"); setTextFiledColor(powerSubstationAddRepairOutageFiveJt); int powerSubstationRepairOutageFiveJtY = powerSubstationAddRepairThreeJly + 120; powerSubstationAddRepairOutageFiveJt.setBounds(powerSubstationAddRepairUvhJlx + 250, powerSubstationRepairOutageFiveJtY, 240, 120); @@ -2327,7 +1415,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-300 */ - powerSubstationAddRepairOutageTwoJt = new JTextField(); + powerSubstationAddRepairOutageTwoJt = new JTextField("0"); setTextFiledColor(powerSubstationAddRepairOutageTwoJt); int powerSubstationAddRepairOutageTwoJtY = powerSubstationAddRepairThreeJly + 120; powerSubstationAddRepairOutageTwoJt.setBounds(powerSubstationAddRepairUvhJlx + 500, powerSubstationAddRepairOutageTwoJtY, 240, 120); @@ -2335,7 +1423,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-110 */ - powerSubstationAddRepairOutageOneJt = new JTextField(); + powerSubstationAddRepairOutageOneJt = new JTextField("0"); setTextFiledColor(powerSubstationAddRepairOutageOneJt); int powerSubstationAddRepairOutageOneJtY = powerSubstationAddRepairThreeJly + 120; powerSubstationAddRepairOutageOneJt.setBounds(powerSubstationAddRepairUvhJlx + 750, powerSubstationAddRepairOutageOneJtY, 240, 120); @@ -2343,7 +1431,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-35 */ - powerSubstationAddRepairOutageThreeJt = new JTextField(); + powerSubstationAddRepairOutageThreeJt = new JTextField("0"); setTextFiledColor(powerSubstationAddRepairOutageThreeJt); int powerSubstationAddRepairOutageThreeJtY = powerSubstationAddRepairThreeJly + 120; powerSubstationAddRepairOutageThreeJt.setBounds(powerSubstationAddRepairUvhJlx + 1000, powerSubstationAddRepairOutageThreeJtY, 240, 120); @@ -2411,7 +1499,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-特高压 */ - powerSubstationAddNoRepairOutageUvhJt = new JTextField(); + powerSubstationAddNoRepairOutageUvhJt = new JTextField("0"); setTextFiledColor(powerSubstationAddNoRepairOutageUvhJt); int powerSubstationNoRepairOutageUvhJtY = powerSubstationAddNoRepairThreeJly + 120; powerSubstationAddNoRepairOutageUvhJt.setBounds(powerSubstationAddNoRepairUvhJlx, powerSubstationNoRepairOutageUvhJtY, 240, 120); @@ -2419,7 +1507,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-500 */ - powerSubstationAddNoRepairOutageFiveJt = new JTextField(); + powerSubstationAddNoRepairOutageFiveJt = new JTextField("0"); setTextFiledColor(powerSubstationAddNoRepairOutageFiveJt); int powerSubstationNoRepairOutageFiveJtY = powerSubstationAddNoRepairThreeJly + 120; powerSubstationAddNoRepairOutageFiveJt.setBounds(powerSubstationAddNoRepairUvhJlx + 250, powerSubstationNoRepairOutageFiveJtY, 240, 120); @@ -2427,7 +1515,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-300 */ - powerSubstationAddNoRepairOutageTwoJt = new JTextField(); + powerSubstationAddNoRepairOutageTwoJt = new JTextField("0"); setTextFiledColor(powerSubstationAddNoRepairOutageTwoJt); int powerSubstationAddNoRepairOutageTwoJtY = powerSubstationAddNoRepairThreeJly + 120; powerSubstationAddNoRepairOutageTwoJt.setBounds(powerSubstationAddNoRepairUvhJlx + 500, powerSubstationAddNoRepairOutageTwoJtY, 240, 120); @@ -2435,7 +1523,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-110 */ - powerSubstationAddNoRepairOutageOneJt = new JTextField(); + powerSubstationAddNoRepairOutageOneJt = new JTextField("0"); setTextFiledColor(powerSubstationAddNoRepairOutageOneJt); int powerSubstationAddNoRepairOutageOneJtY = powerSubstationAddNoRepairThreeJly + 120; powerSubstationAddNoRepairOutageOneJt.setBounds(powerSubstationAddNoRepairUvhJlx + 750, powerSubstationAddNoRepairOutageOneJtY, 240, 120); @@ -2443,7 +1531,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-35 */ - powerSubstationAddNoRepairOutageThreeJt = new JTextField(); + powerSubstationAddNoRepairOutageThreeJt = new JTextField("0"); setTextFiledColor(powerSubstationAddNoRepairOutageThreeJt); int powerSubstationAddNoRepairOutageThreeJtY = powerSubstationAddNoRepairThreeJly + 120; powerSubstationAddNoRepairOutageThreeJt.setBounds(powerSubstationAddNoRepairUvhJlx + 1000, powerSubstationAddNoRepairOutageThreeJtY, 240, 120); @@ -2523,7 +1611,7 @@ public class DailyAction extends JFrame implements MouseListener { * 变电站停运及恢复-新增-因灾停运-特高压 */ - powerSubstationCumulativeOutageUvhJt = new JTextField(); + powerSubstationCumulativeOutageUvhJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeOutageUvhJt); int powerSubstationCumulativeOutageUvhJtY = threeKVDisasterCumulativeJly + 120; powerSubstationCumulativeOutageUvhJt.setBounds(annexSevenCumulativeJlx, powerSubstationCumulativeOutageUvhJtY, 240, 120); @@ -2531,7 +1619,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-因灾停运-500 */ - powerSubstationCumulativeOutageFiveJt = new JTextField(); + powerSubstationCumulativeOutageFiveJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeOutageFiveJt); int powerSubstationCumulativeOutageFiveJtY = threeKVDisasterCumulativeJly + 120; powerSubstationCumulativeOutageFiveJt.setBounds(annexSevenCumulativeJlx + 250, powerSubstationCumulativeOutageFiveJtY, 240, 120); @@ -2539,7 +1627,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-因灾停运-300 */ - powerSubstationCumulativeOutageTwoJt = new JTextField(); + powerSubstationCumulativeOutageTwoJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeOutageTwoJt); int powerSubstationCumulativeOutageTwoJtY = threeKVDisasterCumulativeJly + 120; powerSubstationCumulativeOutageTwoJt.setBounds(annexSevenCumulativeJlx + 500, powerSubstationCumulativeOutageTwoJtY, 240, 120); @@ -2547,7 +1635,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-因灾停运-110 */ - powerSubstationCumulativeOutageOneJt = new JTextField(); + powerSubstationCumulativeOutageOneJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeOutageOneJt); int powerSubstationCumulativeOutageOneJtY = threeKVDisasterCumulativeJly + 120; powerSubstationCumulativeOutageOneJt.setBounds(annexSevenCumulativeJlx + 750, powerSubstationCumulativeOutageOneJtY, 240, 120); @@ -2555,7 +1643,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-因灾停运-35 */ - powerSubstationCumulativeOutageThreeJt = new JTextField(); + powerSubstationCumulativeOutageThreeJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeOutageThreeJt); int powerSubstationCumulativeOutageThreeJtY = threeKVDisasterCumulativeJly + 120; powerSubstationCumulativeOutageThreeJt.setBounds(annexSevenCumulativeJlx + 1000, powerSubstationCumulativeOutageThreeJtY, 240, 120); @@ -2623,7 +1711,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-特高压 */ - powerSubstationCumulativeRepairOutageUvhJt = new JTextField(); + powerSubstationCumulativeRepairOutageUvhJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeRepairOutageUvhJt); int powerSubstationCumulativeRepairOutageUvhJtY = powerSubstationCumulativeRepairThreeJly + 120; powerSubstationCumulativeRepairOutageUvhJt.setBounds(powerSubstationAddRepairUvhJlx, powerSubstationCumulativeRepairOutageUvhJtY, 240, 120); @@ -2631,7 +1719,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-500 */ - powerSubstationCumulativeRepairOutageFiveJt = new JTextField(); + powerSubstationCumulativeRepairOutageFiveJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeRepairOutageFiveJt); int powerSubstationCumulativeRepairOutageFiveJtY = powerSubstationCumulativeRepairThreeJly + 120; powerSubstationCumulativeRepairOutageFiveJt.setBounds(powerSubstationCumulativeRepairUvhJlx + 250, powerSubstationCumulativeRepairOutageFiveJtY, 240, 120); @@ -2639,7 +1727,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-300 */ - powerSubstationCumulativeRepairOutageTwoJt = new JTextField(); + powerSubstationCumulativeRepairOutageTwoJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeRepairOutageTwoJt); int powerSubstationCumulativeRepairOutageTwoJtY = powerSubstationCumulativeRepairThreeJly + 120; powerSubstationCumulativeRepairOutageTwoJt.setBounds(powerSubstationCumulativeRepairUvhJlx + 500, powerSubstationCumulativeRepairOutageTwoJtY, 240, 120); @@ -2647,7 +1735,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-110 */ - powerSubstationCumulativeRepairOutageOneJt = new JTextField(); + powerSubstationCumulativeRepairOutageOneJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeRepairOutageOneJt); int powerSubstationCumulativeRepairOutageOneJtY = powerSubstationCumulativeRepairThreeJly + 120; powerSubstationCumulativeRepairOutageOneJt.setBounds(powerSubstationCumulativeRepairUvhJlx + 750, powerSubstationCumulativeRepairOutageOneJtY, 240, 120); @@ -2655,7 +1743,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-35 */ - powerSubstationCumulativeRepairOutageThreeJt = new JTextField(); + powerSubstationCumulativeRepairOutageThreeJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeRepairOutageThreeJt); int powerSubstationCumulativeRepairOutageThreeJtY = powerSubstationCumulativeRepairThreeJly + 120; powerSubstationCumulativeRepairOutageThreeJt.setBounds(powerSubstationCumulativeRepairUvhJlx + 1000, powerSubstationCumulativeRepairOutageThreeJtY, 240, 120); @@ -2723,7 +1811,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-特高压 */ - powerSubstationCumulativeNoRepairOutageUvhJt = new JTextField(); + powerSubstationCumulativeNoRepairOutageUvhJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeNoRepairOutageUvhJt); int powerSubstationCumulativeNoRepairOutageUvhJtY = powerSubstationCumulativeNoRepairThreeJly + 120; powerSubstationCumulativeNoRepairOutageUvhJt.setBounds(powerSubstationCumulativeNoRepairUvhJlx, powerSubstationCumulativeNoRepairOutageUvhJtY, 240, 120); @@ -2731,7 +1819,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-500 */ - powerSubstationCumulativeNoRepairOutageFiveJt = new JTextField(); + powerSubstationCumulativeNoRepairOutageFiveJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeNoRepairOutageFiveJt); int powerSubstationCumulativeNoRepairOutageFiveJtY = powerSubstationCumulativeNoRepairThreeJly + 120; powerSubstationCumulativeNoRepairOutageFiveJt.setBounds(powerSubstationCumulativeNoRepairUvhJlx + 250, powerSubstationCumulativeNoRepairOutageFiveJtY, 240, 120); @@ -2739,7 +1827,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-300 */ - powerSubstationCumulativeNoRepairOutageTwoJt = new JTextField(); + powerSubstationCumulativeNoRepairOutageTwoJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeNoRepairOutageTwoJt); int powerSubstationCumulativeNoRepairOutageTwoJtY = powerSubstationCumulativeNoRepairThreeJly + 120; powerSubstationCumulativeNoRepairOutageTwoJt.setBounds(powerSubstationCumulativeNoRepairUvhJlx + 500, powerSubstationCumulativeNoRepairOutageTwoJtY, 240, 120); @@ -2747,7 +1835,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-110 */ - powerSubstationCumulativeNoRepairOutageOneJt = new JTextField(); + powerSubstationCumulativeNoRepairOutageOneJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeNoRepairOutageOneJt); int powerSubstationCumulativeNoRepairOutageOneJtY = powerSubstationCumulativeNoRepairThreeJly + 120; powerSubstationCumulativeNoRepairOutageOneJt.setBounds(powerSubstationCumulativeNoRepairUvhJlx + 750, powerSubstationCumulativeNoRepairOutageOneJtY, 240, 120); @@ -2755,7 +1843,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 变电站停运及恢复-新增-抢修恢复-35 */ - powerSubstationCumulativeNoRepairOutageThreeJt = new JTextField(); + powerSubstationCumulativeNoRepairOutageThreeJt = new JTextField("0"); setTextFiledColor(powerSubstationCumulativeNoRepairOutageThreeJt); int powerSubstationCumulativeNoRepairOutageThreeJtY = powerSubstationCumulativeNoRepairThreeJly + 120; powerSubstationCumulativeNoRepairOutageThreeJt.setBounds(powerSubstationCumulativeNoRepairUvhJlx + 1000, powerSubstationCumulativeNoRepairOutageThreeJtY, 240, 120); @@ -2842,7 +1930,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-因灾停运-特高压 */ - transmitElectricityAddOutageUvhJt = new JTextField(); + transmitElectricityAddOutageUvhJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddOutageUvhJt); int transmitElectricityAddOutageUvhJtY = threeKVDisasterEightJly + 120; transmitElectricityAddOutageUvhJt.setBounds(annexEightJlx, transmitElectricityAddOutageUvhJtY, 240, 120); @@ -2850,7 +1938,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-因灾停运-500 */ - transmitElectricityAddOutageFiveJt = new JTextField(); + transmitElectricityAddOutageFiveJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddOutageFiveJt); int transmitElectricityAddOutageFiveJtY = threeKVDisasterEightJly + 120; transmitElectricityAddOutageFiveJt.setBounds(annexEightJlx + 250, transmitElectricityAddOutageFiveJtY, 240, 120); @@ -2858,7 +1946,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-因灾停运-300 */ - transmitElectricityAddOutageTwoJt = new JTextField(); + transmitElectricityAddOutageTwoJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddOutageTwoJt); int transmitElectricityAddOutageTwoJtY = threeKVDisasterEightJly + 120; transmitElectricityAddOutageTwoJt.setBounds(annexEightJlx + 500, transmitElectricityAddOutageTwoJtY, 240, 120); @@ -2866,7 +1954,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-因灾停运-110 */ - transmitElectricityAddOutageOneJt = new JTextField(); + transmitElectricityAddOutageOneJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddOutageOneJt); int transmitElectricityAddOutageOneJtY = threeKVDisasterEightJly + 120; transmitElectricityAddOutageOneJt.setBounds(annexEightJlx + 750, transmitElectricityAddOutageOneJtY, 240, 120); @@ -2874,14 +1962,14 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-因灾停运-35 */ - transmitElectricityAddOutageThreeJt = new JTextField(); + transmitElectricityAddOutageThreeJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddOutageThreeJt); int transmitElectricityAddOutageThreeJtY = threeKVDisasterEightJly + 120; transmitElectricityAddOutageThreeJt.setBounds(annexEightJlx + 1000, transmitElectricityAddOutageThreeJtY, 240, 120); /** * 输配电线路停运及恢复-新增-因灾停运-10 */ - transmitElectricityAddOutageTenJt = new JTextField(); + transmitElectricityAddOutageTenJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddOutageTenJt); int transmitElectricityAddOutageTenJtY = threeKVDisasterEightJly + 120; transmitElectricityAddOutageTenJt.setBounds(annexEightJlx + 1250, transmitElectricityAddOutageTenJtY, 240, 120); @@ -2958,7 +2046,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-特高压 */ - transmitElectricityAddRepairOutageUvhJt = new JTextField(); + transmitElectricityAddRepairOutageUvhJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddRepairOutageUvhJt); int transmitElectricityRepairOutageUvhJtY = transmitElectricityAddRepairTenJly + 120; transmitElectricityAddRepairOutageUvhJt.setBounds(transmitElectricityAddRepairUvhJlx, transmitElectricityRepairOutageUvhJtY, 240, 120); @@ -2966,7 +2054,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-500 */ - transmitElectricityAddRepairOutageFiveJt = new JTextField(); + transmitElectricityAddRepairOutageFiveJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddRepairOutageFiveJt); int transmitElectricityRepairOutageFiveJtY = transmitElectricityAddRepairTenJly + 120; transmitElectricityAddRepairOutageFiveJt.setBounds(transmitElectricityAddRepairUvhJlx + 250, transmitElectricityRepairOutageFiveJtY, 240, 120); @@ -2974,7 +2062,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-300 */ - transmitElectricityAddRepairOutageTwoJt = new JTextField(); + transmitElectricityAddRepairOutageTwoJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddRepairOutageTwoJt); int transmitElectricityAddRepairOutageTwoJtY = transmitElectricityAddRepairTenJly + 120; transmitElectricityAddRepairOutageTwoJt.setBounds(transmitElectricityAddRepairUvhJlx + 500, transmitElectricityAddRepairOutageTwoJtY, 240, 120); @@ -2982,7 +2070,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-110 */ - transmitElectricityAddRepairOutageOneJt = new JTextField(); + transmitElectricityAddRepairOutageOneJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddRepairOutageOneJt); int transmitElectricityAddRepairOutageOneJtY = transmitElectricityAddRepairTenJly + 120; transmitElectricityAddRepairOutageOneJt.setBounds(transmitElectricityAddRepairUvhJlx + 750, transmitElectricityAddRepairOutageOneJtY, 240, 120); @@ -2990,14 +2078,14 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-35 */ - transmitElectricityAddRepairOutageThreeJt = new JTextField(); + transmitElectricityAddRepairOutageThreeJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddRepairOutageThreeJt); int transmitElectricityAddRepairOutageThreeJtY = transmitElectricityAddRepairTenJly + 120; transmitElectricityAddRepairOutageThreeJt.setBounds(transmitElectricityAddRepairUvhJlx + 1000, transmitElectricityAddRepairOutageThreeJtY, 240, 120); /** * 输配电线路停运及恢复-新增-抢修恢复-10 */ - transmitElectricityAddRepairOutageTenJt = new JTextField(); + transmitElectricityAddRepairOutageTenJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddRepairOutageTenJt); int transmitElectricityAddRepairOutageTenJtY = transmitElectricityAddRepairTenJly + 120; transmitElectricityAddRepairOutageTenJt.setBounds(transmitElectricityAddRepairUvhJlx + 1250, transmitElectricityAddRepairOutageTenJtY, 240, 120); @@ -3074,7 +2162,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-特高压 */ - transmitElectricityAddNoRepairOutageUvhJt = new JTextField(); + transmitElectricityAddNoRepairOutageUvhJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddNoRepairOutageUvhJt); int transmitElectricityNoRepairOutageUvhJtY = transmitElectricityAddNoRepairThreeJly + 120; transmitElectricityAddNoRepairOutageUvhJt.setBounds(transmitElectricityAddNoRepairUvhJlx, transmitElectricityNoRepairOutageUvhJtY, 240, 120); @@ -3082,7 +2170,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-500 */ - transmitElectricityAddNoRepairOutageFiveJt = new JTextField(); + transmitElectricityAddNoRepairOutageFiveJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddNoRepairOutageFiveJt); int transmitElectricityNoRepairOutageFiveJtY = transmitElectricityAddNoRepairThreeJly + 120; transmitElectricityAddNoRepairOutageFiveJt.setBounds(transmitElectricityAddNoRepairUvhJlx + 250, transmitElectricityNoRepairOutageFiveJtY, 240, 120); @@ -3090,7 +2178,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-300 */ - transmitElectricityAddNoRepairOutageTwoJt = new JTextField(); + transmitElectricityAddNoRepairOutageTwoJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddNoRepairOutageTwoJt); int transmitElectricityAddNoRepairOutageTwoJtY = transmitElectricityAddNoRepairThreeJly + 120; transmitElectricityAddNoRepairOutageTwoJt.setBounds(transmitElectricityAddNoRepairUvhJlx + 500, transmitElectricityAddNoRepairOutageTwoJtY, 240, 120); @@ -3098,7 +2186,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-110 */ - transmitElectricityAddNoRepairOutageOneJt = new JTextField(); + transmitElectricityAddNoRepairOutageOneJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddNoRepairOutageOneJt); int transmitElectricityAddNoRepairOutageOneJtY = transmitElectricityAddNoRepairThreeJly + 120; transmitElectricityAddNoRepairOutageOneJt.setBounds(transmitElectricityAddNoRepairUvhJlx + 750, transmitElectricityAddNoRepairOutageOneJtY, 240, 120); @@ -3106,14 +2194,14 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-35 */ - transmitElectricityAddNoRepairOutageThreeJt = new JTextField(); + transmitElectricityAddNoRepairOutageThreeJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddNoRepairOutageThreeJt); int transmitElectricityAddNoRepairOutageThreeJtY = transmitElectricityAddNoRepairThreeJly + 120; transmitElectricityAddNoRepairOutageThreeJt.setBounds(transmitElectricityAddNoRepairUvhJlx + 1000, transmitElectricityAddNoRepairOutageThreeJtY, 240, 120); /** * 输配电线路停运及恢复-新增-抢修恢复-10 */ - transmitElectricityAddNoRepairOutageTenJt = new JTextField(); + transmitElectricityAddNoRepairOutageTenJt = new JTextField("0"); setTextFiledColor(transmitElectricityAddNoRepairOutageTenJt); int transmitElectricityAddNoRepairOutageTenJtY = transmitElectricityAddNoRepairThreeJly + 120; transmitElectricityAddNoRepairOutageTenJt.setBounds(transmitElectricityAddNoRepairUvhJlx + 1250, transmitElectricityAddNoRepairOutageTenJtY, 240, 120); @@ -3202,7 +2290,7 @@ public class DailyAction extends JFrame implements MouseListener { * 输配电线路停运及恢复-新增-因灾停运-特高压 */ - transmitElectricityCumulativeOutageUvhJt = new JTextField(); + transmitElectricityCumulativeOutageUvhJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeOutageUvhJt); int transmitElectricityCumulativeOutageUvhJtY = tenKVDisasterEightCumulativeJly + 120; transmitElectricityCumulativeOutageUvhJt.setBounds(annexEightCumulativeJlx, transmitElectricityCumulativeOutageUvhJtY, 240, 120); @@ -3210,7 +2298,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-因灾停运-500 */ - transmitElectricityCumulativeOutageFiveJt = new JTextField(); + transmitElectricityCumulativeOutageFiveJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeOutageFiveJt); int transmitElectricityCumulativeOutageFiveJtY = tenKVDisasterEightCumulativeJly + 120; transmitElectricityCumulativeOutageFiveJt.setBounds(annexEightCumulativeJlx + 250, transmitElectricityCumulativeOutageFiveJtY, 240, 120); @@ -3218,7 +2306,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-因灾停运-300 */ - transmitElectricityCumulativeOutageTwoJt = new JTextField(); + transmitElectricityCumulativeOutageTwoJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeOutageTwoJt); int transmitElectricityCumulativeOutageTwoJtY = tenKVDisasterEightCumulativeJly + 120; transmitElectricityCumulativeOutageTwoJt.setBounds(annexEightCumulativeJlx + 500, transmitElectricityCumulativeOutageTwoJtY, 240, 120); @@ -3226,7 +2314,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-因灾停运-110 */ - transmitElectricityCumulativeOutageOneJt = new JTextField(); + transmitElectricityCumulativeOutageOneJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeOutageOneJt); int transmitElectricityCumulativeOutageOneJtY = tenKVDisasterEightCumulativeJly + 120; transmitElectricityCumulativeOutageOneJt.setBounds(annexEightCumulativeJlx + 750, transmitElectricityCumulativeOutageOneJtY, 240, 120); @@ -3234,14 +2322,14 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-因灾停运-35 */ - transmitElectricityCumulativeOutageThreeJt = new JTextField(); + transmitElectricityCumulativeOutageThreeJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeOutageThreeJt); int transmitElectricityCumulativeOutageThreeJtY = tenKVDisasterEightCumulativeJly + 120; transmitElectricityCumulativeOutageThreeJt.setBounds(annexEightCumulativeJlx + 1000, transmitElectricityCumulativeOutageThreeJtY, 240, 120); /** * 输配电线路停运及恢复-新增-因灾停运-10 */ - transmitElectricityCumulativeOutageTenJt = new JTextField(); + transmitElectricityCumulativeOutageTenJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeOutageTenJt); int transmitElectricityCumulativeOutageTenJtY = tenKVDisasterEightCumulativeJly + 120; transmitElectricityCumulativeOutageTenJt.setBounds(annexEightCumulativeJlx + 1250, transmitElectricityCumulativeOutageTenJtY, 240, 120); @@ -3318,7 +2406,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-特高压 */ - transmitElectricityCumulativeRepairOutageUvhJt = new JTextField(); + transmitElectricityCumulativeRepairOutageUvhJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeRepairOutageUvhJt); int transmitElectricityCumulativeRepairOutageUvhJtY = transmitElectricityCumulativeRepairTenJly + 120; transmitElectricityCumulativeRepairOutageUvhJt.setBounds(transmitElectricityAddRepairUvhJlx, transmitElectricityCumulativeRepairOutageUvhJtY, 240, 120); @@ -3326,7 +2414,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-500 */ - transmitElectricityCumulativeRepairOutageFiveJt = new JTextField(); + transmitElectricityCumulativeRepairOutageFiveJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeRepairOutageFiveJt); int transmitElectricityCumulativeRepairOutageFiveJtY = transmitElectricityCumulativeRepairTenJly + 120; transmitElectricityCumulativeRepairOutageFiveJt.setBounds(transmitElectricityCumulativeRepairUvhJlx + 250, transmitElectricityCumulativeRepairOutageFiveJtY, 240, 120); @@ -3334,7 +2422,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-300 */ - transmitElectricityCumulativeRepairOutageTwoJt = new JTextField(); + transmitElectricityCumulativeRepairOutageTwoJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeRepairOutageTwoJt); int transmitElectricityCumulativeRepairOutageTwoJtY = transmitElectricityCumulativeRepairTenJly + 120; transmitElectricityCumulativeRepairOutageTwoJt.setBounds(transmitElectricityCumulativeRepairUvhJlx + 500, transmitElectricityCumulativeRepairOutageTwoJtY, 240, 120); @@ -3342,7 +2430,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-110 */ - transmitElectricityCumulativeRepairOutageOneJt = new JTextField(); + transmitElectricityCumulativeRepairOutageOneJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeRepairOutageOneJt); int transmitElectricityCumulativeRepairOutageOneJtY = transmitElectricityCumulativeRepairTenJly + 120; transmitElectricityCumulativeRepairOutageOneJt.setBounds(transmitElectricityCumulativeRepairUvhJlx + 750, transmitElectricityCumulativeRepairOutageOneJtY, 240, 120); @@ -3350,14 +2438,14 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-新增-抢修恢复-35 */ - transmitElectricityCumulativeRepairOutageThreeJt = new JTextField(); + transmitElectricityCumulativeRepairOutageThreeJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeRepairOutageThreeJt); int transmitElectricityCumulativeRepairOutageThreeJtY = transmitElectricityCumulativeRepairTenJly + 120; transmitElectricityCumulativeRepairOutageThreeJt.setBounds(transmitElectricityCumulativeRepairUvhJlx + 1000, transmitElectricityCumulativeRepairOutageThreeJtY, 240, 120); /** * 输配电线路停运及恢复-新增-抢修恢复-10 */ - transmitElectricityCumulativeRepairOutageTenJt = new JTextField(); + transmitElectricityCumulativeRepairOutageTenJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeRepairOutageTenJt); int transmitElectricityCumulativeRepairOutageTenJtY = transmitElectricityCumulativeRepairTenJly + 120; transmitElectricityCumulativeRepairOutageTenJt.setBounds(transmitElectricityCumulativeRepairUvhJlx + 1250, transmitElectricityCumulativeRepairOutageTenJtY, 240, 120); @@ -3434,7 +2522,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-累计-尚未恢复-特高压 */ - transmitElectricityCumulativeNoRepairOutageUvhJt = new JTextField(); + transmitElectricityCumulativeNoRepairOutageUvhJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeNoRepairOutageUvhJt); int transmitElectricityCumulativeNoRepairOutageUvhJtY = transmitElectricityCumulativeNoRepairTenJly + 120; transmitElectricityCumulativeNoRepairOutageUvhJt.setBounds(transmitElectricityCumulativeNoRepairUvhJlx, transmitElectricityCumulativeNoRepairOutageUvhJtY, 240, 120); @@ -3442,7 +2530,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-累计-尚未恢复-500 */ - transmitElectricityCumulativeNoRepairOutageFiveJt = new JTextField(); + transmitElectricityCumulativeNoRepairOutageFiveJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeNoRepairOutageFiveJt); int transmitElectricityCumulativeNoRepairOutageFiveJtY = transmitElectricityCumulativeNoRepairTenJly + 120; transmitElectricityCumulativeNoRepairOutageFiveJt.setBounds(transmitElectricityCumulativeNoRepairUvhJlx + 250, transmitElectricityCumulativeNoRepairOutageFiveJtY, 240, 120); @@ -3450,7 +2538,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-累计-尚未恢复-300 */ - transmitElectricityCumulativeNoRepairOutageTwoJt = new JTextField(); + transmitElectricityCumulativeNoRepairOutageTwoJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeNoRepairOutageTwoJt); int transmitElectricityCumulativeNoRepairOutageTwoJtY = transmitElectricityCumulativeNoRepairTenJly + 120; transmitElectricityCumulativeNoRepairOutageTwoJt.setBounds(transmitElectricityCumulativeNoRepairUvhJlx + 500, transmitElectricityCumulativeNoRepairOutageTwoJtY, 240, 120); @@ -3458,7 +2546,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-累计-尚未恢复-110 */ - transmitElectricityCumulativeNoRepairOutageOneJt = new JTextField(); + transmitElectricityCumulativeNoRepairOutageOneJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeNoRepairOutageOneJt); int transmitElectricityCumulativeNoRepairOutageOneJtY = transmitElectricityCumulativeNoRepairTenJly + 120; transmitElectricityCumulativeNoRepairOutageOneJt.setBounds(transmitElectricityCumulativeNoRepairUvhJlx + 750, transmitElectricityCumulativeNoRepairOutageOneJtY, 240, 120); @@ -3466,14 +2554,14 @@ public class DailyAction extends JFrame implements MouseListener { /** * 输配电线路停运及恢复-累计-尚未恢复-35 */ - transmitElectricityCumulativeNoRepairOutageThreeJt = new JTextField(); + transmitElectricityCumulativeNoRepairOutageThreeJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeNoRepairOutageThreeJt); int transmitElectricityCumulativeNoRepairOutageThreeJtY = transmitElectricityCumulativeNoRepairTenJly + 120; transmitElectricityCumulativeNoRepairOutageThreeJt.setBounds(transmitElectricityCumulativeNoRepairUvhJlx + 1000, transmitElectricityCumulativeNoRepairOutageThreeJtY, 240, 120); /** * 输配电线路停运及恢复-累计-尚未恢复-10 */ - transmitElectricityCumulativeNoRepairOutageTenJt = new JTextField(); + transmitElectricityCumulativeNoRepairOutageTenJt = new JTextField("0"); setTextFiledColor(transmitElectricityCumulativeNoRepairOutageTenJt); int transmitElectricityCumulativeNoRepairOutageTenJtY = transmitElectricityCumulativeNoRepairTenJly + 120; transmitElectricityCumulativeNoRepairOutageTenJt.setBounds(transmitElectricityCumulativeNoRepairUvhJlx + 1250, transmitElectricityCumulativeNoRepairOutageTenJtY, 240, 120); @@ -3522,7 +2610,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 因灾停运-台区 */ - nineAddTaiDistrictDisasterJt = new JTextField(); + nineAddTaiDistrictDisasterJt = new JTextField("0"); setTextFiledColor(nineAddTaiDistrictDisasterJt); int nineAddTaiDistrictDisasterJtY = personnelAddNineDisasterJly + 120; nineAddTaiDistrictDisasterJt.setBounds(taiDistrictAddNineDisasterJlx, nineAddTaiDistrictDisasterJtY, 240, 120); @@ -3530,7 +2618,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 因灾停运-用户 */ - nineAddPersonnelDisasterJt = new JTextField(); + nineAddPersonnelDisasterJt = new JTextField("0"); setTextFiledColor(nineAddPersonnelDisasterJt); int nineAddPersonnelDisasterJtY = personnelAddNineDisasterJly + 120; nineAddPersonnelDisasterJt.setBounds(taiDistrictAddNineDisasterJlx + 250, nineAddPersonnelDisasterJtY, 240, 120); @@ -3567,7 +2655,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 抢修恢复-台区 */ - nineAddTaiDistrictRepairJt = new JTextField(); + nineAddTaiDistrictRepairJt = new JTextField("0"); setTextFiledColor(nineAddTaiDistrictRepairJt); int nineAddTaiDistrictRepairJtY = personnelAddNineRepairJly + 120; nineAddTaiDistrictRepairJt.setBounds(taiDistrictAddNineRepairJlx, nineAddTaiDistrictRepairJtY, 240, 120); @@ -3575,7 +2663,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 抢修恢复-用户 */ - nineAddPersonnelRepairJt = new JTextField(); + nineAddPersonnelRepairJt = new JTextField("0"); setTextFiledColor(nineAddPersonnelRepairJt); int nineAddPersonnelRepairJtY = personnelAddNineRepairJly + 120; nineAddPersonnelRepairJt.setBounds(taiDistrictAddNineRepairJlx + 250, nineAddPersonnelRepairJtY, 240, 120); @@ -3611,7 +2699,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 抢修恢复-台区 */ - nineAddTaiDistrictNoRepairJt = new JTextField(); + nineAddTaiDistrictNoRepairJt = new JTextField("0"); setTextFiledColor(nineAddTaiDistrictNoRepairJt); int nineAddTaiDistrictNoRepairJtY = personnelAddNineNoRepairJly + 120; nineAddTaiDistrictNoRepairJt.setBounds(taiDistrictAddNineNoRepairJlx, nineAddTaiDistrictNoRepairJtY, 240, 120); @@ -3619,7 +2707,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 抢修恢复-用户 */ - nineAddPersonnelNoRepairJt = new JTextField(); + nineAddPersonnelNoRepairJt = new JTextField("0"); setTextFiledColor(nineAddPersonnelNoRepairJt); int nineAddPersonnelNoRepairJtY = personnelAddNineNoRepairJly + 120; nineAddPersonnelNoRepairJt.setBounds(taiDistrictAddNineNoRepairJlx + 250, nineAddPersonnelNoRepairJtY, 240, 120); @@ -3655,7 +2743,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 出动抢修力量-人员 */ - powerPersonnelAddNineJt = new JTextField(); + powerPersonnelAddNineJt = new JTextField("0"); setTextFiledColor(powerPersonnelAddNineJt); int powerPersonnelAddNineJtY = powerVehicleAddNineJly + 120; powerPersonnelAddNineJt.setBounds(powerPersonnelAddNineJlx, powerPersonnelAddNineJtY, 240, 120); @@ -3663,7 +2751,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 出动抢修力量-车辆 */ - powerVehicleAddNineJt = new JTextField(); + powerVehicleAddNineJt = new JTextField("0"); setTextFiledColor(powerVehicleAddNineJt); int powerVehicleAddNineJtY = powerVehicleAddNineJly + 120; powerVehicleAddNineJt.setBounds(powerPersonnelAddNineJlx + 250, powerVehicleAddNineJtY, 240, 120); @@ -3710,7 +2798,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 因灾停运-台区 */ - nineCumulativeTaiDistrictDisasterJt = new JTextField(); + nineCumulativeTaiDistrictDisasterJt = new JTextField("0"); setTextFiledColor(nineCumulativeTaiDistrictDisasterJt); int nineCumulativeTaiDistrictDisasterJtY = personnelCumulativeNineDisasterJly + 120; nineCumulativeTaiDistrictDisasterJt.setBounds(taiDistrictCumulativeNineDisasterJlx, nineCumulativeTaiDistrictDisasterJtY, 240, 120); @@ -3718,7 +2806,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 因灾停运-用户 */ - nineCumulativePersonnelDisasterJt = new JTextField(); + nineCumulativePersonnelDisasterJt = new JTextField("0"); setTextFiledColor(nineCumulativePersonnelDisasterJt); int nineCumulativePersonnelDisasterJtY = personnelCumulativeNineDisasterJly + 120; nineCumulativePersonnelDisasterJt.setBounds(taiDistrictCumulativeNineDisasterJlx + 250, nineCumulativePersonnelDisasterJtY, 240, 120); @@ -3755,7 +2843,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 抢修恢复-台区 */ - nineCumulativeTaiDistrictRepairJt = new JTextField(); + nineCumulativeTaiDistrictRepairJt = new JTextField("0"); setTextFiledColor(nineCumulativeTaiDistrictRepairJt); int nineCumulativeTaiDistrictRepairJtY = personnelCumulativeNineRepairJly + 120; nineCumulativeTaiDistrictRepairJt.setBounds(taiDistrictCumulativeNineRepairJlx, nineCumulativeTaiDistrictRepairJtY, 240, 120); @@ -3763,7 +2851,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 抢修恢复-用户 */ - nineCumulativePersonnelRepairJt = new JTextField(); + nineCumulativePersonnelRepairJt = new JTextField("0"); setTextFiledColor(nineCumulativePersonnelRepairJt); int nineCumulativePersonnelRepairJtY = personnelCumulativeNineRepairJly + 120; nineCumulativePersonnelRepairJt.setBounds(taiDistrictCumulativeNineRepairJlx + 250, nineCumulativePersonnelRepairJtY, 240, 120); @@ -3799,7 +2887,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 抢修恢复-台区 */ - nineCumulativeTaiDistrictNoRepairJt = new JTextField(); + nineCumulativeTaiDistrictNoRepairJt = new JTextField("0"); setTextFiledColor(nineCumulativeTaiDistrictNoRepairJt); int nineCumulativeTaiDistrictNoRepairJtY = personnelCumulativeNineNoRepairJly + 120; nineCumulativeTaiDistrictNoRepairJt.setBounds(taiDistrictCumulativeNineNoRepairJlx, nineCumulativeTaiDistrictNoRepairJtY, 240, 120); @@ -3807,7 +2895,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 抢修恢复-用户 */ - nineCumulativePersonnelNoRepairJt = new JTextField(); + nineCumulativePersonnelNoRepairJt = new JTextField("0"); setTextFiledColor(nineCumulativePersonnelNoRepairJt); int nineCumulativePersonnelNoRepairJtY = personnelCumulativeNineNoRepairJly + 120; nineCumulativePersonnelNoRepairJt.setBounds(taiDistrictCumulativeNineNoRepairJlx + 250, nineCumulativePersonnelNoRepairJtY, 240, 120); @@ -3843,7 +2931,7 @@ public class DailyAction extends JFrame implements MouseListener { /** * 出动抢修力量-人员 */ - powerPersonnelCumulativeNineJt = new JTextField(); + powerPersonnelCumulativeNineJt = new JTextField("0"); setTextFiledColor(powerPersonnelCumulativeNineJt); int powerPersonnelCumulativeNineJtY = powerVehicleCumulativeNineJly + 120; powerPersonnelCumulativeNineJt.setBounds(powerPersonnelCumulativeNineJlx, powerPersonnelCumulativeNineJtY, 240, 120); @@ -3851,927 +2939,20 @@ public class DailyAction extends JFrame implements MouseListener { /** * 出动抢修力量-车辆 */ - powerVehicleCumulativeNineJt = new JTextField(); + powerVehicleCumulativeNineJt = new JTextField("0"); setTextFiledColor(powerVehicleCumulativeNineJt); int powerVehicleCumulativeNineJtY = powerVehicleCumulativeNineJly + 120; powerVehicleCumulativeNineJt.setBounds(powerPersonnelCumulativeNineJlx + 250, powerVehicleCumulativeNineJtY, 240, 120); - /**-----------------------------------------------------------------附件十------------------------------------------------------------------------------------------*/ - /** - * 附表十 线路覆冰总体情况统计表(仅11月-次年3月报送) - */ - JLabel annexTenLabel = new JLabel("附表十 线路覆冰总体情况统计表(仅11月-次年3月报送)"); - annexTenLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - annexTenLabel.setForeground(new Color(11, 24, 76)); - int annexTenJlx = 30; - int annexTenJly = powerVehicleCumulativeNineJtY + 150; - annexTenLabel.setBounds(annexTenJlx, annexTenJly, 1000, 100); - /** - * 特高压 - */ - JLabel tenUhvLabel = new JLabel("特高压"); - tenUhvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - tenUhvLabel.setForeground(new Color(11, 24, 76)); - int tenUhvJlx = 30; - int tenUhvJly = annexTenJly + 120; - tenUhvLabel.setBounds(tenUhvJlx, tenUhvJly, 800, 100); - /** - *500kv - */ - JLabel tenFiveHundredKvLabel = new JLabel("500kV"); - tenFiveHundredKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - tenFiveHundredKvLabel.setForeground(new Color(11, 24, 76)); - int tenFiveHundredKvJlx = tenUhvJlx + 280; - int tenFiveHundredKvJly = annexTenJly + 120; - tenFiveHundredKvLabel.setBounds(tenFiveHundredKvJlx, tenFiveHundredKvJly, 800, 100); - /** - * 220/330kv - */ - JLabel tenTwoHundredTwentyKvLabel = new JLabel("220/330kV"); - tenTwoHundredTwentyKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - tenTwoHundredTwentyKvLabel.setForeground(new Color(11, 24, 76)); - int tenTwoHundredTwentyKvJlx = tenFiveHundredKvJlx + 200; - int tenTwoHundredTwentyKvJly = annexTenJly + 120; - tenTwoHundredTwentyKvLabel.setBounds(tenTwoHundredTwentyKvJlx, tenTwoHundredTwentyKvJly, 800, 100); - /** - * 110/66kv - */ - JLabel tenOneHundredTenKvLabel = new JLabel("110/66kv"); - tenOneHundredTenKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - tenOneHundredTenKvLabel.setForeground(new Color(11, 24, 76)); - int tenOneHundredTenKvJlx = tenTwoHundredTwentyKvJlx + 270; - int tenOneHundredTenKvJly = annexTenJly + 120; - tenOneHundredTenKvLabel.setBounds(tenOneHundredTenKvJlx, tenOneHundredTenKvJly, 800, 100); - - /** - * 35kv - */ - JLabel tenThirtyFiveKvLabel = new JLabel("35kv"); - tenThirtyFiveKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - tenThirtyFiveKvLabel.setForeground(new Color(11, 24, 76)); - int tenThirtyFiveKvJlx = tenOneHundredTenKvJlx + 300; - int tenThirtyFiveKvJly = annexTenJly + 120; - tenThirtyFiveKvLabel.setBounds(tenThirtyFiveKvJlx, tenThirtyFiveKvJly, 800, 100); - /** - * 10kv - */ - JLabel tenTenKvLabel = new JLabel("10kv"); - tenTenKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - tenTenKvLabel.setForeground(new Color(11, 24, 76)); - int tenTenKvJlx = tenThirtyFiveKvJlx + 250; - int tenTenKvJly = annexTenJly + 120; - tenTenKvLabel.setBounds(tenTenKvJlx, tenTenKvJly, 800, 100); - - - /** - * 特高压 - */ - tenUhvJt = new JTextField(); - setTextFiledColor(tenUhvJt); - int tenUhvJtY = tenTenKvJly + 120; - tenUhvJt.setBounds(annexEightJlx, tenUhvJtY, 240, 120); - - /** - * 500 - */ - tenFiveHundredKvJt = new JTextField(); - setTextFiledColor(tenFiveHundredKvJt); - int tenFiveHundredKvJtY = tenTenKvJly + 120; - tenFiveHundredKvJt.setBounds(annexEightJlx + 250, tenFiveHundredKvJtY, 240, 120); - - /** - * 300 - */ - tenTwoHundredTwentyKvJt = new JTextField(); - setTextFiledColor(tenTwoHundredTwentyKvJt); - int tenTwoHundredTwentyKvJtY = tenTenKvJly + 120; - tenTwoHundredTwentyKvJt.setBounds(annexEightJlx + 500, tenTwoHundredTwentyKvJtY, 240, 120); - - /** - * 110 - */ - tenOneHundredTenKvJt = new JTextField(); - setTextFiledColor(tenOneHundredTenKvJt); - int tenOneHundredTenKvJtY = tenTenKvJly + 120; - tenOneHundredTenKvJt.setBounds(annexEightJlx + 750, tenOneHundredTenKvJtY, 240, 120); - - /** - * 35 - */ - tenThirtyFiveKvJt = new JTextField(); - setTextFiledColor(tenThirtyFiveKvJt); - int tenThirtyFiveKvJtY = tenTenKvJly + 120; - tenThirtyFiveKvJt.setBounds(annexEightJlx + 1000, tenThirtyFiveKvJtY, 240, 120); - /** - * 10 - */ - tenTenKvJt = new JTextField(); - setTextFiledColor(tenTenKvJt); - int tenTenKvJtY = tenTenKvJly + 120; - tenTenKvJt.setBounds(annexEightJlx + 1250, tenTenKvJtY, 240, 120); - - /** - * 平均水位 - */ - JLabel tenAverageWaterLevelLabel = new JLabel("平均水位"); - tenAverageWaterLevelLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - tenAverageWaterLevelLabel.setForeground(new Color(11, 24, 76)); - int tenAverageWaterLevelJlx = 30; - int tenAverageWaterLevelJly = tenTenKvJtY + 120; - tenAverageWaterLevelLabel.setBounds(tenAverageWaterLevelJlx, tenAverageWaterLevelJly, 800, 100); - /** - *最大水位实测值 - */ - JLabel tenMeasuredValueLabel = new JLabel("最大水位实测值"); - tenMeasuredValueLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - tenMeasuredValueLabel.setForeground(new Color(11, 24, 76)); - int tenMeasuredValueJlx = tenUhvJlx + 350; - int tenMeasuredValueJly = tenTenKvJtY + 120; - tenMeasuredValueLabel.setBounds(tenMeasuredValueJlx, tenMeasuredValueJly, 800, 100); - - /** - * 最大水位设计值 - */ - JLabel tenDesignValuesLabel = new JLabel("最大水位设计值"); - tenDesignValuesLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - tenDesignValuesLabel.setForeground(new Color(11, 24, 76)); - int tenDesignValuesJlx = tenFiveHundredKvJlx + 500; - int tenDesignValuesJly = tenTenKvJtY + 120; - tenDesignValuesLabel.setBounds(tenDesignValuesJlx, tenDesignValuesJly, 800, 100); - - /** - * 平均覆冰 - */ - tenAverageWaterLevelJt = new JTextField(); - setTextFiledColor(tenAverageWaterLevelJt); - int tenAverageWaterLevelJtY = tenDesignValuesJly + 120; - tenAverageWaterLevelJt.setBounds(annexEightJlx, tenAverageWaterLevelJtY, 240, 120); - - /** - * 最大覆冰实测值 - */ - tenMeasuredValueJt = new JTextField(); - setTextFiledColor(tenMeasuredValueJt); - int tenMeasuredValueJtY = tenDesignValuesJly + 120; - tenMeasuredValueJt.setBounds(annexEightJlx + 400, tenMeasuredValueJtY, 240, 120); - /** - * 最大覆冰设计值 - */ - tenDesignValuesJt = new JTextField(); - setTextFiledColor(tenDesignValuesJt); - int tenDesignValuesJtY = tenDesignValuesJly + 120; - tenDesignValuesJt.setBounds(annexEightJlx + 830, tenDesignValuesJtY, 240, 120); - - /** - * 已采取措施行动 - */ - JLabel tenActionHasBeenTakenLabel = new JLabel("已采取措施行动"); - tenActionHasBeenTakenLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - tenActionHasBeenTakenLabel.setForeground(new Color(11, 24, 76)); - int tenActionHasBeenTakenJlx = 30; - int tenActionHasBeenTakenJly = tenDesignValuesJtY + 120; - tenActionHasBeenTakenLabel.setBounds(tenActionHasBeenTakenJlx, tenActionHasBeenTakenJly, 800, 100); - /** - * 已采取措施行动 - */ - tenActionHasBeenTakenJt = new JTextField(); - setTextFiledColor(tenActionHasBeenTakenJt); - int tenActionHasBeenTakenJtY = tenActionHasBeenTakenJly + 120; - tenActionHasBeenTakenJt.setBounds(30, tenActionHasBeenTakenJtY, 1310, 120); - - /**-----------------------------------------------------------------附件十一------------------------------------------------------------------------------------------*/ - /** - * 附表十一 线路覆冰详细情况统计表(仅11月-次年3月报送) - */ - JLabel annexElevenLabel = new JLabel("附表十一 线路覆冰详细情况统计表(仅11月-次年3月报送)"); - annexElevenLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - annexElevenLabel.setForeground(new Color(11, 24, 76)); - int annexElevenJlx = 30; - int annexElevenJly = tenActionHasBeenTakenJtY + 150; - annexElevenLabel.setBounds(annexElevenJlx, annexElevenJly, 1000, 100); - - /** - * 特高压 - */ - JLabel elevenUhvLabel = new JLabel("线路电压等级"); - elevenUhvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - elevenUhvLabel.setForeground(new Color(11, 24, 76)); - int elevenUhvJlx = 30; - int elevenUhvJly = annexElevenJly + 120; - elevenUhvLabel.setBounds(elevenUhvJlx, elevenUhvJly, 800, 100); - /** - *500kv - */ - JLabel elevenFiveHundredKvLabel = new JLabel("线路名称"); - elevenFiveHundredKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - elevenFiveHundredKvLabel.setForeground(new Color(11, 24, 76)); - int elevenFiveHundredKvJlx = elevenUhvJlx + 320; - int elevenFiveHundredKvJly = annexElevenJly + 120; - elevenFiveHundredKvLabel.setBounds(elevenFiveHundredKvJlx, elevenFiveHundredKvJly, 800, 100); - - /** - * 220/330kv - */ - JLabel elevenTwoHundredTwentyKvLabel = new JLabel("起始杆塔号"); - elevenTwoHundredTwentyKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - elevenTwoHundredTwentyKvLabel.setForeground(new Color(11, 24, 76)); - int elevenTwoHundredTwentyKvJlx = elevenFiveHundredKvJlx + 220; - int elevenTwoHundredTwentyKvJly = annexElevenJly + 120; - elevenTwoHundredTwentyKvLabel.setBounds(elevenTwoHundredTwentyKvJlx, elevenTwoHundredTwentyKvJly, 800, 100); - - /** - * 110/66kv - */ - JLabel elevenOneHundredTenKvLabel = new JLabel("结束杆塔号"); - elevenOneHundredTenKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - elevenOneHundredTenKvLabel.setForeground(new Color(11, 24, 76)); - int elevenOneHundredTenKvJlx = elevenTwoHundredTwentyKvJlx + 270; - int elevenOneHundredTenKvJly = annexElevenJly + 120; - elevenOneHundredTenKvLabel.setBounds(elevenOneHundredTenKvJlx, elevenOneHundredTenKvJly, 800, 100); - - /** - * 35kv - */ - JLabel elevenThirtyFiveKvLabel = new JLabel("覆冰厚度"); - elevenThirtyFiveKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - elevenThirtyFiveKvLabel.setForeground(new Color(11, 24, 76)); - int elevenThirtyFiveKvJlx = elevenOneHundredTenKvJlx + 300; - int elevenThirtyFiveKvJly = annexElevenJly + 120; - elevenThirtyFiveKvLabel.setBounds(elevenThirtyFiveKvJlx, elevenThirtyFiveKvJly, 800, 100); - - /** - * 特高压 - */ - elevenUhvJt = new JTextField(); - setTextFiledColor(elevenUhvJt); - int elevenUhvJtY = elevenThirtyFiveKvJly + 120; - elevenUhvJt.setBounds(annexEightJlx, elevenUhvJtY, 240, 120); - - /** - * 500 - */ - elevenFiveHundredKvJt = new JTextField(); - setTextFiledColor(elevenFiveHundredKvJt); - int elevenFiveHundredKvJtY = elevenThirtyFiveKvJly + 120; - elevenFiveHundredKvJt.setBounds(annexEightJlx + 300, elevenFiveHundredKvJtY, 240, 120); - - /** - * 300 - */ - elevenTwoHundredTwentyKvJt = new JTextField(); - setTextFiledColor(elevenTwoHundredTwentyKvJt); - int elevenTwoHundredTwentyKvJtY = elevenThirtyFiveKvJly + 120; - elevenTwoHundredTwentyKvJt.setBounds(annexEightJlx + 550, elevenTwoHundredTwentyKvJtY, 240, 120); - - /** - * 110 - */ - elevenOneHundredTenKvJt = new JTextField(); - setTextFiledColor(elevenOneHundredTenKvJt); - int elevenOneHundredTenKvJtY = elevenThirtyFiveKvJly + 120; - elevenOneHundredTenKvJt.setBounds(annexEightJlx + 800, elevenOneHundredTenKvJtY, 240, 120); - - /** - * 35 - */ - elevenThirtyFiveKvJt = new JTextField(); - setTextFiledColor(elevenThirtyFiveKvJt); - int elevenThirtyFiveKvJtY = elevenThirtyFiveKvJly + 120; - elevenThirtyFiveKvJt.setBounds(annexEightJlx + 1050, elevenThirtyFiveKvJtY, 240, 120); - - - /** - * 10kv - */ - JLabel elevenTenKvLabel = new JLabel("设计覆冰厚度"); - elevenTenKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - elevenTenKvLabel.setForeground(new Color(11, 24, 76)); - int elevenTenKvJlx = 30; - int elevenTenKvJly = elevenThirtyFiveKvJtY + 120; - elevenTenKvLabel.setBounds(elevenTenKvJlx, elevenTenKvJly, 800, 100); - - /** - * 平均水位 - */ - JLabel elevenAverageWaterLevelLabel = new JLabel("采取措施冰厚"); - elevenAverageWaterLevelLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - elevenAverageWaterLevelLabel.setForeground(new Color(11, 24, 76)); - int elevenAverageWaterLevelJlx = elevenTenKvJlx + 400; - int elevenAverageWaterLevelJly = elevenThirtyFiveKvJtY + 120; - elevenAverageWaterLevelLabel.setBounds(elevenAverageWaterLevelJlx, elevenAverageWaterLevelJly, 800, 100); - /** - *最大水位实测值 - */ - JLabel elevenMeasuredValueLabel = new JLabel("可供使用抗冰装备"); - elevenMeasuredValueLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - elevenMeasuredValueLabel.setForeground(new Color(11, 24, 76)); - int elevenMeasuredValueJlx = elevenTenKvJlx + 800; - int elevenMeasuredValueJly = elevenThirtyFiveKvJtY + 120; - elevenMeasuredValueLabel.setBounds(elevenMeasuredValueJlx, elevenMeasuredValueJly, 800, 100); - /** - * 10 - */ - elevenTenKvJt = new JTextField(); - setTextFiledColor(elevenTenKvJt); - int elevenTenKvJtY = elevenMeasuredValueJly + 120; - elevenTenKvJt.setBounds(annexEightJlx, elevenTenKvJtY, 240, 120); - /** - * 平均覆冰 - */ - elevenAverageWaterLevelJt = new JTextField(); - setTextFiledColor(elevenAverageWaterLevelJt); - int elevenAverageWaterLevelJtY = elevenMeasuredValueJly + 120; - elevenAverageWaterLevelJt.setBounds(annexEightJlx + 400, elevenAverageWaterLevelJtY, 240, 120); - - /** - * 最大覆冰实测值 - */ - elevenMeasuredValueJt = new JTextField(); - setTextFiledColor(elevenMeasuredValueJt); - int elevenMeasuredValueJtY = elevenMeasuredValueJly + 120; - elevenMeasuredValueJt.setBounds(annexEightJlx + 800, elevenMeasuredValueJtY, 240, 120); - - /** - * 已采取措施行动 - */ - JLabel elevenActionHasBeenTakenLabel = new JLabel("已采取措施行动"); - elevenActionHasBeenTakenLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - elevenActionHasBeenTakenLabel.setForeground(new Color(11, 24, 76)); - int elevenActionHasBeenTakenJlx = 30; - int elevenActionHasBeenTakenJly = elevenMeasuredValueJtY + 120; - elevenActionHasBeenTakenLabel.setBounds(elevenActionHasBeenTakenJlx, elevenActionHasBeenTakenJly, 800, 100); - /** - * 已采取措施行动 - */ - elevenActionHasBeenTakenJt = new JTextField(); - setTextFiledColor(elevenActionHasBeenTakenJt); - int elevenActionHasBeenTakenJtY = elevenActionHasBeenTakenJly + 120; - elevenActionHasBeenTakenJt.setBounds(30, elevenActionHasBeenTakenJtY, 1310, 120); - - /**-----------------------------------------------------------------附件十二------------------------------------------------------------------------------------------*/ - /** - * 附表十二 超设计水位变电站数量统计表(仅6月-9月报送) - */ - JLabel annexTwelveLabel = new JLabel("附表十二 超设计水位变电站数量统计表(仅6月-9月报送)"); - annexTwelveLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - annexTwelveLabel.setForeground(new Color(11, 24, 76)); - int annexTwelveJlx = 30; - int annexTwelveJly = elevenActionHasBeenTakenJtY + 150; - annexTwelveLabel.setBounds(annexTwelveJlx, annexTwelveJly, 1000, 100); - - /** - * 特高压 - */ - JLabel twelveUhvLabel = new JLabel("特高压"); - twelveUhvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - twelveUhvLabel.setForeground(new Color(11, 24, 76)); - int twelveUhvJlx = 30; - int twelveUhvJly = annexTwelveJly + 120; - twelveUhvLabel.setBounds(twelveUhvJlx, twelveUhvJly, 800, 100); - /** - *500kv - */ - JLabel twelveFiveHundredKvLabel = new JLabel("500kV"); - twelveFiveHundredKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - twelveFiveHundredKvLabel.setForeground(new Color(11, 24, 76)); - int twelveFiveHundredKvJlx = twelveUhvJlx + 280; - int twelveFiveHundredKvJly = annexTwelveJly + 120; - twelveFiveHundredKvLabel.setBounds(twelveFiveHundredKvJlx, twelveFiveHundredKvJly, 800, 100); - - /** - * 220/330kv - */ - JLabel twelveTwoHundredTwentyKvLabel = new JLabel("220/330kV"); - twelveTwoHundredTwentyKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - twelveTwoHundredTwentyKvLabel.setForeground(new Color(11, 24, 76)); - int twelveTwoHundredTwentyKvJlx = twelveFiveHundredKvJlx + 200; - int twelveTwoHundredTwentyKvJly = annexTwelveJly + 120; - twelveTwoHundredTwentyKvLabel.setBounds(twelveTwoHundredTwentyKvJlx, twelveTwoHundredTwentyKvJly, 800, 100); - - /** - * 110/66kv - */ - JLabel twelveOneHundredTenKvLabel = new JLabel("110/66kv"); - twelveOneHundredTenKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - twelveOneHundredTenKvLabel.setForeground(new Color(11, 24, 76)); - int twelveOneHundredTenKvJlx = twelveTwoHundredTwentyKvJlx + 270; - int twelveOneHundredTenKvJly = annexTwelveJly + 120; - twelveOneHundredTenKvLabel.setBounds(twelveOneHundredTenKvJlx, twelveOneHundredTenKvJly, 800, 100); - - /** - * 35kv - */ - JLabel twelveThirtyFiveKvLabel = new JLabel("35kv"); - twelveThirtyFiveKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - twelveThirtyFiveKvLabel.setForeground(new Color(11, 24, 76)); - int twelveThirtyFiveKvJlx = twelveOneHundredTenKvJlx + 300; - int twelveThirtyFiveKvJly = annexTwelveJly + 120; - twelveThirtyFiveKvLabel.setBounds(twelveThirtyFiveKvJlx, twelveThirtyFiveKvJly, 800, 100); - /** - * 10kv - */ - JLabel twelveTenKvLabel = new JLabel("10kv"); - twelveTenKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - twelveTenKvLabel.setForeground(new Color(11, 24, 76)); - int twelveTenKvJlx = twelveThirtyFiveKvJlx + 250; - int twelveTenKvJly = annexTwelveJly + 120; - twelveTenKvLabel.setBounds(twelveTenKvJlx, twelveTenKvJly, 800, 100); - - - /** - * 特高压 - */ - twelveUhvJt = new JTextField(); - setTextFiledColor(twelveUhvJt); - int twelveUhvJtY = twelveTenKvJly + 120; - twelveUhvJt.setBounds(annexEightJlx, twelveUhvJtY, 240, 120); - - /** - * 500 - */ - twelveFiveHundredKvJt = new JTextField(); - setTextFiledColor(twelveFiveHundredKvJt); - int twelveFiveHundredKvJtY = twelveTenKvJly + 120; - twelveFiveHundredKvJt.setBounds(annexEightJlx + 250, twelveFiveHundredKvJtY, 240, 120); - - /** - * 300 - */ - twelveTwoHundredTwentyKvJt = new JTextField(); - setTextFiledColor(twelveTwoHundredTwentyKvJt); - int twelveTwoHundredTwentyKvJtY = twelveTenKvJly + 120; - twelveTwoHundredTwentyKvJt.setBounds(annexEightJlx + 500, twelveTwoHundredTwentyKvJtY, 240, 120); - - /** - * 110 - */ - twelveOneHundredTenKvJt = new JTextField(); - setTextFiledColor(twelveOneHundredTenKvJt); - int twelveOneHundredTenKvJtY = twelveTenKvJly + 120; - twelveOneHundredTenKvJt.setBounds(annexEightJlx + 750, twelveOneHundredTenKvJtY, 240, 120); - - /** - * 35 - */ - twelveThirtyFiveKvJt = new JTextField(); - setTextFiledColor(twelveThirtyFiveKvJt); - int twelveThirtyFiveKvJtY = twelveTenKvJly + 120; - twelveThirtyFiveKvJt.setBounds(annexEightJlx + 1000, twelveThirtyFiveKvJtY, 240, 120); - /** - * 10 - */ - twelveTenKvJt = new JTextField(); - setTextFiledColor(twelveTenKvJt); - int twelveTenKvJtY = twelveTenKvJly + 120; - twelveTenKvJt.setBounds(annexEightJlx + 1250, twelveTenKvJtY, 240, 120); - - /** - * 平均水位 - */ - JLabel twelveAverageWaterLevelLabel = new JLabel("平均水位"); - twelveAverageWaterLevelLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - twelveAverageWaterLevelLabel.setForeground(new Color(11, 24, 76)); - int twelveAverageWaterLevelJlx = 30; - int twelveAverageWaterLevelJly = twelveTenKvJtY + 120; - twelveAverageWaterLevelLabel.setBounds(twelveAverageWaterLevelJlx, twelveAverageWaterLevelJly, 800, 100); - /** - *最大水位实测值 - */ - JLabel twelveMeasuredValueLabel = new JLabel("最大水位实测值"); - twelveMeasuredValueLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - twelveMeasuredValueLabel.setForeground(new Color(11, 24, 76)); - int twelveMeasuredValueJlx = twelveUhvJlx + 350; - int twelveMeasuredValueJly = twelveTenKvJtY + 120; - twelveMeasuredValueLabel.setBounds(twelveMeasuredValueJlx, twelveMeasuredValueJly, 800, 100); - - /** - * 最大水位设计值 - */ - JLabel twelveDesignValuesLabel = new JLabel("最大水位设计值"); - twelveDesignValuesLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - twelveDesignValuesLabel.setForeground(new Color(11, 24, 76)); - int twelveDesignValuesJlx = twelveFiveHundredKvJlx + 500; - int twelveDesignValuesJly = twelveTenKvJtY + 120; - twelveDesignValuesLabel.setBounds(twelveDesignValuesJlx, twelveDesignValuesJly, 800, 100); - - /** - * 平均水位 - */ - twelveAverageWaterLevelJt = new JTextField(); - setTextFiledColor(twelveAverageWaterLevelJt); - int twelveAverageWaterLevelJtY = twelveDesignValuesJly + 120; - twelveAverageWaterLevelJt.setBounds(annexEightJlx, twelveAverageWaterLevelJtY, 240, 120); - - /** - * 最大水位实测值 - */ - twelveMeasuredValueJt = new JTextField(); - setTextFiledColor(twelveMeasuredValueJt); - int twelveMeasuredValueJtY = twelveDesignValuesJly + 120; - twelveMeasuredValueJt.setBounds(annexEightJlx + 400, twelveMeasuredValueJtY, 240, 120); - /** - * 最大水位设计值 - */ - twelveDesignValuesJt = new JTextField(); - setTextFiledColor(twelveDesignValuesJt); - int twelveDesignValuesJtY = twelveDesignValuesJly + 120; - twelveDesignValuesJt.setBounds(annexEightJlx + 830, twelveDesignValuesJtY, 240, 120); - - /** - * 已采取措施行动 - */ - JLabel twelveActionHasBeenTakenLabel = new JLabel("已采取措施行动"); - twelveActionHasBeenTakenLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - twelveActionHasBeenTakenLabel.setForeground(new Color(11, 24, 76)); - int twelveActionHasBeenTakenJlx = 30; - int twelveActionHasBeenTakenJly = twelveDesignValuesJtY + 120; - twelveActionHasBeenTakenLabel.setBounds(twelveActionHasBeenTakenJlx, twelveActionHasBeenTakenJly, 800, 100); - /** - * 已采取措施行动 - */ - twelveActionHasBeenTakenJt = new JTextField(); - setTextFiledColor(twelveActionHasBeenTakenJt); - int twelveActionHasBeenTakenJtY = twelveActionHasBeenTakenJly + 120; - twelveActionHasBeenTakenJt.setBounds(30, twelveActionHasBeenTakenJtY, 1310, 120); - /**-----------------------------------------------------------附件十三---------------------------------------------------------------------*/ - /** - * 附表十三 超设计水位线路数量统计表(仅6月-9月报送) - */ - JLabel annexThirteenLabel = new JLabel(" 附表十三-超设计水位线路数量统计表(仅6月-9月报送)"); - annexThirteenLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - annexThirteenLabel.setForeground(new Color(11, 24, 76)); - int annexThirteenJlx = 30; - int annexThirteenJly = twelveActionHasBeenTakenJtY + 150; - annexThirteenLabel.setBounds(annexThirteenJlx, annexThirteenJly, 1000, 100); - - /** - * 特高压 - */ - JLabel thirteenUhvLabel = new JLabel("特高压"); - thirteenUhvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - thirteenUhvLabel.setForeground(new Color(11, 24, 76)); - int thirteenUhvJlx = 30; - int thirteenUhvJly = annexThirteenJly + 120; - thirteenUhvLabel.setBounds(thirteenUhvJlx, thirteenUhvJly, 800, 100); - /** - *500kv - */ - JLabel thirteenFiveHundredKvLabel = new JLabel("500kV"); - thirteenFiveHundredKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - thirteenFiveHundredKvLabel.setForeground(new Color(11, 24, 76)); - int thirteenFiveHundredKvJlx = thirteenUhvJlx + 280; - int thirteenFiveHundredKvJly = annexThirteenJly + 120; - thirteenFiveHundredKvLabel.setBounds(thirteenFiveHundredKvJlx, thirteenFiveHundredKvJly, 800, 100); - - /** - * 220/330kv - */ - JLabel thirteenTwoHundredTwentyKvLabel = new JLabel("220/330kV"); - thirteenTwoHundredTwentyKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - thirteenTwoHundredTwentyKvLabel.setForeground(new Color(11, 24, 76)); - int thirteenTwoHundredTwentyKvJlx = thirteenFiveHundredKvJlx + 200; - int thirteenTwoHundredTwentyKvJly = annexThirteenJly + 120; - thirteenTwoHundredTwentyKvLabel.setBounds(thirteenTwoHundredTwentyKvJlx, thirteenTwoHundredTwentyKvJly, 800, 100); - - /** - * 110/66kv - */ - JLabel thirteenOneHundredTenKvLabel = new JLabel("110/66kv"); - thirteenOneHundredTenKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - thirteenOneHundredTenKvLabel.setForeground(new Color(11, 24, 76)); - int thirteenOneHundredTenKvJlx = thirteenTwoHundredTwentyKvJlx + 270; - int thirteenOneHundredTenKvJly = annexThirteenJly + 120; - thirteenOneHundredTenKvLabel.setBounds(thirteenOneHundredTenKvJlx, thirteenOneHundredTenKvJly, 800, 100); - - /** - * 35kv - */ - JLabel thirteenThirtyFiveKvLabel = new JLabel("35kv"); - thirteenThirtyFiveKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - thirteenThirtyFiveKvLabel.setForeground(new Color(11, 24, 76)); - int thirteenThirtyFiveKvJlx = thirteenOneHundredTenKvJlx + 300; - int thirteenThirtyFiveKvJly = annexThirteenJly + 120; - thirteenThirtyFiveKvLabel.setBounds(thirteenThirtyFiveKvJlx, thirteenThirtyFiveKvJly, 800, 100); - /** - * 10kv - */ - JLabel thirteenTenKvLabel = new JLabel("10kv"); - thirteenTenKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - thirteenTenKvLabel.setForeground(new Color(11, 24, 76)); - int thirteenTenKvJlx = thirteenThirtyFiveKvJlx + 250; - int thirteenTenKvJly = annexThirteenJly + 120; - thirteenTenKvLabel.setBounds(thirteenTenKvJlx, thirteenTenKvJly, 800, 100); - - - /** - * 特高压 - */ - thirteenUhvJt = new JTextField(); - setTextFiledColor(thirteenUhvJt); - int thirteenUhvJtY = thirteenTenKvJly + 120; - thirteenUhvJt.setBounds(annexEightJlx, thirteenUhvJtY, 240, 120); - - /** - * 500 - */ - thirteenFiveHundredKvJt = new JTextField(); - setTextFiledColor(thirteenFiveHundredKvJt); - int thirteenFiveHundredKvJtY = thirteenTenKvJly + 120; - thirteenFiveHundredKvJt.setBounds(annexEightJlx + 250, thirteenFiveHundredKvJtY, 240, 120); - - /** - * 300 - */ - thirteenTwoHundredTwentyKvJt = new JTextField(); - setTextFiledColor(thirteenTwoHundredTwentyKvJt); - int thirteenTwoHundredTwentyKvJtY = thirteenTenKvJly + 120; - thirteenTwoHundredTwentyKvJt.setBounds(annexEightJlx + 500, thirteenTwoHundredTwentyKvJtY, 240, 120); - - /** - * 110 - */ - thirteenOneHundredTenKvJt = new JTextField(); - setTextFiledColor(thirteenOneHundredTenKvJt); - int thirteenOneHundredTenKvJtY = thirteenTenKvJly + 120; - thirteenOneHundredTenKvJt.setBounds(annexEightJlx + 750, thirteenOneHundredTenKvJtY, 240, 120); - - /** - * 35 - */ - thirteenThirtyFiveKvJt = new JTextField(); - setTextFiledColor(thirteenThirtyFiveKvJt); - int thirteenThirtyFiveKvJtY = thirteenTenKvJly + 120; - thirteenThirtyFiveKvJt.setBounds(annexEightJlx + 1000, thirteenThirtyFiveKvJtY, 240, 120); - /** - * 10 - */ - thirteenTenKvJt = new JTextField(); - setTextFiledColor(thirteenTenKvJt); - int thirteenTenKvJtY = thirteenTenKvJly + 120; - thirteenTenKvJt.setBounds(annexEightJlx + 1250, thirteenTenKvJtY, 240, 120); - - /** - * 平均水位 - */ - JLabel thirteenAverageWaterLevelLabel = new JLabel("平均水位"); - thirteenAverageWaterLevelLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - thirteenAverageWaterLevelLabel.setForeground(new Color(11, 24, 76)); - int thirteenAverageWaterLevelJlx = 30; - int thirteenAverageWaterLevelJly = thirteenTenKvJtY + 120; - thirteenAverageWaterLevelLabel.setBounds(thirteenAverageWaterLevelJlx, thirteenAverageWaterLevelJly, 800, 100); - /** - *最大水位实测值 - */ - JLabel thirteenMeasuredValueLabel = new JLabel("最大水位实测值"); - thirteenMeasuredValueLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - thirteenMeasuredValueLabel.setForeground(new Color(11, 24, 76)); - int thirteenMeasuredValueJlx = thirteenUhvJlx + 350; - int thirteenMeasuredValueJly = thirteenTenKvJtY + 120; - thirteenMeasuredValueLabel.setBounds(thirteenMeasuredValueJlx, thirteenMeasuredValueJly, 800, 100); - - /** - * 最大水位设计值 - */ - JLabel thirteenDesignValuesLabel = new JLabel("最大水位设计值"); - thirteenDesignValuesLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - thirteenDesignValuesLabel.setForeground(new Color(11, 24, 76)); - int thirteenDesignValuesJlx = thirteenFiveHundredKvJlx + 500; - int thirteenDesignValuesJly = thirteenTenKvJtY + 120; - thirteenDesignValuesLabel.setBounds(thirteenDesignValuesJlx, thirteenDesignValuesJly, 800, 100); - - /** - * 平均水位 - */ - thirteenAverageWaterLevelJt = new JTextField(); - setTextFiledColor(thirteenAverageWaterLevelJt); - int thirteenAverageWaterLevelJtY = thirteenDesignValuesJly + 120; - thirteenAverageWaterLevelJt.setBounds(annexEightJlx, thirteenAverageWaterLevelJtY, 240, 120); - - /** - * 最大水位实测值 - */ - thirteenMeasuredValueJt = new JTextField(); - setTextFiledColor(thirteenMeasuredValueJt); - int thirteenMeasuredValueJtY = thirteenDesignValuesJly + 120; - thirteenMeasuredValueJt.setBounds(annexEightJlx + 400, thirteenMeasuredValueJtY, 240, 120); - /** - * 最大水位设计值 - */ - thirteenDesignValuesJt = new JTextField(); - setTextFiledColor(thirteenDesignValuesJt); - int thirteenDesignValuesJtY = thirteenDesignValuesJly + 120; - thirteenDesignValuesJt.setBounds(annexEightJlx + 830, thirteenDesignValuesJtY, 240, 120); - - /** - * 已采取措施行动 - */ - JLabel thirteenActionHasBeenTakenLabel = new JLabel("已采取措施行动"); - thirteenActionHasBeenTakenLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - thirteenActionHasBeenTakenLabel.setForeground(new Color(11, 24, 76)); - int thirteenActionHasBeenTakenJlx = 30; - int thirteenActionHasBeenTakenJly = thirteenDesignValuesJtY + 120; - thirteenActionHasBeenTakenLabel.setBounds(thirteenActionHasBeenTakenJlx, thirteenActionHasBeenTakenJly, 800, 100); - /** - * 已采取措施行动 - */ - thirteenActionHasBeenTakenJt = new JTextField(); - setTextFiledColor(thirteenActionHasBeenTakenJt); - int thirteenActionHasBeenTakenJtY = thirteenActionHasBeenTakenJly + 120; - thirteenActionHasBeenTakenJt.setBounds(30, thirteenActionHasBeenTakenJtY, 1310, 120); - /**-----------------------------------------------------------附件十四---------------------------------------------------------------------*/ - /** - * 附表十四 超设计风力线路数量统计表 - */ - JLabel annexFourteenLabel = new JLabel("附表十四- 超设计风力线路数量统计表"); - annexFourteenLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - annexFourteenLabel.setForeground(new Color(11, 24, 76)); - int annexFourteenJlx = 30; - int annexFourteenJly = thirteenActionHasBeenTakenJtY + 150; - annexFourteenLabel.setBounds(annexFourteenJlx, annexFourteenJly, 1000, 100); - - /** - * 特高压 - */ - JLabel fourteenUhvLabel = new JLabel("特高压"); - fourteenUhvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - fourteenUhvLabel.setForeground(new Color(11, 24, 76)); - int fourteenUhvJlx = 30; - int fourteenUhvJly = annexFourteenJly + 120; - fourteenUhvLabel.setBounds(fourteenUhvJlx, fourteenUhvJly, 800, 100); - /** - *500kv - */ - JLabel fourteenFiveHundredKvLabel = new JLabel("500kV"); - fourteenFiveHundredKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - fourteenFiveHundredKvLabel.setForeground(new Color(11, 24, 76)); - int fourteenFiveHundredKvJlx = fourteenUhvJlx + 280; - int fourteenFiveHundredKvJly = annexFourteenJly + 120; - fourteenFiveHundredKvLabel.setBounds(fourteenFiveHundredKvJlx, fourteenFiveHundredKvJly, 800, 100); - - /** - * 220/330kv - */ - JLabel fourteenTwoHundredTwentyKvLabel = new JLabel("220/330kV"); - fourteenTwoHundredTwentyKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - fourteenTwoHundredTwentyKvLabel.setForeground(new Color(11, 24, 76)); - int fourteenTwoHundredTwentyKvJlx = fourteenFiveHundredKvJlx + 200; - int fourteenTwoHundredTwentyKvJly = annexFourteenJly + 120; - fourteenTwoHundredTwentyKvLabel.setBounds(fourteenTwoHundredTwentyKvJlx, fourteenTwoHundredTwentyKvJly, 800, 100); - - /** - * 110/66kv - */ - JLabel fourteenOneHundredTenKvLabel = new JLabel("110/66kv"); - fourteenOneHundredTenKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - fourteenOneHundredTenKvLabel.setForeground(new Color(11, 24, 76)); - int fourteenOneHundredTenKvJlx = fourteenTwoHundredTwentyKvJlx + 270; - int fourteenOneHundredTenKvJly = annexFourteenJly + 120; - fourteenOneHundredTenKvLabel.setBounds(fourteenOneHundredTenKvJlx, fourteenOneHundredTenKvJly, 800, 100); - - /** - * 35kv - */ - JLabel fourteenThirtyFiveKvLabel = new JLabel("35kv"); - fourteenThirtyFiveKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - fourteenThirtyFiveKvLabel.setForeground(new Color(11, 24, 76)); - int fourteenThirtyFiveKvJlx = fourteenOneHundredTenKvJlx + 300; - int fourteenThirtyFiveKvJly = annexFourteenJly + 120; - fourteenThirtyFiveKvLabel.setBounds(fourteenThirtyFiveKvJlx, fourteenThirtyFiveKvJly, 800, 100); - /** - * 10kv - */ - JLabel fourteenTenKvLabel = new JLabel("10kv"); - fourteenTenKvLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - fourteenTenKvLabel.setForeground(new Color(11, 24, 76)); - int fourteenTenKvJlx = fourteenThirtyFiveKvJlx + 250; - int fourteenTenKvJly = annexFourteenJly + 120; - fourteenTenKvLabel.setBounds(fourteenTenKvJlx, fourteenTenKvJly, 800, 100); - - - /** - * 特高压 - */ - fourteenUhvJt = new JTextField(); - setTextFiledColor(fourteenUhvJt); - int fourteenUhvJtY = fourteenTenKvJly + 120; - fourteenUhvJt.setBounds(annexEightJlx, fourteenUhvJtY, 240, 120); - - /** - * 500 - */ - fourteenFiveHundredKvJt = new JTextField(); - setTextFiledColor(fourteenFiveHundredKvJt); - int fourteenFiveHundredKvJtY = fourteenTenKvJly + 120; - fourteenFiveHundredKvJt.setBounds(annexEightJlx + 250, fourteenFiveHundredKvJtY, 240, 120); - - /** - * 300 - */ - fourteenTwoHundredTwentyKvJt = new JTextField(); - setTextFiledColor(fourteenTwoHundredTwentyKvJt); - int fourteenTwoHundredTwentyKvJtY = fourteenTenKvJly + 120; - fourteenTwoHundredTwentyKvJt.setBounds(annexEightJlx + 500, fourteenTwoHundredTwentyKvJtY, 240, 120); - - /** - * 110 - */ - fourteenOneHundredTenKvJt = new JTextField(); - setTextFiledColor(fourteenOneHundredTenKvJt); - int fourteenOneHundredTenKvJtY = fourteenTenKvJly + 120; - fourteenOneHundredTenKvJt.setBounds(annexEightJlx + 750, fourteenOneHundredTenKvJtY, 240, 120); - - /** - * 35 - */ - fourteenThirtyFiveKvJt = new JTextField(); - setTextFiledColor(fourteenThirtyFiveKvJt); - int fourteenThirtyFiveKvJtY = fourteenTenKvJly + 120; - fourteenThirtyFiveKvJt.setBounds(annexEightJlx + 1000, fourteenThirtyFiveKvJtY, 240, 120); - /** - * 10 - */ - fourteenTenKvJt = new JTextField(); - setTextFiledColor(fourteenTenKvJt); - int fourteenTenKvJtY = fourteenTenKvJly + 120; - fourteenTenKvJt.setBounds(annexEightJlx + 1250, fourteenTenKvJtY, 240, 120); - - /** - * 平均风力 - */ - JLabel fourteenAverageWaterLevelLabel = new JLabel("平均风力"); - fourteenAverageWaterLevelLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - fourteenAverageWaterLevelLabel.setForeground(new Color(11, 24, 76)); - int fourteenAverageWaterLevelJlx = 30; - int fourteenAverageWaterLevelJly = fourteenTenKvJtY + 120; - fourteenAverageWaterLevelLabel.setBounds(fourteenAverageWaterLevelJlx, fourteenAverageWaterLevelJly, 800, 100); - /** - *最大风力实测值 - */ - JLabel fourteenMeasuredValueLabel = new JLabel("最大风力实测值"); - fourteenMeasuredValueLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - fourteenMeasuredValueLabel.setForeground(new Color(11, 24, 76)); - int fourteenMeasuredValueJlx = fourteenUhvJlx + 350; - int fourteenMeasuredValueJly = fourteenTenKvJtY + 120; - fourteenMeasuredValueLabel.setBounds(fourteenMeasuredValueJlx, fourteenMeasuredValueJly, 800, 100); - - /** - * 最大风力设计值 - */ - JLabel fourteenDesignValuesLabel = new JLabel("最大风力设计值"); - fourteenDesignValuesLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - fourteenDesignValuesLabel.setForeground(new Color(11, 24, 76)); - int fourteenDesignValuesJlx = fourteenFiveHundredKvJlx + 500; - int fourteenDesignValuesJly = fourteenTenKvJtY + 120; - fourteenDesignValuesLabel.setBounds(fourteenDesignValuesJlx, fourteenDesignValuesJly, 800, 100); - - /** - * 平均风力 - */ - fourteenAverageWaterLevelJt = new JTextField(); - setTextFiledColor(fourteenAverageWaterLevelJt); - int fourteenAverageWaterLevelJtY = fourteenDesignValuesJly + 120; - fourteenAverageWaterLevelJt.setBounds(annexEightJlx, fourteenAverageWaterLevelJtY, 240, 120); - - /** - * 最大风力实测值 - */ - fourteenMeasuredValueJt = new JTextField(); - setTextFiledColor(fourteenMeasuredValueJt); - int fourteenMeasuredValueJtY = fourteenDesignValuesJly + 120; - fourteenMeasuredValueJt.setBounds(annexEightJlx + 400, fourteenMeasuredValueJtY, 240, 120); - /** - * 最大风力设计值 - */ - fourteenDesignValuesJt = new JTextField(); - setTextFiledColor(fourteenDesignValuesJt); - int fourteenDesignValuesJtY = fourteenDesignValuesJly + 120; - fourteenDesignValuesJt.setBounds(annexEightJlx + 830, fourteenDesignValuesJtY, 240, 120); - - /** - * 已采取措施行动 - */ - JLabel fourteenActionHasBeenTakenLabel = new JLabel("已采取措施行动"); - fourteenActionHasBeenTakenLabel.setFont(new Font("微软雅黑", Font.BOLD, 50)); - fourteenActionHasBeenTakenLabel.setForeground(new Color(11, 24, 76)); - int fourteenActionHasBeenTakenJlx = 30; - int fourteenActionHasBeenTakenJly = fourteenDesignValuesJtY + 120; - fourteenActionHasBeenTakenLabel.setBounds(fourteenActionHasBeenTakenJlx, fourteenActionHasBeenTakenJly, 800, 100); - /** - * 已采取措施行动 - */ - fourteenActionHasBeenTakenJt = new JTextField(); - setTextFiledColor(fourteenActionHasBeenTakenJt); - int fourteenActionHasBeenTakenJtY = fourteenActionHasBeenTakenJly + 120; - fourteenActionHasBeenTakenJt.setBounds(30, fourteenActionHasBeenTakenJtY, 1310, 120); btn = new JButton(); btn.setFont(new Font("微软雅黑",Font.BOLD,50)); btn.setForeground(Color.BLACK); btn.setText("提交"); btn.addMouseListener(this); int btnX = (dimension.width - 100) / 4; - btn.setBounds(btnX+200, fourteenActionHasBeenTakenJtY + 155, 200, 100); + btn.setBounds(btnX+200, powerVehicleCumulativeNineJtY + 155, 200, 100); jp.add(overallLabel); // jp.add(overallJt); @@ -4862,99 +3043,6 @@ public class DailyAction extends JFrame implements MouseListener { jp.add(inputAmountRemarkLabel); jp.add(inputAmountRemarkJt); - //附件三 - jp.add(annexThreeLabel); - jp.add(totalAddition); - jp.add(totalAddDiagnosedLabel); - jp.add(totalAddHealLabel); - jp.add(totalAddSuspectedLabel); - jp.add(totalAddDiagnosedJt); - jp.add(totalAddHealJt); - jp.add(totalAddSuspectedJt); - jp.add(totalExisting); - jp.add(totalExistingDiagnosedLabel); - jp.add(totalExistingHealLabel); - jp.add(totalExistingSuspectedLabel); - jp.add(totalExistingDiagnosedJt); - jp.add(totalExistingHealJt); - jp.add(totalExistingSuspectedJt); - jp.add(dispatchAddition); - jp.add(dispatchAddDiagnosedLabel); - jp.add(dispatchAddHealLabel); - jp.add(dispatchAddSuspectedLabel); - jp.add(dispatchAddDiagnosedJt); - jp.add(dispatchAddHealJt); - jp.add(dispatchAddSuspectedJt); - jp.add(dispatchExisting); - jp.add(dispatchExistingDiagnosedLabel); - jp.add(dispatchExistingHealLabel); - jp.add(dispatchExistingSuspectedLabel); - jp.add(dispatchExistingDiagnosedJt); - jp.add(dispatchExistingHealJt); - jp.add(dispatchExistingSuspectedJt); - jp.add(repairAddition); - jp.add(repairAddDiagnosedLabel); - jp.add(repairAddHealLabel); - jp.add(repairAddSuspectedLabel); - jp.add(repairAddDiagnosedJt); - jp.add(repairAddHealJt); - jp.add(repairAddSuspectedJt); - jp.add(repairExisting); - jp.add(repairExistingDiagnosedLabel); - jp.add(repairExistingHealLabel); - jp.add(repairExistingSuspectedLabel); - jp.add(repairExistingDiagnosedJt); - jp.add(repairExistingHealJt); - jp.add(repairExistingSuspectedJt); - jp.add(marketingAddition); - jp.add(marketingAddDiagnosedLabel); - jp.add(marketingAddHealLabel); - jp.add(marketingAddSuspectedLabel); - jp.add(marketingAddDiagnosedJt); - jp.add(marketingAddHealJt); - jp.add(marketingAddSuspectedJt); - jp.add(marketingExisting); - jp.add(marketingExistingDiagnosedLabel); - jp.add(marketingExistingHealLabel); - jp.add(marketingExistingSuspectedLabel); - jp.add(marketingExistingDiagnosedJt); - jp.add(marketingExistingHealJt); - jp.add(marketingExistingSuspectedJt); - jp.add(constructionAddition); - jp.add(constructionAddDiagnosedLabel); - jp.add(constructionAddHealLabel); - jp.add(constructionAddSuspectedLabel); - jp.add(constructionAddDiagnosedJt); - jp.add(constructionAddHealJt); - jp.add(constructionAddSuspectedJt); - jp.add(constructionExisting); - jp.add(constructionExistingDiagnosedLabel); - jp.add(constructionExistingHealLabel); - jp.add(constructionExistingSuspectedLabel); - jp.add(constructionExistingDiagnosedJt); - jp.add(constructionExistingHealJt); - jp.add(constructionExistingSuspectedJt); - - //附件五 - jp.add(annexFiveLabel); - jp.add(airportPortLabel); - jp.add(venueHospitalLabel); - jp.add(guesthouseHotelLabel); - jp.add(safeguardPersonnelLabel); - jp.add(airportPortJt); - jp.add(venueHospitalJt); - jp.add(guesthouseHotelJt); - jp.add(safeguardPersonnelJt); - jp.add(electricallyGuaranteedVehiclesLabel); - jp.add(powerGenerationVehiclesLabel); - jp.add(dynamoLabel); - jp.add(fiveRemarkLabel); - jp.add(electricallyGuaranteedVehiclesJt); - jp.add(powerGenerationVehiclesJt); - jp.add(dynamoJt); - jp.add(fiveRemarkJt); - - //附件七 jp.add(annexSevenLabel); jp.add(suspensionOfDisasterLabel); jp.add(uhvDisasterLabel); @@ -5159,114 +3247,7 @@ public class DailyAction extends JFrame implements MouseListener { jp.add(powerVehicleCumulativeNineLabel); jp.add(powerPersonnelCumulativeNineJt); jp.add(powerVehicleCumulativeNineJt); - //附件十 - jp.add(annexTenLabel); - jp.add(tenUhvLabel); - jp.add(tenFiveHundredKvLabel); - jp.add(tenTwoHundredTwentyKvLabel); - jp.add(tenOneHundredTenKvLabel); - jp.add(tenThirtyFiveKvLabel); - jp.add(tenTenKvLabel); - jp.add(tenUhvJt); - jp.add(tenFiveHundredKvJt); - jp.add(tenTwoHundredTwentyKvJt); - jp.add(tenOneHundredTenKvJt); - jp.add(tenThirtyFiveKvJt); - jp.add(tenTenKvJt); - jp.add(tenAverageWaterLevelLabel); - jp.add(tenMeasuredValueLabel); - jp.add(tenDesignValuesLabel); - jp.add(tenAverageWaterLevelJt); - jp.add(tenMeasuredValueJt); - jp.add(tenDesignValuesJt); - jp.add(tenActionHasBeenTakenLabel); - jp.add(tenActionHasBeenTakenJt); - //附件十一 - jp.add(annexElevenLabel); - jp.add(elevenUhvLabel); - jp.add(elevenFiveHundredKvLabel); - jp.add(elevenTwoHundredTwentyKvLabel); - jp.add(elevenOneHundredTenKvLabel); - jp.add(elevenThirtyFiveKvLabel); - jp.add(elevenTenKvLabel); - jp.add(elevenUhvJt); - jp.add(elevenFiveHundredKvJt); - jp.add(elevenTwoHundredTwentyKvJt); - jp.add(elevenOneHundredTenKvJt); - jp.add(elevenThirtyFiveKvJt); - jp.add(elevenTenKvJt); - jp.add(elevenAverageWaterLevelLabel); - jp.add(elevenMeasuredValueLabel); - jp.add(elevenAverageWaterLevelJt); - jp.add(elevenMeasuredValueJt); - jp.add(elevenActionHasBeenTakenLabel); - jp.add(elevenActionHasBeenTakenJt); - //附件十二 - jp.add(annexTwelveLabel); - jp.add(twelveUhvLabel); - jp.add(twelveFiveHundredKvLabel); - jp.add(twelveTwoHundredTwentyKvLabel); - jp.add(twelveOneHundredTenKvLabel); - jp.add(twelveThirtyFiveKvLabel); - jp.add(twelveTenKvLabel); - jp.add(twelveUhvJt); - jp.add(twelveFiveHundredKvJt); - jp.add(twelveTwoHundredTwentyKvJt); - jp.add(twelveOneHundredTenKvJt); - jp.add(twelveThirtyFiveKvJt); - jp.add(twelveTenKvJt); - jp.add(twelveAverageWaterLevelLabel); - jp.add(twelveMeasuredValueLabel); - jp.add(twelveDesignValuesLabel); - jp.add(twelveAverageWaterLevelJt); - jp.add(twelveMeasuredValueJt); - jp.add(twelveDesignValuesJt); - jp.add(twelveActionHasBeenTakenLabel); - jp.add(twelveActionHasBeenTakenJt); - //十三 - jp.add(annexThirteenLabel); - jp.add(thirteenUhvLabel); - jp.add(thirteenFiveHundredKvLabel); - jp.add(thirteenTwoHundredTwentyKvLabel); - jp.add(thirteenOneHundredTenKvLabel); - jp.add(thirteenThirtyFiveKvLabel); - jp.add(thirteenTenKvLabel); - jp.add(thirteenUhvJt); - jp.add(thirteenFiveHundredKvJt); - jp.add(thirteenTwoHundredTwentyKvJt); - jp.add(thirteenOneHundredTenKvJt); - jp.add(thirteenThirtyFiveKvJt); - jp.add(thirteenTenKvJt); - jp.add(thirteenAverageWaterLevelLabel); - jp.add(thirteenMeasuredValueLabel); - jp.add(thirteenDesignValuesLabel); - jp.add(thirteenAverageWaterLevelJt); - jp.add(thirteenMeasuredValueJt); - jp.add(thirteenDesignValuesJt); - jp.add(thirteenActionHasBeenTakenLabel); - jp.add(thirteenActionHasBeenTakenJt); - //十四 - jp.add(annexFourteenLabel); - jp.add(fourteenUhvLabel); - jp.add(fourteenFiveHundredKvLabel); - jp.add(fourteenTwoHundredTwentyKvLabel); - jp.add(fourteenOneHundredTenKvLabel); - jp.add(fourteenThirtyFiveKvLabel); - jp.add(fourteenTenKvLabel); - jp.add(fourteenUhvJt); - jp.add(fourteenFiveHundredKvJt); - jp.add(fourteenTwoHundredTwentyKvJt); - jp.add(fourteenOneHundredTenKvJt); - jp.add(fourteenThirtyFiveKvJt); - jp.add(fourteenTenKvJt); - jp.add(fourteenAverageWaterLevelLabel); - jp.add(fourteenMeasuredValueLabel); - jp.add(fourteenDesignValuesLabel); - jp.add(fourteenAverageWaterLevelJt); - jp.add(fourteenMeasuredValueJt); - jp.add(fourteenDesignValuesJt); - jp.add(fourteenActionHasBeenTakenLabel); - jp.add(fourteenActionHasBeenTakenJt); + jp.add(btn); return jp; } @@ -5304,14 +3285,6 @@ public class DailyAction extends JFrame implements MouseListener { AnnexSevenBean sevenBean = new AnnexSevenBean(); AnnexEightBean eightBean = new AnnexEightBean(); AnnexNineBean nineBean = new AnnexNineBean(); - AnnexThreeBean threeBean = new AnnexThreeBean(); - AnnexFiveBean fiveBean = new AnnexFiveBean(); - AnnexTenBean tenBean = new AnnexTenBean(); - AnnexElevenBean elevenBean = new AnnexElevenBean(); - AnnexTwelveBean twelveBean = new AnnexTwelveBean(); - AnnexThirteenBean thirteenBean = new AnnexThirteenBean(); - AnnexFourteenBean fourteenBean = new AnnexFourteenBean(); - bean.setOverall(overallJt.getText()); bean.setImportant_matters(importantMattersJt.getText()); bean.setSafety_production(safetyProductionJt.getText()); @@ -5454,117 +3427,6 @@ public class DailyAction extends JFrame implements MouseListener { nineBean.setCumulative_power_personnel(powerPersonnelCumulativeNineJt.getText()); nineBean.setCumulative_power_vehicle(powerVehicleCumulativeNineJt.getText()); bean.setNineBean(nineBean); - /** - * 获取附件三 - */ - threeBean.setTotalAddDiagnosed(totalAddDiagnosedJt.getText()); - threeBean.setTotalAddHeal(totalAddHealJt.getText()); - threeBean.setTotalAddSuspected(totalAddSuspectedJt.getText()); - threeBean.setTotalExistingDiagnosed(totalExistingDiagnosedJt.getText()); - threeBean.setTotalExistingHeal(totalExistingHealJt.getText()); - threeBean.setTotalExistingSuspected(totalExistingSuspectedJt.getText()); - - threeBean.setDispatchAddDiagnosed(dispatchAddDiagnosedJt.getText()); - threeBean.setDispatchAddHeal(dispatchAddHealJt.getText()); - threeBean.setDispatchAddSuspected(dispatchAddSuspectedJt.getText()); - threeBean.setDispatchExistingDiagnosed(dispatchExistingDiagnosedJt.getText()); - threeBean.setDispatchExistingHeal(dispatchExistingHealJt.getText()); - threeBean.setDispatchExistingSuspected(dispatchExistingSuspectedJt.getText()); - - threeBean.setRepairAddDiagnosed(repairAddDiagnosedJt.getText()); - threeBean.setRepairAddHeal(repairAddHealJt.getText()); - threeBean.setRepairAddSuspected(repairAddSuspectedJt.getText()); - threeBean.setRepairExistingDiagnosed(repairExistingDiagnosedJt.getText()); - threeBean.setRepairExistingHeal(repairExistingHealJt.getText()); - threeBean.setRepairExistingSuspected(repairExistingSuspectedJt.getText()); - - threeBean.setMarketingAddDiagnosed(marketingAddDiagnosedJt.getText()); - threeBean.setMarketingAddHeal(marketingAddHealJt.getText()); - threeBean.setMarketingAddSuspected(marketingAddSuspectedJt.getText()); - threeBean.setMarketingExistingDiagnosed(marketingExistingDiagnosedJt.getText()); - threeBean.setMarketingExistingHeal(marketingExistingHealJt.getText()); - threeBean.setMarketingExistingSuspected(marketingExistingSuspectedJt.getText()); - - threeBean.setConstructionAddDiagnosed(constructionAddDiagnosedJt.getText()); - threeBean.setConstructionAddHeal(constructionAddHealJt.getText()); - threeBean.setConstructionAddSuspected(constructionAddSuspectedJt.getText()); - threeBean.setConstructionExistingDiagnosed(constructionExistingDiagnosedJt.getText()); - threeBean.setConstructionExistingHeal(constructionExistingHealJt.getText()); - threeBean.setConstructionExistingSuspected(constructionExistingSuspectedJt.getText()); - bean.setThreeBean(threeBean); - - fiveBean.setAirportPort(airportPortJt.getText()); - fiveBean.setVenueHospital(venueHospitalJt.getText()); - fiveBean.setGuesthouseHotel(guesthouseHotelJt.getText()); - fiveBean.setSafeguardPersonnel(safeguardPersonnelJt.getText()); - fiveBean.setElectricallyGuaranteedVehicles(electricallyGuaranteedVehiclesJt.getText()); - fiveBean.setPowerGenerationVehicles(powerGenerationVehiclesJt.getText()); - fiveBean.setDynamo(dynamoJt.getText()); - if(!fiveRemarkJt.getText().contains("请输入")){ - fiveBean.setRemark(fiveRemarkJt.getText()); - }else{ - fiveBean.setRemark(""); - } - bean.setFiveBean(fiveBean); - - tenBean.setUhv(tenUhvJt.getText()); - tenBean.setFiveHundredKv(tenFiveHundredKvJt.getText()); - tenBean.setTwoHundredTwentyKv(tenTwoHundredTwentyKvJt.getText()); - tenBean.setOneHundredTenKv(tenOneHundredTenKvJt.getText()); - tenBean.setThirtyFiveKv(tenThirtyFiveKvJt.getText()); - tenBean.setTenKv(tenTenKvJt.getText()); - tenBean.setAverageWaterLevel(tenAverageWaterLevelJt.getText()); - tenBean.setMeasuredValue(tenMeasuredValueJt.getText()); - tenBean.setDesignValues(tenDesignValuesJt.getText()); - tenBean.setActionHasBeenTaken(tenActionHasBeenTakenJt.getText()); - bean.setTenBean(tenBean); - - elevenBean.setUhv(elevenUhvJt.getText()); - elevenBean.setFiveHundredKv(elevenFiveHundredKvJt.getText()); - elevenBean.setTwoHundredTwentyKv(elevenTwoHundredTwentyKvJt.getText()); - elevenBean.setOneHundredTenKv(elevenOneHundredTenKvJt.getText()); - elevenBean.setThirtyFiveKv(elevenThirtyFiveKvJt.getText()); - elevenBean.setTenKv(elevenTenKvJt.getText()); - elevenBean.setAverageWaterLevel(elevenAverageWaterLevelJt.getText()); - elevenBean.setMeasuredValue(elevenMeasuredValueJt.getText()); - elevenBean.setActionHasBeenTaken(elevenActionHasBeenTakenJt.getText()); - bean.setElevenBean(elevenBean); - - twelveBean.setUhv(twelveUhvJt.getText()); - twelveBean.setFiveHundredKv(twelveFiveHundredKvJt.getText()); - twelveBean.setTwoHundredTwentyKv(twelveTwoHundredTwentyKvJt.getText()); - twelveBean.setOneHundredTenKv(twelveOneHundredTenKvJt.getText()); - twelveBean.setThirtyFiveKv(twelveThirtyFiveKvJt.getText()); - twelveBean.setTenKv(twelveTenKvJt.getText()); - twelveBean.setAverageWaterLevel(twelveAverageWaterLevelJt.getText()); - twelveBean.setMeasuredValue(twelveMeasuredValueJt.getText()); - twelveBean.setDesignValues(twelveDesignValuesJt.getText()); - twelveBean.setActionHasBeenTaken(twelveActionHasBeenTakenJt.getText()); - bean.setTwelveBean(twelveBean); - - thirteenBean.setUhv(thirteenUhvJt.getText()); - thirteenBean.setFiveHundredKv(thirteenFiveHundredKvJt.getText()); - thirteenBean.setTwoHundredTwentyKv(thirteenTwoHundredTwentyKvJt.getText()); - thirteenBean.setOneHundredTenKv(thirteenOneHundredTenKvJt.getText()); - thirteenBean.setThirtyFiveKv(thirteenThirtyFiveKvJt.getText()); - thirteenBean.setTenKv(thirteenTenKvJt.getText()); - thirteenBean.setAverageWaterLevel(thirteenAverageWaterLevelJt.getText()); - thirteenBean.setMeasuredValue(thirteenMeasuredValueJt.getText()); - thirteenBean.setDesignValues(thirteenDesignValuesJt.getText()); - thirteenBean.setActionHasBeenTaken(thirteenActionHasBeenTakenJt.getText()); - bean.setThirteenBean(thirteenBean); - - fourteenBean.setUhv(fourteenUhvJt.getText()); - fourteenBean.setFiveHundredKv(fourteenFiveHundredKvJt.getText()); - fourteenBean.setTwoHundredTwentyKv(fourteenTwoHundredTwentyKvJt.getText()); - fourteenBean.setOneHundredTenKv(fourteenOneHundredTenKvJt.getText()); - fourteenBean.setThirtyFiveKv(fourteenThirtyFiveKvJt.getText()); - fourteenBean.setTenKv(fourteenTenKvJt.getText()); - fourteenBean.setAverageWaterLevel(fourteenAverageWaterLevelJt.getText()); - fourteenBean.setMeasuredValue(fourteenMeasuredValueJt.getText()); - fourteenBean.setDesignValues(fourteenDesignValuesJt.getText()); - fourteenBean.setActionHasBeenTaken(fourteenActionHasBeenTakenJt.getText()); - bean.setFourteenBean(fourteenBean); return bean; } @@ -5631,6 +3493,90 @@ public class DailyAction extends JFrame implements MouseListener { list.add(inputAmountVehicleJt.getText() + ""); list.add(inputAmountPowerVehicleJt.getText() + ""); list.add(inputAmountDynamoJt.getText() + ""); + + list.add(powerSubstationAddOutageUvhJt.getText() + ""); + list.add(powerSubstationAddOutageFiveJt.getText() + ""); + list.add(powerSubstationAddOutageTwoJt.getText() + ""); + list.add(powerSubstationAddOutageOneJt.getText() + ""); + list.add(powerSubstationAddOutageThreeJt.getText() + ""); + list.add(powerSubstationAddRepairOutageUvhJt.getText() + ""); + list.add(powerSubstationAddRepairOutageFiveJt.getText() + ""); + list.add(powerSubstationAddRepairOutageTwoJt.getText() + ""); + list.add(powerSubstationAddRepairOutageOneJt.getText() + ""); + list.add(powerSubstationAddRepairOutageThreeJt.getText() + ""); + list.add(powerSubstationAddNoRepairOutageUvhJt.getText() + ""); + list.add(powerSubstationAddNoRepairOutageFiveJt.getText() + ""); + list.add(powerSubstationAddNoRepairOutageTwoJt.getText() + ""); + list.add(powerSubstationAddNoRepairOutageOneJt.getText() + ""); + list.add(powerSubstationAddNoRepairOutageThreeJt.getText() + ""); + list.add(powerSubstationCumulativeOutageUvhJt.getText() + ""); + list.add(powerSubstationCumulativeOutageFiveJt.getText() + ""); + list.add(powerSubstationCumulativeOutageTwoJt.getText() + ""); + list.add(powerSubstationCumulativeOutageOneJt.getText() + ""); + list.add(powerSubstationCumulativeOutageThreeJt.getText() + ""); + list.add(powerSubstationCumulativeRepairOutageUvhJt.getText() + ""); + list.add(powerSubstationCumulativeRepairOutageFiveJt.getText() + ""); + list.add(powerSubstationCumulativeRepairOutageTwoJt.getText() + ""); + list.add(powerSubstationCumulativeRepairOutageOneJt.getText() + ""); + list.add(powerSubstationCumulativeRepairOutageThreeJt.getText() + ""); + list.add(powerSubstationCumulativeNoRepairOutageUvhJt.getText() + ""); + list.add(powerSubstationCumulativeNoRepairOutageFiveJt.getText() + ""); + list.add(powerSubstationCumulativeNoRepairOutageTwoJt.getText() + ""); + list.add(powerSubstationCumulativeNoRepairOutageOneJt.getText() + ""); + list.add(powerSubstationCumulativeNoRepairOutageThreeJt.getText() + ""); + list.add(transmitElectricityAddOutageUvhJt.getText() + ""); + list.add(transmitElectricityAddOutageFiveJt.getText() + ""); + list.add(transmitElectricityAddOutageTwoJt.getText() + ""); + list.add(transmitElectricityAddOutageOneJt.getText() + ""); + list.add(transmitElectricityAddOutageThreeJt.getText() + ""); + list.add(transmitElectricityAddOutageTenJt.getText() + ""); + list.add(transmitElectricityAddRepairOutageUvhJt.getText() + ""); + list.add(transmitElectricityAddRepairOutageFiveJt.getText() + ""); + list.add(transmitElectricityAddRepairOutageTwoJt.getText() + ""); + list.add(transmitElectricityAddRepairOutageOneJt.getText() + ""); + list.add(transmitElectricityAddRepairOutageThreeJt.getText() + ""); + list.add(transmitElectricityAddRepairOutageTenJt.getText() + ""); + list.add(transmitElectricityAddNoRepairOutageUvhJt.getText() + ""); + list.add(transmitElectricityAddNoRepairOutageFiveJt.getText() + ""); + list.add(transmitElectricityAddNoRepairOutageTwoJt.getText() + ""); + list.add(transmitElectricityAddNoRepairOutageOneJt.getText() + ""); + list.add(transmitElectricityAddNoRepairOutageThreeJt.getText() + ""); + list.add(transmitElectricityAddNoRepairOutageTenJt.getText() + ""); + list.add(transmitElectricityCumulativeOutageUvhJt.getText() + ""); + list.add(transmitElectricityCumulativeOutageFiveJt.getText() + ""); + list.add(transmitElectricityCumulativeOutageTwoJt.getText() + ""); + list.add(transmitElectricityCumulativeOutageOneJt.getText() + ""); + list.add(transmitElectricityCumulativeOutageThreeJt.getText() + ""); + list.add(transmitElectricityCumulativeOutageTenJt.getText() + ""); + list.add(transmitElectricityCumulativeRepairOutageUvhJt.getText() + ""); + list.add(transmitElectricityCumulativeRepairOutageFiveJt.getText() + ""); + list.add(transmitElectricityCumulativeRepairOutageTwoJt.getText() + ""); + list.add(transmitElectricityCumulativeRepairOutageOneJt.getText() + ""); + list.add(transmitElectricityCumulativeRepairOutageThreeJt.getText() + ""); + list.add(transmitElectricityCumulativeRepairOutageTenJt.getText() + ""); + list.add(transmitElectricityCumulativeNoRepairOutageUvhJt.getText() + ""); + list.add(transmitElectricityCumulativeNoRepairOutageFiveJt.getText() + ""); + list.add(transmitElectricityCumulativeNoRepairOutageTwoJt.getText() + ""); + list.add(transmitElectricityCumulativeNoRepairOutageOneJt.getText() + ""); + list.add(transmitElectricityCumulativeNoRepairOutageThreeJt.getText() + ""); + list.add(transmitElectricityCumulativeNoRepairOutageTenJt.getText() + ""); + list.add(nineAddTaiDistrictDisasterJt.getText() + ""); + list.add(nineAddPersonnelDisasterJt.getText() + ""); + list.add(nineAddTaiDistrictRepairJt.getText() + ""); + list.add(nineAddPersonnelRepairJt.getText() + ""); + list.add(nineAddTaiDistrictNoRepairJt.getText() + ""); + list.add(nineAddPersonnelNoRepairJt.getText() + ""); + list.add(powerPersonnelAddNineJt.getText() + ""); + list.add(powerVehicleAddNineJt.getText() + ""); + list.add(nineCumulativeTaiDistrictDisasterJt.getText() + ""); + list.add(nineCumulativePersonnelDisasterJt.getText() + ""); + list.add(nineCumulativeTaiDistrictRepairJt.getText() + ""); + list.add(nineCumulativePersonnelRepairJt.getText() + ""); + list.add(nineCumulativeTaiDistrictNoRepairJt.getText() + ""); + list.add(nineCumulativePersonnelNoRepairJt.getText() + ""); + list.add(powerPersonnelCumulativeNineJt.getText() + ""); + list.add(powerVehicleCumulativeNineJt.getText() + ""); + return list; } diff --git a/src/main/java/com/bonus/autoweb/UI/frame/LogAction.java b/src/main/java/com/bonus/autoweb/UI/frame/LogAction.java index c1f9bad..e4691b2 100644 --- a/src/main/java/com/bonus/autoweb/UI/frame/LogAction.java +++ b/src/main/java/com/bonus/autoweb/UI/frame/LogAction.java @@ -12,10 +12,10 @@ import java.awt.event.FocusListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.io.*; -import java.net.URLEncoder; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.List; +import java.net.URLEncoder; /** * 日志页面 diff --git a/src/main/java/com/bonus/autoweb/base/AutoMain.java b/src/main/java/com/bonus/autoweb/base/AutoMain.java index d73abe4..b5199be 100644 --- a/src/main/java/com/bonus/autoweb/base/AutoMain.java +++ b/src/main/java/com/bonus/autoweb/base/AutoMain.java @@ -1,12 +1,13 @@ package com.bonus.autoweb.base; +import com.jacob.activeX.ActiveXComponent; +import com.jacob.com.Dispatch; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; -import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.interactions.Actions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,24 +33,17 @@ public class AutoMain { /** * 初始化驱动 */ - public void initDrive(int type) { + public void initDrive() { // chromedriver服务地址 System.setProperty(DataConfig.DRIVE_NAME, DataConfig.drivePath); ChromeOptions option = new ChromeOptions(); //添加浏览器地址 -// option.setBinary("C:\\Program Files\\Mozilla Firefox\\firefox.exe");//个人本地 - option.setBinary("C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe");//个人本地 -// option.setBinary("C:\\Users\\19814\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe");//个人本地 -// option.setBinary("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"); -// option.setBinary("C:\\Users\\Administrator\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe");//宿州 -// option.addArguments("start-fullscreen"); + option.setBinary("C:\\Users\\Administrator\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe"); option.addArguments("--start-maximized"); option.addArguments("--force-device-scale-factor=0.75"); option.addArguments("disable-infobars"); - //隐藏页面 // option.addArguments("--headless"); -// webDriver = new FirefoxDriver(option); webDriver = new ChromeDriver(option); } @@ -61,25 +55,6 @@ public class AutoMain { login(userName, pass); openDuty(); } - public void startYuJingAuto(String userName, String pass) throws Exception { - openWeb(); - log.info("打开网站成功"); - login(userName, pass); - log.info("登录成功"); - openYuJing(); - } - public void startYuJingActionAuto(String userName, String pass) throws Exception { - openWeb(); - log.info("打开网站成功"); - login(userName, pass); - log.info("登录成功"); - openYuJingAction(); - } - public void startCaoLianAuto(String userName, String pass) throws Exception { - openWeb(); - login(userName, pass); - openCheckTheDrills(); - } /** * 打开网站 @@ -87,7 +62,7 @@ public class AutoMain { public void openWeb() throws InterruptedException { //第一步打开指定网站 webDriver.get(DataConfig.URL); - log.info("打开利辛应急指挥中心网站------------"); + log.info("打开泗县应急指挥中心网站------------"); Thread.sleep(2000); } @@ -137,26 +112,16 @@ public class AutoMain { * 打开值班管理页面,并定位到值班管理的iframe */ private void openDuty() throws InterruptedException { - Thread.sleep(5000); -// -// try { -// WebElement alertDiv = webDriver.findElement(By.xpath("/html/body/div[2]/div/div[1]/div/div[1]/div[1]/span")); -// if(alertDiv.getText()) { -// -// } -// }catch (Exception e){ -// -// } - try { webDriver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS); } catch (Exception e) { e.printStackTrace(); } - Thread.sleep(10000); + Thread.sleep(3000); //执行鼠标悬停动作-管理 Actions action = new Actions(webDriver); - WebElement wegl = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/div[1]/div[6]/div/div/div[6]/span/span/div")); + 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); @@ -192,133 +157,6 @@ public class AutoMain { Thread.sleep(300); } - private void openYuJing() throws InterruptedException{ - try { - webDriver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS); - } catch (Exception e) { - e.printStackTrace(); - } - Thread.sleep(5000); - //执行鼠标悬停动作-管理 - Actions action = new Actions(webDriver); - WebElement wegl = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/div[1]/div[6]/div/div/div[2]/span/span/div")); - action.moveToElement(wegl).build().perform(); - Thread.sleep(300); - log.info("执行鼠标悬停动作-管理"); - //获取管理标签中的aria-describedby属性 el-popover-7909 - String attributeId = wegl.getAttribute("aria-describedby"); - log.info("管理标签的ID值为:" + attributeId); - Thread.sleep(300); - - -// //执行鼠标悬停动作-常态值班 -// String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[3]"; -// WebElement wectzb = webDriver.findElement(By.xpath(ctzbXpath)); -// action.moveToElement(wectzb).build().perform(); -// Thread.sleep(300); - - - //打开预警响应管理页面 - //*[@id=\"" + attributeId + "\"]/div/div[2]/div[2]/div[1]/div[2] - String zbglXpath = "//*[@id=\"" + attributeId + "\"]/div/div/div[2]/div[3]"; - webDriver.findElement(By.xpath(zbglXpath)).click(); - log.info("打开预警页面------------"); - Thread.sleep(800); - - //定位值班管理iframe的标签 - WebElement dutyIframe = webDriver.findElement(By.id("warningResTicket")); - webDriver.switchTo().frame(dutyIframe); - log.info("定位到预警响应管理iframe-----------"); - Thread.sleep(500); - } - private void openYuJingAction() throws InterruptedException{ - try { - webDriver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS); - } catch (Exception e) { - e.printStackTrace(); - } - Thread.sleep(5000); - //执行鼠标悬停动作-管理 - Actions action = new Actions(webDriver); - WebElement wegl = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/div[1]/div[6]/div/div/div[2]/span/span/div")); - action.moveToElement(wegl).build().perform(); - Thread.sleep(300); - log.info("执行鼠标悬停动作-管理"); - //获取管理标签中的aria-describedby属性 el-popover-7909 - String attributeId = wegl.getAttribute("aria-describedby"); - log.info("管理标签的ID值为:" + attributeId); - Thread.sleep(300); - - -// //执行鼠标悬停动作-预警行动 -// String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[4]"; -// WebElement wectzb = webDriver.findElement(By.xpath(ctzbXpath)); -// action.moveToElement(wectzb).build().perform(); -// Thread.sleep(300); - - - //打开预警响应管理页面 - //*[@id=\"" + attributeId + "\"]/div/div[2]/div[2]/div[1]/div[2] - String zbglXpath = "//*[@id=\"" + attributeId + "\"]/div/div/div[2]/div[4]"; - webDriver.findElement(By.xpath(zbglXpath)).click(); - log.info("打开预警页面------------"); - Thread.sleep(800); - - //定位值班管理iframe的标签 - WebElement dutyIframe = webDriver.findElement(By.id("yjczrwgl")); - webDriver.switchTo().frame(dutyIframe); - log.info("定位到预警响应处置任务管理iframe-----------"); - Thread.sleep(500); - } - - /** - * 打开检查操练管理页面,并定位到日常操练的iframe - */ - private void openCheckTheDrills() throws InterruptedException { - try { - webDriver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS); - } catch (Exception e) { - e.printStackTrace(); - } - Thread.sleep(3000); - //执行鼠标悬停动作-管理 - Actions action = new Actions(webDriver); - 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); - - //获取管理标签中的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(); - Thread.sleep(1500); - - //打开日常操练页面 - //*[@id=\"" + attributeId + "\"]/div/div[2]/div[2]/div[1]/div[2] -// String zbglXpath = "//*[@id=\"" + attributeId + "\"]/div/div[2]/div[2]/div/div[1]"; -// webDriver.findElement(By.xpath(zbglXpath)).click(); -// log.info("打开日常操练页面------------"); -// /* TODO 800 --> 1500 */ -// Thread.sleep(1500); - - //定位日常操练iframe的标签 - WebElement dutyIframe = webDriver.findElement(By.id("rccl")); - webDriver.switchTo().frame(dutyIframe); - log.info("定位到日常操练iframe-----------"); - Thread.sleep(8000); - //定位日常操练iframe的标签 -// WebElement insideIframe = webDriver.findElement(By.xpath("/html/body/div/section/div[1]/div[2]/div/iframe")); -// webDriver.switchTo().frame(insideIframe); -// log.info("定位到日常操练内部iframe-----------"); -// Thread.sleep(3000); - } - /** * 关闭浏览器驱动 */ @@ -342,7 +180,8 @@ public class AutoMain { Thread.sleep(5000); //执行鼠标悬停动作-管理 Actions action = new Actions(webDriver); - WebElement wegl = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/div[1]/div[6]/div/div/div[6]/span/span/div")); + 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); diff --git a/src/main/java/com/bonus/autoweb/base/DataConfig.java b/src/main/java/com/bonus/autoweb/base/DataConfig.java index 11faf94..816f9aa 100644 --- a/src/main/java/com/bonus/autoweb/base/DataConfig.java +++ b/src/main/java/com/bonus/autoweb/base/DataConfig.java @@ -1,5 +1,7 @@ package com.bonus.autoweb.base; +import com.bonus.autoweb.DateTimeUtils; + public class DataConfig { /** * url 网站地址 @@ -9,54 +11,36 @@ public class DataConfig { * 驱动名称 */ protected static final String DRIVE_NAME = "webdriver.chrome.driver"; -// protected static final String DRIVE_NAME = "webdriver.gecko.driver"; /** - * 用户名1 张宽杰 + * 用户名1 */ - public static final String USER_NAME1 = "zhangkj1533"; + public static final String USER_NAME1 = "hanhy0054"; /** * 密码1 */ - public static final String PASS1 = "zkj1533.."; + public static final String PASS1 = "hhylix0054++"; /** - * 用户名2 张贺 + * 用户名2 */ - public static final String USER_NAME2 = "zhangh655x"; + public static final String USER_NAME2 = "fangwc8132"; /** * 密码2 */ - public static final String PASS2 = "f7ye@158"; - /** - * 用户名3 杨军 - */ - public static final String USER_NAME3 = "yangj0052"; - - /** - * 密码3 - */ - public static final String PASS3 = "QWas1357,"; - /** - * 用户名4 肖国德 - */ - public static final String USER_NAME4 = "xiaogd1494"; - - /** - * 密码4 - */ - public static final String PASS4 = "xgd**2271"; + public static final String PASS2 = "ahdl1234--"; /** * 浏览器驱动地址 */ -// protected static final String drivePath = "E:\\bns\\chromedriver_win32\\geckodriver.exe";//个人本地 -// protected static final String drivePath = "E:\\chromedriver_win32\\chromedriver.exe";//个人本地 - protected static final String drivePath = "E:\\bns\\chromedriver_win32\\chromedriver.exe";//宿州客户地址 +// protected static final String drivePath = "E:\\chromedriver_win32\\chromedriver.exe"; + protected static final String drivePath = "E:\\bns\\chromedriver_win32\\chromedriver.exe"; public static final String filePath = "E:\\bns\\config"; +// public static final String filePath = "D:\\config"; + public static String weatherUrl = "http://10.138.4.27:9021/EPCIM/control/ypdgt/qxyj/getQXYJ?city=泗县&rectime="+ DateTimeUtils.getCurrentDay(); } diff --git a/src/main/java/com/bonus/autoweb/base/DutyChangeShifts.java b/src/main/java/com/bonus/autoweb/base/DutyChangeShifts.java index 846d93d..0f72001 100644 --- a/src/main/java/com/bonus/autoweb/base/DutyChangeShifts.java +++ b/src/main/java/com/bonus/autoweb/base/DutyChangeShifts.java @@ -22,7 +22,7 @@ public class DutyChangeShifts { * 打开交接班页面 */ public void openChangeShifts() throws InterruptedException { - Thread.sleep(5000); + Thread.sleep(3000); //定位交接班并点击 webDriver.findElement(By.id("tab-6")).click(); log.info("定位交接班并点击1----------"); @@ -56,10 +56,10 @@ public class DutyChangeShifts { } else { if (type == 1) { //晚交班 - xpaht = "//*[@id=\"pane-6\"]/div/div[3]/div[1]/div[1]/div[2]/button[1]"; + xpaht = "//*[@id=\"pane-6\"]/div/div[3]/div[2]/div[1]/div[2]/button[1]"; } else { //晚班接班 - xpaht = "//*[@id=\"pane-6\"]/div/div[3]/div[1]/div[1]/div[2]/button[2]"; + xpaht = "//*[@id=\"pane-6\"]/div/div[3]/div[2]/div[1]/div[2]/button[2]"; } } log.info("交接班地址:"+xpaht+"----------"); @@ -70,8 +70,18 @@ public class DutyChangeShifts { //交接事项说明 if (type == 1) { // /html/body/div[3]/div/div[2]/div/form/div[7]/div/div[1]/textarea - webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[2]/div/div[1]/textarea")).sendKeys("正常"); - log.info("交接事项说明----------"); + + try { + webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[2]/div/div[1]/textarea")).sendKeys("正常"); + }catch (Exception e){ + log.info("交接事项说明div[3]不存在----------"); + } + + try { + webDriver.findElement(By.xpath("/html/body/div[8]/div/div[2]/div/form/div[2]/div/div[1]/textarea")).sendKeys("正常"); + }catch (Exception e){ + log.info("交接事项说明div[8]不存在----------"); + } log.info("交接事项说明----------"); Thread.sleep(500); //提交 webDriver.findElement(By.xpath("/html/body/div[3]/div/div[3]/div/button[2]")).click(); @@ -96,7 +106,7 @@ public class DutyChangeShifts { */ public void changeDay() throws Exception { - Thread.sleep(1000*3); + Thread.sleep(1000*2); //判断当前日期是不是每月第一天的日期,true log.info("选择前一天----------"); int tr = 1; @@ -150,7 +160,7 @@ public class DutyChangeShifts { xpath = "//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[2]/table/tbody/tr[" + tr + "]" + "/td[" + td + "]"; // String dayNum = mothDay.substring(8, 10); // WebElement spanElement = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[2]/table/tbody/tr[" + tr + "]" + "/td[" + td + "]/div/div/div[1]/span")); -// if (dayNum.equals(spanElement.getText())) { +// if (!dayNum.equals(spanElement.getText())) { // xpath = "//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[2]/table/tbody/tr[" + (tr + 1) + "]" + "/td[" + td + "]/div"; // } } @@ -175,4 +185,4 @@ public class DutyChangeShifts { } -} \ No newline at end of file +} diff --git a/src/main/java/com/bonus/autoweb/base/DutyClock.java b/src/main/java/com/bonus/autoweb/base/DutyClock.java index 07b05cf..6f2edaa 100644 --- a/src/main/java/com/bonus/autoweb/base/DutyClock.java +++ b/src/main/java/com/bonus/autoweb/base/DutyClock.java @@ -69,9 +69,40 @@ public class DutyClock { log.info("打卡签到----------"); Thread.sleep(1000*5); + //判断是否有相应的元素 + try { + Thread.sleep(2000); + webDriver.findElement(By.xpath("html/body/div[2]/div/div[3]/button[2]")).click(); + log.info("确认提前签到div[2]----------"); + } catch (Exception e) { + log.info("无确认框,在时间范围内----------"); + } + + //判断是否有相应的元素 + try { + Thread.sleep(2000); + webDriver.findElement(By.xpath("html/body/div[6]/div/div[3]/button[2]")).click(); + log.info("确认提前签到div[6]----------"); + } catch (Exception e) { + log.info("无确认框,在时间范围内----------"); + } + + + try { + //点击弹出框确认 + webDriver.findElement(By.xpath("/html/body/div[2]/div/div[2]/div/div[2]/div[1]")).click(); + } catch (Exception e) { + log.info("当前打卡确认按钮不存在div[2]"); + } + try { + //点击弹出框确认 + webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/div[2]/div[1]")).click(); + } catch (Exception e) { + log.info("当前打卡按钮不存在div[3]"); + } //点击弹出框确认 - webDriver.findElement(By.xpath("/html/body/div[2]/div/div[2]/div/div[2]/div[1]")).click(); + //webDriver.findElement(By.xpath("/html/body/div[2]/div/div[2]/div/div[2]/div[1]")).click(); log.info("点击弹出框确认----------"); Thread.sleep(800); } @@ -80,7 +111,7 @@ public class DutyClock { * 选择上个晚班签退 */ public void changeDay() throws Exception { - Thread.sleep(3000); + Thread.sleep(800); //判断当前日期是不是每月第一天的日期,true boolean tf = false; int tr = 1; @@ -128,11 +159,10 @@ public class DutyClock { //判断上个月最后一天的位置 tr = DateTimeUtils.getWeekNum(mothDay); td = DateTimeUtils.getWeekOfDate(mothDay); - xpath = "//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[2]/table/tbody/tr[" + tr + "]" + "/td[" + td + "]"; // String dayNum = mothDay.substring(8, 10); // WebElement spanElement = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[2]/table/tbody/tr[" + tr + "]" + "/td[" + td + "]/div/div/div[1]/span")); -// if (dayNum.equals(spanElement.getText())) { +// if (!dayNum.equals(spanElement.getText())) { // xpath = "//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[2]/table/tbody/tr[" + (tr + 1) + "]" + "/td[" + td + "]/div"; // } } @@ -144,7 +174,7 @@ public class DutyClock { Thread.sleep(3000); //进行晚班签退操作 log.info("进行晚班签退操作----------"); - dutyClockOper(1,2); + dutyClockOper(2,2); Thread.sleep(300); diff --git a/src/main/java/com/bonus/autoweb/base/DutyDailyCheck.java b/src/main/java/com/bonus/autoweb/base/DutyDailyCheck.java index 06b2e4f..0cfc143 100644 --- a/src/main/java/com/bonus/autoweb/base/DutyDailyCheck.java +++ b/src/main/java/com/bonus/autoweb/base/DutyDailyCheck.java @@ -29,7 +29,7 @@ public class DutyDailyCheck { // do { // pageLoaded = (Boolean) jsExecutor.executeScript("return document.readyState").equals("complete"); // } while (!pageLoaded); - Thread.sleep(10000); + Thread.sleep(5000); //定位值班日报并点击 webDriver.findElement(By.id("tab-4")).click(); log.info("定位值班日报并点击-----------"); @@ -68,7 +68,8 @@ public class DutyDailyCheck { //同意审核按钮点击 - WebElement tyCheckBtn=webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/section/div/div[4]/div[1]/div[16]/button[4]")); + WebElement tyCheckBtn=webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/section/div/div[4]/div[1]/div[16" + + "]/button[4]")); if(tyCheckBtn.isDisplayed()){ //存在 log.info("同意审核按钮存在-----------"); @@ -88,7 +89,6 @@ public class DutyDailyCheck { log.info("退出当前iframe----------"); Thread.sleep(1000*2); - //定位值班管理iframe的标签 WebElement dutyIframe= webDriver.findElement(By.id("zbgln")); webDriver.switchTo().frame(dutyIframe); diff --git a/src/main/java/com/bonus/autoweb/base/DutyDailyOp.java b/src/main/java/com/bonus/autoweb/base/DutyDailyOp.java index 23761fb..5992da8 100644 --- a/src/main/java/com/bonus/autoweb/base/DutyDailyOp.java +++ b/src/main/java/com/bonus/autoweb/base/DutyDailyOp.java @@ -2162,16 +2162,19 @@ public class DutyDailyOp { //点击弹出框确认 ///html/body/div[3]/div/div[3]/button[2] - WebElement qrBtn2 = webDriver.findElement(By.xpath("/html/body/div[2]/div/div[3]/button[2]")); - if (qrBtn2.isDisplayed()){ + WebElement qrBtn = webDriver.findElement(By.xpath("/html/body/div[2]/div/div[3]/button[2]")); + if (qrBtn.isDisplayed()) { //存在 - log.info("日报确认按钮2存在-----------"); - log.info("日报确认按钮2:" + qrBtn2.getAttribute("class")); - log.info("日报确认按钮2:" + qrBtn2.getAttribute("type")); - log.info("日报确认按钮2:" + qrBtn2.getText()); - qrBtn2.click(); + log.info("日报确认按钮存在-----------"); + log.info("日报确认按钮:" + qrBtn.getAttribute("class")); + log.info("日报确认按钮:" + qrBtn.getAttribute("type")); + log.info("日报确认按钮:" + qrBtn.getText()); + qrBtn.click(); + Thread.sleep(1000); - }else{ + //取消弹框 +// webDriver.findElement(By.xpath("/html/body/div[3]/div/div[3]/button[1]")).click(); + } else{ log.info("日报确认按钮不存在-----------"); } log.info("点击弹出框确认----------"); diff --git a/src/main/java/com/bonus/autoweb/base/DutyLogIOp.java b/src/main/java/com/bonus/autoweb/base/DutyLogIOp.java index bb3a48f..e8c8dd1 100644 --- a/src/main/java/com/bonus/autoweb/base/DutyLogIOp.java +++ b/src/main/java/com/bonus/autoweb/base/DutyLogIOp.java @@ -16,6 +16,7 @@ import java.io.FileInputStream; import java.io.InputStreamReader; import java.nio.charset.Charset; import java.text.ParseException; +import java.util.Calendar; import org.slf4j.Logger; @@ -23,7 +24,7 @@ import org.slf4j.Logger; * 操作值班日志类 */ public class DutyLogIOp { - private Logger log = LoggerFactory.getLogger(DutyLogIOp.class); + private Logger log = LoggerFactory.getLogger(DutyLogIOp.class); private WebDriver webDriver; public DutyLogIOp(WebDriver webDriver) { @@ -40,37 +41,37 @@ public class DutyLogIOp { //早上填写前一天的日志,将标签改为前一天 changeDay(); } - Thread.sleep(5000); + Thread.sleep(3000); //定位值班日志并点击 webDriver.findElement(By.id("tab-5")).click(); log.info("定位值班日志并点击----------"); - Thread.sleep(5000); + Thread.sleep(3000); // /html/body/div[2] 弹窗 您没有填写值班日志的排班班次 //定位写日志标签,打开日志页面 webDriver.findElement(By.xpath("//*[@id=\"pane-5\"]/div/div[2]/div[2]/button")).click(); log.info("定位写日志标签,打开日志页面----------"); - Thread.sleep(500); + Thread.sleep(300); //退出当前iframe,进入到日报编辑iframe webDriver.switchTo().defaultContent(); log.info("退出当前iframe----------"); - Thread.sleep(5500); + Thread.sleep(300); //定位日志编辑iframe的标签 WebElement dutyEditIframe = webDriver.findElement(By.id("add-local-zbrzbz")); webDriver.switchTo().frame(dutyEditIframe); log.info("定位日志编辑iframe的标签----------"); - Thread.sleep(1000); + Thread.sleep(300); dutyLogContent(); if (type == 1) { //昨天的日志填写完毕之后将日期改为今天 webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[1]/div[2]/div/button[2]")).click(); log.info("将日期选择回当日----------"); - Thread.sleep(500); + Thread.sleep(300); } } @@ -85,12 +86,12 @@ public class DutyLogIOp { if (!DateTimeUtils.isOneDay()) { //不是本月第一天 String currentDay = DateTimeUtils.getCurrentDay(); - log.info("currentDay:" + currentDay); + log.info("currentDay:"+currentDay); int weekNum = DateTimeUtils.getWeekNum(currentDay); - log.info("weekNum:" + weekNum); + log.info("weekNum:"+weekNum); int dayNum = DateTimeUtils.getWeekOfDate(currentDay); - log.info("dayNum:" + dayNum); - /*if (dayNum == 1) { + log.info("dayNum:"+dayNum); + /* if (dayNum == 1) { tr = weekNum - 1; td = 7; } else { @@ -98,51 +99,54 @@ public class DutyLogIOp { td = dayNum - 1; }*/ if (dayNum == 1) { - if (DateTimeUtils.getMonthOneDayIs0()) {//第一天是0 + if(DateTimeUtils.getMonthOneDayIs0()){//第一天是0 tr = weekNum; - } else { - tr = weekNum - 1; - if (weekNum == 1) { + }else{ + tr = weekNum-1; + if (weekNum == 1){ tr = 5; } } td = 7; - } else { - if (DateTimeUtils.getMonthOneDayIs0()) {//第一天是0 - tr = weekNum + 1; - } else { + }else { + if(DateTimeUtils.getMonthOneDayIs0()){//第一天是0 + tr = weekNum+1; + }else{ tr = weekNum; } td = dayNum - 1; } - log.info("标签位置:tr:" + tr + ",td:" + td); + + log.info("标签位置:tr:"+tr+",td:"+td); + xpath = "//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[2]/table/tbody/tr[" + tr + "]" + "/td[" + td + "]/div"; } else { - //点击上月按钮,切换至上月 + // 如果是本月的第一天,点击上月按钮切换到上月 webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[1]/div[2]/div/button[1]")).click(); log.info("点击上月按钮,切换至上月----------"); Thread.sleep(500); - //获取上月最后一天日期 + // 获取上月的最后一天 String mothDay = DateTimeUtils.getBeforeLastMonthdate(); - //判断上个月最后一天的位置 - tr = DateTimeUtils.getWeekNum(mothDay); - td = DateTimeUtils.getWeekOfDate(mothDay); + // 判断上个月最后一天的位置 + int weekNum = DateTimeUtils.getWeekNum(mothDay); + int dayNum = DateTimeUtils.getWeekOfDate(mothDay); + // 获取上月最后一天在日历中的位置 + if (isFirstDayOfLastMonthSunday()) { + tr = weekNum + 1; + } else { + tr = weekNum; + } + td = dayNum; xpath = "//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[2]/table/tbody/tr[" + tr + "]" + "/td[" + td + "]/div"; -// String dayNum = mothDay.substring(8, 10); -// WebElement spanElement = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[2]/table/tbody/tr[" + tr + "]" + "/td[" + td + "]/div/div/div[1]/span")); -// if (dayNum.equals(spanElement.getText())) { -// xpath = "//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[2]/table/tbody/tr[" + (tr + 1) + "]" + "/td[" + td + "]/div"; -// } - } //选择前一天的日期 - log.info("前一天的标签:" + xpath); + log.info("前一天的标签:"+xpath); webDriver.findElement(By.xpath(xpath)).click(); log.info("选择前一天的日期----------"); - Thread.sleep(500); + Thread.sleep(300); } /** @@ -153,10 +157,10 @@ public class DutyLogIOp { // /html/body/div[3]/div/div[2]/div/form/div[1]/div/div/div[1]/div/div/div/div webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[1]/div/div/div[1]/div/div/div/div[1]")).click(); log.info("值班时间----------"); - Thread.sleep(500); + Thread.sleep(300); webDriver.findElement(By.xpath("/html/body/div[4]/div[1]/div[1]/ul/li")).click(); log.info("值班时间----------"); - Thread.sleep(500); + Thread.sleep(300); // 反序列化--> 解决乱码问题 File file = new File(DataConfig.filePath + "\\log.xml"); @@ -164,15 +168,15 @@ public class DutyLogIOp { String xml = null; try { //主要就是这里的设置 - in = new InputStreamReader(new FileInputStream(file), Charset.forName("gbk")); + in = new InputStreamReader(new FileInputStream(file), Charset.forName("gbk") ); StringBuffer sb = new StringBuffer(); - char[] array = new char[1024]; + char[] array= new char[1024]; int length = -1; - while ((length = in.read(array)) != -1) { + while((length=in.read(array))!= -1){ sb.append(array, 0, length); } in.close(); - xml = sb.toString().trim(); + xml=sb.toString().trim(); System.out.println(xml); } catch (Exception e) { // TODO: handle exception @@ -221,184 +225,155 @@ public class DutyLogIOp { // /html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[1]/tr[1]/td/div[3]/div/div[1]/textarea webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[1]/tr[1]/td/div[3]/div/div/textarea")).sendKeys(sjjc_title); log.info("事件监测 标题----------"); - Thread.sleep(500); + Thread.sleep(300); //事件监测 内容 String sjjc_content = bean.getEvent_detection_content(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[1]/tr[2]/td/div/div/div/textarea")).sendKeys(sjjc_content); log.info("事件监测 内容----------"); - Thread.sleep(500); + Thread.sleep(300); //保电工作 标题 String bdgz_title = bean.getPower_work_title(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[2]/tr[1]/td/div[3]/div/div/textarea")).sendKeys(bdgz_title); log.info("保电工作 标题----------"); - Thread.sleep(2000); - + Thread.sleep(300); //保电工作 内容 String bdgz_content = bean.getPower_work_content(); - System.out.println("bdgz_content:" + bdgz_content); - WebElement bdgzContentElement = webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[2]/tr[2]/td/div/div/div[1]/textarea")); - - bdgzContentElement.clear(); - bdgzContentElement.sendKeys(bdgz_content.trim()); -// webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[2]/tr[2]/td/div/div/div[1]/textarea")).sendKeys(bdgz_content); + webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[2]/tr[2]/td/div/div/div/textarea")).sendKeys(bdgz_content); log.info("保电工作 内容----------"); - Thread.sleep(2000); + Thread.sleep(300); //资源核查 标题 String zyhc_title = bean.getResource_check_title(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[3]/tr[1]/td/div[3]/div/div/textarea")).sendKeys(zyhc_title); log.info("资源核查 标题----------"); - Thread.sleep(500); + Thread.sleep(300); //资源核查 内容 String zyhc_content = bean.getResource_check_content(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[3]/tr[2]/td/div/div/div/textarea")).sendKeys(zyhc_content); log.info("资源核查 内容----------"); - Thread.sleep(500); + Thread.sleep(300); //通信测试 标题 String txcs_title = bean.getCommunications_test_title(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[4]/tr[1]/td/div[3]/div/div/textarea")).sendKeys(txcs_title); log.info("通信测试 标题----------"); - Thread.sleep(500); + Thread.sleep(300); //通信测试 内容 String txcs_content = bean.getCommunications_test_content(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[4]/tr[2]/td/div/div/div/textarea")).sendKeys(txcs_content); log.info("通信测试 内容----------"); - Thread.sleep(500); + Thread.sleep(300); //日常操练情况 标题 String rcclqk_title = bean.getDaily_operation_title(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[5]/tr[1]/td/div[3]/div/div/textarea")).sendKeys(rcclqk_title); log.info("日常操练情况 标题----------"); - Thread.sleep(500); + Thread.sleep(300); //日常操练情况 内容 String rcclqk_content = bean.getDaily_operation_content(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[5]/tr[2]/td/div/div/div/textarea")).sendKeys(rcclqk_content); log.info("日常操练情况 内容----------"); - Thread.sleep(500); + Thread.sleep(300); //日报填写情况 标题 String rbtxqk_title = bean.getDaily_submission_title(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[6]/tr[1]/td/div[3]/div/div/textarea")).sendKeys(rbtxqk_title); log.info("日报填写情况 标题----------"); - Thread.sleep(500); + Thread.sleep(300); //日常操练情况 内容 String rbtxqk_content = bean.getDaily_submission_content(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[6]/tr[2]/td/div/div/div/textarea")).sendKeys(rbtxqk_content); log.info("日常操练情况 内容----------"); - Thread.sleep(500); + Thread.sleep(300); //预警处置 标题 String yjcz_title = bean.getWarning_disposal_title(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[7]/tr[1]/td/div[3]/div/div/textarea")).sendKeys(yjcz_title); log.info("预警处置 标题----------"); - Thread.sleep(500); + Thread.sleep(300); //预警处置 内容 String yjcz_content = bean.getWarning_disposal_content(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[7]/tr[2]/td/div/div/div/textarea")).sendKeys(yjcz_content); log.info("预警处置 内容----------"); - Thread.sleep(500); + Thread.sleep(300); //一般记事 标题 String ybjs_title = bean.getGeneral_chronicles_title(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[8]/tr[1]/td/div[3]/div/div/textarea")).sendKeys(ybjs_title); log.info("一般记事 标题----------"); - Thread.sleep(500); + Thread.sleep(300); //一般记事 内容 String ybjs_content = bean.getGeneral_chronicles_content(); webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[4]/table/tr[2]/td/table[8]/tr[2]/td/div/div/div/textarea")).sendKeys(ybjs_content); log.info("一般记事 内容----------"); - Thread.sleep(500); + Thread.sleep(300); //提交日志 - WebElement submitDay = webDriver.findElement(By.xpath("/html/body/div[3]/div/div[3]/div/button[3]")); - log.info("提交日志按钮:" + submitDay.getText()); + WebElement submitDay=webDriver.findElement(By.xpath("/html/body/div[3]/div/div[3]/div/button[3]")); + log.info("提交日志按钮:"+submitDay.getText()); submitDay.click(); log.info("提交日志----------"); - Thread.sleep(500); + Thread.sleep(300); + + //判断是否有相应的元素 + try{ + Thread.sleep(2000); + webDriver.findElement(By.xpath("html/body/div[3]/div/div[3]/button[2]")).click(); + log.info("是否确认签到----------"); + }catch (Exception e){ + log.info("无确认框,在时间范围内div[3]----------"); + } + try{ + Thread.sleep(2000); + webDriver.findElement(By.xpath("html/body/div[4]/div/div[3]/button[2]")).click(); + log.info("是否确认签到----------"); + }catch (Exception e){ + log.info("无确认框,在时间范围内div[4]----------"); + } //点击弹出框确认 - WebElement qrBtn = webDriver.findElement(By.xpath("/html/body/div[4]/div/div[3]/button[2]")); - log.info("确认日志按钮:" + qrBtn.getText()); + WebElement qrBtn=webDriver.findElement(By.xpath("/html/body/div[4]/div/div[3]/button[2]")); + log.info("确认日志按钮:"+qrBtn.getText()); qrBtn.click(); - Thread.sleep(1000 * 3); + Thread.sleep(1000*3); //取消 // webDriver.findElement(By.xpath("/html/body/div[4]/div/div[3]/button[1]")).click(); log.info("点击弹出框确认----------"); - Thread.sleep(500); + Thread.sleep(300); //测试 点击取消按钮 /*webDriver.findElement(By.xpath("/html/body/div[3]/div/div[3]/div/button[1]")).click(); log.info("点击取消----------"); - Thread.sleep(500);*/ + Thread.sleep(300);*/ //退出当前iframe, webDriver.switchTo().defaultContent(); log.info("退出当前iframe----------"); - Thread.sleep(500); + Thread.sleep(3000); //定位值班管理iframe的标签 WebElement dutyIframe = webDriver.findElement(By.id("zbgln")); webDriver.switchTo().frame(dutyIframe); log.info("定位值班管理iframe的标签----------"); - Thread.sleep(500); + Thread.sleep(3000); } - public static void main(String[] args) throws ParseException { - int tr = 1; - int td = 1; - String currentDay = "2024-01-01"; - System.out.println(currentDay); - int weekNum = DateTimeUtils.getWeekNum(currentDay); - System.out.println(weekNum); - int dayNum = DateTimeUtils.getWeekOfDate(currentDay); - System.out.println(dayNum); - /*if (dayNum == 1) { - tr = weekNum - 1; - td = 7; - } else { - tr = weekNum; - td = dayNum - 1; - }*/ - if (dayNum == 1) { - if (DateTimeUtils.getMonthOneDayIs0()) {//第一天是0 - tr = weekNum; - } else { - tr = weekNum - 1; - if (weekNum == 1) { - tr = 5; - } - } - td = 7; - } else { - if (DateTimeUtils.getMonthOneDayIs0()) {//第一天是0 - tr = weekNum + 1; - } else { - tr = weekNum; - } - td = dayNum - 1; - } - System.out.println(tr); - System.out.println(td); - System.out.println("-------------------------"); - //获取上月最后一天日期 - String mothDay = "2023-12-31"; - System.out.println(mothDay); - //判断上个月最后一天的位置 - tr = DateTimeUtils.getWeekNum(mothDay); - td = DateTimeUtils.getWeekOfDate(mothDay); - System.out.println(tr); - System.out.println(td); - System.out.println(mothDay.substring(8,10)); + public static boolean isFirstDayOfLastMonthSunday() { + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.MONTH, -1); // Move to the previous month + calendar.set(Calendar.DAY_OF_MONTH, 1); // Set to the first day of the month + + int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); + return dayOfWeek == Calendar.SUNDAY; } } diff --git a/src/main/java/com/bonus/autoweb/task/AutoWebTask.java b/src/main/java/com/bonus/autoweb/task/AutoWebTask.java index f3022e6..8e4d17a 100644 --- a/src/main/java/com/bonus/autoweb/task/AutoWebTask.java +++ b/src/main/java/com/bonus/autoweb/task/AutoWebTask.java @@ -1,26 +1,11 @@ package com.bonus.autoweb.task; -import com.bonus.autoweb.DateTimeUtils; import com.bonus.autoweb.GetBasicData; import com.bonus.autoweb.base.*; -import org.apache.poi.ss.usermodel.Cell; -import org.apache.poi.ss.usermodel.Row; -import org.apache.poi.ss.usermodel.Sheet; -import org.apache.poi.ss.usermodel.Workbook; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; import org.slf4j.Logger; import org.openqa.selenium.WebDriver; import org.slf4j.LoggerFactory; -import java.io.BufferedReader; -import java.io.FileInputStream; -import java.io.FileReader; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; - /** * 应急指挥中心打卡任务类 */ @@ -47,6 +32,29 @@ public class AutoWebTask { log.info("韩宏宇开始打卡任务---------------------"); dutySigin(classes, 1, DataConfig.USER_NAME1, DataConfig.PASS1); } + public void testLogin(int classes) { + log.info("开始打卡任务---------------------"); + log.info("房万春开始打卡任务---------------------"); + //使用房万春账号签到 + loginDemo(classes, 1, DataConfig.USER_NAME2, DataConfig.PASS2); + } + + public int loginDemo(int classes, int type, String userName, String pass) { + AutoMain autoMain = new AutoMain(); + int count = 0; + try { + autoMain.initDrive(); + WebDriver webDriver = autoMain.getWebDriver(); + autoMain.startAuto(userName, pass); + DutyClock dutyClock = new DutyClock(webDriver); + dutyClock.openDutyClock(); + }catch (Exception e) { + log.error("签到任务", e); + } finally { + autoMain.closeDrive(); + } + return count; + } /** * 签到任务 @@ -62,15 +70,15 @@ public class AutoWebTask { AutoMain autoMain = new AutoMain(); int count = 0; try { - autoMain.initDrive(2); + autoMain.initDrive(); WebDriver webDriver = autoMain.getWebDriver(); autoMain.startAuto(userName, pass); DutyClock dutyClock = new DutyClock(webDriver); dutyClock.openDutyClock(); dutyClock.dutyClockOper(classes, type); + count = 1; //关闭浏览器 autoMain.closeDrive(); - count = 1; } catch (Exception e) { log.error("签到任务", e); } finally { @@ -85,21 +93,20 @@ public class AutoWebTask { * * @param type 1 早报 2晚报 */ - public int dutyAddDailyLogsTask(int type, String username, String password) { + public int dutyAddDailyLogsTask(int type) { log.info("开始日报填写任务---------------------"); //打开浏览器,进入应急指挥中心网站 AutoMain autoMain = new AutoMain(); WebDriver webDriver; int count = 0; try { - autoMain.initDrive(1); - autoMain.startAuto(username, password); + autoMain.initDrive(); + autoMain.startAuto(DataConfig.USER_NAME1, DataConfig.PASS1); webDriver = autoMain.getWebDriver(); //操作日报 DutyDailyOp ddo = new DutyDailyOp(webDriver); ddo.openDutyDaily(type); - Thread.sleep(5000); - count = 1; + Thread.sleep(1000); } catch (Exception e) { log.error("日报填写任务", e); } @@ -111,7 +118,6 @@ public class AutoWebTask { Thread.sleep(1000); count = 1; } catch (Exception e) { - count = 0; log.error("日报审核工作", e); } finally { autoMain.closeDrive(); @@ -119,173 +125,113 @@ public class AutoWebTask { return count; } - public int dutyAddLogsTask(int type, String username, String password) { + public int dutyAddLogsTask(int type) { log.info("开始日志填写任务---------------------"); //打开浏览器,进入应急指挥中心网站 int count = 0; AutoMain autoMain = new AutoMain(); WebDriver webDriver; try { - autoMain.initDrive(1); - autoMain.startAuto(username, password); + autoMain.initDrive(); + autoMain.startAuto(DataConfig.USER_NAME1, DataConfig.PASS1); //操作日志 webDriver = autoMain.getWebDriver(); DutyLogIOp dlo = new DutyLogIOp(webDriver); dlo.openDutyLog(type); count = 1; } catch (Exception e) { - count = 0; log.error("操作日志任务", e); - } finally { + }finally { autoMain.closeDrive(); } return count; } - public int changeTodayPersonaTask(int type, String username, String password) throws IOException { - log.info("开始日志填写任务---------------------"); - //打开浏览器,进入应急指挥中心网站 - int count = 0; + /** + * 定时获取基础数据 + */ + public int getYuJingData(int classes) { AutoMain autoMain = new AutoMain(); WebDriver webDriver; - FileInputStream excelFile = null; - Workbook workbook = null; + int count = 0; try { - autoMain.initDrive(1); - autoMain.startAuto(username, password); - //操作日志 + autoMain.initDrive(); + log.info("初始化驱动成功"); + autoMain.startAuto(DataConfig.USER_NAME1, DataConfig.PASS1); + log.info("startYuJingAuto成功"); + //获取基础数据 webDriver = autoMain.getWebDriver(); - Thread.sleep(3000); - //将日期改为今天的日期 - webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/section/main/div/div[1]/div[1]/div[3]/div[1]/div[2]/div/button[2]")).click(); - log.info("将日期选择回当日----------"); - Thread.sleep(1000); - //获取值班长账号姓名 和 账号名 - WebElement personLeaderNameEle = webDriver.findElement(By.xpath("//*[@id='pane-1']/div/div[3]/div/div/div[3" + - "]/table/tbody/tr[1]/td[2]/div/div/p[1]")); - String personLeaderName = personLeaderNameEle.getText(); - log.info("今日值班长:" + personLeaderName); - -// WebElement accountLeaderEle = webDriver.findElement(By.xpath("//*[@id='pane-1']/div/div[3]/div/div/div[3" + -// "]/table/tbody/tr[1]/td[2]/div/div/p[2]")); -// String accountLeader = accountLeaderEle.getText(); -// log.info("今日值班长账号:" + accountLeader); - - //获取值班员账号姓名 和 账号名 - WebElement personNameEle = webDriver.findElement(By.xpath("//*[@id='pane-1']/div/div[3]/div/div/div[3" + - "]/table/tbody/tr[2]/td[2]/div/div/p[1]")); - String personName = personNameEle.getText(); - log.info("今日值班人员:" + personName); - -// WebElement accountEle = webDriver.findElement(By.xpath("//*[@id='pane-1']/div/div[3]/div/div/div[3" + -// "]/table/tbody/tr[2]/td[2]/div/div/p[2]")); -// String account = accountEle.getText(); -// log.info("今日值班人员账号:" + account); - - Thread.sleep(3000); - excelFile = new FileInputStream("E:\\bns\\config\\zhibanaccount.xlsx"); - workbook = new XSSFWorkbook(excelFile); - Sheet datatypeSheet = workbook.getSheetAt(0); - String personLeaderPassword = ""; - String personPassword = ""; - String account = ""; - String accountLeader = ""; - int rowNum = 0; - for (Row row : datatypeSheet) { - String value = ""; - for (Cell cell : row) { - value += cell.getStringCellValue() + "]]]"; - } - value = value.substring(0, value.length() - 3); - try{ - if (value.contains(personName)) { - personPassword = value.split("]]]")[2]; - account = value.split("]]]")[1]; - } - }catch (IndexOutOfBoundsException ignored){ - log.error("出现异常:"+personName+"账号内容出错,在表格的第"+rowNum+"行附近"); - } - try{ - if (value.contains(personLeaderName)) { - personLeaderPassword = value.split("]]]")[2]; - accountLeader = value.split("]]]")[1]; - } - }catch (IndexOutOfBoundsException ignored){ - log.error("出现异常:"+personLeaderName+"账号内容出错,在表格的第"+rowNum+"行附近"); - } - rowNum++; - } - AutoUtils.write("E:\\bns\\config\\今日值班账号.txt", "今日值班长账号:"+accountLeader+";密码:"+personLeaderPassword+";\n" + - "今日值班员账号:"+account+";密码:"+personPassword+";"); - excelFile.close(); + GetBasicData gbd = new GetBasicData(webDriver); + log.info("获取天气预警值启动----"); + gbd.getYuJingBasicData(classes); count = 1; } catch (Exception e) { - log.error("操作日志任务", e); + count = 0; + log.error("获取基础数据任务", e); } finally { autoMain.closeDrive(); } return count; } + public int getCaoLianData(int classes) { + AutoMain autoMain = new AutoMain(); + WebDriver webDriver; + int count = 0; + try { + autoMain.initDrive(); + log.info("初始化驱动成功"); + autoMain.startAuto(DataConfig.USER_NAME1, DataConfig.PASS1); + //获取基础数据 + webDriver = autoMain.getWebDriver(); + GetBasicData gbd = new GetBasicData(webDriver); + gbd.getCaoLianBasicData(classes); + count = 1; + } catch (Exception e) { + count = 0; + log.error("获取基础操练数据任务", e); + } finally { + autoMain.closeDrive(); + } + return count; + } + + /** * 交接班任务 * * @param classes 班次,,1早班 2晚班 */ - public int dutyChangeTask1(int classes, String userName, String password) { - // 先交班 1 在接班 2 - //先走class1 在走class2 - log.info("开始交班任务---------------------"); + public int dutyChangeTask(int classes) { + log.info("开始交接班任务---------------------"); AutoMain autoMain = new AutoMain(); int count = 0; - WebDriver webDriver; try { //打开浏览器,进入应急指挥中心网站 - autoMain.initDrive(2); - autoMain.startAuto(userName, password); - webDriver = autoMain.getWebDriver(); + autoMain.initDrive(); + autoMain.startAuto(DataConfig.USER_NAME1, DataConfig.PASS1); + WebDriver webDriver = autoMain.getWebDriver(); DutyChangeShifts dutyChangeShifts = new DutyChangeShifts(webDriver); + //进行交班工作 if (classes == 2) { dutyChangeShifts.openChangeShifts(); - dutyChangeShifts.dutychangeOper(1, 2); + dutyChangeShifts.dutychangeOper(1, 1); } else { dutyChangeShifts.changeDay(); } Thread.sleep(1000); - - //关闭浏览器 - autoMain.closeDrive(); - count = 1; - } catch (Exception e) { - count = 0; - log.error("交接班任务:" + e); - } finally { - autoMain.closeDrive(); - } - return count; - } - - public int dutyChangeTask2(int classes, String userName, String password) { - log.info("开始接班任务---------------------"); - AutoMain autoMain = new AutoMain(); - WebDriver webDriver; - int count = 0; - try { - //打开浏览器,进入应急指挥中心网站 - autoMain.initDrive(2); - autoMain.startAuto(userName, password); - webDriver = autoMain.getWebDriver(); - - DutyChangeShifts dutyChangeShifts = new DutyChangeShifts(webDriver); //进行接班工作 - dutyChangeShifts.openChangeShifts(); dutyChangeShifts.dutychangeOper(classes, 2); - + try{ + dutyChangeShifts.dutychangeOper(classes, 2); + }catch (Exception e) { + log.error("交接班-接班已完成:", e); + } + count = 1; //关闭浏览器 autoMain.closeDrive(); - count = 1; } catch (Exception e) { count = 0; log.error("交接班任务:" + e); @@ -306,7 +252,7 @@ public class AutoWebTask { int count = 0; try { //打开浏览器,进入应急指挥中心网站 - autoMain.initDrive(2); + autoMain.initDrive(); autoMain.startAuto(userName, pass); WebDriver webDriver = autoMain.getWebDriver(); @@ -316,9 +262,9 @@ public class AutoWebTask { } else { dutyClock.dutyClockOper(1, 2); } + count = 1; //关闭浏览器 autoMain.closeDrive(); - count = 1; } catch (Exception e) { count = 0; log.error("签退任务", e); @@ -328,157 +274,12 @@ public class AutoWebTask { return count; } - /** - * 定时获取基础数据 - */ - public int getYuJingData(int classes, String username, String password) { - AutoMain autoMain = new AutoMain(); - WebDriver webDriver; - int count = 0; - try { - autoMain.initDrive(2); - log.info("初始化驱动成功"); - autoMain.startYuJingAuto(username, password); - log.info("startYuJingAuto成功"); - //获取基础数据 - webDriver = autoMain.getWebDriver(); - GetBasicData gbd = new GetBasicData(webDriver); - log.info("获取天气预警值启动----"); - gbd.getYuJingBasicData(classes); - count = 1; - } catch (Exception e) { - count = 0; - log.error("获取基础数据任务", e); - } finally { - autoMain.closeDrive(); - } - return count; - } - - /** - * 预警行动 - * - * @param classes - * @return - */ - public int getYuJingActionData(int classes, String username, String password) { - AutoMain autoMain = new AutoMain(); - WebDriver webDriver; - int count = 0; - try { - autoMain.initDrive(2); - log.info("初始化驱动成功"); - autoMain.startYuJingActionAuto(username, password); - log.info("startYuJingAuto成功"); - //获取基础数据 - webDriver = autoMain.getWebDriver(); - GetBasicData gbd = new GetBasicData(webDriver); - log.info("获取天气预警值启动----"); - gbd.getYuJingActionBasicData(classes); - count = 1; - } catch (Exception e) { - count = 0; - log.error("获取基础数据任务", e); - } finally { - autoMain.closeDrive(); - } - return count; - } - - public int getCaoLianData(int classes, String username, String password) { - AutoMain autoMain = new AutoMain(); - WebDriver webDriver; - int count = 0; - try { - autoMain.initDrive(2); - autoMain.startCaoLianAuto(username, password); - //获取基础数据 - webDriver = autoMain.getWebDriver(); - GetBasicData gbd = new GetBasicData(webDriver); - gbd.getCaoLianBasicData(classes); - count = 1; - } catch (Exception e) { - count = 0; - log.error("获取基础操练数据任务", e); - } finally { - autoMain.closeDrive(); - } - return count; - } - - - public static void main(String[] args) { - try { - String accountContent = GetBasicData.resolveGarbledCode("E:\\bns2\\config\\值班账号.txt"); - String content = GetBasicData.resolveGarbledCode("E:\\bns2\\config\\值班账号.txt"); - String todayContent = GetBasicData.resolveGarbledCode("E:\\bns2\\config\\今日值班账号.txt"); - String yesterdayContent = GetBasicData.resolveGarbledCode("E:\\bns2\\config\\昨日值班账号.txt"); - - String emergencyPerson = content.toString().split(";")[0].split(":")[1]; - String emergencyPersonPassword = content.toString().split(";")[1].split(":")[1]; - //今日签到值班人员 - String todaySignInPerson = todayContent.toString().split(";")[0].split(":")[1]; - String todaySignInPersonPassword = todayContent.toString().split(";")[1].split(":")[1]; - //昨日签退人员 - String yesterdaySignOutPerson = yesterdayContent.toString().split(";")[0].split(":")[1]; - String yesterdaySignOutPersonPassword = yesterdayContent.toString().split(";")[1].split(":")[1]; - System.out.println(emergencyPerson); - System.out.println(emergencyPersonPassword); - System.out.println(todaySignInPerson); - System.out.println(todaySignInPersonPassword); - System.out.println(yesterdaySignOutPerson); - System.out.println(yesterdaySignOutPersonPassword); - String[] accountArray = accountContent.split("--账号--:"); - String personName = "张天强"; - String personAccount = "ztq"; - FileInputStream excelFile = new FileInputStream("E:\\bns2\\config\\zhibanaccount.xlsx"); - Workbook workbook = new XSSFWorkbook(excelFile); - Sheet datatypeSheet = workbook.getSheetAt(0); - for (Row row : datatypeSheet) { - String value = ""; - for (Cell cell : row) { - value += cell.getStringCellValue() + "]]]"; - } - value = value.substring(0, value.length() - 3); - System.out.println(value); - if (value.indexOf(personName) != -1) { - System.out.println("今天:" + value); - AutoUtils.write("E:\\bns2\\config\\今日值班账号.txt", "今日账号:" + value.split("]]]")[1] + ";密码:" + value.split( - "]]]")[2]); - break; - } - } - - //TODO 昨日的账号在今日的签退任务完成后,拿取今天的打卡人员数据放入昨日值班账号txt即可 - - } catch (IOException e) { - e.printStackTrace(); - } - - } - - public static String read(String filename) { - String line; - StringBuilder content = new StringBuilder(); - try { - BufferedReader reader = new BufferedReader(new FileReader(filename)); - while ((line = reader.readLine()) != null) { - content.append(line).append("\n"); - } - reader.close(); - } catch (IOException e) { - System.out.println("An error occurred while reading the text file."); - e.printStackTrace(); - } - return content.toString(); - } - public int addExercisePlan(String type, String company, int code, String userName, String pass) { AutoMain autoMain = new AutoMain(); WebDriver webDriver; int count = 0; try { - autoMain.initDrive(2); + autoMain.initDrive(); autoMain.startAddExercisePlan(userName, pass); //获取基础数据 webDriver = autoMain.getWebDriver(); @@ -493,4 +294,5 @@ public class AutoWebTask { } return count; } + } diff --git a/src/main/resources/META-INF/MANIFEST.MF b/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000..1d285bc --- /dev/null +++ b/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: com.bonus.autoweb.TestMain +