¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | <artifactId>cnas-personnel</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | <name>cnas-personnel</name> |
| | | <description>cnas-personnel</description> |
| | | |
| | | <packaging>jar</packaging> |
| | | |
| | | <parent> |
| | | <artifactId>mom</artifactId> |
| | | <groupId>com.yuanchu.mom</groupId> |
| | | <version>1.0.0</version> |
| | | </parent> |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.yuanchu.mom</groupId> |
| | | <artifactId>user-server</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.yuanchu.mom</groupId> |
| | | <artifactId>framework</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.yuanchu.mom</groupId> |
| | | <artifactId>cnas-server</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.belerweb</groupId> |
| | | <artifactId>pinyin4j</artifactId> |
| | | <version>2.5.1</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml-lite</artifactId> |
| | | <version>5.2.2</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.DepartmentDto; |
| | | import com.yuanchu.mom.dto.PersonBasicInfoDetailsDto; |
| | | import com.yuanchu.mom.dto.PersonBasicInfoDto; |
| | | import com.yuanchu.mom.dto.UserPageDto; |
| | | import com.yuanchu.mom.pojo.Annex; |
| | | import com.yuanchu.mom.service.AnnexService; |
| | | import com.yuanchu.mom.service.PersonBasicInfoService; |
| | | import com.yuanchu.mom.utils.FileSaveUtil; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-08-30 09:19:57 |
| | | */ |
| | | @Api(tags = "人å-人ååºæ¬ä¿¡æ¯") |
| | | @RestController |
| | | @RequestMapping("/personBasicInfo") |
| | | @CustomClazzName(name = "èµæºè¦æ±",index = 8) |
| | | public class PersonBasicInfoController { |
| | | |
| | | @Resource |
| | | private PersonBasicInfoService personBasicInfoService; |
| | | |
| | | @Resource |
| | | private AnnexService annexService; |
| | | |
| | | @ValueClassify("人ååºæ¬ä¿¡æ¯") |
| | | @ApiOperation(value = "æ¥è¯¢CNAS人åä¾§è¾¹æ ") |
| | | @GetMapping("/selectCNSAPersonTree") |
| | | public Result<List<DepartmentDto>> selectCNSAPersonTree() { |
| | | return Result.success(personBasicInfoService.selectCNSAPersonTree()); |
| | | } |
| | | |
| | | @ValueClassify("人ååºæ¬ä¿¡æ¯") |
| | | @ApiOperation(value = "è·åCNAS人ååºæ¬ä¿¡æ¯") |
| | | @GetMapping("/getCNASPersonnelInfo") |
| | | public Result getCNASPersonnelInfo(Integer userId) { |
| | | return Result.success(personBasicInfoService.getCNASPersonnelInfo(userId)); |
| | | } |
| | | |
| | | @ValueClassify("人ååºæ¬ä¿¡æ¯") |
| | | @ApiOperation(value = "ä¿åCNAS人ååºæ¬ä¿¡æ¯") |
| | | @PostMapping("/saveCNASPersonnelInfo") |
| | | public Result saveCNASPersonnelInfo(@RequestBody PersonBasicInfoDto personBasicInfoDto) { |
| | | personBasicInfoService.saveCNASPersonnelInfo(personBasicInfoDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "人åæç»å页æ¥è¯¢") |
| | | @ValueClassify("人ååºæ¬ä¿¡æ¯") |
| | | @GetMapping("basicInformationOfPersonnelSelectPage") |
| | | public Result<IPage<Map<String, Object>>> basicInformationOfPersonnelSelectPage(Page<List<PersonBasicInfoDetailsDto>> page, String name, Integer departmentId) { |
| | | return Result.success(personBasicInfoService.basicInformationOfPersonnelSelectPage(page, name, departmentId)); |
| | | } |
| | | |
| | | // ä¸ä¼ æä»¶æ¥å£ |
| | | @ApiOperation(value = "ä¸ä¼ æä»¶æ¥å£") |
| | | @PostMapping("/saveCNASFile") |
| | | public Result saveFile(@RequestPart("file") MultipartFile file) { |
| | | String s = FileSaveUtil.StoreFile(file); |
| | | return Result.success("ä¸ä¼ æå", s); |
| | | } |
| | | |
| | | @GetMapping("/getAnnexByUserId") |
| | | public Result<List<Annex>> getAnnexByUserId(Integer userId) { |
| | | List<Annex> list = annexService.list(new LambdaQueryWrapper<Annex>().eq(Annex::getUserId, userId)); |
| | | return Result.success(list); |
| | | } |
| | | |
| | | // å 餿件 |
| | | @DeleteMapping("/deleteCNASFile") |
| | | public Result saveFile(String fileName) { |
| | | String[] split = fileName.split(","); |
| | | for (String s : split) { |
| | | FileSaveUtil.DeleteFile(s); |
| | | } |
| | | return Result.success(); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 人ååºæ¬ä¿¡æ¯éä»¶æ°å¢ |
| | | */ |
| | | @PostMapping("/addAnnex") |
| | | public Result addAnnex(@RequestBody Annex annex) { |
| | | annexService.save(annex); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @GetMapping("/getAnnex") |
| | | public Result<Annex> getAnnex(Integer id) { |
| | | return Result.success(annexService.getById(id)); |
| | | } |
| | | /** |
| | | * 人ååºæ¬ä¿¡æ¯éä»¶å é¤ |
| | | */ |
| | | @DeleteMapping("/deleteAnnex/{id}") |
| | | public Result deleteAnnex(@PathVariable("id") Integer id) { |
| | | annexService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * 人ååºæ¬ä¿¡æ¯éä»¶ä¿®æ¹ |
| | | * |
| | | */ |
| | | @PostMapping("/updateAnnex") |
| | | public Result updateAnnex(@RequestBody Annex annex) { |
| | | annexService.updateById(annex); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "导åºäººååºæ¬ä¿¡æ¯") |
| | | @PostMapping("/exportPersonBasicInfo") |
| | | public void exportPersonBasicInfo(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception { |
| | | UserPageDto userPageDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), UserPageDto.class); |
| | | personBasicInfoService.exportPersonBasicInfo(userPageDto,response); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¸è½½äººåæ¡£æ¡å¡") |
| | | @PostMapping("/exportPersonBasicInfoById") |
| | | public Result exportPersonBasicInfoById(Integer id, HttpServletResponse response) { |
| | | return Result.success(personBasicInfoService.exportPersonBasicInfoById(id,response)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonCommunicationAbilityDto; |
| | | import com.yuanchu.mom.pojo.PersonCommunicationAbility; |
| | | import com.yuanchu.mom.service.PersonCommunicationAbilityService; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ²éè®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 12:00:57 |
| | | */ |
| | | @Api(tags = "人å - æ²éè®°å½") |
| | | @RestController |
| | | @RequestMapping("/personCommunicationAbility") |
| | | public class PersonCommunicationAbilityController { |
| | | |
| | | @Autowired |
| | | private PersonCommunicationAbilityService personCommunicationAbilityService; |
| | | |
| | | @ApiOperation(value = "æ°å¢/æ´æ° æ²éè®°å½") |
| | | @PostMapping("addOrUpdatePersonCommunicationAbility") |
| | | public Result<?> addOrUpdatePersonCommunicationAbility(@RequestBody PersonCommunicationAbility personCommunicationAbility) { |
| | | personCommunicationAbilityService.saveOrUpdate(personCommunicationAbility); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤ æ²éè®°å½") |
| | | @DeleteMapping("deletePersonCommunicationAbility") |
| | | public Result<?> deletePersonCommunicationAbility(@RequestParam("id") Integer id) { |
| | | personCommunicationAbilityService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ æ²éè®°å½") |
| | | @GetMapping("personPersonCommunicationAbilityPage") |
| | | public Result<IPage<PersonCommunicationAbilityDto>> personPersonCommunicationAbilityPage(Page page, |
| | | Integer departLimsId, |
| | | Integer userId, |
| | | String userName) { |
| | | return Result.success(personCommunicationAbilityService.personPersonCommunicationAbilityPage(page, departLimsId, userId, userName)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å¯¼åºæ²éè®°å½") |
| | | @PostMapping("exportPersonCommunicationAbility") |
| | | public void exportPersonCommunicationAbility(Integer id, HttpServletResponse response) throws Exception{ |
| | | personCommunicationAbilityService.exportPersonCommunicationAbility(id,response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.PersonJobResponsibilitiesDto; |
| | | import com.yuanchu.mom.pojo.PersonJobResponsibilities; |
| | | import com.yuanchu.mom.service.PersonJobResponsibilitiesService; |
| | | 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.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å²ä½èè´£ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 02:07:49 |
| | | */ |
| | | @Api(tags = "人å - å²ä½èè´£") |
| | | @RestController |
| | | @RequestMapping("/personJobResponsibilities") |
| | | public class PersonJobResponsibilitiesController { |
| | | @Autowired |
| | | private PersonJobResponsibilitiesService personJobResponsibilitiesService; |
| | | |
| | | @ValueClassify("å²ä½èè´£") |
| | | @ApiOperation(value = "æ°å¢/æ´æ° å²ä½èè´£") |
| | | @PostMapping("personJobResponsibilitiesSave") |
| | | public Result<?> personJobResponsibilitiesSave(@RequestBody PersonJobResponsibilities personJobResponsibilities) { |
| | | personJobResponsibilitiesService.saveOrUpdate(personJobResponsibilities); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å²ä½èè´£") |
| | | @ApiOperation(value = "å é¤ å²ä½èè´£") |
| | | @DeleteMapping("personJobResponsibilitiesDelete") |
| | | public Result<?> personJobResponsibilitiesDelete(@RequestParam("id") Integer id) { |
| | | personJobResponsibilitiesService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å²ä½èè´£") |
| | | @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); |
| | | } |
| | | |
| | | @ValueClassify("å²ä½èè´£") |
| | | @ApiOperation(value = "导åºä»»èå²ä½è¯´æè¯´") |
| | | @PostMapping("/exportPersonJobResponsibilities") |
| | | public void exportPersonJobResponsibilities(Integer id, HttpServletResponse response){ |
| | | personJobResponsibilitiesService.exportPersonJobResponsibilities(id,response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.ApiModelProperty; |
| | | 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; |
| | | |
| | | @Autowired |
| | | private GetLook getLook; |
| | | |
| | | @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); |
| | | } |
| | | |
| | | /** |
| | | * 人åè½å确认 |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "人åè½å确认") |
| | | @GetMapping("/confirmPersonnelCapacity") |
| | | public Result<?> confirmPersonnelCapacity(Integer id){ |
| | | return Result.success(personPersonnelCapacityService.confirmPersonnelCapacity(id)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonPostAuthorizationRecordDto; |
| | | import com.yuanchu.mom.pojo.PersonPostAuthorizationRecord; |
| | | import com.yuanchu.mom.pojo.PersonRewardPunishmentRecord; |
| | | import com.yuanchu.mom.service.PersonPostAuthorizationRecordService; |
| | | import com.yuanchu.mom.utils.FileSaveUtil; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | 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.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.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.yuanchu.mom.dto.PersonRewardPunishmentRecordDto; |
| | | import com.yuanchu.mom.excel.PersonRewardPunishmentRecordExcel; |
| | | import com.yuanchu.mom.pojo.PersonRewardPunishmentRecord; |
| | | import com.yuanchu.mom.service.PersonRewardPunishmentRecordService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | 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 = "奿©è®°å½å¯¼åº") |
| | | @PostMapping("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.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | 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.dto.PersonSupervisionRecordDto; |
| | | import com.yuanchu.mom.pojo.PersonSupervisionControlSheet; |
| | | import com.yuanchu.mom.pojo.PersonSupervisionProcessingSheet; |
| | | import com.yuanchu.mom.pojo.PersonSupervisionRecord; |
| | | import com.yuanchu.mom.service.PersonSupervisionControlSheetService; |
| | | import com.yuanchu.mom.service.PersonSupervisionProcessingSheetService; |
| | | import com.yuanchu.mom.service.PersonSupervisionRecordService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDate; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-10 04:16:49 |
| | | */ |
| | | @Api(tags = "人å - çç£è®°å½") |
| | | @RestController |
| | | @RequestMapping("/personSupervisionRecord") |
| | | public class PersonSupervisionRecordController { |
| | | |
| | | @Autowired |
| | | private PersonSupervisionRecordService personSupervisionRecordService; |
| | | |
| | | @Autowired |
| | | private PersonSupervisionControlSheetService personSupervisionControlSheetService; |
| | | |
| | | @Autowired |
| | | private PersonSupervisionProcessingSheetService personSupervisionProcessingSheetService; |
| | | |
| | | @ApiOperation(value = "æ°å¢/æ´æ° çç£è®°å½") |
| | | @PostMapping("addOrUpdatePersonSupervisionRecord") |
| | | public Result<?> addOrUpdatePersonSupervisionRecord(@RequestBody PersonSupervisionRecord personSupervisionRecord) { |
| | | personSupervisionRecordService.saveOrUpdate(personSupervisionRecord); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éå é¤ çç£è®°å½") |
| | | @ApiImplicitParam(name = "ids", dataType = "array", allowMultiple = true, paramType = "query") |
| | | @DeleteMapping("deletePersonSupervisionRecord") |
| | | public Result<?> deletePersonSupervisionRecord(@RequestParam("ids") List<Integer> ids) { |
| | | personSupervisionRecordService.deletePersonSupervisionRecord(ids); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ çç£è®°å½") |
| | | @GetMapping("personSupervisionRecordPage") |
| | | public Result<IPage<PersonSupervisionRecordDto>> personSupervisionRecordPage(Page page, |
| | | Integer userId, |
| | | Integer departLimsId, |
| | | String userName) { |
| | | return Result.success(personSupervisionRecordService.personSupervisionRecordPage(page, userId, userName, departLimsId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ çç£è®°å½ - æ§å¶å") |
| | | @GetMapping("personSupervisionControlSheetPage") |
| | | public Result<?> personSupervisionControlSheetPage(Integer id) { |
| | | PersonSupervisionControlSheet byId = personSupervisionControlSheetService.getOne(Wrappers.<PersonSupervisionControlSheet>lambdaQuery() |
| | | .eq(PersonSupervisionControlSheet::getSupervisionRecordId, id)); |
| | | if (ObjectUtils.isEmpty(byId)) { |
| | | return Result.fail(202); |
| | | } else { |
| | | return Result.success(byId); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ çç£è®°å½ - å¤çå") |
| | | @GetMapping("personSupervisionProcessingPage") |
| | | public Result<?> personSupervisionProcessingPage(Integer id) { |
| | | PersonSupervisionProcessingSheet byId = personSupervisionProcessingSheetService.getOne(Wrappers.<PersonSupervisionProcessingSheet>lambdaQuery() |
| | | .eq(PersonSupervisionProcessingSheet::getSupervisionRecordId, id)); |
| | | if (ObjectUtils.isEmpty(byId)) { |
| | | return Result.fail(202); |
| | | } else { |
| | | return Result.success(byId); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢/æ´æ° çç£è®°å½ - æ§å¶å") |
| | | @PostMapping("addOrUpdatePersonSupervisionControl") |
| | | public Result<?> addOrUpdatePersonSupervisionControl(@RequestBody PersonSupervisionControlSheet personSupervisionControlSheet) { |
| | | PersonSupervisionControlSheet supervisionControlSheet = personSupervisionControlSheetService.getOne(Wrappers.<PersonSupervisionControlSheet>lambdaQuery() |
| | | .eq(PersonSupervisionControlSheet::getSupervisionRecordId, personSupervisionControlSheet.getSupervisionRecordId())); |
| | | personSupervisionControlSheet.setCreateTime(LocalDate.now()); |
| | | if (ObjectUtils.isEmpty(supervisionControlSheet)) { |
| | | personSupervisionControlSheetService.save(personSupervisionControlSheet); |
| | | } else { |
| | | personSupervisionControlSheetService.updateById(personSupervisionControlSheet); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢/æ´æ° çç£è®°å½ - å¤çå") |
| | | @PostMapping("addOrUpdatePersonnelServiceProcessing") |
| | | public Result<?> addOrUpdatePersonnelServiceProcessing(@RequestBody PersonSupervisionProcessingSheet personSupervisionProcessingSheet) { |
| | | PersonSupervisionProcessingSheet processingSheetServiceOne = personSupervisionProcessingSheetService.getOne(Wrappers.<PersonSupervisionProcessingSheet>lambdaQuery() |
| | | .eq(PersonSupervisionProcessingSheet::getSupervisionRecordId, personSupervisionProcessingSheet.getSupervisionRecordId())); |
| | | if (ObjectUtils.isEmpty(processingSheetServiceOne)) { |
| | | personSupervisionProcessingSheetService.save(personSupervisionProcessingSheet); |
| | | } else { |
| | | personSupervisionProcessingSheetService.updateById(personSupervisionProcessingSheet); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®°å½ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºäººåçç£è®°å½") |
| | | @GetMapping("/exportPersonSupervisionRecord") |
| | | public void exportPersonSupervisionRecord(Integer id, HttpServletResponse response){ |
| | | personSupervisionRecordService.exportPersonSupervisionRecord(id, response); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®°å½çº æ£æ§å¶å |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºäººåçç£è®°å½çº æ£æ§å¶å") |
| | | @GetMapping("/exportSupervisionControlSheet") |
| | | public void exportSupervisionControlSheet(Integer supervisionRecordId, HttpServletResponse response){ |
| | | personSupervisionControlSheetService.exportSupervisionControlSheet(supervisionRecordId, response); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®°å½çº æ£å¤çå |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºäººåçç£è®°å½çº æ£å¤çå") |
| | | @GetMapping("/exportSupervisionProcessingSheet") |
| | | public void exportSupervisionProcessingSheet(Integer supervisionRecordId, HttpServletResponse response){ |
| | | personSupervisionProcessingSheetService.exportSupervisionProcessingSheet(supervisionRecordId, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.PersonTrackRecord; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.PersonTrackRecordService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å·¥ä½å±¥å å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-02 03:13:03 |
| | | */ |
| | | @Api(tags = "人å - å·¥ä½å±¥å") |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/personTrackRecord") |
| | | @CustomClazzName(name = "èµæºè¦æ±",index = 8) |
| | | public class PersonTrackRecordController { |
| | | |
| | | @Autowired |
| | | private PersonTrackRecordService personTrackRecordService; |
| | | |
| | | private GetLook getLook; |
| | | |
| | | private UserMapper userMapper; |
| | | |
| | | @ValueClassify("å·¥ä½å±¥å") |
| | | @ApiOperation(value = "æ°å¢å·¥ä½å±¥å") |
| | | @PostMapping("personTrackRecordSave") |
| | | public Result<?> personTrackRecordSave(@RequestBody PersonTrackRecord personTrackRecord) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | personTrackRecord.setCreateUser(user.getName()); |
| | | personTrackRecordService.save(personTrackRecord); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å·¥ä½å±¥å") |
| | | @ApiOperation(value = "å é¤å·¥ä½å±¥å") |
| | | @DeleteMapping("personTrackRecordDelete") |
| | | public Result<?> personTrackRecordDelete(@RequestParam("id") Integer id) { |
| | | personTrackRecordService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å·¥ä½å±¥å") |
| | | @ApiOperation(value = "å·¥ä½å±¥åæ´æ°") |
| | | @PutMapping("personTrackRecordUpdate") |
| | | public Result<?> personTrackRecordUpdate(@RequestBody PersonTrackRecord personTrackRecord) { |
| | | personTrackRecordService.updateById(personTrackRecord); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å·¥ä½å±¥å") |
| | | @ApiOperation(value = "æ¥è¯¢å·¥ä½å±¥å") |
| | | @GetMapping("personTrackRecordSelect") |
| | | public Result<IPage<PersonTrackRecord>> personTrackRecordSelect(Page page, String userId, String departmentId) { |
| | | IPage<PersonTrackRecord> iPage = personTrackRecordService.personTrackRecordSelect(page, userId, departmentId); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | @ValueClassify("å·¥ä½å±¥å") |
| | | @ApiOperation(value = "å·¥ä½å±¥å导åº") |
| | | @GetMapping("personTrackRecordExport") |
| | | public void personTrackRecordExport(HttpServletResponse response, String userId, String departmentId) throws Exception { |
| | | List<PersonTrackRecord> data = personTrackRecordService.personTrackRecordExport(userId, departmentId); |
| | | 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(PersonTrackRecord.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet() |
| | | .doWrite(data); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | 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.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.*; |
| | | import com.yuanchu.mom.numgen.NumberGenerator; |
| | | import com.yuanchu.mom.pojo.PersonTraining; |
| | | import com.yuanchu.mom.pojo.PersonTrainingDetailed; |
| | | import com.yuanchu.mom.pojo.PersonTrainingRecord; |
| | | import com.yuanchu.mom.service.PersonTrainingDetailedService; |
| | | import com.yuanchu.mom.service.PersonTrainingRecordService; |
| | | import com.yuanchu.mom.service.PersonTrainingService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:11:49 |
| | | */ |
| | | @Api(tags = "人å - å¹è®è®¡å") |
| | | @RestController |
| | | @RequestMapping("/personTraining") |
| | | public class PersonTrainingController { |
| | | |
| | | @Autowired |
| | | private PersonTrainingService personTrainingService; |
| | | |
| | | @Autowired |
| | | private PersonTrainingDetailedService personTrainingDetailedService; |
| | | |
| | | @Autowired |
| | | private PersonTrainingRecordService personTrainingRecordService; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<PersonTrainingDetailed> numberGenerator; |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "å¹è®è®¡å 导å
¥") |
| | | @PostMapping("personTrainingImport") |
| | | public Result<?> personTrainingImport(@RequestPart("file") MultipartFile file) { |
| | | personTrainingService.personTrainingImport(file); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "å¹è®è®¡å å é¤") |
| | | @DeleteMapping("personTrainingDelete") |
| | | public Result<?> personTrainingDelete(@RequestParam("id") Integer id) { |
| | | personTrainingService.personTrainingDelete(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "å¹è®è®¡å æ¥è¯¢") |
| | | @GetMapping("personTrainingSelect") |
| | | public Result<IPage<PersonTrainingDto>> personTrainingSelect(Page page, String compilerName, String departmentId) { |
| | | IPage<PersonTrainingDto> iPage = personTrainingService.personTrainingSelect(page, compilerName, departmentId); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "年度å¹è®è®¡å å®¡æ ¸") |
| | | @PostMapping("reviewAnnualPersonnelTraining") |
| | | public Result<?> reviewAnnualPersonnelTraining(@RequestBody PersonTrainingUpdateDto personTrainingUpdateDto) { |
| | | personTrainingService.reviewAnnualPersonnelTraining(personTrainingUpdateDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "å¹è®è®¡å æ¹å") |
| | | @PostMapping("approveAnnualPersonnelTraining") |
| | | public Result<?> approveAnnualPersonnelTraining(@RequestBody PersonTrainingUpdateDto personTrainingUpdateDto) { |
| | | personTrainingService.approveAnnualPersonnelTraining(personTrainingUpdateDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "年度计åæç»è¡¨ æ°å¢/ç¼è¾") |
| | | @PostMapping("addOrUpdatePersonTrainingDetailed") |
| | | public Result<?> addOrUpdatePersonTrainingDetailed(@RequestBody PersonTrainingDetailed personTrainingDetailed) { |
| | | if (ObjectUtils.isEmpty(personTrainingDetailed.getId())) { |
| | | 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); |
| | | } |
| | | personTrainingDetailedService.saveOrUpdate(personTrainingDetailed); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "年度计åæç»è¡¨ æ¹éå é¤") |
| | | @PostMapping("deleteAnnualPlanDetailTable") |
| | | public Result<?> deleteAnnualPlanDetailTable(@RequestParam("ids") String ids) { |
| | | personTrainingDetailedService.deleteAnnualPlanDetailTable(ids); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "年度计åæç»è¡¨ æ¥è¯¢") |
| | | @GetMapping("queryTheAnnualPlanDetailsTable") |
| | | public Result<IPage<PersonTrainingDetailedDto>> queryTheAnnualPlanDetailsTable(Page page, |
| | | String trainingLecturerName, String courseCode, |
| | | String trainingDate, Integer id, Integer userId) { |
| | | IPage<PersonTrainingDetailedDto> iPage = personTrainingDetailedService.queryTheAnnualPlanDetailsTable(page, |
| | | trainingLecturerName, courseCode, trainingDate, id, userId); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "å¹è®ä¸èæ ¸è®°å½ æ¥è¯¢") |
| | | @GetMapping("trainingAndAssessmentRecordsPage") |
| | | public Result<List<PersonTrainingRecordDto>> trainingAndAssessmentRecordsPage(Integer trainingDetailedId, |
| | | String userName) { |
| | | List<PersonTrainingRecordDto> list = personTrainingRecordService.trainingAndAssessmentRecordsPage(trainingDetailedId, userName); |
| | | return Result.success(list); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "å¹è®ä¸èæ ¸è®°å½ æ°å¢äººå") |
| | | @PostMapping("newPersonnelAddedToTrainingRecords") |
| | | public Result<?> newPersonnelAddedToTrainingRecords(@RequestBody List<PersonTrainingRecord> personTrainingRecord) { |
| | | personTrainingRecordService.saveBatch(personTrainingRecord); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "å¹è®ä¸èæ ¸è®°å½ è®¤é¢") |
| | | @PostMapping("claimOfTrainingAndAssessmentRecords") |
| | | public Result<?> claimOfTrainingAndAssessmentRecords(@RequestParam("claimAndClaim") Boolean claimAndClaim, |
| | | @RequestParam("courseId") Integer courseId) { |
| | | personTrainingRecordService.claimOfTrainingAndAssessmentRecords(claimAndClaim, courseId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "å¹è®ä¸èæ ¸è®°å½ æäº¤/æ¤é") |
| | | @PostMapping("trainingAndAssessmentRecordsAdded") |
| | | public Result<?> trainingAndAssessmentRecordsAdded(@RequestBody PersonTrainingRecordSubmitDto personTrainingRecordSubmitDto) { |
| | | personTrainingDetailedService.update(Wrappers.<PersonTrainingDetailed>lambdaUpdate() |
| | | .eq(PersonTrainingDetailed::getId, personTrainingRecordSubmitDto.getTrainingDetailedId()) |
| | | .set(PersonTrainingDetailed::getAssessmentMethod, personTrainingRecordSubmitDto.getAssessmentMethod()) |
| | | .set(PersonTrainingDetailed::getComprehensiveAssessment, personTrainingRecordSubmitDto.getComprehensiveAssessment()) |
| | | .set(PersonTrainingDetailed::getAssessmentUserId, personTrainingRecordSubmitDto.getAssessmentUserId()) |
| | | .set(PersonTrainingDetailed::getState, personTrainingRecordSubmitDto.getState())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®¡å") |
| | | @ApiOperation(value = "å¹è®ä¸èæ ¸è®°å½ å é¤") |
| | | @PostMapping("deleteTrainingAndAssessmentRecords") |
| | | public Result<?> deleteTrainingAndAssessmentRecords(@RequestParam("ids") String ids) { |
| | | personTrainingRecordService.deleteTrainingAndAssessmentRecords(ids); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @PostMapping("outOfFocusPreservation") |
| | | public Result<?> outOfFocusPreservation(@RequestBody PersonTrainingRecord personTrainingRecord) { |
| | | personTrainingRecordService.updateById(personTrainingRecord); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®è®¡å |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºäººåå¹è®è®¡å") |
| | | @GetMapping("/exportPersonTraining") |
| | | public void exportPersonTraining(Integer id, HttpServletResponse response){ |
| | | personTrainingService.exportPersonTraining(id, response); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®ä¸èæ ¸è®°å½ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºäººåå¹è®ä¸èæ ¸è®°å½") |
| | | @GetMapping("/exportPersonTrainingRecord") |
| | | public void exportPersonTrainingRecord(Integer id, HttpServletResponse response){ |
| | | personTrainingService.exportPersonTrainingRecord(id, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.PersonTrainingRecordListDto; |
| | | import com.yuanchu.mom.dto.TrainingRecordPersonDetailedDto; |
| | | import com.yuanchu.mom.service.PersonTrainingRecordService; |
| | | 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.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; |
| | | |
| | | @ValueClassify("å¹è®è®°å½") |
| | | @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); |
| | | } |
| | | |
| | | @ValueClassify("å¹è®è®°å½") |
| | | @ApiOperation(value = "æ¥è¯¢äººåæç» å¹è®è®°å½") |
| | | @GetMapping("queryPersonnelDetails") |
| | | public Result<IPage<TrainingRecordPersonDetailedDto>> queryPersonnelDetails(Page page, Integer userId, Integer trainingDate) { |
| | | // IPage<TrainingRecordPersonDetailedDto> iPage = personTrainingRecordService.queryPersonnelDetails(page, userId); |
| | | IPage<TrainingRecordPersonDetailedDto> iPage = personTrainingRecordService.queryPersonnelDetailsOfUserIdAndYear(page, userId, trainingDate); // æ°å¢æ ¹æ®å¹´ä»½æ¥è¯¢ |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®è®°å½ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºäººåå¹è®è®°å½") |
| | | @GetMapping("/exportTrainingRecord") |
| | | public void exportTrainingRecord(Integer userId, Integer trainingDate, HttpServletResponse response){ |
| | | // personTrainingRecordService.exportTrainingRecord(userId, response); |
| | | personTrainingRecordService.exportTrainingRecordAddTrainingDate(userId, trainingDate, response);// æ°å¢æ ¹æ®å¹´ä»½æ¥è¯¢ |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.annotation.ValueClassify; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.PersonSupervisePlanDetailsDto; |
| | | import com.yuanchu.mom.dto.PersonSupervisePlanDto; |
| | | import com.yuanchu.mom.pojo.PersonSupervisePlan; |
| | | import com.yuanchu.mom.pojo.PersonSupervisePlanDetails; |
| | | import com.yuanchu.mom.service.*; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * ç管计å å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author tangbowen |
| | | * @since 2024-09-29 11:13:25 |
| | | */ |
| | | @Api(tags = "人å - çç£è®¡å") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/superVisePlan") |
| | | public class SuperVisePlanController { |
| | | |
| | | private PersonSupervisePlanDetailsService personSupervisePlanDetailsService; |
| | | |
| | | private PersonSupervisePlanService personSupervisePlanService; |
| | | |
| | | private GetLook getLook; |
| | | |
| | | @ValueClassify("çç£è®¡å") |
| | | @ApiOperation(value = "æ¥è¯¢ 年度计å") |
| | | @GetMapping("/yearPlanList") |
| | | public Result<IPage<PersonSupervisePlanDto>> yearPlanList(Integer size, Integer current, @RequestParam(value = "organizationPerson",required = false) String organizationPerson) { |
| | | return Result.success(personSupervisePlanService.yearPlanDtoIPage(new Page<>(current, size), organizationPerson)); |
| | | } |
| | | |
| | | @ValueClassify("çç£è®¡å") |
| | | @ApiOperation(value = "æ¹å 年度计å") |
| | | @GetMapping("/yearPlanDetailApproval") |
| | | public Result yearPlanDetailApproval(Integer id,Integer approvalStatus) { |
| | | personSupervisePlanService.update(Wrappers.<PersonSupervisePlan>lambdaUpdate() |
| | | .eq(PersonSupervisePlan::getId, id) |
| | | .set(PersonSupervisePlan::getApprovalStatus, approvalStatus) |
| | | .set(PersonSupervisePlan::getApprovalId,getLook.selectPowerByMethodAndUserId(null).get("userId")) |
| | | .set(PersonSupervisePlan::getApprovalDate, LocalDateTime.now())); |
| | | return Result.success("æ´æ°æå"); |
| | | } |
| | | |
| | | @ValueClassify("çç£è®¡å") |
| | | @ApiOperation(value = "å é¤ å¹´åº¦è®¡å") |
| | | @DeleteMapping("/yearPlanDel") |
| | | public Result yearPlanDel(String id) { |
| | | personSupervisePlanService.removeById(id); |
| | | // 对åºç年度计å详æ
ä¹éå é¤ |
| | | personSupervisePlanDetailsService.remove(Wrappers.<PersonSupervisePlanDetails>lambdaQuery() |
| | | .eq(PersonSupervisePlanDetails::getPlanId, id)); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("çç£è®¡å") |
| | | @ApiOperation(value = "æ¥è¯¢ 年度计å详æ
") |
| | | @GetMapping("/yearPlanDetailList") |
| | | public Result<IPage<PersonSupervisePlanDetailsDto>> yearPlanDetailList(Page page, |
| | | Integer planId, |
| | | @RequestParam(value = "date",required = false) String date, |
| | | @RequestParam(value = "project",required = false) String project) { |
| | | return Result.success(personSupervisePlanDetailsService.yearPlanDetailPage(page, date,project, planId)); |
| | | } |
| | | |
| | | @ValueClassify("çç£è®¡å") |
| | | @ApiOperation(value = "导å
¥ 年度计å") |
| | | @PostMapping("/yearPlanDetailImport") |
| | | public Result yearPlanDetailImport(@RequestPart("file") MultipartFile file) { |
| | | personSupervisePlanService.yearPlanDetailImport(file); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("çç£è®¡å") |
| | | @ApiOperation(value = "å é¤ å¹´åº¦è®¡å详æ
") |
| | | @DeleteMapping("/yearPlanDetailDel") |
| | | public Result yearPlanDetailDel(String id) { |
| | | return Result.success(personSupervisePlanDetailsService.removeById(id)); |
| | | } |
| | | |
| | | @ValueClassify("çç£è®¡å") |
| | | @ApiOperation(value = "æ°å¢ 年度计å详æ
") |
| | | @PostMapping("/yearPlanDetailAdd") |
| | | public Result yearPlanDetailAdd(@RequestBody PersonSupervisePlanDetails personSupervisePlanDetails) { |
| | | personSupervisePlanDetailsService.save(personSupervisePlanDetails); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("çç£è®¡å") |
| | | @ApiOperation(value = "ç¼è¾ 年度计å详æ
") |
| | | @PostMapping("/yearPlanDetailEdit") |
| | | public Result yearPlanDetailEdit(@RequestBody PersonSupervisePlanDetails personSupervisePlanDetails) { |
| | | personSupervisePlanDetailsService.updateById(personSupervisePlanDetails); |
| | | return Result.success("ä¿åæå"); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®¡å |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºäººåçç£è®¡å") |
| | | @PostMapping("/exportSuperVisePlan") |
| | | public void exportSuperVisePlan(Integer id, HttpServletResponse response){ |
| | | personSupervisePlanService.exportSuperVisePlan(id, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.yuanchu.mom.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| | | import com.yuanchu.mom.pojo.Annex; |
| | | import com.yuanchu.mom.pojo.PersonBasicInfo; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.w3c.dom.stylesheets.LinkStyle; |
| | | |
| | | import java.util.List; |
| | | |
| | | @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.yuanchu.mom.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.yuanchu.mom.pojo.PersonCommunicationAbility; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonCommunicationAbilityDto extends PersonCommunicationAbility { |
| | | |
| | | private String userName; |
| | | |
| | | private String account; |
| | | |
| | | private String createUserName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.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.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.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.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.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.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.PersonPostAuthorizationRecord; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonPostAuthorizationRecordDto extends PersonPostAuthorizationRecord { |
| | | |
| | | private String userName; |
| | | |
| | | private String account; |
| | | |
| | | private String createUserName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.PersonRewardPunishmentRecord; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonRewardPunishmentRecordDto extends PersonRewardPunishmentRecord { |
| | | |
| | | private String userName; |
| | | |
| | | private String account; |
| | | |
| | | private String createUserName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.PersonSupervisePlanDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PersonSupervisePlanDetailsDto extends PersonSupervisePlanDetails { |
| | | |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.PersonSupervisionControlSheet; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @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.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.PersonSupervisionProcessingSheet; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @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 causeAnalysisDateString; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½") |
| | | private String correctiveAction; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½ æ¥æ") |
| | | private String correctiveActionDateString; |
| | | |
| | | @ApiModelProperty("4 éªè¯é¨é¨") |
| | | private String verificationDepartment; |
| | | |
| | | @ApiModelProperty("4 éªè¯é¨é¨ æ¥æ") |
| | | private String verificationDepartmentDateString; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.PersonSupervisionRecord; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.yuanchu.mom.pojo.PersonTrainingDetailed; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class PersonTrainingDetailedDto extends PersonTrainingDetailed { |
| | | |
| | | @ApiModelProperty("举åé¨é¨åç§°") |
| | | private String holdingDepartmentName; |
| | | |
| | | @ApiModelProperty("å¹è®è®²å¸åç§°") |
| | | private String trainingLecturerName; |
| | | |
| | | @ApiModelProperty("å½åç»å½äººæ¯å¦è®¤é¢") |
| | | private Boolean whetherClaim; |
| | | |
| | | |
| | | @ApiModelProperty("å¹è®æ¥æ") |
| | | private String trainingDateString; |
| | | |
| | | // 导åºä½¿ç¨ |
| | | @TableField(select = false, exist = false) |
| | | @ApiModelProperty("åºå·(导åºä½¿ç¨)") |
| | | private Integer index; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.PersonTrainingRecord; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class PersonTrainingRecordSubmitDto{ |
| | | |
| | | @ApiModelProperty("年度计åæç»ID") |
| | | private Integer trainingDetailedId; |
| | | |
| | | @ApiModelProperty("èæ ¸æ¹å¼") |
| | | private String assessmentMethod; |
| | | |
| | | @ApiModelProperty("æ¬æ¬¡å¹è®ç»¼åè¯ä»·") |
| | | private String comprehensiveAssessment; |
| | | |
| | | @ApiModelProperty("è¯ä»·äºº") |
| | | private Integer assessmentUserId; |
| | | |
| | | private String state; |
| | | |
| | | @ApiModelProperty("课æ¶") |
| | | private Integer classHour; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @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.yuanchu.mom.excel; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.excel; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.yuanchu.mom.service.PersonTrainingDetailedService; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class PersonTrainingDetailedListener extends AnalysisEventListener<PersonTrainingDetailedUpload> { |
| | | |
| | | private Integer planId; |
| | | |
| | | private static final int BATCH_COUNT = 1000; |
| | | List<PersonTrainingDetailedUpload> list = new ArrayList<>(); |
| | | |
| | | private PersonTrainingDetailedService personTrainingDetailedService; |
| | | |
| | | public PersonTrainingDetailedListener(PersonTrainingDetailedService personTrainingDetailedService) { |
| | | this.personTrainingDetailedService = personTrainingDetailedService; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(PersonTrainingDetailedUpload data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | save(); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | save(); |
| | | } |
| | | |
| | | private void save() { |
| | | personTrainingDetailedService.importExcel(list, this.planId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class PersonTrainingDetailedUpload { |
| | | |
| | | @ExcelProperty("å¹è®ç®æ ") |
| | | private String trainingObjectives; |
| | | |
| | | @ExcelProperty("å¹è®å
容") |
| | | private String trainingContent; |
| | | |
| | | @ExcelProperty("å¹è®æ¹å¼") |
| | | private String trainingMode; |
| | | |
| | | @ExcelProperty("åå 对象") |
| | | private String participants; |
| | | |
| | | @ExcelProperty("举åé¨é¨") |
| | | private String holdingDepartment; |
| | | |
| | | @ExcelProperty("å¹è®è®²å¸") |
| | | private String trainingLecturerName; |
| | | |
| | | @ExcelProperty("å¹è®æ¶é´") |
| | | private LocalDateTime trainingDate; |
| | | |
| | | @ExcelProperty("课æ¶") |
| | | private Integer classHour; |
| | | |
| | | @ExcelProperty("夿³¨") |
| | | private String remarks; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.Annex; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface AnnexMapper extends BaseMapper<Annex> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.yuanchu.mom.dto.DepartmentDto; |
| | | import com.yuanchu.mom.dto.PersonBasicInfoDto; |
| | | import com.yuanchu.mom.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.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonCommunicationAbilityDto; |
| | | import com.yuanchu.mom.pojo.PersonCommunicationAbility; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | 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.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonJobResponsibilitiesDto; |
| | | import com.yuanchu.mom.pojo.PersonJobResponsibilities; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonPersonnelCapacityDto; |
| | | import com.yuanchu.mom.dto.PersonPersonnelCapacityExportDto; |
| | | import com.yuanchu.mom.pojo.PersonPersonnelCapacity; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | 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.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonPostAuthorizationRecordDto; |
| | | import com.yuanchu.mom.pojo.PersonPostAuthorizationRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.dto.PersonRewardPunishmentRecordDto; |
| | | import com.yuanchu.mom.excel.PersonRewardPunishmentRecordExcel; |
| | | import com.yuanchu.mom.pojo.PersonRewardPunishmentRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | import java.time.LocalDateTime; |
| | | 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.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonSupervisePlanDetailsDto; |
| | | import com.yuanchu.mom.mybatis_config.MyBaseMapper; |
| | | import com.yuanchu.mom.pojo.PersonSupervisePlanDetails; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonSupervisePlanDto; |
| | | import com.yuanchu.mom.pojo.PersonSupervisePlan; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®¡å - ç¶ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 04:14:45 |
| | | */ |
| | | public interface PersonSupervisePlanMapper extends BaseMapper<PersonSupervisePlan> { |
| | | |
| | | IPage<PersonSupervisePlanDto> pageByPerson(Page page, String organizationPerson); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.dto.PersonSupervisionControlSheetExportDto; |
| | | import com.yuanchu.mom.pojo.PersonSupervisionControlSheet; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | 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.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.dto.PersonSupervisionProcessingSheetDto; |
| | | import com.yuanchu.mom.pojo.PersonSupervisionProcessingSheet; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | 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.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonSupervisionRecordDto; |
| | | import com.yuanchu.mom.pojo.PersonSupervisionRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonTrainingDetailedDto; |
| | | import com.yuanchu.mom.dto.PersonTrainingRecordDto; |
| | | import com.yuanchu.mom.mybatis_config.MyBaseMapper; |
| | | import com.yuanchu.mom.pojo.PersonTrainingDetailed; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | 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); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»è¡¨idæ¥è¯¢è¯¦æ
|
| | | * @param trainingId |
| | | * @return |
| | | */ |
| | | List<PersonTrainingDetailedDto> selectTrainingList(@Param("trainingId") Integer trainingId); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯¦ç» |
| | | * @param id |
| | | * @return |
| | | */ |
| | | PersonTrainingDetailedDto selectTrainingDetail(@Param("id") Integer id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.yuanchu.mom.dto.PersonTrainingDto; |
| | | import com.yuanchu.mom.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, String departLimsId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonTrainingRecordDto; |
| | | import com.yuanchu.mom.dto.PersonTrainingRecordListDto; |
| | | import com.yuanchu.mom.dto.TrainingRecordPersonDetailedDto; |
| | | import com.yuanchu.mom.pojo.PersonTrainingRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | 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.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | 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.yuanchu.mom.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.LocalDateTime; |
| | | |
| | | /** |
| | | * <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("å
¥èæ¶é´") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDateTime entryTime; |
| | | |
| | | @ApiModelProperty("å½åèå¡") |
| | | private String currentPosition; |
| | | |
| | | @ApiModelProperty("å²ä½") |
| | | private String post; |
| | | |
| | | @ApiModelProperty("èç§°") |
| | | @ExcelProperty("èç§°") |
| | | private String professionalTitle; |
| | | |
| | | @ApiModelProperty("æ§å«") |
| | | private String sex; |
| | | |
| | | @ApiModelProperty("人ååç±»") |
| | | private String personnelClassification; |
| | | |
| | | @ApiModelProperty("åºçæ¥æ") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDateTime dateBirth; |
| | | |
| | | @ApiModelProperty("身份è¯å·") |
| | | @ExcelProperty("è¯ä»¶å·ç ") |
| | | private String identityCard; |
| | | |
| | | @ApiModelProperty("æ°æ") |
| | | private String nation; |
| | | |
| | | @ApiModelProperty("æ¿æ²»é¢è²") |
| | | private String politicalStatus; |
| | | |
| | | @ApiModelProperty("æé«å¦å") |
| | | @ExcelProperty("æé«å¦å") |
| | | private String officialAcademicRedentials; |
| | | |
| | | @ApiModelProperty("æ¯ä¸æ¶é´1") |
| | | @ExcelProperty("æ¯ä¸æ¶é´") |
| | | private LocalDateTime graduationTime1; |
| | | |
| | | @ApiModelProperty("æ¯ä¸é¢æ ¡1") |
| | | @ExcelProperty("æ¯ä¸é¢æ ¡") |
| | | private String graduatedInstitutions1; |
| | | |
| | | @ApiModelProperty("ä¸ä¸1") |
| | | @ExcelProperty("æå¦ä¸ä¸") |
| | | private String major1; |
| | | |
| | | @ApiModelProperty("æ¯ä¸æ¶é´2") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDateTime graduationTime2; |
| | | |
| | | @ApiModelProperty("æ¯ä¸é¢æ ¡2") |
| | | private String graduatedInstitutions2; |
| | | |
| | | @ApiModelProperty("ä¸ä¸2") |
| | | private String major2; |
| | | |
| | | @ApiModelProperty("ææºå·") |
| | | private String telephone; |
| | | |
| | | @ApiModelProperty("计åå®ä¹ ç»æ") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDateTime endPlannedInternship; |
| | | |
| | | @ApiModelProperty("å®é
å®ä¹ ç»æ") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDateTime endPracticalPractice; |
| | | |
| | | @ApiModelProperty("ç¦»èæ¥æ") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDateTime dateDeparture; |
| | | |
| | | @ApiModelProperty("æ¡é¢å¾ç") |
| | | private String desktopPicture; |
| | | |
| | | @ApiModelProperty("éä»¶èµæ") |
| | | private String attachmentInformation; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remarks; |
| | | |
| | | @ApiModelProperty("ç¨æ·è¡¨ï¼userï¼id") |
| | | private Integer userId; |
| | | // |
| | | @ApiModelProperty("å·¥å·") |
| | | private Integer 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 HH:mm:ss",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | @ExcelProperty("å
¥é墿¶é´") |
| | | private LocalDateTime groupTime; |
| | | |
| | | @ApiModelProperty("å
¥å使¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | @ExcelProperty("å
¥å使¶é´") |
| | | private LocalDateTime unitTime; |
| | | |
| | | |
| | | @ApiModelProperty("ç´æ¥ä¸çº§") |
| | | private String reportingTo; |
| | | |
| | | |
| | | @ApiModelProperty("å³å¨å
³ç³»") |
| | | private Integer laborRelations; |
| | | |
| | | @ApiModelProperty("è¯ç¨å¼å§æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDateTime trialStartTime; |
| | | |
| | | @ApiModelProperty("è¯ç¨ç»ææ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDateTime trialEndTime; |
| | | |
| | | @ApiModelProperty("ç±è´¯") |
| | | @ExcelProperty("ç±è´¯") |
| | | private String nativePlace; |
| | | |
| | | @ApiModelProperty("è¯ä»¶ç±»å") |
| | | private String idType; |
| | | |
| | | @ApiModelProperty("è¯ä»¶æææ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDateTime validityPeriod; |
| | | |
| | | @ApiModelProperty("å©å§»ç¶åµ") |
| | | private Integer 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 Integer retiredSoldiers; |
| | | |
| | | @ApiModelProperty("å
¥å
/墿¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) // 为空å¯ä»¥æ´æ° |
| | | private LocalDateTime 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("æåæ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime lastUpdateTime; |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | 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.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.pojo; |
| | | |
| | | 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.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.pojo; |
| | | |
| | | 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.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.pojo; |
| | | |
| | | 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.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.pojo; |
| | | |
| | | 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.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * <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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | 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.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <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") |
| | | @ApiModelProperty("çç£æ¥æ") |
| | | private Date 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.yuanchu.mom.pojo; |
| | | |
| | | 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.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <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责任é¨é¨ è´è´£äººid") |
| | | private Integer responsibleDepartmentPersonId; |
| | | |
| | | @ApiModelProperty("3责任é¨é¨ æ¥æ") |
| | | private LocalDateTime responsibleDepartmentDate; |
| | | |
| | | @ApiModelProperty("4æ¯å¦éè¦éåçº æ£æªæ½") |
| | | private String 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.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <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 æåºé¨é¨ 人å id") |
| | | private Integer proposingDepartmentPersonId; |
| | | |
| | | @ApiModelProperty("1 æåºé¨é¨ æ¥æ") |
| | | private LocalDateTime proposingDepartmentDate; |
| | | |
| | | @ApiModelProperty("2 åå åæ") |
| | | private String causeAnalysis; |
| | | |
| | | @ApiModelProperty("2 åå åæ é¨é¨ 人å id") |
| | | private Integer causeAnalysisPersonId; |
| | | |
| | | @ApiModelProperty("2 åå åæ æ¥æ") |
| | | private LocalDateTime causeAnalysisDate; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½") |
| | | private String correctiveMeasure; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½ æåºè¦æ±é¨é¨ç¡®è®¤") |
| | | private String requestDepartmentConfirmation; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½ 人åid") |
| | | private Integer correctiveActionId; |
| | | |
| | | @ApiModelProperty("3 çº æ£æªæ½ æ¥æ") |
| | | private LocalDateTime correctiveActionDate; |
| | | |
| | | @ApiModelProperty("4 宿½éªè¯ç»æ") |
| | | private String implementationVerificationResults; |
| | | |
| | | @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.yuanchu.mom.pojo; |
| | | |
| | | 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.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <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 LocalDateTime 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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.yuanchu.mom.pojo; |
| | | |
| | | 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.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | 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 java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <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 Integer trainingLecturerId; |
| | | |
| | | @ApiModelProperty("å¹è®æ¥æ") |
| | | private Date trainingDate; |
| | | |
| | | @ApiModelProperty("å¼å§æ¶é´") |
| | | private String openingTime; |
| | | |
| | | @ApiModelProperty("ç»ææ¶é´") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty("课é¢å¦å") |
| | | private String projectCredits; |
| | | |
| | | @ApiModelProperty("课æ¶") |
| | | private Integer 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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.schedule; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.yuanchu.mom.pojo.PersonTrainingDetailed; |
| | | import com.yuanchu.mom.service.PersonTrainingDetailedService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | public class PersonSchedule { |
| | | |
| | | @Autowired |
| | | 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) |
| | | .lt(PersonTrainingDetailed::getTrainingDate, newDate)); |
| | | list.forEach(i -> { |
| | | String trainingDate = sdf.format(i.getTrainingDate()); |
| | | 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.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.Annex; |
| | | |
| | | public interface AnnexService extends IService<Annex> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.yuanchu.mom.dto.DepartmentDto; |
| | | import com.yuanchu.mom.dto.PersonBasicInfoDto; |
| | | import com.yuanchu.mom.dto.UserPageDto; |
| | | import com.yuanchu.mom.pojo.PersonBasicInfo; |
| | | |
| | | 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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonCommunicationAbilityDto; |
| | | import com.yuanchu.mom.pojo.PersonCommunicationAbility; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | 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.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonJobResponsibilitiesDto; |
| | | import com.yuanchu.mom.pojo.PersonJobResponsibilities; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonPersonnelCapacityDto; |
| | | import com.yuanchu.mom.pojo.PersonPersonnelCapacity; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | 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.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonPostAuthorizationRecordDto; |
| | | import com.yuanchu.mom.pojo.PersonPostAuthorizationRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | 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.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.dto.PersonRewardPunishmentRecordDto; |
| | | import com.yuanchu.mom.excel.PersonRewardPunishmentRecordExcel; |
| | | import com.yuanchu.mom.pojo.PersonRewardPunishmentRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.time.LocalDateTime; |
| | | 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.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonSupervisePlanDetailsDto; |
| | | import com.yuanchu.mom.excel.PersonSupervisePlanDetailsUpload; |
| | | import com.yuanchu.mom.pojo.PersonSupervisePlanDetails; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | 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.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonSupervisePlanDto; |
| | | import com.yuanchu.mom.excel.PersonSupervisePlanDetailsUpload; |
| | | import com.yuanchu.mom.pojo.PersonSupervisePlan; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®¡å - ç¶ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 04:14:45 |
| | | */ |
| | | public interface PersonSupervisePlanService extends IService<PersonSupervisePlan> { |
| | | |
| | | IPage<PersonSupervisePlanDto> yearPlanDtoIPage(Page page, String organizationPerson); |
| | | |
| | | void yearPlanDetailImport(MultipartFile file); |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®¡å |
| | | * @param id |
| | | * @param response |
| | | */ |
| | | void exportSuperVisePlan(Integer id, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.yuanchu.mom.pojo.PersonSupervisionControlSheet; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | 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.yuanchu.mom.service; |
| | | |
| | | import com.yuanchu.mom.pojo.PersonSupervisionProcessingSheet; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | 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.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonSupervisionRecordDto; |
| | | import com.yuanchu.mom.pojo.PersonSupervisionRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | 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.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonTrainingDetailedDto; |
| | | import com.yuanchu.mom.dto.PersonTrainingRecordDto; |
| | | import com.yuanchu.mom.dto.PersonTrainingRecordSubmitDto; |
| | | import com.yuanchu.mom.excel.PersonTrainingDetailedUpload; |
| | | import com.yuanchu.mom.pojo.PersonTrainingDetailed; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å详æ
æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:46:27 |
| | | */ |
| | | public interface PersonTrainingDetailedService extends IService<PersonTrainingDetailed> { |
| | | |
| | | 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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.yuanchu.mom.dto.PersonTrainingRecordDto; |
| | | import com.yuanchu.mom.dto.PersonTrainingRecordListDto; |
| | | import com.yuanchu.mom.dto.TrainingRecordPersonDetailedDto; |
| | | import com.yuanchu.mom.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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.yuanchu.mom.dto.PersonTrainingDetailedDto; |
| | | import com.yuanchu.mom.dto.PersonTrainingDto; |
| | | import com.yuanchu.mom.dto.PersonTrainingUpdateDto; |
| | | import com.yuanchu.mom.pojo.PersonTraining; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:11:49 |
| | | */ |
| | | public interface PersonTrainingService extends IService<PersonTraining> { |
| | | |
| | | IPage<PersonTrainingDto> personTrainingSelect(Page page, |
| | | String compilerName, String departmentId); |
| | | |
| | | 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.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.AnnexMapper; |
| | | import com.yuanchu.mom.pojo.Annex; |
| | | import com.yuanchu.mom.service.AnnexService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class AnnexServiceImpl extends ServiceImpl<AnnexMapper, Annex> implements AnnexService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.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.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.yuanchu.mom.dto.DepartmentDto; |
| | | import com.yuanchu.mom.dto.PersonBasicInfoDto; |
| | | import com.yuanchu.mom.dto.UserPageDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.*; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.service.PersonBasicInfoService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | 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 javax.annotation.Resource; |
| | | 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.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-08-30 09:19:57 |
| | | */ |
| | | |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class PersonBasicInfoServiceImpl extends ServiceImpl<PersonBasicInfoMapper, PersonBasicInfo> implements PersonBasicInfoService { |
| | | |
| | | @Autowired |
| | | private DepartmentLimsMapper departmentMapper; |
| | | |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | @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 { |
| | | 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.selectUserDtoPageList(new Page(-1, -1), QueryWrappers.queryWrappers(userPageDto)).getRecords(); |
| | | 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(org.apache.poi.xwpf.usermodel.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 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); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | 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.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.yuanchu.mom.dto.PersonCommunicationAbilityDto; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.PersonCommunicationAbility; |
| | | import com.yuanchu.mom.mapper.PersonCommunicationAbilityMapper; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.PersonCommunicationAbilityService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | 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.yuanchu.mom.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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.yuanchu.mom.dto.PersonJobResponsibilitiesDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.PersonJobResponsibilities; |
| | | import com.yuanchu.mom.mapper.PersonJobResponsibilitiesMapper; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.PersonJobResponsibilitiesService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | 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.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <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.yuanchu.mom.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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.PersonPersonnelCapacityDto; |
| | | import com.yuanchu.mom.dto.PersonPersonnelCapacityExportDto; |
| | | import com.yuanchu.mom.dto.PersonSupervisionControlSheetExportDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.PersonPersonnelCapacity; |
| | | import com.yuanchu.mom.mapper.PersonPersonnelCapacityMapper; |
| | | import com.yuanchu.mom.service.PersonPersonnelCapacityService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.DateImageUtil; |
| | | 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; |
| | | |
| | | @Resource |
| | | private GetLook getLook; |
| | | |
| | | @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 = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | baseMapper.update(null, Wrappers.<PersonPersonnelCapacity>lambdaUpdate() |
| | | .eq(PersonPersonnelCapacity::getId, id) |
| | | .set(PersonPersonnelCapacity::getConfirmOperatingPersonnelId, userId) |
| | | .set(PersonPersonnelCapacity::getConfirmDate, LocalDateTime.now())); |
| | | |
| | | return true; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.FilePictureRenderData; |
| | | import com.yuanchu.mom.dto.PersonPostAuthorizationRecordDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.PersonPostAuthorizationRecord; |
| | | import com.yuanchu.mom.mapper.PersonPostAuthorizationRecordMapper; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.PersonPostAuthorizationRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | 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.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.dto.PersonRewardPunishmentRecordDto; |
| | | import com.yuanchu.mom.excel.PersonRewardPunishmentRecordExcel; |
| | | import com.yuanchu.mom.pojo.PersonRewardPunishmentRecord; |
| | | import com.yuanchu.mom.mapper.PersonRewardPunishmentRecordMapper; |
| | | import com.yuanchu.mom.service.PersonRewardPunishmentRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Collections; |
| | | 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.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.PersonSupervisePlanDetailsDto; |
| | | import com.yuanchu.mom.excel.PersonSupervisePlanDetailsUpload; |
| | | import com.yuanchu.mom.pojo.PersonSupervisePlanDetails; |
| | | import com.yuanchu.mom.mapper.PersonSupervisePlanDetailsMapper; |
| | | import com.yuanchu.mom.service.PersonSupervisePlanDetailsService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | 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) { |
| | | return baseMapper.pageByDate(page,date,project, planId); |
| | | } |
| | | |
| | | @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.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | 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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.PersonSupervisePlanDto; |
| | | import com.yuanchu.mom.dto.PersonTrainingDetailedDto; |
| | | import com.yuanchu.mom.excel.PersonSupervisePlanDetailsListener; |
| | | import com.yuanchu.mom.excel.PersonSupervisePlanDetailsUpload; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.PersonSupervisePlan; |
| | | import com.yuanchu.mom.mapper.PersonSupervisePlanMapper; |
| | | import com.yuanchu.mom.pojo.PersonSupervisePlanDetails; |
| | | import com.yuanchu.mom.pojo.PersonTraining; |
| | | import com.yuanchu.mom.service.PersonSupervisePlanDetailsService; |
| | | import com.yuanchu.mom.service.PersonSupervisePlanService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.DateImageUtil; |
| | | import com.yuanchu.mom.utils.Jwt; |
| | | 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.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.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * çç£è®¡å - ç¶ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-09 04:14:45 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class PersonSupervisePlanServiceImpl extends ServiceImpl<PersonSupervisePlanMapper, PersonSupervisePlan> implements PersonSupervisePlanService { |
| | | |
| | | @Autowired |
| | | private PersonSupervisePlanDetailsService personSupervisePlanDetailsService; |
| | | |
| | | @Autowired |
| | | private GetLook getLook; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | public IPage<PersonSupervisePlanDto> yearPlanDtoIPage(Page page, String organizationPerson) { |
| | | return baseMapper.pageByPerson(page, organizationPerson); |
| | | } |
| | | |
| | | @Override |
| | | public void yearPlanDetailImport(MultipartFile file) { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter"); |
| | | // 年度计åç¶çº§æ°å¢æ°æ® |
| | | PersonSupervisePlan personSupervisePlan = new PersonSupervisePlan(); |
| | | String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf(".")); |
| | | personSupervisePlan.setFileName(fileName); |
| | | personSupervisePlan.setOrganizationPersonId(map1.get("userId")); |
| | | personSupervisePlan.setOrganizationDate(LocalDateTime.now()); |
| | | baseMapper.insert(personSupervisePlan); |
| | | // 年度计å详æ
æ°å¢ |
| | | try { |
| | | PersonSupervisePlanDetailsListener personSupervisePlanDetailsListener = new PersonSupervisePlanDetailsListener(personSupervisePlanDetailsService); |
| | | personSupervisePlanDetailsListener.setPlanId(personSupervisePlan.getId()); |
| | | EasyExcel.read(file.getInputStream(), PersonSupervisePlanDetailsUpload.class, personSupervisePlanDetailsListener).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåçç£è®¡å |
| | | * @param id |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportSuperVisePlan(Integer id, HttpServletResponse response) { |
| | | // æ¥è¯¢è¯¦æ
|
| | | 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)); |
| | | |
| | | int index = 1; |
| | | for (PersonSupervisePlanDetails detailedDto : detailedDtos) { |
| | | detailedDto.setIndex(index); |
| | | index++; |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | 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("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.yuanchu.mom.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | 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.yuanchu.mom.dto.PersonSupervisionControlSheetExportDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.PersonSupervisionControlSheet; |
| | | import com.yuanchu.mom.mapper.PersonSupervisionControlSheetMapper; |
| | | import com.yuanchu.mom.service.PersonSupervisionControlSheetService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | 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.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | 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.yuanchu.mom.dto.PersonSupervisionProcessingSheetDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.PersonSupervisionProcessingSheet; |
| | | import com.yuanchu.mom.mapper.PersonSupervisionProcessingSheetMapper; |
| | | import com.yuanchu.mom.service.PersonSupervisionProcessingSheetService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.format.DateTimeFormatter; |
| | | 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.yuanchu.mom.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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.yuanchu.mom.dto.PersonSupervisionRecordDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.PersonSupervisionControlSheet; |
| | | import com.yuanchu.mom.pojo.PersonSupervisionProcessingSheet; |
| | | import com.yuanchu.mom.pojo.PersonSupervisionRecord; |
| | | import com.yuanchu.mom.mapper.PersonSupervisionRecordMapper; |
| | | import com.yuanchu.mom.service.PersonSupervisionControlSheetService; |
| | | import com.yuanchu.mom.service.PersonSupervisionProcessingSheetService; |
| | | import com.yuanchu.mom.service.PersonSupervisionRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.DateImageUtil; |
| | | 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); |
| | | |
| | | //è·åææ¯è´è´£äººçç¾åå°å |
| | | 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); |
| | | }}); |
| | | |
| | | 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.yuanchu.mom.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.yuanchu.mom.mapper.PersonTrackRecordMapper; |
| | | import com.yuanchu.mom.pojo.PersonTrackRecord; |
| | | import com.yuanchu.mom.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.yuanchu.mom.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.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.PersonTrainingDetailedDto; |
| | | import com.yuanchu.mom.dto.PersonTrainingRecordDto; |
| | | import com.yuanchu.mom.dto.PersonTrainingRecordSubmitDto; |
| | | import com.yuanchu.mom.excel.PersonTrainingDetailedUpload; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.numgen.NumberGenerator; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.mapper.PersonTrainingDetailedMapper; |
| | | import com.yuanchu.mom.service.DepartmentLimsService; |
| | | import com.yuanchu.mom.service.PersonTrainingDetailedService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.service.PersonTrainingRecordService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®¡å详æ
æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-11 01:46:27 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @AllArgsConstructor |
| | | public class PersonTrainingDetailedServiceImpl extends ServiceImpl<PersonTrainingDetailedMapper, PersonTrainingDetailed> implements PersonTrainingDetailedService { |
| | | |
| | | private DepartmentLimsService departmentLimsService; |
| | | |
| | | private UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private GetLook getLook; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<PersonTrainingDetailed> numberGenerator; |
| | | |
| | | @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); |
| | | |
| | | // å¹é
举åé¨é¨ |
| | | 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()); |
| | | |
| | | // å¹é
è®²å¸ |
| | | User user = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, i.getTrainingLecturerName())); |
| | | if (ObjectUtils.isEmpty(user)) { |
| | | throw new ErrorException("æªæ¾å°è¯¥è®²å¸ï¼" + i.getTrainingLecturerName()); |
| | | } |
| | | personTrainingDetailed.setTrainingLecturerId(user.getId()); |
| | | 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) { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter"); |
| | | return baseMapper.queryTheAnnualPlanDetailsTable(page, trainingLecturerName, courseCode, trainingDate, id, userId, map1.get("userId")); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.PersonTrainingRecordDto; |
| | | import com.yuanchu.mom.dto.PersonTrainingRecordListDto; |
| | | import com.yuanchu.mom.dto.TrainingRecordPersonDetailedDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.PersonTrainingRecordMapper; |
| | | import com.yuanchu.mom.pojo.PersonTrainingDetailed; |
| | | import com.yuanchu.mom.pojo.PersonTrainingRecord; |
| | | import com.yuanchu.mom.service.PersonTrainingDetailedService; |
| | | import com.yuanchu.mom.service.PersonTrainingRecordService; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å¹è®è®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-10-12 04:50:48 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Service |
| | | public class PersonTrainingRecordServiceImpl extends ServiceImpl<PersonTrainingRecordMapper, PersonTrainingRecord> implements PersonTrainingRecordService { |
| | | |
| | | @Autowired |
| | | private GetLook getLook; |
| | | |
| | | @Autowired |
| | | private PersonTrainingDetailedService personTrainingDetailedService; |
| | | |
| | | @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) { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter"); |
| | | // 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, map1.get("userId"))); |
| | | if (ObjectUtils.isNotEmpty(personTrainingRecord1)) { |
| | | throw new ErrorException("请å¿éå¤è®¤é¢ï¼"); |
| | | } |
| | | // 3ã妿æªé夿°å¢å¹è®è®°å½ |
| | | // true è®¤é¢ |
| | | if (claimAndClaim) { |
| | | PersonTrainingRecord personTrainingRecord = new PersonTrainingRecord(); |
| | | personTrainingRecord.setUserId(map1.get("userId")); |
| | | personTrainingRecord.setCourseId(courseId); |
| | | baseMapper.insert(personTrainingRecord); |
| | | // åæ¶è®¤é¢ |
| | | } else { |
| | | baseMapper.delete(Wrappers.<PersonTrainingRecord>lambdaQuery() |
| | | .eq(PersonTrainingRecord::getUserId, map1.get("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("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ£éªè¯¥å¹è®è¯¾ç¨æ¯å¦å
è®¸è®¤é¢ |
| | | * @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"); |
| | | String originalDateStr = sdfWithoutTime.format(personTrainingDetailed.getTrainingDate()); |
| | | SimpleDateFormat sdfWithTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | try { |
| | | // æ·»å æ¶åç§åçæ¥æ |
| | | 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.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | 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.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.*; |
| | | import com.yuanchu.mom.excel.PersonSupervisePlanDetailsUpload; |
| | | import com.yuanchu.mom.excel.PersonTrainingDetailedListener; |
| | | import com.yuanchu.mom.excel.PersonTrainingDetailedUpload; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.PersonTrainingDetailedMapper; |
| | | import com.yuanchu.mom.mapper.PersonTrainingMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.mapper.PersonTrainingRecordMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.PersonTraining; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.pojo.PersonTrainingDetailed; |
| | | import com.yuanchu.mom.service.PersonTrainingDetailedService; |
| | | import com.yuanchu.mom.service.PersonTrainingService; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.XWPFDocumentUtils; |
| | | import com.yuanchu.mom.utils.DateImageUtil; |
| | | import lombok.AllArgsConstructor; |
| | | 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.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.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * <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 GetLook getLook; |
| | | |
| | | @Autowired |
| | | private PersonTrainingDetailedService personTrainingDetailedService; |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private PersonTrainingDetailedMapper personTrainingDetailedMapper; |
| | | |
| | | @Autowired |
| | | private PersonTrainingRecordMapper personTrainingRecordMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public IPage<PersonTrainingDto> personTrainingSelect(Page page, String compilerName, String departmentId) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = Optional.ofNullable(userMapper.selectById(userId)).orElse(new User()); |
| | | if(3==user.getRoleId()){ |
| | | departmentId=null; |
| | | } |
| | | return baseMapper.personTrainingSelect(page, compilerName, departmentId); |
| | | } |
| | | |
| | | @Override |
| | | public void personTrainingImport(MultipartFile file) { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter"); |
| | | // 年度计åç¶çº§æ°å¢æ°æ® |
| | | PersonTraining personSupervisePlan = new PersonTraining(); |
| | | String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf(".")); |
| | | personSupervisePlan.setFileName(fileName); |
| | | personSupervisePlan.setCompilerId(map1.get("userId")); |
| | | personSupervisePlan.setCompilationDate(LocalDateTime.now()); |
| | | baseMapper.insert(personSupervisePlan); |
| | | // 年度计å详æ
æ°å¢ |
| | | try { |
| | | PersonTrainingDetailedListener personSupervisePlanDetailsListener = new PersonTrainingDetailedListener(personTrainingDetailedService); |
| | | personSupervisePlanDetailsListener.setPlanId(personSupervisePlan.getId()); |
| | | EasyExcel.read(file.getInputStream(), PersonTrainingDetailedUpload.class, personSupervisePlanDetailsListener).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void personTrainingDelete(Integer id) { |
| | | personTrainingDetailedService.removeById(id); |
| | | baseMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void reviewAnnualPersonnelTraining(PersonTrainingUpdateDto personTrainingUpdateDto) { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter"); |
| | | PersonTraining personTraining = new PersonTraining(); |
| | | personTraining.setId(personTrainingUpdateDto.getId()); |
| | | personTraining.setReviewerId(map1.get("userId")); |
| | | personTraining.setAuditDate(LocalDateTime.now()); |
| | | personTraining.setAuditRemarks(personTrainingUpdateDto.getRemarks()); |
| | | personTraining.setReviewerStatus(personTrainingUpdateDto.getStatus()); |
| | | baseMapper.updateById(personTraining); |
| | | } |
| | | |
| | | @Override |
| | | public void approveAnnualPersonnelTraining(PersonTrainingUpdateDto personTrainingUpdateDto) { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter"); |
| | | LambdaUpdateWrapper<PersonTraining> wrapper = Wrappers.<PersonTraining>lambdaUpdate() |
| | | .eq(PersonTraining::getId, personTrainingUpdateDto.getId()) |
| | | .set(PersonTraining::getApproverId, map1.get("userId")) |
| | | .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) { |
| | | if (detailedDto.getTrainingDate() != null) { |
| | | SimpleDateFormat sdfWithoutTime = new SimpleDateFormat("yyyy-MM-dd"); |
| | | detailedDto.setTrainingDateString(sdfWithoutTime.format(detailedDto.getTrainingDate())); |
| | | } |
| | | |
| | | 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); |
| | | |
| | | // æ¥è¯¢å¹è®ç人å |
| | | 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.yuanchu.mom.mapper.PersonBasicInfoMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.dto.PersonBasicInfoDto"> |
| | | SELECT * |
| | | 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_user |
| | | 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_user |
| | | <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.yuanchu.mom.mapper.PersonCommunicationAbilityMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.mapper.PersonJobResponsibilitiesMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.PersonJobResponsibilities"> |
| | | <id column="id" property="id" /> |
| | | <result column="post_name" property="postName" /> |
| | | <result column="affiliated_function_id" property="affiliatedFunctionId" /> |
| | | <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.yuanchu.mom.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.yuanchu.mom.mapper.PersonPersonnelCapacityMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.mapper.PersonPostAuthorizationRecordMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.mapper.PersonRewardPunishmentRecordMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.mapper.PersonSupervisePlanDetailsMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.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.yuanchu.mom.dto.PersonSupervisePlanDetailsDto"> |
| | | select cpspd.*, 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 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.yuanchu.mom.mapper.PersonSupervisePlanMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.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.yuanchu.mom.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> |
| | | </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.yuanchu.mom.mapper.PersonSupervisionControlSheetMapper"> |
| | | |
| | | <!-- æ¥è¯¢çç£è®°å½æ§å¶å --> |
| | | |
| | | <select id="selectSupervisionControl" |
| | | resultType="com.yuanchu.mom.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.yuanchu.mom.mapper.PersonSupervisionProcessingSheetMapper"> |
| | | |
| | | <!-- æ¥è¯¢äººåçç£è®°å½å¤çå --> |
| | | <select id="selectProcessingSheet" resultType="com.yuanchu.mom.dto.PersonSupervisionProcessingSheetDto"> |
| | | select sps.*, |
| | | dl1.name proposing_department, |
| | | dl2.name cause_analysis, |
| | | 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.yuanchu.mom.mapper.PersonSupervisionRecordMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.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.yuanchu.mom.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> |
| | | <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) |
| | | </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.yuanchu.mom.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.yuanchu.mom.mapper.PersonTrackRecordMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.mapper.PersonTrainingDetailedMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.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.yuanchu.mom.dto.PersonTrainingDetailedDto"> |
| | | SELECT cptd.*, |
| | | 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 |
| | | <where> |
| | | <if test="id != null"> |
| | | and cptd.plan_id = #{id} |
| | | </if> |
| | | <if test="userId != null"> |
| | | and u1.id = #{userId} |
| | | </if> |
| | | <if test="courseCode != null and courseCode != ''"> |
| | | and cptd.course_code like concat('%', #{courseCode}, '%') |
| | | </if> |
| | | <if test="trainingLecturerName != null and trainingLecturerName != ''"> |
| | | and u1.name like concat('%', #{trainingLecturerName}, '%') |
| | | </if> |
| | | <if test="trainingDate != null and trainingDate != ''"> |
| | | and date_format(cptd.training_date,'%Y-%m-%d') = #{trainingDate} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- æ ¹æ®ä¸»è¡¨idæ¥è¯¢è¯¦æ
--> |
| | | <select id="selectTrainingList" resultType="com.yuanchu.mom.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> |
| | | |
| | | <!-- æ¥è¯¢è¯¦ç» --> |
| | | <select id="selectTrainingDetail" resultType="com.yuanchu.mom.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.yuanchu.mom.mapper.PersonTrainingMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.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.yuanchu.mom.dto.PersonTrainingDto"> |
| | | 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="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> |
| | | </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.yuanchu.mom.mapper.PersonTrainingRecordMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.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.yuanchu.mom.dto.PersonTrainingRecordDto"> |
| | | select cptr.*, u.account, u.name user_name, u.phone, r.name role_name |
| | | from cnas_person_training_record cptr |
| | | left join user u on u.id = cptr.user_id |
| | | left join role r on r.id = u.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.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.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.yuanchu.mom.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> |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é¨é¨æç» |
| | |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(exist = false) |
| | | private List<DepartmentLims> children; |
| | | } |
| | |
| | | <version>3.3.3</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.apache.commons</groupId> |
| | | <artifactId>commons-text</artifactId> |
| | | <version>1.3</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.google.guava</groupId> |
| | | <artifactId>guava</artifactId> |
| | | <version>29.0-android</version> <!-- è¯·æ ¹æ®éè¦éæ©åéççæ¬ --> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2011-2020, baomidou (jobob@qq.com). |
| | | * <p> |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| | | * use this file except in compliance with the License. You may obtain a copy of |
| | | * the License at |
| | | * <p> |
| | | * https://www.apache.org/licenses/LICENSE-2.0 |
| | | * <p> |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| | | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| | | * License for the specific language governing permissions and limitations under |
| | | * the License. |
| | | */ |
| | | package com.yuanchu.mom.numgen; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfo; |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfoHelper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.support.ColumnCache; |
| | | import com.baomidou.mybatisplus.core.toolkit.support.SFunction; |
| | | |
| | | import java.lang.ref.WeakReference; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | |
| | | import static java.util.Locale.ENGLISH; |
| | | |
| | | /** |
| | | * Lambda è§£æå·¥å
·ç±» |
| | | * |
| | | * @author HCL, MieMie |
| | | * @since 2018-05-10 |
| | | */ |
| | | public final class LambdaUtils { |
| | | |
| | | /** |
| | | * åæ®µæ å° |
| | | */ |
| | | private static final Map<String, Map<String, ColumnCache>> COLUMN_CACHE_MAP = new ConcurrentHashMap<>(); |
| | | |
| | | /** |
| | | * SerializedLambda ååºååç¼å |
| | | */ |
| | | private static final Map<String, WeakReference<SerializedLambda>> FUNC_CACHE = new ConcurrentHashMap<>(); |
| | | |
| | | /** |
| | | * è§£æ lambda 表达å¼, è¯¥æ¹æ³åªæ¯è°ç¨äº {@link SerializedLambda#resolve(SFunction)} ä¸çæ¹æ³ï¼å¨æ¤åºç¡ä¸å äºç¼åã |
| | | * 该ç¼åå¯è½ä¼å¨ä»»æä¸å®çæ¶é´è¢«æ¸
é¤ |
| | | * |
| | | * @param func éè¦è§£æç lambda 对象 |
| | | * @param <T> ç±»åï¼è¢«è°ç¨ç Function 对象çç®æ ç±»å |
| | | * @return è¿åè§£æåçç»æ |
| | | * @see SerializedLambda#resolve(SFunction) |
| | | */ |
| | | public static <T> SerializedLambda resolve(SFunction<T, ?> func) { |
| | | Class<?> clazz = func.getClass(); |
| | | String canonicalName = clazz.getCanonicalName(); |
| | | return Optional.ofNullable(FUNC_CACHE.get(canonicalName)) |
| | | .map(WeakReference::get) |
| | | .orElseGet(() -> { |
| | | SerializedLambda lambda = SerializedLambda.resolve(func); |
| | | FUNC_CACHE.put(canonicalName, new WeakReference<>(lambda)); |
| | | return lambda; |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * æ ¼å¼å key å°ä¼ å
¥ç key åæ´ä¸ºå¤§åæ ¼å¼ |
| | | * |
| | | * <pre> |
| | | * Assert.assertEquals("USERID", formatKey("userId")) |
| | | * </pre> |
| | | * |
| | | * @param key key |
| | | * @return 大åç key |
| | | */ |
| | | public static String formatKey(String key) { |
| | | return key.toUpperCase(ENGLISH); |
| | | } |
| | | |
| | | /** |
| | | * å°ä¼ å
¥ç表信æ¯å å
¥ç¼å |
| | | * |
| | | * @param tableInfo è¡¨ä¿¡æ¯ |
| | | */ |
| | | public static void installCache(TableInfo tableInfo) { |
| | | COLUMN_CACHE_MAP.put(tableInfo.getEntityType().getName(), createColumnCacheMap(tableInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ç¼åå®ä½å段 MAP ä¿¡æ¯ |
| | | * |
| | | * @param info è¡¨ä¿¡æ¯ |
| | | * @return ç¼å map |
| | | */ |
| | | private static Map<String, ColumnCache> createColumnCacheMap(TableInfo info) { |
| | | Map<String, ColumnCache> map = new HashMap<>(); |
| | | |
| | | String kp = info.getKeyProperty(); |
| | | if (StringUtils.isNotBlank(kp)) { |
| | | map.put(formatKey(kp), new ColumnCache(info.getKeyColumn(), info.getKeySqlSelect())); |
| | | } |
| | | |
| | | info.getFieldList().forEach(i -> |
| | | map.put(formatKey(i.getProperty()), new ColumnCache(i.getColumn(), i.getSqlSelect())) |
| | | ); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * è·åå®ä½å¯¹åºå段 MAP |
| | | * |
| | | * @param clazz å®ä½ç±» |
| | | * @return ç¼å map |
| | | */ |
| | | public static Map<String, ColumnCache> getColumnMap(Class<?> clazz) { |
| | | return COLUMN_CACHE_MAP.computeIfAbsent(clazz.getName(), key -> { |
| | | TableInfo info = TableInfoHelper.getTableInfo(clazz); |
| | | return info == null ? null : createColumnCacheMap(info); |
| | | }); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.numgen; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.TableFieldInfo; |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfo; |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfoHelper; |
| | | import com.baomidou.mybatisplus.core.toolkit.support.SFunction; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.reflection.property.PropertyNamer; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Optional; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | |
| | | /** |
| | | * ç¼å·çæå¨ |
| | | * |
| | | * @Author: zhangxy |
| | | * @Date: 2020-09-08 16:31 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class NumberGenerator<T> { |
| | | |
| | | private static Pattern NUMBER_PATTERN = Pattern.compile("(.+)\\((\\d+)\\)"); |
| | | |
| | | private NumberGeneratorModelHelper numberGeneratorModelHelper; |
| | | |
| | | |
| | | public String getCopyValueOfUniqueField(final String value, SFunction<T, ?> column) { |
| | | if (value == null) { |
| | | return null; |
| | | } else { |
| | | Matcher matcher = NUMBER_PATTERN.matcher(value); |
| | | String oldValue = value; |
| | | int index = 1; |
| | | if (matcher.matches()) { |
| | | oldValue = matcher.group(1); |
| | | index = Integer.valueOf(matcher.group(2)) + 1; |
| | | } |
| | | |
| | | NumberTableInfo info = initDbInfo(column); |
| | | while (true) { |
| | | String newValue = oldValue + "(" + (index++) + ")"; |
| | | boolean exist = numberGeneratorModelHelper.numberExist(newValue, info); |
| | | if (!exist) { |
| | | return newValue; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * çæç¼å· |
| | | * |
| | | * @param numOfDigits |
| | | * @param column |
| | | * @return |
| | | */ |
| | | public String generateNumber(final int numOfDigits, SFunction<T, ?> column) { |
| | | return generateNumberWithPrefix(numOfDigits, null, column); |
| | | } |
| | | |
| | | /** |
| | | * çæå¸¦åç¼çç¼å· |
| | | * |
| | | * @param numOfDigits |
| | | * @param prefix |
| | | * @param column |
| | | * @return |
| | | */ |
| | | public String generateNumberWithPrefix(final int numOfDigits, final String prefix, SFunction<T, ?> column) { |
| | | NumberTableInfo info = initDbInfo(column); |
| | | String generatedNumber = generateNumberWithExtension(info, numOfDigits, prefix, ""); |
| | | return prependPrefix(prefix, generatedNumber); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * çæå¸¦åç¼çç¼å· |
| | | * |
| | | * @param numOfDigits |
| | | * @param suffix |
| | | * @param column |
| | | * @return |
| | | */ |
| | | public String generateNumberWithSuffix(final int numOfDigits, final String suffix, SFunction<T, ?> column) { |
| | | NumberTableInfo info = initDbInfo(column); |
| | | String generatedNumber = generateNumberWithExtension(info, numOfDigits, "", suffix); |
| | | return appendSuffix(suffix, generatedNumber); |
| | | } |
| | | |
| | | /** |
| | | * åå§åæ°æ®åºè¡¨åãåæ®µå |
| | | * |
| | | * @param column |
| | | * @return |
| | | */ |
| | | private NumberTableInfo initDbInfo(SFunction<T, ?> column) { |
| | | SerializedLambda ld = LambdaUtils.resolve(column); |
| | | TableInfo tableInfo = TableInfoHelper.getTableInfo(ld.getImplClass()); |
| | | String fieldName = PropertyNamer.methodToProperty(ld.getImplMethodName()); |
| | | Optional<TableFieldInfo> op = tableInfo.getFieldList().stream().filter(f -> fieldName.equals(f.getProperty())).findFirst(); |
| | | if (!op.isPresent()) { |
| | | throw new RuntimeException("è·åæ°æ®åºå段åºéï¼è¯·æ£æ¥æ å°"); |
| | | } |
| | | TableFieldInfo fieldInfo = op.get(); |
| | | |
| | | NumberTableInfo info = new NumberTableInfo(); |
| | | info.setLogicDelete(tableInfo.isLogicDelete()); |
| | | info.setNumberFieldName(fieldInfo.getColumn()); |
| | | info.setTableName(tableInfo.getTableName()); |
| | | return info; |
| | | } |
| | | |
| | | |
| | | private String generateNumberWithExtension(NumberTableInfo numberTableInfo, int numOfDigits, String prefix, String suffix) { |
| | | Long dbMax = numberGeneratorModelHelper.getNumbersProjection(numberTableInfo, prefix, suffix); |
| | | Long greatestNumber = 0L; |
| | | if (dbMax != null) { |
| | | greatestNumber = dbMax; |
| | | } |
| | | return String.format("%0" + numOfDigits + "d", greatestNumber + 1); |
| | | } |
| | | |
| | | private String prependPrefix(final String prefix, final String generatedNumber) { |
| | | if (prefix == null) { |
| | | return generatedNumber; |
| | | } |
| | | return prefix + generatedNumber; |
| | | } |
| | | |
| | | |
| | | private String appendSuffix(final String suffix, final String generatedNumber) { |
| | | if (suffix == null) { |
| | | return generatedNumber; |
| | | } |
| | | return generatedNumber + suffix; |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * *************************************************************************** |
| | | * Copyright (c) 2010 Qcadoo Limited |
| | | * Project: Qcadoo Framework |
| | | * Version: 1.4 |
| | | * <p> |
| | | * This file is part of Qcadoo. |
| | | * <p> |
| | | * Qcadoo is free software; you can redistribute it and/or modify |
| | | * it under the terms of the GNU Affero General Public License as published |
| | | * by the Free Software Foundation; either version 3 of the License, |
| | | * or (at your option) any later version. |
| | | * <p> |
| | | * This program is distributed in the hope that it will be useful, |
| | | * but WITHOUT ANY WARRANTY; without even the implied warranty |
| | | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| | | * See the GNU Affero General Public License for more details. |
| | | * <p> |
| | | * You should have received a copy of the GNU Affero General Public License |
| | | * along with this program; if not, write to the Free Software |
| | | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| | | * *************************************************************************** |
| | | */ |
| | | package com.yuanchu.mom.numgen; |
| | | |
| | | import com.google.common.collect.Maps; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.commons.text.StringSubstitutor; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhangxy |
| | | */ |
| | | @AllArgsConstructor |
| | | @Service |
| | | public class NumberGeneratorModelHelper { |
| | | |
| | | private JdbcTemplate jdbcTemplate; |
| | | |
| | | |
| | | private static final String NUMBER_EXIST_QUERY_TEMPLATE = "select count(*) from ${TABLE_NAME} where ${NUMBER_FIELD}='${VALUE}'"; |
| | | |
| | | |
| | | private static final String GET_NUMBERS_QUERY_TEMPLATE = "select MAX( CAST( " |
| | | + " coalesce(TRIM(LEADING '0' from ${NUMBER_FIELD}), '0') " |
| | | + " AS UNSIGNED ) ) " |
| | | + "from ${TABLE_NAME} where 1=1"; |
| | | |
| | | private static final String GET_PREFIX_AWARE_NUMBERS_QUERY_TEMPLATE = "select MAX( CAST( " |
| | | + " TRIM(LEADING '0' from SUBSTRING(${NUMBER_FIELD}, ${NUMBER_STARTS_AT})) " |
| | | + " AS UNSIGNED ) ) " |
| | | + "from ${TABLE_NAME} where ${NUMBER_FIELD} like '${PREFIX}%'"; |
| | | |
| | | private static final String GET_SUFFIX_AWARE_NUMBERS_QUERY_TEMPLATE = "select MAX( CAST( " |
| | | + " TRIM(LEADING '0' from SUBSTRING(${NUMBER_FIELD}, 1, POSITION('${SUFFIX}' IN ${NUMBER_FIELD}) - 1)) " |
| | | + " AS UNSIGNED )) " |
| | | + "from ${TABLE_NAME} where ${NUMBER_FIELD} like '%${SUFFIX}'"; |
| | | |
| | | |
| | | public boolean numberExist(final String value, final NumberTableInfo numberTableInfo) { |
| | | Map<String, String> placeholderValues = Maps.newHashMap(); |
| | | |
| | | placeholderValues.put("TABLE_NAME", numberTableInfo.getTableName()); |
| | | placeholderValues.put("NUMBER_FIELD", numberTableInfo.getNumberFieldName()); |
| | | placeholderValues.put("VALUE", value); |
| | | String query = new StringSubstitutor(placeholderValues, "${", "}").replace(NUMBER_EXIST_QUERY_TEMPLATE); |
| | | Long count = jdbcTemplate.queryForObject(query, Long.class); |
| | | return count > 0; |
| | | } |
| | | |
| | | public Long getNumbersProjection(final NumberTableInfo numberTableInfo, final String prefix, final String suffix) { |
| | | String sqlQuery = buildQuery(numberTableInfo, prefix, suffix); |
| | | return jdbcTemplate.queryForObject(sqlQuery, Long.class); |
| | | } |
| | | |
| | | private String buildQuery(final NumberTableInfo numberTableInfo, |
| | | final String prefix, final String suffix) { |
| | | Map<String, String> placeholderValues = Maps.newHashMap(); |
| | | |
| | | placeholderValues.put("TABLE_NAME", numberTableInfo.getTableName()); |
| | | placeholderValues.put("NUMBER_FIELD", numberTableInfo.getNumberFieldName()); |
| | | |
| | | String query; |
| | | if (StringUtils.isNotEmpty(prefix)) { |
| | | placeholderValues.put("PREFIX", prefix); |
| | | int prefixLength = StringUtils.length(prefix); |
| | | placeholderValues.put("NUMBER_STARTS_AT", String.valueOf(prefixLength + 1)); |
| | | query = GET_PREFIX_AWARE_NUMBERS_QUERY_TEMPLATE; |
| | | } else if (StringUtils.isNotEmpty(suffix)) { |
| | | placeholderValues.put("SUFFIX", suffix); |
| | | query = GET_SUFFIX_AWARE_NUMBERS_QUERY_TEMPLATE; |
| | | } else { |
| | | query = GET_NUMBERS_QUERY_TEMPLATE; |
| | | } |
| | | |
| | | if(numberTableInfo.isLogicDelete()){ |
| | | query += " and active=true"; |
| | | } |
| | | StringSubstitutor substitutor = new StringSubstitutor(placeholderValues, "${", "}"); |
| | | return substitutor.replace(query); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.numgen; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author: zhangxy |
| | | * @Date: 2020-09-11 16:48 |
| | | */ |
| | | @Data |
| | | public class NumberTableInfo { |
| | | |
| | | private String tableName; |
| | | private String numberFieldName; |
| | | |
| | | private boolean logicDelete; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2011-2020, baomidou (jobob@qq.com). |
| | | * <p> |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| | | * use this file except in compliance with the License. You may obtain a copy of |
| | | * the License at |
| | | * <p> |
| | | * https://www.apache.org/licenses/LICENSE-2.0 |
| | | * <p> |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| | | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| | | * License for the specific language governing permissions and limitations under |
| | | * the License. |
| | | */ |
| | | package com.yuanchu.mom.numgen; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ClassUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ExceptionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.SerializationUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.support.SFunction; |
| | | |
| | | import java.io.*; |
| | | |
| | | /** |
| | | * è¿ä¸ªç±»æ¯ä» {@link java.lang.invoke.SerializedLambda} éé¢ copy è¿æ¥çï¼ |
| | | * åæ®µä¿¡æ¯å®å
¨ä¸æ · |
| | | * <p>è´è´£å°ä¸ä¸ªæ¯æåºåç Function åºåå为 SerializedLambda</p> |
| | | * |
| | | * @author HCL |
| | | * @since 2018/05/10 |
| | | */ |
| | | public class SerializedLambda implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 8025925345765570181L; |
| | | |
| | | private Class<?> capturingClass; |
| | | private String functionalInterfaceClass; |
| | | private String functionalInterfaceMethodName; |
| | | private String functionalInterfaceMethodSignature; |
| | | private String implClass; |
| | | private String implMethodName; |
| | | private String implMethodSignature; |
| | | private int implMethodKind; |
| | | private String instantiatedMethodType; |
| | | private Object[] capturedArgs; |
| | | |
| | | /** |
| | | * éè¿ååºååè½¬æ¢ lambda 表达å¼ï¼è¯¥æ¹æ³åªè½åºåå lambda 表达å¼ï¼ä¸è½åºå忥å£å®ç°æè
æ£å¸¸é lambda åæ³ç对象 |
| | | * |
| | | * @param lambda lambda对象 |
| | | * @return è¿åè§£æåç SerializedLambda |
| | | */ |
| | | public static SerializedLambda resolve(SFunction<?, ?> lambda) { |
| | | if (!lambda.getClass().isSynthetic()) { |
| | | throw ExceptionUtils.mpe("è¯¥æ¹æ³ä»
è½ä¼ å
¥ lambda 表达å¼äº§ççåæç±»"); |
| | | } |
| | | try (ObjectInputStream objIn = new ObjectInputStream(new ByteArrayInputStream(SerializationUtils.serialize(lambda))) { |
| | | @Override |
| | | protected Class<?> resolveClass(ObjectStreamClass objectStreamClass) throws IOException, ClassNotFoundException { |
| | | Class<?> clazz; |
| | | try { |
| | | clazz = ClassUtils.toClassConfident(objectStreamClass.getName()); |
| | | } catch (Exception ex) { |
| | | clazz = super.resolveClass(objectStreamClass); |
| | | } |
| | | return clazz == java.lang.invoke.SerializedLambda.class ? SerializedLambda.class : clazz; |
| | | } |
| | | }) { |
| | | return (SerializedLambda) objIn.readObject(); |
| | | } catch (ClassNotFoundException | IOException e) { |
| | | throw ExceptionUtils.mpe("This is impossible to happen", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åæ¥å£ class |
| | | * |
| | | * @return è¿å class åç§° |
| | | */ |
| | | public String getFunctionalInterfaceClassName() { |
| | | return normalizedName(functionalInterfaceClass); |
| | | } |
| | | |
| | | /** |
| | | * è·åå®ç°ç class |
| | | * |
| | | * @return å®ç°ç±» |
| | | */ |
| | | public Class<?> getImplClass() { |
| | | return ClassUtils.toClassConfident(getImplClassName()); |
| | | } |
| | | |
| | | /** |
| | | * è·å class çåç§° |
| | | * |
| | | * @return ç±»å |
| | | */ |
| | | public String getImplClassName() { |
| | | return normalizedName(implClass); |
| | | } |
| | | |
| | | /** |
| | | * è·åå®ç°è
çæ¹æ³åç§° |
| | | * |
| | | * @return æ¹æ³åç§° |
| | | */ |
| | | public String getImplMethodName() { |
| | | return implMethodName; |
| | | } |
| | | |
| | | /** |
| | | * æ£å¸¸åç±»åç§°ï¼å°ç±»åç§°ä¸ç / æ¿æ¢ä¸º . |
| | | * |
| | | * @param name åç§° |
| | | * @return æ£å¸¸çç±»å |
| | | */ |
| | | private String normalizedName(String name) { |
| | | return name.replace('/', '.'); |
| | | } |
| | | |
| | | /** |
| | | * @return è·åå®ä¾åæ¹æ³çç±»å |
| | | */ |
| | | public Class<?> getInstantiatedType() { |
| | | String instantiatedTypeName = normalizedName(instantiatedMethodType.substring(2, instantiatedMethodType.indexOf(';'))); |
| | | return ClassUtils.toClassConfident(instantiatedTypeName); |
| | | } |
| | | |
| | | /** |
| | | * @return åç¬¦ä¸²å½¢å¼ |
| | | */ |
| | | @Override |
| | | public String toString() { |
| | | String interfaceName = getFunctionalInterfaceClassName(); |
| | | String implName = getImplClassName(); |
| | | return String.format("%s -> %s::%s", |
| | | interfaceName.substring(interfaceName.lastIndexOf('.') + 1), |
| | | implName.substring(implName.lastIndexOf('.') + 1), |
| | | implMethodName); |
| | | } |
| | | |
| | | } |
| | |
| | | <artifactId>cnas-resource-require</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.yuanchu.mom</groupId> |
| | | <artifactId>cnas-personnel</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | </dependency> |
| | | |
| | | <!--druid--> |
| | | <dependency> |
| | |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.transaction.annotation.EnableTransactionManagement; |
| | | |
| | | @EnableScheduling |
| | | @SpringBootApplication |
| | | @MapperScan("com.yuanchu.mom.mapper")// æ«æMybatisä¸çmapperå
|
| | | @EnableTransactionManagement |