已修改7个文件
已重命名2个文件
已添加133个文件
| | |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>inspect-server</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>cnas-process</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.belerweb</groupId> |
| | | <artifactId>pinyin4j</artifactId> |
| | | <version>2.5.1</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-13 ææäº 13:52:52 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class PersonBasicInfoDetailsDto { |
| | | |
| | | @ApiModelProperty("ç¨æ·id") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty("ç¨æ·å§å") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("å
¥èæ¶é´") |
| | | private String entryTimeStr; |
| | | |
| | | @ApiModelProperty("å®é
å®ä¹ ç»æ") |
| | | private String endPracticalPracticeStr; |
| | | |
| | | @ApiModelProperty("ç±è´¯") |
| | | private String nativePlace; |
| | | |
| | | @ApiModelProperty("身份è¯å·") |
| | | private String identityCard; |
| | | |
| | | @ApiModelProperty("身份è¯å°å") |
| | | private String idAddress; |
| | | |
| | | @ApiModelProperty("ç¨æ·ææºå·") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("æ¯ä¸é¢æ ¡") |
| | | private String graduatedInstitutions1; |
| | | |
| | | @ApiModelProperty("ä¸ä¸") |
| | | private String major1; |
| | | |
| | | @ApiModelProperty("æ¯ä¸æ¶é´1") |
| | | private LocalDateTime graduationTime1; |
| | | |
| | | @ApiModelProperty("æé«å¦å") |
| | | private String officialAcademicRedentials; |
| | | |
| | | @ApiModelProperty("æé«å¦ä½") |
| | | private String highestDegree; |
| | | |
| | | @ApiModelProperty("èç§°") |
| | | private String professionalTitle; |
| | | |
| | | // èä¸è½å |
| | | |
| | | @ApiModelProperty("ç´§æ¥è系人") |
| | | private String emergencyContact; |
| | | |
| | | @ApiModelProperty("ç´§æ¥è系人çµè¯") |
| | | private String emergencyContactPhone; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| | | import com.ruoyi.personnel.pojo.PersonBasicInfo; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @JsonIgnoreProperties(ignoreUnknown = true) |
| | | @ExcelIgnoreUnannotated |
| | | public class PersonBasicInfoDto extends PersonBasicInfo { |
| | | @ApiModelProperty(value = "è´¦å·") |
| | | @ExcelProperty("åå·¥ç¼å·") |
| | | private String account; |
| | | |
| | | @ApiModelProperty(value = "å§å") |
| | | @ExcelProperty("å§å") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "å§å(è±æ)") |
| | | private String nameEn; |
| | | |
| | | @ApiModelProperty(value = "å¹´é¾") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "çµè¯å·ç ") |
| | | @ExcelProperty("ææºå·") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "é®ç®±") |
| | | private String email; |
| | | |
| | | @ApiModelProperty(value = "é¨é¨") |
| | | private String department; |
| | | |
| | | @ApiModelProperty(value = "limsç»ç»æ¶æ") |
| | | private String departLimsId; |
| | | |
| | | @ApiModelProperty(value = "ç¾åç
§çå°å") |
| | | private String signatureUrl; |
| | | |
| | | @ApiModelProperty(value = "èªèº«ç
§çå°å") |
| | | private String pictureUrl; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonCommunicationAbility; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonCommunicationAbilityDto extends PersonCommunicationAbility { |
| | | |
| | | private String userName; |
| | | |
| | | private String account; |
| | | |
| | | private String createUserName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonJobResponsibilities; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonJobResponsibilitiesDto extends PersonJobResponsibilities { |
| | | |
| | | private String incumbentName; |
| | | |
| | | private String supervisorName; |
| | | |
| | | private String departLimsName; |
| | | |
| | | private String account; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonPersonnelCapacity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonPersonnelCapacityDto extends PersonPersonnelCapacity { |
| | | |
| | | @ApiModelProperty("æäº¤äººå§å") |
| | | private String submitOperatingPersonnelName; |
| | | |
| | | @ApiModelProperty("æä½äººå§å") |
| | | private String confirmOperatingPersonnelName; |
| | | |
| | | @ApiModelProperty("人åå§å") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("å²ä½åç§°") |
| | | private String postName; |
| | | |
| | | @ApiModelProperty("å²ä½èè´£") |
| | | private String responsibilities; |
| | | |
| | | @ApiModelProperty("å·¥ä½ç»å") |
| | | private String placeWork; |
| | | |
| | | @ApiModelProperty("ä¸ä¸") |
| | | private String major; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonPersonnelCapacity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/28 |
| | | */ |
| | | @Data |
| | | public class PersonPersonnelCapacityExportDto extends PersonPersonnelCapacity { |
| | | |
| | | @ApiModelProperty("å²ä½åç§°") |
| | | private String postName; |
| | | |
| | | @ApiModelProperty("人åå§å") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("å¦å") |
| | | private String officialAcademicRedentials; |
| | | |
| | | @ApiModelProperty("ä¸ä¸") |
| | | private String major; |
| | | |
| | | @ApiModelProperty("èç§°") |
| | | private String professionalTitle; |
| | | |
| | | @ApiModelProperty("å·¥ä½ç»å") |
| | | private String placeWork; |
| | | |
| | | @ApiModelProperty("å¦å 符åä¸å¦(1ï¼ç¬¦å)") |
| | | private String academicConformNot1 = "â¡"; |
| | | @ApiModelProperty("å¦å 符åä¸å¦(2ï¼ä¸ç¬¦å)") |
| | | private String academicConformNot2 = "â¡"; |
| | | @ApiModelProperty("å¦å 符åä¸å¦(3ï¼ä¸éç¨)") |
| | | private String academicConformNot3 = "â¡"; |
| | | |
| | | @ApiModelProperty("ç¸å
³å¹´é 符åä¸å¦(1ï¼ç¬¦å)") |
| | | private String relatedYearsConformNot1 = "â¡"; |
| | | @ApiModelProperty("ç¸å
³å¹´é 符åä¸å¦(2ï¼ä¸ç¬¦å)") |
| | | private String relatedYearsConformNot2 = "â¡"; |
| | | @ApiModelProperty("ç¸å
³å¹´é 符åä¸å¦(3ï¼ä¸éç¨)") |
| | | private String relatedYearsConformNot3 = "â¡"; |
| | | |
| | | @ApiModelProperty("ç¸å
³å¹è® 符åä¸å¦(1ï¼ç¬¦å)") |
| | | private String relatedTrainingConformNot1 = "â¡"; |
| | | @ApiModelProperty("ç¸å
³å¹è® 符åä¸å¦(2ï¼ä¸ç¬¦å)") |
| | | private String relatedTrainingConformNot2 = "â¡"; |
| | | @ApiModelProperty("ç¸å
³å¹è® 符åä¸å¦(3ï¼ä¸éç¨)") |
| | | private String relatedTrainingConformNot3 = "â¡"; |
| | | |
| | | @ApiModelProperty("ç¸å
³ç»éª 符åä¸å¦(1ï¼ç¬¦å)") |
| | | private String relevantExperienceConformNot1 = "â¡"; |
| | | @ApiModelProperty("ç¸å
³ç»éª 符åä¸å¦(2ï¼ä¸ç¬¦å)") |
| | | private String relevantExperienceConformNot2 = "â¡"; |
| | | @ApiModelProperty("ç¸å
³ç»éª 符åä¸å¦(3ï¼ä¸éç¨)") |
| | | private String relevantExperienceConformNot3 = "â¡"; |
| | | |
| | | @ApiModelProperty("ä¸å²è¯ 符åä¸å¦(1ï¼ç¬¦å)") |
| | | private String workLicenseConformNot1 = "â¡"; |
| | | @ApiModelProperty("ä¸å²è¯ 符åä¸å¦(2ï¼ä¸ç¬¦å)") |
| | | private String workLicenseConformNot2 = "â¡"; |
| | | @ApiModelProperty("ä¸å²è¯ 符åä¸å¦(3ï¼ä¸éç¨)") |
| | | private String workLicenseConformNot3 = "â¡"; |
| | | |
| | | @ApiModelProperty("å²ä½èè´£1(çææ¬å²ä½çäº§åæ£æµæ ·åå¶å¤åç¸å
³äº§ååºç¡ç¥è¯)") |
| | | private String jobResponsibilities1 = "â¡"; |
| | | @ApiModelProperty("å²ä½èè´£2(çææ¬å²ä½æ ·åæ£æµæµç¨)") |
| | | private String jobResponsibilities2 = "â¡"; |
| | | @ApiModelProperty("å²ä½èè´£3(æ£ç¡®çç»æä½æ¬å²ä½ä»ªè¡¨è®¾å¤)") |
| | | private String jobResponsibilities3 = "â¡"; |
| | | @ApiModelProperty("å²ä½èè´£4(çææ¬å²ä½ç¸å
³æ£æµæ å)") |
| | | private String jobResponsibilities4 = "â¡"; |
| | | @ApiModelProperty("å²ä½èè´£5(çææ¬å²ä½äº§åæ§è½åç»æå¤æãåæ)") |
| | | private String jobResponsibilities5 = "â¡"; |
| | | @ApiModelProperty("å²ä½èè´£6(宿ç¸åºçåéªã认è¯)") |
| | | private String jobResponsibilities6 = "â¡"; |
| | | @ApiModelProperty("å²ä½èè´£7(ç¼åç¸å
³æ£æµæé¡º)") |
| | | private String jobResponsibilities7 = "â¡"; |
| | | @ApiModelProperty("å²ä½èè´£8(äºè§£ä»ªå¨è®¾å¤åºæ¬ç»æä¸ç®åç»´æ¤ä¿å
»)") |
| | | private String jobResponsibilities8 = "â¡"; |
| | | @ApiModelProperty("å²ä½èè´£9(å
·å¤æè½å¹è®çè½å)") |
| | | private String jobResponsibilities9 = "â¡"; |
| | | @ApiModelProperty("å²ä½èè´£10(å
·å¤æ£æµä»ªå¨æ¹é è½å)") |
| | | private String jobResponsibilities10 = "â¡"; |
| | | |
| | | @ApiModelProperty("å²ä½èè´£ 符åä¸å¦(1ï¼ç¬¦å)") |
| | | private String jobResponsibilitiesConformNot1 = "â¡"; |
| | | @ApiModelProperty("å²ä½èè´£ 符åä¸å¦(2ï¼ä¸ç¬¦å)") |
| | | private String jobResponsibilitiesConformNot2 = "â¡"; |
| | | @ApiModelProperty("å²ä½èè´£ 符åä¸å¦(3ï¼ä¸éç¨)") |
| | | private String jobResponsibilitiesConformNot3 = "â¡"; |
| | | |
| | | @ApiModelProperty("综åè¯ä»·1(å¯è任该å²ä½)") |
| | | private String comprehensiveAssessment1 = "â¡"; |
| | | @ApiModelProperty("综åè¯ä»·2(å¯è¾¹å¹è®è¾¹ä¸å²)") |
| | | private String comprehensiveAssessment2 = "â¡"; |
| | | @ApiModelProperty("综åè¯ä»·3(ä¸è任该å²ä½)") |
| | | private String comprehensiveAssessment3 = "â¡"; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonPostAuthorizationRecord; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonPostAuthorizationRecordDto extends PersonPostAuthorizationRecord { |
| | | |
| | | private String userName; |
| | | |
| | | private String account; |
| | | |
| | | private String createUserName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonRewardPunishmentRecord; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonRewardPunishmentRecordDto extends PersonRewardPunishmentRecord { |
| | | |
| | | private String userName; |
| | | |
| | | private String account; |
| | | |
| | | private String createUserName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonSupervisePlanDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonSupervisePlanDetailsDto extends PersonSupervisePlanDetails { |
| | | |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonSupervisePlan; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonSupervisePlanDto extends PersonSupervisePlan { |
| | | |
| | | @ApiModelProperty(value = "å®¡æ ¸äºº") |
| | | private String approvalName; |
| | | |
| | | @ApiModelProperty(value = "ç¼å¶äºº") |
| | | private String organizationPersonName; |
| | | |
| | | @ApiModelProperty(value = "ç¼å¶äºº") |
| | | private String createName; |
| | | |
| | | @ApiModelProperty("å½åç»å½äºº") |
| | | private Integer currentId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionControlSheet; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/26 |
| | | */ |
| | | @Data |
| | | public class PersonSupervisionControlSheetExportDto extends PersonSupervisionControlSheet { |
| | | |
| | | @ApiModelProperty("1åçé¨é¨") |
| | | private String occurrenceDepartmentString; |
| | | |
| | | @ApiModelProperty("1é¨é¨è´è´£äºº") |
| | | private String departmentHead; |
| | | |
| | | @ApiModelProperty("1åç°é¨é¨") |
| | | private String discovererDepartment; |
| | | |
| | | @ApiModelProperty("1åç°é¨é¨-æ¥æ") |
| | | private String discovererDateString; |
| | | |
| | | @ApiModelProperty("2被çç£äºº") |
| | | private String supervisedPerson; |
| | | |
| | | @ApiModelProperty("3责任é¨é¨") |
| | | private String responsibleDepartment; |
| | | |
| | | @ApiModelProperty("3责任é¨é¨ æ¥æ") |
| | | private String responsibleDepartmentDateString; |
| | | |
| | | @ApiModelProperty("4çº æ£æªæ½ æ¥æ") |
| | | private String correctiveMeasureDateString; |
| | | |
| | | @ApiModelProperty("5è´¨éè´è´£äººæ¥æ") |
| | | private String qualitySupervisorDateString; |
| | | |
| | | @ApiModelProperty("4çº æ£æªæ½å¤çåè·è¸ª(æ¯)") |
| | | private String correctiveMeasureFollowTracksYes = "â¡"; |
| | | @ApiModelProperty("4çº æ£æªæ½å¤çåè·è¸ª(å¦)") |
| | | private String correctiveMeasureFollowTracksNo = "â¡"; |
| | | |
| | | |
| | | @ApiModelProperty("5æ¯å¦éç¥å®¢æ·(æ¯)") |
| | | private String whetherInformCustomerYes = "â¡"; |
| | | @ApiModelProperty("5æ¯å¦éç¥å®¢æ·(å¦)") |
| | | private String whetherInformCustomerNo = "â¡"; |
| | | |
| | | |
| | | @ApiModelProperty("5æ¯å¦æ¢å¤å·¥ä½(1ï¼æ¯ï¼2ï¼å¦)") |
| | | private String whetherResumeWorkYes = "â¡"; |
| | | @ApiModelProperty("5æ¯å¦æ¢å¤å·¥ä½(1ï¼æ¯ï¼2ï¼å¦)") |
| | | private String whetherResumeWorkNo = "â¡"; |
| | | |
| | | @ApiModelProperty("1ä¸ç¬¦åå·¥ä½åç°éå¾0(管çè¯å®¡)") |
| | | private String discoveryApproach0 = "â¡"; |
| | | @ApiModelProperty("1ä¸ç¬¦åå·¥ä½åç°éå¾1(å
é¨å®¡æ ¸)") |
| | | private String discoveryApproach1 = "â¡"; |
| | | @ApiModelProperty("1ä¸ç¬¦åå·¥ä½åç°éå¾2(æ£æµè¿ç¨æ§å¶)") |
| | | private String discoveryApproach2 = "â¡"; |
| | | @ApiModelProperty("1ä¸ç¬¦åå·¥ä½åç°éå¾3(å
é¨è´¨éæ§å¶)") |
| | | private String discoveryApproach3 = "â¡"; |
| | | @ApiModelProperty("1ä¸ç¬¦åå·¥ä½åç°éå¾4(å
é¨çç£)") |
| | | private String discoveryApproach4 = "â¡"; |
| | | @ApiModelProperty("1ä¸ç¬¦åå·¥ä½åç°éå¾5(å¤é¨è¯å®¡/æ£æ¥)") |
| | | private String discoveryApproach5 = "â¡"; |
| | | @ApiModelProperty("1ä¸ç¬¦åå·¥ä½åç°éå¾6(顾客æè¯/æè§åé¦)") |
| | | private String discoveryApproach6 = "â¡"; |
| | | @ApiModelProperty("1ä¸ç¬¦åå·¥ä½åç°éå¾7(å
¶ä»)") |
| | | private String discoveryApproach7 = "â¡"; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionProcessingSheet; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/26 |
| | | */ |
| | | @Data |
| | | public class PersonSupervisionProcessingSheetDto extends PersonSupervisionProcessingSheet { |
| | | |
| | | @ApiModelProperty("1 æåºé¨é¨") |
| | | private String proposingDepartment; |
| | | |
| | | @ApiModelProperty("1 æåºé¨é¨ æ¥æ") |
| | | private String proposingDepartmentDateString; |
| | | |
| | | @ApiModelProperty("2 åå åæ é¨é¨") |
| | | private String causeAnalysis; |
| | | |
| | | @ApiModelProperty("2 åå åæ é¨é¨") |
| | | private String causeAnalysisDepartment; |
| | | |
| | | @ApiModelProperty("2 åå åæ æ¥æ") |
| | | private String causeAnalysisDateString; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½") |
| | | private String correctiveAction; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½ æ¥æ") |
| | | private String correctiveActionDateString; |
| | | |
| | | @ApiModelProperty("4 éªè¯é¨é¨") |
| | | private String verificationDepartment; |
| | | |
| | | @ApiModelProperty("4 éªè¯é¨é¨ æ¥æ") |
| | | private String verificationDepartmentDateString; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionRecord; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonSupervisionRecordDto extends PersonSupervisionRecord { |
| | | |
| | | @ApiModelProperty("æ£æµäººåå§å") |
| | | private String testerName; |
| | | |
| | | @ApiModelProperty("çç£åå§å") |
| | | private String supervisorName; |
| | | |
| | | @ApiModelProperty("人ålist å§åid") |
| | | private String personnelName; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äººå§å") |
| | | private String technicalDirectorName; |
| | | |
| | | @ApiModelProperty("æ§å¶åç¶æ") |
| | | private String currentStateControl; |
| | | |
| | | @ApiModelProperty("å¤çåç¶æ") |
| | | private String currentStateProcessing; |
| | | |
| | | @ApiModelProperty("æ£æµæ¥æ") |
| | | private String detectionDateString; |
| | | |
| | | @ApiModelProperty("æ¯å¦éè¦çº æ£æªæ½ 1éè¦ ") |
| | | private String correctiveMeasure; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingDetailed; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonTrainingDetailedDto extends PersonTrainingDetailed { |
| | | |
| | | @ApiModelProperty("举åé¨é¨åç§°") |
| | | private String holdingDepartmentName; |
| | | |
| | | @ApiModelProperty("å¹è®è®²å¸åç§°") |
| | | private String trainingLecturerName; |
| | | |
| | | @ApiModelProperty("å½åç»å½äººæ¯å¦è®¤é¢") |
| | | private Boolean whetherClaim; |
| | | |
| | | |
| | | @ApiModelProperty("å¹è®æ¥æ") |
| | | private String trainingDateString; |
| | | |
| | | @ApiModelProperty("æ¥å人æ°") |
| | | private Integer enrollment; |
| | | |
| | | // 导åºä½¿ç¨ |
| | | @TableField(select = false, exist = false) |
| | | @ApiModelProperty("åºå·(导åºä½¿ç¨)") |
| | | private Integer index; |
| | | |
| | | private Integer departId; |
| | | |
| | | private Integer isDisabled; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonTraining; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "PersonTrainingDto对象", description = "å¹è®è®¡å") |
| | | public class PersonTrainingDto extends PersonTraining { |
| | | |
| | | @ApiModelProperty("ç¼å¶äººå§å") |
| | | private String compilerName; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äººå§å") |
| | | private String reviewerName; |
| | | |
| | | @ApiModelProperty("æ¹å人å§å") |
| | | private String approverName; |
| | | |
| | | @ApiModelProperty("å建人å§å") |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty("å½åç»å½äººid") |
| | | private Integer currentId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonTrainingRecord; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonTrainingRecordDto extends PersonTrainingRecord { |
| | | @ApiModelProperty(value = "å§å") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "å·¥å·") |
| | | private String account; |
| | | |
| | | @ApiModelProperty(value = "è§è²") |
| | | private String roleName; |
| | | |
| | | @ApiModelProperty(value = "çµè¯å·ç ") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "é¨é¨") |
| | | private String department; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class PersonTrainingRecordListDto { |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·id") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty("åå·¥ç¼å·") |
| | | private String account; |
| | | |
| | | @ApiModelProperty("ç¨æ·å§å") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("æå¨é¨é¨") |
| | | private String departLimsName; |
| | | |
| | | @ApiModelProperty("èç§°") |
| | | private String professionalTitle; |
| | | |
| | | @ApiModelProperty("æé«å¦å") |
| | | private String officialAcademicRedentials; |
| | | |
| | | @ApiModelProperty("å
¥å使¶é´") |
| | | private LocalDateTime unitTime; |
| | | |
| | | @ApiModelProperty("å
¥å使¶é´") |
| | | private String unitTimeSting; |
| | | |
| | | @ApiModelProperty("ä¸ä¸") |
| | | private String major1; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class PersonTrainingRecordSubmitDto{ |
| | | |
| | | @ApiModelProperty("年度计åæç»ID") |
| | | private Integer trainingDetailedId; |
| | | |
| | | @ApiModelProperty("èæ ¸æ¹å¼") |
| | | private String assessmentMethod; |
| | | |
| | | @ApiModelProperty("æ¬æ¬¡å¹è®ç»¼åè¯ä»·") |
| | | private String comprehensiveAssessment; |
| | | |
| | | @ApiModelProperty("è¯ä»·äºº") |
| | | private Integer assessmentUserId; |
| | | |
| | | @ApiModelProperty("è¯ä»·æ¶é´") |
| | | private LocalDate assessmentDate; |
| | | |
| | | private String state; |
| | | |
| | | @ApiModelProperty("课æ¶") |
| | | private Integer classHour; |
| | | |
| | | private String trainingAbstract; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonTrainingUpdateDto { |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸/æ¹å 夿³¨") |
| | | private String remarks; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸/æ¹å ç¶æ") |
| | | private Integer status; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/25 |
| | | */ |
| | | @Data |
| | | public class TrainingRecordExportDto { |
| | | |
| | | @ApiModelProperty("ç¨æ·åç§°1") |
| | | private String userName1; |
| | | |
| | | @ApiModelProperty("é¨é¨1") |
| | | private String department1; |
| | | |
| | | @ApiModelProperty("èæ ¸ç»æ1") |
| | | private String examinationResults1; |
| | | |
| | | @ApiModelProperty("ç¨æ·åç§°2") |
| | | private String userName2; |
| | | |
| | | @ApiModelProperty("é¨é¨1") |
| | | private String department2; |
| | | |
| | | @ApiModelProperty("èæ ¸ç»æ1") |
| | | private String examinationResults2; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class TrainingRecordPersonDetailedDto { |
| | | |
| | | @ApiModelProperty("å¹è®æ¥æ") |
| | | private String trainingDateString; |
| | | |
| | | @ApiModelProperty("å¹è®æ¥æ") |
| | | private Date trainingDate; |
| | | |
| | | @ApiModelProperty("å¹è®å
容") |
| | | private String trainingContent; |
| | | |
| | | @ApiModelProperty("课æ¶") |
| | | private Integer classHour; |
| | | |
| | | @ApiModelProperty("èæ ¸ç»æ") |
| | | private String examinationResults; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remarks; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.enumeration; |
| | | |
| | | public enum AttachmentType { |
| | | // è®¾å¤æ ¡å表å |
| | | SBJZ(1,"device_metric_record"), |
| | | // å¹è®è®¡å æç»è¡¨ |
| | | PXJH(2,"cnas_person_training_detailed"), |
| | | // å
¥èææè®°å½ |
| | | RZSQ(3,"cnas_person_post_authorization_record"), |
| | | ; |
| | | |
| | | private Integer type; |
| | | private String value; |
| | | |
| | | AttachmentType(Integer type, String value) { |
| | | this.type = type; |
| | | this.value = value; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | public static String getTypeValue(Integer type) { |
| | | AttachmentType.values(); |
| | | for(AttachmentType attachmentType : AttachmentType.values()) { |
| | | if(attachmentType.getType().equals(type)) return attachmentType.getValue(); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonRewardPunishmentRecordExcel { |
| | | @ExcelProperty("åå·¥ç¼å·") |
| | | private String account; |
| | | |
| | | @ExcelProperty("å§å") |
| | | private String userName; |
| | | |
| | | @ExcelProperty("奿©çº§å«") |
| | | private String rewardPunishLevel; |
| | | |
| | | @ExcelProperty("奿©åç§°") |
| | | private String rewardPunishName; |
| | | |
| | | @ExcelProperty("奿©æ¶é´") |
| | | private String rewardPunishTime; |
| | | |
| | | @ExcelProperty("奿©åä½") |
| | | private String rewardPunishWorkUnit; |
| | | |
| | | @ExcelProperty("奿©å
容") |
| | | private String rewardPunishContent; |
| | | |
| | | @ExcelProperty("å建æ¶é´") |
| | | private String createTime; |
| | | |
| | | @ExcelProperty("å建人") |
| | | private String createUserName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.excel; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.ruoyi.personnel.service.PersonSupervisePlanDetailsService; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class PersonSupervisePlanDetailsListener extends AnalysisEventListener<PersonSupervisePlanDetailsUpload> { |
| | | |
| | | private Integer planId; |
| | | |
| | | private static final int BATCH_COUNT = 1000; |
| | | List<PersonSupervisePlanDetailsUpload> list = new ArrayList<>(); |
| | | |
| | | private PersonSupervisePlanDetailsService personSupervisePlanDetailsService; |
| | | |
| | | public PersonSupervisePlanDetailsListener(PersonSupervisePlanDetailsService personSupervisePlanDetailsService) { |
| | | this.personSupervisePlanDetailsService = personSupervisePlanDetailsService; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(PersonSupervisePlanDetailsUpload data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | save(); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | save(); |
| | | } |
| | | |
| | | private void save() { |
| | | personSupervisePlanDetailsService.importExcel(list, this.planId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class PersonSupervisePlanDetailsUpload { |
| | | |
| | | @ExcelProperty("çç£æ¥æ") |
| | | private LocalDateTime superviseDate; |
| | | |
| | | @ExcelProperty("çç£ç®ç") |
| | | private String superviseDes; |
| | | |
| | | @ExcelProperty("被çç£äººå") |
| | | private String supervisePerson; |
| | | |
| | | @ExcelProperty("夿³¨") |
| | | private String remarks; |
| | | |
| | | @ExcelProperty("çç£é¡¹ç®") |
| | | private String superviseProject; |
| | | |
| | | @ExcelProperty("çç£åå ") |
| | | private String superviseReason; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.excel; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.ruoyi.personnel.service.PersonTrainingDetailedService; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @Data |
| | | @Slf4j |
| | | public class PersonTrainingDetailedListener extends AnalysisEventListener<PersonTrainingDetailedUpload> { |
| | | |
| | | private Integer planId; |
| | | |
| | | private static Boolean FLAG = true; |
| | | |
| | | private static final int BATCH_COUNT = 1000; |
| | | |
| | | List<PersonTrainingDetailedUpload> list = new ArrayList<>(); |
| | | |
| | | private PersonTrainingDetailedService personTrainingDetailedService; |
| | | |
| | | public PersonTrainingDetailedListener(PersonTrainingDetailedService personTrainingDetailedService,Integer planId) { |
| | | this.personTrainingDetailedService = personTrainingDetailedService; |
| | | this.planId = planId; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(PersonTrainingDetailedUpload data, AnalysisContext context) { |
| | | log.info("è§£æå°ä¸æ¡æ°æ®{}", JSON.toJSONString(data)); |
| | | int count = 0; |
| | | int count1 = 0; |
| | | // å¦ææ°æ®å
¨ä¸ºç©º é£ä¹å°±ä¸å¨ç»§ç»æ·»å |
| | | Field[] fields = data.getClass().getDeclaredFields(); |
| | | for (Field field : fields) { |
| | | count1++; |
| | | field.setAccessible(true); |
| | | try { |
| | | Object o = field.get(data); // è·ååæ®µå¼ |
| | | if(Objects.isNull(o) || StringUtils.isEmpty(o.toString())) { |
| | | count++; |
| | | } |
| | | } catch (IllegalAccessException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | if(count == count1) { |
| | | FLAG = false; |
| | | } |
| | | if(FLAG) { |
| | | list.add(data); |
| | | } |
| | | if (list.size() >= BATCH_COUNT) { |
| | | save(); |
| | | list.clear(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | log.info("æææ°æ®è§£æå®æ{}",list.size()); |
| | | save(); |
| | | // æææ°æ®è§£æå®æ å°FLAGæ´æ°ä¸ºtrue |
| | | if(!FLAG) { |
| | | FLAG = true; |
| | | } |
| | | } |
| | | |
| | | private void save() { |
| | | personTrainingDetailedService.importExcel(list, this.planId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonTrainingDetailedUpload { |
| | | |
| | | // @ExcelProperty("å¹è®ç®æ ") |
| | | @ExcelProperty(index = 1) |
| | | private String trainingObjectives; |
| | | |
| | | // @ExcelProperty("å¹è®å
容") |
| | | @ExcelProperty(index = 2) |
| | | private String trainingContent; |
| | | |
| | | // @ExcelProperty("å¹è®æ¹å¼") |
| | | @ExcelProperty(index = 3) |
| | | private String trainingMode; |
| | | |
| | | // @ExcelProperty("åå 对象") |
| | | @ExcelProperty(index = 4) |
| | | private String participants; |
| | | |
| | | // @ExcelProperty("举åé¨é¨") |
| | | @ExcelProperty(index = 5) |
| | | private String holdingDepartment; |
| | | |
| | | // @ExcelProperty("å¹è®è®²å¸") |
| | | @ExcelProperty(index = 6) |
| | | private String trainingLecturerName; |
| | | |
| | | // @ExcelProperty("å¹è®æ¶é´") |
| | | @ExcelProperty(index = 7) |
| | | private String trainingDate; |
| | | |
| | | // @ExcelProperty("课æ¶") |
| | | @ExcelProperty(index = 8) |
| | | private String classHour; |
| | | |
| | | // @ExcelProperty("夿³¨") |
| | | @ExcelProperty(index = 9) |
| | | private String remarks; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.personnel.pojo.Annex; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface AnnexMapper extends BaseMapper<Annex> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.dto.DepartmentDto; |
| | | import com.ruoyi.personnel.dto.PersonBasicInfoDto; |
| | | import com.ruoyi.personnel.pojo.PersonBasicInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-08-30 09:19:57 |
| | | */ |
| | | public interface PersonBasicInfoMapper extends BaseMapper<PersonBasicInfo> { |
| | | |
| | | List<DepartmentDto> selectLimsUser(); |
| | | |
| | | PersonBasicInfoDto getCNASPersonnelInfo(Integer userId); |
| | | |
| | | IPage<Map<String, Object>> basicInformationOfPersonnelSelectPage(Page page, Integer departmentId); |
| | | |
| | | /** |
| | | * 人ååºæ¬ä¿¡æ¯å页æ¥è¯¢ |
| | | * @param page |
| | | * @param name |
| | | * @param departmentId |
| | | * @return |
| | | */ |
| | | IPage<Map<String, Object>> selectPersonBasecInfoAndUser(Page page, String name, Integer departmentId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.dto.PersonCommunicationAbilityDto; |
| | | import com.ruoyi.personnel.pojo.PersonCommunicationAbility; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ²éè½å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 12:00:57 |
| | | */ |
| | | public interface PersonCommunicationAbilityMapper extends BaseMapper<PersonCommunicationAbility> { |
| | | |
| | | IPage<PersonCommunicationAbilityDto> personPersonCommunicationAbilityPage(Page page, @Param("departLimsId") Integer departLimsId, @Param("userId") Integer userId, @Param("userName") String userName); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.dto.PersonJobResponsibilitiesDto; |
| | | import com.ruoyi.personnel.pojo.PersonJobResponsibilities; |
| | | |
| | | /** |
| | | * <p> |
| | | * å²ä½èè´£ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 02:07:49 |
| | | */ |
| | | public interface PersonJobResponsibilitiesMapper extends BaseMapper<PersonJobResponsibilities> { |
| | | |
| | | IPage<PersonJobResponsibilitiesDto> personJobResponsibilitiesSelect(Page page, String userId, String departmentId, String userName); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.dto.PersonPersonnelCapacityDto; |
| | | import com.ruoyi.personnel.dto.PersonPersonnelCapacityExportDto; |
| | | import com.ruoyi.personnel.pojo.PersonPersonnelCapacity; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 人åè½å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 11:26:18 |
| | | */ |
| | | public interface PersonPersonnelCapacityMapper extends BaseMapper<PersonPersonnelCapacity> { |
| | | |
| | | IPage<PersonPersonnelCapacityDto> personPersonnelCapacityPage(Page page, Integer departLimsId, Integer userId, String userName); |
| | | |
| | | /** |
| | | * æ¥è¯¢äººåè½åæ¥å£ |
| | | * @param id |
| | | * @return |
| | | */ |
| | | PersonPersonnelCapacityExportDto selectExportPersonnelCapacity(@Param("id") Integer id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.dto.PersonPostAuthorizationRecordDto; |
| | | import com.ruoyi.personnel.pojo.PersonPostAuthorizationRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä»»èææè®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 10:48:17 |
| | | */ |
| | | public interface PersonPostAuthorizationRecordMapper extends BaseMapper<PersonPostAuthorizationRecord> { |
| | | |
| | | IPage<PersonPostAuthorizationRecordDto> personPostAuthorizationRecordPage(Page page, Integer departLimsId, Integer userId, String userName); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.dto.PersonRewardPunishmentRecordDto; |
| | | import com.ruoyi.personnel.excel.PersonRewardPunishmentRecordExcel; |
| | | import com.ruoyi.personnel.pojo.PersonRewardPunishmentRecord; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 奿©è®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-08 11:25:02 |
| | | */ |
| | | public interface PersonRewardPunishmentRecordMapper extends BaseMapper<PersonRewardPunishmentRecord> { |
| | | |
| | | IPage<PersonRewardPunishmentRecordDto> rewardPunishmentPage(Page page, Integer userId, String userName, Date startTime, Date endTime, Integer departmentId); |
| | | |
| | | List<PersonRewardPunishmentRecordExcel> rewardPunishmentExport(Integer userId, Integer departmentId, String userName, Date startTime, Date endTime); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.mybatis_config.MyBaseMapper; |
| | | import com.ruoyi.personnel.dto.PersonSupervisePlanDetailsDto; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisePlanDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®¡å - å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 04:17:02 |
| | | */ |
| | | public interface PersonSupervisePlanDetailsMapper extends MyBaseMapper<PersonSupervisePlanDetails> { |
| | | |
| | | IPage<PersonSupervisePlanDetailsDto> pageByDate(Page page, String date, String project, Integer planId); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.dto.PersonSupervisePlanDto; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisePlan; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®¡å - ç¶ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 04:14:45 |
| | | */ |
| | | public interface PersonSupervisePlanMapper extends BaseMapper<PersonSupervisePlan> { |
| | | |
| | | IPage<PersonSupervisePlanDto> pageByPerson(Page page, String organizationPerson,Integer departId); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.personnel.dto.PersonSupervisionControlSheetExportDto; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionControlSheet; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ - æ§å¶å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 05:18:57 |
| | | */ |
| | | public interface PersonSupervisionControlSheetMapper extends BaseMapper<PersonSupervisionControlSheet> { |
| | | |
| | | /** |
| | | * æ¥è¯¢çç£è®°å½æ§å¶å |
| | | * @param supervisionRecordId |
| | | */ |
| | | PersonSupervisionControlSheetExportDto selectSupervisionControl(@Param("supervisionRecordId") Integer supervisionRecordId); |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.personnel.dto.PersonSupervisionProcessingSheetDto; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionProcessingSheet; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ - å¤çå Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 05:35:58 |
| | | */ |
| | | public interface PersonSupervisionProcessingSheetMapper extends BaseMapper<PersonSupervisionProcessingSheet> { |
| | | |
| | | /** |
| | | * æ¥è¯¢äººåçç£è®°å½å¤çå |
| | | * @param supervisionRecordId |
| | | * @return |
| | | */ |
| | | PersonSupervisionProcessingSheetDto selectProcessingSheet(@Param("supervisionRecordId") Integer supervisionRecordId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.dto.PersonSupervisionRecordDto; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 04:16:49 |
| | | */ |
| | | public interface PersonSupervisionRecordMapper extends BaseMapper<PersonSupervisionRecord> { |
| | | |
| | | IPage<PersonSupervisionRecordDto> personSupervisionRecordPage(Page page, Integer userId, Integer departLimsId, String userName); |
| | | |
| | | /** |
| | | * æ¥è¯¢çç£è®°å½è¯¦æ
|
| | | * @param id |
| | | * @return |
| | | */ |
| | | PersonSupervisionRecordDto selectPersonSupervisionRecord(Integer id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.pojo.PersonTrackRecord; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥ä½å±¥å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-02 03:13:03 |
| | | */ |
| | | public interface PersonTrackRecordMapper extends BaseMapper<PersonTrackRecord> { |
| | | |
| | | IPage<PersonTrackRecord> personTrackRecordSelect(Page page, String userId, String departLimsId); |
| | | |
| | | List<PersonTrackRecord> personTrackRecordExport(String userId, String departLimsId); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.mybatis_config.MyBaseMapper; |
| | | import com.ruoyi.personnel.dto.PersonTrainingDetailedDto; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingDetailed; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å详æ
Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:46:27 |
| | | */ |
| | | public interface PersonTrainingDetailedMapper extends MyBaseMapper<PersonTrainingDetailed> { |
| | | |
| | | IPage<PersonTrainingDetailedDto> queryTheAnnualPlanDetailsTable(Page page, |
| | | String trainingLecturerName, |
| | | String courseCode, String trainingDate, |
| | | Integer id, |
| | | Integer userId, |
| | | Integer loginUserId, |
| | | Integer state); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»è¡¨idæ¥è¯¢è¯¦æ
|
| | | * @param trainingId |
| | | * @return |
| | | */ |
| | | List<PersonTrainingDetailedDto> selectTrainingList(@Param("trainingId") Integer trainingId); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯¦ç» |
| | | * @param id |
| | | * @return |
| | | */ |
| | | PersonTrainingDetailedDto selectTrainingDetail(@Param("id") Integer id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingFile; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface PersonTrainingFileMapper extends BaseMapper<PersonTrainingFile> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.dto.PersonTrainingDto; |
| | | import com.ruoyi.personnel.pojo.PersonTraining; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:11:49 |
| | | */ |
| | | public interface PersonTrainingMapper extends BaseMapper<PersonTraining> { |
| | | |
| | | IPage<PersonTrainingDto> personTrainingSelect(Page page, String compilerName, Integer departLimsId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.dto.PersonTrainingRecordDto; |
| | | import com.ruoyi.personnel.dto.PersonTrainingRecordListDto; |
| | | import com.ruoyi.personnel.dto.TrainingRecordPersonDetailedDto; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-12 04:50:48 |
| | | */ |
| | | public interface PersonTrainingRecordMapper extends BaseMapper<PersonTrainingRecord> { |
| | | |
| | | List<PersonTrainingRecordDto> trainingAndAssessmentRecordsPage(Integer trainingDetailedId, String userName); |
| | | |
| | | IPage<PersonTrainingRecordListDto> personnelTrainingPersonnel(Page page, String userName, Integer userId, Integer departLimsId); |
| | | |
| | | IPage<TrainingRecordPersonDetailedDto> queryPersonnelDetails(Page page, Integer userId); |
| | | |
| | | /** |
| | | * æ ¹æ®è¯¦æ
idæ¥è¯¢å¹è®äººå |
| | | * @param trainingDetailedId |
| | | * @return |
| | | */ |
| | | List<PersonTrainingRecordDto> selectListByTrainingDetailedId(@Param("trainingDetailedId") Integer trainingDetailedId); |
| | | |
| | | /** |
| | | * æ¥è¯¢äººåä¿¡æ¯ |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | PersonTrainingRecordListDto selectUserTraining(@Param("userId") Integer userId); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·idæ¥è¯¢å¹è®è®°å½ |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | List<TrainingRecordPersonDetailedDto> selectPersonDetailedDtos(Integer userId); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·idå年份æ¥è¯¢äººåæç» å¹è®è®°å½ |
| | | * @param page |
| | | * @param userId |
| | | * @param year |
| | | * @return |
| | | */ |
| | | IPage<TrainingRecordPersonDetailedDto> queryPersonnelDetailsOfUserIdAndYear(Page page, Integer userId, Integer year); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·idå年份æ¥è¯¢äººåæç» å¹è®è®°å½å¯¼åº |
| | | * @param userId |
| | | * @param trainingDate |
| | | * @return |
| | | */ |
| | | List<TrainingRecordPersonDetailedDto> selectPersonDetailedDtosByTrainingDate(Integer userId, Integer year); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("cnas_annex") |
| | | @ApiModel("人ååºæ¬ä¿¡æ¯é件表") |
| | | public class Annex implements Serializable { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "user表id") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "è¯ä»¶å·") |
| | | private String idNumber; |
| | | |
| | | @ApiModelProperty(value = "åè¯åä½") |
| | | private String issueUnit; |
| | | |
| | | @ApiModelProperty(value = "æä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty(value = "级å«") |
| | | private String level; |
| | | |
| | | @ApiModelProperty(value = "æææ") |
| | | private String periodValidity; |
| | | |
| | | @ApiModelProperty(value = "æ·»å æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "å¤å°ä»¶") |
| | | private String copy; |
| | | |
| | | @ApiModelProperty(value = "åä»¶") |
| | | private String original; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-08-30 09:19:57 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_basic_info") |
| | | @ApiModel(value = "PersonBasicInfo对象", description = "") |
| | | public class PersonBasicInfo implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å½åç¶æ") |
| | | private String currentState; |
| | | |
| | | @ApiModelProperty("å
¥èæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDate entryTime; |
| | | |
| | | @ApiModelProperty("å½åèå¡") |
| | | private String currentPosition; |
| | | |
| | | @ApiModelProperty("å²ä½") |
| | | private String post; |
| | | |
| | | @ApiModelProperty("é¨é¨ç¼å·") |
| | | private String departmentCode; |
| | | @ApiModelProperty("èç§°") |
| | | @ExcelProperty("èç§°") |
| | | private String professionalTitle; |
| | | |
| | | @ApiModelProperty("æ§å«") |
| | | private String sex; |
| | | |
| | | @ApiModelProperty("人ååç±»") |
| | | private String personnelClassification; |
| | | |
| | | @ApiModelProperty("åºçæ¥æ") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | private LocalDate dateBirth; |
| | | |
| | | @ApiModelProperty("身份è¯å·") |
| | | @ExcelProperty("è¯ä»¶å·ç ") |
| | | private String identityCard; |
| | | |
| | | @ApiModelProperty("æ°æ") |
| | | private String nation; |
| | | |
| | | @ApiModelProperty("æ¿æ²»é¢è²") |
| | | private String politicalStatus; |
| | | |
| | | @ApiModelProperty("æé«å¦å") |
| | | @ExcelProperty("æé«å¦å") |
| | | private String officialAcademicRedentials; |
| | | |
| | | @ApiModelProperty("æ¯ä¸æ¶é´1") |
| | | @ExcelProperty("æ¯ä¸æ¶é´") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | private LocalDate graduationTime1; |
| | | |
| | | @ApiModelProperty("æ¯ä¸é¢æ ¡1") |
| | | @ExcelProperty("æ¯ä¸é¢æ ¡") |
| | | private String graduatedInstitutions1; |
| | | |
| | | @ApiModelProperty("ä¸ä¸1") |
| | | @ExcelProperty("æå¦ä¸ä¸") |
| | | private String major1; |
| | | |
| | | @ApiModelProperty("æ¯ä¸æ¶é´2") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | private LocalDate graduationTime2; |
| | | |
| | | @ApiModelProperty("æ¯ä¸é¢æ ¡2") |
| | | private String graduatedInstitutions2; |
| | | |
| | | @ApiModelProperty("ä¸ä¸2") |
| | | private String major2; |
| | | |
| | | @ApiModelProperty("ææºå·") |
| | | private String telephone; |
| | | |
| | | @ApiModelProperty("计åå®ä¹ ç»æ") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | private LocalDate endPlannedInternship; |
| | | |
| | | @ApiModelProperty("å®é
å®ä¹ ç»æ") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | private LocalDate endPracticalPractice; |
| | | |
| | | @ApiModelProperty("ç¦»èæ¥æ") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | private LocalDate dateDeparture; |
| | | |
| | | @ApiModelProperty("æ¡é¢å¾ç") |
| | | private String desktopPicture; |
| | | |
| | | @ApiModelProperty("éä»¶èµæ") |
| | | private String attachmentInformation; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remarks; |
| | | |
| | | @ApiModelProperty("ç¨æ·è¡¨ï¼userï¼id") |
| | | private Integer userId; |
| | | // |
| | | @ApiModelProperty("å·¥å·") |
| | | private String jobNumber; |
| | | |
| | | @ApiModelProperty("åå·¥åç¼å·") |
| | | private String subordinateNumber; |
| | | |
| | | @ApiModelProperty("å
¬å¸åç§°") |
| | | private String corporateName; |
| | | |
| | | @ApiModelProperty("å²ä½ç±»å«") |
| | | private String postType; |
| | | |
| | | @ApiModelProperty("å²ä½ç¼å·") |
| | | private String postCode; |
| | | |
| | | @ApiModelProperty("å²ä½åç§°") |
| | | private String postName; |
| | | |
| | | @ApiModelProperty("å
¥é墿¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | @ExcelProperty("å
¥é墿¶é´") |
| | | private LocalDate groupTime; |
| | | |
| | | @ApiModelProperty("å
¥å使¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | @ExcelProperty("å
¥å使¶é´") |
| | | private LocalDate unitTime; |
| | | |
| | | @ApiModelProperty("å¹´é¾") |
| | | private Integer personBasicInfoAge; |
| | | |
| | | |
| | | @ApiModelProperty("ç´æ¥ä¸çº§") |
| | | private String reportingTo; |
| | | |
| | | |
| | | @ApiModelProperty("å³å¨å
³ç³»") |
| | | private String laborRelations; |
| | | |
| | | @ApiModelProperty("è¯ç¨å¼å§æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDate trialStartTime; |
| | | |
| | | @ApiModelProperty("è¯ç¨ç»ææ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDate trialEndTime; |
| | | |
| | | @ApiModelProperty("ç±è´¯") |
| | | @ExcelProperty("ç±è´¯") |
| | | private String nativePlace; |
| | | |
| | | @ApiModelProperty("è¯ä»¶ç±»å") |
| | | private String idType; |
| | | |
| | | @ApiModelProperty("è¯ä»¶æææ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDate validityPeriod; |
| | | |
| | | @ApiModelProperty("å©å§»ç¶åµ") |
| | | private String maritalStatus; |
| | | |
| | | @ApiModelProperty("è¯ä»¶å°å") |
| | | @ExcelProperty("è¯ä»¶å°å") |
| | | private String idAddress; |
| | | |
| | | @ApiModelProperty("è¯ä»¶è¯¦ç»å°å") |
| | | private String idDetailAddress; |
| | | |
| | | @ApiModelProperty("ç°å±
å°å") |
| | | private String currentAddress; |
| | | |
| | | @ApiModelProperty("ç°å±
详ç»å°å") |
| | | private String currentDetailAddress; |
| | | |
| | | @ApiModelProperty("éè¾¾å°å") |
| | | private String serviceAddress; |
| | | |
| | | @ApiModelProperty("é达详ç»å°å") |
| | | private String serviceDetailAddress; |
| | | |
| | | @ApiModelProperty("æ¯å¦éä¼å人") |
| | | private String retiredSoldiers; |
| | | |
| | | @ApiModelProperty("å
¥å
/墿¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDate dumplingTime; |
| | | |
| | | @ApiModelProperty("çå·") |
| | | private String cornet; |
| | | |
| | | @ApiModelProperty("åå
¬çµè¯") |
| | | private String officePhone; |
| | | |
| | | @ApiModelProperty("è®¡ç®æºç级") |
| | | private String ncre; |
| | | |
| | | @ApiModelProperty("æé«å¦ä½") |
| | | @ExcelProperty("æé«å¦ä½") |
| | | private String highestDegree; |
| | | |
| | | @ApiModelProperty("æ¯å¦å
¨æ¥å¶") |
| | | private Integer fullTime; |
| | | |
| | | @ApiModelProperty("æ¯å¦å±äºä¸å¤©") |
| | | private Integer enroll; |
| | | |
| | | @ApiModelProperty("XXå±å¤§å¦ç") |
| | | private String collegeStudents; |
| | | |
| | | @ApiModelProperty("ç´§æ¥è系人") |
| | | @ExcelProperty("ç´§æ¥è系人") |
| | | private String emergencyContact; |
| | | |
| | | @ApiModelProperty("ç´§æ¥è系人çµè¯") |
| | | @ExcelProperty("ç´§æ¥è系人çµè¯") |
| | | private String emergencyContactPhone; |
| | | |
| | | |
| | | @ApiModelProperty("å
¬å¸é®ç®±") |
| | | private String companyEmail; |
| | | |
| | | @ApiModelProperty("æåæ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDate lastUpdateTime; |
| | | |
| | | @ApiModelProperty("è¯éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ²éè®°å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 12:00:57 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_communication_ability") |
| | | @ApiModel(value = "PersonCommunicationAbility对象", description = "æ²éè®°å½") |
| | | public class PersonCommunicationAbility implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æ²é人id") |
| | | private String userId; |
| | | |
| | | @ApiModelProperty("æ²éæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime communicationTime; |
| | | |
| | | @ApiModelProperty("æ²éå°ç¹") |
| | | private String communicationPlace; |
| | | |
| | | @ApiModelProperty("æ²éå
容") |
| | | private String communicationContent; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººid", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å²ä½èè´£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 02:07:49 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_job_responsibilities") |
| | | @ApiModel(value = "PersonJobResponsibilities对象", description = "å²ä½èè´£") |
| | | public class PersonJobResponsibilities implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("1å²ä½åç§°") |
| | | private String postName; |
| | | |
| | | @ApiModelProperty("1å·¥ä½ç®æ ") |
| | | private String jobObjective; |
| | | |
| | | @ApiModelProperty("1å²ä½èè´£") |
| | | private String jobResponsibilities; |
| | | |
| | | @ApiModelProperty("1ä»»è人id") |
| | | private String incumbentId; |
| | | |
| | | @ApiModelProperty("1 æäº¤æä½äºº") |
| | | private String submittingOperator; |
| | | |
| | | @ApiModelProperty("1æäº¤æ¥æ") |
| | | private LocalDateTime submittingDate; |
| | | |
| | | @ApiModelProperty("2 ä»»è人 主管id") |
| | | private Integer supervisorId; |
| | | |
| | | @ApiModelProperty("2 ä»»è人 æä½äºº") |
| | | private String incumbentOperator; |
| | | |
| | | @ApiModelProperty("2 ä»»è人 æ¥æ") |
| | | private LocalDateTime incumbentDate; |
| | | |
| | | @ApiModelProperty("3 主管 æä½äºº") |
| | | private String supervisorOperator; |
| | | |
| | | @ApiModelProperty("3 主管 æ¥æ") |
| | | private LocalDateTime supervisorDate; |
| | | |
| | | @ApiModelProperty(value = "å建人id", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å½åç¶æ") |
| | | private String currentState; |
| | | |
| | | @ApiModelProperty(value = "åå»ºæ¥æ / æäº¤æ¥æ", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("å½åè´è´£äºº") |
| | | private String currentResponsible; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 人åè½å |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 11:26:18 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_personnel_capacity") |
| | | @ApiModel(value = "PersonPersonnelCapacity对象", description = "人åè½å") |
| | | public class PersonPersonnelCapacity implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å¦å") |
| | | private String academicDegree; |
| | | |
| | | @ApiModelProperty("å¦å 符åä¸å¦(1ï¼ç¬¦åï¼2ï¼ä¸ç¬¦åï¼3ï¼ä¸éç¨)") |
| | | private Integer academicConformNot; |
| | | |
| | | @ApiModelProperty("å¦å 夿³¨") |
| | | private String academicRemarks; |
| | | |
| | | @ApiModelProperty("ç¸å
³å¹´é") |
| | | private String relatedYears; |
| | | |
| | | @ApiModelProperty("ç¸å
³å¹´é 符åä¸å¦(1ï¼ç¬¦åï¼2ï¼ä¸ç¬¦åï¼3ï¼ä¸éç¨)") |
| | | private Integer relatedYearsConformNot; |
| | | |
| | | @ApiModelProperty("ç¸å
³å¹´é 夿³¨") |
| | | private String relatedYearsRemarks; |
| | | |
| | | @ApiModelProperty("ç¸å
³å¹è®") |
| | | private String relatedTraining; |
| | | |
| | | @ApiModelProperty("ç¸å
³å¹è® 符åä¸å¦(1ï¼ç¬¦åï¼2ï¼ä¸ç¬¦åï¼3ï¼ä¸éç¨)") |
| | | private Integer relatedTrainingConformNot; |
| | | |
| | | @ApiModelProperty("ç¸å
³å¹è® 夿³¨") |
| | | private String relatedTrainingRemarks; |
| | | |
| | | @ApiModelProperty("ç¸å
³ç»éª") |
| | | private String relevantExperience; |
| | | |
| | | @ApiModelProperty("ç¸å
³ç»éª 符åä¸å¦(1ï¼ç¬¦åï¼2ï¼ä¸ç¬¦åï¼3ï¼ä¸éç¨)") |
| | | private Integer relevantExperienceConformNot; |
| | | |
| | | @ApiModelProperty("ç¸å
³ç»éª 夿³¨") |
| | | private String relevantExperienceRemarks; |
| | | |
| | | @ApiModelProperty("ä¸å²è¯") |
| | | private String workLicense; |
| | | |
| | | @ApiModelProperty("ä¸å²è¯ 符åä¸å¦(1ï¼ç¬¦åï¼2ï¼ä¸ç¬¦åï¼3ï¼ä¸éç¨)") |
| | | private Integer workLicenseConformNot; |
| | | |
| | | @ApiModelProperty("ä¸å²è¯ 夿³¨") |
| | | private String workLicenseRemarks; |
| | | |
| | | @ApiModelProperty("å²ä½èè´£") |
| | | private String jobResponsibilities; |
| | | |
| | | @ApiModelProperty("å²ä½èè´£ 符åä¸å¦(1ï¼ç¬¦åï¼2ï¼ä¸ç¬¦åï¼3ï¼ä¸éç¨)") |
| | | private Integer jobResponsibilitiesConformNot; |
| | | |
| | | @ApiModelProperty("å²ä½èè´£ 夿³¨") |
| | | private String jobResponsibilitiesRemarks; |
| | | |
| | | @ApiModelProperty("综åè¯ä»·") |
| | | private String comprehensiveAssessment; |
| | | |
| | | @ApiModelProperty("1 æäº¤id æä½äºº") |
| | | private Integer submitOperatingPersonnelId; |
| | | |
| | | @ApiModelProperty("1 æäº¤ æ¥æ") |
| | | private LocalDateTime submitDate; |
| | | |
| | | @ApiModelProperty("2 确认人 userId主é®") |
| | | private Integer confirmOperatingPersonnelId; |
| | | |
| | | @ApiModelProperty("2 确认人 æ¥æ") |
| | | private LocalDateTime confirmDate; |
| | | |
| | | @ApiModelProperty(value = "åå»ºæ¥æ", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¥æ", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "å建人", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äºº", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "人åå§å id") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "èç§°") |
| | | private String technicalPost; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä»»èææè®°å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 10:48:17 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_post_authorization_record") |
| | | @ApiModel(value = "PersonPostAuthorizationRecord对象", description = "ä»»èææè®°å½") |
| | | public class PersonPostAuthorizationRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("è¯ä¹¦ç¼å·") |
| | | private String certificateNumber; |
| | | |
| | | @ApiModelProperty("被任è人åid") |
| | | private String userId; |
| | | |
| | | @ApiModelProperty("ä»»èå²ä½") |
| | | private String post; |
| | | |
| | | @ApiModelProperty("æä½ç±»å") |
| | | private String operationType; |
| | | |
| | | @ApiModelProperty("åæä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ç³»ç»çææä»¶åç§°") |
| | | private String systemFileName; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remarks; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººid",hidden = true) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "å建人id", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("ç论ç¥è¯èè¯æç»©") |
| | | private String num1; |
| | | |
| | | @ApiModelProperty("æä½æè½èè¯æç»©") |
| | | private String num2; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 奿©è®°å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-08 11:25:02 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_reward_punishment_record") |
| | | @ApiModel(value = "PersonRewardPunishmentRecord对象", description = "奿©è®°å½") |
| | | public class PersonRewardPunishmentRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("奿©çº§å«") |
| | | private String rewardPunishLevel; |
| | | |
| | | @ApiModelProperty("奿©åç§°") |
| | | private String rewardPunishName; |
| | | |
| | | @ApiModelProperty("奿©æ¶é´") |
| | | private LocalDateTime rewardPunishTime; |
| | | |
| | | @ApiModelProperty("奿©åä½") |
| | | private String rewardPunishWorkUnit; |
| | | |
| | | @ApiModelProperty("奿©å
容") |
| | | private String rewardPunishContent; |
| | | |
| | | @ApiModelProperty("ç¨æ·id") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "å建人", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®¡å - ç¶ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 04:14:45 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_person_supervise_plan") |
| | | @ApiModel(value = "PersonSupervisePlan对象", description = "çç£è®¡å - ç¶") |
| | | public class PersonSupervisePlan implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ç¼å¶äººid") |
| | | private Integer organizationPersonId; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¥æ") |
| | | private LocalDateTime organizationDate; |
| | | |
| | | @ApiModelProperty("æ¹å人id") |
| | | private Integer approvalId; |
| | | |
| | | @ApiModelProperty("æ¹åäººæ¥æ") |
| | | private LocalDateTime approvalDate; |
| | | |
| | | @ApiModelProperty("æ¹åç¶æ(1éè¿/0ä¸éè¿)") |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "å建人id", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººid",hidden = true) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("é¨é¨id") |
| | | private Integer departId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®¡å - å |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 04:17:02 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_supervise_plan_details") |
| | | @ApiModel(value = "PersonSupervisePlanDetails对象", description = "çç£è®¡å - å") |
| | | public class PersonSupervisePlanDetails implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @ApiModelProperty("çç£æ¥æ") |
| | | private LocalDate superviseDate; |
| | | |
| | | @ApiModelProperty("çç£ç®ç") |
| | | private String superviseDes; |
| | | |
| | | @ApiModelProperty("被çç£äººå") |
| | | private String supervisePerson; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remarks; |
| | | |
| | | @ApiModelProperty("çç£é¡¹ç®") |
| | | private String superviseProject; |
| | | |
| | | @ApiModelProperty("çç£åå ") |
| | | private String superviseReason; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "å建人", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("çç£è®¡å - ç¶ id") |
| | | private Integer planId; |
| | | |
| | | //åºå·, 导åºä½¿ç¨ |
| | | @TableField(select = false, exist = false) |
| | | private Integer index; |
| | | |
| | | // 导åºä½¿ç¨ |
| | | @TableField(select = false, exist = false) |
| | | @ApiModelProperty("çç£æ¥æ") |
| | | private String superviseDateString; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ - æ§å¶å |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 05:18:57 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_supervision_control_sheet") |
| | | @ApiModel(value = "PersonSupervisionControlSheet对象", description = "çç£è®°å½ - æ§å¶å") |
| | | public class PersonSupervisionControlSheet implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("1åçé¨é¨id") |
| | | private Integer occurrenceDepartment; |
| | | |
| | | @ApiModelProperty("1é¨é¨è´è´£äººid") |
| | | private Integer departmentHeadId; |
| | | |
| | | @ApiModelProperty("1ä¸ç¬¦åå·¥ä½åç°éå¾åå
¸id") |
| | | private String discoveryApproach; |
| | | |
| | | @ApiModelProperty("1ä¸ç¬¦åå·¥ä½ç详ç»è®°å½") |
| | | private String notConformDetails; |
| | | |
| | | @ApiModelProperty("1ä¸ç¬¦åç便®åæ¡æ¬¾å·") |
| | | private String nonConformityClause; |
| | | |
| | | @ApiModelProperty("1åç°é¨é¨ è´è´£äººid") |
| | | private Integer discovererId; |
| | | |
| | | @ApiModelProperty("1åç°é¨é¨ - æ¥æ") |
| | | private LocalDateTime discovererDate; |
| | | |
| | | @ApiModelProperty("2被çç£äººid") |
| | | private Integer supervisedPersonId; |
| | | |
| | | @ApiModelProperty("2被çç£äºº - æ¥æ") |
| | | private String supervisedPersonDate; |
| | | |
| | | @ApiModelProperty("3æ¶é¤ä¸ç¬¦å工使éåçæªæ½") |
| | | private String treatmentMeasures; |
| | | |
| | | |
| | | @ApiModelProperty("3责任é¨é¨") |
| | | private Integer responsibleDepartmentId; |
| | | |
| | | @ApiModelProperty("3责任é¨é¨ è´è´£äººid") |
| | | private Integer responsibleDepartmentPersonId; |
| | | |
| | | @ApiModelProperty("3责任é¨é¨ æ¥æ") |
| | | private LocalDateTime responsibleDepartmentDate; |
| | | |
| | | @ApiModelProperty("4æ¯å¦éè¦éåçº æ£æªæ½") |
| | | private Integer correctiveMeasure; |
| | | |
| | | @ApiModelProperty("4çº æ£æªæ½å¤çåè·è¸ª") |
| | | private Integer correctiveMeasureFollowTracks; |
| | | |
| | | @ApiModelProperty("4çº æ£æªæ½ ææ¯è´è´£äººid") |
| | | private Integer correctiveMeasurePersonId; |
| | | |
| | | @ApiModelProperty("4çº æ£æªæ½ æ¥æ") |
| | | private LocalDateTime correctiveMeasureDate; |
| | | |
| | | @ApiModelProperty("5æ¯å¦éç¥å®¢æ·(1ï¼æ¯ï¼2ï¼å¦)") |
| | | private Integer whetherInformCustomer; |
| | | |
| | | @ApiModelProperty("5æ¯å¦æ¢å¤å·¥ä½(1ï¼æ¯ï¼2ï¼å¦)") |
| | | private Integer whetherResumeWork; |
| | | |
| | | @ApiModelProperty("5è´¨éè´è´£äººid") |
| | | private Integer qualitySupervisorId; |
| | | |
| | | @ApiModelProperty("5è´¨éè´è´£äººæ¥æ") |
| | | private LocalDateTime qualitySupervisorDate; |
| | | |
| | | @ApiModelProperty(value = "æäº¤äººid", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å½åç¶æ") |
| | | private String currentState; |
| | | |
| | | @ApiModelProperty(value = "åå»ºæ¥æ / æäº¤æ¥æ", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDate createTime; |
| | | |
| | | @ApiModelProperty("å½åè´è´£äºº") |
| | | private String currentResponsible; |
| | | |
| | | @ApiModelProperty("çç£è®°å½id") |
| | | private Integer supervisionRecordId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ - å¤çå |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 05:35:58 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_supervision_processing_sheet") |
| | | @ApiModel(value = "PersonSupervisionProcessingSheet对象", description = "çç£è®°å½ - å¤çå") |
| | | public class PersonSupervisionProcessingSheet implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "processing_id", type = IdType.AUTO) |
| | | private Integer processingId; |
| | | |
| | | @ApiModelProperty("1 ä¸ç¬¦åæå离äºå®çæè¿°") |
| | | private String descriptionNonconformity; |
| | | |
| | | @ApiModelProperty("1 æåºé¨é¨") |
| | | private String proposingDepartment; |
| | | |
| | | @ApiModelProperty("1 æåºé¨é¨ 人å id") |
| | | private Integer proposingDepartmentPersonId; |
| | | |
| | | @ApiModelProperty("1 æåºé¨é¨ æ¥æ") |
| | | private LocalDateTime proposingDepartmentDate; |
| | | |
| | | @ApiModelProperty("2 åå åæ") |
| | | private String causeAnalysis; |
| | | |
| | | @ApiModelProperty("2 åå åæ é¨é¨") |
| | | private Integer causeAnalysisId; |
| | | |
| | | @ApiModelProperty("2 åå åæ é¨é¨ 人å id") |
| | | private Integer causeAnalysisPersonId; |
| | | |
| | | @ApiModelProperty("2 åå åæ æ¥æ") |
| | | private LocalDateTime causeAnalysisDate; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½") |
| | | private String correctiveMeasure; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½ æåºè¦æ±é¨é¨ç¡®è®¤") |
| | | private String requestDepartmentConfirmation; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½ é¨é¨") |
| | | private Integer correctiveDepartId; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½ 人åid") |
| | | private Integer correctiveActionId; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½ æ¥æ") |
| | | private LocalDateTime correctiveActionDate; |
| | | |
| | | @ApiModelProperty("4 宿½éªè¯ç»æ") |
| | | private String implementationVerificationResults; |
| | | |
| | | @ApiModelProperty("4 éªè¯é¨é¨") |
| | | private String verificationDepartment; |
| | | |
| | | @ApiModelProperty("4 éªè¯é¨é¨ 人åid") |
| | | private Integer verificationDepartmentPersonId; |
| | | |
| | | @ApiModelProperty("4 éªè¯é¨é¨ æ¥æ") |
| | | private LocalDateTime verificationDepartmentDate; |
| | | |
| | | @ApiModelProperty(value = "æäº¤äººid", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å½åç¶æ") |
| | | private String currentState; |
| | | |
| | | @ApiModelProperty(value = "åå»ºæ¥æ / æäº¤æ¥æ", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("å½åè´è´£äºº") |
| | | private String currentResponsible; |
| | | |
| | | @ApiModelProperty("çç£è®°å½id") |
| | | private Integer supervisionRecordId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 04:16:49 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_supervision_record") |
| | | @ApiModel(value = "PersonSupervisionRecord对象", description = "çç£è®°å½") |
| | | public class PersonSupervisionRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æ£æµäººåid") |
| | | private Integer testerId; |
| | | |
| | | @ApiModelProperty("çç£åid") |
| | | private Integer supervisorId; |
| | | |
| | | @ApiModelProperty("æ£æµé¡¹ç®") |
| | | private String testItem; |
| | | |
| | | @ApiModelProperty("æ ·åç¼å·") |
| | | private String sampleNumber; |
| | | |
| | | @ApiModelProperty("æ£æµæ¹æ³") |
| | | private String testMethod; |
| | | |
| | | @ApiModelProperty("æ£æµè®°å½") |
| | | private String testingRecords; |
| | | |
| | | @ApiModelProperty("æ£æµæ¥æ") |
| | | private LocalDate detectionDate; |
| | | |
| | | @ApiModelProperty("人åid") |
| | | private String personnel; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤") |
| | | private String instrumentEquipment; |
| | | |
| | | @ApiModelProperty("å·¥ä½ç¯å¢") |
| | | private String workingEnvironment; |
| | | |
| | | @ApiModelProperty("æ ·åéé") |
| | | private String sampleCollection; |
| | | |
| | | @ApiModelProperty("æ ·åçåå¤") |
| | | private String samplePreparation; |
| | | |
| | | @ApiModelProperty("æ£æµæ¥å") |
| | | private String testReport; |
| | | |
| | | @ApiModelProperty("çç£æ
åµè¯ä»·") |
| | | private String evaluationSupervisionSituation; |
| | | |
| | | @ApiModelProperty("ä¸ç¬¦åå¤çæè§") |
| | | private String doNotMeetTheHandlingOpinions; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äººid") |
| | | private Integer technicalDirector; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äººå®¡æ¹æ¥æ") |
| | | private LocalDateTime technicalDirectorDate; |
| | | |
| | | @ApiModelProperty(value = "åå»ºæ¥æ", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¥æ", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "å建人id", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººid", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("å½åè´è´£äºº") |
| | | private String currentResponsible; |
| | | |
| | | @ApiModelProperty("å½åç¶æ") |
| | | private String currentState; |
| | | |
| | | private Integer departLimsId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥ä½å±¥å |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-02 03:13:03 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_track_record") |
| | | @ApiModel(value = "PersonTrackRecord对象", description = "å·¥ä½å±¥å") |
| | | @ExcelIgnoreUnannotated |
| | | public class PersonTrackRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ExcelIgnore |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ColumnWidth(value = 18) |
| | | @ExcelProperty(value = "èµ·å§æ¶é´") |
| | | @ApiModelProperty("èµ·å§æ¶é´") |
| | | private LocalDateTime startTime; |
| | | |
| | | @ExcelProperty(value = "ç»ææ¶é´") |
| | | @ColumnWidth(value = 18) |
| | | @ApiModelProperty("ç»ææ¶é´") |
| | | private LocalDateTime endTime; |
| | | |
| | | @ExcelProperty(value = "å·¥ä½åä½") |
| | | @ApiModelProperty("å·¥ä½åä½") |
| | | private String placeWork; |
| | | |
| | | @ExcelProperty(value = "é¨é¨") |
| | | @ApiModelProperty("é¨é¨") |
| | | private String department; |
| | | |
| | | @ExcelProperty(value = "èå¡") |
| | | @ApiModelProperty("èå¡") |
| | | private String post; |
| | | |
| | | @ExcelProperty(value = "夿³¨") |
| | | @ApiModelProperty("夿³¨") |
| | | private String remarks; |
| | | |
| | | @ColumnWidth(value = 18) |
| | | @ExcelProperty(value = "å建æ¶é´") |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @ApiModelProperty("ç¨æ·è¡¨ï¼userï¼id") |
| | | private Integer userId; |
| | | |
| | | private String fileName; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | @ExcelProperty(value = "ç¨æ·åç§°") |
| | | @ApiModelProperty("ç¨æ·åç§°") |
| | | private String name; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:11:49 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_training") |
| | | @ApiModel(value = "PersonTraining对象", description = "å¹è®è®¡å") |
| | | public class PersonTraining implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ç¼å¶äººid") |
| | | private Integer compilerId; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¥æ") |
| | | private LocalDateTime compilationDate; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äººid") |
| | | private Integer reviewerId; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private LocalDateTime auditDate; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æ") |
| | | private Integer reviewerStatus; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸å¤æ³¨") |
| | | private String auditRemarks; |
| | | |
| | | @ApiModelProperty("æ¹å人id") |
| | | private Integer approverId; |
| | | |
| | | @ApiModelProperty("æ¹å夿³¨") |
| | | private String approvalRemarks; |
| | | |
| | | @ApiModelProperty("æ¹åç¶æ(1ï¼æ¹åï¼2ï¼ä¸æ¹å)") |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty("æ¹åæ¥æ") |
| | | private LocalDateTime approvalDate; |
| | | |
| | | @ApiModelProperty("åå»ºæ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("æ´æ°äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("é¨é¨id") |
| | | private Integer departId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å详æ
|
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:46:27 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_training_detailed") |
| | | @ApiModel(value = "PersonTrainingDetailed对象", description = "å¹è®è®¡å详æ
") |
| | | public class PersonTrainingDetailed implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("å¹è®è®¡å") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("课ç¨ç¼å·") |
| | | private String courseCode; |
| | | |
| | | @ApiModelProperty("å¹è®ç®æ ") |
| | | private String trainingObjectives; |
| | | |
| | | @ApiModelProperty("å¹è®å
容") |
| | | private String trainingContent; |
| | | |
| | | @ApiModelProperty("å¹è®æ¹å¼") |
| | | private String trainingMode; |
| | | |
| | | // æªå¼å§ ==> è¿è¡ä¸ ==> å·²ç»æ ==> 已宿 |
| | | @ApiModelProperty("ç¶æ(1ï¼å·²å®æï¼2ï¼è¿è¡ä¸ï¼3: æªå¼å§ï¼4ï¼å·²ç»æ)") |
| | | private Integer state; |
| | | |
| | | @ApiModelProperty("åå 对象") |
| | | private String participants; |
| | | |
| | | @ApiModelProperty("举åé¨é¨") |
| | | private Integer holdingDepartment; |
| | | |
| | | @ApiModelProperty("å¹è®å°ç¹") |
| | | private String placeTraining; |
| | | |
| | | @ApiModelProperty("å¹è®è®²å¸_id") |
| | | private String trainingLecturerId; |
| | | |
| | | @ApiModelProperty("å¹è®æ¥æ") |
| | | private String trainingDate; |
| | | |
| | | @ApiModelProperty("å
·ä½æ¥æ") |
| | | private String trainingDateTwo; |
| | | |
| | | @ApiModelProperty("å¼å§æ¶é´") |
| | | private String openingTime; |
| | | |
| | | @ApiModelProperty("ç»ææ¶é´") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty("课é¢å¦å") |
| | | private String projectCredits; |
| | | |
| | | @ApiModelProperty("课æ¶") |
| | | private Double classHour; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remarks; |
| | | |
| | | @ApiModelProperty("å¹è®è®¡åid") |
| | | private Integer planId; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "å建人id", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººid", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´", hidden = true) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("èæ ¸æ¹å¼") |
| | | private String assessmentMethod; |
| | | |
| | | @ApiModelProperty("æ¬æ¬¡å¹è®ç»¼åè¯ä»·") |
| | | private String comprehensiveAssessment; |
| | | |
| | | @ApiModelProperty("è¯ä»·äºº") |
| | | private Integer assessmentUserId; |
| | | |
| | | @ApiModelProperty("è¯ä»·æ¶é´") |
| | | private LocalDate assessmentDate; |
| | | |
| | | @ApiModelProperty("è·¯å¾") |
| | | private String url; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | private String imgName; |
| | | |
| | | @ApiModelProperty("å¹è®æè¦") |
| | | private String trainingAbstract; |
| | | |
| | | @TableField(exist = false) |
| | | private String organizingDepartment; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("cnas_person_training_file") |
| | | public class PersonTrainingFile { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("年度计åæç»è¡¨id") |
| | | private Integer detailId; |
| | | |
| | | @ApiModelProperty("æä»¶è·¯å¾") |
| | | private String fileUrl; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æä¸¾è¡¨å") |
| | | private String enumAttachmentType; |
| | | |
| | | @TableField(exist = false) |
| | | private String mime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®°å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-12 04:50:48 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_person_training_record") |
| | | @ApiModel(value = "PersonTrainingRecord对象", description = "å¹è®è®°å½") |
| | | public class PersonTrainingRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "training_record_id", type = IdType.AUTO) |
| | | private Integer trainingRecordId; |
| | | |
| | | @ApiModelProperty("ç¨æ·è¡¨æ ¼ï¼userï¼ä¸»é®") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty("å¹è®è®¡å详æ
- å id") |
| | | private Integer courseId; |
| | | |
| | | @ApiModelProperty("èæ ¸ç»æ") |
| | | private String examinationResults; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.schedule; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingDetailed; |
| | | import com.ruoyi.personnel.service.PersonTrainingDetailedService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | public class PersonSchedule { |
| | | |
| | | @Resource |
| | | private PersonTrainingDetailedService personTrainingDetailedService; |
| | | |
| | | /** |
| | | * å½å课ç¨å°äºå½åæ¶é´ï¼å¹¶ä¸ç¶æä¸º2ï¼è¿è¡ä¸ï¼3: æªå¼å§æ´æ°ç¶æä¸º4ï¼å·²ç»æ |
| | | */ |
| | | @Scheduled(cron = "0 0/15 * * * ?") //15åéæ§è¡ä¸æ¬¡ |
| | | //@Scheduled(cron = "0/10 * * * * ?") //æ¯10ç§æ§è¡ä¸æ¬¡ |
| | | public void testScheduleTask() { |
| | | // è·åå½å¤©çææå¹è®è¯¾ç¨ |
| | | Date date = new Date(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat sdfWithTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String newDate = sdf.format(date); |
| | | List<PersonTrainingDetailed> list = personTrainingDetailedService.list(Wrappers.<PersonTrainingDetailed>lambdaQuery() |
| | | .eq(PersonTrainingDetailed::getState, 2) |
| | | .or().eq(PersonTrainingDetailed::getState, 3) |
| | | .le(PersonTrainingDetailed::getTrainingDateTwo, newDate)); |
| | | list.forEach(i -> { |
| | | LocalDate parse = LocalDate.parse(i.getTrainingDateTwo()); |
| | | Date date1 = Date.from(parse.atStartOfDay(ZoneId.systemDefault()).toInstant()); |
| | | String trainingDate = sdf.format(date1); |
| | | String endTime = trainingDate + " " + i.getEndTime(); |
| | | try { |
| | | Date endNewTime = sdfWithTime.parse(endTime); |
| | | // æ¥æè¶
åº |
| | | if (endNewTime.before(date)) { |
| | | i.setState(4); |
| | | personTrainingDetailedService.updateById(i); |
| | | } |
| | | } catch (ParseException e) {} |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.pojo.Annex; |
| | | |
| | | public interface AnnexService extends IService<Annex> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | |
| | | import com.ruoyi.personnel.pojo.PersonTrainingFile; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | public interface FileGeneralService { |
| | | |
| | | void fileUpload(MultipartFile file, String suffix, Integer id,Integer type); |
| | | |
| | | List<PersonTrainingFile> selectFile(Integer id,Integer type); |
| | | |
| | | void delFile(Integer id); |
| | | |
| | | void fileDownLoad(Integer id, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.dto.DepartmentDto; |
| | | import com.ruoyi.common.core.dto.UserPageDto; |
| | | import com.ruoyi.personnel.dto.PersonBasicInfoDto; |
| | | import com.ruoyi.personnel.pojo.PersonBasicInfo; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingFile; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-08-30 09:19:57 |
| | | */ |
| | | public interface PersonBasicInfoService extends IService<PersonBasicInfo> { |
| | | |
| | | List<DepartmentDto> selectCNSAPersonTree(); |
| | | |
| | | Map<String,Object> getCNASPersonnelInfo(Integer userId); |
| | | |
| | | void saveCNASPersonnelInfo(PersonBasicInfoDto personBasicInfoDto); |
| | | |
| | | IPage<Map<String, Object>> basicInformationOfPersonnelSelectPage(Page page, String name, Integer departmentId); |
| | | |
| | | void exportPersonBasicInfo(UserPageDto userPageDto, HttpServletResponse response) throws Exception; |
| | | |
| | | String exportPersonBasicInfoById(Integer id, HttpServletResponse response); |
| | | |
| | | void saveDeviceCalibrationFile(MultipartFile file, String suffix, Integer id); |
| | | |
| | | List<PersonTrainingFile> getDeviceCalibrationFile(Integer id); |
| | | |
| | | void delDeviceCalibrationFile(Integer id); |
| | | |
| | | void downLoadDeviceCalibrationFile(Integer id ,HttpServletResponse response); |
| | | |
| | | void getEmployees(Integer departId); |
| | | |
| | | void getEmployee(Integer userId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.dto.PersonCommunicationAbilityDto; |
| | | import com.ruoyi.personnel.pojo.PersonCommunicationAbility; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ²éè½å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 12:00:57 |
| | | */ |
| | | public interface PersonCommunicationAbilityService extends IService<PersonCommunicationAbility> { |
| | | |
| | | IPage<PersonCommunicationAbilityDto> personPersonCommunicationAbilityPage(Page page, |
| | | Integer departLimsId, Integer userId, String userName); |
| | | |
| | | void exportPersonCommunicationAbility(Integer id, HttpServletResponse response)throws Exception; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.dto.PersonJobResponsibilitiesDto; |
| | | import com.ruoyi.personnel.pojo.PersonJobResponsibilities; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * å²ä½èè´£ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 02:07:49 |
| | | */ |
| | | public interface PersonJobResponsibilitiesService extends IService<PersonJobResponsibilities> { |
| | | |
| | | IPage<PersonJobResponsibilitiesDto> personJobResponsibilitiesSelect(Page page, |
| | | String userId, |
| | | String departmentId, |
| | | String userName); |
| | | |
| | | void exportPersonJobResponsibilities(Integer id, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.dto.PersonPersonnelCapacityDto; |
| | | import com.ruoyi.personnel.pojo.PersonPersonnelCapacity; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 人åè½å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 11:26:18 |
| | | */ |
| | | public interface PersonPersonnelCapacityService extends IService<PersonPersonnelCapacity> { |
| | | |
| | | IPage<PersonPersonnelCapacityDto> personPersonnelCapacityPage(Page page, Integer departLimsId, Integer userId, String userName); |
| | | |
| | | /** |
| | | * 导åºäººåè½å |
| | | * @param id |
| | | * @param response |
| | | */ |
| | | void exportPersonnelCapacity(Integer id, HttpServletResponse response); |
| | | |
| | | |
| | | /** |
| | | * 人åè½å确认 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | boolean confirmPersonnelCapacity(Integer id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.dto.PersonPostAuthorizationRecordDto; |
| | | import com.ruoyi.personnel.pojo.PersonPostAuthorizationRecord; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä»»èææè®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 10:48:17 |
| | | */ |
| | | public interface PersonPostAuthorizationRecordService extends IService<PersonPostAuthorizationRecord> { |
| | | |
| | | IPage<PersonPostAuthorizationRecordDto> personPostAuthorizationRecordPage(Page page, |
| | | Integer departLimsId, |
| | | Integer userId, |
| | | String userName); |
| | | |
| | | void exportPersonPostAuthorizationRecord(Integer id, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.dto.PersonRewardPunishmentRecordDto; |
| | | import com.ruoyi.personnel.excel.PersonRewardPunishmentRecordExcel; |
| | | import com.ruoyi.personnel.pojo.PersonRewardPunishmentRecord; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 奿©è®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-08 11:25:02 |
| | | */ |
| | | public interface PersonRewardPunishmentRecordService extends IService<PersonRewardPunishmentRecord> { |
| | | |
| | | IPage<PersonRewardPunishmentRecordDto> rewardPunishmentPage(Page page, |
| | | Integer userId, |
| | | String userName, |
| | | Date startTime, |
| | | Date endTime, |
| | | Integer departmentId); |
| | | |
| | | List<PersonRewardPunishmentRecordExcel> rewardPunishmentExport(Integer userId, Integer departmentId, String userName, Date startTime, Date endTime); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.dto.PersonSupervisePlanDetailsDto; |
| | | import com.ruoyi.personnel.excel.PersonSupervisePlanDetailsUpload; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisePlanDetails; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®¡å - å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 04:17:02 |
| | | */ |
| | | public interface PersonSupervisePlanDetailsService extends IService<PersonSupervisePlanDetails> { |
| | | |
| | | IPage<PersonSupervisePlanDetailsDto> yearPlanDetailPage(Page page, |
| | | String date, String project, Integer planId); |
| | | |
| | | void importExcel(List<PersonSupervisePlanDetailsUpload> list, Integer planId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.dto.PersonSupervisePlanDto; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisePlan; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®¡å - ç¶ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 04:14:45 |
| | | */ |
| | | public interface PersonSupervisePlanService extends IService<PersonSupervisePlan> { |
| | | |
| | | IPage<PersonSupervisePlanDto> yearPlanDtoIPage(Page page, String organizationPerson,Integer departId); |
| | | |
| | | void yearPlanDetailImport(MultipartFile file,String suffix); |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®¡å |
| | | * @param id |
| | | * @param response |
| | | */ |
| | | void exportSuperVisePlan(Integer id, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionControlSheet; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ - æ§å¶å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 05:18:57 |
| | | */ |
| | | public interface PersonSupervisionControlSheetService extends IService<PersonSupervisionControlSheet> { |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®°å½çº æ£æ§å¶å |
| | | * @param supervisionRecordId |
| | | * @param response |
| | | */ |
| | | void exportSupervisionControlSheet(Integer supervisionRecordId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionProcessingSheet; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ - å¤çå æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 05:35:58 |
| | | */ |
| | | public interface PersonSupervisionProcessingSheetService extends IService<PersonSupervisionProcessingSheet> { |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®°å½çº æ£å¤çå |
| | | * @param supervisionRecordId |
| | | * @param response |
| | | */ |
| | | void exportSupervisionProcessingSheet(Integer supervisionRecordId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.dto.PersonSupervisionRecordDto; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionRecord; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 04:16:49 |
| | | */ |
| | | public interface PersonSupervisionRecordService extends IService<PersonSupervisionRecord> { |
| | | |
| | | void deletePersonSupervisionRecord(List<Integer> ids); |
| | | |
| | | IPage<PersonSupervisionRecordDto> personSupervisionRecordPage(Page page, |
| | | Integer userId, String userName, Integer departLimsId); |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®°å½ |
| | | * @param id |
| | | * @param response |
| | | */ |
| | | void exportPersonSupervisionRecord(Integer id, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.pojo.PersonTrackRecord; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥ä½å±¥å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-02 03:13:03 |
| | | */ |
| | | public interface PersonTrackRecordService extends IService<PersonTrackRecord> { |
| | | |
| | | IPage<PersonTrackRecord> personTrackRecordSelect(Page page, String userId, String departmentId); |
| | | |
| | | List<PersonTrackRecord> personTrackRecordExport(String userId, String departmentId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.entity.DepartmentLims; |
| | | import com.ruoyi.personnel.dto.PersonTrainingDetailedDto; |
| | | import com.ruoyi.personnel.excel.PersonTrainingDetailedUpload; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingDetailed; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingFile; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å详æ
æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:46:27 |
| | | */ |
| | | public interface PersonTrainingDetailedService extends IService<PersonTrainingDetailed> { |
| | | |
| | | Map<String,Object> fileUpload(MultipartFile file , Integer id); |
| | | |
| | | List<DepartmentLims> selectDepartLims(); |
| | | |
| | | void importExcel(List<PersonTrainingDetailedUpload> list, Integer planId); |
| | | |
| | | void deleteAnnualPlanDetailTable(String ids); |
| | | |
| | | IPage<PersonTrainingDetailedDto> queryTheAnnualPlanDetailsTable(Page page, |
| | | String trainingLecturerName, |
| | | String courseCode, String trainingDate, Integer id, Integer userId,Integer departId, |
| | | Integer state); |
| | | |
| | | List<PersonTrainingFile> getFileData(Integer detailedId); |
| | | |
| | | void deleteFile(Integer id); |
| | | |
| | | void fileDownLoad(Integer id, HttpServletResponse response); |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingFile; |
| | | |
| | | public interface PersonTrainingFileService extends IService<PersonTrainingFile> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.dto.PersonTrainingRecordDto; |
| | | import com.ruoyi.personnel.dto.PersonTrainingRecordListDto; |
| | | import com.ruoyi.personnel.dto.TrainingRecordPersonDetailedDto; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingRecord; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-12 04:50:48 |
| | | */ |
| | | public interface PersonTrainingRecordService extends IService<PersonTrainingRecord> { |
| | | |
| | | List<PersonTrainingRecordDto> trainingAndAssessmentRecordsPage(Integer trainingDetailedId, String userName); |
| | | |
| | | void deleteTrainingAndAssessmentRecords(String ids); |
| | | |
| | | IPage<PersonTrainingRecordListDto> personnelTrainingPersonnel(Page page, |
| | | String userName, Integer userId, Integer departLimsId); |
| | | |
| | | IPage<TrainingRecordPersonDetailedDto> queryPersonnelDetails(Page page, Integer userId); |
| | | |
| | | void claimOfTrainingAndAssessmentRecords(Boolean claimAndClaim, Integer courseId); |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®è®°å½ |
| | | * @param userId |
| | | * @param response |
| | | */ |
| | | void exportTrainingRecord(Integer userId, HttpServletResponse response); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·idå年份æ¥è¯¢äººåæç» å¹è®è®°å½ |
| | | * @param page |
| | | * @param userId |
| | | * @param year |
| | | * @return |
| | | */ |
| | | IPage<TrainingRecordPersonDetailedDto> queryPersonnelDetailsOfUserIdAndYear(Page page, Integer userId, Integer year); |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®è®°å½ |
| | | * @param userId |
| | | * @param trainingDate |
| | | * @param response |
| | | */ |
| | | void exportTrainingRecordAddTrainingDate(Integer userId, Integer trainingDate, HttpServletResponse response); |
| | | |
| | | void outOfFocusPreservation(PersonTrainingRecord personTrainingRecord); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.dto.PersonTrainingDto; |
| | | import com.ruoyi.personnel.dto.PersonTrainingUpdateDto; |
| | | import com.ruoyi.personnel.pojo.PersonTraining; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:11:49 |
| | | */ |
| | | public interface PersonTrainingService extends IService<PersonTraining> { |
| | | |
| | | IPage<PersonTrainingDto> personTrainingSelect(Page page, |
| | | String compilerName, Integer departmentId); |
| | | void deleteDetail(Integer id); |
| | | |
| | | void personTrainingImport(MultipartFile file); |
| | | |
| | | void personTrainingDelete(Integer id); |
| | | |
| | | void reviewAnnualPersonnelTraining(PersonTrainingUpdateDto personTrainingUpdateDto); |
| | | |
| | | void approveAnnualPersonnelTraining(PersonTrainingUpdateDto personTrainingUpdateDto); |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®è®¡å |
| | | * @param id |
| | | * @param response |
| | | */ |
| | | void exportPersonTraining(Integer id, HttpServletResponse response); |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®ä¸èæ ¸è®°å½ |
| | | * @param id |
| | | * @param response |
| | | */ |
| | | void exportPersonTrainingRecord(Integer id, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.personnel.mapper.AnnexMapper; |
| | | import com.ruoyi.personnel.pojo.Annex; |
| | | import com.ruoyi.personnel.service.AnnexService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class AnnexServiceImpl extends ServiceImpl<AnnexMapper, Annex> implements AnnexService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.personnel.enumeration.AttachmentType; |
| | | import com.ruoyi.personnel.mapper.PersonTrainingFileMapper; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingFile; |
| | | import com.ruoyi.personnel.service.FileGeneralService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | |
| | | public class FileGeneralServiceImpl implements FileGeneralService { |
| | | |
| | | @Autowired |
| | | private PersonTrainingFileMapper fileMapper; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Value("${excelUrl}") |
| | | private String excelUrl; |
| | | |
| | | @Override |
| | | public void fileUpload(MultipartFile file, String suffix, Integer id,Integer type) { |
| | | String name = file.getOriginalFilename(); |
| | | UUID uuid = UUID.randomUUID(); |
| | | String fileName = uuid + name; |
| | | String path = ""; |
| | | // æ ¹æ®åç¼å¤æå±äºä»ä¹ç±»å |
| | | if(suffix.toLowerCase().contains("xls")) { |
| | | path = excelUrl; |
| | | } else if (suffix.toLowerCase().contains("doc") || suffix.toLowerCase().contains("pdf")) { |
| | | path = wordUrl; |
| | | } else { |
| | | path = imgUrl; |
| | | } |
| | | File file1 = new File(path); |
| | | if(!file1.exists()) { |
| | | file1.mkdir(); |
| | | } |
| | | try { |
| | | File file2 = new File(file1, fileName); |
| | | file.transferTo(file2); |
| | | // ä¿åæ°æ®åº |
| | | PersonTrainingFile personTrainingFile = new PersonTrainingFile(); |
| | | personTrainingFile.setDetailId(id); |
| | | personTrainingFile.setFileUrl("/" + fileName); |
| | | personTrainingFile.setFileName(file.getOriginalFilename()); |
| | | personTrainingFile.setCreateUser(SecurityUtils.getUserId().intValue()); |
| | | personTrainingFile.setCreateTime(LocalDateTime.now()); |
| | | personTrainingFile.setEnumAttachmentType(AttachmentType.getTypeValue(type)); |
| | | fileMapper.insert(personTrainingFile); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<PersonTrainingFile> selectFile(Integer id, Integer type) { |
| | | List<PersonTrainingFile> personTrainingFileList = fileMapper.selectList(new LambdaQueryWrapper<PersonTrainingFile>() |
| | | .eq(PersonTrainingFile::getDetailId, id) |
| | | .eq(PersonTrainingFile::getEnumAttachmentType, AttachmentType.getTypeValue(type))); |
| | | if(CollectionUtils.isNotEmpty(personTrainingFileList)) { |
| | | for(PersonTrainingFile a : personTrainingFileList) { |
| | | // 设置mime |
| | | int i = a.getFileUrl().lastIndexOf("."); |
| | | String contentType = getContentType(a.getFileUrl().substring(i + 1)); |
| | | a.setMime(contentType); |
| | | } |
| | | } |
| | | return personTrainingFileList; |
| | | } |
| | | |
| | | @Override |
| | | public void delFile(Integer id) { |
| | | fileMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void fileDownLoad(Integer id, HttpServletResponse response) { |
| | | PersonTrainingFile personTrainingFile = fileMapper.selectById(id); |
| | | // è·åæä»¶åç¼ |
| | | String suffix = personTrainingFile.getFileName().substring(personTrainingFile.getFileName().lastIndexOf(".") + 1); |
| | | String path = ""; |
| | | if(suffix.toLowerCase().contains("xls")) { |
| | | path = excelUrl; |
| | | } else if (suffix.toLowerCase().contains("doc") || suffix.toLowerCase().contains("pdf")) { |
| | | path = wordUrl; |
| | | } else { |
| | | path = imgUrl; |
| | | } |
| | | File file = new File(path + File.separator + personTrainingFile.getFileUrl()); |
| | | if(!file.exists()) { |
| | | throw new RuntimeException("æä»¶ä¸åå¨"); |
| | | } |
| | | try(FileInputStream fileInputStream = new FileInputStream(file); |
| | | ServletOutputStream stream = response.getOutputStream()) { |
| | | String contentType = getContentType(suffix); |
| | | response.setContentType(contentType); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + personTrainingFile.getFileName()); |
| | | byte[] bytes = new byte[1024]; |
| | | int i; |
| | | while((i = fileInputStream.read(bytes)) != -1) { |
| | | stream.write(bytes, 0, i); |
| | | stream.flush(); |
| | | } |
| | | }catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | // æ ¹æ®æä»¶æ©å±åè·å MIME ç±»å |
| | | private String getContentType(String fileExtension) { |
| | | switch (fileExtension) { |
| | | case "jpg": |
| | | case "jpeg": |
| | | return "image/jpeg"; |
| | | case "png": |
| | | return "image/png"; |
| | | case "gif": |
| | | return "image/gif"; |
| | | case "pdf": |
| | | return "application/pdf"; |
| | | case "doc": |
| | | return "application/msword"; |
| | | case "docx": |
| | | return "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; |
| | | case "xls": |
| | | return "application/vnd.ms-excel"; |
| | | case "xlsx": |
| | | return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; |
| | | case "ppt": |
| | | case "pptx": |
| | | return "application/vnd.ms-powerpoint"; |
| | | default: |
| | | return "application/octet-stream"; // é»è®¤äºè¿å¶æµ |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.common.core.domain.entity.DepartmentLims; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.core.dto.DepartmentDto; |
| | | import com.ruoyi.common.core.dto.UserPageDto; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.framework.util.HeaderToken; |
| | | import com.ruoyi.personnel.dto.PersonBasicInfoDto; |
| | | import com.ruoyi.personnel.mapper.*; |
| | | import com.ruoyi.personnel.pojo.*; |
| | | import com.ruoyi.personnel.service.PersonBasicInfoService; |
| | | import com.ruoyi.system.mapper.DepartmentLimsMapper; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.openxml4j.util.ZipSecureFile; |
| | | import org.apache.poi.xwpf.usermodel.*; |
| | | import org.openxmlformats.schemas.wordprocessingml.x2006.main.STMerge; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.net.URLEncoder; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Paths; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.Period; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-08-30 09:19:57 |
| | | */ |
| | | |
| | | @Service |
| | | @Slf4j |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class PersonBasicInfoServiceImpl extends ServiceImpl<PersonBasicInfoMapper, PersonBasicInfo> implements PersonBasicInfoService { |
| | | |
| | | @Resource |
| | | private DepartmentLimsMapper departmentMapper; |
| | | |
| | | @Resource |
| | | private PersonTrainingFileMapper fileMapper; |
| | | |
| | | @Resource |
| | | private HeaderToken headerToken; |
| | | |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Value("${excelUrl}") |
| | | private String excelUrl; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | |
| | | @Resource |
| | | private AnnexMapper annexMapper; |
| | | @Resource |
| | | private PersonTrackRecordMapper personTrackRecordMapper; |
| | | |
| | | @Override |
| | | public List<DepartmentDto> selectCNSAPersonTree() { |
| | | List<DepartmentDto> departments = departmentMapper.selectDepartment(); |
| | | List<DepartmentDto> limsUser = baseMapper.selectLimsUser(); |
| | | departments.addAll(limsUser); |
| | | //è·åç¶èç¹ |
| | | return departments.stream().filter(m -> m.getFatherId() == null).peek( |
| | | (m) -> m.setChildren(getChildren(m, departments)) |
| | | ).collect(Collectors.toList()); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String,Object> getCNASPersonnelInfo(Integer userId) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | Map<Integer,List<DepartmentLims>> childrenMap = new HashMap<>(); |
| | | List<DepartmentLims> deptS = departmentMapper.selectList(null); |
| | | for (DepartmentLims dept : deptS) { |
| | | if(!Objects.isNull(dept.getFatherId())) { |
| | | if(!childrenMap.containsKey(dept.getFatherId())) { |
| | | childrenMap.put(dept.getFatherId(),new ArrayList<>()); |
| | | } |
| | | childrenMap.get(dept.getFatherId()).add(dept); |
| | | } |
| | | } |
| | | // ç¶èç¹ |
| | | List<DepartmentLims> deptF = new ArrayList<>(); |
| | | for (DepartmentLims dept : deptS) { |
| | | if(Objects.isNull(dept.getFatherId())) { |
| | | deptF.add(buildTree(dept,childrenMap)); |
| | | } |
| | | } |
| | | map.put("department",deptF); |
| | | map.put("PersonBasicInfoDto",baseMapper.getCNASPersonnelInfo(userId)); |
| | | map.put("annexList",annexMapper.selectList(new LambdaQueryWrapper<Annex>().eq(Annex::getUserId,userId))); |
| | | return map; |
| | | } |
| | | |
| | | private DepartmentLims buildTree(DepartmentLims departmentLims, Map<Integer,List<DepartmentLims>> childrenMap) { |
| | | if(childrenMap.containsKey(departmentLims.getId())) { |
| | | departmentLims.setChildren(childrenMap.get(departmentLims.getId())); |
| | | for (DepartmentLims departmentLims1 : departmentLims.getChildren()) { |
| | | buildTree(departmentLims1,childrenMap); |
| | | } |
| | | } |
| | | return departmentLims; |
| | | } |
| | | |
| | | @Override |
| | | public void saveCNASPersonnelInfo(PersonBasicInfoDto personBasicInfoDto) { |
| | | User user = new User(); |
| | | user.setId(personBasicInfoDto.getUserId()); |
| | | user.setAccount(personBasicInfoDto.getAccount()); |
| | | user.setName(personBasicInfoDto.getName()); |
| | | user.setNameEn(personBasicInfoDto.getNameEn()); |
| | | user.setAge(personBasicInfoDto.getAge()); |
| | | user.setPhone(personBasicInfoDto.getPhone()); |
| | | user.setEmail(personBasicInfoDto.getEmail()); |
| | | // user.setDepartment(personBasicInfoDto.getDepartment()); |
| | | user.setSignatureUrl(personBasicInfoDto.getSignatureUrl()); |
| | | user.setPictureUrl(personBasicInfoDto.getPictureUrl()); |
| | | user.setDepartLimsId(personBasicInfoDto.getDepartLimsId()); |
| | | userMapper.updateById(user); |
| | | PersonBasicInfo personBasicInfo = JSONObject.parseObject(JSON.toJSONString(personBasicInfoDto), PersonBasicInfo.class); |
| | | PersonBasicInfo one = baseMapper.selectOne(new LambdaQueryWrapper<PersonBasicInfo>() |
| | | .eq(PersonBasicInfo::getUserId, personBasicInfoDto.getUserId())); |
| | | if(Objects.isNull(one)) { |
| | | baseMapper.insert(personBasicInfo); |
| | | }else { |
| | | personBasicInfo.setId(one.getId()); |
| | | baseMapper.updateById(personBasicInfo); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> basicInformationOfPersonnelSelectPage(Page page, String name, Integer departmentId) { |
| | | return baseMapper.selectPersonBasecInfoAndUser(page, name, departmentId); |
| | | } |
| | | |
| | | @Override |
| | | public void exportPersonBasicInfo(UserPageDto userPageDto, HttpServletResponse response) throws Exception { |
| | | ArrayList<PersonBasicInfoDto> data = new ArrayList<>(); |
| | | List<User> list = userMapper.selectList(null); |
| | | for (User user : list) { |
| | | PersonBasicInfoDto personBasicInfoDto = new PersonBasicInfoDto(); |
| | | PersonBasicInfo personBasicInfo = baseMapper.selectOne(Wrappers.<PersonBasicInfo>lambdaQuery().eq(PersonBasicInfo::getUserId, user.getId())); |
| | | if (ObjectUtils.isNotEmpty(personBasicInfo)) { |
| | | BeanUtils.copyProperties(personBasicInfo, personBasicInfoDto); |
| | | } |
| | | personBasicInfoDto.setName(user.getName()); |
| | | personBasicInfoDto.setAccount(user.getAccount()); |
| | | personBasicInfoDto.setPhone(ObjectUtils.isNotEmpty(user.getPhone()) ? user.getPhone() : " "); |
| | | data.add(personBasicInfoDto); |
| | | } |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | String fileName = URLEncoder.encode("人ååºæ¬ä¿¡æ¯å表导åº", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | try { |
| | | // æ°å»ºExcelWriter |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build(); |
| | | WriteSheet mainSheet = EasyExcel.writerSheet(0, "人ååºæ¬ä¿¡æ¯å¯¼åº").head(PersonBasicInfoDto.class).build(); |
| | | excelWriter.write(data, mainSheet); |
| | | // å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public String exportPersonBasicInfoById(Integer id, HttpServletResponse response) { |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"); |
| | | User user = userMapper.selectById(id); |
| | | PersonBasicInfo personBasicInfo = baseMapper.selectOne(Wrappers.<PersonBasicInfo>lambdaQuery().eq(PersonBasicInfo::getUserId, user.getId())); |
| | | if (ObjectUtils.isEmpty(personBasicInfo)){ |
| | | throw new ErrorException("è¯¥ç¨æ·çåºæ¬ä¿¡æ¯æ²¡æå½å
¥,ææ æ³å¯¼åº"); |
| | | } |
| | | //è¯ä»¶ |
| | | List<Annex> annexList = annexMapper.selectList(Wrappers.<Annex>lambdaQuery().eq(Annex::getUserId, user.getId())); |
| | | //å·¥ä½ç»å |
| | | List<PersonTrackRecord> personTrackRecordList = personTrackRecordMapper.selectList(Wrappers.<PersonTrackRecord>lambdaQuery().eq(PersonTrackRecord::getUserId, user.getId())); |
| | | |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼è¡æ° |
| | | int hang = 10 + (Math.max(annexList.size() - 1, 0)) + (Math.max(personTrackRecordList.size()-1 , 0)); |
| | | for (int i = 0; i < hang; i++) { |
| | | RowRenderData rowRenderData = new RowRenderData(); |
| | | RowStyle rowStyle = new RowStyle(); |
| | | rowStyle.setHeight(40); |
| | | rowRenderData.setRowStyle(rowStyle); |
| | | List<CellRenderData> cells = new ArrayList<>(); |
| | | //è¡¨æ ¼åæ° |
| | | for (int j = 0; j < 6; j++) { |
| | | CellRenderData cellRenderData = new CellRenderData(); |
| | | CellStyle cellStyle = new CellStyle(); |
| | | cellStyle.setVertAlign(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | cellRenderData.setCellStyle(cellStyle); |
| | | List<ParagraphRenderData> paragraphRenderDataList = new ArrayList<>(); |
| | | ParagraphRenderData paragraphRenderData = new ParagraphRenderData(); |
| | | ParagraphStyle paragraphStyle = new ParagraphStyle(); |
| | | paragraphStyle.setAlign(ParagraphAlignment.CENTER); |
| | | paragraphRenderData.setParagraphStyle(paragraphStyle); |
| | | List<RenderData> renderData = new ArrayList<>(); |
| | | TextRenderData textRenderData = new TextRenderData(); |
| | | Style style = new Style(); |
| | | style.setFontFamily("å®ä½"); |
| | | style.setColor("000000"); |
| | | textRenderData.setStyle(style); |
| | | if (i==0) { |
| | | //第ä¸è¡ |
| | | if (j==0) { |
| | | //第ä¸å |
| | | textRenderData.setText("å§å@Name"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==1) { |
| | | //第äºå |
| | | textRenderData.setText(user.getName()); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==2 || j==3) { |
| | | textRenderData.setText("æ§å«@Gender â1"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | textRenderData.setText((ObjectUtils.isNotEmpty(personBasicInfo.getSex())?personBasicInfo.getSex():" ")+"â2"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i==1) { |
| | | //第äºè¡ |
| | | if (j==0) { |
| | | //第ä¸å |
| | | textRenderData.setText("å¹´é¾@Age"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==1) { |
| | | //第äºå |
| | | textRenderData.setText(ObjectUtils.isNotEmpty(user.getAge())?user.getAge()+"":" "); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==2 || j==3) { |
| | | textRenderData.setText("工使¶é´@Working time â3"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | textRenderData.setText((ObjectUtils.isNotEmpty(personBasicInfo.getEntryTime())?personBasicInfo.getEntryTime():" ")+"â4"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i==2) { |
| | | //第ä¸è¡ |
| | | if (j==0) { |
| | | //第ä¸å |
| | | textRenderData.setText("æå¦ä¸ä¸@Majors studied"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==1) { |
| | | //第äºå |
| | | textRenderData.setText(ObjectUtils.isNotEmpty(personBasicInfo.getMajor1())?personBasicInfo.getMajor1():" "); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==2 || j==3) { |
| | | textRenderData.setText("æåç¨åº¦@Education â5"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | textRenderData.setText((ObjectUtils.isNotEmpty(personBasicInfo.getOfficialAcademicRedentials())?personBasicInfo.getOfficialAcademicRedentials():" ")+"â6"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i==3) { |
| | | //第åè¡ |
| | | if (j==0) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ¯ä¸æ¶é´@Graducation time"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==1) { |
| | | //第äºå |
| | | textRenderData.setText(ObjectUtils.isNotEmpty(personBasicInfo.getGraduationTime1())?personBasicInfo.getGraduationTime1()+"":" "); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==2 || j==3) { |
| | | textRenderData.setText("æ¯ä¸å¦æ ¡@Graduation school â7"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | textRenderData.setText((ObjectUtils.isNotEmpty(personBasicInfo.getGraduatedInstitutions1())?personBasicInfo.getGraduatedInstitutions1():" ")+"â8"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i==4){ |
| | | //第äºè¡ |
| | | if (j==0){ |
| | | //第ä¸å |
| | | textRenderData.setText("å²ä½@Position"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | textRenderData.setText((ObjectUtils.isNotEmpty(personBasicInfo.getPost())?personBasicInfo.getPost()+"":" " )+"â9"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i==5){ |
| | | //第å
è¡ |
| | | textRenderData.setText("å¦åãæ£æµä¸ä¸èµæ ¼ãèç§°è¯ä¹¦ç»è®°è¡¨@Education, testing professional qualifications, professional title certificate registration form â10"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (i==6){ |
| | | if (j==0){ |
| | | textRenderData.setText("è¯ä»¶å·@ID number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==1){ |
| | | textRenderData.setText("åè¯åä½@Issuing unit"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==2){ |
| | | textRenderData.setText("级å«@Level"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==3){ |
| | | textRenderData.setText("æææ@Expiration date"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==4){ |
| | | textRenderData.setText("å¤å°ä»¶@Copy"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | textRenderData.setText("åä»¶@Original"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i==hang-1){ |
| | | //æåä¸è¡ |
| | | if (j==0){ |
| | | textRenderData.setText("夿³¨@Remark"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | textRenderData.setText((ObjectUtils.isNotEmpty(personBasicInfo.getRemarks())?personBasicInfo.getRemarks()+"":" " )+"â11"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else { |
| | | if (annexList.size() == 0) { |
| | | if (i == 7) { |
| | | textRenderData.setText(" "); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } else { |
| | | if (i >= 7 && i < 8 + (Math.max(annexList.size() - 1, 0))) { |
| | | if (j == 0) { |
| | | textRenderData.setText(ObjectUtils.isNotEmpty(annexList.get(i - 7).getIdNumber()) ? annexList.get(i - 7).getIdNumber() : " "); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | textRenderData.setText(ObjectUtils.isNotEmpty(annexList.get(i - 7).getIssueUnit()) ? annexList.get(i - 7).getIssueUnit() : " "); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | textRenderData.setText(ObjectUtils.isNotEmpty(annexList.get(i - 7).getLevel()) ? annexList.get(i - 7).getLevel() : " "); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | textRenderData.setText(ObjectUtils.isNotEmpty(annexList.get(i - 7).getPeriodValidity()) ? annexList.get(i - 7).getPeriodValidity() : " "); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | textRenderData.setText(ObjectUtils.isNotEmpty(annexList.get(i - 7).getCopy()) ? annexList.get(i - 7).getCopy() : " "); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | textRenderData.setText(ObjectUtils.isNotEmpty(annexList.get(i - 7).getOriginal()) ? annexList.get(i - 7).getOriginal() : " "); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | if (personTrackRecordList.size() == 0) { |
| | | if (i == 8 + (Math.max(annexList.size() - 1, 0))) { |
| | | if (j == 0) { |
| | | textRenderData.setText("主è¦å·¥ä½ç»å@Main work experience"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | textRenderData.setText(" â" + i + "5"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } else { |
| | | if (i >= 8 + (Math.max(annexList.size() - 1, 0)) && i < hang - 1) { |
| | | if (j == 0) { |
| | | textRenderData.setText("主è¦å·¥ä½ç»å@Main work experience â2"+j); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | String startTime = personTrackRecordList.get(i - (8 + (Math.max(annexList.size() - 1, 0)))).getStartTime().format(formatter); |
| | | String endTime="/"; |
| | | try{ |
| | | endTime = personTrackRecordList.get(i - (8 + (Math.max(annexList.size() - 1, 0)))).getEndTime().format(formatter); |
| | | }catch (Exception e){ |
| | | } |
| | | String placeWork = personTrackRecordList.get(i - (8 + (Math.max(annexList.size() - 1, 0)))).getPlaceWork(); |
| | | String department = personTrackRecordList.get(i - (8 + (Math.max(annexList.size() - 1, 0)))).getDepartment(); |
| | | String post = personTrackRecordList.get(i - (8 + (Math.max(annexList.size() - 1, 0)))).getPost(); |
| | | textRenderData.setText(startTime+"ï¼"+endTime+"ï¼"+placeWork+"ï¼"+department+"ï¼"+post+"â" + i + "5"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | rowRenderData.setCells(cells); |
| | | if (rowRenderData.getCells().size() != 0) { |
| | | rows.add(rowRenderData); |
| | | } |
| | | } |
| | | TableRenderData tableRenderData = new TableRenderData(); |
| | | tableRenderData.setRows(rows); |
| | | int countSize = tableRenderData.getRows().get(0).getCells().size(); |
| | | for (RowRenderData row : tableRenderData.getRows()) { |
| | | if (row.getCells().size() != countSize) { |
| | | throw new ErrorException("æ¯è¡åå
æ ¼ä¸ç¸ç"); |
| | | } |
| | | } |
| | | TableStyle tableStyle = new TableStyle(); |
| | | tableStyle.setWidth(XWPFTable.DEFAULT_PERCENTAGE_WIDTH); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |
| | | borderStyle.setColor("000000"); |
| | | borderStyle.setType(XWPFTable.XWPFBorderType.THICK); |
| | | borderStyle.setSize(14); |
| | | tableStyle.setLeftBorder(borderStyle); |
| | | tableStyle.setTopBorder(borderStyle); |
| | | tableStyle.setRightBorder(borderStyle); |
| | | tableStyle.setBottomBorder(borderStyle); |
| | | tableRenderData.setTableStyle(tableStyle); |
| | | |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/person-deal.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("createTime", user.getCreateTime().format(formatter)); |
| | | put("person", tableRenderData); |
| | | }}); |
| | | String name = UUID.randomUUID()+ user.getName()+ "_äººåæ¡£æ¡å¡" + ".docx"; |
| | | try { |
| | | template.writeAndClose(Files.newOutputStream(Paths.get(wordUrl + "/" + name))); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | String path = wordUrl + "/" + name; |
| | | // å¤çåå¹¶åå
æ ¼çé®é¢ |
| | | try { |
| | | ZipSecureFile.setMinInflateRatio(0.0001); |
| | | FileInputStream stream = new FileInputStream(path); |
| | | XWPFDocument document = new XWPFDocument(stream); |
| | | List<XWPFTable> xwpfTables = document.getTables(); |
| | | for (int i = 0; i < xwpfTables.size(); i++) { |
| | | Set<String> set1 = new HashSet<>(); |
| | | Map<String, Map<String, Integer>> maps = new HashMap<>(); |
| | | for (int j = 0; j < xwpfTables.get(i).getRows().size(); j++) { |
| | | for (int k = 0; k < xwpfTables.get(i).getRows().get(j).getTableCells().size(); k++) { |
| | | if (xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getText().indexOf("â") > -1) { |
| | | String[] split = xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getText().split("â"); |
| | | if (set1.add(split[1])) { |
| | | Map<String, Integer> map = new HashMap<>(); |
| | | map.put("sr", j); |
| | | map.put("sc", k); |
| | | map.put("er", j + 0); |
| | | map.put("ec", k + 0); |
| | | maps.put(split[1], map); |
| | | } else { |
| | | Map<String, Integer> map1 = maps.get(split[1]); |
| | | if (j == map1.get("sr")) { |
| | | map1.put("ec", map1.get("ec") + 1); |
| | | } else if (k == map1.get("sc")) { |
| | | map1.put("er", map1.get("er") + 1); |
| | | } |
| | | } |
| | | String str = xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getText().split("â")[0]; |
| | | xwpfTables.get(i).getRows().get(j).getTableCells().get(k).removeParagraph(0); |
| | | xwpfTables.get(i).getRows().get(j).getTableCells().get(k).setText(str); |
| | | xwpfTables.get(i).getRows().get(j).getTableCells().get(k).setVerticalAlignment(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getParagraphArray(0).setAlignment(ParagraphAlignment.CENTER); |
| | | } |
| | | } |
| | | } |
| | | // åå
æ ¼æåº, é¿å
æ ¼å¼éä¹± |
| | | List<Map.Entry<String, Map<String, Integer>>> entries = new ArrayList<>(maps.entrySet()); |
| | | entries.sort((o1, o2) -> o1.getValue().get("sc") - o2.getValue().get("sc")); |
| | | // æç
§é¡ºåºæ·»å è¿éå |
| | | List<String> list = new ArrayList<>(); |
| | | for (Map.Entry<String, Map<String, Integer>> entry : entries) { |
| | | list.add(entry.getKey()); |
| | | } |
| | | for (int a = list.size() - 1; a >= 0; a--) { |
| | | Map<String, Integer> v = maps.get(list.get(a)); |
| | | for (int j = 0; j < v.get("er") - v.get("sr") + 1; j++) { |
| | | if (v.get("ec") > v.get("sc")) { |
| | | try { |
| | | mergeCellsHorizontally(xwpfTables.get(i), v.get("sr") + j, v.get("sc"), v.get("ec")); |
| | | // TableTools.mergeCellsHorizonal(xwpfTables.get(i), v.get("sr") + j, v.get("sc"), v.get("ec")); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | } |
| | | if (v.get("er") > v.get("sr")) { |
| | | try { |
| | | mergeCellsVertically(xwpfTables.get(i), v.get("sc"), v.get("sr"), v.get("er")); |
| | | // TableTools.mergeCellsVertically(xwpfTables.get(i), v.get("sc"), v.get("sr"), v.get("er")); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | } |
| | | } |
| | | FileOutputStream fileOutputStream = new FileOutputStream(path); |
| | | document.write(fileOutputStream); |
| | | fileOutputStream.close(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new RuntimeException(e); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | //å¤çä¸è±ææ¢è¡çé®é¢ |
| | | try { |
| | | FileInputStream stream1 = new FileInputStream(path); |
| | | XWPFDocument document1 = new XWPFDocument(stream1); |
| | | List<XWPFTable> xwpfTables1 = document1.getTables(); |
| | | for (int i = 0; i < xwpfTables1.size(); i++) { |
| | | for (int j = 0; j < xwpfTables1.get(i).getRows().size(); j++) { |
| | | for (int k = 0; k < xwpfTables1.get(i).getRows().get(j).getTableCells().size(); k++) { |
| | | if (xwpfTables1.get(i).getRows().get(j).getTableCells().get(k).getText().contains("@")) { |
| | | String text = xwpfTables1.get(i).getRows().get(j).getTableCells().get(k).getText(); |
| | | String[] split = text.split("@"); |
| | | xwpfTables1.get(i).getRows().get(j).getTableCells().get(k).removeParagraph(0); |
| | | XWPFParagraph xwpfParagraph = xwpfTables1.get(i).getRows().get(j).getTableCells().get(k).addParagraph(); |
| | | XWPFRun run = xwpfParagraph.createRun(); |
| | | run.setText(split[0]); |
| | | if (ObjectUtils.isNotNull(split[1])) { |
| | | run.addBreak(); |
| | | run.setText(split[1]); |
| | | } |
| | | xwpfParagraph.setAlignment(ParagraphAlignment.CENTER); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | FileOutputStream fileOutputStream1 = new FileOutputStream(path); |
| | | document1.write(fileOutputStream1); |
| | | fileOutputStream1.close(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new RuntimeException(e); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return name; |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡åéä»¶ä¸ä¼ |
| | | * @param file |
| | | * @param suffix |
| | | * @param id |
| | | */ |
| | | |
| | | @Override |
| | | public void saveDeviceCalibrationFile(MultipartFile file, String suffix, Integer id) { |
| | | String name = file.getOriginalFilename(); |
| | | UUID uuid = UUID.randomUUID(); |
| | | String fileName = uuid + name; |
| | | String path = ""; |
| | | // æ ¹æ®åç¼å¤æå±äºä»ä¹ç±»å |
| | | if(suffix.toLowerCase().contains("xls")) { |
| | | path = excelUrl; |
| | | } else if (suffix.toLowerCase().contains("doc") || suffix.toLowerCase().contains("pdf")) { |
| | | path = wordUrl; |
| | | } else { |
| | | path = imgUrl; |
| | | } |
| | | File file1 = new File(path); |
| | | if(!file1.exists()) { |
| | | file1.mkdir(); |
| | | } |
| | | try { |
| | | File file2 = new File(file1, fileName); |
| | | file.transferTo(file2); |
| | | // ä¿åæ°æ®åº |
| | | PersonTrainingFile personTrainingFile = new PersonTrainingFile(); |
| | | personTrainingFile.setDetailId(id); |
| | | personTrainingFile.setFileUrl("/" + fileName); |
| | | personTrainingFile.setFileName(file.getOriginalFilename()); |
| | | personTrainingFile.setCreateUser(SecurityUtils.getUserId().intValue()); |
| | | personTrainingFile.setCreateTime(LocalDateTime.now()); |
| | | personTrainingFile.setEnumAttachmentType(com.ruoyi.personnel.enumeration.AttachmentType.getTypeValue(1)); |
| | | fileMapper.insert(personTrainingFile); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥çè®¾å¤æ ¡åéä»¶ |
| | | * @param id |
| | | * @return |
| | | */ |
| | | |
| | | |
| | | @Override |
| | | public List<PersonTrainingFile> getDeviceCalibrationFile(Integer id) { |
| | | List<PersonTrainingFile> personTrainingFiles = fileMapper.selectList(new LambdaQueryWrapper<PersonTrainingFile>() |
| | | .eq(PersonTrainingFile::getDetailId, id) |
| | | .eq(PersonTrainingFile::getEnumAttachmentType, com.ruoyi.personnel.enumeration.AttachmentType.getTypeValue(1))); |
| | | if(CollectionUtils.isNotEmpty(personTrainingFiles)) { |
| | | for(PersonTrainingFile a : personTrainingFiles) { |
| | | // 设置mime |
| | | int i = a.getFileUrl().lastIndexOf("."); |
| | | String contentType = getContentType(a.getFileUrl().substring(i + 1)); |
| | | a.setMime(contentType); |
| | | } |
| | | } |
| | | return personTrainingFiles; |
| | | } |
| | | |
| | | @Override |
| | | public void delDeviceCalibrationFile(Integer id) { |
| | | fileMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void downLoadDeviceCalibrationFile(Integer id, HttpServletResponse response) { |
| | | PersonTrainingFile personTrainingFile = fileMapper.selectById(id); |
| | | String fileName = personTrainingFile.getFileName(); |
| | | int i = fileName.lastIndexOf("."); |
| | | String suffix = fileName.substring(i); |
| | | String path = ""; |
| | | // æ ¹æ®åç¼è·åç¸åºçè·¯å¾ |
| | | if(suffix.toLowerCase().contains("xls")) { |
| | | path = excelUrl; |
| | | } else if (suffix.toLowerCase().contains("doc") || suffix.toLowerCase().contains("pdf")) { |
| | | path = wordUrl; |
| | | } else { |
| | | path = imgUrl; |
| | | } |
| | | path = path + personTrainingFile.getFileUrl(); |
| | | File file = new File(path); |
| | | try(FileInputStream fileInputStream = new FileInputStream(file); |
| | | ServletOutputStream outputStream = response.getOutputStream()) { |
| | | String contentType = getContentType(suffix); |
| | | // 设置ååºå¤´ |
| | | response.setContentType(contentType); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + suffix); |
| | | byte[] bytes = new byte[1024]; |
| | | int len; |
| | | while ((len = fileInputStream.read(bytes)) != -1) { |
| | | outputStream.write(bytes,0,len); |
| | | outputStream.flush(); |
| | | } |
| | | }catch (Exception e) { |
| | | throw new ErrorException("ä¸è½½å¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void getEmployees(Integer departId) { |
| | | List<Map> employees = headerToken.getEmployees(); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getStatus, 0) |
| | | .like(User::getDepartLimsId,String.valueOf(departId))); |
| | | if(CollectionUtils.isNotEmpty(users)) { |
| | | for (User user : users) { |
| | | if(CollectionUtils.isNotEmpty(employees)) { |
| | | for (Map map : employees) { |
| | | if(map.get("employeeID").toString().equals(user.getAccount())) { |
| | | employeeAddOrUpdate(map,user.getId()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void getEmployee(Integer userId) { |
| | | User user = userMapper.selectById(userId); |
| | | Map employee = headerToken.getEmployee(user.getAccount()); |
| | | if(Objects.nonNull(user)) { |
| | | employeeAddOrUpdate(employee,user.getId()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public void employeeAddOrUpdate(Map map,Integer userId) { |
| | | PersonBasicInfo personBasicInfo = baseMapper.selectOne(new LambdaQueryWrapper<PersonBasicInfo>() |
| | | .eq(PersonBasicInfo::getUserId, userId)); |
| | | if(Objects.isNull(personBasicInfo)) { |
| | | personBasicInfo = new PersonBasicInfo(); |
| | | } |
| | | // å°ä¸ºnullç弿¹ä¸º"" |
| | | map = updateMap(map); |
| | | |
| | | // 人äºç³»ç»æªå
å«å段 |
| | | // personBasicInfo.setEmergencyContactPhone(null); // ç´§æ¥è系人çµè¯ |
| | | // personBasicInfo.setLastUpdateTime(null); // æåæ´æ°æ¶é´ |
| | | // personBasicInfo.setCurrentState(""); // å½åç¶æ |
| | | // personBasicInfo.setCurrentPosition(""); // å½åèå¡ |
| | | // personBasicInfo.setProfessionalTitle(""); //èç§° |
| | | // personBasicInfo.setPersonnelClassification(""); //人ååç±» |
| | | // personBasicInfo.setOfficialAcademicRedentials(""); // æé«å¦å |
| | | // personBasicInfo.setGraduationTime1(null); // æ¯ä¸æ¶é´ |
| | | // personBasicInfo.setGraduationTime2(null); // æ¯ä¸æ¶é´2 |
| | | // personBasicInfo.setGraduatedInstitutions2(""); // æ¯ä¸é¢æ ¡2 |
| | | // personBasicInfo.setMajor1(""); // ä¸ä¸1 |
| | | // personBasicInfo.setMajor2(""); // ä¸ä¸2 |
| | | // personBasicInfo.setEndPlannedInternship(null); // 计åå®ä¹ ç»æ |
| | | // personBasicInfo.setDesktopPicture(""); // æ¡é¢å¾ç |
| | | // personBasicInfo.setAttachmentInformation(""); // éä»¶èµæ |
| | | // personBasicInfo.setRemarks(""); // 夿³¨ |
| | | // personBasicInfo.setPostType(""); // å²ä½ç±»å« |
| | | // personBasicInfo.setCurrentAddress(""); // ç°å±
ä½å°å |
| | | // personBasicInfo.setCurrentDetailAddress(""); // ç°å±
ä½è¯¦ç»å°å |
| | | // personBasicInfo.setServiceAddress(""); // éè¾¾å°å |
| | | // personBasicInfo.setServiceDetailAddress(""); // é达详ç»å°å |
| | | // personBasicInfo.setNcre(""); // è®¡ç®æºç级 |
| | | // personBasicInfo.setHighestDegree(""); // æé«å¦ä½ |
| | | // personBasicInfo.setFullTime(null); // æ¯å¦å±äºå
¨æ¥å¶ |
| | | // personBasicInfo.setEnroll(null); // æ¯å¦å±äºä¸å¤© |
| | | // è¿è¡ä¸ä¸ªèµå¼ |
| | | personBasicInfo.setUserId(userId); // ç¨æ·id |
| | | if(StringUtils.isNotEmpty(map.get("dateOfJoiningTheCompany").toString())) { |
| | | LocalDate parse = LocalDate.parse(map.get("dateOfJoiningTheCompany").toString()); |
| | | personBasicInfo.setEntryTime(parse); // å
¥èæ¶é´ |
| | | } |
| | | if(StringUtils.isNotEmpty(map.get("dateOfBirth").toString())) { |
| | | LocalDate parse1 = LocalDate.parse(map.get("dateOfBirth").toString()); |
| | | personBasicInfo.setDateBirth(parse1); //åºçæ¥æ |
| | | } |
| | | if(StringUtils.isNotEmpty(map.get("dateOfConversionToFullTime").toString())) { |
| | | personBasicInfo.setEndPracticalPractice(LocalDate.parse(map.get("dateOfConversionToFullTime").toString())); // å®é
å®ä¹ ç»æ (è½¬æ£æ¥æ) |
| | | } |
| | | if(StringUtils.isNotEmpty(map.get("dateOfResignation").toString())) { |
| | | personBasicInfo.setDateDeparture(LocalDate.parse(map.get("dateOfResignation").toString())); // ç¦»èæ¥æ |
| | | |
| | | } |
| | | if(StringUtils.isNotEmpty(map.get("dateOfJoiningTheGroup").toString())) { |
| | | personBasicInfo.setGroupTime(LocalDate.parse(map.get("dateOfJoiningTheGroup").toString())); // å
¥é墿¶é´ |
| | | } |
| | | |
| | | if(StringUtils.isNotEmpty(map.get("dateOfJoiningTheCompany").toString())) { |
| | | personBasicInfo.setTrialStartTime(LocalDate.parse(map.get("dateOfJoiningTheCompany").toString())); // è¯ç¨å¼å§æ¶é´ å
¥èæ¶é´ |
| | | } |
| | | if(StringUtils.isNotEmpty(map.get("dateOfConversionToFullTime").toString())) { |
| | | personBasicInfo.setTrialEndTime(LocalDate.parse(map.get("dateOfConversionToFullTime").toString())); // è¯ç¨ç»ææ¶é´ è½¬æ£æ¶é´ |
| | | } |
| | | if(StringUtils.isNotEmpty(map.get("idValidityPeriod").toString())) { |
| | | personBasicInfo.setValidityPeriod(LocalDate.parse(map.get("idValidityPeriod").toString())); // è¯ä»¶æææ |
| | | } |
| | | if(StringUtils.isNotEmpty(map.get("dateOfJoiningTheCommunistPartyOrCommunistYouthLeague").toString())) { |
| | | personBasicInfo.setDumplingTime(LocalDate.parse(map.get("dateOfJoiningTheCommunistPartyOrCommunistYouthLeague").toString())); // å
¥å
/墿¶é´ |
| | | } |
| | | if(StringUtils.isNotEmpty(map.get("dateOfJoiningTheCompany").toString())) { |
| | | personBasicInfo.setUnitTime(LocalDate.parse(map.get("dateOfJoiningTheCompany").toString())); // å
¥å使¶é´ |
| | | } |
| | | |
| | | personBasicInfo.setDepartmentCode(map.get("departmentCode").toString()); // é¨é¨ç¼å· |
| | | personBasicInfo.setPost(map.get("position").toString()); // å²ä½ |
| | | personBasicInfo.setSex(map.get("gender").toString()); //æ§å« |
| | | personBasicInfo.setIdentityCard(map.get("idNumber").toString()); // 身份è¯å·ç |
| | | personBasicInfo.setNation(map.get("nation").toString()); // æ°æ |
| | | personBasicInfo.setPoliticalStatus(map.get("politicalAffiliation").toString()); // æ¿æ²»é¢è² |
| | | personBasicInfo.setGraduatedInstitutions1(""); // æ¯ä¸é¢æ ¡1 |
| | | personBasicInfo.setTelephone(map.get("phoneNumber").toString()); // ææºå·ç |
| | | |
| | | personBasicInfo.setJobNumber(map.get("employeeID").toString()); // å·¥å· äººåç¼å· |
| | | personBasicInfo.setSubordinateNumber(map.get("employeeSubID").toString()); // åå·¥åç¼å· |
| | | personBasicInfo.setCorporateName(map.get("companyId").toString()); // å
¬å¸åç§° æå±ç»ç»ç¼ç |
| | | personBasicInfo.setPostCode(map.get("positionCode").toString()); // å²ä½ç¼å· |
| | | personBasicInfo.setPostName(map.get("position").toString()); // å²ä½åç§° |
| | | personBasicInfo.setReportingTo(map.get("directSupervisorID").toString()); // ç´æ¥ä¸çº§ |
| | | personBasicInfo.setLaborRelations(map.get("employmentStatus").toString()); // å³å¨å
³ç³» |
| | | |
| | | personBasicInfo.setNativePlace(map.get("hometown").toString()); // ç±è´¯ |
| | | personBasicInfo.setIdType(map.get("idType").toString()); // è¯ä»¶ç±»å |
| | | personBasicInfo.setMaritalStatus(map.get("maritalStatus").toString()); // å©å§»ç¶åµ |
| | | personBasicInfo.setIdAddress(map.get("idAddress").toString()); // è¯ä»¶å°å |
| | | personBasicInfo.setIdDetailAddress(map.get("detailedResidentialAddress").toString()); // 身份è¯è¯¦ç»å°å |
| | | personBasicInfo.setRetiredSoldiers(map.get("militaryServiceStatus").toString()); // æ¯å¦æ¯éä¼å人 |
| | | personBasicInfo.setCornet(map.get("shortPhoneNumber").toString()); // çå· |
| | | personBasicInfo.setOfficePhone(map.get("officePhone").toString()); // åå
¬çµè¯ |
| | | |
| | | |
| | | personBasicInfo.setCollegeStudents(map.get("yearOfGraduation").toString()); // xxxå±å¤§å¦ç |
| | | personBasicInfo.setEmergencyContact(map.get("emergencyContactName").toString()); // ç´§æ¥è系人 |
| | | personBasicInfo.setCompanyEmail(map.get("companyEmail").toString()); // å
¬å¸é®ç®± |
| | | |
| | | if(Objects.nonNull(personBasicInfo.getDateBirth())) { |
| | | Period period = Period.between(personBasicInfo.getDateBirth(), LocalDate.now()); |
| | | int years = period.getYears(); |
| | | personBasicInfo.setPersonBasicInfoAge(years); |
| | | } |
| | | |
| | | |
| | | if(Objects.isNull(personBasicInfo.getId()) ) { |
| | | log.info("æ°å¢"); |
| | | baseMapper.insert(personBasicInfo); |
| | | }else { |
| | | log.info("æ´æ°"); |
| | | baseMapper.updateById(personBasicInfo); |
| | | } |
| | | |
| | | } |
| | | |
| | | public Map updateMap(Map<String,Object> map) { |
| | | Iterator<Map.Entry<String, Object>> iterator = map.entrySet().iterator(); |
| | | while (iterator.hasNext()){ |
| | | Map.Entry<String, Object> entry = iterator.next(); |
| | | if(Objects.isNull(entry.getValue()) || entry.getValue().equals("null")) { |
| | | entry.setValue(""); |
| | | } |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * é彿¥è¯¢åèç¹ |
| | | * @param root æ ¹èç¹ |
| | | * @param all ææèç¹ |
| | | * @return æ ¹èç¹ä¿¡æ¯ |
| | | */ |
| | | private List<DepartmentDto> getChildren(DepartmentDto root, List<DepartmentDto> all) { |
| | | if (ObjectUtils.isNotEmpty(root.getId())) { |
| | | return all.stream().filter(m -> Objects.equals(m.getFatherId(), root.getId())).peek( |
| | | (m) -> m.setChildren(getChildren(m, all)) |
| | | ).collect(Collectors.toList()); |
| | | } else { |
| | | return Collections.emptyList(); |
| | | } |
| | | } |
| | | |
| | | // æ°´å¹³åå¹¶åå
æ ¼ |
| | | private static void mergeCellsHorizontally(XWPFTable table, int row, int fromCol, int toCol) { |
| | | for (int i = fromCol; i <= toCol; i++) { |
| | | if (i == fromCol) { |
| | | table.getRow(row).getCell(i).getCTTc().addNewTcPr().addNewHMerge().setVal(STMerge.RESTART); |
| | | } else { |
| | | table.getRow(row).getCell(i).getCTTc().addNewTcPr().addNewHMerge().setVal(STMerge.CONTINUE); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // åç´åå¹¶åå
æ ¼ |
| | | private static void mergeCellsVertically(XWPFTable table, int col, int fromRow, int toRow) { |
| | | for (int i = fromRow; i <= toRow; i++) { |
| | | if (i == fromRow) { |
| | | table.getRow(i).getCell(col).getCTTc().addNewTcPr().addNewVMerge().setVal(STMerge.RESTART); |
| | | } else { |
| | | table.getRow(i).getCell(col).getCTTc().addNewTcPr().addNewVMerge().setVal(STMerge.CONTINUE); |
| | | } |
| | | } |
| | | } |
| | | // æ ¹æ®æä»¶æ©å±åè·å MIME ç±»å |
| | | private String getContentType(String fileExtension) { |
| | | switch (fileExtension) { |
| | | case "jpg": |
| | | case "jpeg": |
| | | return "image/jpeg"; |
| | | case "png": |
| | | return "image/png"; |
| | | case "gif": |
| | | return "image/gif"; |
| | | case "pdf": |
| | | return "application/pdf"; |
| | | case "doc": |
| | | return "application/msword"; |
| | | case "docx": |
| | | return "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; |
| | | case "xls": |
| | | return "application/vnd.ms-excel"; |
| | | case "xlsx": |
| | | return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; |
| | | case "ppt": |
| | | case "pptx": |
| | | return "application/vnd.ms-powerpoint"; |
| | | default: |
| | | return "application/octet-stream"; // é»è®¤äºè¿å¶æµ |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.personnel.dto.PersonCommunicationAbilityDto; |
| | | import com.ruoyi.personnel.mapper.PersonCommunicationAbilityMapper; |
| | | import com.ruoyi.personnel.pojo.PersonCommunicationAbility; |
| | | import com.ruoyi.personnel.service.PersonCommunicationAbilityService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ²éè½å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 12:00:57 |
| | | */ |
| | | @Service |
| | | public class PersonCommunicationAbilityServiceImpl extends ServiceImpl<PersonCommunicationAbilityMapper, PersonCommunicationAbility> implements PersonCommunicationAbilityService { |
| | | |
| | | @Resource |
| | | UserMapper userMapper; |
| | | |
| | | @Override |
| | | public IPage<PersonCommunicationAbilityDto> personPersonCommunicationAbilityPage(Page page, Integer departLimsId, Integer userId, String userName) { |
| | | IPage<PersonCommunicationAbilityDto> personCommunicationAbilityDtoIPage = baseMapper.personPersonCommunicationAbilityPage(page, departLimsId, userId, userName); |
| | | List<PersonCommunicationAbilityDto> collect = personCommunicationAbilityDtoIPage.getRecords().stream().map(personCommunicationAbilityDto -> { |
| | | if (ObjectUtils.isNotEmpty(personCommunicationAbilityDto.getUserId())) { |
| | | List<String> account = new ArrayList<>(); |
| | | List<String> name = new ArrayList<>(); |
| | | for (String s : personCommunicationAbilityDto.getUserId().split(",")) { |
| | | User user = userMapper.selectById(Integer.parseInt(s)); |
| | | account.add(user.getAccount()); |
| | | name.add(user.getName()); |
| | | } |
| | | personCommunicationAbilityDto.setAccount(account.stream().collect(Collectors.joining(","))); |
| | | personCommunicationAbilityDto.setUserName(name.stream().collect(Collectors.joining(","))); |
| | | } |
| | | return personCommunicationAbilityDto; // è¿éå¯ä»¥å¯¹è¿åçæ°æ®è¿è¡å¤çï¼å¦æ·»å ä¸äºæ°ç屿§æè½¬æ¢çã |
| | | }).collect(Collectors.toList()); |
| | | personCommunicationAbilityDtoIPage.setRecords(collect); |
| | | return personCommunicationAbilityDtoIPage; |
| | | } |
| | | |
| | | @Override |
| | | public void exportPersonCommunicationAbility(Integer id, HttpServletResponse response) throws Exception { |
| | | PersonCommunicationAbility personCommunicationAbility = baseMapper.selectById(id); |
| | | //æ²é人 |
| | | String collect = " "; |
| | | if (ObjectUtils.isNotEmpty(personCommunicationAbility.getUserId())) { |
| | | List<String> name = new ArrayList<>(); |
| | | for (String s : personCommunicationAbility.getUserId().split(",")) { |
| | | User user = userMapper.selectById(Integer.parseInt(s)); |
| | | name.add(user.getName()); |
| | | } |
| | | collect = name.stream().collect(Collectors.joining(",")); |
| | | } |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"); |
| | | |
| | | //æ¶é´ |
| | | String communicationTime = ""; |
| | | if (ObjectUtils.isNotEmpty(personCommunicationAbility.getCommunicationTime())) { |
| | | communicationTime = personCommunicationAbility.getCommunicationTime().format(formatter); |
| | | } |
| | | |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/communication-deal.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | String finalCollect = collect; |
| | | String finalCommunicationTime = communicationTime; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("userName", finalCollect); |
| | | put("communicationTime", finalCommunicationTime); |
| | | put("communicationPlace", personCommunicationAbility.getCommunicationPlace()); |
| | | put("communicationContent", personCommunicationAbility.getCommunicationContent()); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "æ²éè®°å½", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.personnel.dto.PersonJobResponsibilitiesDto; |
| | | import com.ruoyi.personnel.mapper.PersonJobResponsibilitiesMapper; |
| | | import com.ruoyi.personnel.pojo.PersonJobResponsibilities; |
| | | import com.ruoyi.personnel.service.PersonJobResponsibilitiesService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * å²ä½èè´£ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 02:07:49 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class PersonJobResponsibilitiesServiceImpl extends ServiceImpl<PersonJobResponsibilitiesMapper, PersonJobResponsibilities> implements PersonJobResponsibilitiesService { |
| | | |
| | | @Resource |
| | | UserMapper userMapper; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public IPage<PersonJobResponsibilitiesDto> personJobResponsibilitiesSelect(Page page, String userId, String departmentId, String userName) { |
| | | return baseMapper.personJobResponsibilitiesSelect(page, userId, departmentId, userName); |
| | | } |
| | | |
| | | @Override |
| | | public void exportPersonJobResponsibilities(Integer id, HttpServletResponse response) { |
| | | PersonJobResponsibilities personJobResponsibilities = baseMapper.selectById(id); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"); |
| | | //å²ä½åç§° |
| | | String name = personJobResponsibilities.getPostName(); |
| | | //æå±é¨é¨ |
| | | String departLims = userMapper.selectUserDepartmentLimsName(Integer.parseInt(personJobResponsibilities.getIncumbentId())); |
| | | //å·¥ä½ç®æ |
| | | String objective = personJobResponsibilities.getJobObjective(); |
| | | //å²ä½èè´£ |
| | | String responsibilities = personJobResponsibilities.getJobResponsibilities(); |
| | | //ä»»è人 |
| | | User user = userMapper.selectById(Integer.parseInt(personJobResponsibilities.getIncumbentId())); |
| | | String incumbent = user.getName(); |
| | | //ä»»èæ¶é´ |
| | | String incumbentDate = ""; |
| | | if (ObjectUtils.isNotEmpty(personJobResponsibilities.getIncumbentDate())) { |
| | | incumbentDate = personJobResponsibilities.getIncumbentDate().format(formatter); |
| | | } |
| | | //主管 |
| | | String supervisor = ""; |
| | | if (ObjectUtils.isNotEmpty(personJobResponsibilities.getSupervisorId())) { |
| | | supervisor = userMapper.selectById(personJobResponsibilities.getSupervisorId()).getName(); |
| | | } |
| | | //主管æ¶é´ |
| | | String supervisorDate = ""; |
| | | if (ObjectUtils.isNotEmpty(personJobResponsibilities.getSupervisorDate())) { |
| | | supervisorDate = personJobResponsibilities.getSupervisorDate().format(formatter); |
| | | } |
| | | |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/explain-deal.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | String finalIncumbentDate = incumbentDate; |
| | | String finalSupervisor = supervisor; |
| | | String finalSupervisorDate = supervisorDate; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("name", name); |
| | | put("account", user.getAccount()); |
| | | put("departLims", departLims); |
| | | put("objective", objective); |
| | | put("responsibilities", responsibilities); |
| | | put("incumbent", incumbent); |
| | | put("incumbentDate", finalIncumbentDate); |
| | | put("supervisor", finalSupervisor); |
| | | put("supervisorDate", finalSupervisorDate); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | name + "çä»»èå²ä½è¯´æä¹¦", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.ruoyi.common.utils.DateImageUtil; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.personnel.dto.PersonPersonnelCapacityDto; |
| | | import com.ruoyi.personnel.dto.PersonPersonnelCapacityExportDto; |
| | | import com.ruoyi.personnel.mapper.PersonPersonnelCapacityMapper; |
| | | import com.ruoyi.personnel.pojo.PersonPersonnelCapacity; |
| | | import com.ruoyi.personnel.service.PersonPersonnelCapacityService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * 人åè½å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 11:26:18 |
| | | */ |
| | | @Service |
| | | public class PersonPersonnelCapacityServiceImpl extends ServiceImpl<PersonPersonnelCapacityMapper, PersonPersonnelCapacity> implements PersonPersonnelCapacityService { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public IPage<PersonPersonnelCapacityDto> personPersonnelCapacityPage(Page page, Integer departLimsId, Integer userId, String userName) { |
| | | return baseMapper.personPersonnelCapacityPage(page, departLimsId, userId, userName); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåè½å |
| | | * @param id |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportPersonnelCapacity(Integer id, HttpServletResponse response) { |
| | | PersonPersonnelCapacityExportDto capacityExportDto = baseMapper.selectExportPersonnelCapacity(id); |
| | | |
| | | // 确认人 |
| | | String confirmUrl = null; |
| | | if (capacityExportDto.getConfirmOperatingPersonnelId() != null) { |
| | | confirmUrl = userMapper.selectById(capacityExportDto.getConfirmOperatingPersonnelId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(confirmUrl)) { |
| | | throw new ErrorException("确认人"); |
| | | } |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/personnel-capacity.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | String finalConfirmUrl = confirmUrl; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("capacity", capacityExportDto); |
| | | put("confirmUrl", StringUtils.isNotBlank(finalConfirmUrl) ? Pictures.ofLocal(imgUrl + "/" + finalConfirmUrl).create() : null); |
| | | put("confirmDateUrl", capacityExportDto.getConfirmDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(capacityExportDto.getConfirmDate())).create() : null); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "人åè½å", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 人åè½å确认 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean confirmPersonnelCapacity(Integer id) { |
| | | // æ¥è¯¢äººåè½å |
| | | PersonPersonnelCapacity personPersonnelCapacity = baseMapper.selectById(id); |
| | | if (personPersonnelCapacity.getConfirmOperatingPersonnelId() != null) { |
| | | throw new ErrorException("该人åè½å已确认è¿, æ ééå¤ç¡®è®¤"); |
| | | } |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | baseMapper.update(null, Wrappers.<PersonPersonnelCapacity>lambdaUpdate() |
| | | .eq(PersonPersonnelCapacity::getId, id) |
| | | .set(PersonPersonnelCapacity::getConfirmOperatingPersonnelId, userId) |
| | | .set(PersonPersonnelCapacity::getConfirmDate, LocalDateTime.now())); |
| | | |
| | | return true; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.FilePictureRenderData; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.personnel.dto.PersonPostAuthorizationRecordDto; |
| | | import com.ruoyi.personnel.mapper.PersonPostAuthorizationRecordMapper; |
| | | import com.ruoyi.personnel.pojo.PersonPostAuthorizationRecord; |
| | | import com.ruoyi.personnel.service.PersonPostAuthorizationRecordService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import net.sourceforge.pinyin4j.PinyinHelper; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; |
| | | import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä»»èææè®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 10:48:17 |
| | | */ |
| | | @Service |
| | | public class PersonPostAuthorizationRecordServiceImpl extends ServiceImpl<PersonPostAuthorizationRecordMapper, PersonPostAuthorizationRecord> implements PersonPostAuthorizationRecordService { |
| | | |
| | | @Resource |
| | | UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public IPage<PersonPostAuthorizationRecordDto> personPostAuthorizationRecordPage(Page page, Integer departLimsId, Integer userId, String userName) { |
| | | return baseMapper.personPostAuthorizationRecordPage(page, departLimsId, userId, userName); |
| | | } |
| | | |
| | | @Override |
| | | public void exportPersonPostAuthorizationRecord(Integer id, HttpServletResponse response) { |
| | | PersonPostAuthorizationRecord personPostAuthorizationRecord = baseMapper.selectById(id); |
| | | //å§å |
| | | User user = userMapper.selectById(personPostAuthorizationRecord.getUserId()); |
| | | String name = user.getName(); |
| | | //å§åè±æ |
| | | HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat(); |
| | | format.setCaseType(HanyuPinyinCaseType.LOWERCASE); |
| | | format.setToneType(HanyuPinyinToneType.WITHOUT_TONE); |
| | | StringBuilder pinyinBuilder = new StringBuilder(); |
| | | for (int i = 0; i < name.length(); i++) { |
| | | char c = name.charAt(i); |
| | | // 夿æ¯å¦æ¯æ±å |
| | | if (Character.toString(c).matches("[\\u4E00-\\u9FFF]")) { |
| | | // è·åæ±åçæ¼é³æ°ç» |
| | | String[] pinyinArray = new String[0]; |
| | | try { |
| | | pinyinArray = PinyinHelper.toHanyuPinyinStringArray(c, format); |
| | | } catch (BadHanyuPinyinOutputFormatCombination badHanyuPinyinOutputFormatCombination) { |
| | | |
| | | } |
| | | if (pinyinArray!= null && pinyinArray.length > 0) { |
| | | pinyinBuilder.append(pinyinArray[0]); |
| | | } |
| | | } else { |
| | | pinyinBuilder.append(c); |
| | | } |
| | | } |
| | | String nameEn = pinyinBuilder.toString(); |
| | | //ç论ç¥è¯èè¯æç»© |
| | | String num1=personPostAuthorizationRecord.getNum1(); |
| | | //æä½æè½èè¯æç»© |
| | | String num2=personPostAuthorizationRecord.getNum2(); |
| | | //è¯ä¹¦ç¼å· |
| | | String code = personPostAuthorizationRecord.getCertificateNumber(); |
| | | //åè¯æ¶é´ |
| | | LocalDateTime createTime = personPostAuthorizationRecord.getCreateTime(); |
| | | String year = createTime.getYear() + ""; |
| | | String mon = createTime.getMonth().getValue() + ""; |
| | | String day = createTime.getDayOfMonth() + ""; |
| | | //个人ç
§ç |
| | | if (ObjectUtils.isEmpty(user.getPictureUrl())) { |
| | | throw new ErrorException(name+"ç个人ç
§ç没æä¸ä¼ "); |
| | | } |
| | | String pictureUrl = user.getPictureUrl(); |
| | | |
| | | |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/credentials-deal.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("name", name); |
| | | put("nameEn", nameEn); |
| | | put("num1", num1); |
| | | put("num2", num2); |
| | | put("code", code); |
| | | put("year", year); |
| | | put("mon", mon); |
| | | put("day", day); |
| | | put("writeUrl", new FilePictureRenderData(100,50,imgUrl + "/" + pictureUrl)); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | name+"çå²ä½èä¸èµæ ¼æ£å¼", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.personnel.dto.PersonRewardPunishmentRecordDto; |
| | | import com.ruoyi.personnel.excel.PersonRewardPunishmentRecordExcel; |
| | | import com.ruoyi.personnel.mapper.PersonRewardPunishmentRecordMapper; |
| | | import com.ruoyi.personnel.pojo.PersonRewardPunishmentRecord; |
| | | import com.ruoyi.personnel.service.PersonRewardPunishmentRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 奿©è®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-08 11:25:02 |
| | | */ |
| | | @Service |
| | | public class PersonRewardPunishmentRecordServiceImpl extends ServiceImpl<PersonRewardPunishmentRecordMapper, PersonRewardPunishmentRecord> implements PersonRewardPunishmentRecordService { |
| | | |
| | | @Override |
| | | public IPage<PersonRewardPunishmentRecordDto> rewardPunishmentPage(Page page, Integer userId, String userName, Date startTime, Date endTime, Integer departmentId) { |
| | | return baseMapper.rewardPunishmentPage(page, userId, userName, startTime, endTime, departmentId); |
| | | } |
| | | |
| | | @Override |
| | | public List<PersonRewardPunishmentRecordExcel> rewardPunishmentExport(Integer userId, Integer departmentId, String userName, Date startTime, Date endTime) { |
| | | return baseMapper.rewardPunishmentExport(userId, departmentId, userName, startTime, endTime); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.personnel.dto.PersonSupervisePlanDetailsDto; |
| | | import com.ruoyi.personnel.excel.PersonSupervisePlanDetailsUpload; |
| | | import com.ruoyi.personnel.mapper.PersonSupervisePlanDetailsMapper; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisePlanDetails; |
| | | import com.ruoyi.personnel.service.PersonSupervisePlanDetailsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®¡å - å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 04:17:02 |
| | | */ |
| | | @Service |
| | | public class PersonSupervisePlanDetailsServiceImpl extends ServiceImpl<PersonSupervisePlanDetailsMapper, PersonSupervisePlanDetails> implements PersonSupervisePlanDetailsService { |
| | | |
| | | |
| | | public IPage<PersonSupervisePlanDetailsDto> yearPlanDetailPage(Page page, String date, String project, Integer planId) { |
| | | IPage<PersonSupervisePlanDetailsDto> personSupervisePlanDetailsDtoIPage = baseMapper.pageByDate(page, date, project, planId); |
| | | return personSupervisePlanDetailsDtoIPage; |
| | | } |
| | | |
| | | @Override |
| | | public void importExcel(List<PersonSupervisePlanDetailsUpload> list, Integer planId) { |
| | | List<PersonSupervisePlanDetails> personSupervisePlanDetailsList = JSON.parseArray(JSON.toJSONString(list), PersonSupervisePlanDetails.class); |
| | | personSupervisePlanDetailsList.forEach(i -> i.setPlanId(planId)); |
| | | if (CollectionUtils.isNotEmpty(personSupervisePlanDetailsList)) { |
| | | baseMapper.insertBatchSomeColumn(personSupervisePlanDetailsList); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.DateImageUtil; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.personnel.dto.PersonSupervisePlanDto; |
| | | import com.ruoyi.personnel.excel.PersonSupervisePlanDetailsListener; |
| | | import com.ruoyi.personnel.excel.PersonSupervisePlanDetailsUpload; |
| | | import com.ruoyi.personnel.mapper.PersonSupervisePlanDetailsMapper; |
| | | import com.ruoyi.personnel.mapper.PersonSupervisePlanMapper; |
| | | import com.ruoyi.personnel.mapper.PersonSupervisionRecordMapper; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisePlan; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisePlanDetails; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionRecord; |
| | | import com.ruoyi.personnel.service.PersonSupervisePlanDetailsService; |
| | | import com.ruoyi.personnel.service.PersonSupervisePlanService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.hwpf.HWPFDocument; |
| | | import org.apache.poi.hwpf.usermodel.*; |
| | | import org.apache.poi.xwpf.usermodel.XWPFDocument; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTable; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableCell; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableRow; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.apache.poi.xwpf.usermodel.XWPFDocument; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®¡å - ç¶ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 04:14:45 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @AllArgsConstructor |
| | | public class PersonSupervisePlanServiceImpl extends ServiceImpl<PersonSupervisePlanMapper, PersonSupervisePlan> implements PersonSupervisePlanService { |
| | | |
| | | private PersonSupervisePlanDetailsService personSupervisePlanDetailsService; |
| | | |
| | | private PersonSupervisePlanDetailsMapper personSupervisePlanDetailsMapper; |
| | | |
| | | private PersonSupervisionRecordMapper personSupervisionRecordMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | public IPage<PersonSupervisePlanDto> yearPlanDtoIPage(Page page, String organizationPerson, Integer departId) { |
| | | IPage<PersonSupervisePlanDto> personSupervisePlanDtoIPage = baseMapper.pageByPerson(page, organizationPerson, departId); |
| | | List<PersonSupervisePlanDto> records = personSupervisePlanDtoIPage.getRecords(); |
| | | for(PersonSupervisePlanDto a : records) { |
| | | a.setCurrentId(SecurityUtils.getUserId().intValue()); |
| | | } |
| | | return personSupervisePlanDtoIPage; |
| | | } |
| | | |
| | | @Override |
| | | public void yearPlanDetailImport(MultipartFile file ,String suffix) { |
| | | // 年度计åç¶çº§æ°å¢æ°æ® |
| | | PersonSupervisePlan personSupervisePlan = new PersonSupervisePlan(); |
| | | String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf(".")); |
| | | personSupervisePlan.setFileName(fileName); |
| | | personSupervisePlan.setOrganizationPersonId(SecurityUtils.getUserId().intValue()); |
| | | personSupervisePlan.setOrganizationDate(LocalDateTime.now()); |
| | | baseMapper.insert(personSupervisePlan); |
| | | List<List<String>> tableData = new ArrayList<>(); |
| | | String name = ""; |
| | | // 年度计å详æ
æ°å¢ |
| | | try { |
| | | if(suffix.toLowerCase().contains("xls")) { |
| | | PersonSupervisePlanDetailsListener personSupervisePlanDetailsListener = new PersonSupervisePlanDetailsListener(personSupervisePlanDetailsService); |
| | | personSupervisePlanDetailsListener.setPlanId(personSupervisePlan.getId()); |
| | | EasyExcel.read(file.getInputStream(), PersonSupervisePlanDetailsUpload.class, personSupervisePlanDetailsListener).sheet().doRead(); |
| | | }else if(suffix.toLowerCase().equals("doc")) { |
| | | try(InputStream inputStream = file.getInputStream(); |
| | | HWPFDocument doc = new HWPFDocument(inputStream)) { |
| | | // è·åææ¡£ç Range |
| | | Range range = doc.getRange(); |
| | | // éåææè¡¨æ ¼ |
| | | TableIterator tableIterator = new TableIterator(range); |
| | | while (tableIterator.hasNext()) { |
| | | Table table = tableIterator.next(); |
| | | // éåè¡¨æ ¼çæ¯ä¸è¡ |
| | | for (int rowIdx = 0; rowIdx < table.numRows(); rowIdx++) { |
| | | TableRow row = table.getRow(rowIdx); |
| | | List<String> rowData = new ArrayList<>(); |
| | | |
| | | // éåè¡ä¸çæ¯ä¸ªåå
æ ¼ |
| | | for (int cellIdx = 0; cellIdx < row.numCells(); cellIdx++) { |
| | | TableCell cell = row.getCell(cellIdx); |
| | | String text = cell.text().trim(); |
| | | rowData.add(text); |
| | | } |
| | | tableData.add(rowData); |
| | | } |
| | | } |
| | | for (List<String> list : tableData) { |
| | | // è¿è¡æ·»å |
| | | addPersonSupervisePlanDetails(list,personSupervisePlan.getId()); |
| | | if(StringUtils.isEmpty(name) && NumberUtil.isInteger(list.get(0))) { |
| | | String supervisePerson = list.get(4); // 被çç£äººå |
| | | name = supervisePerson; |
| | | } |
| | | } |
| | | // æ ¹æ®æ·»å æ°æ®è¢«çç£äºº æ¥å¤æè¯¥æä»¶æ¯åªä¸ªé¨é¨ç |
| | | String departLimsId = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getName, name)).get(0).getDepartLimsId(); |
| | | if(StringUtils.isNotEmpty(departLimsId) && departLimsId.contains("18")) { |
| | | baseMapper.update(null,new LambdaUpdateWrapper<PersonSupervisePlan>() |
| | | .set(PersonSupervisePlan::getDepartId,18) |
| | | .set(PersonSupervisePlan::getOrganizationPersonId,12) // éä¿¡çæ¯åæ¨ ï¼ç¼å¶äººï¼ |
| | | .eq(PersonSupervisePlan::getId,personSupervisePlan.getId())); |
| | | } else if (StringUtils.isNotEmpty(departLimsId) && departLimsId.contains("19")) { |
| | | baseMapper.update(null,new LambdaUpdateWrapper<PersonSupervisePlan>() |
| | | .set(PersonSupervisePlan::getDepartId,19) |
| | | .set(PersonSupervisePlan::getOrganizationPersonId,41) // çµåçæ¯å´æå ï¼ç¼å¶äººï¼ |
| | | .eq(PersonSupervisePlan::getId,personSupervisePlan.getId())); |
| | | } |
| | | |
| | | log.info("读åæä»¶ï¼ {}",tableData); |
| | | }catch (Exception e) { |
| | | throw new ErrorException("导å
¥å¤±è´¥"+ e); |
| | | } |
| | | }else if(suffix.toLowerCase().equals("docx")) { |
| | | try(InputStream fileInputStream = file.getInputStream();XWPFDocument xwpfDocument = new XWPFDocument(fileInputStream)) { |
| | | |
| | | // éåææè¡¨æ ¼ |
| | | for(XWPFTable table : xwpfDocument.getTables()) { |
| | | // é忝ä¸è¡ |
| | | for(XWPFTableRow row : table.getRows()) { |
| | | List<String> list = new ArrayList<>(); |
| | | // é忝ä¸ä¸ªåå
æ ¼ |
| | | for(XWPFTableCell cell : row.getTableCells()) { |
| | | String text = cell.getText(); |
| | | list.add(text); |
| | | } |
| | | log.info("è¯»åæ¯ä¸è¡çå
å®¹ï¼ {}",list); |
| | | // è¿è¡æ·»å |
| | | addPersonSupervisePlanDetails(list,personSupervisePlan.getId()); |
| | | if(StringUtils.isEmpty(name) && NumberUtil.isInteger(list.get(0))) { |
| | | String supervisePerson = list.get(4); // 被çç£äººå |
| | | name = supervisePerson; |
| | | } |
| | | } |
| | | } |
| | | // æ ¹æ®æ·»å æ°æ®è¢«çç£äºº æ¥å¤æè¯¥æä»¶æ¯åªä¸ªé¨é¨ç |
| | | String departLimsId = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getName, name)).get(0).getDepartLimsId(); |
| | | if(StringUtils.isNotEmpty(departLimsId) && departLimsId.contains("18")) { |
| | | baseMapper.update(null,new LambdaUpdateWrapper<PersonSupervisePlan>() |
| | | .set(PersonSupervisePlan::getDepartId,18) |
| | | .eq(PersonSupervisePlan::getId,personSupervisePlan.getId())); |
| | | } else if (StringUtils.isNotEmpty(departLimsId) && departLimsId.contains("19")) { |
| | | baseMapper.update(null,new LambdaUpdateWrapper<PersonSupervisePlan>() |
| | | .set(PersonSupervisePlan::getDepartId,18) |
| | | .eq(PersonSupervisePlan::getId,personSupervisePlan.getId())); |
| | | } |
| | | }catch (Exception e){ |
| | | throw new ErrorException("导å
¥å¤±è´¥"+e); |
| | | } |
| | | } |
| | | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | public void addPersonSupervisePlanDetails(List<String> list,Integer planId) { |
| | | if(NumberUtil.isInteger(list.get(0)) ) { |
| | | String superviseDate = list.get(1); // çç£æ¥æ |
| | | String superviseDes = list.get(2); // çç£ç®ç |
| | | String superviseProject = list.get(3); // çç£é¡¹ç® |
| | | String supervisePerson = list.get(4); // 被çç£äººå |
| | | String superviseReason = list.get(5); // çç£åå |
| | | String remarks = list.get(6); // 夿³¨ |
| | | PersonSupervisePlanDetails personSupervisePlanDetails = new PersonSupervisePlanDetails(); |
| | | LocalDate localDate = null; |
| | | String[] parts = superviseDate.split("\\."); |
| | | if (parts.length == 2) { |
| | | try { |
| | | // è·å年份 |
| | | int year = Integer.parseInt(parts[0]); |
| | | // è·åæä»½ |
| | | int month = Integer.parseInt(parts[1]); |
| | | // å建 LocalDate å¯¹è±¡ï¼æ¥æè®¾ä¸ºè¯¥æç¬¬ä¸å¤© |
| | | localDate = LocalDate.of(year, month, 1); |
| | | } catch (NumberFormatException e) { |
| | | throw new ErrorException("è¾å
¥çåç¬¦ä¸²æ æ³è½¬æ¢ä¸ºææç年份ææä»½: " + e.getMessage()); |
| | | } |
| | | } |
| | | personSupervisePlanDetails.setSuperviseDate(localDate); |
| | | personSupervisePlanDetails.setSuperviseDes(superviseDes); |
| | | personSupervisePlanDetails.setSuperviseProject(superviseProject); |
| | | personSupervisePlanDetails.setSupervisePerson(supervisePerson); |
| | | personSupervisePlanDetails.setSuperviseReason(superviseReason); |
| | | personSupervisePlanDetails.setRemarks(remarks); |
| | | personSupervisePlanDetails.setPlanId(planId); // ç¶id |
| | | personSupervisePlanDetailsMapper.insert(personSupervisePlanDetails); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®¡å |
| | | * @param id |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportSuperVisePlan(Integer id, HttpServletResponse response) { |
| | | Map<String, Object> data = new HashMap<>(); |
| | | data.put("year",""); |
| | | data.put("supervisor",""); |
| | | // æ¥è¯¢è¯¦æ
|
| | | PersonSupervisePlan personSupervisePlan = baseMapper.selectById(id); |
| | | |
| | | |
| | | //è·åæäº¤äººçç¾åå°å |
| | | String organizationUrl = userMapper.selectById(personSupervisePlan.getOrganizationPersonId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(organizationUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ£éªäººçç¾å"); |
| | | } |
| | | |
| | | //è·åæ¹å人çç¾åå°å |
| | | String approvalUrl = null; |
| | | if (personSupervisePlan.getApprovalId() != null) { |
| | | approvalUrl = userMapper.selectById(personSupervisePlan.getApprovalId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(approvalUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ¹å人çç¾å"); |
| | | } |
| | | } |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<PersonSupervisePlanDetails> detailedDtos = personSupervisePlanDetailsService.list(Wrappers.<PersonSupervisePlanDetails>lambdaQuery() |
| | | .eq(PersonSupervisePlanDetails::getPlanId, id)); |
| | | |
| | | |
| | | // æ¥è¯¢çç£è®°å½ |
| | | List<PersonSupervisionRecord> personSupervisionRecords = personSupervisionRecordMapper.selectList(new LambdaQueryWrapper<PersonSupervisionRecord>() |
| | | .orderByAsc(PersonSupervisionRecord::getId)); |
| | | if(CollectionUtils.isNotEmpty(personSupervisionRecords)) { |
| | | Integer supervisorId = personSupervisionRecords.get(0).getSupervisorId(); |
| | | String name = userMapper.selectById(supervisorId).getName(); |
| | | data.put("supervisor",name); |
| | | } |
| | | |
| | | |
| | | int index = 1; |
| | | for (PersonSupervisePlanDetails detailedDto : detailedDtos) { |
| | | detailedDto.setIndex(index); |
| | | index++; |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | String format = detailedDto.getSuperviseDate().format(dateTimeFormatter); |
| | | detailedDto.setSuperviseDateString(format); |
| | | int year = detailedDto.getSuperviseDate().getYear(); |
| | | data.put("year",year); |
| | | } |
| | | System.out.println("data: " + data); |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/super-vise-plan.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("supervisePlanDetailsList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | String finalApprovalUrl = approvalUrl; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("data",data); |
| | | put("supervisePlanDetailsList", detailedDtos); |
| | | put("organizationUrl", StringUtils.isNotBlank(organizationUrl) ? Pictures.ofLocal(imgUrl + "/" + organizationUrl).create() : null); |
| | | put("approvalUrl", StringUtils.isNotBlank(finalApprovalUrl) ? Pictures.ofLocal(imgUrl + "/" + finalApprovalUrl).create() : null); |
| | | put("writeDateUrl", personSupervisePlan.getOrganizationDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(personSupervisePlan.getOrganizationDate())).create() : null); |
| | | put("ratifyDateUrl", personSupervisePlan.getApprovalDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(personSupervisePlan.getApprovalDate())).create() : null); |
| | | }}); |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "人åçç£è®¡å导åº", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.personnel.dto.PersonSupervisionControlSheetExportDto; |
| | | import com.ruoyi.personnel.mapper.PersonSupervisionControlSheetMapper; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionControlSheet; |
| | | import com.ruoyi.personnel.service.PersonSupervisionControlSheetService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ - æ§å¶å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 05:18:57 |
| | | */ |
| | | @Service |
| | | public class PersonSupervisionControlSheetServiceImpl extends ServiceImpl<PersonSupervisionControlSheetMapper, PersonSupervisionControlSheet> implements PersonSupervisionControlSheetService { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®°å½çº æ£æ§å¶å |
| | | * @param supervisionRecordId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportSupervisionControlSheet(Integer supervisionRecordId, HttpServletResponse response) { |
| | | PersonSupervisionControlSheetExportDto controlSheetExportDto = baseMapper.selectSupervisionControl(supervisionRecordId); |
| | | |
| | | // 夿ä¸ç¬¦åå·¥ä½åç°é徿¯å¦ä¸ºç©º |
| | | if (StringUtils.isNotBlank(controlSheetExportDto.getDiscoveryApproach())) { |
| | | List<String> splitList = StrUtil.split(controlSheetExportDto.getDiscoveryApproach(), ','); |
| | | for (String s : splitList) { |
| | | switch (s) { |
| | | case "0": |
| | | controlSheetExportDto.setDiscoveryApproach0("â"); |
| | | break; |
| | | case "1": |
| | | controlSheetExportDto.setDiscoveryApproach1("â"); |
| | | break; |
| | | case "2": |
| | | controlSheetExportDto.setDiscoveryApproach2("â"); |
| | | break; |
| | | case "3": |
| | | controlSheetExportDto.setDiscoveryApproach3("â"); |
| | | break; |
| | | case "4": |
| | | controlSheetExportDto.setDiscoveryApproach4("â"); |
| | | break; |
| | | case "5": |
| | | controlSheetExportDto.setDiscoveryApproach5("â"); |
| | | break; |
| | | case "6": |
| | | controlSheetExportDto.setDiscoveryApproach6("â"); |
| | | break; |
| | | case "7": |
| | | controlSheetExportDto.setDiscoveryApproach7("â"); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | // åç°é¨é¨ |
| | | String discovererUrl = null; |
| | | if (controlSheetExportDto.getDepartmentHeadId() != null) { |
| | | discovererUrl = userMapper.selectById(controlSheetExportDto.getDepartmentHeadId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(discovererUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°åç°é¨é¨äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // å¤çæªæ½è´è´£äºº |
| | | String responsibleUrl = null; |
| | | if (controlSheetExportDto.getResponsibleDepartmentPersonId() != null) { |
| | | responsibleUrl = userMapper.selectById(controlSheetExportDto.getResponsibleDepartmentPersonId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(responsibleUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å¤çæªæ½è´è´£äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // ææ¯è´è´£äºº |
| | | String correctiveUrl = null; |
| | | if (controlSheetExportDto.getResponsibleDepartmentPersonId() != null) { |
| | | correctiveUrl = userMapper.selectById(controlSheetExportDto.getResponsibleDepartmentPersonId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(correctiveUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°ææ¯è´è´£äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // è´¨éè´è´£äºº |
| | | String qualityUrl = null; |
| | | if (controlSheetExportDto.getQualitySupervisorId() != null) { |
| | | qualityUrl = userMapper.selectById(controlSheetExportDto.getQualitySupervisorId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(qualityUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°è´¨éè´è´£äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/supervision-control-sheet.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | String finalDiscovererUrl = discovererUrl; |
| | | String finalResponsibleUrl = responsibleUrl; |
| | | String finalCorrectiveUrl = correctiveUrl; |
| | | String finalQualityUrl = qualityUrl; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("control", controlSheetExportDto); |
| | | put("discovererUrl", StringUtils.isNotBlank(finalDiscovererUrl) ? Pictures.ofLocal(imgUrl + "/" + finalDiscovererUrl).create() : null); |
| | | put("responsibleUrl", StringUtils.isNotBlank(finalResponsibleUrl) ? Pictures.ofLocal(imgUrl + "/" + finalResponsibleUrl).create() : null); |
| | | put("correctiveUrl", StringUtils.isNotBlank(finalCorrectiveUrl) ? Pictures.ofLocal(imgUrl + "/" + finalCorrectiveUrl).create() : null); |
| | | put("qualityUrl", StringUtils.isNotBlank(finalQualityUrl) ? Pictures.ofLocal(imgUrl + "/" + finalQualityUrl).create() : null); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "人åçç£è®°å½æ§å¶å", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.personnel.dto.PersonSupervisionProcessingSheetDto; |
| | | import com.ruoyi.personnel.mapper.PersonSupervisionProcessingSheetMapper; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionProcessingSheet; |
| | | import com.ruoyi.personnel.service.PersonSupervisionProcessingSheetService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ - å¤çå æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 05:35:58 |
| | | */ |
| | | @Service |
| | | public class PersonSupervisionProcessingSheetServiceImpl extends ServiceImpl<PersonSupervisionProcessingSheetMapper, PersonSupervisionProcessingSheet> implements PersonSupervisionProcessingSheetService { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®°å½çº æ£å¤çå |
| | | * @param supervisionRecordId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportSupervisionProcessingSheet(Integer supervisionRecordId, HttpServletResponse response) { |
| | | PersonSupervisionProcessingSheetDto processingSheetDto = baseMapper.selectProcessingSheet(supervisionRecordId); |
| | | |
| | | // æåºäººç¾å |
| | | String raiseUrl = null; |
| | | if (processingSheetDto.getProposingDepartmentPersonId() != null) { |
| | | raiseUrl = userMapper.selectById(processingSheetDto.getProposingDepartmentPersonId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(raiseUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æåºäººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // åå åæäºº |
| | | String causeUrl = null; |
| | | if (processingSheetDto.getCauseAnalysisPersonId() != null) { |
| | | causeUrl = userMapper.selectById(processingSheetDto.getCauseAnalysisPersonId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(causeUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°åå åæäººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // çº æ£äºº |
| | | String correctUrl = null; |
| | | if (processingSheetDto.getCorrectiveActionId() != null) { |
| | | correctUrl = userMapper.selectById(processingSheetDto.getCorrectiveActionId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(correctUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°çº æ£äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // éªè¯äºº |
| | | String validationUrl = null; |
| | | if (processingSheetDto.getVerificationDepartmentPersonId() != null) { |
| | | validationUrl = userMapper.selectById(processingSheetDto.getVerificationDepartmentPersonId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(validationUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°éªè¯äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/supervision-processing-sheet.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | String finalRaiseUrl = raiseUrl; |
| | | String finalCauseUrl = causeUrl; |
| | | String finalCorrectUrl = correctUrl; |
| | | String finalValidationUrl = validationUrl; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("processing", processingSheetDto); |
| | | put("raiseUrl", StringUtils.isNotBlank(finalRaiseUrl) ? Pictures.ofLocal(imgUrl + "/" + finalRaiseUrl).create() : null); |
| | | put("causeUrl", StringUtils.isNotBlank(finalCauseUrl) ? Pictures.ofLocal(imgUrl + "/" + finalCauseUrl).create() : null); |
| | | put("correctUrl", StringUtils.isNotBlank(finalCorrectUrl) ? Pictures.ofLocal(imgUrl + "/" + finalCorrectUrl).create() : null); |
| | | put("validationUrl", StringUtils.isNotBlank(finalValidationUrl) ? Pictures.ofLocal(imgUrl + "/" + finalValidationUrl).create() : null); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "人åçç£è®°å½çº æ£å¤çå", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.ruoyi.common.utils.DateImageUtil; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.personnel.dto.PersonSupervisionRecordDto; |
| | | import com.ruoyi.personnel.mapper.PersonSupervisionRecordMapper; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionControlSheet; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionProcessingSheet; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionRecord; |
| | | import com.ruoyi.personnel.service.PersonSupervisionControlSheetService; |
| | | import com.ruoyi.personnel.service.PersonSupervisionProcessingSheetService; |
| | | import com.ruoyi.personnel.service.PersonSupervisionRecordService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 04:16:49 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class PersonSupervisionRecordServiceImpl extends ServiceImpl<PersonSupervisionRecordMapper, PersonSupervisionRecord> implements PersonSupervisionRecordService { |
| | | |
| | | @Autowired |
| | | private PersonSupervisionControlSheetService personSupervisionControlSheetService; |
| | | |
| | | @Autowired |
| | | private PersonSupervisionProcessingSheetService personSupervisionProcessingSheetService; |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public void deletePersonSupervisionRecord(List<Integer> ids) { |
| | | if (CollectionUtils.isNotEmpty(ids)) { |
| | | ids.forEach(id -> { |
| | | personSupervisionControlSheetService.remove(Wrappers.<PersonSupervisionControlSheet>lambdaQuery() |
| | | .eq(PersonSupervisionControlSheet::getSupervisionRecordId, id)); |
| | | personSupervisionProcessingSheetService.remove(Wrappers.<PersonSupervisionProcessingSheet>lambdaQuery() |
| | | .eq(PersonSupervisionProcessingSheet::getSupervisionRecordId, id)); |
| | | baseMapper.deleteById(id); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public IPage<PersonSupervisionRecordDto> personSupervisionRecordPage(Page page, Integer userId, String userName, Integer departLimsId) { |
| | | return baseMapper.personSupervisionRecordPage(page, userId, departLimsId, userName); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®°å½ |
| | | * |
| | | * @param id |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportPersonSupervisionRecord(Integer id, HttpServletResponse response) { |
| | | PersonSupervisionRecordDto recordDto = baseMapper.selectPersonSupervisionRecord(id); |
| | | recordDto.setPersonnelName(recordDto.getPersonnel()); |
| | | //è·åææ¯è´è´£äººçç¾åå°å |
| | | String ratifyUrl = null; |
| | | if (recordDto.getTechnicalDirector() != null) { |
| | | ratifyUrl = userMapper.selectById(recordDto.getTechnicalDirector()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(ratifyUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°ææ¯è´è´£äººçç¾å"); |
| | | } |
| | | } |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/supervision-record.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | String finalRatifyUrl = ratifyUrl; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("supervision", recordDto); |
| | | put("technicalDirectorUrl", StringUtils.isNotBlank(finalRatifyUrl) ? Pictures.ofLocal(imgUrl + "/" + finalRatifyUrl).create() : null); |
| | | put("technicalDirectorDateUrl", recordDto.getTechnicalDirectorDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(recordDto.getTechnicalDirectorDate())).create() : null); |
| | | put("testDateUrl", recordDto.getDetectionDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(recordDto.getDetectionDate())).create() : null); |
| | | }}); |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "人åçç£è®°å½", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.personnel.mapper.PersonTrackRecordMapper; |
| | | import com.ruoyi.personnel.pojo.PersonTrackRecord; |
| | | import com.ruoyi.personnel.service.PersonTrackRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥ä½å±¥å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-02 03:13:03 |
| | | */ |
| | | @Service |
| | | public class PersonTrackRecordServiceImpl extends ServiceImpl<PersonTrackRecordMapper, PersonTrackRecord> implements PersonTrackRecordService { |
| | | |
| | | @Override |
| | | public IPage<PersonTrackRecord> personTrackRecordSelect(Page page, String userId, String departmentId) { |
| | | return baseMapper.personTrackRecordSelect(page, userId, departmentId); |
| | | } |
| | | |
| | | @Override |
| | | public List<PersonTrackRecord> personTrackRecordExport(String userId, String departmentId) { |
| | | return baseMapper.personTrackRecordExport(userId, departmentId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.entity.DepartmentLims; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.personnel.dto.PersonTrainingDetailedDto; |
| | | import com.ruoyi.personnel.enumeration.AttachmentType; |
| | | import com.ruoyi.personnel.excel.PersonTrainingDetailedUpload; |
| | | import com.ruoyi.personnel.mapper.*; |
| | | import com.ruoyi.personnel.pojo.*; |
| | | import com.ruoyi.personnel.service.PersonTrainingDetailedService; |
| | | import com.ruoyi.system.mapper.DepartmentLimsMapper; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.system.service.DepartmentLimsService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.math3.analysis.function.Power; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å详æ
æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:46:27 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class PersonTrainingDetailedServiceImpl extends ServiceImpl<PersonTrainingDetailedMapper, PersonTrainingDetailed> implements PersonTrainingDetailedService { |
| | | |
| | | @Resource |
| | | private DepartmentLimsService departmentLimsService; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private PersonTrainingRecordMapper personTrainingRecordMapper; |
| | | |
| | | @Resource |
| | | private PersonTrainingMapper personTrainingMapper; |
| | | |
| | | // private PowerMapper powerMapper; |
| | | |
| | | @Resource |
| | | private PersonTrainingFileMapper personTrainingFileMapper; |
| | | |
| | | @Resource |
| | | private NumberGenerator<PersonTrainingDetailed> numberGenerator; |
| | | |
| | | @Resource |
| | | private DepartmentLimsMapper departmentLimsMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Value("${excelUrl}") |
| | | private String excelUrl; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | /** |
| | | * |
| | | * @param file |
| | | * @param id 年度计åæç»è¡¨id |
| | | */ |
| | | @Override |
| | | public Map<String,Object> fileUpload(MultipartFile file, Integer id) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | String fileName = file.getOriginalFilename(); |
| | | |
| | | try { |
| | | UUID uuid = UUID.randomUUID(); |
| | | String uuidString = uuid.toString(); |
| | | int i = fileName.indexOf("."); |
| | | String suffix = fileName.substring(i); //æä»¶åç¼ |
| | | String url = uuidString + suffix; |
| | | String OriginalFileName = fileName.substring(0,i); // æä»¶ååç§° |
| | | // åæ¾è·¯å¾ |
| | | String path = ""; |
| | | // æ ¹æ®ä¸åçåç¼åæ¾å¨ä¸åçè·¯å¾ä¸ |
| | | if(suffix.toLowerCase().contains("xls")) { |
| | | path = excelUrl; |
| | | } else if (suffix.toLowerCase().contains("doc") || suffix.toLowerCase().contains("pdf")) { |
| | | path = wordUrl; |
| | | }else { |
| | | path = imgUrl; |
| | | } |
| | | File uploadDir = new File(path); |
| | | if(!uploadDir.exists()){ |
| | | uploadDir.mkdir(); |
| | | } |
| | | File destFile = new File(uploadDir , url); |
| | | file.transferTo(destFile); |
| | | // å°æä»¶è·¯å¾åå¨å°æ°æ®åº |
| | | PersonTrainingFile personTrainingFile = new PersonTrainingFile(); |
| | | personTrainingFile.setDetailId(id); |
| | | personTrainingFile.setFileName(OriginalFileName + suffix); |
| | | personTrainingFile.setFileUrl("/"+url); |
| | | personTrainingFile.setCreateUser(SecurityUtils.getUserId().intValue()); |
| | | personTrainingFile.setCreateTime(LocalDateTime.now()); |
| | | personTrainingFileMapper.insert(personTrainingFile); |
| | | |
| | | |
| | | map.put("fileName",OriginalFileName + suffix); |
| | | map.put("url","/"+url); |
| | | } catch (IOException e) { |
| | | throw new ErrorException("ä¸ä¼ 失败"); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public List<DepartmentLims> selectDepartLims() { |
| | | List<DepartmentLims> departmentLims = departmentLimsMapper.selectList(null); |
| | | return departmentLims; |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void importExcel(List<PersonTrainingDetailedUpload> list, Integer planId) { |
| | | List<PersonTrainingDetailed> personTrainingDetailedList = new ArrayList<>(); |
| | | list.forEach(i -> { |
| | | PersonTrainingDetailed personTrainingDetailed = new PersonTrainingDetailed(); |
| | | BeanUtils.copyProperties(i, personTrainingDetailed); |
| | | personTrainingDetailed.setClassHour(Double.parseDouble( i.getClassHour())); |
| | | // å¹é
举åé¨é¨ |
| | | DepartmentLims departmentLims = departmentLimsService.getOne(Wrappers.<DepartmentLims>lambdaQuery() |
| | | .eq(DepartmentLims::getName, i.getHoldingDepartment())); |
| | | if (ObjectUtils.isEmpty(departmentLims)) { |
| | | throw new ErrorException("æªå¹é
å°ä¸¾åé¨é¨ï¼" + i.getHoldingDepartment()); |
| | | } |
| | | personTrainingDetailed.setHoldingDepartment(departmentLims.getId()); |
| | | |
| | | // // å¹é
è®²å¸ |
| | | // String[] names = i.getTrainingLecturerName().split("ã|ï¼|,|\\s+"); |
| | | // ArrayList<Integer> ids = new ArrayList<>(); |
| | | // for(String name : names) { |
| | | // if(StringUtils.isNotEmpty(name)) { |
| | | // User user = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | // .eq(User::getName, name)); |
| | | // if(Objects.isNull(user)) { |
| | | // throw new ErrorException("æªæ¾å°è¯¥è®²å¸ï¼" + name); |
| | | // } |
| | | // ids.add(user.getId()); |
| | | // } |
| | | // } |
| | | // String collect = ids.stream().map(item -> item.toString()).collect(Collectors.joining(",")); |
| | | personTrainingDetailed.setTrainingLecturerId(i.getTrainingLecturerName()); |
| | | personTrainingDetailed.setPlanId(planId); |
| | | personTrainingDetailed.setState(3); |
| | | |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | | String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date()); |
| | | String processNumber = numberGenerator.generateNumberWithPrefix(4, "KC" + month + "-" + year + month, PersonTrainingDetailed::getCourseCode); |
| | | personTrainingDetailed.setCourseCode(processNumber); |
| | | personTrainingDetailedList.add(personTrainingDetailed); |
| | | }); |
| | | // æ¹éæ°å¢ |
| | | if (CollectionUtils.isNotEmpty(personTrainingDetailedList)) { |
| | | baseMapper.insertBatchSomeColumn(personTrainingDetailedList); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void deleteAnnualPlanDetailTable(String ids) { |
| | | String[] split = ids.split(","); |
| | | if (split.length > 0) { |
| | | for (String s : split) { |
| | | baseMapper.deleteById(s); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public IPage<PersonTrainingDetailedDto> queryTheAnnualPlanDetailsTable(Page page, String trainingLecturerName, String courseCode, String trainingDate, |
| | | Integer id, Integer userId,Integer departId,Integer state) { |
| | | // 夿å½å人æ¯å¦ææéæ¥ç年度计å主表 |
| | | Integer userId1 = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(userId1); |
| | | String name1 = user.getName(); |
| | | Integer currentUserId = user.getId(); |
| | | //todo æéå¾
宿 |
| | | // List<Power> powers = powerMapper.selectList(new LambdaQueryWrapper<Power>() |
| | | // .eq(Power::getRoleId, user.getRoleId()) |
| | | // .eq(Power::getMenuMethod,"personTrainingSelect")); |
| | | // if(CollectionUtils.isEmpty(powers)) { |
| | | // if(Objects.isNull(departId) || departId == 1) { |
| | | // // 没ææé å°±é»è®¤æ¥çèªå·±é¨é¨ææ°ç年度计å 18 é信产åå®éªå®¤ 19 çµå产åå®éªå®¤ |
| | | // if(user.getDepartLimsId().contains("18")) { |
| | | // List<PersonTraining> personTrainings = personTrainingMapper.selectList(new LambdaQueryWrapper<PersonTraining>() |
| | | // .eq(PersonTraining::getDepartId, 18) |
| | | // .orderByDesc(PersonTraining::getId)); |
| | | // if(CollectionUtils.isNotEmpty(personTrainings)) { |
| | | // id = personTrainings.get(0).getId(); |
| | | // } |
| | | // }else if(user.getDepartLimsId().contains("19")) { |
| | | // List<PersonTraining> personTrainings = personTrainingMapper.selectList(new LambdaQueryWrapper<PersonTraining>() |
| | | // .eq(PersonTraining::getDepartId, 19) |
| | | // .orderByDesc(PersonTraining::getId)); |
| | | // if(CollectionUtils.isNotEmpty(personTrainings)) { |
| | | // id = personTrainings.get(0).getId(); |
| | | // } |
| | | // } |
| | | // }else { |
| | | // List<PersonTraining> personTrainings = personTrainingMapper.selectList(new LambdaQueryWrapper<PersonTraining>() |
| | | // .eq(PersonTraining::getDepartId, departId) |
| | | // .orderByDesc(PersonTraining::getId)); |
| | | // if(CollectionUtils.isNotEmpty(personTrainings)) { |
| | | // id = personTrainings.get(0).getId(); |
| | | // } |
| | | // } |
| | | // } |
| | | if(Objects.nonNull(state)) { |
| | | if(state == -1) { |
| | | state = null; |
| | | } |
| | | } |
| | | IPage<PersonTrainingDetailedDto> list = baseMapper.queryTheAnnualPlanDetailsTable(page, trainingLecturerName, courseCode, trainingDate, id, userId, userId1,state); |
| | | // æ¥åäººæ° |
| | | List<PersonTrainingDetailedDto> records = list.getRecords(); |
| | | for(PersonTrainingDetailedDto a : records) { |
| | | // æ¥åçäººæ° |
| | | List<PersonTrainingRecord> personTrainingRecords = personTrainingRecordMapper.selectList(new LambdaQueryWrapper<PersonTrainingRecord>() |
| | | .eq(PersonTrainingRecord::getCourseId, a.getId())); |
| | | a.setEnrollment(CollectionUtils.isNotEmpty(personTrainingRecords) ? personTrainingRecords.size() : 0); |
| | | List<Integer> collect = personTrainingRecords.stream().map(PersonTrainingRecord::getUserId).collect(Collectors.toList()); |
| | | if(collect.contains(SecurityUtils.getUserId().intValue())) { |
| | | a.setWhetherClaim(true); |
| | | }else { |
| | | a.setWhetherClaim(false); |
| | | } |
| | | //å端æééè¦ æ¯å¦å¯ä»¥æä½æé® |
| | | // if(a.getTrainingLecturerId().contains(name1) || CollectionUtils.isNotEmpty(powers) || |
| | | // (Objects.nonNull(a.getAssessmentUserId()) && a.getAssessmentUserId().equals(currentUserId)) || Arrays.asList(16,36,35).contains(currentUserId)) { |
| | | // a.setIsDisabled(1); // 1ä¸ç¦ç¨ |
| | | // }else{ |
| | | // a.setIsDisabled(0); |
| | | // } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<PersonTrainingFile> getFileData(Integer detailedId) { |
| | | List<PersonTrainingFile> personTrainingFiles = personTrainingFileMapper.selectList(new LambdaQueryWrapper<PersonTrainingFile>() |
| | | .eq(PersonTrainingFile::getDetailId, detailedId) |
| | | .eq(PersonTrainingFile::getEnumAttachmentType, AttachmentType.getTypeValue(2))); |
| | | if(CollectionUtils.isNotEmpty(personTrainingFiles)) { |
| | | for(PersonTrainingFile a : personTrainingFiles) { |
| | | // 设置mime |
| | | int i = a.getFileUrl().indexOf("."); |
| | | String contentType = getContentType(a.getFileUrl().substring(i + 1)); |
| | | a.setMime(contentType); |
| | | } |
| | | } |
| | | return personTrainingFiles; |
| | | } |
| | | |
| | | @Override |
| | | public void deleteFile(Integer id) { |
| | | personTrainingFileMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void fileDownLoad(Integer id, HttpServletResponse response) { |
| | | // æ ¹æ®idæ¥è¯¢ä¸è½½çæä»¶ |
| | | PersonTrainingFile personTrainingFile = personTrainingFileMapper.selectById(id); |
| | | if(Objects.nonNull(personTrainingFile)) { |
| | | // æ¿å°æä»¶è·¯å¾ |
| | | String fileUrl = personTrainingFile.getFileUrl(); |
| | | int i = fileUrl.indexOf("."); |
| | | String suffix = fileUrl.substring(i); // æä»¶åç¼ |
| | | String url = ""; |
| | | if(suffix.toLowerCase().contains("xls")) { |
| | | url = excelUrl + File.separator + fileUrl; |
| | | } else if (suffix.toLowerCase().contains("doc") || suffix.toLowerCase().contains("pdf")) { |
| | | url = wordUrl + File.separator + fileUrl; |
| | | }else { |
| | | url = imgUrl + File.separator + fileUrl; |
| | | } |
| | | File file = new File(url); |
| | | if(!file.exists()) { |
| | | throw new ErrorException("æä»¶ä¸å卿æå"); |
| | | } |
| | | // è·åæä»¶è¾å
¥æµ |
| | | try(FileInputStream fileInputStream = new FileInputStream(file); ServletOutputStream outputStream = response.getOutputStream()) { |
| | | String contentType = getContentType(fileUrl.substring(i + 1)); |
| | | // 设置ååºå¤´ |
| | | response.setContentType(contentType); |
| | | int i1 = personTrainingFile.getFileName().indexOf("."); |
| | | String fileName = URLEncoder.encode(personTrainingFile.getFileName().substring(0, i1), "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + suffix); |
| | | byte[] bytes = new byte[1024]; |
| | | int bytesRead; |
| | | while ((bytesRead = fileInputStream.read(bytes)) != -1 ){ |
| | | outputStream.write(bytes,0,bytesRead); |
| | | } |
| | | outputStream.flush(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |
| | | // æ ¹æ®æä»¶æ©å±åè·å MIME ç±»å |
| | | private String getContentType(String fileExtension) { |
| | | switch (fileExtension) { |
| | | case "jpg": |
| | | case "jpeg": |
| | | return "image/jpeg"; |
| | | case "png": |
| | | return "image/png"; |
| | | case "gif": |
| | | return "image/gif"; |
| | | case "pdf": |
| | | return "application/pdf"; |
| | | case "doc": |
| | | return "application/msword"; |
| | | case "docx": |
| | | return "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; |
| | | case "xls": |
| | | return "application/vnd.ms-excel"; |
| | | case "xlsx": |
| | | return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; |
| | | case "ppt": |
| | | case "pptx": |
| | | return "application/vnd.ms-powerpoint"; |
| | | default: |
| | | return "application/octet-stream"; // é»è®¤äºè¿å¶æµ |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.personnel.mapper.PersonTrainingFileMapper; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingFile; |
| | | import com.ruoyi.personnel.service.PersonTrainingFileService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class PersonTrainingFileServiceImpl extends ServiceImpl<PersonTrainingFileMapper,PersonTrainingFile> |
| | | implements PersonTrainingFileService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.performance.mapper.AuxiliaryWorkingHoursDayMapper; |
| | | import com.ruoyi.performance.mapper.PerformanceShiftMapper; |
| | | import com.ruoyi.performance.pojo.AuxiliaryWorkingHoursDay; |
| | | import com.ruoyi.performance.pojo.PerformanceShift; |
| | | import com.ruoyi.performance.service.AuxiliaryWorkingHoursDayService; |
| | | import com.ruoyi.personnel.dto.PersonTrainingRecordDto; |
| | | import com.ruoyi.personnel.dto.PersonTrainingRecordListDto; |
| | | import com.ruoyi.personnel.dto.TrainingRecordPersonDetailedDto; |
| | | import com.ruoyi.personnel.mapper.*; |
| | | import com.ruoyi.personnel.pojo.*; |
| | | import com.ruoyi.personnel.service.PersonTrainingDetailedService; |
| | | import com.ruoyi.personnel.service.PersonTrainingRecordService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.net.URLEncoder; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.*; |
| | | import java.time.temporal.TemporalField; |
| | | import java.time.temporal.WeekFields; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-12 04:50:48 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Service |
| | | public class PersonTrainingRecordServiceImpl extends ServiceImpl<PersonTrainingRecordMapper, PersonTrainingRecord> implements PersonTrainingRecordService { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private PersonTrainingDetailedService personTrainingDetailedService; |
| | | |
| | | @Resource |
| | | private PersonTrainingDetailedMapper personTrainingDetailedMapper; |
| | | |
| | | @Resource |
| | | private AuxiliaryWorkingHoursDayMapper auxiliaryWorkingHoursDayMapper; |
| | | |
| | | @Resource |
| | | private PerformanceShiftMapper shiftMapper; |
| | | |
| | | @Autowired |
| | | private AuxiliaryWorkingHoursDayService auxiliaryWorkingHoursDayService; |
| | | |
| | | |
| | | @Override |
| | | public List<PersonTrainingRecordDto> trainingAndAssessmentRecordsPage(Integer trainingDetailedId, String userName) { |
| | | return baseMapper.trainingAndAssessmentRecordsPage(trainingDetailedId, userName); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteTrainingAndAssessmentRecords(String ids) { |
| | | String[] split = ids.split(","); |
| | | if (split.length > 0) { |
| | | for (String s : split) { |
| | | baseMapper.deleteById(s); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public IPage<PersonTrainingRecordListDto> personnelTrainingPersonnel(Page page, String userName, Integer userId, Integer departLimsId) { |
| | | return baseMapper.personnelTrainingPersonnel(page, userName, userId, departLimsId); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<TrainingRecordPersonDetailedDto> queryPersonnelDetails(Page page, Integer userId) { |
| | | return baseMapper.queryPersonnelDetails(page, userId); |
| | | } |
| | | |
| | | @Override |
| | | public void claimOfTrainingAndAssessmentRecords(Boolean claimAndClaim, Integer courseId) { |
| | | int userId = SecurityUtils.getUserId().intValue(); |
| | | // 1ãæ¥è¯¢å¹è®è¯¾ç¨ï¼åå¹è®æ¥æä¸å¼å§æ¥æï¼ä¸å½åæ¶é´æ¯è¾ï¼å¤ææ¯å¦è¶
åºï¼å¦æè¶
åºä¸å
è®¸è®¤é¢ |
| | | Boolean doesItExceedState = doesItExceed(courseId); |
| | | if (!doesItExceedState) { |
| | | throw new ErrorException("å½å课ç¨ç¶ææ æ³è®¤é¢ï¼"); |
| | | } |
| | | // 2ã夿æ¯å¦éå¤ |
| | | PersonTrainingRecord personTrainingRecord1 = baseMapper.selectOne(Wrappers.<PersonTrainingRecord>lambdaQuery() |
| | | .eq(PersonTrainingRecord::getCourseId, courseId) |
| | | .eq(PersonTrainingRecord::getUserId, userId)); |
| | | if (ObjectUtils.isNotEmpty(personTrainingRecord1)) { |
| | | throw new ErrorException("请å¿éå¤è®¤é¢ï¼"); |
| | | } |
| | | // 3ã妿æªé夿°å¢å¹è®è®°å½ |
| | | // true è®¤é¢ |
| | | if (claimAndClaim) { |
| | | PersonTrainingRecord personTrainingRecord = new PersonTrainingRecord(); |
| | | personTrainingRecord.setUserId(userId); |
| | | personTrainingRecord.setCourseId(courseId); |
| | | baseMapper.insert(personTrainingRecord); |
| | | // åæ¶è®¤é¢ |
| | | } else { |
| | | baseMapper.delete(Wrappers.<PersonTrainingRecord>lambdaQuery() |
| | | .eq(PersonTrainingRecord::getUserId, userId) |
| | | .eq(PersonTrainingRecord::getCourseId, courseId)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®è®°å½ |
| | | * @param userId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportTrainingRecord(Integer userId, HttpServletResponse response) { |
| | | // æ¥è¯¢äººåäººä¿¡æ¯ |
| | | PersonTrainingRecordListDto trainingRecordListDto = baseMapper.selectUserTraining(userId); |
| | | |
| | | // æ¥è¯¢å¹è®è®°å½ |
| | | List<TrainingRecordPersonDetailedDto> personDetailedDtos = baseMapper.selectPersonDetailedDtos(userId); |
| | | |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/training-record.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("personnelDetailsLisat", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("traning", trainingRecordListDto); |
| | | put("personnelDetailsLisat", personDetailedDtos); |
| | | }}); |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "人åå¹è®è®°å½å¯¼åº", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public IPage<TrainingRecordPersonDetailedDto> queryPersonnelDetailsOfUserIdAndYear(Page page, Integer userId, Integer year) { |
| | | return baseMapper.queryPersonnelDetailsOfUserIdAndYear(page, userId, year); |
| | | } |
| | | |
| | | @Override |
| | | public void exportTrainingRecordAddTrainingDate(Integer userId, Integer trainingDate, HttpServletResponse response) { |
| | | // æ¥è¯¢äººåäººä¿¡æ¯ |
| | | PersonTrainingRecordListDto trainingRecordListDto = baseMapper.selectUserTraining(userId); |
| | | |
| | | // æ¥è¯¢å¹è®è®°å½ |
| | | List<TrainingRecordPersonDetailedDto> personDetailedDtos = baseMapper.selectPersonDetailedDtosByTrainingDate(userId, trainingDate); |
| | | |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/training-record.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("personnelDetailsLisat", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("traning", trainingRecordListDto); |
| | | put("personnelDetailsLisat", personDetailedDtos); |
| | | }}); |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "人åå¹è®è®°å½å¯¼åº", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void outOfFocusPreservation(PersonTrainingRecord personTrainingRecord) { |
| | | int userId = SecurityUtils.getUserId().intValue(); |
| | | // å¹è®éè¿äºï¼å¹è®è¯¾æ¶è®¡å
¥å°å½å¤©çè¾
å©å·¥æ¶ (è¾
å©å·¥æ¶ ä»¥å æ ¸åå·¥æ¶é½æ·»å ) |
| | | baseMapper.updateById(personTrainingRecord); |
| | | PersonTrainingDetailed personTrainingDetailed = personTrainingDetailedMapper.selectById(personTrainingRecord.getCourseId()); |
| | | if(Objects.nonNull(personTrainingDetailed)) { |
| | | Double classHour = personTrainingDetailed.getClassHour(); // è¯¾æ¶ |
| | | String trainingDateTwo = personTrainingDetailed.getTrainingDateTwo(); // å¹è®æ¥æ |
| | | if(StringUtils.isEmpty(trainingDateTwo)) { |
| | | throw new ErrorException("没æè®¾ç½®å¹è®æ¥ææ æ³æ·»å è¾
å©å·¥æ¶"); |
| | | } |
| | | // æ¯å¦ä»¥åæ·»å è¿äº |
| | | List<AuxiliaryWorkingHoursDay> auxiliaryWorkingHoursDays = auxiliaryWorkingHoursDayMapper.selectList(new LambdaQueryWrapper<AuxiliaryWorkingHoursDay>() |
| | | .eq(AuxiliaryWorkingHoursDay::getNameUser, personTrainingRecord.getUserId()) |
| | | .eq(AuxiliaryWorkingHoursDay::getAuxiliaryProject, personTrainingDetailed.getTrainingContent()) |
| | | .eq(AuxiliaryWorkingHoursDay::getCreateUser, userId) |
| | | .eq(AuxiliaryWorkingHoursDay::getDateTime, trainingDateTwo + " 00:00:00")); |
| | | // å¦æææ°æ® åæ ¼å°±ä¸åå¤ç ä¸åæ ¼å°±å é¤ |
| | | if(CollectionUtils.isNotEmpty(auxiliaryWorkingHoursDays)) { |
| | | if(personTrainingRecord.getExaminationResults().equals("ä¸åæ ¼")) { |
| | | auxiliaryWorkingHoursDayMapper.delete(new LambdaQueryWrapper<AuxiliaryWorkingHoursDay>() |
| | | .eq(AuxiliaryWorkingHoursDay::getNameUser, personTrainingRecord.getUserId()) |
| | | .eq(AuxiliaryWorkingHoursDay::getAuxiliaryProject, personTrainingDetailed.getTrainingContent()) |
| | | .eq(AuxiliaryWorkingHoursDay::getCreateUser, userId) |
| | | .eq(AuxiliaryWorkingHoursDay::getDateTime, trainingDateTwo + " 00:00:00")); |
| | | } |
| | | } |
| | | // æ¯å¦éè¿ |
| | | if(personTrainingRecord.getExaminationResults().equals("åæ ¼") && CollectionUtils.isEmpty(auxiliaryWorkingHoursDays)) { |
| | | // å¦ææ¯æ£æµåç人就ä¸ç¨å |
| | | User user = userMapper.selectById(personTrainingRecord.getUserId()); |
| | | if(user.getDepartLimsId().contains("22")) { |
| | | return; |
| | | } |
| | | // ä¸è课45åé å·¥æ¶60åé |
| | | BigDecimal minute = BigDecimal.valueOf(classHour).multiply(new BigDecimal("45")); // å
·ä½åé |
| | | BigDecimal divide = minute.divide(new BigDecimal("60"),4, RoundingMode.HALF_UP); // å·¥æ¶ |
| | | // æ·»å æ°æ® |
| | | AuxiliaryWorkingHoursDay a = new AuxiliaryWorkingHoursDay(); |
| | | a.setNameUser(personTrainingRecord.getUserId()); // å§åid |
| | | // 项ç®åç§° |
| | | a.setRemarks(personTrainingDetailed.getTrainingContent()); // è¾
å©è¯´æ |
| | | a.setNumber("401"); // ç¼å· |
| | | AuxiliaryWorkingHoursDay auxiliaryWorkingHoursDay = auxiliaryWorkingHoursDayService.selectAuxiliaryWorkingHoursByNumber("401"); |
| | | a.setAuxiliaryProject(auxiliaryWorkingHoursDay.getAuxiliaryProject()); // è¾
å©é¡¹ç®åç§° |
| | | a.setNonproductiveTime(Double.parseDouble(divide.toString())); // è¾
å©å·¥æ¶ |
| | | a.setApprovedWorkingHour(auxiliaryWorkingHoursDay.getApprovedWorkingHour()); // æ ¸åå·¥æ¶ |
| | | a.setAmount(Double.parseDouble(divide.toString())); // æ°é |
| | | String year = trainingDateTwo.split("-")[0]; |
| | | a.setYear(year); // å¹´ |
| | | a.setCreateTime(LocalDateTime.now()); |
| | | a.setUpdateTime(LocalDateTime.now()); |
| | | a.setCreateUser(userId); // å建人id |
| | | a.setUpdateUser(userId); // ä¿®æ¹äººid |
| | | a.setState("å·²æäº¤"); // ç¶æ |
| | | a.setDateTime(trainingDateTwo + " 00:00:00"); // æ¥æ |
| | | // è·åå½åæ¥æ |
| | | LocalDate today = LocalDate.now(); |
| | | // è·åå½åæ¥æç卿¬¡ï¼ä¸å¹´ä¸ç第å å¨ï¼ |
| | | TemporalField weekOfYear = WeekFields.of(Locale.getDefault()).weekOfYear(); |
| | | int weekNumber = today.get(weekOfYear); |
| | | // è·åå½åæ¥æçææï¼ä¸å¨ä¸ç第å å¤©ï¼ |
| | | DayOfWeek dayOfWeek = today.getDayOfWeek(); |
| | | int dayOfWeekNumber = dayOfWeek.getValue(); |
| | | LocalDate now = LocalDate.now(); |
| | | LocalTime parse = LocalTime.parse("00:00:00"); |
| | | LocalDateTime of = LocalDateTime.of(now, parse); |
| | | PerformanceShift performanceShift = shiftMapper.selectOne(new LambdaQueryWrapper<PerformanceShift>().eq(PerformanceShift::getWorkTime, of) |
| | | .eq(PerformanceShift::getUserId, personTrainingRecord.getUserId())); |
| | | if(Objects.nonNull(performanceShift)) { |
| | | a.setShift(performanceShift.getShift()); // çæ¬¡ |
| | | } |
| | | a.setWeek(weekNumber+""); // 卿¬¡ |
| | | a.setWeekDay(dayOfWeekNumber == 7 ? 0+"" : dayOfWeekNumber+""); // ææ |
| | | auxiliaryWorkingHoursDayMapper.insert(a); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * æ£éªè¯¥å¹è®è¯¾ç¨æ¯å¦å
è®¸è®¤é¢ |
| | | * @param courseId 该课ç¨çid |
| | | * @return |
| | | */ |
| | | public Boolean doesItExceed(Integer courseId) { |
| | | PersonTrainingDetailed personTrainingDetailed = personTrainingDetailedService.getById(courseId); |
| | | // åªæç¶æä¸º3å¯ä»¥è®¤é¢ |
| | | if (!personTrainingDetailed.getState().equals(3)) { |
| | | return false; |
| | | } |
| | | SimpleDateFormat sdfWithoutTime = new SimpleDateFormat("yyyy-MM-dd"); |
| | | if(Objects.isNull(personTrainingDetailed.getTrainingDateTwo()) || StringUtils.isEmpty(personTrainingDetailed.getTrainingDateTwo())) { |
| | | throw new ErrorException("æªé
ç½®å¹è®æ¥æ,æ æ³æ¥å"); |
| | | } |
| | | LocalDate parse = LocalDate.parse(personTrainingDetailed.getTrainingDateTwo()); |
| | | Date from = Date.from(parse.atStartOfDay(ZoneId.systemDefault()).toInstant()); |
| | | String originalDateStr = sdfWithoutTime.format(from); |
| | | SimpleDateFormat sdfWithTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | try { |
| | | if(Objects.isNull(personTrainingDetailed.getOpeningTime()) || StringUtils.isEmpty(personTrainingDetailed.getOpeningTime())) { |
| | | throw new ErrorException("æªé
ç½®å
·ä½æ¶é´,æ æ³æ¥å"); |
| | | } |
| | | // æ·»å æ¶åç§åçæ¥æ |
| | | Date addedDate = sdfWithTime.parse(originalDateStr + " " + personTrainingDetailed.getOpeningTime()); |
| | | // è·åå½åæ¶é´ |
| | | Date currentDate = new Date(); |
| | | // æ¥ææªè¶
åºå½åæ¶é´ã |
| | | if (addedDate.after(currentDate) || addedDate.equals(currentDate)) { |
| | | return true; |
| | | // æ¥æå·²è¶
åºå½åæ¶é´ |
| | | } else { |
| | | // å¦ææ¥æè¶
åº æ´æ°è¯¾ç¨ç¶æä¸ºå·²ç»æ |
| | | personTrainingDetailedService.update(Wrappers.<PersonTrainingDetailed>lambdaUpdate() |
| | | .eq(PersonTrainingDetailed::getId, courseId) |
| | | .set(PersonTrainingDetailed::getState, 2)); |
| | | return false; |
| | | } |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¶é´æ ¼å¼é误ï¼"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.ruoyi.common.core.domain.entity.DepartmentLims; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.DateImageUtil; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.personnel.dto.*; |
| | | import com.ruoyi.personnel.excel.PersonTrainingDetailedListener; |
| | | import com.ruoyi.personnel.excel.PersonTrainingDetailedUpload; |
| | | import com.ruoyi.personnel.mapper.*; |
| | | import com.ruoyi.personnel.pojo.*; |
| | | import com.ruoyi.personnel.service.PersonTrainingDetailedService; |
| | | import com.ruoyi.personnel.service.PersonTrainingService; |
| | | import com.ruoyi.system.mapper.DepartmentLimsMapper; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.ss.usermodel.WorkbookFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:11:49 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class PersonTrainingServiceImpl extends ServiceImpl<PersonTrainingMapper, PersonTraining> implements PersonTrainingService { |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private PersonTrainingDetailedService personTrainingDetailedService; |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | |
| | | @Resource |
| | | private PersonTrainingDetailedMapper personTrainingDetailedMapper; |
| | | |
| | | @Resource |
| | | private PersonTrainingRecordMapper personTrainingRecordMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private DepartmentLimsMapper departmentLimsMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public IPage<PersonTrainingDto> personTrainingSelect(Page page, String compilerName, Integer departmentId) { |
| | | // å½åç»å½äºº |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | // User user = Optional.ofNullable(userMapper.selectById(userId)).orElse(new User()); |
| | | // if(3==user.getRoleId()){ |
| | | // departmentId=null; |
| | | // } |
| | | // å¦æä¼ å
¥äºdepartId å°±ä»¥ä¼ å
¥ç为åã å¦ææ²¡æä¼ å
¥å°±ä»¥å½å人æå¨é¨é¨ä¸ºå |
| | | if(Objects.isNull(departmentId)) { |
| | | User user = userMapper.selectById(userId); |
| | | String[] split = user.getDepartLimsId().split(","); |
| | | for(String departId : split) { |
| | | if(departId != "1" && StringUtils.isNotEmpty(departId)) { |
| | | departmentId = Integer.parseInt(departId); |
| | | } |
| | | } |
| | | //todo å¾
ä¿®æ¹ å¦æå½å人æ¯ç®¡çå就坿¥çå
¨é¨ |
| | | // if(user.getRoleId() == 3) { |
| | | // departmentId = null; |
| | | // } |
| | | }else { |
| | | // å¦æä¼ å
¥çdepartIdæ¯1ï¼ä¸å¤©ç§æï¼ ä¸åå¤ç |
| | | if(departmentId == 1) { |
| | | departmentId = null; |
| | | } |
| | | } |
| | | IPage<PersonTrainingDto> personTrainingDtoIPage = baseMapper.personTrainingSelect(page, compilerName, departmentId); |
| | | List<PersonTrainingDto> records = personTrainingDtoIPage.getRecords(); |
| | | for (PersonTrainingDto dto : records) { |
| | | dto.setCurrentId(userId); |
| | | } |
| | | return personTrainingDtoIPage; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param id æç»è¡¨id |
| | | */ |
| | | @Override |
| | | public void deleteDetail(Integer id) { |
| | | personTrainingDetailedMapper.deleteById(id); |
| | | personTrainingRecordMapper.delete(Wrappers.<PersonTrainingRecord>lambdaQuery().eq(PersonTrainingRecord::getCourseId,id)); |
| | | } |
| | | |
| | | @Override |
| | | public void personTrainingImport(MultipartFile file) { |
| | | int userId = SecurityUtils.getUserId().intValue(); |
| | | // 年度计åç¶çº§æ°å¢æ°æ® |
| | | PersonTraining personSupervisePlan = new PersonTraining(); |
| | | String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf(".")); |
| | | personSupervisePlan.setFileName(fileName); |
| | | personSupervisePlan.setCompilerId(userId); // ç¼å¶äºº |
| | | personSupervisePlan.setCompilationDate(LocalDateTime.now()); |
| | | try(Workbook workbook = WorkbookFactory.create(file.getInputStream())) { |
| | | // å¤ä¸ªsheet页 å¾åºåä¸ä¸éä¿¡åçµå |
| | | for (int i = 0; i < workbook.getNumberOfSheets(); i++) { |
| | | String sheetName = workbook.getSheetName(i); |
| | | // æ ¹æ®sheetåç§°æ¥åå«ç»å¯¹åºçå®éªå®¤èµå¼ |
| | | DepartmentLims departmentLims = departmentLimsMapper.selectOne(Wrappers.<DepartmentLims>lambdaQuery().like(DepartmentLims::getName, sheetName)); |
| | | if(Objects.nonNull(departmentLims)) { |
| | | personSupervisePlan.setDepartId(departmentLims.getId()); |
| | | // ç¼å¶äººçµåçæ¯è¡éªé éä¿¡çæ¯è¢é¨é² |
| | | if(departmentLims.getId().equals(18)) { |
| | | personSupervisePlan.setCompilerId(userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getName,"è¢é¨é²")).get(0).getId()); |
| | | } else if (departmentLims.getId().equals(19)) { |
| | | personSupervisePlan.setCompilerId(userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getName,"è¡éªé")).get(0).getId()); |
| | | } |
| | | baseMapper.insert(personSupervisePlan); |
| | | // 年度计å详æ
æ°å¢ |
| | | PersonTrainingDetailedListener personSupervisePlanDetailsListener = new PersonTrainingDetailedListener(personTrainingDetailedService,personSupervisePlan.getId()); |
| | | personSupervisePlanDetailsListener.setPlanId(personSupervisePlan.getId()); |
| | | //EasyExcel.read(file.getInputStream(), PersonTrainingDetailedUpload.class, personSupervisePlanDetailsListener).sheet().doRead(); |
| | | EasyExcel.read(file.getInputStream(),PersonTrainingDetailedUpload.class,new PersonTrainingDetailedListener(personTrainingDetailedService,personSupervisePlan.getId())) |
| | | .headRowNumber(3).ignoreEmptyRow(false).sheet(sheetName).doRead(); |
| | | // æ·»å 䏿¬¡å æ¸
空id 鲿¢åºç°éå¤key |
| | | personSupervisePlan.setId(null); |
| | | |
| | | } |
| | | } |
| | | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void personTrainingDelete(Integer id) { |
| | | personTrainingDetailedService.remove(new LambdaQueryWrapper<PersonTrainingDetailed>().eq(PersonTrainingDetailed::getPlanId,id)); |
| | | baseMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void reviewAnnualPersonnelTraining(PersonTrainingUpdateDto personTrainingUpdateDto) { |
| | | PersonTraining personTraining = new PersonTraining(); |
| | | personTraining.setId(personTrainingUpdateDto.getId()); |
| | | // 妿æ¯éä¿¡ å®¡æ ¸äººå°±æ¯åç£ çµåç忝å建德 |
| | | PersonTraining personTraining1 = baseMapper.selectById(personTrainingUpdateDto.getId()); |
| | | if(personTraining1.getDepartId().equals(19)) { |
| | | personTraining.setReviewerId(userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getName,"å建德")).get(0).getId()); |
| | | }else { |
| | | personTraining.setReviewerId(userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getName,"åç£")).get(0).getId()); |
| | | } |
| | | personTraining.setAuditDate(LocalDateTime.now()); |
| | | personTraining.setAuditRemarks(personTrainingUpdateDto.getRemarks()); |
| | | personTraining.setReviewerStatus(personTrainingUpdateDto.getStatus()); |
| | | baseMapper.updateById(personTraining); |
| | | } |
| | | |
| | | @Override |
| | | public void approveAnnualPersonnelTraining(PersonTrainingUpdateDto personTrainingUpdateDto) { |
| | | Integer id = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getName, "许å")).get(0).getId(); |
| | | LambdaUpdateWrapper<PersonTraining> wrapper = Wrappers.<PersonTraining>lambdaUpdate() |
| | | .eq(PersonTraining::getId, personTrainingUpdateDto.getId()) |
| | | .set(PersonTraining::getApproverId, id) // åªè½æ¯è®¸å |
| | | .set(PersonTraining::getApprovalDate, LocalDateTime.now()) |
| | | .set(PersonTraining::getApprovalRemarks, personTrainingUpdateDto.getRemarks()) |
| | | .set(PersonTraining::getApprovalStatus, personTrainingUpdateDto.getStatus()); |
| | | if (personTrainingUpdateDto.getStatus().equals(2)) { |
| | | wrapper.set(PersonTraining::getReviewerStatus, null); |
| | | } |
| | | baseMapper.update(new PersonTraining(), wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®è®¡å |
| | | * @param id |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportPersonTraining(Integer id, HttpServletResponse response) { |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | PersonTraining personTraining = baseMapper.selectById(id); |
| | | |
| | | //è·åæäº¤äººçç¾åå°å |
| | | String writeUrl = userMapper.selectById(personTraining.getCompilerId()).getSignatureUrl(); |
| | | if (ObjectUtils.isEmpty(writeUrl) || writeUrl.equals("")) { |
| | | throw new ErrorException("æ¾ä¸å°æ£éªäººçç¾å"); |
| | | } |
| | | |
| | | //è·å夿 ¸äººçç¾åå°å |
| | | String examineUrl = null; |
| | | if (personTraining.getReviewerId() != null) { |
| | | examineUrl = userMapper.selectById(personTraining.getReviewerId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(examineUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å¤æ ¸äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //è·åæ¹å人çç¾åå°å |
| | | String ratifyUrl = null; |
| | | if (personTraining.getApproverId() != null) { |
| | | ratifyUrl = userMapper.selectById(personTraining.getApproverId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(ratifyUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å¤æ ¸äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<PersonTrainingDetailedDto> detailedDtos = personTrainingDetailedMapper.selectTrainingList(id); |
| | | |
| | | int index = 1; |
| | | for (PersonTrainingDetailedDto detailedDto : detailedDtos) { |
| | | detailedDto.setTrainingLecturerName(detailedDto.getTrainingLecturerId()); |
| | | if (detailedDto.getTrainingDate() != null) { |
| | | SimpleDateFormat sdfWithoutTime = new SimpleDateFormat("yyyy-MM-dd"); |
| | | // detailedDto.setTrainingDateString(sdfWithoutTime.format(detailedDto.getTrainingDate())); |
| | | detailedDto.setTrainingDateString(detailedDto.getTrainingDate()); |
| | | } |
| | | DepartmentLims departmentLims = departmentLimsMapper.selectById(detailedDto.getHoldingDepartment()); |
| | | if(Objects.nonNull(departmentLims)) { |
| | | detailedDto.setOrganizingDepartment(departmentLims.getName()); |
| | | } |
| | | detailedDto.setIndex(index); |
| | | index++; |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/person-training.docx"); |
| | | String finalExamineUrl = examineUrl; |
| | | String finalRatifyUrl = ratifyUrl; |
| | | Configure configure = Configure.builder() |
| | | .bind("trainingDetailedList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("year", personTraining.getCreateTime().getYear()); |
| | | put("trainingDetailedList", detailedDtos); |
| | | put("writeUrl", StringUtils.isNotBlank(writeUrl) ? Pictures.ofLocal(imgUrl + "/" + writeUrl).create() : null); |
| | | put("examineUrl", StringUtils.isNotBlank(finalExamineUrl) ? Pictures.ofLocal(imgUrl + "/" + finalExamineUrl).create() : null); |
| | | put("ratifyUrl", StringUtils.isNotBlank(finalRatifyUrl) ? Pictures.ofLocal(imgUrl + "/" + finalRatifyUrl).create() : null); |
| | | put("writeDateUrl", personTraining.getCompilationDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(personTraining.getCompilationDate())).create() : null); |
| | | put("examineDateUrl", personTraining.getAuditDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(personTraining.getAuditDate())).create() : null); |
| | | put("ratifyDateUrl", personTraining.getApprovalDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(personTraining.getApprovalDate())).create() : null); |
| | | }}); |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "人åå¹è®è®¡å导åº", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®ä¸èæ ¸è®°å½ |
| | | * @param id |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportPersonTrainingRecord(Integer id, HttpServletResponse response) { |
| | | // æ¥è¯¢äººåå¹è®æç» |
| | | PersonTrainingDetailedDto detailedDto = personTrainingDetailedMapper.selectTrainingDetail(id); |
| | | detailedDto.setTrainingContent(detailedDto.getTrainingAbstract()); |
| | | detailedDto.setTrainingLecturerName(detailedDto.getTrainingLecturerId()); // å¹è®è®²å¸ |
| | | detailedDto.setTrainingDateString(detailedDto.getTrainingDateTwo()); // å¹è®æ¥æ |
| | | // æ¥è¯¢å¹è®ç人å |
| | | List<PersonTrainingRecordDto> recordDtos = personTrainingRecordMapper.selectListByTrainingDetailedId(id); |
| | | |
| | | List<TrainingRecordExportDto> exportDtoList = new ArrayList<>(); |
| | | TrainingRecordExportDto exportDto = new TrainingRecordExportDto(); |
| | | |
| | | int count = 0; |
| | | for (PersonTrainingRecordDto recordDto : recordDtos) { |
| | | switch (count) { |
| | | case 0: |
| | | exportDto.setUserName1(recordDto.getUserName()); |
| | | exportDto.setDepartment1(recordDto.getDepartment()); |
| | | exportDto.setExaminationResults1(recordDto.getExaminationResults()); |
| | | count ++; |
| | | break; |
| | | case 1: |
| | | exportDto.setUserName2(recordDto.getUserName()); |
| | | exportDto.setDepartment2(recordDto.getDepartment()); |
| | | exportDto.setExaminationResults2(recordDto.getExaminationResults()); |
| | | exportDtoList.add(exportDto); |
| | | exportDto = new TrainingRecordExportDto(); |
| | | count = 0; |
| | | break; |
| | | } |
| | | } |
| | | exportDtoList.add(exportDto); |
| | | |
| | | // è´¨éè´è´£äºº |
| | | String assessmentUserUrl = null; |
| | | if (detailedDto.getAssessmentUserId() != null) { |
| | | assessmentUserUrl = userMapper.selectById(detailedDto.getAssessmentUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(assessmentUserUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°è¯ä»·äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/person-training-record.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("trainingRecordsList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | String finalAssessmentUserUrl = assessmentUserUrl; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("trainingDetail", detailedDto); |
| | | put("trainingRecordsList", exportDtoList); |
| | | put("assessmentUserUrl", StringUtils.isNotBlank(finalAssessmentUserUrl) ? Pictures.ofLocal(imgUrl + "/" + finalAssessmentUserUrl).create() : null); |
| | | }}); |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "å¹è®ä¸èæ ¸è®°å½å¯¼åº", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonBasicInfoMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonBasicInfo"> |
| | | <id column="id" property="id" /> |
| | | <result column="current_state" property="currentState" /> |
| | | <result column="entry_time" property="entryTime" /> |
| | | <result column="post" property="post" /> |
| | | <result column="professional_title" property="professionalTitle" /> |
| | | <result column="sex" property="sex" /> |
| | | <result column="personnel_classification" property="personnelClassification" /> |
| | | <result column="date_birth" property="dateBirth" /> |
| | | <result column="identity_card" property="identityCard" /> |
| | | <result column="nation" property="nation" /> |
| | | <result column="political_status" property="politicalStatus" /> |
| | | <result column="official_academic_redentials" property="officialAcademicRedentials" /> |
| | | <result column="graduation_time1" property="graduationTime1" /> |
| | | <result column="graduated_institutions1" property="graduatedInstitutions1" /> |
| | | <result column="major1" property="major1" /> |
| | | <result column="graduation_time2" property="graduationTime2" /> |
| | | <result column="graduated_institutions2" property="graduatedInstitutions2" /> |
| | | <result column="major2" property="major2" /> |
| | | <result column="telephone" property="telephone" /> |
| | | <result column="end_planned_internship" property="endPlannedInternship" /> |
| | | <result column="end_practical_practice" property="endPracticalPractice" /> |
| | | <result column="date_departure" property="dateDeparture" /> |
| | | <result column="desktop_picture" property="desktopPicture" /> |
| | | <result column="attachment_information" property="attachmentInformation" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="current_position" property="currentPosition" /> |
| | | </resultMap> |
| | | |
| | | <select id="selectLimsUser" resultType="com.ruoyi.common.core.dto.DepartmentDto"> |
| | | SELECT u.id userId, u.name, SUBSTRING_INDEX(SUBSTRING_INDEX(u.depart_lims_id, ',', -2), ',', 1) AS fatherId |
| | | FROM user u |
| | | where u.is_custom = 0 |
| | | and u.depart_lims_id is not null |
| | | and u.depart_lims_id != '' |
| | | </select> |
| | | |
| | | <select id="getCNASPersonnelInfo" resultType="com.ruoyi.personnel.dto.PersonBasicInfoDto"> |
| | | SELECT cpbi.*,u.* |
| | | FROM user u |
| | | left join cnas_person_basic_info cpbi on cpbi.user_id = u.id |
| | | where u.id = #{userId} |
| | | </select> |
| | | |
| | | <select id="basicInformationOfPersonnelSelectPage" resultType="java.util.Map"> |
| | | select |
| | | u.id, |
| | | u.name, |
| | | u.account, |
| | | cpbi.sex, |
| | | cpbi.date_birth, |
| | | u.age, |
| | | cpbi.entry_time, |
| | | cpbi.personnel_classification, |
| | | cpbi.official_academic_redentials, |
| | | cpbi.current_position, |
| | | u.phone, |
| | | cpbi.date_departure, |
| | | cpbi.current_state, |
| | | u1.name createUser |
| | | from user u |
| | | left join cnas_person_basic_info cpbi on cpbi.user_id = u.id |
| | | left join user u1 on u1.id = u.create_by |
| | | where FIND_IN_SET(#{departmentId},u.depart_lims_id) |
| | | </select> |
| | | <select id="selectPersonBasecInfoAndUser" resultType="java.util.Map"> |
| | | select |
| | | u.id userId, |
| | | u.`name` name, |
| | | u.account account, |
| | | DATE_FORMAT(cpbi.entry_time, '%Y-%m-%d') groupTime, |
| | | DATE_FORMAT(cpbi.end_practical_practice, '%Y-%m-%d') endPracticalPracticeStr, |
| | | cpbi.native_place nativePlace, |
| | | cpbi.identity_card identityCard, |
| | | cpbi.id_address idAddress, |
| | | u.phone telephone, |
| | | cpbi.graduated_institutions1 graduatedInstitutions1, |
| | | cpbi.major1 major1, |
| | | DATE_FORMAT(cpbi.graduation_time1, '%Y-%m-%d') graduationTime1, |
| | | cpbi.official_academic_redentials officialAcademicRedentials, |
| | | cpbi.highest_degree highestDegree, |
| | | cpbi.professional_title professionalTitle, |
| | | cpbi.emergency_contact emergencyContact, |
| | | cpbi.emergency_contact_phone emergencyContactPhone |
| | | from user u |
| | | left join cnas_person_basic_info cpbi on cpbi.user_id = u.id |
| | | left join user u1 on u1.id = u.create_by |
| | | <where> |
| | | FIND_IN_SET(#{departmentId},u.depart_lims_id) |
| | | <if test="name != null and name != ''"> |
| | | and u.name like concat('%',#{name},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonCommunicationAbilityMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonCommunicationAbility"> |
| | | <id column="id" property="id" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="communication_time" property="communicationTime" /> |
| | | <result column="communication_place" property="communicationPlace" /> |
| | | <result column="communication_content" property="communicationContent" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | |
| | | <select id="personPersonCommunicationAbilityPage" resultType="com.ruoyi.personnel.dto.PersonCommunicationAbilityDto"> |
| | | select cpca.*, us.name create_user_name |
| | | from cnas_person_communication_ability cpca |
| | | left join user us on cpca.create_user = us.id |
| | | <where> |
| | | <if test="userId != null and userId != ''"> |
| | | and FIND_IN_SET(#{userId},cpca.user_id) |
| | | </if> |
| | | <if test="departLimsId != null and departLimsId != ''"> |
| | | and FIND_IN_SET(#{departLimsId},us.depart_lims_id) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonJobResponsibilitiesMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonJobResponsibilities"> |
| | | <id column="id" property="id" /> |
| | | <result column="post_name" property="postName" /> |
| | | <result column="job_objective" property="jobObjective" /> |
| | | <result column="job_responsibilities" property="jobResponsibilities" /> |
| | | <result column="incumbent_id" property="incumbentId" /> |
| | | <result column="submitting_operator" property="submittingOperator" /> |
| | | <result column="submitting_date" property="submittingDate" /> |
| | | <result column="supervisor_id" property="supervisorId" /> |
| | | <result column="incumbent_operator" property="incumbentOperator" /> |
| | | <result column="incumbent_date" property="incumbentDate" /> |
| | | <result column="supervisor_operator" property="supervisorOperator" /> |
| | | <result column="supervisor_date" property="supervisorDate" /> |
| | | </resultMap> |
| | | |
| | | <select id="personJobResponsibilitiesSelect" resultType="com.ruoyi.personnel.dto.PersonJobResponsibilitiesDto"> |
| | | select cpt.*, u.name incumbent_name, su.name supervisor_name, dl.name depart_lims_name, u.account |
| | | from cnas_person_job_responsibilities cpt |
| | | left join user u on cpt.incumbent_id = u.id |
| | | left join user su on cpt.supervisor_id = su.id |
| | | left join department_lims dl on dl.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u.depart_lims_id, ',', -2), ',', 1) |
| | | <where> |
| | | <if test="userId != null and userId != ''"> |
| | | and cpt.incumbent_id = #{userId} |
| | | </if> |
| | | <if test="departmentId != null and departmentId != ''"> |
| | | and FIND_IN_SET(#{departmentId}, u.depart_lims_id) |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and u.name like concat('%', #{userName}, '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonPersonnelCapacityMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonPersonnelCapacity"> |
| | | <id column="id" property="id" /> |
| | | <result column="academic_degree" property="academicDegree" /> |
| | | <result column="academic_conform_not" property="academicConformNot" /> |
| | | <result column="academic_remarks" property="academicRemarks" /> |
| | | <result column="related_years" property="relatedYears" /> |
| | | <result column="related_years_conform_not" property="relatedYearsConformNot" /> |
| | | <result column="related_years_remarks" property="relatedYearsRemarks" /> |
| | | <result column="related_training" property="relatedTraining" /> |
| | | <result column="related_training_conform_not" property="relatedTrainingConformNot" /> |
| | | <result column="related_training_remarks" property="relatedTrainingRemarks" /> |
| | | <result column="relevant_experience" property="relevantExperience" /> |
| | | <result column="relevant_experience_conform_not" property="relevantExperienceConformNot" /> |
| | | <result column="relevant_experience_remarks" property="relevantExperienceRemarks" /> |
| | | <result column="work_license" property="workLicense" /> |
| | | <result column="work_license_conform_not" property="workLicenseConformNot" /> |
| | | <result column="work_license_remarks" property="workLicenseRemarks" /> |
| | | <result column="job_responsibilities" property="jobResponsibilities" /> |
| | | <result column="job_responsibilities_conform_not" property="jobResponsibilitiesConformNot" /> |
| | | <result column="job_responsibilities_remarks" property="jobResponsibilitiesRemarks" /> |
| | | <result column="comprehensive_assessment" property="comprehensiveAssessment" /> |
| | | <result column="submit_operating_personnel_id" property="submitOperatingPersonnelId" /> |
| | | <result column="submit_date" property="submitDate" /> |
| | | <result column="confirm_operating_personnel_id" property="confirmOperatingPersonnelId" /> |
| | | <result column="confirm_date" property="confirmDate" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="user_id" property="userId" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="BaseResultMapDto" type="com.ruoyi.personnel.dto.PersonPersonnelCapacityDto" extends="BaseResultMap"> |
| | | <result column="submit_operating_personnel_name" property="submitOperatingPersonnelName" /> |
| | | <result column="confirm_operating_personnel_name" property="confirmOperatingPersonnelName" /> |
| | | <result column="user_name" property="userName" /> |
| | | <result column="place_work" property="placeWork" /> |
| | | <result column="post_name" property="postName" /> |
| | | <result column="responsibilities" property="responsibilities" /> |
| | | <result column="major" property="major" /> |
| | | </resultMap> |
| | | |
| | | <select id="personPersonnelCapacityPage" resultMap="BaseResultMapDto"> |
| | | select cppc.*, |
| | | u1.name submit_operating_personnel_name, |
| | | u2.name confirm_operating_personnel_name, |
| | | u3.name user_name, |
| | | cpbi.post_name, |
| | | p.place_work, |
| | | ecp.responsibilities, |
| | | TRIM(',' FROM CONCAT(cpbi.major1, ',', cpbi.major2)) AS major |
| | | from cnas_person_personnel_capacity cppc |
| | | left join user u1 on cppc.submit_operating_personnel_id = u1.id |
| | | left join user u2 on cppc.confirm_operating_personnel_id = u2.id |
| | | left join user u3 on cppc.user_id = u3.id |
| | | -- åå²ä½ |
| | | left join cnas_person_basic_info cpbi on cpbi.user_id = cppc.user_id |
| | | -- å人åè½åçå·¥ä½ç»å |
| | | left join (select GROUP_CONCAT(cptr.place_work) place_work, cptr.user_id from cnas_person_track_record cptr |
| | | where cptr.place_work like concat('%' ,'ä¸å¤©', '%') |
| | | GROUP BY cptr.user_id) p on u3.id = p.user_id |
| | | -- å人åè½åçå²ä½èè´£ |
| | | left join (SELECT GROUP_CONCAT(e.label) responsibilities, cppc.id |
| | | from cnas_person_personnel_capacity cppc |
| | | left join enums e on FIND_IN_SET(e.value, cppc.job_responsibilities) |
| | | where e.category = 'å²ä½èè´£' |
| | | GROUP BY cppc.id) ecp on ecp.id = cppc.id |
| | | <where> |
| | | <if test="userId != null and userId != ''"> |
| | | and cppc.user_id = #{userId} |
| | | </if> |
| | | <if test="departLimsId != null and departLimsId != ''"> |
| | | and FIND_IN_SET(#{departLimsId}, u3.depart_lims_id) |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and u3.name like concat('%', #{userName}, '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- æ¥è¯¢äººåè½åæ¥å£ --> |
| | | <select id="selectExportPersonnelCapacity" |
| | | resultType="com.ruoyi.personnel.dto.PersonPersonnelCapacityExportDto"> |
| | | select cppc.*, |
| | | cpbi.post postName, |
| | | u1.name userName, |
| | | cpbi.official_academic_redentials, |
| | | cpbi.major1, |
| | | cpbi.professional_title, |
| | | p.place_work, |
| | | TRIM(',' FROM CONCAT(cpbi.major1, ',', cpbi.major2)) AS major, |
| | | case when cppc.academic_conform_not = 1 then 'â' |
| | | else 'â¡' end academicConformNot1,-- å¦å |
| | | case when cppc.academic_conform_not = 2 then 'â' |
| | | else 'â¡' end academicConformNot2, |
| | | case when cppc.academic_conform_not = 3 then 'â' |
| | | else 'â¡' end academicConformNot3, |
| | | case when cppc.related_years_conform_not = 1 then 'â' |
| | | else 'â¡' end relatedYearsConformNot1,-- ç¸å
³å¹´é |
| | | case when cppc.related_years_conform_not = 2 then 'â' |
| | | else 'â¡' end relatedYearsConformNot2, |
| | | case when cppc.related_years_conform_not = 3 then 'â' |
| | | else 'â¡' end relatedYearsConformNot3, |
| | | case when cppc.related_training_conform_not = 1 then 'â' |
| | | else 'â¡' end relatedTrainingConformNot1,-- ç¸å
³å¹è® |
| | | case when cppc.related_training_conform_not = 2 then 'â' |
| | | else 'â¡' end relatedTrainingConformNot2, |
| | | case when cppc.related_training_conform_not = 3 then 'â' |
| | | else 'â¡' end relatedTrainingConformNot3, |
| | | case when cppc.relevant_experience_conform_not = 1 then 'â' |
| | | else 'â¡' end relevantExperienceConformNot1,-- ç¸å
³ç»éª |
| | | case when cppc.relevant_experience_conform_not = 2 then 'â' |
| | | else 'â¡' end relevantExperienceConformNot2, |
| | | case when cppc.relevant_experience_conform_not = 3 then 'â' |
| | | else 'â¡' end relevantExperienceConformNot3, |
| | | case when cppc.work_license_conform_not = 1 then 'â' |
| | | else 'â¡' end workLicenseConformNot1,-- ä¸å²è¯ |
| | | case when cppc.work_license_conform_not = 2 then 'â' |
| | | else 'â¡' end workLicenseConformNot2, |
| | | case when cppc.work_license_conform_not = 3 then 'â' |
| | | else 'â¡' end workLicenseConformNot3, |
| | | case when cppc.job_responsibilities_conform_not = 1 then 'â' |
| | | else 'â¡' end jobResponsibilitiesConformNot1,-- å²ä½èè´£ |
| | | case when cppc.job_responsibilities_conform_not = 2 then 'â' |
| | | else 'â¡' end jobResponsibilitiesConformNot2, |
| | | case when cppc.job_responsibilities_conform_not = 3 then 'â' |
| | | else 'â¡' end jobResponsibilitiesConformNot3, |
| | | case when cppc.comprehensive_assessment = 'Qualified this position' then 'â' |
| | | else 'â¡' end comprehensiveAssessment1,-- 综åè¯ä»· |
| | | case when cppc.comprehensive_assessment = 'You can work while training' then 'â' |
| | | else 'â¡' end comprehensiveAssessment2, |
| | | case when cppc.comprehensive_assessment = 'Iconpetent for the position' then 'â' |
| | | else 'â¡' end comprehensiveAssessment3, |
| | | case when find_in_set(1, cppc.job_responsibilities) then 'â' |
| | | else 'â¡' end jobResponsibilities1, |
| | | case when find_in_set(2, cppc.job_responsibilities) then 'â' |
| | | else 'â¡' end jobResponsibilities2, |
| | | case when find_in_set(3, cppc.job_responsibilities) then 'â' |
| | | else 'â¡' end jobResponsibilities3, |
| | | case when find_in_set(4, cppc.job_responsibilities) then 'â' |
| | | else 'â¡' end jobResponsibilities4, |
| | | case when find_in_set(5, cppc.job_responsibilities) then 'â' |
| | | else 'â¡' end jobResponsibilities5, |
| | | case when find_in_set(6, cppc.job_responsibilities) then 'â' |
| | | else 'â¡' end jobResponsibilities6, |
| | | case when find_in_set(7, cppc.job_responsibilities) then 'â' |
| | | else 'â¡' end jobResponsibilities7, |
| | | case when find_in_set(8, cppc.job_responsibilities) then 'â' |
| | | else 'â¡' end jobResponsibilities8, |
| | | case when find_in_set(9, cppc.job_responsibilities) then 'â' |
| | | else 'â¡' end jobResponsibilities9, |
| | | case when find_in_set(10, cppc.job_responsibilities) then 'â' |
| | | else 'â¡' end jobResponsibilities10 |
| | | from cnas_person_personnel_capacity cppc |
| | | left join user u1 on cppc.user_id = u1.id |
| | | left join cnas_person_basic_info cpbi on cpbi.user_id = cppc.user_id |
| | | left join (select GROUP_CONCAT(cptr.place_work) place_work, cptr.user_id |
| | | from cnas_person_track_record cptr |
| | | where cptr.place_work like concat('%', 'ä¸å¤©', '%') |
| | | GROUP BY cptr.user_id) p on u1.id = p.user_id |
| | | where cppc.id = #{id} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonPostAuthorizationRecordMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonPostAuthorizationRecord"> |
| | | <id column="id" property="id" /> |
| | | <result column="certificate_number" property="certificateNumber" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="post" property="post" /> |
| | | <result column="operation_type" property="operationType" /> |
| | | <result column="file_name" property="fileName" /> |
| | | <result column="system_file_name" property="systemFileName" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="num1" property="num1" /> |
| | | <result column="num2" property="num2" /> |
| | | </resultMap> |
| | | |
| | | <select id="personPostAuthorizationRecordPage" resultType="com.ruoyi.personnel.dto.PersonPostAuthorizationRecordDto"> |
| | | select cppar.*, us.name create_user_name, u.account account, u.name user_name |
| | | from cnas_person_post_authorization_record cppar |
| | | left join user u on cppar.user_id = u.id |
| | | left join user us on cppar.create_user = us.id |
| | | <where> |
| | | <if test="userId != null and userId != ''"> |
| | | and cppar.user_id = #{userId} |
| | | </if> |
| | | <if test="departLimsId != null and departLimsId != ''"> |
| | | and FIND_IN_SET(#{departLimsId},u.depart_lims_id) |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and u.name like concat('%', #{userName}, '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonRewardPunishmentRecordMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonRewardPunishmentRecord"> |
| | | <id column="id" property="id" /> |
| | | <result column="reward_punish_level" property="rewardPunishLevel" /> |
| | | <result column="reward_punish_name" property="rewardPunishName" /> |
| | | <result column="reward_punish_time" property="rewardPunishTime" /> |
| | | <result column="reward_punish_work_unit" property="rewardPunishWorkUnit" /> |
| | | <result column="reward_punish_content" property="rewardPunishContent" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="create_user" property="createUser" /> |
| | | </resultMap> |
| | | |
| | | <select id="rewardPunishmentPage" resultType="com.ruoyi.personnel.dto.PersonRewardPunishmentRecordDto"> |
| | | select cprpr.*, us.name create_user_name, u.account account, u.name user_name |
| | | from cnas_person_reward_punishment_record cprpr |
| | | left join user u on cprpr.user_id = u.id |
| | | left join user us on cprpr.create_user = us.id |
| | | <where> |
| | | <if test="userId != null and userId != ''"> |
| | | and cprpr.user_id = #{userId} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and u.name like concat('%', #{userName}, '%') |
| | | </if> |
| | | <if test="startTime != null and endTime != null"> |
| | | AND DATE(cprpr.reward_punish_time) BETWEEN #{startTime} AND #{endTime} |
| | | </if> |
| | | <if test="departmentId != null and departmentId != ''"> |
| | | and FIND_IN_SET(#{departmentId}, u.depart_lims_id) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="rewardPunishmentExport" resultType="com.ruoyi.personnel.excel.PersonRewardPunishmentRecordExcel"> |
| | | select cprpr.*, us.name create_user_name, u.account account, u.name user_name |
| | | from cnas_person_reward_punishment_record cprpr |
| | | left join user u on cprpr.user_id = u.id |
| | | left join user us on cprpr.create_user = us.id |
| | | <where> |
| | | <if test="userId != null and userId != ''"> |
| | | and cprpr.user_id = #{userId} |
| | | </if> |
| | | <if test="departmentId != null and departmentId != ''"> |
| | | and FIND_IN_SET(#{departmentId},u.depart_lims_id) |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and u.name like concat('%', #{userName}, '%') |
| | | </if> |
| | | <if test="startTime != null and endTime != null"> |
| | | AND DATE(cprpr.reward_punish_time) BETWEEN #{startTime} AND #{endTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonSupervisePlanDetailsMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonSupervisePlanDetails"> |
| | | <id column="id" property="id" /> |
| | | <result column="supervise_date" property="superviseDate" /> |
| | | <result column="supervise_des" property="superviseDes" /> |
| | | <result column="supervise_person" property="supervisePerson" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="supervise_project" property="superviseProject" /> |
| | | <result column="supervise_reason" property="superviseReason" /> |
| | | </resultMap> |
| | | |
| | | <select id="pageByDate" resultType="com.ruoyi.personnel.dto.PersonSupervisePlanDetailsDto"> |
| | | SELECT |
| | | cpspd.id, |
| | | DATE_FORMAT( cpspd.supervise_date, '%Y-%m-%d' ) supervise_date, |
| | | cpspd.supervise_des, |
| | | cpspd.supervise_person, |
| | | cpspd.remarks, |
| | | cpspd.create_time, |
| | | cpspd.create_user, |
| | | cpspd.supervise_project, |
| | | cpspd.supervise_reason, |
| | | cpspd.plan_id, |
| | | u.NAME create_by |
| | | from cnas_person_supervise_plan_details cpspd |
| | | left join user u on u.id = cpspd.create_user |
| | | where cpspd.plan_id = #{planId} |
| | | <if test="date != null and date != ''"> |
| | | and date_format(cpspd.supervise_date,'%Y-%m-%d') = #{date} |
| | | </if> |
| | | <if test="project != null and project != ''"> |
| | | and cpspd.supervise_project like concat('%', #{project}, '%') |
| | | </if> |
| | | order by cpspd.id ASC |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonSupervisePlanMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonSupervisePlan"> |
| | | <id column="id" property="id" /> |
| | | <result column="file_name" property="fileName" /> |
| | | <result column="organization_person_id" property="organizationPersonId" /> |
| | | <result column="organization_date" property="organizationDate" /> |
| | | <result column="approval_id" property="approvalId" /> |
| | | <result column="approval_date" property="approvalDate" /> |
| | | <result column="approval_status" property="approvalStatus" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | <select id="pageByPerson" resultType="com.ruoyi.personnel.dto.PersonSupervisePlanDto"> |
| | | select cpsp.*, u1.name organization_person_name, u2.name approval_name, u3.name create_name |
| | | from cnas_person_supervise_plan cpsp |
| | | left join user u1 on cpsp.organization_person_id = u1.id |
| | | left join user u2 on cpsp.approval_id = u2.id |
| | | left join user u3 on cpsp.create_user = u3.id |
| | | <where> |
| | | <if test="organizationPerson != null and organizationPerson != ''"> |
| | | and u1.name =#{organizationPerson} |
| | | </if> |
| | | <if test="departId !='' and departId != null"> |
| | | and cpsp.depart_id = #{departId} |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonSupervisionControlSheetMapper"> |
| | | |
| | | <!-- æ¥è¯¢çç£è®°å½æ§å¶å --> |
| | | |
| | | <select id="selectSupervisionControl" |
| | | resultType="com.ruoyi.personnel.dto.PersonSupervisionControlSheetExportDto"> |
| | | select scs.*, |
| | | dl1.name occurrenceDepartmentString, |
| | | u1.name departmentHead, |
| | | dl2.name discovererDepartment, |
| | | DATE_FORMAT(scs.discoverer_date, '%Y-%m-%d') discovererDateString, |
| | | u3.name supervisedPerson, |
| | | dl4.name responsibleDepartment, |
| | | DATE_FORMAT(scs.responsible_department_date, '%Y-%m-%d') responsibleDepartmentDateString, |
| | | DATE_FORMAT(scs.corrective_measure_date, '%Y-%m-%d') correctiveMeasureDateString, |
| | | DATE_FORMAT(scs.quality_supervisor_date, '%Y-%m-%d') qualitySupervisorDateString, |
| | | case when scs.corrective_measure_follow_tracks = 1 then 'â' |
| | | else 'â¡' end correctiveMeasureFollowTracksYes, |
| | | case when scs.corrective_measure_follow_tracks = 2 then 'â' |
| | | else 'â¡' end correctiveMeasureFollowTracksNo, |
| | | case when scs.whether_inform_customer = 1 then 'â' |
| | | else 'â¡' end whetherInformCustomerYes, |
| | | case when scs.whether_inform_customer = 2 then 'â' |
| | | else 'â¡' end whetherInformCustomerNo, |
| | | case when scs.whether_resume_work = 1 then 'â' |
| | | else 'â¡' end whetherResumeWorkYes, |
| | | case when scs.whether_resume_work = 2 then 'â' |
| | | else 'â¡' end whetherResumeWorkNo |
| | | from cnas_person_supervision_control_sheet scs |
| | | left join user u1 on u1.id = scs.department_head_id -- é¨é¨è´è´£äºº |
| | | left join department_lims dl1 on find_in_set(dl1.id, u1.depart_lims_id) and dl1.id != 1 |
| | | left join user u2 on u2.id = scs.discoverer_id -- åç°é¨é¨ |
| | | left join department_lims dl2 on find_in_set(dl2.id, u2.depart_lims_id) and dl2.id != 1 |
| | | left join user u3 on u3.id = scs.supervised_person_id -- 被çç£äºº |
| | | left join user u4 on u4.id = scs.responsible_department_person_id -- 责任é¨é¨ |
| | | left join department_lims dl4 on find_in_set(dl4.id, u4.depart_lims_id) and dl4.id != 1 |
| | | where scs.supervision_record_id = #{supervisionRecordId} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonSupervisionProcessingSheetMapper"> |
| | | |
| | | <!-- æ¥è¯¢äººåçç£è®°å½å¤çå --> |
| | | <select id="selectProcessingSheet" resultType="com.ruoyi.personnel.dto.PersonSupervisionProcessingSheetDto"> |
| | | select sps.*, |
| | | dl1.name proposing_department, |
| | | dl2.name cause_analysis_department, |
| | | dl3.name corrective_action, |
| | | dl4.name verification_department, |
| | | DATE_FORMAT(sps.proposing_department_date, '%Y-%m-%d') AS proposing_department_date_string, |
| | | DATE_FORMAT(sps.cause_analysis_date, '%Y-%m-%d') AS cause_analysis_date_string, |
| | | DATE_FORMAT(sps.corrective_action_date, '%Y-%m-%d') AS corrective_action_date_string, |
| | | DATE_FORMAT(sps.verification_department_date, '%Y-%m-%d') AS verification_department_date_string |
| | | from cnas_person_supervision_processing_sheet sps |
| | | left join user u1 on u1.id = sps.proposing_department_person_id |
| | | left join user u2 on u2.id = sps.cause_analysis_person_id |
| | | left join user u3 on u3.id = sps.corrective_action_id |
| | | left join user u4 on u4.id = sps.verification_department_person_id |
| | | left join department_lims dl1 on find_in_set(dl1.id, u1.depart_lims_id) and dl1.id != 1 |
| | | left join department_lims dl2 on find_in_set(dl2.id, u2.depart_lims_id) and dl2.id != 1 |
| | | left join department_lims dl3 on find_in_set(dl3.id, u3.depart_lims_id) and dl3.id != 1 |
| | | left join department_lims dl4 on find_in_set(dl4.id, u4.depart_lims_id) and dl4.id != 1 |
| | | where sps.supervision_record_id = #{supervisionRecordId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonSupervisionRecordMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonSupervisionRecord"> |
| | | <id column="id" property="id" /> |
| | | <result column="tester_id" property="testerId" /> |
| | | <result column="supervisor_id" property="supervisorId" /> |
| | | <result column="test_item" property="testItem" /> |
| | | <result column="sample_number" property="sampleNumber" /> |
| | | <result column="detection_date" property="detectionDate" /> |
| | | <result column="personnel" property="personnel" /> |
| | | <result column="instrument_equipment" property="instrumentEquipment" /> |
| | | <result column="working_environment" property="workingEnvironment" /> |
| | | <result column="sample_collection" property="sampleCollection" /> |
| | | <result column="sample_preparation" property="samplePreparation" /> |
| | | <result column="test_method" property="testMethod" /> |
| | | <result column="test_report" property="testReport" /> |
| | | <result column="evaluation_supervision_situation" property="evaluationSupervisionSituation" /> |
| | | <result column="do_not_meet_the_handling_opinions" property="doNotMeetTheHandlingOpinions" /> |
| | | <result column="technical_director" property="technicalDirector" /> |
| | | <result column="technical_director_date" property="technicalDirectorDate" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | <select id="personSupervisionRecordPage" resultType="com.ruoyi.personnel.dto.PersonSupervisionRecordDto"> |
| | | select cpsr.*, u1.name tester_name, u2.name supervisor_name, u3.name technical_director_name, |
| | | cp.personnel_name, cpscs.current_state current_state_control, cpscs.corrective_measure, cpsps.current_state current_state_processing,u2.depart_lims_id |
| | | from cnas_person_supervision_record cpsr |
| | | left join user u1 on cpsr.tester_id = u1.id |
| | | left join user u2 on cpsr.supervisor_id = u2.id |
| | | left join user u3 on cpsr.technical_director = u3.id |
| | | left join ( |
| | | select GROUP_CONCAT(u.name) personnel_name, cp.id |
| | | from cnas_person_supervision_record cp |
| | | left join user u on FIND_IN_SET(u.id, cp.personnel) |
| | | GROUP BY cp.id |
| | | ) cp on cp.id = cpsr.id |
| | | left join cnas_person_supervision_control_sheet cpscs on cpscs.supervision_record_id = cpsr.id |
| | | left join cnas_person_supervision_processing_sheet cpsps on cpsps.supervision_record_id = cpsr.id |
| | | <where> |
| | | <if test="userId != null and userId != ''"> |
| | | and cpsr.supervisor_id = #{userId} |
| | | </if> |
| | | <if test="departLimsId != null and departLimsId != ''"> |
| | | <!--and FIND_IN_SET(#{departLimsId}, u2.depart_lims_id)--> |
| | | and cpsr.depart_lims_id = #{departLimsId} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and u2.name like concat('%', #{userName}, '%') |
| | | </if> |
| | | </where> |
| | | order by cpsr.id desc |
| | | </select> |
| | | |
| | | <!-- æ¥è¯¢çç£è®°å½è¯¦æ
--> |
| | | <select id="selectPersonSupervisionRecord" resultType="com.ruoyi.personnel.dto.PersonSupervisionRecordDto"> |
| | | select cpsr.*, u1.name tester_name, u2.name supervisor_name, u3.name technical_director_name, |
| | | cp.personnel_name, cpscs.current_state current_state_control, cpsps.current_state current_state_processing |
| | | from cnas_person_supervision_record cpsr |
| | | left join user u1 on cpsr.tester_id = u1.id |
| | | left join user u2 on cpsr.supervisor_id = u2.id |
| | | left join user u3 on cpsr.technical_director = u3.id |
| | | left join ( |
| | | select GROUP_CONCAT(u.name) personnel_name, cp.id |
| | | from cnas_person_supervision_record cp |
| | | left join user u on FIND_IN_SET(u.id, cp.personnel) |
| | | GROUP BY cp.id |
| | | ) cp on cp.id = cpsr.id |
| | | left join cnas_person_supervision_control_sheet cpscs on cpscs.supervision_record_id = cpsr.id |
| | | left join cnas_person_supervision_processing_sheet cpsps on cpsps.supervision_record_id = cpsr.id |
| | | where cpsr.id = #{id} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonTrackRecordMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonTrackRecord"> |
| | | <id column="id" property="id" /> |
| | | <result column="start_time" property="startTime" /> |
| | | <result column="end_time" property="endTime" /> |
| | | <result column="place_work" property="placeWork" /> |
| | | <result column="department" property="department" /> |
| | | <result column="post" property="post" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="file_name" property="fileName" /> |
| | | </resultMap> |
| | | |
| | | <select id="personTrackRecordSelect" resultType="com.ruoyi.personnel.pojo.PersonTrackRecord"> |
| | | select cpt.* |
| | | from cnas_person_track_record cpt |
| | | left join user u on cpt.user_id = u.id |
| | | <where> |
| | | <if test="userId != null and userId != '' and userId != 'null'"> |
| | | and cpt.user_id = #{userId} |
| | | </if> |
| | | <if test="departLimsId != null and departLimsId != '' and departLimsId != 'null'"> |
| | | and FIND_IN_SET(#{departLimsId},u.depart_lims_id) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="personTrackRecordExport" resultMap="BaseResultMap"> |
| | | select * |
| | | from cnas_person_track_record cpt |
| | | left join user u on cpt.user_id = u.id |
| | | <where> |
| | | <if test="userId != null and userId != '' and userId != 'null'"> |
| | | and cpt.user_id = #{userId} |
| | | </if> |
| | | <if test="departLimsId != null and departLimsId != '' and departLimsId != 'null'"> |
| | | and FIND_IN_SET(#{departLimsId},u.depart_lims_id) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonTrainingDetailedMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonTrainingDetailed"> |
| | | <id column="id" property="id" /> |
| | | <result column="course_code" property="courseCode" /> |
| | | <result column="training_objectives" property="trainingObjectives" /> |
| | | <result column="training_content" property="trainingContent" /> |
| | | <result column="training_mode" property="trainingMode" /> |
| | | <result column="state" property="state" /> |
| | | <result column="participants" property="participants" /> |
| | | <result column="holding_department" property="holdingDepartment" /> |
| | | <result column="place_training" property="placeTraining" /> |
| | | <result column="training_lecturer_id" property="trainingLecturerId" /> |
| | | <result column="training_date" property="trainingDate" /> |
| | | <result column="opening_time" property="openingTime" /> |
| | | <result column="class_hour" property="classHour" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | |
| | | <select id="queryTheAnnualPlanDetailsTable" resultType="com.ruoyi.personnel.dto.PersonTrainingDetailedDto"> |
| | | SELECT cptd.*, |
| | | cpt.depart_id as departId, |
| | | <!-- u1.name training_lecturer_name,--> |
| | | dl.name holding_department_name, !isnull(cptr.training_record_id) whether_claim |
| | | FROM cnas_person_training_detailed cptd |
| | | <!-- left join user u1 on cptd.training_lecturer_id = u1.id--> |
| | | left join department_lims dl on dl.id = cptd.holding_department |
| | | left join cnas_person_training_record cptr on |
| | | <!--cptr.user_id = #{loginUserId} and --> |
| | | cptr.course_id = cptd.id |
| | | left join cnas_person_training cpt on cpt.id = cptd.plan_id |
| | | <where> |
| | | <if test="id != null"> |
| | | and cptd.plan_id = #{id} |
| | | </if> |
| | | <if test="userId != null"> |
| | | and cptr.user_id = #{userId} |
| | | </if> |
| | | <if test="courseCode != null and courseCode != ''"> |
| | | and cptd.course_code like concat('%', #{courseCode}, '%') |
| | | </if> |
| | | <if test="trainingLecturerName != null and trainingLecturerName != ''"> |
| | | and cptd.training_lecturer_id like concat('%', #{trainingLecturerName}, '%') |
| | | </if> |
| | | <if test="trainingDate != null and trainingDate != ''"> |
| | | and cptd.training_date_two = #{trainingDate} |
| | | </if> |
| | | <if test="state != null and state != ''"> |
| | | and cptd.state = 3 |
| | | </if> |
| | | <if test="state == null || state == ''"> |
| | | and cptd.state != 3 |
| | | </if> |
| | | |
| | | </where> |
| | | GROUP BY |
| | | cptd.id |
| | | order by |
| | | CASE |
| | | WHEN cptd.training_date_two IS NULL THEN '9999-12-31' |
| | | ELSE cptd.training_date_two |
| | | END ASC, |
| | | CASE |
| | | WHEN cptd.opening_time IS NULL THEN '23:59:59' |
| | | ELSE cptd.opening_time |
| | | END ASC, |
| | | cptd.id ASC |
| | | </select> |
| | | |
| | | <!-- æ ¹æ®ä¸»è¡¨idæ¥è¯¢è¯¦æ
--> |
| | | <select id="selectTrainingList" resultType="com.ruoyi.personnel.dto.PersonTrainingDetailedDto"> |
| | | <!--SELECT cptd.*, |
| | | u1.name training_lecturer_name |
| | | FROM cnas_person_training_detailed cptd |
| | | left join user u1 on cptd.training_lecturer_id = u1.id |
| | | where cptd.plan_id = #{trainingId}--> |
| | | |
| | | SELECT cptd.* |
| | | FROM cnas_person_training_detailed cptd |
| | | where cptd.plan_id = #{trainingId} |
| | | </select> |
| | | |
| | | <!-- æ¥è¯¢è¯¦ç» --> |
| | | <select id="selectTrainingDetail" resultType="com.ruoyi.personnel.dto.PersonTrainingDetailedDto"> |
| | | SELECT cptd.*, |
| | | u1.name training_lecturer_name |
| | | FROM cnas_person_training_detailed cptd |
| | | left join user u1 on cptd.training_lecturer_id = u1.id |
| | | where cptd.id = #{id} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonTrainingMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonTraining"> |
| | | <id column="id" property="id" /> |
| | | <result column="file_name" property="fileName" /> |
| | | <result column="compiler_id" property="compilerId" /> |
| | | <result column="compilation_date" property="compilationDate" /> |
| | | <result column="reviewer_id" property="reviewerId" /> |
| | | <result column="audit_date" property="auditDate" /> |
| | | <result column="audit_remarks" property="auditRemarks" /> |
| | | <result column="approver_id" property="approverId" /> |
| | | <result column="approval_remarks" property="approvalRemarks" /> |
| | | <result column="approval_status" property="approvalStatus" /> |
| | | <result column="approval_date" property="approvalDate" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | <!-- æ ¹æ®å建人çé¨é¨çéæ°æ®ï¼å¯æ¯å建人å¯è½æªåé
é¨é¨ä¹éè¦æ¥ç --> |
| | | <select id="personTrainingSelect" resultType="com.ruoyi.personnel.dto.PersonTrainingDto"> |
| | | select * from( |
| | | |
| | | |
| | | SELECT |
| | | cpt.*, |
| | | u1.name compiler_name, |
| | | u2.name reviewer_name, |
| | | u3.name approver_name, |
| | | u4.name create_user_name |
| | | FROM |
| | | cnas_person_training cpt |
| | | LEFT JOIN user u1 ON cpt.compiler_id = u1.id |
| | | LEFT JOIN user u2 ON cpt.reviewer_id = u2.id |
| | | LEFT JOIN user u3 ON cpt.approver_id = u3.id |
| | | LEFT JOIN user u4 ON cpt.create_user = u4.id |
| | | <where> |
| | | <!-- <if test="departLimsId != null and departLimsId != ''">--> |
| | | <!-- and FIND_IN_SET(#{departLimsId}, u4.depart_lims_id)--> |
| | | <!-- </if>--> |
| | | <if test="departLimsId != null and departLimsId != ''"> |
| | | and cpt.depart_id = #{departLimsId} |
| | | </if> |
| | | <if test="compilerName != null and compilerName != ''"> |
| | | and u4.name like concat('%', #{compilerName}, '%') |
| | | </if> |
| | | </where> |
| | | union |
| | | SELECT |
| | | cpt.*, |
| | | u1.name compiler_name, |
| | | u2.name reviewer_name, |
| | | u3.name approver_name, |
| | | u4.name create_user_name |
| | | FROM |
| | | cnas_person_training cpt |
| | | LEFT JOIN user u1 ON cpt.compiler_id = u1.id |
| | | LEFT JOIN user u2 ON cpt.reviewer_id = u2.id |
| | | LEFT JOIN user u3 ON cpt.approver_id = u3.id |
| | | LEFT JOIN user u4 ON cpt.create_user = u4.id |
| | | WHERE |
| | | u4.depart_lims_id is not null and length(u4.depart_lims_id) = 0 |
| | | <if test="compilerName != null and compilerName != ''"> |
| | | and u4.name like concat('%', #{compilerName}, '%') |
| | | </if> |
| | | )a order by id desc |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.personnel.mapper.PersonTrainingRecordMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.personnel.pojo.PersonTrainingRecord"> |
| | | <id column="training_record_id" property="trainingRecordId" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="course_id" property="courseId" /> |
| | | <result column="examination_results" property="examinationResults" /> |
| | | </resultMap> |
| | | |
| | | <select id="trainingAndAssessmentRecordsPage" resultType="com.ruoyi.personnel.dto.PersonTrainingRecordDto"> |
| | | select cptr.*, u.account, u.name user_name, u.phone, r.role_name role_name |
| | | from cnas_person_training_record cptr |
| | | left join user u on u.id = cptr.user_id |
| | | left join sys_user_role ur on ur.user_id = u.id |
| | | left join sys_role r on ur.role_id=r.role_id |
| | | where cptr.course_id = #{trainingDetailedId} |
| | | <if test="userName != null and userName != ''"> |
| | | and u.name like concat('%', #{userName}, '%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="personnelTrainingPersonnel" resultType="com.ruoyi.personnel.dto.PersonTrainingRecordListDto"> |
| | | select u.name, u.account, dl.name depart_lims_name, cpbi.professional_title, |
| | | cpbi.official_academic_redentials, cpbi.unit_time, u.id user_id |
| | | from user u |
| | | left join cnas_person_basic_info cpbi on cpbi.user_id = u.id |
| | | left join department_lims dl on dl.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u.depart_lims_id, ',', -2), ',', 1) |
| | | where u.is_custom = 0 |
| | | <if test="userName != '' and userName != null and userName != 'null'"> |
| | | and u.name like concat('%', #{userName}, '%') |
| | | </if> |
| | | <if test="userId != null and userId != ''"> |
| | | and u.id = #{userId} |
| | | </if> |
| | | <if test="departLimsId != null and departLimsId != ''"> |
| | | and FIND_IN_SET(#{departLimsId}, u.depart_lims_id) |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="queryPersonnelDetails" resultType="com.ruoyi.personnel.dto.TrainingRecordPersonDetailedDto"> |
| | | select cptd.training_date, cptd.training_content, cptd.class_hour, cptr.examination_results, cptd.remarks |
| | | from cnas_person_training_record cptr |
| | | inner join cnas_person_training_detailed cptd on cptd.id = cptr.course_id |
| | | <where> |
| | | <if test="userId != null and userId != ''"> |
| | | and cptr.user_id = #{userId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- æ ¹æ®è¯¦æ
idæ¥è¯¢å¹è®ä¿¡æ¯ --> |
| | | <select id="selectListByTrainingDetailedId" resultType="com.ruoyi.personnel.dto.PersonTrainingRecordDto"> |
| | | select cptr.*, |
| | | u.name userName, |
| | | dl.name department |
| | | from cnas_person_training_record cptr |
| | | left join user u on u.id = cptr.user_id |
| | | left join department_lims dl on find_in_set(dl.id, u.depart_lims_id) and dl.id != 1 |
| | | where cptr.course_id = #{trainingDetailedId} |
| | | </select> |
| | | |
| | | <!-- æ ¹æ®idæ¥è¯¢äººåä¿¡æ¯ --> |
| | | <select id="selectUserTraining" resultType="com.ruoyi.personnel.dto.PersonTrainingRecordListDto"> |
| | | select u.name, |
| | | u.account, |
| | | dl.name depart_lims_name, |
| | | cpbi.professional_title, |
| | | cpbi.official_academic_redentials, |
| | | cpbi.unit_time, |
| | | cpbi.major1, |
| | | u.id user_id, |
| | | DATE_FORMAT(cpbi.unit_time, '%Y-%m-%d') AS unitTimeSting |
| | | from user u |
| | | left join cnas_person_basic_info cpbi on cpbi.user_id = u.id |
| | | left join department_lims dl on dl.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u.depart_lims_id, ',', -2), ',', 1) |
| | | where u.is_custom = 0 |
| | | and u.id = #{userId} |
| | | </select> |
| | | |
| | | <!-- æ ¹æ®ç¨æ·idæ¥è¯¢äººåè®°å½ --> |
| | | <select id="selectPersonDetailedDtos" resultType="com.ruoyi.personnel.dto.TrainingRecordPersonDetailedDto"> |
| | | select cptd.training_date, |
| | | cptd.training_content, |
| | | cptd.class_hour, |
| | | cptr.examination_results, |
| | | cptd.remarks, |
| | | DATE_FORMAT(cptd.training_date, '%Y-%m-%d') AS trainingDateString |
| | | from cnas_person_training_record cptr |
| | | inner join cnas_person_training_detailed cptd on cptd.id = cptr.course_id |
| | | and cptr.user_id = #{userId} |
| | | <where> |
| | | <if test="year!= null and year!= ''"> |
| | | and YEAR(cptd.training_date) = ${year} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--æ ¹æ®ç¨æ·idå年份æ¥è¯¢äººåæç» å¹è®è®°å½--> |
| | | <select id="queryPersonnelDetailsOfUserIdAndYear" |
| | | resultType="com.ruoyi.personnel.dto.TrainingRecordPersonDetailedDto"> |
| | | select cptd.training_date, cptd.training_content, cptd.class_hour, cptr.examination_results, cptd.remarks |
| | | from cnas_person_training_record cptr |
| | | inner join cnas_person_training_detailed cptd on cptd.id = cptr.course_id |
| | | <where> |
| | | <if test="userId != null and userId != ''"> |
| | | and cptr.user_id = #{userId} |
| | | </if> |
| | | <if test="year!= null and year!= ''"> |
| | | and YEAR(cptd.training_date) = ${year} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- æ ¹æ®ç¨æ·idå年份æ¥è¯¢äººåæç» å¹è®è®°å½å¯¼åº --> |
| | | <select id="selectPersonDetailedDtosByTrainingDate" |
| | | resultType="com.ruoyi.personnel.dto.TrainingRecordPersonDetailedDto"> |
| | | select cptd.training_date, |
| | | cptd.training_content, |
| | | cptd.class_hour, |
| | | cptr.examination_results, |
| | | cptd.remarks, |
| | | DATE_FORMAT(cptd.training_date, '%Y-%m-%d') AS trainingDateString |
| | | from cnas_person_training_record cptr |
| | | inner join cnas_person_training_detailed cptd on cptd.id = cptr.course_id |
| | | and cptr.user_id = #{userId} |
| | | <where> |
| | | <if test="year!= null and year!= ''"> |
| | | and YEAR(cptd.training_date) = ${year} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.ruoyi.performance.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Data |
| | | @TableName("auxiliary_working_hours_day") |
| | | @ApiModel(value = "AuxiliaryWorkingHoursDay对象", description = "æ¥å·¥æ¶ç®¡ççè¾
å©å·¥æ¶") |
| | | @ExcelIgnoreUnannotated |
| | | public class AuxiliaryWorkingHoursDay implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ExcelIgnore |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å§åid") |
| | | @ExcelIgnore |
| | | private Integer nameUser; |
| | | |
| | | @ApiModelProperty("ç¼å·") |
| | | @ExcelProperty(index = 2, value = "ç¼å·") |
| | | @ExcelProperty(value = "ç¼å·") |
| | | private String number; |
| | | |
| | | @ApiModelProperty("è¾
å©é¡¹ç®åç§°") |
| | | @ExcelProperty(index = 3, value = "è¾
å©é¡¹ç®åç§°") |
| | | @ExcelProperty(value = "è¾
å©é¡¹ç®åç§°") |
| | | private String auxiliaryProject; |
| | | |
| | | @ApiModelProperty("æ ¸åå·¥æ¶") |
| | | @ExcelProperty(index = 5, value = "æ ¸åå·¥æ¶") |
| | | private BigDecimal approvedWorkingHour; |
| | | @ExcelProperty(value = "æ ¸åå·¥æ¶") |
| | | private Double approvedWorkingHour; |
| | | |
| | | @ApiModelProperty("æ°é") |
| | | @ExcelProperty(index = 6, value = "æ°é") |
| | | private Integer amount; |
| | | @ExcelProperty(value = "æ°é") |
| | | private Double amount; |
| | | |
| | | @ApiModelProperty("è¾
å©å·¥æ¶") |
| | | @ExcelProperty(index = 7, value = "è¾
å©å·¥æ¶") |
| | | private BigDecimal nonproductiveTime; |
| | | @ExcelProperty(value = "è¾
å©å·¥æ¶") |
| | | private Double nonproductiveTime; |
| | | |
| | | @ApiModelProperty("è¾
å©è¯´æ") |
| | | @ExcelProperty(index = 8, value = "è¾
å©è¯´æ") |
| | | @ExcelProperty(value = "è¾
å©è¯´æ") |
| | | private String remarks; |
| | | |
| | | @ApiModelProperty("夿 ¸äºº") |
| | | @ExcelProperty(index = 9, value = "夿 ¸äºº") |
| | | private String reviewer; |
| | | |
| | | @ApiModelProperty("夿 ¸æ°é") |
| | | @ExcelProperty(index = 10, value = "夿 ¸æ°é") |
| | | private Integer reviewerNumber; |
| | | |
| | | @ApiModelProperty("夿 ¸å·¥æ¶") |
| | | @ExcelProperty(index = 11, value = "夿 ¸å·¥æ¶") |
| | | private BigDecimal reviewerNonproductiveTime; |
| | | |
| | | @ApiModelProperty("夿 ¸è¯´æ") |
| | | @ExcelProperty(index = 12, value = "夿 ¸è¯´æ") |
| | | private String reviewerRemark; |
| | | |
| | | @ApiModelProperty("å¹´") |
| | | @ExcelProperty(index = 13, value = "å¹´") |
| | | private String year; |
| | | |
| | | @ApiModelProperty("çæ¬¡") |
| | | @ExcelProperty(index = 14, value = "çæ¬¡") |
| | | @ExcelProperty(value = "çæ¬¡") |
| | | private String shift; |
| | | |
| | | @ApiModelProperty("卿¬¡") |
| | | @ExcelProperty(index = 15, value = "卿¬¡") |
| | | @ExcelProperty(value = "卿¬¡") |
| | | private String week; |
| | | |
| | | @ApiModelProperty("ææ") |
| | | @ExcelProperty(index = 16, value = "ææ") |
| | | @ExcelProperty(value = "ææ") |
| | | private String weekDay; |
| | | |
| | | @ApiModelProperty("夿 ¸äºº") |
| | | @ExcelProperty(value = "夿 ¸äºº") |
| | | private String reviewer; |
| | | |
| | | @ApiModelProperty("夿 ¸æ°é") |
| | | @ExcelProperty(value = "夿 ¸æ°é") |
| | | private Double reviewerNumber; |
| | | |
| | | @ApiModelProperty("夿 ¸å·¥æ¶") |
| | | @ExcelProperty(value = "夿 ¸å·¥æ¶") |
| | | private Double reviewerNonproductiveTime; |
| | | |
| | | @ApiModelProperty("夿 ¸è¯´æ") |
| | | @ExcelProperty(value = "夿 ¸è¯´æ") |
| | | private String reviewerRemark; |
| | | |
| | | @ApiModelProperty("å¹´") |
| | | @ExcelProperty(value = "å¹´") |
| | | private String year; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @ExcelIgnore |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @ExcelIgnore |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @ExcelIgnore |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @ExcelIgnore |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | @ExcelProperty(index = 4, value = "ç¶æ") |
| | | @ExcelProperty(value = "ç¶æ") |
| | | @ExcelIgnore |
| | | private String state; |
| | | |
| | | @ApiModelProperty("æ¥æ") |
| | | @ExcelProperty(index = 17, value = "æ¥æ") |
| | | @ExcelProperty(value = "æ¥æ") |
| | | private String dateTime; |
| | | } |
| | |
| | | map.put("产éå·¥æ¶æ±æ»", sumOutputWorkTime); |
| | | if (ObjectUtils.isNotEmpty(auxiliaryWorkingHoursDays)) { |
| | | for (AuxiliaryWorkingHoursDay auxiliaryWorkingHoursDay : auxiliaryWorkingHoursDays) { |
| | | sumApprovedWorkingHour = sumApprovedWorkingHour.add(auxiliaryWorkingHoursDay.getReviewerNonproductiveTime());//夿 ¸å·¥æ¶ |
| | | // sumApprovedWorkingHour = sumApprovedWorkingHour.add(auxiliaryWorkingHoursDay.getReviewerNonproductiveTime());//夿 ¸å·¥æ¶ |
| | | } |
| | | } |
| | | map.put("è¾
å©å·¥æ¶æ±æ»", sumApprovedWorkingHour); |
| | |
| | | import com.ruoyi.common.core.domain.entity.Company; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.core.dto.PersonDto; |
| | | import com.ruoyi.framework.util.HeaderToken; |
| | | import com.ruoyi.system.service.UserService; |
| | | import com.ruoyi.web.controller.dto.UpdateUserDto; |
| | | import com.ruoyi.web.controller.system.api.HeaderToken; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.core.domain.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é¨é¨æç» |
| | | * @TableName department_lims |
| | | */ |
| | | @TableName(value ="department_lims") |
| | | @Data |
| | | public class DepartmentLims implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("ç¶çº§id") |
| | | private Integer fatherId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(exist = false) |
| | | private List<DepartmentLims> children; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @ApiModelProperty(value = "æ´æ°è
") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.core.dto; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class DepartmentDto { |
| | | |
| | | private Integer id; |
| | | |
| | | private String name; |
| | | |
| | | private Integer userId; |
| | | |
| | | private Integer fatherId; |
| | | |
| | | private List<DepartmentDto> children; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.core.dto; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class UserPageDto extends User { |
| | | |
| | | @ApiModelProperty(value = "åå»ºç¨æ·") |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°ç¨æ·") |
| | | private String updateUserName; |
| | | |
| | | @ApiModelProperty(value = "è§è²") |
| | | private String roleName; |
| | | |
| | | |
| | | } |
| | |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | |
| | |
| | | } |
| | | return new ByteArrayInputStream(os.toByteArray()); |
| | | } |
| | | |
| | | public static InputStream createDateImage(LocalDate date) { |
| | | int width = 80; |
| | | int height = 20; |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd"); |
| | | if (date == null) { |
| | | date = LocalDate.now(); |
| | | } |
| | | String s = date.format(formatter); |
| | | |
| | | java.awt.Font font = new java.awt.Font("Serif", java.awt.Font.BOLD, 10); |
| | | // å建ä¸ä¸ªç»å¸ï¼èæ¯éæï¼ |
| | | BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); |
| | | // è·åç»å¸çç»ç¬ |
| | | Graphics2D g2 = (Graphics2D) bi.getGraphics(); |
| | | // å¼å§ç»å¾ |
| | | g2.setComposite(java.awt.AlphaComposite.Src); // ç¡®ä¿ç»å¾æ¶æ¯éæèæ¯ |
| | | g2.setBackground(new Color(0, 0, 0, 0)); // èæ¯è²ä¸ºéæ |
| | | g2.clearRect(0, 0, width, height); |
| | | g2.setPaint(new Color(0, 0, 0)); // 设置ç»å¶é¢è² |
| | | FontRenderContext context = g2.getFontRenderContext(); |
| | | Rectangle2D bounds = font.getStringBounds(s, context); |
| | | double x = (width - bounds.getWidth()) / 2; |
| | | double y = (height - bounds.getHeight()) / 2; |
| | | double ascent = -bounds.getY(); |
| | | double baseY = y + ascent; |
| | | g2.drawString(s, (int) x, (int) baseY); |
| | | g2.dispose(); // éæ¾ç»ç¬èµæº |
| | | ByteArrayOutputStream os = new ByteArrayOutputStream(); |
| | | |
| | | try { |
| | | ImageIO.write(bi, "png", os); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return new ByteArrayInputStream(os.toByteArray()); |
| | | } |
| | | } |
ÎļþÃû´Ó ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/api/HeaderToken.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.web.controller.system.api; |
| | | package com.ruoyi.framework.util; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.http.HttpRequest; |
| | |
| | | import com.ruoyi.common.core.domain.entity.Person; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.system.domain.AuthApi; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | } |
| | | return map; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.framework.util; |
| | | |
| | | import cn.hutool.http.HttpRequest; |
| | | import cn.hutool.http.HttpResponse; |
| | | import com.ruoyi.system.domain.AuthApi; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | public class TestApi { |
| | | |
| | | @Autowired |
| | | private HeaderToken headerToken; |
| | | |
| | | public void testApi() { |
| | | String accessToken =headerToken.getAccessToken(); |
| | | String apiUrl = AuthApi.companies; |
| | | // æ¿æ¢ä¸ºå®é
çAPI端ç¹URL |
| | | HttpRequest request = HttpRequest.get(apiUrl) |
| | | .header("Authorization", "Bearer " + accessToken); |
| | | HttpResponse response = request.execute(); |
| | | System.out.println("Response Code: " + response.getStatus()); |
| | | System.out.println("Response Body: " + response.body()); |
| | | } |
| | | } |
| | |
| | | |
| | | </dependencies> |
| | | |
| | | </project> |
| | | </project> |
ÎļþÃû´Ó ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/api/AuthApi.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.web.controller.system.api; |
| | | package com.ruoyi.system.domain; |
| | | |
| | | public class AuthApi { |
| | | |
| | |
| | | |
| | | public static String person = "https://ztt-connector.ztt.cn/api/org/v1/employees/simple/"; |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.domain.entity.DepartmentLims; |
| | | import com.ruoyi.common.core.dto.DepartmentDto; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãdepartment_lims(é¨é¨æç»)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-05-22 14:08:17 |
| | | * @Entity com.yuanchu.mom.pojo.DepartmentLims |
| | | */ |
| | | public interface DepartmentLimsMapper extends BaseMapper<DepartmentLims> { |
| | | |
| | | //è·åé¨é¨æ |
| | | List<DepartmentDto> selectDepartment(); |
| | | |
| | | //æ ¹æ®é¨é¨id,æ¥è¯¢ä»çææåç±»id |
| | | List<Integer> selectSonById(Integer id); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.entity.DepartmentLims; |
| | | import com.ruoyi.common.core.dto.DepartmentDto; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãdepartment_lims(é¨é¨æç»)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-05-22 14:08:17 |
| | | */ |
| | | public interface DepartmentLimsService extends IService<DepartmentLims> { |
| | | |
| | | //æ·»å é¨é¨ |
| | | int addDepartment(DepartmentLims departmentLims); |
| | | |
| | | //è·åé¨é¨æ |
| | | List<DepartmentDto> selectDepartment(); |
| | | |
| | | //å é¤é¨é¨ |
| | | boolean delDepartment(Integer id); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.entity.DepartmentLims; |
| | | import com.ruoyi.common.core.dto.DepartmentDto; |
| | | import com.ruoyi.system.mapper.DepartmentLimsMapper; |
| | | import com.ruoyi.system.service.DepartmentLimsService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãdepartment_lims(é¨é¨æç»)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-05-22 14:08:17 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class DepartmentLimsServiceImpl extends ServiceImpl<DepartmentLimsMapper, DepartmentLims> |
| | | implements DepartmentLimsService { |
| | | |
| | | DepartmentLimsMapper departmentMapper; |
| | | |
| | | @Override |
| | | public int addDepartment(DepartmentLims department) { |
| | | departmentMapper.insert(department); |
| | | return department.getId(); |
| | | } |
| | | |
| | | //è·åé¨é¨æ |
| | | @Override |
| | | public List<DepartmentDto> selectDepartment() { |
| | | List<DepartmentDto> departments = departmentMapper.selectDepartment(); |
| | | //è·åç¶èç¹ |
| | | List<DepartmentDto> collect = departments.stream().filter(m -> m.getFatherId() == null).peek( |
| | | (m) -> m.setChildren(getChildren(m, departments)) |
| | | ).collect(Collectors.toList()); |
| | | return collect; |
| | | } |
| | | |
| | | /** |
| | | * é彿¥è¯¢åèç¹ |
| | | * @param root æ ¹èç¹ |
| | | * @param all ææèç¹ |
| | | * @return æ ¹èç¹ä¿¡æ¯ |
| | | */ |
| | | private List<DepartmentDto> getChildren(DepartmentDto root, List<DepartmentDto> all) { |
| | | return all.stream().filter(m -> Objects.equals(m.getFatherId(), root.getId())).peek( |
| | | (m) -> m.setChildren(getChildren(m, all)) |
| | | ).collect(Collectors.toList()); |
| | | } |
| | | |
| | | //å é¤é¨é¨ |
| | | @Override |
| | | public boolean delDepartment(Integer id) { |
| | | //夿æ¯å¦æåç±»,ç´å°æ²¡æä¸ºæ¢ |
| | | List<DepartmentLims> department = getDepartment(id); |
| | | return removeBatchByIds(department); |
| | | } |
| | | |
| | | //夿æ¯å¦æåç±»,ç´å°æ²¡æä¸ºæ¢ |
| | | public List<DepartmentLims> getDepartment(Integer id) { |
| | | List<DepartmentLims> list = new ArrayList<>(); |
| | | DepartmentLims depart = baseMapper.selectById(id); |
| | | list.add(depart); |
| | | List<DepartmentLims> departments = baseMapper.selectList(Wrappers.<DepartmentLims>lambdaQuery().eq(DepartmentLims::getFatherId, id)); |
| | | if (ObjectUtils.isNotEmpty(departments)) { |
| | | list.addAll(departments); |
| | | for (DepartmentLims department : departments) { |
| | | list.addAll(getDepartment(department.getId())); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.DepartmentLimsMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.common.core.domain.entity.DepartmentLims"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="fatherId" column="father_id" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectDepartment" resultType="com.ruoyi.common.core.dto.DepartmentDto"> |
| | | SELECT id, name, father_id |
| | | FROM department_lims |
| | | </select> |
| | | |
| | | <select id="selectSonById" resultType="java.lang.Integer"> |
| | | SELECT au.id |
| | | FROM (SELECT * FROM department_lims WHERE father_id IS NOT NULL) au, |
| | | (SELECT @father_id := #{id}) pd |
| | | WHERE FIND_IN_SET(father_id, @father_id) > 0 |
| | | AND @father_id := concat(@father_id, ',', id) |
| | | UNION |
| | | SELECT id |
| | | FROM department_lims |
| | | WHERE id = #{id} |
| | | ORDER BY id |
| | | </select> |
| | | </mapper> |