From b544f6296a4886c02274444030b00312d08e4fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Thu, 17 Nov 2022 14:22:45 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=95=EC=9B=90/=ED=98=84=EC=9B=90=20?= =?UTF-8?q?=ED=98=84=ED=99=A9=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=97=91?= =?UTF-8?q?=EC=85=80=20=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80.=20=EC=99=B8=EC=82=AC=EA=B2=BD=EC=B0=B0=20>=20?= =?UTF-8?q?=EA=B2=BD=EB=A0=A5=ED=98=84=ED=99=A9=20=EC=9E=91=EC=97=85?= =?UTF-8?q?=EC=A4=91.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrackdownStatusController.java | 4 +- .../fishingBoat/FishingBoatBaseEntity.java | 20 +-- .../faisp/main/userInfo/FaispController.java | 19 +- src/main/resources/static/js/common.js | 47 +++++ .../static/js/faStatistics/crackdownStatus.js | 49 +---- .../static/js/faStatistics/processResult.js | 68 +------ .../static/js/faStatistics/sailor.js | 65 +------ .../resources/static/js/faisp/careerMgt.js | 169 ++++++++++++++++++ .../static/js/faisp/personnelStatus.js | 9 +- .../igActivities/fpiMgt/affair/statistics.js | 51 +----- .../faisp/{ => career}/careerMgt.html | 10 +- .../templates/faisp/eduEditModal.html | 90 ---------- .../faisp/education/eduEditModal.html | 90 ++++++++++ .../faisp/{ => education}/educationMgt.html | 0 .../personnelStatus/personnelStatus.html | 7 +- .../faisp/{ => police}/policeEditModal.html | 0 .../templates/faisp/police/policeHistory.html | 152 ++++++++++++++++ .../faisp/{ => police}/policeList.html | 0 .../templates/faisp/policeHistory.html | 152 ---------------- 19 files changed, 496 insertions(+), 506 deletions(-) create mode 100644 src/main/resources/static/js/faisp/careerMgt.js rename src/main/resources/templates/faisp/{ => career}/careerMgt.html (95%) delete mode 100644 src/main/resources/templates/faisp/eduEditModal.html create mode 100644 src/main/resources/templates/faisp/education/eduEditModal.html rename src/main/resources/templates/faisp/{ => education}/educationMgt.html (100%) rename src/main/resources/templates/faisp/{ => police}/policeEditModal.html (100%) create mode 100644 src/main/resources/templates/faisp/police/policeHistory.html rename src/main/resources/templates/faisp/{ => police}/policeList.html (100%) delete mode 100644 src/main/resources/templates/faisp/policeHistory.html diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/CrackdownStatusController.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/CrackdownStatusController.java index 92ddeb8b..6889994b 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/CrackdownStatusController.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/CrackdownStatusController.java @@ -44,8 +44,8 @@ public class CrackdownStatusController { for (CrackdownStatus cds:crackdownStatusList) { cds.setViolationList(violationRepository.findByFbKey(cds.getFbKey())); - cds.setProcessResult(processResultRepository.findByCdsKey(cds.getCdsKey()).orElse(null)); - cds.setFishingBoat(fishingBoatRepository.findByCdsKey(cds.getCdsKey()).orElse(null)); + cds.setProcessResult(processResultRepository.findByCdsKey(cds.getCdsKey()).orElse(new ProcessResult())); + cds.setFishingBoat(fishingBoatRepository.findByCdsKey(cds.getCdsKey()).orElse(new FishingBoat())); cds.setSailorList(sailorRepository.findByFbKey(cds.getFbKey())); } diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/fishingBoat/FishingBoatBaseEntity.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/fishingBoat/FishingBoatBaseEntity.java index 19c5e05c..3c3b19a1 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/fishingBoat/FishingBoatBaseEntity.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/fishingBoat/FishingBoatBaseEntity.java @@ -26,9 +26,9 @@ public class FishingBoatBaseEntity extends BaseModel { @Column(name = "nationality") private String nationality; @Column(name = "sailor_cnt") - private Integer sailorCnt; + private Integer sailorCnt=0; @Column(name = "ton_cnt") - private Double tonCnt; + private Double tonCnt=0d; @Column(name = "fishery_type") private String fisheryType; @Column(name = "boat_material") @@ -40,17 +40,17 @@ public class FishingBoatBaseEntity extends BaseModel { @Column(name = "offense_type") private String offenseType; @Column(name = "offense_weight") - private Double offenseWeight; + private Double offenseWeight=0d; @Column(name = "offense_quantity") - private Integer offenseQuantity; + private Integer offenseQuantity=0; @Column(name = "offense_amount") - private Integer offenseAmount; + private Integer offenseAmount=0; @Column(name = "offense_illegal_waste_quantity") - private Integer offenseIllegalWasteQuantity; + private Integer offenseIllegalWasteQuantity=0; @Column(name = "dambo_unpaid_amount") - private Integer damboUnpaidAmount; + private Integer damboUnpaidAmount=0; @Column(name = "dambo_payment") - private Integer damboPayment; + private Integer damboPayment=0; @Column(name = "payment_payment_dt") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime paymentPaymentDt; @@ -67,11 +67,11 @@ public class FishingBoatBaseEntity extends BaseModel { @Column(name = "catch_fish_species") private String catchFishSpecies; @Column(name = "catch_cnt") - private Integer catchCnt; + private Integer catchCnt=0; @Column(name = "offense_fish_species") private String offenseFishSpecies; @Column(name = "offense_catch_cnt") - private Integer offenseCatchCnt; + private Integer offenseCatchCnt=0; @Column(name = "save_yn") private String saveYn; @Column(name = "wrt_organ") diff --git a/src/main/java/com/dbnt/faisp/main/userInfo/FaispController.java b/src/main/java/com/dbnt/faisp/main/userInfo/FaispController.java index 1c55f5fc..d6e3a30d 100644 --- a/src/main/java/com/dbnt/faisp/main/userInfo/FaispController.java +++ b/src/main/java/com/dbnt/faisp/main/userInfo/FaispController.java @@ -42,7 +42,7 @@ public class FaispController { @GetMapping("/policeList") public ModelAndView policeList(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo, HttpServletResponse response) { - ModelAndView mav = new ModelAndView("faisp/policeList"); + ModelAndView mav = new ModelAndView("faisp/police/policeList"); userInfo.setDownOrganCdList(loginUser.getDownOrganCdList()); if(userInfo.getUserStatus() == null) { userInfo.setUserStatus("USC003"); @@ -91,7 +91,7 @@ public class FaispController { @GetMapping("/policeEditModal") public ModelAndView policeEditModal(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo){ - ModelAndView mav = new ModelAndView("/faisp/policeEditModal"); + ModelAndView mav = new ModelAndView("/faisp/police/policeEditModal"); mav.addObject("ogList", codeMgtService.selectCodeMgtList("OG", "")); mav.addObject("ofcList", codeMgtService.selectCodeMgtList("OFC", "")); mav.addObject("titleList", codeMgtService.selectCodeMgtList("JT", "")); @@ -115,7 +115,7 @@ public class FaispController { @GetMapping("/policeHistory") public ModelAndView policeHistory(@AuthenticationPrincipal UserInfo loginUser,UserInfoHistory userInfoHistory){ - ModelAndView mav = new ModelAndView("/faisp/policeHistory"); + ModelAndView mav = new ModelAndView("/faisp/police/policeHistory"); mav.addObject("userStatus", userInfoService.selectuserStatus(userInfoHistory)); mav.addObject("policeList", userInfoService.selectPoliceHisList(userInfoHistory)); @@ -201,7 +201,7 @@ public class FaispController { @GetMapping("/careerMgt") public ModelAndView careerMgt(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo, HttpServletResponse response){ - ModelAndView mav = new ModelAndView("faisp/careerMgt"); + ModelAndView mav = new ModelAndView("faisp/career/careerMgt"); userInfo.setDownOrganCdList(loginUser.getDownOrganCdList()); if(userInfo.getUserStatus() == null) { userInfo.setUserStatus("USC003"); @@ -222,7 +222,7 @@ public class FaispController { @GetMapping("/educationMgt") public ModelAndView educationMgt(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo, HttpServletResponse response){ - ModelAndView mav = new ModelAndView("faisp/educationMgt"); + ModelAndView mav = new ModelAndView("faisp/education/educationMgt"); userInfo.setDownOrganCdList(loginUser.getDownOrganCdList()); if(userInfo.getUserStatus() == null) { userInfo.setUserStatus("USC003"); @@ -243,7 +243,7 @@ public class FaispController { @GetMapping("/eduEditModal") public ModelAndView eduEditModal(@AuthenticationPrincipal UserInfo loginUser,UserEdu userEdu){ - ModelAndView mav = new ModelAndView("/faisp/eduEditModal"); + ModelAndView mav = new ModelAndView("/faisp/education/eduEditModal"); //메뉴권한 확인 String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/educationMgt").get(0).getAccessAuth(); @@ -257,16 +257,13 @@ public class FaispController { @PostMapping("/saveEdu") @ResponseBody public int saveEdu(@AuthenticationPrincipal UserInfo loginUser,@RequestBody List userEdu){ - System.out.println("userEdu"+userEdu); - int userSeq = userInfoService.saveEdu(loginUser,userEdu); - return userSeq; + return userInfoService.saveEdu(loginUser,userEdu); } @PostMapping("/deleteEdu") @ResponseBody public int deleteEdu(@RequestBody UserEdu userEdu) { - int userSeq = userInfoService.deleteEdu(userEdu); - return userSeq; + return userInfoService.deleteEdu(userEdu); } private List calcStatusList(List statusList) { diff --git a/src/main/resources/static/js/common.js b/src/main/resources/static/js/common.js index 1376c922..6e620bee 100644 --- a/src/main/resources/static/js/common.js +++ b/src/main/resources/static/js/common.js @@ -227,4 +227,51 @@ function dateTimeCalc(startDateTime, endDateTime) { } return null; +} + +function exportExcel(name, tableId){ + var excelHandler = { + getExcelFileName : function(){ + return name+'_'+getToday()+'.xlsx'; //파일명 + }, + getSheetName : function(){ + return name; + }, + getExcelData : function(){ + return document.getElementById(tableId); //TABLE id + }, + getWorksheet : function(){ + return XLSX.utils.table_to_sheet(this.getExcelData()); + } + } + // step 1. workbook 생성 + var wb = XLSX.utils.book_new(); + + // step 2. 시트 만들기 + var newWorksheet = excelHandler.getWorksheet(); + + // step 3. workbook에 새로만든 워크시트에 이름을 주고 붙인다. + XLSX.utils.book_append_sheet(wb, newWorksheet, excelHandler.getSheetName()); + + // step 4. 엑셀 파일 만들기 + var wbout = XLSX.write(wb, {bookType:'xlsx', type: 'binary'}); + + // step 5. 엑셀 파일 내보내기 + saveAs(new Blob([s2ab(wbout)],{type:"application/octet-stream"}), excelHandler.getExcelFileName()); +} + +function s2ab(s) { + var buf = new ArrayBuffer(s.length); //convert s to arrayBuffer + var view = new Uint8Array(buf); //create uint8array as viewer + for (var i=0; i - +
@@ -32,10 +32,9 @@
- -
+
-
- -
-
-
diff --git a/src/main/resources/templates/faisp/eduEditModal.html b/src/main/resources/templates/faisp/eduEditModal.html deleted file mode 100644 index 93555052..00000000 --- a/src/main/resources/templates/faisp/eduEditModal.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/main/resources/templates/faisp/education/eduEditModal.html b/src/main/resources/templates/faisp/education/eduEditModal.html new file mode 100644 index 00000000..91333e33 --- /dev/null +++ b/src/main/resources/templates/faisp/education/eduEditModal.html @@ -0,0 +1,90 @@ + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/faisp/educationMgt.html b/src/main/resources/templates/faisp/education/educationMgt.html similarity index 100% rename from src/main/resources/templates/faisp/educationMgt.html rename to src/main/resources/templates/faisp/education/educationMgt.html diff --git a/src/main/resources/templates/faisp/personnelStatus/personnelStatus.html b/src/main/resources/templates/faisp/personnelStatus/personnelStatus.html index da6bb521..43516f77 100644 --- a/src/main/resources/templates/faisp/personnelStatus/personnelStatus.html +++ b/src/main/resources/templates/faisp/personnelStatus/personnelStatus.html @@ -24,6 +24,7 @@
+
@@ -31,7 +32,7 @@
- +
@@ -73,9 +74,7 @@ - - - + diff --git a/src/main/resources/templates/faisp/policeEditModal.html b/src/main/resources/templates/faisp/police/policeEditModal.html similarity index 100% rename from src/main/resources/templates/faisp/policeEditModal.html rename to src/main/resources/templates/faisp/police/policeEditModal.html diff --git a/src/main/resources/templates/faisp/police/policeHistory.html b/src/main/resources/templates/faisp/police/policeHistory.html new file mode 100644 index 00000000..488cf49c --- /dev/null +++ b/src/main/resources/templates/faisp/police/policeHistory.html @@ -0,0 +1,152 @@ + + + + + +
관서
+ + + + + + + + + + + + + + + + +
작성자등록일
+ + + +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/src/main/resources/templates/faisp/policeList.html b/src/main/resources/templates/faisp/police/policeList.html similarity index 100% rename from src/main/resources/templates/faisp/policeList.html rename to src/main/resources/templates/faisp/police/policeList.html diff --git a/src/main/resources/templates/faisp/policeHistory.html b/src/main/resources/templates/faisp/policeHistory.html deleted file mode 100644 index 4448893a..00000000 --- a/src/main/resources/templates/faisp/policeHistory.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - \ No newline at end of file