From d2f397e1ad3ebada1c5052f9d852b1cd49ca6721 Mon Sep 17 00:00:00 2001 From: lijh Date: Fri, 4 Jul 2025 10:39:40 +0800 Subject: [PATCH] 20250704 --- .../connor/ld/plm/ld05/ECSelectDialog.java | 46 +++++++++++++++++-- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/src/com/net/connor/ld/plm/ld05/ECSelectDialog.java b/src/com/net/connor/ld/plm/ld05/ECSelectDialog.java index 01ab772..3afa324 100644 --- a/src/com/net/connor/ld/plm/ld05/ECSelectDialog.java +++ b/src/com/net/connor/ld/plm/ld05/ECSelectDialog.java @@ -556,8 +556,39 @@ public class ECSelectDialog extends JFrame implements ActionListener, FormModel setCellValue(titleRow, 12, "EC", sheet, row); setCellValue(titleRow, 13, formBean.getLd6_RWnycd(), sheet, row); setCellValue(titleRow, 14, formBean.getLd6_RWjjcd(), sheet, row); - setCellValue(titleRow, 15, formBean.getLd6_RWworkhour(), sheet, row); - setCellValue(titleRow, 16, formBean.getLd6_RWsjworkhour(), sheet, row);// 超时扣分 + + + Double aa = 0d; + Double bb = 0d; + if(formBean.getLd6_RWworkhour() == null || formBean.getLd6_RWworkhour().isEmpty()) { + setCellValue(titleRow, 15, "", sheet, row); + }else { + try { + aa = Double.parseDouble(formBean.getLd6_RWworkhour()); + setCellValue(titleRow, 15, aa, sheet, row); + } catch (Exception e2) { + // TODO: handle exception + setCellValue(titleRow, 15, "", sheet, row); + } + + } + + + if(formBean.getLd6_RWsjworkhour() == null || formBean.getLd6_RWsjworkhour().isEmpty()) { + setCellValue(titleRow, 16, "", sheet, row); + }else { + try { + bb = Double.parseDouble(formBean.getLd6_RWsjworkhour()); + setCellValue(titleRow, 16, bb, sheet, row); + } catch (Exception e2) { + // TODO: handle exception + setCellValue(titleRow, 16, "", sheet, row); + } + + + } + + String ld6_RWfptime = formBean.getLd6_RWfptime(); LocalDate parseFp = null; @@ -743,7 +774,7 @@ public class ECSelectDialog extends JFrame implements ActionListener, FormModel score = Double.parseDouble(ld6_RWworkhour) * ggrwxMap.get(ggrwxStr) * rwxzMap.get("EC") * nycdMap.get(nycdStr) * jjcdMap.get(jjcdStr) * cskfMap.get(result); - setCellValue(titleRow, 35, score == null ? "" : score + "", sheet, row);// 得分 + setCellValue(titleRow, 35, score, sheet, row);// 得分 } catch (Exception e2) { // TODO: handle exception setCellValue(titleRow, 35, "", sheet, row);// 得分 @@ -861,6 +892,15 @@ public class ECSelectDialog extends JFrame implements ActionListener, FormModel cell.setCellValue(str); } +public static void setCellValue(XSSFRow row, int colum, Double str, XSSFSheet sheet, int rowNum) { + + XSSFCell cell = row.getCell(colum); + if (cell == null) { + cell = row.createCell(colum); + } + cell.setCellValue(str); + } + public static LocalDate parseToLocalDate(String dateString) { // 定义所有可能的日期格式