已删除61个文件
已修改118个文件
已添加1,215个文件
| | |
| | | <p align="center"> |
| | | <img alt="logo" src="https://oscimg.oschina.net/oscnet/up-d3d0a9303e11d522a06cd263f3079027715.png"> |
| | | </p> |
| | | <h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.8.9</h1> |
| | | <h4 align="center">åºäºSpringBoot+Vueåå端å离çJavaå¿«éå¼åæ¡æ¶</h4> |
| | | <p align="center"> |
| | | <a href="https://gitee.com/y_project/RuoYi-Vue/stargazers"><img src="https://gitee.com/y_project/RuoYi-Vue/badge/star.svg?theme=dark"></a> |
| | | <a href="https://gitee.com/y_project/RuoYi-Vue"><img src="https://img.shields.io/badge/RuoYi-v3.8.9-brightgreen.svg"></a> |
| | | <a href="https://gitee.com/y_project/RuoYi-Vue/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a> |
| | | </p> |
| | | |
| | | ## å¹³å°ç®ä» |
| | | |
| | | è¥ä¾æ¯ä¸å¥å
¨é¨å¼æºçå¿«éå¼åå¹³å°ï¼æ¯«æ ä¿çç»ä¸ªäººåä¼ä¸å
费使ç¨ã |
| | | |
| | | * å端éç¨VueãElement UIã |
| | | * å端éç¨Spring BootãSpring SecurityãRedis & Jwtã |
| | | * æé认è¯ä½¿ç¨Jwtï¼æ¯æå¤ç»ç«¯è®¤è¯ç³»ç»ã |
| | | * æ¯æå è½½å¨ææéèåï¼å¤æ¹å¼è½»æ¾æéæ§å¶ã |
| | | * 髿çå¼åï¼ä½¿ç¨ä»£ç çæå¨å¯ä»¥ä¸é®çæåå端代ç ã |
| | | * æä¾äºææ¯æ ï¼[Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev)ï¼çæ¬[RuoYi-Vue3](https://gitcode.com/yangzongzhuan/RuoYi-Vue3)ï¼ä¿æåæ¥æ´æ°ã |
| | | * æä¾äºååºç¨çæ¬[RuoYi-Vue-fast](https://gitcode.com/yangzongzhuan/RuoYi-Vue-fast)ï¼Oracleçæ¬[RuoYi-Vue-Oracle](https://gitcode.com/yangzongzhuan/RuoYi-Vue-Oracle)ï¼ä¿æåæ¥æ´æ°ã |
| | | * ä¸åç¦»çæ¬ï¼è¯·ç§»æ¥[RuoYi](https://gitee.com/y_project/RuoYi)ï¼å¾®æå¡çæ¬ï¼è¯·ç§»æ¥[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud) |
| | | * é¿éäºææ£åºï¼[ç¹æè¿å
¥](http://aly.ruoyi.vip)ï¼è
¾è®¯äºç§æåºï¼[ç¹æè¿å
¥](http://txy.ruoyi.vip) |
| | | |
| | | ## å
ç½®åè½ |
| | | |
| | | 1. ç¨æ·ç®¡çï¼ç¨æ·æ¯ç³»ç»æä½è
ï¼è¯¥åè½ä¸»è¦å®æç³»ç»ç¨æ·é
ç½®ã |
| | | 2. é¨é¨ç®¡çï¼é
置系ç»ç»ç»æºæï¼å
¬å¸ãé¨é¨ãå°ç»ï¼ï¼æ ç»æå±ç°æ¯ææ°æ®æéã |
| | | 3. å²ä½ç®¡çï¼é
置系ç»ç¨æ·æå±æ
ä»»èå¡ã |
| | | 4. èå管çï¼é
置系ç»èåï¼æä½æéï¼æé®æéæ è¯çã |
| | | 5. è§è²ç®¡çï¼è§è²èåæéåé
ã设置è§è²ææºæè¿è¡æ°æ®èå´æéååã |
| | | 6. åå
¸ç®¡çï¼å¯¹ç³»ç»ä¸ç»å¸¸ä½¿ç¨çä¸äºè¾ä¸ºåºå®çæ°æ®è¿è¡ç»´æ¤ã |
| | | 7. åæ°ç®¡çï¼å¯¹ç³»ç»å¨æé
置常ç¨åæ°ã |
| | | 8. éç¥å
¬åï¼ç³»ç»éç¥å
¬åä¿¡æ¯åå¸ç»´æ¤ã |
| | | 9. æä½æ¥å¿ï¼ç³»ç»æ£å¸¸æä½æ¥å¿è®°å½åæ¥è¯¢ï¼ç³»ç»å¼å¸¸ä¿¡æ¯æ¥å¿è®°å½åæ¥è¯¢ã |
| | | 10. ç»å½æ¥å¿ï¼ç³»ç»ç»å½æ¥å¿è®°å½æ¥è¯¢å
å«ç»å½å¼å¸¸ã |
| | | 11. å¨çº¿ç¨æ·ï¼å½åç³»ç»ä¸æ´»è·ç¨æ·ç¶æçæ§ã |
| | | 12. 宿¶ä»»å¡ï¼å¨çº¿ï¼æ·»å ãä¿®æ¹ãå é¤)ä»»å¡è°åº¦å
嫿§è¡ç»ææ¥å¿ã |
| | | 13. 代ç çæï¼åå端代ç ççæï¼javaãhtmlãxmlãsqlï¼æ¯æCRUDä¸è½½ ã |
| | | 14. ç³»ç»æ¥å£ï¼æ ¹æ®ä¸å¡ä»£ç èªå¨çæç¸å
³çapiæ¥å£ææ¡£ã |
| | | 15. æå¡çæ§ï¼çè§å½åç³»ç»CPUãå
åãç£çãå æ çç¸å
³ä¿¡æ¯ã |
| | | 16. ç¼åçæ§ï¼å¯¹ç³»ç»çç¼åä¿¡æ¯æ¥è¯¢ï¼å½ä»¤ç»è®¡çã |
| | | 17. å¨çº¿æå»ºå¨ï¼æå¨è¡¨åå
ç´ çæç¸åºçHTML代ç ã |
| | | 18. è¿æ¥æ± çè§ï¼çè§å½åç³»ç»æ°æ®åºè¿æ¥æ± ç¶æï¼å¯è¿è¡åæSQLæ¾åºç³»ç»æ§è½ç¶é¢ã |
| | | |
| | | ## å¨çº¿ä½éª |
| | | |
| | | - admin/admin123 |
| | | - ééç»ç»æ¶å°ä¸äºæèµï¼ä¸ºäºæ´å¥½çä½éªå·²ç¨äºæ¼ç¤ºæå¡å¨å级ã谢谢åä½å°ä¼ä¼´ã |
| | | |
| | | æ¼ç¤ºå°åï¼http://vue.ruoyi.vip |
| | | ææ¡£å°åï¼http://doc.ruoyi.vip |
| | | |
| | | ## æ¼ç¤ºå¾ |
| | | |
| | | <table> |
| | | <tr> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/cd1f90be5f2684f4560c9519c0f2a232ee8.jpg"/></td> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td> |
| | | </tr> |
| | | <tr> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td> |
| | | </tr> |
| | | <tr> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/up-936ec82d1f4872e1bc980927654b6007307.png"/></td> |
| | | </tr> |
| | | <tr> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td> |
| | | </tr> |
| | | <tr> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td> |
| | | </tr> |
| | | <tr> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td> |
| | | </tr> |
| | | <tr> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td> |
| | | </tr> |
| | | <tr> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/b6115bc8c31de52951982e509930b20684a.jpg"/></td> |
| | | <td><img src="https://oscimg.oschina.net/oscnet/up-5e4daac0bb59612c5038448acbcef235e3a.png"/></td> |
| | | </tr> |
| | | </table> |
| | | |
| | | |
| | | ## è¥ä¾åå端å离交æµç¾¤ |
| | | |
| | | QQç¾¤ï¼ [](https://jq.qq.com/?_wv=1027&k=5bVB1og) [](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [](https://jq.qq.com/?_wv=1027&k=51G72yr) [](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) [](https://jq.qq.com/?_wv=1027&k=SWCtLnMz) [](https://jq.qq.com/?_wv=1027&k=96Dkdq0k) [](https://jq.qq.com/?_wv=1027&k=0fsNiYZt) [](https://jq.qq.com/?_wv=1027&k=7xw4xUG1) [](https://jq.qq.com/?_wv=1027&k=eCx8eyoJ) [](https://jq.qq.com/?_wv=1027&k=SpyH2875) [](https://jq.qq.com/?_wv=1027&k=tKEt51dz) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=0vBbSb0ztbBgVtn3kJS-Q4HUNYwip89G&authKey=8irq5PhutrZmWIvsUsklBxhj57l%2F1nOZqjzigkXZVoZE451GG4JHPOqW7AW6cf0T&noverify=0&group_code=143961921) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=ZFAPAbp09S2ltvwrJzp7wGlbopsc0rwi&authKey=HB2cxpxP2yspk%2Bo3WKTBfktRCccVkU26cgi5B16u0KcAYrVu7sBaE7XSEqmMdFQp&noverify=0&group_code=174951577) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Fn2aF5IHpwsy8j6VlalNJK6qbwFLFHat&authKey=uyIT%2B97x2AXj3odyXpsSpVaPMC%2Bidw0LxG5MAtEqlrcBcWJUA%2FeS43rsF1Tg7IRJ&noverify=0&group_code=161281055) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=XIzkm_mV2xTsUtFxo63bmicYoDBA6Ifm&authKey=dDW%2F4qsmw3x9govoZY9w%2FoWAoC4wbHqGal%2BbqLzoS6VBarU8EBptIgPKN%2FviyC8j&noverify=0&group_code=138988063) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=DkugnCg68PevlycJSKSwjhFqfIgrWWwR&authKey=pR1Pa5lPIeGF%2FFtIk6d%2FGB5qFi0EdvyErtpQXULzo03zbhopBHLWcuqdpwY241R%2F&noverify=0&group_code=151450850) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=F58bgRa-Dp-rsQJThiJqIYv8t4-lWfXh&authKey=UmUs4CVG5OPA1whvsa4uSespOvyd8%2FAr9olEGaWAfdLmfKQk%2FVBp2YU3u2xXXt76&noverify=0&group_code=224622315) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Nxb2EQ5qozWa218Wbs7zgBnjLSNk_tVT&authKey=obBKXj6SBKgrFTJZx0AqQnIYbNOvBB2kmgwWvGhzxR67RoRr84%2Bus5OadzMcdJl5&noverify=0&group_code=287842588) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=numtK1M_I4eVd2Gvg8qtbuL8JgX42qNh&authKey=giV9XWMaFZTY%2FqPlmWbkB9g3fi0Ev5CwEtT9Tgei0oUlFFCQLDp4ozWRiVIzubIm&noverify=0&group_code=187944233) ç¹å»æé®å
¥ç¾¤ã |
| | |
| | | |
| | | <artifactId>basic-server</artifactId> |
| | | <dependencies> |
| | | <!-- éç¨å·¥å
·--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-common</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- æ ¸å¿æ¨¡å--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-framework</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- ç³»ç»æ¨¡å--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-system</artifactId> |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.poi.excel.ExcelUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | | import com.ruoyi.basic.dto.PageTestObjectDto; |
| | | import com.ruoyi.basic.dto.ProductDTO1; |
| | | import com.ruoyi.basic.excel.StructureTestObjectData; |
| | | import com.ruoyi.basic.excel.StructureTestObjectListener; |
| | | import com.ruoyi.basic.pojo.Product; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | import com.ruoyi.basic.service.CapacityScopeService; |
| | | import com.ruoyi.basic.service.ProductService; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import com.ruoyi.basic.service.StructureItemParameterService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®åæ°(StructureItemParameter)表æ§å¶å± |
| | |
| | | |
| | | private StructureItemParameterService structureItemParameterService; |
| | | |
| | | private ISysDictTypeService dictTypeService; |
| | | |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | @ApiOperation(value = "è·åé¡¹ç®æ£éªåæ°å表") |
| | | @PostMapping("/selectItemParameterList") |
| | | public Result selectItemParameterList(Page page,StructureItemParameter itemParameter) throws Exception { |
| | | @GetMapping("/selectItemParameterList") |
| | | public Result selectItemParameterList(Page page,StructureItemParameter itemParameter) { |
| | | return Result.success(capacityScopeService.selectItemParameterList(page, itemParameter)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤é¡¹ç®æ£éªåæ°") |
| | | @PostMapping("/delItemParameter") |
| | | @DeleteMapping("/delItemParameter") |
| | | public Result<?> delItemParameter(Integer id) { |
| | | return Result.success(capacityScopeService.delItemParameter(id)); |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åæ£éªå¯¹è±¡") |
| | | @PostMapping("/selectTestObjectList") |
| | | public Result selectTestObjectList(Page page,PageTestObjectDto pageTestObjectDto) throws Exception { |
| | | @GetMapping("/selectTestObjectList") |
| | | public Result selectTestObjectList(Page page,PageTestObjectDto pageTestObjectDto) { |
| | | return Result.success(capacityScopeService.selectTestObjectList(page, pageTestObjectDto)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿£éªå¯¹è±¡") |
| | | @PostMapping("/delTestObject") |
| | | @DeleteMapping("/delTestObject") |
| | | public Result<?> delTestObject(Integer id) { |
| | | return Result.success(capacityScopeService.delTestObject(id)); |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "设å¤éé¢éæ©æ£éªé¡¹ç®(æ å½¢ç»æ)") |
| | | @PostMapping("/getInsProduction") |
| | | @GetMapping("/getInsProduction") |
| | | public Result getInsProduction() { |
| | | return Result.success(capacityScopeService.getInsProduction()); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç»´æ¤æ£éªå¯¹è±¡ç产å") |
| | | @PostMapping("/selectProductListByObjectId") |
| | | public Result selectProductListByObjectId(Page page,ProductDTO1 productDTO) throws Exception { |
| | | @GetMapping("/selectProductListByObjectId") |
| | | public Result selectProductListByObjectId(Page page,ProductDTO1 productDTO) { |
| | | return Result.success(productService.selectProductListByObjectId(page, productDTO)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤äº§å") |
| | | @PostMapping("/delProduct") |
| | | @DeleteMapping("/delProduct") |
| | | public Result delProduct(Integer id) { |
| | | return Result.success(productService.delProduct(id)); |
| | | } |
| | |
| | | @PostMapping("/importEquipData") |
| | | @Transactional |
| | | public Result importEquipData(@RequestParam("file") MultipartFile file) throws Exception { |
| | | InputStream inputStream = file.getInputStream(); |
| | | List<StructureItemParameter> lists = new ArrayList<>(); |
| | | AtomicReference<String> sample = new AtomicReference<>(); |
| | | ExcelUtil.readBySax(inputStream, -1, (i, l, list1) -> { |
| | | if (l == 1) { |
| | | sample.set(list1.get(1) + ""); |
| | | } |
| | | if (l >= 1) { |
| | | StructureItemParameter str = new StructureItemParameter(); |
| | | // æµè¯å¯¹è±¡ |
| | | if (list1.get(1) == null) { |
| | | str.setSample(null); |
| | | } else { |
| | | String brand = (String) list1.get(1); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append("["); |
| | | // 产å |
| | | if (ObjectUtil.isNotEmpty(list1.get(2))) { |
| | | String production = (String) list1.get(2); |
| | | if (!production.contains("ï¼")) { |
| | | builder.append(String.format("[\"%s\",\"%s\"]", brand, production)); |
| | | } else { |
| | | Arrays.stream(production.split("ï¼")).forEach(item -> { |
| | | builder.append(String.format("[\"%s\",\"%s\"],", brand, item)); |
| | | }); |
| | | builder.deleteCharAt(builder.length() - 1); |
| | | } |
| | | } else { |
| | | builder.append("["); |
| | | builder.append(String.format("\"%s\"", brand)); |
| | | builder.append("]"); |
| | | } |
| | | builder.append("]"); |
| | | str.setSample(builder.toString()); |
| | | } |
| | | // æ£éªé¡¹ |
| | | str.setInspectionItem(list1.get(4).toString().trim()); |
| | | // æ£éªé¡¹è±æ |
| | | if (list1.get(5) != null) { |
| | | str.setInspectionItemEn(list1.get(5).toString()); |
| | | } |
| | | // æ£éªå项 |
| | | if (list1.get(6) == null) { |
| | | str.setInspectionItemSubclass(null); |
| | | } else { |
| | | str.setInspectionItemSubclass(list1.get(6).toString().trim()); |
| | | } |
| | | // æ£éªåé¡¹è±æ |
| | | if (list1.get(7) == null) { |
| | | str.setInspectionItemSubclassEn(null); |
| | | } else { |
| | | str.setInspectionItemSubclassEn(String.valueOf(list1.get(7).toString())); |
| | | } |
| | | // æ£éªé¡¹åç±» |
| | | if (list1.get(22) != null && list1.get(22) != "") { |
| | | str.setInspectionItemClass(list1.get(22).toString().trim()); |
| | | } else { |
| | | str.setInspectionItemClass(null); |
| | | } |
| | | // æ£éªé¡¹åç±»è±æ |
| | | if (list1.get(23) != null && list1.get(23) != "") { |
| | | str.setInspectionItemClassEn(list1.get(23) + ""); |
| | | } else { |
| | | str.setInspectionItemClassEn(null); |
| | | } |
| | | |
| | | LambdaQueryWrapper<StructureItemParameter> wrapper = Wrappers.lambdaQuery(StructureItemParameter.class) |
| | | .eq(StructureItemParameter::getInspectionItem, str.getInspectionItem()) |
| | | .eq(StructureItemParameter::getSample, str.getSample()) |
| | | |
| | | .last("limit 1"); |
| | | // 夿æ¯å¦ææ£éªé¡¹ç±»å |
| | | if (ObjectUtils.isNotEmpty(str.getInspectionItemClass())) { |
| | | wrapper.eq(StructureItemParameter::getInspectionItemClass, str.getInspectionItemClass()); |
| | | } |
| | | |
| | | // 夿æ¯å¦ææ£éªå项 |
| | | if (ObjectUtils.isNotEmpty(str.getInspectionItemSubclass())) { |
| | | wrapper.eq(StructureItemParameter::getInspectionItemSubclass, str.getInspectionItemSubclass()); |
| | | } |
| | | StructureItemParameter db_str = structureItemParameterService.getOne(wrapper); |
| | | if (ObjectUtils.isNotEmpty(db_str)) { |
| | | str.setId(db_str.getId()); |
| | | } |
| | | // æ¹æ³åç§° |
| | | if (list1.get(8) == null) { |
| | | str.setMethod(null); |
| | | } else { |
| | | StringBuffer buffer = new StringBuffer(); |
| | | String input = list1.get(8).toString(); |
| | | buffer.append("["); |
| | | String[] values = input.split("ï¼"); |
| | | for (String value : values) { |
| | | buffer.append("\"").append(value.trim()).append("\","); |
| | | } |
| | | buffer.deleteCharAt(buffer.length() - 1); |
| | | buffer.append("]"); |
| | | str.setMethod(buffer.toString()); |
| | | } |
| | | // è¯éªå®¤ |
| | | if (list1.get(9) == null) { |
| | | str.setSonLaboratory(null); |
| | | } else { |
| | | str.setSonLaboratory(list1.get(9).toString()); |
| | | } |
| | | // 计éåä½ |
| | | if (list1.get(10) == null) { |
| | | str.setUnit(null); |
| | | } else { |
| | | str.setUnit(list1.get(10).toString()); |
| | | } |
| | | // è¦æ±å¼ |
| | | if (list1.get(11) == null) { |
| | | str.setAskTell(null); |
| | | } else { |
| | | str.setAskTell(list1.get(11).toString()); |
| | | } |
| | | // è¦æ±æè¿° |
| | | if (list1.get(12) == null) { |
| | | str.setAsk(null); |
| | | } else { |
| | | str.setAsk(list1.get(12).toString()); |
| | | } |
| | | // åä»· |
| | | if (list1.get(13) == null) { |
| | | str.setPrice(null); |
| | | } else { |
| | | str.setPrice(list1.get(13) + ""); |
| | | } |
| | | // å·¥æ¶ç³»æ° |
| | | if (list1.get(14) == null) { |
| | | str.setManHour(null); |
| | | } else { |
| | | str.setManHour(Double.valueOf(list1.get(14).toString())); |
| | | } |
| | | // å·¥æ¶åç» |
| | | if (list1.get(15) == null) { |
| | | str.setManHourGroup(null); |
| | | } else { |
| | | str.setManHourGroup(list1.get(15).toString()); |
| | | } |
| | | // é¢è®¡å®ææ¶é´ |
| | | if (list1.get(16) == null) { |
| | | str.setManDay(null); |
| | | } else { |
| | | str.setManDay(Integer.valueOf(list1.get(16).toString())); |
| | | } |
| | | // æ°æ®ç±»å |
| | | String jy; |
| | | if (list1.get(17).toString().equals("éééç±»å")) { |
| | | jy = "0"; |
| | | } else { |
| | | jy = "1"; |
| | | } |
| | | str.setInspectionItemType(jy); |
| | | // æ£éªé¡¹ç±»å |
| | | String validateValueType = list1.get(18).toString(); |
| | | if (ObjectUtils.isNotEmpty(validateValueType)) { |
| | | List<SysDictData> enums = dictTypeService.selectDictDataByName("æ£éªå¼ç±»å") |
| | | .stream().filter(sysDictData -> sysDictData.getDictLabel().equals(validateValueType)).collect(Collectors.toList()); |
| | | str.setInspectionValueType(enums.get(0).getDictValue()); |
| | | } |
| | | int bsm; |
| | | //ç¹æ®æ è¯ |
| | | if (list1.get(19).toString().equals("å¦")) { |
| | | bsm = 0; |
| | | } else { |
| | | bsm = 1; |
| | | } |
| | | str.setBsm(bsm + ""); |
| | | // æ°ååå
¸ |
| | | if (list1.get(20) != null) { |
| | | str.setDic(list1.get(20) + ""); |
| | | } else { |
| | | str.setDic(null); |
| | | } |
| | | // åå§è®°å½æ¨¡æ¿ |
| | | StandardTemplate standTempIdByName = standardTemplateService.getStandTempIdByName(String.valueOf(list1.get(21))); |
| | | if (standTempIdByName != null) { |
| | | str.setTemplateId(standTempIdByName.getId()); |
| | | } else { |
| | | str.setTemplateId(null); |
| | | } |
| | | try { |
| | | if (list1.get(24) != null) { |
| | | str.setLaboratory(list1.get(24) + ""); |
| | | } |
| | | } catch (Exception e) { |
| | | } |
| | | |
| | | // æ¡ä»¶ |
| | | if (list1.get(25) == null) { |
| | | str.setRadiusList(null); |
| | | } else { |
| | | StringBuffer buffer = new StringBuffer(); |
| | | String input = list1.get(25).toString(); |
| | | buffer.append("["); |
| | | String[] values = input.split("ï¼"); |
| | | for (String value : values) { |
| | | buffer.append("\"").append(value.trim()).append("\","); |
| | | } |
| | | buffer.deleteCharAt(buffer.length() - 1); |
| | | buffer.append("]"); |
| | | str.setRadiusList(buffer.toString()); |
| | | } |
| | | // æ¶è´¹æ å |
| | | if (list1.get(26) == null) { |
| | | str.setRates(null); |
| | | } else { |
| | | str.setRates(list1.get(26) + ""); |
| | | } |
| | | |
| | | lists.add(str); |
| | | } |
| | | }); |
| | | // structureItemParameterService.removeNoSample(sample.get()); |
| | | // å¦ææ°æ®åºéé¢çæ°æ®åå¨é£ä¹å°±æ§è¡æ´æ°æ·è´æä½ |
| | | try { |
| | | structureItemParameterService.saveOrUpdateBatch(lists); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("æå¡ç«¯æ¥é"); |
| | | } |
| | | structureItemParameterService.importEquipData(file); |
| | | return Result.success(); |
| | | } |
| | | |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | 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.bind.annotation.*; |
| | | |
| | | @Api(tags = "èµè´¨è¯´æ") |
| | | @AllArgsConstructor |
| | |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢èµè´¨æç»å表") |
| | | @PostMapping("/getCertificationDetail") |
| | | @GetMapping("/getCertificationDetail") |
| | | public Result getCertificationDetail(Page page,Certification certification) { |
| | | return Result.success(certificationService.getCertificationDetail(page, certification)); |
| | | } |
| | |
| | | return Result.success(certificationService.addCertificationDetail(certification)); |
| | | } |
| | | @ApiOperation(value = "å é¤èµè´¨æç»å表") |
| | | @PostMapping("/delCertificationDetail") |
| | | public Result<?> delCertificationDetail( String ids) { |
| | | @DeleteMapping("/delCertificationDetail") |
| | | public Result<?> delCertificationDetail(String ids) { |
| | | return Result.success(certificationService.delCertificationDetail(ids)); |
| | | } |
| | | } |
| | |
| | | private LaboratoryService laboratoryService; |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢å®éªå®¤ç®¡çå表") |
| | | @PostMapping("/selectItemParameter") |
| | | @GetMapping("/selectItemParameter") |
| | | public Result selectItemParameter(Page page ,Laboratory itemParameter) { |
| | | return Result.success(laboratoryService.selectItemParameter(page, itemParameter)); |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤å®éªå®¤åæ°") |
| | | @PostMapping("/delParameter") |
| | | @DeleteMapping("/delParameter") |
| | | public Result<?> delParameter(Integer id) { |
| | | return Result.success(laboratoryService.delParameter(id)); |
| | | } |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | 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.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | |
| | | private ProductPartService productPartService; |
| | | |
| | | @ApiOperation(value = "æ ¹æ®äº§åidæ¥è¯¢é¶ä»¶") |
| | | @PostMapping("/selectByProductId") |
| | | @GetMapping("/selectByProductId") |
| | | public Result selectByProductId(Page page,ProductPart productPart){ |
| | | return Result.success(productPartService.selectByProductId(page,productPart)); |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤äº§åé¶ä»¶") |
| | | @PostMapping("/deleteProductPart") |
| | | @DeleteMapping("/deleteProductPart") |
| | | public Result deleteProductPart(Integer id) { |
| | | productPartService.removeById(id); |
| | | return Result.success(); |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | 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.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | |
| | | private ProductSupplierDensityService productSupplierDensityService; |
| | | |
| | | @ApiOperation(value = "æ ¹æ®äº§åidæ¥è¯¢åå®¶å¯åº¦ç»å®") |
| | | @PostMapping("/selectSupplierDensityByProductId") |
| | | @GetMapping("/selectSupplierDensityByProductId") |
| | | public Result selectSupplierDensityByProductId(Page page,ProductSupplierDensity supplierDensity) { |
| | | return Result.success(productSupplierDensityService.selectByProductId(page, supplierDensity)); |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤åå®¶å¯åº¦ç»å®") |
| | | @PostMapping("/deleteProductSupplierDensity") |
| | | @DeleteMapping("/deleteProductSupplierDensity") |
| | | public Result deleteProductSupplierDensity(Integer id) { |
| | | productSupplierDensityService.removeById(id); |
| | | return Result.success(); |
| | |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import io.swagger.annotations.Api; |
| | | 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.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | |
| | | } |
| | | @ApiOperation(value="æ¥è¯¢å°ç« å表") |
| | | @PostMapping("/selectSeal") |
| | | @GetMapping("/selectSeal") |
| | | public Result selectSeal(Page page,Seal seal) { |
| | | return Result.success(sealService.selectSeal(page,seal)); |
| | | } |
| | |
| | | private StandardMethodService standardMethodService; |
| | | |
| | | @ApiOperation(value = "è·åæ åæ¹æ³å表") |
| | | @PostMapping("/selectStandardMethodList") |
| | | public Result selectStandardMethodList(Page page,StandardMethod standardMethod) throws Exception { |
| | | @GetMapping("/selectStandardMethodList") |
| | | public Result selectStandardMethodList(Page page,StandardMethod standardMethod) { |
| | | return Result.success(standardMethodService.selectStandardMethodList(page, standardMethod)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ¹æ³") |
| | | @PostMapping("/delStandardMethod") |
| | | @DeleteMapping("/delStandardMethod") |
| | | public Result<?> delStandardMethod(Integer id) { |
| | | return Result.success(standardMethodService.delStandardMethod(id)); |
| | | } |
| | |
| | | return Result.success(standardMethodService.upStandardMethod(standardMethod)); |
| | | } |
| | | |
| | | @ApiOperation(value = "导å
¥æ åæç»") |
| | | @PostMapping("/importStandardDetails") |
| | | public Result<?> importStandardDetails(@RequestPart("file") MultipartFile file) throws IOException { |
| | | standardMethodService.inputExcel(file); |
| | | return Result.success(); |
| | | } |
| | | } |
| | |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | @ApiOperation(value = "è·ååå§è®°å½æ¨¡æ¿å表") |
| | | @PostMapping("/selectStandardTemplatePageList") |
| | | public Result selectStandardTemplatePageList(Page page,StandardTemplate standardTemplate) throws Exception { |
| | | @GetMapping("/selectStandardTemplatePageList") |
| | | public Result selectStandardTemplatePageList(Page page,StandardTemplate standardTemplate){ |
| | | return Result.success(standardTemplateService.selectStandardTemplatePageList(page, standardTemplate)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤åå§è®°å½æ¨¡æ¿") |
| | | @PostMapping("/delStandardTemplate") |
| | | @DeleteMapping("/delStandardTemplate") |
| | | public Result<?> delStandardTemplate(Integer id) { |
| | | return Result.success(standardTemplateService.delStandardTemplate(id)); |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ¨¡æ¿idè·åæ£éªé¡¹æ¨¡æ¿å
容") |
| | | @PostMapping("/getStandTempThingById") |
| | | @GetMapping("/getStandTempThingById") |
| | | public Result<?> getStandTempThingById(Integer id) { |
| | | return Result.success(standardTemplateService.getStandTempThingById(id)); |
| | | } |
| | |
| | | @ApiOperation(value = "ç¼è¾æ¨¡æ¿ç¼å¶") |
| | | @GetMapping("/getEditTemplatePreparation") |
| | | public Result<?> getEditTemplatePreparation(@RequestParam("id") Integer id) { |
| | | StandardTemplate byId = standardTemplateService.getById(id); |
| | | return Result.success("OK", byId.getThing()); |
| | | return Result.success(standardTemplateService.getStandTempThingById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å¤å¶åå§è®°å½æ¨¡æ¿") |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.ruoyi.basic.service.*; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.dto.CopyStandardProductListDto; |
| | | import com.ruoyi.basic.dto.FactoryDto; |
| | |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.pojo.StandardProductListSupplierAsk; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.service.StandardMethodListService; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.basic.service.StandardProductListSupplierAskService; |
| | | import com.ruoyi.basic.service.StandardTreeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | |
| | | private StandardTreeService standardTreeService; |
| | | |
| | | private StandardMethodListService standardMethodListService; |
| | | private StandardMethodService standardMethodService; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | |
| | | return Result.success(standardTreeService.addStandardTree(standardTree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç»æ åæ æ·»å æ£éªæ å") |
| | | @PostMapping("/addStandardMethodList") |
| | | public Result addStandardMethodList(String tree, Integer standardId) { |
| | | return Result.success(standardMethodListService.addStandardMethodList(standardId, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ ¹æ®æ åæ è¿è¡æ åæ¥è¯¢") |
| | | @PostMapping("/selectsStandardMethodByFLSSM") |
| | | @GetMapping("/selectsStandardMethodByFLSSM") |
| | | public Result selectsStandardMethodByFLSSM(String tree) { |
| | | return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree)); |
| | | return Result.success(standardMethodService.selectsStandardMethodByFLSSM(tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹æ ååºä¸çå
容") |
| | | @PostMapping("/upStandardProductList") |
| | | public Result upStandardProductList(String str) { |
| | | public Result upStandardProductList(@RequestBody Map<String, String> map) { |
| | | String str = map.get("str"); |
| | | StandardProductList list = JSON.parseObject(str, StandardProductList.class); |
| | | return Result.success(standardProductListService.upStandardProductList(list)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹æ ååºåºé´") |
| | | @PostMapping("/updateSection") |
| | | public Result updateSection(String str) { |
| | | public Result updateSection(@RequestBody Map<String, String> map) { |
| | | String str = map.get("str"); |
| | | StandardProductList list = JSON.parseObject(str, StandardProductList.class); |
| | | return Result.success(standardProductListService.updateSection(list)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªæ å") |
| | | @PostMapping("/delStandardMethodByFLSSM") |
| | | public Result delStandardMethodByFLSSM(Integer id) { |
| | | return Result.success(standardMethodListService.delStandardMethodByFLSSM(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/delStandardProductByIds") |
| | | public Result delStandardProductByIds(String ids) { |
| | | JSONArray lists = JSON.parseArray(ids); |
| | | return Result.success(standardProductListService.delStandardProduct(lists)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æ åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/addStandardProduct") |
| | | public Result addStandardProduct(String ids, String tree) { |
| | | return Result.success(standardTreeService.addStandardProduct(ids, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ çå±çº§") |
| | | @PostMapping("/delStandardTree") |
| | | @DeleteMapping("/delStandardTree") |
| | | public Result delStandardTree(String tree) { |
| | | return Result.success(standardTreeService.delStandardTree(tree)); |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ£éªæ åæ¥è¯¢æ£éªé¡¹ç®") |
| | | @PostMapping("/selectStandardProductListByMethodId") |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree, Integer page) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree, page)); |
| | | @GetMapping("/selectStandardProductListByMethodId") |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éç¼è¾æ¥è¯¢æ£éªé¡¹ç®") |
| | | @PostMapping("/selectStandardProductByMethodId") |
| | | @ApiOperation(value = "æ¹éæ¥è¯¢æ£éªé¡¹ç®") |
| | | @GetMapping("/selectStandardProductByMethodId") |
| | | public Result selectStandardProductByMethodId(Integer id, String tree, Integer page, String laboratory, String item, String items) { |
| | | return Result.success(standardProductListService.selectStandardProductByMethodId(id, tree, page, laboratory, item, items)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éç¼è¾æ¥è¯¢æææ£éªé¡¹ç®åæ£éªå项æä¸¾") |
| | | @PostMapping("/selectStandardProductEnumByMethodId") |
| | | @ApiOperation(value = "æ¹éæ¥è¯¢æææ£éªé¡¹ç®åæ£éªå项æä¸¾") |
| | | @GetMapping("/selectStandardProductEnumByMethodId") |
| | | public Result selectStandardProductEnumByMethodId(Integer id, String tree, String item) { |
| | | return Result.success(standardProductListService.selectStandardProductEnumByMethodId(id, tree, item)); |
| | | } |
| | |
| | | @ApiOperation(value = "è·åæ åæ ä¸æ åæ¹æ³æä¸¾") |
| | | @GetMapping("/selectStandardMethodEnum") |
| | | public Result selectStandardMethodEnum() { |
| | | return Result.success(standardMethodListService.selectStandardMethodEnum()); |
| | | return Result.success(standardMethodService.selectStandardMethodEnum()); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åäº§åæ¶æ") |
| | |
| | | return Result.success(standardTreeService.upStandardProducts(product)); |
| | | } |
| | | |
| | | @PostMapping("/getStandTreeBySampleType") |
| | | @ApiOperation("ä»
è·åå
纤çåå·") |
| | | public Result<?> getStandTreeBySampleType(String laboratory, String sampleType) { |
| | | return Result.success(standardTreeService.getStandTreeBySampleType(laboratory, sampleType)); |
| | | } |
| | | |
| | | @ApiOperation("导å
¥æ ååº") |
| | | @PostMapping("/inExcelOfTree/{isEquipment}") |
| | | public Result inExcelOfTree(@RequestParam("file") MultipartFile file, @PathVariable("isEquipment") Boolean isEquipment) { |
| | | if (!isEquipment) { |
| | | standardTreeService.inExcelOfTree(file); |
| | | } else { |
| | | standardTreeService.importWorkstationExcel(file); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("éç½®æ ååºåä»·") |
| | | @PostMapping("/resetTreeOfPrice") |
| | | public Result resetTreeOfPrice(String tree, Integer standardId) { |
| | | standardTreeService.resetTreeOfPrice(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("éç½®æ ååºå·¥æ¶ç³»æ°") |
| | | @PostMapping("/resetTreeOfHour") |
| | | public Result resetTreeOfHour(String tree, Integer standardId) { |
| | | standardTreeService.resetTreeOfHour(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("éç½®æ ååºè¦æ±æè¿°åè¦æ±å¼") |
| | | @PostMapping("/resetTreeOfAsk") |
| | | public Result resetTreeOfAsk(String tree, Integer standardId) { |
| | | standardTreeService.resetTreeOfAsk(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("æ ååºææ½") |
| | | @PostMapping("/resetTreeDrag") |
| | |
| | | |
| | | @ApiOperation(value = "æ ¹æ®äº§åidæ¥è¯¢åå®¶è¦æ±å¼ç»å®") |
| | | @PostMapping("/selectSupplierAsk") |
| | | public Result selectSupplierAsk(StandardProductListSupplierAsk supplierAsk) throws Exception { |
| | | public Result selectSupplierAsk(@RequestBody StandardProductListSupplierAsk supplierAsk) throws Exception { |
| | | return Result.success(standardProductListSupplierAskService.selectByProductId(supplierAsk)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢åå®¶è¦æ±å¼ç»å®") |
| | | @PostMapping("/addProductSupplierAsk") |
| | | public Result addProductSupplierAsk(String str) { |
| | | public Result addProductSupplierAsk(@RequestBody Map<String, String> map) { |
| | | String str = map.get("str"); |
| | | StandardProductListSupplierAsk supplierAsk = JSON.parseObject(str, StandardProductListSupplierAsk.class); |
| | | return Result.success(standardProductListSupplierAskService.addProductSupplierAsk(supplierAsk)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ´æ°åå®¶è¦æ±å¼ç»å®") |
| | | @PostMapping("/updateProductSupplierAsk") |
| | | public Result updateProductSupplierAsk(String str) { |
| | | public Result updateProductSupplierAsk(@RequestBody Map<String, String> map) { |
| | | String str = map.get("str"); |
| | | StandardProductListSupplierAsk supplierAsk = JSON.parseObject(str, StandardProductListSupplierAsk.class); |
| | | standardProductListSupplierAskService.updateProductSupplierAsk(supplierAsk); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤åå®¶è¦æ±å¼ç»å®") |
| | | @PostMapping("/deleteProductSupplierAsk") |
| | | @DeleteMapping("/deleteProductSupplierAsk") |
| | | public Result deleteProductSupplierAsk(Integer supplierAskId) { |
| | | standardProductListSupplierAskService.removeById(supplierAskId); |
| | | return Result.success(); |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | 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.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | |
| | | private StructureTestObjectPartService structureTestObjectPartService; |
| | | |
| | | @ApiOperation(value = "æ ¹æ®æ£éªå¯¹è±¡idæ¥è¯¢é¶ä»¶") |
| | | @PostMapping("/selectByTestObjectId") |
| | | @GetMapping("/selectByTestObjectId") |
| | | public Result selectByTestObjectId(Page page,StructureTestObjectPart structureTestObjectPart){ |
| | | return Result.success(structureTestObjectPartService.selectByTestObjectId(page,structureTestObjectPart)); |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿£éªå¯¹è±¡é¶ä»¶") |
| | | @PostMapping("/deleteTestObjectPart") |
| | | @DeleteMapping("/deleteTestObjectPart") |
| | | public Result deleteTestObjectPart(Integer id) { |
| | | structureTestObjectPartService.removeById(id); |
| | | return Result.success(); |
| | |
| | | * @Date 2024/8/28 |
| | | */ |
| | | @Data |
| | | public class IfsInventoryQuantityCheckDto implements Serializable { |
| | | public class IfsInventoryQuantityCheckDto implements Serializable { |
| | | |
| | | private Integer id; |
| | | |
| | |
| | | |
| | | @ApiModelProperty("å
æ£") |
| | | private Integer isExemption; |
| | | |
| | | @ApiModelProperty("åææid(导åºç¨)") |
| | | private String ids; |
| | | } |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | private String value; |
| | | |
| | | @ApiModelProperty("é¶ä»¶å·") |
| | | private String partNo; |
| | | |
| | | // æ ·åè±æ |
| | | @ApiModelProperty("æ ·åè±æ") |
| | | private String sampleEn; |
| | | |
| | | @ApiModelProperty("产å") |
| | | private List<ModelDto> children; |
| | | |
| | | } |
| | |
| | | public interface CertificationMapper extends BaseMapper<Certification> { |
| | | |
| | | //æ¥è¯¢èµè´¨æç»å表 |
| | | IPage<Certification> getCertificationDetail(Page page, @Param("ew") QueryWrapper<Certification> ew); |
| | | IPage<Certification> getCertificationDetail(Page page, @Param("param") Certification certification); |
| | | } |
| | |
| | | |
| | | public interface SealMapper extends BaseMapper<Seal> { |
| | | IPage<Seal>selectSeal(Page page, @Param("ew") QueryWrapper<Seal> ew); |
| | | List<Laboratory> selectLaboratory (Integer labId); |
| | | List<Laboratory> selectLaboratory (@Param("labId") Integer labId); |
| | | |
| | | } |
| | |
| | | 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.ruoyi.basic.pojo.StandardMethodList; |
| | | import com.ruoyi.framework.mybatis_config.MyBaseMapper; |
| | | import com.ruoyi.basic.pojo.StandardMethod; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | |
| | | |
| | | IPage<StandardMethod> selectStandardMethodList(Page page, @Param("ew") QueryWrapper<StandardMethod> ew); |
| | | |
| | | StandardMethod selectStandMethodById(Integer id); |
| | | StandardMethod selectStandMethodById(@Param("id") Integer id); |
| | | |
| | | |
| | | List<StandardMethodList> selectStandardMethodLists(@Param("tree") String tree); |
| | | |
| | | List<StandardMethodList> selectStandardMethodListsByNull(@Param("tree") String tree); |
| | | |
| | | List<StandardMethodList> selectStandardMethodLists3(@Param("tree") String tree); |
| | | |
| | | List<StandardMethodList> selectListEnum(); |
| | | |
| | | Integer getStandardMethodId(@Param("code") String code); |
| | | |
| | | } |
| | | |
| | |
| | | @Param("endIndex") Integer endIndex, |
| | | @Param("methodId") Integer methodId, |
| | | @Param("tree") String tree); |
| | | |
| | | /** |
| | | * æ¹éæ·»å æ å |
| | | * @param productLists |
| | | */ |
| | | void saveBatchProductLists(@Param("productLists") List<StandardProductList> productLists); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | IPage<StandardTemplate> selectStandardTemplatePageList(Page page, @Param("ew") QueryWrapper<StandardTemplate> ew); |
| | | |
| | | StandardTemplate getStandTempIdByName(String name); |
| | | StandardTemplate getStandTempIdByName(@Param("name") String name); |
| | | |
| | | /** |
| | | * æ¥è¯¢å缩åçæ°æ® |
| | | * @param templateId |
| | | * @return |
| | | */ |
| | | String selectCompressThing(Integer templateId); |
| | | String selectCompressThing(@Param("templateId") Integer templateId); |
| | | |
| | | /** |
| | | * ç»å®è¯¥æ¨¡æ¿æ£éªé¡¹åæ°ç»è®¡ |
| | | * |
| | | * @param templateId |
| | | * @return |
| | | */ |
| | | int countBindTemplateItemParameter(@Param("templateId") Integer templateId); |
| | | } |
| | | |
| | | |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * @author Administrator |
| | |
| | | |
| | | List<StandardProductList> getStandardProductListBySample(String sampleType); |
| | | |
| | | List<StandardMethodList> getStandardMethodListBySample(String sampleType); |
| | | List<StandardProductList> selectStandardProductListByTree(@Param("tree") String tree, @Param("sample") String sample, @Param("model") String model, @Param("trees") String trees, @Param("laboratory") String laboratory); |
| | | |
| | | List<StandardProductList> selectStandardProductListByTree(String tree, String sample, String model, String trees, String laboratory); |
| | | |
| | | List<StandardProductList> selectStandardProductListByTree2(String tree, String sample, String model, String trees, String laboratory); |
| | | List<StandardProductList> selectStandardProductListByTree2(@Param("tree") String tree, @Param("sample") String sample, @Param("model") String model, @Param("trees") String trees, @Param("laboratory") String laboratory); |
| | | |
| | | |
| | | List<SampleTypeDto> getStandardTree2(); |
| | | |
| | | List<SampleDto> getStandardTree3(String sampleType); |
| | | |
| | | |
| | | String getLaboratory(String str); |
| | | |
| | |
| | | */ |
| | | IPage<IfsInventoryQuantitySupplierDto> getIfsByQuarter(Page<IfsInventoryQuantitySupplierDto> page, @Param("ew") QueryWrapper<IfsInventoryQuantitySupplierDto> ew, @Param("beginDeclareDate") String beginDeclareDate, @Param("endDeclareDate")String endDeclareDate); |
| | | |
| | | /** |
| | | * æ¹éæ¥è¯¢æ |
| | | * @param sampleTypeValues |
| | | * @return |
| | | */ |
| | | List<SampleDto> getStandardTree3Batch(@Param("sampleTypeValues") Set<String> sampleTypeValues); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ |
| | | * @param sampleType |
| | | * @return |
| | | */ |
| | | List<SampleDto> getStandardTree3(@Param("sampleType") String sampleType); |
| | | |
| | | /** |
| | | * æ ¹æ®åææidå表æ¥è¯¢åææä¿¡æ¯ |
| | | * @param ifsIds |
| | | * @return |
| | | */ |
| | | List<IfsInventoryQuantitySupplierDto> getIfsByIds(@Param("ifsIds") List<String> ifsIds); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | List<TestItemDto> getItemTree(); |
| | | |
| | | int removeNoSample(@Param("sample") String sample); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ä¿¡æ¯ |
| | | * @param managementNumberList |
| | | * @return |
| | | */ |
| | | List<Integer> selectDeviceIdsByNumber(@Param("managementNumberList") List<String> managementNumberList); |
| | | } |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "èµè´¨éä»¶å°å") |
| | | private String fileUrl; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | } |
| | |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "å建人") |
| | | @TableField(select = false,exist = false) |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹äººid") |
| | |
| | | * æ åæ ä¸çæ åå表 |
| | | * @TableName standard_method_list |
| | | */ |
| | | @TableName(value ="standard_method_list") |
| | | @Data |
| | | public class StandardMethodList implements Serializable { |
| | | /** |
| | |
| | | @ApiModelProperty("åå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | @ApiModelProperty("模æ¿id") |
| | | private Integer templateId; |
| | | |
| | | @ApiModelProperty("") |
| | |
| | | |
| | | private String tree; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹id") |
| | | private Integer structureItemParameterId; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹åç±»") |
| | |
| | | @ApiModelProperty(value = "æ¶è´¹æ å(å
/次)") |
| | | private String rates; |
| | | |
| | | @ApiModelProperty(value = "设å¤id") |
| | | private String deviceIds; |
| | | |
| | | @ApiModelProperty(value = "æ½æ£ç±»å, 1:æåº¦, 2:å£åº¦, 3:年度") |
| | | private String spotCheckType; |
| | | |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.StandardMethod; |
| | | import com.ruoyi.basic.pojo.StandardMethodList; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | |
| | | |
| | | int upStandardMethod(StandardMethod standardMethod); |
| | | |
| | | void inputExcel(MultipartFile file) throws IOException; |
| | | Map<String, List<?>> selectsStandardMethodByFLSSM(String tree); |
| | | |
| | | List<StandardMethodList> selectStandardMethodEnum(); |
| | | |
| | | } |
| | |
| | | |
| | | int upStandardProductList(StandardProductList list); |
| | | |
| | | int delStandardProduct(JSONArray list); |
| | | |
| | | List<StandardProductList> selectStandardProductList(InsSampleReceiveDto insSample); |
| | | |
| | | Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree, Integer page); |
| | | Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree); |
| | | |
| | | IPage<StandardProductList> selectStandardProductByMethodId(Integer id, String tree, Integer page, String laboratory, String item, String items); |
| | | |
| | |
| | | |
| | | int delStandardTree(String tree); |
| | | |
| | | int addStandardProduct(String ids, String tree); |
| | | |
| | | List<SampleTypeDto> getStandardTree2(); |
| | | |
| | | int upStandardProducts(Map<String, Object> product); |
| | | |
| | | List<StandardTree> getStandTreeBySampleType(String laboratory, String sampleType); |
| | | |
| | | void inExcelOfTree(MultipartFile file); |
| | | |
| | | void resetTreeOfPrice(String tree, Integer standardId); |
| | | |
| | | void resetTreeOfHour(String tree, Integer standardId); |
| | | |
| | | void resetTreeOfAsk(String tree, Integer standardId); |
| | | |
| | | void importWorkstationExcel(MultipartFile file); |
| | | |
| | | /** |
| | | * æ åæ°æåº |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | public interface StructureItemParameterService extends IService<StructureItemParameter> { |
| | | void removeNoSample(String sample); |
| | | |
| | | /** |
| | | * 导å
¥æ£éªé¡¹ç® |
| | | * @param file |
| | | */ |
| | | void importEquipData(MultipartFile file) throws IOException; |
| | | } |
| | |
| | | @AllArgsConstructor |
| | | public class CapacityScopeServiceImpl extends ServiceImpl<StructureItemParameterMapper, StructureItemParameter> implements CapacityScopeService { |
| | | |
| | | private LaboratoryMapper laboratoryMapper; |
| | | |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | |
| | | private StructureTestObjectMapper structureTestObjectMapper; |
| | |
| | | List<Product> products = productMapper.selectList(Wrappers.<Product>lambdaQuery() |
| | | .eq(Product::getObjectId, id)); |
| | | List<Integer> productIds = products.stream().map(Product::getId).collect(Collectors.toList()); |
| | | productPartMapper.delete(Wrappers.<ProductPart>lambdaQuery() |
| | | .in(ProductPart::getProductId, productIds)); |
| | | if (CollectionUtils.isNotEmpty(productIds)) { |
| | | productPartMapper.delete(Wrappers.<ProductPart>lambdaQuery() |
| | | .in(ProductPart::getProductId, productIds)); |
| | | |
| | | // å é¤äº§åç»´æ¤ |
| | | productMapper.delete(Wrappers.<Product>lambdaQuery() |
| | | .in(Product::getId, productIds)); |
| | | // å é¤äº§åç»´æ¤ |
| | | productMapper.delete(Wrappers.<Product>lambdaQuery() |
| | | .in(Product::getId, productIds)); |
| | | } |
| | | |
| | | return structureTestObjectMapper.deleteById(id); |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | |
| | | //æ¥è¯¢èµè´¨æç»å表 |
| | | @Override |
| | | public IPage<Certification> getCertificationDetail(Page page, Certification certification) { |
| | | return certificationMapper.getCertificationDetail(page, QueryWrappers.queryWrappers(certification)); |
| | | return certificationMapper.getCertificationDetail(page, certification); |
| | | } |
| | | |
| | | //æ·»å èµè´¨æç»å表 |
| | |
| | | //å é¤èµè´¨æç»å表 |
| | | @Override |
| | | public int delCertificationDetail(String ids) { |
| | | List<Integer> list = JSON.parseArray(ids,Integer.class); |
| | | List<Integer> list = Arrays.stream(ids.split(",")).map(Integer::parseInt).collect(Collectors.toList()); |
| | | return certificationMapper.deleteBatchIds(list); |
| | | } |
| | | |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.StructureTestObjectMapper; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.mapper.LaboratoryMapper; |
| | | import com.ruoyi.basic.pojo.Laboratory; |
| | | import com.ruoyi.basic.service.LaboratoryService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | private LaboratoryMapper laboratoryMapper; |
| | | |
| | | @Autowired |
| | | private StructureTestObjectMapper structureTestObjectMapper; |
| | | |
| | | @Override |
| | | public IPage<Laboratory> selectItemParameter(Page page, Laboratory itemParameter) { |
| | | return laboratoryMapper.selectItemParameter(page, QueryWrappers.queryWrappers(itemParameter)); |
| | |
| | | |
| | | @Override |
| | | public int delParameter(Integer id) { |
| | | // 夿æ¯å¦ç»å®å¯¹è±¡ |
| | | QueryWrapper<StructureTestObject> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("laboratory_id",id); |
| | | List<StructureTestObject> structureTestObjectList = structureTestObjectMapper.selectList(queryWrapper); |
| | | if(!CollectionUtils.isEmpty(structureTestObjectList)){ |
| | | throw new RuntimeException("å·²ç»å®å¯¹è±¡ï¼ç¦æ¢å é¤"); |
| | | } |
| | | return laboratoryMapper.deleteById(id); |
| | | } |
| | | |
| | |
| | | if (supplierDensity.getProductId() == null) { |
| | | throw new BaseException("缺å°äº§å对象id"); |
| | | } |
| | | // æ¥è¯¢æ¹åå®¶æ¯å¦ç»å®è¿ |
| | | // Long count = baseMapper.selectCount(Wrappers.<ProductSupplierDensity>lambdaQuery() |
| | | // .eq(ProductSupplierDensity::getProductId, supplierDensity.getProductId()) |
| | | // .eq(ProductSupplierDensity::getModel, supplierDensity) |
| | | // .eq(ProductSupplierDensity::getSupplierName, supplierDensity.getSupplierName())); |
| | | // if (count > 0){ |
| | | // throw new BaseException("该产åå·²ç»å®è¿è¯¥åå®¶"); |
| | | // } |
| | | |
| | | baseMapper.insert(supplierDensity); |
| | | } |
| | | |
| | |
| | | if (supplierDensity.getProductId() == null) { |
| | | throw new BaseException("缺å°äº§å对象id"); |
| | | } |
| | | // æ¥è¯¢æ¹åå®¶æ¯å¦ç»å®è¿ |
| | | // Long count = baseMapper.selectCount(Wrappers.<ProductSupplierDensity>lambdaQuery() |
| | | // .ne(ProductSupplierDensity::getId, supplierDensity.getId()) |
| | | // .eq(ProductSupplierDensity::getProductId, supplierDensity.getProductId()) |
| | | // .eq(ProductSupplierDensity::getModel, supplierDensity) |
| | | // .eq(ProductSupplierDensity::getSupplierName, supplierDensity.getSupplierName())); |
| | | // if (count > 0){ |
| | | // throw new BaseException("该产åå·²ç»å®è¿è¯¥åå®¶"); |
| | | // } |
| | | baseMapper.updateById(supplierDensity); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.pojo.StandardMethodList; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.mapper.StandardMethodMapper; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | |
| | | |
| | | private StandardMethodMapper standardMethodMapper; |
| | | |
| | | StandardProductListMapper standardProductListMapper; |
| | | StandardProductListService standardProductListService; |
| | | private StandardProductListMapper standardProductListMapper; |
| | | private StandardProductListService standardProductListService; |
| | | |
| | | StructureItemParameterMapper structureItemParameterMapper; |
| | | StructureItemParameterService structureItemParameterService; |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | private StructureItemParameterService structureItemParameterService; |
| | | |
| | | @Override |
| | | public IPage<StandardMethod> selectStandardMethodList(Page page, StandardMethod standardMethod) { |
| | |
| | | return "æ¿æ¢å®æ¯!"; |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void inputExcel(MultipartFile file) throws IOException { |
| | | // å卿£æµå¯¹è±¡List |
| | | List<Object> structureTestObjectIdList = new ArrayList<>(); |
| | | List<StandardMethod> result = new ArrayList<>(); |
| | | ExcelUtil.readBySax(file.getInputStream(), 0, (i, l, list) -> { |
| | | // å»é¤ç¬¬ä¸è¡è¡¨å¤´ |
| | | if (l == 0) { |
| | | return; |
| | | } |
| | | // åå¨å¯ä¸æ£æµå¯¹è±¡ |
| | | if (!structureTestObjectIdList.contains(list.get(2))) { |
| | | structureTestObjectIdList.add(list.get(2)); |
| | | } |
| | | StandardMethod standardMethod = formatData(list); |
| | | result.add(standardMethod); |
| | | }); |
| | | addStructureTest(structureTestObjectIdList, result); |
| | | } |
| | | |
| | | // æ ¼å¼åæ°æ® |
| | | public StandardMethod formatData(List<Object> list) { |
| | |
| | | return standardMethod; |
| | | } |
| | | |
| | | // æ°å¢æ°æ® |
| | | public void addStructureTest(List<Object> structureTestObjectIdList, List<StandardMethod> standardMethodList) { |
| | | List<StandardMethod> updateList = new ArrayList<>(); |
| | | List<Integer> deleteListId = new ArrayList<>(); |
| | | List<StandardMethod> addList = new ArrayList<>(); |
| | | if (!structureTestObjectIdList.isEmpty()) { |
| | | // 循ç¯exceléé¢çåç» |
| | | structureTestObjectIdList.forEach(j -> { |
| | | // 以excelä¸çç»åæ¥è¯¢æ°æ®åºä¸çåç» |
| | | List<StandardMethod> standardMethods = baseMapper.selectList(Wrappers.<StandardMethod>lambdaQuery() |
| | | .like(StandardMethod::getStructureTestObjectId, "\"" + j + "\"")); |
| | | // å°ç»æå¾ªç¯å¹é
|
| | | for (int i = 0; i < standardMethods.size(); i++) { |
| | | boolean isExistence = false; |
| | | for (int i1 = 0; i1 < standardMethodList.size(); i1++) { |
| | | // æ´æ° |
| | | if (standardMethods.get(i).getStructureTestObjectId().equals(standardMethodList.get(i1).getStructureTestObjectId()) |
| | | && standardMethods.get(i).getCode().equals(standardMethodList.get(i1).getCode()) |
| | | && standardMethods.get(i).getField().equals(standardMethodList.get(i1).getField())) { |
| | | // ç»excelæ°æ®èµå¼idåæ´æ° |
| | | standardMethodList.get(i1).setId(standardMethods.get(i).getId()); |
| | | // æ´æ° |
| | | updateList.add(standardMethodList.get(i1)); |
| | | isExistence = true; |
| | | break; |
| | | } |
| | | } |
| | | // å é¤ |
| | | if (!isExistence) { |
| | | deleteListId.add(standardMethods.get(i).getId()); |
| | | } |
| | | } |
| | | for (int i = 0; i < standardMethodList.size(); i++) { |
| | | if (standardMethodList.get(i).getStructureTestObjectId().contains("\"" + j + "\"")) { |
| | | boolean isExistence = false; |
| | | for (int i1 = 0; i1 < standardMethods.size(); i1++) { |
| | | if (standardMethods.get(i1).getStructureTestObjectId().equals(standardMethodList.get(i).getStructureTestObjectId()) |
| | | && standardMethods.get(i1).getCode().equals(standardMethodList.get(i).getCode()) |
| | | && standardMethods.get(i1).getField().equals(standardMethodList.get(i).getField())) { |
| | | isExistence = true; |
| | | break; |
| | | } |
| | | } |
| | | // æ°å¢ |
| | | if (!isExistence) { |
| | | addList.add(standardMethodList.get(i)); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | @Override |
| | | public Map<String, List<?>> selectsStandardMethodByFLSSM(String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | Map<String, List<?>> map = new HashMap<>(); |
| | | String str = ""; |
| | | List<StandardMethodList> standardMethodLists = new ArrayList<>(); |
| | | switch (trees.length){ |
| | | case 5: |
| | | str += "\"" + trees[2] + "\",\"" + trees[3] + "\",\"" + trees[4] + "\""; |
| | | standardMethodLists.addAll(standardMethodMapper.selectStandardMethodLists(str)); |
| | | standardMethodLists.addAll(standardMethodMapper.selectStandardMethodLists("\"" + trees[2] + "\",\"" + trees[3] + "\"")); |
| | | standardMethodLists.addAll(standardMethodMapper.selectStandardMethodLists("\"" + trees[2] + "\"")); |
| | | break; |
| | | case 4: |
| | | str += "\"" + trees[2] + "\",\"" + trees[3] + "\""; |
| | | standardMethodLists.addAll(standardMethodMapper.selectStandardMethodLists(str)); |
| | | standardMethodLists.addAll(standardMethodMapper.selectStandardMethodLists("\"" + trees[2] + "\"")); |
| | | break; |
| | | case 3: |
| | | str += "\"" + trees[2] + "\""; |
| | | standardMethodLists.addAll(standardMethodMapper.selectStandardMethodLists3(str)); |
| | | break; |
| | | default: |
| | | map.put("standardMethodList", null); |
| | | return map; |
| | | } |
| | | if (!addList.isEmpty()) { |
| | | // æ°å¢ |
| | | baseMapper.insertBatchSomeColumn(addList); |
| | | } |
| | | |
| | | if (!deleteListId.isEmpty()) { |
| | | // å é¤ |
| | | baseMapper.deleteBatchIds(deleteListId); |
| | | } |
| | | |
| | | if (!updateList.isEmpty()) { |
| | | // æ´æ° |
| | | updateList.forEach(i -> { |
| | | baseMapper.updateById(i); |
| | | }); |
| | | } |
| | | standardMethodLists.addAll(standardMethodMapper.selectStandardMethodListsByNull(str)); |
| | | map.put("standardMethodList", standardMethodLists); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardMethodList> selectStandardMethodEnum() { |
| | | return standardMethodMapper.selectListEnum(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | import com.ruoyi.basic.pojo.StandardProductListSupplierAsk; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.basic.service.StandardProductListService2; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | private StandardProductListService2 standardProductListService2; |
| | | |
| | | private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; |
| | | |
| | | private StandardProductListSupplierAskMapper standardProductListSupplierAskMapper; |
| | |
| | | return standardProductListMapper.updateById(list); |
| | | } |
| | | |
| | | @Override |
| | | public int delStandardProduct(JSONArray list) { |
| | | return standardProductListMapper.deleteBatchIds(list); |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardProductList> selectStandardProductList(InsSampleReceiveDto insSample) { |
| | |
| | | } |
| | | return true; |
| | | }).peek(standardProductList -> { |
| | | // todo: 夿æ¯å¦æ¯åæä¸å, éè¦åæé¢è²ç»å®å°è¯æ ·é¢è²çè¦æ±å¼ä¸ |
| | | //夿æ¯å¦æ¯åæä¸å, éè¦åæé¢è²ç»å®å°è¯æ ·é¢è²çè¦æ±å¼ä¸ |
| | | if (StringUtils.isNotBlank(insSample.getPartNo())) { |
| | | // 夿æ¯å¦æè¿ä¸ªåæ®µä¸æ¯ææ¬ç±»å |
| | | if (StringUtils.isNotBlank(standardProductList.getInspectionItem()) |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree, Integer page) { |
| | | public Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | try { |
| | | String tree1 = trees[2]; |
| | | } catch (Exception e) { |
| | | throw new BaseException("æä½å¤ªå¿«,ç³»ç»ä¼ åé误!!!!"); |
| | | } |
| | | // 夿æ¯å¦ææ½ |
| | | boolean isDrag = false; |
| | | List<StandardProductList> list = new ArrayList<>(); |
| | | if (trees.length == 3) { |
| | |
| | | if (sp.getTemplateId() != null && !sp.getTemplateId().equals("")) { |
| | | pl.setTemplateId(sp.getTemplateId()); |
| | | } |
| | | //å ä¸ºè¿æä¸ªäº§åå«èå¼ çº¿å¤¹ æ¥ç»éå
· ,è¿ä¸¤ä¸ªé¡¹ç®çæ°æ®å®å
¨ä¸æ ·,ç¹æ®å¤ç |
| | | if (sp.getTree() != null && !sp.getTree().equals("") && !pl.getTree().equals("ä¸å¤©ç§ææ£æµä¸å¿ - çµå产åå®éªå®¤ - éå
· - èå¼ çº¿å¤¹ - null")) { |
| | | pl.setTree(sp.getTree()); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if (page == 1) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | // CompletableFuture.supplyAsync(() -> { |
| | | if (trees.length == 5) { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .eq(StandardProductList::getTree, tree)); |
| | | } else { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree)); |
| | | } |
| | | |
| | | boolean success = false; |
| | | int retryCount = 0; |
| | | while (!success && retryCount < 100) { |
| | | try { |
| | | standardProductListService2.saveBatch(list.stream().map(a -> { |
| | | a.setFactory(trees[0]); |
| | | a.setLaboratory(trees[1]); |
| | | a.setSampleType(trees[2]); |
| | | a.setCreateUser(userId); |
| | | a.setUpdateUser(userId); |
| | | a.setStandardMethodListId(id); |
| | | return a; |
| | | }).collect(Collectors.toList())); |
| | | ; |
| | | success = true; |
| | | } catch (Exception e) { |
| | | // å¤çéå¤ ID çè®°å½ï¼éæ°çæ ID å¹¶ç»§ç»å°è¯æå
¥ |
| | | for (StandardProductList productList : list) { |
| | | productList.setId(IdWorker.getId()); |
| | | } |
| | | } |
| | | } |
| | | if (!success) { |
| | | throw new RuntimeException("æå
¥å¤±è´¥"); |
| | | } |
| | | |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | if (trees.length == 5) { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .eq(StandardProductList::getTree, tree)); |
| | | } else { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree)); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | |
| | | List<StandardProductList> productLists = list.stream().map(a -> { |
| | | a.setFactory(trees[0]); |
| | | a.setLaboratory(trees[1]); |
| | | a.setSampleType(trees[2]); |
| | | a.setCreateUser(userId); |
| | | a.setUpdateUser(userId); |
| | | a.setStandardMethodListId(id); |
| | | return a; |
| | | }).collect(Collectors.toList()); |
| | | // this.saveBatch(productLists); |
| | | // æ¹éæ·»å æ å |
| | | if (CollectionUtils.isNotEmpty(productLists)) { |
| | | baseMapper.saveBatchProductLists(productLists); |
| | | } |
| | | |
| | | |
| | | Collections.sort(list, (o1, o2) -> { |
| | | String field1 = o1.getManHourGroup(); |
| | | String field2 = o2.getManHourGroup(); |
| | |
| | | list.sort((o1, o2) -> (o1.getSort() == null ? 0 : o1.getSort()) |
| | | - (o2.getSort() == null ? 0 : o2.getSort())); |
| | | } |
| | | try { |
| | | map.put("productList", list.subList((page - 1) * 300, page * 300)); |
| | | } catch (IndexOutOfBoundsException e) { |
| | | map.put("productList", list.subList((page - 1) * 300, list.size())); |
| | | } |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("productList", list); |
| | | map.put("total", list.size()); |
| | | return map; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public void resetTreeDragBatch(List<StandardProductList> standardProductLists) { |
| | | standardProductListService2.updateBatchById(standardProductLists); |
| | | this.updateBatchById(standardProductLists); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.mapper.StandardTemplateMapper; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.GZipUtil; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | StandardTemplate::getNumber); |
| | | standardTemplate.setNumber(giveCode); |
| | | } |
| | | if (StringUtils.isNotBlank(standardTemplate.getThing())) { |
| | | standardTemplate.setThing(GZipUtil.compress(standardTemplate.getThing())); |
| | | } else { |
| | | standardTemplate.setThing(null); |
| | | } |
| | | return standardTemplateMapper.insert(standardTemplate); |
| | | } |
| | | |
| | | @Override |
| | | public int upStandardTemplate(StandardTemplate standardTemplate) { |
| | | if(standardTemplate.getThing().equals("")){ |
| | | if (StringUtils.isNotBlank(standardTemplate.getThing())) { |
| | | standardTemplate.setThing(GZipUtil.compress(standardTemplate.getThing())); |
| | | } else { |
| | | standardTemplate.setThing(null); |
| | | } |
| | | return standardTemplateMapper.updateById(standardTemplate); |
| | |
| | | |
| | | @Override |
| | | public int delStandardTemplate(Integer id) { |
| | | // 夿æ¯å¦è¢«ç»å® |
| | | int count = standardTemplateMapper.countBindTemplateItemParameter(id); |
| | | if (count > 0) { |
| | | throw new RuntimeException("该模æ¿å·²ç»å®æ£éªé¡¹ç®åæ°ï¼ç¦æ¢å é¤"); |
| | | } |
| | | return standardTemplateMapper.deleteById(id); |
| | | } |
| | | |
| | |
| | | if(standardTemplate==null){ |
| | | return null; |
| | | }else{ |
| | | return standardTemplate.getThing(); |
| | | return GZipUtil.uncompress(standardTemplate.getThing()); |
| | | } |
| | | // æ¥è¯¢å缩åçæ°æ® |
| | | // String thing = standardTemplateMapper.selectCompressThing(templateId); |
| | | // if (StringUtils.isNotBlank(thing)) { |
| | | // try { |
| | | // return DecompressMySQLData.decompress(java.util.Base64.getDecoder().decode(thing)); |
| | | // } catch (Exception e) { |
| | | // throw new RuntimeException(e); |
| | | // } |
| | | // } else { |
| | | // return null; |
| | | // } |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.poi.excel.ExcelUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.basic.dto.FactoryDto; |
| | | import com.ruoyi.basic.dto.LaboratoryDto; |
| | | import com.ruoyi.basic.dto.SampleTypeDto; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | | import com.ruoyi.basic.mapper.StandardTreeMapper; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | import com.ruoyi.basic.service.*; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.basic.service.StandardTreeService; |
| | | import com.ruoyi.basic.service.StructureTestObjectService; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | |
| | | /** |
| | | * @author Administrator |
| | |
| | | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | private StandardMethodListService standardMethodListService; |
| | | |
| | | private StandardProductListMapper standardProductListMapper; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | private StructureTestObjectService structureTestObjectService; |
| | | |
| | |
| | | - (o2.getSort() == null ? 0 : o2.getSort())); |
| | | for (SampleTypeDto sampleTypeDto : laboratoryDto.getChildren()) { |
| | | // if (sampleTypeDto.getChildren().size() == 0) { |
| | | sampleTypeDto.getChildren().addAll(standardTreeMapper.getStandardTree3(sampleTypeDto.getValue())); |
| | | sampleTypeDto.getChildren().addAll(standardTreeMapper.getStandardTree3(sampleTypeDto.getValue())); |
| | | // } |
| | | } |
| | | } |
| | | } |
| | | return factoryDtos; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3]).eq(StandardTree::getModel, trees[4])); |
| | | } |
| | | break; |
| | | /*case 4: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3])); |
| | | break; |
| | | case 3: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2])); |
| | | break; |
| | | case 2: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1])); |
| | | break; |
| | | case 1: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0])); |
| | | break;*/ |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addStandardProduct(String ids, String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | JSONArray jsonArray = JSON.parseArray(ids); |
| | | for (Object o : jsonArray) { |
| | | StandardProductList standardProductList = standardTreeMapper.selectStandardProductById(Integer.parseInt("" + o)); |
| | | standardProductList.setFactory(trees[0]); |
| | | try { |
| | | standardProductList.setLaboratory(trees[1]); |
| | | } catch (Exception e) { |
| | | } |
| | | try { |
| | | standardProductList.setSampleType(trees[2]); |
| | | } catch (Exception e) { |
| | | } |
| | | try { |
| | | standardProductList.setSample(trees[3]); |
| | | } catch (Exception e) { |
| | | } |
| | | try { |
| | | standardProductList.setModel(trees[4]); |
| | | } catch (Exception e) { |
| | | } |
| | | standardProductListMapper.insert(standardProductList); |
| | | } |
| | | return 1; |
| | | } |
| | |
| | | } |
| | | standardProductListMapper.update(productList, Wrappers.<StandardProductList>lambdaUpdate().in(StandardProductList::getId, ids)); |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardTree> getStandTreeBySampleType(String laboratory, String sampleType) { |
| | | return standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getLaboratory, laboratory) |
| | | .eq(StandardTree::getSampleType, sampleType) |
| | | .select(StandardTree::getModel, StandardTree::getSample)); |
| | | } |
| | | |
| | | /** |
| | | * æ²³å£æ£æµä¸å¿å¯¼å
¥ |
| | | * @param file |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void inExcelOfTree(MultipartFile file) { |
| | | InputStream inputStream; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | List<StandardProductList> lists = new ArrayList<>(); |
| | | AtomicReference<String> laboratory = new AtomicReference<>(); |
| | | ExcelUtil.readBySax(inputStream, 0, (i, l, list) -> { |
| | | StandardProductList str = new StandardProductList(); |
| | | if (i == 0 && l == 1) { |
| | | laboratory.set(standardTreeMapper.getLaboratory(list.get(1) + "")); |
| | | if (laboratory.get() == null) { |
| | | throw new BaseException("æ£éªå¯¹è±¡ä¸åå¨ï¼" + list.get(1)); |
| | | } |
| | | } |
| | | if (i == 0 && l >= 1) { |
| | | Integer standardMethodId = standardMethodListService.getStandardMethodId(list.get(0) + ""); |
| | | if (standardMethodId == null) { |
| | | throw new BaseException("æ åç¼å·ä¸åå¨ï¼" + list.get(0)); |
| | | } |
| | | str.setStandardMethodListId(standardMethodId); |
| | | str.setSampleType(list.get(1) + ""); |
| | | if (list.get(2) != null) { |
| | | String sample = baseMapper.selSample(list.get(2) + ""); |
| | | if (sample == null) { |
| | | throw new BaseException("æ ·åä¸åå¨ï¼" + list.get(2)); |
| | | } |
| | | str.setSample(list.get(2) + ""); |
| | | } else { |
| | | str.setSample(null); |
| | | } |
| | | if (list.get(3) != null) { |
| | | str.setModel(list.get(3) + ""); |
| | | Long aLong = standardTreeMapper.selectCount(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getModel, str.getModel()) |
| | | .eq(StandardTree::getSampleType, list.get(1) + "")); |
| | | if (aLong == 0) { |
| | | StandardTree standardTree = new StandardTree(); |
| | | standardTree.setFactory("ä¸å¤©ç§ææ£æµä¸å¿"); |
| | | standardTree.setLaboratory(laboratory.get()); |
| | | standardTree.setSampleType(str.getSampleType()); |
| | | standardTree.setSample(str.getSample()); |
| | | standardTree.setModel(str.getModel()); |
| | | standardTreeMapper.insert(standardTree); |
| | | } |
| | | } else { |
| | | str.setModel(null); |
| | | } |
| | | str.setInspectionItem(list.get(4) + ""); |
| | | if (list.get(6) == null) { |
| | | str.setInspectionItemSubclass(""); |
| | | } else { |
| | | str.setInspectionItemSubclass(list.get(6).toString()); |
| | | } |
| | | StandardProductList db_str; |
| | | try { |
| | | db_str = standardProductListMapper.getOne(str.getStandardMethodListId(), str.getInspectionItem(), str.getSample(), str.getInspectionItemSubclass(), str.getModel(), str.getInspectionItemClass()); |
| | | } catch (Exception e) { |
| | | throw new BaseException("é夿¥è¯¢ï¼" + str.getInspectionItem() + " " + str.getInspectionItemSubclass()); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(db_str)) { |
| | | str.setId(db_str.getId()); |
| | | str.setStructureItemParameterId(db_str.getStructureItemParameterId()); |
| | | } |
| | | if (list.get(8) != null) { |
| | | str.setMethodS(list.get(8) + ""); |
| | | } |
| | | |
| | | if (list.get(11) == null) { |
| | | str.setTell(null); |
| | | } else { |
| | | str.setTell(list.get(11).toString()); |
| | | } |
| | | |
| | | if (list.get(12) == null) { |
| | | str.setAsk(null); |
| | | } else { |
| | | str.setAsk(list.get(12).toString()); |
| | | } |
| | | |
| | | if (list.get(13) == null) { |
| | | str.setPrice(null); |
| | | } else { |
| | | str.setPrice((list.get(13).toString())); |
| | | } |
| | | |
| | | if (list.get(14) == null) { |
| | | str.setManHour(null); |
| | | } else { |
| | | str.setManHour(list.get(14).toString()); |
| | | } |
| | | |
| | | StandardTemplate standTempIdByName = standardTemplateService.getStandTempIdByName(String.valueOf(list.get(21))); |
| | | if (standTempIdByName != null) { |
| | | str.setTemplateId(standTempIdByName.getId()); |
| | | } else { |
| | | throw new BaseException("模æ¿ä¸åå¨ï¼" + list.get(21)); |
| | | } |
| | | str.setFactory("ä¸å¤©ç§ææ£æµä¸å¿"); |
| | | str.setLaboratory(laboratory.get()); |
| | | str.setState(1); |
| | | str.setTree(str.getFactory() + " - " + str.getLaboratory() + " - " + str.getSampleType() + " - " + str.getSample() + " - " + (str.getModel() == null ? "" : str.getModel())); |
| | | try { |
| | | str.setStructureItemParameterId(standardTreeMapper.getStructureItemParameterId("\"" + str.getSampleType() + "\"", str.getInspectionItem(), str.getInspectionItemSubclass(), str.getInspectionItemClass())); |
| | | } catch (Exception e) { |
| | | str.setStructureItemParameterId(standardTreeMapper.getStructureItemParameterId("\"" + str.getSampleType() + "\",\"" + str.getSample() + "\"", str.getInspectionItem(), str.getInspectionItemSubclass(), str.getInspectionItemClass())); |
| | | } |
| | | if (str.getStructureItemParameterId() == null) { |
| | | throw new BaseException("æ£éªé¡¹ç®ä¸åå¨ï¼" + str.getInspectionItem() + " " + str.getInspectionItemSubclass()); |
| | | } |
| | | lists.add(str); |
| | | } |
| | | }); |
| | | lists.forEach(a -> { |
| | | if (a.getId() != null) { |
| | | standardProductListMapper.updateById(a); |
| | | } else { |
| | | standardProductListMapper.insert(a); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public void importWorkstationExcel(MultipartFile file) { |
| | | InputStream inputStream; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | List<StandardProductList> lists = new ArrayList<>(); |
| | | AtomicReference<String> laboratory = new AtomicReference<>(); |
| | | ExcelUtil.readBySax(inputStream, 0, (i, l, list) -> { |
| | | StandardProductList str = new StandardProductList(); |
| | | if (i == 0 && l == 1) { |
| | | laboratory.set(standardTreeMapper.getLaboratory(list.get(1) + "")); |
| | | if (laboratory.get() == null) { |
| | | throw new BaseException("æ£éªå¯¹è±¡ä¸åå¨ï¼" + list.get(1)); |
| | | } |
| | | } |
| | | if (i == 0 && l >= 1) { |
| | | Integer standardMethodId = standardMethodListService.getStandardMethodId(list.get(0) + ""); |
| | | if (standardMethodId == null) { |
| | | throw new BaseException("æ åç¼å·ä¸åå¨ï¼" + list.get(0)); |
| | | } |
| | | str.setStandardMethodListId(standardMethodId); |
| | | str.setSampleType(list.get(1) + ""); |
| | | if (list.get(2) != null) { |
| | | String sample = baseMapper.selSample(list.get(2) + ""); |
| | | if (sample == null) { |
| | | throw new BaseException("æ ·åä¸åå¨ï¼" + list.get(2)); |
| | | } |
| | | str.setSample(list.get(2) + ""); |
| | | } else { |
| | | str.setSample(null); |
| | | } |
| | | if (list.get(3) != null) { |
| | | str.setModel(list.get(3) + ""); |
| | | Long aLong = standardTreeMapper.selectCount(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getModel, str.getModel()) |
| | | .eq(StandardTree::getSampleType, list.get(1) + "")); |
| | | if (aLong == 0) { |
| | | StandardTree standardTree = new StandardTree(); |
| | | standardTree.setFactory("ä¸å¤©ç§ææ£æµä¸å¿"); |
| | | standardTree.setLaboratory(laboratory.get()); |
| | | standardTree.setSampleType(str.getSampleType()); |
| | | standardTree.setSample(str.getSample()); |
| | | standardTree.setModel(str.getModel()); |
| | | standardTreeMapper.insert(standardTree); |
| | | } |
| | | } else { |
| | | str.setModel(null); |
| | | } |
| | | str.setInspectionItemClass(list.get(4).toString()); |
| | | str.setInspectionItemClassEn(list.get(5).toString()); |
| | | // å¼å§å 2 |
| | | str.setInspectionItem(list.get(6) + ""); |
| | | if (list.get(8) == null) { |
| | | str.setInspectionItemSubclass(""); |
| | | } else { |
| | | str.setInspectionItemSubclass(list.get(8).toString()); |
| | | } |
| | | StandardProductList db_str; |
| | | try { |
| | | db_str = standardProductListMapper.getOne(str.getStandardMethodListId(), str.getInspectionItem(), str.getSample(), str.getInspectionItemSubclass(), str.getModel(), str.getInspectionItemClass()); |
| | | } catch (Exception e) { |
| | | throw new BaseException("é夿¥è¯¢ï¼" + str.getInspectionItem() + " " + str.getInspectionItemSubclass()); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(db_str)) { |
| | | str.setId(db_str.getId()); |
| | | str.setStructureItemParameterId(db_str.getStructureItemParameterId()); |
| | | } |
| | | if (list.get(10) != null) { |
| | | str.setMethodS(list.get(10) + ""); |
| | | } |
| | | if (list.get(13) == null) { |
| | | str.setTell(null); |
| | | } else { |
| | | str.setTell(list.get(13).toString()); |
| | | } |
| | | |
| | | if (list.get(14) == null) { |
| | | str.setAsk(null); |
| | | } else { |
| | | str.setAsk(list.get(14).toString()); |
| | | } |
| | | |
| | | if (list.get(15) == null) { |
| | | str.setPrice(null); |
| | | } else { |
| | | str.setPrice((list.get(15).toString())); |
| | | } |
| | | |
| | | if (list.get(16) == null) { |
| | | str.setManHour(null); |
| | | } else { |
| | | str.setManHour(list.get(16).toString()); |
| | | } |
| | | |
| | | StandardTemplate standTempIdByName = standardTemplateService.getStandTempIdByName(String.valueOf(list.get(23))); |
| | | if (standTempIdByName != null) { |
| | | str.setTemplateId(standTempIdByName.getId()); |
| | | } else { |
| | | throw new BaseException("模æ¿ä¸åå¨ï¼" + list.get(23)); |
| | | } |
| | | str.setFactory("ä¸å¤©ç§ææ£æµä¸å¿"); |
| | | str.setLaboratory(laboratory.get()); |
| | | str.setState(1); |
| | | str.setTree(str.getFactory() + " - " + str.getLaboratory() + " - " + str.getSampleType() + " - " + str.getSample() + " - " + (str.getModel() == null ? "" : str.getModel())); |
| | | try { |
| | | str.setStructureItemParameterId(standardTreeMapper.getStructureItemParameterId("\"" + str.getSampleType() + "\"", str.getInspectionItem(), str.getInspectionItemSubclass(), str.getInspectionItemClass())); |
| | | } catch (Exception e) { |
| | | str.setStructureItemParameterId(standardTreeMapper.getStructureItemParameterId("\"" + str.getSampleType() + "\",\"" + str.getSample() + "\"", str.getInspectionItem(), str.getInspectionItemSubclass(), str.getInspectionItemClass())); |
| | | } |
| | | if (str.getStructureItemParameterId() == null) { |
| | | throw new BaseException("æ£éªé¡¹ç®ä¸åå¨ï¼" + str.getInspectionItem() + " " + str.getInspectionItemSubclass()); |
| | | } |
| | | lists.add(str); |
| | | } |
| | | }); |
| | | lists.forEach(a -> { |
| | | if (a.getId() != null) { |
| | | standardProductListMapper.updateById(a); |
| | | } else { |
| | | standardProductListMapper.insert(a); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | |
| | | // ä¿®æ¹åç§°å¹é
çæ åæ ä¸çæ£éªé¡¹ç® |
| | | // æ¥è¯¢ææå¯¹è±¡+åç§°çæ |
| | | |
| | | List<StandardProductList> standardProductLists = standardProductListService.list(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getSample, standardTree.getSample()) |
| | | LambdaUpdateWrapper<StandardProductList> updateWrapper = Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getFactory, standardTree.getFactory()) |
| | | .eq(StandardProductList::getLaboratory, standardTree.getLaboratory()) |
| | | .eq(StandardProductList::getSampleType, standardTree.getSampleType()) |
| | | .eq(StandardProductList::getModel, standardTree.getOldModel())); |
| | | .eq(StandardProductList::getModel, standardTree.getOldModel()); |
| | | if (StringUtils.isNotBlank(standardTree.getSample()) && !standardTree.getSample().equals("null")) { |
| | | updateWrapper.eq(StandardProductList::getSample, standardTree.getSample()); |
| | | } else { |
| | | updateWrapper.isNull(StandardProductList::getSample); |
| | | } |
| | | |
| | | List<StandardProductList> standardProductLists = standardProductListService.list(updateWrapper); |
| | | if (CollectionUtils.isNotEmpty(standardProductLists)) { |
| | | for (StandardProductList standardProductList : standardProductLists) { |
| | | // ä¿®æ¹æ ·ååç§° |
| | |
| | | .eq(StandardTree::getSampleType, standardTree.getSampleType()) |
| | | .eq(StandardTree::getModel, standardTree.getOldModel()) |
| | | .set(StandardTree::getModel, standardTree.getModel()); |
| | | if (StringUtils.isNotBlank(standardTree.getSample())) { |
| | | if (StringUtils.isNotBlank(standardTree.getSample()) && !standardTree.getSample().equals("null")) { |
| | | wrapper.eq(StandardTree::getSample, standardTree.getSample()); |
| | | } else { |
| | | wrapper.isNull(StandardTree::getSample); |
| | | } |
| | | return standardTreeMapper.update(null, wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void resetTreeOfPrice(String tree, Integer standardId) { |
| | | standardProductListMapper.update(null, Wrappers.<StandardProductList>lambdaUpdate().like(StandardProductList::getTree, tree).eq(StandardProductList::getStandardMethodListId, standardId).set(StandardProductList::getPrice, null)); |
| | | } |
| | | |
| | | @Override |
| | | public void resetTreeOfHour(String tree, Integer standardId) { |
| | | standardProductListMapper.update(null, Wrappers.<StandardProductList>lambdaUpdate().like(StandardProductList::getTree, tree).eq(StandardProductList::getStandardMethodListId, standardId).set(StandardProductList::getManHour, null)); |
| | | } |
| | | |
| | | @Override |
| | | public void resetTreeOfAsk(String tree, Integer standardId) { |
| | | standardProductListMapper.update(null, Wrappers.<StandardProductList>lambdaUpdate().like(StandardProductList::getTree, tree).eq(StandardProductList::getStandardMethodListId, standardId) |
| | | .set(StandardProductList::getAsk, null) |
| | | .set(StandardProductList::getTell, null) |
| | | .set(StandardProductList::getSection, null) |
| | | .set(StandardProductList::getCores, null) |
| | | .set(StandardProductList::getConductorMaterial, null) |
| | | .set(StandardProductList::getConductorType, null) |
| | | .set(StandardProductList::getPrice, null) |
| | | .set(StandardProductList::getManHour, null)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.poi.excel.ExcelUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.StructureItemParameterMapper; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import com.ruoyi.basic.service.StructureItemParameterService; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | |
| | | |
| | | @Resource |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | @Resource |
| | | private ISysDictTypeService dictTypeService; |
| | | @Resource |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | /** |
| | | * |
| | | * @param file |
| | | */ |
| | | @Override |
| | | public void removeNoSample(String sample) { |
| | | structureItemParameterMapper.removeNoSample("\""+sample+"\""); |
| | | public void importEquipData(MultipartFile file) throws IOException { |
| | | InputStream inputStream = file.getInputStream(); |
| | | List<StructureItemParameter> lists = new ArrayList<>(); |
| | | AtomicReference<String> sample = new AtomicReference<>(); |
| | | ExcelUtil.readBySax(inputStream, -1, (i, l, list1) -> { |
| | | if (l == 1) { |
| | | sample.set(list1.get(1) + ""); |
| | | } |
| | | if (l >= 1) { |
| | | StructureItemParameter str = new StructureItemParameter(); |
| | | // æµè¯å¯¹è±¡ |
| | | if (list1.get(1) == null) { |
| | | str.setSample(null); |
| | | } else { |
| | | String brand = (String) list1.get(1); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append("["); |
| | | // 产å |
| | | if (ObjectUtil.isNotEmpty(list1.get(2))) { |
| | | String production = (String) list1.get(2); |
| | | if (!production.contains("ï¼")) { |
| | | builder.append(String.format("[\"%s\",\"%s\"]", brand, production)); |
| | | } else { |
| | | Arrays.stream(production.split("ï¼")).forEach(item -> { |
| | | builder.append(String.format("[\"%s\",\"%s\"],", brand, item)); |
| | | }); |
| | | builder.deleteCharAt(builder.length() - 1); |
| | | } |
| | | } else { |
| | | builder.append("["); |
| | | builder.append(String.format("\"%s\"", brand)); |
| | | builder.append("]"); |
| | | } |
| | | builder.append("]"); |
| | | str.setSample(builder.toString()); |
| | | } |
| | | // æ£éªé¡¹ |
| | | str.setInspectionItem(list1.get(4).toString().trim()); |
| | | // æ£éªé¡¹è±æ |
| | | if (list1.get(5) != null) { |
| | | str.setInspectionItemEn(list1.get(5).toString()); |
| | | } |
| | | // æ£éªå项 |
| | | if (list1.get(6) == null) { |
| | | str.setInspectionItemSubclass(null); |
| | | } else { |
| | | str.setInspectionItemSubclass(list1.get(6).toString().trim()); |
| | | } |
| | | // æ£éªåé¡¹è±æ |
| | | if (list1.get(7) == null) { |
| | | str.setInspectionItemSubclassEn(null); |
| | | } else { |
| | | str.setInspectionItemSubclassEn(String.valueOf(list1.get(7).toString())); |
| | | } |
| | | // æ£éªé¡¹åç±» |
| | | if (list1.get(22) != null && list1.get(22) != "") { |
| | | str.setInspectionItemClass(list1.get(22).toString().trim()); |
| | | } else { |
| | | str.setInspectionItemClass(null); |
| | | } |
| | | // æ£éªé¡¹åç±»è±æ |
| | | if (list1.get(23) != null && list1.get(23) != "") { |
| | | str.setInspectionItemClassEn(list1.get(23) + ""); |
| | | } else { |
| | | str.setInspectionItemClassEn(null); |
| | | } |
| | | |
| | | LambdaQueryWrapper<StructureItemParameter> wrapper = Wrappers.lambdaQuery(StructureItemParameter.class) |
| | | .eq(StructureItemParameter::getInspectionItem, str.getInspectionItem()) |
| | | .eq(StructureItemParameter::getSample, str.getSample()) |
| | | |
| | | .last("limit 1"); |
| | | // 夿æ¯å¦ææ£éªé¡¹ç±»å |
| | | if (ObjectUtils.isNotEmpty(str.getInspectionItemClass())) { |
| | | wrapper.eq(StructureItemParameter::getInspectionItemClass, str.getInspectionItemClass()); |
| | | } |
| | | |
| | | // 夿æ¯å¦ææ£éªå项 |
| | | if (ObjectUtils.isNotEmpty(str.getInspectionItemSubclass())) { |
| | | wrapper.eq(StructureItemParameter::getInspectionItemSubclass, str.getInspectionItemSubclass()); |
| | | } |
| | | StructureItemParameter db_str = this.getOne(wrapper); |
| | | if (ObjectUtils.isNotEmpty(db_str)) { |
| | | str.setId(db_str.getId()); |
| | | } |
| | | // æ¹æ³åç§° |
| | | if (list1.get(8) == null) { |
| | | str.setMethod(null); |
| | | } else { |
| | | StringBuffer buffer = new StringBuffer(); |
| | | String input = list1.get(8).toString(); |
| | | buffer.append("["); |
| | | String[] values = input.split("ï¼"); |
| | | for (String value : values) { |
| | | buffer.append("\"").append(value.trim()).append("\","); |
| | | } |
| | | buffer.deleteCharAt(buffer.length() - 1); |
| | | buffer.append("]"); |
| | | str.setMethod(buffer.toString()); |
| | | } |
| | | // è¯éªå®¤ |
| | | if (list1.get(9) == null) { |
| | | str.setSonLaboratory(null); |
| | | } else { |
| | | str.setSonLaboratory(list1.get(9).toString()); |
| | | } |
| | | // 计éåä½ |
| | | if (list1.get(10) == null) { |
| | | str.setUnit(null); |
| | | } else { |
| | | str.setUnit(list1.get(10).toString()); |
| | | } |
| | | // è¦æ±å¼ |
| | | if (list1.get(11) == null) { |
| | | str.setAskTell(null); |
| | | } else { |
| | | str.setAskTell(list1.get(11).toString()); |
| | | } |
| | | // è¦æ±æè¿° |
| | | if (list1.get(12) == null) { |
| | | str.setAsk(null); |
| | | } else { |
| | | str.setAsk(list1.get(12).toString()); |
| | | } |
| | | // åä»· |
| | | if (list1.get(13) == null) { |
| | | str.setPrice(null); |
| | | } else { |
| | | str.setPrice(list1.get(13) + ""); |
| | | } |
| | | // å·¥æ¶ç³»æ° |
| | | if (list1.get(14) == null) { |
| | | str.setManHour(null); |
| | | } else { |
| | | str.setManHour(Double.valueOf(list1.get(14).toString())); |
| | | } |
| | | // å·¥æ¶åç» |
| | | if (list1.get(15) == null) { |
| | | str.setManHourGroup(null); |
| | | } else { |
| | | str.setManHourGroup(list1.get(15).toString()); |
| | | } |
| | | // é¢è®¡å®ææ¶é´ |
| | | if (list1.get(16) == null) { |
| | | str.setManDay(null); |
| | | } else { |
| | | str.setManDay(Integer.valueOf(list1.get(16).toString())); |
| | | } |
| | | // æ°æ®ç±»å |
| | | String jy; |
| | | if (list1.get(17).toString().equals("éééç±»å")) { |
| | | jy = "0"; |
| | | } else { |
| | | jy = "1"; |
| | | // ç»å®è®¾å¤ |
| | | if (list1.get(28) == null) { |
| | | str.setRates(null); |
| | | } else { |
| | | // æ¥è¯¢è®¾å¤ä¿¡æ¯ |
| | | List<String> managementNumberList = StrUtil.split(list1.get(28).toString(), 'ï¼'); |
| | | if (CollectionUtils.isNotEmpty(managementNumberList)) { |
| | | List<Integer> deviceIds = structureItemParameterMapper.selectDeviceIdsByNumber(managementNumberList); |
| | | if (CollectionUtils.isNotEmpty(deviceIds)) { |
| | | str.setDeviceIds(CollUtil.join(deviceIds, ",")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | str.setInspectionItemType(jy); |
| | | // æ£éªé¡¹ç±»å |
| | | String validateValueType = list1.get(18).toString(); |
| | | if (ObjectUtils.isNotEmpty(validateValueType)) { |
| | | List<SysDictData> enums = dictTypeService.selectDictDataByName("æ£éªå¼ç±»å") |
| | | .stream().filter(sysDictData -> sysDictData.getDictLabel().equals(validateValueType)).collect(Collectors.toList()); |
| | | str.setInspectionValueType(enums.get(0).getDictValue()); |
| | | } |
| | | int bsm; |
| | | //ç¹æ®æ è¯ |
| | | if (list1.get(19).toString().equals("å¦")) { |
| | | bsm = 0; |
| | | } else { |
| | | bsm = 1; |
| | | } |
| | | str.setBsm(bsm + ""); |
| | | // æ°ååå
¸ |
| | | if (list1.get(20) != null) { |
| | | str.setDic(list1.get(20) + ""); |
| | | } else { |
| | | str.setDic(null); |
| | | } |
| | | // åå§è®°å½æ¨¡æ¿ |
| | | StandardTemplate standTempIdByName = standardTemplateService.getStandTempIdByName(String.valueOf(list1.get(21))); |
| | | if (standTempIdByName != null) { |
| | | str.setTemplateId(standTempIdByName.getId()); |
| | | } else { |
| | | str.setTemplateId(null); |
| | | } |
| | | try { |
| | | if (list1.get(24) != null) { |
| | | str.setLaboratory(list1.get(24) + ""); |
| | | } |
| | | } catch (Exception e) { |
| | | } |
| | | |
| | | // æ¡ä»¶ |
| | | if (list1.get(25) == null) { |
| | | str.setRadiusList(null); |
| | | } else { |
| | | StringBuffer buffer = new StringBuffer(); |
| | | String input = list1.get(25).toString(); |
| | | buffer.append("["); |
| | | String[] values = input.split("ï¼"); |
| | | for (String value : values) { |
| | | buffer.append("\"").append(value.trim()).append("\","); |
| | | } |
| | | buffer.deleteCharAt(buffer.length() - 1); |
| | | buffer.append("]"); |
| | | str.setRadiusList(buffer.toString()); |
| | | } |
| | | //æ¶è´¹æ å |
| | | if (list1.get(26) == null) { |
| | | str.setRates(null); |
| | | } else { |
| | | str.setRates(list1.get(26) + ""); |
| | | } |
| | | // æ½æ ·ç±»å |
| | | if (list1.get(27) != null){ |
| | | String spotCheckType = list1.get(27).toString(); |
| | | if (ObjectUtils.isNotEmpty(spotCheckType)) { |
| | | List<SysDictData> enums = dictTypeService.selectDictDataByName("æ½æ£ç±»å") |
| | | .stream().filter(sysDictData -> sysDictData.getDictLabel().equals(spotCheckType)).collect(Collectors.toList()); |
| | | str.setSpotCheckType(enums.get(0).getDictValue()); |
| | | } |
| | | }else { |
| | | str.setSpotCheckType(null); |
| | | } |
| | | lists.add(str); |
| | | } |
| | | }); |
| | | try { |
| | | this.saveOrUpdateBatch(lists); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("æå¡ç«¯æ¥é"); |
| | | } |
| | | } |
| | | } |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.ruoyi.basic.mapper.CertificationMapper"> |
| | | <select id="getCertificationDetail" resultType="com.ruoyi.basic.pojo.Certification"> |
| | | select b.* |
| | | from ( select a.`name`, a.`code`,a.organization,a.explanation,a.first_issuance_date,a.latest_issuance_date,c.expire_time FROM |
| | | (SELECT id,name,MIN(date_of_issuance) AS first_issuance_date, |
| | | MAX(date_of_issuance) AS latest_issuance_date, |
| | | c.`code`,c.organization,c.explanation |
| | | FROM |
| | | certification c |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | GROUP BY |
| | | name) a left join certification c on a.id=c.id |
| | | ) b |
| | | SELECT * FROM certification |
| | | <where> |
| | | create_time IN ( |
| | | SELECT MAX( create_time ) FROM certification WHERE create_time IS NOT NULL GROUP BY NAME ) |
| | | <if test="param.name != null and param.name != ''"> |
| | | AND name like concat('%',#{param.name},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.basic.mapper.SealMapper"> |
| | | <select id="selectSeal" resultType="com.ruoyi.basic.pojo.Seal"> |
| | | select l.id,s.lab_id,l.laboratory_name ,s.address, s.type as Type,s.create_time |
| | | from seal s LEFT JOIN laboratory l on s.lab_id=l.id |
| | | select * from (select l.id,s.lab_id,l.laboratory_name ,s.address, s.type as Type,s.create_time |
| | | from seal s LEFT JOIN laboratory l on s.lab_id=l.id) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | |
| | | left join structure_test_object sto on sm.structure_test_object_id = sto.id |
| | | where sm.id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectStandardMethodLists" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select id, code, name, remark |
| | | from standard_method |
| | | where is_use = 1 |
| | | and is_product = 1 |
| | | and structure_test_object_id LIKE CONCAT('%[', #{tree}, ']%') |
| | | </select> |
| | | |
| | | <select id="selectStandardMethodLists3" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select id, code, name, remark |
| | | from standard_method |
| | | where is_use = 1 |
| | | and is_product = 1 |
| | | and structure_test_object_id LIKE CONCAT('%', #{tree}, '%') |
| | | </select> |
| | | <select id="selectListEnum" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select id,code,name from standard_method |
| | | where is_product = 1 |
| | | and is_use = 1 |
| | | </select> |
| | | <select id="selectStandardMethodListsByNull" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select id, code, name, remark |
| | | from standard_method |
| | | where is_use = 1 |
| | | and is_product = 1 |
| | | and ( |
| | | structure_test_object_id is null |
| | | OR structure_test_object_id = '' |
| | | OR structure_test_object_id = '[]' |
| | | ) |
| | | </select> |
| | | <select id="getStandardMethodId" resultType="java.lang.Integer"> |
| | | select id from standard_method where code = #{code} |
| | | </select> |
| | | </mapper> |
| | |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <!-- æ¹éæ·»å æ£æµæ å --> |
| | | <insert id="saveBatchProductLists"> |
| | | INSERT INTO standard_product_list (id, inspection_item, inspection_item_en, inspection_item_subclass, inspection_item_subclass_en, factory, laboratory, sample_type, sample, model, son_laboratory, unit, price, man_hour, man_hour_group, inspection_item_type, inspection_value_type, checkout_number, section, cores, method, method_s, man_day, bsm, ask, tell, standard_method_list_id, template_id, state, dic, tree, structure_item_parameter_id, inspection_item_class, inspection_item_class_en, radius, radius_list, rates, sort, conductor_material, conductor_type) |
| | | VALUES |
| | | <foreach item="item" collection="productLists" open="(" separator="),(" close=")"> |
| | | #{item.id}, #{item.inspectionItem}, #{item.inspectionItemEn}, #{item.inspectionItemSubclass}, #{item.inspectionItemSubclassEn}, #{item.factory}, #{item.laboratory}, #{item.sampleType}, #{item.sample}, #{item.model}, #{item.sonLaboratory}, #{item.unit}, #{item.price}, #{item.manHour}, #{item.manHourGroup}, #{item.inspectionItemType}, #{item.inspectionValueType}, #{item.checkoutNumber}, #{item.section}, #{item.cores}, #{item.method}, #{item.methodS}, #{item.manDay}, #{item.bsm}, #{item.ask}, #{item.tell}, #{item.standardMethodListId}, #{item.templateId}, #{item.state}, #{item.dic}, #{item.tree}, #{item.structureItemParameterId}, |
| | | #{item.inspectionItemClass}, #{item.inspectionItemClassEn}, #{item.radius}, #{item.radiusList}, #{item.rates}, #{item.sort}, #{item.conductorMaterial}, #{item.conductorType} |
| | | </foreach> |
| | | |
| | | </insert> |
| | | |
| | | |
| | | <update id="updateSection"> |
| | | UPDATE standard_product_list |
| | | SET price=#{productList.price}, |
| | |
| | | WHERE id = #{templateId} |
| | | </select> |
| | | |
| | | <select id="countBindTemplateItemParameter"> |
| | | SELECT COUNT(*) FROM structure_item_parameter WHERE template_id = #{templateId} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | or sp.sample = '' |
| | | or sp.sample = '[]' |
| | | </select> |
| | | <select id="getStandardMethodListBySample" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select sm.code,sm.name,sm.remark from standard_method sm |
| | | left join structure_test_object sto on sm.structure_test_object_id = sto.id |
| | | where is_use = 1 |
| | | and is_product = 1 |
| | | <if test="sampleType != null"> |
| | | and sto.specimen_name = #{sampleType} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectStandardTreeList2" resultType="com.ruoyi.basic.pojo.StandardTree"> |
| | | select 'ä¸å¤©ç§ææ£æµä¸å¿' factory, |
| | | l.laboratory_name laboratory, |
| | |
| | | left join product p on p.object_id = sto.id |
| | | left join standard_tree st on st.sample_type = sto.specimen_name |
| | | and st.sample = p.name |
| | | </select> |
| | | |
| | | <select id="getStandardTree3" resultType="com.ruoyi.basic.dto.SampleDto"> |
| | | select model label, |
| | | model value |
| | | from standard_tree |
| | | where sample_type = #{sampleType} |
| | | and sample is null |
| | | </select> |
| | | |
| | | <select id="getLaboratory" resultType="java.lang.String"> |
| | |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | order by send_time desc |
| | | </select> |
| | | |
| | | <select id="selectIfsPage" resultType="com.ruoyi.basic.pojo.IfsInventoryQuantity"> |
| | |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | ORDER BY declare_date DESC |
| | | </select> |
| | | <select id="selectIfsInventoryQuantity" resultType="com.ruoyi.basic.dto.IfsInventoryQuantityCheckDto"> |
| | | SELECT * from ifs_inventory_quantity ifs |
| | |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | order by send_time desc |
| | | </select> |
| | | <select id="getIfsByOverList" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto"> |
| | | select * from (<include refid="getIfsOrder"/> |
| | |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getStandardTree3Batch" resultType="com.ruoyi.basic.dto.SampleDto"> |
| | | select model label, |
| | | model value |
| | | from standard_tree |
| | | where sample is null |
| | | <if test="sampleTypeValues != null and sampleTypeValues.size() > 0"> |
| | | and sample_type in |
| | | <foreach item="item" collection="sampleTypeValues" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getStandardTree3" resultType="com.ruoyi.basic.dto.SampleDto"> |
| | | select model label, |
| | | model value |
| | | from standard_tree |
| | | where sample_type = #{sampleType} |
| | | and sample is null |
| | | </select> |
| | | |
| | | <!-- æ ¹æ®åææidå表æ¥è¯¢åææä¿¡æ¯ --> |
| | | <select id="getIfsByIds" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto"> |
| | | <include refid="getIfsOrder"/> |
| | | where id in |
| | | <foreach item="id" collection="ifsIds" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | </mapper> |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.basic.mapper.StructureItemParameterMapper"> |
| | | <delete id="removeNoSample"> |
| | | delete |
| | | from structure_item_parameter |
| | | where sample like concat('%', #{sample}, '%') |
| | | </delete> |
| | | |
| | | <select id="selectItemParameterList" resultType="com.ruoyi.basic.pojo.StructureItemParameter"> |
| | | select * from (select A.id, |
| | | inspection_item, |
| | |
| | | inspection_item_class_en, |
| | | code, |
| | | radius_list, |
| | | rates |
| | | rates, |
| | | device_ids, |
| | | spot_check_type |
| | | from (select *, |
| | | CASE |
| | | WHEN INSTR(sample, ',') > 0 THEN |
| | |
| | | from structure_test_object sto |
| | | left join product p on p.object_id = sto.id |
| | | </select> |
| | | <select id="selectDeviceIdsByNumber" resultType="java.lang.Integer"> |
| | | select id from device |
| | | where management_number in |
| | | <foreach item="item" collection="managementNumberList" open="(" separator="),(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <resultMap id="itemDto" type="com.ruoyi.basic.dto.TestItemDto"> |
| | | <result column="sId" property="id"/> |
| | |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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>ruoyi</artifactId> |
| | | <groupId>com.ruoyi</groupId> |
| | | <version>3.8.9</version> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>cnas-device</artifactId> |
| | | |
| | | <dependencies> |
| | | |
| | | <!--ä¸å¡æ¨¡å--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>inspect-server</artifactId> |
| | | </dependency> |
| | | |
| | | <!--mqtt jarå
--> |
| | | <!-- https://mvnrepository.com/artifact/org.springframework.integration/spring-integration-mqtt --> |
| | | <dependency> |
| | | <groupId>org.springframework.integration</groupId> |
| | | <artifactId>spring-integration-mqtt</artifactId> |
| | | </dependency> |
| | | <!--mqttéè¦çjarå
--> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-integration</artifactId> |
| | | </dependency> |
| | | <!--mqttéè¦çjarå
--> |
| | | <dependency> |
| | | <groupId>org.springframework.integration</groupId> |
| | | <artifactId>spring-integration-stream</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | | </properties> |
| | | |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.pojo.DeviceAcceptance; |
| | | import com.ruoyi.device.pojo.DeviceAcceptanceFile; |
| | | import com.ruoyi.device.service.DeviceAcceptanceFileService; |
| | | import com.ruoyi.device.service.DeviceAcceptanceService; |
| | | 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-12-20 01:45:14 |
| | | */ |
| | | @Api(tags = "设å¤éªæ¶(è£
å¤)") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceAcceptance") |
| | | public class DeviceAcceptanceController { |
| | | |
| | | private DeviceAcceptanceService deviceAcceptanceService; |
| | | private DeviceAcceptanceFileService deviceAcceptanceFileService; |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å表 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "设å¤éªæ¶å表") |
| | | @GetMapping("/pageDeviceAcceptance") |
| | | public Result<IPage<DeviceAcceptance>> pageDeviceAcceptance(Page page, DeviceAcceptance deviceAcceptance) { |
| | | return Result.success(deviceAcceptanceService.pageDeviceAcceptance(page, deviceAcceptance)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤éªæ¶ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤éªæ¶") |
| | | @GetMapping("/getDeviceAcceptance") |
| | | public Result getDeviceAcceptance(Integer acceptanceId){ |
| | | return Result.success(deviceAcceptanceService.getById(acceptanceId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤éªæ¶ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤éªæ¶") |
| | | @DeleteMapping("/delDeviceAcceptance") |
| | | public Result delDeviceAcceptance(Integer acceptanceId){ |
| | | return Result.success(deviceAcceptanceService.removeById(acceptanceId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤éªæ¶ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤éªæ¶") |
| | | @PostMapping("/addDeviceAcceptance") |
| | | public Result addDeviceAcceptance(@RequestBody DeviceAcceptance deviceAcceptance){ |
| | | return Result.success(deviceAcceptanceService.save(deviceAcceptance)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤éªæ¶ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "ç¼è¾è®¾å¤éªæ¶") |
| | | @PostMapping("/updateDeviceAcceptance") |
| | | public Result updateDeviceAcceptance(@RequestBody DeviceAcceptance deviceAcceptance){ |
| | | return Result.success(deviceAcceptanceService.updateById(deviceAcceptance)); |
| | | } |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å¯¼åº |
| | | * @param acceptanceId 设å¤éªæ¶id |
| | | * @param response ååºä½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "设å¤éªæ¶å¯¼åº") |
| | | @GetMapping("/exportDeviceAcceptance") |
| | | public void exportDeviceAcceptance(Integer acceptanceId, HttpServletResponse response){ |
| | | deviceAcceptanceService.exportDeviceAcceptance(acceptanceId, response); |
| | | } |
| | | |
| | | /** |
| | | * 设å¤éªæ¶éä»¶æ°å¢ |
| | | * @param acceptanceId |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "设å¤éªæ¶éä»¶æ°å¢") |
| | | @PostMapping("/uploadDeviceAcceptanceFile") |
| | | public Result<?> uploadDeviceAcceptanceFile(Integer acceptanceId, MultipartFile file) { |
| | | return Result.success(deviceAcceptanceService.uploadDeviceAcceptanceFile(acceptanceId, file)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设å¤éªæ¶éä»¶å表 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "设å¤éªæ¶éä»¶å表") |
| | | @GetMapping("/getDeviceAcceptanceFileList") |
| | | public Result<List<DeviceAcceptanceFile>> getVerifyMethodFileList(Integer acceptanceId){ |
| | | return Result.success(deviceAcceptanceFileService.list(Wrappers.<DeviceAcceptanceFile>lambdaQuery() |
| | | .eq(DeviceAcceptanceFile::getAcceptanceId, acceptanceId))); |
| | | } |
| | | |
| | | /** |
| | | * 设å¤éªæ¶éä»¶å é¤ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "设å¤éªæ¶éä»¶å é¤") |
| | | @DeleteMapping("/delDeviceAcceptanceFileList") |
| | | public Result delDeviceAcceptanceFileList(Integer acceptanceFileId){ |
| | | return Result.success(deviceAcceptanceFileService.removeById(acceptanceFileId)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.pojo.DeviceAccidentReport; |
| | | import com.ruoyi.device.service.DeviceAccidentReportService; |
| | | 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-12-17 06:31:12 |
| | | */ |
| | | @Api(tags = "设å¤äºæ
æ¥åå") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceAccidentReport") |
| | | public class DeviceAccidentReportController { |
| | | |
| | | private DeviceAccidentReportService deviceAccidentReportService; |
| | | |
| | | |
| | | /** |
| | | * 设å¤äºæ
æ¥åå表 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "设å¤äºæ
æ¥åå表") |
| | | @GetMapping("/pageDeviceAccidentReport") |
| | | public Result<IPage<DeviceAccidentReport>> pageDeviceAccidentReport(Page page, DeviceAccidentReport deviceAccidentReport){ |
| | | return Result.success(deviceAccidentReportService.pageDeviceAccidentReport(page, deviceAccidentReport)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äºæ
æ¥å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤äºæ
æ¥å") |
| | | @GetMapping("/getDeviceAccidentReport") |
| | | public Result getDeviceAccidentReport(Integer accidentReportId){ |
| | | return Result.success(deviceAccidentReportService.getById(accidentReportId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤äºæ
æ¥å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤äºæ
æ¥å") |
| | | @DeleteMapping("/delDeviceAccidentReport") |
| | | public Result delDeviceAccidentReport(Integer accidentReportId){ |
| | | return Result.success(deviceAccidentReportService.removeById(accidentReportId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤äºæ
æ¥å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤äºæ
æ¥å") |
| | | @PostMapping("/addDeviceAccidentReport") |
| | | public Result addDeviceAccidentReport(@RequestBody DeviceAccidentReport deviceAccidentReport){ |
| | | return Result.success(deviceAccidentReportService.addDeviceAccidentReport(deviceAccidentReport)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤äºæ
æ¥å |
| | | * @param accidentReportId 设å¤äºæ
æ¥åid |
| | | * @param response ååº |
| | | */ |
| | | @ApiOperation(value = "导åºè®¾å¤äºæ
æ¥å") |
| | | @GetMapping("/exportDeviceAccidentReport") |
| | | public Result exportDeviceAccidentReport(Integer accidentReportId, HttpServletResponse response) { |
| | | deviceAccidentReportService.exportDeviceAccidentReport(accidentReportId, response); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.pojo.DeviceBorrow; |
| | | import com.ruoyi.device.service.DeviceBorrowService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 10:53:51 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/deviceBorrow") |
| | | public class DeviceBorrowController { |
| | | |
| | | @Resource |
| | | private DeviceBorrowService deviceBorrowService; |
| | | |
| | | |
| | | //å页 |
| | | @GetMapping("/deviceBorrowPage") |
| | | public Result deviceBorrowPage(Page page, DeviceBorrow deviceBorrow) throws Exception { |
| | | return Result.success(deviceBorrowService.deviceBorrowPage(page, deviceBorrow)); |
| | | } |
| | | |
| | | //æ¥è¯¢ |
| | | @GetMapping("/getDeviceBorrow") |
| | | public Result getDeviceBorrow(Integer id) { |
| | | return Result.success(deviceBorrowService.getDeviceBorrow(id)); |
| | | } |
| | | |
| | | //æ°å¢ |
| | | @PostMapping("/saveDeviceBorrow") |
| | | public Result saveDeviceBorrow(@RequestBody DeviceBorrow deviceBorrow) { |
| | | return Result.success(deviceBorrowService.saveDeviceBorrow(deviceBorrow)); |
| | | } |
| | | |
| | | //å é¤ |
| | | @DeleteMapping("/deleteDeviceBorrow") |
| | | public Result deleteDeviceBorrow(Integer id) { |
| | | return Result.success(deviceBorrowService.removeById(id)); |
| | | } |
| | | |
| | | //å¯¼åº |
| | | @GetMapping("/deviceBorrowExport") |
| | | public Result deviceBorrowExport(@RequestParam("deviceId") Integer deviceId, HttpServletResponse response) throws Exception { |
| | | List<DeviceBorrow> deviceBorrows = deviceBorrowService.getDeviceBorrowBydeviceId(deviceId); |
| | | response.setHeader("requestType", "excel"); |
| | | response.setHeader("Access-Control-Expose-Headers", "requestType"); |
| | | // 设置åå
æ ¼æ ·å¼ |
| | | // ä¿åå°ç¬¬ä¸ä¸ªsheetä¸ |
| | | EasyExcel.write(response.getOutputStream()) |
| | | .head(DeviceBorrow.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet() |
| | | .doWrite(deviceBorrows); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceBreakdownMaintenance; |
| | | import com.ruoyi.device.service.DeviceBreakdownMaintenanceService; |
| | | 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-12-17 04:50:57 |
| | | */ |
| | | @Api(tags = "è®¾å¤æ
é维修表") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceBreakdownMaintenance") |
| | | public class DeviceBreakdownMaintenanceController { |
| | | |
| | | private DeviceBreakdownMaintenanceService deviceBreakdownMaintenanceService; |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ
éç»´ä¿®å表 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ
éç»´ä¿®å表") |
| | | @GetMapping("/pageDeviceBreakdownMaintenance") |
| | | public Result<IPage<DeviceBreakdownMaintenance>> pageDeviceBreakdownMaintenance(Page page, DeviceBreakdownMaintenance deviceBreakdownMaintenance) { |
| | | return Result.success(deviceBreakdownMaintenanceService.pageDeviceBreakdownMaintenance(page, deviceBreakdownMaintenance)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ
éç»´ä¿® |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤æ
éç»´ä¿®") |
| | | @GetMapping("/getDeviceBreakdownMaintenance") |
| | | public Result getDeviceBreakdownMaintenance(Integer maintenanceId){ |
| | | return Result.success(deviceBreakdownMaintenanceService.getById(maintenanceId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤æ
éç»´ä¿® |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤æ
éç»´ä¿®") |
| | | @DeleteMapping("/delDeviceBreakdownMaintenance") |
| | | public Result delDeviceBreakdownMaintenance(Integer maintenanceId){ |
| | | return Result.success(deviceBreakdownMaintenanceService.removeById(maintenanceId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ
éç»´ä¿® |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ
éç»´ä¿®") |
| | | @PostMapping("/addDeviceBreakdownMaintenance") |
| | | public Result addDeviceBreakdownMaintenance(@RequestBody DeviceBreakdownMaintenance deviceBreakdownMaintenance){ |
| | | return Result.success(deviceBreakdownMaintenanceService.addDeviceBreakdownMaintenance(deviceBreakdownMaintenance)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ
éç»´ä¿® |
| | | * @param maintenanceId è®¾å¤æ
éç»´ä¿®id |
| | | * @param response ååº |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºè®¾å¤æ
éç»´ä¿®") |
| | | @GetMapping("/exportDeviceBreakdownMaintenance") |
| | | public Result exportDeviceBreakdownMaintenance(Integer maintenanceId, HttpServletResponse response){ |
| | | deviceBreakdownMaintenanceService.exportDeviceBreakdownMaintenance(maintenanceId, response); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceCalibrationPlanDto; |
| | | import com.ruoyi.device.pojo.DeviceCalibrationPlan; |
| | | import com.ruoyi.device.pojo.DeviceCalibrationPlanDetail; |
| | | import com.ruoyi.device.service.DeviceCalibrationPlanDetailService; |
| | | import com.ruoyi.device.service.DeviceCalibrationPlanService; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å主表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:17 |
| | | */ |
| | | @Api(tags = "è®¾å¤æ ¡å计å") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceCalibrationPlan") |
| | | public class DeviceCalibrationPlanController { |
| | | |
| | | private DeviceCalibrationPlanService deviceCalibrationPlanService; |
| | | |
| | | private DeviceCalibrationPlanDetailService deviceCalibrationPlanDetailService; |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¡å计å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ ¡å计å") |
| | | @PostMapping("/addDeviceCalibrationPlan") |
| | | public Result addDeviceCalibrationPlan(@RequestBody DeviceCalibrationPlanDto calibrationPlanDto){ |
| | | return Result.success(deviceCalibrationPlanService.addDeviceCalibrationPlan(calibrationPlanDto)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤æ ¡å计å |
| | | * @param calibrationPlanDto è®¾å¤æ ¡å计å |
| | | */ |
| | | @ApiOperation("æ¹éä¿®æ¹è®¾å¤æ ¡å计å") |
| | | @PostMapping("/updateDeviceCalibrationPlan") |
| | | public Result updateDeviceCalibrationPlan(@RequestBody DeviceCalibrationPlanDto calibrationPlanDto) { |
| | | return Result.success(deviceCalibrationPlanService.updateDeviceCalibrationPlan(calibrationPlanDto)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ ¡å计å详æ
|
| | | */ |
| | | @ApiOperation("æ¥è¯¢è®¾å¤æ ¡å计å详æ
") |
| | | @GetMapping("/getDeviceCalibrationPlan") |
| | | public Result<DeviceCalibrationPlanDto> getDeviceCalibrationPlan(Integer planId) { |
| | | return Result.success(deviceCalibrationPlanService.getDeviceCalibrationPlan(planId)); |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥è®¾å¤æ ¡å计å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导å
¥è®¾å¤æ ¡å计å") |
| | | @PostMapping("/importDeviceCalibrationPlan") |
| | | public Result importDeviceCalibrationPlan(MultipartFile file, String planYear){ |
| | | return Result.success(deviceCalibrationPlanService.importDeviceCalibrationPlan(file, planYear)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计åå é¤ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ ¡å计åå é¤") |
| | | @DeleteMapping("/delDeviceCalibrationPlan") |
| | | public Result delDeviceCalibrationPlan(Integer planId){ |
| | | return Result.success(deviceCalibrationPlanService.removeById(planId)); |
| | | } |
| | | |
| | | /** |
| | | * æäº¤æ¹å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æäº¤æ¹å") |
| | | @PostMapping("/submiatRatifyDeviceCalibrationPlan") |
| | | public Result submiatRatifyDeviceCalibrationPlan(@RequestBody DeviceCalibrationPlan DeviceCalibrationPlan){ |
| | | return Result.success(deviceCalibrationPlanService.submiatRatifyDeviceCalibrationPlan(DeviceCalibrationPlan)); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡åè®¡åæ¹å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ ¡åè®¡åæ¹å") |
| | | @PostMapping("/ratifyDeviceCalibrationPlan") |
| | | public Result ratifyDeviceCalibrationPlan(@RequestBody DeviceCalibrationPlan DeviceCalibrationPlan){ |
| | | return Result.success(deviceCalibrationPlanService.ratifyDeviceCalibrationPlan(DeviceCalibrationPlan)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计åå表 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ ¡å计åå表") |
| | | @GetMapping("/pageDeviceCalibrationPlan") |
| | | public Result<IPage<DeviceCalibrationPlanDto>> pageDeviceCalibrationPlan(Page page, DeviceCalibrationPlan DeviceCalibrationPlan) throws Exception { |
| | | return Result.success(deviceCalibrationPlanService.pageDeviceCalibrationPlan(page, DeviceCalibrationPlan)); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计å详æ
å表 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ ¡å计å详æ
å表") |
| | | @GetMapping("/pageDeviceCalibrationPlanDetail") |
| | | public Result<IPage<DeviceCalibrationPlanDetail>> pageDeviceCalibrationPlanDetail(Page page, DeviceCalibrationPlanDetail deviceCalibrationPlanDetails) { |
| | | return Result.success(deviceCalibrationPlanService.pageDeviceCalibrationPlanDetail(page, deviceCalibrationPlanDetails)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¡å计å详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ ¡å计å详æ
") |
| | | @PostMapping("/addDeviceCalibrationPlanDetail") |
| | | public Result addDeviceCalibrationPlanDetail(@RequestBody DeviceCalibrationPlanDetail deviceCalibrationPlanDetail){ |
| | | if (deviceCalibrationPlanDetail.getPlanId() == null) { |
| | | throw new ErrorException("缺å°è®¾å¤æ ¡å计å主表id"); |
| | | } |
| | | return Result.success(deviceCalibrationPlanDetailService.save(deviceCalibrationPlanDetail)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤æ ¡å计å详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "ä¿®æ¹è®¾å¤æ ¡å计å详æ
") |
| | | @PostMapping("/updateDeviceCalibrationPlanDetail") |
| | | public Result updateDeviceCalibrationPlanDetail(@RequestBody DeviceCalibrationPlanDetail deviceCalibrationPlanDetail){ |
| | | return Result.success(deviceCalibrationPlanDetailService.updateById(deviceCalibrationPlanDetail)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤æ ¡å计å详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤æ ¡å计å详æ
") |
| | | @DeleteMapping("/delDeviceCalibrationPlanDetail") |
| | | public Result delDeviceCalibrationPlanDetail(Integer planDetailsId){ |
| | | return Result.success(deviceCalibrationPlanDetailService.removeById(planDetailsId)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ ¡å计å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºè®¾å¤æ ¡å计å") |
| | | @GetMapping("/exportDeviceCalibrationPlanDetail") |
| | | public void exportDeviceCalibrationPlanDetail(Integer planId, HttpServletResponse response){ |
| | | deviceCalibrationPlanService.exportDeviceCalibrationPlanDetail(planId, response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DataConfigDto; |
| | | import com.ruoyi.device.dto.DeviceCollectionDto; |
| | | import com.ruoyi.device.dto.DeviceDto; |
| | | import com.ruoyi.device.pojo.DataConfig; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.device.service.DataConfigService; |
| | | import com.ruoyi.device.service.DeviceService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 设å¤(DeviceController)表æ§å¶å± |
| | | */ |
| | | @Api(tags = "设å¤") |
| | | @RestController |
| | | @RequestMapping("/deviceScope") |
| | | public class DeviceController { |
| | | |
| | | @Resource |
| | | private DeviceService deviceService; |
| | | |
| | | @Value("${file.path}") |
| | | private String filePath; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Autowired |
| | | private DataConfigService dataConfigService; |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤è¯¦æ
") |
| | | @GetMapping("/getDeviceById") |
| | | public Result getDeviceById(Integer deviceId){ |
| | | return Result.success(deviceService.getById(deviceId)); |
| | | } |
| | | |
| | | |
| | | //设å¤å·¥å
·æç» |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤è¯¦æ
å表") |
| | | @GetMapping("/selectDeviceParameter") |
| | | public Result selectDeviceParameter(Page page, DeviceDto itemParameter, Boolean laboratoryNameIsNull){ |
| | | return Result.success(deviceService.selectDeviceParameter(page, itemParameter, laboratoryNameIsNull)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å 设å¤è¯¦æ
åæ°") |
| | | @PostMapping("/addDeviceParameter") |
| | | public Result addDeviceParameter(@RequestBody Device itemParameter) { |
| | | return Result.success(deviceService.addDeviceParameter(itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤è®¾å¤è¯¦æ
åæ°") |
| | | @DeleteMapping("/delDeviceParameter") |
| | | public Result<?> delDeviceParameter(Integer id) { |
| | | return Result.success(deviceService.delDeviceParameter(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹è®¾å¤è¯¦æ
åæ°") |
| | | @PostMapping("/upDeviceParameter") |
| | | public Result<?> upDeviceParameter(@RequestBody Device itemParameter) { |
| | | return Result.success(deviceService.upDeviceParameter(itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åè®¾å¤æ»è§") |
| | | @GetMapping("/selectEquipmentOverview") |
| | | public Result selectEquipmentOverview() { |
| | | return Result.success(deviceService.selectEquipmentOverview()); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·å被ææäºº") |
| | | @GetMapping("/authorizedPerson") |
| | | public Result authorizedPerson() { |
| | | return Result.success(deviceService.authorizedPerson()); |
| | | } |
| | | |
| | | @ApiOperation(value = "æç´¢") |
| | | @GetMapping("/search") |
| | | public Result search(Integer status, String deviceName, String specificationModel, String largeCategory) { |
| | | return Result.success(deviceService.search(status, deviceName, specificationModel, largeCategory)); |
| | | } |
| | | |
| | | //å¾çä¸ä¼ |
| | | @ApiOperation(value = "è®¾å¤æä»¶ä¸ä¼ ") |
| | | @PostMapping("/uploadFile") |
| | | public Result uploadFile(MultipartFile file) { |
| | | String urlString; |
| | | String pathName; |
| | | String filename = file.getOriginalFilename(); |
| | | String path; |
| | | try { |
| | | String contentType = file.getContentType(); |
| | | if (contentType != null && contentType.startsWith("image/")) { |
| | | // æ¯å¾ç |
| | | path = filePath; |
| | | } else { |
| | | // æ¯æä»¶ |
| | | path = wordUrl; |
| | | } |
| | | |
| | | 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)); |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("name", filename); |
| | | map.put("url", pathName); |
| | | return Result.success(map); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("æä»¶ä¸ä¼ é误"); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿é¡¹ç®è·å设å¤å表") |
| | | @GetMapping("/selectDeviceByCategory") |
| | | public Result selectDeviceByCategory(String inspectionItem, String inspectionItemSubclass,String laboratory) { |
| | | return Result.success(deviceService.selectDeviceByCategory(inspectionItem, inspectionItemSubclass,laboratory)); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿è®¾å¤ç¼å·è·å设å¤å表") |
| | | @GetMapping("/selectDeviceByCode") |
| | | public Result<DeviceDto> selectDeviceByCode(Integer id) { |
| | | return Result.success(deviceService.selectDeviceByCode(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("/æ°é-æ°æ®éé") |
| | | @PostMapping("/dataCollection") |
| | | public Result<?> dataAcquisition(HttpServletRequest request,@RequestBody DeviceCollectionDto dto) { |
| | | return deviceService.dataAcquisition(request, dto); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç»´æ¤è®¾å¤æä»¶é
ç½®") |
| | | @PostMapping("/saveDeviceFileConfiguration") |
| | | public Result<?> saveDeviceFileConfiguration(@RequestBody DataConfigDto dataConfigList) { |
| | | dataConfigService.saveDeviceFileConfiguration(dataConfigList); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢æ°éé
ç½®") |
| | | @GetMapping("/queryDataAcquisitionConfiguration") |
| | | public Result<?> queryDataAcquisitionConfiguration(DataConfig dataConfig) { |
| | | return dataConfigService.queryDataAcquisitionConfiguration(dataConfig); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢æ£éªé¡¹æ°éé
ç½®") |
| | | @GetMapping("/queryProductConfiguration") |
| | | public Result<?> queryProductConfiguration(DataConfig dataConfig) { |
| | | return dataConfigService.queryProductConfiguration(dataConfig); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç»´æ¤æ°éé
ç½®") |
| | | @PostMapping("/saveDataAcquisitionConfiguration") |
| | | public Result<?> saveDataAcquisitionConfiguration(@RequestBody DataConfigDto dataConfigList) { |
| | | dataConfigService.saveDataAcquisitionConfiguration(dataConfigList); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ç»å®äºä½æ¯æ²¡æé
ç½®çæ£éªé¡¹") |
| | | @GetMapping("/getNoConfigProduct") |
| | | public Result<?> getNoConfigProduct(Page page, Integer deviceId) { |
| | | return Result.success(dataConfigService.getNoConfigProduct(page, deviceId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿°éé
ç½®") |
| | | @DeleteMapping("/deleteDataAcquisitionConfiguration") |
| | | public Result<?> deleteDataAcquisitionConfiguration(@RequestParam("ids") String ids) { |
| | | List<String> split = Arrays.asList(ids.split(",")); |
| | | List<String> collect = split.stream().distinct().collect(Collectors.toList()); |
| | | dataConfigService.removeBatchByIds(collect); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å·¦ä¾§è®¾å¤æ å½¢æ ") |
| | | @GetMapping("/treeDevice") |
| | | public Result treeDevice(String deviceName) { |
| | | return Result.success(deviceService.treeDevice(deviceName)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "è®¾å¤æ¡£æ¡å¯¼åº") |
| | | @GetMapping("/exportDeviceFile") |
| | | public void exportDeviceFile(@RequestParam Integer deviceId, HttpServletResponse response){ |
| | | deviceService.exportDeviceFile(deviceId,response); |
| | | } |
| | | |
| | | @ApiOperation(value = "仪å¨è®¾å¤ä¸è§è¡¨å¯¼åº") |
| | | @GetMapping("/exportEquipmentDetails") |
| | | public void exportEquipmentDetails(HttpServletResponse response){ |
| | | deviceService.exportEquipmentDetails(response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.pojo.DeviceDocuments; |
| | | import com.ruoyi.device.service.DeviceDocumentsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ¡£æ¡ææ¡£ |
| | | * |
| | | * @author zhuo |
| | | * @since 2025-02-28 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "è®¾å¤æ¡£æ¡ææ¡£") |
| | | @RequestMapping("/deviceDocuments") |
| | | public class DeviceDocumentsController { |
| | | |
| | | @Resource |
| | | private DeviceDocumentsService deviceDocumentsService; |
| | | |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ¡£æ¡ |
| | | * @param document |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ¡£æ¡") |
| | | @PostMapping("/addDocument") |
| | | public Result addDocument(@RequestBody DeviceDocuments document) { |
| | | if (document.getDeviceId() == null) { |
| | | throw new RuntimeException("设å¤id为空"); |
| | | } |
| | | deviceDocumentsService.save(document); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ¡£æ¡ä¿¡æ¯ |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤æ¡£æ¡ä¿¡æ¯") |
| | | @GetMapping("/getDocumentById") |
| | | public Result getDocumentById(Integer id) { |
| | | return Result.success(deviceDocumentsService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤æ¡£æ¡ |
| | | * @param document |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "ä¿®æ¹è®¾å¤æ¡£æ¡") |
| | | @PostMapping("/updateDocument") |
| | | public Result updateDocument(@RequestBody DeviceDocuments document) { |
| | | return Result.success(deviceDocumentsService.updateById(document)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤æ¡£æ¡ |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤æ¡£æ¡") |
| | | @DeleteMapping("/deleteDocumentById") |
| | | public Result deleteDocumentById(Integer id) { |
| | | return Result.success(deviceDocumentsService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ¡£æ¡å表 |
| | | * @param deviceId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤æ¡£æ¡å表") |
| | | @GetMapping("/getAllDocuments") |
| | | public Result getAllDocuments(Integer deviceId) { |
| | | LambdaQueryWrapper<DeviceDocuments> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(DeviceDocuments::getDeviceId, deviceId); |
| | | return Result.success(deviceDocumentsService.list(lambdaQueryWrapper)); |
| | | } |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceExaminePlanDetailsDto; |
| | | import com.ruoyi.device.dto.DeviceExaminePlanDto; |
| | | import com.ruoyi.device.dto.DeviceExamineRecordContrastDto; |
| | | import com.ruoyi.device.dto.DeviceExamineRecordDto; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlan; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlanDetails; |
| | | import com.ruoyi.device.service.DeviceExaminePlanDetailsService; |
| | | import com.ruoyi.device.service.DeviceExaminePlanService; |
| | | import com.ruoyi.device.service.DeviceExamineRecordContrastService; |
| | | import com.ruoyi.device.service.DeviceExamineRecordService; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å主表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:04 |
| | | */ |
| | | @Api(tags = "è®¾å¤æ ¸æ¥è®¡å") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceExaminePlan") |
| | | public class DeviceExaminePlanController { |
| | | |
| | | private DeviceExaminePlanService deviceExaminePlanService; |
| | | |
| | | private DeviceExaminePlanDetailsService deviceExaminePlanDetailsService; |
| | | |
| | | private DeviceExamineRecordService deviceExamineRecordService; |
| | | |
| | | private DeviceExamineRecordContrastService deviceExamineRecordContrastService; |
| | | |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¸æ¥è®¡å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ ¸æ¥è®¡å") |
| | | @PostMapping("/addDeviceExaminePlan") |
| | | public Result addDeviceExaminePlan(@RequestBody DeviceExaminePlanDto examinePlanDto){ |
| | | return Result.success(deviceExaminePlanService.addDeviceExaminePlan(examinePlanDto)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤æ ¸æ¥è®¡å |
| | | * @param examinePlanDto è®¾å¤æ ¸æ¥è®¡å |
| | | */ |
| | | @ApiOperation("æ¹éä¿®æ¹è®¾å¤æ ¸æ¥è®¡å") |
| | | @PostMapping("/updateDeviceExaminePlan") |
| | | public Result updateDeviceExaminePlan(@RequestBody DeviceExaminePlanDto examinePlanDto) { |
| | | return Result.success(deviceExaminePlanService.updateDeviceExaminePlan(examinePlanDto)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | */ |
| | | @ApiOperation("æ¥è¯¢è®¾å¤æ ¸æ¥è®¡å详æ
") |
| | | @GetMapping("/getDeviceExaminePlan") |
| | | public Result<DeviceExaminePlanDto> getDeviceExaminePlan(Integer planId) { |
| | | return Result.success(deviceExaminePlanService.getDeviceExaminePlan(planId)); |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥è®¾å¤æ ¸æ¥è®¡å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导å
¥è®¾å¤æ ¸æ¥è®¡å") |
| | | @PostMapping("/importDeviceExaminePlan") |
| | | public Result importDeviceExaminePlan(MultipartFile file){ |
| | | return Result.success(deviceExaminePlanService.importDeviceExaminePlan(file)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åå é¤ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ ¸æ¥è®¡åå é¤") |
| | | @DeleteMapping("/delDeviceExaminePlan") |
| | | public Result delDeviceExaminePlan(Integer planId){ |
| | | return Result.success(deviceExaminePlanService.removeById(planId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åæ¹å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æäº¤æ¹å") |
| | | @PostMapping("/submitRatifyDeviceExaminePlan") |
| | | public Result submitRatifyDeviceExaminePlan(@RequestBody DeviceExaminePlan DeviceExaminePlan){ |
| | | return Result.success(deviceExaminePlanService.submitRatifyDeviceExaminePlan(DeviceExaminePlan)); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åæ¹å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ ¸æ¥è®¡åæ¹å") |
| | | @PostMapping("/ratifyDeviceExaminePlan") |
| | | public Result ratifyDeviceExaminePlan(@RequestBody DeviceExaminePlan DeviceExaminePlan){ |
| | | return Result.success(deviceExaminePlanService.ratifyDeviceExaminePlan(DeviceExaminePlan)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åå表 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ ¸æ¥è®¡åå表") |
| | | @GetMapping("/pageDeviceExaminePlan") |
| | | public Result<IPage<DeviceExaminePlanDto>> pageDeviceExaminePlan(Page page, DeviceExaminePlan DeviceExaminePlan) { |
| | | return Result.success(deviceExaminePlanService.pageDeviceExaminePlan(page, DeviceExaminePlan)); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
å表 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ ¸æ¥è®¡å详æ
å表") |
| | | @GetMapping("/pageDeviceExaminePlanDetail") |
| | | public Result<IPage<DeviceExaminePlanDetailsDto>> pageDeviceExaminePlanDetail(Page page, DeviceExaminePlanDetails deviceExaminePlanDetails) { |
| | | return Result.success(deviceExaminePlanService.pageDeviceExaminePlanDetail(page, deviceExaminePlanDetails)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ ¸æ¥è®¡å详æ
") |
| | | @PostMapping("/addDeviceExaminePlanDetail") |
| | | public Result addDeviceExaminePlanDetail(@RequestBody DeviceExaminePlanDetails deviceExaminePlanDetail){ |
| | | if (deviceExaminePlanDetail.getPlanId() == null) { |
| | | throw new ErrorException("缺å°è®¾å¤æ ¸æ¥è®¡å主表id"); |
| | | } |
| | | return Result.success(deviceExaminePlanDetailsService.save(deviceExaminePlanDetail)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "ä¿®æ¹è®¾å¤æ ¸æ¥è®¡å详æ
") |
| | | @PostMapping("/updateDeviceExaminePlanDetail") |
| | | public Result updateDeviceExaminePlanDetail(@RequestBody DeviceExaminePlanDetails deviceExaminePlanDetail){ |
| | | return Result.success(deviceExaminePlanDetailsService.updateById(deviceExaminePlanDetail)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤æ ¸æ¥è®¡å详æ
") |
| | | @DeleteMapping("/delDeviceExaminePlanDetail") |
| | | public Result delDeviceExaminePlanDetail(Integer planDetailsId){ |
| | | return Result.success(deviceExaminePlanDetailsService.removeById(planDetailsId)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ ¸æ¥è®¡å |
| | | * @param planId è®¾å¤æ ¸æ¥è®¡åid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºè®¾å¤æ ¸æ¥è®¡å") |
| | | @GetMapping("/exportDeviceExaminePlanDetail") |
| | | public void exportDeviceExaminePlanDetail(Integer planId, HttpServletResponse response){ |
| | | deviceExaminePlanService.exportDeviceExaminePlanDetail(planId, response); |
| | | } |
| | | |
| | | /*********************************************** æ¥å **************************************************/ |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢æ ¸æ¥è®°å½") |
| | | @GetMapping("/getExamineRecord") |
| | | public Result<DeviceExamineRecordDto> getExamineRecord(Integer planDetailsId){ |
| | | return Result.success(deviceExamineRecordService.getExamineRecord(planDetailsId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ ¸æ¥è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢æ ¸æ¥è®°å½") |
| | | @PostMapping("/addExamineRecord") |
| | | public Result addExamineRecord(@RequestBody DeviceExamineRecordDto deviceExamineRecordDto){ |
| | | return Result.success(deviceExamineRecordService.addExamineRecord(deviceExamineRecordDto)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 夿 ¸æ ¸æ¥è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "夿 ¸æ ¸æ¥è®°å½") |
| | | @PostMapping("/reviewExamineRecord") |
| | | public Result reviewExamineRecord(@RequestBody DeviceExamineRecordDto deviceExamineRecordDto){ |
| | | return Result.success(deviceExamineRecordService.reviewExamineRecord(deviceExamineRecordDto)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå¤æ ¸æ ¸æ¥è®°å½ |
| | | * @param planDetailsId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºå¤æ ¸æ ¸æ¥è®°å½") |
| | | @GetMapping("/exportReviewExamineRecordDetail") |
| | | public void exportReviewExamineRecordDetail(Integer planDetailsId, HttpServletResponse response){ |
| | | deviceExamineRecordService.exportReviewExamineRecordDetail(planDetailsId, response); |
| | | } |
| | | |
| | | /*********************************************** æ¥åå¯¹æ¯ **************************************************/ |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢æ ¸æ¥å¯¹æ¯è®°å½") |
| | | @GetMapping("/getExamineRecordContrast") |
| | | public Result<DeviceExamineRecordContrastDto> getExamineRecordContrast(Integer planDetailsId){ |
| | | return Result.success(deviceExamineRecordContrastService.getExamineRecordContrast(planDetailsId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢æ ¸æ¥å¯¹æ¯è®°å½") |
| | | @PostMapping("/addExamineRecordContrast") |
| | | public Result addExamineRecordContrast(@RequestBody DeviceExamineRecordContrastDto deviceExamineRecordContrastDto){ |
| | | return Result.success(deviceExamineRecordContrastService.addExamineRecordContrast(deviceExamineRecordContrastDto)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½") |
| | | @PostMapping("/reviewExamineRecordContrast") |
| | | public Result reviewExamineRecordContrast(@RequestBody DeviceExamineRecordContrastDto deviceExamineRecordContrastDto){ |
| | | return Result.success(deviceExamineRecordContrastService.reviewExamineRecordContrast(deviceExamineRecordContrastDto)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @param planDetailsId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºå®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½") |
| | | @GetMapping("/exportReviewExamineRecordContrast") |
| | | public Result exportReviewExamineRecordContrast(Integer planDetailsId, HttpServletResponse response){ |
| | | deviceExamineRecordContrastService.exportReviewExamineRecordContrast(planDetailsId, response); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.pojo.DeviceExternalApply; |
| | | import com.ruoyi.device.service.DeviceExternalApplyService; |
| | | 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-12-17 10:28:43 |
| | | */ |
| | | @Api(tags = "å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceExternalApply") |
| | | public class DeviceExternalApplyController { |
| | | |
| | | private DeviceExternalApplyService deviceExternalApplyService; |
| | | |
| | | |
| | | /** |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·å表 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å©ç¨å¤é¨è®¾å¤ç³è¯·å表") |
| | | @GetMapping("/pageDeviceExternalApply") |
| | | public Result<IPage<DeviceExternalApply>> pageDeviceExternalApply(Page page, DeviceExternalApply deviceExternalApply) throws Exception { |
| | | return Result.success(deviceExternalApplyService.pageDeviceExternalApply(page, deviceExternalApply)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢å©ç¨å¤é¨è®¾å¤ç³è¯·") |
| | | @GetMapping("/getDeviceExternalApply") |
| | | public Result getDeviceExternalApply(Integer externalApplyId){ |
| | | return Result.success(deviceExternalApplyService.getById(externalApplyId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤å©ç¨å¤é¨è®¾å¤ç³è¯·") |
| | | @DeleteMapping("/delDeviceExternalApply") |
| | | public Result delDeviceExternalApply(Integer externalApplyId){ |
| | | return Result.success(deviceExternalApplyService.removeById(externalApplyId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢å©ç¨å¤é¨è®¾å¤ç³è¯·") |
| | | @PostMapping("/addDeviceExternalApply") |
| | | public Result addDeviceExternalApply(@RequestBody DeviceExternalApply deviceExternalApply){ |
| | | return Result.success(deviceExternalApplyService.addDeviceExternalApply(deviceExternalApply)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @param externalApplyId å¤é¨è®¾å¤ç³è¯·id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºå©ç¨å¤é¨è®¾å¤ç³è¯·") |
| | | @GetMapping("/exportDeviceExternalApply") |
| | | public Result exportDeviceExternalApply(Integer externalApplyId, HttpServletResponse response){ |
| | | deviceExternalApplyService.exportDeviceExternalApply(externalApplyId, response); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceImpowerDto; |
| | | import com.ruoyi.device.pojo.DeviceImpower; |
| | | import com.ruoyi.device.service.DeviceImpowerService; |
| | | 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 2025-04-17 03:23:23 |
| | | */ |
| | | @Api(tags = "设å¤ä½¿ç¨ææè¡¨") |
| | | @RestController |
| | | @RequestMapping("/deviceImpower") |
| | | public class DeviceImpowerController { |
| | | |
| | | @Resource |
| | | private DeviceImpowerService deviceImpowerService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ä½¿ç¨ææ |
| | | * @return |
| | | */ |
| | | @ApiOperation("å页æ¥è¯¢ä½¿ç¨ææ") |
| | | @GetMapping("selectDeviceImpowerByPage") |
| | | public Result<IPage<DeviceImpower>> selectDeviceImpowerByPage(Page page, DeviceImpowerDto itemParameter){ |
| | | return deviceImpowerService.selectDeviceImpowerByPage(page, itemParameter); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ä½¿ç¨ææ |
| | | * @param deviceImpowerDto ä½¿ç¨ææ |
| | | */ |
| | | @ApiOperation("æ°å¢ä½¿ç¨ææ") |
| | | @PostMapping("/addImpower") |
| | | public Result addImpower(@RequestBody DeviceImpowerDto deviceImpowerDto) { |
| | | return deviceImpowerService.addImpower(deviceImpowerDto); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ä½¿ç¨ææ |
| | | * @param deviceImpowerDto ä½¿ç¨ææ |
| | | */ |
| | | @ApiOperation("ä¿®æ¹ä½¿ç¨ææ") |
| | | @PostMapping("/updateImpower") |
| | | public Result updateImpower(@RequestBody DeviceImpowerDto deviceImpowerDto) { |
| | | return deviceImpowerService.updateImpower(deviceImpowerDto); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä½¿ç¨ææ |
| | | * @param deviceImpowerDto ä½¿ç¨ææ |
| | | */ |
| | | @ApiOperation("å é¤ä½¿ç¨ææ") |
| | | @DeleteMapping("/deleteImpower") |
| | | public Result deleteImpower(DeviceImpowerDto deviceImpowerDto) { |
| | | return deviceImpowerService.deleteImpower(deviceImpowerDto); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ä½¿ç¨ææè¯¦æ
|
| | | */ |
| | | @ApiOperation("æ¥è¯¢ä½¿ç¨ææè¯¦æ
") |
| | | @GetMapping("/getImpowerDetail") |
| | | public Result<DeviceImpowerDto> getImpowerDetail(Integer impowerId) { |
| | | return deviceImpowerService.getImpowerDetail(impowerId); |
| | | } |
| | | |
| | | /** |
| | | * æäº¤æ¹å |
| | | */ |
| | | @ApiOperation("æäº¤æ¹åéç¥") |
| | | @PostMapping("/submitReviewImpowerStatus") |
| | | public Result submitReviewImpowerStatus(@RequestBody DeviceImpowerDto deviceImpowerDto) { |
| | | return deviceImpowerService.submitReviewImpowerStatus(deviceImpowerDto); |
| | | } |
| | | |
| | | /** |
| | | * ä½¿ç¨æææ¹å |
| | | */ |
| | | @ApiOperation("æææ¹å") |
| | | @PostMapping("/reviewImpowerStatus") |
| | | public Result reviewImpowerStatus(@RequestBody DeviceImpowerDto deviceImpowerDto) { |
| | | return deviceImpowerService.reviewImpowerStatus(deviceImpowerDto); |
| | | } |
| | | |
| | | /** |
| | | * 导åºä½¿ç¨ææ |
| | | */ |
| | | @ApiOperation("导åºä½¿ç¨ææ") |
| | | @GetMapping("/exportDeviceImpower") |
| | | public Result exportDeviceImpower(@RequestParam("impowerId") Integer impowerId, HttpServletResponse response) { |
| | | return deviceImpowerService.exportDeviceImpowerDto(impowerId, response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceInspectionRecordDto; |
| | | import com.ruoyi.device.pojo.DeviceInspectionRecord; |
| | | import com.ruoyi.device.service.DeviceInspectionRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ç¹æ£è®°å½è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:25:14 |
| | | */ |
| | | @Api(tags = "设å¤ç¹æ£è®°å½") |
| | | @RestController |
| | | @RequestMapping("/deviceInspectionRecord") |
| | | public class DeviceInspectionRecordController { |
| | | @Resource |
| | | private DeviceInspectionRecordService deviceInspectionRecordService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½ |
| | | */ |
| | | @ApiOperation("å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½") |
| | | @GetMapping("/getDeviceInspectionRecordByPage") |
| | | public Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(Page page, DeviceInspectionRecordDto itemParameter) { |
| | | return deviceInspectionRecordService.getDeviceInspectionRecordByPage(page, itemParameter); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£è¯¦æ
|
| | | */ |
| | | @ApiOperation("æ¥è¯¢ç¹æ£è¯¦æ
") |
| | | @GetMapping("/getDeviceInspectionRecord") |
| | | public Result getDeviceInspectionRecord(Integer inspectionRecordId) { |
| | | return deviceInspectionRecordService.getDeviceInspectionRecord(inspectionRecordId); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ç¹æ£è®°å½ |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | @ApiOperation("æ°å¢è®¾å¤ç¹æ£è®°å½") |
| | | @PostMapping("/addDeviceInspectionRecord") |
| | | public Result addDeviceInspectionRecord(@RequestBody DeviceInspectionRecordDto deviceInspectionRecord) { |
| | | return deviceInspectionRecordService.addDeviceInspectionRecord(deviceInspectionRecord); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ç¹æ£è®°å½ |
| | | */ |
| | | @ApiOperation("ä¿®æ¹è®¾å¤ç¹æ£è®°å½") |
| | | @PostMapping("/updateDeviceInspectionRecord") |
| | | public Result updateDeviceInspectionRecord(@RequestBody DeviceInspectionRecordDto deviceInspectionRecord) { |
| | | return deviceInspectionRecordService.updateInspectionRecordAndDetails(deviceInspectionRecord); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ç¹æ£è®°å½ |
| | | */ |
| | | @ApiOperation("å é¤è®¾å¤ç¹æ£è®°å½") |
| | | @DeleteMapping("/deleteDeviceInspectionRecord") |
| | | public Result deleteDeviceInspectionRecord(DeviceInspectionRecordDto deviceInspectionRecord) { |
| | | return deviceInspectionRecordService.deleteDeviceInspectionRecordOrDetails(deviceInspectionRecord); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 夿 ¸ç¹æ£è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "夿 ¸æ ¸æ¥è®°å½") |
| | | @PostMapping("/reviewDeviceInspectionRecord") |
| | | public Result reviewDeviceInspectionRecord(@RequestBody DeviceInspectionRecordDto deviceExamineRecordDto){ |
| | | return deviceInspectionRecordService.reviewDeviceInspectionRecord(deviceExamineRecordDto); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ç¹æ£è®°å½ |
| | | */ |
| | | @ApiOperation("导åºè®¾å¤ç¹æ£è®°å½") |
| | | @GetMapping("/exportDeviceInspectionRecord") |
| | | public Result exportDeviceInspectionRecord(@RequestParam("inspectionRecordId") Integer inspectionRecordId, HttpServletResponse response) { |
| | | return deviceInspectionRecordService.exportDeviceInspectionRecord(inspectionRecordId, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.dto.DeviceInstructionDto; |
| | | import com.ruoyi.device.dto.DeviceOperationInstructionDto; |
| | | import com.ruoyi.device.pojo.DeviceInstruction; |
| | | import com.ruoyi.device.pojo.OperationInstruction; |
| | | import com.ruoyi.device.service.DeviceInstructionService; |
| | | import com.ruoyi.device.service.DeviceOperationInstructionService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-12-04 10:29:18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/deviceInstruction") |
| | | public class DeviceInstructionController { |
| | | |
| | | @Autowired |
| | | private DeviceInstructionService deviceInstructionService; |
| | | |
| | | @Autowired |
| | | private DeviceOperationInstructionService deviceOperationInstructionService; |
| | | |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦å页") |
| | | @GetMapping("/pageByPageQueryOfHomeworkInstructions") |
| | | public Result<IPage<DeviceOperationInstructionDto>> pageByPageQueryOfHomeworkInstructions(Page page, DeviceOperationInstructionDto operationInstructionDto){ |
| | | return Result.success(deviceInstructionService.pageByPageQueryOfHomeworkInstructions(page, operationInstructionDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦æ°å¢") |
| | | @PostMapping("/newHomeworkGuidebookAdded") |
| | | public Result newHomeworkGuidebookAdded(@RequestBody DeviceInstructionDto instructionDto){ |
| | | deviceInstructionService.newHomeworkGuidebookAdded(instructionDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦è¯¦æ
") |
| | | @GetMapping("/homeworkGuidebookEditor") |
| | | public Result<Map<String, Object>> homeworkGuidebookEditor(Integer instructionId){ |
| | | DeviceInstruction instruction = deviceInstructionService.getById(instructionId); |
| | | List<DeviceOperationInstructionDto> list = deviceOperationInstructionService.homeworkGuidebookEditor(instructionId); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("list", list); |
| | | map.put("instruction", instruction); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦åæ§æä»¶å é¤") |
| | | @DeleteMapping("/deleteHomeworkGuidebook") |
| | | public Result deleteHomeworkGuidebook(String ids){ |
| | | if (ObjectUtils.isNotEmpty(ids)) { |
| | | String[] idArray = ids.split(","); |
| | | deviceOperationInstructionService.removeBatchByIds(Arrays.asList(idArray)); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦å é¤") |
| | | @DeleteMapping("/homeworkGuidebook") |
| | | public Result homeworkGuidebook(String id, String instructionId){ |
| | | // å é¤åè¡¨æ°æ® |
| | | deviceOperationInstructionService.removeById(id); |
| | | // 妿åè¡¨æ°æ®ä¸ºç©º |
| | | long count = deviceOperationInstructionService.count(Wrappers.<OperationInstruction>lambdaQuery() |
| | | .eq(OperationInstruction::getInstructionId, instructionId)); |
| | | // é£ä¹å°±å é¤ç¶è¡¨æ°æ® |
| | | if (count < 1) { |
| | | deviceInstructionService.removeById(id); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦å®¡æ¹") |
| | | @PostMapping("/approvalOfHomeworkInstructionManual") |
| | | public Result approvalOfHomeworkInstructionManual(@RequestBody Map<String,Object> map){ |
| | | Integer id =(Integer) map.get("id"); |
| | | Boolean status =(Boolean) map.get("status"); |
| | | deviceOperationInstructionService.update(Wrappers.<OperationInstruction>lambdaUpdate() |
| | | .eq(OperationInstruction::getId, id) |
| | | .set(OperationInstruction::getStatus, status) |
| | | .set(OperationInstruction::getApproverId, SecurityUtils.getUserId().intValue()) |
| | | .set(OperationInstruction::getEntryIntoForceTime, LocalDateTime.now())); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.device.dto.DeviceMaintenanceDto; |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import com.ruoyi.device.service.DeviceMaintenanceService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * todo: åæ²³æ»¨ |
| | | */ |
| | | @RestController |
| | | @Api(tags = "设å¤ç»´æ¤ä¿å
»") |
| | | @RequestMapping("/deviceMaintain") |
| | | public class DeviceMaintenanceController { |
| | | |
| | | @Autowired |
| | | private DeviceMaintenanceService deviceMaintenanceService; |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | |
| | | /** |
| | | * 设å¤ç»´æ¤å页æ¥è¯¢ |
| | | * @param deviceMaintenance |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "设å¤ç»´æ¤å页æ¥è¯¢") |
| | | @GetMapping("/selectDeviceMaintenancePage") |
| | | public Result selectDeviceMaintenancePage(Page page, DeviceMaintenanceDto deviceMaintenance){ |
| | | return Result.success(deviceMaintenanceService.selectDeviceMaintenancePage(page, deviceMaintenance)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ°å¢ä¿®æ¹è®¾å¤ç»´æ¤ä¿å
» |
| | | * @param deviceMaintenance |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢ä¿®æ¹è®¾å¤ç»´æ¤ä¿å
»") |
| | | @PostMapping("/addDeviceMaintenance") |
| | | public Result addDeviceMaintenance(@RequestBody DeviceMaintenance deviceMaintenance){ |
| | | if (deviceMaintenance.getDeviceId() == null) { |
| | | throw new RuntimeException("缺å°è®¾å¤id"); |
| | | } |
| | | User user = userMapper.selectById(deviceMaintenance.getMaintenanceUserId()); |
| | | deviceMaintenance.setMaintenanceUserName(user.getName()); |
| | | |
| | | return Result.success(deviceMaintenanceService.saveOrUpdate(deviceMaintenance)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä¿®æ¹è®¾å¤ç»´æ¤ä¿å
» |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤ä¿®æ¹è®¾å¤ç»´æ¤ä¿å
»") |
| | | @DeleteMapping("/deleteDeviceMaintenance") |
| | | public Result deleteDeviceMaintenance(Integer id){ |
| | | return Result.success(deviceMaintenanceService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ç»´æ¤ä¿å
» |
| | | */ |
| | | @ApiOperation("导åºè®¾å¤ç»´æ¤ä¿å
»") |
| | | @GetMapping("/exportDeviceMaintenance") |
| | | public void exportDeviceMaintenance(@RequestParam("deviceId") Integer deviceId, HttpServletResponse response) { |
| | | deviceMaintenanceService.exportDeviceMaintenance(deviceId, response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceMaintenancePlanDto; |
| | | import com.ruoyi.device.pojo.DeviceMaintenancePlan; |
| | | import com.ruoyi.device.service.DeviceMaintenancePlanService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:10:52 |
| | | */ |
| | | @Api(tags = "设å¤ä¿å
»è®¡å") |
| | | @RestController |
| | | @RequestMapping("/deviceMaintenancePlan") |
| | | public class DeviceMaintenancePlanController { |
| | | @Resource |
| | | private DeviceMaintenancePlanService deviceMaintenancePlanService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | * @return |
| | | */ |
| | | @ApiOperation("å页æ¥è¯¢è®¾å¤ä¿å
»è®¡å") |
| | | @GetMapping("selectDeviceMaintenancePlanByPage") |
| | | public Result<IPage<DeviceMaintenancePlan>> selectDeviceMaintenancePlanByPage(Page page, DeviceMaintenancePlanDto itemParameter){ |
| | | return deviceMaintenancePlanService.selectDeviceMaintenancePlanByPage(page, itemParameter); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ä¿å
»è®¡å |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @ApiOperation("æ°å¢è®¾å¤ä¿å
»è®¡å") |
| | | @PostMapping("/addMaintenancePlan") |
| | | public Result addMaintenancePlan(@RequestBody DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | return deviceMaintenancePlanService.addMaintenancePlan(deviceMaintenancePlanDto); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ä¿å
»è®¡å |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @ApiOperation("ä¿®æ¹è®¾å¤ä¿å
»è®¡å") |
| | | @PostMapping("/updateMaintenancePlan") |
| | | public Result updateMaintenancePlan(@RequestBody DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | return deviceMaintenancePlanService.updateMaintenancePlan(deviceMaintenancePlanDto); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ä¿å
»è®¡å |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @ApiOperation("å é¤è®¾å¤ä¿å
»è®¡å") |
| | | @DeleteMapping("/deleteMaintenancePlan") |
| | | public Result deleteMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | return deviceMaintenancePlanService.deleteMaintenancePlan(deviceMaintenancePlanDto); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ä¿å
»è®¡å详æ
|
| | | */ |
| | | @ApiOperation("æ¥è¯¢è®¾å¤ä¿å
»è®¡å详æ
") |
| | | @GetMapping("/getMaintenancePlanDetail") |
| | | public Result<DeviceMaintenancePlanDto> getMaintenancePlanDetail(Integer maintenancePlanId) { |
| | | return deviceMaintenancePlanService.getMaintenancePlanDetail(maintenancePlanId); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ä¿å
»è®¡å |
| | | */ |
| | | @ApiOperation("导åºè®¾å¤ä¿å
»è®¡å") |
| | | @GetMapping("/exportDeviceMaintenancePlan") |
| | | public Result exportDeviceMaintenancePlan(@RequestParam("maintenancePlanId") Integer maintenancePlanId, HttpServletResponse response) { |
| | | return deviceMaintenancePlanService.exportDeviceMaintenancePlanDto(maintenancePlanId, response); |
| | | } |
| | | |
| | | /** |
| | | * æäº¤å®¡æ ¸ |
| | | */ |
| | | @ApiOperation("æäº¤å®¡æ ¸") |
| | | @PostMapping("/submitReviewMaintenancePlanStatus") |
| | | public Result submitReviewMaintenancePlanStatus(@RequestBody DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | return deviceMaintenancePlanService.submitReviewMaintenancePlanStatus(deviceMaintenancePlanDto); |
| | | } |
| | | |
| | | /** |
| | | * å®¡æ ¸è®¾å¤ä¿å
»è®¡åç¶æ |
| | | */ |
| | | @ApiOperation("å®¡æ ¸è®¾å¤ä¿å
»è®¡åç¶æ") |
| | | @PostMapping("/reviewMaintenancePlanStatus") |
| | | public Result reviewMaintenancePlanStatus(@RequestBody DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | return deviceMaintenancePlanService.reviewMaintenancePlanStatus(deviceMaintenancePlanDto); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.pojo.DeviceMetric; |
| | | import com.ruoyi.device.service.IDeviceMetricService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/deviceMetrics") |
| | | public class DeviceMetricController { |
| | | |
| | | @Autowired |
| | | private IDeviceMetricService deviceMetricService; |
| | | |
| | | @PostMapping("/saveOrUpdateDeviceMetric") |
| | | public Result create(@RequestBody DeviceMetric deviceMetric) { |
| | | return Result.success(deviceMetricService.saveOrUpdate(deviceMetric)); |
| | | } |
| | | |
| | | @GetMapping("/selectDeviceMetric") |
| | | public Result read(@RequestParam("deviceId") Integer deviceId, @RequestParam("type") String type) { |
| | | return Result.success(deviceMetricService.list(Wrappers.<DeviceMetric>lambdaQuery() |
| | | .eq(DeviceMetric::getDeviceId,deviceId) |
| | | .eq(DeviceMetric::getType,type))); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteDeviceMetrics") |
| | | public Result delete(@RequestParam("id") Integer id) { |
| | | return Result.success(deviceMetricService.removeById(id)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.FileSaveUtil; |
| | | import com.ruoyi.device.dto.DeviceMetricRecordDto; |
| | | import com.ruoyi.device.pojo.DeviceMetricRecord; |
| | | import com.ruoyi.device.pojo.DeviceMetricsCopy; |
| | | import com.ruoyi.device.service.DeviceMetricRecordService; |
| | | import com.ruoyi.device.service.DeviceMetricsCopyService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.Locale; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-27 10:20:01 |
| | | */ |
| | | @Api(tags = "è®¾å¤ - è®¾å¤æ ¡å") |
| | | @RestController |
| | | @RequestMapping("/deviceMetricRecord") |
| | | public class DeviceMetricRecordController { |
| | | |
| | | @Autowired |
| | | private DeviceMetricRecordService deviceMetricRecordService; |
| | | |
| | | @Autowired |
| | | private DeviceMetricsCopyService deviceMetricsCopyService; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceMetricRecord> numberGenerator; |
| | | |
| | | @ApiOperation("è®¾å¤æ ¡åå页æ¥è¯¢") |
| | | @GetMapping("/deviceMetricRecordPage") |
| | | public Result deviceMetricRecordPage(@RequestParam("deviceId") Integer deviceId, Page page, @RequestParam("type") String type) { |
| | | return Result.success(deviceMetricRecordService.page(page, Wrappers.<DeviceMetricRecord>lambdaQuery() |
| | | .eq(DeviceMetricRecord::getDeviceId, deviceId) |
| | | .eq(DeviceMetricRecord::getType, type))); |
| | | } |
| | | |
| | | @ApiOperation("è®¾å¤æ ¡å æ°å¢ æ´æ°") |
| | | @PostMapping("/addOrUpdateDeviceMetricRecord") |
| | | public Result addOrUpdateDeviceMetricRecord(@RequestBody DeviceMetricRecordDto deviceMetricRecordDto) { |
| | | if (ObjectUtils.isEmpty(deviceMetricRecordDto.getProcessNumber())) { |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | | String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date()); |
| | | String processNumber = numberGenerator.generateNumberWithPrefix(5, "SBJZ" + year + month, DeviceMetricRecord::getProcessNumber); |
| | | deviceMetricRecordDto.setProcessNumber(processNumber); |
| | | } |
| | | deviceMetricRecordService.saveOrUpdate(deviceMetricRecordDto); |
| | | if (CollectionUtils.isNotEmpty(deviceMetricRecordDto.getDeviceMetricsCopyList())) { |
| | | deviceMetricRecordDto.getDeviceMetricsCopyList().forEach(i -> i.setDeviceMetricsId(deviceMetricRecordDto.getId())); |
| | | deviceMetricsCopyService.saveOrUpdateBatch(deviceMetricRecordDto.getDeviceMetricsCopyList()); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("è®¾å¤æ ¡å å é¤") |
| | | @DeleteMapping("/deleteDeviceMetricRecord") |
| | | public Result deleteDeviceMetricRecord(@RequestParam("id") Integer id) { |
| | | DeviceMetricRecord deviceMetricRecord = deviceMetricRecordService.getById(id); |
| | | deviceMetricsCopyService.remove(Wrappers.<DeviceMetricsCopy>lambdaQuery() |
| | | .eq(DeviceMetricsCopy::getDeviceMetricsId, id)); |
| | | // å 餿件 |
| | | FileSaveUtil.DeleteFile(deviceMetricRecord.getSystemFileName()); |
| | | return Result.success(deviceMetricRecordService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation("è®¾å¤æ ¡å æ ¡åæ¡ç®æ¥è¯¢") |
| | | @GetMapping("/showDeviceMetricsCopy") |
| | | public Result showDeviceMetricsCopy(@RequestParam("id") Integer id, @RequestParam("type") String type) { |
| | | return Result.success(deviceMetricsCopyService.list(Wrappers.<DeviceMetricsCopy>lambdaQuery() |
| | | .eq(DeviceMetricsCopy::getDeviceMetricsId, id) |
| | | .eq(DeviceMetricsCopy::getType, type))); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.device.pojo.DeviceRecord; |
| | | import com.ruoyi.device.service.DeviceRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 11:06:47 |
| | | */ |
| | | @Api(tags = "设å¤ä½¿ç¨è®°å½") |
| | | @RestController |
| | | @RequestMapping("/deviceRecord") |
| | | public class DeviceRecordController { |
| | | @Autowired |
| | | private DeviceRecordService deviceRecordService; |
| | | |
| | | @ApiOperation(value = "å¤ä½¿ç¨è®°å½æ¥è¯¢") |
| | | @GetMapping("/deviceRecordPage") |
| | | public Result deviceRecordPage(Integer deviceId, Page page, String sampleCode, String managementNumber) { |
| | | return Result.success(deviceRecordService.deviceRecordPage(deviceId, page, sampleCode, managementNumber)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢") |
| | | @PostMapping("/saveDeviceRecord") |
| | | public Result saveDeviceRecords(@RequestBody DeviceRecord deviceRecord) { |
| | | return Result.success(deviceRecordService.save(deviceRecord)); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾è®¾å¤ä½¿ç¨è®°å½ |
| | | * @param deviceRecord |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "ä¿®æ¹") |
| | | @PostMapping("/updateDeviceRecord") |
| | | public Result updateDeviceRecord(@RequestBody DeviceRecord deviceRecord) { |
| | | return Result.success(deviceRecordService.updateById(deviceRecord)); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteDeviceRecord") |
| | | public Result deleteDeviceRecords(@RequestParam("id") Integer id) { |
| | | return Result.success(deviceRecordService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "设å¤ä½¿ç¨è®°å½å¯¼åº") |
| | | @GetMapping("/exportUseRecord") |
| | | public void exportUseRecord(Integer deviceId, String exportDate, HttpServletResponse response){ |
| | | deviceRecordService.exportUseRecord(deviceId, exportDate, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.pojo.DeviceScrapped; |
| | | import com.ruoyi.device.service.DeviceScrappedService; |
| | | 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-12-17 01:53:47 |
| | | */ |
| | | @Api(tags = "è®¾å¤æ¥åºç³è¯·è¡¨") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceScrapped") |
| | | public class DeviceScrappedController { |
| | | |
| | | private DeviceScrappedService deviceScrappedService; |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ¥åºç³è¯·å表 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ¥åºç³è¯·å表") |
| | | @GetMapping("/pageDeviceScrapped") |
| | | public Result<IPage<DeviceScrapped>> pageDeviceScrapped(Page page, DeviceScrapped deviceScrapped) { |
| | | return Result.success(deviceScrappedService.pageDeviceScrapped(page, deviceScrapped)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ¥åºç³è¯· |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤æ¥åºç³è¯·") |
| | | @GetMapping("/getDeviceScrapped") |
| | | public Result getDeviceScrapped(Integer scrappedId){ |
| | | return Result.success(deviceScrappedService.getById(scrappedId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤æ¥åºç³è¯·") |
| | | @DeleteMapping("/delDeviceScrapped") |
| | | public Result delDeviceScrapped(Integer scrappedId){ |
| | | return Result.success(deviceScrappedService.removeById(scrappedId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ¥åºç³è¯· |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ¥åºç³è¯·") |
| | | @PostMapping("/addDeviceScrapped") |
| | | public Result addDeviceScrapped(@RequestBody DeviceScrapped deviceScrapped){ |
| | | return Result.success(deviceScrappedService.addDeviceScrapped(deviceScrapped)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ¥åºç³è¯· |
| | | */ |
| | | @ApiOperation("导åºè®¾å¤æ¥åºç³è¯·") |
| | | @GetMapping("/exportDeviceScrapped") |
| | | public Result exportDeviceScrapped(Integer scrappedId, HttpServletResponse response) { |
| | | return deviceScrappedService.exportDeviceScrapped(scrappedId, response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.device.dto.DeviceStateDto; |
| | | import com.ruoyi.device.excel.DeviceStateExport; |
| | | import com.ruoyi.device.pojo.DeviceState; |
| | | import com.ruoyi.device.service.DeviceStateService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤åç¨/å¯ç¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/deviceState") |
| | | public class DeviceStateController { |
| | | |
| | | @Autowired |
| | | private DeviceStateService deviceStateService; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceState> numberGenerator; |
| | | |
| | | @PostMapping("saveDeviceState") |
| | | public Result saveIncidentReportData(@RequestBody DeviceState deviceState) { |
| | | if (ObjectUtils.isEmpty(deviceState.getProcessNumber())) { |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | | String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date()); |
| | | String processNumber = numberGenerator.generateNumberWithPrefix(3, "DG-TC-23FM " + month + "-" + year + month, DeviceState::getProcessNumber); |
| | | deviceState.setProcessNumber(processNumber); |
| | | } |
| | | deviceStateService.saveOrUpdate(deviceState); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @GetMapping("/getDeviceStatePage") |
| | | public Result getDeviceStatePage(@RequestParam("deviceId") Integer deviceId, Page page, String processNumber){ |
| | | return Result.success(deviceStateService.getDeviceStatePage(deviceId, page, processNumber)); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteDeviceState") |
| | | public Result deleteDeviceState(@RequestParam("stateId") Integer stateId){ |
| | | return Result.success(deviceStateService.removeById(stateId)); |
| | | } |
| | | |
| | | @GetMapping("/deviceStateExport") |
| | | public Result deviceStateExport(@RequestParam("deviceId") Integer deviceId, String processNumber, HttpServletResponse response) throws Exception { |
| | | IPage<DeviceStateDto> deviceBorrows = deviceStateService.getDeviceStatePage(deviceId, new Page<>(-1, -1), processNumber); |
| | | List<DeviceStateExport> studentList = JSONObject.parseArray(JSON.toJSONString(deviceBorrows.getRecords()), DeviceStateExport.class); |
| | | response.setHeader("requestType", "excel"); |
| | | response.setHeader("Access-Control-Expose-Headers", "requestType"); |
| | | // 设置åå
æ ¼æ ·å¼ |
| | | // ä¿åå°ç¬¬ä¸ä¸ªsheetä¸ |
| | | EasyExcel.write(response.getOutputStream()) |
| | | .head(DeviceStateExport.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet("sheet") |
| | | .doWrite(studentList); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "设å¤å¯å¨/忢坼åº") |
| | | @GetMapping("/exportDeviceStatus") |
| | | public void exportDeviceStatus(@RequestParam("processNumber") String processNumber,@RequestParam("deviceId") Integer deviceId, HttpServletResponse response) throws Exception { |
| | | deviceStateService.exportDeviceStatus(deviceId, processNumber, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceTraceabilityManagementDto; |
| | | import com.ruoyi.device.pojo.DeviceTraceabilityManagement; |
| | | import com.ruoyi.device.service.DeviceTraceabilityManagementService; |
| | | 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-12-20 02:27:44 |
| | | */ |
| | | @Api(tags = "设å¤é弿º¯æºè®¡å") |
| | | @RestController |
| | | @RequestMapping("/deviceTraceabilityManagement") |
| | | public class DeviceTraceabilityManagementController { |
| | | @Resource |
| | | private DeviceTraceabilityManagementService deviceTraceabilityManagementService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢é弿º¯æºè®¡å |
| | | * @return |
| | | */ |
| | | @ApiOperation("å页æ¥è¯¢é弿º¯æºè®¡å") |
| | | @GetMapping("selectDeviceTraceabilityManagementByPage") |
| | | public Result<IPage<DeviceTraceabilityManagement>> selectDeviceTraceabilityManagementByPage(Page page, DeviceTraceabilityManagementDto itemParameter){ |
| | | return deviceTraceabilityManagementService.selectDeviceTraceabilityManagementByPage(page, itemParameter); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢é弿º¯æºè®¡å |
| | | * @param deviceTraceabilityManagementDto é弿º¯æºè®¡å |
| | | */ |
| | | @ApiOperation("æ°å¢é弿º¯æºè®¡å") |
| | | @PostMapping("/addTraceabilityManagement") |
| | | public Result addTraceabilityManagement(@RequestBody DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | return deviceTraceabilityManagementService.addTraceabilityManagement(deviceTraceabilityManagementDto); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹é弿º¯æºè®¡å |
| | | * @param deviceTraceabilityManagementDto é弿º¯æºè®¡å |
| | | */ |
| | | @ApiOperation("ä¿®æ¹é弿º¯æºè®¡å") |
| | | @PostMapping("/updateTraceabilityManagement") |
| | | public Result updateTraceabilityManagement(@RequestBody DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | return deviceTraceabilityManagementService.updateTraceabilityManagement(deviceTraceabilityManagementDto); |
| | | } |
| | | |
| | | /** |
| | | * å é¤é弿º¯æºè®¡å |
| | | * @param deviceTraceabilityManagementDto é弿º¯æºè®¡å |
| | | */ |
| | | @ApiOperation("å é¤é弿º¯æºè®¡å") |
| | | @DeleteMapping("/deleteTraceabilityManagement") |
| | | public Result deleteTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | return deviceTraceabilityManagementService.deleteTraceabilityManagement(deviceTraceabilityManagementDto); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢é弿º¯æºè®¡å详æ
|
| | | */ |
| | | @ApiOperation("æ¥è¯¢é弿º¯æºè®¡å详æ
") |
| | | @GetMapping("/getTraceabilityManagementDetail") |
| | | public Result<DeviceTraceabilityManagementDto> getTraceabilityManagementDetail(Integer traceabilityManagementId) { |
| | | return deviceTraceabilityManagementService.getTraceabilityManagementDetail(traceabilityManagementId); |
| | | } |
| | | |
| | | /** |
| | | * æäº¤æ¹å |
| | | */ |
| | | @ApiOperation("æäº¤æ¹å") |
| | | @PostMapping("/submitReviewTraceabilityManagementStatus") |
| | | public Result submitReviewTraceabilityManagementStatus(@RequestBody DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | return deviceTraceabilityManagementService.submitReviewTraceabilityManagementStatus(deviceTraceabilityManagementDto); |
| | | } |
| | | |
| | | /** |
| | | * é弿º¯æºè®¡åæ¹å |
| | | */ |
| | | @ApiOperation("é弿º¯æºè®¡åæ¹å") |
| | | @PostMapping("/reviewTraceabilityManagementStatus") |
| | | public Result reviewTraceabilityManagementStatus(@RequestBody DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | return deviceTraceabilityManagementService.reviewTraceabilityManagementStatus(deviceTraceabilityManagementDto); |
| | | } |
| | | |
| | | /** |
| | | * 导åºé弿º¯æºè®¡å |
| | | */ |
| | | @ApiOperation("导åºé弿º¯æºè®¡å") |
| | | @GetMapping("/exportDeviceTraceabilityManagement") |
| | | public Result exportDeviceTraceabilityManagement(@RequestParam("traceabilityManagementId") Integer traceabilityManagementId, HttpServletResponse response) { |
| | | return deviceTraceabilityManagementService.exportDeviceTraceabilityManagementDto(traceabilityManagementId, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DataConfig; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class DataConfigDto { |
| | | |
| | | private List<DataConfig> dataConfigList; |
| | | |
| | | private Boolean isDevice; |
| | | |
| | | @ApiModelProperty("æä»¶åç¼") |
| | | private String fileType; |
| | | |
| | | @ApiModelProperty("ééå°å") |
| | | private String collectUrl; |
| | | |
| | | @ApiModelProperty("åå¨å°å") |
| | | private String storageUrl; |
| | | |
| | | @ApiModelProperty("设å¤IP") |
| | | private String ip; |
| | | |
| | | @ApiModelProperty("æ°é-å§æåæ®µ") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("æ°é-æ ·ååæ®µ") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("æ°é-dbï¼mdbæä»¶åç§°") |
| | | private String dbFileName; |
| | | |
| | | @ApiModelProperty("设å¤ID") |
| | | private Integer deviceId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceAccidentReport; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-18 ææä¸ 10:00:48 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceAccidentReportDto extends DeviceAccidentReport { |
| | | @ApiModelProperty("æ¶é´") |
| | | private String accidentDateStr; |
| | | |
| | | @ApiModelProperty("æ¥åäººå¡«åæ¶é´") |
| | | private String reportDateStr; |
| | | |
| | | @ApiModelProperty("è¯ä¼°äººå¡«åæ¶é´") |
| | | private String assessorDateStr; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººå¡«åæ¶é´") |
| | | private String departmentHeadDateStr; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äººå¡«åæ¶é´") |
| | | private String technicalDirectorDateStr; |
| | | |
| | | @ApiModelProperty("䏻任填忶é´") |
| | | private String directorHeadDateStr; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é维修表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 04:50:57 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_breakdown_maintenance") |
| | | @ApiModel(value = "DeviceBreakdownMaintenance对象", description = "è®¾å¤æ
é维修表") |
| | | public class DeviceBreakdownMaintenance { |
| | | |
| | | @TableId(value = "maintenance_id", type = IdType.AUTO) |
| | | private Integer maintenanceId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("å®è£
å°å") |
| | | private String location; |
| | | |
| | | @ApiModelProperty("æåææ
éæ
åµ") |
| | | private String damageOrMalfunction; |
| | | |
| | | @ApiModelProperty("ç³è¯·äººid") |
| | | private Integer applicantUserId; |
| | | |
| | | @ApiModelProperty("ç³è¯·äºº") |
| | | private String applicantUser; |
| | | |
| | | @ApiModelProperty("è¦æ±ä¿®å¤æ¶é´") |
| | | private LocalDate repairDate; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººæè§") |
| | | private String departmentHeadOpinion; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººid") |
| | | private Integer departmentHeadUserId; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äºº") |
| | | private String departmentHeadUser; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººå¡«åæ¶é´") |
| | | private LocalDate departmentHeadDate; |
| | | |
| | | @ApiModelProperty("维修记äº") |
| | | private String maintenanceRecord; |
| | | |
| | | @ApiModelProperty("维修人") |
| | | private String maintenanceUser; |
| | | |
| | | @ApiModelProperty("ç»´ä¿®æ¶é´") |
| | | private LocalDate maintenanceDate; |
| | | |
| | | @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:维修记äº") |
| | | private Integer flowType; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceCalibrationPlanDetail; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-17 ææäº 10:05:08 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceCalibrationPlanDetailDto extends DeviceCalibrationPlanDetail { |
| | | |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | @ApiModelProperty("æè¿æ£å®æ¶é´Str") |
| | | private String lastDateStr; |
| | | @ApiModelProperty("æ¬å¹´è®¡åæ ¡åæ¶é´Str") |
| | | private String planDateStr; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceCalibrationPlan; |
| | | import com.ruoyi.device.pojo.DeviceCalibrationPlanDetail; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/16 |
| | | */ |
| | | @Data |
| | | public class DeviceCalibrationPlanDto extends DeviceCalibrationPlan { |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private String writeName; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private String ratifyName; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | private String writeTimeStr; |
| | | |
| | | @ApiModelProperty("æ¹åæ¶é´") |
| | | private String ratifyTimeStr; |
| | | |
| | | @ApiModelProperty("æ ¡å计å详æ
") |
| | | private List<DeviceCalibrationPlanDetail> calibrationPlanDetailList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设å¤éé对象 |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2024/12/3 |
| | | */ |
| | | @Data |
| | | public class DeviceCollectionDto { |
| | | |
| | | @ApiModelProperty(value = "æ ·åid") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "订åç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty(value = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty(value = "ééçæ£éªé¡¹id") |
| | | private List<Integer> itemIds; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceConfigDtoPage{ |
| | | |
| | | @ApiModelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty(value = "åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "æä»¶åç¼") |
| | | private String fileType; |
| | | |
| | | @ApiModelProperty(value = "ééå°å") |
| | | private String collectUrl; |
| | | |
| | | @ApiModelProperty(value = "åå¨å°å") |
| | | private String storageUrl; |
| | | |
| | | @ApiModelProperty(value = "IPå°å") |
| | | private String ip; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹åç±»") |
| | | private String inspectionItemClass; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹å项") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @ApiModelProperty(value = "å
¬å¼") |
| | | private String formula; |
| | | |
| | | @ApiModelProperty(value = "åç
§X") |
| | | private String referx; |
| | | |
| | | @ApiModelProperty(value = "X") |
| | | private String x; |
| | | |
| | | @ApiModelProperty(value = "åç
§Y") |
| | | private String refery; |
| | | |
| | | |
| | | @ApiModelProperty(value = "Y") |
| | | private String y; |
| | | |
| | | @ApiModelProperty(value = "å«å") |
| | | private String anotherName; |
| | | |
| | | @ApiModelProperty(value = "å¹é
åç§°") |
| | | private String matchingName; |
| | | |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "æ£éªå¯¹è±¡") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹ç®id") |
| | | private Integer structureItemParameterId; |
| | | |
| | | @ApiModelProperty("æ°é-å§æåæ®µ") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("æ°é-æ ·ååæ®µ") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("æ°é-dbï¼mdbæä»¶åç§°") |
| | | private String dbFileName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class DeviceDto extends Device { |
| | | |
| | | @ApiModelProperty(value = "管ç人") |
| | | private String equipmentManagerUser; |
| | | |
| | | @ApiModelProperty(value = "æå±é¨é¨") |
| | | @JsonInclude(JsonInclude.Include.NON_NULL) |
| | | private String laboratoryName; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹ç®") |
| | | private String insProductItem; |
| | | |
| | | @ApiModelProperty(value = "管ç人å§å") |
| | | private String equipmentManagerName; |
| | | |
| | | @ApiModelProperty(value = "被ææäººå§å") |
| | | private String authorizedPersonName; |
| | | |
| | | @ApiModelProperty(value = "æ ¸åè¯ä¹¦ç¼å·") |
| | | private String calibrateNo; |
| | | |
| | | @ApiModelProperty(value = "æè¿æ ¡åæ¥æ") |
| | | private LocalDateTime lastCalibrationDateTwo; |
| | | |
| | | @ApiModelProperty(value = "䏿¬¡æ ¡åæ¥æ") |
| | | private LocalDateTime nextCalibrationDateTwo; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceExaminePlanDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-17 ææäº 15:34:44 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceExaminePlanDetailsDto extends DeviceExaminePlanDetails { |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | |
| | | @ApiModelProperty("è®°å½ç¶æ, 0: æªå¼å§, 1:å¾
æ¹å, 2:éè¿, 3:ä¸éè¿") |
| | | private Integer recordStatus; |
| | | |
| | | @ApiModelProperty("对æ¯ç¶æ, 0: æªå¼å§, 1:å¾
æ¹å, 2:éè¿, 3:ä¸éè¿") |
| | | private Integer recordContrastStatus; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceExaminePlan; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlanDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/16 |
| | | */ |
| | | @Data |
| | | public class DeviceExaminePlanDto extends DeviceExaminePlan { |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private String writeName; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private String ratifyName; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | private String writeTimeStr; |
| | | |
| | | @ApiModelProperty("æ¹åæ¶é´") |
| | | private String ratifyTimeStr; |
| | | |
| | | @ApiModelProperty("年度") |
| | | private String year; |
| | | |
| | | private List<DeviceExaminePlanDetails> examinePlanDetailsList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordContrastDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-17 ææäº 13:59:37 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceExamineRecordContrastDetailsDto extends DeviceExamineRecordContrastDetails { |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordContrast; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordContrastDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/16 |
| | | */ |
| | | @Data |
| | | public class DeviceExamineRecordContrastDto extends DeviceExamineRecordContrast { |
| | | |
| | | @ApiModelProperty("æ ¸æ¥è®°å½å¯¹æ¯è¯¦æ
") |
| | | private List<DeviceExamineRecordContrastDetails> recordContrastDetailsList; |
| | | |
| | | |
| | | @ApiModelProperty("A设å¤åç§°") |
| | | private String aDeviceName; |
| | | |
| | | @ApiModelProperty("A设å¤ç¼å·") |
| | | private String aDeviceNumber; |
| | | |
| | | @ApiModelProperty("b设å¤åç§°") |
| | | private String bDeviceName; |
| | | |
| | | @ApiModelProperty("b设å¤ç¼å·") |
| | | private String bDeviceNumber; |
| | | |
| | | @ApiModelProperty("c设å¤åç§°") |
| | | private String cDeviceName; |
| | | |
| | | @ApiModelProperty("c设å¤ç¼å·") |
| | | private String cDeviceNumber; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¥æ") |
| | | private String checkerTimeStr; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private String reviewTimeStr; |
| | | |
| | | @ApiModelProperty("å®éªå®¤") |
| | | private String labName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceExamineRecord; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordDetail; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/16 |
| | | */ |
| | | @Data |
| | | public class DeviceExamineRecordDto extends DeviceExamineRecord { |
| | | |
| | | @ApiModelProperty("æ ¸æ¥è®°å½è¯¦æ
") |
| | | private List<DeviceExamineRecordDetail> recordDetailList; |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("æå䏿¬¡ä¿®æ¹æ¥æ") |
| | | private String updateTimeStr; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.Device; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-10 ææäº 15:55:29 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceExport extends Device { |
| | | @ApiModelProperty("管ç人") |
| | | private String equipmentManagerName; |
| | | |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceImpowerDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2025/4/17 |
| | | */ |
| | | @Data |
| | | public class DeviceImpowerDetailsDto extends DeviceImpowerDetails { |
| | | |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤åå·") |
| | | private String specificationModel; |
| | | |
| | | @ApiModelProperty("仪å¨ç¼å·") |
| | | private String managementNumber; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceImpower; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2025/4/17 |
| | | */ |
| | | @Data |
| | | public class DeviceImpowerDto extends DeviceImpower { |
| | | |
| | | @ApiModelProperty("详æ
") |
| | | private List<DeviceImpowerDetailsDto> deviceImpowerDetails; |
| | | |
| | | @ApiModelProperty("æææ¥æä¸æ") |
| | | private String auditDateCH; |
| | | |
| | | @ApiModelProperty("æææ¥æè±æ") |
| | | private String auditDateEN; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.device.pojo.DeviceInspectionRecord; |
| | | import com.ruoyi.device.pojo.DeviceInspectionRecordDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-16 ææä¸ 17:23:22 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceInspectionRecordDto extends DeviceInspectionRecord { |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("æµè¯è¯¦æ
å
容") |
| | | private List<DeviceInspectionRecordDetails> details; |
| | | |
| | | @ApiModelProperty("æµè¯æ¶é´") |
| | | private String testDateString; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceInstruction; |
| | | import com.ruoyi.device.pojo.OperationInstruction; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class DeviceInstructionDto extends DeviceInstruction { |
| | | |
| | | private List<OperationInstruction> feTempHumRecordList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2025/4/17 |
| | | */ |
| | | @Data |
| | | public class DeviceMaintenanceDto extends DeviceMaintenance { |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String managementNumber; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceMaintenancePlanDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-17 ææäº 9:26:48 |
| | | * Description: 设å¤ä¿å
»è®¡å详æ
|
| | | */ |
| | | @Data |
| | | public class DeviceMaintenancePlanDetailsDto extends DeviceMaintenancePlanDetails { |
| | | |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤åå·") |
| | | private String specificationModel; |
| | | |
| | | @ApiModelProperty("仪å¨ç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ApiModelProperty("å½å±å®éªå®¤") |
| | | private String storagePoint; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.device.pojo.DeviceMaintenancePlan; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-16 ææä¸ 18:26:59 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceMaintenancePlanDto extends DeviceMaintenancePlan { |
| | | |
| | | @ApiModelProperty("设å¤ä¿å
»è®¡å详æ
") |
| | | @TableField(exist = false) |
| | | private List<DeviceMaintenancePlanDetailsDto> deviceMaintenancePlanDetails; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¥æ") |
| | | private String datePreparationStr; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private String auditDateStr; |
| | | |
| | | @ApiModelProperty("设å¤Id") |
| | | private Integer deviceId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-13 ææäº 10:43:06 |
| | | * Description: 仪å¨è®¾å¤æ¡£æ¡å¡ä¸æ¾ç¤ºçè®¾å¤æ ¡åè®°å½åç»´æ¤è®°å½çå表对象 |
| | | */ |
| | | @Data |
| | | public class DeviceMetricRecordAndMaintenanceDto { |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | |
| | | // æ ¡å表ä¸çæ°æ® |
| | | @ApiModelProperty("æ ¡åæ¥æ") |
| | | private String calibrationDateString; |
| | | |
| | | @ApiModelProperty("è¯ä¹¦æ å·") |
| | | private String certificateNumber; |
| | | |
| | | @ApiModelProperty("æ ¡åæææ¥æ") |
| | | private String validityDateString; |
| | | |
| | | @ApiModelProperty("å¤å®") |
| | | private String judgement; |
| | | |
| | | // 维修记å½è¡¨ä¸çæ°æ® |
| | | @ApiModelProperty("ç»´ä¿®æ¥æ") |
| | | private String maintenanceDateString; |
| | | |
| | | @ApiModelProperty("å¤çæ¹å¼") |
| | | private String handlingMethod; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String comments; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceMetricRecord; |
| | | import com.ruoyi.device.pojo.DeviceMetricsCopy; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class DeviceMetricRecordDto extends DeviceMetricRecord { |
| | | |
| | | private List<DeviceMetricsCopy> deviceMetricsCopyList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.OperationInstruction; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceOperationInstructionDto extends OperationInstruction { |
| | | @ApiModelProperty("ç³è¯·ç¼å·") |
| | | private String applicationNumber; |
| | | |
| | | @ApiModelProperty("ç³è¯·é¨é¨") |
| | | private String applicationDepartment; |
| | | |
| | | @ApiModelProperty("责任人") |
| | | private String personLiable; |
| | | |
| | | @ApiModelProperty("åæ§ç³è¯·è¯´æ") |
| | | private String controlledApplicationDescription; |
| | | |
| | | @ApiModelProperty("管çç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private String deviceModel; |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("ä¸ä¼ 人") |
| | | private String uploaderName; |
| | | |
| | | @ApiModelProperty("审æ¹äºº") |
| | | private String approverName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceRecord; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceRecordDto extends DeviceRecord { |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String managementNumber; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceScrapped; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-17 ææäº 18:34:17 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceScrappedDto extends DeviceScrapped { |
| | | |
| | | @ApiModelProperty("ç³è¯·æ¶é´") |
| | | private String applicantDateStr; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººå¡«åæ¶é´") |
| | | private String departmentHeadDateStr; |
| | | |
| | | @ApiModelProperty("计éå®¤äººå¡«åæ¶é´") |
| | | private String meteringRoomDateStr; |
| | | |
| | | @ApiModelProperty("æ¹åäººå¡«åæ¶é´") |
| | | private String approverDateStr; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceState; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceStateDto extends DeviceState { |
| | | @ApiModelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | @ApiModelProperty(value = "管çç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ApiModelProperty(value = "æä½æ¥æ yyyy-MM-dd") |
| | | private String submitDateString; |
| | | |
| | | @ApiModelProperty("è´è´£äººå®¡æ¹æ¥æ yyyy-MM-dd") |
| | | private String departmentDateString; |
| | | |
| | | @ApiModelProperty("计éå®¤å®¡æ¹æ¥æ yyyy-MM-dd") |
| | | private String measuringRoomDateString; |
| | | |
| | | @ApiModelProperty("æ¹åæ¥æ yyyy-MM-dd") |
| | | private String approvalDateString; |
| | | |
| | | @ApiModelProperty(value = "设å¤ç±»å") |
| | | private String largeCategory; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceTraceabilityManagementDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-20 ææäº 15:05:02 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceTraceabilityManagementDetailsDto extends DeviceTraceabilityManagementDetails { |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤åå·") |
| | | private String specificationModel; |
| | | |
| | | @ApiModelProperty("仪å¨ç¼å·") |
| | | private String managementNumber; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceTraceabilityManagement; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-20 ææäº 14:30:45 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceTraceabilityManagementDto extends DeviceTraceabilityManagement { |
| | | |
| | | @ApiModelProperty("设å¤é弿º¯æºè®¡å详æ
") |
| | | private List<DeviceTraceabilityManagementDetailsDto> deviceTraceabilityManagementDetails; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¥æ") |
| | | private String datePreparationStr; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private String auditDateStr; |
| | | |
| | | @ApiModelProperty("设å¤Id") |
| | | private Integer deviceId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-13 ææäº 8:45:34 |
| | | * Description: ç¨äºä»ªå¨è®¾å¤æ¡£æ¡å¡çå¯¼åº |
| | | */ |
| | | @Data |
| | | public class DocumentExportWordDto { |
| | | |
| | | // è®¾å¤æ¡£æ¡å·¦å表 |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index1; |
| | | |
| | | @ApiModelProperty("æ¡£æ¡åç§°") |
| | | private String name1; |
| | | |
| | | @ApiModelProperty("份æ°") |
| | | private Integer quantity1; |
| | | |
| | | @ApiModelProperty("页ç ") |
| | | private Integer pageCount1; |
| | | |
| | | @ApiModelProperty("彿¡£æ¥æ") |
| | | private String archiveDateString1; |
| | | |
| | | // è®¾å¤æ¡£æ¡å³å表 |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index2; |
| | | |
| | | @ApiModelProperty("æ¡£æ¡åç§°") |
| | | private String name2; |
| | | |
| | | @ApiModelProperty("份æ°") |
| | | private Integer quantity2; |
| | | |
| | | @ApiModelProperty("页ç ") |
| | | private Integer pageCount2; |
| | | |
| | | @ApiModelProperty("彿¡£æ¥æ") |
| | | private String archiveDateString2; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceMaintenanceExport { |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("æµç¨ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("管çç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ColumnWidth(50) |
| | | @ExcelProperty("ç»´æ¤å
容") |
| | | private String content; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("ç»´æ¤æ¶é´") |
| | | private String date; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("䏿¬¡ç»´æ¤æ¶é´") |
| | | private String nextDate; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("ç»´æ¤ç±»å") |
| | | private String maintenanceType; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("ç»´æ¤äºº") |
| | | private String name; |
| | | |
| | | @ColumnWidth(50) |
| | | @ExcelProperty("夿³¨") |
| | | private String comments; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.excel; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceRecord; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-10 ææäº 17:19:22 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceRecordExportWord extends DeviceRecord { |
| | | @ApiModelProperty("使ç¨å0ä»£è¡¨ä¸æ£å¸¸1代表æ£å¸¸") |
| | | private String useBeforeString; |
| | | |
| | | @ApiModelProperty("使ç¨å0ä»£è¡¨ä¸æ£å¸¸1代表æ£å¸¸") |
| | | private String useAfterString; |
| | | |
| | | @ApiModelProperty("æä½æ¶é´ String yyyy-MM-dd") |
| | | private String operationDate; |
| | | |
| | | @ApiModelProperty("使ç¨å¼å§æ¥æ String yyyy-MM-dd \n HH:mm:ss") |
| | | private String useStartDateString; |
| | | |
| | | @ApiModelProperty("使ç¨ç»ææ¥æ String yyyy-MM-dd \n HH:mm:ss") |
| | | private String useEndDateString; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class DeviceStateExport { |
| | | @ExcelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ExcelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | @ExcelProperty(value = "管çç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ExcelProperty("设å¤ç¶æ") |
| | | private String deviceStatus; |
| | | |
| | | @ExcelProperty("åç¨å¯ç¨çç±") |
| | | private String reason; |
| | | |
| | | @ExcelProperty("æäº¤äºº") |
| | | private String createUser; |
| | | |
| | | @ExcelProperty("æäº¤æ¥æ") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ExcelProperty("å½åç¶æ") |
| | | private String currentState; |
| | | |
| | | @ExcelProperty("å½åè´è´£äºº") |
| | | private String currentResponsible; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.excel.upload; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/20 |
| | | */ |
| | | @Data |
| | | public class DeviceCalibrationPlanDetailUpload { |
| | | |
| | | @ApiModelProperty("设å¤åç§°ååå·") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ°é") |
| | | private String deviceAmount; |
| | | |
| | | @ApiModelProperty("仪å¨ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("æ£å®åä½") |
| | | private String verificationUnit; |
| | | |
| | | @ApiModelProperty("æ£å®å¨æ") |
| | | private String verificationCycles; |
| | | |
| | | @ApiModelProperty("æè¿æ£å®æ¶é´") |
| | | private String lastDate; |
| | | |
| | | @ApiModelProperty("æ¬å¹´è®¡åæ ¡åæ¶é´") |
| | | private String planDate; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.excel.upload; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/20 |
| | | */ |
| | | @Data |
| | | public class DeviceExaminePlanUpload { |
| | | |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¶é´") |
| | | private String checkTime; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥ææ ") |
| | | private String checkIndex; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¹æ³") |
| | | private String checkMethod; |
| | | |
| | | @ApiModelProperty("ç»æå¦ä½å¤å®") |
| | | private String howResults; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥è´£ä»»äºº") |
| | | private String checkChargerUser; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.pojo.CollectBridge; |
| | | |
| | | /** |
| | | * æ°åçµæ¡¥éé |
| | | * |
| | | * @author zhuo |
| | | * @since 2025-02-19 |
| | | */ |
| | | public interface CollectBridgeMapper extends BaseMapper<CollectBridge> { |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.dto.DeviceConfigDtoPage; |
| | | import com.ruoyi.device.pojo.DataConfig; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-07-13 12:23:00 |
| | | */ |
| | | public interface DataConfigMapper extends BaseMapper<DataConfig> { |
| | | |
| | | List<DeviceConfigDtoPage> selectDataConfigList(Integer deviceId); |
| | | |
| | | List<Integer> deleteDataConfig(); |
| | | |
| | | /** |
| | | * æ¥è¯¢äºç»å®ä½æ¯æ²¡æé
ç½®çæ£éªé¡¹ |
| | | * @param deviceId |
| | | * @return |
| | | */ |
| | | IPage<DataConfig> getNoConfigProduct(@Param("page") Page page, @Param("deviceId") Integer deviceId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.pojo.DeviceAcceptanceFile; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤)é件表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:26 |
| | | */ |
| | | public interface DeviceAcceptanceFileMapper extends BaseMapper<DeviceAcceptanceFile> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.pojo.DeviceAcceptance; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤) Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:14 |
| | | */ |
| | | public interface DeviceAcceptanceMapper extends BaseMapper<DeviceAcceptance> { |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceAcceptance> pageDeviceAcceptance(Page page, @Param("ew") QueryWrapper<DeviceAcceptance> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceAccidentReportDto; |
| | | import com.ruoyi.device.pojo.DeviceAccidentReport; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤äºæ
æ¥åå Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 06:31:12 |
| | | */ |
| | | public interface DeviceAccidentReportMapper extends BaseMapper<DeviceAccidentReport> { |
| | | |
| | | /** |
| | | * 设å¤äºæ
æ¥åå表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceAccidentReport> pageDeviceAccidentReport(Page page, @Param("ew") QueryWrapper<DeviceAccidentReport> ew); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äºæ
æ¥å详æ
|
| | | * @param accidentReportId 设å¤äºæ
æ¥åid |
| | | * @return |
| | | */ |
| | | DeviceAccidentReportDto selectDeviceAccidentReportById(Integer accidentReportId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.pojo.DeviceBorrow; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 10:53:51 |
| | | */ |
| | | public interface DeviceBorrowMapper extends BaseMapper<DeviceBorrow> { |
| | | |
| | | IPage<DeviceBorrow> deviceBorrowPage(Page page, @Param("ew")QueryWrapper<DeviceBorrow> ew); |
| | | |
| | | List<DeviceBorrow> getDeviceBorrowBydeviceId(Integer deviceId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceBreakdownMaintenance; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é维修表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 04:50:57 |
| | | */ |
| | | public interface DeviceBreakdownMaintenanceMapper extends BaseMapper<DeviceBreakdownMaintenance> { |
| | | |
| | | /** |
| | | * è®¾å¤æ
éç»´ä¿®å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceBreakdownMaintenance> pageDeviceBreakdownMaintenance(Page page, @Param("ew") QueryWrapper<DeviceBreakdownMaintenance> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.pojo.DeviceCalibrationPlanDetail; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å详æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:29 |
| | | */ |
| | | public interface DeviceCalibrationPlanDetailMapper extends BaseMapper<DeviceCalibrationPlanDetail> { |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计å详æ
å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceCalibrationPlanDetail> pageDeviceCalibrationPlanDetail(Page page, @Param("ew") QueryWrapper<DeviceCalibrationPlanDetail> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceCalibrationPlanDto; |
| | | import com.ruoyi.device.pojo.DeviceCalibrationPlan; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å主表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:17 |
| | | */ |
| | | public interface DeviceCalibrationPlanMapper extends BaseMapper<DeviceCalibrationPlan> { |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计åå表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceCalibrationPlanDto> pageDeviceCalibrationPlan(Page page, @Param("ew") QueryWrapper<DeviceCalibrationPlan> ew); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.pojo.DeviceDocuments; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * è®¾å¤æ¡£æ¡ |
| | | */ |
| | | @Mapper |
| | | public interface DeviceDocumentsMapper extends BaseMapper<DeviceDocuments> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceExaminePlanDetailsDto; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlanDetails; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:16 |
| | | */ |
| | | public interface DeviceExaminePlanDetailsMapper extends BaseMapper<DeviceExaminePlanDetails> { |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceExaminePlanDetailsDto> pageDeviceExaminePlanDetail(Page page, @Param("ew") QueryWrapper<DeviceExaminePlanDetails> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceExaminePlanDto; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlan; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å主表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:04 |
| | | */ |
| | | public interface DeviceExaminePlanMapper extends BaseMapper<DeviceExaminePlan> { |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åå表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceExaminePlanDto> deviceExaminePlanDetailsMapper(Page page, @Param("ew") QueryWrapper<DeviceExaminePlan> ew); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | * @param deviceExaminePlanId è®¾å¤æ ¸æ¥è®¡åid |
| | | * @return |
| | | */ |
| | | DeviceExaminePlanDto selectExamineExaminePlanDto(@Param("deviceExaminePlanId") Integer deviceExaminePlanId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordContrastDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¯¦æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:57 |
| | | */ |
| | | public interface DeviceExamineRecordContrastDetailsMapper extends BaseMapper<DeviceExamineRecordContrastDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.dto.DeviceExamineRecordContrastDto; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordContrast; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:43 |
| | | */ |
| | | public interface DeviceExamineRecordContrastMapper extends BaseMapper<DeviceExamineRecordContrast> { |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @param planDetailsId |
| | | * @return |
| | | */ |
| | | DeviceExamineRecordContrastDto getExamineRecordContrast(Integer planDetailsId); |
| | | |
| | | /** |
| | | * æ¥è¯¢å¯¹æ¯è®°å½ç¨äºå¯¼åº |
| | | * @param planDetailsId |
| | | * @return |
| | | */ |
| | | DeviceExamineRecordContrastDto selectExamineRecordContrastDto(@Param("planDetailsId") Integer planDetailsId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordDetail; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¯¦æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:15:11 |
| | | */ |
| | | public interface DeviceExamineRecordDetailMapper extends BaseMapper<DeviceExamineRecordDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.dto.DeviceExamineRecordDto; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:28 |
| | | */ |
| | | public interface DeviceExamineRecordMapper extends BaseMapper<DeviceExamineRecord> { |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ ¸æ¥è®°å½ |
| | | * @param planDetailsId |
| | | * @return |
| | | */ |
| | | DeviceExamineRecordDto getExamineRecord(Integer planDetailsId); |
| | | |
| | | /** |
| | | * 夿 ¸æ ¸æ¥è®°å½ |
| | | * @param planDetailsId 夿 ¸æ ¸æ¥è®°å½id |
| | | * @return |
| | | */ |
| | | DeviceExamineRecordDto selectReviewExamineRecordDto(@Param("planDetailsId") Integer planDetailsId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.pojo.DeviceExternalApply; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 10:28:43 |
| | | */ |
| | | public interface DeviceExternalApplyMapper extends BaseMapper<DeviceExternalApply> { |
| | | |
| | | /** |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceExternalApply> pageDeviceExternalApply(Page page, @Param("ew") QueryWrapper<DeviceExternalApply> ew); |
| | | |
| | | /** |
| | | * å¯¼åºæ¥è¯¢å©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @param externalApplyId å¤é¨è®¾å¤ç³è¯·è¡¨id |
| | | * @return |
| | | */ |
| | | DeviceExternalApply selectDeviceExternalById(@Param("externalApplyId") Integer externalApplyId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.ruoyi.device.dto.DeviceImpowerDetailsDto; |
| | | import com.ruoyi.device.pojo.DeviceImpowerDetails; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å详æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-04-17 03:23:39 |
| | | */ |
| | | public interface DeviceImpowerDetailsMapper extends BaseMapper<DeviceImpowerDetails> { |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ä½¿ç¨è¯¦æ
|
| | | * @param impowerId |
| | | * @return |
| | | */ |
| | | List<DeviceImpowerDetailsDto> deviceImpowerDetailsList(@Param("impowerId") Integer impowerId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceImpowerDto; |
| | | import com.ruoyi.device.dto.DeviceTraceabilityManagementDto; |
| | | import com.ruoyi.device.pojo.DeviceImpower; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-04-17 03:23:23 |
| | | */ |
| | | public interface DeviceImpowerMapper extends BaseMapper<DeviceImpower> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ä½¿ç¨ææ |
| | | * @param page |
| | | * @param deviceImpowerDtoQueryWrapper |
| | | * @return |
| | | */ |
| | | IPage<DeviceImpower> selectDeviceParameterPage(@Param("page") Page page, @Param("ew") QueryWrapper<DeviceImpowerDto> deviceImpowerDtoQueryWrapper); |
| | | |
| | | /** |
| | | * æ ¹æ®idæ¥è¯¢è®¾å¤ä½¿ç¨ææ |
| | | * @param traceabilityManagementId |
| | | * @return |
| | | */ |
| | | DeviceTraceabilityManagementDto selectDeviceTraceabilityManagementById(@Param("traceabilityManagementId") Integer traceabilityManagementId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.pojo.DeviceInspectionRecordDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:27:32 |
| | | */ |
| | | public interface DeviceInspectionRecordDetailsMapper extends BaseMapper<DeviceInspectionRecordDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceInspectionRecordDto; |
| | | import com.ruoyi.device.pojo.DeviceInspectionRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:25:14 |
| | | */ |
| | | public interface DeviceInspectionRecordMapper extends BaseMapper<DeviceInspectionRecord> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½ |
| | | * @param page |
| | | * @param queryWrappers |
| | | * @return |
| | | */ |
| | | IPage<DeviceInspectionRecord> selectDeviceParameterPage(Page page, @Param("ew") QueryWrapper<DeviceInspectionRecordDto> queryWrappers); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.pojo.DeviceLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DeviceLogMapper extends BaseMapper<DeviceLog> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceMaintenanceDto; |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 设å¤ç»´æ¤ä¿å
» |
| | | */ |
| | | @Mapper |
| | | public interface DeviceMaintenanceMapper extends BaseMapper<DeviceMaintenance> { |
| | | |
| | | /** |
| | | * 设å¤ç»´æ¤å页æ¥è¯¢ |
| | | * @param page |
| | | * @return |
| | | */ |
| | | IPage<DeviceMaintenanceDto> selectDeviceMaintenancePage(@Param("page") Page page, @Param("ew") QueryWrapper<DeviceMaintenanceDto> ew); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.dto.DeviceMaintenancePlanDetailsDto; |
| | | import com.ruoyi.device.pojo.DeviceMaintenancePlanDetails; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å详æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:11:46 |
| | | */ |
| | | public interface DeviceMaintenancePlanDetailsMapper extends BaseMapper<DeviceMaintenancePlanDetails> { |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ä¿å
»è¯¦æ
|
| | | * @param maintenancePlanId 设å¤ä¿å
»è®¡åid |
| | | */ |
| | | List<DeviceMaintenancePlanDetailsDto> deviceInspectionRecordDetailsList(@Param("maintenancePlanId") Integer maintenancePlanId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceMaintenancePlanDto; |
| | | import com.ruoyi.device.pojo.DeviceMaintenancePlan; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:10:52 |
| | | */ |
| | | public interface DeviceMaintenancePlanMapper extends BaseMapper<DeviceMaintenancePlan> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | * @param page å½å页 |
| | | * @param queryWrappers æ¥è¯¢æ¡ä»¶ |
| | | * @return |
| | | */ |
| | | IPage<DeviceMaintenancePlan> selectDeviceParameterPage(Page page, @Param("ew") QueryWrapper<DeviceMaintenancePlanDto> queryWrappers); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¿å
»è®¡åidæ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | * @param maintenancePlanId ä¿å
»è®¡åid |
| | | * @return |
| | | */ |
| | | DeviceMaintenancePlanDto selectMaintenancePlanById(@Param("maintenancePlanId") Integer maintenancePlanId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceDto; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 设å¤(Device)è¡¨æ°æ®åºè®¿é®å± |
| | | */ |
| | | public interface DeviceMapper extends BaseMapper<Device> { |
| | | |
| | | IPage<Device> selectDeviceParameter(Page page, QueryWrapper<Device> ew); |
| | | List<Device> selectEquipmentOverview(Page page, QueryWrapper<Device> ew); |
| | | |
| | | //è·å被ææäºº |
| | | List<Device> authorizedPerson(); |
| | | |
| | | //æ¥è¯¢ |
| | | List<Device> search(@Param(value = "status") Integer status, @Param(value = "deviceName") String deviceName, |
| | | @Param(value = "specificationModel") String specificationModel, @Param(value = "largeCategory") String largeCategory); |
| | | |
| | | //è·åå¾çæ°æ® |
| | | void selectDeviceImage(@Param(value = "name") String name ,@Param(value = "id") Integer id); |
| | | |
| | | IPage<DeviceDto> selectDeviceParameterPage(Page page, @Param("ew") QueryWrapper<DeviceDto> queryWrappers, @Param("laboratoryNameIsNull") Boolean laboratoryNameIsNull); |
| | | |
| | | List<Map<String, Object>> getInspectionItemSubclass(@Param("id") Integer id); |
| | | |
| | | List<Map<String, Object>> treeDevice(@Param("deviceName") String deviceName); |
| | | |
| | | DeviceDto selectDeviceByCode(Integer id); |
| | | |
| | | /** |
| | | * æ¥è¯¢å°è¾¾æ ¡åæææç设å¤-æå5天 |
| | | * @return |
| | | */ |
| | | List<Device> selectOverdueDevice(); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.pojo.DeviceMetric; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DeviceMetricMapper extends BaseMapper<DeviceMetric> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.pojo.DeviceMetricRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-27 10:20:01 |
| | | */ |
| | | public interface DeviceMetricRecordMapper extends BaseMapper<DeviceMetricRecord> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.pojo.DeviceMetricsCopy; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç® Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-27 10:20:11 |
| | | */ |
| | | public interface DeviceMetricsCopyMapper extends BaseMapper<DeviceMetricsCopy> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.dto.DeviceRecordDto; |
| | | import com.ruoyi.device.pojo.DeviceRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 11:06:47 |
| | | */ |
| | | public interface DeviceRecordMapper extends BaseMapper<DeviceRecord> { |
| | | |
| | | IPage<DeviceRecordDto> deviceRecordPage(@Param("deviceId") Integer deviceId, @Param("page") Page page, @Param("sampleCode") String sampleCode, @Param("managementNumber") String managementNumber, @Param("userId") Integer userId); |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æªå¡«åçè®¾å¤ |
| | | * @return |
| | | */ |
| | | List<DeviceRecordDto> selectNotFilled(); |
| | | |
| | | /** |
| | | * æ¥è¯¢å¯¼åºè®¾å¤ä½¿ç¨è®°å½ |
| | | * @param deviceId |
| | | * @param exportDate |
| | | * @return |
| | | */ |
| | | List<DeviceRecord> selectExportList(@Param("deviceId") Integer deviceId, @Param("exportDate") String exportDate); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceScrappedDto; |
| | | import com.ruoyi.device.pojo.DeviceScrapped; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ¥åºç³è¯·è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 01:53:47 |
| | | */ |
| | | public interface DeviceScrappedMapper extends BaseMapper<DeviceScrapped> { |
| | | |
| | | /** |
| | | * è®¾å¤æ¥åºç³è¯·å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceScrapped> pageDeviceScrapped(Page page, @Param("ew") QueryWrapper<DeviceScrapped> ew); |
| | | |
| | | /** |
| | | * æ ¹æ®idæ¥è¯¢è®¾å¤æ¥åºç³è¯· |
| | | * @param scrappedId |
| | | * @return |
| | | */ |
| | | DeviceScrappedDto selectDeviceScrappedById(@Param("scrappedId") Integer scrappedId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.dto.DeviceStateDto; |
| | | import com.ruoyi.device.pojo.DeviceState; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤åç¨/å¯ç¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | public interface DeviceStateMapper extends BaseMapper<DeviceState> { |
| | | |
| | | IPage<DeviceStateDto> getDeviceStatePage(@Param("deviceId") Integer deviceId, @Param("page") Page page, @Param("processNumber") String processNumber); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.dto.DeviceTraceabilityManagementDetailsDto; |
| | | import com.ruoyi.device.pojo.DeviceTraceabilityManagementDetails; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å详æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:58 |
| | | */ |
| | | public interface DeviceTraceabilityManagementDetailsMapper extends BaseMapper<DeviceTraceabilityManagementDetails> { |
| | | |
| | | /** |
| | | * æ ¹æ®æº¯æºè®¡åidæ¥è¯¢æº¯æºè®¡å详æ
|
| | | * @param traceabilityManagementId 溯æºè®¡åid |
| | | * @return 溯æºè®¡å详æ
|
| | | */ |
| | | List<DeviceTraceabilityManagementDetailsDto> deviceTraceabilityManagementDetailsList(@Param("traceabilityManagementId") Integer traceabilityManagementId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceTraceabilityManagementDto; |
| | | import com.ruoyi.device.pojo.DeviceTraceabilityManagement; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:44 |
| | | */ |
| | | public interface DeviceTraceabilityManagementMapper extends BaseMapper<DeviceTraceabilityManagement> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤é弿º¯æºè®¡å |
| | | * @param page |
| | | * @param queryWrappers |
| | | * @return |
| | | */ |
| | | IPage<DeviceTraceabilityManagement> selectDeviceParameterPage(IPage page, @Param("ew") QueryWrapper<DeviceTraceabilityManagementDto> ew); |
| | | |
| | | /** |
| | | * æ ¹æ®idæ¥è¯¢è®¾å¤é弿º¯æºè®¡å |
| | | * @param traceabilityManagementId |
| | | * @return |
| | | */ |
| | | DeviceTraceabilityManagementDto selectDeviceTraceabilityManagementById(@Param("traceabilityManagementId") Integer traceabilityManagementId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.ruoyi.device.dto.DeviceOperationInstructionDto; |
| | | import com.ruoyi.device.pojo.DeviceInstruction; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-12-04 10:29:18 |
| | | */ |
| | | public interface InstructionMapper extends BaseMapper<DeviceInstruction> { |
| | | |
| | | |
| | | IPage<DeviceOperationInstructionDto> pageByPageQueryOfHomeworkInstructions(Page page, @Param("ew") QueryWrapper<DeviceOperationInstructionDto> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.device.dto.DeviceOperationInstructionDto; |
| | | import com.ruoyi.device.pojo.OperationInstruction; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤ - ä½ä¸æå¯¼ä¹¦ æ·»å åæ§æä»¶ å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-12-04 10:43:32 |
| | | */ |
| | | public interface OperationInstructionMapper extends BaseMapper<OperationInstruction> { |
| | | |
| | | List<DeviceOperationInstructionDto> homeworkGuidebookEditor(Integer instructionId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mqtt; |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | public class MQBean { |
| | | |
| | | @Bean("mqClient") // å¯å¨WEBæå¡å¨çæ¶åè°ç¨æ¤æ¹æ³åå§å |
| | | public MQClient myMQTTClient(){ |
| | | MQClient mqClient = new MQClient(); |
| | | return mqClient; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mqtt; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ruoyi.device.service.CollectBridgeService; |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; |
| | | import org.eclipse.paho.client.mqttv3.MqttCallback; |
| | | import org.eclipse.paho.client.mqttv3.MqttMessage; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.Resource; |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class MQCallback<component> implements MqttCallback { |
| | | |
| | | private MQClient mqClient; // MQTTè¿æ¥æ°æ® |
| | | |
| | | private MQConfig mqConfig; // ymlé
ç½®æ°æ® |
| | | |
| | | private static MQCallback mqCallback; |
| | | |
| | | @Resource |
| | | private CollectBridgeService collectBridgeService; |
| | | |
| | | @PostConstruct |
| | | public void init() { |
| | | mqCallback = this; |
| | | // åä½¿åæ¶å°å·²éæåçconfigParamå®ä¾å |
| | | mqCallback.collectBridgeService = this.collectBridgeService; |
| | | } |
| | | |
| | | public MQCallback(MQClient mqClient, MQConfig mqConfig) { |
| | | this.mqClient = mqClient; |
| | | this.mqConfig = mqConfig; |
| | | } |
| | | |
| | | /** è¿æ¥ä¸¢å¤±åï¼ä¸è¬å¨è¿éé¢è¿è¡éè¿ **/ |
| | | @SneakyThrows |
| | | @Override |
| | | public void connectionLost(Throwable cause) { |
| | | /** è¿æ¥ä¸¢å¤±åï¼ä¸è¬å¨è¿éé¢è¿è¡éè¿ **/ |
| | | if (mqClient != null) { |
| | | while (true) { |
| | | try { |
| | | log.info("==============ããã[MQTT] è¿æ¥ä¸¢å¤±ï¼å°è¯éè¿..."); |
| | | MQClient mqttPushClient = new MQClient(); |
| | | mqttPushClient.connect(mqConfig); |
| | | if (mqClient.getClient().isConnected()) { |
| | | log.info("=============>>éè¿æå"); |
| | | } |
| | | break; |
| | | } catch (Exception e) { |
| | | log.error("=============>>>[MQTT] è¿æ¥æå¼ï¼éè¿å¤±è´¥ï¼<<============="); |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | log.info(cause.getMessage()); |
| | | } |
| | | |
| | | /** |
| | | * MQTTæå¡å¨åWEBæå¡å¨åéçæ°æ®ä¼æ§è¡å°è¿éé¢ï¼å®æ¹è¯ç§°ä¸ºï¼è®¢é
åçæ¶æ¯ |
| | | * @param topic 主é¢ï¼ä¹ç§°ä¸ºåºå±ç½å
³å¯ä¸æ è¯ |
| | | * @param message ä¿¡æ¯ |
| | | * @throws Exception æ¥é |
| | | */ |
| | | @Override |
| | | public void messageArrived(String topic, MqttMessage message) throws Exception { |
| | | try { |
| | | String parse = new String(message.getPayload()); |
| | | JSONObject jsonObject = JSONObject.parseObject(parse); |
| | | // å¡«å
ééæ°æ® |
| | | mqCallback.collectBridgeService.addBridgeValue(jsonObject); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.info("============ããæ¥æ¶æ¶æ¯ä¸»é¢å¼å¸¸ : " + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * WEBæå¡å¨åMQTTæå¡å¨åéçæ°æ®ä¼æ§è¡å°è¿éé¢ |
| | | * 宿¹è¯ç§°ä¸ºï¼åå¸å伿§è¡å°è¿é |
| | | * @param token è¿æ¥token |
| | | */ |
| | | @Override |
| | | public void deliveryComplete(IMqttDeliveryToken token) { |
| | | // log.info("==========åå¸ä¿¡æ¯={}==========", token.isComplete()); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mqtt; |
| | | |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.eclipse.paho.client.mqttv3.MqttClient; |
| | | import org.eclipse.paho.client.mqttv3.MqttConnectOptions; |
| | | import org.eclipse.paho.client.mqttv3.MqttException; |
| | | import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class MQClient { |
| | | |
| | | private static MqttClient client; |
| | | public static MqttClient getClient() { |
| | | return client; |
| | | } |
| | | public static void setClient(MqttClient client) { |
| | | MQClient.client = client; |
| | | } |
| | | |
| | | /** |
| | | * WEBæå¡å¨è¿æ¥MQTTæå¡å¨çé
ç½® |
| | | * @param userName è´¦å· |
| | | * @param password å¯ç |
| | | * @param outTime è¶
æ¶æ¶é´ |
| | | * @param KeepAlive å¿è·³æ£æµæ¶é´ |
| | | * @return |
| | | */ |
| | | private MqttConnectOptions getOption(String userName, String password, int outTime, int KeepAlive) { |
| | | MqttConnectOptions option = new MqttConnectOptions(); |
| | | // 设置æ¯å¦æ¸
空session,false表示æå¡å¨ä¼ä¿ç客æ·ç«¯çè¿æ¥è®°å½ï¼trueè¡¨ç¤ºæ¯æ¬¡è¿æ¥å°æå¡å¨é½ä»¥æ°çèº«ä»½è¿æ¥ |
| | | option.setCleanSession(true); |
| | | // è®¾ç½®è¿æ¥çç¨æ·å |
| | | option.setUserName(userName); |
| | | // è®¾ç½®è¿æ¥çå¯ç |
| | | option.setPassword(password.toCharArray()); |
| | | // 设置è¶
æ¶æ¶é´ åä½ä¸ºç§ |
| | | option.setConnectionTimeout(outTime); |
| | | // 设置ä¼è¯å¿è·³æ¶é´ åä½ä¸ºç§ æå¡å¨ä¼æ¯é(1.5*keepTime)ç§çæ¶é´å客æ·ç«¯åéä¸ªæ¶æ¯å¤æå®¢æ·ç«¯æ¯å¦å¨çº¿ï¼ä½è¿ä¸ªæ¹æ³å¹¶æ²¡æéè¿çæºå¶ |
| | | option.setKeepAliveInterval(KeepAlive); |
| | | // setWillæ¹æ³ï¼å¦æé¡¹ç®ä¸éè¦ç¥é客æ·ç«¯æ¯å¦æçº¿å¯ä»¥è°ç¨è¯¥æ¹æ³ã设置æç»ç«¯å£çéç¥æ¶æ¯ |
| | | // option.setWill(topic, "close".getBytes(), 2, true); |
| | | //设置æå¤§é度 |
| | | option.setMaxInflight(1000); |
| | | log.info("================>>>MQTTè¿æ¥è®¤è¯æå<<======================"); |
| | | return option; |
| | | } |
| | | |
| | | /** |
| | | * WEBæå¡å¨è¿æ¥MQTTæå¡å¨å½æ° |
| | | * @param mqttConfig ymlä¸MQTTçé
ç½® |
| | | */ |
| | | public void connect(MQConfig mqttConfig) throws MqttException { |
| | | client = new MqttClient(mqttConfig.getUrl(), mqttConfig.getClientId(), new MemoryPersistence()); |
| | | MqttConnectOptions options = getOption(mqttConfig.getUsername(), mqttConfig.getPassword(), |
| | | mqttConfig.getTimeout(), mqttConfig.getKeepAlive()); |
| | | MQClient.setClient(client); |
| | | //è¿æ¥å¤±è´¥è°ç¨åè°å½æ°ï¼éæ°è¿æ¥ |
| | | client.setCallback(new MQCallback<Object>(this, mqttConfig)); |
| | | if (!client.isConnected()) { |
| | | client.connect(options); |
| | | // 订é
ä¸»é¢ |
| | | MQSubscribe.subscribe_0(mqttConfig.getSubscribe()); |
| | | log.info("================>>>MQTTè¿æ¥æå<<======================"); |
| | | } else {// è¿éçé»è¾æ¯å¦æè¿æ¥ä¸æåå°±éæ°è¿æ¥ |
| | | client.disconnect(); |
| | | client.connect(options); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * WEBæå¡å¨ä¸MQTTæå¡å¨çæçº¿éè¿ |
| | | * @throws Exception |
| | | */ |
| | | public Boolean reConnect() throws Exception { |
| | | Boolean isConnected = false; |
| | | if (null != client) { |
| | | client.connect(); |
| | | if (client.isConnected()) { |
| | | isConnected = true; |
| | | } |
| | | } |
| | | return isConnected; |
| | | } |
| | | |
| | | /** |
| | | * å¼å¸¸å
³éæå¡ï¼WEBæå¡å¨ä¸MQTTæå¡å¨çæå¼è¿æ¥å½æ° |
| | | */ |
| | | @SneakyThrows |
| | | public void close(){ |
| | | client.close(); |
| | | client.disconnect(); |
| | | log.info("================>>å¼å¸¸å
³éä¸mqttæå¡å¨çè¿æ¥<<======================"); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mqtt; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | @Data |
| | | public class MQConfig { |
| | | |
| | | /** |
| | | * MQTT-æå¡ç«¯-IP |
| | | */ |
| | | @Value("${mqtt.url}") |
| | | private String url; |
| | | |
| | | /** |
| | | * MQTT-æå¡ç«¯-ç¨æ·å |
| | | */ |
| | | @Value("${mqtt.username}") |
| | | private String username; |
| | | |
| | | /** |
| | | * MQTT-æå¡ç«¯-å¯ç |
| | | */ |
| | | @Value("${mqtt.password}") |
| | | private String password; |
| | | |
| | | /** |
| | | * è¶
æ¶æ¶é´ |
| | | */ |
| | | @Value("${mqtt.timeout}") |
| | | private int timeout; |
| | | |
| | | /** |
| | | * å¿è·³æ£æµæ¶é´ |
| | | */ |
| | | @Value("${mqtt.keepalive}") |
| | | private int keepAlive; |
| | | |
| | | /** |
| | | * å¿è·³å
çº§å« |
| | | */ |
| | | @Value("${mqtt.qos}") |
| | | private int qos; |
| | | |
| | | /** |
| | | * æå¡ç«¯è¿æ¥è¶
æ¶æ¶é´ |
| | | */ |
| | | @Value("${mqtt.completion-timeout}") |
| | | private int completionTimeout; |
| | | |
| | | /** |
| | | * clientId |
| | | */ |
| | | @Value("${mqtt.clientId}") |
| | | private String clientId; |
| | | |
| | | /** |
| | | * 订é
ä¸»é¢ |
| | | */ |
| | | @Value("${mqtt.subscribe}") |
| | | private String subscribe; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mqtt; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.eclipse.paho.client.mqttv3.*; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class MQPublic { |
| | | |
| | | /** |
| | | * éä¿¡è´¨éqos为0ï¼è¡¨ç¤ºWEBæå¡å¨åMQTTæå¡å¨åªåé䏿¬¡ï¼ä¸ç®¡MQTTæå¡å¨ææ²¡ææ¶å° |
| | | * WEBæå¡å¨åMQTTæå¡å¨å叿°æ®ï¼æ¤æ¹æ³å°è£
äºpublish彿° |
| | | * @param topic ååºå±ç½å
³åéæ°æ®ï¼å®æ¹è¯ï¼ç§°æ¤ä¸ºä¸»é¢ï¼åé£ä¸ªä¸»é¢åéæ°æ® ç½å
³ï¼å³ä¸»é¢ï¼è®¾å¤å¯ä¸æ è¯ |
| | | * @param pushMessage WEBæå¡å¨åMQTTæå¡å¨åéçæ°æ® |
| | | */ |
| | | public void publish_0(int qos, String topic, byte[] pushMessage) { |
| | | publish(0, false, topic, pushMessage); |
| | | } |
| | | |
| | | /** |
| | | * éä¿¡è´¨éqos为1ï¼è¡¨ç¤ºWEBæå¡å¨åMQTTæå¡å¨åéæ°æ®ï¼MQTTæå¡å¨ä¸å®ä¼æ¶å°ä¸æ¬¡æ°æ®ï¼å¦æMQTTæå¡å¨æ²¡æååºâæ¶å°æ°æ®âï¼é£ä¹WEBæå¡å¨å°±ä¼ä¸ç´åéæ°æ® |
| | | * WEBæå¡å¨åMQTTæå¡å¨å叿°æ®ï¼è°ç¨æ¤å½æ°ï¼æ¤æ¹æ³å°è£
äºpublish彿°ï¼éä¿¡è´¨éqos为1 |
| | | * @param topic ååºå±ç½å
³åéæ°æ®ï¼å®æ¹è¯ï¼ç§°æ¤ä¸ºä¸»é¢ï¼åé£ä¸ªä¸»é¢åéæ°æ® ç½å
³ï¼å³ä¸»é¢ï¼è®¾å¤å¯ä¸æ è¯ |
| | | * @param pushMessage WEBæå¡å¨åMQTTæå¡å¨åéçæ°æ® |
| | | */ |
| | | public void publish_1(String topic, byte[] pushMessage) { |
| | | publish(1, false, topic, pushMessage); |
| | | } |
| | | |
| | | /** |
| | | *éä¿¡è´¨éqos为2ï¼è¡¨ç¤ºWEBæå¡å¨åMQTTæå¡å¨åéæ°æ®ï¼ä¸¤è
ä¼è¿è¡è³å°ä¸¤æ¬¡è¯·æ±/ååºæµç¨ï¼é¿å
æ°æ®å¨ä¼ è¾ä¸ç丢失ï¼ä½æ¯ç¸åºçä¹ä¼æ¶èè®¡ç®æºä¸çèµæº |
| | | * WEBæå¡å¨åMQTTæå¡å¨å叿°æ®ï¼æ¤æ¹æ³å°è£
äºpublish彿°ï¼éä¿¡è´¨éï¼2 |
| | | * @param topic ååºå±ç½å
³åéæ°æ®ï¼å®æ¹è¯ï¼ç§°æ¤ä¸ºä¸»é¢ï¼åé£ä¸ªä¸»é¢åéæ°æ® ç½å
³ï¼å³ä¸»é¢ï¼è®¾å¤å¯ä¸æ è¯ |
| | | * @param pushMessage WEBæå¡å¨åMQTTæå¡å¨åéçæ°æ® |
| | | */ |
| | | public void publish_2(String topic, byte[] pushMessage) { |
| | | publish(2,false, topic, pushMessage); |
| | | } |
| | | |
| | | /** |
| | | * åå¸å½æ°ï¼WEBæå¡å¨åMQTTæå¡å¨åéæ°æ® |
| | | * |
| | | * @param qos éä¿¡è´¨é |
| | | * @param retained é»è®¤ï¼false-éæä¹
åï¼æ¯æä¸æ¡æ¶æ¯æ¶è´¹å®ï¼å°±ä¼è¢«å é¤ï¼æä¹
åï¼æ¶è´¹å®ï¼è¿ä¼ä¿å卿å¡å¨ä¸ï¼å½æ°ç订é
è
åºç°ï¼ç»§ç»ç»æ°è®¢é
è
æ¶è´¹ï¼ |
| | | * @param topic ååºå±ç½å
³åéæ°æ®ï¼å®æ¹è¯ï¼ç§°æ¤ä¸ºä¸»é¢ï¼åé£ä¸ªä¸»é¢åéæ°æ® ç½å
³ï¼å³ä¸»é¢ï¼è®¾å¤å¯ä¸æ è¯ |
| | | * @param pushMessage WEBæå¡å¨åMQTTæå¡å¨åéçæ°æ® |
| | | */ |
| | | public void publish(int qos, boolean retained, String topic, byte[] pushMessage) { |
| | | MqttMessage message = new MqttMessage(); |
| | | message.setQos(qos); |
| | | message.setRetained(retained); |
| | | // å°String[]æ°ç»è½¬æ¢ä¸ºbyteæ°ç»åé |
| | | message.setPayload(pushMessage); |
| | | MqttTopic mTopic = MQClient.getClient().getTopic(topic); |
| | | if (null == mTopic) { |
| | | log.error("===============>>>MQTT {} ä¸åå¨<<=======================",topic); |
| | | } |
| | | MqttDeliveryToken token; |
| | | try { |
| | | token = mTopic.publish(message); |
| | | token.waitForCompletion(); |
| | | } catch (MqttPersistenceException e) { |
| | | e.printStackTrace(); |
| | | } catch (MqttException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mqtt; |
| | | |
| | | import org.eclipse.paho.client.mqttv3.MqttException; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | public class MQSubscribe { |
| | | |
| | | /** |
| | | * 订é
æä¸ªä¸»é¢ï¼MQTTæå¡å¨åWEBæå¡å¨åéæ°æ® |
| | | *主é¢ï¼ä¹ç§°ä¸ºåºå±ç½å
³å¯ä¸æ è¯ |
| | | * @param topic 设å¤ç¼å·ï¼ä¸åºå±äº¤äºçå¯ä¸æ è¯ |
| | | * @param qos MQTTæå¡å¨åWEBæå¡å¨åéæ°æ® |
| | | * qos为0ï¼åªåWEBæå¡å¨åé䏿¬¡ï¼ |
| | | * qos为1ï¼è³å°åWEBæå¡å¨åé䏿¬¡ï¼æ¥æ¶æ¹ä¼ååºä¸ä¸ªæ¥æï¼ |
| | | * qos为2ï¼ä¸¤è
ä¼è¿è¡è³å°ä¸¤æ¬¡è¯·æ±/ååºæµç¨ï¼é¿å
æ°æ®å¨ä¼ è¾ä¸ç丢失 |
| | | */ |
| | | private static void subscribe(String topic, int qos) { |
| | | try { |
| | | MQClient.getClient().subscribe(topic,qos); |
| | | } catch (MqttException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 订é
æä¸ªä¸»é¢ï¼éä¿¡è´¨éï¼qosé»è®¤ä¸º0 |
| | | * 主é¢ï¼ä¹ç§°ä¸ºåºå±ç½å
³å¯ä¸æ è¯ |
| | | * @param topic 设å¤ç¼å·ï¼ä¸åºå±äº¤äºçå¯ä¸æ è¯ |
| | | */ |
| | | public static void subscribe_0(String topic) { |
| | | subscribe(topic, 0); |
| | | } |
| | | |
| | | /** |
| | | * 订é
æä¸ªä¸»é¢ï¼éä¿¡è´¨éï¼qosé»è®¤ä¸º1 |
| | | * 主é¢ï¼ä¹ç§°ä¸ºåºå±ç½å
³å¯ä¸æ è¯ |
| | | * @param topic 设å¤ç¼å·ï¼ä¸åºå±äº¤äºçå¯ä¸æ è¯ |
| | | */ |
| | | public void subscribe_1(String topic) { |
| | | subscribe(topic, 1); |
| | | } |
| | | |
| | | /** |
| | | * 订é
æä¸ªä¸»é¢ï¼éä¿¡è´¨éï¼qosé»è®¤ä¸º2 |
| | | * 主é¢ï¼ä¹ç§°ä¸ºåºå±ç½å
³å¯ä¸æ è¯ |
| | | * @param topic 设å¤ç¼å·ï¼ä¸åºå±äº¤äºçå¯ä¸æ è¯ |
| | | */ |
| | | public void subscribe_2(String topic) { |
| | | subscribe(topic, 2); |
| | | } |
| | | |
| | | public void OffSubscribe(String topic) { |
| | | try { |
| | | MQClient.getClient().unsubscribe(topic); |
| | | } catch (MqttException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ°åçµæ¡¥éé |
| | | * |
| | | * @author zhuo |
| | | * @since 2025-02-19 |
| | | */ |
| | | @Data |
| | | @TableName("collect_bridge") |
| | | public class CollectBridge { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("ééå¼") |
| | | private String collectValue; |
| | | |
| | | @ApiModelProperty("æ¶é´") |
| | | private LocalDateTime collectDate; |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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 io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-07-13 12:23:00 |
| | | */ |
| | | @Data |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @TableName("device_data_config") |
| | | @ApiModel(value = "DataConfig对象", description = "") |
| | | public class DataConfig implements Serializable { |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å
¬å¼") |
| | | private String formula; |
| | | |
| | | @ApiModelProperty("åç
§X") |
| | | private String referx; |
| | | |
| | | @ApiModelProperty("åç
§Y") |
| | | private String refery; |
| | | |
| | | @ApiModelProperty("x") |
| | | private String x; |
| | | |
| | | @ApiModelProperty("y") |
| | | private String y; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹åç±»") |
| | | private String inspectionItemClass; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹ç®") |
| | | private String inspectionItem; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹å项") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("æ£éªé¡¹å项") |
| | | private String insProductItem; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹id") |
| | | private Integer structureItemParameterId; |
| | | |
| | | @ApiModelProperty("åºå·") |
| | | private String serialNumber; |
| | | |
| | | @ApiModelProperty("å«å") |
| | | private String anotherName; |
| | | |
| | | @ApiModelProperty("å¹é
åç§°") |
| | | private String matchingName; |
| | | |
| | | @TableField(select = false, exist = false) |
| | | private Boolean isDevice; |
| | | |
| | | @TableField(select = false, exist = false) |
| | | private String sample; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 设å¤(Device)表对象 |
| | | */ |
| | | @TableName(value = "device") |
| | | @Data |
| | | public class Device implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty(value = "en设å¤åç§°") |
| | | private String enDeviceName; |
| | | |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | @ApiModelProperty(value = "ç产åå®¶") |
| | | private String manufacturer; |
| | | |
| | | @ApiModelProperty(value = "åºåç¼å·") |
| | | private String factoryNo; |
| | | |
| | | @ApiModelProperty(value = "管çç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ApiModelProperty(value = "ææ¯ææ ") |
| | | private String technicalIndicators; |
| | | |
| | | @ApiModelProperty(value = "è´ç½®æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime acquisitionDate; |
| | | |
| | | @ApiModelProperty(value = "æ ¡åæææ¥æ") |
| | | private LocalDateTime activationDate; |
| | | |
| | | @ApiModelProperty(value = "管ç人Id") |
| | | private Integer equipmentManager; |
| | | |
| | | @ApiModelProperty(value = "åæ¾ç¹") |
| | | private String storagePoint; |
| | | |
| | | @ApiModelProperty(value = "æå±é¨é¨Id") |
| | | private Integer subordinateDepartmentsId; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹ç®Id") |
| | | private String insProductIds; |
| | | |
| | | @ApiModelProperty(value = "æ ¡åæå¡æºæ") |
| | | private String calibrationServices; |
| | | |
| | | @ApiModelProperty(value = "æè¿æ ¡åæ¥æ") |
| | | private LocalDateTime lastCalibrationDate; |
| | | |
| | | @ApiModelProperty(value = "䏿¬¡æ ¡åæ¥æ") |
| | | private LocalDateTime nextCalibrationDate; |
| | | |
| | | @ApiModelProperty(value = "设å¤ç±»å") |
| | | private String largeCategory; |
| | | |
| | | @ApiModelProperty(value = "åä»·") |
| | | private BigDecimal unitPrice; |
| | | |
| | | @ApiModelProperty(value = "设å¤ç¶æ") |
| | | private Integer deviceStatus; |
| | | |
| | | @ApiModelProperty(value = "æ ¡å卿(æ)") |
| | | private String calibrationDate; |
| | | |
| | | @ApiModelProperty(value = "å¾çä¸ä¼ ") |
| | | private String imageUpload; |
| | | |
| | | @ApiModelProperty(value = "å¾ç夿³¨") |
| | | private String imageName; |
| | | |
| | | @ApiModelProperty(value = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ°é-æä»¶åç¼") |
| | | private String fileType; |
| | | |
| | | @ApiModelProperty("æ°é-ééå°å") |
| | | private String collectUrl; |
| | | |
| | | @ApiModelProperty("æ°é-åå¨å°å") |
| | | private String storageUrl; |
| | | |
| | | @ApiModelProperty("æ°é-设å¤IP") |
| | | private String ip; |
| | | |
| | | @ApiModelProperty("æ°é-æ¯å¦ä¸ºæ°é设å¤") |
| | | @TableField(exist = false) |
| | | private Boolean isItADataAcquisitionDevice; |
| | | |
| | | @ApiModelProperty("æ°é-å§æåæ®µ") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("æ°é-æ ·ååæ®µ") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("æ°é-dbï¼mdbæä»¶åç§°") |
| | | private String dbFileName; |
| | | |
| | | @ApiModelProperty("被ææäºº") |
| | | private String authorizedPerson; |
| | | |
| | | @ApiModelProperty("èµäº§ç¼ç ") |
| | | private String assetCode; |
| | | |
| | | @ApiModelProperty("产å°") |
| | | private String origin; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤) |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:14 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_acceptance") |
| | | @ApiModel(value = "DeviceAcceptance对象", description = "设å¤éªæ¶(è£
å¤)") |
| | | public class DeviceAcceptance { |
| | | |
| | | @TableId(value = "acceptance_id", type = IdType.AUTO) |
| | | private Integer acceptanceId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("å°è´§æ¥æ") |
| | | private LocalDate arrivalDate; |
| | | |
| | | @ApiModelProperty("éé¢") |
| | | private String goldAmount; |
| | | |
| | | @ApiModelProperty("ç»´ä¿®åä½") |
| | | private String maintenanceunit; |
| | | |
| | | @ApiModelProperty("æ¶è®¾å¤ä¸»æºåå¤ä»½æ
åµ") |
| | | private String spareParts; |
| | | |
| | | @ApiModelProperty("å®è£
åè°è¯æ
åµ") |
| | | private String installationDebugging; |
| | | |
| | | @ApiModelProperty("éªæ¶æ
åµ") |
| | | private String checkSituation; |
| | | |
| | | @ApiModelProperty("æ¥æ¶ç¾å") |
| | | private String receivingSignature; |
| | | |
| | | @ApiModelProperty("å家代表") |
| | | private String producer; |
| | | |
| | | @ApiModelProperty("æ¥æ¶äºº") |
| | | private String recipient; |
| | | |
| | | @ApiModelProperty("æ¥æ¶æ¶é´") |
| | | private String recipientDate; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤)é件表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:26 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_acceptance_file") |
| | | @ApiModel(value = "DeviceAcceptanceFile对象", description = "设å¤éªæ¶(è£
å¤)é件表") |
| | | public class DeviceAcceptanceFile implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "acceptance_file_id", type = IdType.AUTO) |
| | | private Integer acceptanceFileId; |
| | | |
| | | @ApiModelProperty("设å¤éªæ¶id") |
| | | private Integer acceptanceId; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤äºæ
æ¥åå |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 06:31:12 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_accident_report") |
| | | @ApiModel(value = "DeviceAccidentReport对象", description = "设å¤äºæ
æ¥åå") |
| | | public class DeviceAccidentReport { |
| | | |
| | | @TableId(value = "accident_report_id", type = IdType.AUTO) |
| | | private Integer accidentReportId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("å°å") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("æ¶é´") |
| | | private LocalDateTime accidentDate; |
| | | |
| | | @ApiModelProperty("äºæ
æ
åµæè¿°") |
| | | private String descriptionOfAccident; |
| | | |
| | | @ApiModelProperty("æ¥å人id") |
| | | private Integer reportUserId; |
| | | |
| | | @ApiModelProperty("æ¥å人") |
| | | private String reportUser; |
| | | |
| | | @ApiModelProperty("æ¥åäººå¡«åæ¶é´") |
| | | private LocalDate reportDate; |
| | | |
| | | @ApiModelProperty("è¯ä¼°äººæè§") |
| | | private String assessorOpinion; |
| | | |
| | | @ApiModelProperty("è¯ä¼°äººid") |
| | | private Integer assessorUserId; |
| | | |
| | | @ApiModelProperty("è¯ä¼°äºº") |
| | | private String assessorUser; |
| | | |
| | | @ApiModelProperty("è¯ä¼°äººå¡«åæ¶é´") |
| | | private LocalDate assessorDate; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººæè§") |
| | | private String departmentHeadOpinion; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººid") |
| | | private Integer departmentHeadUserId; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äºº") |
| | | private String departmentHeadUser; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººå¡«åæ¶é´") |
| | | private LocalDate departmentHeadDate; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äººæè§") |
| | | private String technicalDirectorOpinion; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äººid") |
| | | private Integer technicalDirectorUserId; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äºº") |
| | | private String technicalDirectorUser; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äººå¡«åæ¶é´") |
| | | private LocalDate technicalDirectorDate; |
| | | |
| | | @ApiModelProperty("主任æè§") |
| | | private String directorHeadOpinion; |
| | | |
| | | @ApiModelProperty("主任id") |
| | | private Integer directorHeadUserId; |
| | | |
| | | @ApiModelProperty("主任") |
| | | private String directorHeadUser; |
| | | |
| | | @ApiModelProperty("䏻任填忶é´") |
| | | private LocalDate directorHeadDate; |
| | | |
| | | @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:ææ¯è´è´£äººæè§, 4:主任æè§") |
| | | private Integer flowType; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 10:53:51 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_borrow") |
| | | @ApiModel(value = "DeviceBorrow对象", description = "设å¤åç¨") |
| | | @ExcelIgnoreUnannotated |
| | | public class DeviceBorrow implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æµç¨ç¼å·") |
| | | @ExcelProperty(value = "æµç¨ç¼å·") |
| | | private String processNumber; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("管çç¼å·") |
| | | @ExcelProperty(value = "管çç¼å·") |
| | | private String unifyNumber; |
| | | |
| | | @ApiModelProperty("åç¨äºº") |
| | | @ExcelProperty(value = "åç¨äºº") |
| | | private String recipientUser; |
| | | |
| | | @ExcelProperty(value = "åç¨äººèç³»æ¹å¼") |
| | | @ApiModelProperty("åç¨äººèç³»æ¹å¼") |
| | | private String borrowerContactInformation; |
| | | |
| | | @ApiModelProperty("åç¨æ¶ç¶æ") |
| | | @ExcelProperty(value = "åç¨æ¶ç¶æ") |
| | | //0åæ ¼;1ç»´ä¿®;2åç¨;3æ¥åº |
| | | private Integer recipientState; |
| | | |
| | | @ApiModelProperty("åç¨æ¥æ") |
| | | @ExcelProperty(value = "æäº¤æ¥æ") |
| | | private Date recipientTime; |
| | | |
| | | @ApiModelProperty("ååºäºº") |
| | | @ExcelProperty(value = "ååºäºº") |
| | | private String submitUser; |
| | | |
| | | @ApiModelProperty("ååºæ¥æ") |
| | | @ExcelProperty(value = "ååºæ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("å½åç¶æ") |
| | | @ExcelProperty(value = "å½åç¶æ") |
| | | private String nowState; |
| | | |
| | | @ApiModelProperty("å½å责任人") |
| | | @ExcelProperty(value = "å½å责任人") |
| | | private String nowUser; |
| | | |
| | | @ApiModelProperty("éä»¶") |
| | | //è·¯å¾ |
| | | private String url; |
| | | |
| | | @ApiModelProperty("éä»¶") |
| | | @ExcelProperty(value = "éä»¶") |
| | | //æä»¶å |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ä¸ç¯è责任人") |
| | | private String nextUser; |
| | | |
| | | @ApiModelProperty("æäº¤æä½äºº") |
| | | private String submitOperationUser; |
| | | |
| | | @ApiModelProperty("æäº¤æä½æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime submitOperationTime; |
| | | |
| | | @ApiModelProperty("å½è¿äºº") |
| | | private String rebackUser; |
| | | |
| | | @ApiModelProperty("å½è¿æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime rebackTime; |
| | | |
| | | @ApiModelProperty("æ¥åç¶æ0åæ ¼;1ç»´ä¿®;2åç¨;3æ¥åº") |
| | | private Integer receiveState; |
| | | |
| | | @ApiModelProperty("设å¤è´£ä»»äºº") |
| | | private String deviceUser; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String note; |
| | | |
| | | @ApiModelProperty("æ¥æ¶æä½äºº") |
| | | private String receiveOperationUser; |
| | | |
| | | @ApiModelProperty("æ¥æ¶æä½æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime receiveOperationTime; |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | @TableField(select = false, exist = false) |
| | | @ExcelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | |
| | | @ApiModelProperty("æµç¨è·è¸ª") |
| | | @TableField(select = false, exist = false) |
| | | private List<DeviceLog> deviceLogs; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å主表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:17 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_calibration_plan") |
| | | @ApiModel(value = "DeviceCalibrationPlan对象", description = "è®¾å¤æ ¡å计å主表") |
| | | public class DeviceCalibrationPlan{ |
| | | |
| | | @TableId(value = "plan_id", type = IdType.AUTO) |
| | | private Integer planId; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String planName; |
| | | |
| | | @ApiModelProperty("计å年份") |
| | | private String planYear; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private Integer writeUserId; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | private LocalDateTime writeTime; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private Integer ratifyUserId; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å详æ
表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:29 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_calibration_plan_detail") |
| | | @ApiModel(value = "DeviceCalibrationPlanDetail对象", description = "è®¾å¤æ ¡å计å详æ
表") |
| | | public class DeviceCalibrationPlanDetail{ |
| | | |
| | | @TableId(value = "plan_detail_id", type = IdType.AUTO) |
| | | private Integer planDetailId; |
| | | |
| | | @ApiModelProperty("计å主表id") |
| | | private Integer planId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("设å¤åç§°ååå·") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ°é") |
| | | private String deviceAmount; |
| | | |
| | | @ApiModelProperty("仪å¨ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("æ£å®åä½") |
| | | private String verificationUnit; |
| | | |
| | | @ApiModelProperty("æ£å®å¨æ") |
| | | private String verificationCycles; |
| | | |
| | | @ApiModelProperty("æè¿æ£å®æ¶é´") |
| | | private LocalDate lastDate; |
| | | |
| | | @ApiModelProperty("æ¬å¹´è®¡åæ ¡åæ¶é´") |
| | | private LocalDate planDate; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ¡£æ¡ |
| | | */ |
| | | @Data |
| | | @TableName(value = "device_documents") |
| | | public class DeviceDocuments implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主é®ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * ææ¡£ç±»åï¼æä¸¾ï¼ |
| | | */ |
| | | private String documentType; |
| | | |
| | | /** |
| | | * åç§° |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * çæ¬å· |
| | | */ |
| | | private String version; |
| | | |
| | | /** |
| | | * æ°é |
| | | */ |
| | | private Integer quantity; |
| | | |
| | | /** |
| | | * é¡µæ° |
| | | */ |
| | | private Integer pageCount; |
| | | |
| | | /** |
| | | * æä¾å |
| | | */ |
| | | private String provider; |
| | | |
| | | /** |
| | | * æä¾æ¥æ |
| | | */ |
| | | private LocalDateTime provideDate; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | private String comments; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("èµäº§ç¼å·") |
| | | private String number; |
| | | |
| | | @ApiModelProperty("åå§æä»¶åç§°") |
| | | private String systemFileName; |
| | | |
| | | @ApiModelProperty("ç³»ç»çææä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å主表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:04 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_examine_plan") |
| | | @ApiModel(value = "DeviceExaminePlan对象", description = "è®¾å¤æ ¸æ¥è®¡å主表") |
| | | public class DeviceExaminePlan{ |
| | | |
| | | @TableId(value = "plan_id", type = IdType.AUTO) |
| | | private Integer planId; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String planName; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String planYear; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private Integer writeUserId; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | private LocalDateTime writeTime; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private Integer ratifyUserId; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:16 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_examine_plan_details") |
| | | @ApiModel(value = "DeviceExaminePlanDetails对象", description = "è®¾å¤æ ¸æ¥è®¡å详æ
表") |
| | | public class DeviceExaminePlanDetails { |
| | | |
| | | @TableId(value = "plan_details_id", type = IdType.AUTO) |
| | | private Integer planDetailsId; |
| | | |
| | | @ApiModelProperty("主表id") |
| | | private Integer planId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¶é´") |
| | | private String checkTime; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥ææ ") |
| | | private String checkIndex; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¹æ³") |
| | | private String checkMethod; |
| | | |
| | | @ApiModelProperty("ç»æå¦ä½å¤å®") |
| | | private String howResults; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥è´£ä»»äººid") |
| | | private Integer checkChargerUserId; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥è´£ä»»äºº") |
| | | private String checkChargerUser; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:28 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_examine_record") |
| | | @ApiModel(value = "DeviceExamineRecord对象", description = "è®¾å¤æ ¸æ¥è®°å½è¡¨") |
| | | public class DeviceExamineRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "record_id", type = IdType.AUTO) |
| | | private Integer recordId; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ ¸æ¥è¯¦æ
id") |
| | | private Integer planDetailsId; |
| | | |
| | | @ApiModelProperty("精度ç级") |
| | | private String accuracyGrade; |
| | | |
| | | @ApiModelProperty("使ç¨ç©è´¨åç§°") |
| | | private String materialName; |
| | | |
| | | @ApiModelProperty("使ç¨ç©è´¨ç®¡çç¼å·") |
| | | private String materialNumber; |
| | | |
| | | @ApiModelProperty("使ç¨ç©è´¨ç²¾åº¦/ä¸ç¡®å®åº¦") |
| | | private String materialAccuracyUncertainty; |
| | | |
| | | @ApiModelProperty("使ç¨ç©è´¨è§æ ¼åå·") |
| | | private String materialModel; |
| | | |
| | | @ApiModelProperty("使ç¨ç©è´¨æ ¸æ¥æ¹å¼") |
| | | private String materialCheckMethod; |
| | | |
| | | @ApiModelProperty("使ç¨ç©è´¨æ ¸æ¥é¡¹ç®") |
| | | private String materialCheckItems; |
| | | |
| | | @ApiModelProperty("温度") |
| | | private String temperature; |
| | | |
| | | @ApiModelProperty("湿度") |
| | | private String humidity; |
| | | |
| | | @ApiModelProperty("å¤å®") |
| | | private String determine; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥äººid") |
| | | private Integer checkerUserId; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥äºº") |
| | | private String checkerUser; |
| | | |
| | | @ApiModelProperty("夿 ¸äººid") |
| | | private Integer reviewUserId; |
| | | |
| | | @ApiModelProperty("夿 ¸äºº") |
| | | private String reviewUser; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æ0,ä¸éè¿, 1éè¿") |
| | | private Integer reviewStatus; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸å¤æ³¨") |
| | | private String reviewRemark; |
| | | |
| | | @ApiModelProperty("æµè¯ç¹1") |
| | | private String dataValue1; |
| | | @ApiModelProperty("æµè¯ç¹2") |
| | | private String dataValue2; |
| | | @ApiModelProperty("æµè¯ç¹3") |
| | | private String dataValue3; |
| | | @ApiModelProperty("æµè¯ç¹4") |
| | | private String dataValue4; |
| | | @ApiModelProperty("æµè¯ç¹5") |
| | | private String dataValue5; |
| | | @ApiModelProperty("æµè¯ç¹6") |
| | | private String dataValue6; |
| | | |
| | | @ApiModelProperty("æå¤§åå·®1") |
| | | private String maximun1; |
| | | @ApiModelProperty("æå¤§åå·®2") |
| | | private String maximun2; |
| | | @ApiModelProperty("æå¤§åå·®3") |
| | | private String maximun3; |
| | | @ApiModelProperty("æå¤§åå·®4") |
| | | private String maximun4; |
| | | @ApiModelProperty("æå¤§åå·®5") |
| | | private String maximun5; |
| | | @ApiModelProperty("æå¤§åå·®6") |
| | | private String maximun6; |
| | | |
| | | @ApiModelProperty("ç¸å¯¹åå·®1") |
| | | private String relative1; |
| | | @ApiModelProperty("ç¸å¯¹åå·®2") |
| | | private String relative2; |
| | | @ApiModelProperty("ç¸å¯¹åå·®3") |
| | | private String relative3; |
| | | @ApiModelProperty("ç¸å¯¹åå·®4") |
| | | private String relative4; |
| | | @ApiModelProperty("ç¸å¯¹åå·®5") |
| | | private String relative5; |
| | | @ApiModelProperty("ç¸å¯¹åå·®6") |
| | | private String relative6; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:43 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_examine_record_contrast") |
| | | @ApiModel(value = "DeviceExamineRecordContrast对象", description = "è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¡¨") |
| | | public class DeviceExamineRecordContrast implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "record_contrast_id", type = IdType.AUTO) |
| | | private Integer recordContrastId; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¹å¼") |
| | | private String checkMethod; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ ¸æ¥è¯¦æ
id") |
| | | private Integer planDetailsId; |
| | | |
| | | @ApiModelProperty("设å¤idA") |
| | | private Integer aDeviceId; |
| | | |
| | | @ApiModelProperty("设å¤idb") |
| | | private Integer bDeviceId; |
| | | |
| | | @ApiModelProperty("设å¤idc") |
| | | private Integer cDeviceId; |
| | | |
| | | @ApiModelProperty("èå´ä¸ç¡®å®åº¦A") |
| | | private String aRangeUncertainty; |
| | | |
| | | @ApiModelProperty("èå´ä¸ç¡®å®åº¦b") |
| | | private String bRangeUncertainty; |
| | | |
| | | @ApiModelProperty("èå´ä¸ç¡®å®åº¦c") |
| | | private String cRangeUncertainty; |
| | | |
| | | @ApiModelProperty("综åå¤å®") |
| | | private String judgment; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥äººid") |
| | | private Integer checkerUserId; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥äºº") |
| | | private String checkerUser; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¥æ") |
| | | private LocalDateTime checkerTime; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äººid") |
| | | private Integer reviewUserId; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äºº") |
| | | private String reviewUser; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æ0,ä¸éè¿, 1éè¿") |
| | | private Integer reviewStatus; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸å¤æ³¨") |
| | | private String reviewRemark; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private LocalDateTime reviewTime; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¯¦æ
表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:57 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_examine_record_contrast_details") |
| | | @ApiModel(value = "DeviceExamineRecordContrastDetails对象", description = "è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¯¦æ
表") |
| | | public class DeviceExamineRecordContrastDetails implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "record_contrast_details_id", type = IdType.AUTO) |
| | | private Integer recordContrastDetailsId; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ ¸æ¥è¯¦æ
id") |
| | | private Integer recordContrastId; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥é¡¹ç®") |
| | | private String checkItems; |
| | | |
| | | @ApiModelProperty("a仪å¨ç¤ºå¼") |
| | | private String indicationA; |
| | | |
| | | @ApiModelProperty("b仪å¨ç¤ºå¼") |
| | | private String indicationB; |
| | | |
| | | @ApiModelProperty("c仪å¨ç¤ºå¼") |
| | | private String indicationC; |
| | | |
| | | @ApiModelProperty("å·®å¼") |
| | | private String dValue; |
| | | |
| | | @ApiModelProperty("åå·®") |
| | | private String deviation; |
| | | |
| | | @ApiModelProperty("å¤å®") |
| | | private String determine; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¯¦æ
表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:15:11 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_examine_record_detail") |
| | | @ApiModel(value = "DeviceExamineRecordDetail对象", description = "è®¾å¤æ ¸æ¥è®°å½è¯¦æ
表") |
| | | public class DeviceExamineRecordDetail implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "record_detail_id", type = IdType.AUTO) |
| | | private Integer recordDetailId; |
| | | |
| | | @ApiModelProperty("è®¾è®¾å¤æ ¸æ¥è®°å½id") |
| | | private Integer recordId; |
| | | |
| | | @ApiModelProperty("æµè¯ç¹") |
| | | private String testPoint; |
| | | |
| | | @ApiModelProperty("å
容å¼1") |
| | | private String dataValue1; |
| | | |
| | | @ApiModelProperty("å
容å¼2") |
| | | private String dataValue2; |
| | | |
| | | @ApiModelProperty("å
容å¼3") |
| | | private String dataValue3; |
| | | |
| | | @ApiModelProperty("å
容å¼4") |
| | | private String dataValue4; |
| | | |
| | | @ApiModelProperty("å
容å¼5") |
| | | private String dataValue5; |
| | | |
| | | @ApiModelProperty("å
容å¼6") |
| | | private String dataValue6; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 10:28:43 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_external_apply") |
| | | @ApiModel(value = "DeviceExternalApply对象", description = "å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨") |
| | | public class DeviceExternalApply{ |
| | | |
| | | @TableId(value = "external_apply_id", type = IdType.AUTO) |
| | | private Integer externalApplyId; |
| | | |
| | | @ApiModelProperty("åä½åç§°") |
| | | private String unitName; |
| | | |
| | | @ApiModelProperty("å°å") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("仪å¨åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("仪å¨åå·") |
| | | private String deviceModel; |
| | | |
| | | @ApiModelProperty("é
ä»¶") |
| | | private String parts; |
| | | |
| | | @ApiModelProperty("对æ¹ä»ªå¨ç¼å·") |
| | | private String instrumentNumber; |
| | | |
| | | @ApiModelProperty("ææ¯ææ ") |
| | | private String technicalIndex; |
| | | |
| | | @ApiModelProperty("ææ¯è¦æ±") |
| | | private String technicalRequirements; |
| | | |
| | | @ApiModelProperty("å©ç¨åå ") |
| | | private String useReason; |
| | | |
| | | @ApiModelProperty("0ç³è¯·äººid") |
| | | private Integer applicantUserId; |
| | | |
| | | @ApiModelProperty("0ç³è¯·äºº") |
| | | private String applicantUser; |
| | | |
| | | @ApiModelProperty("0ç³è¯·æ¶é´") |
| | | private LocalDate applicantDate; |
| | | |
| | | @ApiModelProperty("1é¨é¨è´è´£äººæè§") |
| | | private String departmentHeadOpinion; |
| | | |
| | | @ApiModelProperty("1é¨é¨è´è´£äººid") |
| | | private Integer departmentHeadUserId; |
| | | |
| | | @ApiModelProperty("1é¨é¨è´è´£äºº") |
| | | private String departmentHeadUser; |
| | | |
| | | @ApiModelProperty("1é¨é¨è´è´£äººå¡«åæ¶é´") |
| | | private LocalDate departmentHeadDate; |
| | | |
| | | @ApiModelProperty("2计é室æè§") |
| | | private String meteringRoomOpinion; |
| | | |
| | | @ApiModelProperty("2计é室人id") |
| | | private Integer meteringRoomUserId; |
| | | |
| | | @ApiModelProperty("2计é室人") |
| | | private String meteringRoomUser; |
| | | |
| | | @ApiModelProperty("2计éå®¤äººå¡«åæ¶é´") |
| | | private LocalDate meteringRoomDate; |
| | | |
| | | @ApiModelProperty("3æ¹å人æè§") |
| | | private String approverOpinion; |
| | | |
| | | @ApiModelProperty("3æ¹å人id") |
| | | private Integer approverUserId; |
| | | |
| | | @ApiModelProperty("3æ¹å人") |
| | | private String approverUser; |
| | | |
| | | @ApiModelProperty("3æ¹åäººå¡«åæ¶é´") |
| | | private LocalDate approverDate; |
| | | |
| | | @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.ruoyi.device.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 2025-04-17 03:23:23 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_impower") |
| | | @ApiModel(value = "DeviceImpower对象", description = "设å¤ä½¿ç¨ææè¡¨") |
| | | public class DeviceImpower implements Serializable { |
| | | |
| | | @ApiModelProperty("ææid") |
| | | @TableId(value = "impower_id", type = IdType.AUTO) |
| | | private Integer impowerId; |
| | | |
| | | @ApiModelProperty("计å年份") |
| | | private String impowerYear; |
| | | |
| | | @ApiModelProperty("ç¼å¶äººid") |
| | | private Integer compilerId; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private String compiler; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | private LocalDateTime datePreparation; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æï¼0æªå®¡æ ¸ï¼1å®¡æ ¸") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("ææid") |
| | | private Integer auditId; |
| | | |
| | | @ApiModelProperty("ææäºº") |
| | | private String audit; |
| | | |
| | | @ApiModelProperty("æææ¥æ") |
| | | private LocalDateTime auditDate; |
| | | |
| | | @ApiModelProperty("ææä¿¡æ¯") |
| | | private String auditRemark; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("åå»ºæ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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 2025-04-17 03:23:39 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_impower_details") |
| | | @ApiModel(value = "DeviceImpowerDetails对象", description = "设å¤é弿º¯æºè®¡å详æ
表") |
| | | public class DeviceImpowerDetails implements Serializable { |
| | | |
| | | |
| | | @ApiModelProperty("设å¤é弿º¯æºè®¡å详æ
id") |
| | | @TableId(value = "impower_detail_id", type = IdType.AUTO) |
| | | private Integer impowerDetailId; |
| | | |
| | | @ApiModelProperty("设å¤é弿º¯æºè®¡åid") |
| | | private Integer impowerId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("æ£æµé¡¹ç®") |
| | | private String inspectionItem; |
| | | |
| | | @ApiModelProperty("被ææäºº") |
| | | private String delegatedUser; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("åå»ºæ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ç¹æ£è®°å½ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:25:14 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_inspection_record") |
| | | @ApiModel(value = "DeviceInspectionRecord对象", description = "") |
| | | public class DeviceInspectionRecord implements Serializable { |
| | | |
| | | @ApiModelProperty("设å¤ç¹æ£è®°å½id") |
| | | @TableId(value = "inspection_record_id", type = IdType.AUTO) |
| | | private Integer inspectionRecordId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("æµéèå´") |
| | | private String measurementScope; |
| | | |
| | | @ApiModelProperty("ç¹æ£ä½¿ç¨ç©è´¨åç§°") |
| | | private String materialName; |
| | | |
| | | @ApiModelProperty("ç¹æ£ä½¿ç¨ç©è´¨è§æ ¼åå·") |
| | | private String materialModel; |
| | | |
| | | @ApiModelProperty("ç¹æ£ä½¿ç¨ç©è´¨ç®¡çç¼å·") |
| | | private String materialManagementNumber; |
| | | |
| | | @ApiModelProperty("ç¹æ£ä½¿ç¨ç©è´¨ç²¾åº¦ç级") |
| | | private String materialAccuracyGrade; |
| | | |
| | | @ApiModelProperty("温度") |
| | | private String temperature; |
| | | |
| | | @ApiModelProperty("湿度") |
| | | private String humidity; |
| | | |
| | | @ApiModelProperty("æµè¯ç»è®º") |
| | | private String testConclusion; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("ç¶æï¼æ¯å¦å¤æ ¸ï¼0æªå¤æ ¸ï¼1夿 ¸") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("æµè¯äºº") |
| | | private String recorder; |
| | | |
| | | @ApiModelProperty("æµè¯äººid") |
| | | private Integer recorderId; |
| | | |
| | | @ApiModelProperty("夿 ¸äºº") |
| | | private String reviewer; |
| | | |
| | | @ApiModelProperty("夿 ¸äººid") |
| | | private Integer reviewerId; |
| | | |
| | | @ApiModelProperty("夿 ¸ä¿¡æ¯") |
| | | private String reviewerRemark; |
| | | |
| | | @ApiModelProperty("æµè¯æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDateTime testDate; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äººid") |
| | | private Integer updateUserId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:27:32 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_inspection_record_details") |
| | | @ApiModel(value = "DeviceInspectionRecordDetails对象", description = "") |
| | | public class DeviceInspectionRecordDetails implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("ç¹æ£è¯¦æ
id") |
| | | @TableId(value = "inspection_record_detail_id", type = IdType.AUTO) |
| | | private Integer inspectionRecordDetailId; |
| | | |
| | | @ApiModelProperty("ç¹æ£id") |
| | | private Integer inspectionRecordId; |
| | | |
| | | @ApiModelProperty("æµè¯é¡¹ç®") |
| | | private String testItems; |
| | | |
| | | @ApiModelProperty("æ åå¼") |
| | | private String standardValue; |
| | | |
| | | @ApiModelProperty("宿µå¼") |
| | | private String measuredValue; |
| | | |
| | | @ApiModelProperty("示å¼è¯¯å·®") |
| | | private String indicationError; |
| | | |
| | | @ApiModelProperty("å
许误差") |
| | | private String allowableError; |
| | | |
| | | @ApiModelProperty("å项ç»è®º") |
| | | private String singleItemConclusion; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äººid") |
| | | private Integer updateUserId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-12-04 10:29:18 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_instruction") |
| | | @ApiModel(value = "Instruction对象", description = "ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨") |
| | | public class DeviceInstruction implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("ç³è¯·ç¼å·") |
| | | private String applicationNumber; |
| | | |
| | | @ApiModelProperty("ç³è¯·é¨é¨") |
| | | private String applicationDepartment; |
| | | |
| | | @ApiModelProperty("责任人") |
| | | private String personLiable; |
| | | |
| | | @ApiModelProperty("åæ§ç³è¯·è¯´æ") |
| | | private String controlledApplicationDescription; |
| | | |
| | | @ApiModelProperty("ç³»ç»çæåç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ç³»ç»çæåç§°") |
| | | private String fileSystemName; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("device_log") // è®°å½ |
| | | public class DeviceLog implements Serializable { |
| | | |
| | | @TableId(type= IdType.AUTO) |
| | | private Integer id; |
| | | private String operator; |
| | | // @JsonFormat() |
| | | private LocalDateTime operationTime; |
| | | private String operationType; |
| | | private String operationContent; |
| | | private Integer deviceId; |
| | | |
| | | //å
³èç表å |
| | | private String relevanceForm; |
| | | |
| | | //å
³èçid |
| | | private Integer relevanceId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.deepoove.poi.data.PictureRenderData; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 设å¤ç»´æ¤æ·»å ç»´æ¤è®°å½è¡¨ |
| | | * |
| | | * @author makejava |
| | | * @since 2025-04-17 11:28:56 |
| | | */ |
| | | @Data |
| | | @TableName("device_maintenance") |
| | | public class DeviceMaintenance { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("ç»´æ¤æ¥æ") |
| | | private LocalDate maintenanceDate; |
| | | |
| | | @ApiModelProperty("ç»´æ¤å
容") |
| | | private String maintenanceContent; |
| | | |
| | | @ApiModelProperty("ç»´æ¤äººid") |
| | | private Integer maintenanceUserId; |
| | | |
| | | @ApiModelProperty("ç»´æ¤äºº") |
| | | private String maintenanceUserName; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("åå»ºæ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("æ´æ°äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(select = false, exist = false) |
| | | @ApiModelProperty("ç»´æ¤äººå¾ç") |
| | | private PictureRenderData maintenanceUserUrlRender; |
| | | |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:10:52 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_maintenance_plan") |
| | | @ApiModel(value = "DeviceMaintenancePlan对象", description = "设å¤ä¿å
»è®¡å表") |
| | | public class DeviceMaintenancePlan implements Serializable { |
| | | |
| | | @ApiModelProperty("设å¤ä¿å
»è®¡åid") |
| | | @TableId(value = "maintenance_plan_id", type = IdType.AUTO) |
| | | private Integer maintenancePlanId; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private String compiler; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String planName; |
| | | |
| | | @ApiModelProperty("计å年份") |
| | | private String planYear; |
| | | |
| | | @ApiModelProperty("ç¼å¶äººid") |
| | | private Integer compilerId; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¥æ") |
| | | private LocalDateTime datePreparation; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æï¼0æªå®¡æ ¸ï¼1å®¡æ ¸") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äººid") |
| | | private Integer auditId; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äºº") |
| | | private String audit; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private LocalDateTime auditDate; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ä¿¡æ¯") |
| | | private String auditRemark; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å详æ
表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:11:46 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_maintenance_plan_details") |
| | | @ApiModel(value = "DeviceMaintenancePlanDetails对象", description = "设å¤ä¿å
»è®¡å详æ
表") |
| | | public class DeviceMaintenancePlanDetails implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("ä¿å
»è®¡å详æ
id") |
| | | @TableId(value = "maintenance_plan_detail_id", type = IdType.AUTO) |
| | | private Integer maintenancePlanDetailId; |
| | | |
| | | @ApiModelProperty("ä¿å
»è®¡åid") |
| | | private Integer maintenancePlanId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("ä¿å
Ȍ
³é®é¨ä½") |
| | | private String maintenanceSite; |
| | | |
| | | @ApiModelProperty("ä¿å
Ȍ
容") |
| | | private String maintenanceContent; |
| | | |
| | | @ApiModelProperty("ä¿å
»å¨æ") |
| | | private String maintenanceIntervals; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("device_metrics") |
| | | public class DeviceMetric implements Serializable { |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; //id |
| | | private Integer deviceId; // 设å¤ID |
| | | private String measurementParameter; // 计éåæ° |
| | | private String rangeOfMeasurement; // éç¨èå´ |
| | | private String maxPermissibleError; // æå¤§å
许误差 |
| | | private String judgmentCriteria; // å¤å®æ å |
| | | private String createdBy; // å建人 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime creationTime; // å建æ¶é´ |
| | | |
| | | @ApiModelProperty("calibrateï¼æ ¡åï¼examineï¼æ ¸æ¥") |
| | | private String type; // ç±»å |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-27 10:20:01 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_metric_record") |
| | | @ApiModel(value = "DeviceMetricRecord对象", description = "è®¾å¤æ ¡å - æ ¡åè®°å½") |
| | | public class DeviceMetricRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("è®°å½ç¼å·") |
| | | private String processNumber; |
| | | |
| | | @ApiModelProperty("计éåä½") |
| | | private String unitOfMeasure; |
| | | |
| | | @ApiModelProperty("æ ¡åæ¥æ") |
| | | private Date calibrationDate; |
| | | |
| | | @ApiModelProperty("䏿¬¡æ ¡åæ¥æ") |
| | | private Date nextCalibrationDate; |
| | | |
| | | @ApiModelProperty("计ç®å¨å
·") |
| | | private String calculatingApparatus; |
| | | |
| | | @ApiModelProperty("è®¡ç®æ åéç¨") |
| | | private String standardRange; |
| | | |
| | | @ApiModelProperty("è®¡éæ åä¸ç¡®å®åº¦") |
| | | private String calibrationStandardUncertainty; |
| | | |
| | | @ApiModelProperty("便®æä»¶") |
| | | private String byDocument; |
| | | |
| | | @ApiModelProperty("è¯ä¹¦ç¼å·") |
| | | private String certificateSerialNumber; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | private String status; |
| | | |
| | | @ApiModelProperty("åæä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ç³»ç»çææä»¶åç§°") |
| | | private String systemFileName; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("å建æ¶é´ / ç»è®°æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ç»è®°äºº") |
| | | private String createUser; |
| | | |
| | | @ApiModelProperty("calibrateï¼æ ¡åï¼examineï¼æ ¸æ¥") |
| | | private String type; |
| | | |
| | | @ApiModelProperty("确认æ¶é´") |
| | | private Date confirmDate; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç® |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-27 10:20:11 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_metrics_copy") |
| | | @ApiModel(value = "DeviceMetricsCopy对象", description = "è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç®") |
| | | public class DeviceMetricsCopy implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ ¡å - æ ¡åè®°å½id") |
| | | private Integer deviceMetricsId; |
| | | |
| | | @ApiModelProperty("计éåæ°") |
| | | private String measurementParameter; |
| | | |
| | | @ApiModelProperty("éç¨èå´") |
| | | private String rangeOfMeasurement; |
| | | |
| | | @ApiModelProperty("æå¤§å
许误差") |
| | | private String maxPermissibleError; |
| | | |
| | | @ApiModelProperty("å¤å®æ å") |
| | | private String judgmentCriteria; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | private String createdBy; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | private LocalDateTime creationTime; |
| | | |
| | | @ApiModelProperty("æ¯å¦æ ¡å") |
| | | private String isCalibration; |
| | | |
| | | @ApiModelProperty("å¤å®ç»æ") |
| | | private String result; |
| | | |
| | | @ApiModelProperty("åé¡¹ç»æè¯´æ") |
| | | private String singleResultStatement; |
| | | |
| | | @ApiModelProperty("calibrateï¼æ ¡åï¼examineï¼æ ¸æ¥") |
| | | private String type; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 11:06:47 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_record") |
| | | @ApiModel(value = "DeviceRecord对象", description = "cnas设å¤ä½¿ç¨è®°å½è¡¨") |
| | | public class DeviceRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("订åid") |
| | | private Integer insOrderId; |
| | | |
| | | @ApiModelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("温度") |
| | | private String temperature; |
| | | |
| | | @ApiModelProperty("湿度") |
| | | private String humidity; |
| | | |
| | | @ApiModelProperty("使ç¨å0å¼å¸¸1è¯å¥½") |
| | | private Integer useBefore; |
| | | |
| | | @ApiModelProperty("使ç¨å0å¼å¸¸1è¯å¥½") |
| | | private Integer useAfter; |
| | | |
| | | @ApiModelProperty("å¼å¸¸æ
åµ") |
| | | private String abnormal; |
| | | |
| | | @ApiModelProperty("使ç¨äººid") |
| | | private Integer usePersonId; |
| | | |
| | | @ApiModelProperty("使ç¨äºº") |
| | | private String usePerson; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("使ç¨å¼å§æ¥æ") |
| | | private LocalDateTime useStartDate; |
| | | |
| | | @ApiModelProperty("使ç¨ç»ææ¥æ") |
| | | private LocalDateTime useEndDate; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ¥åºç³è¯·è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 01:53:47 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_scrapped") |
| | | @ApiModel(value = "DeviceScrapped对象", description = "è®¾å¤æ¥åºç³è¯·è¡¨") |
| | | public class DeviceScrapped { |
| | | |
| | | @TableId(value = "scrapped_id", type = IdType.AUTO) |
| | | private Integer scrappedId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("é
ä»¶") |
| | | private String parts; |
| | | |
| | | @ApiModelProperty("æ¥åºçç±") |
| | | private String reasonsForScrap; |
| | | |
| | | @ApiModelProperty("ç³è¯·äººid") |
| | | private Integer applicantUserId; |
| | | |
| | | @ApiModelProperty("ç³è¯·äºº") |
| | | private String applicantUser; |
| | | |
| | | @ApiModelProperty("ç³è¯·æ¶é´") |
| | | private LocalDate applicantDate; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººæè§") |
| | | private String departmentHeadOpinion; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººid") |
| | | private Integer departmentHeadUserId; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äºº") |
| | | private String departmentHeadUser; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººå¡«åæ¶é´") |
| | | private LocalDate departmentHeadDate; |
| | | |
| | | @ApiModelProperty("计é室æè§") |
| | | private String meteringRoomOpinion; |
| | | |
| | | @ApiModelProperty("计é室人id") |
| | | private Integer meteringRoomUserId; |
| | | |
| | | @ApiModelProperty("计é室人") |
| | | private String meteringRoomUser; |
| | | |
| | | @ApiModelProperty("计éå®¤äººå¡«åæ¶é´") |
| | | private LocalDate meteringRoomDate; |
| | | |
| | | @ApiModelProperty("æ¹å人æè§") |
| | | private String approverOpinion; |
| | | |
| | | @ApiModelProperty("æ¹å人id") |
| | | private Integer approverUserId; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private String approverUser; |
| | | |
| | | @ApiModelProperty("æ¹åäººå¡«åæ¶é´") |
| | | private LocalDate approverDate; |
| | | |
| | | @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.ruoyi.device.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤åç¨/å¯ç¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_state") |
| | | @ApiModel(value = "DeviceState对象", description = "设å¤åç¨/å¯ç¨") |
| | | public class DeviceState implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("设å¤åç¨å¯ç¨id") |
| | | @TableId(value = "state_id", type = IdType.AUTO) |
| | | private Integer stateId; |
| | | |
| | | @ApiModelProperty("æµç¨ç¼å·") |
| | | private String processNumber; |
| | | |
| | | @ApiModelProperty("0é
ä»¶") |
| | | private String accessoryPart; |
| | | |
| | | @ApiModelProperty("0设å¤ç¶æ") |
| | | private String deviceStatus; |
| | | |
| | | @ApiModelProperty("0åç¨å¯ç¨çç±") |
| | | private String reason; |
| | | |
| | | @ApiModelProperty("0ä¸ç¯è责任人") |
| | | private String submitNextPesponsible; |
| | | |
| | | @ApiModelProperty("0æä½äºº") |
| | | private String submitOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("0æ¥æ") |
| | | private LocalDateTime submitDate; |
| | | |
| | | @ApiModelProperty("1é¨é¨è´è´£äººæè§") |
| | | private String departmentReviewOpinion; |
| | | |
| | | @ApiModelProperty("1ä¸ç¯è责任人") |
| | | private String departmentNextPesponsible; |
| | | |
| | | @ApiModelProperty("1æä½äºº") |
| | | private String departmentOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("1æ¥æ") |
| | | private LocalDateTime departmentDate; |
| | | |
| | | @ApiModelProperty("2计é室æè§") |
| | | private String measuringRoomReviewOpinion; |
| | | |
| | | @ApiModelProperty("2ä¸ç¯è责任人") |
| | | private String measuringRoomNextPesponsible; |
| | | |
| | | @ApiModelProperty("2æä½äºº") |
| | | private String measuringRoomOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("2æ¥æ") |
| | | private LocalDateTime measuringRoomDate; |
| | | |
| | | @ApiModelProperty("3æ¹åæè§") |
| | | private String approvalOpinion; |
| | | |
| | | @ApiModelProperty("3ä¸ç¯è责任人") |
| | | private String approvalNextPesponsible; |
| | | |
| | | @ApiModelProperty("3æä½äºº") |
| | | private String approvalOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("3æ¥æ") |
| | | private LocalDateTime approvalDate; |
| | | |
| | | @ApiModelProperty("å½åç¶æ") |
| | | private String currentState; |
| | | |
| | | @ApiModelProperty("设å¤Id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("å½åç¯èè´è´£äºº") |
| | | private String currentResponsible; |
| | | |
| | | @ApiModelProperty("æäº¤äºº") |
| | | @ExcelProperty(value = "æäº¤äºº") |
| | | private String createUser; |
| | | |
| | | @ApiModelProperty("æäº¤æ¥æ") |
| | | @ExcelProperty(value = "æäº¤æ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:44 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_traceability_management") |
| | | @ApiModel(value = "DeviceTraceabilityManagement对象", description = "设å¤é弿º¯æºè®¡å表") |
| | | public class DeviceTraceabilityManagement{ |
| | | |
| | | @ApiModelProperty("设å¤é弿º¯æºè®¡åid") |
| | | @TableId(value = "traceability_management_id", type = IdType.AUTO) |
| | | private Integer traceabilityManagementId; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String planName; |
| | | |
| | | @ApiModelProperty("计å年份") |
| | | private String planYear; |
| | | |
| | | @ApiModelProperty("ç¼å¶äººid") |
| | | private Integer compilerId; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private String compiler; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | private LocalDateTime datePreparation; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æï¼0æªå®¡æ ¸ï¼1å®¡æ ¸") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äººid") |
| | | private Integer auditId; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äºº") |
| | | private String audit; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private LocalDateTime auditDate; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ä¿¡æ¯") |
| | | private String auditRemark; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("åå»ºæ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å详æ
表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:58 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_traceability_management_details") |
| | | @ApiModel(value = "DeviceTraceabilityManagementDetails对象", description = "设å¤é弿º¯æºè®¡å详æ
表") |
| | | public class DeviceTraceabilityManagementDetails implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("设å¤é弿º¯æºè®¡å详æ
id") |
| | | @TableId(value = "traceability_management_detail_id", type = IdType.AUTO) |
| | | private Integer traceabilityManagementDetailId; |
| | | |
| | | @ApiModelProperty("设å¤é弿º¯æºè®¡åid") |
| | | private Integer traceabilityManagementId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("ææ¯ææ åæ°") |
| | | private String technicalIndexParameters; |
| | | |
| | | @ApiModelProperty("ææ¯ææ è¦æ±") |
| | | private String technicalRequirements; |
| | | |
| | | @ApiModelProperty("æ£å®å¨æ") |
| | | private String verificationCycle; |
| | | |
| | | @ApiModelProperty("æ£å®åä½") |
| | | private String verificationUnit; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("åå»ºæ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤ - ä½ä¸æå¯¼ä¹¦ æ·»å åæ§æä»¶ å |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-12-04 10:43:32 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_operation_instruction") |
| | | public class OperationInstruction { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("设å¤ä¸»é®id") |
| | | private String deviceId; |
| | | |
| | | @ApiModelProperty("æä»¶ç±»å") |
| | | private String documentType; |
| | | |
| | | @ApiModelProperty("ææ¡£ç¼å·") |
| | | private String documentNumber; |
| | | |
| | | @ApiModelProperty("æä»¶çæ¬") |
| | | private String documentVersion; |
| | | |
| | | @ApiModelProperty("ä½è
") |
| | | private String author; |
| | | |
| | | @ApiModelProperty("æäº¤æ¥æ") |
| | | private LocalDate submitDate; |
| | | |
| | | @ApiModelProperty("ææ¡£è¯´æ") |
| | | private String documentNote; |
| | | |
| | | @ApiModelProperty("ç³»ç»çæåç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ç³»ç»çæåç§°") |
| | | private String fileSystemName; |
| | | |
| | | @ApiModelProperty("ä½ä¸æå¯¼ä¹¦id") |
| | | private Integer instructionId; |
| | | |
| | | @ApiModelProperty("ä¸ä¼ 人id") |
| | | private Integer uploader; |
| | | |
| | | @ApiModelProperty("审æ¹äººid") |
| | | private Integer approverId; |
| | | |
| | | @ApiModelProperty("审æ¹ç¶æ") |
| | | private Boolean status; |
| | | |
| | | @ApiModelProperty("çææ¶é´") |
| | | private LocalDateTime entryIntoForceTime; |
| | | |
| | | @ApiModelProperty("ä¸ä¼ æ¶é´") |
| | | private LocalDateTime uploadTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.CollectBridge; |
| | | |
| | | /** |
| | | * æ°åçµæ¡¥éé |
| | | * |
| | | * @author zhuo |
| | | * @since 2025-02-19 |
| | | */ |
| | | public interface CollectBridgeService extends IService<CollectBridge> { |
| | | |
| | | /** |
| | | * å¡«å
ééæ°æ® |
| | | * @param jsonObject |
| | | */ |
| | | void addBridgeValue(JSONObject jsonObject); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DataConfigDto; |
| | | import com.ruoyi.device.pojo.DataConfig; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-07-13 12:23:00 |
| | | */ |
| | | public interface DataConfigService extends IService<DataConfig> { |
| | | |
| | | |
| | | /** |
| | | * ç»´æ¤è®¾å¤æä»¶é
ç½® |
| | | * @param dataConfigList |
| | | */ |
| | | void saveDeviceFileConfiguration(DataConfigDto dataConfigList); |
| | | |
| | | /** |
| | | * æ°éé
ç½® |
| | | * @param dataConfigList |
| | | */ |
| | | void saveDataAcquisitionConfiguration(DataConfigDto dataConfigList); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ°éé
ç½® |
| | | * @param dataConfig |
| | | * @return |
| | | */ |
| | | Result<?> queryDataAcquisitionConfiguration(DataConfig dataConfig); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªé¡¹æ°éé
ç½® |
| | | * @param dataConfig |
| | | * @return |
| | | */ |
| | | Result<?> queryProductConfiguration(DataConfig dataConfig); |
| | | |
| | | /** |
| | | * æ¥è¯¢äºç»å®ä½æ¯æ²¡æé
ç½®çæ£éªé¡¹ |
| | | * @param deviceId |
| | | * @return |
| | | */ |
| | | IPage<DataConfig> getNoConfigProduct(Page page, Integer deviceId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceAcceptanceFile; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤)é件表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:26 |
| | | */ |
| | | public interface DeviceAcceptanceFileService extends IService<DeviceAcceptanceFile> { |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceAcceptance; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤) æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:14 |
| | | */ |
| | | public interface DeviceAcceptanceService extends IService<DeviceAcceptance> { |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å表 |
| | | * @param page |
| | | * @param deviceAcceptance |
| | | * @return |
| | | */ |
| | | IPage<DeviceAcceptance> pageDeviceAcceptance(Page page, DeviceAcceptance deviceAcceptance); |
| | | |
| | | |
| | | boolean uploadDeviceAcceptanceFile(Integer acceptanceId, MultipartFile file); |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å¯¼åº |
| | | * @param acceptanceId 设å¤éªæ¶id |
| | | * @param response ååºä½ |
| | | * @return |
| | | */ |
| | | void exportDeviceAcceptance(Integer acceptanceId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceAccidentReport; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤äºæ
æ¥åå æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 06:31:12 |
| | | */ |
| | | public interface DeviceAccidentReportService extends IService<DeviceAccidentReport> { |
| | | |
| | | /** |
| | | * 设å¤äºæ
æ¥åå表 |
| | | * @param page |
| | | * @param deviceAccidentReport |
| | | * @return |
| | | */ |
| | | IPage<DeviceAccidentReport> pageDeviceAccidentReport(Page page, DeviceAccidentReport deviceAccidentReport); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤äºæ
æ¥å |
| | | * @param deviceAccidentReport |
| | | * @return |
| | | */ |
| | | boolean addDeviceAccidentReport(DeviceAccidentReport deviceAccidentReport); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤äºæ
æ¥å |
| | | * @param accidentReportId 设å¤äºæ
æ¥åid |
| | | * @param response ååº |
| | | */ |
| | | void exportDeviceAccidentReport(Integer accidentReportId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceBorrow; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 10:53:51 |
| | | */ |
| | | public interface DeviceBorrowService extends IService<DeviceBorrow> { |
| | | |
| | | IPage<DeviceBorrow> deviceBorrowPage(Page page, DeviceBorrow deviceBorrow); |
| | | |
| | | int saveDeviceBorrow(DeviceBorrow deviceBorrow); |
| | | |
| | | DeviceBorrow getDeviceBorrow(Integer id); |
| | | |
| | | List<DeviceBorrow> getDeviceBorrowBydeviceId(Integer deviceId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.dto.DeviceBreakdownMaintenance; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é维修表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 04:50:57 |
| | | */ |
| | | public interface DeviceBreakdownMaintenanceService extends IService<DeviceBreakdownMaintenance> { |
| | | |
| | | /** |
| | | * è®¾å¤æ
éç»´ä¿®å表 |
| | | * @param page |
| | | * @param deviceBreakdownMaintenance |
| | | * @return |
| | | */ |
| | | IPage<DeviceBreakdownMaintenance> pageDeviceBreakdownMaintenance(Page page, DeviceBreakdownMaintenance deviceBreakdownMaintenance); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ
éç»´ä¿® |
| | | * @param deviceBreakdownMaintenance |
| | | * @return |
| | | */ |
| | | boolean addDeviceBreakdownMaintenance(DeviceBreakdownMaintenance deviceBreakdownMaintenance); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ
éç»´ä¿® |
| | | * @param maintenanceId è®¾å¤æ
éç»´ä¿®id |
| | | * @param response ååº |
| | | */ |
| | | void exportDeviceBreakdownMaintenance(Integer maintenanceId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceCalibrationPlanDetail; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å详æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:29 |
| | | */ |
| | | public interface DeviceCalibrationPlanDetailService extends IService<DeviceCalibrationPlanDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.dto.DeviceCalibrationPlanDto; |
| | | import com.ruoyi.device.pojo.DeviceCalibrationPlan; |
| | | import com.ruoyi.device.pojo.DeviceCalibrationPlanDetail; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å主表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:17 |
| | | */ |
| | | public interface DeviceCalibrationPlanService extends IService<DeviceCalibrationPlan> { |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¡å计å |
| | | * @param calibrationPlanDto |
| | | * @return |
| | | */ |
| | | boolean addDeviceCalibrationPlan(DeviceCalibrationPlanDto calibrationPlanDto); |
| | | |
| | | /** |
| | | * 导å
¥è®¾å¤æ ¡å计å |
| | | * @param file |
| | | * @return |
| | | */ |
| | | boolean importDeviceCalibrationPlan(MultipartFile file, String planYear); |
| | | |
| | | /** |
| | | * æäº¤æ¹å |
| | | * @param deviceCalibrationPlan |
| | | * @return |
| | | */ |
| | | boolean submiatRatifyDeviceCalibrationPlan(DeviceCalibrationPlan deviceCalibrationPlan); |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡åè®¡åæ¹å |
| | | * @param DeviceCalibrationPlan |
| | | * @return |
| | | */ |
| | | boolean ratifyDeviceCalibrationPlan(DeviceCalibrationPlan DeviceCalibrationPlan); |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计åå表 |
| | | * @param page |
| | | * @param DeviceCalibrationPlan |
| | | * @return |
| | | */ |
| | | IPage<DeviceCalibrationPlanDto> pageDeviceCalibrationPlan(Page page, DeviceCalibrationPlan deviceCalibrationPlan); |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计å详æ
å表 |
| | | * @param page |
| | | * @param DeviceCalibrationPlanDetails |
| | | * @return |
| | | */ |
| | | IPage<DeviceCalibrationPlanDetail> pageDeviceCalibrationPlanDetail(Page page, DeviceCalibrationPlanDetail deviceCalibrationPlanDetails); |
| | | |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ ¡å计å |
| | | * |
| | | * @param DeviceCalibrationPlanId |
| | | * @param response |
| | | */ |
| | | void exportDeviceCalibrationPlanDetail(Integer DeviceCalibrationPlanId, HttpServletResponse response); |
| | | |
| | | /** |
| | | * æ¹éç¼è¾è®¾å¤æ ¡å详æ
|
| | | * @param calibrationPlanDto |
| | | * @return |
| | | */ |
| | | boolean updateDeviceCalibrationPlan(DeviceCalibrationPlanDto calibrationPlanDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ ¡å详æ
|
| | | * @param planId |
| | | * @return |
| | | */ |
| | | DeviceCalibrationPlanDto getDeviceCalibrationPlan(Integer planId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceDocuments; |
| | | |
| | | /** |
| | | * è®¾å¤æ¡£æ¡ |
| | | */ |
| | | public interface DeviceDocumentsService extends IService<DeviceDocuments> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlanDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:16 |
| | | */ |
| | | public interface DeviceExaminePlanDetailsService extends IService<DeviceExaminePlanDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.dto.DeviceExaminePlanDetailsDto; |
| | | import com.ruoyi.device.dto.DeviceExaminePlanDto; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlan; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlanDetails; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å主表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:04 |
| | | */ |
| | | public interface DeviceExaminePlanService extends IService<DeviceExaminePlan> { |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¸æ¥è®¡å |
| | | * @param examinePlanDto |
| | | * @return |
| | | */ |
| | | boolean addDeviceExaminePlan(DeviceExaminePlanDto examinePlanDto); |
| | | |
| | | /** |
| | | * 导å
¥è®¾å¤æ ¸æ¥è®¡å |
| | | * @param file |
| | | * @return |
| | | */ |
| | | boolean importDeviceExaminePlan(MultipartFile file); |
| | | |
| | | /** |
| | | * æäº¤æ¹å |
| | | * @param deviceExaminePlan |
| | | * @return |
| | | */ |
| | | boolean submitRatifyDeviceExaminePlan(DeviceExaminePlan deviceExaminePlan); |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åæ¹å |
| | | * @param DeviceExaminePlan |
| | | * @return |
| | | */ |
| | | boolean ratifyDeviceExaminePlan(DeviceExaminePlan DeviceExaminePlan); |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åå表 |
| | | * @param page |
| | | * @param DeviceExaminePlan |
| | | * @return |
| | | */ |
| | | IPage<DeviceExaminePlanDto> pageDeviceExaminePlan(Page page, DeviceExaminePlan DeviceExaminePlan); |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
å表 |
| | | * @param page |
| | | * @param DeviceExaminePlanDetails |
| | | * @return |
| | | */ |
| | | IPage<DeviceExaminePlanDetailsDto> pageDeviceExaminePlanDetail(Page page, DeviceExaminePlanDetails DeviceExaminePlanDetails); |
| | | |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ ¸æ¥è®¡å |
| | | * @param deviceExaminePlanId è®¾å¤æ ¸æ¥è®¡åid |
| | | * @param response ååº |
| | | */ |
| | | void exportDeviceExaminePlanDetail(Integer deviceExaminePlanId, HttpServletResponse response); |
| | | |
| | | /** |
| | | * æ¹éä¿®æ¹è®¾å¤æ ¸æ¥è®¡å |
| | | * @param examinePlanDto |
| | | * @return |
| | | */ |
| | | boolean updateDeviceExaminePlan(DeviceExaminePlanDto examinePlanDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | * @param planId |
| | | * @return |
| | | */ |
| | | DeviceExaminePlanDto getDeviceExaminePlan(Integer planId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordContrastDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¯¦æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:57 |
| | | */ |
| | | public interface DeviceExamineRecordContrastDetailsService extends IService<DeviceExamineRecordContrastDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.dto.DeviceExamineRecordContrastDto; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordContrast; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:43 |
| | | */ |
| | | public interface DeviceExamineRecordContrastService extends IService<DeviceExamineRecordContrast> { |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | DeviceExamineRecordContrastDto getExamineRecordContrast(Integer planDetailsId); |
| | | |
| | | /** |
| | | * æ°å¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | * |
| | | */ |
| | | boolean addExamineRecordContrast(DeviceExamineRecordContrastDto deviceExamineRecordContrastDto); |
| | | |
| | | /** |
| | | * å®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | boolean reviewExamineRecordContrast(DeviceExamineRecordContrastDto deviceExamineRecordContrastDto); |
| | | |
| | | /** |
| | | * 导åºå®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * |
| | | * @param recordId å®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½id |
| | | * @param response |
| | | * @return |
| | | */ |
| | | void exportReviewExamineRecordContrast(Integer recordId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordDetail; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¯¦æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:15:11 |
| | | */ |
| | | public interface DeviceExamineRecordDetailService extends IService<DeviceExamineRecordDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.dto.DeviceExamineRecordDto; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecord; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:28 |
| | | */ |
| | | public interface DeviceExamineRecordService extends IService<DeviceExamineRecord> { |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥è®°å½ |
| | | * @return |
| | | */ |
| | | DeviceExamineRecordDto getExamineRecord(Integer planDetailsId); |
| | | |
| | | /** |
| | | * æ°å¢æ ¸æ¥è®°å½ |
| | | * @return |
| | | */ |
| | | boolean addExamineRecord(DeviceExamineRecordDto deviceExamineRecordDto); |
| | | |
| | | /** |
| | | * 夿 ¸æ ¸æ¥è®°å½ |
| | | * @return |
| | | */ |
| | | boolean reviewExamineRecord(DeviceExamineRecordDto deviceExamineRecordDto); |
| | | |
| | | /** |
| | | * 导åºå¤æ ¸æ ¸æ¥è®°å½ |
| | | * @param planDetailsId |
| | | * @param response ååº |
| | | */ |
| | | void exportReviewExamineRecordDetail(Integer planDetailsId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceExternalApply; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 10:28:43 |
| | | */ |
| | | public interface DeviceExternalApplyService extends IService<DeviceExternalApply> { |
| | | |
| | | /** |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·å表 |
| | | * @param page |
| | | * @param deviceExternalApply |
| | | * @return |
| | | */ |
| | | IPage<DeviceExternalApply> pageDeviceExternalApply(Page page, DeviceExternalApply deviceExternalApply); |
| | | |
| | | /** |
| | | * æ°å¢å©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @param deviceExternalApply |
| | | * @return |
| | | */ |
| | | boolean addDeviceExternalApply(DeviceExternalApply deviceExternalApply); |
| | | |
| | | /** |
| | | * 导åºå©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * |
| | | * @param externalApplyId å¤é¨è®¾å¤ç³è¯·id |
| | | * @param response |
| | | */ |
| | | void exportDeviceExternalApply(Integer externalApplyId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceImpowerDetails; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å详æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-04-17 03:23:39 |
| | | */ |
| | | public interface DeviceImpowerDetailsService extends IService<DeviceImpowerDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceImpowerDto; |
| | | import com.ruoyi.device.pojo.DeviceImpower; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceImpower; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä½¿ç¨ææè¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-04-17 03:23:23 |
| | | */ |
| | | public interface DeviceImpowerService extends IService<DeviceImpower> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ä½¿ç¨ææ |
| | | * @param page å页忰 |
| | | * @param itemParameter ä½¿ç¨ææ |
| | | * @return |
| | | */ |
| | | Result<IPage<DeviceImpower>> selectDeviceImpowerByPage(@Param("page") Page page, @Param("itemParameter") DeviceImpowerDto itemParameter); |
| | | |
| | | /** |
| | | * æ°å¢ä½¿ç¨ææ |
| | | * @param deviceImpowerDto ä½¿ç¨ææ |
| | | */ |
| | | Result addImpower(DeviceImpowerDto deviceImpowerDto); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä½¿ç¨ææ |
| | | * @param deviceImpowerDto ä½¿ç¨ææ |
| | | */ |
| | | Result updateImpower(DeviceImpowerDto deviceImpowerDto); |
| | | |
| | | /** |
| | | * å é¤ä½¿ç¨ææ |
| | | * @param deviceImpowerDto ä½¿ç¨ææ |
| | | */ |
| | | Result deleteImpower(DeviceImpowerDto deviceImpowerDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä½¿ç¨ææè¯¦æ
|
| | | */ |
| | | Result<DeviceImpowerDto> getImpowerDetail(Integer impowerId); |
| | | |
| | | /** |
| | | * æäº¤æ¹å |
| | | * @param deviceImpowerDto |
| | | * @return |
| | | */ |
| | | Result submitReviewImpowerStatus(DeviceImpowerDto deviceImpowerDto); |
| | | |
| | | /** |
| | | * ä½¿ç¨ææå®¡æ ¸ |
| | | */ |
| | | Result reviewImpowerStatus(DeviceImpowerDto deviceImpowerDto); |
| | | |
| | | /** |
| | | * ä½¿ç¨ææå¯¼åº |
| | | */ |
| | | Result exportDeviceImpowerDto(Integer impowerId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceInspectionRecordDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:27:32 |
| | | */ |
| | | public interface DeviceInspectionRecordDetailsService extends IService<DeviceInspectionRecordDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceInspectionRecordDto; |
| | | import com.ruoyi.device.pojo.DeviceInspectionRecord; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ç¹æ£è®°å½è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:25:14 |
| | | */ |
| | | public interface DeviceInspectionRecordService extends IService<DeviceInspectionRecord> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½ |
| | | * @param page |
| | | */ |
| | | Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(Page page, DeviceInspectionRecordDto deviceInspectionRecord); |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£è¯¦æ
|
| | | * @param inspectionRecordId |
| | | * @return |
| | | */ |
| | | Result getDeviceInspectionRecord(Integer inspectionRecordId); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | Result addDeviceInspectionRecord(DeviceInspectionRecordDto deviceInspectionRecord); |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ç¹æ£è®°å½ |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | Result updateInspectionRecordAndDetails(DeviceInspectionRecordDto deviceInspectionRecord); |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ç¹æ£è®°å½ |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | Result deleteDeviceInspectionRecordOrDetails(DeviceInspectionRecordDto deviceInspectionRecord); |
| | | |
| | | /** |
| | | * 夿 ¸ç¹æ£è®°å½ |
| | | * @param deviceExamineRecordDto |
| | | * @return |
| | | */ |
| | | Result reviewDeviceInspectionRecord(DeviceInspectionRecordDto deviceExamineRecordDto); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param deviceInspectionRecordId 设å¤ç¹æ£è®°å½id |
| | | * @param response |
| | | */ |
| | | Result exportDeviceInspectionRecord(Integer deviceInspectionRecordId, HttpServletResponse response); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.dto.DeviceInstructionDto; |
| | | import com.ruoyi.device.dto.DeviceOperationInstructionDto; |
| | | import com.ruoyi.device.pojo.DeviceInstruction; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-12-04 10:29:18 |
| | | */ |
| | | public interface DeviceInstructionService extends IService<DeviceInstruction> { |
| | | |
| | | IPage<DeviceOperationInstructionDto> pageByPageQueryOfHomeworkInstructions(Page page, DeviceOperationInstructionDto operationInstructionDto); |
| | | |
| | | void newHomeworkGuidebookAdded(DeviceInstructionDto instructionDto); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceMaintenancePlanDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å详æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:11:46 |
| | | */ |
| | | public interface DeviceMaintenancePlanDetailsService extends IService<DeviceMaintenancePlanDetails> { |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceMaintenancePlanDto; |
| | | import com.ruoyi.device.pojo.DeviceMaintenancePlan; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:10:52 |
| | | */ |
| | | public interface DeviceMaintenancePlanService extends IService<DeviceMaintenancePlan> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | * @param page å½å页 |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | * @return |
| | | */ |
| | | Result<IPage<DeviceMaintenancePlan>> selectDeviceMaintenancePlanByPage(Page page, DeviceMaintenancePlanDto deviceMaintenancePlanDto); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | Result addMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto); |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | Result updateMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto); |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ä¿å
»è®¡å |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | Result deleteMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param maintenancePlanId 设å¤ä¿å
»è®¡åid |
| | | * @param response ååº |
| | | */ |
| | | Result exportDeviceMaintenancePlanDto(Integer maintenancePlanId, HttpServletResponse response); |
| | | |
| | | /** |
| | | * æ¥ç设å¤ä¿å
»è®¡å详æ
|
| | | * @param maintenancePlanId 设å¤ä¿å
»è®¡åid |
| | | * @return |
| | | */ |
| | | Result<DeviceMaintenancePlanDto> getMaintenancePlanDetail(Integer maintenancePlanId); |
| | | |
| | | /** |
| | | * æäº¤å®¡æ ¸ |
| | | * @param deviceMaintenancePlanDto |
| | | * @return |
| | | */ |
| | | Result submitReviewMaintenancePlanStatus(DeviceMaintenancePlanDto deviceMaintenancePlanDto); |
| | | |
| | | /** |
| | | * å®¡æ ¸è®¾å¤ä¿å
»è®¡åç¶æ |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | * @return |
| | | */ |
| | | Result reviewMaintenancePlanStatus(DeviceMaintenancePlanDto deviceMaintenancePlanDto); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceMaintenanceDto; |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * 设å¤ç»´æ¤ä¿å
» |
| | | */ |
| | | public interface DeviceMaintenanceService extends IService<DeviceMaintenance> { |
| | | |
| | | /** |
| | | * 设å¤ç»´æ¤å页æ¥è¯¢ |
| | | * @return |
| | | */ |
| | | IPage<DeviceMaintenanceDto> selectDeviceMaintenancePage(Page page, DeviceMaintenanceDto deviceMaintenance); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ç»´æ¤ä¿å
» |
| | | * @param deviceId |
| | | * @param response |
| | | * @return |
| | | */ |
| | | void exportDeviceMaintenance(Integer deviceId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceMetricRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-27 10:20:01 |
| | | */ |
| | | public interface DeviceMetricRecordService extends IService<DeviceMetricRecord> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceMetricsCopy; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç® æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-27 10:20:11 |
| | | */ |
| | | public interface DeviceMetricsCopyService extends IService<DeviceMetricsCopy> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.dto.DeviceOperationInstructionDto; |
| | | import com.ruoyi.device.pojo.OperationInstruction; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤ - ä½ä¸æå¯¼ä¹¦ æ·»å åæ§æä»¶ å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-12-04 10:43:32 |
| | | */ |
| | | public interface DeviceOperationInstructionService extends IService<OperationInstruction> { |
| | | |
| | | List<DeviceOperationInstructionDto> homeworkGuidebookEditor(Integer instructionId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.dto.DeviceRecordDto; |
| | | import com.ruoyi.device.pojo.DeviceRecord; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 11:06:47 |
| | | */ |
| | | public interface DeviceRecordService extends IService<DeviceRecord> { |
| | | |
| | | IPage<DeviceRecordDto> deviceRecordPage(Integer deviceId, Page page, String sampleCode, String managementNumber); |
| | | |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ä½¿ç¨è®°å½ |
| | | * |
| | | * @param deviceId |
| | | * @param response |
| | | */ |
| | | void exportUseRecord(Integer deviceId, String exportDate, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.pojo.DeviceScrapped; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ¥åºç³è¯·è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 01:53:47 |
| | | */ |
| | | public interface DeviceScrappedService extends IService<DeviceScrapped> { |
| | | |
| | | /** |
| | | * è®¾å¤æ¥åºç³è¯·å表 |
| | | * @param page |
| | | * @param deviceScrapped |
| | | * @return |
| | | */ |
| | | IPage<DeviceScrapped> pageDeviceScrapped(Page page, DeviceScrapped deviceScrapped); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ¥åºç³è¯· |
| | | * @param deviceScrapped |
| | | * @return |
| | | */ |
| | | boolean addDeviceScrapped(DeviceScrapped deviceScrapped); |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤æ¥åºç³è¯· |
| | | * @param scrappedId è®¾å¤æ¥åºç³è¯·id |
| | | * @return |
| | | */ |
| | | Result exportDeviceScrapped(Integer scrappedId, HttpServletResponse response); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.device.dto.DeviceCollectionDto; |
| | | import com.ruoyi.device.dto.DeviceDto; |
| | | import com.ruoyi.device.pojo.Device; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 设å¤(Device)表æå¡æ¥å£ |
| | | */ |
| | | public interface DeviceService extends IService<Device> { |
| | | |
| | | |
| | | IPage<DeviceDto> selectDeviceParameter(Page page, DeviceDto itemParameter, Boolean laboratoryNameIsNull); |
| | | |
| | | int addDeviceParameter(Device itemParameter); |
| | | |
| | | int delDeviceParameter(Integer id); |
| | | |
| | | int upDeviceParameter(Device itemParameter); |
| | | |
| | | List<Device> selectEquipmentOverview(); |
| | | |
| | | List<Device> authorizedPerson(); |
| | | |
| | | List<Device> search(Integer status, String deviceName, String specificationModel, String largeCategory); |
| | | |
| | | List<Device> selectDeviceByCategory(String inspectionItem, String inspectionItemSubclass,String laboratory); |
| | | |
| | | DeviceDto selectDeviceByCode(Integer id); |
| | | |
| | | Result<?> dataAcquisition(HttpServletRequest request, DeviceCollectionDto dto); |
| | | |
| | | List<Map<String, Object>> treeDevice(String deviceName); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤å表 |
| | | * @param deviceId |
| | | * @param response |
| | | */ |
| | | void exportDeviceFile(Integer deviceId, HttpServletResponse response); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤å·¥å
·æç» |
| | | * @param response |
| | | */ |
| | | void exportEquipmentDetails(HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.dto.DeviceStateDto; |
| | | import com.ruoyi.device.pojo.DeviceState; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤åç¨/å¯ç¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | public interface DeviceStateService extends IService<DeviceState> { |
| | | |
| | | IPage<DeviceStateDto> getDeviceStatePage(Integer deviceId, Page page, String processNumber); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ç¶æ |
| | | * |
| | | * @param deviceId |
| | | * @param processNumber |
| | | * @param response |
| | | */ |
| | | void exportDeviceStatus(Integer deviceId, String processNumber, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceTraceabilityManagementDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å详æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:58 |
| | | */ |
| | | public interface DeviceTraceabilityManagementDetailsService extends IService<DeviceTraceabilityManagementDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DeviceTraceabilityManagementDto; |
| | | import com.ruoyi.device.pojo.DeviceTraceabilityManagement; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:44 |
| | | */ |
| | | public interface DeviceTraceabilityManagementService extends IService<DeviceTraceabilityManagement> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢é弿º¯æºè®¡å |
| | | * @param page å页忰 |
| | | * @param itemParameter é弿º¯æºè®¡å |
| | | * @return |
| | | */ |
| | | Result<IPage<DeviceTraceabilityManagement>> selectDeviceTraceabilityManagementByPage(@Param("page") Page page, @Param("itemParameter") DeviceTraceabilityManagementDto itemParameter); |
| | | |
| | | /** |
| | | * æ°å¢é弿º¯æºè®¡å |
| | | * @param deviceTraceabilityManagementDto é弿º¯æºè®¡å |
| | | */ |
| | | Result addTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto); |
| | | |
| | | /** |
| | | * ä¿®æ¹é弿º¯æºè®¡å |
| | | * @param deviceTraceabilityManagementDto é弿º¯æºè®¡å |
| | | */ |
| | | Result updateTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto); |
| | | |
| | | /** |
| | | * å é¤é弿º¯æºè®¡å |
| | | * @param deviceTraceabilityManagementDto é弿º¯æºè®¡å |
| | | */ |
| | | Result deleteTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢é弿º¯æºè®¡å详æ
|
| | | */ |
| | | Result<DeviceTraceabilityManagementDto> getTraceabilityManagementDetail(Integer traceabilityManagementId); |
| | | |
| | | /** |
| | | * æäº¤æ¹å |
| | | * @param deviceTraceabilityManagementDto |
| | | * @return |
| | | */ |
| | | Result submitReviewTraceabilityManagementStatus(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto); |
| | | |
| | | /** |
| | | * é弿º¯æºè®¡åå®¡æ ¸ |
| | | */ |
| | | Result reviewTraceabilityManagementStatus(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto); |
| | | |
| | | /** |
| | | * é弿º¯æºè®¡åå¯¼åº |
| | | */ |
| | | Result exportDeviceTraceabilityManagementDto(Integer traceabilityManagementId, HttpServletResponse response); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.pojo.DeviceMetric; |
| | | |
| | | public interface IDeviceMetricService extends IService<DeviceMetric> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.CollectBridgeMapper; |
| | | import com.ruoyi.device.pojo.CollectBridge; |
| | | import com.ruoyi.device.service.CollectBridgeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.Duration; |
| | | import java.time.Instant; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | |
| | | /** |
| | | * æ°åçµæ¡¥éé |
| | | * |
| | | * @author zhuo |
| | | * @since 2025-02-19 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class CollectBridgeServiceImpl extends ServiceImpl<CollectBridgeMapper, CollectBridge> implements CollectBridgeService { |
| | | |
| | | /** |
| | | * å¡«å
ééæ°æ® |
| | | * @param jsonObject |
| | | */ |
| | | @Override |
| | | public void addBridgeValue(JSONObject jsonObject) { |
| | | JSONArray dataArray = jsonObject.getJSONArray("data"); |
| | | for (int i = 0; i < dataArray.size(); i++) { |
| | | JSONObject listInfo = dataArray.getJSONObject(i); |
| | | // å卿°æ® |
| | | String dataStream = listInfo.getString("dataStream"); |
| | | if (dataStream.equals("DQCS.DQCS.SN")) { |
| | | JSONArray dataPoints = listInfo.getJSONArray("dataPoints"); |
| | | JSONObject pointsJSONObject = dataPoints.getJSONObject(0); |
| | | String entrustCode = pointsJSONObject.getString("value"); |
| | | // è§£ææ¶é´æ³ |
| | | Instant instant = Instant.ofEpochMilli(pointsJSONObject.getLong("time")); |
| | | LocalDateTime collectDate = LocalDateTime.ofInstant(instant, ZoneId.systemDefault()); |
| | | |
| | | // å
åå¨ç¼å·, åç»åå¨å¼ |
| | | CollectBridge collectBridge = new CollectBridge(); |
| | | collectBridge.setEntrustCode(entrustCode); |
| | | collectBridge.setCollectDate(collectDate); |
| | | baseMapper.insert(collectBridge); |
| | | |
| | | } |
| | | // å¯åå¨å°åçäº64è·åç»æå¼ |
| | | if (dataStream.equals("DQCS.DQCS.64")) { |
| | | JSONArray dataPoints = listInfo.getJSONArray("dataPoints"); |
| | | JSONObject pointsJSONObject = dataPoints.getJSONObject(0); |
| | | String value = pointsJSONObject.getString("value"); |
| | | |
| | | if (value.equals("64")) { |
| | | for (int j = 0; j < dataArray.size(); j++) { |
| | | JSONObject listInfo2 = dataArray.getJSONObject(j); |
| | | String dataStream2 = listInfo2.getString("dataStream"); |
| | | // å¯åå¨å°åçäº64è·åç»æå¼ |
| | | if (dataStream2.equals("DQCS.DQCS.DZZ")) { |
| | | JSONArray dataPoints2 = listInfo2.getJSONArray("dataPoints"); |
| | | JSONObject pointsJSONObject2 = dataPoints2.getJSONObject(0); |
| | | String collectValue = pointsJSONObject2.getString("value"); |
| | | |
| | | // è§£ææ¶é´æ³ |
| | | Instant instant = Instant.ofEpochMilli(pointsJSONObject2.getLong("time")); |
| | | LocalDateTime collectDate = LocalDateTime.ofInstant(instant, ZoneId.systemDefault()); |
| | | |
| | | // æ¥è¯¢ææ°ä¸æ¡æ°æ® |
| | | CollectBridge collectBridge = baseMapper.selectOne(Wrappers.<CollectBridge>lambdaQuery() |
| | | .orderByDesc(CollectBridge::getCollectDate) |
| | | .last("limit 1")); |
| | | |
| | | // å¤æä¸¤æ¡æ°æ®æ¯å¦ç¸å·®å¨10åéä¹å
åææ²¡æç¼å· |
| | | if (isWithinTenMinutes(collectDate, collectBridge.getCollectDate()) && |
| | | StringUtils.isNotBlank(collectBridge.getEntrustCode())) { |
| | | // ä¿®æ¹æ£éªå¼ |
| | | collectBridge.setCollectValue(collectValue); |
| | | baseMapper.updateById(collectBridge); |
| | | } else { |
| | | // åªåå¨å¼ |
| | | CollectBridge bridge = new CollectBridge(); |
| | | bridge.setCollectValue(collectValue); |
| | | bridge.setCollectDate(collectDate); |
| | | baseMapper.insert(bridge); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public static boolean isWithinTenMinutes(LocalDateTime dateTime1, LocalDateTime dateTime2) { |
| | | Duration duration = Duration.between(dateTime1, dateTime2); |
| | | long minutesDifference = Math.abs(duration.toMinutes()); |
| | | return minutesDifference <= 10; |
| | | } |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DataConfigDto; |
| | | import com.ruoyi.device.mapper.DataConfigMapper; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.pojo.DataConfig; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.device.service.DataConfigService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-07-13 12:23:00 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class DataConfigServiceImpl extends ServiceImpl<DataConfigMapper, DataConfig> implements DataConfigService { |
| | | |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | private DataConfigMapper dataConfigMapper; |
| | | |
| | | /** |
| | | * ç»´æ¤è®¾å¤æä»¶é
ç½® |
| | | * @param dataConfigList |
| | | */ |
| | | @Override |
| | | public void saveDeviceFileConfiguration(DataConfigDto dataConfigList) { |
| | | if (dataConfigList.getDeviceId() == null) { |
| | | throw new RuntimeException("缺å°è®¾å¤Id"); |
| | | } |
| | | |
| | | Device device = new Device(); |
| | | BeanUtils.copyProperties(dataConfigList, device); |
| | | device.setId(dataConfigList.getDeviceId()); |
| | | deviceMapper.updateById(device); |
| | | } |
| | | |
| | | /** |
| | | * æ°éé
ç½® |
| | | * @param dataConfigList |
| | | */ |
| | | @Override |
| | | public void saveDataAcquisitionConfiguration(DataConfigDto dataConfigList) { |
| | | if (dataConfigList.getDeviceId() == null) { |
| | | throw new RuntimeException("缺å°è®¾å¤id"); |
| | | } |
| | | |
| | | for (DataConfig dataConfig : dataConfigList.getDataConfigList()) { |
| | | if (dataConfig.getStructureItemParameterId() == null) { |
| | | throw new RuntimeException("ç¼ºå°æ£éªé¡¹id"); |
| | | } |
| | | dataConfig.setDeviceId(dataConfigList.getDeviceId()); |
| | | } |
| | | |
| | | this.saveOrUpdateBatch(dataConfigList.getDataConfigList()); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public Result<?> queryDataAcquisitionConfiguration(DataConfig dataConfig) { |
| | | return Result.success(dataConfigMapper.selectDataConfigList(dataConfig.getDeviceId())); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªé¡¹æ°éé
ç½® |
| | | * @param dataConfig |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result<?> queryProductConfiguration(DataConfig dataConfig) { |
| | | if (dataConfig.getStructureItemParameterId() == null) { |
| | | throw new RuntimeException("ç¼ºå°æ£æµé¡¹id"); |
| | | } |
| | | List<DataConfig> list = baseMapper.selectList(Wrappers.<DataConfig>lambdaQuery().eq(DataConfig::getStructureItemParameterId, dataConfig.getStructureItemParameterId())); |
| | | return Result.success(list); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢äºç»å®ä½æ¯æ²¡æé
ç½®çæ£éªé¡¹ |
| | | * @param deviceId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DataConfig> getNoConfigProduct(Page page, Integer deviceId) { |
| | | return baseMapper.getNoConfigProduct(page, deviceId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceAcceptanceFileMapper; |
| | | import com.ruoyi.device.pojo.DeviceAcceptanceFile; |
| | | import com.ruoyi.device.service.DeviceAcceptanceFileService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤)é件表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:26 |
| | | */ |
| | | @Service |
| | | public class DeviceAcceptanceFileServiceImpl extends ServiceImpl<DeviceAcceptanceFileMapper, DeviceAcceptanceFile> implements DeviceAcceptanceFileService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.device.mapper.DeviceAcceptanceFileMapper; |
| | | import com.ruoyi.device.mapper.DeviceAcceptanceMapper; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.device.pojo.DeviceAcceptance; |
| | | import com.ruoyi.device.pojo.DeviceAcceptanceFile; |
| | | import com.ruoyi.device.service.DeviceAcceptanceService; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤) æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:14 |
| | | */ |
| | | @Service |
| | | public class DeviceAcceptanceServiceImpl extends ServiceImpl<DeviceAcceptanceMapper, DeviceAcceptance> implements DeviceAcceptanceService { |
| | | |
| | | @Resource |
| | | private DeviceAcceptanceFileMapper deviceAcceptanceFileMapper; |
| | | |
| | | @Resource |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å表 |
| | | * @param page |
| | | * @param deviceAcceptance |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceAcceptance> pageDeviceAcceptance(Page page, DeviceAcceptance deviceAcceptance) { |
| | | return baseMapper.pageDeviceAcceptance(page, QueryWrappers.queryWrappers(deviceAcceptance)); |
| | | } |
| | | |
| | | /** |
| | | * 设å¤éªæ¶éä»¶ |
| | | * @param acceptanceId |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean uploadDeviceAcceptanceFile(Integer acceptanceId, MultipartFile file) { |
| | | if (acceptanceId == null) { |
| | | throw new ErrorException("缺å°éªæ¶id"); |
| | | } |
| | | |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | String filename = file.getOriginalFilename(); |
| | | String contentType = file.getContentType(); |
| | | DeviceAcceptanceFile acceptanceFile = new DeviceAcceptanceFile(); |
| | | acceptanceFile.setAcceptanceId(acceptanceId); |
| | | acceptanceFile.setFileName(filename); |
| | | if (contentType != null && contentType.startsWith("image/")) { |
| | | // æ¯å¾ç |
| | | path = imgUrl; |
| | | acceptanceFile.setType(1); |
| | | } else { |
| | | // æ¯æä»¶ |
| | | path = wordUrl; |
| | | acceptanceFile.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)); |
| | | acceptanceFile.setFileUrl(pathName); |
| | | deviceAcceptanceFileMapper.insert(acceptanceFile); |
| | | return true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å¯¼åº |
| | | * @param acceptanceId 设å¤éªæ¶id |
| | | * @param response ååºä½ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public void exportDeviceAcceptance(Integer acceptanceId, HttpServletResponse response) { |
| | | DeviceAcceptance deviceAcceptance = baseMapper.selectById(acceptanceId); |
| | | if (deviceAcceptance == null) { |
| | | throw new ErrorException("设å¤éªæ¶ä¸åå¨"); |
| | | } |
| | | Device device = null; |
| | | if (deviceAcceptance.getDeviceId() != null) { |
| | | device = deviceMapper.selectById(deviceAcceptance.getDeviceId()); |
| | | } |
| | | |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/acceptance-certificate.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceInspectionRecordDetailsList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | Device finalDevice = device; |
| | | String deviceName = device.getDeviceName() == null ? "" : device.getDeviceName(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceAcceptance", deviceAcceptance); |
| | | put("device", finalDevice); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | deviceName+ "éªæ¶å", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.dto.DeviceAccidentReportDto; |
| | | import com.ruoyi.device.mapper.DeviceAccidentReportMapper; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.device.pojo.DeviceAccidentReport; |
| | | import com.ruoyi.device.service.DeviceAccidentReportService; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.LocalDate; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤äºæ
æ¥åå æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 06:31:12 |
| | | */ |
| | | @Service |
| | | public class DeviceAccidentReportServiceImpl extends ServiceImpl<DeviceAccidentReportMapper, DeviceAccidentReport> implements DeviceAccidentReportService { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | |
| | | @Resource |
| | | private DeviceMapper deivceMapper; |
| | | |
| | | /** |
| | | * 设å¤äºæ
æ¥åå表 |
| | | * @param page |
| | | * @param deviceAccidentReport |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceAccidentReport> pageDeviceAccidentReport(Page page, DeviceAccidentReport deviceAccidentReport) { |
| | | return baseMapper.pageDeviceAccidentReport(page, QueryWrappers.queryWrappers(deviceAccidentReport)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤äºæ
æ¥å |
| | | * @param deviceAccidentReport |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addDeviceAccidentReport(DeviceAccidentReport deviceAccidentReport) { |
| | | DeviceAccidentReport accidentReport = new DeviceAccidentReport(); |
| | | User user = userMapper.selectById(SecurityUtils.getUserId().intValue()); |
| | | switch (deviceAccidentReport.getFlowType()) { |
| | | case 0: |
| | | // æ¥å |
| | | BeanUtils.copyProperties(deviceAccidentReport, accidentReport); |
| | | accidentReport.setDescriptionOfAccident(deviceAccidentReport.getDescriptionOfAccident()); |
| | | accidentReport.setReportUserId(user.getId()); |
| | | accidentReport.setReportUser(user.getName()); |
| | | accidentReport.setReportDate(LocalDate.now()); |
| | | |
| | | // è¯ä¼°äººä¿¡æ¯ |
| | | User assessorUser = userMapper.selectById(deviceAccidentReport.getAssessorUserId()); |
| | | accidentReport.setAssessorUserId(assessorUser.getId()); |
| | | accidentReport.setAssessorUser(assessorUser.getName()); |
| | | |
| | | baseMapper.insert(accidentReport); |
| | | break; |
| | | case 1: |
| | | accidentReport.setAccidentReportId(deviceAccidentReport.getAccidentReportId()); |
| | | // è¯ä¼° |
| | | accidentReport.setAssessorOpinion(deviceAccidentReport.getAssessorOpinion()); |
| | | accidentReport.setAssessorDate(LocalDate.now()); |
| | | |
| | | // é¨é¨è´è´£äºº |
| | | User departmentHeadUser = userMapper.selectById(deviceAccidentReport.getDepartmentHeadUserId()); |
| | | accidentReport.setDepartmentHeadUserId(departmentHeadUser.getId()); |
| | | accidentReport.setDepartmentHeadUser(departmentHeadUser.getName()); |
| | | |
| | | baseMapper.updateById(accidentReport); |
| | | |
| | | break; |
| | | case 2: |
| | | accidentReport.setAccidentReportId(deviceAccidentReport.getAccidentReportId()); |
| | | // é¨é¨è´è´£äººæè§ |
| | | accidentReport.setDepartmentHeadOpinion(deviceAccidentReport.getDepartmentHeadOpinion()); |
| | | accidentReport.setDepartmentHeadDate(LocalDate.now()); |
| | | |
| | | // ææ¯è´è´£äººä¿¡æ¯ |
| | | User technicalDirectorUser = userMapper.selectById(deviceAccidentReport.getTechnicalDirectorUserId()); |
| | | accidentReport.setTechnicalDirectorUserId(technicalDirectorUser.getId()); |
| | | accidentReport.setTechnicalDirectorUser(technicalDirectorUser.getName()); |
| | | |
| | | baseMapper.updateById(accidentReport); |
| | | |
| | | break; |
| | | case 3: |
| | | accidentReport.setAccidentReportId(deviceAccidentReport.getAccidentReportId()); |
| | | // ææ¯è´è´£äººæè§ |
| | | accidentReport.setTechnicalDirectorOpinion(deviceAccidentReport.getTechnicalDirectorOpinion()); |
| | | accidentReport.setTechnicalDirectorDate(LocalDate.now()); |
| | | |
| | | // ä¸»ä»»ä¿¡æ¯ |
| | | User directorHeadUser = userMapper.selectById(deviceAccidentReport.getDirectorHeadUserId()); |
| | | accidentReport.setDirectorHeadUserId(directorHeadUser.getId()); |
| | | accidentReport.setDirectorHeadUser(directorHeadUser.getName()); |
| | | |
| | | baseMapper.updateById(accidentReport); |
| | | |
| | | break; |
| | | case 4: |
| | | accidentReport.setAccidentReportId(deviceAccidentReport.getAccidentReportId()); |
| | | // 主任æè§ |
| | | accidentReport.setDirectorHeadOpinion(deviceAccidentReport.getDirectorHeadOpinion()); |
| | | accidentReport.setDirectorHeadDate(LocalDate.now()); |
| | | |
| | | accidentReport.setIsFinish(1); |
| | | baseMapper.updateById(accidentReport); |
| | | break; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤äºæ
æ¥å |
| | | * @param accidentReportId 设å¤äºæ
æ¥åid |
| | | * @param response ååº |
| | | */ |
| | | @Override |
| | | public void exportDeviceAccidentReport(Integer accidentReportId, HttpServletResponse response) { |
| | | // æ¥è¯¢äºæ
æ¥å |
| | | DeviceAccidentReportDto deviceAccidentReport = baseMapper.selectDeviceAccidentReportById(accidentReportId); |
| | | |
| | | Device device = deivceMapper.selectById(deviceAccidentReport.getDeviceId()); |
| | | device = device == null ? new Device() : device; |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-accident-report.docx"); |
| | | Configure configure = Configure.builder() |
| | | .build(); |
| | | Device finalDevice = device; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceAccidentReport", deviceAccidentReport); |
| | | put("device", finalDevice); |
| | | // æ¥å人ç¾å |
| | | put("reportUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getReportUserId())); |
| | | // è¯ä¼°äººç¾å |
| | | put("assessorUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getAssessorUserId())); |
| | | // é¨é¨è´è´£äººç¾å |
| | | put("departmentHeadUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getDepartmentHeadUserId())); |
| | | // ææ¯è´è´£äººç¾å |
| | | put("technicalDirectorUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getTechnicalDirectorUserId())); |
| | | // 主任ç¾å |
| | | put("directorHeadUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getDepartmentHeadUserId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String deviceName = device.getDeviceName() == null ? "" : device.getDeviceName(); |
| | | String fileName = URLEncoder.encode( |
| | | deviceName + "设å¤äºæ
æ¥åå", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.mapper.DeviceBorrowMapper; |
| | | import com.ruoyi.device.mapper.DeviceLogMapper; |
| | | import com.ruoyi.device.pojo.DeviceBorrow; |
| | | import com.ruoyi.device.pojo.DeviceLog; |
| | | import com.ruoyi.device.service.DeviceBorrowService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 10:53:51 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceBorrowServiceImpl extends ServiceImpl<DeviceBorrowMapper, DeviceBorrow> implements DeviceBorrowService { |
| | | |
| | | @Resource |
| | | private DeviceBorrowMapper deviceBorrowMapper; |
| | | |
| | | @Resource |
| | | private DeviceLogMapper deviceLogMapper; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceBorrow> numberGenerator; |
| | | |
| | | @Override |
| | | public IPage<DeviceBorrow> deviceBorrowPage(Page page, DeviceBorrow deviceBorrow) { |
| | | return deviceBorrowMapper.deviceBorrowPage(page, QueryWrappers.queryWrappers(deviceBorrow)); |
| | | } |
| | | |
| | | @Override |
| | | public int saveDeviceBorrow(DeviceBorrow deviceBorrow) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(userId); |
| | | //æ°å¢çæ¶åæ·»å æ°å»ºæµç¨ |
| | | if (ObjectUtils.isEmpty(deviceBorrow.getId())) { |
| | | deviceBorrow.setSubmitUser(user.getName()); |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | | String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date()); |
| | | String processNumber = numberGenerator.generateNumberWithPrefix(3, "DG-TC-23FM " + month + "-" + year + month, DeviceBorrow::getProcessNumber); |
| | | deviceBorrow.setProcessNumber(processNumber); |
| | | deviceBorrowMapper.insert(deviceBorrow); |
| | | DeviceLog deviceLog = new DeviceLog(); |
| | | deviceLog.setOperator(user.getName()); |
| | | deviceLog.setOperationTime(LocalDateTime.now()); |
| | | deviceLog.setOperationType("æ°å»º"); |
| | | deviceLog.setOperationContent("æ°å»ºæµç¨"); |
| | | deviceLog.setRelevanceForm("device_borrow"); |
| | | deviceLog.setRelevanceId(deviceBorrow.getId()); |
| | | deviceLogMapper.insert(deviceLog); |
| | | } else { |
| | | DeviceBorrow borrow = deviceBorrowMapper.selectById(deviceBorrow.getId()); |
| | | deviceBorrowMapper.updateById(deviceBorrow); |
| | | //éè¿æè
驳åå¢å æµç¨è·è¸ª |
| | | if (deviceBorrow.getNowState().equals("å
³é")) { |
| | | DeviceLog deviceLog = new DeviceLog(); |
| | | deviceLog.setOperator(user.getName()); |
| | | deviceLog.setOperationTime(LocalDateTime.now()); |
| | | deviceLog.setOperationType("æ¥æ¶éè¿"); |
| | | deviceLog.setRelevanceForm("device_borrow"); |
| | | deviceLog.setRelevanceId(deviceBorrow.getId()); |
| | | deviceLogMapper.insert(deviceLog); |
| | | } |
| | | else if (deviceBorrow.getNowState().equals("æäº¤") && borrow.getNowState().equals("æ¥æ¶")) { |
| | | DeviceLog deviceLog = new DeviceLog(); |
| | | deviceLog.setOperator(user.getName()); |
| | | deviceLog.setOperationTime(LocalDateTime.now()); |
| | | deviceLog.setOperationType("æ¥æ¶é©³å"); |
| | | deviceLog.setRelevanceForm("device_borrow"); |
| | | deviceLog.setRelevanceId(deviceBorrow.getId()); |
| | | deviceLogMapper.insert(deviceLog); |
| | | } |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public DeviceBorrow getDeviceBorrow(Integer id) { |
| | | List<DeviceLog> deviceLogs = deviceLogMapper.selectList(Wrappers.<DeviceLog>lambdaQuery() |
| | | .eq(DeviceLog::getRelevanceForm, "device_borrow") |
| | | .eq(DeviceLog::getRelevanceId, id)); |
| | | DeviceBorrow deviceBorrow = deviceBorrowMapper.selectById(id); |
| | | deviceBorrow.setDeviceLogs(deviceLogs); |
| | | return deviceBorrow; |
| | | } |
| | | |
| | | @Override |
| | | public List<DeviceBorrow> getDeviceBorrowBydeviceId(Integer deviceId) { |
| | | return deviceBorrowMapper.getDeviceBorrowBydeviceId(deviceId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.dto.DeviceBreakdownMaintenance; |
| | | import com.ruoyi.device.mapper.DeviceBreakdownMaintenanceMapper; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.device.service.DeviceBreakdownMaintenanceService; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.LocalDate; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é维修表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 04:50:57 |
| | | */ |
| | | @Service |
| | | public class DeviceBreakdownMaintenanceServiceImpl extends ServiceImpl<DeviceBreakdownMaintenanceMapper, DeviceBreakdownMaintenance> implements DeviceBreakdownMaintenanceService { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Resource |
| | | private DeviceMapper deivceMapper; |
| | | |
| | | /** |
| | | * è®¾å¤æ
éç»´ä¿®å表 |
| | | * @param page |
| | | * @param deviceBreakdownMaintenance |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceBreakdownMaintenance> pageDeviceBreakdownMaintenance(Page page, DeviceBreakdownMaintenance deviceBreakdownMaintenance) { |
| | | return baseMapper.pageDeviceBreakdownMaintenance(page, QueryWrappers.queryWrappers(deviceBreakdownMaintenance)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ
éç»´ä¿® |
| | | * @param deviceBreakdownMaintenance |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addDeviceBreakdownMaintenance(DeviceBreakdownMaintenance deviceBreakdownMaintenance) { |
| | | DeviceBreakdownMaintenance breakdownMaintenance = new DeviceBreakdownMaintenance(); |
| | | //å½åç»å½ç¨æ· |
| | | User user = userMapper.selectById(SecurityUtils.getUserId().intValue()); |
| | | |
| | | switch (deviceBreakdownMaintenance.getFlowType()) { |
| | | case 0: |
| | | BeanUtils.copyProperties(deviceBreakdownMaintenance, breakdownMaintenance); |
| | | // ç³è¯· |
| | | breakdownMaintenance.setDamageOrMalfunction(deviceBreakdownMaintenance.getDamageOrMalfunction()); |
| | | breakdownMaintenance.setApplicantUserId(user.getId()); |
| | | breakdownMaintenance.setApplicantUser(user.getName()); |
| | | breakdownMaintenance.setRepairDate(deviceBreakdownMaintenance.getRepairDate()); |
| | | |
| | | // å¤çäººä¿¡æ¯ |
| | | User departmentHeadUser = userMapper.selectById(deviceBreakdownMaintenance.getDepartmentHeadUserId()); |
| | | breakdownMaintenance.setApplicantUserId(departmentHeadUser.getId()); |
| | | breakdownMaintenance.setApplicantUser(departmentHeadUser.getName()); |
| | | |
| | | baseMapper.insert(breakdownMaintenance); |
| | | break; |
| | | case 1: |
| | | breakdownMaintenance.setMaintenanceId(deviceBreakdownMaintenance.getMaintenanceId()); |
| | | // ç³è¯·é¨é¨è´è´£äººæè§ |
| | | breakdownMaintenance.setDepartmentHeadOpinion(deviceBreakdownMaintenance.getDepartmentHeadOpinion()); |
| | | breakdownMaintenance.setDepartmentHeadDate(LocalDate.now()); |
| | | |
| | | baseMapper.updateById(breakdownMaintenance); |
| | | break; |
| | | case 2: |
| | | breakdownMaintenance.setMaintenanceId(deviceBreakdownMaintenance.getMaintenanceId()); |
| | | // 计é室æè§ |
| | | breakdownMaintenance.setMaintenanceRecord(deviceBreakdownMaintenance.getMaintenanceRecord()); |
| | | breakdownMaintenance.setMaintenanceUser(deviceBreakdownMaintenance.getMaintenanceUser()); |
| | | breakdownMaintenance.setMaintenanceDate(deviceBreakdownMaintenance.getMaintenanceDate()); |
| | | |
| | | breakdownMaintenance.setIsFinish(1); |
| | | |
| | | baseMapper.updateById(breakdownMaintenance); |
| | | break; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ
éç»´ä¿® |
| | | * @param maintenanceId è®¾å¤æ
éç»´ä¿®id |
| | | * @param response ååº |
| | | */ |
| | | @Override |
| | | public void exportDeviceBreakdownMaintenance(Integer maintenanceId, HttpServletResponse response) { |
| | | // æ¥è¯¢å¤é¨è®¾å¤ç³è¯· |
| | | DeviceBreakdownMaintenance deviceBreakdownMaintenance = baseMapper.selectById(maintenanceId); |
| | | |
| | | Device device = null; |
| | | if (deviceBreakdownMaintenance.getDeviceId() != null) { |
| | | device = deivceMapper.selectById(deviceBreakdownMaintenance.getDeviceId()); |
| | | device = device == null ? new Device() : device; |
| | | } |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-breakdown-maintenance.docx"); |
| | | Configure configure = Configure.builder() |
| | | .build(); |
| | | Device finalDevice = device; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceBreakdownMaintenance", deviceBreakdownMaintenance); |
| | | put("device", finalDevice); |
| | | // ç³è¯·äººç¾å |
| | | put("applicantUrl", UserUtils.getFinalUserSignatureUrl(deviceBreakdownMaintenance.getApplicantUserId())); |
| | | // é¨é¨è´è´£äººç¾å |
| | | put("headUrl", UserUtils.getFinalUserSignatureUrl(deviceBreakdownMaintenance.getDepartmentHeadUserId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String deviceName = device.getDeviceName() == null ? "" : device.getDeviceName(); |
| | | String fileName = URLEncoder.encode( |
| | | deviceName + "è®¾å¤æ
éç»´ä¿®ç³è¯·è¡¨", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceCalibrationPlanDetailMapper; |
| | | import com.ruoyi.device.pojo.DeviceCalibrationPlanDetail; |
| | | import com.ruoyi.device.service.DeviceCalibrationPlanDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å详æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:29 |
| | | */ |
| | | @Service |
| | | public class DeviceCalibrationPlanDetailServiceImpl extends ServiceImpl<DeviceCalibrationPlanDetailMapper, DeviceCalibrationPlanDetail> implements DeviceCalibrationPlanDetailService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.constant.MenuJumpPathConstants; |
| | | import com.ruoyi.common.core.domain.entity.InformationNotification; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.WxCpUtils; |
| | | import com.ruoyi.device.dto.DeviceCalibrationPlanDetailDto; |
| | | import com.ruoyi.device.dto.DeviceCalibrationPlanDto; |
| | | import com.ruoyi.device.excel.upload.DeviceCalibrationPlanDetailUpload; |
| | | import com.ruoyi.device.mapper.DeviceCalibrationPlanDetailMapper; |
| | | import com.ruoyi.device.mapper.DeviceCalibrationPlanMapper; |
| | | import com.ruoyi.device.pojo.DeviceCalibrationPlan; |
| | | import com.ruoyi.device.pojo.DeviceCalibrationPlanDetail; |
| | | import com.ruoyi.device.service.DeviceCalibrationPlanDetailService; |
| | | import com.ruoyi.device.service.DeviceCalibrationPlanService; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.system.service.InformationNotificationService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å主表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:17 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceCalibrationPlanServiceImpl extends ServiceImpl<DeviceCalibrationPlanMapper, DeviceCalibrationPlan> implements DeviceCalibrationPlanService { |
| | | |
| | | @Resource |
| | | private DeviceCalibrationPlanDetailMapper deviceCalibrationPlanDetailMapper; |
| | | @Resource |
| | | private DeviceCalibrationPlanDetailService deviceCalibrationPlanDetailService; |
| | | @Resource |
| | | private ThreadPoolTaskExecutor threadPoolTaskExecutor; |
| | | @Resource |
| | | private InformationNotificationService informationNotificationService; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¡å计å |
| | | * @param calibrationPlanDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addDeviceCalibrationPlan(DeviceCalibrationPlanDto calibrationPlanDto) { |
| | | // å½åç»å½ç¨æ· |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | // ç¼å¶æ¥æ |
| | | calibrationPlanDto.setWriteUserId(userId); |
| | | calibrationPlanDto.setWriteTime(LocalDateTime.now()); |
| | | baseMapper.insert(calibrationPlanDto); |
| | | |
| | | // æ·»å 详æ
|
| | | if (CollectionUtils.isNotEmpty(calibrationPlanDto.getCalibrationPlanDetailList())) { |
| | | for (DeviceCalibrationPlanDetail calibrationPlanDetail : calibrationPlanDto.getCalibrationPlanDetailList()) { |
| | | calibrationPlanDetail.setPlanId(calibrationPlanDto.getPlanId()); |
| | | } |
| | | deviceCalibrationPlanDetailService.saveBatch(calibrationPlanDto.getCalibrationPlanDetailList()); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥è®¾å¤æ ¡å计å |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean importDeviceCalibrationPlan(MultipartFile file, String planYear) { |
| | | // å½åç»å½ç¨æ· |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | // æä»¶åç§° |
| | | String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf(".")); |
| | | DeviceCalibrationPlan calibrationPlan = new DeviceCalibrationPlan(); |
| | | calibrationPlan.setPlanName(fileName); |
| | | calibrationPlan.setPlanYear(planYear); |
| | | calibrationPlan.setWriteUserId(userId); |
| | | calibrationPlan.setWriteTime(LocalDateTime.now()); |
| | | baseMapper.insert(calibrationPlan); |
| | | |
| | | List<DeviceCalibrationPlanDetail> detailsUploadList = new ArrayList<>(); |
| | | // 导å
¥éä»¶å
容 |
| | | try { |
| | | // excelè§£æ |
| | | EasyExcel.read(file.getInputStream(), DeviceCalibrationPlanDetailUpload.class, new AnalysisEventListener<DeviceCalibrationPlanDetailUpload>() { |
| | | @Override |
| | | public void invoke(DeviceCalibrationPlanDetailUpload detailsUpload, AnalysisContext analysisContext) { |
| | | // 夿æ¯å¦ä¸ºç©º |
| | | if (StringUtils.isNotBlank(detailsUpload.getDeviceName()) && |
| | | StringUtils.isNotBlank(detailsUpload.getDeviceNumber())) { |
| | | // 对象å¤å¶ |
| | | DeviceCalibrationPlanDetail calibrationPlanDetail = new DeviceCalibrationPlanDetail(); |
| | | BeanUtils.copyProperties(detailsUpload, calibrationPlanDetail); |
| | | // æ ¼å¼è¯æè¿æ£å®æ¶é´åæ¬å¹´è®¡åæ ¡åæ¶é´ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd"); |
| | | calibrationPlanDetail.setLastDate(LocalDate.parse(detailsUpload.getLastDate(), formatter)); |
| | | calibrationPlanDetail.setPlanDate(LocalDate.parse(detailsUpload.getLastDate(), formatter)); |
| | | |
| | | calibrationPlanDetail.setPlanId(calibrationPlan.getPlanId()); |
| | | detailsUploadList.add(calibrationPlanDetail); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | |
| | | } |
| | | }).sheet().doRead(); |
| | | deviceCalibrationPlanDetailService.saveBatch(detailsUploadList); |
| | | |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * æäº¤æ¹å |
| | | * @param deviceCalibrationPlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean submiatRatifyDeviceCalibrationPlan(DeviceCalibrationPlan deviceCalibrationPlan) { |
| | | baseMapper.update(null, Wrappers.<DeviceCalibrationPlan>lambdaUpdate() |
| | | .eq(DeviceCalibrationPlan::getPlanId, deviceCalibrationPlan.getPlanId()) |
| | | .set(DeviceCalibrationPlan::getRatifyUserId, deviceCalibrationPlan.getRatifyUserId()) |
| | | .set(DeviceCalibrationPlan::getRatifyRemark, null) |
| | | .set(DeviceCalibrationPlan::getRatifyStatus, null) |
| | | .set(DeviceCalibrationPlan::getRatifyTime, null) |
| | | ); |
| | | |
| | | DeviceCalibrationPlan calibrationPlan = baseMapper.selectById(deviceCalibrationPlan.getPlanId()); |
| | | |
| | | // åéæ¶æ¯ |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(userId); |
| | | // æ¶æ¯åé |
| | | InformationNotification info = new InformationNotification(); |
| | | // åé人 |
| | | info.setCreateUser(user.getName()); |
| | | info.setMessageType("6"); |
| | | info.setTheme("CNASè®¾å¤æ ¡åè®¡åæ¹åéç¥"); |
| | | info.setContent(calibrationPlan.getPlanName() + "çè®¾å¤æ ¡å计åå¾
æ¹å"); |
| | | info.setSenderId(userId); |
| | | // æ¥æ¶äºº |
| | | info.setConsigneeId(deviceCalibrationPlan.getRatifyUserId()); |
| | | info.setJumpPath(MenuJumpPathConstants.DEVICE); |
| | | informationNotificationService.addInformationNotification(info); |
| | | |
| | | // åéä¼ä¸å¾®ä¿¡éç¥ |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | // æ¥è¯¢æ¥æ¶äºº |
| | | User personnel = userMapper.selectById(deviceCalibrationPlan.getPlanId()); |
| | | |
| | | String message = ""; |
| | | message += "CNASè®¾å¤æ ¡åè®¡åæ¹åéç¥"; |
| | | message += "\n请å»èµæºç®¡ç-设å¤ä¸å±ç®å½-è®¾å¤æ ¡å计åå¡«å"; |
| | | message += "\n" + calibrationPlan.getPlanName() + "çæ ¡å计åå¾
æ¹å"; |
| | | //åéä¼ä¸å¾®ä¿¡æ¶æ¯éç¥ |
| | | try { |
| | | WxCpUtils.inform(personnel.getAccount(), message, null); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡åè®¡åæ¹å |
| | | * @param deviceCalibrationPlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean ratifyDeviceCalibrationPlan(DeviceCalibrationPlan deviceCalibrationPlan) { |
| | | baseMapper.update(null, Wrappers.<DeviceCalibrationPlan>lambdaUpdate() |
| | | .eq(DeviceCalibrationPlan::getPlanId, deviceCalibrationPlan.getPlanId()) |
| | | .set(DeviceCalibrationPlan::getRatifyRemark, deviceCalibrationPlan.getRatifyRemark()) |
| | | .set(DeviceCalibrationPlan::getRatifyStatus, deviceCalibrationPlan.getRatifyStatus()) |
| | | .set(DeviceCalibrationPlan::getRatifyTime, LocalDateTime.now()) |
| | | ); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计åå表 |
| | | * @param page |
| | | * @param deviceCalibrationPlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceCalibrationPlanDto> pageDeviceCalibrationPlan(Page page, DeviceCalibrationPlan deviceCalibrationPlan) { |
| | | return baseMapper.pageDeviceCalibrationPlan(page, QueryWrappers.queryWrappers(deviceCalibrationPlan)); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计å详æ
å表 |
| | | * @param page |
| | | * @param deviceCalibrationPlanDetails |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceCalibrationPlanDetail> pageDeviceCalibrationPlanDetail(Page page, DeviceCalibrationPlanDetail deviceCalibrationPlanDetails) { |
| | | if (deviceCalibrationPlanDetails.getPlanId() == null) { |
| | | return new Page(); |
| | | } |
| | | return deviceCalibrationPlanDetailMapper.pageDeviceCalibrationPlanDetail(page, QueryWrappers.queryWrappers(deviceCalibrationPlanDetails)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ ¡å计å |
| | | * @param deviceCalibrationPlanId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportDeviceCalibrationPlanDetail(Integer deviceCalibrationPlanId, HttpServletResponse response) { |
| | | // æ¥è¯¢è®¾å¤æ ¡å计å |
| | | DeviceCalibrationPlan deviceCalibrationPlan = baseMapper.selectById(deviceCalibrationPlanId); |
| | | DeviceCalibrationPlanDto deviceCalibrationPlanDto = new DeviceCalibrationPlanDto(); |
| | | BeanUtils.copyProperties(deviceCalibrationPlan, deviceCalibrationPlanDto); |
| | | // 设置ç¼å¶åæ¹åæ¶é´æ ¼å¼ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | deviceCalibrationPlanDto.setWriteTimeStr(deviceCalibrationPlan.getWriteTime() == null ? null : deviceCalibrationPlan.getWriteTime().format(formatter)); |
| | | deviceCalibrationPlanDto.setRatifyTimeStr(deviceCalibrationPlan.getRatifyTime() == null ? null : deviceCalibrationPlan.getRatifyTime().format(formatter)); |
| | | |
| | | // æ¥è¯¢è®¾å¤æ ¡å计å详æ
|
| | | List<DeviceCalibrationPlanDetail> deviceCalibrationPlanDetailList = deviceCalibrationPlanDetailMapper.selectList(Wrappers.<DeviceCalibrationPlanDetail>lambdaQuery() |
| | | .eq(DeviceCalibrationPlanDetail::getPlanId, deviceCalibrationPlanId) |
| | | .orderByAsc(DeviceCalibrationPlanDetail::getPlanDate)); |
| | | // 设置åºå· å æ¶é´ |
| | | ArrayList<DeviceCalibrationPlanDetailDto> deviceCalibrationPlanDetailDtoList = new ArrayList<>(); |
| | | deviceCalibrationPlanDetailList.forEach(deviceCalibrationPlanDetail -> { |
| | | DeviceCalibrationPlanDetailDto deviceCalibrationPlanDetailDto = new DeviceCalibrationPlanDetailDto(); |
| | | BeanUtils.copyProperties(deviceCalibrationPlanDetail, deviceCalibrationPlanDetailDto); |
| | | deviceCalibrationPlanDetailDto.setIndex(deviceCalibrationPlanDetailList.indexOf(deviceCalibrationPlanDetail) + 1); |
| | | deviceCalibrationPlanDetailDto.setLastDateStr(deviceCalibrationPlanDetail.getLastDate() == null ? null : deviceCalibrationPlanDetail.getLastDate().format(formatter)); |
| | | deviceCalibrationPlanDetailDto.setPlanDateStr(deviceCalibrationPlanDetail.getPlanDate() == null ? null : deviceCalibrationPlanDetail.getPlanDate().format(formatter)); |
| | | deviceCalibrationPlanDetailDtoList.add(deviceCalibrationPlanDetailDto); |
| | | }); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-calibration-plan.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceCalibrationPlanDetailDtoList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceCalibrationPlan", deviceCalibrationPlanDto); |
| | | put("deviceCalibrationPlanDetailDtoList", deviceCalibrationPlanDetailDtoList); |
| | | //è·åç¼å¶äººçç¾åå°å |
| | | put("organizationUrl", UserUtils.getFinalUserSignatureUrl(deviceCalibrationPlan.getRatifyUserId())); |
| | | //è·åæ¹å人çç¾åå°å |
| | | put("approvedUrl", UserUtils.getFinalUserSignatureUrl(deviceCalibrationPlan.getWriteUserId())); |
| | | }}); |
| | | |
| | | 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(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¹éç¼è¾è®¾å¤æ ¡å |
| | | * @param calibrationPlanDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateDeviceCalibrationPlan(DeviceCalibrationPlanDto calibrationPlanDto) { |
| | | // å½åç»å½ç¨æ· |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | // ç¼å¶æ¥æ |
| | | calibrationPlanDto.setWriteUserId(userId); |
| | | calibrationPlanDto.setWriteTime(LocalDateTime.now()); |
| | | baseMapper.updateById(calibrationPlanDto); |
| | | |
| | | // å é¤åæ¬ç详æ
|
| | | deviceCalibrationPlanDetailService.remove(Wrappers.<DeviceCalibrationPlanDetail>lambdaQuery().eq(DeviceCalibrationPlanDetail::getPlanId, calibrationPlanDto.getPlanId())); |
| | | |
| | | // æ·»å 详æ
|
| | | if (CollectionUtils.isNotEmpty(calibrationPlanDto.getCalibrationPlanDetailList())) { |
| | | for (DeviceCalibrationPlanDetail calibrationPlanDetail : calibrationPlanDto.getCalibrationPlanDetailList()) { |
| | | calibrationPlanDetail.setPlanId(calibrationPlanDto.getPlanId()); |
| | | } |
| | | deviceCalibrationPlanDetailService.saveBatch(calibrationPlanDto.getCalibrationPlanDetailList()); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ ¡å详æ
|
| | | * @param planId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public DeviceCalibrationPlanDto getDeviceCalibrationPlan(Integer planId) { |
| | | DeviceCalibrationPlan calibrationPlan = baseMapper.selectById(planId); |
| | | DeviceCalibrationPlanDto deviceCalibrationPlanDto = new DeviceCalibrationPlanDto(); |
| | | BeanUtils.copyProperties(calibrationPlan, deviceCalibrationPlanDto); |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<DeviceCalibrationPlanDetail> list = deviceCalibrationPlanDetailService.list(Wrappers.<DeviceCalibrationPlanDetail>lambdaQuery() |
| | | .eq(DeviceCalibrationPlanDetail::getPlanId, planId) |
| | | .orderByAsc(DeviceCalibrationPlanDetail::getPlanDate)); |
| | | |
| | | deviceCalibrationPlanDto.setCalibrationPlanDetailList(list); |
| | | return deviceCalibrationPlanDto; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceDocumentsMapper; |
| | | import com.ruoyi.device.pojo.DeviceDocuments; |
| | | import com.ruoyi.device.service.DeviceDocumentsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * è®¾å¤æ¡£æ¡ |
| | | */ |
| | | @Service |
| | | public class DeviceDocumentsServiceImpl extends ServiceImpl<DeviceDocumentsMapper, DeviceDocuments> implements DeviceDocumentsService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceExaminePlanDetailsMapper; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlanDetails; |
| | | import com.ruoyi.device.service.DeviceExaminePlanDetailsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:16 |
| | | */ |
| | | @Service |
| | | public class DeviceExaminePlanDetailsServiceImpl extends ServiceImpl<DeviceExaminePlanDetailsMapper, DeviceExaminePlanDetails> implements DeviceExaminePlanDetailsService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.constant.MenuJumpPathConstants; |
| | | import com.ruoyi.common.core.domain.entity.InformationNotification; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.WxCpUtils; |
| | | import com.ruoyi.device.dto.DeviceExaminePlanDetailsDto; |
| | | import com.ruoyi.device.dto.DeviceExaminePlanDto; |
| | | import com.ruoyi.device.excel.upload.DeviceExaminePlanUpload; |
| | | import com.ruoyi.device.mapper.DeviceExaminePlanDetailsMapper; |
| | | import com.ruoyi.device.mapper.DeviceExaminePlanMapper; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlan; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlanDetails; |
| | | import com.ruoyi.device.service.DeviceExaminePlanDetailsService; |
| | | import com.ruoyi.device.service.DeviceExaminePlanService; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.system.service.InformationNotificationService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å主表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:04 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceExaminePlanServiceImpl extends ServiceImpl<DeviceExaminePlanMapper, DeviceExaminePlan> implements DeviceExaminePlanService { |
| | | |
| | | @Resource |
| | | private DeviceExaminePlanDetailsMapper deviceExaminePlanDetailsMapper; |
| | | @Resource |
| | | private DeviceExaminePlanDetailsService deviceExaminePlanDetailsService; |
| | | @Resource |
| | | private ThreadPoolTaskExecutor threadPoolTaskExecutor; |
| | | @Resource |
| | | private InformationNotificationService informationNotificationService; |
| | | @Resource |
| | | private DeviceMapper deviceMapper; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¸æ¥è®¡å |
| | | * @param examinePlanDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addDeviceExaminePlan(DeviceExaminePlanDto examinePlanDto) { |
| | | // å½åç»å½ç¨æ· |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | // æä»¶åç§° |
| | | examinePlanDto.setWriteUserId(userId); |
| | | examinePlanDto.setWriteTime(LocalDateTime.now()); |
| | | baseMapper.insert(examinePlanDto); |
| | | |
| | | // æ·»å 详æ
|
| | | if (CollectionUtils.isNotEmpty(examinePlanDto.getExaminePlanDetailsList())) { |
| | | for (DeviceExaminePlanDetails deviceExaminePlanDetails : examinePlanDto.getExaminePlanDetailsList()) { |
| | | deviceExaminePlanDetails.setPlanId(examinePlanDto.getPlanId()); |
| | | } |
| | | deviceExaminePlanDetailsService.saveBatch(examinePlanDto.getExaminePlanDetailsList()); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥è®¾å¤æ ¸æ¥è®¡å |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean importDeviceExaminePlan(MultipartFile file) { |
| | | // å½åç»å½ç¨æ· |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | // æä»¶åç§° |
| | | String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf(".")); |
| | | DeviceExaminePlan examinePlan = new DeviceExaminePlan(); |
| | | examinePlan.setPlanName(fileName); |
| | | examinePlan.setWriteUserId(userId); |
| | | examinePlan.setWriteTime(LocalDateTime.now()); |
| | | baseMapper.insert(examinePlan); |
| | | |
| | | List<DeviceExaminePlanDetails> examinePlanDetails = new ArrayList<>(); |
| | | // 导å
¥éä»¶å
容 |
| | | try { |
| | | // excelè§£æ |
| | | EasyExcel.read(file.getInputStream(), DeviceExaminePlanUpload.class, new AnalysisEventListener<DeviceExaminePlanUpload>() { |
| | | @Override |
| | | public void invoke(DeviceExaminePlanUpload detailsUpload, AnalysisContext analysisContext) { |
| | | // 夿æ¯å¦ä¸ºç©º |
| | | if (StringUtils.isNotBlank(detailsUpload.getDeviceName()) && |
| | | StringUtils.isNotBlank(detailsUpload.getDeviceNumber())) { |
| | | // 对象å¤å¶ |
| | | DeviceExaminePlanDetails planDetails = new DeviceExaminePlanDetails(); |
| | | BeanUtils.copyProperties(detailsUpload, planDetails); |
| | | |
| | | planDetails.setPlanId(examinePlan.getPlanId()); |
| | | examinePlanDetails.add(planDetails); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | |
| | | } |
| | | }).sheet().doRead(); |
| | | for (DeviceExaminePlanDetails examinePlanDetail : examinePlanDetails) { |
| | | Device device = deviceMapper.selectOne(Wrappers.<Device>lambdaQuery() |
| | | .eq(Device::getManagementNumber, examinePlanDetail.getDeviceNumber().trim())); |
| | | if (device == null) { |
| | | throw new ErrorException("设å¤ç¼å·" + examinePlanDetail.getDeviceNumber() + "æªæ¥è¯¢å°è®¾å¤, è¯·éæ°å¯¼å
¥"); |
| | | } |
| | | User user = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, examinePlanDetail.getCheckChargerUser())); |
| | | if (user == null) { |
| | | throw new ErrorException("设å¤ç¼å·" + examinePlanDetail.getDeviceNumber() + "æªæ¥è¯¢å°æ ¸æ¥äºº"); |
| | | } |
| | | examinePlanDetail.setDeviceId(device.getId()); |
| | | examinePlanDetail.setCheckChargerUserId(user.getId()); |
| | | } |
| | | |
| | | deviceExaminePlanDetailsService.saveBatch(examinePlanDetails); |
| | | |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * æäº¤æ¹å |
| | | * @param deviceExaminePlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean submitRatifyDeviceExaminePlan(DeviceExaminePlan deviceExaminePlan) { |
| | | baseMapper.update(null, Wrappers.<DeviceExaminePlan>lambdaUpdate() |
| | | .eq(DeviceExaminePlan::getPlanId, deviceExaminePlan.getPlanId()) |
| | | .set(DeviceExaminePlan::getRatifyUserId, deviceExaminePlan.getRatifyUserId()) |
| | | .set(DeviceExaminePlan::getRatifyRemark, null) |
| | | .set(DeviceExaminePlan::getRatifyStatus, null) |
| | | .set(DeviceExaminePlan::getRatifyTime, null) |
| | | ); |
| | | |
| | | DeviceExaminePlan examinePlan = baseMapper.selectById(deviceExaminePlan.getPlanId()); |
| | | |
| | | // åéæ¶æ¯ |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(userId); |
| | | // æ¶æ¯åé |
| | | InformationNotification info = new InformationNotification(); |
| | | // åé人 |
| | | info.setCreateUser(user.getName()); |
| | | info.setMessageType("6"); |
| | | info.setTheme("CNASè®¾å¤æ ¸æ¥è®¡åæ¹åéç¥"); |
| | | info.setContent(examinePlan.getPlanName() + "çè®¾å¤æ ¸æ¥è®¡åå¾
æ¹å"); |
| | | info.setSenderId(userId); |
| | | // æ¥æ¶äºº |
| | | info.setConsigneeId(examinePlan.getRatifyUserId()); |
| | | info.setJumpPath(MenuJumpPathConstants.DEVICE); |
| | | informationNotificationService.addInformationNotification(info); |
| | | |
| | | // åéä¼ä¸å¾®ä¿¡éç¥ |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | // æ¥è¯¢æ¥æ¶äºº |
| | | User personnel = userMapper.selectById(examinePlan.getRatifyUserId()); |
| | | |
| | | String message = ""; |
| | | message += "CNASè®¾å¤æ ¸æ¥è®¡åæ¹åéç¥"; |
| | | message += "\n请å»èµæºç®¡ç-设å¤ä¸å±ç®å½-è®¾å¤æ ¸æ¥è®¡åå¡«å"; |
| | | message += "\n" + examinePlan.getPlanName() + "çæ ¡åæ ¸æ¥åå¾
æ¹å"; |
| | | //åéä¼ä¸å¾®ä¿¡æ¶æ¯éç¥ |
| | | try { |
| | | WxCpUtils.inform(personnel.getAccount(), message, null); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åæ¹å |
| | | * @param deviceExaminePlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean ratifyDeviceExaminePlan(DeviceExaminePlan deviceExaminePlan) { |
| | | // å½åç»å½ç¨æ· |
| | | baseMapper.update(null, Wrappers.<DeviceExaminePlan>lambdaUpdate() |
| | | .eq(DeviceExaminePlan::getPlanId, deviceExaminePlan.getPlanId()) |
| | | .set(DeviceExaminePlan::getRatifyRemark, deviceExaminePlan.getRatifyRemark()) |
| | | .set(DeviceExaminePlan::getRatifyStatus, deviceExaminePlan.getRatifyStatus()) |
| | | .set(DeviceExaminePlan::getRatifyTime, LocalDateTime.now()) |
| | | ); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åå表 |
| | | * @param page |
| | | * @param deviceExaminePlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceExaminePlanDto> pageDeviceExaminePlan(Page page, DeviceExaminePlan deviceExaminePlan) { |
| | | return baseMapper.deviceExaminePlanDetailsMapper(page, QueryWrappers.queryWrappers(deviceExaminePlan)); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
å表 |
| | | * @param page |
| | | * @param deviceExaminePlanDetails |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceExaminePlanDetailsDto> pageDeviceExaminePlanDetail(Page page, DeviceExaminePlanDetails deviceExaminePlanDetails) { |
| | | if (deviceExaminePlanDetails.getPlanId() == null) { |
| | | return new Page(); |
| | | } |
| | | return deviceExaminePlanDetailsMapper.pageDeviceExaminePlanDetail(page, QueryWrappers.queryWrappers(deviceExaminePlanDetails)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ ¸æ¥è®¡å |
| | | * @param deviceExaminePlanId è®¾å¤æ ¸æ¥è®¡åid |
| | | * @param response ååºä½ |
| | | */ |
| | | @Override |
| | | public void exportDeviceExaminePlanDetail(Integer deviceExaminePlanId, HttpServletResponse response) { |
| | | // æ¥è¯¢è®¾å¤æ ¸æ¥è®¡å |
| | | DeviceExaminePlanDto deviceExaminePlanDto = baseMapper.selectExamineExaminePlanDto(deviceExaminePlanId); |
| | | |
| | | // æ¥è¯¢è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | List<DeviceExaminePlanDetails> deviceExaminePlanDetailsList = deviceExaminePlanDetailsMapper.selectList(Wrappers.<DeviceExaminePlanDetails>lambdaQuery().eq(DeviceExaminePlanDetails::getPlanId, deviceExaminePlanId) |
| | | .orderByAsc(DeviceExaminePlanDetails::getCheckTime)); |
| | | // 设置åºå· |
| | | ArrayList<DeviceExaminePlanDetailsDto> deviceExaminePlanDetailsDtoList = new ArrayList<>(); |
| | | deviceExaminePlanDetailsList.forEach(deviceExamineRecordContrastDetail -> { |
| | | DeviceExaminePlanDetailsDto deviceExaminePlanDetailsDto = new DeviceExaminePlanDetailsDto(); |
| | | BeanUtils.copyProperties(deviceExamineRecordContrastDetail, deviceExaminePlanDetailsDto); |
| | | deviceExaminePlanDetailsDto.setIndex(deviceExaminePlanDetailsList.indexOf(deviceExamineRecordContrastDetail) + 1); |
| | | deviceExaminePlanDetailsDtoList.add(deviceExaminePlanDetailsDto); |
| | | }); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/examine-plan-detail.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceExaminePlanDetailsDtoList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceExaminePlan", deviceExaminePlanDto); |
| | | put("deviceExaminePlanDetailsDtoList", deviceExaminePlanDetailsDtoList); |
| | | //è·åæ ¸æ¥äººçç¾åå°å |
| | | put("writeUserUrl", UserUtils.getFinalUserSignatureUrl(deviceExaminePlanDto.getWriteUserId())); |
| | | //è·å审æ¥äººçç¾åå°å |
| | | put("reviewUserUrl", UserUtils.getFinalUserSignatureUrl(deviceExaminePlanDto.getRatifyUserId())); |
| | | }}); |
| | | |
| | | 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(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateDeviceExaminePlan(DeviceExaminePlanDto examinePlanDto) { |
| | | // å½åç»å½ç¨æ· |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | // æä»¶åç§° |
| | | examinePlanDto.setWriteUserId(userId); |
| | | examinePlanDto.setWriteTime(LocalDateTime.now()); |
| | | baseMapper.updateById(examinePlanDto); |
| | | |
| | | deviceExaminePlanDetailsService.remove(Wrappers.<DeviceExaminePlanDetails>lambdaQuery() |
| | | .eq(DeviceExaminePlanDetails::getPlanId, examinePlanDto.getPlanId())); |
| | | |
| | | // æ·»å 详æ
|
| | | if (CollectionUtils.isNotEmpty(examinePlanDto.getExaminePlanDetailsList())) { |
| | | for (DeviceExaminePlanDetails deviceExaminePlanDetails : examinePlanDto.getExaminePlanDetailsList()) { |
| | | deviceExaminePlanDetails.setPlanId(examinePlanDto.getPlanId()); |
| | | } |
| | | deviceExaminePlanDetailsService.saveBatch(examinePlanDto.getExaminePlanDetailsList()); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public DeviceExaminePlanDto getDeviceExaminePlan(Integer planId) { |
| | | DeviceExaminePlan examinePlan = baseMapper.selectById(planId); |
| | | DeviceExaminePlanDto deviceExaminePlanDto = new DeviceExaminePlanDto(); |
| | | BeanUtils.copyProperties(examinePlan, deviceExaminePlanDto); |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<DeviceExaminePlanDetails> list = deviceExaminePlanDetailsService.list(Wrappers.<DeviceExaminePlanDetails>lambdaQuery() |
| | | .eq(DeviceExaminePlanDetails::getPlanId, planId) |
| | | .orderByAsc(DeviceExaminePlanDetails::getCheckTime)); |
| | | deviceExaminePlanDto.setExaminePlanDetailsList(list); |
| | | |
| | | return deviceExaminePlanDto; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceExamineRecordContrastDetailsMapper; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordContrastDetails; |
| | | import com.ruoyi.device.service.DeviceExamineRecordContrastDetailsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¯¦æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:57 |
| | | */ |
| | | @Service |
| | | public class DeviceExamineRecordContrastDetailsServiceImpl extends ServiceImpl<DeviceExamineRecordContrastDetailsMapper, DeviceExamineRecordContrastDetails> implements DeviceExamineRecordContrastDetailsService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.dto.DeviceExamineRecordContrastDetailsDto; |
| | | import com.ruoyi.device.dto.DeviceExamineRecordContrastDto; |
| | | import com.ruoyi.device.mapper.DeviceExaminePlanDetailsMapper; |
| | | import com.ruoyi.device.mapper.DeviceExamineRecordContrastMapper; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlanDetails; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordContrast; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordContrastDetails; |
| | | import com.ruoyi.device.service.DeviceExamineRecordContrastDetailsService; |
| | | import com.ruoyi.device.service.DeviceExamineRecordContrastService; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:43 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceExamineRecordContrastServiceImpl extends ServiceImpl<DeviceExamineRecordContrastMapper, DeviceExamineRecordContrast> implements DeviceExamineRecordContrastService { |
| | | |
| | | @Resource |
| | | private DeviceExamineRecordContrastDetailsService deviceExamineRecordContrastDetailsService; |
| | | @Resource |
| | | private DeviceExaminePlanDetailsMapper deviceExaminePlanDetailsMapper; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public DeviceExamineRecordContrastDto getExamineRecordContrast(Integer planDetailsId) { |
| | | DeviceExamineRecordContrastDto contrastDto = baseMapper.getExamineRecordContrast(planDetailsId); |
| | | // 夿æ¯å¦ä¸ºç©º |
| | | if (contrastDto == null) { |
| | | contrastDto = new DeviceExamineRecordContrastDto(); |
| | | // æ¥è¯¢è®¾å¤è¯¦æ
|
| | | DeviceExaminePlanDetails deviceExaminePlanDetails = deviceExaminePlanDetailsMapper.selectById(planDetailsId); |
| | | contrastDto.setPlanDetailsId(deviceExaminePlanDetails.getPlanDetailsId()); |
| | | |
| | | } else { |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<DeviceExamineRecordContrastDetails> list = deviceExamineRecordContrastDetailsService.list(Wrappers.<DeviceExamineRecordContrastDetails>lambdaQuery() |
| | | .eq(DeviceExamineRecordContrastDetails::getRecordContrastId, contrastDto.getRecordContrastId())); |
| | | contrastDto.setRecordContrastDetailsList(list); |
| | | } |
| | | |
| | | return contrastDto; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addExamineRecordContrast(DeviceExamineRecordContrastDto dto) { |
| | | if (dto.getPlanDetailsId() == null) { |
| | | throw new ErrorException("缺å°è®¡å详ç»ä¿¡æ¯id"); |
| | | } |
| | | if (dto.getRecordContrastId() == null) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(userId); |
| | | dto.setCheckerUserId(userId); |
| | | dto.setCheckerUser(user.getName()); |
| | | |
| | | // æ¥è¯¢å®¡æ¥äººid |
| | | if (dto.getReviewUserId() != null) { |
| | | User reviewUser = userMapper.selectById(dto.getReviewUserId()); |
| | | dto.setReviewUser(reviewUser.getName()); |
| | | } |
| | | } |
| | | this.saveOrUpdate(dto); |
| | | |
| | | // å é¤å
¨é¨è¯¦æ
|
| | | deviceExamineRecordContrastDetailsService.remove(Wrappers.<DeviceExamineRecordContrastDetails>lambdaQuery() |
| | | .eq(DeviceExamineRecordContrastDetails::getRecordContrastId, dto.getRecordContrastId())); |
| | | //æ·»å 详æ
|
| | | if (CollectionUtils.isNotEmpty(dto.getRecordContrastDetailsList())) { |
| | | for (DeviceExamineRecordContrastDetails details : dto.getRecordContrastDetailsList()) { |
| | | details.setRecordContrastId(dto.getRecordContrastId()); |
| | | } |
| | | deviceExamineRecordContrastDetailsService.saveBatch(dto.getRecordContrastDetailsList()); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean reviewExamineRecordContrast(DeviceExamineRecordContrastDto dto) { |
| | | if (dto.getPlanDetailsId() == null) { |
| | | throw new ErrorException("缺å°è®¡å详ç»ä¿¡æ¯id"); |
| | | } |
| | | LambdaUpdateWrapper<DeviceExamineRecordContrast> wrapper = Wrappers.<DeviceExamineRecordContrast>lambdaUpdate() |
| | | .eq(DeviceExamineRecordContrast::getPlanDetailsId, dto.getPlanDetailsId()) |
| | | .set(DeviceExamineRecordContrast::getReviewStatus, dto.getReviewStatus()) |
| | | .set(DeviceExamineRecordContrast::getReviewRemark, dto.getReviewRemark()) |
| | | .set(DeviceExamineRecordContrast::getReviewTime, LocalDateTime.now()); |
| | | // 为0æ¸
é¤å®¡æ ¸äºº |
| | | if (dto.getReviewStatus().equals(0)) { |
| | | wrapper.set(DeviceExamineRecordContrast::getReviewUserId, null) |
| | | .set(DeviceExamineRecordContrast::getReviewUser, null); |
| | | } |
| | | |
| | | this.update(wrapper); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * |
| | | * @param planDetailsId 详æ
id |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportReviewExamineRecordContrast(Integer planDetailsId, HttpServletResponse response) { |
| | | // æ¥è¯¢å¯¹æ¯è®°å½ |
| | | DeviceExamineRecordContrastDto deviceExamineRecordContrast = baseMapper.selectExamineRecordContrastDto(planDetailsId); |
| | | |
| | | // æ¥è¯¢å¯¹æ¯è®°å½è¯¦æ
|
| | | List<DeviceExamineRecordContrastDetails> deviceExamineRecordContrastDetailList = deviceExamineRecordContrastDetailsService.list(Wrappers.<DeviceExamineRecordContrastDetails>lambdaQuery().eq(DeviceExamineRecordContrastDetails::getRecordContrastId, deviceExamineRecordContrast.getRecordContrastId())); |
| | | // 设置åºå· |
| | | ArrayList<DeviceExamineRecordContrastDetailsDto> deviceExamineRecordContrastDetailsDtoList = new ArrayList<>(); |
| | | deviceExamineRecordContrastDetailList.forEach(deviceExamineRecordContrastDetail -> { |
| | | DeviceExamineRecordContrastDetailsDto deviceExamineRecordContrastDetailsDto = new DeviceExamineRecordContrastDetailsDto(); |
| | | BeanUtils.copyProperties(deviceExamineRecordContrastDetail, deviceExamineRecordContrastDetailsDto); |
| | | deviceExamineRecordContrastDetailsDto.setIndex(deviceExamineRecordContrastDetailList.indexOf(deviceExamineRecordContrastDetail) + 1); |
| | | deviceExamineRecordContrastDetailsDtoList.add(deviceExamineRecordContrastDetailsDto); |
| | | }); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/review-examine-record-contrast.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceExamineRecordContrastDetailsDtoList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceExamineRecordContrast", deviceExamineRecordContrast); |
| | | put("deviceExamineRecordContrastDetailsDtoList", deviceExamineRecordContrastDetailsDtoList); |
| | | //è·åæ ¸æ¥äººçç¾åå°å |
| | | put("checkerUserUrl", UserUtils.getFinalUserSignatureUrl(deviceExamineRecordContrast.getCheckerUserId())); |
| | | //è·å审æ¥äººçç¾åå°å |
| | | put("reviewUserUrl", UserUtils.getFinalUserSignatureUrl(deviceExamineRecordContrast.getReviewUserId())); |
| | | }}); |
| | | |
| | | 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(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceExamineRecordDetailMapper; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordDetail; |
| | | import com.ruoyi.device.service.DeviceExamineRecordDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¯¦æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:15:11 |
| | | */ |
| | | @Service |
| | | public class DeviceExamineRecordDetailServiceImpl extends ServiceImpl<DeviceExamineRecordDetailMapper, DeviceExamineRecordDetail> implements DeviceExamineRecordDetailService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.constant.MenuJumpPathConstants; |
| | | import com.ruoyi.common.core.domain.entity.InformationNotification; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.WxCpUtils; |
| | | import com.ruoyi.device.dto.DeviceExamineRecordDto; |
| | | import com.ruoyi.device.mapper.DeviceExaminePlanDetailsMapper; |
| | | import com.ruoyi.device.mapper.DeviceExamineRecordMapper; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.device.pojo.DeviceExaminePlanDetails; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecord; |
| | | import com.ruoyi.device.pojo.DeviceExamineRecordDetail; |
| | | import com.ruoyi.device.service.DeviceExamineRecordDetailService; |
| | | import com.ruoyi.device.service.DeviceExamineRecordService; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.system.service.InformationNotificationService; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | 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.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:28 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceExamineRecordServiceImpl extends ServiceImpl<DeviceExamineRecordMapper, DeviceExamineRecord> implements DeviceExamineRecordService { |
| | | |
| | | @Resource |
| | | private DeviceExamineRecordDetailService deviceExamineRecordDetailService; |
| | | @Resource |
| | | private DeviceExaminePlanDetailsMapper deviceExaminePlanDetailsMapper; |
| | | @Resource |
| | | private DeviceMapper deviceMapper; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Resource |
| | | private ThreadPoolTaskExecutor threadPoolTaskExecutor; |
| | | |
| | | @Resource |
| | | private InformationNotificationService informationNotificationService; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥è®°å½ |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public DeviceExamineRecordDto getExamineRecord(Integer planDetailsId) { |
| | | DeviceExamineRecordDto deviceExamineRecord = baseMapper.getExamineRecord(planDetailsId); |
| | | |
| | | // 夿æ¯å¦ä¸ºç©º |
| | | if (deviceExamineRecord == null) { |
| | | deviceExamineRecord = new DeviceExamineRecordDto(); |
| | | // æ¥è¯¢è®¾å¤è¯¦æ
|
| | | DeviceExaminePlanDetails deviceExaminePlanDetails = deviceExaminePlanDetailsMapper.selectById(planDetailsId); |
| | | Device device = deviceMapper.selectById(deviceExaminePlanDetails.getDeviceId()); |
| | | if (device != null) { |
| | | deviceExamineRecord.setDeviceName(device.getDeviceName()); |
| | | deviceExamineRecord.setDeviceNumber(device.getManagementNumber()); |
| | | deviceExamineRecord.setPlanDetailsId(deviceExaminePlanDetails.getPlanDetailsId()); |
| | | } |
| | | } else { |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<DeviceExamineRecordDetail> list = deviceExamineRecordDetailService.list(Wrappers.<DeviceExamineRecordDetail>lambdaQuery() |
| | | .eq(DeviceExamineRecordDetail::getRecordId, deviceExamineRecord.getRecordId())); |
| | | deviceExamineRecord.setRecordDetailList(list); |
| | | } |
| | | |
| | | return deviceExamineRecord; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ ¸æ¥è®°å½ |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addExamineRecord(DeviceExamineRecordDto deviceExamineRecordDto) { |
| | | if (deviceExamineRecordDto.getPlanDetailsId() == null) { |
| | | throw new ErrorException("缺å°è®¡å详ç»ä¿¡æ¯id"); |
| | | } |
| | | if (deviceExamineRecordDto.getRecordId() == null) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(SecurityUtils.getUserId()); |
| | | deviceExamineRecordDto.setCheckerUserId(userId); |
| | | deviceExamineRecordDto.setCheckerUser(user.getName()); |
| | | |
| | | // æ¥è¯¢å®¡æ¥äººid |
| | | if (deviceExamineRecordDto.getReviewUserId() != null) { |
| | | User reviewUser = userMapper.selectById(deviceExamineRecordDto.getReviewUserId()); |
| | | deviceExamineRecordDto.setReviewUser(reviewUser.getName()); |
| | | |
| | | // æ¶æ¯åé |
| | | InformationNotification info = new InformationNotification(); |
| | | // åé人 |
| | | info.setCreateUser(user.getName()); |
| | | info.setMessageType("6"); |
| | | info.setTheme("CNASè®¾å¤æ ¸æ¥è®¡åå¾
æ¹å"); |
| | | info.setContent("设å¤ç¼å·ä¸º: " + deviceExamineRecordDto.getDeviceNumber() + " è®¾å¤æ ¸æ¥è®¡åå¾
审æ¹"); |
| | | info.setSenderId(userId); |
| | | // æ¥æ¶äºº |
| | | info.setConsigneeId(deviceExamineRecordDto.getReviewUserId()); |
| | | info.setJumpPath(MenuJumpPathConstants.DEVICE); |
| | | informationNotificationService.addInformationNotification(info); |
| | | |
| | | // åéä¼ä¸å¾®ä¿¡éç¥ |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | // æ¥è¯¢åé人 |
| | | User people = userMapper.selectById(deviceExamineRecordDto.getReviewUserId()); |
| | | String message = ""; |
| | | message += "CNASè®¾å¤æ ¸æ¥è®¡åå¾
æ¹å"; |
| | | message += "\n请å»èµæºè¦æ±-设å¤-è®¾å¤æ ¸æ¥è®¡å审æ¹"; |
| | | message += "\n" + "设å¤ç¼å·ä¸º: " + deviceExamineRecordDto.getDeviceNumber() + "è®¾å¤æ ¸æ¥è®¡åå¾
审æ¹"; |
| | | //åéä¼ä¸å¾®ä¿¡æ¶æ¯éç¥ |
| | | try { |
| | | WxCpUtils.inform(people.getAccount(), message, null); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | this.saveOrUpdate(deviceExamineRecordDto); |
| | | |
| | | // å é¤å
¨é¨è¯¦æ
|
| | | deviceExamineRecordDetailService.remove(Wrappers.<DeviceExamineRecordDetail>lambdaQuery() |
| | | .eq(DeviceExamineRecordDetail::getRecordId, deviceExamineRecordDto.getRecordId())); |
| | | //æ·»å 详æ
|
| | | if (CollectionUtils.isNotEmpty(deviceExamineRecordDto.getRecordDetailList())) { |
| | | for (DeviceExamineRecordDetail deviceExamineRecordDetail : deviceExamineRecordDto.getRecordDetailList()) { |
| | | deviceExamineRecordDetail.setRecordId(deviceExamineRecordDto.getRecordId()); |
| | | } |
| | | deviceExamineRecordDetailService.saveBatch(deviceExamineRecordDto.getRecordDetailList()); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 夿 ¸æ ¸æ¥è®°å½ |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean reviewExamineRecord(DeviceExamineRecordDto dto) { |
| | | if (dto.getPlanDetailsId() == null) { |
| | | throw new ErrorException("缺å°è®¡å详ç»ä¿¡æ¯id"); |
| | | } |
| | | LambdaUpdateWrapper<DeviceExamineRecord> wrapper = Wrappers.<DeviceExamineRecord>lambdaUpdate() |
| | | .eq(DeviceExamineRecord::getPlanDetailsId, dto.getPlanDetailsId()) |
| | | .set(DeviceExamineRecord::getReviewStatus, dto.getReviewStatus()) |
| | | .set(DeviceExamineRecord::getReviewRemark, dto.getReviewRemark()); |
| | | |
| | | // 为0æ¸
é¤å®¡æ ¸äºº |
| | | if (dto.getReviewStatus().equals(0)) { |
| | | wrapper.set(DeviceExamineRecord::getReviewUserId, null) |
| | | .set(DeviceExamineRecord::getReviewUser, null); |
| | | } |
| | | |
| | | this.update(wrapper); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå¤æ ¸æ ¸æ¥è®°å½ |
| | | * |
| | | * @param planDetailsId 夿 ¸æ ¸æ¥è®°å½id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public void exportReviewExamineRecordDetail(Integer planDetailsId, HttpServletResponse response) { |
| | | // æ¥è¯¢å¤æ ¸æ ¸æ¥è®°å½ |
| | | DeviceExamineRecordDto deviceExamineRecordDto = baseMapper.selectReviewExamineRecordDto(planDetailsId); |
| | | |
| | | // æ¥è¯¢å¤æ ¸æ ¸æ¥è®°å½è¯¦æ
|
| | | List<DeviceExamineRecordDetail> deviceExamineRecordDetailList = deviceExamineRecordDetailService.list(Wrappers.<DeviceExamineRecordDetail>lambdaQuery().eq(DeviceExamineRecordDetail::getRecordId, deviceExamineRecordDto.getRecordId())); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/examine-record.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceExamineRecordDetailList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceExamineRecordDto", deviceExamineRecordDto); |
| | | put("deviceExamineRecordDetailList", deviceExamineRecordDetailList); |
| | | //è·åæ ¸æ¥äººçç¾åå°å |
| | | put("checkerUserUrl", UserUtils.getFinalUserSignatureUrl(deviceExamineRecordDto.getCheckerUserId())); |
| | | //è·å审æ¥äººçç¾åå°å |
| | | put("reviewUserUrl", UserUtils.getFinalUserSignatureUrl(deviceExamineRecordDto.getReviewUserId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String deviceName = StringUtils.isNotEmpty(deviceExamineRecordDto.getDeviceName()) ? deviceExamineRecordDto.getDeviceName() : ""; |
| | | String fileName = URLEncoder.encode( |
| | | deviceName+ "æ ¸æ¥è®°å½", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.mapper.DeviceExternalApplyMapper; |
| | | import com.ruoyi.device.pojo.DeviceExternalApply; |
| | | import com.ruoyi.device.service.DeviceExternalApplyService; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.LocalDate; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 10:28:43 |
| | | */ |
| | | @Service |
| | | public class DeviceExternalApplyServiceImpl extends ServiceImpl<DeviceExternalApplyMapper, DeviceExternalApply> implements DeviceExternalApplyService { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | /** |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·å表 |
| | | * @param page |
| | | * @param deviceExternalApply |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceExternalApply> pageDeviceExternalApply(Page page, DeviceExternalApply deviceExternalApply) { |
| | | return baseMapper.pageDeviceExternalApply(page, QueryWrappers.queryWrappers(deviceExternalApply)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @param deviceExternalApply |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addDeviceExternalApply(DeviceExternalApply deviceExternalApply) { |
| | | DeviceExternalApply apply = new DeviceExternalApply(); |
| | | // å½åç»å½ç¨æ·ä¿¡æ¯åé¨é¨ |
| | | User user = userMapper.selectById(SecurityUtils.getUserId().intValue()); |
| | | switch (deviceExternalApply.getFlowType()) { |
| | | case 0: |
| | | BeanUtils.copyProperties(deviceExternalApply, apply); |
| | | // ç³è¯· |
| | | apply.setUseReason(deviceExternalApply.getUseReason()); |
| | | apply.setApplicantUserId(user.getId()); |
| | | apply.setApplicantUser(user.getName()); |
| | | apply.setApplicantDate(LocalDate.now()); |
| | | |
| | | // å¤çäººä¿¡æ¯ |
| | | User departmentHeadUser = userMapper.selectById(deviceExternalApply.getDepartmentHeadUserId()); |
| | | apply.setApplicantUserId(departmentHeadUser.getId()); |
| | | apply.setApplicantUser(departmentHeadUser.getName()); |
| | | |
| | | baseMapper.insert(apply); |
| | | break; |
| | | case 1: |
| | | apply.setExternalApplyId(deviceExternalApply.getExternalApplyId()); |
| | | // ç³è¯·é¨é¨è´è´£äººæè§ |
| | | apply.setDepartmentHeadOpinion(deviceExternalApply.getDepartmentHeadOpinion()); |
| | | apply.setDepartmentHeadDate(LocalDate.now()); |
| | | |
| | | // 计éå®¤ä¿¡æ¯ |
| | | User meteringRoomUser = userMapper.selectById(deviceExternalApply.getMeteringRoomUserId()); |
| | | apply.setMeteringRoomUserId(meteringRoomUser.getId()); |
| | | apply.setMeteringRoomUser(meteringRoomUser.getName()); |
| | | |
| | | baseMapper.updateById(apply); |
| | | break; |
| | | case 2: |
| | | apply.setExternalApplyId(deviceExternalApply.getExternalApplyId()); |
| | | // 计é室æè§ |
| | | apply.setMeteringRoomOpinion(deviceExternalApply.getMeteringRoomOpinion()); |
| | | apply.setMeteringRoomDate(LocalDate.now()); |
| | | |
| | | // æ¹åäººä¿¡æ¯ |
| | | User approverUser = userMapper.selectById(deviceExternalApply.getApproverUserId()); |
| | | apply.setApproverUserId(approverUser.getId()); |
| | | apply.setApproverUser(approverUser.getName()); |
| | | |
| | | baseMapper.updateById(apply); |
| | | break; |
| | | case 3: |
| | | apply.setExternalApplyId(deviceExternalApply.getExternalApplyId()); |
| | | //æ¹å人 |
| | | apply.setApproverOpinion(deviceExternalApply.getApproverOpinion()); |
| | | apply.setApproverDate(LocalDate.now()); |
| | | |
| | | apply.setIsFinish(1); |
| | | baseMapper.updateById(apply); |
| | | break; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * |
| | | * @param externalApplyId å¤é¨è®¾å¤ç³è¯·id |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportDeviceExternalApply(Integer externalApplyId, HttpServletResponse response) { |
| | | // æ¥è¯¢å¤é¨è®¾å¤ç³è¯· |
| | | DeviceExternalApply deviceAccidentReport = baseMapper.selectDeviceExternalById(externalApplyId); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-external-apply.docx"); |
| | | Configure configure = Configure.builder() |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceAccidentReport", deviceAccidentReport); |
| | | // ç³è¯·äººç¾å |
| | | put("applicantUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getApplicantUserId())); |
| | | // é¨é¨è´è´£äººç¾å |
| | | put("departmentHeadUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getDepartmentHeadUserId())); |
| | | // 计é室人ç¾å |
| | | put("meteringRoomUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getMeteringRoomUserId())); |
| | | // æ¹å人ç¾å |
| | | put("approverUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getApproverUserId())); |
| | | }}); |
| | | |
| | | 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(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.ruoyi.device.pojo.DeviceImpowerDetails; |
| | | import com.ruoyi.device.mapper.DeviceImpowerDetailsMapper; |
| | | import com.ruoyi.device.service.DeviceImpowerDetailsService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å详æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-04-17 03:23:39 |
| | | */ |
| | | @Service |
| | | public class DeviceImpowerDetailsServiceImpl extends ServiceImpl<DeviceImpowerDetailsMapper, DeviceImpowerDetails> implements DeviceImpowerDetailsService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.ruoyi.common.constant.MenuJumpPathConstants; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.InformationNotification; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.WxCpUtils; |
| | | import com.ruoyi.device.dto.DeviceImpowerDetailsDto; |
| | | import com.ruoyi.device.dto.DeviceImpowerDto; |
| | | import com.ruoyi.device.mapper.DeviceImpowerDetailsMapper; |
| | | import com.ruoyi.device.pojo.DeviceImpower; |
| | | import com.ruoyi.device.mapper.DeviceImpowerMapper; |
| | | import com.ruoyi.device.pojo.DeviceImpower; |
| | | import com.ruoyi.device.pojo.DeviceImpowerDetails; |
| | | import com.ruoyi.device.service.DeviceImpowerService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.service.DeviceImpowerDetailsService; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.system.service.InformationNotificationService; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | 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; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä½¿ç¨è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-04-17 03:23:23 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceImpowerServiceImpl extends ServiceImpl<DeviceImpowerMapper, DeviceImpower> implements DeviceImpowerService { |
| | | |
| | | |
| | | @Resource |
| | | private DeviceImpowerDetailsService deviceImpowerDetailsService; |
| | | |
| | | @Resource |
| | | private DeviceImpowerDetailsMapper deviceImpowerDetailsMapper; |
| | | @Resource |
| | | private ThreadPoolTaskExecutor threadPoolTaskExecutor; |
| | | @Resource |
| | | private InformationNotificationService informationNotificationService; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ä½¿ç¨ |
| | | * |
| | | * @param page |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result<IPage<DeviceImpower>> selectDeviceImpowerByPage(Page page, DeviceImpowerDto deviceImpowerDto) { |
| | | IPage<DeviceImpower> iPage = baseMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(deviceImpowerDto)); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ä½¿ç¨ |
| | | * |
| | | * @param deviceImpowerDto 设å¤ä½¿ç¨ |
| | | */ |
| | | @Override |
| | | public Result addImpower(DeviceImpowerDto deviceImpowerDto) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(userId); |
| | | deviceImpowerDto.setCompilerId(userId); |
| | | deviceImpowerDto.setCompiler(user.getName()); |
| | | deviceImpowerDto.setDatePreparation(LocalDateTime.now()); |
| | | |
| | | // æ¥è¯¢å®¡æ ¸äººid |
| | | if (deviceImpowerDto.getAuditId() != null) { |
| | | User auditUser = userMapper.selectById(deviceImpowerDto.getAuditId()); |
| | | deviceImpowerDto.setAudit(auditUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceImpowerDto); |
| | | |
| | | // 详æ
èµå¼å¹¶ä¿å |
| | | List<DeviceImpowerDetailsDto> deviceImpowerDetails = deviceImpowerDto.getDeviceImpowerDetails(); |
| | | if (CollectionUtils.isNotEmpty(deviceImpowerDetails)) { // 详æ
ä¸ä¸ºç©º |
| | | List<DeviceImpowerDetails> collect = deviceImpowerDetails.stream().map(detailsDto -> { |
| | | detailsDto.setImpowerId(deviceImpowerDto.getImpowerId()); // 使ç¨ID |
| | | DeviceImpowerDetails details = new DeviceImpowerDetails(); |
| | | BeanUtils.copyProperties(detailsDto, details); |
| | | return details; |
| | | }).collect(Collectors.toList()); |
| | | deviceImpowerDetailsService.saveBatch(collect); |
| | | } |
| | | |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ä½¿ç¨ |
| | | * |
| | | * @param deviceImpowerDto 设å¤ä½¿ç¨ |
| | | */ |
| | | @Override |
| | | public Result updateImpower(DeviceImpowerDto deviceImpowerDto) { |
| | | // æ¥è¯¢å®¡æ ¸äººid |
| | | if (deviceImpowerDto.getAuditId() != null) { |
| | | User auditUser = userMapper.selectById(deviceImpowerDto.getAuditId()); |
| | | deviceImpowerDto.setAudit(auditUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceImpowerDto); |
| | | |
| | | // å é¤åæ¬ç详æ
|
| | | deviceImpowerDetailsService.remove(Wrappers.<DeviceImpowerDetails>lambdaQuery().eq(DeviceImpowerDetails::getImpowerId, deviceImpowerDto.getImpowerId())); |
| | | // 详æ
èµå¼å¹¶ä¿å |
| | | List<DeviceImpowerDetailsDto> deviceImpowerDetails = deviceImpowerDto.getDeviceImpowerDetails(); |
| | | if (CollectionUtils.isNotEmpty(deviceImpowerDetails)) { // 详æ
ä¸ä¸ºç©º |
| | | List<DeviceImpowerDetails> collect = deviceImpowerDetails.stream().map(detailsDto -> { |
| | | detailsDto.setImpowerId(deviceImpowerDto.getImpowerId()); // 使ç¨ID |
| | | DeviceImpowerDetails details = new DeviceImpowerDetails(); |
| | | BeanUtils.copyProperties(detailsDto, details); |
| | | return details; |
| | | }).collect(Collectors.toList()); |
| | | deviceImpowerDetailsService.saveBatch(collect); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ä½¿ç¨ |
| | | * |
| | | * @param deviceImpowerDto 设å¤ä½¿ç¨ |
| | | */ |
| | | @Override |
| | | public Result deleteImpower(DeviceImpowerDto deviceImpowerDto) { |
| | | this.removeById(deviceImpowerDto); |
| | | deviceImpowerDetailsService.remove(Wrappers.<DeviceImpowerDetails>lambdaQuery().eq(DeviceImpowerDetails::getImpowerId, deviceImpowerDto.getImpowerId())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ä½¿ç¨è¯¦æ
|
| | | * |
| | | * @param impowerId 设å¤ä½¿ç¨id |
| | | */ |
| | | @Override |
| | | public Result<DeviceImpowerDto> getImpowerDetail(Integer impowerId) { |
| | | // æ¥è¯¢è®¾å¤ä½¿ç¨ |
| | | DeviceImpower deviceImpower = baseMapper.selectById(impowerId); |
| | | // æ¥è¯¢è¯¦æ
|
| | | DeviceImpowerDto deviceImpowerDto = new DeviceImpowerDto(); |
| | | BeanUtils.copyProperties(deviceImpower, deviceImpowerDto); |
| | | deviceImpowerDto.setDeviceImpowerDetails(deviceImpowerDetailsMapper.deviceImpowerDetailsList(impowerId)); |
| | | return Result.success(deviceImpowerDto); |
| | | } |
| | | |
| | | /** |
| | | * æäº¤æ¹å |
| | | * @param deviceImpowerDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result submitReviewImpowerStatus(DeviceImpowerDto deviceImpowerDto) { |
| | | User audit = userMapper.selectById(deviceImpowerDto.getAuditId()); |
| | | this.update(Wrappers.<DeviceImpower>lambdaUpdate() |
| | | .eq(DeviceImpower::getImpowerId, deviceImpowerDto.getImpowerId()) |
| | | .set(DeviceImpower::getAuditId, audit.getId()) |
| | | .set(DeviceImpower::getAudit, audit.getName()) |
| | | .set(DeviceImpower::getAuditDate, null) |
| | | .set(DeviceImpower::getStatus, null) |
| | | .set(DeviceImpower::getAuditRemark, null)); |
| | | |
| | | DeviceImpower deviceImpower = baseMapper.selectById(deviceImpowerDto.getImpowerId()); |
| | | |
| | | // // åéæ¶æ¯ |
| | | // Integer userId = SecurityUtils.getUserId().intValue(); |
| | | // User user = userMapper.selectById(userId); |
| | | // // æ¶æ¯åé |
| | | // InformationNotification info = new InformationNotification(); |
| | | // // åé人 |
| | | // info.setCreateUser(user.getName()); |
| | | // info.setMessageType("6"); |
| | | // info.setTheme("CNAS设å¤ä½¿ç¨æ¹åéç¥"); |
| | | // info.setContent(deviceImpower.getPlanYear() + "å¹´ç设å¤ä½¿ç¨å¾
æ¹å"); |
| | | // info.setSenderId(userId); |
| | | // // æ¥æ¶äºº |
| | | // info.setConsigneeId(audit.getId()); |
| | | // info.setJumpPath(MenuJumpPathConstants.DEVICE); |
| | | // informationNotificationService.addInformationNotification(info); |
| | | // |
| | | // // åéä¼ä¸å¾®ä¿¡éç¥ |
| | | // threadPoolTaskExecutor.execute(() -> { |
| | | // String message = ""; |
| | | // message += "CNAS设å¤ä½¿ç¨æ ¸éç¥"; |
| | | // message += "\n请å»èµæºç®¡ç-设å¤ä¸å±ç®å½-设å¤ä½¿ç¨å¡«å"; |
| | | // message += "\n" + deviceImpower.getPlanYear() + "å¹´ç设å¤ä½¿ç¨å¾
æ¹å"; |
| | | // //åéä¼ä¸å¾®ä¿¡æ¶æ¯éç¥ |
| | | // try { |
| | | // WxCpUtils.inform(audit.getAccount(), message, null); |
| | | // } catch (Exception e) { |
| | | // throw new RuntimeException(e); |
| | | // } |
| | | // }); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * @param deviceImpowerDto |
| | | */ |
| | | @Override |
| | | public Result reviewImpowerStatus(DeviceImpowerDto deviceImpowerDto) { |
| | | LambdaUpdateWrapper<DeviceImpower> wrapper = Wrappers.<DeviceImpower>lambdaUpdate() |
| | | .eq(DeviceImpower::getImpowerId, deviceImpowerDto.getImpowerId()) |
| | | .set(DeviceImpower::getAuditDate, LocalDateTime.now()) |
| | | .set(DeviceImpower::getStatus, deviceImpowerDto.getStatus()) // å®¡æ ¸ç¶æ |
| | | .set(DeviceImpower::getAuditRemark, deviceImpowerDto.getAuditRemark());// å®¡æ ¸å¤æ³¨ |
| | | |
| | | this.update(wrapper); // æ´æ° |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ä½¿ç¨ |
| | | * |
| | | * @param impowerId 设å¤ä½¿ç¨id |
| | | */ |
| | | @Override |
| | | public Result exportDeviceImpowerDto(Integer impowerId, HttpServletResponse response) { |
| | | // æ¥è¯¢è®¾å¤ä½¿ç¨ææè®¡å |
| | | DeviceImpower deviceImpower = baseMapper.selectById(impowerId); |
| | | DeviceImpowerDto deviceImpowerDto = new DeviceImpowerDto(); |
| | | BeanUtils.copyProperties(deviceImpower, deviceImpowerDto); |
| | | // æ ¼å¼åæ¥æä¸è±æ |
| | | DateTimeFormatter formatterCH = DateTimeFormatter.ofPattern("yyyy å¹´ MM æ dd æ¥"); |
| | | DateTimeFormatter formatterEN = DateTimeFormatter.ofPattern("yyyy 'Year' MM 'Month' dd 'Day'"); |
| | | deviceImpowerDto.setAuditDateCH(deviceImpower.getAuditDate() == null ? null : deviceImpower.getAuditDate().format(formatterCH)); |
| | | deviceImpowerDto.setAuditDateEN(deviceImpower.getAuditDate() == null ? null : deviceImpower.getAuditDate().format(formatterEN)); |
| | | |
| | | // æ¥è¯¢è®¾å¤ä¿å
»è®¡å详æ
|
| | | List<DeviceImpowerDetailsDto> deviceImpowerDetailsDtoList = deviceImpowerDetailsMapper.deviceImpowerDetailsList(impowerId); |
| | | // 设置åºå· |
| | | deviceImpowerDetailsDtoList.forEach(deviceImpowerDetails -> { |
| | | deviceImpowerDetails.setIndex(deviceImpowerDetailsDtoList.indexOf(deviceImpowerDetails) + 1); |
| | | }); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-impower.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceImpowerDetailsDtoList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceImpower", deviceImpowerDto); |
| | | put("deviceImpowerDetailsDtoList", deviceImpowerDetailsDtoList); |
| | | // ææäººå°å |
| | | put("auditUrl", UserUtils.getFinalUserSignatureUrl(deviceImpower.getAuditId())); |
| | | }}); |
| | | |
| | | 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(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceInspectionRecordDetailsMapper; |
| | | import com.ruoyi.device.pojo.DeviceInspectionRecordDetails; |
| | | import com.ruoyi.device.service.DeviceInspectionRecordDetailsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:27:32 |
| | | */ |
| | | @Service |
| | | public class DeviceInspectionRecordDetailsServiceImpl extends ServiceImpl<DeviceInspectionRecordDetailsMapper, DeviceInspectionRecordDetails> implements DeviceInspectionRecordDetailsService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.dto.DeviceInspectionRecordDto; |
| | | import com.ruoyi.device.mapper.DeviceInspectionRecordMapper; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.device.pojo.DeviceInspectionRecord; |
| | | import com.ruoyi.device.pojo.DeviceInspectionRecordDetails; |
| | | import com.ruoyi.device.service.DeviceInspectionRecordDetailsService; |
| | | import com.ruoyi.device.service.DeviceInspectionRecordService; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ç¹æ£è®°å½è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:25:14 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceInspectionRecordServiceImpl extends ServiceImpl<DeviceInspectionRecordMapper, DeviceInspectionRecord> implements DeviceInspectionRecordService { |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Resource |
| | | private DeviceMapper deviceMapper; |
| | | @Resource |
| | | private DeviceInspectionRecordDetailsService deviceInspectionRecordDetailsService; |
| | | @Resource |
| | | private DeviceInspectionRecordMapper deviceInspectionRecordMapper; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param page å½å页ç |
| | | */ |
| | | @Override |
| | | public Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(Page page, DeviceInspectionRecordDto deviceInspectionRecordDto) { |
| | | IPage<DeviceInspectionRecord> iPage = deviceInspectionRecordMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(deviceInspectionRecordDto)); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£è¯¦æ
|
| | | * @param inspectionRecordId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result getDeviceInspectionRecord(Integer inspectionRecordId) { |
| | | DeviceInspectionRecord deviceInspectionRecord = baseMapper.selectById(inspectionRecordId); |
| | | DeviceInspectionRecordDto dto = new DeviceInspectionRecordDto(); |
| | | BeanUtils.copyProperties(deviceInspectionRecord, dto); |
| | | List<DeviceInspectionRecordDetails> list = deviceInspectionRecordDetailsService.list(Wrappers.<DeviceInspectionRecordDetails>lambdaQuery().eq(DeviceInspectionRecordDetails::getInspectionRecordId, inspectionRecordId)); |
| | | dto.setDetails(list); |
| | | return Result.success(dto); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Result addDeviceInspectionRecord(DeviceInspectionRecordDto deviceInspectionRecord) { |
| | | |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(userId); |
| | | deviceInspectionRecord.setRecorderId(userId); |
| | | deviceInspectionRecord.setRecorder(user.getName()); |
| | | |
| | | // æ¥è¯¢å¤æ ¸äººid |
| | | if (deviceInspectionRecord.getReviewerId() != null) { |
| | | User reviewUser = userMapper.selectById(deviceInspectionRecord.getReviewerId()); |
| | | deviceInspectionRecord.setReviewer(reviewUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceInspectionRecord); |
| | | if (CollectionUtils.isNotEmpty(deviceInspectionRecord.getDetails())) { |
| | | for (DeviceInspectionRecordDetails detail : deviceInspectionRecord.getDetails()) { |
| | | detail.setInspectionRecordId(deviceInspectionRecord.getInspectionRecordId()); |
| | | } |
| | | deviceInspectionRecordDetailsService.saveBatch( deviceInspectionRecord.getDetails()); |
| | | } |
| | | |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | @Override |
| | | public Result updateInspectionRecordAndDetails(DeviceInspectionRecordDto deviceInspectionRecord) { |
| | | // æ¥è¯¢å¤æ ¸äººid |
| | | if (deviceInspectionRecord.getReviewerId() != null) { |
| | | User reviewUser = userMapper.selectById(deviceInspectionRecord.getReviewerId()); |
| | | deviceInspectionRecord.setReviewer(reviewUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceInspectionRecord); |
| | | deviceInspectionRecordDetailsService.remove(Wrappers.<DeviceInspectionRecordDetails>lambdaQuery().eq(DeviceInspectionRecordDetails::getInspectionRecordId, deviceInspectionRecord.getInspectionRecordId())); |
| | | if (CollectionUtils.isNotEmpty(deviceInspectionRecord.getDetails())) { |
| | | for (DeviceInspectionRecordDetails detail : deviceInspectionRecord.getDetails()) { |
| | | detail.setInspectionRecordId(deviceInspectionRecord.getInspectionRecordId()); |
| | | } |
| | | deviceInspectionRecordDetailsService.saveBatch( deviceInspectionRecord.getDetails()); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | @Override |
| | | public Result deleteDeviceInspectionRecordOrDetails(DeviceInspectionRecordDto deviceInspectionRecord) { |
| | | this.removeById(deviceInspectionRecord); |
| | | deviceInspectionRecordDetailsService.remove(Wrappers.<DeviceInspectionRecordDetails>lambdaQuery().eq(DeviceInspectionRecordDetails::getInspectionRecordId, deviceInspectionRecord.getInspectionRecordId())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * 夿 ¸ç¹æ£è®°å½ |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result reviewDeviceInspectionRecord(DeviceInspectionRecordDto dto) { |
| | | LambdaUpdateWrapper<DeviceInspectionRecord> wrapper = Wrappers.<DeviceInspectionRecord>lambdaUpdate() |
| | | .eq(DeviceInspectionRecord::getInspectionRecordId, dto.getInspectionRecordId()) |
| | | .set(DeviceInspectionRecord::getStatus, dto.getStatus()) |
| | | .set(DeviceInspectionRecord::getReviewerRemark, dto.getReviewerRemark()); |
| | | |
| | | // 为0æ¸
é¤å®¡æ ¸äºº |
| | | if (dto.getStatus().equals(0)) { |
| | | wrapper.set(DeviceInspectionRecord::getReviewerId, null) |
| | | .set(DeviceInspectionRecord::getReviewer, null); |
| | | } |
| | | this.update(wrapper); |
| | | |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param deviceInspectionRecordId 设å¤ç¹æ£è®°å½id |
| | | * @param response ååº |
| | | */ |
| | | @Override |
| | | public Result exportDeviceInspectionRecord(Integer deviceInspectionRecordId, HttpServletResponse response) { |
| | | DeviceInspectionRecord deviceInspectionRecord = baseMapper.selectById(deviceInspectionRecordId); |
| | | DeviceInspectionRecordDto deviceInspectionRecordDto = new DeviceInspectionRecordDto(); |
| | | BeanUtils.copyProperties(deviceInspectionRecord, deviceInspectionRecordDto); |
| | | DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | deviceInspectionRecordDto.setTestDateString(deviceInspectionRecord.getTestDate() == null ? null : deviceInspectionRecord.getTestDate().format(dateFormatter)); |
| | | |
| | | List<DeviceInspectionRecordDetails> deviceInspectionRecordDetailsList = deviceInspectionRecordDetailsService.list(Wrappers.<DeviceInspectionRecordDetails>lambdaQuery().eq(DeviceInspectionRecordDetails::getInspectionRecordId, deviceInspectionRecordId)); |
| | | |
| | | Integer deviceId = deviceInspectionRecord.getDeviceId(); |
| | | |
| | | Device device = deviceMapper.selectById(deviceId); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-inspection-record.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceInspectionRecordDetailsList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceInspectionRecord", deviceInspectionRecordDto); |
| | | put("deviceInspectionRecordDetailsList", deviceInspectionRecordDetailsList); |
| | | put("device", device); |
| | | put("recorderUrl", UserUtils.getFinalUserSignatureUrl(deviceInspectionRecordDto.getRecorderId())); |
| | | put("reviewerUrl", UserUtils.getFinalUserSignatureUrl(deviceInspectionRecordDto.getReviewerId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | device.getDeviceName() + "ç¹æ£è®°å½", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.dto.DeviceInstructionDto; |
| | | import com.ruoyi.device.dto.DeviceOperationInstructionDto; |
| | | import com.ruoyi.device.mapper.InstructionMapper; |
| | | import com.ruoyi.device.pojo.DeviceInstruction; |
| | | import com.ruoyi.device.service.DeviceInstructionService; |
| | | import com.ruoyi.device.service.DeviceOperationInstructionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.Locale; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-12-04 10:29:18 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceInstructionServiceImpl extends ServiceImpl<InstructionMapper, DeviceInstruction> implements DeviceInstructionService { |
| | | |
| | | @Autowired |
| | | private DeviceOperationInstructionService operationInstructionService; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceInstruction> numberGenerator; |
| | | |
| | | @Override |
| | | public IPage<DeviceOperationInstructionDto> pageByPageQueryOfHomeworkInstructions(Page page, DeviceOperationInstructionDto operationInstructionDto) { |
| | | return baseMapper.pageByPageQueryOfHomeworkInstructions(page, QueryWrappers.queryWrappers(operationInstructionDto)); |
| | | } |
| | | |
| | | @Override |
| | | public void newHomeworkGuidebookAdded(DeviceInstructionDto instructionDto) { |
| | | if (ObjectUtils.isEmpty(instructionDto.getApplicationNumber())) { |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | | String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date()); |
| | | String day = new SimpleDateFormat("dd", Locale.CHINESE).format(new Date()); |
| | | String processNumber = numberGenerator.generateNumberWithPrefix(3, "WJSK" + year + month + day, DeviceInstruction::getApplicationNumber); |
| | | instructionDto.setApplicationNumber(processNumber); |
| | | } |
| | | saveOrUpdate(instructionDto); |
| | | if (ObjectUtils.isNotEmpty(instructionDto.getFeTempHumRecordList())) { |
| | | instructionDto.getFeTempHumRecordList().forEach(i -> { |
| | | i.setInstructionId(instructionDto.getId()); |
| | | i.setUploader(SecurityUtils.getUserId().intValue()); |
| | | i.setUpdateTime(LocalDateTime.now()); |
| | | }); |
| | | operationInstructionService.saveOrUpdateBatch(instructionDto.getFeTempHumRecordList()); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.device.dto.DeviceImpowerDetailsDto; |
| | | import com.ruoyi.device.dto.DeviceImpowerDto; |
| | | import com.ruoyi.device.dto.DeviceMaintenanceDto; |
| | | import com.ruoyi.device.mapper.DeviceMaintenanceMapper; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.device.pojo.DeviceImpower; |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import com.ruoyi.device.service.DeviceMaintenanceService; |
| | | import com.ruoyi.device.service.DeviceService; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.service.ISysDictDataService; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设å¤ç»´æ¤ä¿å
» |
| | | */ |
| | | @Service |
| | | public class DeviceMaintenanceImpl extends ServiceImpl<DeviceMaintenanceMapper, DeviceMaintenance> implements DeviceMaintenanceService { |
| | | @Resource |
| | | private DeviceService deviceService; |
| | | @Resource |
| | | private ISysDictTypeService iSysDictTypeService; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * 设å¤ç»´æ¤å页æ¥è¯¢ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceMaintenanceDto> selectDeviceMaintenancePage(Page page, DeviceMaintenanceDto deviceMaintenance) { |
| | | if (deviceMaintenance.getDeviceId() == null) { |
| | | return new Page(); |
| | | } |
| | | return baseMapper.selectDeviceMaintenancePage(page, QueryWrappers.queryWrappers(deviceMaintenance)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ç»´æ¤ä¿å
» |
| | | * @param deviceId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportDeviceMaintenance(Integer deviceId, HttpServletResponse response) { |
| | | // æ¥è¯¢è®¾å¤ç»´æ¤ä¿å
» |
| | | List<DeviceMaintenance> deviceMaintenanceList = baseMapper.selectList(Wrappers.<DeviceMaintenance>lambdaQuery() |
| | | .eq(DeviceMaintenance::getDeviceId, deviceId)); |
| | | |
| | | // è·åå°ç¬¬ä¸ä¸ªè®¾å¤ä½¿ç¨ææ |
| | | DeviceMaintenanceDto deviceMaintenanceDto = new DeviceMaintenanceDto(); |
| | | |
| | | List<SysDictData> sysDictDataList = null; |
| | | if (CollectionUtils.isNotEmpty(deviceMaintenanceList)) { |
| | | BeanUtils.copyProperties(deviceMaintenanceList.get(0), deviceMaintenanceDto); |
| | | // æ¥è¯¢è®¾å¤ä¿¡æ¯ |
| | | Device device = deviceService.getById(deviceId); |
| | | deviceMaintenanceDto.setDeviceName(device.getDeviceName()); |
| | | deviceMaintenanceDto.setManagementNumber(device.getManagementNumber()); |
| | | |
| | | //æ¥è¯¢ç»´æ¤ä¿å
»å¯¼åºåå
¸å¼ |
| | | sysDictDataList = getDeviceMaintenanceDict(device); |
| | | } |
| | | |
| | | // æ·»å åå
¸æä¸¾å¼ |
| | | for (DeviceMaintenance deviceMaintenance : deviceMaintenanceList) { |
| | | StringBuilder maintenanceContent = new StringBuilder(deviceMaintenance.getMaintenanceContent()); |
| | | if (CollectionUtils.isNotEmpty(sysDictDataList) && StringUtils.isNotBlank(deviceMaintenance.getMaintenanceContent())) { |
| | | maintenanceContent = new StringBuilder(); |
| | | List<String> splitList = StrUtil.split(deviceMaintenance.getMaintenanceContent(), ','); |
| | | // 循ç¯å¤ææ¯å¦æä¸æ ·key |
| | | for (SysDictData sysDictData : sysDictDataList) { |
| | | if (splitList.contains(sysDictData.getDictLabel())) { |
| | | maintenanceContent.append("â").append(sysDictData.getDictLabel()).append(" "); |
| | | } else { |
| | | maintenanceContent.append("â¡").append(sysDictData.getDictLabel()).append(" "); |
| | | } |
| | | } |
| | | } |
| | | deviceMaintenance.setMaintenanceContent(maintenanceContent.toString()); |
| | | // æ·»å ç»´æ¤äººå¾ç |
| | | deviceMaintenance.setMaintenanceUserUrlRender(UserUtils.getFinalUserSignatureUrl(deviceMaintenance.getMaintenanceUserId())); |
| | | |
| | | } |
| | | |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-maintenance.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceMaintenances", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("device", deviceMaintenanceDto); |
| | | put("deviceMaintenances", deviceMaintenanceList); |
| | | }}); |
| | | |
| | | 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(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * ****æ¥è¯¢ç»´æ¤ä¿å
»å¯¼åºåå
¸å¼*** |
| | | * @param device |
| | | */ |
| | | private List<SysDictData> getDeviceMaintenanceDict(Device device) { |
| | | List<SysDictData> sysDictDataList = new ArrayList<>(); |
| | | // æ¥è¯¢ç»´æ¤ä¿å
»å¯¼åºåå
¸å¼ |
| | | if (StringUtils.isNotBlank(device.getStoragePoint())) { |
| | | String dictType = null; |
| | | switch (device.getStoragePoint()) { |
| | | case "èå室": |
| | | dictType = "aging_maintenance_content"; |
| | | break; |
| | | case "èåå®éªå®¤": |
| | | dictType = "aging_maintenance_content"; |
| | | break; |
| | | case "çµæ§è½å®éªå®¤": |
| | | dictType = "electrical_maintenance_content"; |
| | | break; |
| | | case "ç¯å¢å®éªå®¤": |
| | | dictType = "environmental_maintenance_content"; |
| | | break; |
| | | case "çç§å®éªå®¤": |
| | | dictType = "burn_maintenance_content"; |
| | | break; |
| | | case "æ··ç¼å®éªå®¤": |
| | | dictType = "mixing_maintenance_content"; |
| | | break; |
| | | case "æ£æµä¸å¿çµæ§è½å®éªå®¤": |
| | | dictType = "center_electrical_maintenance_content"; |
| | | break; |
| | | case "ææ¸©äº": |
| | | dictType = "temperature2_maintenance_content"; |
| | | break; |
| | | case "ææ¸©ä¸": |
| | | dictType = "temperature1_maintenance_content"; |
| | | break; |
| | | case "åå¦å®éªå®¤": |
| | | dictType = "chemistry_maintenance_content"; |
| | | break; |
| | | case "å¶æ ·å®¤": |
| | | dictType = "sample_maintenance_content"; |
| | | break; |
| | | case "使¸©å®éªå®¤": |
| | | dictType = "hypothermia_maintenance_content"; |
| | | break; |
| | | } |
| | | sysDictDataList = iSysDictTypeService.selectDictDataByType(dictType); |
| | | } |
| | | return sysDictDataList; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceMaintenancePlanDetailsMapper; |
| | | import com.ruoyi.device.pojo.DeviceMaintenancePlanDetails; |
| | | import com.ruoyi.device.service.DeviceMaintenancePlanDetailsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å详æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:11:46 |
| | | */ |
| | | @Service |
| | | public class DeviceMaintenancePlanDetailsServiceImpl extends ServiceImpl<DeviceMaintenancePlanDetailsMapper, DeviceMaintenancePlanDetails> implements DeviceMaintenancePlanDetailsService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.constant.MenuJumpPathConstants; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.InformationNotification; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.WxCpUtils; |
| | | import com.ruoyi.device.dto.DeviceMaintenancePlanDetailsDto; |
| | | import com.ruoyi.device.dto.DeviceMaintenancePlanDto; |
| | | import com.ruoyi.device.mapper.DeviceMaintenancePlanDetailsMapper; |
| | | import com.ruoyi.device.mapper.DeviceMaintenancePlanMapper; |
| | | import com.ruoyi.device.pojo.DeviceMaintenancePlan; |
| | | import com.ruoyi.device.pojo.DeviceMaintenancePlanDetails; |
| | | import com.ruoyi.device.service.DeviceMaintenancePlanDetailsService; |
| | | import com.ruoyi.device.service.DeviceMaintenancePlanService; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.system.service.InformationNotificationService; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:10:52 |
| | | */ |
| | | @Service |
| | | public class DeviceMaintenancePlanServiceImpl extends ServiceImpl<DeviceMaintenancePlanMapper, DeviceMaintenancePlan> implements DeviceMaintenancePlanService { |
| | | |
| | | @Resource |
| | | private DeviceMaintenancePlanDetailsService deviceMaintenancePlanDetailsService; |
| | | @Resource |
| | | private DeviceMaintenancePlanDetailsMapper deviceMaintenancePlanDetailsMapper; |
| | | @Resource |
| | | private ThreadPoolTaskExecutor threadPoolTaskExecutor; |
| | | @Resource |
| | | private InformationNotificationService informationNotificationService; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param page |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result<IPage<DeviceMaintenancePlan>> selectDeviceMaintenancePlanByPage(Page page, DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | IPage<DeviceMaintenancePlan> iPage = baseMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(deviceMaintenancePlanDto)); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @Override |
| | | public Result addMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(userId); |
| | | deviceMaintenancePlanDto.setCompilerId(userId); |
| | | deviceMaintenancePlanDto.setCompiler(user.getName()); |
| | | deviceMaintenancePlanDto.setDatePreparation(LocalDateTime.now()); |
| | | |
| | | // æ¥è¯¢å®¡æ ¸äººid |
| | | if (deviceMaintenancePlanDto.getAuditId() != null) { |
| | | User auditUser = userMapper.selectById(deviceMaintenancePlanDto.getAuditId()); |
| | | deviceMaintenancePlanDto.setAudit(auditUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceMaintenancePlanDto); |
| | | |
| | | // 详æ
èµå¼å¹¶ä¿å |
| | | List<DeviceMaintenancePlanDetailsDto> deviceMaintenancePlanDetails = deviceMaintenancePlanDto.getDeviceMaintenancePlanDetails(); |
| | | if (CollectionUtils.isNotEmpty(deviceMaintenancePlanDetails)) { // 详æ
ä¸ä¸ºç©º |
| | | List<DeviceMaintenancePlanDetails> collect = deviceMaintenancePlanDetails.stream().map(deviceMaintenancePlanDetail -> { // éå详æ
|
| | | deviceMaintenancePlanDetail.setDeviceId(deviceMaintenancePlanDetail.getDeviceId()); // 设å¤ID |
| | | deviceMaintenancePlanDetail.setMaintenancePlanId(deviceMaintenancePlanDto.getMaintenancePlanId()); // ä¿å
»è®¡åID |
| | | DeviceMaintenancePlanDetails planDetails = new DeviceMaintenancePlanDetails(); |
| | | BeanUtils.copyProperties(deviceMaintenancePlanDetail, planDetails); |
| | | return planDetails; |
| | | }).collect(Collectors.toList()); |
| | | deviceMaintenancePlanDetailsService.saveBatch(collect); |
| | | } |
| | | |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ä¿å
»è®¡å |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @Override |
| | | public Result updateMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | // æ¥è¯¢å®¡æ ¸äººid |
| | | if (deviceMaintenancePlanDto.getAuditId() != null) { |
| | | User auditUser = userMapper.selectById(deviceMaintenancePlanDto.getAuditId()); |
| | | deviceMaintenancePlanDto.setAudit(auditUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceMaintenancePlanDto); |
| | | |
| | | // å é¤åæ¬ç详æ
|
| | | deviceMaintenancePlanDetailsService.remove(Wrappers.<DeviceMaintenancePlanDetails>lambdaQuery().eq(DeviceMaintenancePlanDetails::getMaintenancePlanId, deviceMaintenancePlanDto.getMaintenancePlanId())); |
| | | // 详æ
èµå¼å¹¶ä¿å |
| | | List<DeviceMaintenancePlanDetailsDto> deviceMaintenancePlanDetails = deviceMaintenancePlanDto.getDeviceMaintenancePlanDetails(); |
| | | if (CollectionUtils.isNotEmpty(deviceMaintenancePlanDetails)) { // 详æ
ä¸ä¸ºç©º |
| | | List<DeviceMaintenancePlanDetails> collect = deviceMaintenancePlanDetails.stream().map(deviceMaintenancePlanDetail -> { // éå详æ
|
| | | deviceMaintenancePlanDetail.setDeviceId(deviceMaintenancePlanDto.getDeviceId()); // 设å¤ID |
| | | deviceMaintenancePlanDetail.setMaintenancePlanId(deviceMaintenancePlanDto.getMaintenancePlanId()); // ä¿å
»è®¡åID |
| | | DeviceMaintenancePlanDetails planDetails = new DeviceMaintenancePlanDetails(); |
| | | BeanUtils.copyProperties(deviceMaintenancePlanDetail, planDetails); |
| | | return planDetails; |
| | | }).collect(Collectors.toList()); |
| | | deviceMaintenancePlanDetailsService.saveBatch(collect); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @Override |
| | | public Result deleteMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | this.removeById(deviceMaintenancePlanDto); |
| | | deviceMaintenancePlanDetailsService.remove(Wrappers.<DeviceMaintenancePlanDetails>lambdaQuery().eq(DeviceMaintenancePlanDetails::getMaintenancePlanId, deviceMaintenancePlanDto.getMaintenancePlanId())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param maintenancePlanId 设å¤ä¿å
»è®¡åid |
| | | * @param response ååº |
| | | */ |
| | | @Override |
| | | public Result exportDeviceMaintenancePlanDto(Integer maintenancePlanId, HttpServletResponse response) { |
| | | // æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | DeviceMaintenancePlanDto deviceMaintenancePlan = baseMapper.selectMaintenancePlanById(maintenancePlanId); |
| | | |
| | | // æ¥è¯¢è®¾å¤ä¿å
»è®¡å详æ
|
| | | List<DeviceMaintenancePlanDetailsDto> deviceMaintenancePlanDetailsDtoList = deviceMaintenancePlanDetailsMapper.deviceInspectionRecordDetailsList(maintenancePlanId); |
| | | // 设置åºå· |
| | | deviceMaintenancePlanDetailsDtoList.forEach(deviceInspectionRecordDetails -> { |
| | | deviceInspectionRecordDetails.setIndex(deviceMaintenancePlanDetailsDtoList.indexOf(deviceInspectionRecordDetails) + 1); |
| | | }); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/maintenance-plan.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceMaintenancePlanDetailsDtoList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceMaintenancePlan", deviceMaintenancePlan); |
| | | put("deviceMaintenancePlanDetailsDtoList", deviceMaintenancePlanDetailsDtoList); |
| | | // ç¼å¶äººç¾åå°å |
| | | put("compilerUrl", UserUtils.getFinalUserSignatureUrl(deviceMaintenancePlan.getCompilerId())); |
| | | // å®¡æ ¸äººç¾åå°å |
| | | put("auditUrl", UserUtils.getFinalUserSignatureUrl(deviceMaintenancePlan.getAuditId())); |
| | | }}); |
| | | |
| | | 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(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ä¿å
»è®¡å详æ
|
| | | * |
| | | * @param maintenancePlanId 设å¤ä¿å
»è®¡åid |
| | | */ |
| | | @Override |
| | | public Result<DeviceMaintenancePlanDto> getMaintenancePlanDetail(Integer maintenancePlanId) { |
| | | // æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | DeviceMaintenancePlan deviceMaintenancePlan = baseMapper.selectById(maintenancePlanId); |
| | | // æ¥è¯¢è¯¦æ
|
| | | DeviceMaintenancePlanDto deviceMaintenancePlanDto = new DeviceMaintenancePlanDto(); |
| | | BeanUtils.copyProperties(deviceMaintenancePlan, deviceMaintenancePlanDto); |
| | | deviceMaintenancePlanDto.setDeviceMaintenancePlanDetails(deviceMaintenancePlanDetailsMapper.deviceInspectionRecordDetailsList(maintenancePlanId)); |
| | | return Result.success(deviceMaintenancePlanDto); |
| | | } |
| | | |
| | | /** |
| | | * æäº¤å®¡æ ¸ |
| | | * @param deviceMaintenancePlanDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result submitReviewMaintenancePlanStatus(DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | User audit = userMapper.selectById(deviceMaintenancePlanDto.getAuditId()); |
| | | this.update(Wrappers.<DeviceMaintenancePlan>lambdaUpdate() |
| | | .eq(DeviceMaintenancePlan::getMaintenancePlanId, deviceMaintenancePlanDto.getMaintenancePlanId()) |
| | | .set(DeviceMaintenancePlan::getAuditId, audit.getId()) |
| | | .set(DeviceMaintenancePlan::getAudit, audit.getName()) |
| | | .set(DeviceMaintenancePlan::getStatus, null) |
| | | .set(DeviceMaintenancePlan::getAuditRemark, null) |
| | | .set(DeviceMaintenancePlan::getAuditDate, null) |
| | | ); |
| | | |
| | | DeviceMaintenancePlan deviceMaintenancePlan = baseMapper.selectById(deviceMaintenancePlanDto.getMaintenancePlanId()); |
| | | |
| | | // åéæ¶æ¯ |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(userId); |
| | | // æ¶æ¯åé |
| | | InformationNotification info = new InformationNotification(); |
| | | // åé人 |
| | | info.setCreateUser(user.getName()); |
| | | info.setMessageType("6"); |
| | | info.setTheme("CNAS设å¤ä¿å
»è®¡åå®¡æ ¸éç¥"); |
| | | info.setContent(deviceMaintenancePlan.getPlanYear() + "å¹´ç设å¤ä¿å
»è®¡åå¾
å®¡æ ¸"); |
| | | info.setSenderId(userId); |
| | | // æ¥æ¶äºº |
| | | info.setConsigneeId(audit.getId()); |
| | | info.setJumpPath(MenuJumpPathConstants.DEVICE); |
| | | informationNotificationService.addInformationNotification(info); |
| | | |
| | | // åéä¼ä¸å¾®ä¿¡éç¥ |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | String message = ""; |
| | | message += "CNAS设å¤ä¿å
»è®¡åæ ¸éç¥"; |
| | | message += "\n请å»èµæºç®¡ç-设å¤ä¸å±ç®å½-设å¤ä¿å
»è®¡åå¡«å"; |
| | | message += "\n" + deviceMaintenancePlan.getPlanYear() + "å¹´ç设å¤ä¿å
»è®¡åå¾
æ ¸"; |
| | | //åéä¼ä¸å¾®ä¿¡æ¶æ¯éç¥ |
| | | try { |
| | | WxCpUtils.inform(audit.getAccount(), message, null); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * å®¡æ ¸è®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @Override |
| | | public Result reviewMaintenancePlanStatus(DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | LambdaUpdateWrapper<DeviceMaintenancePlan> wrapper = Wrappers.<DeviceMaintenancePlan>lambdaUpdate() |
| | | .eq(DeviceMaintenancePlan::getMaintenancePlanId, deviceMaintenancePlanDto.getMaintenancePlanId()) |
| | | .set(DeviceMaintenancePlan::getStatus, deviceMaintenancePlanDto.getStatus()) |
| | | .set(DeviceMaintenancePlan::getAuditRemark, deviceMaintenancePlanDto.getAuditRemark()) |
| | | .set(DeviceMaintenancePlan::getAuditDate, LocalDateTime.now()); |
| | | |
| | | this.update(wrapper); // æ´æ° |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceMetricRecordMapper; |
| | | import com.ruoyi.device.pojo.DeviceMetricRecord; |
| | | import com.ruoyi.device.service.DeviceMetricRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-27 10:20:01 |
| | | */ |
| | | @Service |
| | | public class DeviceMetricRecordServiceImpl extends ServiceImpl<DeviceMetricRecordMapper, DeviceMetricRecord> implements DeviceMetricRecordService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceMetricMapper; |
| | | import com.ruoyi.device.pojo.DeviceMetric; |
| | | import com.ruoyi.device.service.IDeviceMetricService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class DeviceMetricServiceImpl extends ServiceImpl<DeviceMetricMapper, DeviceMetric> implements IDeviceMetricService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceMetricsCopyMapper; |
| | | import com.ruoyi.device.pojo.DeviceMetricsCopy; |
| | | import com.ruoyi.device.service.DeviceMetricsCopyService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç® æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-27 10:20:11 |
| | | */ |
| | | @Service |
| | | public class DeviceMetricsCopyServiceImpl extends ServiceImpl<DeviceMetricsCopyMapper, DeviceMetricsCopy> implements DeviceMetricsCopyService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.dto.DeviceOperationInstructionDto; |
| | | import com.ruoyi.device.mapper.OperationInstructionMapper; |
| | | import com.ruoyi.device.pojo.OperationInstruction; |
| | | import com.ruoyi.device.service.DeviceOperationInstructionService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤ - ä½ä¸æå¯¼ä¹¦ æ·»å åæ§æä»¶ å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-12-04 10:43:32 |
| | | */ |
| | | @Service |
| | | public class DeviceOperationInstructionServiceImpl extends ServiceImpl<OperationInstructionMapper, OperationInstruction> implements DeviceOperationInstructionService { |
| | | |
| | | @Override |
| | | public List<DeviceOperationInstructionDto> homeworkGuidebookEditor(Integer instructionId) { |
| | | return baseMapper.homeworkGuidebookEditor(instructionId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.dto.DeviceRecordDto; |
| | | import com.ruoyi.device.excel.DeviceRecordExportWord; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.mapper.DeviceRecordMapper; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.device.pojo.DeviceRecord; |
| | | import com.ruoyi.device.service.DeviceRecordService; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.system.domain.vo.SysRoleVo; |
| | | import com.ruoyi.system.mapper.SysRoleMenuMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 11:06:47 |
| | | */ |
| | | @Service |
| | | public class DeviceRecordServiceImpl extends ServiceImpl<DeviceRecordMapper, DeviceRecord> implements DeviceRecordService { |
| | | @Resource |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | @Resource |
| | | private SysRoleMenuMapper sysRoleMenuMapper; |
| | | |
| | | @Override |
| | | public IPage<DeviceRecordDto> deviceRecordPage(Integer deviceId, Page page, String sampleCode, String managementNumber) { |
| | | // todo:ä»
çèªå·± |
| | | Long userId = SecurityUtils.getUserId(); |
| | | // è·åæé夿æ¯å¦æ¯ä»
çæ |
| | | SysRoleVo sysRoleVo = sysRoleMenuMapper.selectRoleMenu("get:device:record", userId); |
| | | |
| | | Integer testUserId = null; |
| | | //没æä»
çææéè·³è¿ |
| | | if (sysRoleVo != null && sysRoleVo.getIsRersonal() != null && sysRoleVo.getIsRersonal().equals(1)) { |
| | | testUserId = SecurityUtils.getUserId().intValue(); |
| | | } |
| | | |
| | | return baseMapper.deviceRecordPage(deviceId, page, sampleCode, managementNumber, testUserId); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void exportUseRecord(Integer deviceId, String exportDate, HttpServletResponse response) { |
| | | // æ¥è¯¢cnas设å¤ä½¿ç¨è®°å½ |
| | | List<DeviceRecord> deviceList = baseMapper.selectExportList(deviceId, exportDate); |
| | | // 设å¤ä¿¡æ¯ |
| | | Device device = deviceMapper.selectById(deviceId); |
| | | |
| | | |
| | | // æ¥è¯¢è®¾å¤å±äºåªä¸ªå®éªå®¤ |
| | | String laboratoryName = "è£
å¤çº¿ç¼å®éªå®¤"; |
| | | |
| | | // è¦æ å°å°wordæ°æ® |
| | | List<DeviceRecordExportWord> deviceExportList = new ArrayList<>(); |
| | | // deviceExportList èµå¼ |
| | | for (DeviceRecord deviceRecord : deviceList) { |
| | | // å¤çè®¾å¤ å¼å§ä½¿ç¨æ¶é´ å ç»ææ¶é´ |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | String operationDate = ""; |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"); |
| | | if (deviceRecord.getUseStartDate() != null) { |
| | | startTime = deviceRecord.getUseStartDate().format(formatter); |
| | | endTime = deviceRecord.getUseEndDate().format(formatter); |
| | | String[] startTimeSplit = startTime.split(" "); |
| | | String[] endTimeSplit = endTime.split(" "); |
| | | if (startTimeSplit[0].equals(endTimeSplit[0])) { |
| | | startTime = startTimeSplit[1]; |
| | | endTime = endTimeSplit[1]; |
| | | } else { |
| | | endTime = endTimeSplit[0] + '\n' + endTimeSplit[1]; |
| | | startTime = startTimeSplit[0] + '\n' + startTimeSplit[1]; |
| | | } |
| | | DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy.M.d"); |
| | | operationDate = deviceRecord.getUseStartDate().format(formatter2); |
| | | } |
| | | // å¤ç使ç¨åå使ç¨å |
| | | String useBeforeString = deviceRecord.getUseBefore() == 0? "å¼å¸¸" : "è¯å¥½"; |
| | | String useAfterString = deviceRecord.getUseAfter() == 0 ? "å¼å¸¸" : "è¯å¥½"; |
| | | |
| | | DeviceRecordExportWord deviceRecordExportWord = new DeviceRecordExportWord(); |
| | | // è¿è¡èµå¼ |
| | | BeanUtils.copyProperties(deviceRecord, deviceRecordExportWord); |
| | | deviceRecordExportWord.setUseBeforeString(useBeforeString); // 使ç¨å |
| | | deviceRecordExportWord.setUseAfterString(useAfterString); // 使ç¨å |
| | | deviceRecordExportWord.setOperationDate(operationDate); // è®¾å¤æä½æ¥æ |
| | | deviceRecordExportWord.setUseStartDateString(startTime); // å¼å§æ¶é´ |
| | | deviceRecordExportWord.setUseEndDateString(endTime); // ç»ææ¶é´ |
| | | deviceExportList.add(deviceRecordExportWord); |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/use-record.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("useRecord", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | String deviceName = device.getDeviceName(); |
| | | String managementNumber = device.getManagementNumber(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("useRecord", deviceExportList); |
| | | put("deviceName", deviceName); |
| | | put("managementNumber", managementNumber); |
| | | put("laboratory", laboratoryName); |
| | | }}); |
| | | |
| | | 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(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.dto.DeviceScrappedDto; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.mapper.DeviceScrappedMapper; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.device.pojo.DeviceScrapped; |
| | | import com.ruoyi.device.service.DeviceScrappedService; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.LocalDate; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ¥åºç³è¯·è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 01:53:47 |
| | | */ |
| | | @Service |
| | | public class DeviceScrappedServiceImpl extends ServiceImpl<DeviceScrappedMapper, DeviceScrapped> implements DeviceScrappedService { |
| | | |
| | | @Resource |
| | | private DeviceMapper deivceMapper; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ¥åºç³è¯·å表 |
| | | * |
| | | * @param deviceScrapped |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceScrapped> pageDeviceScrapped(Page page, DeviceScrapped deviceScrapped) { |
| | | return baseMapper.pageDeviceScrapped(page, QueryWrappers.queryWrappers(deviceScrapped)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ¥åºç³è¯· |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addDeviceScrapped(DeviceScrapped deviceScrapped) { |
| | | DeviceScrapped scrapped = new DeviceScrapped(); |
| | | // å½åç»å½ç¨æ·ä¿¡æ¯åé¨é¨ |
| | | User user = userMapper.selectById(SecurityUtils.getUserId().intValue()); |
| | | switch (deviceScrapped.getFlowType()) { |
| | | case 0: |
| | | BeanUtils.copyProperties(deviceScrapped, scrapped); |
| | | // ç³è¯· |
| | | scrapped.setReasonsForScrap(deviceScrapped.getReasonsForScrap()); |
| | | scrapped.setApplicantUserId(user.getId()); |
| | | scrapped.setApplicantUser(user.getName()); |
| | | scrapped.setApplicantDate(LocalDate.now()); |
| | | |
| | | // å¤çäººä¿¡æ¯ |
| | | User departmentHeadUser = userMapper.selectById(deviceScrapped.getDepartmentHeadUserId()); |
| | | scrapped.setApplicantUserId(departmentHeadUser.getId()); |
| | | scrapped.setApplicantUser(departmentHeadUser.getName()); |
| | | |
| | | baseMapper.insert(scrapped); |
| | | break; |
| | | case 1: |
| | | scrapped.setScrappedId(deviceScrapped.getScrappedId()); |
| | | // ç³è¯·é¨é¨è´è´£äººæè§ |
| | | scrapped.setDepartmentHeadOpinion(deviceScrapped.getDepartmentHeadOpinion()); |
| | | scrapped.setDepartmentHeadDate(LocalDate.now()); |
| | | |
| | | // 计éå®¤ä¿¡æ¯ |
| | | User meteringRoomUser = userMapper.selectById(deviceScrapped.getMeteringRoomUserId()); |
| | | scrapped.setMeteringRoomUserId(meteringRoomUser.getId()); |
| | | scrapped.setMeteringRoomUser(meteringRoomUser.getName()); |
| | | |
| | | baseMapper.updateById(scrapped); |
| | | break; |
| | | case 2: |
| | | scrapped.setScrappedId(deviceScrapped.getScrappedId()); |
| | | // 计é室æè§ |
| | | scrapped.setMeteringRoomOpinion(deviceScrapped.getMeteringRoomOpinion()); |
| | | scrapped.setMeteringRoomDate(LocalDate.now()); |
| | | |
| | | // æ¹åäººä¿¡æ¯ |
| | | User approverUser = userMapper.selectById(deviceScrapped.getApproverUserId()); |
| | | scrapped.setApproverUserId(approverUser.getId()); |
| | | scrapped.setApproverUser(approverUser.getName()); |
| | | |
| | | baseMapper.updateById(scrapped); |
| | | break; |
| | | case 3: |
| | | scrapped.setScrappedId(deviceScrapped.getScrappedId()); |
| | | //æ¹å人 |
| | | scrapped.setApproverOpinion(deviceScrapped.getApproverOpinion()); |
| | | scrapped.setApproverDate(LocalDate.now()); |
| | | scrapped.setIsFinish(1); |
| | | baseMapper.updateById(scrapped); |
| | | break; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ¥åºç³è¯· |
| | | * |
| | | * @param scrappedId è®¾å¤æ¥åºç³è¯·id |
| | | * @param response ååº |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public Result<?> exportDeviceScrapped(Integer scrappedId, HttpServletResponse response) { |
| | | // æ¥è¯¢æ¥åºæ°æ® |
| | | DeviceScrappedDto deviceScrapped = baseMapper.selectDeviceScrappedById(scrappedId); |
| | | if (deviceScrapped == null) { |
| | | return Result.fail("è®¾å¤æ¥åºç³è¯·ä¸åå¨"); |
| | | } |
| | | Device device = null; |
| | | if (deviceScrapped.getDeviceId() != null) { |
| | | device = deivceMapper.selectById(deviceScrapped.getDeviceId()); |
| | | device = device == null ? new Device() : device; |
| | | } |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-scrapped.docx"); |
| | | Configure configure = Configure.builder() |
| | | .build(); |
| | | Device finalDevice = device; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceScrapped", deviceScrapped); |
| | | put("device", finalDevice); |
| | | // ç³è¯·äººç¾å |
| | | put("applicantUrl", UserUtils.getFinalUserSignatureUrl(deviceScrapped.getApplicantUserId())); |
| | | // é¨é¨è´è´£äººç¾å |
| | | put("headUrl", UserUtils.getFinalUserSignatureUrl(deviceScrapped.getDepartmentHeadUserId())); |
| | | // 计é室ç¾å |
| | | put("metrologyRoomUrl", UserUtils.getFinalUserSignatureUrl(deviceScrapped.getMeteringRoomUserId())); |
| | | // æ¹å人ç¾å |
| | | put("approverUrl", UserUtils.getFinalUserSignatureUrl(deviceScrapped.getApproverUserId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String deviceName = device.getDeviceName() == null ? "" : device.getDeviceName(); |
| | | String fileName = URLEncoder.encode( |
| | | deviceName + "è®¾å¤æ¥åºç³è¯·", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.basic.mapper.StructureItemParameterMapper; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.device.dto.*; |
| | | import com.ruoyi.device.mapper.CollectBridgeMapper; |
| | | import com.ruoyi.device.mapper.DeviceMaintenanceMapper; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.mapper.DeviceMetricRecordMapper; |
| | | import com.ruoyi.device.pojo.*; |
| | | import com.ruoyi.device.service.DataConfigService; |
| | | import com.ruoyi.device.service.DeviceService; |
| | | import com.ruoyi.device.service.DeviceDocumentsService; |
| | | import com.ruoyi.device.utils.DataAcquisition; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.mapper.InsSampleMapper; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 设å¤(Device)表æå¡å®ç°ç±» |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> implements DeviceService { |
| | | |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | private UserMapper userMapper; |
| | | |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | |
| | | private DataConfigService dataConfigService; |
| | | |
| | | private InsSampleMapper insSampleMapper; |
| | | |
| | | private DeviceDocumentsService documentService; |
| | | |
| | | private DeviceMetricRecordMapper deviceMetricRecordMapper; |
| | | |
| | | private DeviceMaintenanceMapper deviceMaintenanceMapper; |
| | | |
| | | private CollectBridgeMapper collectBridgeMapper; |
| | | |
| | | @Override |
| | | public IPage<DeviceDto> selectDeviceParameter(Page page, DeviceDto itemParameter, Boolean laboratoryNameIsNull) { |
| | | IPage<DeviceDto> iPage = deviceMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(itemParameter), laboratoryNameIsNull); |
| | | return iPage; |
| | | } |
| | | |
| | | @Override |
| | | public int addDeviceParameter(Device itemParameter) { |
| | | return deviceMapper.insert(itemParameter); |
| | | } |
| | | |
| | | @Override |
| | | public int delDeviceParameter(Integer id) { |
| | | return deviceMapper.deleteById(id); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public int upDeviceParameter(Device itemParameter) { |
| | | |
| | | return deviceMapper.updateById(itemParameter); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> selectEquipmentOverview() { |
| | | return deviceMapper.selectEquipmentOverview(new Page(1, 10), QueryWrappers.queryWrappers(new Device())); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> authorizedPerson() { |
| | | return deviceMapper.authorizedPerson(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> search(Integer status, String deviceName, String specificationModel, String largeCategory) { |
| | | return deviceMapper.search(status, deviceName, specificationModel, largeCategory); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> selectDeviceByCategory(String inspectionItem, String inspectionItemSubclass, String laboratory) { |
| | | List<Integer> id; |
| | | |
| | | try { |
| | | id = structureItemParameterMapper.selectList(Wrappers.<StructureItemParameter>lambdaQuery() |
| | | .eq(StructureItemParameter::getInspectionItem, inspectionItem) |
| | | .eq(ObjectUtils.isNotEmpty(inspectionItemSubclass), StructureItemParameter::getInspectionItemSubclass, inspectionItemSubclass) |
| | | .eq(ObjectUtils.isNotEmpty(laboratory), StructureItemParameter::getLaboratory, laboratory) |
| | | .select(StructureItemParameter::getId)).stream().map(StructureItemParameter::getId).collect(Collectors.toList()); |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | List<Device> devices = deviceMapper.selectList(Wrappers.<Device>lambdaQuery() |
| | | .eq(Device::getDeviceStatus, 0) |
| | | .isNotNull(Device::getInsProductIds)); |
| | | List<Device> devices2 = new ArrayList<>(); |
| | | for (Device device : devices) { |
| | | String[] ids = device.getInsProductIds().split(","); |
| | | for (String i : ids) { |
| | | if (ObjectUtils.isNotEmpty(i)) { |
| | | if (id.contains(Integer.parseInt(i))) { |
| | | devices2.add(device); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return devices2; |
| | | } |
| | | |
| | | @Override |
| | | public DeviceDto selectDeviceByCode(Integer id) { |
| | | DeviceDto deviceDto = deviceMapper.selectDeviceByCode(id); |
| | | List<Integer> ids = new ArrayList<>(); |
| | | if (Strings.isNotEmpty(deviceDto.getAuthorizedPerson())) { |
| | | if (deviceDto.getAuthorizedPerson().equals("null")) { |
| | | deviceDto.setAuthorizedPerson("[]"); |
| | | } |
| | | ids = JSON.parseArray(deviceDto.getAuthorizedPerson(), Integer.class); |
| | | } |
| | | String name = ""; |
| | | if (!ids.isEmpty()) { |
| | | name = userMapper.selectBatchIds(ids).stream().map(User::getName).collect(Collectors.joining(",")); |
| | | } |
| | | deviceDto.setAuthorizedPersonName(name); |
| | | //æ¥è¯¢è®¾å¤æ ¡åä¿¡æ¯ |
| | | DeviceMetricRecord calibrate = getDeviceMetricRecord(id, "calibrate"); |
| | | deviceDto.setCalibrateNo(calibrate.getCertificateSerialNumber()); |
| | | |
| | | // å°äºåç¨æ¥æï¼èªå¨å°ç¶ææ¹ä¸ºåç¨ |
| | | if (deviceDto.getNextCalibrationDate() != null) { |
| | | if (LocalDateTime.now().isAfter(deviceDto.getNextCalibrationDate())) { |
| | | // todo: 设å¤è¿è¡ç¶æåå
¸ |
| | | // List<Enums> enums = enumService.selectEnumByCategory("设å¤ç¶æ"); |
| | | // List<Enums> status = enums.stream().filter(item -> item.getLabel().equals("åç¨")).collect(Collectors.toList()); |
| | | // deviceDto.setDeviceStatus(Integer.parseInt(status.get(0).getValue())); |
| | | deviceMapper.updateById(deviceDto); |
| | | } |
| | | } |
| | | return deviceDto; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ ¡å/æ ¸æ¥è®°å½ |
| | | * @param deviceId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | public DeviceMetricRecord getDeviceMetricRecord(int deviceId, String type){ |
| | | return Optional.ofNullable( |
| | | deviceMetricRecordMapper.selectOne(Wrappers.<DeviceMetricRecord>lambdaQuery() |
| | | .eq(DeviceMetricRecord::getDeviceId, deviceId) |
| | | .eq(DeviceMetricRecord::getType, type) |
| | | .orderByDesc(DeviceMetricRecord::getCreateTime) |
| | | .last("limit 1"))).orElse(new DeviceMetricRecord()); |
| | | } |
| | | |
| | | @Override |
| | | public Result<?> dataAcquisition(HttpServletRequest request, DeviceCollectionDto dto) { |
| | | |
| | | // æ¥è¯¢æ£éªé¡¹ |
| | | List<Integer> itemIds = dto.getItemIds(); |
| | | if (CollectionUtils.isEmpty(itemIds)) { |
| | | throw new ErrorException("没æéè¦æ°éçæ£éªé¡¹"); |
| | | } |
| | | List<InsProduct> insProducts = insSampleMapper.selectProductResult(itemIds); |
| | | |
| | | // æ¥è¯¢æ£éªé¡¹ç»å®çid |
| | | List<Integer> itemParameterIds = insProducts.stream().map(InsProduct::getStructureItemParameterId).collect(Collectors.toList()); |
| | | |
| | | Set<String> deviceCodeSet = new LinkedHashSet<>(); |
| | | for (InsProduct product : insProducts) { |
| | | // æ¥è¯¢è®¾å¤ |
| | | // æ·»å 设å¤ç¼å· |
| | | if (product.getInsProductResult() != null) { |
| | | List<JSONObject> jsonObjects = JSON.parseArray(product.getInsProductResult().getEquipValue(), JSONObject.class); |
| | | for (JSONObject jsonObject : jsonObjects) { |
| | | if (!"".equals(jsonObject.get("v") + "")) { |
| | | List<String> v = StrUtil.split(jsonObject.get("v") + "", "ï¼"); |
| | | deviceCodeSet.addAll(v); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (CollectionUtils.isEmpty(deviceCodeSet)) { |
| | | throw new ErrorException("æªéæ©è®¾å¤ä¿¡æ¯"); |
| | | } |
| | | // è·å设å¤éå |
| | | List<Device> deviceList = baseMapper.selectList(Wrappers.<Device>lambdaQuery() |
| | | .in(Device::getManagementNumber, deviceCodeSet) |
| | | .isNotNull(Device::getIp) |
| | | .ne(Device::getIp, "")); |
| | | |
| | | if (CollectionUtils.isEmpty(deviceList)) { |
| | | throw new ErrorException("æ 设å¤é
ç½®ééç»å®ä¿¡æ¯"); |
| | | } |
| | | |
| | | // æ°éè¿åä¿¡æ¯ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | for (Device device : deviceList) { |
| | | String ip = device.getIp(); |
| | | // æ ¹æ®æ£éªé¡¹è·åconfig |
| | | List<DataConfig> list = dataConfigService.list(Wrappers.<DataConfig>lambdaQuery() |
| | | .in(DataConfig::getStructureItemParameterId, itemParameterIds) |
| | | .eq(DataConfig::getDeviceId, device.getId())); |
| | | |
| | | // è·å设å¤é
置类 |
| | | // å¤æè®¾å¤æ¯å¦æ¯æ°åç´æ¡¥ |
| | | if (device.getManagementNumber().equals("JCZX-ZB-ER02022")) { |
| | | map.putAll(dataCollectBridge(list, device, dto.getEntrustCode())); |
| | | } else { |
| | | map.putAll(DataAcquisition.dataAcquisitionEntrance(list, device, dto.getEntrustCode(), dto.getEntrustCode(), ip, insProducts.get(0).getCableTag())); |
| | | } |
| | | } |
| | | |
| | | |
| | | // 4ãé å¾ªç¯æ¬¡æ°ï¼åä¸å
¬å¼è®¡ç® |
| | | if (ObjectUtils.isNotEmpty(map)) { |
| | | Map<String, Object> frequency = DataAcquisition.createFrequency(dto.getEntrustCode(), dto.getEntrustCode(), map); |
| | | return Result.success(frequency); |
| | | } else { |
| | | return Result.success(null); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åæ°åç´æ¡¥æ£æµä¿¡æ¯ |
| | | * @return |
| | | */ |
| | | public Map<String, ?> dataCollectBridge(List<DataConfig> dataConfig, Device device, String entrustCode) { |
| | | // æ¼æ¥åå |
| | | Map<String, List<DataConfig>> userMap = dataConfig.stream() |
| | | .peek(i -> { |
| | | String itemName = i.getInspectionItem(); |
| | | if (StringUtils.isNotBlank(i.getInspectionItemClass())) { |
| | | itemName += "@" + i.getInspectionItemClass(); |
| | | } |
| | | String name = i.getInspectionItem().equals(i.getInspectionItemSubclass()) ? itemName + "," : itemName + "," + i.getInspectionItemSubclass(); |
| | | |
| | | // æ·»å æ£éªé¡¹åç§° |
| | | i.setInsProductItem(name); |
| | | }) |
| | | .collect(Collectors.groupingBy(DataConfig::getInsProductItem)); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | userMap.forEach((k, v) -> { |
| | | List<String> resultValue = new ArrayList<>(); |
| | | // æ¥è¯¢ç´æ¡¥çµæµçµé»æ°éå¼ |
| | | List<CollectBridge> collectBridges = collectBridgeMapper.selectList(Wrappers.<CollectBridge>lambdaQuery() |
| | | .like(CollectBridge::getEntrustCode, entrustCode) |
| | | .orderByAsc(CollectBridge::getCollectDate)); |
| | | |
| | | resultValue = collectBridges.stream().map(CollectBridge::getCollectValue).collect(Collectors.toList()); |
| | | |
| | | Map<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("equipName", device.getDeviceName()); |
| | | hashMap.put("equipValue", device.getManagementNumber()); |
| | | hashMap.put("result", resultValue); |
| | | map.put(k, hashMap); |
| | | }); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> treeDevice(String deviceName) { |
| | | List<Map<String, Object>> listMap = deviceMapper.treeDevice(deviceName); |
| | | return listMap; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void exportDeviceFile(Integer deviceId, HttpServletResponse response) { |
| | | |
| | | // 设å¤ä¿¡æ¯ |
| | | Device device = baseMapper.selectById(deviceId); |
| | | // è®¾å¤æ¡£æ¡ |
| | | List<DeviceDocuments> documentList = documentService.list(Wrappers.<DeviceDocuments>lambdaQuery().eq(DeviceDocuments::getDeviceId, deviceId)); |
| | | // è®¾å¤æ ¡å表 |
| | | List<DeviceMetricRecord> deviceMetricRecordList = deviceMetricRecordMapper.selectList(Wrappers.<DeviceMetricRecord>lambdaQuery().eq(DeviceMetricRecord::getDeviceId, deviceId)); |
| | | // 设å¤ç»´ä¿®è¡¨ |
| | | List<DeviceMaintenance> deviceMaintenanceList = deviceMaintenanceMapper.selectList(Wrappers.<DeviceMaintenance>lambdaQuery().eq(DeviceMaintenance::getDeviceId, deviceId)); |
| | | |
| | | |
| | | // è¿åç»wordçæ°æ®å表 å为左å³ä¸¤åæ°æ® |
| | | List<DocumentExportWordDto> documentExportWordDtoList = new ArrayList<>(); |
| | | // ç»æ¡£æ¡å åºå· å¹¶å·¦å³å为左å³ä¸¤åå¨word䏿¾ç¤º |
| | | extracted(documentList, documentExportWordDtoList); |
| | | |
| | | |
| | | // å°æ ¡å表å维修表æ¾å
¥ä¸ä¸ªå¯¹è±¡ä¸æ¹ä¾¿wordè¡¨æ ¼ä¸æ¾ç¤º |
| | | List<DeviceMetricRecordAndMaintenanceDto> deviceMetricRecordAndMaintenanceDtoList = getDeviceMetricRecordAndMaintenanceDtoList(deviceMetricRecordList, deviceMaintenanceList); |
| | | |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-document.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("document", new HackLoopTableRenderPolicy()) |
| | | .bind("deviceMetricRecordAndMaintenanceDtoList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("device", device); |
| | | put("document", documentExportWordDtoList); // æ¡£æ¡ |
| | | put("deviceMetricRecordAndMaintenanceDtoList", deviceMetricRecordAndMaintenanceDtoList); // æ ¡å表 å 维修表 |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | device.getDeviceName() + "æ¡£æ¡", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | private List<DeviceMetricRecordAndMaintenanceDto> getDeviceMetricRecordAndMaintenanceDtoList(List<DeviceMetricRecord> deviceMetricRecordList, List<DeviceMaintenance> deviceMaintenanceList) { |
| | | // è®¾å¤æ ¡å表å设å¤ç»´ä¿®è¡¨çéå |
| | | List<DeviceMetricRecordAndMaintenanceDto> deviceMetricRecordAndMaintenanceDtoList = new ArrayList<>(); |
| | | // è®¾å¤æ ¡å表å设å¤ç»´ä¿®è¡¨çé¿åº¦å¯è½ä¸ä¸æ · åæå¤§å¼ ä¸å¤çç¨ç©ºæ°æ®å¡«å
|
| | | int metricRecordSize = deviceMetricRecordList.size(); |
| | | int maintenanceSize = deviceMaintenanceList.size(); |
| | | int size = Math.max(metricRecordSize, maintenanceSize); |
| | | // ç» æ ¡éªå维修对象 èµå¼ |
| | | for (int i = 0; i < size; i++) { |
| | | // æ ¡éªå维修对象 |
| | | DeviceMetricRecordAndMaintenanceDto deviceMetricRecordAndMaintenanceDto = new DeviceMetricRecordAndMaintenanceDto(); |
| | | // 设置åºå· |
| | | deviceMetricRecordAndMaintenanceDto.setIndex(i + 1); |
| | | |
| | | // æ ¡åè¡¨æ°æ® |
| | | if (metricRecordSize > i) { |
| | | // è®¾ç½®æ¥ææ ¼å¼ |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | // è·åè®¾å¤æ ¡åè¡¨æ°æ® |
| | | DeviceMetricRecord deviceMetricRecord = deviceMetricRecordList.get(i); |
| | | // è®¾ç½®æ ¡åæ¥æ |
| | | deviceMetricRecordAndMaintenanceDto.setCalibrationDateString(sdf.format(deviceMetricRecord.getCalibrationDate())); |
| | | // 设置è¯ä¹¦ç¼å· |
| | | deviceMetricRecordAndMaintenanceDto.setCertificateNumber(deviceMetricRecord.getCertificateSerialNumber()); |
| | | // è®¾ç½®æææ |
| | | deviceMetricRecordAndMaintenanceDto.setValidityDateString(sdf.format(deviceMetricRecord.getNextCalibrationDate())); |
| | | // è®¾ç½®æ ¡åæææ¥æ |
| | | deviceMetricRecordAndMaintenanceDto.setValidityDateString(sdf.format(deviceMetricRecord.getConfirmDate())); |
| | | // 设置æ£éªç»æ |
| | | deviceMetricRecordAndMaintenanceDto.setJudgement(deviceMetricRecord.getStatus()); |
| | | } |
| | | |
| | | // ç»´ä¿®è¡¨æ°æ® |
| | | if (maintenanceSize > i) { |
| | | // è·å设å¤ç»´ä¿®è¡¨æ°æ® |
| | | DeviceMaintenance deviceMaintenance = deviceMaintenanceList.get(i); |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | // ç»´ä¿®æ¥æ |
| | | deviceMetricRecordAndMaintenanceDto.setMaintenanceDateString(deviceMaintenance.getMaintenanceDate().format(dateTimeFormatter)); |
| | | // å¤çæ¹æ³ |
| | | deviceMetricRecordAndMaintenanceDto.setHandlingMethod(deviceMaintenance.getMaintenanceContent()); |
| | | // 夿³¨ |
| | | deviceMetricRecordAndMaintenanceDto.setComments(deviceMaintenance.getRemark()); |
| | | } |
| | | |
| | | deviceMetricRecordAndMaintenanceDtoList.add(deviceMetricRecordAndMaintenanceDto); |
| | | } |
| | | return deviceMetricRecordAndMaintenanceDtoList; |
| | | } |
| | | |
| | | /** |
| | | * ç»æ¡£æ¡å åºå· å¹¶å·¦å³å为左å³ä¸¤åå¨word䏿¾ç¤º |
| | | * |
| | | * @param documentList æ¡£æ¡å表 |
| | | * @param documentExportWordDtoList è¿åç»wordçæ°æ®å表 |
| | | */ |
| | | private static void extracted(List<DeviceDocuments> documentList, List<DocumentExportWordDto> documentExportWordDtoList) { |
| | | // ç»æ¡£æ¡å åºå· å¹¶ä¸å为左å³ä¸¤ä¸ªå表å¨word䏿¾ç¤º |
| | | for (int i = 0; i < documentList.size(); i++) { |
| | | // å建wordè¡¨æ ¼ä¸ä¸è¡çæ°æ®å¯¹è±¡ |
| | | DocumentExportWordDto documentExportWordDto = new DocumentExportWordDto(); |
| | | // è·åæ¡£æ¡ä¿¡æ¯ |
| | | DeviceDocuments document = documentList.get(i); |
| | | // æ ¼å¼åæ¥æ |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | // æ ¹æ®åºå· åå«å å
¥ä¸¤ä¸ªå表 |
| | | if (i % 2 == 0) { |
| | | // 奿°å¨å·¦å |
| | | documentExportWordDto.setIndex1(i + 1); |
| | | documentExportWordDto.setName1(document.getName()); |
| | | documentExportWordDto.setQuantity1(document.getQuantity()); |
| | | documentExportWordDto.setPageCount1(document.getPageCount()); |
| | | documentExportWordDto.setArchiveDateString1(document.getProvideDate().format(dateTimeFormatter)); |
| | | } else { |
| | | // å¶æ°å¨å³å |
| | | documentExportWordDto.setIndex2(i + 1); |
| | | documentExportWordDto.setName2(document.getName()); |
| | | documentExportWordDto.setQuantity2(document.getQuantity()); |
| | | documentExportWordDto.setPageCount2(document.getPageCount()); |
| | | documentExportWordDto.setArchiveDateString2(document.getProvideDate().format(dateTimeFormatter)); |
| | | } |
| | | // æä¸è¡æ°æ®å¯¹è±¡å å
¥å表 |
| | | documentExportWordDtoList.add(documentExportWordDto); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void exportEquipmentDetails(HttpServletResponse response) { |
| | | List<Device> deviceList = baseMapper.selectList(null); |
| | | List<DeviceExport> deviceExportList = new ArrayList<>(); |
| | | |
| | | int index = 1; |
| | | for (Device device : deviceList) { |
| | | Integer equipmentManager = device.getEquipmentManager(); |
| | | String equipmentManagerName = null; |
| | | if (equipmentManager != null) { |
| | | User user = userMapper.selectById(equipmentManager); |
| | | if (user != null) { |
| | | equipmentManagerName = user.getName(); |
| | | } |
| | | } |
| | | DeviceExport deviceExport = new DeviceExport(); |
| | | BeanUtils.copyProperties(device, deviceExport); |
| | | deviceExport.setIndex(index); |
| | | deviceExport.setEquipmentManagerName(equipmentManagerName); |
| | | deviceExportList.add(deviceExport); |
| | | index++; |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/quipment-details.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceList", deviceExportList); |
| | | }}); |
| | | |
| | | 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(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.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.data.Pictures; |
| | | import com.ruoyi.basic.mapper.LaboratoryMapper; |
| | | import com.ruoyi.basic.pojo.Laboratory; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.device.dto.DeviceStateDto; |
| | | import com.ruoyi.device.mapper.DeviceStateMapper; |
| | | import com.ruoyi.device.pojo.DeviceState; |
| | | import com.ruoyi.device.service.DeviceStateService; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤åç¨/å¯ç¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | @Service |
| | | public class DeviceStateServiceImpl extends ServiceImpl<DeviceStateMapper, DeviceState> implements DeviceStateService { |
| | | |
| | | @Resource |
| | | private LaboratoryMapper laboratoryMapper; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public IPage<DeviceStateDto> getDeviceStatePage(Integer deviceId, Page page, String processNumber) { |
| | | return baseMapper.getDeviceStatePage(deviceId, page, processNumber); |
| | | } |
| | | |
| | | @Override |
| | | public void exportDeviceStatus(Integer deviceId, String processNumber, HttpServletResponse response) { |
| | | // æ ¹æ®æµç¨ç¼å· æ¥è¯¢cnas设å¤ç¶æ |
| | | DeviceStateDto deviceStateDto = baseMapper.getDeviceStatePage(deviceId,new Page<DeviceStateDto>(1,1), processNumber).getRecords().get(0); |
| | | |
| | | // 对æ¶é´è¿è¡ä¿®æ¹ |
| | | DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"); |
| | | deviceStateDto.setSubmitDateString(deviceStateDto.getSubmitDate() != null ? deviceStateDto.getSubmitDate().format(format) : " å¹´ æ æ¥"); |
| | | deviceStateDto.setDepartmentDateString(deviceStateDto.getDepartmentDate() != null? deviceStateDto.getDepartmentDate().format(format) : " å¹´ æ æ¥"); |
| | | deviceStateDto.setMeasuringRoomDateString(deviceStateDto.getMeasuringRoomDate() != null? deviceStateDto.getMeasuringRoomDate().format(format) : " å¹´ æ æ¥"); |
| | | deviceStateDto.setApprovalDateString(deviceStateDto.getApprovalDate() != null? deviceStateDto.getApprovalDate().format(format) : " å¹´ æ æ¥"); |
| | | |
| | | // æ¥è¯¢è®¾å¤å±äºåªä¸ªå®éªå®¤ |
| | | String laboratoryName; |
| | | String largeCategory = deviceStateDto.getLargeCategory(); |
| | | if (StringUtils.isNotBlank(largeCategory)) { |
| | | largeCategory = largeCategory.substring(0, 1); |
| | | Laboratory laboratory = laboratoryMapper.selectOne(Wrappers.<Laboratory>lambdaQuery() |
| | | .eq(Laboratory::getLaboratoryNumber, largeCategory) |
| | | .select(Laboratory::getLaboratoryName)); |
| | | laboratoryName = laboratory.getLaboratoryName(); |
| | | } else { |
| | | laboratoryName = ""; |
| | | } |
| | | |
| | | //todo: 设å¤ç¶ææ¥è¯¢ç¾åå°å ææ¶äººåæ¥è¯¢ |
| | | //è·åç³è¯·äººçç¾åå°å |
| | | String applicantUrl = null; |
| | | if (deviceStateDto.getSubmitOperatingPersonnel() != null) { |
| | | applicantUrl = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, deviceStateDto.getSubmitOperatingPersonnel())) |
| | | .getSignatureUrl(); |
| | | if (StringUtils.isBlank(applicantUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°ç³è¯·äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //è·åé¨é¨è´è´£äººçç¾åå°å |
| | | String headOfDepartmentUrl = null; |
| | | if (deviceStateDto.getDepartmentNextPesponsible() != null) { |
| | | headOfDepartmentUrl = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, deviceStateDto.getDepartmentNextPesponsible())) |
| | | .getSignatureUrl(); |
| | | if (StringUtils.isBlank(headOfDepartmentUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°é¨é¨è´è´£äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //è·å计é室夿µäººçç¾åå°å |
| | | String measurementRoomUrl = null; |
| | | if (deviceStateDto.getMeasuringRoomNextPesponsible() != null) { |
| | | measurementRoomUrl = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, deviceStateDto.getMeasuringRoomNextPesponsible())) |
| | | .getSignatureUrl(); |
| | | if (StringUtils.isBlank(measurementRoomUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°è®¡é室夿µäººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //è·åæ¹å人çç¾åå°å |
| | | String approvedUrl = null; |
| | | if (deviceStateDto.getApprovalNextPesponsible() != null) { |
| | | approvedUrl = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, deviceStateDto.getApprovalNextPesponsible())) |
| | | .getSignatureUrl(); |
| | | if (StringUtils.isBlank(approvedUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ¹å人çç¾å"); |
| | | } |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-status.docx"); |
| | | Configure configure = Configure.builder() |
| | | .build(); |
| | | String finalApplicantUrl = applicantUrl; // ç³è¯·äººçç¾åå°å |
| | | String finalHeadOfDepartmentUrl = headOfDepartmentUrl; // é¨é¨è´è´£äººçç¾åå°å |
| | | String finalMeasurementRoomUrl = measurementRoomUrl; // 计é室夿µäººçç¾åå°å |
| | | String finalApprovedUrl = approvedUrl; // æ¹å人çç¾åå°å |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceStateDto", deviceStateDto); |
| | | put("submitOperatingPersonnelUrl", StringUtils.isNotBlank(finalApplicantUrl) ? Pictures.ofLocal(imgUrl + "/" + finalApplicantUrl).create() : null); |
| | | put("departmentNextPesponsibleUrl", StringUtils.isNotBlank(finalHeadOfDepartmentUrl) ? Pictures.ofLocal(imgUrl + "/" + finalHeadOfDepartmentUrl).create() : null); |
| | | put("measuringRoomNextPesponsibleUrl", StringUtils.isNotBlank(finalMeasurementRoomUrl) ? Pictures.ofLocal(imgUrl + "/" + finalMeasurementRoomUrl).create() : null); |
| | | put("approvalNextPesponsibleUrl", StringUtils.isNotBlank(finalApprovedUrl) ? Pictures.ofLocal(imgUrl + "/" + finalApprovedUrl).create() : null); |
| | | put("laboratory", laboratoryName); |
| | | }}); |
| | | |
| | | 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(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.device.mapper.DeviceTraceabilityManagementDetailsMapper; |
| | | import com.ruoyi.device.pojo.DeviceTraceabilityManagementDetails; |
| | | import com.ruoyi.device.service.DeviceTraceabilityManagementDetailsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å详æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:58 |
| | | */ |
| | | @Service |
| | | public class DeviceTraceabilityManagementDetailsServiceImpl extends ServiceImpl<DeviceTraceabilityManagementDetailsMapper, DeviceTraceabilityManagementDetails> implements DeviceTraceabilityManagementDetailsService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.constant.MenuJumpPathConstants; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.InformationNotification; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.WxCpUtils; |
| | | import com.ruoyi.device.dto.DeviceTraceabilityManagementDetailsDto; |
| | | import com.ruoyi.device.dto.DeviceTraceabilityManagementDto; |
| | | import com.ruoyi.device.mapper.DeviceTraceabilityManagementDetailsMapper; |
| | | import com.ruoyi.device.mapper.DeviceTraceabilityManagementMapper; |
| | | import com.ruoyi.device.pojo.DeviceTraceabilityManagement; |
| | | import com.ruoyi.device.pojo.DeviceTraceabilityManagementDetails; |
| | | import com.ruoyi.device.service.DeviceTraceabilityManagementDetailsService; |
| | | import com.ruoyi.device.service.DeviceTraceabilityManagementService; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.inspect.util.UserUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.system.service.InformationNotificationService; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:44 |
| | | */ |
| | | @Service |
| | | public class DeviceTraceabilityManagementServiceImpl extends ServiceImpl<DeviceTraceabilityManagementMapper, DeviceTraceabilityManagement> implements DeviceTraceabilityManagementService { |
| | | |
| | | @Resource |
| | | private DeviceTraceabilityManagementDetailsService deviceTraceabilityManagementDetailsService; |
| | | |
| | | @Resource |
| | | private DeviceTraceabilityManagementDetailsMapper deviceTraceabilityManagementDetailsMapper; |
| | | @Resource |
| | | private ThreadPoolTaskExecutor threadPoolTaskExecutor; |
| | | @Resource |
| | | private InformationNotificationService informationNotificationService; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤é弿º¯æºè®¡å |
| | | * |
| | | * @param page |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result<IPage<DeviceTraceabilityManagement>> selectDeviceTraceabilityManagementByPage(Page page, DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | IPage<DeviceTraceabilityManagement> iPage = baseMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(deviceTraceabilityManagementDto)); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤é弿º¯æºè®¡å |
| | | * |
| | | * @param deviceTraceabilityManagementDto 设å¤é弿º¯æºè®¡å |
| | | */ |
| | | @Override |
| | | public Result addTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(userId); |
| | | deviceTraceabilityManagementDto.setCompilerId(userId); |
| | | deviceTraceabilityManagementDto.setCompiler(user.getName()); |
| | | deviceTraceabilityManagementDto.setDatePreparation(LocalDateTime.now()); |
| | | |
| | | // æ¥è¯¢å®¡æ ¸äººid |
| | | if (deviceTraceabilityManagementDto.getAuditId() != null) { |
| | | User auditUser = userMapper.selectById(deviceTraceabilityManagementDto.getAuditId()); |
| | | deviceTraceabilityManagementDto.setAudit(auditUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceTraceabilityManagementDto); |
| | | |
| | | // 详æ
èµå¼å¹¶ä¿å |
| | | List<DeviceTraceabilityManagementDetailsDto> deviceTraceabilityManagementDetails = deviceTraceabilityManagementDto.getDeviceTraceabilityManagementDetails(); |
| | | if (CollectionUtils.isNotEmpty(deviceTraceabilityManagementDetails)) { // 详æ
ä¸ä¸ºç©º |
| | | List<DeviceTraceabilityManagementDetails> collect = deviceTraceabilityManagementDetails.stream().map(detailsDto -> { |
| | | detailsDto.setTraceabilityManagementId(deviceTraceabilityManagementDto.getTraceabilityManagementId()); // é弿º¯æºè®¡åID |
| | | DeviceTraceabilityManagementDetails details = new DeviceTraceabilityManagementDetails(); |
| | | BeanUtils.copyProperties(detailsDto, details); |
| | | return details; |
| | | }).collect(Collectors.toList()); |
| | | deviceTraceabilityManagementDetailsService.saveBatch(collect); |
| | | } |
| | | |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤é弿º¯æºè®¡å |
| | | * |
| | | * @param deviceTraceabilityManagementDto 设å¤é弿º¯æºè®¡å |
| | | */ |
| | | @Override |
| | | public Result updateTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | // æ¥è¯¢å®¡æ ¸äººid |
| | | if (deviceTraceabilityManagementDto.getAuditId() != null) { |
| | | User auditUser = userMapper.selectById(deviceTraceabilityManagementDto.getAuditId()); |
| | | deviceTraceabilityManagementDto.setAudit(auditUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceTraceabilityManagementDto); |
| | | |
| | | // å é¤åæ¬ç详æ
|
| | | deviceTraceabilityManagementDetailsService.remove(Wrappers.<DeviceTraceabilityManagementDetails>lambdaQuery().eq(DeviceTraceabilityManagementDetails::getTraceabilityManagementId, deviceTraceabilityManagementDto.getTraceabilityManagementId())); |
| | | // 详æ
èµå¼å¹¶ä¿å |
| | | List<DeviceTraceabilityManagementDetailsDto> deviceTraceabilityManagementDetails = deviceTraceabilityManagementDto.getDeviceTraceabilityManagementDetails(); |
| | | if (CollectionUtils.isNotEmpty(deviceTraceabilityManagementDetails)) { // 详æ
ä¸ä¸ºç©º |
| | | List<DeviceTraceabilityManagementDetails> collect = deviceTraceabilityManagementDetails.stream().map(detailsDto -> { |
| | | detailsDto.setTraceabilityManagementId(deviceTraceabilityManagementDto.getTraceabilityManagementId()); // é弿º¯æºè®¡åID |
| | | DeviceTraceabilityManagementDetails details = new DeviceTraceabilityManagementDetails(); |
| | | BeanUtils.copyProperties(detailsDto, details); |
| | | return details; |
| | | }).collect(Collectors.toList()); |
| | | deviceTraceabilityManagementDetailsService.saveBatch(collect); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤é弿º¯æºè®¡å |
| | | * |
| | | * @param deviceTraceabilityManagementDto 设å¤é弿º¯æºè®¡å |
| | | */ |
| | | @Override |
| | | public Result deleteTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | this.removeById(deviceTraceabilityManagementDto); |
| | | deviceTraceabilityManagementDetailsService.remove(Wrappers.<DeviceTraceabilityManagementDetails>lambdaQuery().eq(DeviceTraceabilityManagementDetails::getTraceabilityManagementId, deviceTraceabilityManagementDto.getTraceabilityManagementId())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤é弿º¯æºè®¡å详æ
|
| | | * |
| | | * @param traceabilityManagementId 设å¤é弿º¯æºè®¡åid |
| | | */ |
| | | @Override |
| | | public Result<DeviceTraceabilityManagementDto> getTraceabilityManagementDetail(Integer traceabilityManagementId) { |
| | | // æ¥è¯¢è®¾å¤é弿º¯æºè®¡å |
| | | DeviceTraceabilityManagement deviceTraceabilityManagement = baseMapper.selectById(traceabilityManagementId); |
| | | // æ¥è¯¢è¯¦æ
|
| | | DeviceTraceabilityManagementDto deviceTraceabilityManagementDto = new DeviceTraceabilityManagementDto(); |
| | | BeanUtils.copyProperties(deviceTraceabilityManagement, deviceTraceabilityManagementDto); |
| | | deviceTraceabilityManagementDto.setDeviceTraceabilityManagementDetails(deviceTraceabilityManagementDetailsMapper.deviceTraceabilityManagementDetailsList(traceabilityManagementId)); |
| | | return Result.success(deviceTraceabilityManagementDto); |
| | | } |
| | | |
| | | /** |
| | | * æäº¤æ¹å |
| | | * @param deviceTraceabilityManagementDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result submitReviewTraceabilityManagementStatus(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | User audit = userMapper.selectById(deviceTraceabilityManagementDto.getAuditId()); |
| | | this.update(Wrappers.<DeviceTraceabilityManagement>lambdaUpdate() |
| | | .eq(DeviceTraceabilityManagement::getTraceabilityManagementId, deviceTraceabilityManagementDto.getTraceabilityManagementId()) |
| | | .set(DeviceTraceabilityManagement::getAuditId, audit.getId()) |
| | | .set(DeviceTraceabilityManagement::getAudit, audit.getName()) |
| | | .set(DeviceTraceabilityManagement::getAuditDate, null) |
| | | .set(DeviceTraceabilityManagement::getStatus, null) |
| | | .set(DeviceTraceabilityManagement::getAuditRemark, null)); |
| | | |
| | | DeviceTraceabilityManagement deviceTraceabilityManagement = baseMapper.selectById(deviceTraceabilityManagementDto.getTraceabilityManagementId()); |
| | | |
| | | // åéæ¶æ¯ |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(userId); |
| | | // æ¶æ¯åé |
| | | InformationNotification info = new InformationNotification(); |
| | | // åé人 |
| | | info.setCreateUser(user.getName()); |
| | | info.setMessageType("6"); |
| | | info.setTheme("CNAS设å¤é弿º¯æºè®¡åæ¹åéç¥"); |
| | | info.setContent(deviceTraceabilityManagement.getPlanYear() + "å¹´ç设å¤é弿º¯æºè®¡åå¾
æ¹å"); |
| | | info.setSenderId(userId); |
| | | // æ¥æ¶äºº |
| | | info.setConsigneeId(audit.getId()); |
| | | info.setJumpPath(MenuJumpPathConstants.DEVICE); |
| | | informationNotificationService.addInformationNotification(info); |
| | | |
| | | // åéä¼ä¸å¾®ä¿¡éç¥ |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | String message = ""; |
| | | message += "CNAS设å¤é弿º¯æºè®¡åæ ¸éç¥"; |
| | | message += "\n请å»èµæºç®¡ç-设å¤ä¸å±ç®å½-设å¤é弿º¯æºè®¡åå¡«å"; |
| | | message += "\n" + deviceTraceabilityManagement.getPlanYear() + "å¹´ç设å¤é弿º¯æºè®¡åå¾
æ¹å"; |
| | | //åéä¼ä¸å¾®ä¿¡æ¶æ¯éç¥ |
| | | try { |
| | | WxCpUtils.inform(audit.getAccount(), message, null); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * å®¡æ ¸è®¾å¤é弿º¯æºè®¡å |
| | | * |
| | | * @param deviceTraceabilityManagementDto 设å¤é弿º¯æºè®¡å |
| | | */ |
| | | @Override |
| | | public Result reviewTraceabilityManagementStatus(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | LambdaUpdateWrapper<DeviceTraceabilityManagement> wrapper = Wrappers.<DeviceTraceabilityManagement>lambdaUpdate() |
| | | .eq(DeviceTraceabilityManagement::getTraceabilityManagementId, deviceTraceabilityManagementDto.getTraceabilityManagementId()) |
| | | .set(DeviceTraceabilityManagement::getAuditDate, LocalDateTime.now()) |
| | | .set(DeviceTraceabilityManagement::getStatus, deviceTraceabilityManagementDto.getStatus()) // å®¡æ ¸ç¶æ |
| | | .set(DeviceTraceabilityManagement::getAuditRemark, deviceTraceabilityManagementDto.getAuditRemark());// å®¡æ ¸å¤æ³¨ |
| | | |
| | | this.update(wrapper); // æ´æ° |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤é弿º¯æºè®¡å |
| | | * |
| | | * @param traceabilityManagementId 设å¤é弿º¯æºè®¡åid |
| | | */ |
| | | @Override |
| | | public Result exportDeviceTraceabilityManagementDto(Integer traceabilityManagementId, HttpServletResponse response) { |
| | | // æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | DeviceTraceabilityManagementDto deviceTraceabilityManagement = baseMapper.selectDeviceTraceabilityManagementById(traceabilityManagementId); |
| | | |
| | | // æ¥è¯¢è®¾å¤ä¿å
»è®¡å详æ
|
| | | List<DeviceTraceabilityManagementDetailsDto> deviceTraceabilityManagementDetailsDtoList = deviceTraceabilityManagementDetailsMapper.deviceTraceabilityManagementDetailsList(traceabilityManagementId); |
| | | // 设置åºå· |
| | | deviceTraceabilityManagementDetailsDtoList.forEach(deviceTraceabilityManagementDetails -> { |
| | | deviceTraceabilityManagementDetails.setIndex(deviceTraceabilityManagementDetailsDtoList.indexOf(deviceTraceabilityManagementDetails) + 1); |
| | | }); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/traceability-management-details.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceTraceabilityManagementDetailsDtoList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceTraceabilityManagement", deviceTraceabilityManagement); |
| | | put("deviceTraceabilityManagementDetailsDtoList", deviceTraceabilityManagementDetailsDtoList); |
| | | // ç¼å¶äººç¾åå°å |
| | | put("compilerUrl", UserUtils.getFinalUserSignatureUrl(deviceTraceabilityManagement.getCompilerId())); |
| | | // å®¡æ ¸äººç¾åå°å |
| | | put("auditUrl", UserUtils.getFinalUserSignatureUrl(deviceTraceabilityManagement.getAuditId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String finalFileName = deviceTraceabilityManagement.getFileName() == null ? "" : deviceTraceabilityManagement.getFileName() + "_"; |
| | | String fileName = URLEncoder.encode( |
| | | finalFileName+ "设å¤é弿º¯æºè®¡å", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.task; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.WxCpUtils; |
| | | import com.ruoyi.device.dto.DeviceRecordDto; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.mapper.DeviceRecordMapper; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.device.pojo.DeviceRecord; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 设å¤ä½¿ç¨è®°å½æé |
| | | */ |
| | | @Component |
| | | public class DeviceRecordSchedule { |
| | | |
| | | @Resource |
| | | private DeviceMapper deviceMapper; |
| | | @Resource |
| | | private DeviceRecordMapper deviceRecordMapper; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Resource |
| | | private ThreadPoolTaskExecutor threadPoolTaskExecutor; |
| | | |
| | | /** |
| | | * æéå¡«å设å¤ä½¿ç¨è®°å½ |
| | | */ |
| | | // @Scheduled(cron = "0/5 * * * * *") |
| | | @Scheduled(cron = "0 0 9 * * 6") // æ¯å¨å
æ§è¡ä¸æ¬¡ |
| | | public void task1() { |
| | | // æ¥è¯¢æªå¡«åç设å¤ä½¿ç¨è®°å½ |
| | | List<DeviceRecordDto> deviceRecords = deviceRecordMapper.selectNotFilled(); |
| | | Map<Integer, List<DeviceRecordDto>> userPersonIdMap = deviceRecords.stream().collect(Collectors.groupingBy(DeviceRecord::getUsePersonId)); |
| | | userPersonIdMap.forEach((userId, recordList) -> { |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | // ä¼ä¸å¾®ä¿¡éç¥å¡«å设å¤ä½¿ç¨è®°å½ |
| | | User user = userMapper.selectById(userId); |
| | | String message = ""; |
| | | message += "设å¤ä½¿ç¨è®°å½æªå¡«åæééç¥"; |
| | | for (DeviceRecordDto deviceRecord : recordList) { |
| | | message += "\n设å¤åç§°ç¼å·: " + deviceRecord.getDeviceName() + "-" + deviceRecord.getManagementNumber(); |
| | | message += "\nå§æç¼å·: " + deviceRecord.getSampleCode(); |
| | | message += "\n"; |
| | | } |
| | | message += "\n请å»å¡«å设å¤ä½¿ç¨è®°å½"; |
| | | |
| | | //åéä¼ä¸å¾®ä¿¡æ¶æ¯éç¥ |
| | | try { |
| | | WxCpUtils.inform(user.getAccount(), message, null); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¯å¤©9ç¹æ§è¡ä¸æ¬¡ é¤äºææå¤© |
| | | * 夿æ¯å¦æè®¾å¤å°è¾¾æ ¡åæææ |
| | | */ |
| | | // @Scheduled(cron = "0/10 * * * * *") |
| | | @Scheduled(cron = "0 0 9 * * 1-6") // æ¯å¤©9ç¹æ§è¡ä¸æ¬¡ é¤äºææå¤© |
| | | public void task2() { |
| | | // æ¥è¯¢å°è¾¾æ ¡åæææç设å¤-æå5天 |
| | | List<Device> deviceList = deviceMapper.selectOverdueDevice(); |
| | | Map<Integer, List<Device>> userPersonIdMap = deviceList.stream().collect(Collectors.groupingBy(Device::getEquipmentManager)); |
| | | userPersonIdMap.forEach((userId, recordList) -> { |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | // ä¼ä¸å¾®ä¿¡éç¥å¡«å设å¤ä½¿ç¨è®°å½ |
| | | User user = userMapper.selectById(userId); |
| | | String message = ""; |
| | | message += "设å¤å°è¾¾æ ¡åæææ"; |
| | | for (Device deviceRecord : recordList) { |
| | | message += "\n设å¤åç§°: " + deviceRecord.getDeviceName(); |
| | | message += "\n设å¤ç¼å·: " + deviceRecord.getManagementNumber(); |
| | | message += "\næ ¡åæææ: " + deviceRecord.getActivationDate(); |
| | | message += "\n"; |
| | | } |
| | | message += "\n请å»è¿è¡è®¾å¤æ ¡å"; |
| | | |
| | | //åéä¼ä¸å¾®ä¿¡æ¶æ¯éç¥ |
| | | try { |
| | | WxCpUtils.inform(user.getAccount(), message, null); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.utils; |
| | | |
| | | import cn.hutool.core.io.IORuntimeException; |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.ruoyi.device.pojo.DataConfig; |
| | | import com.ruoyi.device.pojo.Device; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | |
| | | import javax.script.ScriptEngine; |
| | | import javax.script.ScriptEngineManager; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | import java.util.stream.Collectors; |
| | | |
| | | public class DataAcquisition { |
| | | |
| | | private static final String HTTP = "http://"; |
| | | |
| | | private static final String GETFILE = ":9527/lims/getFile"; // è·åæä»¶æ¥å£ |
| | | |
| | | private static final String MOVEFILE = ":9527/lims/moveFile"; // æä»¶ç§»å¨å°å |
| | | |
| | | private static final String splitIdentifier = "@-@"; // èªå®ä¹å¯ä¸æ è¯åå²ç¬¦ |
| | | |
| | | public static final String frequency = "frequency"; |
| | | |
| | | /** |
| | | * æ°éå
¥å£ |
| | | * |
| | | * @param dataConfig |
| | | * @param device |
| | | * @return |
| | | */ |
| | | public static Map<String, Object> dataAcquisitionEntrance(List<DataConfig> dataConfig, Device device, String entrustCode, String sampleCode, String ip, String cableTag) { |
| | | // 夿æ¯å¦æ¯å½±åæµé仪 |
| | | if (device.getManagementNumber().equals("JCZX-ZB-OP07001")) { |
| | | if (device.getFileType().equals(".xlsx")) { |
| | | String url = device.getCollectUrl() + "\\" + sampleCode.replace("/", ""); |
| | | if (StringUtils.isNotBlank(dataConfig.get(0).getAnotherName())) { |
| | | url += dataConfig.get(0).getAnotherName() ; |
| | | } |
| | | url += ".xlsx"; |
| | | device.setCollectUrl(url); |
| | | } |
| | | } |
| | | // 夿æ¯å¦æ¯çµç¼çç§çå¯åº¦æµéç³»ç» |
| | | if (device.getManagementNumber().equals("JCZX-ZB-ZT03002")) { |
| | | if (device.getFileType().equals(".txt")) { |
| | | device.setCollectUrl(device.getCollectUrl() + "\\-" + sampleCode.replace("/", "")); |
| | | } |
| | | } |
| | | /** |
| | | * filePath æä»¶ééè·¯å¾ |
| | | * fileExtension æä»¶åç¼ |
| | | * entrustCode å§æç¼å· |
| | | * sampleCode æ ·åç¼å· |
| | | * mdbEntrustCode mdbæä»¶éè¦ï¼å§æç¼å·å段 为ä»ä¹æ²¡æå»è¿ä¸ªmdbåç¼å¢ï¼å 为已ç»ç»å®¢æ·çé¨åçµèä¸å®è£
äºééå¨ï¼èç¨æ·ä¸æ¥åéæ°å®è£
ééå¨ï¼æä»¥å°±æ²¡æå»é¤ |
| | | * mdbSampleCode mdbæä»¶éè¦ï¼æ ·åç¼å·å段 |
| | | */ |
| | | String http = HTTP + ip + GETFILE + |
| | | "?filePath=" + device.getCollectUrl() + |
| | | "&fileExtension=" + device.getFileType() + |
| | | "&entrustCode=" + entrustCode + |
| | | "&sampleCode=" + sampleCode + |
| | | "&mdbEntrustCode=" + device.getEntrustCode() + |
| | | "&mdbSampleCode=" + device.getSampleCode() + |
| | | "&dbFileName=" + device.getDbFileName(); |
| | | String result = null; |
| | | try { |
| | | result = HttpUtil.get(http); |
| | | } catch (IORuntimeException e) { |
| | | e.printStackTrace(); |
| | | throw new ErrorException("æå¨çµèæªå®è£
ææªå¯å¨ï¼LIMSæä»¶ééå¨ï¼"); |
| | | } |
| | | JSONObject jsonObject = JSON.parseObject(result); |
| | | if (Objects.equals(jsonObject.get("code"), 1)) { |
| | | if (ObjectUtils.isEmpty(jsonObject.get("msg"))) { |
| | | throw new ErrorException("æªæ¥è¯¢å°æä»¶ï¼å¯è½è¯¥è·¯å¾ï¼" + device.getCollectUrl() + "ï¼ä¸å¹¶æ²¡ææé(" + device.getFileType() +")æä»¶ï¼"); |
| | | } else { |
| | | throw new ErrorException(jsonObject.get("msg") + ""); |
| | | } |
| | | } else { |
| | | String data = jsonObject.get("data") + ""; |
| | | // èèå°ä¸ä¸ªæ£æµé¡¹å¯è½ä¼åå¨å¤ä¸ªæ°éé
ç½®ï¼æä»¥éè¦è¿è¡åç» |
| | | Map<String, List<DataConfig>> userMap = dataConfig.stream() |
| | | .peek(i -> { |
| | | String itemName = i.getInspectionItem(); |
| | | if (StringUtils.isNotBlank(i.getInspectionItemClass())) { |
| | | itemName += "@" + i.getInspectionItemClass(); |
| | | } |
| | | String name = i.getInspectionItem().equals(i.getInspectionItemSubclass()) ? itemName + "," : itemName + "," + i.getInspectionItemSubclass(); |
| | | |
| | | // æ·»å æ£éªé¡¹åç§° |
| | | i.setInsProductItem(name); |
| | | }) |
| | | .collect(Collectors.groupingBy(DataConfig::getInsProductItem)); |
| | | Map<String, Object> map; |
| | | switch (device.getFileType()) { |
| | | case ".docx": |
| | | map = analysisString(data, userMap, device, entrustCode, sampleCode); |
| | | break; |
| | | case ".xlsx": |
| | | map = analysisList(data, userMap, device, entrustCode, sampleCode); |
| | | break; |
| | | case ".txt": |
| | | map = analysisTxt(data, userMap, device, entrustCode, sampleCode); |
| | | break; |
| | | case ".csv": |
| | | map = analysisList(data, userMap, device, entrustCode, sampleCode); |
| | | break; |
| | | case ".mdb": |
| | | // 夿æ¯å¦æ¯æåæº |
| | | if (device.getManagementNumber().equals("JCZX-ZB-FF01014")) { |
| | | map = analysisMdbByPull(data, userMap, device, cableTag); |
| | | } else { |
| | | map = analysisMdb(data, userMap, device); |
| | | } |
| | | break; |
| | | case ".db": |
| | | map = analysisDb(data, userMap, device); |
| | | break; |
| | | case ".png": |
| | | map = readPngString(data, userMap, device); |
| | | break; |
| | | default: |
| | | map = null; |
| | | break; |
| | | } |
| | | // 妿åå¨åå¨å°åï¼åç§»å¨å°å |
| | | if (ObjectUtils.isNotEmpty(device.getStorageUrl())) { |
| | | String s = HTTP + ip + MOVEFILE + "?startFilePath=" + device.getCollectUrl() + "&endFilePath=" + device.getStorageUrl() + "&fileType=" + device.getFileType(); |
| | | HttpUtil.get(s); |
| | | } |
| | | return map; |
| | | } |
| | | } |
| | | |
| | | public static Map<String, Object> createFrequency(String entrustCode, String sampleCode, Map<String, Object> map) { |
| | | Set<String> set = new LinkedHashSet<>(); |
| | | map.forEach((key, value) -> { |
| | | String[] split = key.split(","); |
| | | String inspectionItem = split[0]; |
| | | // åªè¦æä¸ä¸ªä¸ä¸ºç©ºå°±setè¿å» |
| | | if (ObjectUtils.isNotEmpty(value)) { |
| | | set.add(inspectionItem); |
| | | } |
| | | }); |
| | | Map<String, Object> result = new HashMap<>(); |
| | | for (String inspectionItemKey : set) { |
| | | Map<String, Object> hashMap = new HashMap<>(); |
| | | map.forEach((key, value) -> { |
| | | String[] split = key.split(","); |
| | | String inspectionItem = split[0]; |
| | | if (inspectionItemKey.equals(inspectionItem)) { |
| | | if (split.length > 1) { |
| | | hashMap.put(split[1], value); |
| | | } else { |
| | | hashMap.put("", value); |
| | | } |
| | | } |
| | | }); |
| | | String frequency = createKey(entrustCode, sampleCode, inspectionItemKey); |
| | | hashMap.put("frequency", frequency); |
| | | result.put(inspectionItemKey, hashMap); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | public static String createKey(String entrustCode, String sampleCode, String inspectionItemKey) { |
| | | |
| | | return "1"; |
| | | } |
| | | |
| | | /** |
| | | * éè¦éè¿X,Yè½´å®ä½ |
| | | * |
| | | * @param data |
| | | * @param dataConfig |
| | | * @return |
| | | */ |
| | | private static Map<String, Object> analysisDb(String data, Map<String, List<DataConfig>> dataConfig, Device device) { |
| | | JSONObject jsonObject = JSON.parseObject(data); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (jsonObject.isEmpty()) { |
| | | return map; |
| | | } |
| | | JSONArray dataList = JSONArray.parseArray(jsonObject.get("data").toString()); |
| | | dataConfig.forEach((k, v) -> { |
| | | AtomicInteger numberOfDataEntries = new AtomicInteger(); |
| | | List<Object> list = new ArrayList<>(); |
| | | for (int config = 0; config < v.size(); config++) { |
| | | String refery = getRefer(v.get(config).getRefery()); |
| | | for (int i = 0; i < dataList.size(); i++) { |
| | | JSONObject jsonObject1 = JSON.parseObject(dataList.get(i).toString()); |
| | | Object o = jsonObject1.get(refery); |
| | | if (ObjectUtils.isNotEmpty(o)) { |
| | | numberOfDataEntries.addAndGet(1); |
| | | list.add(o); |
| | | } |
| | | } |
| | | } |
| | | // æ¼æ¥æ°éé
ç½® |
| | | List<Object> result = new ArrayList<>(); |
| | | for (int i = 0; i < numberOfDataEntries.get(); i++) { |
| | | String aggregate = ""; |
| | | for (int j = 0; j < v.size(); j++) { |
| | | int index; |
| | | if (j == 0) { |
| | | index = i; |
| | | } else { |
| | | index = numberOfDataEntries.get() + i; |
| | | } |
| | | aggregate += list.get(index).toString() + ","; |
| | | } |
| | | int lastIndex = aggregate.lastIndexOf(","); |
| | | String substring = aggregate.substring(0, lastIndex); |
| | | result.add(substring); |
| | | } |
| | | // è¿è¡å
¬å¼è®¡ç® |
| | | Object resultValue = calculationFormula(result, v.get(0), k, device); |
| | | map.put(k, resultValue); |
| | | }); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * @param data |
| | | * @param dataConfig |
| | | * @return |
| | | */ |
| | | private static Map<String, Object> analysisMdb(String data, Map<String, List<DataConfig>> dataConfig, Device device) { |
| | | JSONObject jsonObject = JSON.parseObject(data); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (jsonObject.isEmpty()) { |
| | | return map; |
| | | } |
| | | JSONArray dataList = JSONArray.parseArray(jsonObject.get("data").toString()); |
| | | dataConfig.forEach((k, v) -> { |
| | | DataConfig configVo = v.get(0); |
| | | AtomicInteger numberOfDataEntries = new AtomicInteger(); |
| | | List<Object> list = new ArrayList<>(); |
| | | for (int config = 0; config < v.size(); config++) { |
| | | String refery = getRefer(v.get(config).getRefery()); |
| | | for (int i = 0; i < dataList.size(); i++) { |
| | | JSONObject jsonObject1 = JSON.parseObject(dataList.get(i).toString()); |
| | | Object o = jsonObject1.get(refery); |
| | | if (ObjectUtils.isNotEmpty(o)) { |
| | | numberOfDataEntries.addAndGet(1); |
| | | list.add(o); |
| | | } |
| | | } |
| | | } |
| | | // æ¼æ¥æ°éé
ç½® |
| | | List<Object> result = new ArrayList<>(); |
| | | for (int i = 0; i < numberOfDataEntries.get(); i++) { |
| | | String aggregate = ""; |
| | | for (int j = 0; j < v.size(); j++) { |
| | | int index; |
| | | if (j == 0) { |
| | | index = i; |
| | | } else { |
| | | index = numberOfDataEntries.get() + i; |
| | | } |
| | | aggregate += list.get(index).toString() + ","; |
| | | } |
| | | int lastIndex = aggregate.lastIndexOf(","); |
| | | String substring = aggregate.substring(0, lastIndex); |
| | | result.add(substring); |
| | | |
| | | } |
| | | // è¿è¡å
¬å¼è®¡ç® |
| | | Object resultValue = calculationFormula(result, v.get(0), k, device); |
| | | map.put(k, resultValue); |
| | | }); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æåæºæ°é |
| | | * |
| | | * @param data |
| | | * @param dataConfig |
| | | * @return |
| | | */ |
| | | private static Map<String, Object> analysisMdbByPull(String data, Map<String, List<DataConfig>> dataConfig, Device device, String cableTag) { |
| | | JSONObject jsonObject = JSON.parseObject(data); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (jsonObject.isEmpty()) { |
| | | return map; |
| | | } |
| | | JSONArray dataList = JSONArray.parseArray(jsonObject.get("data").toString()); |
| | | |
| | | dataConfig.forEach((k, v) -> { |
| | | List<Map<String, String>> resultValue = new ArrayList<>(); |
| | | |
| | | DataConfig configVo = v.get(0); |
| | | for (int i = 0; i < dataList.size(); i++) { |
| | | JSONObject jsonObject1 = JSON.parseObject(dataList.get(i).toString()); |
| | | // è·åæ¶é´ |
| | | String dDate = jsonObject1.getString("dDate"); |
| | | String dTime = jsonObject1.getString("dTime"); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSSSSS"); |
| | | |
| | | // è§£æç¬¬ä¸ä¸ªæ¥ææ¶é´å符串 |
| | | LocalDateTime dateTime1 = LocalDateTime.parse(dDate, formatter); |
| | | // è·åå¹´ææ¥ |
| | | String yearMonthDay = dateTime1.toLocalDate().toString(); |
| | | |
| | | // è§£æç¬¬äºä¸ªæ¥ææ¶é´å符串 |
| | | LocalDateTime dateTime2 = LocalDateTime.parse(dTime, formatter); |
| | | // è·åæ¶å |
| | | String hourMinute = dateTime2.toLocalTime().toString(); |
| | | // æ¼æ¥å¹´ææ¥åæ¶å |
| | | String mergedDateTime = yearMonthDay + " " + hourMinute; |
| | | |
| | | // è·åå度 |
| | | String report = jsonObject1.getString("Report"); |
| | | String thickness = extractValue(report, "å度:\\s*(\\S*?)~"); |
| | | |
| | | // è·åæä¼¸å¼ºåº¦ä¼¸é¿ç |
| | | String result = ""; |
| | | if (StringUtils.isNotBlank(configVo.getMatchingName()) && configVo.getMatchingName().contains("æä¼¸å¼ºåº¦")) { |
| | | result = extractValue(report, "æä¼¸å¼ºåº¦:\\s*(\\S*?)~"); |
| | | |
| | | } |
| | | //夿æ£éªå项æ¯å¦æ¯æä¼¸å¼ºåº¦ |
| | | if (StringUtils.isNotBlank(configVo.getMatchingName()) && configVo.getMatchingName().contains("伸é¿ç")) { |
| | | result = extractValue(report, "伸é¿ç:\\s*(\\S*?)~"); |
| | | } |
| | | Map<String, String> reportMap = new HashMap<>(); |
| | | reportMap.put("mergedDateTime", mergedDateTime); |
| | | reportMap.put("thickness", thickness); |
| | | reportMap.put("result", result); |
| | | resultValue.add(reportMap); |
| | | } |
| | | Map<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("equipName", device.getDeviceName()); |
| | | hashMap.put("equipValue", device.getManagementNumber()); |
| | | hashMap.put("result", resultValue); |
| | | map.put(k, hashMap); |
| | | }); |
| | | return map; |
| | | } |
| | | |
| | | private static String extractValue(String input, String regex) { |
| | | Pattern pattern = Pattern.compile(regex); |
| | | Matcher matcher = pattern.matcher(input); |
| | | return matcher.find() ? matcher.group(1) : null; |
| | | } |
| | | |
| | | private static Pattern SPATTERN = Pattern.compile("([-+])?\\d+(\\.\\d+)?"); |
| | | |
| | | /** |
| | | * åªéXè½´ |
| | | * |
| | | * @param data ééå°çæä»¶å符串 |
| | | * @param dataConfig ç¨æ·é
置好çx,yè½´å®ä½æ°æ®ä¸åç
§ç© |
| | | * @return |
| | | */ |
| | | private static Map<String, Object> readPngString(String data, Map<String, List<DataConfig>> dataConfig, Device device) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | dataConfig.forEach((k, v) -> { |
| | | List<Object> list = new ArrayList<>(); |
| | | for (int config = 0; config < v.size(); config++) { |
| | | String referx = getRefer(v.get(config).getReferx()); |
| | | String result = null; |
| | | // éè¿\nå°å符串åå²ä¸ºè¡ |
| | | String[] aColumnY = data.split("\n"); |
| | | List<String> list1 = new ArrayList<>(); |
| | | // 该循ç¯å¾åºç¨æ·é
ç½®çyè½´ |
| | | for (int i = 0; i < aColumnY.length; i++) { |
| | | String addDataWithSpaces = referx.replaceAll("", " "); |
| | | int x = getXOrY(v.get(config).getX(), k, "X"); |
| | | if (aColumnY[i].contains(addDataWithSpaces)) { |
| | | Matcher matcher = SPATTERN.matcher(aColumnY[i]); |
| | | while (matcher.find()) { |
| | | String group = matcher.group(); |
| | | list1.add(group); |
| | | } |
| | | } |
| | | if (ObjectUtils.isNotEmpty(list1)) { |
| | | result = list1.get(x); |
| | | } |
| | | } |
| | | if (ObjectUtils.isNotEmpty(result)) { |
| | | list.add(result); |
| | | } |
| | | } |
| | | // è¿è¡å
¬å¼è®¡ç® |
| | | Object resultValue = calculationFormula(list, v.get(0), k, device); |
| | | map.put(k, resultValue); |
| | | }); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 仿件䏿ååºæ¥çæåï¼å¦ææå
¬å¼ï¼è¿è¡å
¬å¼è®¡ç®ï¼å¦ååå表第ä¸ä¸ªå¼ |
| | | * |
| | | * @param list æååºçæ°å |
| | | * @param dataConfig åå¨å
¬å¼ç对象 |
| | | * @return |
| | | */ |
| | | private static Object calculationFormula(List<Object> list, DataConfig dataConfig, String insProductItem, Device device) { |
| | | if (list.size() == 0) { |
| | | Map<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("equipName", device.getDeviceName()); |
| | | hashMap.put("equipValue", device.getManagementNumber()); |
| | | hashMap.put("result", null); |
| | | return hashMap; |
| | | } |
| | | ArrayList<Object> listResult = new ArrayList<>(); |
| | | Map<String, Object> hashMap = new HashMap<>(); |
| | | // 妿ä¸ä¸ºç©ºï¼è¿è¡å
¬å¼è®¡ç® |
| | | if (ObjectUtils.isNotEmpty(dataConfig.getFormula())) { |
| | | // å¦åï¼æ²¡æå
¬å¼ä»£è¡¨ä¸éè¦è®¡ç®ï¼ç´æ¥æåListéé¢çæ°æ® |
| | | if (ObjectUtils.isEmpty(device.getEntrustCode()) && ObjectUtils.isEmpty(device.getSampleCode())) { |
| | | String s = calculationFormulaList(list, dataConfig.getFormula()); |
| | | listResult.add(s); |
| | | } else { |
| | | list.forEach(i -> { |
| | | List<Object> strings = Arrays.asList(i.toString().split(",")); |
| | | String s = calculationFormulaList(strings, dataConfig.getFormula()); |
| | | listResult.add(s); |
| | | }); |
| | | } |
| | | } else { |
| | | listResult.addAll(list); |
| | | } |
| | | // 为äºç»åç«¯åæ°æ®åºå |
| | | if (listResult.size() > 1) { |
| | | hashMap.put("result", listResult); |
| | | } else { |
| | | hashMap.put("result", listResult.get(0).toString()); |
| | | } |
| | | hashMap.put("equipName", device.getDeviceName()); |
| | | hashMap.put("equipValue", device.getManagementNumber()); |
| | | return hashMap; |
| | | } |
| | | |
| | | /** |
| | | * è§£æStringæ°æ® |
| | | * |
| | | * @param data ééå°çæä»¶å符串 |
| | | * @param dataConfig ç¨æ·é
置好çx,yè½´å®ä½æ°æ®ä¸åç
§ç© |
| | | * @return |
| | | */ |
| | | private static Map<String, Object> analysisTxt(String data, Map<String, List<DataConfig>> dataConfig, |
| | | Device device, String entrustCode, String sampleCode) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | dataConfig.forEach((k, v) -> { |
| | | List<Object> list = new ArrayList<>(); |
| | | // å§æç¼å·ä¸æ ·åç¼å·ä¸åå¨ï¼å®ï¼1ãYå®èå´ï¼X宿¨ªåæ ï¼2ãåªåå¨Yï¼3ãåªåå¨X |
| | | if (ObjectUtils.isEmpty(device.getEntrustCode()) && ObjectUtils.isEmpty(device.getSampleCode())) { |
| | | // 夿æ¯å¦æ¯çå¯åº¦ |
| | | if (device.getManagementNumber().equals("JCZX-ZB-ZT03002")) { |
| | | // æè¡å岿°æ® |
| | | String[] lines = data.split("\n"); |
| | | |
| | | // æåæåä¸è¡ç第ä¸ä¸ªæ°å |
| | | String lastLine = lines[lines.length - 1]; |
| | | String firstNumber = lastLine.split("\t")[0]; |
| | | list.add(firstNumber); |
| | | } else { |
| | | list = analyzeData(data, v, k, ","); |
| | | } |
| | | // å§æç¼å·ä¸æ ·åç¼å·åå¨ |
| | | } else if (ObjectUtils.isNotEmpty(device.getEntrustCode()) && ObjectUtils.isNotEmpty(device.getSampleCode())) { |
| | | list = analyzeDataEntrustCodAndSampleCode(data, v, k, ",", device, entrustCode, sampleCode); |
| | | } |
| | | // è¿è¡å
¬å¼è®¡ç® |
| | | Object resultValue = calculationFormula(list, v.get(0), k, device); |
| | | map.put(k, resultValue); |
| | | }); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * @param data ééå°çæä»¶å符串 |
| | | * @param dataConfig ç¨æ·é
置好çx,yè½´å®ä½æ°æ®ä¸åç
§ç© |
| | | * @return |
| | | */ |
| | | private static Map<String, Object> analysisString(String data, Map<String, List<DataConfig>> dataConfig, Device device, |
| | | String entrustCode, String sampleCode) { |
| | | String processingDataAfterSpaces = data |
| | | .replaceAll(" +", splitIdentifier) |
| | | .replaceAll("\r", "") |
| | | .replaceAll(" ", ""); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | dataConfig.forEach((k, v) -> { |
| | | List<Object> list = new ArrayList<>(); |
| | | // å§æç¼å·ä¸æ ·åç¼å·ä¸åå¨ï¼å®ï¼1ãYå®èå´ï¼X宿¨ªåæ ï¼2ãåªåå¨Yï¼3ãåªåå¨X |
| | | if (ObjectUtils.isEmpty(device.getEntrustCode()) && ObjectUtils.isEmpty(device.getSampleCode())) { |
| | | list = analyzeData(processingDataAfterSpaces, v, k, splitIdentifier); |
| | | // å§æç¼å·ä¸æ ·åç¼å·åå¨ |
| | | } else if (ObjectUtils.isNotEmpty(device.getEntrustCode()) && ObjectUtils.isNotEmpty(device.getSampleCode())) { |
| | | list = analyzeDataEntrustCodAndSampleCode(processingDataAfterSpaces, v, k, splitIdentifier, device, entrustCode, sampleCode); |
| | | } |
| | | // è¿è¡å
¬å¼è®¡ç® |
| | | Object resultValue = calculationFormula(list, v.get(0), k, device); |
| | | map.put(k, resultValue); |
| | | }); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * åXï¼Y两个å®ä½ |
| | | * |
| | | * @param data ééå°çæä»¶å符串 |
| | | * @param dataConfig ç¨æ·é
置好çx,yè½´å®ä½æ°æ®ä¸åç
§ç© |
| | | * @return |
| | | */ |
| | | public static Map<String, Object> analysisList(String data, Map<String, List<DataConfig>> dataConfig, |
| | | Device device, String entrustCode, String sampleCode) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | dataConfig.forEach((k, v) -> { |
| | | List<Object> list = new ArrayList<>(); |
| | | // å§æç¼å·ä¸æ ·åç¼å·ä¸åå¨ï¼å®ï¼1ãYå®èå´ï¼X宿¨ªåæ ï¼2ãåªåå¨Yï¼3ãåªåå¨X |
| | | if (ObjectUtils.isEmpty(device.getEntrustCode()) && ObjectUtils.isEmpty(device.getSampleCode())) { |
| | | list = analyzeData(data, v, k, splitIdentifier); |
| | | // å§æç¼å·ä¸æ ·åç¼å·åå¨ |
| | | } else if (ObjectUtils.isNotEmpty(device.getEntrustCode()) && ObjectUtils.isNotEmpty(device.getSampleCode())) { |
| | | list = analyzeDataEntrustCodAndSampleCode(data, v, k, splitIdentifier, device, entrustCode, sampleCode); |
| | | } |
| | | // è¿è¡å
¬å¼è®¡ç® |
| | | Object resultValue = calculationFormula(list, v.get(0), k, device); |
| | | map.put(k, resultValue); |
| | | }); |
| | | return map; |
| | | } |
| | | |
| | | private static List<Object> analyzeDataEntrustCodAndSampleCode(String data, List<DataConfig> v, String k, String splitIdentifier, |
| | | Device device, String entrustCodeValue, String sampleCodeValue) { |
| | | entrustCodeValue = entrustCodeValue.replaceAll(" ", ""); |
| | | sampleCodeValue = sampleCodeValue.replaceAll(" ", ""); |
| | | // æç»ç»æ |
| | | List<Object> list = new ArrayList<>(); |
| | | int numberOfDataEntries = 0; |
| | | // åentrustCodeä¸sampleCodeæå¨ä½ |
| | | for (int config = 0; config < v.size(); config++) { |
| | | numberOfDataEntries = 0; |
| | | Integer entrustCodeY = null; |
| | | Integer sampleCodeY = null; |
| | | Integer referYCoordinate = null; |
| | | String refery = getRefer(v.get(config).getRefery()); |
| | | String entrustCode = getRefer(device.getEntrustCode()); // å§æç¼å·å段 |
| | | String sampleCode = getRefer(device.getSampleCode()); // æ ·åç¼å·å段 |
| | | if (ObjectUtils.isEmpty(refery)) { |
| | | continue; |
| | | } |
| | | // å»é¤ææçç©ºæ ¼ï¼éè¿\nå°å符串åå²ä¸ºè¡ |
| | | String[] aColumnY = data.replaceAll(" ", "").split("\n"); |
| | | for (int i = 0; i < aColumnY.length; i++) { |
| | | // 妿éè¿å¤æï¼å®ä½å°Yè½´ |
| | | if (aColumnY[i].contains(entrustCode) && aColumnY[i].contains(sampleCode)) { |
| | | String[] aLine = aColumnY[i].split(splitIdentifier); |
| | | for (int j = 0; j < aLine.length; j++) { |
| | | if (aLine[j].contains(entrustCode)) { |
| | | entrustCodeY = j; |
| | | } |
| | | if (aLine[j].contains(sampleCode) ) { |
| | | sampleCodeY = j; |
| | | } |
| | | if (aLine[j].contains(refery)) { |
| | | referYCoordinate = j; |
| | | } |
| | | } |
| | | } |
| | | if (ObjectUtils.isNotEmpty(entrustCodeY) && ObjectUtils.isNotEmpty(sampleCodeY) && ObjectUtils.isNotEmpty(referYCoordinate)) { |
| | | String[] aLine = aColumnY[i].split(splitIdentifier); |
| | | try { |
| | | if (aLine[entrustCodeY].contains(entrustCodeValue) && aLine[sampleCodeY].contains(sampleCodeValue)) { |
| | | String result = aLine[referYCoordinate]; |
| | | // 鲿¢è®¡ç®å
¬å¼çæ¶ååºç°ï¼[null] è¿ç§æ°æ® |
| | | if (ObjectUtils.isNotEmpty(result)) { |
| | | numberOfDataEntries += 1; |
| | | list.add(result); |
| | | } |
| | | } |
| | | } catch (Exception e) {} |
| | | } |
| | | } |
| | | } |
| | | // æ¼æ¥æ°éé
ç½® |
| | | List<Object> result = new ArrayList<>(); |
| | | for (int i = 0; i < numberOfDataEntries; i++) { |
| | | String aggregate = ""; |
| | | for (int j = 0; j < v.size(); j++) { |
| | | int index; |
| | | if (j == 0) { |
| | | index = i; |
| | | } else { |
| | | index = numberOfDataEntries + i; |
| | | } |
| | | aggregate += list.get(index).toString() + ","; |
| | | } |
| | | int lastIndex = aggregate.lastIndexOf(","); |
| | | String substring = aggregate.substring(0, lastIndex); |
| | | result.add(substring); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | // ç±äºå¨æ¹æ³ä¸ä¼å¤§éçå¤æï¼æä»¥åä¸ä¸ªæ¹æ³ |
| | | private static int getXOrY(String value, String k, String tips) { |
| | | try { |
| | | return Integer.parseInt(value); |
| | | } catch (NumberFormatException e) { |
| | | throw new ErrorException(k + "ï¼æªé
ç½®" + tips + "åæ è½´çå¼ï¼"); |
| | | } |
| | | } |
| | | |
| | | // 鲿¢åç
§ç©ä¸ºç©ºæ¥éï¼è¿è¡å¤æå¦æä¸ºç©ºèµå¼ç©ºå符 |
| | | private static String getRefer(String refer) { |
| | | return ObjectUtils.isNotEmpty(refer) ? refer.replaceAll(" ", "") : ""; |
| | | } |
| | | |
| | | /** |
| | | * å§æç¼å·ä¸æ ·åç¼å·é½ä¸ºç©ºæ§è¡ |
| | | * |
| | | * @param data |
| | | * @param v |
| | | * @param k |
| | | * @param split |
| | | * @return |
| | | */ |
| | | public static List<Object> analyzeData(String data, List<DataConfig> v, String k, String split) { |
| | | List<Object> list = new ArrayList<>(); |
| | | for (int config = 0; config < v.size(); config++) { |
| | | // åä¸¤ä¸ªç¨æ·é
ç½®çåç
§ç© |
| | | String referx = getRefer(v.get(config).getReferx()); |
| | | String refery = getRefer(v.get(config).getRefery()); |
| | | if (ObjectUtils.isEmpty(refery) && ObjectUtils.isEmpty(referx)) { |
| | | continue; |
| | | } |
| | | // æç»ç»æ |
| | | List<Object> result = new ArrayList<>(); |
| | | // éè¿\nå°å符串åå²ä¸ºè¡ |
| | | String[] aColumnY = data.replaceAll(" ", "").split("\n"); |
| | | Integer end = null; |
| | | // ééæ°æ®ï¼Yè½´ |
| | | for (int i = 0; i < aColumnY.length; i++) { |
| | | // 妿Yåç
§ä¸ä¸ºç©ºä¸Xåç
§ä¸ºç©ºåæ§è¡ï¼åæ¶è¯¥è¡å
å«Yåç
§ |
| | | if (ObjectUtils.isNotEmpty(refery) && ObjectUtils.isEmpty(referx) && aColumnY[i].contains(refery)) { |
| | | // åYåæ å¼ |
| | | int y = getXOrY(v.get(config).getY(), k, "Y"); |
| | | String[] aLineX = aColumnY[i].split(split); |
| | | for (int j = 0; j < aLineX.length; j++) { |
| | | if (aLineX[j].contains(refery)) { |
| | | String[] split1 = new String[0]; |
| | | try { |
| | | split1 = aColumnY[i + y].split(split); |
| | | } catch (Exception e) { |
| | | throw new ErrorException(k + "ï¼Yè½´å®ä½è¶
åºï¼"); |
| | | } |
| | | try { |
| | | result.add(split1[j]); |
| | | } catch (Exception e) { |
| | | throw new ErrorException(k + "ï¼Xè½´å®ä½è¶
åºï¼"); |
| | | } |
| | | } |
| | | } |
| | | // 妿Yåç
§ä¸ä¸ºç©ºä¸Xåç
§ä¸ä¸ºç©ºåæ§è¡,æ¤å¤Yå®åºå |
| | | } else if (ObjectUtils.isNotEmpty(refery) && ObjectUtils.isNotEmpty(referx)) { |
| | | // åxçå¼ï¼é²æ¢æ¥é |
| | | int x = getXOrY(v.get(config).getX(), k, "X"); |
| | | // åYåæ å¼ |
| | | int y = getXOrY(v.get(config).getY(), k, "Y"); |
| | | // ç¼åYçç»æå¼ |
| | | if (ObjectUtils.isEmpty(end) && aColumnY[i].contains(refery)) { |
| | | end = i + y; |
| | | } |
| | | // 夿æ¯å¦å¨åç
§ç©ä¸ºèµ·å°ï¼Yåæ å¼ä¸ºæç»èå´ |
| | | if (ObjectUtils.isNotEmpty(end) && i <= end) { |
| | | String[] aLineX = aColumnY[i].split(split); |
| | | for (int j = 0; j < aLineX.length; j++) { |
| | | if (aLineX[j].contains(referx)) { |
| | | try { |
| | | result.add(aLineX[j + x]); |
| | | } catch (Exception e) { |
| | | throw new ErrorException(k + "ï¼Xè½´å®ä½è¶
åºï¼"); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | // 妿Xåç
§ä¸ä¸ºç©ºåæ¶è¯¥è¡å
å«Xåç
§ï¼åæ§è¡ä¸é¢ç代ç |
| | | } else if (aColumnY[i].contains(referx) && ObjectUtils.isEmpty(refery)) { |
| | | String[] aLineX = aColumnY[i].split(split); |
| | | // åxçå¼ï¼é²æ¢æ¥é |
| | | int x = getXOrY(v.get(config).getX(), k, "X"); |
| | | for (int j = 0; j < aLineX.length; j++) { |
| | | if (aLineX[j].contains(referx)) { |
| | | try { |
| | | result.add(aLineX[j + x]); |
| | | } catch (Exception e) { |
| | | throw new ErrorException(k + "ï¼Xè½´å®ä½è¶
åºï¼"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 鲿¢è®¡ç®å
¬å¼çæ¶ååºç°ï¼[null] è¿ç§æ°æ® |
| | | if (ObjectUtils.isNotEmpty(result)) { |
| | | // String formatProcessing = getFormatProcessing(result); |
| | | list.addAll(result); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | public static String getFormatProcessing(String value) { |
| | | value = value.replaceAll("%", ""); |
| | | if (value.contains("=")) { |
| | | String[] split = value.split("="); |
| | | return split[split.length - 1]; |
| | | } else if (value.contains(":")) { |
| | | String[] split = value.split(":"); |
| | | return split[split.length - 1]; |
| | | } else { |
| | | return value; |
| | | } |
| | | } |
| | | |
| | | public static String getIp(HttpServletRequest request) { |
| | | String ipAddress = request.getRemoteAddr(); |
| | | // 鲿¢åç¯å°åå为IPv6 |
| | | return ipAddress.equals("0:0:0:0:0:0:0:1") ? "127.0.0.1" : ipAddress; |
| | | } |
| | | |
| | | public static String calculationFormulaList(List<Object> list, String formula) { |
| | | //é¦å
å°list转æ¢ä¸ºbigdecmic |
| | | List<BigDecimal> bigDecimalList = list.stream() |
| | | .map(obj -> { |
| | | return new BigDecimal((obj).toString()); |
| | | }).collect(Collectors.toList()); |
| | | |
| | | //å°ä¸æç(转æ¢è±æç()) |
| | | formula = formula.replace("ï¼", "(") |
| | | .replace("ï¼", ")") |
| | | .replace("ï¼", ","); |
| | | //ç¶åæåå
¬å¼ |
| | | String strs = formula.substring(0, formula.indexOf("(")); |
| | | String upperStr = strs.toUpperCase(); |
| | | if (upperStr.matches(".*\\d.*")) { |
| | | upperStr = ""; |
| | | } |
| | | //ç¶åè·åæå¤é¢æ¬å·éé¢çå¼,åæ ¹æ®","åå² |
| | | int start = formula.indexOf("("); |
| | | int end = -1; |
| | | int a = 0; |
| | | for (int i = start; i < formula.length(); i++) { |
| | | char c = formula.charAt(i); |
| | | if (c == '(') { |
| | | a++; |
| | | } else if (c == ')') { |
| | | a--; |
| | | if (a == 0) { |
| | | end = i; |
| | | } |
| | | } |
| | | } |
| | | if (start == -1 || end == -1) { |
| | | throw new ErrorException("å
¬å¼æ¬å·ä¸å¹é
: " + formula); |
| | | } |
| | | |
| | | String argumentsStr = formula.substring(start + 1, end); |
| | | List<String> arguments = new ArrayList<>(); |
| | | int bracketCount = 0; |
| | | StringBuilder currentArgument = new StringBuilder(); |
| | | for (char c : argumentsStr.toCharArray()) { |
| | | if (c == ',' && bracketCount == 0) { |
| | | arguments.add(currentArgument.toString()); |
| | | currentArgument.setLength(0); |
| | | } else { |
| | | if (c == '(') bracketCount++; |
| | | if (c == ')') bracketCount--; |
| | | currentArgument.append(c); |
| | | } |
| | | } |
| | | arguments.add(currentArgument.toString()); |
| | | String[] bracketStrs = arguments.toArray(new String[0]); |
| | | List<BigDecimal> results = new ArrayList<>(); |
| | | for (String expr : bracketStrs) { |
| | | Pattern pattern = Pattern.compile("([A-Z])(\\d+)"); |
| | | Matcher matcher = pattern.matcher(expr); |
| | | StringBuffer sb = new StringBuffer(); |
| | | while (matcher.find()) { |
| | | String letter = matcher.group(1); |
| | | int index = Integer.parseInt(matcher.group(2)) - 1; // å°1-based转为0-based |
| | | if (index < bigDecimalList.size()) { |
| | | matcher.appendReplacement(sb, bigDecimalList.get(index).toString()); |
| | | } else { |
| | | throw new RuntimeException("å
¬å¼ä¸ç䏿 " + index + " è¶
åºèå´"); |
| | | } |
| | | } |
| | | matcher.appendTail(sb); |
| | | |
| | | // 计ç®è¡¨è¾¾å¼ |
| | | ScriptEngine engine = new ScriptEngineManager().getEngineByName("JavaScript"); |
| | | try { |
| | | Object result = engine.eval(sb.toString()); |
| | | results.add(new BigDecimal(result.toString())); |
| | | } catch (Exception e) { |
| | | throw new IllegalArgumentException("æ æ³è®¡ç®å
¬å¼: " + sb, e); |
| | | } |
| | | } |
| | | // æ ¹æ®å½æ°åç§°è¿è¡ç¸åºè®¡ç® |
| | | BigDecimal finalResult; |
| | | if (upperStr.equals("") || upperStr == null) { |
| | | finalResult = results.get(0); |
| | | } else { |
| | | switch (upperStr) { |
| | | case "MAX": |
| | | finalResult = results.stream().max(BigDecimal::compareTo) |
| | | .orElseThrow(() -> new IllegalArgumentException("æ æ³è®¡ç®MAXå¼")); |
| | | break; |
| | | case "MIN": |
| | | finalResult = results.stream().min(BigDecimal::compareTo) |
| | | .orElseThrow(() -> new IllegalArgumentException("æ æ³è®¡ç®MINå¼")); |
| | | break; |
| | | case "SUM": |
| | | finalResult = results.stream().reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | break; |
| | | case "ABS": |
| | | finalResult = results.stream().map(BigDecimal::abs).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | break; |
| | | case "AVERAGE": |
| | | finalResult = results.stream().reduce(BigDecimal.ZERO, BigDecimal::divide) |
| | | .divide(BigDecimal.valueOf(results.size()), 2, BigDecimal.ROUND_HALF_UP); |
| | | break; |
| | | case "MEDIAN": |
| | | int size = results.size(); |
| | | if (size % 2 == 1) { |
| | | finalResult = results.get(size / 2); |
| | | } else { |
| | | BigDecimal sum = results.get(size / 2 - 1).add(results.get(size / 2)); |
| | | finalResult = sum.divide(BigDecimal.valueOf(2), 2, BigDecimal.ROUND_HALF_UP); |
| | | } |
| | | break; |
| | | default: |
| | | throw new UnsupportedOperationException("æä¸æ¯æå½æ°: " + upperStr); |
| | | } |
| | | } |
| | | |
| | | return finalResult.toString(); |
| | | // å¦åï¼æ²¡æå
¬å¼ä»£è¡¨ä¸éè¦è®¡ç®ï¼ç´æ¥æåListéé¢çæ°æ® |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DataConfigMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.device.pojo.DataConfig"> |
| | | <id column="id" property="id" /> |
| | | <result column="formula" property="formula" /> |
| | | <result column="referx" property="referx" /> |
| | | <result column="refery" property="refery" /> |
| | | <result column="x" property="x" /> |
| | | <result column="y" property="y" /> |
| | | </resultMap> |
| | | |
| | | <select id="selectDataConfigList" resultType="com.ruoyi.device.dto.DeviceConfigDtoPage"> |
| | | SELECT ddc.*, |
| | | d.device_name, |
| | | sip.sample |
| | | FROM device_data_config ddc |
| | | left join device d on ddc.device_id = d.id |
| | | left join structure_item_parameter sip on sip.id = ddc.structure_item_parameter_id |
| | | where d.id = #{deviceId} |
| | | order by ddc.id desc |
| | | </select> |
| | | |
| | | <select id="deleteDataConfig" resultType="integer"> |
| | | SELECT ddc.id |
| | | FROM device d |
| | | left join structure_item_parameter ip on not FIND_IN_SET(ip.id, d.ins_product_ids) |
| | | inner join device_data_config ddc on ddc.device_id = d.id and ddc.structure_item_parameter_id = ip.id |
| | | </select> |
| | | <select id="getNoConfigProduct" resultType="com.ruoyi.device.pojo.DataConfig"> |
| | | SELECT d.id device_id, |
| | | ip.inspection_item, |
| | | ip.inspection_item_class, |
| | | ip.inspection_item_subclass , |
| | | ip.sample, |
| | | ip.id structureItemParameterId, |
| | | ddc.id |
| | | FROM structure_item_parameter ip |
| | | left join device d on FIND_IN_SET(d.id, ip.device_ids) |
| | | left join device_data_config ddc on ddc.device_id = d.id and ddc.structure_item_parameter_id = ip.id |
| | | where d.id = #{deviceId} |
| | | and ddc.id is null |
| | | order by ip.sample |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceAcceptanceMapper"> |
| | | |
| | | <!-- 设å¤éªæ¶å表 --> |
| | | <select id="pageDeviceAcceptance" resultType="com.ruoyi.device.pojo.DeviceAcceptance"> |
| | | select * from ( |
| | | select * |
| | | from device_acceptance |
| | | 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.ruoyi.device.mapper.DeviceAccidentReportMapper"> |
| | | |
| | | <!-- 设å¤äºæ
æ¥åå表 --> |
| | | <select id="pageDeviceAccidentReport" resultType="com.ruoyi.device.pojo.DeviceAccidentReport"> |
| | | select * from ( |
| | | select * |
| | | from device_accident_report |
| | | order by create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectDeviceAccidentReportById" resultType="com.ruoyi.device.dto.DeviceAccidentReportDto"> |
| | | select |
| | | d.*, |
| | | date_format(d.accident_date,'%Y-%m-%d') accidentDateStr, -- æ¶é´ |
| | | date_format(d.report_date,'%Y-%m-%d') reportDateStr, -- æ¥åäººå¡«åæ¶é´ |
| | | date_format(d.assessor_date,'%Y-%m-%d') assessorDateStr, -- è¯ä¼°äººå¡«åæ¶é´ |
| | | date_format(d.department_head_date,'%Y-%m-%d') departmentHeadDateStr, -- é¨é¨è´è´£äººå¡«åæ¶é´ |
| | | date_format(d.technical_director_date,'%Y-%m-%d') technicalDirectorDateStr, -- ææ¯è´è´£äººå¡«åæ¶é´ |
| | | date_format(d.director_head_date,'%Y-%m-%d') directorHeadDateStr -- ä¸»ä»»å¡«åæ¶é´ |
| | | from device_accident_report d |
| | | where d.accident_report_id = #{accidentReportId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceBorrowMapper"> |
| | | |
| | | <select id="deviceBorrowPage" resultType="com.ruoyi.device.pojo.DeviceBorrow"> |
| | | select * from ( |
| | | select db.*,device_name |
| | | from device_borrow db |
| | | left join device on db.device_id=device.id |
| | | )a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="getDeviceBorrowBydeviceId" resultType="com.ruoyi.device.pojo.DeviceBorrow"> |
| | | select db.*,device_name |
| | | from device_borrow db |
| | | left join device on db.device_id=device.id |
| | | where device_id=#{deviceId} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceBreakdownMaintenanceMapper"> |
| | | |
| | | <!--è®¾å¤æ
éç»´ä¿®å表--> |
| | | <select id="pageDeviceBreakdownMaintenance" resultType="com.ruoyi.device.dto.DeviceBreakdownMaintenance"> |
| | | select * from ( |
| | | select * |
| | | from device_breakdown_maintenance |
| | | 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.ruoyi.device.mapper.DeviceCalibrationPlanDetailMapper"> |
| | | |
| | | <!-- è®¾å¤æ ¡å计å详æ
å表 --> |
| | | <select id="pageDeviceCalibrationPlanDetail" resultType="com.ruoyi.device.pojo.DeviceCalibrationPlanDetail"> |
| | | select * from ( |
| | | select * |
| | | from device_calibration_plan_detail |
| | | order by plan_date asc |
| | | ) 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.ruoyi.device.mapper.DeviceCalibrationPlanMapper"> |
| | | |
| | | <!-- è®¾å¤æ ¡å计åå表 --> |
| | | <select id="pageDeviceCalibrationPlan" resultType="com.ruoyi.device.dto.DeviceCalibrationPlanDto"> |
| | | select * |
| | | from (select cqm.*, |
| | | u1.name write_name, |
| | | u3.name ratify_name |
| | | from device_calibration_plan cqm |
| | | left join user u1 on u1.id = cqm.write_user_id |
| | | left join user u3 on u3.id = cqm.ratify_user_id |
| | | order by cqm.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.ruoyi.device.mapper.DeviceExaminePlanDetailsMapper"> |
| | | |
| | | |
| | | <!--è®¾å¤æ ¸æ¥è®¡å详æ
å表--> |
| | | <select id="pageDeviceExaminePlanDetail" resultType="com.ruoyi.device.dto.DeviceExaminePlanDetailsDto"> |
| | | select * from ( |
| | | select d.*, |
| | | CASE |
| | | WHEN dc.review_status = 0 THEN 3 |
| | | WHEN dc.review_status = 1 THEN 2 |
| | | WHEN dc.record_id IS NOT NULL THEN 1 |
| | | ELSE 0 END record_status, |
| | | CASE |
| | | WHEN dd.review_status = 0 THEN 3 |
| | | WHEN dd.review_status = 1 THEN 2 |
| | | WHEN dd.record_contrast_id IS NOT NULL THEN 1 |
| | | ELSE 0 END record_contrast_status |
| | | from device_examine_plan_details d |
| | | left join device_examine_record dc on d.plan_details_id = dc.plan_details_id |
| | | left join device_examine_record_contrast dd on dd.plan_details_id = dc.plan_details_id |
| | | order by check_time asc |
| | | ) 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.ruoyi.device.mapper.DeviceExaminePlanMapper"> |
| | | |
| | | <!-- è®¾å¤æ ¸æ¥è®¡åå表 --> |
| | | <select id="deviceExaminePlanDetailsMapper" resultType="com.ruoyi.device.dto.DeviceExaminePlanDto"> |
| | | select * |
| | | from (select cqm.*, |
| | | u1.name write_name, |
| | | u3.name ratify_name |
| | | from device_examine_plan cqm |
| | | left join user u1 on u1.id = cqm.write_user_id |
| | | left join user u3 on u3.id = cqm.ratify_user_id |
| | | order by cqm.create_time desc) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectExamineExaminePlanDto" resultType="com.ruoyi.device.dto.DeviceExaminePlanDto"> |
| | | select |
| | | cqm.*, |
| | | date_format(cqm.write_time, '%Y-%m-%d') writeTimeStr, |
| | | date_format(cqm.ratify_time, '%Y-%m-%d') ratifyTimeStr, |
| | | date_format(cqm.create_time, '%Y') year, |
| | | u1.name write_name, |
| | | u3.name ratify_name |
| | | from device_examine_plan cqm |
| | | left join user u1 on u1.id = cqm.write_user_id |
| | | left join user u3 on u3.id = cqm.ratify_user_id |
| | | where cqm.plan_id = #{deviceExaminePlanId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceExamineRecordContrastMapper"> |
| | | |
| | | <!-- æ¥è¯¢æ ¸æ¥å¯¹æ¯è®°å½ --> |
| | | <select id="getExamineRecordContrast" resultType="com.ruoyi.device.dto.DeviceExamineRecordContrastDto"> |
| | | select derc.*, |
| | | d1.device_name aDeviceName, |
| | | d1.management_number aDeviceNumber, |
| | | d2.device_name bDeviceName, |
| | | d2.management_number bDeviceNumber, |
| | | d3.device_name cDeviceName, |
| | | d3.management_number cDeviceNumber |
| | | from device_examine_record_contrast derc |
| | | left join device d1 on d1.id = derc.a_device_id |
| | | left join device d2 on d2.id = derc.a_device_id |
| | | left join device d3 on d3.id = derc.a_device_id |
| | | where derc.plan_details_id = #{planDetailsId} |
| | | </select> |
| | | <select id="selectExamineRecordContrastDto" |
| | | resultType="com.ruoyi.device.dto.DeviceExamineRecordContrastDto"> |
| | | select derc.*, |
| | | d1.device_name aDeviceName, |
| | | d1.management_number aDeviceNumber, |
| | | d2.device_name bDeviceName, |
| | | d2.management_number bDeviceNumber, |
| | | d3.device_name cDeviceName, |
| | | d3.management_number cDeviceNumber, |
| | | DATE_FORMAT(derc.create_time, '%Y-%m-%d') checkerTimeStr, |
| | | DATE_FORMAT(derc.review_time, '%Y-%m-%d') reviewTimeStr, |
| | | d1.storage_point labName |
| | | from device_examine_record_contrast derc |
| | | left join device d1 on d1.id = derc.a_device_id |
| | | left join device d2 on d2.id = derc.a_device_id |
| | | left join device d3 on d3.id = derc.a_device_id |
| | | where derc.plan_details_id = #{planDetailsId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceExamineRecordMapper"> |
| | | |
| | | <select id="getExamineRecord" resultType="com.ruoyi.device.dto.DeviceExamineRecordDto"> |
| | | select der.*, |
| | | d.device_name, |
| | | d.management_number deviceNumber |
| | | from device_examine_record der |
| | | left join device_examine_plan_details depd on depd.plan_details_id = der.plan_details_id |
| | | left join device d on d.id = depd.device_id |
| | | where der.plan_details_id = #{planDetailsId} |
| | | </select> |
| | | <select id="selectReviewExamineRecordDto" resultType="com.ruoyi.device.dto.DeviceExamineRecordDto"> |
| | | select der.*, |
| | | Date_Format(der.update_time, '%Y-%m-%d') updateTimeStr, |
| | | d.device_name, |
| | | d.management_number deviceNumber |
| | | from device_examine_record der |
| | | left join device_examine_plan_details depd on depd.plan_details_id = der.plan_details_id |
| | | left join device d on d.id = depd.device_id |
| | | where der.plan_details_id = #{planDetailsId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceExternalApplyMapper"> |
| | | |
| | | <!--å©ç¨å¤é¨è®¾å¤ç³è¯·å表--> |
| | | <select id="pageDeviceExternalApply" resultType="com.ruoyi.device.pojo.DeviceExternalApply"> |
| | | select * from ( |
| | | select * |
| | | from device_external_apply |
| | | order by create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectDeviceExternalById" resultType="com.ruoyi.device.pojo.DeviceExternalApply"> |
| | | select |
| | | dea.* |
| | | from device_external_apply dea |
| | | where dea.external_apply_id = #{externalApplyId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceImpowerDetailsMapper"> |
| | | |
| | | <!-- æ¥è¯¢è®¾å¤ä½¿ç¨è¯¦æ
--> |
| | | <select id="deviceImpowerDetailsList" resultType="com.ruoyi.device.dto.DeviceImpowerDetailsDto"> |
| | | select |
| | | did.*, |
| | | d.device_name, |
| | | d.specification_model, |
| | | d.management_number |
| | | from device_impower_details did |
| | | left join device d on did.device_id = d.id |
| | | where did.impower_id = #{impowerId} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceImpowerMapper"> |
| | | |
| | | |
| | | <select id="selectDeviceParameterPage" resultType="com.ruoyi.device.pojo.DeviceImpower"> |
| | | select |
| | | * |
| | | from device_impower |
| | | <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.ruoyi.device.mapper.DeviceInspectionRecordMapper"> |
| | | |
| | | |
| | | <select id="selectDeviceParameterPage" resultType="com.ruoyi.device.pojo.DeviceInspectionRecord"> |
| | | select * from ( SELECT * |
| | | from device_inspection_record ) 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.ruoyi.device.mapper.DeviceMaintenanceMapper"> |
| | | |
| | | |
| | | <!-- 设å¤ç»´æ¤å页æ¥è¯¢ --> |
| | | <select id="selectDeviceMaintenancePage" resultType="com.ruoyi.device.dto.DeviceMaintenanceDto"> |
| | | select * from ( |
| | | select db.*, |
| | | d.device_name, |
| | | d.management_number |
| | | from device_maintenance db |
| | | left join device d on db.device_id = d.id)a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | order by maintenance_date desc |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceMaintenancePlanDetailsMapper"> |
| | | |
| | | |
| | | <select id="deviceInspectionRecordDetailsList" |
| | | resultType="com.ruoyi.device.dto.DeviceMaintenancePlanDetailsDto"> |
| | | select |
| | | dmpd.*, |
| | | d.device_name, |
| | | d.management_number device_number, |
| | | d.specification_model, |
| | | d.management_number, |
| | | d.storage_point |
| | | from device_maintenance_plan_details dmpd |
| | | left join device d on dmpd.device_id = d.id |
| | | where dmpd.maintenance_plan_id = #{maintenancePlanId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceMaintenancePlanMapper"> |
| | | |
| | | <!-- æ ¹æ®è®¾å¤idæ¥è¯¢è®¾å¤çä¿å
»è®¡å --> |
| | | <select id="selectDeviceParameterPage" resultType="com.ruoyi.device.pojo.DeviceMaintenancePlan"> |
| | | select |
| | | * |
| | | from device_maintenance_plan |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectMaintenancePlanById" resultType="com.ruoyi.device.dto.DeviceMaintenancePlanDto"> |
| | | select |
| | | dmp.*, |
| | | date_format(dmp.date_preparation, '%Y-%m-%d') as datePreparationStr, |
| | | date_format(dmp.audit_date, '%Y-%m-%d') as auditDateStr |
| | | from device_maintenance_plan dmp |
| | | where dmp.maintenance_plan_id = #{maintenancePlanId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceMapper"> |
| | | <select id="selectDeviceParameter" resultType="com.ruoyi.device.pojo.Device"> |
| | | select * from( |
| | | select id, |
| | | large_category, |
| | | date_production, |
| | | equipment_manager, |
| | | authorized_person, |
| | | device_name, |
| | | internal_code, |
| | | asset_code, |
| | | calibration_date, |
| | | scrap_time, |
| | | acceptance_records, |
| | | subclass, |
| | | factory_no, |
| | | acquisition_date, |
| | | accurate_measurement, |
| | | specification_model, |
| | | device_status, |
| | | storage_point, |
| | | activation_date, |
| | | latest_traceability, |
| | | down_time, |
| | | maintenance_records, |
| | | manufacturer, |
| | | detection_type, |
| | | _costs, |
| | | calibration_certicate, |
| | | create_user, |
| | | create_time, |
| | | update_user, |
| | | update_time, |
| | | status |
| | | from device |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectEquipmentOverview" resultType="com.ruoyi.device.pojo.Device"> |
| | | select * from( |
| | | select id, |
| | | device_name, |
| | | specification_model, |
| | | device_status, |
| | | create_user, |
| | | status, |
| | | update_time |
| | | from device |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="authorizedPerson" resultType="com.ruoyi.device.pojo.Device"> |
| | | select id, |
| | | authorized_person |
| | | from device |
| | | </select> |
| | | <select id="search" resultType="com.ruoyi.device.pojo.Device"> |
| | | select * |
| | | from device |
| | | <where> |
| | | <if test="deviceName!=null and deviceName!=''"> |
| | | and device_name like concat('%',#{deviceName},'%') |
| | | </if> |
| | | <if test="status!=null and status!=''"> |
| | | and device_status = status |
| | | </if> |
| | | <if test="specificationModel!=null and specificationModel!= ''"> |
| | | and specification_model = #{specificationModel} |
| | | </if> |
| | | <if test="largeCategory!=null"> |
| | | and large_category = #{largeCategory} |
| | | </if> |
| | | <if test="largeCategory == 'null'"> |
| | | and (large_category = '' or large_category is null) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectDeviceImage" resultType="com.ruoyi.device.pojo.Device"> |
| | | select (image_upload, create_user, create_time) values (#{image_upload} |
| | | , #{createUser} |
| | | , #{createTime}) |
| | | </select> |
| | | |
| | | <select id="selectDeviceParameterPage" resultType="com.ruoyi.device.dto.DeviceDto"> |
| | | select * from( |
| | | SELECT |
| | | d.*, |
| | | cmr.calibration_date as last_calibration_date_two, |
| | | cmr.next_calibration_date as next_calibration_date_two, |
| | | GROUP_CONCAT(distinct inspection_item SEPARATOR ';') AS insProductItem, |
| | | u.name , |
| | | l.laboratory_name |
| | | FROM |
| | | device d |
| | | LEFT JOIN `user` u ON u.id = d.equipment_manager |
| | | LEFT JOIN laboratory l ON l.id = d.subordinate_departments_id |
| | | LEFT JOIN device_metric_record cmr ON d.id = cmr.device_id |
| | | LEFT JOIN structure_item_parameter sip ON FIND_IN_SET(sip.id, d.ins_product_ids) |
| | | <where> |
| | | <if test="laboratoryNameIsNull != null and laboratoryNameIsNull == true"> |
| | | l.laboratory_name is null |
| | | </if> |
| | | AND cmr.type = 'calibrate' or cmr.type is null or cmr.type = '' |
| | | </where> |
| | | GROUP BY |
| | | d.id, |
| | | u.name, l.laboratory_name |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getInspectionItemSubclass" resultType="map"> |
| | | SELECT ip.inspection_item, |
| | | if(ip.inspection_item_subclass is not null and ip.inspection_item_subclass != '', |
| | | ip.inspection_item_subclass, ip.inspection_item) inspection_item_subclass |
| | | FROM ins_product ip |
| | | where ip.ins_sample_id = #{id} |
| | | </select> |
| | | <resultMap id="treeDeviceDto" type="map"> |
| | | <result property="label" column="laboratory_name"/> |
| | | <result property="value" column="value" /> |
| | | <collection property="children" resultMap="storagePointMap" javaType="List"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="storagePointMap" type="map"> |
| | | <result property="value" column="value"/> |
| | | <result property="label" column="storage_point"/> |
| | | <collection property="children" resultMap="deviceNameMap" javaType="List"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="deviceNameMap" type="map"> |
| | | <result property="value" column="id"/> |
| | | <result property="label" column="device_name"/> |
| | | <result property="activationDate" column="activation_date"/> |
| | | <result property="managementNumber" column="management_number"/> |
| | | </resultMap> |
| | | |
| | | <select id="treeDevice" resultMap="treeDeviceDto"> |
| | | select |
| | | d.id, |
| | | case when l.laboratory_name is null || l.laboratory_name ='' then 'å
¶ä»' else l.laboratory_name end as laboratory_name, |
| | | case when d.storage_point is null || d.storage_point ='' then 'å
¶ä»' else d.storage_point end as storage_point, |
| | | d.device_name, |
| | | d.management_number, |
| | | null as value, |
| | | d.activation_date |
| | | from device d |
| | | LEFT JOIN laboratory l ON l.id = d.subordinate_departments_id |
| | | <where> |
| | | <if test="deviceName!=null and deviceName!=''"> |
| | | and device_name like concat('%',#{deviceName},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectDeviceByCode" resultType="com.ruoyi.device.dto.DeviceDto"> |
| | | SELECT d.*, |
| | | GROUP_CONCAT(DISTINCT inspection_item SEPARATOR ';') AS ins_product_item, |
| | | l.laboratory_name, |
| | | u1.name equipmentManager_name, |
| | | u2.name authorized_person_name |
| | | FROM device d |
| | | LEFT JOIN structure_item_parameter sip ON FIND_IN_SET(sip.id, d.ins_product_ids) |
| | | LEFT JOIN laboratory l ON d.subordinate_departments_id = l.id |
| | | LEFT JOIN user u1 ON u1.id = d.equipment_manager |
| | | LEFT JOIN user u2 ON u2.id = d.authorized_person |
| | | WHERE d.id = #{id} |
| | | |
| | | GROUP BY d.id, |
| | | l.laboratory_name, |
| | | u1.name, |
| | | u2.name |
| | | </select> |
| | | |
| | | <!-- æ¥è¯¢å°è¾¾æ ¡åæææç设å¤-æå5天 --> |
| | | <select id="selectOverdueDevice" resultType="com.ruoyi.device.pojo.Device"> |
| | | SELECT * |
| | | FROM device |
| | | WHERE |
| | | -- çéåº activation_date å¨å½åæ¥æåäºå¤©å
çæ°æ® |
| | | activation_date BETWEEN now() AND now() + INTERVAL 5 DAY |
| | | -- çéåº activation_date å·²ç»è¶
è¿å½åæ¥æçæ°æ® |
| | | OR activation_date < now() |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceScrappedMapper"> |
| | | |
| | | <!-- è®¾å¤æ¥åºç³è¯·å表 --> |
| | | <select id="pageDeviceScrapped" resultType="com.ruoyi.device.pojo.DeviceScrapped"> |
| | | select * from ( |
| | | select * |
| | | from device_scrapped |
| | | order by create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectDeviceScrappedById" resultType="com.ruoyi.device.dto.DeviceScrappedDto"> |
| | | select |
| | | *, |
| | | date_format(applicant_date,'%Yå¹´%mæ%dæ¥') as applicantDateStr, |
| | | date_format(department_head_date,'%Yå¹´%mæ%dæ¥') as departmentHeadDateStr, |
| | | date_format(metering_room_date,'%Yå¹´%mæ%dæ¥') as meteringRoomDateStr, |
| | | date_format(approver_date,'%Yå¹´%mæ%dæ¥') as approverDateStr |
| | | from device_scrapped |
| | | where scrapped_id = #{scrappedId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceStateMapper"> |
| | | |
| | | |
| | | <select id="getDeviceStatePage" resultType="com.ruoyi.device.dto.DeviceStateDto"> |
| | | select ds.*, |
| | | d.device_name, |
| | | d.management_number, |
| | | d.specification_model, |
| | | d.large_category |
| | | from device_state ds |
| | | left join device d on d.id = ds.device_id |
| | | where ds.device_id = #{deviceId} |
| | | <if test="processNumber != '' and processNumber != null"> |
| | | and ds.process_number like concat('%', #{processNumber}, '%') |
| | | </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.ruoyi.device.mapper.DeviceTraceabilityManagementDetailsMapper"> |
| | | |
| | | <select id="deviceTraceabilityManagementDetailsList" |
| | | resultType="com.ruoyi.device.dto.DeviceTraceabilityManagementDetailsDto"> |
| | | select |
| | | dtmd.*, |
| | | d.device_name, |
| | | d.specification_model, |
| | | d.management_number |
| | | from device_traceability_management_details dtmd |
| | | left join device d on dtmd.device_id = d.id |
| | | where dtmd.traceability_management_id = #{traceabilityManagementId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceTraceabilityManagementMapper"> |
| | | |
| | | <select id="selectDeviceParameterPage" resultType="com.ruoyi.device.pojo.DeviceTraceabilityManagement"> |
| | | select |
| | | * |
| | | from device_traceability_management |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectDeviceTraceabilityManagementById" |
| | | resultType="com.ruoyi.device.dto.DeviceTraceabilityManagementDto"> |
| | | select |
| | | dtm.*, |
| | | date_format(dtm.date_preparation, '%Y-%m-%d') as datePreparationStr, |
| | | date_format(dtm.audit_date, '%Y-%m-%d') as auditDateStr |
| | | from device_traceability_management dtm |
| | | where dtm.traceability_management_id = #{traceabilityManagementId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceRecordMapper"> |
| | | |
| | | <select id="deviceRecordPage" resultType="com.ruoyi.device.dto.DeviceRecordDto"> |
| | | select dr.*, |
| | | d.device_name, |
| | | d.management_number |
| | | from device_record dr |
| | | left join device d on d.id = dr.device_id |
| | | where 1=1 |
| | | <if test="deviceId != null"> |
| | | and dr.device_id = #{deviceId} |
| | | </if> |
| | | <if test="sampleCode != '' and sampleCode != null"> |
| | | and dr.sample_code like concat('%', #{sampleCode}, '%') |
| | | </if> |
| | | <if test="managementNumber != '' and managementNumber != null"> |
| | | and d.management_number like concat('%', #{managementNumber}, '%') |
| | | </if> |
| | | <if test="userId != null"> |
| | | and dr.use_person_id = #{userId} |
| | | and dr.use_start_date is null |
| | | </if> |
| | | ORDER BY (dr.use_start_date IS NULL) desc , dr.use_start_date DESC |
| | | </select> |
| | | |
| | | |
| | | <select id="selectNotFilled" resultType="com.ruoyi.device.dto.DeviceRecordDto"> |
| | | select dr.*, |
| | | d.device_name, |
| | | d.management_number |
| | | from device_record dr |
| | | left join device d on d.id = dr.device_id |
| | | where dr.use_start_date is null |
| | | </select> |
| | | |
| | | <!-- æ¥è¯¢å¯¼åºè®¾å¤ä½¿ç¨è®°å½ --> |
| | | <select id="selectExportList" resultType="com.ruoyi.device.dto.DeviceRecordDto"> |
| | | select dr.* |
| | | from device_record dr |
| | | where dr.use_start_date is not null |
| | | <if test="deviceId != null"> |
| | | and dr.device_id = #{deviceId} |
| | | </if> |
| | | <if test="exportDate != '' and exportDate != null"> |
| | | and DATE_FORMAT(dr.use_start_date, '%Y-%m') = #{exportDate} |
| | | </if> |
| | | ORDER BY dr.use_start_date asc |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.mapper.InstructionMapper"> |
| | | <select id="pageByPageQueryOfHomeworkInstructions" resultType="com.ruoyi.device.dto.DeviceOperationInstructionDto"> |
| | | SELECT |
| | | doi.*,di.*, |
| | | d.device_name deviceName, |
| | | d.management_number deviceNumber, |
| | | d.specification_model deviceModel, |
| | | u.name uploaderName, |
| | | u1.name approverName |
| | | FROM |
| | | device_operation_instruction doi |
| | | LEFT JOIN device_instruction di ON di.id = doi.instruction_id |
| | | left join device d on d.id = doi.device_id |
| | | left join user u on u.id = doi.uploader |
| | | left join user u1 on u1.id = doi.approver_id |
| | | <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.ruoyi.device.mapper.OperationInstructionMapper"> |
| | | |
| | | <select id="homeworkGuidebookEditor" resultType="com.ruoyi.device.dto.DeviceOperationInstructionDto"> |
| | | SELECT |
| | | doi.*,d.device_name, d.management_number device_number, d.specification_model device_model |
| | | FROM |
| | | device_operation_instruction doi |
| | | left join device d on d.id = doi.device_id |
| | | where doi.instruction_id = #{instructionId} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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>ruoyi</artifactId> |
| | | <groupId>com.ruoyi</groupId> |
| | | <version>3.8.9</version> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>cnas-manage</artifactId> |
| | | |
| | | <dependencies> |
| | | |
| | | <!--ä¸å¡æ¨¡å--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>inspect-server</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | | </properties> |
| | | |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.mapper.ClientSatisfactionAnalyseFileMapper; |
| | | import com.ruoyi.manage.pojo.ClientSatisfaction; |
| | | import com.ruoyi.manage.pojo.ClientSatisfactionAnalyseFile; |
| | | import com.ruoyi.manage.service.ClientSatisfactionService; |
| | | 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 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®¢æ·æ»¡æåº¦è°æ¥å表") |
| | | @GetMapping("/pageClientSatisfaction") |
| | | public Result<IPage<ClientSatisfaction>> pageClientSatisfaction(Page page,ClientSatisfaction clientSatisfaction) throws Exception { |
| | | return Result.success(clientSatisfactionService.pageClientSatisfaction(page, clientSatisfaction)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥æ°å¢ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®¢æ·æ»¡æåº¦è°æ¥æ°å¢") |
| | | @PostMapping("/addClientSatisfaction") |
| | | public Result addClientSatisfaction(@RequestBody ClientSatisfaction clientSatisfaction){ |
| | | return Result.success(clientSatisfactionService.save(clientSatisfaction)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥ä¿®æ¹ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®¢æ·æ»¡æåº¦è°æ¥æ°å¢") |
| | | @PostMapping("/updateClientSatisfaction") |
| | | public Result updateClientSatisfaction(@RequestBody ClientSatisfaction clientSatisfaction){ |
| | | return Result.success(clientSatisfactionService.updateById(clientSatisfaction)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦è°æ¥ä¿®æ¹ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å®¢æ·æ»¡æåº¦è°æ¥æ°å¢") |
| | | @DeleteMapping("/delClientSatisfaction") |
| | | public Result updateClientSatisfaction(Integer clientSatisfactionId){ |
| | | return Result.success(clientSatisfactionService.removeById(clientSatisfactionId)); |
| | | } |
| | | |
| | | /** |
| | | * å®¢æ·æ»¡æåº¦å¯¼åº |
| | | * @param clientSatisfactionId |
| | | * @param response |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å®¢æ·æ»¡æå¯¼åº") |
| | | @GetMapping("/exportWordClientSatisfaction") |
| | | public Result exportWordClientSatisfaction(Integer clientSatisfactionId, HttpServletResponse response){ |
| | | clientSatisfactionService.exportWordClientSatisfaction(clientSatisfactionId, response); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * ç¡®è®¤å®¢æ·æ»¡æåº¦ |
| | | * @param clientSatisfaction è¦ä¿®æ¹å®¢æ·æ»¡æåº¦çç¶æå¯¹è±¡ |
| | | * @param userId ä¿®æ¹äººid |
| | | */ |
| | | |
| | | @ApiOperation(value = "ç¡®è®¤å®¢æ·æ»¡æåº¦") |
| | | @PostMapping("/confirmClientSatisfaction") |
| | | public void confirmClientSatisfaction(@RequestBody ClientSatisfaction clientSatisfaction, Integer userId){ |
| | | clientSatisfactionService.confirmClientSatisfaction(clientSatisfaction, userId); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å®¢æ·åæéä»¶ |
| | | * @param file |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "æ°å¢æ·åæéä»¶") |
| | | @PostMapping("/uploadAnalyseFile") |
| | | public Result<?> uploadAnalyseFile(MultipartFile file) { |
| | | return Result.success(clientSatisfactionService.uploadAnalyseFile(file)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ·åæéä»¶ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢æ·åæéä»¶") |
| | | @GetMapping("/pageAnalyseFile") |
| | | public Result<IPage<ClientSatisfactionAnalyseFile>> pageAnalyseFile(Page page, ClientSatisfactionAnalyseFile analyseFile) { |
| | | return Result.success(clientSatisfactionService.pageAnalyseFile(page, analyseFile)); |
| | | } |
| | | |
| | | /** |
| | | * å 餿·åæéä»¶ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å 餿·åæéä»¶") |
| | | @DeleteMapping("/delAnalyseFile") |
| | | public Result delAnalyseFile(Integer analyseFileId){ |
| | | return Result.success(clientSatisfactionAnalyseFileMapper.deleteById(analyseFileId)); |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.dto.InternalCheckDto; |
| | | import com.ruoyi.manage.pojo.InternalCheck; |
| | | import com.ruoyi.manage.service.InternalCheckService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | 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 |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
å®¡æ£æ¥å页æ¥è¯¢") |
| | | @GetMapping("/pageInternalCheck") |
| | | public Result<IPage<InternalCheckDto>> pageInternalCheck(Page page,InternalCheck internalCheck) throws Exception { |
| | | return Result.success(internalCheckService.pageInternalCheck(page, internalCheck)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥æ°å¢ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
å®¡æ£æ¥æ°å¢") |
| | | @PostMapping("/addInternalCheck") |
| | | public Result addInternalCheck(@RequestBody InternalCheckDto internalCheck){ |
| | | return Result.success(internalCheckService.addInternalCheck(internalCheck)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥ä¿®æ¹ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
å®¡æ£æ¥ä¿®æ¹") |
| | | @PostMapping("/updateInternalCheck") |
| | | public Result updateInternalCheck(@RequestBody InternalCheckDto internalCheck){ |
| | | return Result.success(internalCheckService.updateInternalCheck(internalCheck)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥å é¤ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
å®¡æ£æ¥å é¤") |
| | | @DeleteMapping("/delInternalCheck") |
| | | public Result delInternalCheck(Integer checkId){ |
| | | return Result.success(internalCheckService.delInternalCheck(checkId)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥æ¥ç详æ
|
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
å®¡æ£æ¥æ¥ç详æ
") |
| | | @GetMapping("/getInternalCheckOne") |
| | | public Result<InternalCheckDto> getInternalCheckOne(Integer checkId){ |
| | | return Result.success(internalCheckService.getInternalCheckOne(checkId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥æ¹å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å
å®¡æ£æ¥æ¹å") |
| | | @PostMapping("/ratifyInternalCheck") |
| | | public Result ratifyInternalCheck(@RequestBody InternalCheckDto internalCheck){ |
| | | return Result.success(internalCheckService.ratifyInternalCheck(internalCheck)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
å®¡æ£æ¥ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "导åºå
å®¡æ£æ¥") |
| | | @GetMapping("/exportInternalCheck") |
| | | public void exportInternalCheck(Integer checkId, HttpServletResponse response){ |
| | | internalCheckService.exportInternalCheck(checkId, response); |
| | | } |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.mapper.InternalCorrectFileMapper; |
| | | import com.ruoyi.manage.pojo.InternalCorrect; |
| | | import com.ruoyi.manage.pojo.InternalCorrectFile; |
| | | import com.ruoyi.manage.service.InternalCorrectService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | 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 |
| | | */ |
| | | |
| | | @ApiOperation(value = "æ°å¢å
审管ççº æ£å¤ç") |
| | | @PostMapping("/addInternalCorrect") |
| | | public Result addInternalCorrect(@RequestBody InternalCorrect internalCorrect){ |
| | | return Result.success(internalCorrectService.addInternalCorrect(internalCorrect)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å
审管ççº æ£å¤ç |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢å
审管ççº æ£å¤ç") |
| | | @GetMapping("/getInternalCorrect") |
| | | public Result<InternalCorrect> getInternalCorrect(Integer correctId){ |
| | | return Result.success(internalCorrectService.getInternalCorrect(correctId)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å
审管ççº æ£æªæ½å表 |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢å
审管ççº æ£æªæ½å表") |
| | | @GetMapping("/pageInternalCorrect") |
| | | public Result<IPage<InternalCorrect>> pageInternalCorrect(Page page, InternalCorrect detailsCorrect) { |
| | | return Result.success(internalCorrectService.pageInternalCorrect(page, detailsCorrect)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å
审管ççº æ£æªæ½éä»¶ |
| | | * @param correctId |
| | | * @param file |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "æ°å¢å
审管ççº æ£æªæ½éä»¶") |
| | | @PostMapping("/uploadInternalCorrectFile") |
| | | public Result<?> uploadInternalCorrectFile(Integer correctId, MultipartFile file) { |
| | | return Result.success(internalCorrectService.uploadInternalCorrectFile(correctId, file)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢å
审管ççº æ£æªæ½éä»¶ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢å
审管ççº æ£æªæ½éä»¶") |
| | | @GetMapping("/getInternalCorrectFileList") |
| | | public Result<List<InternalCorrectFile>> getInternalCorrectFileList(Integer correctId){ |
| | | return Result.success(internalCorrectService.getInternalCorrectFileList(correctId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å
审管ççº æ£æªæ½éä»¶ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å é¤å
审管ççº æ£æªæ½éä»¶") |
| | | @DeleteMapping("/delInternalCorrectFile") |
| | | public Result delInternalCorrectFile(Integer correctFileId){ |
| | | return Result.success(internalCorrectFileMapper.deleteById(correctFileId)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºçº æ£æªæ½ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "导åºçº æ£æªæ½") |
| | | @GetMapping("/exportInternalCorrect") |
| | | public void exportInternalCorrect(Integer correctId, HttpServletResponse response){ |
| | | internalCorrectService.exportInternalCorrect(correctId, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | |
| | | import com.ruoyi.manage.dto.InternalImplementDto; |
| | | import com.ruoyi.manage.pojo.InternalImplement; |
| | | import com.ruoyi.manage.service.InternalImplementService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | 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("/internalImplement") |
| | | public class InternalImplementController { |
| | | |
| | | private InternalImplementService internalImplementService; |
| | | |
| | | /** |
| | | * å
审宿½è®¡åå页æ¥è¯¢ |
| | | * @param |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审宿½è®¡åå页æ¥è¯¢") |
| | | @GetMapping("/pageInternalImplement") |
| | | public Result<IPage<InternalImplementDto>> pageInternalImplement(Page page,InternalImplement internalImplement) throws Exception { |
| | | return Result.success(internalImplementService.pageInternalImplement(page, internalImplement)); |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åæ°å¢ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审宿½è®¡åæ°å¢") |
| | | @PostMapping("/addInternalImplement") |
| | | public Result addInternalImplement(@RequestBody InternalImplementDto internalImplement){ |
| | | return Result.success(internalImplementService.addInternalImplement(internalImplement)); |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åä¿®æ¹ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审宿½è®¡åä¿®æ¹") |
| | | @PostMapping("/updateInternalImplement") |
| | | public Result updateInternalImplement(@RequestBody InternalImplementDto internalImplement){ |
| | | return Result.success(internalImplementService.updateInternalImplement(internalImplement)); |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åå é¤ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审宿½è®¡åå é¤") |
| | | @DeleteMapping("/delInternalImplement") |
| | | public Result delInternalImplement(Integer implementId){ |
| | | return Result.success(internalImplementService.delInternalImplement(implementId)); |
| | | } |
| | | |
| | | /** |
| | | * å
审宿½è®¡åæ¥ç详æ
|
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审宿½è®¡åæ¥ç详æ
") |
| | | @GetMapping("/getInternalImplementOne") |
| | | public Result<InternalImplementDto> getInternalImplementOne(Integer implementId){ |
| | | return Result.success(internalImplementService.getInternalImplementOne(implementId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å
审宿½è®¡åæ¹å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å
审宿½è®¡åæ¹å") |
| | | @PostMapping("/ratifyInternalImplement") |
| | | public Result ratifyInternalImplement(@RequestBody InternalImplementDto internalImplement){ |
| | | return Result.success(internalImplementService.ratifyInternalImplement(internalImplement)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
审宿½è®¡å |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "导åºå
审宿½è®¡å") |
| | | @GetMapping("/exportInternalImplement") |
| | | public void exportInternalImplement(Integer implementId, HttpServletResponse response){ |
| | | internalImplementService.exportInternalImplement(implementId, response); |
| | | } |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.dto.InternalMeetingDto; |
| | | import com.ruoyi.manage.pojo.InternalMeeting; |
| | | import com.ruoyi.manage.service.InternalMeetingService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | 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 |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审ä¼è®®å页æ¥è¯¢") |
| | | @GetMapping("/pageInternalMeeting") |
| | | public Result<IPage<InternalMeetingDto>> pageInternalMeeting(Page page,InternalMeeting internalMeeting) throws Exception { |
| | | return Result.success(internalMeetingService.pageInternalMeeting(page, internalMeeting)); |
| | | } |
| | | |
| | | /** |
| | | * å
审ä¼è®®æ°å¢ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审ä¼è®®æ°å¢") |
| | | @PostMapping("/addInternalMeeting") |
| | | public Result addInternalMeeting(@RequestBody InternalMeetingDto internalMeeting){ |
| | | return Result.success(internalMeetingService.addInternalMeeting(internalMeeting)); |
| | | } |
| | | |
| | | /** |
| | | * å
审ä¼è®®ä¿®æ¹ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审ä¼è®®ä¿®æ¹") |
| | | @PostMapping("/updateInternalMeeting") |
| | | public Result updateInternalMeeting(@RequestBody InternalMeetingDto internalMeeting){ |
| | | return Result.success(internalMeetingService.updateInternalMeeting(internalMeeting)); |
| | | } |
| | | |
| | | /** |
| | | * å
审ä¼è®®å é¤ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审ä¼è®®å é¤") |
| | | @DeleteMapping("/delInternalMeeting") |
| | | public Result delInternalMeeting(Integer meetingId){ |
| | | return Result.success(internalMeetingService.delInternalMeeting(meetingId)); |
| | | } |
| | | |
| | | /** |
| | | * å
审ä¼è®®æ¥ç详æ
|
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审ä¼è®®æ¥ç详æ
") |
| | | @GetMapping("/getInternalMeetingOne") |
| | | public Result<InternalMeetingDto> getInternalMeetingOne(Integer meetingId){ |
| | | return Result.success(internalMeetingService.getInternalMeetingOne(meetingId)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
审ä¼è®® |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "导åºå
审ä¼è®®") |
| | | @GetMapping("/exportInternalMeeting") |
| | | public void exportInternalMeeting(Integer meetingId, HttpServletResponse response){ |
| | | internalMeetingService.exportInternalMeeting(meetingId, response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.deepoove.poi.data.style.*; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.dto.InternalPlanDto; |
| | | import com.ruoyi.manage.pojo.InternalPlan; |
| | | import com.ruoyi.manage.service.InternalPlanService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | 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 |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审年度计åå页æ¥è¯¢") |
| | | @GetMapping("/pageInternalPlan") |
| | | public Result<IPage<InternalPlanDto>> pageInternalPlan(Page page,InternalPlan internalPlan) throws Exception { |
| | | return Result.success(internalPlanService.pageInternalPlan(page, internalPlan)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡å¹´åº¦è®¡åæ°å¢ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
å®¡å¹´åº¦è®¡åæ°å¢") |
| | | @PostMapping("/addInternalPlan") |
| | | public Result addInternalPlan(@RequestBody InternalPlanDto internalPlan){ |
| | | return Result.success(internalPlanService.addInternalPlan(internalPlan)); |
| | | } |
| | | |
| | | /** |
| | | * å
审年度计åä¿®æ¹ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审年度计åä¿®æ¹") |
| | | @PostMapping("/updateInternalPlan") |
| | | public Result updateInternalPlan(@RequestBody InternalPlanDto internalPlan){ |
| | | return Result.success(internalPlanService.updateInternalPlan(internalPlan)); |
| | | } |
| | | |
| | | /** |
| | | * å
审年度计åå é¤ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审年度计åå é¤") |
| | | @DeleteMapping("/delInternalPlan") |
| | | public Result delInternalPlan(Integer planId){ |
| | | return Result.success(internalPlanService.delInternalPlan(planId)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡å¹´åº¦è®¡åæ¥ç详æ
|
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
å®¡å¹´åº¦è®¡åæ¥ç详æ
") |
| | | @GetMapping("/getInternalPlanOne") |
| | | public Result<InternalPlanDto> getInternalPlanOne(Integer planId){ |
| | | return Result.success(internalPlanService.getInternalPlanOne(planId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å
审年度计åå®¡æ ¸ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å
审年度计åå®¡æ ¸") |
| | | @PostMapping("/examineInternalPlan") |
| | | public Result examineInternalPlan(@RequestBody InternalPlanDto internalPlanDto){ |
| | | return Result.success(internalPlanService.examineInternalPlan(internalPlanDto)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡å¹´åº¦è®¡åæ¹å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å
审宿½è®¡åæ¹å") |
| | | @PostMapping("/ratifyInternalPlan") |
| | | public Result ratifyInternalPlan(@RequestBody InternalPlanDto internalPlanDto){ |
| | | return Result.success(internalPlanService.ratifyInternalPlan(internalPlanDto)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
审年度计å |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "导åºå
审年度计å") |
| | | @GetMapping("/exportInternalPlan") |
| | | public void exportInternalPlan(Integer planId, HttpServletResponse response){ |
| | | internalPlanService.exportInternalImplement(planId, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.deepoove.poi.data.style.*; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.pojo.InternalReport; |
| | | import com.ruoyi.manage.service.InternalReportService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | 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 |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审æ¥åå页æ¥è¯¢") |
| | | @GetMapping("/pageInternalReport") |
| | | public Result<IPage<InternalReport>> pageInternalReport(Page page,InternalReport internalReport) throws Exception { |
| | | return Result.success(internalReportService.pageInternalReport(page, internalReport)); |
| | | } |
| | | |
| | | /** |
| | | * å
审æ¥åæ°å¢ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审æ¥åæ°å¢") |
| | | @PostMapping("/addInternalReport") |
| | | public Result addInternalReport(@RequestBody InternalReport internalReport){ |
| | | return Result.success(internalReportService.save(internalReport)); |
| | | } |
| | | |
| | | /** |
| | | * å
审æ¥åä¿®æ¹ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审æ¥åä¿®æ¹") |
| | | @PostMapping("/updateInternalReport") |
| | | public Result updateInternalReport(@RequestBody InternalReport internalReport){ |
| | | return Result.success(internalReportService.updateById(internalReport)); |
| | | } |
| | | |
| | | /** |
| | | * å
审æ¥åå é¤ |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审æ¥åå é¤") |
| | | @DeleteMapping("/delInternalReport") |
| | | public Result delInternalReport(Integer reportId){ |
| | | return Result.success(internalReportService.removeById(reportId)); |
| | | } |
| | | |
| | | /** |
| | | * å
审æ¥åæ¥ç详æ
|
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "å
审æ¥åæ¥ç详æ
") |
| | | @GetMapping("/getInternalReportOne") |
| | | public Result<InternalReport> getInternalReportOne(Integer reportId){ |
| | | return Result.success(internalReportService.getById(reportId)); |
| | | } |
| | | |
| | | /** |
| | | * å
å®¡æ£æ¥å®¡æ ¸ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å
å®¡æ£æ¥å®¡æ ¸") |
| | | @PostMapping("/examineInternalReport") |
| | | public Result examineInternalReport(@RequestBody InternalReport internalReport){ |
| | | return Result.success(internalReportService.ratifyInternalCheck(internalReport)); |
| | | } |
| | | |
| | | /** |
| | | * å
审æ¥åè´¨éè´è´£äººå¡«å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å
审æ¥åè´¨éè´è´£äººå¡«å") |
| | | @PostMapping("/qualityInternalReport") |
| | | public Result qualityInternalReport(@RequestBody InternalReport internalReport){ |
| | | return Result.success(internalReportService.qualityInternalReport(internalReport)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå
审æ¥å |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "导åºå
审æ¥å") |
| | | @GetMapping("/exportInternalReport") |
| | | public void exportInternalReport(Integer reportId, HttpServletResponse response){ |
| | | internalReportService.exportInternalReport(reportId, response); |
| | | } |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.alibaba.excel.read.listener.PageReadListener; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.manage.pojo.ManageControlPlanList; |
| | | import com.ruoyi.manage.service.ManageControlPlanListService; |
| | | import com.ruoyi.manage.vo.ManageControlPlanListVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | 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; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-11-15 02:58:30 |
| | | */ |
| | | @Api(tags = "é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å") |
| | | @RestController |
| | | @RequestMapping("/manageControlPlanList") |
| | | public class ManageControlPlanListController { |
| | | |
| | | |
| | | @Resource |
| | | private ManageControlPlanListService manageControlPlanListService; |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "å页æ¥è¯¢") |
| | | @GetMapping("/getPageList") |
| | | public Result<IPage<ManageControlPlanListVo>> getPageList(Page page) { |
| | | return Result.success(manageControlPlanListService.getPageList(page)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹å") |
| | | @PostMapping("/approvalOfControlPlanChecklist") |
| | | public Result<?> approvalOfControlPlanChecklist(@RequestBody Map<String, Integer> param){ |
| | | Integer approve = param.get("approve"); |
| | | Integer status= param.get("status"); |
| | | manageControlPlanListService.update(Wrappers.<ManageControlPlanList>lambdaUpdate() |
| | | .set(ManageControlPlanList::getApprove, approve) |
| | | .set(ManageControlPlanList::getApproveStatus, status) |
| | | .set(ManageControlPlanList::getApproveDate, LocalDateTime.now())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "审æ¹") |
| | | @PostMapping("/riskAnalysisApprovalOfControlPlanChecklist") |
| | | public Result<?> riskAnalysisApprovalOfControlPlanChecklist(@RequestBody Map<String, Integer> param){ |
| | | Integer approval = param.get("approval"); |
| | | Integer status= param.get("status"); |
| | | manageControlPlanListService.update(Wrappers.<ManageControlPlanList>lambdaUpdate() |
| | | .set(ManageControlPlanList::getApproval, approval) |
| | | .set(ManageControlPlanList::getApprovalStatus, status) |
| | | .set(ManageControlPlanList::getApprovalDate, LocalDateTime.now())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @PostMapping("/importControlPlanList") |
| | | public void importControlPlanList(MultipartFile file) throws IOException { |
| | | boolean excelFile = isExcelFile(file); |
| | | if (!excelFile) { |
| | | throw new ErrorException("请导å
¥excelæä»¶ï¼"); |
| | | } |
| | | EasyExcel.read(file.getInputStream(), ManageControlPlanList.class, new PageReadListener<ManageControlPlanList>(dataList -> { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | dataList.forEach(i -> { |
| | | i.setEditor(userId); |
| | | i.setEditorDate(LocalDateTime.now()); |
| | | i.setApproveStatus(0); |
| | | i.setApprovalStatus(0); |
| | | }); |
| | | manageControlPlanListService.saveOrUpdateBatch(dataList); |
| | | })).sheet().doRead(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢") |
| | | @PostMapping("/analysisOfMajorRiskFactorsAdded") |
| | | public void analysisOfMajorRiskFactorsAdded(@RequestBody ManageControlPlanList manageControlPlanList) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | manageControlPlanList.setEditor(userId); |
| | | manageControlPlanList.setEditorDate(LocalDateTime.now()); |
| | | manageControlPlanListService.saveOrUpdate(manageControlPlanList); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤") |
| | | @DeleteMapping("/deleteSignificantRiskFactorAnalysis") |
| | | public void deleteSignificantRiskFactorAnalysis(Integer id) { |
| | | manageControlPlanListService.removeById(id); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @return |
| | | */ |
| | | |
| | | @ApiOperation(value = "é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å") |
| | | @GetMapping("/exportSignificantRiskFactors") |
| | | public void exportSignificantRiskFactors(HttpServletResponse response){ |
| | | manageControlPlanListService.exportPersonTraining(response); |
| | | } |
| | | |
| | | 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"); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | |
| | | import com.deepoove.poi.data.style.*; |
| | | |
| | | import com.ruoyi.manage.pojo.ManageDocumentAlter; |
| | | import com.ruoyi.manage.service.ManageDocumentAlterService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ´ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-11-11 11:04:01 |
| | | */ |
| | | @Api(tags = "管çä½ç³»æä»¶çæ§å¶") |
| | | @RestController |
| | | @RequestMapping("/manageDocumentAlter") |
| | | public class ManageDocumentAlterController { |
| | | |
| | | @Resource |
| | | private ManageDocumentAlterService manageDocumentAlterService; |
| | | |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶åæ´") |
| | | @GetMapping("/pageManageDocumentAlter") |
| | | public Result pageManageDocumentAlter(Page page,ManageDocumentAlter manageDocumentAlter) throws Exception { |
| | | return Result.success(manageDocumentAlterService.pageManageDocumentAlter(page, manageDocumentAlter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿件忴") |
| | | @DeleteMapping("/delManageDocumentAlter") |
| | | public Result delManageDocumentAlter(Integer id){ |
| | | return Result.success(manageDocumentAlterService.delManageDocumentAlter(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥çæä»¶åæ´") |
| | | @GetMapping("/getManageDocumentAlter") |
| | | public Result getManageDocumentAlter(Integer id){ |
| | | return Result.success(manageDocumentAlterService.getManageDocumentAlter(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æä»¶åæ´") |
| | | @PostMapping("/addManageDocumentAlter") |
| | | public Result addManageDocumentAlter(ManageDocumentAlter manageDocumentAlter){ |
| | | return Result.success(manageDocumentAlterService.addManageDocumentAlter(manageDocumentAlter)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "ç¼è¾æä»¶åæ´") |
| | | @PostMapping("/doManageDocumentAlter") |
| | | public Result doManageDocumentAlter(ManageDocumentAlter manageDocumentAlter){ |
| | | return Result.success(manageDocumentAlterService.doManageDocumentAlter(manageDocumentAlter)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "å®¡æ ¸æä»¶åæ´") |
| | | @PostMapping("/checkManageDocumentAlter") |
| | | public Result checkManageDocumentAlter(ManageDocumentAlter manageDocumentAlter){ |
| | | return Result.success(manageDocumentAlterService.checkManageDocumentAlter(manageDocumentAlter)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "å®¡æ ¸æ¥çéä»¶") |
| | | @GetMapping("/checkManageDocumentAlterPdf") |
| | | public void checkManageDocumentAlterPdf(Long id, HttpServletResponse response)throws Exception { |
| | | manageDocumentAlterService.checkManageDocumentAlterPdf(id,response); |
| | | } |
| | | |
| | | @ApiOperation(value = "å¯¼åºæä»¶åæ´") |
| | | @GetMapping("/exportManageDocumentAlter") |
| | | public void exportManageDocumentAlter(ManageDocumentAlter manageDocumentAlter,HttpServletResponse response) throws Exception { |
| | | manageDocumentAlterService.exportManageDocumentAlter(manageDocumentAlter,response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | import com.deepoove.poi.data.style.*; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.pojo.ManageDocumentCancel; |
| | | import com.ruoyi.manage.service.ManageDocumentCancelService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | 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.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶ä½åº å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-11-09 02:37:35 |
| | | */ |
| | | @Api(tags = "管çä½ç³»æä»¶çæ§å¶") |
| | | @RestController |
| | | @RequestMapping("/manageDocumentCancel") |
| | | public class ManageDocumentCancelController { |
| | | |
| | | @Resource |
| | | private ManageDocumentCancelService manageDocumentCancelService; |
| | | |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶ä½åº") |
| | | @GetMapping("/pageManageDocumentCancel") |
| | | public Result pageManageDocumentCancel(Page page,ManageDocumentCancel manageDocumentCancel) throws Exception { |
| | | return Result.success(manageDocumentCancelService.pageManageDocumentCancel(page, manageDocumentCancel)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æä»¶ä½åº") |
| | | @PostMapping("/addManageDocumentCancel") |
| | | public Result addManageDocumentCancel(@RequestBody ManageDocumentCancel manageDocumentCancel) { |
| | | return Result.success(manageDocumentCancelService.addManageDocumentCancel(manageDocumentCancel)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "å®¡æ ¸æä»¶ä½åº") |
| | | @PostMapping("/checkManageDocumentCancel") |
| | | public Result checkManageDocumentCancel(@RequestBody Map<String, Object> param) { |
| | | Integer id = (Integer) param.get("id"); |
| | | String state = (String) param.get("state"); |
| | | return Result.success(manageDocumentCancelService.checkManageDocumentCancel(id, state)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿件ä½åº") |
| | | @DeleteMapping("/delManageDocumentCancel") |
| | | public Result delManageDocumentCancel(Integer id) { |
| | | return Result.success(manageDocumentCancelService.delManageDocumentCancel(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥çæä»¶ä½åº") |
| | | @GetMapping("/getManageDocumentCancel") |
| | | public Result getManageDocumentCancel(Integer id) { |
| | | return Result.success(manageDocumentCancelService.getManageDocumentCancel(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "ç¼è¾æä»¶ä½åº") |
| | | @PostMapping("/doManageDocumentCancel") |
| | | public Result doManageDocumentCancel(@RequestBody ManageDocumentCancel manageDocumentCancel) { |
| | | return Result.success(manageDocumentCancelService.doManageDocumentCancel(manageDocumentCancel)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å¯¼åºæä»¶ä½åº") |
| | | @GetMapping("/exportManageDocumentCancel") |
| | | public void exportManageDocumentCancel(ManageDocumentCancel manageDocumentCancel,HttpServletResponse response) throws Exception { |
| | | manageDocumentCancelService.exportManageDocumentCancel(manageDocumentCancel,response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | import com.deepoove.poi.data.style.*; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.pojo.ManageDocumentControlled; |
| | | import com.ruoyi.manage.service.ManageDocumentControlledService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | 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.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ§ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-11-08 02:54:44 |
| | | */ |
| | | @Api(tags = "管çä½ç³»æä»¶çæ§å¶") |
| | | @RestController |
| | | @RequestMapping("/manageDocumentControlled") |
| | | public class ManageDocumentControlledController { |
| | | |
| | | @Resource |
| | | private ManageDocumentControlledService manageDocumentControlledService; |
| | | |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶åæ§") |
| | | @GetMapping("/pageManageDocumentControlled") |
| | | public Result pageManageDocumentControlled(Page page,ManageDocumentControlled manageDocumentControlled) throws Exception { |
| | | return Result.success(manageDocumentControlledService.pageManageDocumentControlled(page, manageDocumentControlled)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æä»¶åæ§") |
| | | @PostMapping("/addManageDocumentControlled") |
| | | public Result addManageDocumentControlled(ManageDocumentControlled manageDocumentControlled){ |
| | | return Result.success(manageDocumentControlledService.addManageDocumentControlled(manageDocumentControlled)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥çæä»¶åæ§") |
| | | @GetMapping("/getManageDocumentControlled") |
| | | public Result getManageDocumentControlled(Long id){ |
| | | return Result.success(manageDocumentControlledService.getManageDocumentControlled(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "ç¼è¾æä»¶åæ§") |
| | | @PostMapping("/doManageDocumentControlled") |
| | | public Result doManageDocumentControlled(ManageDocumentControlled manageDocumentControlled){ |
| | | return Result.success(manageDocumentControlledService.doManageDocumentControlled(manageDocumentControlled)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿件忧") |
| | | @DeleteMapping("/delManageDocumentControlled") |
| | | public Result delManageDocumentControlled(Long id){ |
| | | return Result.success(manageDocumentControlledService.delManageDocumentControlled(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "å®¡æ ¸æä»¶åæ§") |
| | | @PostMapping("/checkManageDocumentControlled") |
| | | public Result checkManageDocumentControlled(ManageDocumentControlled manageDocumentControlled){ |
| | | return Result.success(manageDocumentControlledService.checkManageDocumentControlled(manageDocumentControlled)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "å®¡æ ¸æ¥çéä»¶") |
| | | @GetMapping("/checkManageDocumentControlledPdf") |
| | | public void checkManageDocumentControlledPdf(Long id, HttpServletResponse response)throws Exception { |
| | | manageDocumentControlledService.checkManageDocumentControlledPdf(id,response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | import com.deepoove.poi.data.style.*; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.dto.ManageDocumentIssueRecycleDto; |
| | | import com.ruoyi.manage.pojo.ManageDocumentIssueRecycle; |
| | | import com.ruoyi.manage.service.ManageDocumentIssueRecycleService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | 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.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶åæ¾åæ¶ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-11-09 09:18:24 |
| | | */ |
| | | @Api(tags = "管çä½ç³»æä»¶çæ§å¶") |
| | | @RestController |
| | | @RequestMapping("/manageDocumentIssueRecycle") |
| | | public class ManageDocumentIssueRecycleController { |
| | | |
| | | @Resource |
| | | private ManageDocumentIssueRecycleService manageDocumentIssueRecycleService; |
| | | |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶åæ¾åæ¶") |
| | | @GetMapping("/pageManageDocumentIssueRecycle") |
| | | public Result pageManageDocumentIssueRecycle(Page page,ManageDocumentIssueRecycleDto manageDocumentIssueRecycleDto) throws Exception { |
| | | return Result.success(manageDocumentIssueRecycleService.pageManageDocumentIssueRecycle(page, manageDocumentIssueRecycleDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æä»¶åæ¾åæ¶") |
| | | @PostMapping("/addManageDocumentIssueRecycle") |
| | | public Result addManageDocumentIssueRecycle(ManageDocumentIssueRecycle manageDocumentIssueRecycle){ |
| | | return Result.success(manageDocumentIssueRecycleService.addManageDocumentIssueRecycle(manageDocumentIssueRecycle)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿件忾忶") |
| | | @DeleteMapping("/delManageDocumentIssueRecycle") |
| | | public Result delManageDocumentIssueRecycle(Long id){ |
| | | return Result.success(manageDocumentIssueRecycleService.delManageDocumentIssueRecycle(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥çæä»¶åæ¾åæ¶") |
| | | @GetMapping("/getManageDocumentIssueRecycle") |
| | | public Result getManageDocumentIssueRecycle(Long id){ |
| | | return Result.success(manageDocumentIssueRecycleService.getManageDocumentIssueRecycle(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "ç¼è¾æä»¶åæ¾åæ¶") |
| | | @PostMapping("/doManageDocumentIssueRecycle") |
| | | public Result doManageDocumentIssueRecycle(@RequestBody ManageDocumentIssueRecycle manageDocumentIssueRecycle){ |
| | | return Result.success(manageDocumentIssueRecycleService.doManageDocumentIssueRecycle(manageDocumentIssueRecycle)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "å®¡æ ¸æä»¶åæ¾åæ¶") |
| | | @PostMapping("/checkManageDocumentIssueRecycle") |
| | | public Result checkManageDocumentIssueRecycle(@RequestBody ManageDocumentIssueRecycle manageDocumentIssueRecycle){ |
| | | return Result.success(manageDocumentIssueRecycleService.checkManageDocumentIssueRecycle(manageDocumentIssueRecycle.getId(),manageDocumentIssueRecycle.getDocumentState())); |
| | | } |
| | | |
| | | @ApiOperation(value = "å¯¼åºæä»¶åæ¾åæ¶") |
| | | @GetMapping("/exportManageDocumentIssueRecycle") |
| | | public void exportManageDocumentIssueRecycle(ManageDocumentIssueRecycleDto manageDocumentIssueRecycleDto, HttpServletResponse response) throws Exception { |
| | | manageDocumentIssueRecycleService.exportManageDocumentIssueRecycle(manageDocumentIssueRecycleDto,response); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.read.builder.ExcelReaderBuilder; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.excel.ManageDocumentListListener; |
| | | import com.ruoyi.manage.pojo.ManageDocumentList; |
| | | import com.ruoyi.manage.service.ManageDocumentListService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶æ¸
å |
| | | å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-11-08 11:08:11 |
| | | */ |
| | | @Api(tags = "管çä½ç³»æä»¶çæ§å¶") |
| | | @RestController |
| | | @RequestMapping("/manageDocumentList") |
| | | public class ManageDocumentListController { |
| | | |
| | | @Resource |
| | | private ManageDocumentListService manageDocumentListService; |
| | | |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶æ¸
å") |
| | | @GetMapping("/pageManageDocumentList") |
| | | public Result pageManageDocumentList(Page page,ManageDocumentList manageDocumentList) throws Exception { |
| | | return Result.success(manageDocumentListService.pageManageDocumentList(page, manageDocumentList)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç¼è¾æä»¶æ¸
å") |
| | | @PostMapping("/doManageDocumentList") |
| | | public Result doManageDocumentList(@RequestBody ManageDocumentList manageDocumentList) { |
| | | return Result.success(manageDocumentListService.updateById(manageDocumentList)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿件æ¸
å") |
| | | @DeleteMapping("/delManageDocumentList") |
| | | public Result delManageDocumentList(Integer id) { |
| | | return Result.success(manageDocumentListService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¸ä¼ éä»¶-æä»¶æ¸
å") |
| | | @PostMapping("/uploadFileManageDocumentList") |
| | | public Result uploadFileManageDocumentList(Integer id, MultipartFile file) { |
| | | return Result.success(manageDocumentListService.uploadFile(id,file)); |
| | | } |
| | | |
| | | @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.ruoyi.manage.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.manage.dto.ManageMeetingDto; |
| | | import com.ruoyi.manage.service.ManageMeetingService; |
| | | import com.deepoove.poi.data.style.*; |
| | | 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; |
| | | |
| | | @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); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢ä¼è®®è®°å½") |
| | | @PostMapping("/addMeeting") |
| | | public Result addMeeting(@RequestBody ManageMeetingDto dto){ |
| | | manageMeetingService.addMeeting(dto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç¼è¾ä¼è®®è®°å½") |
| | | @PostMapping("/modifyMeeting") |
| | | public Result modifyMeeting(@RequestBody ManageMeetingDto manageMeetingDto){ |
| | | return Result.success(manageMeetingService.modifyMeeting(manageMeetingDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤ä¼è®®è®°å½") |
| | | @DeleteMapping("/deleteMeeting") |
| | | public Result deleteMeeting(Integer id){ |
| | | return Result.success(manageMeetingService.removeById(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "ä¸è½½ä¼è®®è®°å½") |
| | | @GetMapping("/exportMeeting") |
| | | public void exportMeeting(Integer id, HttpServletResponse response){ |
| | | manageMeetingService.exportMeeting(id,response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.manage.pojo.ManageMeetingParticipants; |
| | | import com.ruoyi.manage.service.ManageMeetingParticipantsService; |
| | | import com.ruoyi.manage.vo.MeetingParticipantsDetailsVo; |
| | | import com.deepoove.poi.data.style.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | 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; |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ä¼è®®è®°å½åä¼äººå") |
| | | @GetMapping("/getParticipants") |
| | | public Result<MeetingParticipantsDetailsVo> getParticipants(Integer id){ |
| | | return Result.success(manageMeetingParticipantsService.getParticipants(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢ä¼è®®è®°å½åä¼äººå") |
| | | @PostMapping("/add") |
| | | public Result addParticipants(@RequestBody List<ManageMeetingParticipants> list){ |
| | | manageMeetingParticipantsService.saveBatch(list); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤ä¼è®®è®°å½åä¼äººå") |
| | | @DeleteMapping("/delete") |
| | | public Result deleteParticipants(List<Integer> ids){ |
| | | manageMeetingParticipantsService.removeByIds(ids); |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | import com.deepoove.poi.data.style.*; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.pojo.ManageRecordAudit; |
| | | import com.ruoyi.manage.service.ManageRecordAuditService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | 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.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-11-14 10:29:18 |
| | | */ |
| | | @Api(tags = "è®°å½çæ§å¶") |
| | | @RestController |
| | | @RequestMapping("/manageRecordAudit") |
| | | public class ManageRecordAuditController { |
| | | |
| | | @Resource |
| | | private ManageRecordAuditService manageRecordAuditService; |
| | | |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @GetMapping("/pageManageRecordAudit") |
| | | public Result pageManageRecordAudit(Page page,ManageRecordAudit manageRecordAudit) throws Exception { |
| | | return Result.success(manageRecordAuditService.pageManageRecordAudit(page, manageRecordAudit)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @PostMapping("/addManageRecordAudit") |
| | | public Result addManageRecordAudit(ManageRecordAudit manageRecordAudit){ |
| | | return Result.success(manageRecordAuditService.addManageRecordAudit(manageRecordAudit)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "ç¼è¾æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @PostMapping("/doManageRecordAudit") |
| | | public Result doManageRecordAudit(ManageRecordAudit manageRecordAudit){ |
| | | return Result.success(manageRecordAuditService.doManageRecordAudit(manageRecordAudit)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @DeleteMapping("/delManageRecordAudit") |
| | | public Result delManageRecordAudit(Integer id){ |
| | | return Result.success(manageRecordAuditService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹åæä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @PostMapping("/ratifyManageRecordAudit") |
| | | public Result ratifyManageRecordAudit(@RequestBody Map<String, Integer> param){ |
| | | Integer id = param.get("id"); |
| | | return Result.success(manageRecordAuditService.ratifyManageRecordAudit(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å¯¼åºæä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½") |
| | | @GetMapping("/exportOutManageRecordAudit") |
| | | public Result exportOutManageRecordAudit(ManageRecordAudit manageRecordAudit, HttpServletResponse response) { |
| | | return Result.success(manageRecordAuditService.exportOutManageRecordAudit(manageRecordAudit,response)); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | import com.deepoove.poi.data.style.*; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.pojo.ManageRecordCancel; |
| | | import com.ruoyi.manage.service.ManageRecordCancelService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDate; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½åºæä»¶ééè®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-11-13 01:27:22 |
| | | */ |
| | | @Api(tags = "è®°å½çæ§å¶") |
| | | @RestController |
| | | @RequestMapping("/manageRecordCancel") |
| | | public class ManageRecordCancelController { |
| | | |
| | | @Resource |
| | | private ManageRecordCancelService manageRecordCancelService; |
| | | |
| | | @ApiOperation(value = "å页æ¥è¯¢ä½åºæä»¶éæ¯è®°å½") |
| | | @GetMapping("/pageManageRecordCancel") |
| | | public Result pageManageRecordCancel(Page page,ManageRecordCancel manageRecordCancel) throws Exception { |
| | | return Result.success(manageRecordCancelService.pageManageRecordCancel(page, manageRecordCancel)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢ä½åºæä»¶éæ¯è®°å½") |
| | | @PostMapping("/addManageRecordCancel") |
| | | public Result addManageRecordCancel(@RequestBody ManageRecordCancel manageRecordCancel){ |
| | | manageRecordCancel.setCreateTime(LocalDate.now()); |
| | | return Result.success(manageRecordCancelService.save(manageRecordCancel)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "ç¼è¾ä½åºæä»¶éæ¯è®°å½") |
| | | @PostMapping("/doManageRecordCancel") |
| | | public Result doManageRecordCancel(@RequestBody ManageRecordCancel manageRecordCancel){ |
| | | return Result.success(manageRecordCancelService.updateById(manageRecordCancel)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤ä½åºæä»¶éæ¯è®°å½") |
| | | @DeleteMapping("/delManageRecordCancel") |
| | | public Result delManageRecordCancel(Integer id){ |
| | | return Result.success(manageRecordCancelService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹åä½åºæä»¶éæ¯è®°å½") |
| | | @PostMapping("/ratifyManageRecordCancel") |
| | | public Result ratifyManageRecordCancel(@RequestBody Map<String, Object> param){ |
| | | Integer id = (Integer) param.get("id"); |
| | | String ratifyState = (String) param.get("ratifyState"); |
| | | return Result.success(manageRecordCancelService.ratifyManageRecordCancel(id,ratifyState)); |
| | | } |
| | | |
| | | @ApiOperation(value = "导åºä½åºæä»¶éæ¯è®°å½") |
| | | @GetMapping("/exportOutManageRecordCancel") |
| | | public Result exportOutManageRecordCancel(ManageRecordCancel manageRecordCancel, HttpServletResponse response) throws Exception { |
| | | return Result.success(manageRecordCancelService.exportOutManageRecordCancel(manageRecordCancel,response)); |
| | | } |
| | | |
| | | @ApiOperation(value = "导å
¥ä½åºæä»¶éæ¯è®°å½") |
| | | @PostMapping("/exportInManageRecordCancel") |
| | | public Result exportInManageRecordCancel(MultipartFile file){ |
| | | try { |
| | | return Result.success(manageRecordCancelService.exportInManageRecordCancel(file)); |
| | | }catch (Exception e){ |
| | | return Result.fail(e.getMessage()); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | import com.deepoove.poi.data.style.*; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.manage.pojo.ManageRecordCheck; |
| | | import com.ruoyi.manage.service.ManageRecordCheckService; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æä»¶å®¡æ¹è®°å½(å«ä¿®è®¢å忬¡å®¡æ¹è®°å½) å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2024-11-12 02:31:36 |
| | | */ |
| | | @Api(tags = "è®°å½çæ§å¶") |
| | | @RestController |
| | | @RequestMapping("/manageRecordCheck") |
| | | public class ManageRecordCheckController { |
| | | |
| | | @Resource |
| | | private ManageRecordCheckService manageRecordCheckService; |
| | | |
| | | @ApiOperation(value = "å页æ¥è¯¢æä»¶å®¡æ¹è®°å½") |
| | | @GetMapping("/pageManageRecordCheck") |
| | | public Result pageManageRecordCheck(Page page,ManageRecordCheck manageRecordCheck) throws Exception { |
| | | return Result.success(manageRecordCheckService.pageManageRecordCheck(page, manageRecordCheck)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æä»¶å®¡æ¹è®°å½") |
| | | @PostMapping("/addManageRecordCheck") |
| | | public Result addManageRecordCheck(@RequestBody ManageRecordCheck manageRecordCheck) { |
| | | return Result.success(manageRecordCheckService.save(manageRecordCheck)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "ç¼è¾æä»¶å®¡æ¹è®°å½") |
| | | @PostMapping("/doManageRecordCheck") |
| | | public Result doManageRecordCheck(@RequestBody ManageRecordCheck manageRecordCheck) { |
| | | return Result.success(manageRecordCheckService.updateById(manageRecordCheck)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿件审æ¹è®°å½") |
| | | @DeleteMapping("/delManageRecordCheck") |
| | | public Result delManageRecordCheck(Integer id) { |
| | | return Result.success(manageRecordCheckService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å®¡æ ¸æä»¶å®¡æ¹è®°å½") |
| | | @PostMapping("/checkManageRecordCheck") |
| | | public Result checkManageRecordCheck(@RequestBody Map<String, Object> param) { |
| | | Integer id = (Integer) param.get("id"); |
| | | String checkState = (String) param.get("checkState"); |
| | | return Result.success(manageRecordCheckService.checkManageRecordCheck(id,checkState)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹åæä»¶å®¡æ¹è®°å½") |
| | | @PostMapping("/ratifyManageRecordCheck") |
| | | public Result ratifyManageRecordCheck(@RequestBody Map<String, Object> param) { |
| | | Integer id = (Integer) param.get("id"); |
| | | String ratifyState = (String) param.get("ratifyState"); |
| | | return Result.success(manageRecordCheckService.ratifyManageRecordCheck(id,ratifyState)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å¯¼åºæä»¶å®¡æ¹è®°å½") |
| | | @GetMapping("/exportOutManageRecordCheck") |
| | | public Result exportOutManageRecordCheck(ManageRecordCheck manageRecordCheck, HttpServletResponse response) throws Exception { |
| | | return Result.success(manageRecordCheckService.exportOutManageRecordCheck(manageRecordCheck,response)); |
| | | } |
| | | |
| | | @ApiOperation(value = "导å
¥æä»¶å®¡æ¹è®°å½") |
| | | @PostMapping("/exportInManageRecordCheck") |
| | | public Result exportInManageRecordCheck(MultipartFile file){ |
| | | return Result.success(manageRecordCheckService.exportInManageRecordCheck(file)); |
| | | } |
| | | |
| | | } |
cnas-manage/src/main/java/com/ruoyi/manage/controller/ManageRecordIntervalsController.java
cnas-manage/src/main/java/com/ruoyi/manage/controller/ManageRecordIntervalsTotalController.java
cnas-manage/src/main/java/com/ruoyi/manage/controller/ManageRecordIssueRecycleController.java
cnas-manage/src/main/java/com/ruoyi/manage/controller/ManageRecordTotalController.java
cnas-manage/src/main/java/com/ruoyi/manage/controller/ManageRecordVerifyController.java
cnas-manage/src/main/java/com/ruoyi/manage/controller/ManageReviewProgramController.java
cnas-manage/src/main/java/com/ruoyi/manage/controller/ManageReviewProgramFileController.java
cnas-manage/src/main/java/com/ruoyi/manage/controller/ManageReviewReportController.java
cnas-manage/src/main/java/com/ruoyi/manage/controller/ManageRiskAssessmentResultsController.java
cnas-manage/src/main/java/com/ruoyi/manage/dto/ClientSatisfactionDto.java
cnas-manage/src/main/java/com/ruoyi/manage/dto/InternalCheckDto.java
cnas-manage/src/main/java/com/ruoyi/manage/dto/InternalCorrectDto.java
cnas-manage/src/main/java/com/ruoyi/manage/dto/InternalImplementDto.java
cnas-manage/src/main/java/com/ruoyi/manage/dto/InternalMeetingDto.java
cnas-manage/src/main/java/com/ruoyi/manage/dto/InternalMeetingParticipantDto.java
cnas-manage/src/main/java/com/ruoyi/manage/dto/InternalPlanDto.java
cnas-manage/src/main/java/com/ruoyi/manage/dto/ManageDocumentIssueRecycleDto.java
cnas-manage/src/main/java/com/ruoyi/manage/dto/ManageMeetingDto.java
cnas-manage/src/main/java/com/ruoyi/manage/dto/ManageMeetingParticipantsDto.java
cnas-manage/src/main/java/com/ruoyi/manage/excel/ManageDocumentListListener.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ClientSatisfactionAnalyseFileMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ClientSatisfactionMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/InternalCheckDetailMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/InternalCheckMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/InternalCorrectFileMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/InternalCorrectMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/InternalImplementDetailMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/InternalImplementMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/InternalMeetingDetailMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/InternalMeetingMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/InternalPlanDetailMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/InternalPlanMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/InternalReportMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageControlPlanListMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageDocumentAlterMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageDocumentCancelMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageDocumentControlledMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageDocumentIssueRecycleMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageDocumentListMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageMeetingMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageMeetingParticipantsMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageRecordAuditMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageRecordCancelMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageRecordCheckMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageRecordIntervalsMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageRecordIntervalsTotalMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageRecordIssueRecycleMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageRecordTotalMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageRecordVerifyMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageReviewProgramFileMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageReviewProgramMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageReviewReportMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/mapper/ManageRiskAssessmentResultsMapper.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ClientSatisfaction.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ClientSatisfactionAnalyseFile.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/InternalCheck.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/InternalCheckDetail.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/InternalCorrect.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/InternalCorrectFile.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/InternalImplement.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/InternalImplementDetail.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/InternalMeeting.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/InternalMeetingDetail.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/InternalPlan.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/InternalPlanDetail.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/InternalReport.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageControlPlanList.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageDocumentAlter.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageDocumentCancel.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageDocumentControlled.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageDocumentIssueRecycle.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageDocumentList.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageMeeting.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageMeetingParticipants.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageRecordAudit.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageRecordCancel.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageRecordCheck.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageRecordIntervals.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageRecordIntervalsTotal.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageRecordIssueRecycle.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageRecordTotal.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageRecordVerify.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageReviewProgram.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageReviewProgramFile.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageReviewReport.java
cnas-manage/src/main/java/com/ruoyi/manage/pojo/ManageRiskAssessmentResults.java
cnas-manage/src/main/java/com/ruoyi/manage/schedule/ManageRecordTotalSchedule.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ClientSatisfactionService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/InternalCheckDetailService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/InternalCheckService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/InternalCorrectFileService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/InternalCorrectService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/InternalImplementDetailService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/InternalImplementService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/InternalMeetingDetailService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/InternalMeetingService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/InternalPlanDetailService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/InternalPlanService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/InternalReportService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageControlPlanListService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageDocumentAlterService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageDocumentCancelService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageDocumentControlledService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageDocumentIssueRecycleService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageDocumentListService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageMeetingParticipantsService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageMeetingService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageRecordAuditService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageRecordCancelService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageRecordCheckService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageRecordIntervalsService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageRecordIntervalsTotalService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageRecordIssueRecycleService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageRecordTotalService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageRecordVerifyService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageReviewProgramFileService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageReviewProgramService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageReviewReportService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/ManageRiskAssessmentResultsService.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ClientSatisfactionServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/InternalCheckDetailServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/InternalCheckServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/InternalCorrectFileServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/InternalCorrectServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/InternalImplementDetailServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/InternalImplementServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/InternalMeetingDetailServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/InternalMeetingServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/InternalPlanDetailServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/InternalPlanServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/InternalReportServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageControlPlanListServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageDocumentAlterServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageDocumentCancelServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageDocumentControlledServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageDocumentIssueRecycleServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageDocumentListServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageMeetingParticipantsServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageMeetingServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageRecordAuditServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageRecordCancelServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageRecordCheckServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageRecordIntervalsServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageRecordIntervalsTotalServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageRecordIssueRecycleServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageRecordTotalServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageRecordVerifyServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageReviewProgramFileServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageReviewProgramServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageReviewReportServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/service/impl/ManageRiskAssessmentResultsServiceImpl.java
cnas-manage/src/main/java/com/ruoyi/manage/vo/ManageControlPlanListVo.java
cnas-manage/src/main/java/com/ruoyi/manage/vo/ManageRiskAssessmentResultsVo.java
cnas-manage/src/main/java/com/ruoyi/manage/vo/MeetingParticipantsDetailsVo.java
cnas-manage/src/main/java/com/ruoyi/manage/vo/ReviewProgramDetailsVo.java
cnas-manage/src/main/resources/lib/aspose-words-15.12.0-jdk16.jar
cnas-manage/src/main/resources/lib/license.xml
cnas-manage/src/main/resources/mapper/ClientSatisfactionAnalyseFileMapper.xml
cnas-manage/src/main/resources/mapper/ClientSatisfactionMapper.xml
cnas-manage/src/main/resources/mapper/InternalCheckMapper.xml
cnas-manage/src/main/resources/mapper/InternalCorrectFileMapper.xml
cnas-manage/src/main/resources/mapper/InternalCorrectMapper.xml
cnas-manage/src/main/resources/mapper/InternalImplementMapper.xml
cnas-manage/src/main/resources/mapper/InternalMeetingDetailMapper.xml
cnas-manage/src/main/resources/mapper/InternalMeetingMapper.xml
cnas-manage/src/main/resources/mapper/InternalPlanDetailMapper.xml
cnas-manage/src/main/resources/mapper/InternalPlanMapper.xml
cnas-manage/src/main/resources/mapper/InternalReportMapper.xml
cnas-manage/src/main/resources/mapper/ManageControlPlanListMapper.xml
cnas-manage/src/main/resources/mapper/ManageDocumentAlterMapper.xml
cnas-manage/src/main/resources/mapper/ManageDocumentCancelMapper.xml
cnas-manage/src/main/resources/mapper/ManageDocumentControlledMapper.xml
cnas-manage/src/main/resources/mapper/ManageDocumentIssueRecycleMapper.xml
cnas-manage/src/main/resources/mapper/ManageDocumentListMapper.xml
cnas-manage/src/main/resources/mapper/ManageMeetingMapper.xml
cnas-manage/src/main/resources/mapper/ManageMeetingParticipantsMapper.xml
cnas-manage/src/main/resources/mapper/ManageRecordAuditMapper.xml
cnas-manage/src/main/resources/mapper/ManageRecordCancelMapper.xml
cnas-manage/src/main/resources/mapper/ManageRecordCheckMapper.xml
cnas-manage/src/main/resources/mapper/ManageRecordIntervalsMapper.xml
cnas-manage/src/main/resources/mapper/ManageRecordIntervalsTotalMapper.xml
cnas-manage/src/main/resources/mapper/ManageRecordIssueRecycleMapper.xml
cnas-manage/src/main/resources/mapper/ManageRecordTotalMapper.xml
cnas-manage/src/main/resources/mapper/ManageRecordVerifyMapper.xml
cnas-manage/src/main/resources/mapper/ManageReviewProgramFileMapper.xml
cnas-manage/src/main/resources/mapper/ManageReviewProgramMapper.xml
cnas-manage/src/main/resources/mapper/ManageReviewReportMapper.xml
cnas-manage/src/main/resources/mapper/ManageRiskAssessmentResultsMapper.xml
cnas-manage/src/main/resources/static/analysis-risk-factors.docx
cnas-manage/src/main/resources/static/audit-deal.docx
cnas-manage/src/main/resources/static/cancel-deal.docx
cnas-manage/src/main/resources/static/check-deal.docx
cnas-manage/src/main/resources/static/customer-satisfaction-questionnaire.docx
cnas-manage/src/main/resources/static/internal-check.docx
cnas-manage/src/main/resources/static/internal-correct.docx
cnas-manage/src/main/resources/static/internal-implement.docx
cnas-manage/src/main/resources/static/internal-meeting.docx
cnas-manage/src/main/resources/static/internal-plan.docx
cnas-manage/src/main/resources/static/internal-report.docx
cnas-manage/src/main/resources/static/intervals-deal.docx
cnas-manage/src/main/resources/static/recycle-deal.docx
cnas-manage/src/main/resources/static/review-meet.docx
cnas-manage/src/main/resources/static/review-program.docx
cnas-manage/src/main/resources/static/review-report.docx
cnas-manage/src/main/resources/static/risk-factor-identification-risk.docx
cnas-manage/src/main/resources/static/verify-deal.docx
cnas-personnel/pom.xml
cnas-personnel/src/main/java/com/ruoyi/personnel/controller/PersonBasicInfoController.java
cnas-personnel/src/main/java/com/ruoyi/personnel/controller/PersonCommunicationAbilityController.java
cnas-personnel/src/main/java/com/ruoyi/personnel/controller/PersonJobResponsibilitiesController.java
cnas-personnel/src/main/java/com/ruoyi/personnel/controller/PersonPersonnelCapacityController.java
cnas-personnel/src/main/java/com/ruoyi/personnel/controller/PersonPostAuthorizationRecordController.java
cnas-personnel/src/main/java/com/ruoyi/personnel/controller/PersonRewardPunishmentRecordController.java
cnas-personnel/src/main/java/com/ruoyi/personnel/controller/PersonTrainingController.java
cnas-personnel/src/main/java/com/ruoyi/personnel/controller/PersonTrainingRecordController.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonBasicInfoDetailsDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonBasicInfoDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonBasicInfoWorkDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonCommunicationAbilityDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonJobResponsibilitiesDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonPersonnelCapacityDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonPersonnelCapacityExportDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonPostAuthorizationRecordDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonRewardPunishmentRecordDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonTrainingDetailedDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonTrainingDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonTrainingRecordDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonTrainingRecordListDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/PersonTrainingRecordSubmitDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/TrainingRecordExportDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/TrainingRecordPersonDetailedDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/dto/UserPageDto.java
cnas-personnel/src/main/java/com/ruoyi/personnel/excel/PersonRewardPunishmentRecordExcel.java
cnas-personnel/src/main/java/com/ruoyi/personnel/excel/PersonTrainingDetailedListener.java
cnas-personnel/src/main/java/com/ruoyi/personnel/excel/PersonTrainingDetailedUpload.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/AnnexMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/PersonBasicInfoFileMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/PersonBasicInfoMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/PersonBasicInfoWorkMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/PersonCommunicationAbilityMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/PersonJobResponsibilitiesMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/PersonPersonnelCapacityMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/PersonPostAuthorizationRecordMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/PersonRewardPunishmentRecordMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/PersonTrainingDetailedFileMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/PersonTrainingDetailedMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/PersonTrainingMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/mapper/PersonTrainingRecordMapper.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/Annex.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/PersonBasicInfo.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/PersonBasicInfoFile.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/PersonBasicInfoWork.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/PersonCommunicationAbility.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/PersonJobResponsibilities.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/PersonPersonnelCapacity.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/PersonPostAuthorizationRecord.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/PersonRewardPunishmentRecord.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/PersonTraining.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/PersonTrainingDetailed.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/PersonTrainingDetailedFile.java
cnas-personnel/src/main/java/com/ruoyi/personnel/pojo/PersonTrainingRecord.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/AnnexService.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/PersonBasicInfoFileService.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/PersonBasicInfoService.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/PersonBasicInfoWorkService.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/PersonCommunicationAbilityService.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/PersonJobResponsibilitiesService.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/PersonPersonnelCapacityService.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/PersonPostAuthorizationRecordService.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/PersonRewardPunishmentRecordService.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/PersonTrainingDetailedService.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/PersonTrainingRecordService.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/PersonTrainingService.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/AnnexServiceImpl.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonBasicInfoFileServiceImpl.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonBasicInfoServiceImpl.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonBasicInfoWorkServiceImpl.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonCommunicationAbilityServiceImpl.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonJobResponsibilitiesServiceImpl.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonPersonnelCapacityServiceImpl.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonPostAuthorizationRecordServiceImpl.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonRewardPunishmentRecordServiceImpl.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonTrainingDetailedServiceImpl.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonTrainingRecordServiceImpl.java
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonTrainingServiceImpl.java
cnas-personnel/src/main/java/com/ruoyi/personnel/task/PersonTrainingSchedule.java
cnas-personnel/src/main/resources/mapper/PersonBasicInfoMapper.xml
cnas-personnel/src/main/resources/mapper/PersonCommunicationAbilityMapper.xml
cnas-personnel/src/main/resources/mapper/PersonJobResponsibilitiesMapper.xml
cnas-personnel/src/main/resources/mapper/PersonPersonnelCapacityMapper.xml
cnas-personnel/src/main/resources/mapper/PersonPostAuthorizationRecordMapper.xml
cnas-personnel/src/main/resources/mapper/PersonRewardPunishmentRecordMapper.xml
cnas-personnel/src/main/resources/mapper/PersonTrainingDetailedMapper.xml
cnas-personnel/src/main/resources/mapper/PersonTrainingMapper.xml
cnas-personnel/src/main/resources/mapper/PersonTrainingRecordMapper.xml
cnas-personnel/src/main/resources/static/communication-deal.docx
cnas-personnel/src/main/resources/static/credentials-deal.docx
cnas-personnel/src/main/resources/static/explain-deal.docx
cnas-personnel/src/main/resources/static/person-basic-info.docx
cnas-personnel/src/main/resources/static/person-training-record.docx
cnas-personnel/src/main/resources/static/person-training.docx
cnas-personnel/src/main/resources/static/personnel-capacity.docx
cnas-personnel/src/main/resources/static/super-vise-plan.docx
cnas-personnel/src/main/resources/static/supervision-control-sheet.docx
cnas-personnel/src/main/resources/static/supervision-processing-sheet.docx
cnas-personnel/src/main/resources/static/supervision-record.docx
cnas-personnel/src/main/resources/static/training-record.docx
cnas-process/pom.xml
cnas-process/src/main/java/com/ruoyi/process/controller/InconsistentDistributionController.java
cnas-process/src/main/java/com/ruoyi/process/controller/InspectionOrderController.java
cnas-process/src/main/java/com/ruoyi/process/controller/ProcessComplainController.java
cnas-process/src/main/java/com/ruoyi/process/controller/ProcessDealController.java
cnas-process/src/main/java/com/ruoyi/process/controller/ProcessEvaluateController.java
cnas-process/src/main/java/com/ruoyi/process/controller/ProcessMethodSearchNewController.java
cnas-process/src/main/java/com/ruoyi/process/controller/ProcessMethodVerifyController.java
cnas-process/src/main/java/com/ruoyi/process/controller/ProcessOrderDeviceController.java
cnas-process/src/main/java/com/ruoyi/process/controller/ProcessReportController.java
cnas-process/src/main/java/com/ruoyi/process/controller/ProcessSampleController.java
cnas-process/src/main/java/com/ruoyi/process/controller/ProcessTotaldealController.java
cnas-process/src/main/java/com/ruoyi/process/controller/QualityMonitorController.java
cnas-process/src/main/java/com/ruoyi/process/controller/QualitySuperviseController.java
cnas-process/src/main/java/com/ruoyi/process/controller/QualitySuperviseManagementReviewController.java
cnas-process/src/main/java/com/ruoyi/process/dto/ImageDemoData.java
cnas-process/src/main/java/com/ruoyi/process/dto/InconsistentDistributionDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/InconsistentDistributionProportionDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/InspectionOrderDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/InspectionOrderExportDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/ProcessComplainDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/ProcessDealDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/ProcessMethodSearchNewArchivedDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/ProcessMethodSearchNewBackupsDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/ProcessMethodVerifyCalibrationsFileDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/ProcessMethodVerifyDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/ProcessMethodVerifyExportWordDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/ProcessReportDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/QualityMonitorDetailsDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/QualityMonitorDetailsEvaluateDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/QualityMonitorDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/QualitySuperviseDetailsAccordingDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/QualitySuperviseDetailsCorrectDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/QualitySuperviseDetailsDto.java
cnas-process/src/main/java/com/ruoyi/process/dto/SampleItemDto.java
cnas-process/src/main/java/com/ruoyi/process/excel/QualityMonitorDetailsUpload.java
cnas-process/src/main/java/com/ruoyi/process/excel/QualitySuperviseDetailsUpload.java
cnas-process/src/main/java/com/ruoyi/process/mapper/InconsistentDistributionDetailMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/InconsistentDistributionMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/InspectionOrderDetailMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/InspectionOrderMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessComplainMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessDealMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessEvaluateMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessMethodSearchNewArchivedMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessMethodSearchNewBackupsMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessMethodSearchNewMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessMethodVerifyCalibrationsFileMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessMethodVerifyMachineAttachmentMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessMethodVerifyMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessMethodVerifyMethodFileMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessMethodVerifyWorkFileMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessOrderDeviceMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessReportMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessSampleMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/ProcessTotaldealMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/QualityMonitorDetailsEvaluateFileMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/QualityMonitorDetailsEvaluateMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/QualityMonitorDetailsMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/QualityMonitorDetailsRatifyMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/QualityMonitorMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/QualitySuperviseDetailsAccordingMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/QualitySuperviseDetailsCorrectFileMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/QualitySuperviseDetailsCorrectMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/QualitySuperviseDetailsMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/QualitySuperviseDetailsRecordMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/QualitySuperviseManagementReviewMapper.java
cnas-process/src/main/java/com/ruoyi/process/mapper/QualitySuperviseMapper.java
cnas-process/src/main/java/com/ruoyi/process/pojo/InconsistentDistribution.java
cnas-process/src/main/java/com/ruoyi/process/pojo/InconsistentDistributionDetail.java
cnas-process/src/main/java/com/ruoyi/process/pojo/InspectionOrder.java
cnas-process/src/main/java/com/ruoyi/process/pojo/InspectionOrderDetail.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessComplain.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessDeal.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessEvaluate.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessMethodSearchNew.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessMethodSearchNewArchived.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessMethodSearchNewBackups.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessMethodVerify.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessMethodVerifyCalibrationsFile.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessMethodVerifyMachineAttachment.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessMethodVerifyMethodFile.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessMethodVerifyWorkFile.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessOrderDevice.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessReport.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessSample.java
cnas-process/src/main/java/com/ruoyi/process/pojo/ProcessTotaldeal.java
cnas-process/src/main/java/com/ruoyi/process/pojo/QualityMonitor.java
cnas-process/src/main/java/com/ruoyi/process/pojo/QualityMonitorDetails.java
cnas-process/src/main/java/com/ruoyi/process/pojo/QualityMonitorDetailsEvaluate.java
cnas-process/src/main/java/com/ruoyi/process/pojo/QualityMonitorDetailsEvaluateFile.java
cnas-process/src/main/java/com/ruoyi/process/pojo/QualityMonitorDetailsRatify.java
cnas-process/src/main/java/com/ruoyi/process/pojo/QualitySupervise.java
cnas-process/src/main/java/com/ruoyi/process/pojo/QualitySuperviseDetails.java
cnas-process/src/main/java/com/ruoyi/process/pojo/QualitySuperviseDetailsAccording.java
cnas-process/src/main/java/com/ruoyi/process/pojo/QualitySuperviseDetailsCorrect.java
cnas-process/src/main/java/com/ruoyi/process/pojo/QualitySuperviseDetailsCorrectFile.java
cnas-process/src/main/java/com/ruoyi/process/pojo/QualitySuperviseDetailsRecord.java
cnas-process/src/main/java/com/ruoyi/process/pojo/QualitySuperviseManagementReview.java
cnas-process/src/main/java/com/ruoyi/process/service/InconsistentDistributionDetailService.java
cnas-process/src/main/java/com/ruoyi/process/service/InconsistentDistributionService.java
cnas-process/src/main/java/com/ruoyi/process/service/InspectionOrderDetailService.java
cnas-process/src/main/java/com/ruoyi/process/service/InspectionOrderService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessComplainService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessDealService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessEvaluateService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessMethodSearchNewArchivedService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessMethodSearchNewBackupsService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessMethodSearchNewService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessMethodVerifyCalibrationsFileService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessMethodVerifyMachineAttachmentService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessMethodVerifyMethodFileService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessMethodVerifyService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessMethodVerifyWorkFileService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessOrderDeviceService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessReportService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessSampleService.java
cnas-process/src/main/java/com/ruoyi/process/service/ProcessTotaldealService.java
cnas-process/src/main/java/com/ruoyi/process/service/QualityMonitorDetailsEvaluateService.java
cnas-process/src/main/java/com/ruoyi/process/service/QualityMonitorDetailsRatifyService.java
cnas-process/src/main/java/com/ruoyi/process/service/QualityMonitorDetailsService.java
cnas-process/src/main/java/com/ruoyi/process/service/QualityMonitorService.java
cnas-process/src/main/java/com/ruoyi/process/service/QualitySuperviseDetailsService.java
cnas-process/src/main/java/com/ruoyi/process/service/QualitySuperviseManagementReviewService.java
cnas-process/src/main/java/com/ruoyi/process/service/QualitySuperviseService.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/CnasProcessMethodVerifyCalibrationsFileServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/CnasProcessMethodVerifyWorkFileServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/InconsistentDistributionDetailServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/InconsistentDistributionServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/InspectionOrderDetailServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/InspectionOrderServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessComplainServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessDealServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessEvaluateServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessMethodSearchNewArchivedServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessMethodSearchNewBackupsServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessMethodSearchNewServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessMethodVerifyMachineAttachmentServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessMethodVerifyMethodFileServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessMethodVerifyServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessOrderDeviceServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessReportServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessSampleServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/ProcessTotaldealServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/QualityMonitorDetailsEvaluateServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/QualityMonitorDetailsRatifyServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/QualityMonitorDetailsServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/QualityMonitorServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/QualitySuperviseDetailsServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/QualitySuperviseManagementReviewServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/service/impl/QualitySuperviseServiceImpl.java
cnas-process/src/main/java/com/ruoyi/process/task/QualitySuperviseSchedule.java
cnas-process/src/main/resources/mapper/InconsistentDistributionDetailMapper.xml
cnas-process/src/main/resources/mapper/InconsistentDistributionMapper.xml
cnas-process/src/main/resources/mapper/InspectionOrderDetailMapper.xml
cnas-process/src/main/resources/mapper/InspectionOrderMapper.xml
cnas-process/src/main/resources/mapper/ProcessComplainMapper.xml
cnas-process/src/main/resources/mapper/ProcessDealMapper.xml
cnas-process/src/main/resources/mapper/ProcessEvaluateMapper.xml
cnas-process/src/main/resources/mapper/ProcessMethodSearchNewArchivedMapper.xml
cnas-process/src/main/resources/mapper/ProcessMethodSearchNewBackupsMapper.xml
cnas-process/src/main/resources/mapper/ProcessMethodSearchNewMapper.xml
cnas-process/src/main/resources/mapper/ProcessMethodVerifyCalibrationsFileMapper.xml
cnas-process/src/main/resources/mapper/ProcessMethodVerifyMachineAttachmentMapper.xml
cnas-process/src/main/resources/mapper/ProcessMethodVerifyMapper.xml
cnas-process/src/main/resources/mapper/ProcessMethodVerifyMethodFileMapper.xml
cnas-process/src/main/resources/mapper/ProcessMethodVerifyWorkFileMapper.xml
cnas-process/src/main/resources/mapper/ProcessOrderDeviceMapper.xml
cnas-process/src/main/resources/mapper/ProcessReportMapper.xml
cnas-process/src/main/resources/mapper/ProcessSampleMapper.xml
cnas-process/src/main/resources/mapper/ProcessTotaldealMapper.xml
cnas-process/src/main/resources/mapper/QualityMonitorDetailsEvaluateFileMapper.xml
cnas-process/src/main/resources/mapper/QualityMonitorDetailsEvaluateMapper.xml
cnas-process/src/main/resources/mapper/QualityMonitorDetailsMapper.xml
cnas-process/src/main/resources/mapper/QualityMonitorDetailsRatifyMapper.xml
cnas-process/src/main/resources/mapper/QualityMonitorMapper.xml
cnas-process/src/main/resources/mapper/QualitySuperviseDetailsAccordingMapper.xml
cnas-process/src/main/resources/mapper/QualitySuperviseDetailsCorrectFileMapper.xml
cnas-process/src/main/resources/mapper/QualitySuperviseDetailsCorrectMapper.xml
cnas-process/src/main/resources/mapper/QualitySuperviseDetailsMapper.xml
cnas-process/src/main/resources/mapper/QualitySuperviseDetailsRecordMapper.xml
cnas-process/src/main/resources/mapper/QualitySuperviseManagementReviewMapper.xml
cnas-process/src/main/resources/mapper/QualitySuperviseMapper.xml
cnas-process/src/main/resources/static/excel/check-records.xlsx
cnas-process/src/main/resources/static/inconsistent-distribution.docx
cnas-process/src/main/resources/static/inspection-order.docx
cnas-process/src/main/resources/static/method-verify.docx
cnas-process/src/main/resources/static/quality-monitor-details-ratify.docx
cnas-process/src/main/resources/static/quality-monitor-evaluate.docx
cnas-process/src/main/resources/static/quality-monitor.docx
cnas-process/src/main/resources/static/quality-supervise.docx
cnas-process/src/main/resources/static/report-deal.docx
cnas-process/src/main/resources/static/sample-deal.docx
cnas-process/src/main/resources/static/sample-receive.docx
cnas-process/src/main/resources/static/supervise-detail-correct.docx
cnas-process/src/main/resources/static/supervise-management-eview.docx
cnas-process/src/main/resources/static/supervision-detail-according.docx
cnas-process/src/main/resources/static/supervision-detail-record.docx
cnas-require/pom.xml
cnas-require/src/main/java/com/ruoyi/require/controller/FeCalibrationScheduleController.java
cnas-require/src/main/java/com/ruoyi/require/controller/FeIlluminationController.java
cnas-require/src/main/java/com/ruoyi/require/controller/FeLightningProtectionController.java
cnas-require/src/main/java/com/ruoyi/require/controller/FePowerStableController.java
cnas-require/src/main/java/com/ruoyi/require/controller/FeStandardSubstanceAcceptanceController.java
cnas-require/src/main/java/com/ruoyi/require/controller/FeStandardSubstanceController.java
cnas-require/src/main/java/com/ruoyi/require/controller/FeStandardSubstanceRecordController.java
cnas-require/src/main/java/com/ruoyi/require/controller/FeTempHumDateController.java
cnas-require/src/main/java/com/ruoyi/require/controller/ForeignRegisterController.java
cnas-require/src/main/java/com/ruoyi/require/controller/InternalWastesController.java
cnas-require/src/main/java/com/ruoyi/require/controller/ProcurementSuppliesContentsController.java
cnas-require/src/main/java/com/ruoyi/require/controller/ProcurementSuppliesExpendsController.java
cnas-require/src/main/java/com/ruoyi/require/controller/ProcurementSuppliesListController.java
cnas-require/src/main/java/com/ruoyi/require/controller/ProcurementSuppliesStoreController.java
cnas-require/src/main/java/com/ruoyi/require/controller/SupplierManagementController.java
cnas-require/src/main/java/com/ruoyi/require/controller/SuppliersDirectoryContentsController.java
cnas-require/src/main/java/com/ruoyi/require/dto/AcceptanceDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/FeIlluminationAddDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/FeIlluminationDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/FeIlluminationExportDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/FePowerStableAddDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/FePowerStableDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/FePowerStableExportDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/FeTempHumDateDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/FeTempHumRecordDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/ForeignRegisterDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/InternalWastesDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/ProcurementSuppliesExpendDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/ProcurementSuppliesListDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/StoreDto.java
cnas-require/src/main/java/com/ruoyi/require/dto/SupplierManagementDto.java
cnas-require/src/main/java/com/ruoyi/require/excel/FeCalibrationScheduleExport.java
cnas-require/src/main/java/com/ruoyi/require/excel/FeLightningProtectionExcel.java
cnas-require/src/main/java/com/ruoyi/require/excel/FeStandardSubstanceExcel.java
cnas-require/src/main/java/com/ruoyi/require/excel/StoreExcel.java
cnas-require/src/main/java/com/ruoyi/require/mapper/CollectLaboratoryMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/CollectTemperatureHumidityMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/FeCalibrationScheduleMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/FeIlluminationDetectionAreaMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/FeIlluminationMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/FeLightningProtectionMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/FeMeasuredQuantityMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/FePowerStableMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/FeStandardSubstanceAcceptanceInspectionMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/FeStandardSubstanceAcceptanceMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/FeStandardSubstanceMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/FeStandardSubstanceRecordMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/FeTempHumDateMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/FeTempHumRecordMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/ForeignRegisterMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/InternalWastesDetailMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/InternalWastesMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/ProcurementSuppliesConsumablesMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/ProcurementSuppliesContentsMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/ProcurementSuppliesExpendsMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/ProcurementSuppliesListMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/ProcurementSuppliesStoreMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/SupplierManagementMapper.java
cnas-require/src/main/java/com/ruoyi/require/mapper/SuppliersDirectoryContentsMapper.java
cnas-require/src/main/java/com/ruoyi/require/pojo/CollectLaboratory.java
cnas-require/src/main/java/com/ruoyi/require/pojo/CollectTemperatureHumidity.java
cnas-require/src/main/java/com/ruoyi/require/pojo/FeCalibrationSchedule.java
cnas-require/src/main/java/com/ruoyi/require/pojo/FeIllumination.java
cnas-require/src/main/java/com/ruoyi/require/pojo/FeIlluminationDetectionArea.java
cnas-require/src/main/java/com/ruoyi/require/pojo/FeLightningProtection.java
cnas-require/src/main/java/com/ruoyi/require/pojo/FeMeasuredQuantity.java
cnas-require/src/main/java/com/ruoyi/require/pojo/FePowerStable.java
cnas-require/src/main/java/com/ruoyi/require/pojo/FeStandardSubstance.java
cnas-require/src/main/java/com/ruoyi/require/pojo/FeStandardSubstanceAcceptance.java
cnas-require/src/main/java/com/ruoyi/require/pojo/FeStandardSubstanceAcceptanceInspection.java
cnas-require/src/main/java/com/ruoyi/require/pojo/FeStandardSubstanceRecord.java
cnas-require/src/main/java/com/ruoyi/require/pojo/FeTempHumDate.java
cnas-require/src/main/java/com/ruoyi/require/pojo/FeTempHumRecord.java
cnas-require/src/main/java/com/ruoyi/require/pojo/ForeignRegister.java
cnas-require/src/main/java/com/ruoyi/require/pojo/InternalWastes.java
cnas-require/src/main/java/com/ruoyi/require/pojo/InternalWastesDetail.java
cnas-require/src/main/java/com/ruoyi/require/pojo/ProcurementSuppliesConsumables.java
cnas-require/src/main/java/com/ruoyi/require/pojo/ProcurementSuppliesContents.java
cnas-require/src/main/java/com/ruoyi/require/pojo/ProcurementSuppliesExpends.java
cnas-require/src/main/java/com/ruoyi/require/pojo/ProcurementSuppliesList.java
cnas-require/src/main/java/com/ruoyi/require/pojo/ProcurementSuppliesStore.java
cnas-require/src/main/java/com/ruoyi/require/pojo/SupplierManagement.java
cnas-require/src/main/java/com/ruoyi/require/pojo/SuppliersDirectoryContents.java
cnas-require/src/main/java/com/ruoyi/require/service/FeCalibrationScheduleService.java
cnas-require/src/main/java/com/ruoyi/require/service/FeIlluminationDetectionAreaService.java
cnas-require/src/main/java/com/ruoyi/require/service/FeIlluminationService.java
cnas-require/src/main/java/com/ruoyi/require/service/FeLightningProtectionService.java
cnas-require/src/main/java/com/ruoyi/require/service/FeMeasuredQuantityService.java
cnas-require/src/main/java/com/ruoyi/require/service/FePowerStableService.java
cnas-require/src/main/java/com/ruoyi/require/service/FeStandardSubstanceAcceptanceInspectionService.java
cnas-require/src/main/java/com/ruoyi/require/service/FeStandardSubstanceAcceptanceService.java
cnas-require/src/main/java/com/ruoyi/require/service/FeStandardSubstanceRecordService.java
cnas-require/src/main/java/com/ruoyi/require/service/FeStandardSubstanceService.java
cnas-require/src/main/java/com/ruoyi/require/service/FeTempHumDateService.java
cnas-require/src/main/java/com/ruoyi/require/service/FeTempHumRecordService.java
cnas-require/src/main/java/com/ruoyi/require/service/ForeignRegisterService.java
cnas-require/src/main/java/com/ruoyi/require/service/InternalWastesDetailService.java
cnas-require/src/main/java/com/ruoyi/require/service/InternalWastesService.java
cnas-require/src/main/java/com/ruoyi/require/service/ProcurementSuppliesConsumablesService.java
cnas-require/src/main/java/com/ruoyi/require/service/ProcurementSuppliesContentsService.java
cnas-require/src/main/java/com/ruoyi/require/service/ProcurementSuppliesExpendsService.java
cnas-require/src/main/java/com/ruoyi/require/service/ProcurementSuppliesListService.java
cnas-require/src/main/java/com/ruoyi/require/service/ProcurementSuppliesStoreService.java
cnas-require/src/main/java/com/ruoyi/require/service/SupplierManagementService.java
cnas-require/src/main/java/com/ruoyi/require/service/SuppliersDirectoryContentsService.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/FeCalibrationScheduleServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/FeIlluminationDetectionAreaServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/FeIlluminationServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/FeLightningProtectionServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/FeMeasuredQuantityServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/FePowerStableServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/FeStandardSubstanceAcceptanceInspectionServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/FeStandardSubstanceAcceptanceServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/FeStandardSubstanceRecordServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/FeStandardSubstanceServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/FeTempHumDateServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/FeTempHumRecordServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/ForeignRegisterServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/InternalWastesDetailServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/InternalWastesServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/ProcurementSuppliesConsumablesServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/ProcurementSuppliesContentsServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/ProcurementSuppliesExpendsServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/ProcurementSuppliesListServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/ProcurementSuppliesStoreServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/SupplierManagementServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/SuppliersDirectoryContentsServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/task/FeTempHumDateSchedule.java
cnas-require/src/main/java/com/ruoyi/require/vo/AcceptanceDetailsVo.java
cnas-require/src/main/java/com/ruoyi/require/vo/AcceptanceVo.java
cnas-require/src/main/java/com/ruoyi/require/vo/SubstanceRecordVo.java
cnas-require/src/main/resources/mapper/FeIlluminationMapper.xml
cnas-require/src/main/resources/mapper/FeLightningProtectionMapper.xml
cnas-require/src/main/resources/mapper/FePowerStableMapper.xml
cnas-require/src/main/resources/mapper/FeStandardSubstanceAcceptanceMapper.xml
cnas-require/src/main/resources/mapper/FeStandardSubstanceMapper.xml
cnas-require/src/main/resources/mapper/FeStandardSubstanceRecordMapper.xml
cnas-require/src/main/resources/mapper/FeTempHumDateMapper.xml
cnas-require/src/main/resources/mapper/FeTempHumRecordMapper.xml
cnas-require/src/main/resources/mapper/ForeignRegisterMapper.xml
cnas-require/src/main/resources/mapper/InternalWastesMapper.xml
cnas-require/src/main/resources/mapper/ProcurementSuppliesListMapper.xml
cnas-require/src/main/resources/mapper/ProcurementSuppliesStoreMapper.xml
cnas-require/src/main/resources/mapper/SupplierManagementMapper.xml
cnas-require/src/main/resources/static/foreign-register.docx
cnas-require/src/main/resources/static/illumination.docx
cnas-require/src/main/resources/static/internal-wastes.docx
cnas-require/src/main/resources/static/power-stable.docx
cnas-require/src/main/resources/static/temp_hum_date.docx
inspect-server/pom.xml
inspect-server/src/main/java/com/ruoyi/basic/pojo/InsSample.java (已删除)
inspect-server/src/main/java/com/ruoyi/inspect/controller/DataAnalysisController.java
inspect-server/src/main/java/com/ruoyi/inspect/controller/FinishProductSpotCheckController.java
inspect-server/src/main/java/com/ruoyi/inspect/controller/InformationNotificationController.java
inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java
inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderPlanController.java
inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderRatesController.java
inspect-server/src/main/java/com/ruoyi/inspect/controller/InsProductDeviationWarningController.java
inspect-server/src/main/java/com/ruoyi/inspect/controller/InsReportController.java
inspect-server/src/main/java/com/ruoyi/inspect/controller/InsUnqualifiedHandlerController.java
inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java
inspect-server/src/main/java/com/ruoyi/inspect/controller/ReportController.java
inspect-server/src/main/java/com/ruoyi/inspect/controller/WarehouseController.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/CopperInsOrderDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/CostStatisticsDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/DataAnalysisDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/EnterFactoryReport.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/HistoryDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/IfsStockQueryDTO.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/InsOrderDeviceRecordDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/InsOrderPlanDTO.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/InsOrderPlanProductDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/InsOrderUpdateDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/InsPlaceOrderDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/InsProductAnalysisDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/InsProductBindingDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/InsProductDeviationWarningDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/InsReportExport.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/InsulatingDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/OmitOrderProductDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/ProcurementSuppliesListEDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/ProductResultDto2.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/PushOADto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/RawMaterialStandardTreeDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/ReportPageDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleOrderDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleProductDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleProductDto2.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleProductExportDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleProductRawAnalysisDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/SaveInsContextDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/SpotCheckQuarterDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/SpotCheckYearDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/UnqualifiedHandlerDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/WarehouseCellAndSampleDto.java
inspect-server/src/main/java/com/ruoyi/inspect/dto/WarehouseDto.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/CommonOaMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/DataAnalysisMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderDeviceRecordMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderFactoryVerifyItemMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderFactoryVerifyMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderFileMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderRatesMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderStandardTemplateMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderStateMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderTemplateMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductDeviationWarningDetailMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductDeviationWarningMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductResultMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductUserMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsReportMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleUserMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsUnqualifiedHandlerFileMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsUnqualifiedHandlerMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsUnqualifiedRetestProductMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsUnqualifiedRetestResultMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/RawMaterialOrderTemplateMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/SpotCheckQuarterItemMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/SpotCheckQuarterMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/SpotCheckYearItemMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/SpotCheckYearMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/WarehouseCellMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/WarehouseHistoryMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/WarehouseMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/mapper/WarehouseShelfMapper.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/CommonOa.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrder.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderDeviceRecord.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFactoryVerify.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFactoryVerifyItem.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFile.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderRates.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderStandardTemplate.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderState.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderTemplate.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsProduct.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsProductDeviationWarning.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsProductDeviationWarningDetail.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsProductResult.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsProductUser.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsReport.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsSample.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsSampleUser.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedHandler.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedHandlerFile.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedRetestProduct.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedRetestResult.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/RawMaterialOrderTemplate.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckQuarter.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckQuarterItem.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckYear.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckYearItem.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/Warehouse.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/WarehouseCell.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/WarehouseHistory.java
inspect-server/src/main/java/com/ruoyi/inspect/pojo/WarehouseShelf.java
inspect-server/src/main/java/com/ruoyi/inspect/service/CommonOaService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/DataAnalysisService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/FinishProductSpotCheckService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderDeviceRecordService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderFactoryVerifyItemService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderFileService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderPlanService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderRatesService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderStandardTemplateService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderStateService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderTemplateService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsProductDeviationWarningDetailService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsProductDeviationWarningService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsProductService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsReportService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsSampleService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsUnqualifiedHandlerFileService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsUnqualifiedHandlerService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/InsUnqualifiedRetestProductService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/RawMaterialOrderService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/RawMaterialOrderTemplateService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/ReportService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/SpotCheckQuarterItemService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/SpotCheckYearItemService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/WarehouseCellService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/WarehouseService.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/CommonOaServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/DataAnalysisServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/FinishProductSpotCheckServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderDeviceRecordServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderFactoryVerifyItemServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderFileServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderRatesServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderStandardTemplateServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderStateServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderTemplateServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsProductDeviationWarningDetailServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsProductDeviationWarningServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsProductServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsSampleServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsUnqualifiedHandlerFileServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsUnqualifiedHandlerServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsUnqualifiedRetestProductServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderTemplateServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/ReportServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/SpotCheckQuarterItemServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/SpotCheckYearItemServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/WarehouseCellServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/WarehouseServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/task/RawMaterIalSchedule.java
inspect-server/src/main/java/com/ruoyi/inspect/util/HackLoopTableRenderPolicy.java
inspect-server/src/main/java/com/ruoyi/inspect/util/UserUtils.java
inspect-server/src/main/java/com/ruoyi/inspect/util/XWPFDocumentUtils.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/DeviationAnalyzeVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanTaskSwitchVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanVO.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPrintingVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/ProductVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/RawMaterialSupplierVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/RawProductAnalysisVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleDefectsChildrenVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleDefectsFatherVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/UnqualifiedHandlerVO.java
inspect-server/src/main/resources/lib/aspose-words-15.12.0-jdk16.jar
inspect-server/src/main/resources/lib/license.xml
inspect-server/src/main/resources/mapper/DataAnalysisMapper.xml
inspect-server/src/main/resources/mapper/InsOrderDeviceRecordMapper.xml
inspect-server/src/main/resources/mapper/InsOrderFileMapper.xml
inspect-server/src/main/resources/mapper/InsOrderMapper.xml
inspect-server/src/main/resources/mapper/InsOrderRatesMapper.xml
inspect-server/src/main/resources/mapper/InsOrderStateMapper.xml
inspect-server/src/main/resources/mapper/InsOrderTemplateMapper.xml
inspect-server/src/main/resources/mapper/InsProductDeviationWarningDetailMapper.xml
inspect-server/src/main/resources/mapper/InsProductDeviationWarningMapper.xml
inspect-server/src/main/resources/mapper/InsProductMapper.xml
inspect-server/src/main/resources/mapper/InsProductResultMapper.xml
inspect-server/src/main/resources/mapper/InsProductUserMapper.xml
inspect-server/src/main/resources/mapper/InsReportMapper.xml
inspect-server/src/main/resources/mapper/InsSampleMapper.xml
inspect-server/src/main/resources/mapper/InsSampleUserMapper.xml
inspect-server/src/main/resources/mapper/InsUnqualifiedHandlerMapper.xml
inspect-server/src/main/resources/mapper/InsUnqualifiedRetestProductMapper.xml
inspect-server/src/main/resources/mapper/RawMaterialOrderTemplateMapper.xml
inspect-server/src/main/resources/mapper/SpotCheckQuarterItemMapper.xml
inspect-server/src/main/resources/mapper/SpotCheckQuarterMapper.xml
inspect-server/src/main/resources/mapper/SpotCheckYearMapper.xml
inspect-server/src/main/resources/mapper/WarehouseCellMapper.xml
inspect-server/src/main/resources/mapper/WarehouseHistoryMapper.xml
inspect-server/src/main/resources/mapper/WarehouseMapper.xml
inspect-server/src/main/resources/static/factory_verify.docx
inspect-server/src/main/resources/static/report-template.docx
inspect-server/src/main/resources/static/small-report-template.docx
inspect-server/src/main/resources/static/spot_check_quarter.docx
inspect-server/src/main/resources/static/spot_check_year.docx
performance-server/pom.xml
performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryCorrectionHoursController.java
performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOriginalHoursController.java
performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOutputWorkingHoursController.java
performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursController.java
performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursDayController.java
performance-server/src/main/java/com/ruoyi/performance/controller/PerformanceShiftController.java
performance-server/src/main/java/com/ruoyi/performance/controller/ShiftTimeController.java
performance-server/src/main/java/com/ruoyi/performance/dto/AuxiliaryAllDto.java
performance-server/src/main/java/com/ruoyi/performance/dto/AuxiliaryOriginalHoursLookDto.java
performance-server/src/main/java/com/ruoyi/performance/dto/AuxiliaryOutputWorkingHoursTemporaryDto.java
performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryCorrectionHoursMapper.java
performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryOutputWorkingHoursMapper.java
performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryOutputWorkingHoursTemporaryMapper.java
performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryWorkingHoursDayMapper.java
performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryWorkingHoursMapper.java
performance-server/src/main/java/com/ruoyi/performance/mapper/PerformanceShiftMapper.java
performance-server/src/main/java/com/ruoyi/performance/pojo/AuxiliaryOutputWorkingHoursTemporary.java
performance-server/src/main/java/com/ruoyi/performance/service/AuxiliaryOutputWorkingHoursTemporaryService.java
performance-server/src/main/java/com/ruoyi/performance/service/impl/AuxiliaryCorrectionHoursServiceImpl.java
performance-server/src/main/java/com/ruoyi/performance/service/impl/AuxiliaryOriginalHoursServiceImpl.java
performance-server/src/main/java/com/ruoyi/performance/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java
performance-server/src/main/java/com/ruoyi/performance/service/impl/AuxiliaryOutputWorkingHoursTemporaryServiceImpl.java
performance-server/src/main/java/com/ruoyi/performance/service/impl/AuxiliaryWorkingHoursDayServiceImpl.java
performance-server/src/main/java/com/ruoyi/performance/service/impl/AuxiliaryWorkingHoursServiceImpl.java
performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursTemporaryMapper.xml
performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml
performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursMapper.xml
performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
pom.xml
ruoyi-admin/pom.xml
ruoyi-admin/src/main/java/com/ruoyi/CodeGenerator.java
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java
ruoyi-admin/src/main/java/com/ruoyi/web/MqttApplicationRunner.java
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/Company.java
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/Person.java
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/PersonDto.java
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/PersonnelHeaderApi.java
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dto/UpdateUserDto.java
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/CompaniesController.java
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/CustomController.java
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/UserController.java
ruoyi-admin/src/main/resources/application-druid.yml
ruoyi-admin/src/main/resources/application-prod.yml
ruoyi-admin/src/main/resources/application-test.yml
ruoyi-admin/src/main/resources/application-ztzb.yml
ruoyi-admin/src/main/resources/application.yml
ruoyi-admin/src/main/resources/banner.txt
ruoyi-admin/src/main/resources/i18n/messages.properties
ruoyi-admin/src/main/resources/logback.xml
ruoyi-common/pom.xml
ruoyi-common/src/main/java/com/ruoyi/common/annotation/PersonalScope.java
ruoyi-common/src/main/java/com/ruoyi/common/config/IfsProperties.java
ruoyi-common/src/main/java/com/ruoyi/common/config/PersonnelProperties.java
ruoyi-common/src/main/java/com/ruoyi/common/config/SsoBean.java
ruoyi-common/src/main/java/com/ruoyi/common/config/WechatProperty.java
ruoyi-common/src/main/java/com/ruoyi/common/constant/DeviceImpowerConstants.java
ruoyi-common/src/main/java/com/ruoyi/common/constant/DictDataConstants.java
ruoyi-common/src/main/java/com/ruoyi/common/constant/InsOrderTypeConstants.java
ruoyi-common/src/main/java/com/ruoyi/common/constant/MenuJumpPathConstants.java
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/Result.java
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/DepartmentDto.java
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/DepartmentLims.java
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/InformationNotification.java
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/InformationNotificationDto.java
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/User.java
ruoyi-common/src/main/java/com/ruoyi/common/handler/MybatisHandler.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/AddWorkflow.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/AddWorkflowResponse.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/ArrayOfOAWorkflowRequestTableField.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/ArrayOfOAWorkflowRequestTableRecord.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/ArrayOfOAWorkflowTable.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/ForwardWorkflowRequest.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/ForwardWorkflowRequestResponse.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/OAProcess.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/OAProperty.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/OAResult.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/OAService.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/OAWorkFlowRequest.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/OAWorkFlowRequestHttpGet.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/OAWorkFlowRequestHttpPost.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/OAWorkFlowRequestSoap.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/OAWorkflowRequestInfo.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/OAWorkflowRequestTableField.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/OAWorkflowRequestTableRecord.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/OAWorkflowTable.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/ObjectFactory.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/UpdateAndSubmitWorkflow.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/UpdateAndSubmitWorkflowResponse.java
ruoyi-common/src/main/java/com/ruoyi/common/oa/package-info.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/ApplicationContextHolder.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/Base64.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/DateImageUtil.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/FileSaveUtil.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/GZipUtil.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/IndustryChainUtils.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/LimsDateUtil.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/Md5Util.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/MyUtil.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/QueryWrappers.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/SignatureImageUtil.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/WxCpUtils.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/api/IfsApiUtils.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java
ruoyi-common/src/main/resources/ttf/signature.ttf
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/PersonalScopeAspect.java
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
ruoyi-framework/src/main/java/com/ruoyi/framework/exception/ErrorException.java
ruoyi-framework/src/main/java/com/ruoyi/framework/exception/MyFileException.java
ruoyi-framework/src/main/java/com/ruoyi/framework/model/SsoOauthTokenModel.java
ruoyi-framework/src/main/java/com/ruoyi/framework/model/SsoUserInfoModel.java
ruoyi-framework/src/main/java/com/ruoyi/framework/security/handle/LogoutSuccessHandlerImpl.java
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/UserDetailsByOpenIdServiceImpl.java
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/UserDetailsServiceImpl.java
ruoyi-framework/src/main/java/com/ruoyi/framework/web/ssoAuth/SsoCodeAuthenticationProvider.java
ruoyi-framework/src/main/java/com/ruoyi/framework/web/ssoAuth/SsoCodeAuthenticationToken.java
ruoyi-generator/pom.xml (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/mapper/GenTableColumnMapper.java (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/mapper/GenTableMapper.java (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableColumnServiceImpl.java (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/service/IGenTableColumnService.java (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/service/IGenTableService.java (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java (已删除)
ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java (已删除)
ruoyi-generator/src/main/resources/generator.yml (已删除)
ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml (已删除)
ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml (已删除)
ruoyi-generator/src/main/resources/vm/java/controller.java.vm (已删除)
ruoyi-generator/src/main/resources/vm/java/domain.java.vm (已删除)
ruoyi-generator/src/main/resources/vm/java/mapper.java.vm (已删除)
ruoyi-generator/src/main/resources/vm/java/service.java.vm (已删除)
ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm (已删除)
ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm (已删除)
ruoyi-generator/src/main/resources/vm/js/api.js.vm (已删除)
ruoyi-generator/src/main/resources/vm/sql/sql.vm (已删除)
ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm (已删除)
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm (已删除)
ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm (已删除)
ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm (已删除)
ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm (已删除)
ruoyi-quartz/pom.xml (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobLogController.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJobLog.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobLogMapper.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobMapper.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobLogService.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobService.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobLogServiceImpl.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobServiceImpl.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/AbstractQuartzJob.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/CronUtils.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/QuartzDisallowConcurrentExecution.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/QuartzJobExecution.java (已删除)
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java (已删除)
ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml (已删除)
ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml (已删除)
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleMenu.java
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysRoleVo.java
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/UserVo.java
ruoyi-system/src/main/java/com/ruoyi/system/mapper/DepartmentLimsMapper.java
ruoyi-system/src/main/java/com/ruoyi/system/mapper/InformationNotificationMapper.java
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java
ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserMapper.java
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java
ruoyi-system/src/main/java/com/ruoyi/system/service/InformationNotificationService.java
ruoyi-system/src/main/java/com/ruoyi/system/service/UserService.java
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InformationNotificationServiceImpl.java
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserServiceImpl.java
ruoyi-system/src/main/resources/mapper/system/DepartmentLimsMapper.xml
ruoyi-system/src/main/resources/mapper/system/InformationNotificationMapper.xml
ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
ruoyi-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
ruoyi-system/src/main/resources/mapper/system/UserMapper.xml |