¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.personnel.dto.PersonJobResponsibilitiesDto; |
| | | import com.ruoyi.personnel.pojo.PersonJobResponsibilities; |
| | | import com.ruoyi.personnel.service.PersonJobResponsibilitiesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * å²ä½èè´£ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 02:07:49 |
| | | */ |
| | | @Api(tags = "人å - å²ä½èè´£") |
| | | @RestController |
| | | @RequestMapping("/personJobResponsibilities") |
| | | public class PersonJobResponsibilitiesController { |
| | | @Autowired |
| | | private PersonJobResponsibilitiesService personJobResponsibilitiesService; |
| | | |
| | | @ApiOperation(value = "æ°å¢/æ´æ° å²ä½èè´£") |
| | | @PostMapping("/personJobResponsibilitiesSave") |
| | | public Result<?> personJobResponsibilitiesSave(@RequestBody PersonJobResponsibilities personJobResponsibilities) { |
| | | personJobResponsibilitiesService.saveOrUpdate(personJobResponsibilities); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "å é¤ å²ä½èè´£") |
| | | @DeleteMapping("/personJobResponsibilitiesDelete") |
| | | public Result<?> personJobResponsibilitiesDelete(@RequestParam("id") Integer id) { |
| | | personJobResponsibilitiesService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ å²ä½èè´£") |
| | | @GetMapping("/personJobResponsibilitiesSelect") |
| | | public Result<IPage<PersonJobResponsibilitiesDto>> personJobResponsibilitiesSelect(Page page, String userId, String departmentId, String userName) { |
| | | IPage<PersonJobResponsibilitiesDto> iPage = personJobResponsibilitiesService.personJobResponsibilitiesSelect(page, userId, departmentId, userName); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "导åºä»»èå²ä½è¯´æè¯´") |
| | | @PostMapping("/exportPersonJobResponsibilities") |
| | | public void exportPersonJobResponsibilities(Integer id, HttpServletResponse response){ |
| | | personJobResponsibilitiesService.exportPersonJobResponsibilities(id,response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | //package com.ruoyi.personnel.controller; |
| | | // |
| | | //import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | //import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | //import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | //import com.yuanchu.mom.annotation.ValueAuth; |
| | | //import com.yuanchu.mom.common.GetLook; |
| | | //import com.yuanchu.mom.dto.PersonPersonnelCapacityDto; |
| | | //import com.yuanchu.mom.pojo.PersonPersonnelCapacity; |
| | | //import com.yuanchu.mom.service.PersonPersonnelCapacityService; |
| | | //import com.yuanchu.mom.vo.Result; |
| | | //import io.swagger.annotations.Api; |
| | | //import io.swagger.annotations.ApiOperation; |
| | | //import org.springframework.beans.factory.annotation.Autowired; |
| | | //import org.springframework.web.bind.annotation.*; |
| | | // |
| | | //import javax.servlet.http.HttpServletResponse; |
| | | //import java.time.LocalDateTime; |
| | | // |
| | | ///** |
| | | // * <p> |
| | | // * 人åè½å å端æ§å¶å¨ |
| | | // * </p> |
| | | // * |
| | | // * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | // * @since 2024-10-10 11:26:18 |
| | | // */ |
| | | //@Api(tags = "人å - 人åè½å") |
| | | //@RestController |
| | | //@RequestMapping("/personPersonnelCapacity") |
| | | //public class PersonPersonnelCapacityController { |
| | | // |
| | | // @Autowired |
| | | // private PersonPersonnelCapacityService personPersonnelCapacityService; |
| | | // |
| | | // |
| | | // @ApiOperation(value = "æ°å¢/æ´æ° 人åè½å") |
| | | // @PostMapping("addOrUpdatePersonPersonnelCapacity") |
| | | // public Result<?> addOrUpdatePersonPersonnelCapacity(@RequestBody PersonPersonnelCapacity personPersonnelCapacity) { |
| | | // personPersonnelCapacityService.saveOrUpdate(personPersonnelCapacity); |
| | | // return Result.success(); |
| | | // } |
| | | // |
| | | // @ApiOperation(value = "å é¤ äººåè½å") |
| | | // @DeleteMapping("deletePersonPersonnelCapacity") |
| | | // public Result<?> deletePersonPersonnelCapacity(@RequestParam("id") Integer id) { |
| | | // // å 餿°æ® |
| | | // personPersonnelCapacityService.removeById(id); |
| | | // return Result.success(); |
| | | // } |
| | | // |
| | | // @ApiOperation(value = "æ¥è¯¢ 人åè½å") |
| | | // @GetMapping("personPersonnelCapacityPage") |
| | | // public Result<IPage<PersonPersonnelCapacityDto>> personPersonnelCapacityPage(Page page, |
| | | // Integer departmentId, |
| | | // Integer userId, |
| | | // String userName) { |
| | | // return Result.success(personPersonnelCapacityService.personPersonnelCapacityPage(page, departmentId, userId, userName)); |
| | | // } |
| | | // |
| | | // @ApiOperation(value = "确认 人åè½å") |
| | | // @GetMapping("confirmPersonnelCapability") |
| | | // public Result<?> confirmPersonnelCapability(@RequestParam("id") Integer id) { |
| | | // Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | // personPersonnelCapacityService.update(Wrappers.<PersonPersonnelCapacity>lambdaUpdate() |
| | | // .eq(PersonPersonnelCapacity::getId, id) |
| | | // .set(PersonPersonnelCapacity::getConfirmOperatingPersonnelId, userId) |
| | | // .set(PersonPersonnelCapacity::getConfirmDate, LocalDateTime.now())); |
| | | // return Result.success(); |
| | | // } |
| | | // |
| | | // /** |
| | | // * 导åºäººåè½å |
| | | // * @return |
| | | // */ |
| | | // @ValueAuth |
| | | // @ApiOperation(value = "导åºäººåè½å") |
| | | // @GetMapping("/exportPersonnelCapacity") |
| | | // public void exportPersonnelCapacity(Integer id, HttpServletResponse response){ |
| | | // personPersonnelCapacityService.exportPersonnelCapacity(id, response); |
| | | // } |
| | | // |
| | | // /** |
| | | // * æäº¤ç¡®è®¤äººåè½å |
| | | // * @param personPersonnelCapacity |
| | | // * @return |
| | | // */ |
| | | // @ApiOperation(value = "æäº¤") |
| | | // @PostMapping("submitConfirmPersonnelCapability") |
| | | // public Result<?> submitConfirmPersonnelCapability(@RequestBody PersonPersonnelCapacity personPersonnelCapacity) { |
| | | // personPersonnelCapacityService.submitConfirmPersonnelCapability(personPersonnelCapacity); |
| | | // return Result.success(); |
| | | // } |
| | | //} |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.FileSaveUtil; |
| | | import com.ruoyi.personnel.dto.PersonPostAuthorizationRecordDto; |
| | | import com.ruoyi.personnel.pojo.PersonPostAuthorizationRecord; |
| | | import com.ruoyi.personnel.service.PersonPostAuthorizationRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä»»èææè®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 10:48:17 |
| | | */ |
| | | @Api(tags = "人å - ä»»èææè®°å½") |
| | | @RestController |
| | | @RequestMapping("/personPostAuthorizationRecord") |
| | | public class PersonPostAuthorizationRecordController { |
| | | |
| | | @Autowired |
| | | private PersonPostAuthorizationRecordService personPostAuthorizationRecordService; |
| | | |
| | | @ApiOperation(value = "æ°å¢/æ´æ° ä»»èææè®°å½") |
| | | @PostMapping("/addOrUpdatePersonPostAuthorizationRecord") |
| | | public Result<?> addOrUpdatePersonPostAuthorizationRecord(@RequestBody PersonPostAuthorizationRecord personRewardPunishmentRecord) { |
| | | personPostAuthorizationRecordService.saveOrUpdate(personRewardPunishmentRecord); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤ ä»»èææè®°å½") |
| | | @DeleteMapping("/deletePersonPostAuthorizationRecord") |
| | | public Result<?> deletePersonPostAuthorizationRecord(@RequestParam("id") Integer id) { |
| | | // å 餿件 |
| | | PersonPostAuthorizationRecord postAuthorizationRecord = personPostAuthorizationRecordService.getById(id); |
| | | FileSaveUtil.DeleteFile(postAuthorizationRecord.getSystemFileName()); |
| | | // å 餿°æ® |
| | | personPostAuthorizationRecordService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ ä»»èææè®°å½") |
| | | @GetMapping("/PersonPostAuthorizationRecordPage") |
| | | public Result<IPage<PersonPostAuthorizationRecordDto>> PersonPostAuthorizationRecordPage(Page page, |
| | | Integer departLimsId, |
| | | Integer userId, |
| | | String userName) { |
| | | return Result.success(personPostAuthorizationRecordService.personPostAuthorizationRecordPage(page, departLimsId, userId, userName)); |
| | | } |
| | | |
| | | @ApiOperation(value = "导åºå²ä½èä¸èµæ ¼è¯ä¹¦") |
| | | @PostMapping("/exportPersonPostAuthorizationRecord") |
| | | public void exportPersonPostAuthorizationRecord(Integer id, HttpServletResponse response){ |
| | | personPostAuthorizationRecordService.exportPersonPostAuthorizationRecord(id,response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.personnel.dto.PersonRewardPunishmentRecordDto; |
| | | import com.ruoyi.personnel.excel.PersonRewardPunishmentRecordExcel; |
| | | import com.ruoyi.personnel.pojo.PersonRewardPunishmentRecord; |
| | | import com.ruoyi.personnel.service.PersonRewardPunishmentRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 奿©è®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-08 11:25:02 |
| | | */ |
| | | @Api(tags = "人å - 奿©è®°å½") |
| | | @RestController |
| | | @RequestMapping("/personRewardPunishmentRecord") |
| | | public class PersonRewardPunishmentRecordController { |
| | | |
| | | @Autowired |
| | | private PersonRewardPunishmentRecordService personRewardPunishmentRecordService; |
| | | |
| | | @ApiOperation(value = "æ°å¢/æ´æ° 奿©è®°å½") |
| | | @PostMapping("/addOrUpdateRewardPunishment") |
| | | public Result<?> PersonTrainingSave(@RequestBody PersonRewardPunishmentRecord personRewardPunishmentRecord) { |
| | | personRewardPunishmentRecordService.saveOrUpdate(personRewardPunishmentRecord); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤å¥æ©è®°å½") |
| | | @DeleteMapping("/deleteRewardPunishment") |
| | | public Result<?> deleteRewardPunishment(@RequestParam("id") Integer id) { |
| | | personRewardPunishmentRecordService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ 奿©è®°å½") |
| | | @GetMapping("/rewardPunishmentPage") |
| | | @SneakyThrows |
| | | public Result<IPage<PersonRewardPunishmentRecordDto>> rewardPunishmentPage(Page page, |
| | | Integer userId, |
| | | Integer departmentId, |
| | | String userName, |
| | | @RequestParam(value = "startTime",required = false) String startTimeStr, |
| | | @RequestParam(value = "endTime",required = false) String endTimeStr) { |
| | | Date startTime = null; |
| | | Date endTime = null; |
| | | if (StringUtils.isNotEmpty(startTimeStr) || StringUtils.isNotEmpty(endTimeStr)) { |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); |
| | | startTime = formatter.parse(startTimeStr); |
| | | endTime = formatter.parse(endTimeStr); |
| | | } |
| | | return Result.success(personRewardPunishmentRecordService.rewardPunishmentPage(page, userId, userName, startTime, endTime, departmentId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "奿©è®°å½å¯¼åº") |
| | | @GetMapping("/rewardPunishmentExport") |
| | | public void rewardPunishmentExport(Integer userId, |
| | | Integer departmentId, |
| | | String userName, |
| | | @RequestParam(value = "startTime",required = false) String startTimeStr, |
| | | @RequestParam(value = "endTime",required = false) String endTimeStr, |
| | | HttpServletResponse response) throws Exception { |
| | | Date startTime = null; |
| | | Date endTime = null; |
| | | if (StringUtils.isNotEmpty(startTimeStr) || StringUtils.isNotEmpty(endTimeStr)) { |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); |
| | | startTime = formatter.parse(startTimeStr); |
| | | endTime = formatter.parse(endTimeStr); |
| | | } |
| | | List<PersonRewardPunishmentRecordExcel> data = personRewardPunishmentRecordService.rewardPunishmentExport(userId, departmentId, userName, startTime, endTime); |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
| | | response.setHeader("requestType", "excel"); |
| | | response.setHeader("Access-Control-Expose-Headers", "requestType"); |
| | | // 设置åå
æ ¼æ ·å¼ |
| | | // ä¿åå°ç¬¬ä¸ä¸ªsheetä¸ |
| | | EasyExcel.write(response.getOutputStream()) |
| | | .head(PersonRewardPunishmentRecordExcel.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet() |
| | | .doWrite(data); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.personnel.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.personnel.dto.PersonTrainingRecordListDto; |
| | | import com.ruoyi.personnel.dto.TrainingRecordPersonDetailedDto; |
| | | import com.ruoyi.personnel.service.PersonTrainingRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:11:49 |
| | | */ |
| | | @Api(tags = "人å - å¹è®è®°å½") |
| | | @RestController |
| | | @RequestMapping("/personTrainingRecord") |
| | | public class PersonTrainingRecordController { |
| | | |
| | | @Autowired |
| | | private PersonTrainingRecordService personTrainingRecordService; |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢äººå å¹è®è®°å½") |
| | | @GetMapping("trainingSelectTrainingRecord") |
| | | public Result<IPage<PersonTrainingRecordListDto>> trainingSelectTrainingRecord(Page page, String userName, Integer userId, Integer departmentId) { |
| | | IPage<PersonTrainingRecordListDto> iPage = personTrainingRecordService.personnelTrainingPersonnel(page, userName, userId, departmentId); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢äººåæç» å¹è®è®°å½") |
| | | @GetMapping("queryPersonnelDetails") |
| | | public Result<IPage<TrainingRecordPersonDetailedDto>> queryPersonnelDetails(Page page, Integer userId, Integer trainingDate) { |
| | | IPage<TrainingRecordPersonDetailedDto> iPage = personTrainingRecordService.queryPersonnelDetailsOfUserIdAndYear(page, userId, trainingDate); // æ°å¢æ ¹æ®å¹´ä»½æ¥è¯¢ |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºäººåå¹è®è®°å½") |
| | | @GetMapping("/exportTrainingRecord") |
| | | public void exportTrainingRecord(Integer userId, Integer trainingDate, HttpServletResponse response){ |
| | | personTrainingRecordService.exportTrainingRecordAddTrainingDate(userId, trainingDate, response);// æ°å¢æ ¹æ®å¹´ä»½æ¥è¯¢ |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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.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.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.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.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("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; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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.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); |
| | | // |
| | | // /** |
| | | // * submitConfirmPersonnelCapability |
| | | // * @param personPersonnelCapacity |
| | | // */ |
| | | // void submitConfirmPersonnelCapability(PersonPersonnelCapacity personPersonnelCapacity); |
| | | //} |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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 |
| | | private 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.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 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 |
| | | private 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(); |
| | | //todo: 人åä»»èææè®°å½å§åè±æ |
| | | // 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 nameEn = user.getNameEn(); |
| | | //ç论ç¥è¯èè¯æç»© |
| | | 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); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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"> |
| | | |
| | | |
| | | <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.PersonPostAuthorizationRecordMapper"> |
| | | |
| | | |
| | | <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"> |
| | | |
| | | |
| | | <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> |