已修改6个文件
已删除1个文件
已添加228个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <parent> |
| | | <artifactId>mom</artifactId> |
| | | <groupId>com.yuanchu.mom</groupId> |
| | | <version>1.0.0</version> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>cnas-manage</artifactId> |
| | | |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | <name>cnas-manage</name> |
| | | <description>cnas-manage</description> |
| | | <packaging>jar</packaging> |
| | | |
| | | |
| | | <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>inspect-server</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> |
| | | </dependencies> |
| | | |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.mapper.ClientSatisfactionAnalyseFileMapper; |
| | | import com.yuanchu.mom.pojo.ClientSatisfaction; |
| | | import com.yuanchu.mom.pojo.ClientSatisfactionAnalyseFile; |
| | | import com.yuanchu.mom.service.ClientSatisfactionService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | 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.util.Map; |
| | | |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-09 |
| | | */ |
| | | @Api(tags = "å®¢æ·æ»¡æåº¦è°æ¥") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/clientSatisfaction") |
| | | public class ClientSatisfactionController { |
| | | |
| | | private ClientSatisfactionService clientSatisfactionService; |
| | | private ClientSatisfactionAnalyseFileMapper clientSatisfactionAnalyseFileMapper; |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥å表 |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å®¢æ·æ»¡æåº¦è°æ¥å表") |
| | | @PostMapping("/pageClientSatisfaction") |
| | | public Result<IPage<ClientSatisfaction>> pageClientSatisfaction(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ClientSatisfaction clientSatisfaction = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ClientSatisfaction.class); |
| | | return Result.success(clientSatisfactionService.pageClientSatisfaction(page, clientSatisfaction)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥æ°å¢ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å®¢æ·æ»¡æåº¦è°æ¥æ°å¢") |
| | | @PostMapping("/addClientSatisfaction") |
| | | public Result addClientSatisfaction(@RequestBody ClientSatisfaction clientSatisfaction){ |
| | | return Result.success(clientSatisfactionService.save(clientSatisfaction)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥ä¿®æ¹ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å®¢æ·æ»¡æåº¦è°æ¥æ°å¢") |
| | | @PostMapping("/updateClientSatisfaction") |
| | | public Result updateClientSatisfaction(@RequestBody ClientSatisfaction clientSatisfaction){ |
| | | return Result.success(clientSatisfactionService.updateById(clientSatisfaction)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥ä¿®æ¹ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å®¢æ·æ»¡æåº¦è°æ¥æ°å¢") |
| | | @GetMapping("/delClientSatisfaction") |
| | | public Result updateClientSatisfaction(Integer clientSatisfactionId){ |
| | | return Result.success(clientSatisfactionService.removeById(clientSatisfactionId)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦å¯¼åº |
| | | * @param clientSatisfactionId |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å®¢æ·æ»¡æå¯¼åº") |
| | | @GetMapping("/exportWordClientSatisfaction") |
| | | public Result exportWordClientSatisfaction(Integer clientSatisfactionId, HttpServletResponse response){ |
| | | clientSatisfactionService.exportWordClientSatisfaction(clientSatisfactionId, response); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * ç¡®è®¤å®¢æ·æ»¡æåº¦ |
| | | * @param clientSatisfaction è¦ä¿®æ¹å®¢æ·æ»¡æåº¦çç¶æå¯¹è±¡ |
| | | * @param userId ä¿®æ¹äººid |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "ç¡®è®¤å®¢æ·æ»¡æåº¦") |
| | | @GetMapping("/confirmClientSatisfaction") |
| | | public void confirmClientSatisfaction(ClientSatisfaction clientSatisfaction, Integer userId){ |
| | | clientSatisfactionService.confirmClientSatisfaction(clientSatisfaction, userId); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å®¢æ·åæéä»¶ |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ°å¢æ·åæéä»¶") |
| | | @PostMapping("/uploadAnalyseFile") |
| | | public Result<?> uploadAnalyseFile(MultipartFile file) { |
| | | return Result.success(clientSatisfactionService.uploadAnalyseFile(file)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ·åæéä»¶ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥è¯¢æ·åæéä»¶") |
| | | @PostMapping("/pageAnalyseFile") |
| | | public Result<IPage<ClientSatisfactionAnalyseFile>> pageAnalyseFile(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ClientSatisfactionAnalyseFile analyseFile = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ClientSatisfactionAnalyseFile.class); |
| | | return Result.success(clientSatisfactionService.pageAnalyseFile(page, analyseFile)); |
| | | } |
| | | |
| | | /** |
| | | * å 餿·åæéä»¶ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å 餿·åæéä»¶") |
| | | @GetMapping("/delAnalyseFile") |
| | | public Result delAnalyseFile(Integer analyseFileId){ |
| | | return Result.success(clientSatisfactionAnalyseFileMapper.deleteById(analyseFileId)); |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.InternalCheckDto; |
| | | import com.yuanchu.mom.pojo.InternalCheck; |
| | | import com.yuanchu.mom.service.InternalCheckService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | 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 javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Api(tags = "å
å®¡æ£æ¥") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/internalCheck") |
| | | public class InternalCheckController { |
| | | |
| | | private InternalCheckService internalCheckService; |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥å页æ¥è¯¢ |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
å®¡æ£æ¥å页æ¥è¯¢") |
| | | @PostMapping("/pageInternalCheck") |
| | | public Result<IPage<InternalCheckDto>> pageInternalCheck(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | InternalCheck internalCheck = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InternalCheck.class); |
| | | return Result.success(internalCheckService.pageInternalCheck(page, internalCheck)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥æ°å¢ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
å®¡æ£æ¥æ°å¢") |
| | | @PostMapping("/addInternalCheck") |
| | | public Result addInternalCheck(@RequestBody InternalCheckDto internalCheck){ |
| | | return Result.success(internalCheckService.addInternalCheck(internalCheck)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥ä¿®æ¹ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
å®¡æ£æ¥ä¿®æ¹") |
| | | @PostMapping("/updateInternalCheck") |
| | | public Result updateInternalCheck(@RequestBody InternalCheckDto internalCheck){ |
| | | return Result.success(internalCheckService.updateInternalCheck(internalCheck)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥å é¤ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
å®¡æ£æ¥å é¤") |
| | | @GetMapping("/delInternalCheck") |
| | | public Result delInternalCheck(Integer checkId){ |
| | | return Result.success(internalCheckService.delInternalCheck(checkId)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥æ¥ç详æ
|
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
å®¡æ£æ¥æ¥ç详æ
") |
| | | @GetMapping("/getInternalCheckOne") |
| | | public Result<InternalCheckDto> getInternalCheckOne(Integer checkId){ |
| | | return Result.success(internalCheckService.getInternalCheckOne(checkId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥æ¹å |
| | | * @return |
| | | */ |
| | | @ValueClassify("å
å®¡æ£æ¥") |
| | | @ApiOperation(value = "å
å®¡æ£æ¥æ¹å") |
| | | @PostMapping("/ratifyInternalCheck") |
| | | public Result ratifyInternalCheck(@RequestBody InternalCheckDto internalCheck){ |
| | | return Result.success(internalCheckService.ratifyInternalCheck(internalCheck)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
å®¡æ£æ¥ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºå
å®¡æ£æ¥") |
| | | @GetMapping("/exportInternalCheck") |
| | | public void exportInternalCheck(Integer checkId, HttpServletResponse response){ |
| | | internalCheckService.exportInternalCheck(checkId, 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.mapper.InternalCorrectFileMapper; |
| | | import com.yuanchu.mom.pojo.InternalCorrect; |
| | | import com.yuanchu.mom.pojo.InternalCorrectFile; |
| | | import com.yuanchu.mom.service.InternalCorrectService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | 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.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审管ççº æ£å¤ç表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 04:00:15 |
| | | */ |
| | | @Api(tags = "å
å®¡çº æ£æªæ½") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/internalCorrect") |
| | | public class InternalCorrectController { |
| | | |
| | | private InternalCorrectService internalCorrectService; |
| | | private InternalCorrectFileMapper internalCorrectFileMapper; |
| | | |
| | | /** |
| | | * æ°å¢å
审管ççº æ£å¤çä¿¡æ¯ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ°å¢å
审管ççº æ£å¤ç") |
| | | @PostMapping("/addInternalCorrect") |
| | | public Result addInternalCorrect(@RequestBody InternalCorrect internalCorrect){ |
| | | return Result.success(internalCorrectService.addInternalCorrect(internalCorrect)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å
审管ççº æ£å¤ç |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥è¯¢å
审管ççº æ£å¤ç") |
| | | @GetMapping("/getInternalCorrect") |
| | | public Result<InternalCorrect> getInternalCorrect(Integer correctId){ |
| | | return Result.success(internalCorrectService.getInternalCorrect(correctId)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å
审管ççº æ£æªæ½å表 |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥è¯¢å
审管ççº æ£æªæ½å表") |
| | | @PostMapping("/pageInternalCorrect") |
| | | public Result<IPage<InternalCorrect>> pageInternalCorrect(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | InternalCorrect detailsCorrect = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InternalCorrect.class); |
| | | return Result.success(internalCorrectService.pageInternalCorrect(page, detailsCorrect)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å
审管ççº æ£æªæ½éä»¶ |
| | | * @param correctId |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ°å¢å
审管ççº æ£æªæ½éä»¶") |
| | | @PostMapping("/uploadInternalCorrectFile") |
| | | public Result<?> uploadInternalCorrectFile(Integer correctId, MultipartFile file) { |
| | | return Result.success(internalCorrectService.uploadInternalCorrectFile(correctId, file)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢å
审管ççº æ£æªæ½éä»¶ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥è¯¢å
审管ççº æ£æªæ½éä»¶") |
| | | @GetMapping("/getInternalCorrectFileList") |
| | | public Result<List<InternalCorrectFile>> getInternalCorrectFileList(Integer correctId){ |
| | | return Result.success(internalCorrectService.getInternalCorrectFileList(correctId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å
审管ççº æ£æªæ½éä»¶ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å é¤å
审管ççº æ£æªæ½éä»¶") |
| | | @GetMapping("/delInternalCorrectFile") |
| | | public Result delInternalCorrectFile(Integer correctFileId){ |
| | | return Result.success(internalCorrectFileMapper.deleteById(correctFileId)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºçº æ£æªæ½ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºçº æ£æªæ½") |
| | | @GetMapping("/exportInternalCorrect") |
| | | public void exportInternalCorrect(Integer correctId, HttpServletResponse response){ |
| | | internalCorrectService.exportInternalCorrect(correctId, 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.InternalImplementDto; |
| | | import com.yuanchu.mom.pojo.ClientSatisfaction; |
| | | import com.yuanchu.mom.pojo.InternalImplement; |
| | | import com.yuanchu.mom.service.InternalImplementService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | 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 javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * å
审宿½è®¡å |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Api(tags = "å
审宿½è®¡å") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/internalImplement") |
| | | public class InternalImplementController { |
| | | |
| | | private InternalImplementService internalImplementService; |
| | | |
| | | /** |
| | | * å
审宿½è®¡åå页æ¥è¯¢ |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审宿½è®¡åå页æ¥è¯¢") |
| | | @PostMapping("/pageInternalImplement") |
| | | public Result<IPage<InternalImplementDto>> pageInternalImplement(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | InternalImplement internalImplement = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InternalImplement.class); |
| | | return Result.success(internalImplementService.pageInternalImplement(page, internalImplement)); |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åæ°å¢ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审宿½è®¡åæ°å¢") |
| | | @PostMapping("/addInternalImplement") |
| | | public Result addInternalImplement(@RequestBody InternalImplementDto internalImplement){ |
| | | return Result.success(internalImplementService.addInternalImplement(internalImplement)); |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åä¿®æ¹ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审宿½è®¡åä¿®æ¹") |
| | | @PostMapping("/updateInternalImplement") |
| | | public Result updateInternalImplement(@RequestBody InternalImplementDto internalImplement){ |
| | | return Result.success(internalImplementService.updateInternalImplement(internalImplement)); |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åå é¤ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审宿½è®¡åå é¤") |
| | | @GetMapping("/delInternalImplement") |
| | | public Result delInternalImplement(Integer implementId){ |
| | | return Result.success(internalImplementService.delInternalImplement(implementId)); |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åæ¥ç详æ
|
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审宿½è®¡åæ¥ç详æ
") |
| | | @GetMapping("/getInternalImplementOne") |
| | | public Result<InternalImplementDto> getInternalImplementOne(Integer implementId){ |
| | | return Result.success(internalImplementService.getInternalImplementOne(implementId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å
审宿½è®¡åæ¹å |
| | | * @return |
| | | */ |
| | | @ValueClassify("å
审宿½è®¡å") |
| | | @ApiOperation(value = "å
审宿½è®¡åæ¹å") |
| | | @PostMapping("/ratifyInternalImplement") |
| | | public Result ratifyInternalImplement(@RequestBody InternalImplementDto internalImplement){ |
| | | return Result.success(internalImplementService.ratifyInternalImplement(internalImplement)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
审宿½è®¡å |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºå
审宿½è®¡å") |
| | | @GetMapping("/exportInternalImplement") |
| | | public void exportInternalImplement(Integer implementId, HttpServletResponse response){ |
| | | internalImplementService.exportInternalImplement(implementId, 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.dto.InternalMeetingDto; |
| | | import com.yuanchu.mom.pojo.InternalMeeting; |
| | | import com.yuanchu.mom.service.InternalMeetingService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | 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 javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审ä¼è®®è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:50:44 |
| | | */ |
| | | @Api(tags = "å
审ä¼è®®") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/internalMeeting") |
| | | public class InternalMeetingController { |
| | | |
| | | private InternalMeetingService internalMeetingService; |
| | | |
| | | /** |
| | | * å
审ä¼è®®å页æ¥è¯¢ |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审ä¼è®®å页æ¥è¯¢") |
| | | @PostMapping("/pageInternalMeeting") |
| | | public Result<IPage<InternalMeetingDto>> pageInternalMeeting(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | InternalMeeting internalMeeting = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InternalMeeting.class); |
| | | return Result.success(internalMeetingService.pageInternalMeeting(page, internalMeeting)); |
| | | } |
| | | |
| | | /** |
| | | * å
审ä¼è®®æ°å¢ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审ä¼è®®æ°å¢") |
| | | @PostMapping("/addInternalMeeting") |
| | | public Result addInternalMeeting(@RequestBody InternalMeetingDto internalMeeting){ |
| | | return Result.success(internalMeetingService.addInternalMeeting(internalMeeting)); |
| | | } |
| | | |
| | | /** |
| | | * å
审ä¼è®®ä¿®æ¹ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审ä¼è®®ä¿®æ¹") |
| | | @PostMapping("/updateInternalMeeting") |
| | | public Result updateInternalMeeting(@RequestBody InternalMeetingDto internalMeeting){ |
| | | return Result.success(internalMeetingService.updateInternalMeeting(internalMeeting)); |
| | | } |
| | | |
| | | /** |
| | | * å
审ä¼è®®å é¤ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审ä¼è®®å é¤") |
| | | @GetMapping("/delInternalMeeting") |
| | | public Result delInternalMeeting(Integer meetingId){ |
| | | return Result.success(internalMeetingService.delInternalMeeting(meetingId)); |
| | | } |
| | | |
| | | /** |
| | | * å
审ä¼è®®æ¥ç详æ
|
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审ä¼è®®æ¥ç详æ
") |
| | | @GetMapping("/getInternalMeetingOne") |
| | | public Result<InternalMeetingDto> getInternalMeetingOne(Integer meetingId){ |
| | | return Result.success(internalMeetingService.getInternalMeetingOne(meetingId)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
审ä¼è®® |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºå
审ä¼è®®") |
| | | @GetMapping("/exportInternalMeeting") |
| | | public void exportInternalMeeting(Integer meetingId, HttpServletResponse response){ |
| | | internalMeetingService.exportInternalMeeting(meetingId, 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.InternalImplementDto; |
| | | import com.yuanchu.mom.dto.InternalPlanDto; |
| | | import com.yuanchu.mom.pojo.InternalPlan; |
| | | import com.yuanchu.mom.service.InternalPlanService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | 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 javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审年度计å å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:27:47 |
| | | */ |
| | | @Api(tags = "å
审年度计å") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/internalPlan") |
| | | public class InternalPlanController { |
| | | |
| | | |
| | | private InternalPlanService internalPlanService; |
| | | |
| | | /** |
| | | * å
审年度计åå页æ¥è¯¢ |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审年度计åå页æ¥è¯¢") |
| | | @PostMapping("/pageInternalPlan") |
| | | public Result<IPage<InternalPlanDto>> pageInternalPlan(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | InternalPlan internalPlan = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InternalPlan.class); |
| | | return Result.success(internalPlanService.pageInternalPlan(page, internalPlan)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡å¹´åº¦è®¡åæ°å¢ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
å®¡å¹´åº¦è®¡åæ°å¢") |
| | | @PostMapping("/addInternalPlan") |
| | | public Result addInternalPlan(@RequestBody InternalPlanDto internalPlan){ |
| | | return Result.success(internalPlanService.addInternalPlan(internalPlan)); |
| | | } |
| | | |
| | | /** |
| | | * å
审年度计åä¿®æ¹ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审年度计åä¿®æ¹") |
| | | @PostMapping("/updateInternalPlan") |
| | | public Result updateInternalPlan(@RequestBody InternalPlanDto internalPlan){ |
| | | return Result.success(internalPlanService.updateInternalPlan(internalPlan)); |
| | | } |
| | | |
| | | /** |
| | | * å
审年度计åå é¤ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审年度计åå é¤") |
| | | @GetMapping("/delInternalPlan") |
| | | public Result delInternalPlan(Integer planId){ |
| | | return Result.success(internalPlanService.delInternalPlan(planId)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡å¹´åº¦è®¡åæ¥ç详æ
|
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
å®¡å¹´åº¦è®¡åæ¥ç详æ
") |
| | | @GetMapping("/getInternalPlanOne") |
| | | public Result<InternalPlanDto> getInternalPlanOne(Integer planId){ |
| | | return Result.success(internalPlanService.getInternalPlanOne(planId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å
审年度计åå®¡æ ¸ |
| | | * @return |
| | | */ |
| | | @ValueClassify("å
审年度计å") |
| | | @ApiOperation(value = "å
审年度计åå®¡æ ¸") |
| | | @PostMapping("/examineInternalPlan") |
| | | public Result examineInternalPlan(@RequestBody InternalPlanDto internalPlanDto){ |
| | | return Result.success(internalPlanService.examineInternalPlan(internalPlanDto)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡å¹´åº¦è®¡åæ¹å |
| | | * @return |
| | | */ |
| | | @ValueClassify("å
审年度计å") |
| | | @ApiOperation(value = "å
审宿½è®¡åæ¹å") |
| | | @PostMapping("/ratifyInternalPlan") |
| | | public Result ratifyInternalPlan(@RequestBody InternalPlanDto internalPlanDto){ |
| | | return Result.success(internalPlanService.ratifyInternalPlan(internalPlanDto)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
审年度计å |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºå
审年度计å") |
| | | @GetMapping("/exportInternalPlan") |
| | | public void exportInternalPlan(Integer planId, HttpServletResponse response){ |
| | | internalPlanService.exportInternalImplement(planId, 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.pojo.InternalReport; |
| | | import com.yuanchu.mom.service.InternalReportService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | 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 javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * å
审æ¥å表 |
| | | * |
| | | * @author makejava |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Api(tags = "å
审æ¥å") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/internalReport") |
| | | public class InternalReportController { |
| | | |
| | | private InternalReportService internalReportService; |
| | | |
| | | /** |
| | | * å
审æ¥åå页æ¥è¯¢ |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审æ¥åå页æ¥è¯¢") |
| | | @PostMapping("/pageInternalReport") |
| | | public Result<IPage<InternalReport>> pageInternalReport(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | InternalReport internalReport = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InternalReport.class); |
| | | return Result.success(internalReportService.pageInternalReport(page, internalReport)); |
| | | } |
| | | |
| | | /** |
| | | * å
审æ¥åæ°å¢ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审æ¥åæ°å¢") |
| | | @PostMapping("/addInternalReport") |
| | | public Result addInternalReport(@RequestBody InternalReport internalReport){ |
| | | return Result.success(internalReportService.save(internalReport)); |
| | | } |
| | | |
| | | /** |
| | | * å
审æ¥åä¿®æ¹ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审æ¥åä¿®æ¹") |
| | | @PostMapping("/updateInternalReport") |
| | | public Result updateInternalReport(@RequestBody InternalReport internalReport){ |
| | | return Result.success(internalReportService.updateById(internalReport)); |
| | | } |
| | | |
| | | /** |
| | | * å
审æ¥åå é¤ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审æ¥åå é¤") |
| | | @GetMapping("/delInternalReport") |
| | | public Result delInternalReport(Integer reportId){ |
| | | return Result.success(internalReportService.removeById(reportId)); |
| | | } |
| | | |
| | | /** |
| | | * å
审æ¥åæ¥ç详æ
|
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å
审æ¥åæ¥ç详æ
") |
| | | @GetMapping("/getInternalReportOne") |
| | | public Result<InternalReport> getInternalReportOne(Integer reportId){ |
| | | return Result.success(internalReportService.getById(reportId)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥å®¡æ ¸ |
| | | * @return |
| | | */ |
| | | @ValueClassify("å
审æ¥å") |
| | | @ApiOperation(value = "å
å®¡æ£æ¥å®¡æ ¸") |
| | | @PostMapping("/examineInternalReport") |
| | | public Result examineInternalReport(@RequestBody InternalReport internalReport){ |
| | | return Result.success(internalReportService.ratifyInternalCheck(internalReport)); |
| | | } |
| | | |
| | | /** |
| | | * å
审æ¥åè´¨éè´è´£äººå¡«å |
| | | * @return |
| | | */ |
| | | @ValueClassify("å
审æ¥å") |
| | | @ApiOperation(value = "å
审æ¥åè´¨éè´è´£äººå¡«å") |
| | | @PostMapping("/qualityInternalReport") |
| | | public Result qualityInternalReport(@RequestBody InternalReport internalReport){ |
| | | return Result.success(internalReportService.qualityInternalReport(internalReport)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
审æ¥å |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºå
审æ¥å") |
| | | @GetMapping("/exportInternalReport") |
| | | public void exportInternalReport(Integer reportId, HttpServletResponse response){ |
| | | internalReportService.exportInternalReport(reportId, response); |
| | | } |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.read.listener.PageReadListener; |
| | | 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.exception.ErrorException; |
| | | import com.yuanchu.mom.pojo.ManageControlPlanList; |
| | | import com.yuanchu.mom.service.ManageControlPlanListService; |
| | | import com.yuanchu.mom.utils.MyUtil; |
| | | import com.yuanchu.mom.vo.ManageControlPlanListVo; |
| | | 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 org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:58:30 |
| | | */ |
| | | @Api(tags = "é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å") |
| | | @RestController |
| | | @RequestMapping("/manageControlPlanList") |
| | | public class ManageControlPlanListController { |
| | | |
| | | |
| | | @Resource |
| | | private ManageControlPlanListService manageControlPlanListService; |
| | | |
| | | @Autowired |
| | | private GetLook getLook; |
| | | |
| | | @ValueClassify(value = "é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å") |
| | | @ApiOperation(value = "å页æ¥è¯¢") |
| | | @GetMapping("/getPageList") |
| | | public Result<IPage<ManageControlPlanListVo>> getPageList(Page page){ |
| | | IPage<ManageControlPlanListVo> ipage = manageControlPlanListService.getPageList(page); |
| | | return Result.success(ipage); |
| | | } |
| | | |
| | | @ValueClassify(value = "é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å") |
| | | @ApiOperation(value = "æ¹å") |
| | | @GetMapping("/approvalOfControlPlanChecklist") |
| | | public Result<?> approvalOfControlPlanChecklist(Integer approve, Integer status){ |
| | | manageControlPlanListService.update(Wrappers.<ManageControlPlanList>lambdaUpdate() |
| | | .set(ManageControlPlanList::getApprove, approve) |
| | | .set(ManageControlPlanList::getApproveStatus, status) |
| | | .set(ManageControlPlanList::getApproveDate, LocalDateTime.now())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify(value = "é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å") |
| | | @ApiOperation(value = "审æ¹") |
| | | @GetMapping("/riskAnalysisApprovalOfControlPlanChecklist") |
| | | public Result<?> riskAnalysisApprovalOfControlPlanChecklist(Integer approval, Integer status){ |
| | | manageControlPlanListService.update(Wrappers.<ManageControlPlanList>lambdaUpdate() |
| | | .set(ManageControlPlanList::getApproval, approval) |
| | | .set(ManageControlPlanList::getApprovalStatus, status) |
| | | .set(ManageControlPlanList::getApprovalDate, LocalDateTime.now())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify(value = "é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å") |
| | | @ApiOperation(value = "导å
¥") |
| | | @PostMapping("/importControlPlanList") |
| | | public void importControlPlanList(MultipartFile file) throws IOException { |
| | | boolean excelFile = MyUtil.isExcelFile(file); |
| | | if (!excelFile) { |
| | | throw new ErrorException("请导å
¥excelæä»¶ï¼"); |
| | | } |
| | | EasyExcel.read(file.getInputStream(), ManageControlPlanList.class, new PageReadListener<ManageControlPlanList>(dataList -> { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | dataList.forEach(i -> { |
| | | i.setEditor(userId); |
| | | i.setEditorDate(LocalDateTime.now()); |
| | | i.setApproveStatus(0); |
| | | i.setApprovalStatus(0); |
| | | }); |
| | | manageControlPlanListService.saveOrUpdateBatch(dataList); |
| | | })).sheet().doRead(); |
| | | } |
| | | |
| | | @ValueClassify(value = "é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å") |
| | | @ApiOperation(value = "æ°å¢") |
| | | @PostMapping("/analysisOfMajorRiskFactorsAdded") |
| | | public void analysisOfMajorRiskFactorsAdded(@RequestBody ManageControlPlanList manageControlPlanList) throws IOException { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | manageControlPlanList.setEditor(userId); |
| | | manageControlPlanList.setEditorDate(LocalDateTime.now()); |
| | | manageControlPlanListService.saveOrUpdate(manageControlPlanList); |
| | | } |
| | | |
| | | @ValueClassify(value = "é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å") |
| | | @ApiOperation(value = "å é¤") |
| | | @GetMapping("/deleteSignificantRiskFactorAnalysis") |
| | | public void deleteSignificantRiskFactorAnalysis(Integer id) throws IOException { |
| | | manageControlPlanListService.removeById(id); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®è®¡å |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å") |
| | | @GetMapping("/exportSignificantRiskFactors") |
| | | public void exportSignificantRiskFactors(HttpServletResponse response){ |
| | | manageControlPlanListService.exportPersonTraining(response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.ManageDocumentAlter; |
| | | import com.yuanchu.mom.pojo.ManageDocumentCancel; |
| | | import com.yuanchu.mom.pojo.ManageDocumentControlled; |
| | | import com.yuanchu.mom.service.ManageDocumentAlterService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ´ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 11:04:01 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageDocumentAlter") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±", index = 10) |
| | | public class ManageDocumentAlterController { |
| | | |
| | | @Resource |
| | | private ManageDocumentAlterService manageDocumentAlterService; |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶åæ´") |
| | | @PostMapping("/pageManageDocumentAlter") |
| | | public Result pageManageDocumentAlter(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageDocumentAlter manageDocumentAlter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageDocumentAlter.class); |
| | | return Result.success(manageDocumentAlterService.pageManageDocumentAlter(page, manageDocumentAlter)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "å 餿件忴") |
| | | @PostMapping("/delManageDocumentAlter") |
| | | public Result delManageDocumentAlter(Integer id){ |
| | | return Result.success(manageDocumentAlterService.delManageDocumentAlter(id)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥çæä»¶åæ´") |
| | | @PostMapping("/getManageDocumentAlter") |
| | | public Result getManageDocumentAlter(Integer id){ |
| | | return Result.success(manageDocumentAlterService.getManageDocumentAlter(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "æ°å¢æä»¶åæ´") |
| | | @PostMapping("/addManageDocumentAlter") |
| | | public Result addManageDocumentAlter(ManageDocumentAlter manageDocumentAlter){ |
| | | return Result.success(manageDocumentAlterService.addManageDocumentAlter(manageDocumentAlter)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "ç¼è¾æä»¶åæ´") |
| | | @PostMapping("/doManageDocumentAlter") |
| | | public Result doManageDocumentAlter(ManageDocumentAlter manageDocumentAlter){ |
| | | return Result.success(manageDocumentAlterService.doManageDocumentAlter(manageDocumentAlter)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "å®¡æ ¸æä»¶åæ´") |
| | | @PostMapping("/checkManageDocumentAlter") |
| | | public Result checkManageDocumentAlter(ManageDocumentAlter manageDocumentAlter){ |
| | | return Result.success(manageDocumentAlterService.checkManageDocumentAlter(manageDocumentAlter)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "å®¡æ ¸æ¥çéä»¶") |
| | | @PostMapping("/checkManageDocumentAlterPdf") |
| | | public void checkManageDocumentAlterPdf(Long id, HttpServletResponse response)throws Exception { |
| | | manageDocumentAlterService.checkManageDocumentAlterPdf(id,response); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "å¯¼åºæä»¶åæ´") |
| | | @PostMapping("/exportManageDocumentAlter") |
| | | public void exportManageDocumentAlter(@RequestBody Map<String, Object> data,HttpServletResponse response) throws Exception { |
| | | ManageDocumentAlter manageDocumentAlter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageDocumentAlter.class); |
| | | manageDocumentAlterService.exportManageDocumentAlter(manageDocumentAlter,response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.ManageDocumentCancel; |
| | | import com.yuanchu.mom.pojo.ManageDocumentControlled; |
| | | import com.yuanchu.mom.service.ManageDocumentCancelService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶ä½åº å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 02:37:35 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageDocumentCancel") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±", index = 10) |
| | | public class ManageDocumentCancelController { |
| | | |
| | | @Resource |
| | | private ManageDocumentCancelService manageDocumentCancelService; |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶ä½åº") |
| | | @PostMapping("/pageManageDocumentCancel") |
| | | public Result pageManageDocumentCancel(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageDocumentCancel manageDocumentCancel = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageDocumentCancel.class); |
| | | return Result.success(manageDocumentCancelService.pageManageDocumentCancel(page, manageDocumentCancel)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "æ°å¢æä»¶ä½åº") |
| | | @PostMapping("/addManageDocumentCancel") |
| | | public Result addManageDocumentCancel(@RequestBody ManageDocumentCancel manageDocumentCancel) { |
| | | return Result.success(manageDocumentCancelService.addManageDocumentCancel(manageDocumentCancel)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "å®¡æ ¸æä»¶ä½åº") |
| | | @PostMapping("/checkManageDocumentCancel") |
| | | public Result checkManageDocumentCancel(Integer id, String state) { |
| | | return Result.success(manageDocumentCancelService.checkManageDocumentCancel(id, state)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "å 餿件ä½åº") |
| | | @PostMapping("/delManageDocumentCancel") |
| | | public Result delManageDocumentCancel(Integer id) { |
| | | return Result.success(manageDocumentCancelService.delManageDocumentCancel(id)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥çæä»¶ä½åº") |
| | | @PostMapping("/getManageDocumentCancel") |
| | | public Result getManageDocumentCancel(Integer id) { |
| | | return Result.success(manageDocumentCancelService.getManageDocumentCancel(id)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "ç¼è¾æä»¶ä½åº") |
| | | @PostMapping("/doManageDocumentCancel") |
| | | public Result doManageDocumentCancel(@RequestBody ManageDocumentCancel manageDocumentCancel) { |
| | | return Result.success(manageDocumentCancelService.doManageDocumentCancel(manageDocumentCancel)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "å¯¼åºæä»¶ä½åº") |
| | | @PostMapping("/exportManageDocumentCancel") |
| | | public void exportManageDocumentCancel(@RequestBody Map<String, Object> data,HttpServletResponse response) throws Exception { |
| | | ManageDocumentCancel manageDocumentCancel = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageDocumentCancel.class); |
| | | manageDocumentCancelService.exportManageDocumentCancel(manageDocumentCancel,response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.ManageDocumentControlled; |
| | | import com.yuanchu.mom.pojo.ManageDocumentList; |
| | | import com.yuanchu.mom.service.ManageDocumentControlledService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ§ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-08 02:54:44 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageDocumentControlled") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±",index = 10) |
| | | public class ManageDocumentControlledController { |
| | | |
| | | @Resource |
| | | private ManageDocumentControlledService manageDocumentControlledService; |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶åæ§") |
| | | @PostMapping("/pageManageDocumentControlled") |
| | | public Result pageManageDocumentControlled(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageDocumentControlled manageDocumentControlled = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageDocumentControlled.class); |
| | | return Result.success(manageDocumentControlledService.pageManageDocumentControlled(page, manageDocumentControlled)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "æ°å¢æä»¶åæ§") |
| | | @PostMapping("/addManageDocumentControlled") |
| | | public Result addManageDocumentControlled(ManageDocumentControlled manageDocumentControlled){ |
| | | return Result.success(manageDocumentControlledService.addManageDocumentControlled(manageDocumentControlled)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥çæä»¶åæ§") |
| | | @PostMapping("/getManageDocumentControlled") |
| | | public Result getManageDocumentControlled(Long id){ |
| | | return Result.success(manageDocumentControlledService.getManageDocumentControlled(id)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "ç¼è¾æä»¶åæ§") |
| | | @PostMapping("/doManageDocumentControlled") |
| | | public Result doManageDocumentControlled(ManageDocumentControlled manageDocumentControlled){ |
| | | return Result.success(manageDocumentControlledService.doManageDocumentControlled(manageDocumentControlled)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "å 餿件忧") |
| | | @PostMapping("/delManageDocumentControlled") |
| | | public Result delManageDocumentControlled(Long id){ |
| | | return Result.success(manageDocumentControlledService.delManageDocumentControlled(id)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "å®¡æ ¸æä»¶åæ§") |
| | | @PostMapping("/checkManageDocumentControlled") |
| | | public Result checkManageDocumentControlled(ManageDocumentControlled manageDocumentControlled){ |
| | | return Result.success(manageDocumentControlledService.checkManageDocumentControlled(manageDocumentControlled)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "å®¡æ ¸æ¥çéä»¶") |
| | | @PostMapping("/checkManageDocumentControlledPdf") |
| | | public void checkManageDocumentControlledPdf(Long id, HttpServletResponse response)throws Exception { |
| | | manageDocumentControlledService.checkManageDocumentControlledPdf(id,response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.ManageDocumentIssueRecycleDto; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.service.ManageDocumentIssueRecycleService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ¾åæ¶ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 09:18:24 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageDocumentIssueRecycle") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±",index = 10) |
| | | public class ManageDocumentIssueRecycleController { |
| | | |
| | | @Resource |
| | | private ManageDocumentIssueRecycleService manageDocumentIssueRecycleService; |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶åæ¾åæ¶") |
| | | @PostMapping("/pageManageDocumentIssueRecycle") |
| | | public Result pageManageDocumentIssueRecycle(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageDocumentIssueRecycleDto manageDocumentIssueRecycleDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageDocumentIssueRecycleDto.class); |
| | | return Result.success(manageDocumentIssueRecycleService.pageManageDocumentIssueRecycle(page, manageDocumentIssueRecycleDto)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "æ°å¢æä»¶åæ¾åæ¶") |
| | | @PostMapping("/addManageDocumentIssueRecycle") |
| | | public Result addManageDocumentIssueRecycle(ManageDocumentIssueRecycle manageDocumentIssueRecycle){ |
| | | return Result.success(manageDocumentIssueRecycleService.addManageDocumentIssueRecycle(manageDocumentIssueRecycle)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "å 餿件忾忶") |
| | | @PostMapping("/delManageDocumentIssueRecycle") |
| | | public Result delManageDocumentIssueRecycle(Long id){ |
| | | return Result.success(manageDocumentIssueRecycleService.delManageDocumentIssueRecycle(id)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥çæä»¶åæ¾åæ¶") |
| | | @PostMapping("/getManageDocumentIssueRecycle") |
| | | public Result getManageDocumentIssueRecycle(Long id){ |
| | | return Result.success(manageDocumentIssueRecycleService.getManageDocumentIssueRecycle(id)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "ç¼è¾æä»¶åæ¾åæ¶") |
| | | @PostMapping("/doManageDocumentIssueRecycle") |
| | | public Result doManageDocumentIssueRecycle(ManageDocumentIssueRecycle manageDocumentIssueRecycle){ |
| | | return Result.success(manageDocumentIssueRecycleService.doManageDocumentIssueRecycle(manageDocumentIssueRecycle)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "å®¡æ ¸æä»¶åæ¾åæ¶") |
| | | @PostMapping("/checkManageDocumentIssueRecycle") |
| | | public Result checkManageDocumentIssueRecycle(Integer id,String documentState){ |
| | | return Result.success(manageDocumentIssueRecycleService.checkManageDocumentIssueRecycle(id,documentState)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "å¯¼åºæä»¶åæ¾åæ¶") |
| | | @PostMapping("/exportManageDocumentIssueRecycle") |
| | | public void exportManageDocumentIssueRecycle(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception { |
| | | ManageDocumentIssueRecycleDto manageDocumentIssueRecycleDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageDocumentIssueRecycleDto.class); |
| | | manageDocumentIssueRecycleService.exportManageDocumentIssueRecycle(manageDocumentIssueRecycleDto,response); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.excel.ManageDocumentListListener; |
| | | import com.yuanchu.mom.mapper.ManageDocumentListMapper; |
| | | import com.yuanchu.mom.pojo.ManageDocumentList; |
| | | import com.yuanchu.mom.pojo.Warehouse; |
| | | import com.yuanchu.mom.service.ManageDocumentListService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶æ¸
å |
| | | å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-08 11:08:11 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageDocumentList") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±",index = 10) |
| | | public class ManageDocumentListController { |
| | | |
| | | @Resource |
| | | private ManageDocumentListService manageDocumentListService; |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶æ¸
å") |
| | | @PostMapping("/pageManageDocumentList") |
| | | public Result pageManageDocumentList(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageDocumentList manageDocumentList = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageDocumentList.class); |
| | | return Result.success(manageDocumentListService.pageManageDocumentList(page, manageDocumentList)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "ç¼è¾æä»¶æ¸
å") |
| | | @PostMapping("/doManageDocumentList") |
| | | public Result doManageDocumentList(@RequestBody ManageDocumentList manageDocumentList) { |
| | | return Result.success(manageDocumentListService.updateById(manageDocumentList)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "ç¼è¾æä»¶æ¸
å") |
| | | @PostMapping("/delManageDocumentList") |
| | | public Result delManageDocumentList(Integer id) { |
| | | return Result.success(manageDocumentListService.removeById(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "ä¸ä¼ éä»¶-æä»¶æ¸
å") |
| | | @PostMapping("/uploadFileManageDocumentList") |
| | | public Result uploadFileManageDocumentList(Integer id, MultipartFile file) { |
| | | return Result.success(manageDocumentListService.uploadFile(id,file)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çä½ç³»æä»¶çæ§å¶") |
| | | @ApiOperation(value = "导å
¥æä»¶æ¸
åå表") |
| | | @PostMapping("/exportManageDocumentList") |
| | | public Result exportManageDocumentList(MultipartFile file) { |
| | | try { |
| | | EasyExcel.read(file.getInputStream(), ManageDocumentList.class, new ManageDocumentListListener(manageDocumentListService)).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.ManageMeetingDto; |
| | | import com.yuanchu.mom.pojo.ManageMeeting; |
| | | import com.yuanchu.mom.pojo.ManageReviewProgram; |
| | | import com.yuanchu.mom.service.ManageMeetingService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 09:33:47 |
| | | */ |
| | | @Api(tags = "管çè¯å®¡ä¼è®®") |
| | | @RestController |
| | | @RequestMapping("/manageMeeting") |
| | | public class ManageMeetingController { |
| | | |
| | | @Resource |
| | | private ManageMeetingService manageMeetingService; |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡ä¼è®®è®°å½") |
| | | @ApiOperation(value = "管çè¯å®¡ä¼è®®è®°å½æ¥è¯¢") |
| | | @GetMapping("/getPageMeeting") |
| | | public Result<IPage<ManageMeetingDto>> getPageMeeting(Page page, String startTime, String endTime, String place) throws Exception { |
| | | IPage<ManageMeetingDto> ipage = manageMeetingService.page(page,startTime,endTime,place); |
| | | return Result.success(ipage); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡ä¼è®®è®°å½") |
| | | @ApiOperation(value = "æ°å¢ä¼è®®è®°å½") |
| | | @PostMapping("/addMeeting") |
| | | public Result addMeeting(@RequestBody ManageMeetingDto dto){ |
| | | manageMeetingService.addMeeting(dto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡ä¼è®®è®°å½") |
| | | @ApiOperation(value = "ç¼è¾ä¼è®®è®°å½") |
| | | @PutMapping("/modifyMeeting") |
| | | public Result modifyMeeting(@RequestBody ManageMeetingDto manageMeetingDto){ |
| | | return Result.success(manageMeetingService.modifyMeeting(manageMeetingDto)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡ä¼è®®è®°å½") |
| | | @ApiOperation(value = "å é¤ä¼è®®è®°å½") |
| | | @DeleteMapping("/deleteMeeting") |
| | | public Result deleteMeeting(Integer id){ |
| | | return Result.success(manageMeetingService.removeById(id)); |
| | | } |
| | | |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡ä¼è®®è®°å½") |
| | | @ApiOperation(value = "ä¸è½½ä¼è®®è®°å½") |
| | | @PostMapping("/exportMeeting") |
| | | public void exportMeeting(Integer id, HttpServletResponse response){ |
| | | manageMeetingService.exportMeeting(id,response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.ManageMeetingParticipants; |
| | | import com.yuanchu.mom.service.ManageMeetingParticipantsService; |
| | | import com.yuanchu.mom.vo.MeetingParticipantsDetailsVo; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.models.security.SecurityScheme; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 09:34:27 |
| | | */ |
| | | @Api(tags = "管çè¯å®¡ä¼è®®") |
| | | @RestController |
| | | @RequestMapping("/manageMeetingParticipants") |
| | | public class ManageMeetingParticipantsController { |
| | | |
| | | @Resource |
| | | private ManageMeetingParticipantsService manageMeetingParticipantsService; |
| | | |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡ä¼è®®è®°å½åä¼äººå") |
| | | @ApiOperation(value = "æ¥è¯¢ä¼è®®è®°å½åä¼äººå") |
| | | @GetMapping("/getParticipants") |
| | | public Result<MeetingParticipantsDetailsVo> getParticipants(Integer id){ |
| | | return Result.success(manageMeetingParticipantsService.getParticipants(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡ä¼è®®è®°å½åä¼äººå") |
| | | @ApiOperation(value = "æ°å¢ä¼è®®è®°å½åä¼äººå") |
| | | @PostMapping("/add") |
| | | public Result addParticipants(List<ManageMeetingParticipants> list){ |
| | | manageMeetingParticipantsService.saveBatch(list); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡ä¼è®®è®°å½åä¼äººå") |
| | | @ApiOperation(value = "å é¤ä¼è®®è®°å½åä¼äººå") |
| | | @DeleteMapping("/delete") |
| | | public Result deleteParticipants(List<Integer> ids){ |
| | | manageMeetingParticipantsService.removeByIds(ids); |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.ManageRecordAudit; |
| | | import com.yuanchu.mom.pojo.ManageRecordCancel; |
| | | import com.yuanchu.mom.service.ManageRecordAuditService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 10:29:18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageRecordAudit") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±", index = 10) |
| | | public class ManageRecordAuditController { |
| | | |
| | | @Resource |
| | | private ManageRecordAuditService manageRecordAuditService; |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @PostMapping("/pageManageRecordAudit") |
| | | public Result pageManageRecordAudit(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageRecordAudit manageRecordAudit = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordAudit.class); |
| | | return Result.success(manageRecordAuditService.pageManageRecordAudit(page, manageRecordAudit)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ°å¢æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @PostMapping("/addManageRecordAudit") |
| | | public Result addManageRecordAudit( ManageRecordAudit manageRecordAudit){ |
| | | return Result.success(manageRecordAuditService.addManageRecordAudit(manageRecordAudit)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "ç¼è¾æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @PostMapping("/doManageRecordAudit") |
| | | public Result doManageRecordAudit(ManageRecordAudit manageRecordAudit){ |
| | | return Result.success(manageRecordAuditService.doManageRecordAudit(manageRecordAudit)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å é¤æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @PostMapping("/delManageRecordAudit") |
| | | public Result delManageRecordAudit(Integer id){ |
| | | return Result.success(manageRecordAuditService.removeById(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ¹åæä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @PostMapping("/ratifyManageRecordAudit") |
| | | public Result ratifyManageRecordAudit(Integer id){ |
| | | return Result.success(manageRecordAuditService.ratifyManageRecordAudit(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "ç³è¯·é¨é¨ä¸»ç®¡æè§æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @PostMapping("/manageRecordAudit1") |
| | | public void manageRecordAudit1(){ |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "åå¶å®é¨é¨æè§æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @PostMapping("/manageRecordAudit2") |
| | | public void manageRecordAudit2(){ |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "åå®¡æ ¸é¨é¨æè§æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @PostMapping("/manageRecordAudit3") |
| | | public void manageRecordAudit3(){ |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å¯¼åºæä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @PostMapping("/exportOutManageRecordAudit") |
| | | public Result exportOutManageRecordAudit(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception { |
| | | ManageRecordAudit manageRecordAudit = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordAudit.class); |
| | | return Result.success(manageRecordAuditService.exportOutManageRecordAudit(manageRecordAudit,response)); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.ManageRecordCancel; |
| | | import com.yuanchu.mom.pojo.ManageRecordIssueRecycle; |
| | | import com.yuanchu.mom.service.ManageRecordCancelService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDate; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½åºæä»¶ééè®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 01:27:22 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageRecordCancel") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±", index = 10) |
| | | public class ManageRecordCancelController { |
| | | |
| | | @Resource |
| | | private ManageRecordCancelService manageRecordCancelService; |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å页æ¥è¯¢ä½åºæä»¶éæ¯è®°å½") |
| | | @PostMapping("/pageManageRecordCancel") |
| | | public Result pageManageRecordCancel(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageRecordCancel manageRecordCancel = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordCancel.class); |
| | | return Result.success(manageRecordCancelService.pageManageRecordCancel(page, manageRecordCancel)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ°å¢ä½åºæä»¶éæ¯è®°å½") |
| | | @PostMapping("/addManageRecordCancel") |
| | | public Result addManageRecordCancel(@RequestBody ManageRecordCancel manageRecordCancel){ |
| | | manageRecordCancel.setCreateTime(LocalDate.now()); |
| | | return Result.success(manageRecordCancelService.save(manageRecordCancel)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "ç¼è¾ä½åºæä»¶éæ¯è®°å½") |
| | | @PostMapping("/doManageRecordCancel") |
| | | public Result doManageRecordCancel(@RequestBody ManageRecordCancel manageRecordCancel){ |
| | | return Result.success(manageRecordCancelService.updateById(manageRecordCancel)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å é¤ä½åºæä»¶éæ¯è®°å½") |
| | | @PostMapping("/delManageRecordCancel") |
| | | public Result delManageRecordCancel(Integer id){ |
| | | return Result.success(manageRecordCancelService.removeById(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ¹åä½åºæä»¶éæ¯è®°å½") |
| | | @PostMapping("/ratifyManageRecordCancel") |
| | | public Result ratifyManageRecordCancel(Integer id,String ratifyState){ |
| | | return Result.success(manageRecordCancelService.ratifyManageRecordCancel(id,ratifyState)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "导åºä½åºæä»¶éæ¯è®°å½") |
| | | @PostMapping("/exportOutManageRecordCancel") |
| | | public Result exportOutManageRecordCancel(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception { |
| | | ManageRecordCancel manageRecordCancel = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordCancel.class); |
| | | return Result.success(manageRecordCancelService.exportOutManageRecordCancel(manageRecordCancel,response)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "导å
¥ä½åºæä»¶éæ¯è®°å½") |
| | | @PostMapping("/exportInManageRecordCancel") |
| | | public Result exportInManageRecordCancel(MultipartFile file){ |
| | | return Result.success(manageRecordCancelService.exportInManageRecordCancel(file)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.ManageRecordCheck; |
| | | import com.yuanchu.mom.pojo.ManageRecordTotal; |
| | | import com.yuanchu.mom.service.ManageRecordCheckService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.websocket.HandshakeResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®¡æ¹è®°å½(å«ä¿®è®¢å忬¡å®¡æ¹è®°å½) å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:31:36 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageRecordCheck") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±", index = 10) |
| | | public class ManageRecordCheckController { |
| | | |
| | | @Resource |
| | | private ManageRecordCheckService manageRecordCheckService; |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶å®¡æ¹è®°å½") |
| | | @PostMapping("/pageManageRecordCheck") |
| | | public Result pageManageRecordCheck(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageRecordCheck manageRecordCheck = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordCheck.class); |
| | | return Result.success(manageRecordCheckService.pageManageRecordCheck(page, manageRecordCheck)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ°å¢æä»¶å®¡æ¹è®°å½") |
| | | @PostMapping("/addManageRecordCheck") |
| | | public Result addManageRecordCheck(@RequestBody ManageRecordCheck manageRecordCheck) { |
| | | return Result.success(manageRecordCheckService.save(manageRecordCheck)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "ç¼è¾æä»¶å®¡æ¹è®°å½") |
| | | @PostMapping("/doManageRecordCheck") |
| | | public Result doManageRecordCheck(@RequestBody ManageRecordCheck manageRecordCheck) { |
| | | return Result.success(manageRecordCheckService.updateById(manageRecordCheck)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å 餿件审æ¹è®°å½") |
| | | @PostMapping("/delManageRecordCheck") |
| | | public Result delManageRecordCheck(Integer id) { |
| | | return Result.success(manageRecordCheckService.removeById(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å®¡æ ¸æä»¶å®¡æ¹è®°å½") |
| | | @PostMapping("/checkManageRecordCheck") |
| | | public Result checkManageRecordCheck(Integer id,String checkState) { |
| | | return Result.success(manageRecordCheckService.checkManageRecordCheck(id,checkState)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ¹åæä»¶å®¡æ¹è®°å½") |
| | | @PostMapping("/ratifyManageRecordCheck") |
| | | public Result ratifyManageRecordCheck(Integer id,String ratifyState) { |
| | | return Result.success(manageRecordCheckService.ratifyManageRecordCheck(id,ratifyState)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å¯¼åºæä»¶å®¡æ¹è®°å½") |
| | | @PostMapping("/exportOutManageRecordCheck") |
| | | public Result exportOutManageRecordCheck(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception { |
| | | ManageRecordCheck manageRecordCheck = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordCheck.class); |
| | | return Result.success(manageRecordCheckService.exportOutManageRecordCheck(manageRecordCheck,response)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "导å
¥æä»¶å®¡æ¹è®°å½") |
| | | @PostMapping("/exportInManageRecordCheck") |
| | | public Result exportInManageRecordCheck(MultipartFile file){ |
| | | return Result.success(manageRecordCheckService.exportInManageRecordCheck(file)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.ManageRecordIntervals; |
| | | import com.yuanchu.mom.pojo.ManageRecordIssueRecycle; |
| | | import com.yuanchu.mom.service.ManageRecordIntervalsService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®æå®¡æ¥è®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 10:54:31 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageRecordIntervals") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±", index = 10) |
| | | public class ManageRecordIntervalsController { |
| | | |
| | | @Resource |
| | | private ManageRecordIntervalsService manageRecordIntervalsService; |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶å®æå®¡æ¥è®°å½") |
| | | @PostMapping("/pageManageRecordIntervals") |
| | | public Result pageManageRecordIntervals(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageRecordIntervals manageRecordIntervals = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordIntervals.class); |
| | | return Result.success(manageRecordIntervalsService.pageManageRecordIntervals(page, manageRecordIntervals)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ°å¢æä»¶å®æå®¡æ¥è®°å½") |
| | | @PostMapping("/addManageRecordIntervals") |
| | | public Result addManageRecordIntervals(@RequestBody ManageRecordIntervals manageRecordIntervals) { |
| | | return Result.success(manageRecordIntervalsService.addManageRecordIntervals(manageRecordIntervals)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "ç¼è¾æä»¶å®æå®¡æ¥è®°å½") |
| | | @PostMapping("/doManageRecordIntervals") |
| | | public Result doManageRecordIntervals(@RequestBody ManageRecordIntervals manageRecordIntervals) { |
| | | return Result.success(manageRecordIntervalsService.updateById(manageRecordIntervals)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å 餿件宿审æ¥è®°å½") |
| | | @PostMapping("/delManageRecordIntervals") |
| | | public Result delManageRecordIntervals(Integer id) { |
| | | return Result.success(manageRecordIntervalsService.delManageRecordIntervals(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å¯¼åºæä»¶å®æå®¡æ¥è®°å½") |
| | | @PostMapping("/exportOutManageRecordIntervals") |
| | | public Result exportOutManageRecordIntervals(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception { |
| | | ManageRecordIntervals manageRecordIntervals = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordIntervals.class); |
| | | return Result.success(manageRecordIntervalsService.exportOutManageRecordIntervals(manageRecordIntervals,response)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "导å
¥æä»¶å®æå®¡æ¥è®°å½") |
| | | @PostMapping("/exportInManageRecordIntervals") |
| | | public Result exportInManageRecordIntervals(MultipartFile file){ |
| | | return Result.success(manageRecordIntervalsService.exportInManageRecordIntervals(file)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.ManageRecordIntervalsTotal; |
| | | import com.yuanchu.mom.pojo.ManageRecordTotal; |
| | | import com.yuanchu.mom.service.ManageRecordIntervalsTotalService; |
| | | import com.yuanchu.mom.service.ManageRecordTotalService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®æå®¡æ¥è®°å½æ»åå²è®°å½è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 01:12:11 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageRecordIntervalsTotal") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±", index = 10) |
| | | public class ManageRecordIntervalsTotalController { |
| | | |
| | | @Resource |
| | | private ManageRecordIntervalsTotalService manageRecordIntervalsTotalService; |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ¥è¯¢æä»¶å®æå®¡æ¥è®°å½åå²å表") |
| | | @PostMapping("/pageManageRecordIntervalsTotal") |
| | | public Result pageManageRecordIntervalsTotal(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageRecordIntervalsTotal manageRecordIntervalsTotal = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordIntervalsTotal.class); |
| | | return Result.success(manageRecordIntervalsTotalService.pageManageRecordIntervalsTotal(page, manageRecordIntervalsTotal)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æäº¤æä»¶å®æå®¡æ¥è®°å½åå²å表") |
| | | @PostMapping("/submitManageRecordIntervalsTotal") |
| | | public Result submitManageRecordIntervalsTotal(Integer id) { |
| | | return Result.success(manageRecordIntervalsTotalService.submitManageRecordIntervalsTotal(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ¹åæä»¶å®æå®¡æ¥è®°å½åå²å表") |
| | | @PostMapping("/ratifyManageRecordIntervalsTotal") |
| | | public Result ratifyManageRecordIntervalsTotal(Integer id, String ratifyState) { |
| | | return Result.success(manageRecordIntervalsTotalService.ratifyManageRecordIntervalsTotal(id, ratifyState)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ManageRecordCheck; |
| | | import com.yuanchu.mom.pojo.ManageRecordIssueRecycle; |
| | | import com.yuanchu.mom.service.ManageRecordIssueRecycleService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æææä»¶(å
ãå¤é¨æä»¶)çåæ¾ä¸åæ¶è®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 09:11:05 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageRecordIssueRecycle") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±", index = 10) |
| | | public class ManageRecordIssueRecycleController { |
| | | |
| | | @Resource |
| | | private ManageRecordIssueRecycleService manageRecordIssueRecycleService; |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å页æ¥è¯¢æææä»¶çåæ¾ä¸åæ¶è®°å½") |
| | | @PostMapping("/pageManageRecordIssueRecycle") |
| | | public Result pageManageRecordIssueRecycle(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageRecordIssueRecycle manageRecordIssueRecycle = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordIssueRecycle.class); |
| | | return Result.success(manageRecordIssueRecycleService.pageManageRecordIssueRecycle(page, manageRecordIssueRecycle)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å 餿ææä»¶çåæ¾ä¸åæ¶è®°å½") |
| | | @PostMapping("/delManageRecordIssueRecycle") |
| | | public Result delManageRecordIssueRecycle(Integer id){ |
| | | return Result.success(manageRecordIssueRecycleService.removeById(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ°å¢æææä»¶çåæ¾ä¸åæ¶è®°å½") |
| | | @PostMapping("/addManageRecordIssueRecycle") |
| | | public Result addManageRecordIssueRecycle(@RequestBody ManageRecordIssueRecycle manageRecordIssueRecycle){ |
| | | return Result.success(manageRecordIssueRecycleService.addManageRecordIssueRecycle(manageRecordIssueRecycle)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "ç¼è¾æææä»¶çåæ¾ä¸åæ¶è®°å½") |
| | | @PostMapping("/doManageRecordIssueRecycle") |
| | | public Result doManageRecordIssueRecycle(@RequestBody ManageRecordIssueRecycle manageRecordIssueRecycle){ |
| | | return Result.success(manageRecordIssueRecycleService.doManageRecordIssueRecycle(manageRecordIssueRecycle)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å¯¼åºæææä»¶çåæ¾ä¸åæ¶è®°å½") |
| | | @PostMapping("/exportOutManageRecordIssueRecycle") |
| | | public Result exportOutManageRecordIssueRecycle(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception { |
| | | ManageRecordIssueRecycle manageRecordIssueRecycle = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordIssueRecycle.class); |
| | | return Result.success(manageRecordIssueRecycleService.exportOutManageRecordIssueRecycle(manageRecordIssueRecycle,response)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "导å
¥æææä»¶çåæ¾ä¸åæ¶è®°å½") |
| | | @PostMapping("/exportInManageRecordIssueRecycle") |
| | | public Result exportInManageRecordIssueRecycle(MultipartFile file){ |
| | | return Result.success(manageRecordIssueRecycleService.exportInManageRecordIssueRecycle(file)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.ManageRecordTotal; |
| | | import com.yuanchu.mom.service.ManageRecordTotalService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥æä»¶ç¡®è®¤è®°å½æ»åå²è®°å½è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 10:30:08 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageRecordTotal") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±", index = 10) |
| | | public class ManageRecordTotalController { |
| | | |
| | | @Resource |
| | | private ManageRecordTotalService manageRecordTotalService; |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ¥è¯¢å¤æ¥æä»¶ç¡®è®¤è®°å½åå²å表") |
| | | @PostMapping("/pageManageRecordTotal") |
| | | public Result pageManageRecordTotal(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageRecordTotal manageRecordTotal = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordTotal.class); |
| | | return Result.success(manageRecordTotalService.pageManageRecordTotal(page, manageRecordTotal)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æäº¤å¤æ¥æä»¶ç¡®è®¤è®°å½åå²å表") |
| | | @PostMapping("/submitManageRecordTotal") |
| | | public Result submitManageRecordTotal(Integer id) { |
| | | return Result.success(manageRecordTotalService.submitManageRecordTotal(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ¹å夿¥æä»¶ç¡®è®¤è®°å½åå²å表") |
| | | @PostMapping("/ratifyManageRecordTotal") |
| | | public Result ratifyManageRecordTotal(Integer id, String ratifyState) { |
| | | return Result.success(manageRecordTotalService.ratifyManageRecordTotal(id, ratifyState)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.ManageRecordVerify; |
| | | import com.yuanchu.mom.service.ManageRecordVerifyService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥æä»¶ç¡®è®¤è®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 10:29:44 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageRecordVerify") |
| | | @CustomClazzName(name = "ä½ç³»ç®¡çè¦æ±", index = 10) |
| | | public class ManageRecordVerifyController { |
| | | |
| | | @Resource |
| | | private ManageRecordVerifyService manageRecordVerifyService; |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥è¯¢å¤æ¥æä»¶ç¡®è®¤è®°å½è¯¦æ
") |
| | | @PostMapping("/pageManageRecordVerify") |
| | | public Result pageManageRecordVerify(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | ManageRecordVerify manageRecordVerify = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ManageRecordVerify.class); |
| | | return Result.success(manageRecordVerifyService.pageManageRecordVerify(page, manageRecordVerify)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "æ°å¢å¤æ¥æä»¶ç¡®è®¤è®°å½") |
| | | @PostMapping("/addManageRecordVerify") |
| | | public Result addManageRecordVerify(@RequestBody ManageRecordVerify manageRecordVerify) { |
| | | return Result.success(manageRecordVerifyService.addManageRecordVerify(manageRecordVerify)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "å é¤å¤æ¥æä»¶ç¡®è®¤è®°å½") |
| | | @PostMapping("/delManageRecordVerify") |
| | | public Result delManageRecordVerify(Integer id) { |
| | | return Result.success(manageRecordVerifyService.delManageRecordVerify(id)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "ä¿®æ¹å¤æ¥æä»¶ç¡®è®¤è®°å½") |
| | | @PostMapping("/doManageRecordVerify") |
| | | public Result doManageRecordVerify(@RequestBody ManageRecordVerify manageRecordVerify) { |
| | | return Result.success(manageRecordVerifyService.updateById(manageRecordVerify)); |
| | | } |
| | | |
| | | @ValueClassify(value = "è®°å½çæ§å¶") |
| | | @ApiOperation(value = "导å
¥å¤æ¥æä»¶ç¡®è®¤è®°å½") |
| | | @PostMapping("/exportManageRecordVerify") |
| | | public Result exportManageRecordVerify(MultipartFile file) { |
| | | return Result.success(manageRecordVerifyService.exportManageRecordVerify(file)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.pojo.ManageDocumentControlled; |
| | | import com.yuanchu.mom.pojo.ManageReviewProgram; |
| | | import com.yuanchu.mom.service.ManageDocumentListService; |
| | | import com.yuanchu.mom.service.ManageReviewProgramService; |
| | | 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 javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 03:05:42 |
| | | */ |
| | | @Api(tags = "管çè¯å®¡è®¡å") |
| | | @RestController |
| | | @RequestMapping("/manageReviewProgram") |
| | | public class ManageReviewProgramController { |
| | | @Resource |
| | | private ManageReviewProgramService manageReviewProgramService; |
| | | |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡è®¡å") |
| | | @ApiOperation(value = "æ¥è¯¢è¯å®¡è®¡å") |
| | | @GetMapping("/getPageReviewProgram") |
| | | public Result<IPage<ManageReviewProgram>> getPageReviewProgram(Page page, String startTime,String endTime, String judgingLocation) throws Exception { |
| | | IPage<ManageReviewProgram> ipage = manageReviewProgramService.page(page,startTime,endTime,judgingLocation); |
| | | return Result.success(ipage); |
| | | } |
| | | |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡è®¡å") |
| | | @ApiOperation(value = "æ°å¢è¯å®¡è®¡å") |
| | | @PostMapping("/addReviewProgram") |
| | | public Result addReviewProgram(@RequestBody ManageReviewProgram manageReviewProgram){ |
| | | return Result.success(manageReviewProgramService.addReviewProgram(manageReviewProgram)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡è®¡å") |
| | | @ApiOperation(value = "ç¼è¾è¯å®¡è®¡å") |
| | | @PutMapping("/modifyReviewProgram") |
| | | public Result modifyReviewProgram(@RequestBody ManageReviewProgram manageReviewProgram){ |
| | | return Result.success(manageReviewProgramService.updateById(manageReviewProgram)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡è®¡å") |
| | | @ApiOperation(value = "å é¤è¯å®¡è®¡å") |
| | | @DeleteMapping("/deleteReviewProgram") |
| | | public Result deleteReviewProgram( Integer id){ |
| | | return Result.success(manageReviewProgramService.removeById(id)); |
| | | } |
| | | |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡è®¡å") |
| | | @ApiOperation(value = "ä¸è½½è¯å®¡è®¡å") |
| | | @PostMapping("/exportReviewProgram") |
| | | public void exportReviewProgram(Integer id, HttpServletResponse response){ |
| | | manageReviewProgramService.exportReviewProgram(id,response); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.ManageReviewProgram; |
| | | import com.yuanchu.mom.service.ManageReviewProgramFileService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 04:15:47 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/manageReviewProgramFile") |
| | | public class ManageReviewProgramFileController { |
| | | |
| | | @Resource |
| | | private ManageReviewProgramFileService manageReviewProgramFileService; |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡è®¡åæä»¶") |
| | | @ApiOperation(value = "æ¥è¯¢è¯å®¡è®¡åæä»¶") |
| | | @GetMapping("/selectReviewProgramFile") |
| | | public Result selectReviewProgramFile(Integer id){ |
| | | return Result.success(manageReviewProgramFileService.selectFile(id)); |
| | | } |
| | | |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡è®¡åæä»¶") |
| | | @ApiOperation(value = "æ°å¢è¯å®¡è®¡åæä»¶") |
| | | @PostMapping("/addReviewProgramFile") |
| | | public Result addReviewProgramFile(MultipartFile file,Integer id){ |
| | | manageReviewProgramFileService.addFile(file,id); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.pojo.ManageMeeting; |
| | | import com.yuanchu.mom.pojo.ManageReviewReport; |
| | | import com.yuanchu.mom.service.ManageMeetingService; |
| | | import com.yuanchu.mom.service.ManageReviewReportService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.websocket.HandshakeResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 管çè¯å®¡æ¥å å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 04:44:39 |
| | | */ |
| | | @Api(tags = "管çè¯å®¡æ¥å") |
| | | @RestController |
| | | @RequestMapping("/manageReviewReport") |
| | | public class ManageReviewReportController { |
| | | |
| | | @Resource |
| | | private ManageReviewReportService manageReviewReportService; |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡æ¥å") |
| | | @ApiOperation(value = "æ¥è¯¢ç®¡çè¯å®¡æ¥å") |
| | | @GetMapping("/getPageReviewReport") |
| | | public Result<IPage<ManageReviewReport>> getPageReviewReport(Page page, String startTime, String endTime, String place) { |
| | | IPage<ManageReviewReport> ipage = manageReviewReportService.page(page,startTime,endTime,place); |
| | | return Result.success(ipage); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡æ¥å") |
| | | @ApiOperation(value = "æ°å¢ç®¡çè¯å®¡æ¥å") |
| | | @PostMapping("/addReviewReport") |
| | | public Result addReviewReport(@RequestBody ManageReviewReport manageReviewReport){ |
| | | return Result.success(manageReviewReportService.save(manageReviewReport)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡æ¥å") |
| | | @ApiOperation(value = "ç¼è¾ç®¡çè¯å®¡æ¥å") |
| | | @PutMapping("/modifyReviewReport") |
| | | public Result modifyReviewReport(@RequestBody ManageReviewReport manageReviewReport){ |
| | | return Result.success(manageReviewReportService.updateById(manageReviewReport)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡æ¥å") |
| | | @ApiOperation(value = "å é¤ç®¡çè¯å®¡æ¥å") |
| | | @DeleteMapping("/deleteReviewReport") |
| | | public Result deleteReviewReport(Integer id){ |
| | | return Result.success(manageReviewReportService.removeById(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "管çè¯å®¡æ¥å") |
| | | @ApiOperation(value = "ä¸è½½ç®¡çè¯å®¡æ¥å") |
| | | @PostMapping("/exportReviewReport") |
| | | public void exportReviewReport(Integer id , HttpServletResponse response){ |
| | | manageReviewReportService.exportReviewReport(id,response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.enums.CellExtraTypeEnum; |
| | | import com.alibaba.excel.read.listener.PageReadListener; |
| | | 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.exception.ErrorException; |
| | | import com.yuanchu.mom.pojo.ManageRiskAssessmentResults; |
| | | import com.yuanchu.mom.service.ManageRiskAssessmentResultsService; |
| | | import com.yuanchu.mom.utils.MyUtil; |
| | | import com.yuanchu.mom.vo.ManageRiskAssessmentResultsVo; |
| | | 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 org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:58:51 |
| | | */ |
| | | @Api(tags = "å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§è¡¨") |
| | | @RestController |
| | | @RequestMapping("/manageRiskAssessmentResults") |
| | | public class ManageRiskAssessmentResultsController { |
| | | |
| | | @Autowired |
| | | private GetLook getLook; |
| | | |
| | | @Resource |
| | | private ManageRiskAssessmentResultsService manageRiskAssessmentResultsService; |
| | | |
| | | @ValueClassify(value = "å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§") |
| | | @ApiOperation(value = "å页æ¥è¯¢") |
| | | @GetMapping("/getPageResults") |
| | | public Result<IPage<ManageRiskAssessmentResultsVo>> getPageResults(Page page) { |
| | | IPage<ManageRiskAssessmentResultsVo> ipage = manageRiskAssessmentResultsService.getPageResults(page); |
| | | return Result.success(ipage); |
| | | } |
| | | |
| | | @ValueClassify(value = "å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§") |
| | | @ApiOperation(value = "æ¹å") |
| | | @GetMapping("/hazardIdentificationAndRiskApproval") |
| | | public Result<?> hazardIdentificationAndRiskApproval(Integer approve, Integer status) { |
| | | manageRiskAssessmentResultsService.update(Wrappers.<ManageRiskAssessmentResults>lambdaUpdate() |
| | | .set(ManageRiskAssessmentResults::getApprove, approve) |
| | | .set(ManageRiskAssessmentResults::getApproveStatus, status) |
| | | .set(ManageRiskAssessmentResults::getApproveDate, LocalDateTime.now())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify(value = "å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§") |
| | | @ApiOperation(value = "审æ¹") |
| | | @GetMapping("/dangerousRiskApproval") |
| | | public Result<?> dangerousRiskApproval(Integer approval, Integer status) { |
| | | manageRiskAssessmentResultsService.update(Wrappers.<ManageRiskAssessmentResults>lambdaUpdate() |
| | | .set(ManageRiskAssessmentResults::getApproval, approval) |
| | | .set(ManageRiskAssessmentResults::getApprovalStatus, status) |
| | | .set(ManageRiskAssessmentResults::getApprovalDate, LocalDateTime.now())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify(value = "å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§") |
| | | @ApiOperation(value = "导å
¥") |
| | | @PostMapping("/riskAssessmentImport") |
| | | public void riskAssessmentImport(MultipartFile file) throws IOException { |
| | | boolean excelFile = MyUtil.isExcelFile(file); |
| | | if (!excelFile) { |
| | | throw new ErrorException("请导å
¥excelæä»¶ï¼"); |
| | | } |
| | | EasyExcel.read(file.getInputStream(), ManageRiskAssessmentResults.class, new PageReadListener<ManageRiskAssessmentResults>(dataList -> { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | dataList.forEach(i -> { |
| | | i.setEditor(userId); |
| | | i.setEditorDate(LocalDateTime.now()); |
| | | i.setApproveStatus(0); |
| | | i.setApprovalStatus(0); |
| | | }); |
| | | manageRiskAssessmentResultsService.saveOrUpdateBatch(dataList); |
| | | })).extraRead(CellExtraTypeEnum.MERGE).sheet().doRead(); |
| | | } |
| | | |
| | | @ValueClassify(value = "å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§") |
| | | @ApiOperation(value = "æ°å¢") |
| | | @PostMapping("/addNewRiskFactors") |
| | | public void addNewRiskFactors(@RequestBody ManageRiskAssessmentResults manageRiskAssessmentResults) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | manageRiskAssessmentResults.setEditor(userId); |
| | | manageRiskAssessmentResults.setEditorDate(LocalDateTime.now()); |
| | | manageRiskAssessmentResultsService.saveOrUpdate(manageRiskAssessmentResults); |
| | | } |
| | | |
| | | @ValueClassify(value = "å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§") |
| | | @ApiOperation(value = "å é¤") |
| | | @GetMapping("/removeRiskFactors") |
| | | public void removeRiskFactors(Integer id) { |
| | | manageRiskAssessmentResultsService.removeById(id); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäººåå¹è®è®¡å |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºå±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§") |
| | | @GetMapping("/exportHazardFactorIdentification") |
| | | public void exportPersonTraining(HttpServletResponse response){ |
| | | manageRiskAssessmentResultsService.exportPersonTraining(response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.ClientSatisfaction; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-16 ææä¸ 10:38:30 |
| | | * Description: å®¢æ·æ»¡æåº¦è°æ¥å¯¼åºWord |
| | | */ |
| | | @Data |
| | | public class ClientSatisfactionDto extends ClientSatisfaction { |
| | | |
| | | @ApiModelProperty("æå¡æåº¦, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private String serviceAttitude0; |
| | | |
| | | @ApiModelProperty("æå¡æåº¦, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private String serviceAttitude1; |
| | | |
| | | @ApiModelProperty("æå¡æåº¦, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private String serviceAttitude2; |
| | | |
| | | @ApiModelProperty("ææ¯è½å, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private String technicalCompetence0; |
| | | |
| | | @ApiModelProperty("ææ¯è½å, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private String technicalCompetence1; |
| | | |
| | | @ApiModelProperty("ææ¯è½å, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private String technicalCompetence2; |
| | | |
| | | @ApiModelProperty("æ£æµå·¥ä½, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private String inspectionWork0; |
| | | |
| | | @ApiModelProperty("æ£æµå·¥ä½, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private String inspectionWork1; |
| | | |
| | | @ApiModelProperty("æ£æµå·¥ä½, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private String inspectionWork2; |
| | | |
| | | @ApiModelProperty("æ¶è´¹åçæ§, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private String reasonableFees0; |
| | | |
| | | @ApiModelProperty("æ¶è´¹åçæ§, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private String reasonableFees1; |
| | | |
| | | @ApiModelProperty("æ¶è´¹åçæ§, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private String reasonableFees2; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.InternalCheck; |
| | | import com.yuanchu.mom.pojo.InternalCheckDetail; |
| | | import com.yuanchu.mom.pojo.InternalImplementDetail; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/11 |
| | | */ |
| | | @Data |
| | | public class InternalCheckDto extends InternalCheck { |
| | | |
| | | @ApiModelProperty("æ£æ¥è¯¦æ
") |
| | | private List<InternalCheckDetail> checkDetailList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.InternalCorrect; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/19 |
| | | */ |
| | | @Data |
| | | public class InternalCorrectDto extends InternalCorrect { |
| | | |
| | | @ApiModelProperty("æåºæ¶é´") |
| | | private String raiseTimeString; |
| | | |
| | | @ApiModelProperty("åå åææ¶é´") |
| | | private String causeTimeString; |
| | | |
| | | @ApiModelProperty("çº æ£æ¶é´") |
| | | private String correctTimeString; |
| | | |
| | | @ApiModelProperty("éªè¯æ¶é´") |
| | | private String validationTimeString; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.InternalImplement; |
| | | import com.yuanchu.mom.pojo.InternalImplementDetail; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/11 |
| | | */ |
| | | @Data |
| | | public class InternalImplementDto extends InternalImplement { |
| | | |
| | | @ApiModelProperty("计å详æ
") |
| | | private List<InternalImplementDetail> implementDetailList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.InternalMeeting; |
| | | import com.yuanchu.mom.pojo.InternalMeetingDetail; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/12 |
| | | */ |
| | | @Data |
| | | public class InternalMeetingDto extends InternalMeeting { |
| | | |
| | | @ApiModelProperty("åå 人") |
| | | private List<InternalMeetingDetail> meetingDetailList; |
| | | |
| | | @ApiModelProperty("åå 人信æ¯") |
| | | private String participantName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * åå 人å对象 |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2024/11/19 |
| | | */ |
| | | @Data |
| | | public class InternalMeetingParticipantDto { |
| | | |
| | | @ApiModelProperty("åå 人å1") |
| | | private String userName1; |
| | | |
| | | @ApiModelProperty("é¨é¨1") |
| | | private String department1; |
| | | |
| | | @ApiModelProperty("åå 人å2") |
| | | private String userName2; |
| | | |
| | | @ApiModelProperty("é¨é¨2") |
| | | private String department2; |
| | | |
| | | @ApiModelProperty("åå 人å3") |
| | | private String userName3; |
| | | |
| | | @ApiModelProperty("é¨é¨3") |
| | | private String department3; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.InternalMeetingDetail; |
| | | import com.yuanchu.mom.pojo.InternalPlan; |
| | | import com.yuanchu.mom.pojo.InternalPlanDetail; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/13 |
| | | */ |
| | | @Data |
| | | public class InternalPlanDto extends InternalPlan { |
| | | |
| | | @ApiModelProperty("计å详æ
") |
| | | private List<InternalPlanDetail> planDetailList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.pojo.ManageDocumentIssueRecycle; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class ManageDocumentIssueRecycleDto extends ManageDocumentIssueRecycle { |
| | | |
| | | @ApiModelProperty("åæ¾äºº") |
| | | @ValueTableShow(6) |
| | | @ExcelProperty(value = "åæ¾äºº") |
| | | private String issueUserName; |
| | | |
| | | @ApiModelProperty("åæ¶äºº") |
| | | @ValueTableShow(8) |
| | | @ExcelProperty(value = "åæ¶äºº") |
| | | private String recycleUserName; |
| | | |
| | | @ApiModelProperty("æ¥æ¶äºº") |
| | | @ExcelProperty(value = "æ¥æ¶äºº") |
| | | private String receiveUserName; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.ManageMeeting; |
| | | import com.yuanchu.mom.pojo.ManageMeetingParticipants; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ManageMeetingDto extends ManageMeeting { |
| | | |
| | | private List<ManageMeetingParticipants> list; |
| | | |
| | | private String participant; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ManageMeetingParticipantsDto { |
| | | |
| | | @ApiModelProperty("åå 人å1") |
| | | private String userName1; |
| | | |
| | | @ApiModelProperty("é¨é¨1") |
| | | private String department1; |
| | | |
| | | @ApiModelProperty("åå 人å2") |
| | | private String userName2; |
| | | |
| | | @ApiModelProperty("é¨é¨2") |
| | | private String department2; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.yuanchu.mom.pojo.ManageDocumentList; |
| | | import com.yuanchu.mom.service.ManageDocumentListService; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ManageDocumentListListener extends AnalysisEventListener<ManageDocumentList> { |
| | | private static final int BATCH_COUNT = 1000; |
| | | List<ManageDocumentList> list = new ArrayList<>(); |
| | | |
| | | private ManageDocumentListService manageDocumentListService; |
| | | |
| | | public ManageDocumentListListener(ManageDocumentListService manageDocumentListService) { |
| | | this.manageDocumentListService = manageDocumentListService; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(ManageDocumentList data, AnalysisContext analysisContext) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | save(); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | save(); |
| | | } |
| | | |
| | | private void save() { |
| | | manageDocumentListService.importExcel(list); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.ClientSatisfactionAnalyseFile; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦åæéä»¶ |
| | | * |
| | | * @author makejava |
| | | * @since 2024-11-09 |
| | | */ |
| | | @Mapper |
| | | public interface ClientSatisfactionAnalyseFileMapper extends BaseMapper<ClientSatisfactionAnalyseFile> { |
| | | |
| | | /** |
| | | * 客æ·åæéä»¶å表 |
| | | * @param page |
| | | * @return |
| | | */ |
| | | IPage<ClientSatisfactionAnalyseFile> pageAnalyseFile(Page page, @Param("ew") QueryWrapper<ClientSatisfactionAnalyseFile> ew); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.ClientSatisfactionDto; |
| | | import com.yuanchu.mom.pojo.ClientSatisfaction; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-09 |
| | | */ |
| | | @Mapper |
| | | public interface ClientSatisfactionMapper extends BaseMapper<ClientSatisfaction> { |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<ClientSatisfaction> pageClientSatisfaction(Page page, @Param("ew") QueryWrapper<ClientSatisfaction> ew); |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦å¯¼åº |
| | | * @param clientSatisfactionId |
| | | * @return |
| | | */ |
| | | ClientSatisfactionDto exportWordClientSatisfaction(Integer clientSatisfactionId); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.InternalCheckDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥è¯¦æ
表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Mapper |
| | | public interface InternalCheckDetailMapper extends BaseMapper<InternalCheckDetail> { |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.InternalCheckDto; |
| | | import com.yuanchu.mom.pojo.InternalCheck; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Mapper |
| | | public interface InternalCheckMapper extends BaseMapper<InternalCheck> { |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥å页æ¥è¯¢ |
| | | * @param page |
| | | * @return |
| | | */ |
| | | IPage<InternalCheckDto> pageInternalCheck(Page page, @Param("ew") QueryWrapper<InternalCheck> ew); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.pojo.InternalCorrectFile; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审管ççº æ£æªæ½é件表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 04:00:38 |
| | | */ |
| | | @Mapper |
| | | public interface InternalCorrectFileMapper extends BaseMapper<InternalCorrectFile> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.InternalCorrect; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审管ççº æ£å¤ç表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 04:00:15 |
| | | */ |
| | | @Mapper |
| | | public interface InternalCorrectMapper extends BaseMapper<InternalCorrect> { |
| | | |
| | | IPage<InternalCorrect> pageInternalAccording(Page page, @Param("ew") QueryWrapper<InternalCorrect> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.InternalImplementDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * å
审宿½è®¡å详æ
|
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Mapper |
| | | public interface InternalImplementDetailMapper extends BaseMapper<InternalImplementDetail> { |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.InternalImplementDto; |
| | | import com.yuanchu.mom.pojo.InternalImplement; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * å
审宿½è®¡å |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Mapper |
| | | public interface InternalImplementMapper extends BaseMapper<InternalImplement> { |
| | | |
| | | /** |
| | | * å
审宿½è®¡åå页æ¥è¯¢ |
| | | * @param page |
| | | * @return |
| | | */ |
| | | IPage<InternalImplementDto> pageInternalImplement(Page page, @Param("ew") QueryWrapper<InternalImplement> ew); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.pojo.InternalMeetingDetail; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审ä¼è®®è¯¦æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:56:13 |
| | | */ |
| | | public interface InternalMeetingDetailMapper extends BaseMapper<InternalMeetingDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.InternalMeetingDto; |
| | | import com.yuanchu.mom.pojo.InternalMeeting; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审ä¼è®®è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:50:44 |
| | | */ |
| | | public interface InternalMeetingMapper extends BaseMapper<InternalMeeting> { |
| | | |
| | | /** |
| | | * å
审ä¼è®®å页æ¥è¯¢ |
| | | * @param page |
| | | * @return |
| | | */ |
| | | IPage<InternalMeetingDto> pageInternalMeeting(Page page, @Param("ew") QueryWrapper<InternalMeeting> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.pojo.InternalPlanDetail; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审年度计å详æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:28:48 |
| | | */ |
| | | @Mapper |
| | | public interface InternalPlanDetailMapper extends BaseMapper<InternalPlanDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.InternalPlanDto; |
| | | import com.yuanchu.mom.pojo.InternalPlan; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审年度计å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:27:47 |
| | | */ |
| | | @Mapper |
| | | public interface InternalPlanMapper extends BaseMapper<InternalPlan> { |
| | | |
| | | /** |
| | | * å
审年度计åå页æ¥è¯¢ |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<InternalPlanDto> pageInternalPlan(Page page, @Param("ew") QueryWrapper<InternalPlan> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.InternalReport; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * å
审æ¥å表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Mapper |
| | | public interface InternalReportMapper extends BaseMapper<InternalReport> { |
| | | |
| | | /** |
| | | * å
审æ¥åå页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalReportQueryWrapper |
| | | * @return |
| | | */ |
| | | IPage<InternalReport> pageInternalReport(Page page, @Param("ew") QueryWrapper<InternalReport> internalReportQueryWrapper); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageControlPlanList; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.vo.ManageControlPlanListVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:58:30 |
| | | */ |
| | | public interface ManageControlPlanListMapper extends BaseMapper<ManageControlPlanList> { |
| | | |
| | | IPage<ManageControlPlanListVo> getPageList(Page page, @Param("itSExporting") Boolean itSExporting); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageDocumentAlter; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ´ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 11:04:01 |
| | | */ |
| | | public interface ManageDocumentAlterMapper extends BaseMapper<ManageDocumentAlter> { |
| | | |
| | | IPage<ManageDocumentAlter> pageManageDocumentAlter(Page page, @Param("ew") QueryWrapper<ManageDocumentAlter> queryWrappers); |
| | | |
| | | ManageDocumentAlter getManageDocumentAlter(Integer id); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageDocumentCancel; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶ä½åº Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 02:37:35 |
| | | */ |
| | | public interface ManageDocumentCancelMapper extends BaseMapper<ManageDocumentCancel> { |
| | | |
| | | IPage<ManageDocumentCancel> pageManageDocumentCancel(Page page, @Param("ew") QueryWrapper<ManageDocumentCancel> queryWrappers); |
| | | |
| | | ManageDocumentCancel getManageDocumentCancel(Integer id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageDocumentControlled; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ§ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-08 02:54:44 |
| | | */ |
| | | public interface ManageDocumentControlledMapper extends BaseMapper<ManageDocumentControlled> { |
| | | |
| | | IPage<ManageDocumentControlled> pageManageDocumentControlled(Page page, @Param("ew") QueryWrapper<ManageDocumentControlled> queryWrappers); |
| | | |
| | | ManageDocumentControlled getManageDocumentControlled(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.ManageDocumentIssueRecycleDto; |
| | | import com.yuanchu.mom.pojo.ManageDocumentIssueRecycle; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ¾åæ¶ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 09:18:24 |
| | | */ |
| | | public interface ManageDocumentIssueRecycleMapper extends BaseMapper<ManageDocumentIssueRecycle> { |
| | | |
| | | IPage<ManageDocumentIssueRecycleDto> pageManageDocumentIssueRecycle(Page page, @Param("ew") QueryWrapper<ManageDocumentIssueRecycleDto> queryWrappers); |
| | | |
| | | ManageDocumentIssueRecycleDto getManageDocumentIssueRecycle(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageDocumentList; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶æ¸
å |
| | | Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-08 11:08:11 |
| | | */ |
| | | public interface ManageDocumentListMapper extends BaseMapper<ManageDocumentList> { |
| | | |
| | | IPage<ManageDocumentList> pageManageDocumentList(Page page, @Param("ew") QueryWrapper<ManageDocumentList> queryWrappers); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.ManageMeetingDto; |
| | | import com.yuanchu.mom.pojo.ManageMeeting; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 09:33:47 |
| | | */ |
| | | public interface ManageMeetingMapper extends BaseMapper<ManageMeeting> { |
| | | |
| | | |
| | | IPage<ManageMeetingDto> page(Page page, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("place") String place); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.pojo.ManageMeetingParticipants; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 09:34:27 |
| | | */ |
| | | public interface ManageMeetingParticipantsMapper extends BaseMapper<ManageMeetingParticipants> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordAudit; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 10:29:18 |
| | | */ |
| | | public interface ManageRecordAuditMapper extends BaseMapper<ManageRecordAudit> { |
| | | |
| | | IPage<ManageRecordAudit> pageManageRecordAudit(Page page, @Param("ew") QueryWrapper<ManageRecordAudit> queryWrappers); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordCancel; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½åºæä»¶ééè®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 01:27:22 |
| | | */ |
| | | public interface ManageRecordCancelMapper extends BaseMapper<ManageRecordCancel> { |
| | | |
| | | IPage<ManageRecordCancel> pageManageRecordCancel(Page page, @Param("ew") QueryWrapper<ManageRecordCancel> queryWrappers); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordCheck; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®¡æ¹è®°å½(å«ä¿®è®¢å忬¡å®¡æ¹è®°å½) Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:31:36 |
| | | */ |
| | | public interface ManageRecordCheckMapper extends BaseMapper<ManageRecordCheck> { |
| | | |
| | | IPage<ManageRecordCheck> pageManageRecordCheck(Page page, @Param("ew") QueryWrapper<ManageRecordCheck> queryWrappers); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordIntervals; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®æå®¡æ¥è®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 10:54:31 |
| | | */ |
| | | public interface ManageRecordIntervalsMapper extends BaseMapper<ManageRecordIntervals> { |
| | | |
| | | IPage<ManageRecordIntervals> pageManageRecordIntervals(Page page, @Param("ew") QueryWrapper<ManageRecordIntervals> queryWrappers); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordIntervalsTotal; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®æå®¡æ¥è®°å½æ»åå²è®°å½è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 01:12:11 |
| | | */ |
| | | public interface ManageRecordIntervalsTotalMapper extends BaseMapper<ManageRecordIntervalsTotal> { |
| | | |
| | | IPage<ManageRecordIntervalsTotal> pageManageRecordIntervalsTotal(Page page, @Param("ew") QueryWrapper<ManageRecordIntervalsTotal> queryWrappers); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordIssueRecycle; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æææä»¶(å
ãå¤é¨æä»¶)çåæ¾ä¸åæ¶è®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 09:11:05 |
| | | */ |
| | | public interface ManageRecordIssueRecycleMapper extends BaseMapper<ManageRecordIssueRecycle> { |
| | | |
| | | IPage<ManageRecordIssueRecycle> pageManageRecordIssueRecycle(Page page, @Param("ew") QueryWrapper<ManageRecordIssueRecycle> queryWrappers); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordTotal; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥æä»¶ç¡®è®¤è®°å½æ»åå²è®°å½è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 10:30:08 |
| | | */ |
| | | public interface ManageRecordTotalMapper extends BaseMapper<ManageRecordTotal> { |
| | | |
| | | IPage<ManageRecordTotal> pageProcessTotaldeal(Page page, @Param("ew") QueryWrapper<ManageRecordTotal> queryWrappers); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordVerify; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥æä»¶ç¡®è®¤è®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 10:29:44 |
| | | */ |
| | | public interface ManageRecordVerifyMapper extends BaseMapper<ManageRecordVerify> { |
| | | |
| | | IPage<ManageRecordVerify> pageManageRecordVerify(Page page, @Param("ew") QueryWrapper<ManageRecordVerify> queryWrappers); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.pojo.ManageReviewProgramFile; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 04:15:47 |
| | | */ |
| | | public interface ManageReviewProgramFileMapper extends BaseMapper<ManageReviewProgramFile> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageReviewProgram; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 03:05:42 |
| | | */ |
| | | public interface ManageReviewProgramMapper extends BaseMapper<ManageReviewProgram> { |
| | | |
| | | |
| | | IPage<ManageReviewProgram> page(Page page, @Param("startTime") String startTime,@Param("endTime") String endTime,@Param("judgingLocation") String judgingLocation); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageMeeting; |
| | | import com.yuanchu.mom.pojo.ManageReviewReport; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 管çè¯å®¡æ¥å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 04:44:39 |
| | | */ |
| | | public interface ManageReviewReportMapper extends BaseMapper<ManageReviewReport> { |
| | | |
| | | IPage<ManageReviewReport> page(Page page, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("place") String place); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRiskAssessmentResults; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.vo.ManageRiskAssessmentResultsVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:58:51 |
| | | */ |
| | | public interface ManageRiskAssessmentResultsMapper extends BaseMapper<ManageRiskAssessmentResults> { |
| | | |
| | | IPage<ManageRiskAssessmentResultsVo> getPageResults(Page page, @Param("itSExporting") Boolean itSExporting); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-09 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_client_satisfaction") |
| | | public class ClientSatisfaction { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer clientSatisfactionId; |
| | | |
| | | @ApiModelProperty("åä½åç§°") |
| | | private String unitName; |
| | | |
| | | @ApiModelProperty("å§å") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("填忥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate fillDate; |
| | | |
| | | @ApiModelProperty("é¨é¨") |
| | | private String department; |
| | | |
| | | @ApiModelProperty("èç³»çµè¯") |
| | | private String contactNumber; |
| | | |
| | | @ApiModelProperty("æå¡æåº¦, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private Integer serviceAttitude; |
| | | |
| | | @ApiModelProperty("æå¡æåº¦å»ºè®®") |
| | | private String serviceAttitudeSuggestion; |
| | | |
| | | @ApiModelProperty("ææ¯è½å, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private Integer technicalCompetence; |
| | | |
| | | @ApiModelProperty("ææ¯è½å建议") |
| | | private String technicalCompetenceSuggestion; |
| | | |
| | | @ApiModelProperty("æ£æµå·¥ä½, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private Integer inspectionWork; |
| | | |
| | | @ApiModelProperty("æ£æµå·¥ä½å»ºè®®") |
| | | private String inspectionWorkSuggestion; |
| | | |
| | | @ApiModelProperty("æ¶è´¹åçæ§, 0:满æ, 1:ä¸è¬, 2:䏿»¡æ") |
| | | private Integer reasonableFees; |
| | | |
| | | @ApiModelProperty("æ¶è´¹åçæ§å»ºè®®") |
| | | private String reasonableFeesSuggestion; |
| | | |
| | | @ApiModelProperty("确认人") |
| | | private String confirmPerson; |
| | | |
| | | @ApiModelProperty("确认人Id") |
| | | private Integer confirmPersonId; |
| | | |
| | | @ApiModelProperty("ç¡®è®¤ç¶æ, 0:æªç¡®è®¤, 1:确认") |
| | | private Integer confirmStatus; |
| | | |
| | | @ApiModelProperty("夿³¨(对æä»¬ç叿)") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦åæéä»¶ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-09 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_client_satisfaction_analyse_file") |
| | | public class ClientSatisfactionAnalyseFile { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer analyseFileId; |
| | | |
| | | @ApiModelProperty("ç±»å:1å¾ç/2æä»¶") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("éä»¶è·¯å¾") |
| | | private String fileUrl; |
| | | |
| | | @ApiModelProperty("éä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(select = false,exist = false) |
| | | private String userName; |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_check") |
| | | public class InternalCheck { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer checkId; |
| | | |
| | | @ApiModelProperty("é¨é¨") |
| | | private String department; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äºº") |
| | | private String departmentHead; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸å") |
| | | private String auditor; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private String reviewDate; |
| | | |
| | | @ApiModelProperty("ç¼å¶äººid") |
| | | private Integer writeUserId; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private String writeUserName; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime writeTime; |
| | | |
| | | @ApiModelProperty("æ¹å人id") |
| | | private Integer ratifyUserId; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private String ratifyUserName; |
| | | |
| | | @ApiModelProperty("æ¹åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime ratifyTime; |
| | | |
| | | @ApiModelProperty("æ¹åç¶æ, 0 ä¸éè¿, 1éè¿") |
| | | private Integer ratifyStatus; |
| | | |
| | | @ApiModelProperty("æ¹åå
容") |
| | | private String ratifyRemark; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥è¯¦æ
表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_check_detail") |
| | | public class InternalCheckDetail { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer checkDetailId; |
| | | |
| | | @ApiModelProperty("æ£æ¥ä¸»è¡¨id") |
| | | private Integer checkId; |
| | | |
| | | @ApiModelProperty("è¦ç´ æ¡æ¬¾") |
| | | private String element; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸å
容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¹å¼") |
| | | private String method; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç»æè®°å½") |
| | | private String resultRecords; |
| | | |
| | | @ApiModelProperty("ä¸ç¬¦åæ§è´¨") |
| | | private String nonNature; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | // 导åºä½¿ç¨ |
| | | @TableField(select = false, exist = false) |
| | | private Integer index; |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.Data; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审管ççº æ£å¤ç表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 04:00:15 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_correct") |
| | | @ApiModel(value = "InternalCorrect对象", description = "å
审管ççº æ£å¤ç表") |
| | | public class InternalCorrect { |
| | | |
| | | @TableId(value = "correct_id", type = IdType.AUTO) |
| | | private Integer correctId; |
| | | |
| | | @ApiModelProperty("ä¸åæ ¼æè¿°") |
| | | private String raiseResult; |
| | | |
| | | @ApiModelProperty("vdeä¸å®¶åç°") |
| | | private String vdeRaiseResult; |
| | | |
| | | @ApiModelProperty("æåºé¨é¨") |
| | | private String raiseDepartment; |
| | | |
| | | @ApiModelProperty("æåºäººid") |
| | | private Integer raiseUserId; |
| | | |
| | | @ApiModelProperty("æåºäºº") |
| | | private String raiseUserName; |
| | | |
| | | @ApiModelProperty("æåºæ¶é´") |
| | | private LocalDate raiseTime; |
| | | |
| | | @ApiModelProperty("åå åæ") |
| | | private String causeResult; |
| | | |
| | | @ApiModelProperty("åå åæè´£ä»»é¨é¨") |
| | | private String causeDepartment; |
| | | |
| | | @ApiModelProperty("åå åæäººid") |
| | | private Integer causeUserId; |
| | | |
| | | @ApiModelProperty("åå åæäºº") |
| | | private String causeUserName; |
| | | |
| | | @ApiModelProperty("åå åææ¶é´") |
| | | private LocalDate causeTime; |
| | | |
| | | @ApiModelProperty("çº æ£æªæ½") |
| | | private String correctResult; |
| | | |
| | | @ApiModelProperty("æåºé¨é¨ç¡®è®¤") |
| | | private String raiseDepartmentAffirm; |
| | | |
| | | @ApiModelProperty("çº æ£è´£ä»»é¨é¨") |
| | | private String correctDepartment; |
| | | |
| | | @ApiModelProperty("çº æ£äººid") |
| | | private Integer correctUserId; |
| | | |
| | | @ApiModelProperty("çº æ£") |
| | | private String correctUserName; |
| | | |
| | | @ApiModelProperty("çº æ£æ¶é´") |
| | | private LocalDate correctTime; |
| | | |
| | | @ApiModelProperty("éªè¯ç»æ") |
| | | private String validationResult; |
| | | |
| | | @ApiModelProperty("éªè¯é¨é¨") |
| | | private String validationDepartment; |
| | | |
| | | @ApiModelProperty("éªè¯äººid") |
| | | private Integer validationUserId; |
| | | |
| | | @ApiModelProperty("éªè¯äºº") |
| | | private String validationUserName; |
| | | |
| | | @ApiModelProperty("éªè¯æ¶é´") |
| | | private LocalDate validationTime; |
| | | |
| | | @ApiModelProperty("æ¯å¦ç»æ, 0: æªç»æ, 1:å·²ç»æ") |
| | | private Integer isFinish; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | @ApiModelProperty("æµç¨, 0:ä¸ç¬¦å工使
åµè®°å½, 1å¤çæªæ½, 2:çº æ£æªæ½, 3:æ¯å¦éç¥å®¢æ·å¯æ¢å¤å·¥ä½") |
| | | private Integer flowType; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审管ççº æ£æªæ½é件表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 04:00:38 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_correct_file") |
| | | @ApiModel(value = "InternalCorrectFile对象", description = "å
审管ççº æ£æªæ½é件表") |
| | | public class InternalCorrectFile { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer correctFileId; |
| | | |
| | | @ApiModelProperty("å
å®¡çº æ£æªæ½id") |
| | | private Integer correctId; |
| | | |
| | | @ApiModelProperty("ç±»å:1å¾ç/2æä»¶") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("éä»¶è·¯å¾") |
| | | private String fileUrl; |
| | | |
| | | @ApiModelProperty("éä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * å
审宿½è®¡å |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_implement") |
| | | public class InternalImplement { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer implementId; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç®ç") |
| | | private String purposes; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ§è´¨") |
| | | private String nature; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸èå´") |
| | | private String scope; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ä¾æ®") |
| | | private String basis; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç»é¿") |
| | | private String teamLeader; |
| | | |
| | | @ApiModelProperty("å
审å") |
| | | private String internalAuditor; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¶é´") |
| | | private String reviewDate; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¹æ³") |
| | | private String auditMethod; |
| | | |
| | | @ApiModelProperty("ä¼è®®å¼å§æ¶é´") |
| | | private String firstMeetingTime; |
| | | |
| | | @ApiModelProperty("æ«æ¬¡ä¼è®®æ¶é´") |
| | | private String lastMeetingTime; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥åæäº¤æ¥æ") |
| | | private String submitTime; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥ååæ¾èå´") |
| | | private String submitScope; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("ç¼å¶äººid") |
| | | private Integer writeUserId; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private String writeUserName; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime writeTime; |
| | | |
| | | @ApiModelProperty("æ¹å人id") |
| | | private Integer ratifyUserId; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private String ratifyUserName; |
| | | |
| | | @ApiModelProperty("æ¹åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime ratifyTime; |
| | | |
| | | @ApiModelProperty("æ¹åç¶æ, 0 ä¸éè¿, 1éè¿") |
| | | private Integer ratifyStatus; |
| | | |
| | | @ApiModelProperty("æ¹åå
容") |
| | | private String ratifyRemark; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * å
审宿½è®¡å详æ
|
| | | * |
| | | * @author makejava |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_implement_detail") |
| | | public class InternalImplementDetail { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer implementDetailId; |
| | | |
| | | @ApiModelProperty("宿½è®¡å主表id") |
| | | private Integer implementId; |
| | | |
| | | @ApiModelProperty("æ¶é´") |
| | | private String implement; |
| | | |
| | | @ApiModelProperty("é¨é¨") |
| | | private String department; |
| | | |
| | | @ApiModelProperty("责任人") |
| | | private String responsible; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸å") |
| | | private String auditor; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸å
容") |
| | | private String reviewContent; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | // 导åºä½¿ç¨ |
| | | @TableField(select = false, exist = false) |
| | | private Integer index; |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审ä¼è®®è¡¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:50:44 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_meeting") |
| | | @ApiModel(value = "InternalMeeting对象", description = "å
审ä¼è®®è¡¨") |
| | | public class InternalMeeting { |
| | | |
| | | @TableId(value = "meeting_id", type = IdType.AUTO) |
| | | private Integer meetingId; |
| | | |
| | | @ApiModelProperty("æ¶é´") |
| | | private String meetingDate; |
| | | |
| | | @ApiModelProperty("主æäºº") |
| | | private String compere; |
| | | |
| | | @ApiModelProperty("å°ç¹") |
| | | private String place; |
| | | |
| | | @ApiModelProperty("ä¼è®®ä¸»é¢") |
| | | private String subject; |
| | | |
| | | @ApiModelProperty("åå 人å") |
| | | private String participant; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审ä¼è®®è¯¦æ
表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:56:13 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_meeting_detail") |
| | | @ApiModel(value = "InternalMeetingDetail对象", description = "å
审ä¼è®®è¯¦æ
表") |
| | | public class InternalMeetingDetail { |
| | | |
| | | @TableId(value = "meeting_detail_id", type = IdType.AUTO) |
| | | private Integer meetingDetailId; |
| | | |
| | | @ApiModelProperty("ä¼è®®ä¸»è¡¨id") |
| | | private Integer meetingId; |
| | | |
| | | @ApiModelProperty("åå 人åid") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty("åå 人å") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("é¨é¨") |
| | | private String department; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审年度计å |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:27:47 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_plan") |
| | | @ApiModel(value = "InternalPlan对象", description = "å
审年度计å") |
| | | public class InternalPlan { |
| | | |
| | | @TableId(value = "plan_id", type = IdType.AUTO) |
| | | private Integer planId; |
| | | |
| | | @ApiModelProperty("å
审ç®ç") |
| | | private String purpose; |
| | | |
| | | @ApiModelProperty("å
çèå´") |
| | | private String scope; |
| | | |
| | | @ApiModelProperty("å
审便®") |
| | | private String basis; |
| | | |
| | | @ApiModelProperty("ç»é¿") |
| | | private String leader; |
| | | |
| | | @ApiModelProperty("ç»å") |
| | | private String crew; |
| | | |
| | | @ApiModelProperty("ç¼å¶äººid") |
| | | private Integer writeUserId; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private String writeUserName; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | private LocalDateTime writeTime; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äººid") |
| | | private Integer examineUserId; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äºº") |
| | | private String examineUserName; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¶é´") |
| | | private LocalDateTime examineTime; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æ,0 ä¸éè¿, 1 éè¿") |
| | | private Integer examineStatus; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ä¿¡æ¯") |
| | | private String examineRemark; |
| | | |
| | | @ApiModelProperty("æ¹å人id") |
| | | private Integer ratifyUserId; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private String ratifyUserName; |
| | | |
| | | @ApiModelProperty("æ¹åæ¶é´") |
| | | private LocalDateTime ratifyTime; |
| | | |
| | | @ApiModelProperty("æ¹åç¶æ,0 ä¸éè¿, 1 éè¿") |
| | | private Integer ratifyStatus; |
| | | |
| | | @ApiModelProperty("æ¹åä¿¡æ¯") |
| | | private String ratifyRemark; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审年度计å详æ
表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:28:48 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_plan_detail") |
| | | @ApiModel(value = "InternalPlanDetail对象", description = "å
审年度计å详æ
表") |
| | | public class InternalPlanDetail { |
| | | |
| | | @TableId(value = "plan_detail_id", type = IdType.AUTO) |
| | | private Integer planDetailId; |
| | | |
| | | @ApiModelProperty("å
审年度计åid") |
| | | private Integer planId; |
| | | |
| | | @ApiModelProperty("é¨é¨") |
| | | private String department; |
| | | |
| | | @ApiModelProperty("䏿") |
| | | private String january; |
| | | |
| | | @ApiModelProperty("äºæ") |
| | | private String february; |
| | | |
| | | @ApiModelProperty("䏿") |
| | | private String march; |
| | | |
| | | @ApiModelProperty("åæ") |
| | | private String april; |
| | | |
| | | @ApiModelProperty("äºæ") |
| | | private String may; |
| | | |
| | | @ApiModelProperty("å
æ") |
| | | private String june; |
| | | |
| | | @ApiModelProperty("䏿") |
| | | private String july; |
| | | |
| | | @ApiModelProperty("å
«æ") |
| | | private String august; |
| | | |
| | | @ApiModelProperty("乿") |
| | | private String september; |
| | | |
| | | @ApiModelProperty("åæ") |
| | | private String october; |
| | | |
| | | @ApiModelProperty("å䏿") |
| | | private String november; |
| | | |
| | | @ApiModelProperty("åäºæ") |
| | | private String december; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * å
审æ¥å表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_report") |
| | | public class InternalReport { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer reportId; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ä¾æ®") |
| | | private String purposes; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ä¾æ®") |
| | | private String basis; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private String reviewDate; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¹æ³") |
| | | private String method; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸èå´") |
| | | private String scope; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸è´£ä»»å¶") |
| | | private String responsible; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç»é¿") |
| | | private String leader; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸å") |
| | | private String auditor; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç»åå·¥æ
åµ") |
| | | private String division; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¦åµ") |
| | | private String overview; |
| | | |
| | | @ApiModelProperty("ç»è®ºæ§è¯ä»·") |
| | | private String conclusion; |
| | | |
| | | @ApiModelProperty("æ¹è¿å»ºè®®") |
| | | private String suggest; |
| | | |
| | | @ApiModelProperty("å®æçº æ£æªæ½æéæ¶é´") |
| | | private String actionDate; |
| | | |
| | | @ApiModelProperty("æ»ä½è·è¿ç¡®è®¤äºº") |
| | | private String followUser; |
| | | |
| | | @ApiModelProperty("æ»ä½è·è¿ç¡®è®¤è®°å½") |
| | | private String followRecord; |
| | | |
| | | @ApiModelProperty("æ¬æ¥ååæ¾èå´") |
| | | private String reportScope; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äººid") |
| | | private Integer examineUserId; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äºº") |
| | | private String examineUserName; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime examineTime; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æ,0 ä¸éè¿, 1 éè¿") |
| | | private Integer examineStatus; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ä¿¡æ¯") |
| | | private String examineRemark; |
| | | |
| | | @ApiModelProperty("è´¨éè´è´£äººid") |
| | | private Integer qualityUserId; |
| | | |
| | | @ApiModelProperty("è´¨éè´è´£äºº") |
| | | private String qualityUserName; |
| | | |
| | | @ApiModelProperty("è´¨éè´è´£äººå¡«åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime qualityTime; |
| | | |
| | | @ApiModelProperty("è´¨éè´è´£äººç¶æ, 0 ä¸éè¿, 1éè¿") |
| | | private Integer qualityStatus; |
| | | |
| | | @ApiModelProperty("è´¨éè´è´£äººæè§") |
| | | private String qualityRemark; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | 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-11-15 02:58:30 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_control_plan_list") |
| | | @ApiModel(value = "ManageControlPlanList对象", description = "é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å") |
| | | public class ManageControlPlanList implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("ä½ä¸æ´»å¨") |
| | | @ExcelProperty("ä½ä¸æ´»å¨") |
| | | private String jobActivity; |
| | | |
| | | @ApiModelProperty("é£é©å ç´ ç±»å«") |
| | | @ExcelProperty("é£é©å ç´ ç±»å«") |
| | | private String category; |
| | | |
| | | @ApiModelProperty("é£é©å ç´ æè¿°") |
| | | @ExcelProperty("é£é©å ç´ æè¿°") |
| | | private String description; |
| | | |
| | | @ApiModelProperty("å¯å¯¼è´çäºæ
") |
| | | @ExcelProperty("å¯å¯¼è´çäºæ
") |
| | | private String result; |
| | | |
| | | @ApiModelProperty("æ¯å¦ä¸å¯æ¿åé£é©") |
| | | @ExcelProperty("æ¯å¦ä¸å¯æ¿åé£é©") |
| | | private String intolerable; |
| | | |
| | | @ApiModelProperty("æ§å¶è®¡å") |
| | | @ExcelProperty("æ§å¶è®¡å") |
| | | private String plan; |
| | | |
| | | @ApiModelProperty("ç¼å¶id") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty("æ¥æ") |
| | | private LocalDateTime editorDate; |
| | | |
| | | @ApiModelProperty("审æ¹id") |
| | | private Integer approval; |
| | | |
| | | @ApiModelProperty("æ¥æ") |
| | | private LocalDateTime approvalDate; |
| | | |
| | | @ApiModelProperty("æ¹åid") |
| | | private Integer approve; |
| | | |
| | | @ApiModelProperty("æ¹åæ¥æ") |
| | | private LocalDateTime approveDate; |
| | | |
| | | @ApiModelProperty("æ¹åç¶æ1ï¼éè¿ï¼2ï¼ä¸éè¿") |
| | | private Integer approveStatus; |
| | | |
| | | @ApiModelProperty("审æ¹ç¶æ1ï¼éè¿ï¼2ï¼ä¸éè¿") |
| | | private Integer approvalStatus; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | 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.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ´ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 11:04:01 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_document_alter") |
| | | @ApiModel(value = "ManageDocumentAlter对象", description = "æä»¶åæ´") |
| | | @ExcelIgnoreUnannotated |
| | | public class ManageDocumentAlter extends OrderBy implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("ç³è¯·ç¼å·") |
| | | @ValueTableShow(1) |
| | | @ExcelProperty("ç³è¯·ç¼å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty("ç³è¯·äºº") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(select = false, exist = false) |
| | | @ValueTableShow(value = 2, name = "ç³è¯·äºº") |
| | | @ExcelProperty("ç³è¯·äºº") |
| | | private String createUserName; |
| | | |
| | | @TableField(select = false, exist = false) |
| | | @ApiModelProperty("ç³è¯·é¨é¨") |
| | | private String createUserDepartLims; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ææåæ´æ¶é´") |
| | | @ValueTableShow(4) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ExcelProperty("ææåæ´æ¶é´") |
| | | private LocalDate expectAlterDate; |
| | | |
| | | @ApiModelProperty("å®é
åæ´æ¶é´") |
| | | @ValueTableShow(5) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ExcelProperty("å®é
åæ´æ¶é´") |
| | | private LocalDate actuallyAlterDate; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | @ValueTableShow(6) |
| | | @ExcelProperty("ç¶æ") |
| | | private String state; |
| | | |
| | | @ApiModelProperty("审æ¹äºº") |
| | | private Integer checkUser; |
| | | |
| | | @TableField(select = false, exist = false) |
| | | @ExcelProperty("审æ¹äºº") |
| | | private String checkUserName; |
| | | |
| | | @ApiModelProperty("åæ´è¯´æ") |
| | | @ValueTableShow(3) |
| | | @ExcelProperty("åæ´è¯´æ") |
| | | private String alterNote; |
| | | |
| | | @ApiModelProperty("åæ´åç¼å·") |
| | | private String alterBeforeCode; |
| | | |
| | | @ApiModelProperty("åæ´ååç§°") |
| | | private String alterBeforeName; |
| | | |
| | | @ApiModelProperty("åæ´åçæ¬") |
| | | private String alterBeforeVersion; |
| | | |
| | | @ApiModelProperty("åæ´åç¼å·") |
| | | private String alterAfterCode; |
| | | |
| | | @ApiModelProperty("åæ´ååç§°") |
| | | private String alterAfterName; |
| | | |
| | | @ApiModelProperty("åæ´åçæ¬") |
| | | private String alterAfterVersion; |
| | | |
| | | @ApiModelProperty("åæ´åéä»¶") |
| | | private String alterAfterUrl; |
| | | |
| | | @ApiModelProperty("åæ´åéä»¶") |
| | | @TableField(select = false,exist = false) |
| | | private MultipartFile file; |
| | | |
| | | @ApiModelProperty("åä¸çæ¬å¤çæ¹å¼") |
| | | private String method; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | 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.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶ä½åº |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 02:37:35 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_document_cancel") |
| | | @ApiModel(value = "ManageDocumentCancel对象", description = "æä»¶ä½åº") |
| | | @ExcelIgnoreUnannotated |
| | | public class ManageDocumentCancel extends OrderBy implements Serializable { |
| | | |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("ç³è¯·äºº") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("ç³è¯·äºº") |
| | | @TableField(select = false,exist = false) |
| | | @ValueTableShow(2) |
| | | @ExcelProperty("ç³è¯·äºº") |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty("ç³è¯·äººé¨é¨") |
| | | @TableField(select = false,exist = false) |
| | | private String createUserDepartLims; |
| | | |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("æä»¶ç¼å·") |
| | | @ValueTableShow(1) |
| | | @ExcelProperty("æä»¶ç¼å·") |
| | | private String documentCode; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("æä»¶çæ¬") |
| | | private String version; |
| | | |
| | | @ApiModelProperty("æä»¶ç¶æ") |
| | | private String documentState; |
| | | |
| | | @ApiModelProperty("ä½åºæ¹å¼") |
| | | private String method; |
| | | |
| | | @ApiModelProperty("ä½åºè¯´æ") |
| | | @ValueTableShow(3) |
| | | @ExcelProperty("ä½åºè¯´æ") |
| | | private String cancelNote; |
| | | |
| | | @ApiModelProperty("审æ¹äºº") |
| | | private Integer checkUser; |
| | | |
| | | @ExcelProperty("审æ¹äºº") |
| | | @TableField(select = false, exist = false) |
| | | private String checkUserName; |
| | | |
| | | @ApiModelProperty("ææä½åºæ¶é´") |
| | | @ValueTableShow(4) |
| | | @ExcelProperty("ææä½åºæ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate expectCancelDate; |
| | | |
| | | @ApiModelProperty("å®é
ä½åºæ¥æ") |
| | | @ValueTableShow(5) |
| | | @ExcelProperty("å®é
ä½åºæ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate actuallyCancelDate; |
| | | |
| | | @ApiModelProperty("ä½åºç¶æ") |
| | | @ValueTableShow(6) |
| | | @ExcelProperty("ä½åºç¶æ") |
| | | private String state; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ§ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-08 02:54:44 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_document_controlled") |
| | | @ApiModel(value = "ManageDocumentControlled对象", description = "æä»¶åæ§") |
| | | public class ManageDocumentControlled extends OrderBy implements Serializable { |
| | | |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("ç³è¯·æä»¶ç¼å·") |
| | | @ValueTableShow(1) |
| | | private String documentCode; |
| | | |
| | | @ApiModelProperty("æä»¶ç±»å«") |
| | | @ValueTableShow(2) |
| | | private String type; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("æä»¶çæ¬") |
| | | private String version; |
| | | |
| | | @ApiModelProperty("ä½è
") |
| | | private String writer; |
| | | |
| | | @ApiModelProperty("æäº¤æ¥æ") |
| | | @ValueTableShow(5) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate submitDate; |
| | | |
| | | @ApiModelProperty("说æ") |
| | | @ValueTableShow(4) |
| | | private String instructions; |
| | | |
| | | @ApiModelProperty("ç³è¯·ç¶æ") |
| | | @ValueTableShow(6) |
| | | private String state; |
| | | |
| | | @ApiModelProperty("éä»¶å°å") |
| | | private String url; |
| | | |
| | | @ApiModelProperty("责任人") |
| | | private Integer dutyUser; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | @ValueTableShow(value = 5, name = "责任人") |
| | | private String dutyUserName; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ValueTableShow(value = 2, name = "ç³è¯·äºº") |
| | | @TableField(select = false, exist = false) |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty("ç³è¯·é¨é¨") |
| | | @TableField(select = false, exist = false) |
| | | private String createUserDepartLims; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @ValueTableShow(value = 3, name = "ç³è¯·æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(select = false, exist = false) |
| | | private MultipartFile file; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.validation.constraints.Pattern; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ¾åæ¶ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 09:18:24 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_document_issue_recycle") |
| | | @ApiModel(value = "ManageDocumentIssueRecycle对象", description = "æä»¶åæ¾åæ¶") |
| | | public class ManageDocumentIssueRecycle extends OrderBy implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æä»¶ç¼å·") |
| | | @ValueTableShow(1) |
| | | @ExcelProperty(value = "æä»¶ç¼å·") |
| | | private String documentCode; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | @ValueTableShow(2) |
| | | @ExcelProperty(value = "æä»¶åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("æä»¶çæ¬") |
| | | @ValueTableShow(3) |
| | | @ExcelProperty(value = "æä»¶çæ¬") |
| | | private String version; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | @ExcelProperty(value = "ç¶æ") |
| | | private String state; |
| | | |
| | | @ApiModelProperty("æä»¶ç¶æ") |
| | | @ValueTableShow(4) |
| | | @ExcelProperty(value = "æä»¶ç¶æ") |
| | | private String documentState; |
| | | |
| | | @ApiModelProperty("åæ¾ç¼å·") |
| | | @ValueTableShow(5) |
| | | @ExcelProperty(value = "åæ¾ç¼å·") |
| | | private String issueCode; |
| | | |
| | | @ApiModelProperty("åæ¾äºº") |
| | | private Integer issueUser; |
| | | |
| | | @ApiModelProperty("åæ¾æ¥æ") |
| | | @ValueTableShow(7) |
| | | @ExcelProperty(value = "åæ¾æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate issueDate; |
| | | |
| | | @ApiModelProperty("åæ¾è¯´æ") |
| | | private String issueNote; |
| | | |
| | | @ApiModelProperty("æ¥æ¶äºº") |
| | | private Integer receiveUser; |
| | | |
| | | @ApiModelProperty("æ¥æ¶æ¶é´") |
| | | private LocalDate receiveDate; |
| | | |
| | | @ApiModelProperty("åæ¶ç¼å·") |
| | | private String recycleCode; |
| | | |
| | | @ApiModelProperty("åæ¶äºº") |
| | | private Integer recycleUser; |
| | | |
| | | @ApiModelProperty("åæ¶æ¥æ") |
| | | @ValueTableShow(9) |
| | | @ExcelProperty(value = "åæ¶æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate recycleDate; |
| | | |
| | | @ApiModelProperty("åæ¶è¯´æ") |
| | | private String recycleNote; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("éä»¶") |
| | | private String url; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private MultipartFile file; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | 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.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶æ¸
å |
| | | |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-08 11:08:11 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_document_list") |
| | | @ApiModel(value = "ManageDocumentList对象", description = "æä»¶æ¸
å") |
| | | @ExcelIgnoreUnannotated |
| | | public class ManageDocumentList extends OrderBy implements Serializable { |
| | | |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æä»¶ç¼å·") |
| | | @ValueTableShow(1) |
| | | @ExcelProperty(value = "æä»¶ç¼å·") |
| | | private String documentCode; |
| | | |
| | | @ApiModelProperty("ç±»å«") |
| | | @ValueTableShow(2) |
| | | @ExcelProperty(value = "ç±»å«") |
| | | private String type; |
| | | |
| | | @ApiModelProperty("åç§°") |
| | | @ValueTableShow(3) |
| | | @ExcelProperty(value = "åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("æä»¶çæ¬") |
| | | @ValueTableShow(4) |
| | | @ExcelProperty(value = "æä»¶çæ¬") |
| | | private String version; |
| | | |
| | | @ApiModelProperty("ä½è
") |
| | | @ValueTableShow(5) |
| | | @ExcelProperty(value = "ä½è
") |
| | | private String writer; |
| | | |
| | | @ApiModelProperty("çææ¥æ") |
| | | @ValueTableShow(6) |
| | | @ExcelProperty(value = "çææ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate effectiveDate; |
| | | |
| | | @ApiModelProperty("æä»¶ç¶æ") |
| | | @ValueTableShow(7) |
| | | @ExcelProperty(value = "æä»¶ç¶æ") |
| | | private String state; |
| | | |
| | | @ApiModelProperty("éä»¶å°å") |
| | | private String url; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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-11-11 09:33:47 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_meeting") |
| | | @ApiModel(value = "ManageMeeting对象", description = "") |
| | | public class ManageMeeting implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("ä¼è®®æ¶é´") |
| | | private LocalDateTime meetingTime; |
| | | |
| | | @ApiModelProperty("ä¼è®®å°ç¹") |
| | | private String place; |
| | | |
| | | @ApiModelProperty("主æäºº") |
| | | private String compere; |
| | | |
| | | @ApiModelProperty("ä¼è®®å
容æè¦") |
| | | private String content; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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-11-11 09:34:27 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_meeting_participants") |
| | | @ApiModel(value = "ManageMeetingParticipants对象", description = "") |
| | | public class ManageMeetingParticipants implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("åä¼äººå") |
| | | private Integer participants; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("é¨é¨") |
| | | private String department; |
| | | |
| | | @ApiModelProperty("ä¼è®®id") |
| | | private Integer meetingId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 10:29:18 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_record_audit") |
| | | @ApiModel(value = "ManageRecordAudit对象", description = "æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | public class ManageRecordAudit extends OrderBy implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æä»¶ç¼å·") |
| | | @ValueTableShow(1) |
| | | private String documentCode; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | private String documentName; |
| | | |
| | | @ApiModelProperty("ç« èå·") |
| | | @ValueTableShow(2) |
| | | private String capter; |
| | | |
| | | @ApiModelProperty("页ç ") |
| | | @ValueTableShow(3) |
| | | private String pages; |
| | | |
| | | @ApiModelProperty("修订次æ°") |
| | | @ValueTableShow(4) |
| | | private Integer number; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹åçæ¬å·") |
| | | @ValueTableShow(5) |
| | | private String beforeVersion; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹åçæ¬å·") |
| | | @ValueTableShow(6) |
| | | private String afterVersion; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹å
容") |
| | | @ValueTableShow(7) |
| | | private String alterThing; |
| | | |
| | | @ApiModelProperty("修订人") |
| | | private Integer alterUser; |
| | | |
| | | @TableField(select = false, exist = false) |
| | | @ValueTableShow(value = 8, name = "修订人") |
| | | private String alterUserName; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private Integer ratifyUser; |
| | | |
| | | @TableField(select = false, exist = false) |
| | | @ValueTableShow(value = 9, name = "æ¹å人") |
| | | private String ratifyUserName; |
| | | |
| | | //æ¹å人ç¾å |
| | | @TableField(select = false, exist = false) |
| | | private String ratifyUserUrl; |
| | | |
| | | @ApiModelProperty("æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ValueTableShow(10) |
| | | private LocalDate date; |
| | | |
| | | @ApiModelProperty("ç³è¯·äºº") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | //ç³è¯·äºº |
| | | @TableField(select = false, exist = false) |
| | | private String createUserName; |
| | | |
| | | //ç³è¯·é¨é¨ |
| | | @TableField(select = false, exist = false) |
| | | private String createUserDepart; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ç³è¯·æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("åååå ") |
| | | private String reason; |
| | | |
| | | @ApiModelProperty("åååé¨é¨") |
| | | private String beforeDepart; |
| | | |
| | | @ApiModelProperty("修订åååé¨é¨") |
| | | private String afterDepart; |
| | | |
| | | @ApiModelProperty("ç³è¯·é¨é¨ä¸»ç®¡æè§") |
| | | private String applicant; |
| | | |
| | | @ApiModelProperty("åå¶å®é¨é¨æè§") |
| | | private String formulation; |
| | | |
| | | @ApiModelProperty("åå®¡æ ¸é¨é¨æè§") |
| | | private String audit; |
| | | |
| | | @ApiModelProperty("修订ä½åº") |
| | | private String method; |
| | | |
| | | |
| | | @ApiModelProperty("åéä»¶") |
| | | private String beforeUrl; |
| | | |
| | | @ApiModelProperty("修订åéä»¶") |
| | | private String afterUrl; |
| | | |
| | | @TableField(select = false, exist = false) |
| | | private MultipartFile file; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½åºæä»¶ééè®°å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 01:27:22 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_record_cancel") |
| | | @ApiModel(value = "ManageRecordCancel对象", description = "ä½åºæä»¶ééè®°å½") |
| | | public class ManageRecordCancel extends OrderBy implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æä»¶ç¼å·") |
| | | @ValueTableShow(1) |
| | | private String documentCode; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | @ValueTableShow(2) |
| | | private String documentName; |
| | | |
| | | @ApiModelProperty("æ°é") |
| | | @ValueTableShow(3) |
| | | private Integer qty; |
| | | |
| | | @ApiModelProperty("鿝åå ") |
| | | @ValueTableShow(4) |
| | | private String reason; |
| | | |
| | | @ApiModelProperty("ç³è¯·äºº") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | @ValueTableShow(value = 5,name = "ç³è¯·äºº") |
| | | private String createUserName; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ç³è¯·æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ValueTableShow(6) |
| | | private LocalDate createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private Integer ratifyUser; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | @ValueTableShow(value = 7,name = "æ¹å人") |
| | | private String ratifyUserName; |
| | | |
| | | private String ratifyState; |
| | | |
| | | @ApiModelProperty("æ¹åæ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ValueTableShow(8) |
| | | private LocalDate ratifyTime; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ValueTableShow(9) |
| | | private String remark; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®¡æ¹è®°å½(å«ä¿®è®¢å忬¡å®¡æ¹è®°å½) |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:31:36 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_record_check") |
| | | @ApiModel(value = "ManageRecordCheck对象", description = "æä»¶å®¡æ¹è®°å½(å«ä¿®è®¢å忬¡å®¡æ¹è®°å½)") |
| | | public class ManageRecordCheck extends OrderBy implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | @ValueTableShow(1) |
| | | private String documentName; |
| | | |
| | | @ApiModelProperty("æä»¶ç¼å·") |
| | | @ValueTableShow(2) |
| | | private String documentCode; |
| | | |
| | | @ApiModelProperty("ç/次") |
| | | @ValueTableShow(3) |
| | | private String documentVersion; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | @ValueTableShow(value = 4,name = "ç¼å¶") |
| | | private Integer writeUser; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private String writeUserName; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äºº") |
| | | @ValueTableShow(value = 5,name = "å®¡æ ¸") |
| | | private Integer checkUser; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private String checkUserName; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æ") |
| | | private String checkState; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | @ValueTableShow(value = 6,name = "æ¹å") |
| | | private Integer ratifyUser; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private String ratifyUserName; |
| | | |
| | | @ApiModelProperty("æ¹åç¶æ") |
| | | private String ratifyState; |
| | | |
| | | @ApiModelProperty("æ¹åæ¥æ") |
| | | @ValueTableShow(7) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate ratifyDate; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ValueTableShow(8) |
| | | private String remark; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®æå®¡æ¥è®°å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 10:54:31 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_record_intervals") |
| | | @ApiModel(value = "ManageRecordIntervals对象", description = "æä»¶å®æå®¡æ¥è®°å½") |
| | | public class ManageRecordIntervals extends OrderBy implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | @ValueTableShow(1) |
| | | private String documentName; |
| | | |
| | | @ApiModelProperty("æä»¶ç¼å·") |
| | | @ValueTableShow(2) |
| | | private String documentCode; |
| | | |
| | | @ApiModelProperty("çæ¬å·") |
| | | @ValueTableShow(3) |
| | | private String documentVersion; |
| | | |
| | | @ApiModelProperty("修订å·") |
| | | @ValueTableShow(4) |
| | | private String revision; |
| | | |
| | | @ApiModelProperty("é宿§") |
| | | @ValueTableShow(5) |
| | | private String suitability; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ValueTableShow(6) |
| | | private String remark; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å¤é®å
³è,夿¥æä»¶ç¡®è®¤åå²è®°å½id") |
| | | private Integer recordIntervalsTotalId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®æå®¡æ¥è®°å½æ»åå²è®°å½è¡¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 01:12:11 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_record_intervals_total") |
| | | @ApiModel(value = "ManageRecordIntervalsTotal对象", description = "æä»¶å®æå®¡æ¥è®°å½æ»åå²è®°å½è¡¨") |
| | | public class ManageRecordIntervalsTotal extends OrderBy implements Serializable { |
| | | |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private Integer ratifyUser; |
| | | |
| | | @ValueTableShow(value = 5,name = "æ¹å人") |
| | | @TableField(select = false,exist = false) |
| | | private String ratifyUserName; |
| | | |
| | | @ApiModelProperty("æ¹åç»æ") |
| | | @ValueTableShow(7) |
| | | private String ratifyState; |
| | | |
| | | @ApiModelProperty("æ¹åæ¥æ") |
| | | @ValueTableShow(6) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate ratifyDate; |
| | | |
| | | @ApiModelProperty("æ¹å人ç¾å") |
| | | private String ratifyUrl; |
| | | |
| | | @ApiModelProperty("æå¶äºº") |
| | | private Integer submitUser; |
| | | |
| | | @ValueTableShow(value = 3,name = "æå¶äºº") |
| | | @TableField(select = false,exist = false) |
| | | private String submitUserName; |
| | | |
| | | @ApiModelProperty("æå¶äººç¾å") |
| | | private String submitUrl; |
| | | |
| | | @ApiModelProperty("æå¶æ¥æ") |
| | | @ValueTableShow(4) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate submitDate; |
| | | |
| | | @ApiModelProperty("年份") |
| | | @ValueTableShow(1) |
| | | private String year; |
| | | |
| | | @ApiModelProperty("æ»æ°é") |
| | | @ValueTableShow(2) |
| | | private Integer totalNum; |
| | | |
| | | @ApiModelProperty("çæç³è¯·è¡¨çè·¯å¾") |
| | | private String url; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * <p> |
| | | * æææä»¶(å
ãå¤é¨æä»¶)çåæ¾ä¸åæ¶è®°å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 09:11:05 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_record_issue_recycle") |
| | | @ApiModel(value = "ManageRecordIssueRecycle对象", description = "æææä»¶(å
ãå¤é¨æä»¶)çåæ¾ä¸åæ¶è®°å½") |
| | | public class ManageRecordIssueRecycle extends OrderBy implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æä»¶ç¼å·") |
| | | @ValueTableShow(1) |
| | | private String documentCode; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | @ValueTableShow(2) |
| | | private String documentName; |
| | | |
| | | @ApiModelProperty("çå·") |
| | | @ValueTableShow(3) |
| | | private String documentVersion; |
| | | |
| | | @ApiModelProperty("份æ°") |
| | | @ValueTableShow(4) |
| | | private String pages; |
| | | |
| | | @ApiModelProperty("æä»¶ç±»å«") |
| | | @ValueTableShow(5) |
| | | private String documentType; |
| | | |
| | | @ApiModelProperty("ååå·") |
| | | @ValueTableShow(6) |
| | | private String number; |
| | | |
| | | @ApiModelProperty("æ¥æ¶é¨é¨") |
| | | @ValueTableShow(7) |
| | | private String departLims; |
| | | |
| | | @ApiModelProperty("æ¥å人") |
| | | private Integer receiveUser; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | @ValueTableShow(value = 6,name = "æ¥å人") |
| | | private String receiveUserName; |
| | | |
| | | @ApiModelProperty("æ¥åæ¥æ") |
| | | @ValueTableShow(8) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate receiveDate; |
| | | |
| | | @ApiModelProperty("ç¾æ¶äºº") |
| | | private Integer signedUser; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | @ValueTableShow(value = 9,name = "ç¾æ¶äºº") |
| | | private String signedUserName; |
| | | |
| | | @ApiModelProperty("ç¾æ¶æ¥æ") |
| | | @ValueTableShow(10) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate signedDate; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥æä»¶ç¡®è®¤è®°å½æ»åå²è®°å½è¡¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 10:30:08 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_record_total") |
| | | @ApiModel(value = "ManageRecordTotal对象", description = "夿¥æä»¶ç¡®è®¤è®°å½æ»åå²è®°å½è¡¨") |
| | | public class ManageRecordTotal extends OrderBy implements Serializable { |
| | | |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private Integer ratifyUser; |
| | | |
| | | @ValueTableShow(value = 5,name = "æ¹å人") |
| | | @TableField(select = false,exist = false) |
| | | private String ratifyUserName; |
| | | |
| | | @ApiModelProperty("æ¹åç»æ") |
| | | @ValueTableShow(7) |
| | | private String ratifyState; |
| | | |
| | | @ApiModelProperty("æ¹åæ¥æ") |
| | | @ValueTableShow(6) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate ratifyDate; |
| | | |
| | | @ApiModelProperty("æ¹å人ç¾å") |
| | | private String ratifyUrl; |
| | | |
| | | @ApiModelProperty("æå¶äºº") |
| | | private Integer submitUser; |
| | | |
| | | @ValueTableShow(value = 3,name = "æå¶äºº") |
| | | @TableField(select = false,exist = false) |
| | | private String submitUserName; |
| | | |
| | | @ApiModelProperty("æå¶äººç¾å") |
| | | private String submitUrl; |
| | | |
| | | @ApiModelProperty("æå¶æ¥æ") |
| | | @ValueTableShow(4) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate submitDate; |
| | | |
| | | @ApiModelProperty("年份") |
| | | @ValueTableShow(1) |
| | | private String year; |
| | | |
| | | @ApiModelProperty("æ»æ°é") |
| | | @ValueTableShow(2) |
| | | private Integer totalNum; |
| | | |
| | | @ApiModelProperty("çæç³è¯·è¡¨çè·¯å¾") |
| | | private String url; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 java.time.LocalDate; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥æä»¶ç¡®è®¤è®°å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 10:29:44 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_record_verify") |
| | | @ApiModel(value = "ManageRecordVerify对象", description = "夿¥æä»¶ç¡®è®¤è®°å½") |
| | | public class ManageRecordVerify extends OrderBy implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("夿¥æä»¶åç§°") |
| | | @ValueTableShow(1) |
| | | private String documentName; |
| | | |
| | | @ApiModelProperty("æä»¶ç¼å·") |
| | | @ValueTableShow(2) |
| | | private String documentCode; |
| | | |
| | | @ApiModelProperty("æ åè§èåç§°") |
| | | @ValueTableShow(3) |
| | | private String standardName; |
| | | |
| | | @ApiModelProperty("æ åå·") |
| | | @ValueTableShow(4) |
| | | private String standardCode; |
| | | |
| | | @ApiModelProperty("çææ¥æ") |
| | | @ValueTableShow(5) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate effectiveDate; |
| | | |
| | | @ApiModelProperty("ä½åºæ¥æ") |
| | | @ValueTableShow(6) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate cancelDate; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ValueTableShow(7) |
| | | private String note; |
| | | |
| | | @ApiModelProperty("å¤é®å
³è,夿¥æä»¶ç¡®è®¤åå²è®°å½id") |
| | | private Integer manageRecordTotalId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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-11-09 03:05:42 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_review_program") |
| | | @ApiModel(value = "ManageReviewProgram对象", description = "") |
| | | public class ManageReviewProgram implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("è¯å®¡æ¶é´") |
| | | private LocalDateTime reviewTime; |
| | | |
| | | @ApiModelProperty("è¯å®¡å°ç¹") |
| | | private String judgingLocation; |
| | | |
| | | @ApiModelProperty("è¯å®¡ç®ç") |
| | | private String judgingPurpose; |
| | | |
| | | @ApiModelProperty("è¯å®¡æ¹å¼") |
| | | private String judgingMethod; |
| | | |
| | | @ApiModelProperty("åå 人å") |
| | | private String participants; |
| | | |
| | | @ApiModelProperty("è¯å®¡èå´") |
| | | private String judgingScope; |
| | | |
| | | @ApiModelProperty("è¯å®¡ä¾æ®") |
| | | private String judgingBasis; |
| | | |
| | | @ApiModelProperty("è¯å®¡ä¸»è¦å
容") |
| | | private String mainContext; |
| | | |
| | | @ApiModelProperty("åå¤å·¥ä½è¦æ±") |
| | | private String preparationRequirements; |
| | | |
| | | @ApiModelProperty("ç¼å¶") |
| | | private String editor; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¥æ") |
| | | private LocalDateTime editorDate; |
| | | |
| | | @ApiModelProperty("æ¹å") |
| | | private String approve; |
| | | |
| | | @ApiModelProperty("æ¹åæ¥æ") |
| | | private LocalDateTime approveDate; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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-11-09 04:15:47 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_review_program_file") |
| | | @ApiModel(value = "ManageReviewProgramFile对象", description = "") |
| | | public class ManageReviewProgramFile implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("计å表ID") |
| | | private Integer reviewId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | private String url; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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-11-12 04:44:39 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_review_report") |
| | | @ApiModel(value = "ManageReviewReport对象", description = "管çè¯å®¡æ¥å") |
| | | public class ManageReviewReport implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("ç®ç") |
| | | private String objective; |
| | | |
| | | @ApiModelProperty("å°ç¹") |
| | | private String place; |
| | | |
| | | @ApiModelProperty("主æäºº") |
| | | private String compere; |
| | | |
| | | @ApiModelProperty("è®°å½äºº") |
| | | private String recordPeople; |
| | | |
| | | @ApiModelProperty("æ¥æ") |
| | | private LocalDateTime date; |
| | | |
| | | @ApiModelProperty("页次") |
| | | private Integer page; |
| | | |
| | | @ApiModelProperty("è¯å®¡æ¹å¼") |
| | | private String judgingMethod; |
| | | |
| | | @ApiModelProperty("è¯å®¡ä¾æ®") |
| | | private String reviewBasis; |
| | | |
| | | @ApiModelProperty("åºå¸äººå") |
| | | private String attendess; |
| | | |
| | | @ApiModelProperty("è¯å®¡è¾å
¥æ
åµ") |
| | | private String reviewInputs; |
| | | |
| | | @ApiModelProperty("è¯å®¡è¿ç¨æ¦åµ") |
| | | private String reviewProcess; |
| | | |
| | | @ApiModelProperty("主è¦è®®é¢æ¦è¿°") |
| | | private String mainTopic; |
| | | |
| | | @ApiModelProperty("äºé¡¹") |
| | | private String matters; |
| | | |
| | | @ApiModelProperty("è´è´£äºº") |
| | | private String head; |
| | | |
| | | @ApiModelProperty("å®ææ¥æ") |
| | | private LocalDateTime completionDate; |
| | | |
| | | @ApiModelProperty("è·è¸ªç¡®è®¤äºº") |
| | | private String trackingConfirmed; |
| | | |
| | | @ApiModelProperty("è·è¸ªæ
åµç¡®è®¤è®°å½") |
| | | private String follerUp; |
| | | |
| | | @ApiModelProperty("ä½ç³»è¯ä»·") |
| | | private String overallEvaluation; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸") |
| | | private String audit; |
| | | |
| | | @ApiModelProperty("æ¹å") |
| | | private String approval; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | 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-11-15 02:58:51 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_manage_risk_assessment_results") |
| | | @ApiModel(value = "ManageRiskAssessmentResults对象", description = "å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§è¡¨") |
| | | public class ManageRiskAssessmentResults implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ExcelIgnore |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å°ç¹/æ´»å¨") |
| | | @ExcelProperty(value = "å°ç¹/æ´»å¨", index = 0) |
| | | private String venue; |
| | | |
| | | @ApiModelProperty("å±é©å ç´ ") |
| | | @ExcelProperty(value = "å±é©å ç´ ", index = 1) |
| | | private String hazard; |
| | | |
| | | @ApiModelProperty("å¯è½å¯¼è´çäºæ
") |
| | | @ExcelProperty(value = "å¯è½å¯¼è´çäºæ
", index = 2) |
| | | private String accidents; |
| | | |
| | | @ApiModelProperty("对人å¯è½é æçå±å®³") |
| | | @ExcelProperty(value = "对人å¯è½é æçå±å®³", index = 3) |
| | | private String injury; |
| | | |
| | | @ApiModelProperty("é£é©è¯ä»·") |
| | | @ExcelProperty(value = {"é£é©è¯ä»·", "L"}) |
| | | private String riskL; |
| | | |
| | | @ApiModelProperty("é£é©è¯ä»·") |
| | | @ExcelProperty(value = {"é£é©è¯ä»·", "E"}) |
| | | private String riskE; |
| | | |
| | | @ApiModelProperty("é£é©è¯ä»·") |
| | | @ExcelProperty(value = {"é£é©è¯ä»·", "C"}) |
| | | private String riskC; |
| | | |
| | | @ApiModelProperty("é£é©è¯ä»·") |
| | | @ExcelProperty(value = {"é£é©è¯ä»·", "D"}) |
| | | private String riskD; |
| | | |
| | | @ApiModelProperty("é£é©ç级") |
| | | @ExcelProperty(value = "é£é©ç级", index = 8) |
| | | private String level; |
| | | |
| | | @ApiModelProperty("è¯ä»·ç»è®º") |
| | | @ExcelProperty(value = "è¯ä»·ç»è®º", index = 9) |
| | | private String conclusion; |
| | | |
| | | @ApiModelProperty("æ§å¶æªæ½") |
| | | @ExcelProperty(value = "æ§å¶æªæ½", index = 10) |
| | | private String measures; |
| | | |
| | | @ApiModelProperty("ç¼å¶id") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¥æ") |
| | | private LocalDateTime editorDate; |
| | | |
| | | @ApiModelProperty("审æ¹äººid") |
| | | private Integer approval; |
| | | |
| | | @ApiModelProperty("å®¡æ¹æ¥æ") |
| | | private LocalDateTime approvalDate; |
| | | |
| | | @ApiModelProperty("æ¹å人id") |
| | | private Integer approve; |
| | | |
| | | @ApiModelProperty("æ¹åæ¥æ") |
| | | private LocalDateTime approveDate; |
| | | |
| | | @ApiModelProperty("æ¹åç¶æ1ï¼éè¿ï¼2ï¼ä¸éè¿") |
| | | private Integer approveStatus; |
| | | |
| | | @ApiModelProperty("审æ¹ç¶æ1ï¼éè¿ï¼2ï¼ä¸éè¿") |
| | | private Integer approvalStatus; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.schedule; |
| | | |
| | | import com.yuanchu.mom.mapper.ManageRecordIntervalsTotalMapper; |
| | | import com.yuanchu.mom.pojo.ManageRecordIntervalsTotal; |
| | | import com.yuanchu.mom.pojo.ManageRecordTotal; |
| | | import com.yuanchu.mom.service.ManageRecordIntervalsTotalService; |
| | | import com.yuanchu.mom.service.ManageRecordTotalService; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | |
| | | @Component |
| | | public class ManageRecordTotalSchedule { |
| | | |
| | | @Resource |
| | | private ManageRecordTotalService manageRecordTotalService; |
| | | |
| | | @Resource |
| | | private ManageRecordIntervalsTotalService manageRecordIntervalsTotalService; |
| | | |
| | | @Scheduled(cron = "0 0 2 1 1 ?") //æ¯å¹´1æ1å·2ç¹ |
| | | public void manageRecordTotal() { |
| | | ManageRecordTotal manageRecordTotal = new ManageRecordTotal(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy"); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | String formattedDate = sdf.format(calendar.getTime()); |
| | | manageRecordTotal.setYear(formattedDate); |
| | | manageRecordTotalService.save(manageRecordTotal); |
| | | |
| | | ManageRecordIntervalsTotal manageRecordIntervalsTotal = new ManageRecordIntervalsTotal(); |
| | | manageRecordIntervalsTotal.setYear(formattedDate); |
| | | manageRecordIntervalsTotalService.save(manageRecordIntervalsTotal); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.ClientSatisfaction; |
| | | import com.yuanchu.mom.pojo.ClientSatisfactionAnalyseFile; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-09 |
| | | */ |
| | | public interface ClientSatisfactionService extends IService<ClientSatisfaction> { |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥å表 |
| | | * @param page |
| | | * @param clientSatisfaction |
| | | * @return |
| | | */ |
| | | IPage<ClientSatisfaction> pageClientSatisfaction(Page page, ClientSatisfaction clientSatisfaction); |
| | | |
| | | /** |
| | | * æ°å¢å®¢æ·åæéä»¶ |
| | | * @param file |
| | | * @return |
| | | */ |
| | | boolean uploadAnalyseFile(MultipartFile file); |
| | | |
| | | /** |
| | | * æ¥è¯¢å®¢æ·åæéä»¶ |
| | | * @param page |
| | | * @param analyseFile |
| | | * @return |
| | | */ |
| | | IPage<ClientSatisfactionAnalyseFile> pageAnalyseFile(Page page, ClientSatisfactionAnalyseFile analyseFile); |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦å¯¼åº |
| | | * |
| | | * @param clientSatisfactionId |
| | | * @param response |
| | | */ |
| | | void exportWordClientSatisfaction(Integer clientSatisfactionId, HttpServletResponse response); |
| | | |
| | | /** |
| | | * ç¡®è®¤å®¢æ·æ»¡æåº¦ |
| | | * |
| | | * @param clientSatisfaction è¦ä¿®æ¹å®¢æ·æ»¡æåº¦çç¶æå¯¹è±¡ |
| | | * @param userId ä¿®æ¹äººid |
| | | */ |
| | | void confirmClientSatisfaction(ClientSatisfaction clientSatisfaction, Integer userId); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.InternalCheckDetail; |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥è¯¦æ
表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | public interface InternalCheckDetailService extends IService<InternalCheckDetail> { |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.InternalCheckDto; |
| | | import com.yuanchu.mom.pojo.InternalCheck; |
| | | import com.yuanchu.mom.pojo.InternalCheck; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | public interface InternalCheckService extends IService<InternalCheck> { |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥å页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalCheck |
| | | * @return |
| | | */ |
| | | IPage<InternalCheckDto> pageInternalCheck(Page page, InternalCheck internalCheck); |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥æ°å¢ |
| | | * @param internalCheck |
| | | * @return |
| | | */ |
| | | boolean addInternalCheck(InternalCheckDto internalCheck); |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥ä¿®æ¹ |
| | | * @param internalCheck |
| | | * @return |
| | | */ |
| | | boolean updateInternalCheck(InternalCheckDto internalCheck); |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥å é¤ |
| | | * @param checkId |
| | | * @return |
| | | */ |
| | | boolean delInternalCheck(Integer checkId); |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥æ¥ç详æ
|
| | | * @param checkId |
| | | * @return |
| | | */ |
| | | InternalCheckDto getInternalCheckOne(Integer checkId); |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥æ¹å |
| | | * @param internalCheck |
| | | * @return |
| | | */ |
| | | boolean ratifyInternalCheck(InternalCheckDto internalCheck); |
| | | |
| | | /** |
| | | * 导åºå
å®¡æ£æ¥ |
| | | * @param checkId |
| | | * @param response |
| | | */ |
| | | void exportInternalCheck(Integer checkId, HttpServletResponse response); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.yuanchu.mom.pojo.InternalCorrectFile; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审管ççº æ£æªæ½é件表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 04:00:38 |
| | | */ |
| | | public interface InternalCorrectFileService extends IService<InternalCorrectFile> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.InternalCorrect; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.InternalCorrectFile; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审管ççº æ£å¤ç表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 04:00:15 |
| | | */ |
| | | public interface InternalCorrectService extends IService<InternalCorrect> { |
| | | |
| | | /** |
| | | * æ°å¢å
审管ççº æ£å¤çä¿¡æ¯ |
| | | * @param InternalAccording |
| | | * @return |
| | | */ |
| | | boolean addInternalCorrect(InternalCorrect InternalAccording); |
| | | |
| | | /** |
| | | * æ¥è¯¢å
审管ççº æ£å¤ç |
| | | * @param correctId |
| | | * @return |
| | | */ |
| | | InternalCorrect getInternalCorrect(Integer correctId); |
| | | |
| | | /** |
| | | * æ¥è¯¢å
审管ççº æ£æªæ½å表 |
| | | * @param page |
| | | * @param detailsCorrect |
| | | * @return |
| | | */ |
| | | IPage<InternalCorrect> pageInternalCorrect(Page page, InternalCorrect detailsCorrect); |
| | | |
| | | /** |
| | | * æ°å¢å
审管ççº æ£æªæ½éä»¶ |
| | | * @param correctId |
| | | * @param file |
| | | * @return |
| | | */ |
| | | boolean uploadInternalCorrectFile(Integer correctId, MultipartFile file); |
| | | |
| | | /** |
| | | * æ¥è¯¢å
审管ççº æ£æªæ½éä»¶ |
| | | * @param correctId |
| | | * @return |
| | | */ |
| | | List<InternalCorrectFile> getInternalCorrectFileList(Integer correctId); |
| | | |
| | | /** |
| | | * 导åºçº æ£æªæ½ |
| | | * @param correctId |
| | | * @param response |
| | | */ |
| | | void exportInternalCorrect(Integer correctId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.InternalImplementDetail; |
| | | |
| | | /** |
| | | * å
审宿½è®¡å详æ
|
| | | * |
| | | * @author makejava |
| | | * @since 2024-11-11 |
| | | */ |
| | | public interface InternalImplementDetailService extends IService<InternalImplementDetail> { |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.InternalImplementDto; |
| | | import com.yuanchu.mom.pojo.ClientSatisfaction; |
| | | import com.yuanchu.mom.pojo.InternalImplement; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * å
审宿½è®¡å |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | public interface InternalImplementService extends IService<InternalImplement> { |
| | | |
| | | /** |
| | | * å
审宿½è®¡åå页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalImplement |
| | | * @return |
| | | */ |
| | | IPage<InternalImplementDto> pageInternalImplement(Page page, InternalImplement internalImplement); |
| | | |
| | | /** |
| | | * å
审宿½è®¡åæ°å¢ |
| | | * @param internalImplement |
| | | * @return |
| | | */ |
| | | boolean addInternalImplement(InternalImplementDto internalImplement); |
| | | |
| | | /** |
| | | * å
审宿½è®¡åä¿®æ¹ |
| | | * @param internalImplement |
| | | * @return |
| | | */ |
| | | boolean updateInternalImplement(InternalImplementDto internalImplement); |
| | | |
| | | /** |
| | | * å
审宿½è®¡åå é¤ |
| | | * @param implementId |
| | | * @return |
| | | */ |
| | | boolean delInternalImplement(Integer implementId); |
| | | |
| | | /** |
| | | * å
审宿½è®¡åæ¥ç详æ
|
| | | * @param implementId |
| | | * @return |
| | | */ |
| | | InternalImplementDto getInternalImplementOne(Integer implementId); |
| | | |
| | | /** |
| | | * å
审宿½è®¡åæ¹å |
| | | * @param internalImplement |
| | | * @return |
| | | */ |
| | | boolean ratifyInternalImplement(InternalImplementDto internalImplement); |
| | | |
| | | /** |
| | | * 导åºå
审宿½è®¡å |
| | | * @param implementId |
| | | * @param response |
| | | */ |
| | | void exportInternalImplement(Integer implementId, HttpServletResponse response); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.yuanchu.mom.pojo.InternalMeetingDetail; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审ä¼è®®è¯¦æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:56:13 |
| | | */ |
| | | public interface InternalMeetingDetailService extends IService<InternalMeetingDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.InternalMeetingDto; |
| | | import com.yuanchu.mom.pojo.InternalMeeting; |
| | | import com.yuanchu.mom.pojo.InternalMeeting; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审ä¼è®®è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:50:44 |
| | | */ |
| | | public interface InternalMeetingService extends IService<InternalMeeting> { |
| | | |
| | | /** |
| | | * å
审ä¼è®®å页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalMeeting |
| | | * @return |
| | | */ |
| | | IPage<InternalMeetingDto> pageInternalMeeting(Page page, InternalMeeting internalMeeting); |
| | | |
| | | /** |
| | | * å
审ä¼è®®æ°å¢ |
| | | * @param internalMeeting |
| | | * @return |
| | | */ |
| | | boolean addInternalMeeting(InternalMeetingDto internalMeeting); |
| | | |
| | | /** |
| | | * å
审ä¼è®®ä¿®æ¹ |
| | | * @param internalMeeting |
| | | * @return |
| | | */ |
| | | boolean updateInternalMeeting(InternalMeetingDto internalMeeting); |
| | | |
| | | /** |
| | | * å
审ä¼è®®å é¤ |
| | | * @param meetingId |
| | | * @return |
| | | */ |
| | | boolean delInternalMeeting(Integer meetingId); |
| | | |
| | | /** |
| | | * å
审ä¼è®®æ¥ç详æ
|
| | | * @param meetingId |
| | | * @return |
| | | */ |
| | | InternalMeetingDto getInternalMeetingOne(Integer meetingId); |
| | | |
| | | /** |
| | | * 导åºå
审ä¼è®® |
| | | * @param meetingId |
| | | * @param response |
| | | */ |
| | | void exportInternalMeeting(Integer meetingId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.yuanchu.mom.pojo.InternalPlanDetail; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审年度计å详æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:28:48 |
| | | */ |
| | | public interface InternalPlanDetailService extends IService<InternalPlanDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.InternalPlanDto; |
| | | import com.yuanchu.mom.pojo.InternalPlan; |
| | | import com.yuanchu.mom.pojo.InternalPlan; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
å®¡å¹´åº¦è®¡å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:27:47 |
| | | */ |
| | | public interface InternalPlanService extends IService<InternalPlan> { |
| | | |
| | | /** |
| | | * å
审年度计åå页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalPlan |
| | | * @return |
| | | */ |
| | | IPage<InternalPlanDto> pageInternalPlan(Page page, InternalPlan internalPlan); |
| | | |
| | | /** |
| | | * å
å®¡å¹´åº¦è®¡åæ°å¢ |
| | | * @param internalPlan |
| | | * @return |
| | | */ |
| | | boolean addInternalPlan(InternalPlanDto internalPlan); |
| | | |
| | | /** |
| | | * å
审年度计åä¿®æ¹ |
| | | * @param internalPlan |
| | | * @return |
| | | */ |
| | | boolean updateInternalPlan(InternalPlanDto internalPlan); |
| | | |
| | | /** |
| | | * å
审年度计åå é¤ |
| | | * @param planId |
| | | * @return |
| | | */ |
| | | boolean delInternalPlan(Integer planId); |
| | | |
| | | /** |
| | | * å
å®¡å¹´åº¦è®¡åæ¥ç详æ
|
| | | * @param planId |
| | | * @return |
| | | */ |
| | | InternalPlanDto getInternalPlanOne(Integer planId); |
| | | |
| | | /** |
| | | * å
审年度计åå®¡æ ¸ |
| | | * @param internalPlanDto |
| | | * @return |
| | | */ |
| | | boolean examineInternalPlan(InternalPlanDto internalPlanDto); |
| | | |
| | | /** |
| | | * å
å®¡å¹´åº¦è®¡åæ¹å |
| | | * @param internalPlanDto |
| | | * @return |
| | | */ |
| | | boolean ratifyInternalPlan(InternalPlanDto internalPlanDto); |
| | | |
| | | /** |
| | | * 导åºå
审年度计å |
| | | * @param planId |
| | | * @param response |
| | | */ |
| | | void exportInternalImplement(Integer planId, 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.InternalReport; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * å
审æ¥å表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | public interface InternalReportService extends IService<InternalReport> { |
| | | |
| | | /** |
| | | * å
审æ¥åå页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalReport |
| | | * @return |
| | | */ |
| | | IPage<InternalReport> pageInternalReport(Page page, InternalReport internalReport); |
| | | |
| | | /** |
| | | * å
审æ¥åå®¡æ ¸ |
| | | * @param internalReport |
| | | * @return |
| | | */ |
| | | boolean ratifyInternalCheck(InternalReport internalReport); |
| | | |
| | | /** |
| | | * è´¨éé¨ç»çå¡«å |
| | | * @param internalReport |
| | | * @return |
| | | */ |
| | | boolean qualityInternalReport(InternalReport internalReport); |
| | | |
| | | /** |
| | | * 导åºå
审æ¥å |
| | | * @param reportId |
| | | * @param response |
| | | */ |
| | | void exportInternalReport(Integer reportId, 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.pojo.ManageControlPlanList; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.vo.ManageControlPlanListVo; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:58:30 |
| | | */ |
| | | public interface ManageControlPlanListService extends IService<ManageControlPlanList> { |
| | | |
| | | IPage<ManageControlPlanListVo> getPageList(Page page); |
| | | |
| | | void exportPersonTraining(HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageDocumentAlter; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ´ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 11:04:01 |
| | | */ |
| | | public interface ManageDocumentAlterService extends IService<ManageDocumentAlter> { |
| | | |
| | | Map<String,Object> pageManageDocumentAlter(Page page, ManageDocumentAlter manageDocumentAlter); |
| | | |
| | | ManageDocumentAlter getManageDocumentAlter(Integer id); |
| | | |
| | | int addManageDocumentAlter(ManageDocumentAlter manageDocumentAlter); |
| | | |
| | | int doManageDocumentAlter(ManageDocumentAlter manageDocumentAlter); |
| | | |
| | | int checkManageDocumentAlter(ManageDocumentAlter manageDocumentAlter); |
| | | |
| | | void checkManageDocumentAlterPdf(Long id, HttpServletResponse response) throws Exception; |
| | | |
| | | void exportManageDocumentAlter(ManageDocumentAlter manageDocumentAlter, HttpServletResponse response) throws Exception; |
| | | |
| | | int delManageDocumentAlter(Integer id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageDocumentCancel; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶ä½åº æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 02:37:35 |
| | | */ |
| | | public interface ManageDocumentCancelService extends IService<ManageDocumentCancel> { |
| | | |
| | | Map<String,Object> pageManageDocumentCancel(Page page, ManageDocumentCancel manageDocumentCancel); |
| | | |
| | | int addManageDocumentCancel(ManageDocumentCancel manageDocumentCancel); |
| | | |
| | | int checkManageDocumentCancel(Integer id, String state); |
| | | |
| | | ManageDocumentCancel getManageDocumentCancel(Integer id); |
| | | |
| | | void exportManageDocumentCancel(ManageDocumentCancel manageDocumentCancel, HttpServletResponse response) throws Exception; |
| | | |
| | | int delManageDocumentCancel(Integer id); |
| | | |
| | | int doManageDocumentCancel(ManageDocumentCancel manageDocumentCancel); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageDocumentControlled; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springframework.core.io.Resource; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ§ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-08 02:54:44 |
| | | */ |
| | | public interface ManageDocumentControlledService extends IService<ManageDocumentControlled> { |
| | | |
| | | Map<String,Object> pageManageDocumentControlled(Page page, ManageDocumentControlled manageDocumentControlled); |
| | | |
| | | int addManageDocumentControlled(ManageDocumentControlled manageDocumentControlled); |
| | | |
| | | int delManageDocumentControlled(Long id); |
| | | |
| | | ManageDocumentControlled getManageDocumentControlled(Long id); |
| | | |
| | | int doManageDocumentControlled(ManageDocumentControlled manageDocumentControlled); |
| | | |
| | | int checkManageDocumentControlled(ManageDocumentControlled manageDocumentControlled); |
| | | |
| | | void checkManageDocumentControlledPdf(Long id, HttpServletResponse response) throws Exception ; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.ManageDocumentIssueRecycleDto; |
| | | import com.yuanchu.mom.pojo.ManageDocumentIssueRecycle; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ¾åæ¶ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 09:18:24 |
| | | */ |
| | | public interface ManageDocumentIssueRecycleService extends IService<ManageDocumentIssueRecycle> { |
| | | |
| | | Map<String,Object> pageManageDocumentIssueRecycle(Page page, ManageDocumentIssueRecycleDto manageDocumentIssueRecycleDto); |
| | | |
| | | ManageDocumentIssueRecycleDto getManageDocumentIssueRecycle(Long id); |
| | | |
| | | void exportManageDocumentIssueRecycle(ManageDocumentIssueRecycleDto manageDocumentIssueRecycleDto, HttpServletResponse response) throws Exception; |
| | | |
| | | int checkManageDocumentIssueRecycle(Integer id, String documentState); |
| | | |
| | | int addManageDocumentIssueRecycle(ManageDocumentIssueRecycle manageDocumentIssueRecycle); |
| | | |
| | | int doManageDocumentIssueRecycle(ManageDocumentIssueRecycle manageDocumentIssueRecycle); |
| | | |
| | | int delManageDocumentIssueRecycle(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageDocumentList; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶æ¸
å |
| | | æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-08 11:08:11 |
| | | */ |
| | | public interface ManageDocumentListService extends IService<ManageDocumentList> { |
| | | |
| | | Map<String,Object> pageManageDocumentList(Page page, ManageDocumentList manageDocumentList); |
| | | |
| | | int uploadFile(Integer id, MultipartFile file); |
| | | |
| | | void importExcel(List<ManageDocumentList> list); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.yuanchu.mom.pojo.ManageMeetingParticipants; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.vo.MeetingParticipantsDetailsVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 09:34:27 |
| | | */ |
| | | public interface ManageMeetingParticipantsService extends IService<ManageMeetingParticipants> { |
| | | |
| | | |
| | | |
| | | MeetingParticipantsDetailsVo getParticipants(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.ManageMeetingDto; |
| | | import com.yuanchu.mom.pojo.ManageMeeting; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 09:33:47 |
| | | */ |
| | | public interface ManageMeetingService extends IService<ManageMeeting> { |
| | | |
| | | IPage<ManageMeetingDto> page(Page page, String startTime, String endTime, String place); |
| | | |
| | | void addMeeting(ManageMeetingDto dto); |
| | | |
| | | int modifyMeeting(ManageMeetingDto manageMeetingDto); |
| | | |
| | | void exportMeeting(Integer id, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordAudit; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 10:29:18 |
| | | */ |
| | | public interface ManageRecordAuditService extends IService<ManageRecordAudit> { |
| | | |
| | | Map<String,Object> pageManageRecordAudit(Page page, ManageRecordAudit manageRecordAudit); |
| | | |
| | | int addManageRecordAudit(ManageRecordAudit manageRecordAudit); |
| | | |
| | | int doManageRecordAudit(ManageRecordAudit manageRecordAudit); |
| | | |
| | | int ratifyManageRecordAudit(Integer id); |
| | | |
| | | String exportOutManageRecordAudit(ManageRecordAudit manageRecordAudit, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordCancel; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½åºæä»¶ééè®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 01:27:22 |
| | | */ |
| | | public interface ManageRecordCancelService extends IService<ManageRecordCancel> { |
| | | |
| | | Map<String,Object> pageManageRecordCancel(Page page, ManageRecordCancel manageRecordCancel); |
| | | |
| | | int ratifyManageRecordCancel(Integer id, String ratifyState); |
| | | |
| | | String exportOutManageRecordCancel(ManageRecordCancel manageRecordCancel, HttpServletResponse response); |
| | | |
| | | int exportInManageRecordCancel(MultipartFile file); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordCheck; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®¡æ¹è®°å½(å«ä¿®è®¢å忬¡å®¡æ¹è®°å½) æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:31:36 |
| | | */ |
| | | public interface ManageRecordCheckService extends IService<ManageRecordCheck> { |
| | | |
| | | Map<String,Object> pageManageRecordCheck(Page page, ManageRecordCheck manageRecordCheck); |
| | | |
| | | int checkManageRecordCheck(Integer id, String checkState); |
| | | |
| | | int ratifyManageRecordCheck(Integer id, String ratifyState); |
| | | |
| | | String exportOutManageRecordCheck(ManageRecordCheck manageRecordCheck, HttpServletResponse response); |
| | | |
| | | int exportInManageRecordCheck(MultipartFile file); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordIntervals; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®æå®¡æ¥è®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 10:54:31 |
| | | */ |
| | | public interface ManageRecordIntervalsService extends IService<ManageRecordIntervals> { |
| | | |
| | | Map<String,Object> pageManageRecordIntervals(Page page, ManageRecordIntervals manageRecordIntervals); |
| | | |
| | | String exportOutManageRecordIntervals(ManageRecordIntervals manageRecordIntervals, HttpServletResponse response); |
| | | |
| | | int exportInManageRecordIntervals(MultipartFile file); |
| | | |
| | | int addManageRecordIntervals(ManageRecordIntervals manageRecordIntervals); |
| | | |
| | | int delManageRecordIntervals(Integer id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordIntervalsTotal; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®æå®¡æ¥è®°å½æ»åå²è®°å½è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 01:12:11 |
| | | */ |
| | | public interface ManageRecordIntervalsTotalService extends IService<ManageRecordIntervalsTotal> { |
| | | |
| | | Map<String,Object> pageManageRecordIntervalsTotal(Page page, ManageRecordIntervalsTotal manageRecordIntervalsTotal); |
| | | |
| | | int submitManageRecordIntervalsTotal(Integer id); |
| | | |
| | | int ratifyManageRecordIntervalsTotal(Integer id, String ratifyState); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordIssueRecycle; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æææä»¶(å
ãå¤é¨æä»¶)çåæ¾ä¸åæ¶è®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 09:11:05 |
| | | */ |
| | | public interface ManageRecordIssueRecycleService extends IService<ManageRecordIssueRecycle> { |
| | | |
| | | Map<String,Object> pageManageRecordIssueRecycle(Page page, ManageRecordIssueRecycle manageRecordIssueRecycle); |
| | | |
| | | String exportOutManageRecordIssueRecycle(ManageRecordIssueRecycle manageRecordIssueRecycle, HttpServletResponse response); |
| | | |
| | | int exportInManageRecordIssueRecycle(MultipartFile file); |
| | | |
| | | int addManageRecordIssueRecycle(ManageRecordIssueRecycle manageRecordIssueRecycle); |
| | | |
| | | int doManageRecordIssueRecycle(ManageRecordIssueRecycle manageRecordIssueRecycle); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordTotal; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥æä»¶ç¡®è®¤è®°å½æ»åå²è®°å½è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 10:30:08 |
| | | */ |
| | | public interface ManageRecordTotalService extends IService<ManageRecordTotal> { |
| | | |
| | | Map<String,Object> pageManageRecordTotal(Page page, ManageRecordTotal manageRecordTotal); |
| | | |
| | | int submitManageRecordTotal(Integer id); |
| | | |
| | | int ratifyManageRecordTotal(Integer id, String ratifyState); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageRecordVerify; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥æä»¶ç¡®è®¤è®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 10:29:44 |
| | | */ |
| | | public interface ManageRecordVerifyService extends IService<ManageRecordVerify> { |
| | | |
| | | Map<String,Object> pageManageRecordVerify(Page page, ManageRecordVerify manageRecordVerify); |
| | | |
| | | int addManageRecordVerify(ManageRecordVerify manageRecordVerify); |
| | | |
| | | int delManageRecordVerify(Integer id); |
| | | |
| | | int exportManageRecordVerify(MultipartFile file); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.yuanchu.mom.pojo.ManageReviewProgramFile; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.vo.ReviewProgramDetailsVo; |
| | | import org.springframework.web.bind.annotation.RequestPart; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 04:15:47 |
| | | */ |
| | | public interface ManageReviewProgramFileService extends IService<ManageReviewProgramFile> { |
| | | |
| | | ReviewProgramDetailsVo selectFile(Integer id); |
| | | |
| | | |
| | | void addFile(MultipartFile file,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.pojo.ManageDocumentControlled; |
| | | import com.yuanchu.mom.pojo.ManageReviewProgram; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 03:05:42 |
| | | */ |
| | | public interface ManageReviewProgramService extends IService<ManageReviewProgram> { |
| | | |
| | | IPage<ManageReviewProgram> page(Page page,String startTime,String endTime, String judgingLocation); |
| | | |
| | | void exportReviewProgram(Integer id, HttpServletResponse response); |
| | | |
| | | int addReviewProgram(ManageReviewProgram manageReviewProgram); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.ManageMeeting; |
| | | import com.yuanchu.mom.pojo.ManageReviewReport; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 管çè¯å®¡æ¥å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 04:44:39 |
| | | */ |
| | | public interface ManageReviewReportService extends IService<ManageReviewReport> { |
| | | |
| | | |
| | | IPage<ManageReviewReport> page(Page page, String startTime, String endTime, String place); |
| | | |
| | | void exportReviewReport(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.pojo.ManageRiskAssessmentResults; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.vo.ManageRiskAssessmentResultsVo; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:58:51 |
| | | */ |
| | | public interface ManageRiskAssessmentResultsService extends IService<ManageRiskAssessmentResults> { |
| | | |
| | | IPage<ManageRiskAssessmentResultsVo> getPageResults(Page page); |
| | | |
| | | void exportPersonTraining(HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.yuanchu.mom.dto.ClientSatisfactionDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.ClientSatisfactionAnalyseFileMapper; |
| | | import com.yuanchu.mom.mapper.ClientSatisfactionMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ClientSatisfaction; |
| | | import com.yuanchu.mom.pojo.ClientSatisfactionAnalyseFile; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ClientSatisfactionService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | 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; |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-09 |
| | | */ |
| | | @Service |
| | | public class ClientSatisfactionServiceImpl extends ServiceImpl<ClientSatisfactionMapper, ClientSatisfaction> implements ClientSatisfactionService { |
| | | |
| | | @Resource |
| | | private ClientSatisfactionAnalyseFileMapper clientSatisfactionAnalyseFileMapper; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥å表 |
| | | * |
| | | * @param page |
| | | * @param clientSatisfaction |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<ClientSatisfaction> pageClientSatisfaction(Page page, ClientSatisfaction clientSatisfaction) { |
| | | return baseMapper.pageClientSatisfaction(page, QueryWrappers.queryWrappers(clientSatisfaction)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å®¢æ·åæéä»¶ |
| | | * |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean uploadAnalyseFile(MultipartFile file) { |
| | | |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | String filename = file.getOriginalFilename(); |
| | | String contentType = file.getContentType(); |
| | | ClientSatisfactionAnalyseFile analyseFile = new ClientSatisfactionAnalyseFile(); |
| | | analyseFile.setFileName(filename); |
| | | if (contentType != null && contentType.startsWith("image/")) { |
| | | // æ¯å¾ç |
| | | path = imgUrl; |
| | | analyseFile.setType(1); |
| | | } else { |
| | | // æ¯æä»¶ |
| | | path = wordUrl; |
| | | analyseFile.setType(2); |
| | | } |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | analyseFile.setFileUrl(pathName); |
| | | clientSatisfactionAnalyseFileMapper.insert(analyseFile); |
| | | return true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new ErrorException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å®¢æ·åæéä»¶ |
| | | * |
| | | * @param page |
| | | * @param analyseFile |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<ClientSatisfactionAnalyseFile> pageAnalyseFile(Page page, ClientSatisfactionAnalyseFile analyseFile) { |
| | | return clientSatisfactionAnalyseFileMapper.pageAnalyseFile(page, QueryWrappers.queryWrappers(analyseFile)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦å¯¼åº |
| | | * |
| | | * @param clientSatisfactionId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportWordClientSatisfaction(Integer clientSatisfactionId, HttpServletResponse response) { |
| | | // æ¥è¯¢å®¢æ·æ»¡æåº¦è°æ¥ |
| | | ClientSatisfactionDto clientSatisfaction = baseMapper.exportWordClientSatisfaction(clientSatisfactionId); |
| | | if (clientSatisfaction == null) { |
| | | throw new RuntimeException("å®¢æ·æ»¡æåº¦è°æ¥ä¸åå¨"); |
| | | } |
| | | |
| | | // æ¥è¯¢ç¡®è®¤äººçç¾å |
| | | String confirmPersonUrl = null; |
| | | // ç¶æä¸ºç¡®è®¤ä¸ç¡®è®¤äººä¸ä¸ºç©º |
| | | if (clientSatisfaction.getConfirmStatus() != null && clientSatisfaction.getConfirmStatus() != 0 && clientSatisfaction.getConfirmPersonId() != null) { |
| | | confirmPersonUrl = userMapper.selectById(clientSatisfaction.getConfirmPersonId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(confirmPersonUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°éªè¯äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/customer-satisfaction-questionnaire.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | String finalConfirmPersonUrl = confirmPersonUrl; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("clientSatisfaction", clientSatisfaction); |
| | | put("finalConfirmPersonUrl", StringUtils.isNotBlank(finalConfirmPersonUrl) ? Pictures.ofLocal(imgUrl + "/" + finalConfirmPersonUrl).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 clientSatisfaction è¦ä¿®æ¹å®¢æ·æ»¡æåº¦çç¶æå¯¹è±¡ |
| | | * @param userId ä¿®æ¹äººid |
| | | */ |
| | | @Override |
| | | public void confirmClientSatisfaction(ClientSatisfaction clientSatisfaction, Integer userId) { |
| | | User user = userMapper.selectById(userId); |
| | | if (user != null) { |
| | | clientSatisfaction.setConfirmPerson(user.getName()); |
| | | clientSatisfaction.setConfirmPersonId(user.getId()); |
| | | } |
| | | clientSatisfaction.setConfirmStatus(1); |
| | | baseMapper.updateById(clientSatisfaction); |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.InternalCheckDetailMapper; |
| | | import com.yuanchu.mom.pojo.InternalCheckDetail; |
| | | import com.yuanchu.mom.service.InternalCheckDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥è¯¦æ
表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Service |
| | | public class InternalCheckDetailServiceImpl extends ServiceImpl<InternalCheckDetailMapper, InternalCheckDetail> implements InternalCheckDetailService { |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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.InternalCheckDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.InternalCheckMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.pojo.InternalCheck; |
| | | import com.yuanchu.mom.service.InternalCheckService; |
| | | import com.yuanchu.mom.service.InternalCheckDetailService; |
| | | import com.yuanchu.mom.util.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.DateImageUtil; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class InternalCheckServiceImpl extends ServiceImpl<InternalCheckMapper, InternalCheck> implements InternalCheckService { |
| | | |
| | | @Resource |
| | | private InternalCheckDetailService internalCheckDetailService; |
| | | @Resource |
| | | private GetLook getLook; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥å页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalCheck |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InternalCheckDto> pageInternalCheck(Page page, InternalCheck internalCheck) { |
| | | return baseMapper.pageInternalCheck(page, QueryWrappers.queryWrappers(internalCheck)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥æ°å¢ |
| | | * @param internalCheck |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addInternalCheck(InternalCheckDto internalCheck) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | // æ·»å ç¼å¶äºº |
| | | User user = userMapper.selectById(userId); |
| | | internalCheck.setWriteTime(LocalDateTime.now()); |
| | | internalCheck.setWriteUserId(user.getId()); |
| | | internalCheck.setWriteUserName(user.getName()); |
| | | |
| | | baseMapper.insert(internalCheck); |
| | | // æ°å¢è¯¦æ
|
| | | for (InternalCheckDetail internalCheckDetail : internalCheck.getCheckDetailList()) { |
| | | internalCheckDetail.setCheckId(internalCheck.getCheckId()); |
| | | } |
| | | internalCheckDetailService.saveBatch(internalCheck.getCheckDetailList()); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥ä¿®æ¹ |
| | | * @param internalCheck |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateInternalCheck(InternalCheckDto internalCheck) { |
| | | baseMapper.updateById(internalCheck); |
| | | |
| | | // å é¤ä¹åç详æ
|
| | | internalCheckDetailService.remove(Wrappers.<InternalCheckDetail>lambdaQuery() |
| | | .eq(InternalCheckDetail::getCheckId, internalCheck.getCheckId())); |
| | | |
| | | // æ°å¢è¯¦æ
|
| | | for (InternalCheckDetail internalCheckDetail : internalCheck.getCheckDetailList()) { |
| | | internalCheckDetail.setCheckId(internalCheck.getCheckId()); |
| | | } |
| | | internalCheckDetailService.saveBatch(internalCheck.getCheckDetailList()); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥å é¤ |
| | | * @param CheckId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean delInternalCheck(Integer CheckId) { |
| | | internalCheckDetailService.remove(Wrappers.<InternalCheckDetail>lambdaQuery() |
| | | .eq(InternalCheckDetail::getCheckId, CheckId)); |
| | | baseMapper.deleteById(CheckId); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥æ¥ç详æ
|
| | | * @param CheckId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public InternalCheckDto getInternalCheckOne(Integer CheckId) { |
| | | InternalCheck internalCheck = baseMapper.selectById(CheckId); |
| | | InternalCheckDto internalCheckDto = new InternalCheckDto(); |
| | | BeanUtils.copyProperties(internalCheck, internalCheckDto); |
| | | |
| | | // æ¥è¯¢è¯¦ç»ä¿¡æ¯ |
| | | internalCheckDto.setCheckDetailList(internalCheckDetailService.list(Wrappers.<InternalCheckDetail>lambdaQuery() |
| | | .eq(InternalCheckDetail::getCheckId, CheckId))); |
| | | return internalCheckDto; |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥æ¹å |
| | | * @param internalCheck |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean ratifyInternalCheck(InternalCheckDto internalCheck) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | baseMapper.update(null, Wrappers.<InternalCheck>lambdaUpdate() |
| | | .eq(InternalCheck::getCheckId, internalCheck.getCheckId()) |
| | | .set(InternalCheck::getRatifyUserId, userId) |
| | | .set(InternalCheck::getRatifyUserName, user.getName()) |
| | | .set(InternalCheck::getRatifyRemark, internalCheck.getRatifyRemark()) |
| | | .set(InternalCheck::getRatifyStatus, internalCheck.getRatifyStatus()) |
| | | .set(InternalCheck::getRatifyTime, LocalDateTime.now()) |
| | | ); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
å®¡æ£æ¥ |
| | | * @param checkId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportInternalCheck(Integer checkId, HttpServletResponse response) { |
| | | InternalCheck internalCheck = baseMapper.selectById(checkId); |
| | | |
| | | //è·åæäº¤äººçç¾åå°å |
| | | String writeUrl = userMapper.selectById(internalCheck.getWriteUserId()).getSignatureUrl(); |
| | | if (ObjectUtils.isEmpty(writeUrl) || writeUrl.equals("")) { |
| | | throw new ErrorException("æ¾ä¸å°æ£éªäººçç¾å"); |
| | | } |
| | | |
| | | //è·åæ¹å人çç¾åå°å |
| | | String ratifyUrl = null; |
| | | if (internalCheck.getRatifyUserId() != null) { |
| | | ratifyUrl = userMapper.selectById(internalCheck.getRatifyUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(ratifyUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å¤æ ¸äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<InternalCheckDetail> internalCheckDetails = internalCheckDetailService.list(Wrappers.<InternalCheckDetail>lambdaQuery() |
| | | .eq(InternalCheckDetail::getCheckId, checkId)); |
| | | |
| | | int index = 1; |
| | | for (InternalCheckDetail detail : internalCheckDetails) { |
| | | detail.setIndex(index); |
| | | index++; |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/internal-check.docx"); |
| | | String finalRatifyUrl = ratifyUrl; |
| | | Configure configure = Configure.builder() |
| | | .bind("checkDetailList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("check", internalCheck); |
| | | put("checkDetailList", internalCheckDetails); |
| | | put("writeUrl", StringUtils.isNotBlank(writeUrl) ? Pictures.ofLocal(imgUrl + "/" + writeUrl).create() : null); |
| | | put("ratifyUrl", StringUtils.isNotBlank(finalRatifyUrl) ? Pictures.ofLocal(imgUrl + "/" + finalRatifyUrl).create() : null); |
| | | put("writeDateUrl", internalCheck.getWriteTime() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(internalCheck.getWriteTime())).create() : null); |
| | | put("ratifyDateUrl", internalCheck.getRatifyTime() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(internalCheck.getRatifyTime())).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.yuanchu.mom.pojo.InternalCorrectFile; |
| | | import com.yuanchu.mom.mapper.InternalCorrectFileMapper; |
| | | import com.yuanchu.mom.service.InternalCorrectFileService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审管ççº æ£æªæ½é件表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 04:00:38 |
| | | */ |
| | | @Service |
| | | public class InternalCorrectFileServiceImpl extends ServiceImpl<InternalCorrectFileMapper, InternalCorrectFile> implements InternalCorrectFileService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.InternalCorrectDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.InternalCorrectFileMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.InternalCorrect; |
| | | import com.yuanchu.mom.mapper.InternalCorrectMapper; |
| | | import com.yuanchu.mom.pojo.InternalCorrectFile; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.InternalCorrectService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审管ççº æ£å¤ç表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 04:00:15 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class InternalCorrectServiceImpl extends ServiceImpl<InternalCorrectMapper, InternalCorrect> implements InternalCorrectService { |
| | | |
| | | @Resource |
| | | private InternalCorrectFileMapper internalCorrectFileMapper; |
| | | @Resource |
| | | private GetLook getLook; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | |
| | | @Override |
| | | public boolean addInternalCorrect(InternalCorrect detailsCorrect) { |
| | | InternalCorrect correct = new InternalCorrect(); |
| | | // å½åç»å½ç¨æ·ä¿¡æ¯åé¨é¨ |
| | | User user = userMapper.selectById(getLook.selectPowerByMethodAndUserId(null).get("userId")); |
| | | String departmentLimsName = userMapper.selectUserDepartmentLimsName(user.getId()); |
| | | |
| | | switch (detailsCorrect.getFlowType()) { |
| | | // ä¸åæ ¼æåº |
| | | case 0: |
| | | correct.setRaiseResult(detailsCorrect.getRaiseResult());//ä¸åæ ¼è¡¨è¿° |
| | | correct.setVdeRaiseResult(detailsCorrect.getVdeRaiseResult());//vdeä¸å®¶åç° |
| | | correct.setRaiseDepartment(departmentLimsName);//æåºé¨é¨ |
| | | correct.setRaiseUserId(user.getId());//æåºäººid |
| | | correct.setRaiseUserName(user.getName());// æåºäºº |
| | | correct.setRaiseTime(LocalDate.now());// æåºæ¶é´ |
| | | |
| | | // åå åæäººä¿¡æ¯ |
| | | User causeUser = userMapper.selectById(detailsCorrect.getCauseUserId()); |
| | | String causeDepartmentLims = userMapper.selectUserDepartmentLimsName(causeUser.getId()); |
| | | |
| | | correct.setCauseDepartment(causeDepartmentLims);//åå åæè´£ä»»é¨é¨ |
| | | correct.setCauseUserId(causeUser.getId());//1åå åæäººid |
| | | correct.setCauseUserName(causeUser.getName());// 1åå åæäºº |
| | | baseMapper.insert(correct); |
| | | break; |
| | | |
| | | // åå åæ |
| | | case 1: |
| | | correct.setCorrectId(detailsCorrect.getCorrectId()); |
| | | correct.setCauseResult(detailsCorrect.getCauseResult());//åå åæ |
| | | correct.setCauseTime(LocalDate.now());// 1åå åææ¶é´ |
| | | |
| | | // çº æ£äººä¿¡æ¯ |
| | | User correctUser = userMapper.selectById(detailsCorrect.getCorrectUserId()); |
| | | String correctUserDepartmentLims = userMapper.selectUserDepartmentLimsName(correctUser.getId()); |
| | | |
| | | correct.setCorrectDepartment(correctUserDepartmentLims);//2çº æ£è´£ä»»é¨é¨ |
| | | correct.setCorrectUserId(correctUser.getId());//2çº æ£äººid |
| | | correct.setCorrectUserName(correctUser.getName());// 2çº æ£äºº |
| | | baseMapper.updateById(correct); |
| | | break; |
| | | |
| | | // çº æ£æªæ½ |
| | | case 2: |
| | | correct.setCorrectId(detailsCorrect.getCorrectId()); |
| | | correct.setCorrectResult(detailsCorrect.getCorrectResult());//2çº æ£æªæ½ |
| | | correct.setRaiseDepartmentAffirm(detailsCorrect.getRaiseDepartmentAffirm());//2æåºé¨é¨ç¡®è®¤ |
| | | correct.setCorrectTime(LocalDate.now());// 2çº æ£æ¶é´ |
| | | |
| | | // éªè¯äººä¿¡æ¯ |
| | | User validationUser = userMapper.selectById(detailsCorrect.getValidationUserId()); |
| | | String validationUserDepartmentLims = userMapper.selectUserDepartmentLimsName(validationUser.getId()); |
| | | |
| | | correct.setValidationDepartment(validationUserDepartmentLims);//3éªè¯é¨é¨ |
| | | correct.setValidationUserId(validationUser.getId());//3éªè¯äººid |
| | | correct.setValidationUserName(validationUser.getName());// 3éªè¯äºº |
| | | baseMapper.updateById(correct); |
| | | break; |
| | | |
| | | // éªè¯ç»æ |
| | | case 3: |
| | | correct.setCorrectId(detailsCorrect.getCorrectId()); |
| | | correct.setValidationResult(detailsCorrect.getValidationResult());//3éªè¯ç»æ |
| | | correct.setValidationTime(LocalDate.now());// 3éªè¯æ¶é´ |
| | | correct.setIsFinish(1); |
| | | baseMapper.updateById(correct); |
| | | break; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å
审管ççº æ£å¤ç |
| | | * @param correctId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public InternalCorrect getInternalCorrect(Integer correctId) { |
| | | InternalCorrect detailsCorrect; |
| | | |
| | | detailsCorrect = baseMapper.selectOne(Wrappers.<InternalCorrect>lambdaQuery() |
| | | .eq(InternalCorrect::getCorrectId, correctId)); |
| | | |
| | | if (detailsCorrect == null) { |
| | | detailsCorrect = new InternalCorrect(); |
| | | } |
| | | return detailsCorrect; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å
审管ççº æ£æªæ½å表 |
| | | * @param page |
| | | * @param detailsCorrect |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InternalCorrect> pageInternalCorrect(Page page, InternalCorrect detailsCorrect) { |
| | | return baseMapper.pageInternalAccording(page, QueryWrappers.queryWrappers(detailsCorrect)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å
审管ççº æ£æªæ½éä»¶ |
| | | * @param InternalCorrectId |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean uploadInternalCorrectFile(Integer InternalCorrectId, MultipartFile file) { |
| | | if (InternalCorrectId == null) { |
| | | throw new ErrorException("缺å°çº æ£æªæ½id"); |
| | | } |
| | | |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | String filename = file.getOriginalFilename(); |
| | | String contentType = file.getContentType(); |
| | | InternalCorrectFile InternalCorrectFile = new InternalCorrectFile(); |
| | | InternalCorrectFile.setCorrectId(InternalCorrectId); |
| | | InternalCorrectFile.setFileName(filename); |
| | | if (contentType != null && contentType.startsWith("image/")) { |
| | | // æ¯å¾ç |
| | | path = imgUrl; |
| | | InternalCorrectFile.setType(1); |
| | | } else { |
| | | // æ¯æä»¶ |
| | | path = wordUrl; |
| | | InternalCorrectFile.setType(2); |
| | | } |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | InternalCorrectFile.setFileUrl(pathName); |
| | | internalCorrectFileMapper.insert(InternalCorrectFile); |
| | | return true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new ErrorException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å
审管ççº æ£æªæ½éä»¶ |
| | | * @param correctId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<InternalCorrectFile> getInternalCorrectFileList(Integer correctId) { |
| | | return internalCorrectFileMapper.selectList(Wrappers.<InternalCorrectFile>lambdaQuery() |
| | | .eq(InternalCorrectFile::getCorrectId, correctId)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºçº æ£æªæ½ |
| | | * @param correctId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportInternalCorrect(Integer correctId, HttpServletResponse response) { |
| | | InternalCorrect internalCorrect = baseMapper.selectById(correctId); |
| | | InternalCorrectDto internalCorrectDto = new InternalCorrectDto(); |
| | | BeanUtils.copyProperties(internalCorrect, internalCorrectDto); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | // æåºæ¶é´ |
| | | internalCorrectDto.setRaiseTimeString(internalCorrect.getRaiseTime() != null |
| | | ? internalCorrect.getRaiseTime().format(formatter) : null); |
| | | // åå åææ¶é´ |
| | | internalCorrectDto.setCauseTimeString(internalCorrect.getCauseTime() != null |
| | | ? internalCorrect.getCauseTime().format(formatter) : null); |
| | | |
| | | // çº æ£æ¶é´ |
| | | internalCorrectDto.setCorrectTimeString(internalCorrect.getCorrectTime() != null |
| | | ? internalCorrect.getCorrectTime().format(formatter) : null); |
| | | |
| | | // éªè¯æ¶é´ |
| | | internalCorrectDto.setValidationTimeString(internalCorrect.getValidationTime() != null |
| | | ? internalCorrect.getValidationTime().format(formatter) : null); |
| | | |
| | | |
| | | // æåºäººç¾å |
| | | String raiseUrl = null; |
| | | if (internalCorrect.getRaiseUserId() != null) { |
| | | raiseUrl = userMapper.selectById(internalCorrect.getRaiseUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(raiseUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æåºäººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // åå åæäºº |
| | | String causeUrl = null; |
| | | if (internalCorrect.getCauseUserId() != null) { |
| | | causeUrl = userMapper.selectById(internalCorrect.getCauseUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(causeUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°åå åæäººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // çº æ£äºº |
| | | String correctUrl = null; |
| | | if (internalCorrect.getCorrectUserId() != null) { |
| | | correctUrl = userMapper.selectById(internalCorrect.getCorrectUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(correctUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°çº æ£äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // éªè¯äºº |
| | | String validationUrl = null; |
| | | if (internalCorrect.getValidationUserId() != null) { |
| | | validationUrl = userMapper.selectById(internalCorrect.getValidationUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(validationUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°éªè¯äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/internal-correct.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("correct", internalCorrectDto); |
| | | 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.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.InternalImplementDetailMapper; |
| | | import com.yuanchu.mom.pojo.InternalImplementDetail; |
| | | import com.yuanchu.mom.service.InternalImplementDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * å
审宿½è®¡å详æ
|
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Service |
| | | public class InternalImplementDetailServiceImpl extends ServiceImpl<InternalImplementDetailMapper, InternalImplementDetail> implements InternalImplementDetailService { |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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.InternalImplementDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.InternalImplementMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.InternalImplement; |
| | | import com.yuanchu.mom.pojo.InternalImplementDetail; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.InternalImplementDetailService; |
| | | import com.yuanchu.mom.service.InternalImplementService; |
| | | import com.yuanchu.mom.util.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.util.XWPFDocumentUtils; |
| | | import com.yuanchu.mom.utils.DateImageUtil; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å
审宿½è®¡å |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class InternalImplementServiceImpl extends ServiceImpl<InternalImplementMapper, InternalImplement> implements InternalImplementService { |
| | | |
| | | @Resource |
| | | private InternalImplementDetailService internalImplementDetailService; |
| | | @Resource |
| | | private GetLook getLook; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * å
审宿½è®¡åå页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalImplement |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InternalImplementDto> pageInternalImplement(Page page, InternalImplement internalImplement) { |
| | | return baseMapper.pageInternalImplement(page, QueryWrappers.queryWrappers(internalImplement)); |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åæ°å¢ |
| | | * @param internalImplement |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addInternalImplement(InternalImplementDto internalImplement) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | // æ·»å ç¼å¶äºº |
| | | User user = userMapper.selectById(userId); |
| | | internalImplement.setWriteTime(LocalDateTime.now()); |
| | | internalImplement.setWriteUserId(user.getId()); |
| | | internalImplement.setWriteUserName(user.getName()); |
| | | |
| | | baseMapper.insert(internalImplement); |
| | | // æ°å¢è¯¦æ
|
| | | for (InternalImplementDetail internalImplementDetail : internalImplement.getImplementDetailList()) { |
| | | internalImplementDetail.setImplementId(internalImplement.getImplementId()); |
| | | } |
| | | internalImplementDetailService.saveBatch(internalImplement.getImplementDetailList()); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åä¿®æ¹ |
| | | * @param internalImplement |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateInternalImplement(InternalImplementDto internalImplement) { |
| | | baseMapper.updateById(internalImplement); |
| | | |
| | | // å é¤ä¹åç详æ
|
| | | internalImplementDetailService.remove(Wrappers.<InternalImplementDetail>lambdaQuery() |
| | | .eq(InternalImplementDetail::getImplementId, internalImplement.getImplementId())); |
| | | |
| | | // æ°å¢è¯¦æ
|
| | | for (InternalImplementDetail internalImplementDetail : internalImplement.getImplementDetailList()) { |
| | | internalImplementDetail.setImplementId(internalImplement.getImplementId()); |
| | | } |
| | | internalImplementDetailService.saveBatch(internalImplement.getImplementDetailList()); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åå é¤ |
| | | * @param implementId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean delInternalImplement(Integer implementId) { |
| | | internalImplementDetailService.remove(Wrappers.<InternalImplementDetail>lambdaQuery() |
| | | .eq(InternalImplementDetail::getImplementId, implementId)); |
| | | baseMapper.deleteById(implementId); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åæ¥ç详æ
|
| | | * @param implementId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public InternalImplementDto getInternalImplementOne(Integer implementId) { |
| | | InternalImplement internalImplement = baseMapper.selectById(implementId); |
| | | InternalImplementDto internalImplementDto = new InternalImplementDto(); |
| | | BeanUtils.copyProperties(internalImplement, internalImplementDto); |
| | | |
| | | // æ¥è¯¢è¯¦ç»ä¿¡æ¯ |
| | | internalImplementDto.setImplementDetailList(internalImplementDetailService.list(Wrappers.<InternalImplementDetail>lambdaQuery() |
| | | .eq(InternalImplementDetail::getImplementId, implementId))); |
| | | return internalImplementDto; |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åæ¹å |
| | | * @param internalImplement |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean ratifyInternalImplement(InternalImplementDto internalImplement) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | baseMapper.update(null, Wrappers.<InternalImplement>lambdaUpdate() |
| | | .eq(InternalImplement::getImplementId, internalImplement.getImplementId()) |
| | | .set(InternalImplement::getRatifyUserId, userId) |
| | | .set(InternalImplement::getRatifyUserName, user.getName()) |
| | | .set(InternalImplement::getRatifyRemark, internalImplement.getRatifyRemark()) |
| | | .set(InternalImplement::getRatifyStatus, internalImplement.getRatifyStatus()) |
| | | .set(InternalImplement::getRatifyTime, LocalDateTime.now()) |
| | | ); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
审宿½è®¡å |
| | | * @param implementId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportInternalImplement(Integer implementId, HttpServletResponse response) { |
| | | InternalImplement internalImplement = baseMapper.selectById(implementId); |
| | | |
| | | //è·åæäº¤äººçç¾åå°å |
| | | String writeUrl = userMapper.selectById(internalImplement.getWriteUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(writeUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ£éªäººçç¾å"); |
| | | } |
| | | |
| | | //è·åæ¹å人çç¾åå°å |
| | | String ratifyUrl = null; |
| | | if (internalImplement.getRatifyUserId() != null) { |
| | | ratifyUrl = userMapper.selectById(internalImplement.getRatifyUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(ratifyUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ¹å人çç¾å"); |
| | | } |
| | | } |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<InternalImplementDetail> detailList = internalImplementDetailService.list(Wrappers.<InternalImplementDetail>lambdaQuery() |
| | | .eq(InternalImplementDetail::getImplementId, implementId)); |
| | | |
| | | int index = 1; |
| | | for (InternalImplementDetail detail : detailList) { |
| | | detail.setIndex(index); |
| | | index++; |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/internal-implement.docx"); |
| | | String finalRatifyUrl = ratifyUrl; |
| | | Configure configure = Configure.builder() |
| | | .bind("implementDetailList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("implement", internalImplement); |
| | | put("implementDetailList", detailList); |
| | | put("writeUrl", StringUtils.isNotBlank(writeUrl) ? Pictures.ofLocal(imgUrl + "/" + writeUrl).create() : null); |
| | | put("ratifyUrl", StringUtils.isNotBlank(finalRatifyUrl) ? Pictures.ofLocal(imgUrl + "/" + finalRatifyUrl).create() : null); |
| | | put("writeDateUrl", internalImplement.getWriteTime() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(internalImplement.getWriteTime())).create() : null); |
| | | put("ratifyDateUrl", internalImplement.getRatifyTime() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(internalImplement.getRatifyTime())).create() : null); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | internalImplement.getPurposes(), "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.yuanchu.mom.pojo.InternalMeetingDetail; |
| | | import com.yuanchu.mom.mapper.InternalMeetingDetailMapper; |
| | | import com.yuanchu.mom.service.InternalMeetingDetailService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审ä¼è®®è¯¦æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:56:13 |
| | | */ |
| | | @Service |
| | | public class InternalMeetingDetailServiceImpl extends ServiceImpl<InternalMeetingDetailMapper, InternalMeetingDetail> implements InternalMeetingDetailService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.data.Pictures; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.InternalMeetingDto; |
| | | import com.yuanchu.mom.dto.InternalMeetingParticipantDto; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.InternalMeeting; |
| | | import com.yuanchu.mom.pojo.InternalMeetingDetail; |
| | | import com.yuanchu.mom.pojo.InternalMeeting; |
| | | import com.yuanchu.mom.mapper.InternalMeetingMapper; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.InternalMeetingDetailService; |
| | | import com.yuanchu.mom.service.InternalMeetingService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.util.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.DateImageUtil; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审ä¼è®®è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:50:44 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class InternalMeetingServiceImpl extends ServiceImpl<InternalMeetingMapper, InternalMeeting> implements InternalMeetingService { |
| | | |
| | | private InternalMeetingDetailService internalMeetingDetailService; |
| | | private GetLook getLook; |
| | | private UserMapper userMapper; |
| | | |
| | | /** |
| | | * å
审ä¼è®®å页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalMeeting |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InternalMeetingDto> pageInternalMeeting(Page page, InternalMeeting internalMeeting) { |
| | | return baseMapper.pageInternalMeeting(page, QueryWrappers.queryWrappers(internalMeeting)); |
| | | } |
| | | |
| | | /** |
| | | * å
审ä¼è®®æ°å¢ |
| | | * @param internalMeeting |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addInternalMeeting(InternalMeetingDto internalMeeting) { |
| | | |
| | | baseMapper.insert(internalMeeting); |
| | | // // æ°å¢è¯¦æ
|
| | | // for (InternalMeetingDetail internalMeetingDetail : internalMeeting.getMeetingDetailList()) { |
| | | // internalMeetingDetail.setMeetingId(internalMeeting.getMeetingId()); |
| | | // } |
| | | // internalMeetingDetailService.saveBatch(internalMeeting.getMeetingDetailList()); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
审ä¼è®®ä¿®æ¹ |
| | | * @param internalMeeting |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateInternalMeeting(InternalMeetingDto internalMeeting) { |
| | | baseMapper.updateById(internalMeeting); |
| | | |
| | | // å é¤ä¹åç详æ
|
| | | // internalMeetingDetailService.remove(Wrappers.<InternalMeetingDetail>lambdaQuery() |
| | | // .eq(InternalMeetingDetail::getMeetingId, internalMeeting.getMeetingId())); |
| | | // |
| | | // // æ°å¢è¯¦æ
|
| | | // for (InternalMeetingDetail internalMeetingDetail : internalMeeting.getMeetingDetailList()) { |
| | | // internalMeetingDetail.setMeetingId(internalMeeting.getMeetingId()); |
| | | // } |
| | | internalMeetingDetailService.saveBatch(internalMeeting.getMeetingDetailList()); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
审ä¼è®®å é¤ |
| | | * @param MeetingId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean delInternalMeeting(Integer MeetingId) { |
| | | internalMeetingDetailService.remove(Wrappers.<InternalMeetingDetail>lambdaQuery() |
| | | .eq(InternalMeetingDetail::getMeetingId, MeetingId)); |
| | | baseMapper.deleteById(MeetingId); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
审ä¼è®®æ¥ç详æ
|
| | | * @param MeetingId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public InternalMeetingDto getInternalMeetingOne(Integer MeetingId) { |
| | | InternalMeeting internalMeeting = baseMapper.selectById(MeetingId); |
| | | InternalMeetingDto internalMeetingDto = new InternalMeetingDto(); |
| | | BeanUtils.copyProperties(internalMeeting, internalMeetingDto); |
| | | |
| | | // æ¥è¯¢è¯¦ç»ä¿¡æ¯ |
| | | internalMeetingDto.setMeetingDetailList(internalMeetingDetailService.list(Wrappers.<InternalMeetingDetail>lambdaQuery() |
| | | .eq(InternalMeetingDetail::getMeetingId, MeetingId))); |
| | | return internalMeetingDto; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
审ä¼è®® |
| | | * @param meetingId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportInternalMeeting(Integer meetingId, HttpServletResponse response) { |
| | | InternalMeeting internalMeeting = baseMapper.selectById(meetingId); |
| | | |
| | | // æå¤§è¡æ° |
| | | int max = 11; |
| | | |
| | | // æ¥è¯¢åå 人å |
| | | List<Map<String, String>> mapList = userMapper.selectNameAnddepartment(internalMeeting.getParticipant()); |
| | | |
| | | // å建空对象 |
| | | List<InternalMeetingParticipantDto> participants = new ArrayList<>(); |
| | | for (int i = 0; i < max; i++) { |
| | | InternalMeetingParticipantDto participant = new InternalMeetingParticipantDto(); |
| | | participants.add(participant); |
| | | } |
| | | |
| | | int count = 0; |
| | | // æ·»å åå 人å |
| | | for (Map<String, String> stringMap : mapList) { |
| | | // å¤æææ²¡æå°11è¡ |
| | | if (count >= max * 2) { |
| | | participants.get(count - max * 2).setUserName3(stringMap.get("userName")); |
| | | participants.get(count - max * 2).setDepartment3(stringMap.get("department")); |
| | | } else if (count >= max){ |
| | | participants.get(count - max).setUserName2(stringMap.get("userName")); |
| | | participants.get(count - max).setDepartment2(stringMap.get("department")); |
| | | } else { |
| | | participants.get(count).setUserName1(stringMap.get("userName")); |
| | | participants.get(count).setDepartment1(stringMap.get("department")); |
| | | } |
| | | count ++; |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/internal-meeting.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("meetingDetails", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("meeting", internalMeeting); |
| | | put("meetingDetails", participants); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | internalMeeting.getMeetingDate() + "å
审ä¼è®®ç¾å°", "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.yuanchu.mom.pojo.InternalPlanDetail; |
| | | import com.yuanchu.mom.mapper.InternalPlanDetailMapper; |
| | | import com.yuanchu.mom.service.InternalPlanDetailService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
审年度计å详æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:28:48 |
| | | */ |
| | | @Service |
| | | public class InternalPlanDetailServiceImpl extends ServiceImpl<InternalPlanDetailMapper, InternalPlanDetail> implements InternalPlanDetailService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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.InternalPlanDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.pojo.InternalPlan; |
| | | import com.yuanchu.mom.mapper.InternalPlanMapper; |
| | | import com.yuanchu.mom.service.InternalPlanDetailService; |
| | | import com.yuanchu.mom.service.InternalPlanService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.util.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.DateImageUtil; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
å®¡å¹´åº¦è®¡å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:27:47 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class InternalPlanServiceImpl extends ServiceImpl<InternalPlanMapper, InternalPlan> implements InternalPlanService { |
| | | |
| | | @Resource |
| | | private InternalPlanDetailService internalPlanDetailService; |
| | | @Resource |
| | | private GetLook getLook; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | |
| | | /** |
| | | * å
审年度计åå页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalPlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InternalPlanDto> pageInternalPlan(Page page, InternalPlan internalPlan) { |
| | | return baseMapper.pageInternalPlan(page, QueryWrappers.queryWrappers(internalPlan)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡å¹´åº¦è®¡åæ°å¢ |
| | | * @param internalPlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addInternalPlan(InternalPlanDto internalPlan) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | // æ·»å ç¼å¶äºº |
| | | User user = userMapper.selectById(userId); |
| | | internalPlan.setWriteTime(LocalDateTime.now()); |
| | | internalPlan.setWriteUserId(user.getId()); |
| | | internalPlan.setWriteUserName(user.getName()); |
| | | |
| | | baseMapper.insert(internalPlan); |
| | | // æ°å¢è¯¦æ
|
| | | for (InternalPlanDetail internalPlanDetail : internalPlan.getPlanDetailList()) { |
| | | internalPlanDetail.setPlanId(internalPlan.getPlanId()); |
| | | } |
| | | internalPlanDetailService.saveBatch(internalPlan.getPlanDetailList()); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
审年度计åä¿®æ¹ |
| | | * @param internalPlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateInternalPlan(InternalPlanDto internalPlan) { |
| | | baseMapper.updateById(internalPlan); |
| | | |
| | | // å é¤ä¹åç详æ
|
| | | internalPlanDetailService.remove(Wrappers.<InternalPlanDetail>lambdaQuery() |
| | | .eq(InternalPlanDetail::getPlanId, internalPlan.getPlanId())); |
| | | |
| | | // æ°å¢è¯¦æ
|
| | | for (InternalPlanDetail internalPlanDetail : internalPlan.getPlanDetailList()) { |
| | | internalPlanDetail.setPlanId(internalPlan.getPlanId()); |
| | | } |
| | | internalPlanDetailService.saveBatch(internalPlan.getPlanDetailList()); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
审年度计åå é¤ |
| | | * @param planId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean delInternalPlan(Integer planId) { |
| | | internalPlanDetailService.remove(Wrappers.<InternalPlanDetail>lambdaQuery() |
| | | .eq(InternalPlanDetail::getPlanId, planId)); |
| | | baseMapper.deleteById(planId); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡å¹´åº¦è®¡åæ¥ç详æ
|
| | | * @param planId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public InternalPlanDto getInternalPlanOne(Integer planId) { |
| | | InternalPlan internalPlan = baseMapper.selectById(planId); |
| | | InternalPlanDto internalPlanDto = new InternalPlanDto(); |
| | | BeanUtils.copyProperties(internalPlan, internalPlanDto); |
| | | |
| | | // æ¥è¯¢è¯¦ç»ä¿¡æ¯ |
| | | internalPlanDto.setPlanDetailList(internalPlanDetailService.list(Wrappers.<InternalPlanDetail>lambdaQuery() |
| | | .eq(InternalPlanDetail::getPlanId, planId))); |
| | | return internalPlanDto; |
| | | } |
| | | |
| | | /** |
| | | * å
审年度计åå®¡æ ¸ |
| | | * @param internalPlanDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean examineInternalPlan(InternalPlanDto internalPlanDto) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | baseMapper.update(null, Wrappers.<InternalPlan>lambdaUpdate() |
| | | .eq(InternalPlan::getPlanId, internalPlanDto.getPlanId()) |
| | | .set(InternalPlan::getExamineUserId, userId) |
| | | .set(InternalPlan::getExamineUserName, user.getName()) |
| | | .set(InternalPlan::getExamineRemark, internalPlanDto.getExamineRemark()) |
| | | .set(InternalPlan::getExamineStatus, internalPlanDto.getExamineStatus()) |
| | | .set(InternalPlan::getExamineTime, LocalDateTime.now()) |
| | | ); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡å¹´åº¦è®¡åæ¹å |
| | | * @param internalPlanDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean ratifyInternalPlan(InternalPlanDto internalPlanDto) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | baseMapper.update(null, Wrappers.<InternalPlan>lambdaUpdate() |
| | | .eq(InternalPlan::getPlanId, internalPlanDto.getPlanId()) |
| | | .set(InternalPlan::getRatifyUserId, userId) |
| | | .set(InternalPlan::getRatifyUserName, user.getName()) |
| | | .set(InternalPlan::getRatifyRemark, internalPlanDto.getRatifyRemark()) |
| | | .set(InternalPlan::getRatifyStatus, internalPlanDto.getRatifyStatus()) |
| | | .set(InternalPlan::getRatifyTime, LocalDateTime.now()) |
| | | ); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
审年度计å |
| | | * @param planId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportInternalImplement(Integer planId, HttpServletResponse response) { |
| | | InternalPlan internalPlan = baseMapper.selectById(planId); |
| | | //è·åæäº¤äººçç¾åå°å |
| | | String writeUrl = userMapper.selectById(internalPlan.getWriteUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(writeUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ£éªäººçç¾å"); |
| | | } |
| | | |
| | | //è·åå®¡æ ¸äººçç¾åå°å |
| | | String examineUrl = null; |
| | | if (internalPlan.getExamineUserId() != null) { |
| | | examineUrl = userMapper.selectById(internalPlan.getExamineUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(examineUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å®¡æ ¸äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //è·åæ¹å人çç¾åå°å |
| | | String ratifyUrl = null; |
| | | if (internalPlan.getRatifyUserId() != null) { |
| | | ratifyUrl = userMapper.selectById(internalPlan.getRatifyUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(ratifyUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ¹å人çç¾å"); |
| | | } |
| | | } |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<InternalPlanDetail> planDetails = internalPlanDetailService.list(Wrappers.<InternalPlanDetail>lambdaQuery() |
| | | .eq(InternalPlanDetail::getPlanId, planId)); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/internal-plan.docx"); |
| | | String finalExamineUrl = examineUrl; |
| | | String finalRatifyUrl = ratifyUrl; |
| | | Configure configure = Configure.builder() |
| | | .bind("planDetailList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("plan", internalPlan); |
| | | put("planDetailList", planDetails); |
| | | 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); |
| | | }}); |
| | | |
| | | 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.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.PictureRenderData; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.InternalReportMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.InternalCheck; |
| | | import com.yuanchu.mom.pojo.InternalReport; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.InternalReportService; |
| | | import com.yuanchu.mom.util.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.DateImageUtil; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | 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.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * å
审æ¥å表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-11 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class InternalReportServiceImpl extends ServiceImpl<InternalReportMapper, InternalReport> implements InternalReportService { |
| | | |
| | | @Resource |
| | | private GetLook getLook; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * å
审æ¥åå页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalReport |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InternalReport> pageInternalReport(Page page, InternalReport internalReport) { |
| | | return baseMapper.pageInternalReport(page, QueryWrappers.queryWrappers(internalReport)); |
| | | } |
| | | |
| | | /** |
| | | * å
审æ¥åå®¡æ ¸ |
| | | * @param internalReport |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean ratifyInternalCheck(InternalReport internalReport) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | baseMapper.update(null, Wrappers.<InternalReport>lambdaUpdate() |
| | | .eq(InternalReport::getReportId, internalReport.getReportId()) |
| | | .set(InternalReport::getExamineUserId, userId) |
| | | .set(InternalReport::getExamineUserName, user.getName()) |
| | | .set(InternalReport::getExamineRemark, internalReport.getExamineRemark()) |
| | | .set(InternalReport::getExamineStatus, internalReport.getExamineStatus()) |
| | | .set(InternalReport::getExamineTime, LocalDateTime.now()) |
| | | ); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
审æ¥åè´¨éè´è´£äººå¡«å |
| | | * @param internalReport |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean qualityInternalReport(InternalReport internalReport) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | baseMapper.update(null, Wrappers.<InternalReport>lambdaUpdate() |
| | | .eq(InternalReport::getReportId, internalReport.getReportId()) |
| | | .set(InternalReport::getQualityUserId, userId) |
| | | .set(InternalReport::getQualityUserName, user.getName()) |
| | | .set(InternalReport::getQualityRemark, internalReport.getQualityRemark()) |
| | | .set(InternalReport::getQualityStatus, internalReport.getQualityStatus()) |
| | | .set(InternalReport::getQualityTime, LocalDateTime.now()) |
| | | ); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
审æ¥å |
| | | * @param reportId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportInternalReport(Integer reportId, HttpServletResponse response) { |
| | | InternalReport internalReport = baseMapper.selectById(reportId); |
| | | |
| | | //è·åå®¡æ ¸äººçç¾åå°å |
| | | String examineUrl = null; |
| | | if (internalReport.getExamineUserId() != null) { |
| | | examineUrl = userMapper.selectById(internalReport.getExamineUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(examineUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å®¡æ ¸äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //è·åè´¨éè´è´£äººçç¾åå°å |
| | | String qualityUrl = null; |
| | | if (internalReport.getQualityUserId() != null) { |
| | | qualityUrl = userMapper.selectById(internalReport.getQualityUserId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(qualityUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°è´¨éè´è´£äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/internal-report.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | String finalExamineUrl = examineUrl; |
| | | String finalQualityUrl = qualityUrl; |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("report", internalReport); |
| | | put("examineUrl", StringUtils.isNotBlank(finalExamineUrl) ? Pictures.ofLocal(imgUrl + "/" + finalQualityUrl).create() : null); |
| | | put("qualityUrl", StringUtils.isNotBlank(finalQualityUrl) ? Pictures.ofLocal(imgUrl + "/" + finalQualityUrl).create() : null); |
| | | put("examineTime", internalReport.getExamineTime() != null ? internalReport.getExamineTime().format(formatter) : null); |
| | | put("qualityTime", internalReport.getQualityTime() != null ? internalReport.getQualityTime().format(formatter) : 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.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | 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.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ManageControlPlanList; |
| | | import com.yuanchu.mom.mapper.ManageControlPlanListMapper; |
| | | import com.yuanchu.mom.service.ManageControlPlanListService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.util.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.DateImageUtil; |
| | | import com.yuanchu.mom.vo.ManageControlPlanListVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:58:30 |
| | | */ |
| | | @Service |
| | | public class ManageControlPlanListServiceImpl extends ServiceImpl<ManageControlPlanListMapper, ManageControlPlanList> implements ManageControlPlanListService { |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public IPage<ManageControlPlanListVo> getPageList(Page page) { |
| | | return baseMapper.getPageList(page, false); |
| | | } |
| | | |
| | | @Override |
| | | public void exportPersonTraining(HttpServletResponse response) { |
| | | // æ¥è¯¢è¯¦æ
|
| | | IPage<ManageControlPlanListVo> detailedDtos = baseMapper.getPageList(new Page(1, -1), true); |
| | | if (detailedDtos.getRecords().isEmpty()) { |
| | | throw new ErrorException("å®¡æ ¸éè¿çæ°æ®ä¸ºç©ºï¼è¯·å®¡æ ¸éè¿åå¨å¯¼åº"); |
| | | } |
| | | ManageControlPlanListVo manageRiskAssessmentResultsVo = detailedDtos.getRecords().get(0); |
| | | |
| | | //è·åç¼å¶äººçç¾åå°å |
| | | String writeUrl = userMapper.selectById(manageRiskAssessmentResultsVo.getEditor()).getSignatureUrl(); |
| | | if (ObjectUtils.isEmpty(writeUrl) || writeUrl.equals("")) { |
| | | throw new ErrorException("æ¾ä¸å°æ£éªäººçç¾å"); |
| | | } |
| | | |
| | | //è·å夿 ¸äººçç¾åå°å |
| | | String examineUrl = null; |
| | | if (manageRiskAssessmentResultsVo.getApproval() != null) { |
| | | examineUrl = userMapper.selectById(manageRiskAssessmentResultsVo.getApproval()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(examineUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å¤æ ¸äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //è·åæ¹å人çç¾åå°å |
| | | String ratifyUrl = null; |
| | | if (manageRiskAssessmentResultsVo.getApproval() != null) { |
| | | ratifyUrl = userMapper.selectById(manageRiskAssessmentResultsVo.getApproval()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(ratifyUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å¤æ ¸äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | int index = 1; |
| | | for (ManageControlPlanListVo detailedDto : detailedDtos.getRecords()) { |
| | | detailedDto.setIndex(index); |
| | | index++; |
| | | } |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/analysis-risk-factors.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("trainingDetailedList", detailedDtos.getRecords()); |
| | | 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", manageRiskAssessmentResultsVo.getEditorDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(manageRiskAssessmentResultsVo.getEditorDate())).create() : null); |
| | | put("examineDateUrl", manageRiskAssessmentResultsVo.getApproveDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(manageRiskAssessmentResultsVo.getApproveDate())).create() : null); |
| | | put("ratifyDateUrl", manageRiskAssessmentResultsVo.getApproveDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(manageRiskAssessmentResultsVo.getApproveDate())).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.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.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.common.PrintChina; |
| | | import com.yuanchu.mom.mapper.*; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.service.ManageDocumentAlterService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ´ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 11:04:01 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ManageDocumentAlterServiceImpl extends ServiceImpl<ManageDocumentAlterMapper, ManageDocumentAlter> implements ManageDocumentAlterService { |
| | | |
| | | @Resource |
| | | private ManageDocumentAlterMapper manageDocumentAlterMapper; |
| | | |
| | | @Resource |
| | | private ManageRecordCheckMapper manageRecordCheckMapper; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private ManageDocumentListMapper manageDocumentListMapper; |
| | | |
| | | @Resource |
| | | private ManageDocumentCancelMapper manageDocumentCancelMapper; |
| | | |
| | | @Resource |
| | | private ManageRecordAuditMapper manageRecordAuditMapper; |
| | | |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageDocumentAlter(Page page, ManageDocumentAlter manageDocumentAlter) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageDocumentAlter.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("pageManageDocumentCancel"); |
| | | if (map1.get("look") == 1) manageDocumentAlter.setCreateUser(map1.get("userId")); |
| | | map.put("body", manageDocumentAlterMapper.pageManageDocumentAlter(page, QueryWrappers.queryWrappers(manageDocumentAlter))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public ManageDocumentAlter getManageDocumentAlter(Integer id) { |
| | | ManageDocumentAlter manageDocumentAlter = manageDocumentAlterMapper.getManageDocumentAlter(id); |
| | | String limsName = userMapper.selectUserDepartmentLimsName(manageDocumentAlter.getCreateUser()); |
| | | manageDocumentAlter.setCreateUserDepartLims(limsName); |
| | | return manageDocumentAlter; |
| | | } |
| | | |
| | | @Override |
| | | public int addManageDocumentAlter(ManageDocumentAlter manageDocumentAlter) { |
| | | /*æ°å¢8.4çæä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½*/ |
| | | ManageRecordAudit manageRecordAudit = new ManageRecordAudit(); |
| | | manageRecordAudit.setDocumentCode(manageDocumentAlter.getAlterBeforeCode()); |
| | | manageRecordAudit.setDocumentName(manageDocumentAlter.getAlterBeforeName()); |
| | | manageRecordAudit.setBeforeVersion(manageDocumentAlter.getAlterBeforeVersion()); |
| | | manageRecordAudit.setAfterVersion(manageDocumentAlter.getAlterAfterVersion()); |
| | | manageRecordAudit.setReason(manageDocumentAlter.getAlterNote()); |
| | | manageRecordAudit.setAlterUser(getLook.selectPowerByMethodAndUserId(null).get("userId")); |
| | | manageRecordAudit.setMethod("修订"); |
| | | if (ObjectUtils.isNotEmpty(manageDocumentAlter.getFile())) { |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | MultipartFile file = manageDocumentAlter.getFile(); |
| | | //ä¸ä¼ æ°æä»¶ |
| | | path = wordUrl; |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return 0; |
| | | } |
| | | manageDocumentAlter.setAlterAfterUrl(pathName); |
| | | manageRecordAudit.setAfterUrl(pathName); |
| | | } |
| | | manageRecordAuditMapper.insert(manageRecordAudit); |
| | | return manageDocumentAlterMapper.insert(manageDocumentAlter); |
| | | } |
| | | |
| | | @Override |
| | | public int doManageDocumentAlter(ManageDocumentAlter manageDocumentAlter) { |
| | | ManageDocumentAlter manageDocumentAlter1= manageDocumentAlterMapper.selectById(manageDocumentAlter.getId()); |
| | | if (ObjectUtils.isNotEmpty(manageDocumentAlter.getFile())) { |
| | | if (ObjectUtils.isNotEmpty(manageDocumentAlter1.getAlterAfterUrl())) { |
| | | // å 餿§æä»¶ |
| | | File oldFile = new File(wordUrl + "/" + manageDocumentAlter1.getAlterAfterUrl()); |
| | | oldFile.delete(); |
| | | } |
| | | //ä¸ä¼ æ°æä»¶ |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | MultipartFile file = manageDocumentAlter.getFile(); |
| | | path = wordUrl; |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | manageDocumentAlter.setAlterAfterUrl(pathName); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return 0; |
| | | } |
| | | } |
| | | return manageDocumentAlterMapper.updateById(manageDocumentAlter); |
| | | } |
| | | |
| | | @Override |
| | | public int checkManageDocumentAlter(ManageDocumentAlter manageDocumentAlter) { |
| | | ManageDocumentAlter oldManageDocumentAlter = manageDocumentAlterMapper.selectById(manageDocumentAlter.getId()); |
| | | if (manageDocumentAlter.getState().equals("éè¿")) { |
| | | /*å°æä»¶çç« */ |
| | | // å 餿§æä»¶ |
| | | File oldFile = new File(wordUrl + "/" + oldManageDocumentAlter.getAlterAfterUrl()); |
| | | oldFile.delete(); |
| | | //ä¸ä¼ æ°æä»¶ |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | MultipartFile file = manageDocumentAlter.getFile(); |
| | | path = wordUrl; |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | manageDocumentAlter.setAlterAfterUrl(pathName); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return 0; |
| | | } |
| | | /*å
¶ä½ç¸å
³å¤ç*/ |
| | | if (oldManageDocumentAlter.getMethod().equals("ä½åº")){ |
| | | //æ°å¢å°ä½åºç³è¯·éé¢ |
| | | ManageDocumentCancel manageDocumentCancel = new ManageDocumentCancel(); |
| | | manageDocumentCancel.setDocumentCode(oldManageDocumentAlter.getAlterBeforeCode()); |
| | | manageDocumentCancel.setName(oldManageDocumentAlter.getAlterBeforeName()); |
| | | manageDocumentCancel.setVersion(oldManageDocumentAlter.getAlterBeforeVersion()); |
| | | manageDocumentCancel.setCancelNote("æä»¶åæ´,åæ´çæä»¶ç¼å·æ¯"+oldManageDocumentAlter.getAlterAfterCode()); |
| | | manageDocumentCancelMapper.insert(manageDocumentCancel); |
| | | //å 餿件æ¸
å |
| | | manageDocumentListMapper.delete(Wrappers.<ManageDocumentList>lambdaQuery() |
| | | .eq(ManageDocumentList::getDocumentCode,oldManageDocumentAlter.getAlterBeforeCode())); |
| | | //æ°å¢æä»¶æ¸
å |
| | | ManageDocumentList manageDocumentList = new ManageDocumentList(); |
| | | manageDocumentList.setDocumentCode(oldManageDocumentAlter.getAlterAfterCode()); |
| | | manageDocumentList.setName(oldManageDocumentAlter.getAlterAfterName()); |
| | | manageDocumentList.setVersion(oldManageDocumentAlter.getAlterAfterVersion()); |
| | | manageDocumentList.setState("ææ"); |
| | | manageDocumentList.setEffectiveDate(LocalDate.now()); |
| | | manageDocumentList.setUrl(pathName); |
| | | manageDocumentListMapper.insert(manageDocumentList); |
| | | /*æ°å¢8.4çæä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½*/ |
| | | ManageRecordAudit manageRecordAudit = new ManageRecordAudit(); |
| | | manageRecordAudit.setDocumentCode(manageDocumentCancel.getDocumentCode()); |
| | | manageRecordAudit.setDocumentName(manageDocumentCancel.getName()); |
| | | manageRecordAudit.setAlterThing("ä½åº"); |
| | | manageRecordAudit.setMethod("ä½åº"); |
| | | manageRecordAuditMapper.insert(manageRecordAudit); |
| | | }else { |
| | | //妿æ¯åæ¡£ä¸å¯ç¨,é£å°±å°æä»¶æ¸
åçç¶ææ¹ä¸ºæ æ |
| | | manageDocumentListMapper.update(null,Wrappers.<ManageDocumentList>lambdaUpdate() |
| | | .eq(ManageDocumentList::getDocumentCode,oldManageDocumentAlter.getAlterBeforeCode()) |
| | | .set(ManageDocumentList::getState,"æ æ")); |
| | | } |
| | | } |
| | | /*æ°å¢8.4çæä»¶å®¡æ¹è®°å½*/ |
| | | ManageRecordCheck manageRecordCheck = new ManageRecordCheck(); |
| | | manageRecordCheck.setDocumentCode(oldManageDocumentAlter.getAlterAfterCode()); |
| | | manageRecordCheck.setDocumentName(oldManageDocumentAlter.getAlterAfterName()); |
| | | manageRecordCheck.setDocumentVersion(oldManageDocumentAlter.getAlterAfterVersion()); |
| | | manageRecordCheck.setWriteUser(oldManageDocumentAlter.getCreateUser()); |
| | | manageRecordCheck.setCheckUser(oldManageDocumentAlter.getCheckUser()); |
| | | manageRecordCheck.setCheckState(manageDocumentAlter.getState()); |
| | | manageRecordCheck.setRemark(manageDocumentAlter.getAlterNote()); |
| | | manageRecordCheckMapper.insert(manageRecordCheck); |
| | | return manageDocumentAlterMapper.updateById(manageDocumentAlter); |
| | | } |
| | | |
| | | @Override |
| | | public void checkManageDocumentAlterPdf(Long id, HttpServletResponse response) throws Exception { |
| | | ManageDocumentAlter manageDocumentAlter = manageDocumentAlterMapper.selectById(id); |
| | | File file = new File(wordUrl + "/" + manageDocumentAlter.getAlterAfterUrl()); |
| | | FileInputStream fileInputStream = new FileInputStream(file); |
| | | response.setContentType("application/pdf"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setHeader("Content-disposition", "inline;filename=" + file.getName()); |
| | | response.setContentLength((int)file.length()); |
| | | OutputStream os = response.getOutputStream(); |
| | | // å°æä»¶å
容åå
¥è¾åºæµ |
| | | byte[] buffer = new byte[4096]; |
| | | int bytesRead; |
| | | while ((bytesRead = fileInputStream.read(buffer)) != -1) { |
| | | os.write(buffer, 0, bytesRead); |
| | | } |
| | | os.flush(); |
| | | os.close(); |
| | | } |
| | | |
| | | @Override |
| | | public void exportManageDocumentAlter(ManageDocumentAlter manageDocumentAlter, HttpServletResponse response) throws Exception { |
| | | List<ManageDocumentAlter> data = manageDocumentAlterMapper.pageManageDocumentAlter(new Page(-1, -1), QueryWrappers.queryWrappers(manageDocumentAlter)).getRecords(); |
| | | 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(ManageDocumentAlter.class).build(); |
| | | excelWriter.write(data, mainSheet); |
| | | // å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public int delManageDocumentAlter(Integer id) { |
| | | ManageDocumentAlter manageDocumentAlter = manageDocumentAlterMapper.selectById(id); |
| | | /*å é¤8.4çæä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½*/ |
| | | manageRecordAuditMapper.delete(Wrappers.<ManageRecordAudit>lambdaQuery() |
| | | .eq(ManageRecordAudit::getDocumentCode,manageDocumentAlter.getAlterBeforeCode()) |
| | | .eq(ManageRecordAudit::getDocumentName,manageDocumentAlter.getAlterBeforeName()) |
| | | .eq(ManageRecordAudit::getBeforeVersion,manageDocumentAlter.getAlterBeforeVersion()) |
| | | .eq(ManageRecordAudit::getAfterVersion,manageDocumentAlter.getAlterAfterVersion()) |
| | | .eq(ManageRecordAudit::getReason,manageDocumentAlter.getAlterNote()) |
| | | .eq(ManageRecordAudit::getAlterUser,manageDocumentAlter.getCreateUser()) |
| | | .eq(ManageRecordAudit::getMethod,"修订")); |
| | | return manageDocumentAlterMapper.deleteById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.mapper.*; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.service.ManageDocumentCancelService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶ä½åº æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 02:37:35 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ManageDocumentCancelServiceImpl extends ServiceImpl<ManageDocumentCancelMapper, ManageDocumentCancel> implements ManageDocumentCancelService { |
| | | |
| | | @Resource |
| | | private ManageDocumentCancelMapper manageDocumentCancelMapper; |
| | | |
| | | @Resource |
| | | private ManageRecordCheckMapper manageRecordCheckMapper; |
| | | |
| | | @Resource |
| | | private ManageRecordAuditMapper manageRecordAuditMapper; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Resource |
| | | private ManageDocumentListMapper manageDocumentListMapper; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageDocumentCancel(Page page, ManageDocumentCancel manageDocumentCancel) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageDocumentCancel.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("pageManageDocumentCancel"); |
| | | if (map1.get("look") == 1) manageDocumentCancel.setCreateUser(map1.get("userId")); |
| | | map.put("body", manageDocumentCancelMapper.pageManageDocumentCancel(page, QueryWrappers.queryWrappers(manageDocumentCancel))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int addManageDocumentCancel(ManageDocumentCancel manageDocumentCancel) { |
| | | manageDocumentCancel.setState("å¾
å®¡æ ¸"); |
| | | /*æ°å¢8.4çæä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½*/ |
| | | ManageRecordAudit manageRecordAudit = new ManageRecordAudit(); |
| | | manageRecordAudit.setDocumentCode(manageDocumentCancel.getDocumentCode()); |
| | | manageRecordAudit.setDocumentName(manageDocumentCancel.getName()); |
| | | manageRecordAudit.setAlterThing("ä½åº"); |
| | | manageRecordAudit.setMethod("ä½åº"); |
| | | manageRecordAuditMapper.insert(manageRecordAudit); |
| | | return manageDocumentCancelMapper.insert(manageDocumentCancel); |
| | | } |
| | | |
| | | @Override |
| | | public int checkManageDocumentCancel(Integer id, String state) { |
| | | ManageDocumentCancel manageDocumentCancel = manageDocumentCancelMapper.selectById(id); |
| | | if (state.equals("éè¿")){ |
| | | //å 餿件æ¸
åå¯¹åºæ°æ® |
| | | manageDocumentListMapper.delete(Wrappers.<ManageDocumentList>lambdaQuery().eq(ManageDocumentList::getDocumentCode,manageDocumentCancel.getDocumentCode())); |
| | | } |
| | | manageDocumentCancel.setState(state); |
| | | /*æ°å¢8.4çæä»¶å®¡æ¹è®°å½*/ |
| | | ManageRecordCheck manageRecordCheck = new ManageRecordCheck(); |
| | | manageRecordCheck.setDocumentCode(manageDocumentCancel.getDocumentCode()); |
| | | manageRecordCheck.setDocumentName(manageDocumentCancel.getName()); |
| | | manageRecordCheck.setDocumentVersion(manageDocumentCancel.getVersion()); |
| | | manageRecordCheck.setWriteUser(manageDocumentCancel.getCreateUser()); |
| | | manageRecordCheck.setCheckUser(manageDocumentCancel.getCheckUser()); |
| | | manageRecordCheck.setCheckState(manageDocumentCancel.getState()); |
| | | manageRecordCheck.setRemark(manageDocumentCancel.getCancelNote()); |
| | | manageRecordCheckMapper.insert(manageRecordCheck); |
| | | return manageDocumentCancelMapper.updateById(manageDocumentCancel); |
| | | } |
| | | |
| | | @Override |
| | | public ManageDocumentCancel getManageDocumentCancel(Integer id) { |
| | | ManageDocumentCancel manageDocumentCancel = manageDocumentCancelMapper.getManageDocumentCancel(id); |
| | | String limsName = userMapper.selectUserDepartmentLimsName(manageDocumentCancel.getCreateUser()); |
| | | manageDocumentCancel.setCreateUserDepartLims(limsName); |
| | | return manageDocumentCancel; |
| | | } |
| | | |
| | | @Override |
| | | public void exportManageDocumentCancel(ManageDocumentCancel manageDocumentCancel, HttpServletResponse response) throws Exception{ |
| | | List<ManageDocumentCancel> data = manageDocumentCancelMapper.pageManageDocumentCancel(new Page(-1, -1), QueryWrappers.queryWrappers(manageDocumentCancel)).getRecords(); |
| | | 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(ManageDocumentCancel.class).build(); |
| | | excelWriter.write(data, mainSheet); |
| | | // å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public int delManageDocumentCancel(Integer id) { |
| | | ManageDocumentCancel manageDocumentCancel = manageDocumentCancelMapper.selectById(id); |
| | | /*å é¤8.4çæä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½*/ |
| | | manageRecordAuditMapper.delete(Wrappers.<ManageRecordAudit>lambdaQuery() |
| | | .eq(ManageRecordAudit::getDocumentCode,manageDocumentCancel.getDocumentCode()) |
| | | .eq(ManageRecordAudit::getDocumentName,manageDocumentCancel.getName()) |
| | | .eq(ManageRecordAudit::getMethod,"ä½åº")); |
| | | return manageDocumentCancelMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int doManageDocumentCancel(ManageDocumentCancel manageDocumentCancel) { |
| | | return manageDocumentCancelMapper.updateById(manageDocumentCancel); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.aspose.words.License; |
| | | import com.aspose.words.SaveFormat; |
| | | 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.common.PrintChina; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.ManageDocumentListMapper; |
| | | import com.yuanchu.mom.mapper.ManageRecordCheckMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ManageDocumentControlled; |
| | | import com.yuanchu.mom.mapper.ManageDocumentControlledMapper; |
| | | import com.yuanchu.mom.pojo.ManageDocumentList; |
| | | import com.yuanchu.mom.pojo.ManageRecordCheck; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ManageDocumentControlledService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.service.UserService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.core.io.FileSystemResource; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.swing.*; |
| | | import java.io.*; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.concurrent.CompletableFuture; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ§ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-08 02:54:44 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ManageDocumentControlledServiceImpl extends ServiceImpl<ManageDocumentControlledMapper, ManageDocumentControlled> implements ManageDocumentControlledService { |
| | | |
| | | @Resource |
| | | private ManageDocumentControlledMapper manageDocumentControlledMapper; |
| | | |
| | | @Resource |
| | | private ManageDocumentListMapper manageDocumentListMapper; |
| | | |
| | | @Resource |
| | | private ManageRecordCheckMapper manageRecordCheckMapper; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageDocumentControlled(Page page, ManageDocumentControlled manageDocumentControlled) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageDocumentControlled.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("pageManageDocumentControlled"); |
| | | if (map1.get("look") == 1) manageDocumentControlled.setCreateUser(map1.get("userId")); |
| | | map.put("body", manageDocumentControlledMapper.pageManageDocumentControlled(page, QueryWrappers.queryWrappers(manageDocumentControlled))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int addManageDocumentControlled(ManageDocumentControlled manageDocumentControlled) { |
| | | manageDocumentControlled.setState("å¾
å®¡æ ¸"); |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | if (ObjectUtils.isNotEmpty(manageDocumentControlled.getFile())) { |
| | | MultipartFile file = manageDocumentControlled.getFile(); |
| | | //ä¸ä¼ æ°æä»¶ |
| | | path = wordUrl; |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return 0; |
| | | } |
| | | manageDocumentControlled.setUrl(pathName); |
| | | } |
| | | return manageDocumentControlledMapper.insert(manageDocumentControlled); |
| | | } |
| | | |
| | | @Override |
| | | public int delManageDocumentControlled(Long id) { |
| | | ManageDocumentControlled manageDocumentControlled = manageDocumentControlledMapper.selectById(id); |
| | | if (ObjectUtils.isNotEmpty(manageDocumentControlled.getUrl())) { |
| | | // å 餿§æä»¶ |
| | | File oldFile = new File(wordUrl + "/" + manageDocumentControlled.getUrl()); |
| | | oldFile.delete(); |
| | | } |
| | | return manageDocumentControlledMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public ManageDocumentControlled getManageDocumentControlled(Long id) { |
| | | ManageDocumentControlled manageDocumentControlled = manageDocumentControlledMapper.getManageDocumentControlled(id); |
| | | //è·åé¨é¨ä¿¡æ¯ |
| | | String departmentLimsName = userMapper.selectUserDepartmentLimsName(manageDocumentControlled.getCreateUser()); |
| | | manageDocumentControlled.setCreateUserDepartLims(departmentLimsName); |
| | | return manageDocumentControlled; |
| | | } |
| | | |
| | | @Override |
| | | public int doManageDocumentControlled(ManageDocumentControlled manageDocumentControlled) { |
| | | ManageDocumentControlled manageDocumentControlled1 = manageDocumentControlledMapper.selectById(manageDocumentControlled.getId()); |
| | | if (ObjectUtils.isNotEmpty(manageDocumentControlled.getFile())) { |
| | | if (ObjectUtils.isNotEmpty(manageDocumentControlled1.getUrl())) { |
| | | // å 餿§æä»¶ |
| | | File oldFile = new File(wordUrl + "/" + manageDocumentControlled1.getUrl()); |
| | | oldFile.delete(); |
| | | } |
| | | //ä¸ä¼ æ°æä»¶ |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | MultipartFile file = manageDocumentControlled.getFile(); |
| | | path = wordUrl; |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | manageDocumentControlled.setUrl(pathName); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return 0; |
| | | } |
| | | } |
| | | return manageDocumentControlledMapper.updateById(manageDocumentControlled); |
| | | } |
| | | |
| | | @Override |
| | | public int checkManageDocumentControlled(ManageDocumentControlled manageDocumentControlled) { |
| | | ManageDocumentControlled documentControlled = manageDocumentControlledMapper.selectById(manageDocumentControlled.getId()); |
| | | if (manageDocumentControlled.getState().equals("éè¿")) { |
| | | // å 餿§æä»¶ |
| | | File oldFile = new File(wordUrl + "/" + documentControlled.getUrl()); |
| | | oldFile.delete(); |
| | | //ä¸ä¼ æ°æä»¶ |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | MultipartFile file = manageDocumentControlled.getFile(); |
| | | path = wordUrl; |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | manageDocumentControlled.setUrl(pathName); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return 0; |
| | | } |
| | | //å°æä»¶åæ§å·²ç¥æä»¶æ¸
å |
| | | ManageDocumentList manageDocumentList = new ManageDocumentList(); |
| | | manageDocumentList.setDocumentCode(documentControlled.getDocumentCode()); |
| | | manageDocumentList.setType(documentControlled.getType()); |
| | | manageDocumentList.setName(documentControlled.getName()); |
| | | manageDocumentList.setVersion(documentControlled.getVersion()); |
| | | manageDocumentList.setWriter(documentControlled.getWriter()); |
| | | manageDocumentList.setEffectiveDate(LocalDate.now()); |
| | | manageDocumentList.setState("ææ"); |
| | | manageDocumentList.setUrl(manageDocumentControlled.getUrl()); |
| | | manageDocumentListMapper.insert(manageDocumentList); |
| | | } |
| | | /*æ°å¢8.4çæä»¶å®¡æ¹è®°å½*/ |
| | | ManageRecordCheck manageRecordCheck = new ManageRecordCheck(); |
| | | manageRecordCheck.setDocumentCode(documentControlled.getDocumentCode()); |
| | | manageRecordCheck.setDocumentName(documentControlled.getName()); |
| | | manageRecordCheck.setDocumentVersion(documentControlled.getVersion()); |
| | | manageRecordCheck.setWriteUser(userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getName,documentControlled.getWriter())).getId()); |
| | | manageRecordCheck.setCheckUser(documentControlled.getDutyUser()); |
| | | manageRecordCheck.setCheckState(manageDocumentControlled.getState()); |
| | | manageRecordCheck.setRemark(documentControlled.getInstructions()); |
| | | manageRecordCheckMapper.insert(manageRecordCheck); |
| | | return manageDocumentControlledMapper.updateById(manageDocumentControlled); |
| | | } |
| | | |
| | | @Override |
| | | public void checkManageDocumentControlledPdf(Long id, HttpServletResponse response) throws Exception { |
| | | ManageDocumentControlled manageDocumentControlled = manageDocumentControlledMapper.selectById(id); |
| | | File file = new File(wordUrl + "/" + manageDocumentControlled.getUrl()); |
| | | FileInputStream fileInputStream = new FileInputStream(file); |
| | | response.setContentType("application/pdf"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setHeader("Content-disposition", "inline;filename=" + file.getName()); |
| | | response.setContentLength((int)file.length()); |
| | | OutputStream os = response.getOutputStream(); |
| | | // å°æä»¶å
容åå
¥è¾åºæµ |
| | | byte[] buffer = new byte[4096]; |
| | | int bytesRead; |
| | | while ((bytesRead = fileInputStream.read(buffer)) != -1) { |
| | | os.write(buffer, 0, bytesRead); |
| | | } |
| | | os.flush(); |
| | | os.close(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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.common.PrintChina; |
| | | import com.yuanchu.mom.dto.ManageDocumentIssueRecycleDto; |
| | | import com.yuanchu.mom.mapper.ManageRecordCheckMapper; |
| | | import com.yuanchu.mom.mapper.ManageRecordIssueRecycleMapper; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.mapper.ManageDocumentIssueRecycleMapper; |
| | | import com.yuanchu.mom.service.ManageDocumentIssueRecycleService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ¾åæ¶ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 09:18:24 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ManageDocumentIssueRecycleServiceImpl extends ServiceImpl<ManageDocumentIssueRecycleMapper, ManageDocumentIssueRecycle> implements ManageDocumentIssueRecycleService { |
| | | |
| | | @Resource |
| | | private ManageDocumentIssueRecycleMapper manageDocumentIssueRecycleMapper; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Resource |
| | | private ManageRecordCheckMapper manageRecordCheckMapper; |
| | | |
| | | @Resource |
| | | private ManageRecordIssueRecycleMapper manageRecordIssueRecycleMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageDocumentIssueRecycle(Page page, ManageDocumentIssueRecycleDto manageDocumentIssueRecycleDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageDocumentIssueRecycleDto.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("pageManageDocumentIssueRecycle"); |
| | | if (map1.get("look") == 1) manageDocumentIssueRecycleDto.setCreateUser(map1.get("userId")); |
| | | map.put("body", manageDocumentIssueRecycleMapper.pageManageDocumentIssueRecycle(page, QueryWrappers.queryWrappers(manageDocumentIssueRecycleDto))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public ManageDocumentIssueRecycleDto getManageDocumentIssueRecycle(Long id) { |
| | | return manageDocumentIssueRecycleMapper.getManageDocumentIssueRecycle(id); |
| | | } |
| | | |
| | | @Override |
| | | public void exportManageDocumentIssueRecycle(ManageDocumentIssueRecycleDto manageDocumentIssueRecycleDto, HttpServletResponse response)throws Exception { |
| | | List<ManageDocumentIssueRecycleDto> data = manageDocumentIssueRecycleMapper.pageManageDocumentIssueRecycle(new Page(-1, -1), QueryWrappers.queryWrappers(manageDocumentIssueRecycleDto)).getRecords(); |
| | | 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(ManageDocumentIssueRecycleDto.class).build(); |
| | | excelWriter.write(data, mainSheet); |
| | | // å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public int checkManageDocumentIssueRecycle(Integer id, String documentState) { |
| | | ManageDocumentIssueRecycle manageDocumentIssueRecycle = manageDocumentIssueRecycleMapper.selectById(id); |
| | | manageDocumentIssueRecycle.setDocumentState(documentState); |
| | | /*æ°å¢8.4çæä»¶å®¡æ¹è®°å½*/ |
| | | ManageRecordCheck manageRecordCheck = new ManageRecordCheck(); |
| | | manageRecordCheck.setDocumentCode(manageDocumentIssueRecycle.getDocumentCode()); |
| | | manageRecordCheck.setDocumentName(manageDocumentIssueRecycle.getName()); |
| | | manageRecordCheck.setDocumentVersion(manageDocumentIssueRecycle.getVersion()); |
| | | manageRecordCheck.setCheckUser(manageDocumentIssueRecycle.getReceiveUser()); |
| | | manageRecordCheck.setCheckState(documentState); |
| | | manageRecordCheckMapper.insert(manageRecordCheck); |
| | | return manageDocumentIssueRecycleMapper.updateById(manageDocumentIssueRecycle); |
| | | } |
| | | |
| | | @Override |
| | | public int addManageDocumentIssueRecycle(ManageDocumentIssueRecycle manageDocumentIssueRecycle) { |
| | | manageDocumentIssueRecycle.setDocumentState("å¾
å®¡æ ¸"); |
| | | if (ObjectUtils.isNotEmpty(manageDocumentIssueRecycle.getFile())){ |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | MultipartFile file = manageDocumentIssueRecycle.getFile(); |
| | | //ä¸ä¼ æ°æä»¶ |
| | | path = wordUrl; |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return 0; |
| | | } |
| | | manageDocumentIssueRecycle.setUrl(pathName); |
| | | } |
| | | /*æ°å¢8.3çåæ¾ä¸åæ¶è®°å½*/ |
| | | ManageRecordIssueRecycle manageRecordIssueRecycle = new ManageRecordIssueRecycle(); |
| | | manageRecordIssueRecycle.setDocumentCode(manageDocumentIssueRecycle.getDocumentCode()); |
| | | manageRecordIssueRecycle.setDocumentName(manageDocumentIssueRecycle.getName()); |
| | | manageRecordIssueRecycle.setDocumentVersion(manageDocumentIssueRecycle.getVersion()); |
| | | manageRecordIssueRecycle.setReceiveUser(manageDocumentIssueRecycle.getIssueUser()); |
| | | manageRecordIssueRecycle.setReceiveDate(manageDocumentIssueRecycle.getIssueDate()); |
| | | manageRecordIssueRecycleMapper.insert(manageRecordIssueRecycle); |
| | | return manageDocumentIssueRecycleMapper.insert(manageDocumentIssueRecycle); |
| | | } |
| | | |
| | | @Override |
| | | public int doManageDocumentIssueRecycle(ManageDocumentIssueRecycle manageDocumentIssueRecycle) { |
| | | ManageDocumentIssueRecycle documentIssueRecycle = manageDocumentIssueRecycleMapper.selectById(manageDocumentIssueRecycle.getId()); |
| | | //å¤è¯»æ¯å¦æ¯åæ¶ |
| | | if (ObjectUtils.isNotEmpty(manageDocumentIssueRecycle.getRecycleUser())){ |
| | | /*æ°å¢8.3çåæ¾ä¸åæ¶è®°å½*/ |
| | | ManageRecordIssueRecycle manageRecordIssueRecycle = manageRecordIssueRecycleMapper.selectOne(Wrappers.<ManageRecordIssueRecycle>lambdaQuery() |
| | | .eq(ManageRecordIssueRecycle::getDocumentCode, documentIssueRecycle.getDocumentCode()) |
| | | .eq(ManageRecordIssueRecycle::getDocumentName, documentIssueRecycle.getName()) |
| | | .eq(ManageRecordIssueRecycle::getDocumentVersion, documentIssueRecycle.getVersion()) |
| | | .eq(ManageRecordIssueRecycle::getReceiveUser, documentIssueRecycle.getIssueUser()) |
| | | .eq(ManageRecordIssueRecycle::getReceiveDate, documentIssueRecycle.getIssueDate())); |
| | | manageRecordIssueRecycle.setSignedUser(manageDocumentIssueRecycle.getRecycleUser()); |
| | | manageRecordIssueRecycle.setSignedDate(manageDocumentIssueRecycle.getRecycleDate()); |
| | | manageRecordIssueRecycleMapper.updateById(manageRecordIssueRecycle); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(manageDocumentIssueRecycle.getFile())) { |
| | | if (ObjectUtils.isNotEmpty(documentIssueRecycle.getUrl())) { |
| | | // å 餿§æä»¶ |
| | | File oldFile = new File(wordUrl + "/" + documentIssueRecycle.getUrl()); |
| | | oldFile.delete(); |
| | | } |
| | | //ä¸ä¼ æ°æä»¶ |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | MultipartFile file = manageDocumentIssueRecycle.getFile(); |
| | | path = wordUrl; |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | manageDocumentIssueRecycle.setUrl(pathName); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return 0; |
| | | } |
| | | } |
| | | return manageDocumentIssueRecycleMapper.updateById(manageDocumentIssueRecycle); |
| | | } |
| | | |
| | | @Override |
| | | public int delManageDocumentIssueRecycle(Long id) { |
| | | ManageDocumentIssueRecycle documentIssueRecycle = manageDocumentIssueRecycleMapper.selectById(id); |
| | | manageRecordIssueRecycleMapper.delete(Wrappers.<ManageRecordIssueRecycle>lambdaQuery() |
| | | .eq(ManageRecordIssueRecycle::getDocumentCode, documentIssueRecycle.getDocumentCode()) |
| | | .eq(ManageRecordIssueRecycle::getDocumentName, documentIssueRecycle.getName()) |
| | | .eq(ManageRecordIssueRecycle::getDocumentVersion, documentIssueRecycle.getVersion()) |
| | | .eq(ManageRecordIssueRecycle::getReceiveUser, documentIssueRecycle.getIssueUser()) |
| | | .eq(ManageRecordIssueRecycle::getReceiveDate, documentIssueRecycle.getIssueDate())); |
| | | return manageDocumentIssueRecycleMapper.deleteById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.aspose.words.License; |
| | | import com.aspose.words.SaveFormat; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.excel.ManageDocumentListListener; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.pojo.Company; |
| | | import com.yuanchu.mom.pojo.InsOrderFile; |
| | | import com.yuanchu.mom.pojo.ManageDocumentList; |
| | | import com.yuanchu.mom.mapper.ManageDocumentListMapper; |
| | | import com.yuanchu.mom.service.ManageDocumentListService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.*; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶æ¸
å |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-08 11:08:11 |
| | | */ |
| | | @Service |
| | | public class ManageDocumentListServiceImpl extends ServiceImpl<ManageDocumentListMapper, ManageDocumentList> implements ManageDocumentListService { |
| | | |
| | | @Resource |
| | | private ManageDocumentListMapper manageDocumentListMapper; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageDocumentList(Page page, ManageDocumentList manageDocumentList) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageDocumentList.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("pageManageDocumentList"); |
| | | if (map1.get("look") == 1) manageDocumentList.setCreateUser(map1.get("userId")); |
| | | map.put("body", manageDocumentListMapper.pageManageDocumentList(page, QueryWrappers.queryWrappers(manageDocumentList))); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int uploadFile(Integer id, MultipartFile file) { |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | ManageDocumentList manageDocumentList = manageDocumentListMapper.selectById(id); |
| | | if (ObjectUtils.isNotEmpty(manageDocumentList.getUrl())){ |
| | | // å 餿§æä»¶ |
| | | File oldFile = new File(wordUrl + "/" + manageDocumentList.getUrl()); |
| | | oldFile.delete(); |
| | | } |
| | | //ä¸ä¼ æ°æä»¶ |
| | | path = wordUrl; |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return 0; |
| | | } |
| | | manageDocumentList.setUrl(pathName); |
| | | return manageDocumentListMapper.updateById(manageDocumentList); |
| | | } |
| | | |
| | | @Override |
| | | public void importExcel(List<ManageDocumentList> list) { |
| | | if (CollectionUtil.isEmpty(list)) { |
| | | return; |
| | | } |
| | | list = list.stream().filter(manageDocumentList -> ObjectUtils.isNotEmpty(manageDocumentList.getName())).collect(Collectors.toList()); |
| | | saveBatch(list); |
| | | } |
| | | |
| | | public String wordToPdf(String wordPath, String pdfPath) { |
| | | FileOutputStream os = null; |
| | | try { |
| | | InputStream is = new ClassPathResource("/lib/license.xml").getInputStream(); |
| | | License license = new License(); |
| | | license.setLicense(is); |
| | | if (!license.getIsLicensed()) { |
| | | System.out.println("Licenseéªè¯ä¸éè¿..."); |
| | | return null; |
| | | } |
| | | //çæä¸ä¸ªç©ºçPDFæä»¶ |
| | | File file = new File(pdfPath.replace(".pdf", ".pdf")); |
| | | os = new FileOutputStream(file); |
| | | //è¦è½¬æ¢çwordæä»¶ |
| | | com.aspose.words.Document doc = new com.aspose.words.Document(wordPath); |
| | | doc.save(os, SaveFormat.PDF); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | if (os != null) { |
| | | try { |
| | | os.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.yuanchu.mom.mapper.ManageMeetingMapper; |
| | | import com.yuanchu.mom.pojo.ManageMeeting; |
| | | import com.yuanchu.mom.pojo.ManageMeetingParticipants; |
| | | import com.yuanchu.mom.mapper.ManageMeetingParticipantsMapper; |
| | | import com.yuanchu.mom.service.ManageMeetingParticipantsService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.vo.MeetingParticipantsDetailsVo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 09:34:27 |
| | | */ |
| | | @Service |
| | | public class ManageMeetingParticipantsServiceImpl extends ServiceImpl<ManageMeetingParticipantsMapper, ManageMeetingParticipants> implements ManageMeetingParticipantsService { |
| | | |
| | | |
| | | @Resource |
| | | private ManageMeetingMapper manageMeetingMapper; |
| | | |
| | | @Override |
| | | public MeetingParticipantsDetailsVo getParticipants(Integer id) { |
| | | ManageMeeting manageMeeting = manageMeetingMapper.selectById(id); |
| | | QueryWrapper<ManageMeetingParticipants> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("meeting_id",id); |
| | | List<ManageMeetingParticipants> participantsList = this.baseMapper.selectList(queryWrapper); |
| | | MeetingParticipantsDetailsVo vo = new MeetingParticipantsDetailsVo(); |
| | | vo.setManageMeeting(manageMeeting); |
| | | vo.setParticipantsList(participantsList); |
| | | return vo; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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.InternalMeetingParticipantDto; |
| | | import com.yuanchu.mom.dto.ManageMeetingDto; |
| | | import com.yuanchu.mom.dto.ManageMeetingParticipantsDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.DepartmentMapper; |
| | | import com.yuanchu.mom.mapper.ManageMeetingParticipantsMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ManageMeeting; |
| | | import com.yuanchu.mom.mapper.ManageMeetingMapper; |
| | | import com.yuanchu.mom.pojo.ManageMeetingParticipants; |
| | | import com.yuanchu.mom.pojo.ManageReviewProgram; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ManageMeetingService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.util.HackLoopTableRenderPolicy; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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.sql.Wrapper; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-11 09:33:47 |
| | | */ |
| | | @Service |
| | | public class ManageMeetingServiceImpl extends ServiceImpl<ManageMeetingMapper, ManageMeeting> implements ManageMeetingService { |
| | | |
| | | |
| | | @Resource |
| | | private ManageMeetingParticipantsMapper manageMeetingParticipantsMapper; |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | @Override |
| | | public IPage<ManageMeetingDto> page(Page page, String startTime, String endTime, String place) { |
| | | IPage<ManageMeetingDto> iPage = this.baseMapper.page(page, startTime, endTime, place); |
| | | for (ManageMeetingDto record : iPage.getRecords()) { |
| | | List<ManageMeetingParticipants> manageMeetingParticipants = manageMeetingParticipantsMapper.selectList(Wrappers.<ManageMeetingParticipants>lambdaQuery().eq(ManageMeetingParticipants::getMeetingId, record.getId())); |
| | | String collect = manageMeetingParticipants.stream().map(manageMeetingParticipants1 -> { |
| | | return manageMeetingParticipants1.getParticipants() + ""; |
| | | }).collect(Collectors.joining(",")); |
| | | record.setParticipant(collect); |
| | | } |
| | | return iPage; |
| | | } |
| | | |
| | | @Override |
| | | public void addMeeting(ManageMeetingDto dto) { |
| | | this.baseMapper.insert(dto); |
| | | |
| | | String[] ids = dto.getParticipant().split(","); |
| | | List<ManageMeetingParticipants> list = new ArrayList<>(); |
| | | for (String id : ids) { |
| | | User user = userMapper.selectById(id); |
| | | ManageMeetingParticipants participants = new ManageMeetingParticipants(); |
| | | participants.setMeetingId(dto.getId()); |
| | | participants.setParticipants(Integer.parseInt(id)); |
| | | participants.setDepartment(user.getDepartment()); |
| | | list.add(participants); |
| | | } |
| | | list.forEach(v -> manageMeetingParticipantsMapper.insert(v)); |
| | | } |
| | | |
| | | @Override |
| | | public int modifyMeeting(ManageMeetingDto manageMeetingDto) { |
| | | this.baseMapper.updateById(manageMeetingDto); |
| | | manageMeetingParticipantsMapper.delete(Wrappers.<ManageMeetingParticipants>lambdaQuery().eq(ManageMeetingParticipants::getMeetingId, manageMeetingDto.getId())); |
| | | String[] ids = manageMeetingDto.getParticipant().split(","); |
| | | List<ManageMeetingParticipants> list = new ArrayList<>(); |
| | | for (String id : ids) { |
| | | User user = userMapper.selectById(id); |
| | | ManageMeetingParticipants participants = new ManageMeetingParticipants(); |
| | | participants.setMeetingId(manageMeetingDto.getId()); |
| | | participants.setParticipants(Integer.parseInt(id)); |
| | | participants.setDepartment(user.getDepartment()); |
| | | list.add(participants); |
| | | } |
| | | list.forEach(v -> manageMeetingParticipantsMapper.insert(v)); |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public void exportMeeting(Integer id, HttpServletResponse response) { |
| | | ManageMeeting meeting = baseMapper.selectById(id); |
| | | // æ¥è¯¢åå 人å |
| | | List<ManageMeetingParticipants> manageMeetingParticipants = manageMeetingParticipantsMapper.selectList(Wrappers.<ManageMeetingParticipants>lambdaQuery().eq(ManageMeetingParticipants::getMeetingId, id)); |
| | | |
| | | List<ManageMeetingParticipants> list = manageMeetingParticipants.stream().map(manageMeetingParticipants1 -> { |
| | | manageMeetingParticipants1.setUserName(userMapper.selectById(manageMeetingParticipants1.getParticipants()).getName()); |
| | | manageMeetingParticipants1.setDepartment(userMapper.selectUserDepartmentLimsName(manageMeetingParticipants1.getParticipants())); |
| | | return manageMeetingParticipants1; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | |
| | | // å建空对象 |
| | | List<ManageMeetingParticipantsDto> participants = new ArrayList<>(); |
| | | |
| | | // æ·»å åå 人å |
| | | for (int i = 0; i < list.size(); i++) { |
| | | // å¤æææ²¡æå°11è¡ |
| | | if (i % 2 == 0) { |
| | | ManageMeetingParticipantsDto manageMeetingParticipantsDto = new ManageMeetingParticipantsDto(); |
| | | manageMeetingParticipantsDto.setUserName1(list.get(i).getUserName()); |
| | | manageMeetingParticipantsDto.setDepartment1(list.get(i).getDepartment()); |
| | | participants.add(manageMeetingParticipantsDto); |
| | | } else { |
| | | participants.get((i-1)/2).setUserName2(list.get(i).getUserName()); |
| | | participants.get((i-1)/2).setDepartment2(list.get(i).getDepartment()); |
| | | } |
| | | } |
| | | |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/review-meet.docx"); |
| | | |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"); |
| | | Configure configure = Configure.builder() |
| | | .bind("meetingDetails", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("meeting", meeting); |
| | | put("meetingTime", meeting.getMeetingTime().format(formatter)); |
| | | put("meetingDetails", participants); |
| | | }}); |
| | | |
| | | 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.lang.UUID; |
| | | 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.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ManageDocumentAlter; |
| | | import com.yuanchu.mom.pojo.ManageRecordAudit; |
| | | import com.yuanchu.mom.mapper.ManageRecordAuditMapper; |
| | | import com.yuanchu.mom.pojo.ManageRecordCancel; |
| | | import com.yuanchu.mom.service.ManageRecordAuditService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.apache.commons.io.IOUtils; |
| | | 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.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Paths; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 10:29:18 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ManageRecordAuditServiceImpl extends ServiceImpl<ManageRecordAuditMapper, ManageRecordAudit> implements ManageRecordAuditService { |
| | | |
| | | @Resource |
| | | private ManageRecordAuditMapper manageRecordAuditMapper; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageRecordAudit(Page page, ManageRecordAudit manageRecordAudit) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageRecordAudit.class)); |
| | | IPage<ManageRecordAudit> manageRecordAuditIPage = manageRecordAuditMapper.pageManageRecordAudit(page, QueryWrappers.queryWrappers(manageRecordAudit)); |
| | | for (ManageRecordAudit record : manageRecordAuditIPage.getRecords()) { |
| | | String limsName = userMapper.selectUserDepartmentLimsName(record.getCreateUser()); |
| | | record.setCreateUserDepart(limsName); |
| | | } |
| | | map.put("body", manageRecordAuditIPage); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int addManageRecordAudit(ManageRecordAudit manageRecordAudit) { |
| | | if (ObjectUtils.isNotEmpty(manageRecordAudit.getFile())) { |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | MultipartFile file = manageRecordAudit.getFile(); |
| | | //ä¸ä¼ æ°æä»¶ |
| | | path = wordUrl; |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return 0; |
| | | } |
| | | manageRecordAudit.setAfterUrl(pathName); |
| | | } |
| | | manageRecordAudit.setCreateTime(LocalDate.now()); |
| | | return manageRecordAuditMapper.insert(manageRecordAudit); |
| | | } |
| | | |
| | | @Override |
| | | public int doManageRecordAudit(ManageRecordAudit manageRecordAudit) { |
| | | ManageRecordAudit recordAudit= manageRecordAuditMapper.selectById(manageRecordAudit.getId()); |
| | | if (ObjectUtils.isNotEmpty(manageRecordAudit.getFile())) { |
| | | if (ObjectUtils.isNotEmpty(recordAudit.getAfterUrl())) { |
| | | // å 餿§æä»¶ |
| | | File oldFile = new File(wordUrl + "/" + recordAudit.getAfterUrl()); |
| | | oldFile.delete(); |
| | | } |
| | | //ä¸ä¼ æ°æä»¶ |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | MultipartFile file = manageRecordAudit.getFile(); |
| | | path = wordUrl; |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | manageRecordAudit.setAfterUrl(pathName); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return 0; |
| | | } |
| | | } |
| | | return manageRecordAuditMapper.updateById(manageRecordAudit); |
| | | } |
| | | |
| | | @Override |
| | | public int ratifyManageRecordAudit(Integer id) { |
| | | ManageRecordAudit recordAudit = manageRecordAuditMapper.selectById(id); |
| | | recordAudit.setRatifyUser(getLook.selectPowerByMethodAndUserId(null).get("userId")); |
| | | return manageRecordAuditMapper.updateById(recordAudit); |
| | | } |
| | | |
| | | @Override |
| | | public String exportOutManageRecordAudit(ManageRecordAudit manageRecordAudit, HttpServletResponse response) { |
| | | List<ManageRecordAudit> manageRecordAuditList = manageRecordAuditMapper.pageManageRecordAudit(new Page(-1, -1), QueryWrappers.queryWrappers(manageRecordAudit)).getRecords(); |
| | | for (ManageRecordAudit record : manageRecordAuditList) { |
| | | String limsName = userMapper.selectUserDepartmentLimsName(record.getCreateUser()); |
| | | record.setCreateUserDepart(limsName); |
| | | } |
| | | //çææ£éªæ¥ååæ¾ç»è®°è¡¨ |
| | | String url; |
| | | try { |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/audit-deal.docx"); |
| | | File file = File.createTempFile("temp", ".tmp"); |
| | | OutputStream outputStream = new FileOutputStream(file); |
| | | IOUtils.copy(inputStream, outputStream); |
| | | url = file.getAbsolutePath(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¨¡æ¿æä»¶"); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | |
| | | List<Map<String, Object>> auditList = new ArrayList<>(); |
| | | Integer index = 1; |
| | | Integer index1 = 1; |
| | | for (int c = 0; c < manageRecordAuditList.size(); c++) { |
| | | //è¶
è¿15è¡æ¢é¡µ |
| | | if (c % 15 == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (int i = 0; i < 17; 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 < 11; 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("åºå·@No.â1"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("æä»¶ç¼å·@File numberâ2"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("ç« èå·@Chapter numberâ3"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText("页ç @Page numberâ4"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("修订次æ°@Number of revisionsâ5"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5 || j == 6) { |
| | | //第å
å |
| | | textRenderData.setText("çæ¬å· Version numberâ6"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 7) { |
| | | //第ä¸å |
| | | textRenderData.setText("修订å
容@Revision of contentsâ7"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 8) { |
| | | //第å
«å |
| | | textRenderData.setText("修订人@Revisedâ8"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 9 ) { |
| | | //第ä¹å |
| | | textRenderData.setText("æ¹å人@Approverâ9"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第åå |
| | | textRenderData.setText("æ¥æ@Dateâ10"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i == 1) { |
| | | //第ä¸è¡ |
| | | if (j == 0) { |
| | | //第ä¸ååºå· |
| | | textRenderData.setText("åºå·@No.â1"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("æä»¶ç¼å·@File numberâ2"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("ç« èå·@Chapter numberâ3"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText("页ç @Page numberâ4"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("修订次æ°@Number of revisionsâ5"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5 ) { |
| | | //第å
å |
| | | textRenderData.setText("ä¿®æ¹å@Before modification"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6) { |
| | | //第ä¸å |
| | | textRenderData.setText("ä¿®æ¹å@After modification"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 7) { |
| | | //第ä¸å |
| | | textRenderData.setText("修订å
容@Revision of contentsâ7"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 8) { |
| | | //第å
«å |
| | | textRenderData.setText("修订人@Revisedâ8"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 9 ) { |
| | | //第ä¹å |
| | | textRenderData.setText("æ¹å人@Approverâ9"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第åå |
| | | textRenderData.setText("æ¥æ@Dateâ10"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else { |
| | | //å
¶ä»è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | try { |
| | | String insReportCode = manageRecordAuditList.get((i - 2) + (index1 - 1) * 15).getDocumentCode(); |
| | | textRenderData.setText(index + ""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | index++; |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | try { |
| | | textRenderData.setText(manageRecordAuditList.get((i - 2) + (index1 - 1) * 15).getDocumentCode()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | try { |
| | | textRenderData.setText(manageRecordAuditList.get((i - 2) + (index1 - 1) * 15).getCapter()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | try { |
| | | textRenderData.setText(manageRecordAuditList.get((i - 2) + (index1 - 1) * 15).getPages()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | try { |
| | | textRenderData.setText(manageRecordAuditList.get((i - 2) + (index1 - 1) * 15).getNumber()+""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | try { |
| | | textRenderData.setText(manageRecordAuditList.get((i - 2) + (index1 - 1) * 15).getBeforeVersion()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6) { |
| | | try { |
| | | textRenderData.setText(manageRecordAuditList.get((i - 2) + (index1 - 1) * 15).getAfterVersion()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 7) { |
| | | try { |
| | | textRenderData.setText(manageRecordAuditList.get((i - 2) + (index1 - 1) * 15).getAlterThing()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 8) { |
| | | try { |
| | | textRenderData.setText(manageRecordAuditList.get((i - 2) + (index1 - 1) * 15).getAlterUserName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else if (j == 9) { |
| | | try { |
| | | textRenderData.setText(manageRecordAuditList.get((i - 2) + (index1 - 1) * 15).getRatifyUserName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | try { |
| | | textRenderData.setText(manageRecordAuditList.get((i - 2) + (index1 - 1) * 15).getDate()+""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | 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); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("audit", tableRenderData); |
| | | table.put("index1", index1); |
| | | auditList.add(table); |
| | | index1++; |
| | | } |
| | | } |
| | | Integer finalIndex = index1; |
| | | XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("size", finalIndex); |
| | | put("cancelList", auditList); |
| | | }}); |
| | | String name = UUID.randomUUID() + "_æä»¶ä¿®è®¢è¡¨" + ".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; |
| | | } |
| | | |
| | | // æ°´å¹³åå¹¶åå
æ ¼ |
| | | 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 cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | 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.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.controller.ManageRecordCancelController; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.ManageRecordIssueRecycleMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ManageRecordCancel; |
| | | import com.yuanchu.mom.mapper.ManageRecordCancelMapper; |
| | | import com.yuanchu.mom.pojo.ManageRecordIssueRecycle; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ManageRecordCancelService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.poi.openxml4j.util.ZipSecureFile; |
| | | import org.apache.poi.xwpf.usermodel.*; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Paths; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½åºæä»¶ééè®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 01:27:22 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ManageRecordCancelServiceImpl extends ServiceImpl<ManageRecordCancelMapper, ManageRecordCancel> implements ManageRecordCancelService { |
| | | |
| | | @Resource |
| | | private ManageRecordCancelMapper manageRecordCancelMapper; |
| | | |
| | | @Resource |
| | | private GetLook getLook; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageRecordCancel(Page page, ManageRecordCancel manageRecordCancel) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageRecordCancel.class)); |
| | | map.put("body", manageRecordCancelMapper.pageManageRecordCancel(page, QueryWrappers.queryWrappers(manageRecordCancel))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int ratifyManageRecordCancel(Integer id, String ratifyState) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | ManageRecordCancel manageRecordCancel = manageRecordCancelMapper.selectById(id); |
| | | manageRecordCancel.setRatifyUser(userId); |
| | | manageRecordCancel.setRatifyTime(LocalDate.now()); |
| | | manageRecordCancel.setRatifyState(ratifyState); |
| | | return manageRecordCancelMapper.updateById(manageRecordCancel); |
| | | } |
| | | |
| | | @Override |
| | | public String exportOutManageRecordCancel(ManageRecordCancel manageRecordCancel, HttpServletResponse response) { |
| | | List<ManageRecordCancel> manageRecordCancelList = manageRecordCancelMapper.pageManageRecordCancel(new Page(-1, -1), QueryWrappers.queryWrappers(manageRecordCancel)).getRecords(); |
| | | //çææ£éªæ¥ååæ¾ç»è®°è¡¨ |
| | | String url; |
| | | try { |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/cancel-deal.docx"); |
| | | File file = File.createTempFile("temp", ".tmp"); |
| | | OutputStream outputStream = new FileOutputStream(file); |
| | | IOUtils.copy(inputStream, outputStream); |
| | | url = file.getAbsolutePath(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¨¡æ¿æä»¶"); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | |
| | | List<Map<String, Object>> cancelList = new ArrayList<>(); |
| | | Integer index = 1; |
| | | Integer index1 = 1; |
| | | for (int c = 0; c < manageRecordCancelList.size(); c++) { |
| | | //è¶
è¿15è¡æ¢é¡µ |
| | | if (c % 15 == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (int i = 0; i < 16; 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 < 10; 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("åºå·@No."); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("æä»¶ç¼å·@File number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("æä»¶(è®°å½)åç§°@File (record) name"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText("æ°é@Quantity"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("鿝åå @Reason for destruction"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | //第å
å |
| | | textRenderData.setText("ç³è¯·äºº@Applicant"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ¥æ@Date"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 7) { |
| | | //第å
«å |
| | | textRenderData.setText("æ¹å@Approve"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 8 ) { |
| | | //第ä¹å |
| | | textRenderData.setText("æ¥æ@Date"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第åå |
| | | textRenderData.setText("夿³¨@Remark"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else { |
| | | //å
¶ä»è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | try { |
| | | String insReportCode = manageRecordCancelList.get((i - 1) + (index1 - 1) * 15).getDocumentCode(); |
| | | textRenderData.setText(index + ""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | index++; |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | try { |
| | | textRenderData.setText(manageRecordCancelList.get((i - 1) + (index1 - 1) * 15).getDocumentCode()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | try { |
| | | textRenderData.setText(manageRecordCancelList.get((i - 1) + (index1 - 1) * 15).getDocumentName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | try { |
| | | textRenderData.setText(manageRecordCancelList.get((i - 1) + (index1 - 1) * 15).getQty()+""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | try { |
| | | textRenderData.setText(manageRecordCancelList.get((i - 1) + (index1 - 1) * 15).getReason()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | try { |
| | | textRenderData.setText(manageRecordCancelList.get((i - 1) + (index1 - 1) * 15).getCreateUserName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6) { |
| | | try { |
| | | textRenderData.setText(manageRecordCancelList.get((i - 1) + (index1 - 1) * 15).getCreateTime()+""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 7) { |
| | | try { |
| | | textRenderData.setText(manageRecordCancelList.get((i - 1) + (index1 - 1) * 15).getRatifyUserName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 8) { |
| | | try { |
| | | textRenderData.setText(manageRecordCancelList.get((i - 1) + (index1 - 1) * 15).getRatifyTime()+""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else { |
| | | try { |
| | | textRenderData.setText(manageRecordCancelList.get((i - 1) + (index1 - 1) * 15).getRemark()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | 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); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("cancel", tableRenderData); |
| | | table.put("index1", index1); |
| | | cancelList.add(table); |
| | | index1++; |
| | | } |
| | | } |
| | | Integer finalIndex = index1; |
| | | XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("size", finalIndex); |
| | | put("cancelList", cancelList); |
| | | }}); |
| | | String name = UUID.randomUUID() + "_æä»¶éæ¯ç³è¯·è¡¨" + ".docx"; |
| | | try { |
| | | template.writeAndClose(Files.newOutputStream(Paths.get(wordUrl + "/" + name))); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | String path = wordUrl + "/" + name; |
| | | //å¤çä¸è±ææ¢è¡çé®é¢ |
| | | 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; |
| | | } |
| | | |
| | | @Override |
| | | public int exportInManageRecordCancel(MultipartFile file) { |
| | | List<ManageRecordCancel> manageRecordCancelList = new ArrayList<>(); |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | try { |
| | | InputStream inputStream = file.getInputStream(); |
| | | XWPFDocument document = new XWPFDocument(inputStream); |
| | | List<XWPFTable> tables = document.getTables(); |
| | | if (tables.isEmpty()) { |
| | | throw new ErrorException("ææ¡£ä¸æ²¡æè¡¨æ ¼"); |
| | | } |
| | | |
| | | for (XWPFTable table : tables) { |
| | | List<XWPFTableRow> rows = table.getRows(); |
| | | if (rows.size() <= 1) { |
| | | throw new ErrorException("è¡¨æ ¼æ²¡ææ°æ®è¡"); |
| | | } |
| | | for (int i = 1; i < rows.size(); i++) { // ä»ç¬¬äºè¡å¼å§ï¼è·³è¿è¡¨å¤´ |
| | | XWPFTableRow row = rows.get(i); |
| | | if (row.getTableCells().size() != 10) { |
| | | System.out.println("è¡ " + (i + 1) + " çåæ°ä¸å¹é
ï¼è·³è¿è¯¥è¡"); |
| | | continue; |
| | | } |
| | | if (ObjectUtils.isNotEmpty(row.getCell(1).getText())) { |
| | | ManageRecordCancel manageRecordCancel = new ManageRecordCancel(); |
| | | manageRecordCancel.setDocumentCode(row.getCell(1).getText()); |
| | | manageRecordCancel.setDocumentName(row.getCell(2).getText()); |
| | | manageRecordCancel.setQty(Integer.valueOf(row.getCell(3).getText())); |
| | | manageRecordCancel.setReason(row.getCell(4).getText()); |
| | | try { |
| | | manageRecordCancel.setCreateUser(userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, row.getCell(5).getText())).getId()); |
| | | } catch (Exception e) { |
| | | manageRecordCancel.setCreateUser(null); |
| | | } |
| | | try { |
| | | manageRecordCancel.setRatifyUser(userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, row.getCell(7).getText())).getId()); |
| | | } catch (Exception e) { |
| | | manageRecordCancel.setRatifyUser(null); |
| | | } |
| | | try { |
| | | manageRecordCancel.setCreateTime(LocalDate.parse(row.getCell(6).getText(), dateTimeFormatter)); |
| | | } catch (Exception e) { |
| | | manageRecordCancel.setCreateTime(null); |
| | | } |
| | | try { |
| | | manageRecordCancel.setRatifyTime(LocalDate.parse(row.getCell(8).getText(), dateTimeFormatter)); |
| | | } catch (Exception e) { |
| | | manageRecordCancel.setRatifyTime(null); |
| | | } |
| | | manageRecordCancel.setRemark(row.getCell(9).getText()); |
| | | ManageRecordCancel cancel = manageRecordCancelMapper.selectOne(Wrappers.<ManageRecordCancel>lambdaQuery() |
| | | .eq(ManageRecordCancel::getDocumentCode, manageRecordCancel.getDocumentCode()) |
| | | .eq(ManageRecordCancel::getDocumentName, manageRecordCancel.getDocumentName())); |
| | | if (ObjectUtils.isNotEmpty(cancel)) { |
| | | manageRecordCancel.setId(cancel.getId()); |
| | | } |
| | | manageRecordCancelList.add(manageRecordCancel); |
| | | } |
| | | } |
| | | } |
| | | saveOrUpdateBatch(manageRecordCancelList); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | 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.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ManageRecordCheck; |
| | | import com.yuanchu.mom.mapper.ManageRecordCheckMapper; |
| | | import com.yuanchu.mom.pojo.ManageRecordTotal; |
| | | import com.yuanchu.mom.pojo.ManageRecordVerify; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ManageRecordCheckService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.poi.xwpf.usermodel.*; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Paths; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®¡æ¹è®°å½(å«ä¿®è®¢å忬¡å®¡æ¹è®°å½) æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 02:31:36 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ManageRecordCheckServiceImpl extends ServiceImpl<ManageRecordCheckMapper, ManageRecordCheck> implements ManageRecordCheckService { |
| | | |
| | | @Resource |
| | | private ManageRecordCheckMapper manageRecordCheckMapper; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageRecordCheck(Page page, ManageRecordCheck manageRecordCheck) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageRecordCheck.class)); |
| | | map.put("body", manageRecordCheckMapper.pageManageRecordCheck(page, QueryWrappers.queryWrappers(manageRecordCheck))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int checkManageRecordCheck(Integer id, String checkState) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | ManageRecordCheck manageRecordCheck = manageRecordCheckMapper.selectById(id); |
| | | manageRecordCheck.setCheckState(checkState); |
| | | manageRecordCheck.setCheckUser(userId); |
| | | return manageRecordCheckMapper.updateById(manageRecordCheck); |
| | | } |
| | | |
| | | @Override |
| | | public int ratifyManageRecordCheck(Integer id, String ratifyState) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | ManageRecordCheck manageRecordCheck = manageRecordCheckMapper.selectById(id); |
| | | manageRecordCheck.setRatifyState(ratifyState); |
| | | manageRecordCheck.setRatifyUser(userId); |
| | | return manageRecordCheckMapper.updateById(manageRecordCheck); |
| | | } |
| | | |
| | | @Override |
| | | public String exportOutManageRecordCheck(ManageRecordCheck manageRecordCheck, HttpServletResponse response) { |
| | | List<ManageRecordCheck> manageRecordCheckList = manageRecordCheckMapper.pageManageRecordCheck(new Page(-1, -1), QueryWrappers.queryWrappers(manageRecordCheck)).getRecords(); |
| | | //çææ£éªæ¥ååæ¾ç»è®°è¡¨ |
| | | String url; |
| | | try { |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/check-deal.docx"); |
| | | File file = File.createTempFile("temp", ".tmp"); |
| | | OutputStream outputStream = new FileOutputStream(file); |
| | | IOUtils.copy(inputStream, outputStream); |
| | | url = file.getAbsolutePath(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¨¡æ¿æä»¶"); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | |
| | | List<Map<String, Object>> checkList = new ArrayList<>(); |
| | | Integer index = 1; |
| | | Integer index1 = 1; |
| | | for (int c = 0; c < manageRecordCheckList.size(); c++) { |
| | | //è¶
è¿20è¡æ¢é¡µ |
| | | if (c % 20 == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (int i = 0; i < 21; 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 < 9; 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("åºå·@No."); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("æä»¶åç§°@File name"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("æä»¶ç¼å·@File number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText("ç/次@Edition/time"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("ç¼å¶@Editor"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | //第å
å |
| | | textRenderData.setText("å®¡æ ¸@Audit"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ¹å@Approve"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 7) { |
| | | //第å
«å |
| | | textRenderData.setText("æ¹åæ¥æ@Date of approve"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第ä¹å |
| | | textRenderData.setText("夿³¨@Remark"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } else { |
| | | //å
¶ä»è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | try { |
| | | String insReportCode = manageRecordCheckList.get((i - 1) + (index1 - 1) * 20).getDocumentName(); |
| | | textRenderData.setText(index + ""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | index++; |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | try { |
| | | textRenderData.setText(manageRecordCheckList.get((i - 1) + (index1 - 1) * 20).getDocumentName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | try { |
| | | textRenderData.setText(manageRecordCheckList.get((i - 1) + (index1 - 1) * 20).getDocumentCode()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | try { |
| | | textRenderData.setText(manageRecordCheckList.get((i - 1) + (index1 - 1) * 20).getDocumentVersion()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | try { |
| | | textRenderData.setText(manageRecordCheckList.get((i - 1) + (index1 - 1) * 20).getWriteUserName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | try { |
| | | textRenderData.setText(manageRecordCheckList.get((i - 1) + (index1 - 1) * 20).getCheckUserName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6) { |
| | | try { |
| | | textRenderData.setText(manageRecordCheckList.get((i - 1) + (index1 - 1) * 20).getRatifyUserName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 7) { |
| | | try { |
| | | textRenderData.setText(manageRecordCheckList.get((i - 1) + (index1 - 1) * 20).getRatifyDate() + ""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | try { |
| | | textRenderData.setText(manageRecordCheckList.get((i - 1) + (index1 - 1) * 20).getRemark()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | 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); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("check", tableRenderData); |
| | | table.put("index1", index1); |
| | | checkList.add(table); |
| | | index1++; |
| | | } |
| | | } |
| | | Integer finalIndex = index1; |
| | | XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("size", finalIndex); |
| | | put("checkList", checkList); |
| | | }}); |
| | | String name = UUID.randomUUID() + "_æä»¶å®¡æ¹è®°å½" + ".docx"; |
| | | try { |
| | | template.writeAndClose(Files.newOutputStream(Paths.get(wordUrl + "/" + name))); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | //å¤çä¸è±ææ¢è¡çé®é¢ |
| | | String path = wordUrl + "/" + name; |
| | | 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; |
| | | } |
| | | |
| | | @Override |
| | | public int exportInManageRecordCheck(MultipartFile file) { |
| | | List<ManageRecordCheck> manageRecordCheckList = new ArrayList<>(); |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | try { |
| | | InputStream inputStream = file.getInputStream(); |
| | | XWPFDocument document = new XWPFDocument(inputStream); |
| | | List<XWPFTable> tables = document.getTables(); |
| | | if (tables.isEmpty()) { |
| | | throw new ErrorException("ææ¡£ä¸æ²¡æè¡¨æ ¼"); |
| | | } |
| | | |
| | | for (XWPFTable table : tables) { |
| | | List<XWPFTableRow> rows = table.getRows(); |
| | | if (rows.size() <= 1) { |
| | | throw new ErrorException("è¡¨æ ¼æ²¡ææ°æ®è¡"); |
| | | } |
| | | for (int i = 1; i < rows.size(); i++) { // ä»ç¬¬äºè¡å¼å§ï¼è·³è¿è¡¨å¤´ |
| | | XWPFTableRow row = rows.get(i); |
| | | if (row.getTableCells().size() != 9) { |
| | | System.out.println("è¡ " + (i + 1) + " çåæ°ä¸å¹é
ï¼è·³è¿è¯¥è¡"); |
| | | continue; |
| | | } |
| | | if (ObjectUtils.isNotEmpty(row.getCell(1).getText())) { |
| | | ManageRecordCheck manageRecordCheck = new ManageRecordCheck(); |
| | | manageRecordCheck.setDocumentName(row.getCell(1).getText()); |
| | | manageRecordCheck.setDocumentCode(row.getCell(2).getText()); |
| | | manageRecordCheck.setDocumentVersion(row.getCell(3).getText()); |
| | | try { |
| | | manageRecordCheck.setWriteUser(userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, row.getCell(4).getText())).getId()); |
| | | } catch (Exception e) { |
| | | manageRecordCheck.setWriteUser(null); |
| | | } |
| | | try { |
| | | manageRecordCheck.setCheckUser(userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, row.getCell(5).getText())).getId()); |
| | | } catch (Exception e) { |
| | | manageRecordCheck.setCheckUser(null); |
| | | } |
| | | try { |
| | | manageRecordCheck.setRatifyUser(userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, row.getCell(6).getText())).getId()); |
| | | } catch (Exception e) { |
| | | manageRecordCheck.setRatifyUser(null); |
| | | } |
| | | try { |
| | | manageRecordCheck.setRatifyDate(LocalDate.parse(row.getCell(7).getText(), dateTimeFormatter)); |
| | | } catch (Exception e) { |
| | | manageRecordCheck.setRatifyDate(null); |
| | | } |
| | | |
| | | manageRecordCheck.setRemark(row.getCell(8).getText()); |
| | | ManageRecordCheck check = manageRecordCheckMapper.selectOne(Wrappers.<ManageRecordCheck>lambdaQuery() |
| | | .eq(ManageRecordCheck::getDocumentCode, manageRecordCheck.getDocumentCode()) |
| | | .eq(ManageRecordCheck::getDocumentName, manageRecordCheck.getDocumentName()) |
| | | .eq(ManageRecordCheck::getDocumentVersion, manageRecordCheck.getDocumentVersion())); |
| | | if (ObjectUtils.isNotEmpty(check)) { |
| | | manageRecordCheck.setId(check.getId()); |
| | | } |
| | | manageRecordCheckList.add(manageRecordCheck); |
| | | } |
| | | } |
| | | } |
| | | saveOrUpdateBatch(manageRecordCheckList); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | 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.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.ManageRecordIntervalsTotalMapper; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.mapper.ManageRecordIntervalsMapper; |
| | | import com.yuanchu.mom.service.ManageRecordIntervalsService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.apache.commons.io.IOUtils; |
| | | 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.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Paths; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®æå®¡æ¥è®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 10:54:31 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ManageRecordIntervalsServiceImpl extends ServiceImpl<ManageRecordIntervalsMapper, ManageRecordIntervals> implements ManageRecordIntervalsService { |
| | | |
| | | @Resource |
| | | private ManageRecordIntervalsMapper manageRecordIntervalsMapper; |
| | | |
| | | @Resource |
| | | private ManageRecordIntervalsTotalMapper manageRecordIntervalsTotalMapper; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageRecordIntervals(Page page, ManageRecordIntervals manageRecordIntervals) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageRecordIntervals.class)); |
| | | map.put("body", manageRecordIntervalsMapper.pageManageRecordIntervals(page, QueryWrappers.queryWrappers(manageRecordIntervals))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public String exportOutManageRecordIntervals(ManageRecordIntervals manageRecordIntervals, HttpServletResponse response) { |
| | | List<ManageRecordIntervals> manageRecordIntervalsList = manageRecordIntervalsMapper.pageManageRecordIntervals(new Page(-1, -1), QueryWrappers.queryWrappers(manageRecordIntervals)).getRecords(); |
| | | //çææ£éªæ¥ååæ¾ç»è®°è¡¨ |
| | | String url; |
| | | try { |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/intervals-deal.docx"); |
| | | File file = File.createTempFile("temp", ".tmp"); |
| | | OutputStream outputStream = new FileOutputStream(file); |
| | | IOUtils.copy(inputStream, outputStream); |
| | | url = file.getAbsolutePath(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¨¡æ¿æä»¶"); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | |
| | | List<Map<String, Object>> intervalsList = new ArrayList<>(); |
| | | Integer index = 1; |
| | | Integer index1 = 1; |
| | | for (int c = 0; c < manageRecordIntervalsList.size(); c++) { |
| | | //è¶
è¿15è¡æ¢é¡µ |
| | | if (c % 15 == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (int i = 0; i < 17; 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 < 7; 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("åºå·@No."); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("æä»¶åç§°@File name"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("æä»¶ç¼å·@File number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText("çæ¬å·@Version number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("修订å·@Revision number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | //第å
å |
| | | textRenderData.setText("é宿§@Suitability"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第ä¸å |
| | | textRenderData.setText("夿³¨@Remark"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i == 16) { |
| | | //æåä¸è¡ |
| | | textRenderData.setText("注ï¼é宿§ä¸æ æâââè¡¨æ¤æä»¶éå®ï¼âÃâ表示ä¸éå®ï¼æä»¶é修订æä½åºã@Note:Theâââtable in the suitability column is suitable for this document, theâÃâtable is not suitable,and the document needs to berevised or invalidated @å®¡æ¥æ¥æï¼ @Review Date:@åå 审æ¥äººåç¾åï¼@Signatures of the reviewers particip ating in the review:â1"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | //å
¶ä»è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | try { |
| | | String insReportCode = manageRecordIntervalsList.get((i - 1) + (index1 - 1) * 15).getDocumentCode(); |
| | | textRenderData.setText(index + ""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | index++; |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | try { |
| | | textRenderData.setText(manageRecordIntervalsList.get((i - 1) + (index1 - 1) * 15).getDocumentName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | try { |
| | | textRenderData.setText(manageRecordIntervalsList.get((i - 1) + (index1 - 1) * 15).getDocumentCode()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | try { |
| | | textRenderData.setText(manageRecordIntervalsList.get((i - 1) + (index1 - 1) * 15).getDocumentVersion()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | try { |
| | | textRenderData.setText(manageRecordIntervalsList.get((i -1) + (index1 - 1) * 15).getRevision()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | try { |
| | | textRenderData.setText(manageRecordIntervalsList.get((i - 1) + (index1 - 1) * 15).getSuitability()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | try { |
| | | textRenderData.setText(manageRecordIntervalsList.get((i - 1) + (index1 - 1) * 15).getRemark() ); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | 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); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("intervals", tableRenderData); |
| | | table.put("index1", index1); |
| | | intervalsList.add(table); |
| | | index1++; |
| | | } |
| | | } |
| | | Integer finalIndex = index1; |
| | | XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("size", finalIndex); |
| | | put("intervalsList", intervalsList); |
| | | }}); |
| | | String name = UUID.randomUUID() + "_æä»¶å®æå®¡æ¥è®°å½è¡¨" + ".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; |
| | | } |
| | | |
| | | @Override |
| | | public int exportInManageRecordIntervals(MultipartFile file) { |
| | | List<ManageRecordIntervals> manageRecordIntervalsList = new ArrayList<>(); |
| | | |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | //è·åå½å年份 |
| | | LocalDate currentDate = LocalDate.now(); |
| | | // å®ä¹æ¥ææ ¼å¼ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy"); |
| | | // æ ¼å¼åå½åæ¥æ |
| | | String currentMonth = currentDate.format(formatter); |
| | | ManageRecordIntervalsTotal manageRecordIntervalsTotal = manageRecordIntervalsTotalMapper.selectOne(Wrappers.<ManageRecordIntervalsTotal>lambdaQuery().eq(ManageRecordIntervalsTotal::getYear, currentMonth)); |
| | | try { |
| | | InputStream inputStream = file.getInputStream(); |
| | | XWPFDocument document = new XWPFDocument(inputStream); |
| | | List<XWPFTable> tables = document.getTables(); |
| | | if (tables.isEmpty()) { |
| | | throw new ErrorException("ææ¡£ä¸æ²¡æè¡¨æ ¼"); |
| | | } |
| | | for (XWPFTable table : tables) { |
| | | List<XWPFTableRow> rows = table.getRows(); |
| | | if (rows.size() <= 1) { |
| | | throw new ErrorException("è¡¨æ ¼æ²¡ææ°æ®è¡"); |
| | | } |
| | | for (int i = 1; i < rows.size(); i++) { // ä»ç¬¬äºè¡å¼å§ï¼è·³è¿è¡¨å¤´ |
| | | XWPFTableRow row = rows.get(i); |
| | | if (row.getTableCells().size() != 7) { |
| | | System.out.println("è¡ " + (i + 1) + " çåæ°ä¸å¹é
ï¼è·³è¿è¯¥è¡"); |
| | | continue; |
| | | } |
| | | if (ObjectUtils.isNotEmpty(row.getCell(1).getText())) { |
| | | ManageRecordIntervals manageRecordIntervals = new ManageRecordIntervals(); |
| | | manageRecordIntervals.setDocumentName(row.getCell(1).getText()); |
| | | manageRecordIntervals.setDocumentCode(row.getCell(2).getText()); |
| | | manageRecordIntervals.setDocumentVersion(row.getCell(3).getText()); |
| | | manageRecordIntervals.setRevision(row.getCell(4).getText()); |
| | | manageRecordIntervals.setSuitability(row.getCell(5).getText()); |
| | | manageRecordIntervals.setRemark(row.getCell(6).getText()); |
| | | manageRecordIntervals.setRecordIntervalsTotalId(manageRecordIntervalsTotal.getId()); |
| | | ManageRecordIntervals intervals = manageRecordIntervalsMapper.selectOne(Wrappers.<ManageRecordIntervals>lambdaQuery() |
| | | .eq(ManageRecordIntervals::getDocumentCode, manageRecordIntervals.getDocumentCode()) |
| | | .eq(ManageRecordIntervals::getDocumentName, manageRecordIntervals.getDocumentName()) |
| | | .eq(ManageRecordIntervals::getRecordIntervalsTotalId, manageRecordIntervalsTotal.getId()) |
| | | .eq(ManageRecordIntervals::getDocumentVersion, manageRecordIntervals.getDocumentVersion())); |
| | | if (ObjectUtils.isNotEmpty(intervals)) { |
| | | manageRecordIntervals.setId(intervals.getId()); |
| | | } |
| | | manageRecordIntervalsList.add(manageRecordIntervals); |
| | | } |
| | | } |
| | | } |
| | | saveOrUpdateBatch(manageRecordIntervalsList); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public int addManageRecordIntervals(ManageRecordIntervals manageRecordIntervals) { |
| | | //è·åå½å年份 |
| | | LocalDate currentDate = LocalDate.now(); |
| | | // å®ä¹æ¥ææ ¼å¼ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy"); |
| | | // æ ¼å¼åå½åæ¥æ |
| | | String currentMonth = currentDate.format(formatter); |
| | | ManageRecordIntervalsTotal manageRecordIntervalsTotal = manageRecordIntervalsTotalMapper.selectOne(Wrappers.<ManageRecordIntervalsTotal>lambdaQuery().eq(ManageRecordIntervalsTotal::getYear, currentMonth)); |
| | | manageRecordIntervals.setRecordIntervalsTotalId(manageRecordIntervalsTotal.getId()); |
| | | manageRecordIntervalsMapper.insert(manageRecordIntervals); |
| | | manageRecordIntervalsTotal.setTotalNum(1 + manageRecordIntervalsTotal.getTotalNum()); |
| | | return manageRecordIntervalsTotalMapper.updateById(manageRecordIntervalsTotal); |
| | | } |
| | | |
| | | @Override |
| | | public int delManageRecordIntervals(Integer id) { |
| | | ManageRecordIntervals manageRecordIntervals = manageRecordIntervalsMapper.selectById(id); |
| | | manageRecordIntervalsMapper.deleteById(id); |
| | | ManageRecordIntervalsTotal manageRecordIntervalsTotal = manageRecordIntervalsTotalMapper.selectById(manageRecordIntervals.getRecordIntervalsTotalId()); |
| | | manageRecordIntervalsTotal.setTotalNum(manageRecordIntervalsTotal.getTotalNum() - 1); |
| | | return manageRecordIntervalsTotalMapper.updateById(manageRecordIntervalsTotal); |
| | | } |
| | | |
| | | // æ°´å¹³åå¹¶åå
æ ¼ |
| | | 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 cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | 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.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.ManageRecordIntervalsMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.mapper.ManageRecordIntervalsTotalMapper; |
| | | import com.yuanchu.mom.service.ManageRecordIntervalsTotalService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.apache.commons.io.IOUtils; |
| | | 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.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.*; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Paths; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®æå®¡æ¥è®°å½æ»åå²è®°å½è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 01:12:11 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ManageRecordIntervalsTotalServiceImpl extends ServiceImpl<ManageRecordIntervalsTotalMapper, ManageRecordIntervalsTotal> implements ManageRecordIntervalsTotalService { |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Resource |
| | | private ManageRecordIntervalsTotalMapper manageRecordIntervalsTotalMapper; |
| | | |
| | | @Resource |
| | | private ManageRecordIntervalsMapper manageRecordIntervalsMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageRecordIntervalsTotal(Page page, ManageRecordIntervalsTotal manageRecordIntervalsTotal) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageRecordIntervalsTotal.class)); |
| | | map.put("body", manageRecordIntervalsTotalMapper.pageManageRecordIntervalsTotal(page, QueryWrappers.queryWrappers(manageRecordIntervalsTotal))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int submitManageRecordIntervalsTotal(Integer id) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | if (ObjectUtils.isEmpty(user.getSignatureUrl())) throw new ErrorException("æªæ¾å°å¡«è¡¨äººççµåç¾å,请ä¸ä¼ èªå·±ççµåç¾å!"); |
| | | ManageRecordIntervalsTotal manageRecordIntervalsTotal = manageRecordIntervalsTotalMapper.selectById(id); |
| | | manageRecordIntervalsTotal.setSubmitUser(userId); |
| | | manageRecordIntervalsTotal.setSubmitDate(LocalDate.now()); |
| | | manageRecordIntervalsTotal.setSubmitUrl(user.getSignatureUrl()); |
| | | //çææ ·åå¤çç³è¯·è¡¨å¹¶å°å¡«è¡¨äººççµåç¾åå°ä¸ |
| | | manageRecordIntervalsTotal.setUrl(recordTotaldeal(id,user.getSignatureUrl())); |
| | | return manageRecordIntervalsTotalMapper.updateById(manageRecordIntervalsTotal); |
| | | } |
| | | |
| | | @Override |
| | | public int ratifyManageRecordIntervalsTotal(Integer id, String ratifyState) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | if (ObjectUtils.isEmpty(user.getSignatureUrl())) throw new ErrorException("æªæ¾å°æ¹å人ççµåç¾å,请ä¸ä¼ èªå·±ççµåç¾å!"); |
| | | ManageRecordIntervalsTotal manageRecordIntervalsTotal = manageRecordIntervalsTotalMapper.selectById(id); |
| | | manageRecordIntervalsTotal.setRatifyUser(userId); |
| | | manageRecordIntervalsTotal.setRatifyState(ratifyState); |
| | | manageRecordIntervalsTotal.setRatifyDate(LocalDate.now()); |
| | | manageRecordIntervalsTotal.setRatifyUrl(user.getSignatureUrl()); |
| | | //å°æ¹å人çç¾åå°ä¸ |
| | | String[] monthNames = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; |
| | | wordInsertUrl(new HashMap<String, Object>() {{ |
| | | put("ratifyDateEn", monthNames[LocalDate.now().getMonthValue() - 1] + " " + LocalDate.now().getDayOfMonth() + ", " + LocalDate.now().getYear()); |
| | | put("ratifyDate", LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"))); |
| | | put("ratifyUrl", new FilePictureRenderData(100,50,imgUrl + "/" + user.getSignatureUrl())); |
| | | }}, wordUrl+"/"+manageRecordIntervalsTotal.getUrl()); |
| | | return manageRecordIntervalsTotalMapper.updateById(manageRecordIntervalsTotal); |
| | | } |
| | | |
| | | public int wordInsertUrl(Map<String, Object> map, String url) { |
| | | XWPFTemplate template = XWPFTemplate.compile(url).render(map); |
| | | try { |
| | | template.writeAndClose(Files.newOutputStream(Paths.get(url))); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | private String recordTotaldeal(Integer id,String signatureUrl){ |
| | | List<ManageRecordIntervals> manageRecordIntervalsList = manageRecordIntervalsMapper.selectList(Wrappers.<ManageRecordIntervals>lambdaQuery().eq(ManageRecordIntervals::getRecordIntervalsTotalId,id)); |
| | | String[] monthNames = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; |
| | | //çææ£éªæ¥ååæ¾ç»è®°è¡¨ |
| | | String url; |
| | | try { |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/intervals-deal.docx"); |
| | | File file = File.createTempFile("temp", ".tmp"); |
| | | OutputStream outputStream = new FileOutputStream(file); |
| | | IOUtils.copy(inputStream, outputStream); |
| | | url = file.getAbsolutePath(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¨¡æ¿æä»¶"); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | |
| | | List<Map<String, Object>> intervalsList = new ArrayList<>(); |
| | | Integer index = 1; |
| | | Integer index1 = 1; |
| | | for (int c = 0; c < manageRecordIntervalsList.size(); c++) { |
| | | //è¶
è¿15è¡æ¢é¡µ |
| | | if (c % 15 == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (int i = 0; i < 17; 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 < 7; 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("åºå·@No."); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("æä»¶åç§°@File name"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("æä»¶ç¼å·@File number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText("çæ¬å·@Version number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("修订å·@Revision number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | //第å
å |
| | | textRenderData.setText("é宿§@Suitability"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第ä¸å |
| | | textRenderData.setText("夿³¨@Remark"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i == 16) { |
| | | //æåä¸è¡ |
| | | textRenderData.setText("注ï¼é宿§ä¸æ æâââè¡¨æ¤æä»¶éå®ï¼âÃâ表示ä¸éå®ï¼æä»¶é修订æä½åºã@Note:Theâââtable in the suitability column is suitable for this document, theâÃâtable is not suitable,and the document needs to berevised or invalidated @å®¡æ¥æ¥æï¼ @Review Date:@åå 审æ¥äººåç¾åï¼@Signatures of the reviewers particip ating in the review:â22"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | //å
¶ä»è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | try { |
| | | String insReportCode = manageRecordIntervalsList.get((i - 1) + (index1 - 1) * 15).getDocumentCode(); |
| | | textRenderData.setText(index + ""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | index++; |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | try { |
| | | textRenderData.setText(manageRecordIntervalsList.get((i - 1) + (index1 - 1) * 15).getDocumentName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | try { |
| | | textRenderData.setText(manageRecordIntervalsList.get((i - 1) + (index1 - 1) * 15).getDocumentCode()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | try { |
| | | textRenderData.setText(manageRecordIntervalsList.get((i - 1) + (index1 - 1) * 15).getDocumentVersion()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | try { |
| | | textRenderData.setText(manageRecordIntervalsList.get((i -1) + (index1 - 1) * 15).getRevision()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | try { |
| | | textRenderData.setText(manageRecordIntervalsList.get((i - 1) + (index1 - 1) * 15).getSuitability()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | try { |
| | | textRenderData.setText(manageRecordIntervalsList.get((i - 1) + (index1 - 1) * 15).getRemark() ); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | 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); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("intervals", tableRenderData); |
| | | table.put("index1", index1); |
| | | intervalsList.add(table); |
| | | index1++; |
| | | } |
| | | } |
| | | Integer finalIndex = index1; |
| | | XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("size", finalIndex); |
| | | put("intervalsList", intervalsList); |
| | | put("submitDate", LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"))); |
| | | put("submitDateEn", monthNames[LocalDate.now().getMonthValue() - 1] + " " + LocalDate.now().getDayOfMonth() + ", " + LocalDate.now().getYear()); |
| | | put("ratifyDate", "{{ratifyDate}}"); |
| | | put("ratifyDateEn","{{ratifyDateEn}}"); |
| | | put("ratifyUrl", null); |
| | | put("writeUrl", new FilePictureRenderData(100,50,imgUrl + "/" + signatureUrl)); |
| | | }}); |
| | | String name = UUID.randomUUID() + "_æä»¶å®æå®¡æ¥è®°å½è¡¨" + ".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; |
| | | } |
| | | |
| | | // æ°´å¹³åå¹¶åå
æ ¼ |
| | | 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 cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | 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.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ManageRecordCheck; |
| | | import com.yuanchu.mom.pojo.ManageRecordIssueRecycle; |
| | | import com.yuanchu.mom.mapper.ManageRecordIssueRecycleMapper; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ManageRecordIssueRecycleService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.apache.commons.io.IOUtils; |
| | | 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.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Paths; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * æææä»¶(å
ãå¤é¨æä»¶)çåæ¾ä¸åæ¶è®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 09:11:05 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ManageRecordIssueRecycleServiceImpl extends ServiceImpl<ManageRecordIssueRecycleMapper, ManageRecordIssueRecycle> implements ManageRecordIssueRecycleService { |
| | | |
| | | @Resource |
| | | private ManageRecordIssueRecycleMapper manageRecordIssueRecycleMapper; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageRecordIssueRecycle(Page page, ManageRecordIssueRecycle manageRecordIssueRecycle) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageRecordIssueRecycle.class)); |
| | | map.put("body", manageRecordIssueRecycleMapper.pageManageRecordIssueRecycle(page, QueryWrappers.queryWrappers(manageRecordIssueRecycle))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public String exportOutManageRecordIssueRecycle(ManageRecordIssueRecycle manageRecordIssueRecycle, HttpServletResponse response) { |
| | | List<ManageRecordIssueRecycle> manageRecordIssueRecycleList = manageRecordIssueRecycleMapper.pageManageRecordIssueRecycle(new Page(-1, -1), QueryWrappers.queryWrappers(manageRecordIssueRecycle)).getRecords(); |
| | | //çææ£éªæ¥ååæ¾ç»è®°è¡¨ |
| | | String url; |
| | | try { |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/recycle-deal.docx"); |
| | | File file = File.createTempFile("temp", ".tmp"); |
| | | OutputStream outputStream = new FileOutputStream(file); |
| | | IOUtils.copy(inputStream, outputStream); |
| | | url = file.getAbsolutePath(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¨¡æ¿æä»¶"); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | |
| | | List<Map<String, Object>> recycleList = new ArrayList<>(); |
| | | Integer index = 1; |
| | | Integer index1 = 1; |
| | | for (int c = 0; c < manageRecordIssueRecycleList.size(); c++) { |
| | | //è¶
è¿15è¡æ¢é¡µ |
| | | if (c % 15 == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (int i = 0; i < 17; 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 < 12; 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("åºå·@No.â1"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("æä»¶ç¼å·@File numberâ2"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("æä»¶åç§°@File nameâ3"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText("çå·@Edition numberâ4"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("份æ°@Number of copiesâ5"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | //第å
å |
| | | textRenderData.setText("æä»¶ç±»å«@File categoryâ6"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6) { |
| | | //第ä¸å |
| | | textRenderData.setText("ååå·@Distribution numberâ7"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 7) { |
| | | //第å
«å |
| | | textRenderData.setText("æ¥æ¶é¨é¨@Receiving departmentâ8"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 8 || j == 9) { |
| | | //第ä¹å |
| | | textRenderData.setText("åæ¾ Issueâ9"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 10 || j == 11) { |
| | | //第å
«å |
| | | textRenderData.setText("åæ¶ Reclaimâ10"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i == 1) { |
| | | //第ä¸è¡ |
| | | if (j == 0) { |
| | | //第ä¸ååºå· |
| | | textRenderData.setText("åºå·@No.â1"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("æä»¶ç¼å·@File numberâ2"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("æä»¶åç§°@File nameâ3"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText("çå·@Edition numberâ4"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("份æ°@Number of copiesâ5"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | //第å
å |
| | | textRenderData.setText("æä»¶ç±»å«@File categoryâ6"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6) { |
| | | //第ä¸å |
| | | textRenderData.setText("ååå·@Distribution numberâ7"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 7) { |
| | | //第å
«å |
| | | textRenderData.setText("æ¥æ¶é¨é¨@Receiving departmentâ8"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 8) { |
| | | //第ä¹å |
| | | textRenderData.setText("æ¥å人@Recipients"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 9) { |
| | | //第åå |
| | | textRenderData.setText("æ¥æ@Date"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 10) { |
| | | //第åä¸å |
| | | textRenderData.setText("ç¾æ¶äºº@Signatory"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第åäºå |
| | | textRenderData.setText("æ¥æ@Date"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else { |
| | | //å
¶ä»è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | try { |
| | | String insReportCode = manageRecordIssueRecycleList.get((i - 2) + (index1 - 1) * 15).getDocumentCode(); |
| | | textRenderData.setText(index + ""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | index++; |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | try { |
| | | textRenderData.setText(manageRecordIssueRecycleList.get((i - 2) + (index1 - 1) * 15).getDocumentCode()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | try { |
| | | textRenderData.setText(manageRecordIssueRecycleList.get((i - 2) + (index1 - 1) * 15).getDocumentName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | try { |
| | | textRenderData.setText(manageRecordIssueRecycleList.get((i - 2) + (index1 - 1) * 15).getDocumentVersion()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | try { |
| | | textRenderData.setText(manageRecordIssueRecycleList.get((i - 2) + (index1 - 1) * 15).getPages()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | try { |
| | | textRenderData.setText(manageRecordIssueRecycleList.get((i - 2) + (index1 - 1) * 15).getDocumentType()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6) { |
| | | try { |
| | | textRenderData.setText(manageRecordIssueRecycleList.get((i - 2) + (index1 - 1) * 15).getNumber()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 7) { |
| | | try { |
| | | textRenderData.setText(manageRecordIssueRecycleList.get((i - 2) + (index1 - 1) * 15).getDepartLims()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 8) { |
| | | try { |
| | | textRenderData.setText(manageRecordIssueRecycleList.get((i - 2) + (index1 - 1) * 15).getReceiveUserName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 9) { |
| | | try { |
| | | textRenderData.setText(manageRecordIssueRecycleList.get((i - 2) + (index1 - 1) * 15).getReceiveDate() + ""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 10) { |
| | | try { |
| | | textRenderData.setText(manageRecordIssueRecycleList.get((i - 2) + (index1 - 1) * 15).getSignedUserName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | try { |
| | | textRenderData.setText(manageRecordIssueRecycleList.get((i - 2) + (index1 - 1) * 15).getSignedDate() + ""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | 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); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("recycle", tableRenderData); |
| | | table.put("index1", index1); |
| | | recycleList.add(table); |
| | | index1++; |
| | | } |
| | | } |
| | | Integer finalIndex = index1; |
| | | XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("size", finalIndex); |
| | | put("recycleList", recycleList); |
| | | }}); |
| | | String name = UUID.randomUUID() + "_æææä»¶çåæ¾ä¸åæ¶è®°å½" + ".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; |
| | | } |
| | | |
| | | @Override |
| | | public int exportInManageRecordIssueRecycle(MultipartFile file) { |
| | | List<ManageRecordIssueRecycle> manageRecordIssueRecycleList = new ArrayList<>(); |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | try { |
| | | InputStream inputStream = file.getInputStream(); |
| | | XWPFDocument document = new XWPFDocument(inputStream); |
| | | List<XWPFTable> tables = document.getTables(); |
| | | if (tables.isEmpty()) { |
| | | throw new ErrorException("ææ¡£ä¸æ²¡æè¡¨æ ¼"); |
| | | } |
| | | |
| | | for (XWPFTable table : tables) { |
| | | List<XWPFTableRow> rows = table.getRows(); |
| | | if (rows.size() <= 1) { |
| | | throw new ErrorException("è¡¨æ ¼æ²¡ææ°æ®è¡"); |
| | | } |
| | | for (int i = 2; i < rows.size(); i++) { // ä»ç¬¬ä¸è¡å¼å§ï¼è·³è¿è¡¨å¤´ |
| | | XWPFTableRow row = rows.get(i); |
| | | if (row.getTableCells().size() != 12) { |
| | | System.out.println("è¡ " + (i + 1) + " çåæ°ä¸å¹é
ï¼è·³è¿è¯¥è¡"); |
| | | continue; |
| | | } |
| | | if (ObjectUtils.isNotEmpty(row.getCell(1).getText())) { |
| | | ManageRecordIssueRecycle manageRecordIssueRecycle = new ManageRecordIssueRecycle(); |
| | | manageRecordIssueRecycle.setDocumentCode(row.getCell(1).getText()); |
| | | manageRecordIssueRecycle.setDocumentName(row.getCell(2).getText()); |
| | | manageRecordIssueRecycle.setDocumentVersion(row.getCell(3).getText()); |
| | | manageRecordIssueRecycle.setPages(row.getCell(4).getText()); |
| | | manageRecordIssueRecycle.setDocumentType(row.getCell(5).getText()); |
| | | manageRecordIssueRecycle.setNumber(row.getCell(6).getText()); |
| | | manageRecordIssueRecycle.setDepartLims(row.getCell(7).getText()); |
| | | try { |
| | | manageRecordIssueRecycle.setReceiveUser(userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, row.getCell(8).getText())).getId()); |
| | | } catch (Exception e) { |
| | | manageRecordIssueRecycle.setReceiveUser(null); |
| | | } |
| | | try { |
| | | manageRecordIssueRecycle.setSignedUser(userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, row.getCell(10).getText())).getId()); |
| | | } catch (Exception e) { |
| | | manageRecordIssueRecycle.setSignedUser(null); |
| | | } |
| | | try { |
| | | manageRecordIssueRecycle.setReceiveDate(LocalDate.parse(row.getCell(9).getText(), dateTimeFormatter)); |
| | | } catch (Exception e) { |
| | | manageRecordIssueRecycle.setReceiveDate(null); |
| | | } |
| | | try { |
| | | manageRecordIssueRecycle.setSignedDate(LocalDate.parse(row.getCell(11).getText(), dateTimeFormatter)); |
| | | } catch (Exception e) { |
| | | manageRecordIssueRecycle.setSignedDate(null); |
| | | } |
| | | |
| | | ManageRecordIssueRecycle issueRecycle = manageRecordIssueRecycleMapper.selectOne(Wrappers.<ManageRecordIssueRecycle>lambdaQuery() |
| | | .eq(ManageRecordIssueRecycle::getDocumentCode, manageRecordIssueRecycle.getDocumentCode()) |
| | | .eq(ManageRecordIssueRecycle::getDocumentName, manageRecordIssueRecycle.getDocumentName()) |
| | | .eq(ManageRecordIssueRecycle::getDocumentVersion, manageRecordIssueRecycle.getDocumentVersion())); |
| | | if (ObjectUtils.isNotEmpty(issueRecycle)) { |
| | | manageRecordIssueRecycle.setId(issueRecycle.getId()); |
| | | } |
| | | manageRecordIssueRecycleList.add(manageRecordIssueRecycle); |
| | | } |
| | | } |
| | | } |
| | | saveOrUpdateBatch(manageRecordIssueRecycleList); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public int addManageRecordIssueRecycle(ManageRecordIssueRecycle manageRecordIssueRecycle) { |
| | | return manageRecordIssueRecycleMapper.insert(manageRecordIssueRecycle); |
| | | } |
| | | |
| | | @Override |
| | | public int doManageRecordIssueRecycle(ManageRecordIssueRecycle manageRecordIssueRecycle) { |
| | | return manageRecordIssueRecycleMapper.updateById(manageRecordIssueRecycle); |
| | | } |
| | | |
| | | // æ°´å¹³åå¹¶åå
æ ¼ |
| | | 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 cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | 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.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.ManageRecordVerifyMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ManageRecordTotal; |
| | | import com.yuanchu.mom.mapper.ManageRecordTotalMapper; |
| | | import com.yuanchu.mom.pojo.ManageRecordVerify; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ManageRecordTotalService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.poi.xwpf.usermodel.*; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.*; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Paths; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥æä»¶ç¡®è®¤è®°å½æ»åå²è®°å½è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 10:30:08 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ManageRecordTotalServiceImpl extends ServiceImpl<ManageRecordTotalMapper, ManageRecordTotal> implements ManageRecordTotalService { |
| | | |
| | | @Resource |
| | | private ManageRecordTotalMapper manageRecordTotalMapper; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Resource |
| | | private ManageRecordVerifyMapper manageRecordVerifyMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageRecordTotal(Page page, ManageRecordTotal manageRecordTotal) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageRecordTotal.class)); |
| | | map.put("body", manageRecordTotalMapper.pageProcessTotaldeal(page, QueryWrappers.queryWrappers(manageRecordTotal))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int submitManageRecordTotal(Integer id) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | if (ObjectUtils.isEmpty(user.getSignatureUrl())) throw new ErrorException("æªæ¾å°å¡«è¡¨äººççµåç¾å,请ä¸ä¼ èªå·±ççµåç¾å!"); |
| | | ManageRecordTotal manageRecordTotal = manageRecordTotalMapper.selectById(id); |
| | | manageRecordTotal.setSubmitUser(userId); |
| | | manageRecordTotal.setSubmitDate(LocalDate.now()); |
| | | manageRecordTotal.setSubmitUrl(user.getSignatureUrl()); |
| | | //çææ ·åå¤çç³è¯·è¡¨å¹¶å°å¡«è¡¨äººççµåç¾åå°ä¸ |
| | | manageRecordTotal.setUrl(recordTotaldeal(id,user.getSignatureUrl())); |
| | | return manageRecordTotalMapper.updateById(manageRecordTotal); |
| | | } |
| | | |
| | | @Override |
| | | public int ratifyManageRecordTotal(Integer id, String ratifyState) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | if (ObjectUtils.isEmpty(user.getSignatureUrl())) throw new ErrorException("æªæ¾å°æ¹å人ççµåç¾å,请ä¸ä¼ èªå·±ççµåç¾å!"); |
| | | ManageRecordTotal manageRecordTotal = manageRecordTotalMapper.selectById(id); |
| | | manageRecordTotal.setRatifyUser(userId); |
| | | manageRecordTotal.setRatifyState(ratifyState); |
| | | manageRecordTotal.setRatifyDate(LocalDate.now()); |
| | | manageRecordTotal.setRatifyUrl(user.getSignatureUrl()); |
| | | //å°æ¹å人çç¾åå°ä¸ |
| | | String[] monthNames = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; |
| | | wordInsertUrl(new HashMap<String, Object>() {{ |
| | | put("ratifyDateEn", monthNames[LocalDate.now().getMonthValue() - 1] + " " + LocalDate.now().getDayOfMonth() + ", " + LocalDate.now().getYear()); |
| | | put("ratifyDate", LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"))); |
| | | put("ratifyUrl", new FilePictureRenderData(100,50,imgUrl + "/" + user.getSignatureUrl())); |
| | | }}, wordUrl+"/"+manageRecordTotal.getUrl()); |
| | | return manageRecordTotalMapper.updateById(manageRecordTotal); |
| | | } |
| | | |
| | | public int wordInsertUrl(Map<String, Object> map, String url) { |
| | | XWPFTemplate template = XWPFTemplate.compile(url).render(map); |
| | | try { |
| | | template.writeAndClose(Files.newOutputStream(Paths.get(url))); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | private String recordTotaldeal(Integer id,String signatureUrl){ |
| | | List<ManageRecordVerify> manageRecordVerifies = manageRecordVerifyMapper.selectList(Wrappers.<ManageRecordVerify>lambdaQuery().eq(ManageRecordVerify::getManageRecordTotalId,id)); |
| | | String url; |
| | | try { |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/verify-deal.docx"); |
| | | File file = File.createTempFile("temp", ".tmp"); |
| | | OutputStream outputStream = new FileOutputStream(file); |
| | | IOUtils.copy(inputStream, outputStream); |
| | | url = file.getAbsolutePath(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¨¡æ¿æä»¶"); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | String[] monthNames = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; |
| | | List<Map<String, Object>> verifyList = new ArrayList<>(); |
| | | Integer index = 1; |
| | | Integer index1 = 1; |
| | | for (int c = 0; c < manageRecordVerifies.size(); c++) { |
| | | //è¶
è¿21è¡æ¢é¡µ |
| | | if (c % 20 == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (int i = 0; i < 21; 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 < 8; 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("åºå·@No."); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºåæ ·ååç§° |
| | | textRenderData.setText("夿¥æä»¶åç§°@Foreign file name"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸åæ ·åç¼å· |
| | | textRenderData.setText("æä»¶ç¼å·@File number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå便 ·åä½ |
| | | textRenderData.setText("æ åè§èåç§°@Standard specification name"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºåæ°é |
| | | textRenderData.setText("æ åå·@Stanard number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | //第å
åå¤çæ¹å¼ |
| | | textRenderData.setText("çææ¥æ@Effective Date"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6) { |
| | | //第ä¸åå¤çæ¹å¼ |
| | | textRenderData.setText("ä½åºæ¥æ@Void date"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else { |
| | | //第å
«åæ¶é´ |
| | | textRenderData.setText("夿³¨@Remaek"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else { |
| | | //å
¶ä»è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | try{ |
| | | String sampleName = manageRecordVerifies.get((i-1) + (index1 - 1) * 20).getDocumentName(); |
| | | textRenderData.setText(index + ""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | index++; |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | try{ |
| | | textRenderData.setText(manageRecordVerifies.get((i-1) + (index1 - 1) * 20).getDocumentName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 2) { |
| | | try{ |
| | | textRenderData.setText(manageRecordVerifies.get((i-1) + (index1 - 1) * 20).getDocumentCode()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 3) { |
| | | try{ |
| | | textRenderData.setText(manageRecordVerifies.get((i-1) + (index1 - 1) * 20).getStandardName()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 4) { |
| | | try{ |
| | | textRenderData.setText(manageRecordVerifies.get((i-1) + (index1 - 1) * 20).getStandardCode()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 5) { |
| | | try{ |
| | | textRenderData.setText(manageRecordVerifies.get((i-1) + (index1 - 1) * 20).getEffectiveDate()+""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j==6){ |
| | | try{ |
| | | textRenderData.setText(manageRecordVerifies.get((i-1) + (index1 - 1) * 20).getCancelDate()+""); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | try{ |
| | | textRenderData.setText(manageRecordVerifies.get((i-1) + (index1 - 1) * 20).getNote()); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | 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); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("verify", tableRenderData); |
| | | table.put("index1", index1); |
| | | verifyList.add(table); |
| | | index1++; |
| | | } |
| | | } |
| | | Integer finalIndex = index1; |
| | | XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("verifyList", verifyList); |
| | | put("size", finalIndex); |
| | | put("submitDate", LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"))); |
| | | put("submitDateEn", monthNames[LocalDate.now().getMonthValue() - 1] + " " + LocalDate.now().getDayOfMonth() + ", " + LocalDate.now().getYear()); |
| | | put("ratifyDate", "{{ratifyDate}}"); |
| | | put("ratifyDateEn","{{ratifyDateEn}}"); |
| | | put("ratifyUrl", null); |
| | | put("writeUrl", new FilePictureRenderData(100,50,imgUrl + "/" + signatureUrl)); |
| | | }}); |
| | | String name = UUID.randomUUID() + "_æ ·åå¤çç³è¯·è¡¨" + ".docx"; |
| | | try { |
| | | template.writeAndClose(Files.newOutputStream(Paths.get(wordUrl + "/" + name))); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | //å¤çä¸è±ææ¢è¡çé®é¢ |
| | | String path = wordUrl + "/" + name; |
| | | 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; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | 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.common.PrintChina; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.ManageRecordTotalMapper; |
| | | import com.yuanchu.mom.pojo.ManageRecordTotal; |
| | | import com.yuanchu.mom.pojo.ManageRecordVerify; |
| | | import com.yuanchu.mom.mapper.ManageRecordVerifyMapper; |
| | | import com.yuanchu.mom.service.ManageRecordVerifyService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.apache.poi.xwpf.usermodel.XWPFDocument; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTable; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableRow; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥æä»¶ç¡®è®¤è®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-12 10:29:44 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ManageRecordVerifyServiceImpl extends ServiceImpl<ManageRecordVerifyMapper, ManageRecordVerify> implements ManageRecordVerifyService { |
| | | |
| | | @Resource |
| | | private ManageRecordVerifyMapper manageRecordVerifyMapper; |
| | | |
| | | @Resource |
| | | private ManageRecordTotalMapper manageRecordTotalMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> pageManageRecordVerify(Page page, ManageRecordVerify manageRecordVerify) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(ManageRecordVerify.class)); |
| | | if (ObjectUtils.isEmpty(manageRecordVerify.getManageRecordTotalId())) { |
| | | //è·åå½å年份 |
| | | LocalDate currentDate = LocalDate.now(); |
| | | // å®ä¹æ¥ææ ¼å¼ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy"); |
| | | // æ ¼å¼åå½åæ¥æ |
| | | String currentMonth = currentDate.format(formatter); |
| | | //æ¥è¯¢åå² |
| | | ManageRecordTotal manageRecordTotal = manageRecordTotalMapper.selectOne(Wrappers.<ManageRecordTotal>lambdaQuery().eq(ManageRecordTotal::getYear, currentMonth)); |
| | | manageRecordVerify.setManageRecordTotalId(manageRecordTotal.getId()); |
| | | } |
| | | map.put("body", manageRecordVerifyMapper.pageManageRecordVerify(page, QueryWrappers.queryWrappers(manageRecordVerify))); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int addManageRecordVerify(ManageRecordVerify manageRecordVerify) { |
| | | //è·åå½å年份 |
| | | LocalDate currentDate = LocalDate.now(); |
| | | // å®ä¹æ¥ææ ¼å¼ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy"); |
| | | // æ ¼å¼åå½åæ¥æ |
| | | String currentMonth = currentDate.format(formatter); |
| | | ManageRecordTotal manageRecordTotal = manageRecordTotalMapper.selectOne(Wrappers.<ManageRecordTotal>lambdaQuery().eq(ManageRecordTotal::getYear, currentMonth)); |
| | | manageRecordVerify.setManageRecordTotalId(manageRecordTotal.getId()); |
| | | manageRecordVerifyMapper.insert(manageRecordVerify); |
| | | manageRecordTotal.setTotalNum(1 + manageRecordTotal.getTotalNum()); |
| | | return manageRecordTotalMapper.updateById(manageRecordTotal); |
| | | } |
| | | |
| | | @Override |
| | | public int delManageRecordVerify(Integer id) { |
| | | ManageRecordVerify manageRecordVerify = manageRecordVerifyMapper.selectById(id); |
| | | manageRecordVerifyMapper.deleteById(id); |
| | | ManageRecordTotal manageRecordTotal = manageRecordTotalMapper.selectById(manageRecordVerify.getManageRecordTotalId()); |
| | | manageRecordTotal.setTotalNum(manageRecordTotal.getTotalNum() - 1); |
| | | return manageRecordTotalMapper.updateById(manageRecordTotal); |
| | | } |
| | | |
| | | @Override |
| | | public int exportManageRecordVerify(MultipartFile file) { |
| | | List<ManageRecordVerify> manageRecordVerifyList = new ArrayList<>(); |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | //è·åå½å年份 |
| | | LocalDate currentDate = LocalDate.now(); |
| | | // å®ä¹æ¥ææ ¼å¼ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy"); |
| | | // æ ¼å¼åå½åæ¥æ |
| | | String currentMonth = currentDate.format(formatter); |
| | | ManageRecordTotal manageRecordTotal = manageRecordTotalMapper.selectOne(Wrappers.<ManageRecordTotal>lambdaQuery().eq(ManageRecordTotal::getYear, currentMonth)); |
| | | try { |
| | | InputStream inputStream = file.getInputStream(); |
| | | XWPFDocument document = new XWPFDocument(inputStream); |
| | | List<XWPFTable> tables = document.getTables(); |
| | | if (tables.isEmpty()) { |
| | | throw new ErrorException("ææ¡£ä¸æ²¡æè¡¨æ ¼"); |
| | | } |
| | | |
| | | for (XWPFTable table : tables) { |
| | | List<XWPFTableRow> rows = table.getRows(); |
| | | if (rows.size() <= 1) { |
| | | throw new ErrorException("è¡¨æ ¼æ²¡ææ°æ®è¡"); |
| | | } |
| | | for (int i = 1; i < rows.size(); i++) { // ä»ç¬¬äºè¡å¼å§ï¼è·³è¿è¡¨å¤´ |
| | | XWPFTableRow row = rows.get(i); |
| | | if (row.getTableCells().size() != 8) { |
| | | System.out.println("è¡ " + (i + 1) + " çåæ°ä¸å¹é
ï¼è·³è¿è¯¥è¡"); |
| | | continue; |
| | | } |
| | | if (ObjectUtils.isNotEmpty(row.getCell(1).getText())) { |
| | | ManageRecordVerify manageRecordVerify = new ManageRecordVerify(); |
| | | manageRecordVerify.setDocumentName(row.getCell(1).getText()); |
| | | manageRecordVerify.setDocumentCode(row.getCell(2).getText()); |
| | | manageRecordVerify.setStandardName(row.getCell(3).getText()); |
| | | manageRecordVerify.setStandardCode(row.getCell(4).getText()); |
| | | try { |
| | | manageRecordVerify.setEffectiveDate(LocalDate.parse(row.getCell(5).getText(), dateTimeFormatter)); |
| | | } catch (Exception e) { |
| | | manageRecordVerify.setEffectiveDate(null); |
| | | } |
| | | try { |
| | | manageRecordVerify.setCancelDate(LocalDate.parse(row.getCell(6).getText(), dateTimeFormatter)); |
| | | } catch (Exception e) { |
| | | manageRecordVerify.setCancelDate(null); |
| | | } |
| | | manageRecordVerify.setNote(row.getCell(7).getText()); |
| | | manageRecordVerify.setManageRecordTotalId(manageRecordTotal.getId()); |
| | | if (manageRecordVerifyMapper.selectCount(Wrappers.<ManageRecordVerify>lambdaQuery() |
| | | .eq(ManageRecordVerify::getDocumentCode, manageRecordVerify.getDocumentCode()) |
| | | .eq(ManageRecordVerify::getDocumentName, manageRecordVerify.getDocumentName()) |
| | | .eq(ManageRecordVerify::getStandardName, manageRecordVerify.getStandardName()) |
| | | .eq(ManageRecordVerify::getStandardCode, manageRecordVerify.getStandardCode()) |
| | | .eq(ManageRecordVerify::getManageRecordTotalId, manageRecordVerify.getManageRecordTotalId())) <= 0) { |
| | | manageRecordVerifyList.add(manageRecordVerify); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | saveBatch(manageRecordVerifyList); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.yuanchu.mom.mapper.ManageReviewProgramMapper; |
| | | import com.yuanchu.mom.pojo.InsOrderFile; |
| | | import com.yuanchu.mom.pojo.ManageReviewProgram; |
| | | import com.yuanchu.mom.pojo.ManageReviewProgramFile; |
| | | import com.yuanchu.mom.mapper.ManageReviewProgramFileMapper; |
| | | import com.yuanchu.mom.service.ManageReviewProgramFileService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.FileSaveUtil; |
| | | import com.yuanchu.mom.vo.ReviewProgramDetailsVo; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 04:15:47 |
| | | */ |
| | | @Service |
| | | public class ManageReviewProgramFileServiceImpl extends ServiceImpl<ManageReviewProgramFileMapper, ManageReviewProgramFile> implements ManageReviewProgramFileService { |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Resource |
| | | ManageReviewProgramMapper manageReviewProgramMapper; |
| | | |
| | | @Override |
| | | public ReviewProgramDetailsVo selectFile(Integer id) { |
| | | ManageReviewProgram program = manageReviewProgramMapper.selectById(id); |
| | | LambdaQueryWrapper<ManageReviewProgramFile> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(ManageReviewProgramFile::getReviewId, id); |
| | | List<ManageReviewProgramFile> files = list(queryWrapper); |
| | | ReviewProgramDetailsVo vo = new ReviewProgramDetailsVo(); |
| | | vo.setProgram(program); |
| | | vo.setFileList(files); |
| | | return vo; |
| | | } |
| | | |
| | | @Override |
| | | public void addFile(MultipartFile file, Integer id) { |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | String filename = file.getOriginalFilename(); |
| | | ManageReviewProgramFile manageReviewProgramFile = new ManageReviewProgramFile(); |
| | | manageReviewProgramFile.setFileName(filename); |
| | | manageReviewProgramFile.setReviewId(id); |
| | | // æ¯æä»¶ |
| | | path = wordUrl; |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | manageReviewProgramFile.setUrl(pathName); |
| | | this.baseMapper.insert(manageReviewProgramFile); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ManageDocumentControlled; |
| | | import com.yuanchu.mom.pojo.ManageMeetingParticipants; |
| | | import com.yuanchu.mom.pojo.ManageReviewProgram; |
| | | import com.yuanchu.mom.mapper.ManageReviewProgramMapper; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ManageReviewProgramService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | 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.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 03:05:42 |
| | | */ |
| | | @Service |
| | | public class ManageReviewProgramServiceImpl extends ServiceImpl<ManageReviewProgramMapper, ManageReviewProgram> implements ManageReviewProgramService { |
| | | |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Resource |
| | | private GetLook getLook; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public IPage<ManageReviewProgram> page(Page page, String startTime,String endTime, String judgingLocation) { |
| | | IPage<ManageReviewProgram> iPage = this.baseMapper.page(page,startTime,endTime,judgingLocation); |
| | | return iPage; |
| | | } |
| | | |
| | | @Override |
| | | public void exportReviewProgram(Integer id, HttpServletResponse response) { |
| | | ManageReviewProgram reviewProgram = baseMapper.selectById(id); |
| | | List<String> name = new ArrayList<>(); |
| | | for (String s : reviewProgram.getParticipants().split(",")) { |
| | | User user = userMapper.selectById(Integer.parseInt(s)); |
| | | name.add(user.getName()); |
| | | } |
| | | String participantsName = name.stream().collect(Collectors.joining(",")); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"); |
| | | //ç¼å¶äººç¾å |
| | | User user1 = userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getName, reviewProgram.getEditor())); |
| | | if (ObjectUtils.isEmpty(user1.getSignatureUrl())){ |
| | | throw new ErrorException(user1.getName()+"没æä¸ä¼ 个人ç¾å,请ä¸ä¼ !"); |
| | | } |
| | | String signatureUrl1 = user1.getSignatureUrl(); |
| | | //æ¹å人ç¾å |
| | | if (ObjectUtils.isEmpty(reviewProgram.getApprove())){ |
| | | throw new ErrorException("没æè¿è¡æ¹å"); |
| | | } |
| | | User user2 = userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getName, reviewProgram.getApprove())); |
| | | if (ObjectUtils.isEmpty(user2.getSignatureUrl())){ |
| | | throw new ErrorException(user2.getName()+"没æä¸ä¼ 个人ç¾å,请ä¸ä¼ !"); |
| | | } |
| | | String signatureUrl2 = user2.getSignatureUrl(); |
| | | |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/review-program.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("reviewProgram", reviewProgram); |
| | | put("writeUrl", new FilePictureRenderData(100,50,imgUrl + "/" + signatureUrl1)); |
| | | put("ratifyUrl", new FilePictureRenderData(100,50,imgUrl + "/" + signatureUrl2)); |
| | | put("editorDate", reviewProgram.getEditorDate().format(formatter)); |
| | | put("approveDate", reviewProgram.getApproveDate().format(formatter)); |
| | | put("participantsName",participantsName); |
| | | }}); |
| | | |
| | | 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 int addReviewProgram(ManageReviewProgram manageReviewProgram) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | String name = userMapper.selectById(userId).getName(); |
| | | manageReviewProgram.setEditor(name); |
| | | manageReviewProgram.setEditorDate(LocalDateTime.now()); |
| | | return baseMapper.insert(manageReviewProgram); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ManageMeeting; |
| | | import com.yuanchu.mom.pojo.ManageReviewReport; |
| | | import com.yuanchu.mom.mapper.ManageReviewReportMapper; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ManageReviewReportService; |
| | | 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.time.LocalDateTime; |
| | | 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-11-12 04:44:39 |
| | | */ |
| | | @Service |
| | | public class ManageReviewReportServiceImpl extends ServiceImpl<ManageReviewReportMapper, ManageReviewReport> implements ManageReviewReportService { |
| | | |
| | | @Resource |
| | | UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public IPage<ManageReviewReport> page(Page page, String startTime, String endTime, String place) { |
| | | IPage<ManageReviewReport> iPage = this.baseMapper.page(page, startTime, endTime, place); |
| | | return iPage; |
| | | } |
| | | |
| | | @Override |
| | | public void exportReviewReport(Integer id, HttpServletResponse response) { |
| | | ManageReviewReport manageReviewReport = baseMapper.selectById(id); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"); |
| | | //宿æ¶é´ |
| | | String completionDate = ""; |
| | | if (ObjectUtils.isNotEmpty(manageReviewReport.getCompletionDate())) { |
| | | completionDate = manageReviewReport.getCompletionDate().format(formatter); |
| | | } |
| | | //åºå¸äººå |
| | | String attendessName=null; |
| | | if (ObjectUtils.isNotEmpty(manageReviewReport.getAttendess())) { |
| | | List<String> name = new ArrayList<>(); |
| | | for (String s : manageReviewReport.getAttendess().split(",")) { |
| | | User user = userMapper.selectById(Integer.parseInt(s)); |
| | | name.add(user.getName()); |
| | | } |
| | | attendessName = name.stream().collect(Collectors.joining(",")); |
| | | } |
| | | //æ¥æ |
| | | String createTime = manageReviewReport.getCreateTime().format(formatter); |
| | | //å®¡æ ¸äºº |
| | | String signatureUrl1 = null; |
| | | if (ObjectUtils.isNotEmpty(manageReviewReport.getAudit())) { |
| | | User user1 = userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getName, manageReviewReport.getAudit())); |
| | | if (ObjectUtils.isEmpty(user1.getSignatureUrl())) { |
| | | throw new ErrorException(user1.getName() + "ç个人ç¾å没æä¸ä¼ "); |
| | | } |
| | | signatureUrl1 = user1.getSignatureUrl(); |
| | | } |
| | | //æ¹å人 |
| | | String signatureUrl2 = null; |
| | | if (ObjectUtils.isNotEmpty(manageReviewReport.getApproval())) { |
| | | User user2 = userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getName, manageReviewReport.getApproval())); |
| | | if (ObjectUtils.isEmpty(user2.getSignatureUrl())) { |
| | | throw new ErrorException(user2.getName() + "ç个人ç¾å没æä¸ä¼ "); |
| | | } |
| | | signatureUrl2 = user2.getSignatureUrl(); |
| | | } |
| | | |
| | | |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/review-report.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | String finalCompletionDate = completionDate; |
| | | FilePictureRenderData picture1=null; |
| | | FilePictureRenderData picture2=null; |
| | | if (signatureUrl1!=null){ |
| | | picture1 = new FilePictureRenderData(100, 50, imgUrl + "/" + signatureUrl1); |
| | | } |
| | | if (signatureUrl2!=null) { |
| | | picture2 = new FilePictureRenderData(100, 50, imgUrl + "/" + signatureUrl2); |
| | | } |
| | | FilePictureRenderData finalPicture1 = picture1; |
| | | FilePictureRenderData finalPicture2 = picture2; |
| | | String finalAttendessName = attendessName; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("report", manageReviewReport); |
| | | put("completionDate", finalCompletionDate); |
| | | put("date", manageReviewReport.getDate().format(formatter)); |
| | | put("createTime", createTime); |
| | | put("examineUrl", finalPicture1); |
| | | put("ratifyUrl", finalPicture2); |
| | | put("attendessName", finalAttendessName); |
| | | }}); |
| | | |
| | | 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.core.toolkit.StringUtils; |
| | | 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.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.ManageRiskAssessmentResultsMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ManageRiskAssessmentResults; |
| | | import com.yuanchu.mom.service.ManageRiskAssessmentResultsService; |
| | | import com.yuanchu.mom.utils.DateImageUtil; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.vo.ManageRiskAssessmentResultsVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:58:51 |
| | | */ |
| | | @Service |
| | | public class ManageRiskAssessmentResultsServiceImpl extends ServiceImpl<ManageRiskAssessmentResultsMapper, ManageRiskAssessmentResults> implements ManageRiskAssessmentResultsService { |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public IPage<ManageRiskAssessmentResultsVo> getPageResults(Page page) { |
| | | return baseMapper.getPageResults(page, false); |
| | | } |
| | | |
| | | @Override |
| | | public void exportPersonTraining(HttpServletResponse response) { |
| | | // æ¥è¯¢è¯¦æ
|
| | | IPage<ManageRiskAssessmentResultsVo> detailedDtos = baseMapper.getPageResults(new Page(1, -1), true); |
| | | if (detailedDtos.getRecords().isEmpty()) { |
| | | throw new ErrorException("å®¡æ ¸éè¿çæ°æ®ä¸ºç©ºï¼è¯·å®¡æ ¸éè¿åå¨å¯¼åº"); |
| | | } |
| | | ManageRiskAssessmentResultsVo manageRiskAssessmentResultsVo = detailedDtos.getRecords().get(0); |
| | | |
| | | //è·åç¼å¶äººçç¾åå°å |
| | | String writeUrl = userMapper.selectById(manageRiskAssessmentResultsVo.getEditor()).getSignatureUrl(); |
| | | if (ObjectUtils.isEmpty(writeUrl) || writeUrl.equals("")) { |
| | | throw new ErrorException("æ¾ä¸å°æ£éªäººçç¾å"); |
| | | } |
| | | |
| | | //è·å夿 ¸äººçç¾åå°å |
| | | String examineUrl = null; |
| | | if (manageRiskAssessmentResultsVo.getApproval() != null) { |
| | | examineUrl = userMapper.selectById(manageRiskAssessmentResultsVo.getApproval()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(examineUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å¤æ ¸äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //è·åæ¹å人çç¾åå°å |
| | | String ratifyUrl = null; |
| | | if (manageRiskAssessmentResultsVo.getApproval() != null) { |
| | | ratifyUrl = userMapper.selectById(manageRiskAssessmentResultsVo.getApproval()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(ratifyUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å¤æ ¸äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | int index = 1; |
| | | for (ManageRiskAssessmentResultsVo detailedDto : detailedDtos.getRecords()) { |
| | | detailedDto.setIndex(index); |
| | | index++; |
| | | } |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/risk-factor-identification-risk.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("trainingDetailedList", detailedDtos.getRecords()); |
| | | 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", manageRiskAssessmentResultsVo.getEditorDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(manageRiskAssessmentResultsVo.getEditorDate())).create() : null); |
| | | put("examineDateUrl", manageRiskAssessmentResultsVo.getApproveDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(manageRiskAssessmentResultsVo.getApproveDate())).create() : null); |
| | | put("ratifyDateUrl", manageRiskAssessmentResultsVo.getApproveDate() != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(manageRiskAssessmentResultsVo.getApproveDate())).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.vo; |
| | | |
| | | import com.yuanchu.mom.pojo.ManageControlPlanList; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ManageControlPlanListVo extends ManageControlPlanList { |
| | | @ApiModelProperty("ç¼å¶å§å") |
| | | private String editorName; |
| | | |
| | | @ApiModelProperty("审æ¹å§å") |
| | | private String approvalName; |
| | | |
| | | @ApiModelProperty("æ¹åå§å") |
| | | private String approveName; |
| | | |
| | | @ApiModelProperty("导åº") |
| | | private Integer index; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.vo; |
| | | |
| | | import com.yuanchu.mom.pojo.ManageRiskAssessmentResults; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ManageRiskAssessmentResultsVo extends ManageRiskAssessmentResults { |
| | | |
| | | @ApiModelProperty("ç¼å¶å§å") |
| | | private String editorName; |
| | | |
| | | @ApiModelProperty("审æ¹å§å") |
| | | private String approvalName; |
| | | |
| | | @ApiModelProperty("æ¹åå§å") |
| | | private String approveName; |
| | | |
| | | @ApiModelProperty("导åºåºå·") |
| | | private Integer index; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.vo; |
| | | |
| | | import com.yuanchu.mom.pojo.ManageMeeting; |
| | | import com.yuanchu.mom.pojo.ManageMeetingParticipants; |
| | | import com.yuanchu.mom.pojo.ManageReviewProgram; |
| | | import com.yuanchu.mom.pojo.ManageReviewProgramFile; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class MeetingParticipantsDetailsVo { |
| | | |
| | | private ManageMeeting manageMeeting; |
| | | |
| | | private List<ManageMeetingParticipants> participantsList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.vo; |
| | | |
| | | 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.yuanchu.mom.pojo.ManageReviewProgram; |
| | | import com.yuanchu.mom.pojo.ManageReviewProgramFile; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ReviewProgramDetailsVo { |
| | | |
| | | private ManageReviewProgram program; |
| | | |
| | | private List<ManageReviewProgramFile> fileList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <License> |
| | | <Data> |
| | | <Products> |
| | | <Product>Aspose.Total for Java</Product> |
| | | <Product>Aspose.Words for Java</Product> |
| | | </Products> |
| | | <EditionType>Enterprise</EditionType> |
| | | <SubscriptionExpiry>20991231</SubscriptionExpiry> |
| | | <LicenseExpiry>20991231</LicenseExpiry> |
| | | <SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber> |
| | | </Data> |
| | | <Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature> |
| | | </License> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ClientSatisfactionAnalyseFileMapper"> |
| | | |
| | | <!-- å®¢æ·æ»¡æåº¦åæéä»¶å表 --> |
| | | <select id="pageAnalyseFile" resultType="com.yuanchu.mom.pojo.ClientSatisfactionAnalyseFile"> |
| | | select * |
| | | from (select ccf.*, |
| | | u.name user_name |
| | | from cnas_client_satisfaction_analyse_file ccf |
| | | left join user u on u.id = ccf.create_user |
| | | order by ccf.create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.ClientSatisfactionMapper"> |
| | | |
| | | <!-- å®¢æ·æ»¡æåº¦è°æ¥ --> |
| | | <select id="pageClientSatisfaction" resultType="com.yuanchu.mom.pojo.ClientSatisfaction"> |
| | | select * |
| | | from (select * |
| | | from cnas_client_satisfaction |
| | | order by create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="exportWordClientSatisfaction" resultType="com.yuanchu.mom.dto.ClientSatisfactionDto"> |
| | | select *, |
| | | CASE WHEN service_attitude = 0 THEN 'â' |
| | | ELSE 'â¡' END AS serviceAttitude0, |
| | | CASE WHEN service_attitude = 1 THEN 'â' |
| | | ELSE 'â¡' END AS serviceAttitude1, |
| | | CASE WHEN service_attitude = 2 THEN 'â' |
| | | ELSE 'â¡' END AS serviceAttitude2, |
| | | service_attitude_suggestion, |
| | | CASE WHEN technical_competence = 0 THEN 'â' |
| | | ELSE 'â¡' END AS technicalCompetence0, |
| | | CASE WHEN technical_competence = 1 THEN 'â' |
| | | ELSE 'â¡' END AS technicalCompetence1, |
| | | CASE WHEN technical_competence = 2 THEN 'â' |
| | | ELSE 'â¡' END AS technicalCompetence2, |
| | | technical_competence_suggestion, |
| | | CASE WHEN inspection_work = 0 THEN 'â' |
| | | ELSE 'â¡' END AS inspectionWork0, |
| | | CASE WHEN inspection_work = 1 THEN 'â' |
| | | ELSE 'â¡' END AS inspectionWork1, |
| | | CASE WHEN inspection_work = 2 THEN 'â' |
| | | ELSE 'â¡' END AS inspectionWork2, |
| | | inspection_work_suggestion, |
| | | CASE WHEN reasonable_fees = 0 THEN 'â' |
| | | ELSE 'â¡' END AS reasonableFees0, |
| | | CASE WHEN reasonable_fees = 1 THEN 'â' |
| | | ELSE 'â¡' END AS reasonableFees1, |
| | | CASE WHEN reasonable_fees = 2 THEN 'â' |
| | | ELSE 'â¡' END AS reasonableFees2 |
| | | from cnas_client_satisfaction |
| | | where client_satisfaction_id = #{clientSatisfactionId} |
| | | </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.InternalCheckMapper"> |
| | | |
| | | <!-- å
é¨å®¡æ¥å页æ¥è¯¢ --> |
| | | <select id="pageInternalCheck" resultType="com.yuanchu.mom.dto.InternalCheckDto"> |
| | | select * |
| | | from (select * |
| | | from cnas_internal_check |
| | | order by create_time desc) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.InternalCorrectFileMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.InternalCorrectFile"> |
| | | <id column="supervise_details_correct_file_id" property="superviseDetailsCorrectFileId" /> |
| | | <result column="correct_id" property="correctId" /> |
| | | <result column="type" property="type" /> |
| | | <result column="file_url" property="fileUrl" /> |
| | | <result column="file_name" property="fileName" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | |
| | | </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.InternalCorrectMapper"> |
| | | |
| | | <select id="pageInternalAccording" resultType="com.yuanchu.mom.pojo.InternalCorrect"> |
| | | select * |
| | | from (select * |
| | | from cnas_internal_correct |
| | | order by create_time desc) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.InternalImplementMapper"> |
| | | <!-- å
审宿½è®¡åå页æ¥è¯¢ --> |
| | | <select id="pageInternalImplement" resultType="com.yuanchu.mom.dto.InternalImplementDto"> |
| | | select * |
| | | from (select * |
| | | from cnas_internal_implement |
| | | order by create_time desc) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.InternalMeetingDetailMapper"> |
| | | |
| | | |
| | | </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.InternalMeetingMapper"> |
| | | |
| | | <select id="pageInternalMeeting" resultType="com.yuanchu.mom.dto.InternalMeetingDto"> |
| | | select * |
| | | from (select cim.*, |
| | | (select GROUP_CONCAT(name) |
| | | from user |
| | | where find_in_set(id, cim.participant)) participant_name |
| | | from cnas_internal_meeting cim |
| | | order by cim.create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.InternalPlanDetailMapper"> |
| | | |
| | | |
| | | </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.InternalPlanMapper"> |
| | | <!-- å
审年度计åå页æ¥è¯¢ --> |
| | | <select id="pageInternalPlan" resultType="com.yuanchu.mom.dto.InternalPlanDto"> |
| | | select * |
| | | from (select * |
| | | from cnas_internal_plan |
| | | order by create_time desc) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.InternalReportMapper"> |
| | | <!-- å
审æ¥åå页æ¥è¯¢ --> |
| | | <select id="pageInternalReport" resultType="com.yuanchu.mom.pojo.InternalReport"> |
| | | select * |
| | | from (select * |
| | | from cnas_internal_report |
| | | order by create_time desc) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.ManageControlPlanListMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageControlPlanList"> |
| | | <id column="id" property="id" /> |
| | | <result column="job_activity" property="jobActivity" /> |
| | | <result column="category" property="category" /> |
| | | <result column="description" property="description" /> |
| | | <result column="result" property="result" /> |
| | | <result column="intolerable" property="intolerable" /> |
| | | <result column="plan" property="plan" /> |
| | | <result column="editor" property="editor" /> |
| | | <result column="editor_date" property="editorDate" /> |
| | | <result column="approval" property="approval" /> |
| | | <result column="approval_date" property="approvalDate" /> |
| | | <result column="approve" property="approve" /> |
| | | <result column="approve_date" property="approveDate" /> |
| | | </resultMap> |
| | | |
| | | <select id="getPageList" resultType="com.yuanchu.mom.vo.ManageControlPlanListVo"> |
| | | select c.*, u1.name editor_name, u2.name approval_name, u3.name approve_name |
| | | from cnas_manage_control_plan_list c |
| | | left join user u1 on u1.id = c.editor |
| | | left join user u2 on u2.id = c.approval |
| | | left join user u3 on u3.id = c.approve |
| | | <if test="itSExporting == true"> |
| | | where c.approve_status = 1 |
| | | and c.approval_status = 1 |
| | | </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.ManageDocumentAlterMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageDocumentAlter"> |
| | | <id column="id" property="id"/> |
| | | <result column="code" property="code"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="createUserName" property="createUserName"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="expect_alter_date" property="expectAlterDate"/> |
| | | <result column="actually_alter_date" property="actuallyAlterDate"/> |
| | | <result column="state" property="state"/> |
| | | <result column="check_user" property="checkUser"/> |
| | | <result column="checkUserName" property="checkUserName"/> |
| | | <result column="alter_note" property="alterNote"/> |
| | | <result column="alter_before_code" property="alterBeforeCode"/> |
| | | <result column="alter_before_name" property="alterBeforeName"/> |
| | | <result column="alter_before_version" property="alterBeforeVersion"/> |
| | | <result column="alter_after_code" property="alterAfterCode"/> |
| | | <result column="alter_after_name" property="alterAfterName"/> |
| | | <result column="alter_after_version" property="alterAfterVersion"/> |
| | | <result column="alter_after_url" property="alterAfterUrl"/> |
| | | <result column="method" property="method"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageManageDocumentAlter" resultMap="BaseResultMap"> |
| | | select * from (select cmda.*, |
| | | name createUserName |
| | | from cnas_manage_document_alter cmda |
| | | left join user u on cmda.create_user = u.id) A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getManageDocumentAlter" resultMap="BaseResultMap"> |
| | | select cmda.*, |
| | | u1.name createUserName, |
| | | u2.name checkUserName |
| | | from cnas_manage_document_alter cmda |
| | | left join user u1 on cmda.create_user = u1.id |
| | | left join user u2 on cmda.check_user = u2.id |
| | | where cmda.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.ManageDocumentCancelMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageDocumentCancel"> |
| | | <id column="id" property="id"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="createUserName" property="createUserName"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="document_code" property="documentCode"/> |
| | | <result column="name" property="name"/> |
| | | <result column="version" property="version"/> |
| | | <result column="document_state" property="documentState"/> |
| | | <result column="method" property="method"/> |
| | | <result column="cancel_note" property="cancelNote"/> |
| | | <result column="check_user" property="checkUser"/> |
| | | <result column="checkUserName" property="checkUserName"/> |
| | | <result column="expect_cancel_date" property="expectCancelDate"/> |
| | | <result column="actually_cancel_date" property="actuallyCancelDate"/> |
| | | <result column="state" property="state"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageManageDocumentCancel" resultMap="BaseResultMap"> |
| | | select * from (select mdc.*, |
| | | u.name createUserName |
| | | from cnas_manage_document_cancel mdc |
| | | left join user u on mdc.create_user = u.id)A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getManageDocumentCancel" resultMap="BaseResultMap"> |
| | | select mdc.*, |
| | | u1.name createUserName, |
| | | u2.name checkUserName |
| | | from cnas_manage_document_cancel mdc |
| | | left join user u1 on mdc.create_user = u1.id |
| | | left join user u2 on mdc.check_user = u2.id |
| | | where mdc.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.ManageDocumentControlledMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageDocumentControlled"> |
| | | <id column="id" property="id"/> |
| | | <result column="document_code" property="documentCode"/> |
| | | <result column="type" property="type"/> |
| | | <result column="name" property="name"/> |
| | | <result column="version" property="version"/> |
| | | <result column="writer" property="writer"/> |
| | | <result column="submit_date" property="submitDate"/> |
| | | <result column="instructions" property="instructions"/> |
| | | <result column="state" property="state"/> |
| | | <result column="url" property="url"/> |
| | | <result column="duty_user" property="dutyUser"/> |
| | | <result column="dutyUserName" property="dutyUserName"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="createUserName" property="createUserName"/> |
| | | <result column="createUserDepartLims" property="createUserDepartLims"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageManageDocumentControlled" resultMap="BaseResultMap"> |
| | | select * from (select cmdc.*, u1.name createUserName, u2.name dutyUserName |
| | | from cnas_manage_document_controlled cmdc |
| | | left join user u1 on cmdc.create_user = u1.id |
| | | left join user u2 on cmdc.duty_user = u2.id)A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getManageDocumentControlled" resultMap="BaseResultMap"> |
| | | select cmdc.*, u1.name createUserName, u2.name dutyUserName |
| | | from cnas_manage_document_controlled cmdc |
| | | left join user u1 on cmdc.create_user = u1.id |
| | | left join user u2 on cmdc.duty_user = u2.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.ManageDocumentIssueRecycleMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageDocumentIssueRecycle"> |
| | | <id column="id" property="id"/> |
| | | <result column="document_code" property="documentCode"/> |
| | | <result column="name" property="name"/> |
| | | <result column="version" property="version"/> |
| | | <result column="state" property="state"/> |
| | | <result column="document_state" property="documentState"/> |
| | | <result column="issue_code" property="issueCode"/> |
| | | <result column="issue_user" property="issueUser"/> |
| | | <result column="issue_date" property="issueDate"/> |
| | | <result column="issue_note" property="issueNote"/> |
| | | <result column="receive_user" property="receiveUser"/> |
| | | <result column="receive_date" property="receiveDate"/> |
| | | <result column="recycle_code" property="recycleCode"/> |
| | | <result column="recycle_user" property="recycleUser"/> |
| | | <result column="recycle_date" property="recycleDate"/> |
| | | <result column="recycle_note" property="recycleNote"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="url" property="url"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageManageDocumentIssueRecycle" resultType="com.yuanchu.mom.dto.ManageDocumentIssueRecycleDto"> |
| | | select * from (select cmdir.*, |
| | | u1.name issueUserName, |
| | | u2.name recycleUserName, |
| | | u3.name receiveUserName |
| | | from cnas_manage_document_issue_recycle cmdir |
| | | left join user u1 on issue_user=u1.id |
| | | left join user u2 on recycle_user=u2.id |
| | | left join user u3 on receive_user=u3.id) A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getManageDocumentIssueRecycle" resultType="com.yuanchu.mom.dto.ManageDocumentIssueRecycleDto"> |
| | | select cmdir.*, |
| | | u1.name issueUserName, |
| | | u2.name recycleUserName, |
| | | u3.name receiveUserNmae |
| | | from cnas_manage_document_issue_recycle cmdir |
| | | left join user u1 on issue_user=u1.id |
| | | left join user u2 on recycle_user=u2.id |
| | | left join user u3 on receive_user=u3.id |
| | | where cmdir.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.ManageDocumentListMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageDocumentList"> |
| | | <id column="id" property="id"/> |
| | | <result column="document_code" property="documentCode"/> |
| | | <result column="type" property="type"/> |
| | | <result column="name" property="name"/> |
| | | <result column="version" property="version"/> |
| | | <result column="writer" property="writer"/> |
| | | <result column="effective_date" property="effectiveDate"/> |
| | | <result column="state" property="state"/> |
| | | <result column="url" property="url"/> |
| | | <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="pageManageDocumentList" resultType="com.yuanchu.mom.pojo.ManageDocumentList"> |
| | | select * from (select * from cnas_manage_document_list ) A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.ManageMeetingMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageMeeting"> |
| | | <id column="id" property="id" /> |
| | | <result column="meeting_time" property="meetingTime" /> |
| | | <result column="place" property="place" /> |
| | | <result column="compere" property="compere" /> |
| | | <result column="content" property="content" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | <select id="page" resultType="com.yuanchu.mom.dto.ManageMeetingDto"> |
| | | select cmm.* from cnas_manage_meeting cmm |
| | | <where> |
| | | <if test="startTime != null and startTime != ''"> |
| | | meeting_time >= #{startTime} |
| | | </if> |
| | | <if test="endTime != null and endTime != ''"> |
| | | and #{endTime} >= meeting_time |
| | | </if> |
| | | <if test="place != null and place != ''"> |
| | | and place = #{place} |
| | | </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.ManageMeetingParticipantsMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageMeetingParticipants"> |
| | | <id column="id" property="id" /> |
| | | <result column="participants" property="participants" /> |
| | | <result column="department" property="department" /> |
| | | <result column="meeting_id" property="meetingId" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | |
| | | </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.ManageRecordAuditMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageRecordAudit"> |
| | | <id column="id" property="id"/> |
| | | <result column="document_code" property="documentCode"/> |
| | | <result column="document_name" property="documentName"/> |
| | | <result column="capter" property="capter"/> |
| | | <result column="pages" property="pages"/> |
| | | <result column="number" property="number"/> |
| | | <result column="before_version" property="beforeVersion"/> |
| | | <result column="after_version" property="afterVersion"/> |
| | | <result column="alter_thing" property="alterThing"/> |
| | | <result column="alter_user" property="alterUser"/> |
| | | <result column="alterUserName" property="alterUserName"/> |
| | | <result column="ratify_user" property="ratifyUser"/> |
| | | <result column="ratifyUserName" property="ratifyUserName"/> |
| | | <result column="ratifyUserUrl" property="ratifyUserUrl"/> |
| | | <result column="date" property="date"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="createUserName" property="createUserName"/> |
| | | <result column="createUserDepart" property="createUserDepart"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="reason" property="reason"/> |
| | | <result column="before_depart" property="beforeDepart"/> |
| | | <result column="after_depart" property="afterDepart"/> |
| | | <result column="applicant" property="applicant"/> |
| | | <result column="formulation" property="formulation"/> |
| | | <result column="audit" property="audit"/> |
| | | <result column="method" property="method"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageManageRecordAudit" resultMap="BaseResultMap"> |
| | | select * from (select cmra.*, |
| | | u1.name createUserName, |
| | | u2.name alterUserName, |
| | | u3.signature_url ratifyUserUrl, |
| | | u3.name ratifyUserName |
| | | from cnas_manage_record_audit cmra |
| | | left join user u1 on cmra.create_user = u1.id |
| | | left join user u2 on cmra.alter_user = u2.id |
| | | left join user u3 on cmra.ratify_user = u3.id)A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.ManageRecordCancelMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageRecordCancel"> |
| | | <id column="id" property="id"/> |
| | | <result column="document_code" property="documentCode"/> |
| | | <result column="document_name" property="documentName"/> |
| | | <result column="qty" property="qty"/> |
| | | <result column="reason" property="reason"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="createUserName" property="createUserName"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="ratify_user" property="ratifyUser"/> |
| | | <result column="ratify_state" property="ratifyState"/> |
| | | <result column="ratifyUserName" property="ratifyUserName"/> |
| | | <result column="ratify_time" property="ratifyTime"/> |
| | | <result column="remark" property="remark"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageManageRecordCancel" resultMap="BaseResultMap"> |
| | | select * from (select cmrc.*, |
| | | u1.name createUserName, |
| | | u2.name ratifyUserName |
| | | from cnas_manage_record_cancel cmrc |
| | | left join user u1 on cmrc.create_user = u1.id |
| | | left join user u2 on cmrc.ratify_user = u2.id)A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.ManageRecordCheckMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageRecordCheck"> |
| | | <id column="id" property="id"/> |
| | | <result column="document_name" property="documentName"/> |
| | | <result column="document_code" property="documentCode"/> |
| | | <result column="document_version" property="documentVersion"/> |
| | | <result column="write_user" property="writeUser"/> |
| | | <result column="writeUserName" property="writeUserName"/> |
| | | <result column="check_user" property="checkUser"/> |
| | | <result column="checkUserName" property="checkUserName"/> |
| | | <result column="check_state" property="checkState"/> |
| | | <result column="ratify_user" property="ratifyUser"/> |
| | | <result column="ratifyUserName" property="ratifyUserName"/> |
| | | <result column="ratify_state" property="ratifyState"/> |
| | | <result column="ratify_date" property="ratifyDate"/> |
| | | <result column="remark" property="remark"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageManageRecordCheck" resultMap="BaseResultMap"> |
| | | select * from (select cmrc.*, |
| | | u1.name writeUserName, |
| | | u2.name checkUserName, |
| | | u3.name ratifyUserName |
| | | from cnas_manage_record_check cmrc |
| | | left join user u1 on write_user=u1.id |
| | | left join user u2 on check_user=u2.id |
| | | left join user u3 on ratify_user=u3.id)A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.ManageRecordIntervalsMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageRecordIntervals"> |
| | | <id column="id" property="id"/> |
| | | <result column="document_name" property="documentName"/> |
| | | <result column="document_code" property="documentCode"/> |
| | | <result column="document_version" property="documentVersion"/> |
| | | <result column="revision" property="revision"/> |
| | | <result column="suitability" property="suitability"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="record_intervals_total_id" property="recordIntervalsTotalId"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageManageRecordIntervals" resultMap="BaseResultMap"> |
| | | select * |
| | | from (select * from cnas_manage_record_intervals) A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.ManageRecordIntervalsTotalMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageRecordIntervalsTotal"> |
| | | <id column="id" property="id" /> |
| | | <result column="ratify_user" property="ratifyUser"/> |
| | | <result column="ratifyUserName" property="ratifyUserName"/> |
| | | <result column="ratify_state" property="ratifyState"/> |
| | | <result column="ratify_date" property="ratifyDate"/> |
| | | <result column="ratify_url" property="ratifyUrl"/> |
| | | <result column="submit_user" property="submitUser"/> |
| | | <result column="submitUserName" property="submitUserName"/> |
| | | <result column="submit_url" property="submitUrl"/> |
| | | <result column="submit_date" property="submitDate"/> |
| | | <result column="year" property="year"/> |
| | | <result column="total_num" property="totalNum"/> |
| | | <result column="url" property="url"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageManageRecordIntervalsTotal" resultMap="BaseResultMap"> |
| | | select * from (select cmrit.*, |
| | | u1.name submitUserName, |
| | | u2.name ratifyUserName |
| | | from cnas_manage_record_intervals_total cmrit |
| | | left join user u1 on u1.id=submit_user |
| | | left join user u2 on u2.id=ratify_user)A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.ManageRecordIssueRecycleMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageRecordIssueRecycle"> |
| | | <id column="id" property="id"/> |
| | | <result column="document_code" property="documentCode"/> |
| | | <result column="document_name" property="documentName"/> |
| | | <result column="document_version" property="documentVersion"/> |
| | | <result column="pages" property="pages"/> |
| | | <result column="document_type" property="documentType"/> |
| | | <result column="number" property="number"/> |
| | | <result column="depart_lims" property="departLims"/> |
| | | <result column="receive_user" property="receiveUser"/> |
| | | <result column="receiveUserName" property="receiveUserName"/> |
| | | <result column="receive_date" property="receiveDate"/> |
| | | <result column="signed_user" property="signedUser"/> |
| | | <result column="signedUserName" property="signedUserName"/> |
| | | <result column="signed_date" property="signedDate"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageManageRecordIssueRecycle" resultMap="BaseResultMap"> |
| | | select * from (select cmrir.*, |
| | | u1.name receiveUserName, |
| | | u2.name signedUserName |
| | | from cnas_manage_record_issue_recycle cmrir |
| | | left join user u1 on receive_user=u1.id |
| | | left join user u2 on signed_user=u2.id)A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.ManageRecordTotalMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageRecordTotal"> |
| | | <id column="id" property="id"/> |
| | | <result column="ratify_user" property="ratifyUser"/> |
| | | <result column="ratifyUserName" property="ratifyUserName"/> |
| | | <result column="ratify_state" property="ratifyState"/> |
| | | <result column="ratify_date" property="ratifyDate"/> |
| | | <result column="ratify_url" property="ratifyUrl"/> |
| | | <result column="submit_user" property="submitUser"/> |
| | | <result column="submitUserName" property="submitUserName"/> |
| | | <result column="submit_url" property="submitUrl"/> |
| | | <result column="submit_date" property="submitDate"/> |
| | | <result column="year" property="year"/> |
| | | <result column="total_num" property="totalNum"/> |
| | | <result column="url" property="url"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageProcessTotaldeal" resultMap="BaseResultMap"> |
| | | select * from (select cmrt.*, |
| | | u1.name submitUserName, |
| | | u2.name ratifyUserName |
| | | from cnas_manage_record_total cmrt |
| | | left join user u1 on u1.id=submit_user |
| | | left join user u2 on u2.id=ratify_user)A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.ManageRecordVerifyMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageRecordVerify"> |
| | | <id column="id" property="id"/> |
| | | <result column="document_name" property="documentName"/> |
| | | <result column="document_code" property="documentCode"/> |
| | | <result column="standard_name" property="standardName"/> |
| | | <result column="standard_code" property="standardCode"/> |
| | | <result column="effective_date" property="effectiveDate"/> |
| | | <result column="cancel_date" property="cancelDate"/> |
| | | <result column="note" property="note"/> |
| | | <result column="manage_record_total_id" property="manageRecordTotalId"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageManageRecordVerify" resultMap="BaseResultMap"> |
| | | select * from (select * from cnas_manage_record_verify)A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </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.ManageReviewProgramFileMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageReviewProgramFile"> |
| | | <id column="id" property="id" /> |
| | | <result column="file_name" property="fileName" /> |
| | | <result column="review_id" property="reviewId" /> |
| | | <result column="url" property="url" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | |
| | | </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.ManageReviewProgramMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageReviewProgram"> |
| | | <id column="id" property="id" /> |
| | | <result column="review_time" property="reviewTime" /> |
| | | <result column="judging_location" property="judgingLocation" /> |
| | | <result column="judging_purpose" property="judgingPurpose" /> |
| | | <result column="judging_method" property="judgingMethod" /> |
| | | <result column="participants" property="participants" /> |
| | | <result column="judging_scope" property="judgingScope" /> |
| | | <result column="judging_basis" property="judgingBasis" /> |
| | | <result column="main_context" property="mainContext" /> |
| | | <result column="preparation_requirements" property="preparationRequirements" /> |
| | | <result column="editor" property="editor" /> |
| | | <result column="editor_date" property="editorDate" /> |
| | | <result column="approve" property="approve" /> |
| | | <result column="approve_date" property="approveDate" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | <select id="page" resultType="com.yuanchu.mom.pojo.ManageReviewProgram"> |
| | | select * from cnas_manage_review_program |
| | | <where> |
| | | <if test="startTime != null and startTime != ''"> |
| | | review_time >= #{startTime} |
| | | </if> |
| | | <if test="endTime != null and endTime != ''"> |
| | | and #{endTime} >= review_time |
| | | </if> |
| | | <if test="judgingLocation != null and judgingLocation != ''"> |
| | | and judging_location = #{judgingLocation} |
| | | </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.ManageReviewReportMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageReviewReport"> |
| | | <id column="id" property="id" /> |
| | | <result column="objective" property="objective" /> |
| | | <result column="place" property="place" /> |
| | | <result column="compere" property="compere" /> |
| | | <result column="record_people" property="recordPeople" /> |
| | | <result column="date" property="date" /> |
| | | <result column="page" property="page" /> |
| | | <result column="judging_method" property="judgingMethod" /> |
| | | <result column="review_basis" property="reviewBasis" /> |
| | | <result column="attendess" property="attendess" /> |
| | | <result column="review_inputs" property="reviewInputs" /> |
| | | <result column="review_process" property="reviewProcess" /> |
| | | <result column="main_topic" property="mainTopic" /> |
| | | <result column="matters" property="matters" /> |
| | | <result column="head" property="head" /> |
| | | <result column="completion_date" property="completionDate" /> |
| | | <result column="tracking_confirmed" property="trackingConfirmed" /> |
| | | <result column="foller_up" property="follerUp" /> |
| | | <result column="overall_evaluation" property="overallEvaluation" /> |
| | | <result column="audit" property="audit" /> |
| | | <result column="approval" property="approval" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | <select id="page" resultType="com.yuanchu.mom.pojo.ManageReviewReport"> |
| | | select * from cnas_manage_review_report |
| | | <where> |
| | | <if test="startTime != null and startTime != ''"> |
| | | `date` >= #{startTime} |
| | | </if> |
| | | <if test="endTime != null and endTime != ''"> |
| | | and #{endTime} >= `date` |
| | | </if> |
| | | <if test="place != null and place != ''"> |
| | | and place = #{place} |
| | | </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.ManageRiskAssessmentResultsMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ManageRiskAssessmentResults"> |
| | | <id column="id" property="id" /> |
| | | <result column="venue" property="venue" /> |
| | | <result column="hazard" property="hazard" /> |
| | | <result column="accidents" property="accidents" /> |
| | | <result column="injury" property="injury" /> |
| | | <result column="risk_L" property="riskL" /> |
| | | <result column="risk_E" property="riskE" /> |
| | | <result column="risk_C" property="riskC" /> |
| | | <result column="risk_D" property="riskD" /> |
| | | <result column="level" property="level" /> |
| | | <result column="conclusion" property="conclusion" /> |
| | | <result column="measures" property="measures" /> |
| | | <result column="editor" property="editor" /> |
| | | <result column="editor_date" property="editorDate" /> |
| | | <result column="approval" property="approval" /> |
| | | <result column="approval_date" property="approvalDate" /> |
| | | <result column="approve" property="approve" /> |
| | | <result column="approve_date" property="approveDate" /> |
| | | </resultMap> |
| | | |
| | | <select id="getPageResults" resultType="com.yuanchu.mom.vo.ManageRiskAssessmentResultsVo"> |
| | | select c.*, u1.name editor_name, u2.name approval_name, u3.name approve_name |
| | | from cnas_manage_risk_assessment_results c |
| | | left join user u1 on u1.id = c.editor |
| | | left join user u2 on u2.id = c.approval |
| | | left join user u3 on u3.id = c.approve |
| | | <if test="itSExporting == true"> |
| | | where c.approve_status = 1 |
| | | and c.approval_status = 1 |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.utils; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import java.awt.*; |
| | | import java.awt.font.FontRenderContext; |
| | | import java.awt.geom.Rectangle2D; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/9/28 |
| | | */ |
| | | public class DateImageUtil { |
| | | |
| | | /** |
| | | * çæ å½åæ¥æçç»å¸ |
| | | * @return |
| | | */ |
| | | public static InputStream createDateImage(LocalDateTime date) { |
| | | int width = 80; |
| | | int height = 20; |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd"); |
| | | if (date == null) { |
| | | date = LocalDateTime.now(); |
| | | } |
| | | String s = date.format(formatter); |
| | | |
| | | Font font = new Font("Serif", Font.BOLD, 10); |
| | | // å建ä¸ä¸ªç»å¸ï¼èæ¯éæï¼ |
| | | BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); |
| | | // è·åç»å¸çç»ç¬ |
| | | Graphics2D g2 = (Graphics2D) bi.getGraphics(); |
| | | // å¼å§ç»å¾ |
| | | g2.setComposite(AlphaComposite.Src); // ç¡®ä¿ç»å¾æ¶æ¯éæèæ¯ |
| | | g2.setBackground(new Color(0, 0, 0, 0)); // èæ¯è²ä¸ºéæ |
| | | g2.clearRect(0, 0, width, height); |
| | | g2.setPaint(new Color(0, 0, 0)); // 设置ç»å¶é¢è² |
| | | FontRenderContext context = g2.getFontRenderContext(); |
| | | Rectangle2D bounds = font.getStringBounds(s, context); |
| | | double x = (width - bounds.getWidth()) / 2; |
| | | double y = (height - bounds.getHeight()) / 2; |
| | | double ascent = -bounds.getY(); |
| | | double baseY = y + ascent; |
| | | g2.drawString(s, (int) x, (int) baseY); |
| | | g2.dispose(); // éæ¾ç»ç¬èµæº |
| | | ByteArrayOutputStream os = new ByteArrayOutputStream(); |
| | | |
| | | try { |
| | | ImageIO.write(bi, "png", os); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return new ByteArrayInputStream(os.toByteArray()); |
| | | } |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.FileSystemUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.File; |
| | |
| | | } |
| | | |
| | | public static Boolean DeleteFile(String fileName) { |
| | | if (ObjectUtils.isEmpty(fileName)) { |
| | | return false; |
| | | } |
| | | return FileSystemUtils.deleteRecursively(new File(FILE_PATH + "/" + fileName)); |
| | | } |
| | | /** |
| | |
| | | String date = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
| | | String date2 = LocalDate.now().format(DateTimeFormatter.ofPattern(patten)); |
| | | int num; |
| | | num = systemLogMapper.countRowsByNow(tableName, LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) + 1; |
| | | if (tableName.equals("ins_order")) { |
| | | num = systemLogMapper.countRowsByNow2(tableName, LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) + 1; |
| | | } else { |
| | | num = systemLogMapper.countRowsByNow(tableName, LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) + 1; |
| | | } |
| | | String nums = num + ""; |
| | | if (nums.length() == 1) nums = "00" + num; |
| | | else if (nums.length() == 2) nums = "0" + num; |
| | |
| | | } |
| | | |
| | | //æ£éªåå§æåå·ççæè§å |
| | | public String giveCode2(String code, String tableName, String symbol, String patten) { |
| | | public String giveCode2(String code, Long companyId, String laboratory, String tableName, String symbol, String patten) { |
| | | String date = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
| | | String date2 = LocalDate.now().format(DateTimeFormatter.ofPattern(patten)); |
| | | int num; |
| | | num = systemLogMapper.countRowsByNow2(tableName, LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) + 1; |
| | | num = systemLogMapper.countRowsByNow3(tableName, companyId, laboratory, LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM"))) + 1; |
| | | String nums = num + ""; |
| | | if (nums.length() == 1) nums = "00" + num; |
| | | else if (nums.length() == 2) nums = "0" + num; |
| | | return code + (date2 == null ? date : date2) + symbol + nums; |
| | | } |
| | | |
| | | //æ£éªåçæå¤é¨å§æç¼å·çè§å |
| | | public String giveCode3(String code, Long companyId, String laboratory, String tableName, String symbol, String patten) { |
| | | String date = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
| | | String date2 = LocalDate.now().format(DateTimeFormatter.ofPattern(patten)); |
| | | int num; |
| | | num = systemLogMapper.countRowsByNow4(tableName, companyId, laboratory, LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM"))) + 1; |
| | | String nums = num + ""; |
| | | if (nums.length() == 1) nums = "0000" + num; |
| | | else if (nums.length() == 2) nums = "000" + num; |
| | | else if (nums.length() == 3) nums = "00" + num; |
| | | else if (nums.length() == 4) nums = "0" + num; |
| | | return code + (date2 == null ? date : date2) + symbol + nums; |
| | | } |
| | | |
| | | } |
| | |
| | | import java.util.Calendar; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | |
| | | @Component |
| | | public class Jwt { |
| | |
| | | package com.yuanchu.mom.utils; |
| | | |
| | | import com.google.zxing.BarcodeFormat; |
| | | import com.google.zxing.EncodeHintType; |
| | | import com.google.zxing.MultiFormatWriter; |
| | | import com.google.zxing.WriterException; |
| | | import com.google.zxing.common.BitMatrix; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | |
| | | import com.google.zxing.BarcodeFormat; |
| | | import com.google.zxing.EncodeHintType; |
| | | import com.google.zxing.MultiFormatWriter; |
| | | import com.google.zxing.WriterException; |
| | | import com.google.zxing.common.BitMatrix; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * é
ç½®å¾ååå
¥å¨ |
| | |
| | | package com.yuanchu.mom.utils; |
| | | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | |
| | | * @return è¿åéæºå å¯ç |
| | | */ |
| | | public static String getSalt(int n) { |
| | | char[] chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890!@#$%^&*()+-=/[];~.".toCharArray(); |
| | | char[] chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890!@$%^&*.?".toCharArray(); |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (int i = 0; i < n; i++) { |
| | | char c = chars[new Random().nextInt(chars.length)]; |
| | |
| | | String sixIncr = String.format("%06d", incrNum); |
| | | return prefix + timeStr + sixIncr; |
| | | } |
| | | |
| | | /** |
| | | * 夿æ¯å¦ä¸ºexcel |
| | | * @param file |
| | | * @return |
| | | */ |
| | | public static boolean isExcelFile(MultipartFile file) { |
| | | if (file.isEmpty()) { |
| | | return false; |
| | | } |
| | | String originalFilename = file.getOriginalFilename(); |
| | | if (originalFilename == null) { |
| | | return false; |
| | | } |
| | | String[] parts = originalFilename.split("\\."); |
| | | if (parts.length == 0) { |
| | | return false; |
| | | } |
| | | String fileExtension = parts[parts.length - 1].toLowerCase(); |
| | | return fileExtension.equals("xls") || fileExtension.equals("xlsx"); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright 2014-2020 Sayi |
| | | * |
| | | * 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 |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * 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.utils; |
| | | |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.exception.RenderException; |
| | | import com.deepoove.poi.policy.RenderPolicy; |
| | | import com.deepoove.poi.render.compute.RenderDataCompute; |
| | | import com.deepoove.poi.render.processor.DocumentProcessor; |
| | | import com.deepoove.poi.resolver.TemplateResolver; |
| | | import com.deepoove.poi.template.ElementTemplate; |
| | | import com.deepoove.poi.template.MetaTemplate; |
| | | import com.deepoove.poi.template.run.RunTemplate; |
| | | import com.deepoove.poi.util.ReflectionUtils; |
| | | import com.deepoove.poi.util.TableTools; |
| | | import org.apache.poi.xwpf.usermodel.*; |
| | | import org.apache.xmlbeans.XmlCursor; |
| | | import org.apache.xmlbeans.XmlObject; |
| | | import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow; |
| | | import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr; |
| | | import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTVMerge; |
| | | import org.openxmlformats.schemas.wordprocessingml.x2006.main.STMerge; |
| | | |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Hack for loop table row |
| | | * |
| | | * @author Sayi |
| | | * |
| | | */ |
| | | public class HackLoopTableRenderPolicy implements RenderPolicy { |
| | | |
| | | private String prefix; |
| | | private String suffix; |
| | | private boolean onSameLine; |
| | | |
| | | public HackLoopTableRenderPolicy() { |
| | | this(false); |
| | | } |
| | | |
| | | public HackLoopTableRenderPolicy(boolean onSameLine) { |
| | | this("[", "]", onSameLine); |
| | | } |
| | | |
| | | public HackLoopTableRenderPolicy(String prefix, String suffix) { |
| | | this(prefix, suffix, false); |
| | | } |
| | | |
| | | public HackLoopTableRenderPolicy(String prefix, String suffix, boolean onSameLine) { |
| | | this.prefix = prefix; |
| | | this.suffix = suffix; |
| | | this.onSameLine = onSameLine; |
| | | } |
| | | |
| | | @Override |
| | | public void render(ElementTemplate eleTemplate, Object data, XWPFTemplate template) { |
| | | RunTemplate runTemplate = (RunTemplate) eleTemplate; |
| | | XWPFRun run = runTemplate.getRun(); |
| | | try { |
| | | if (!TableTools.isInsideTable(run)) { |
| | | throw new IllegalStateException( |
| | | "The template tag " + runTemplate.getSource() + " must be inside a table"); |
| | | } |
| | | XWPFTableCell tagCell = (XWPFTableCell) ((XWPFParagraph) run.getParent()).getBody(); |
| | | XWPFTable table = tagCell.getTableRow().getTable(); |
| | | run.setText("", 0); |
| | | |
| | | int templateRowIndex = getTemplateRowIndex(tagCell); |
| | | if (null != data && data instanceof Iterable) { |
| | | Iterator<?> iterator = ((Iterable<?>) data).iterator(); |
| | | XWPFTableRow templateRow = table.getRow(templateRowIndex); |
| | | int insertPosition = templateRowIndex; |
| | | |
| | | TemplateResolver resolver = new TemplateResolver(template.getConfig().copy(prefix, suffix)); |
| | | boolean firstFlag = true; |
| | | while (iterator.hasNext()) { |
| | | insertPosition = templateRowIndex++; |
| | | XWPFTableRow nextRow = table.insertNewTableRow(insertPosition); |
| | | setTableRow(table, templateRow, insertPosition); |
| | | |
| | | // double set row |
| | | XmlCursor newCursor = templateRow.getCtRow().newCursor(); |
| | | newCursor.toPrevSibling(); |
| | | XmlObject object = newCursor.getObject(); |
| | | nextRow = new XWPFTableRow((CTRow) object, table); |
| | | if (!firstFlag) { |
| | | // update VMerge cells for non-first row |
| | | List<XWPFTableCell> tableCells = nextRow.getTableCells(); |
| | | for (XWPFTableCell cell : tableCells) { |
| | | CTTcPr tcPr = TableTools.getTcPr(cell); |
| | | CTVMerge vMerge = tcPr.getVMerge(); |
| | | if (null == vMerge) continue; |
| | | if (STMerge.RESTART == vMerge.getVal()) { |
| | | vMerge.setVal(STMerge.CONTINUE); |
| | | } |
| | | } |
| | | } else { |
| | | firstFlag = false; |
| | | } |
| | | setTableRow(table, nextRow, insertPosition); |
| | | |
| | | RenderDataCompute dataCompute = template.getConfig().getRenderDataComputeFactory() |
| | | .newCompute(iterator.next()); |
| | | List<XWPFTableCell> cells = nextRow.getTableCells(); |
| | | cells.forEach(cell -> { |
| | | List<MetaTemplate> templates = resolver.resolveBodyElements(cell.getBodyElements()); |
| | | new DocumentProcessor(template, resolver, dataCompute).process(templates); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | table.removeRow(templateRowIndex); |
| | | afterloop(table, data); |
| | | } catch (Exception e) { |
| | | throw new RenderException("HackLoopTable for " + eleTemplate + "error: " + e.getMessage(), e); |
| | | } |
| | | } |
| | | |
| | | private int getTemplateRowIndex(XWPFTableCell tagCell) { |
| | | XWPFTableRow tagRow = tagCell.getTableRow(); |
| | | return onSameLine ? getRowIndex(tagRow) : (getRowIndex(tagRow) + 1); |
| | | } |
| | | |
| | | protected void afterloop(XWPFTable table, Object data) { |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | private void setTableRow(XWPFTable table, XWPFTableRow templateRow, int pos) { |
| | | List<XWPFTableRow> rows = (List<XWPFTableRow>) ReflectionUtils.getValue("tableRows", table); |
| | | rows.set(pos, templateRow); |
| | | table.getCTTbl().setTrArray(pos, templateRow.getCtRow()); |
| | | } |
| | | |
| | | private int getRowIndex(XWPFTableRow row) { |
| | | List<XWPFTableRow> rows = row.getTable().getRows(); |
| | | return rows.indexOf(row); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.utils; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import org.apache.poi.xwpf.usermodel.*; |
| | | import org.openxmlformats.schemas.wordprocessingml.x2006.main.STMerge; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/16 |
| | | */ |
| | | public class XWPFDocumentUtils { |
| | | |
| | | public static void updateMergeByDocument(XWPFDocument document) { |
| | | // å¤çåå¹¶åå
æ ¼çé®é¢ |
| | | 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().contains("â")) { |
| | | String[] split = xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getText().split("â"); |
| | | if (set1.add(split[1])) { |
| | | Map<String, Integer> map = new HashMap<>(); |
| | | map.put("sr", j); |
| | | map.put("sc", k); |
| | | map.put("er", j + 0); |
| | | map.put("ec", k + 0); |
| | | maps.put(split[1], map); |
| | | } else { |
| | | Map<String, Integer> map1 = maps.get(split[1]); |
| | | if (j == map1.get("sr")) { |
| | | map1.put("ec", map1.get("ec") + 1); |
| | | } else if (k == map1.get("sc")) { |
| | | map1.put("er", map1.get("er") + 1); |
| | | } |
| | | } |
| | | String str = xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getText().split("â")[0]; |
| | | xwpfTables.get(i).getRows().get(j).getTableCells().get(k).removeParagraph(0); |
| | | xwpfTables.get(i).getRows().get(j).getTableCells().get(k).setText(str); |
| | | xwpfTables.get(i).getRows().get(j).getTableCells().get(k).setVerticalAlignment(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getParagraphArray(0).setAlignment(ParagraphAlignment.CENTER); |
| | | } |
| | | } |
| | | } |
| | | // åå
æ ¼æåº, é¿å
æ ¼å¼éä¹± |
| | | List<Map.Entry<String, Map<String, Integer>>> entries = new ArrayList<>(maps.entrySet()); |
| | | entries.sort((o1, o2) -> o1.getValue().get("sc") - o2.getValue().get("sc")); |
| | | // æç
§é¡ºåºæ·»å è¿éå |
| | | List<String> list = new ArrayList<>(); |
| | | for (Map.Entry<String, Map<String, Integer>> entry : entries) { |
| | | list.add(entry.getKey()); |
| | | } |
| | | for (int a = list.size() - 1; a >= 0; a--) { |
| | | Map<String, Integer> v = maps.get(list.get(a)); |
| | | for (int j = 0; j < v.get("er") - v.get("sr") + 1; j++) { |
| | | if (v.get("ec") > v.get("sc")) { |
| | | try { |
| | | mergeCellsHorizontally(xwpfTables.get(i), v.get("sr") + j, v.get("sc"), v.get("ec")); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | } |
| | | if (v.get("er") > v.get("sr")) { |
| | | try { |
| | | mergeCellsVertically(xwpfTables.get(i), v.get("sc"), v.get("sr"), v.get("er")); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //å¤çä¸è±ææ¢è¡çé®é¢ |
| | | List<XWPFTable> xwpfTables1 = document.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); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // æ°´å¹³åå¹¶åå
æ ¼ |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.service.AuxiliaryWorkingHoursDayService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.MyUtil; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |