From 43897960c78d4b2eb61c720e6166c37146230aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=BD=A6=E6=B3=BD?= Date: Mon, 27 Mar 2023 18:49:43 +0800 Subject: [PATCH 01/11] =?UTF-8?q?OTA=E7=AE=A1=E7=90=86=E5=B7=A5=E5=85=B7-?= =?UTF-8?q?=E8=BD=A6=E5=9E=8B=E5=8F=8A=E5=8A=9F=E8=83=BD=E5=A4=87=E6=A1=88?= =?UTF-8?q?-=E9=A9=BE=E9=A9=B6=E8=BE=85=E5=8A=A9=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E5=A4=87=E6=A1=88=E5=8F=82=E6=95=B0-?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C=E5=8F=8A=E8=BE=B9=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/recordparameters.vue | 62 ++++++++++++++----- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue index f72635bab..b561b64a0 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue @@ -49,7 +49,7 @@   {{$t('positioningandnavigationsystem')}} - +   {{$t('vehiclesatellitepositioningequipment')}} @@ -69,7 +69,7 @@   {{$t('vehiclecommunicationsystem')}} - +   {{$t('signalingdevices')}} @@ -307,7 +307,7 @@ export default { fillincontent:this.$t('yesisselected'), }, { - key: 'jgldBzwz', + key: 'jgldBzwz', val:'', componentname: this.$t('networksecurityrequirements'), configuration: this.$t('ineffectiveupgrades'), @@ -887,7 +887,7 @@ export default { }) this.dataSourceList=res.result.kzq } - + this.dataSource.forEach(item=>{ for(let key in res.result.bj){ if(item.key==key){ @@ -895,7 +895,7 @@ export default { } } }) - + // res.result.bj.forEach(item=>{ // if(Number(item) !=NaN){ @@ -905,7 +905,7 @@ export default { this.query=res.result.bj } }) - + }, click(value){ this.fileList = value @@ -1060,6 +1060,7 @@ button{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 100%; height: 200px; line-height: 200px; @@ -1068,6 +1069,7 @@ button{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 100%; height: 100px; line-height: 100px; @@ -1076,6 +1078,7 @@ button{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 100%; height: 50px; line-height: 50px; @@ -1084,6 +1087,7 @@ button{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 100%; height: 250px; line-height: 250px; @@ -1092,6 +1096,7 @@ button{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 100%; height: 150px; line-height: 150px; @@ -1099,55 +1104,73 @@ button{ .text-box{ display: inline-block; float: left; - border: #e8e8e8 solid 1px; + /*border: #e8e8e8 solid 1px;*/ width: 100%; height: 400px; - line-height: 400px; + line-height: 20px; } .text-box-two{ display: inline-block; float: left; - border: #e8e8e8 solid 1px; + /*border: #e8e8e8 solid 1px;*/ width: 100%; height: 450px; - line-height: 450px; + line-height: 20px; } .text-text{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 50%; height: 400px; - line-height: 400px; + line-height: 20px; + display: flex; + justify-content: left; + align-items: center; } .text-text-two{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 50%; height: 200px; - line-height: 200px; + padding: 10px; + line-height: 20px; + display: flex; + justify-content: left; + align-items: center; } .text-text-three{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 50%; height: 100px; - line-height: 100px; + line-height: 20px; + display: flex; + justify-content: left; + align-items: center; } .text-text-five{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 50%; height: 50px; line-height: 50px; + display: flex; + justify-content: left; + align-items: center; } .text-box-three{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 100%; height: 250px; line-height: 250px; @@ -1155,7 +1178,7 @@ button{ .text-box-four{ display: inline-block; float: left; - border: #e8e8e8 solid 1px; + /*border: #e8e8e8 solid 1px;*/ width: 100%; height: 600px; line-height: 600px; @@ -1164,6 +1187,7 @@ button{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 50%; height: 600px; line-height: 20px; @@ -1175,14 +1199,20 @@ button{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 50%; height: 150px; - line-height: 150px; + display: flex; + line-height: 20px; + justify-content: left; + align-items: center; + padding: 10px; } .text-box-five{ display: inline-block; float: left; border: #e8e8e8 solid 1px; + border-right: none; width: 100%; height: 100px; line-height: 100px; @@ -1190,7 +1220,7 @@ button{ span{ /* overflow: hidden; /*超出部分隐藏*/ /* text-overflow: ellipsis; 超出部分省略号表示 */ - white-space: wrap; + white-space: normal; /* word-wrap: normal; */ } .item-input{ From 066deceadcb2c0f6cf3c9d1eb72d4f3d88c6b501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=BD=A6=E6=B3=BD?= Date: Mon, 27 Mar 2023 18:52:46 +0800 Subject: [PATCH 02/11] =?UTF-8?q?OTA=E7=AE=A1=E7=90=86=E5=B7=A5=E5=85=B7-?= =?UTF-8?q?=E8=BD=A6=E5=9E=8B=E5=8F=8A=E5=8A=9F=E8=83=BD=E5=A4=87=E6=A1=88?= =?UTF-8?q?-=E9=A9=BE=E9=A9=B6=E8=BE=85=E5=8A=A9=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E5=A4=87=E6=A1=88=E5=8F=82=E6=95=B0-?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C=E5=8F=8A=E8=BE=B9=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/recordparameters.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue index b561b64a0..077f9fd9d 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue @@ -1118,7 +1118,7 @@ button{ line-height: 20px; } .text-text{ - display: inline-block; + /*display: inline-block;*/ float: left; border: #e8e8e8 solid 1px; border-right: none; @@ -1130,7 +1130,7 @@ button{ align-items: center; } .text-text-two{ - display: inline-block; + /*display: inline-block;*/ float: left; border: #e8e8e8 solid 1px; border-right: none; @@ -1143,7 +1143,7 @@ button{ align-items: center; } .text-text-three{ - display: inline-block; + /*display: inline-block;*/ float: left; border: #e8e8e8 solid 1px; border-right: none; @@ -1155,7 +1155,7 @@ button{ align-items: center; } .text-text-five{ - display: inline-block; + /*display: inline-block;*/ float: left; border: #e8e8e8 solid 1px; border-right: none; @@ -1184,7 +1184,7 @@ button{ line-height: 600px; } .four-text-text{ - display: inline-block; + /*display: inline-block;*/ float: left; border: #e8e8e8 solid 1px; border-right: none; @@ -1196,7 +1196,7 @@ button{ align-items: center; } .four-text{ - display: inline-block; + /*display: inline-block;*/ float: left; border: #e8e8e8 solid 1px; border-right: none; From 448b5f73fe4766fdc13a3359f2f9f6f7683d39ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Mon, 27 Mar 2023 23:38:05 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E5=BC=80=E5=8F=91OTA=E5=A4=87=E6=A1=88?= =?UTF-8?q?=E5=B7=A5=E5=85=B7-=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ota/controller/OtaBaCxLsjlController.java | 1 + .../ota/controller/OtaBaCxTxjlController.java | 1 + .../ota/controller/OtaBaSjListController.java | 1 + .../ota/controller/OtaBaSjLsjlController.java | 1 + .../service/impl/OtaBaCxAqcsServiceImpl.java | 2 +- .../modules/ota/utils/ComparisonUtil.java | 24 +++++++++++-------- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxLsjlController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxLsjlController.java index 3ea1ea7aa..15c0c3e2a 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxLsjlController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxLsjlController.java @@ -53,6 +53,7 @@ public class OtaBaCxLsjlController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxLsjl, req.getParameterMap()); + queryWrapper.orderByDesc("create_time"); Page page = new Page(pageNo, pageSize); IPage pageList = otaBaCxLsjlService.page(page, queryWrapper); return Result.OK(pageList); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxTxjlController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxTxjlController.java index 39a914252..0f395f100 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxTxjlController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxTxjlController.java @@ -53,6 +53,7 @@ public class OtaBaCxTxjlController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxTxjl, req.getParameterMap()); + queryWrapper.orderByDesc("create_time"); Page page = new Page(pageNo, pageSize); IPage pageList = otaBaCxTxjlService.page(page, queryWrapper); return Result.OK(pageList); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java index b46297dca..c35f95389 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java @@ -54,6 +54,7 @@ public class OtaBaSjListController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjList, req.getParameterMap()); + queryWrapper.orderByDesc("create_time"); Page page = new Page(pageNo, pageSize); IPage pageList = otaBaSjListService.page(page, queryWrapper); return Result.OK(pageList); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjLsjlController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjLsjlController.java index a4f8a0dbc..e8d5cf35b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjLsjlController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjLsjlController.java @@ -53,6 +53,7 @@ public class OtaBaSjLsjlController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjLsjl, req.getParameterMap()); + queryWrapper.orderByDesc("create_time"); Page page = new Page(pageNo, pageSize); IPage pageList = otaBaSjLsjlService.page(page, queryWrapper); return Result.OK(pageList); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java index 832a0a33a..d77a727dd 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java @@ -86,7 +86,7 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl reList = cu.comparisonRecord(otaBaCxAqcsOld.getOtaId(), OtaModuleEnum.CX_AQCS, otaBaCxAqcsOld, otaBaCxAqcs, sysDictService); + List reList = cu.comparisonRecord(otaBaCxAqcs.getOtaId(), OtaModuleEnum.CX_AQCS, otaBaCxAqcsOld, otaBaCxAqcs, sysDictService); otaBaCxTxjlService.saveBatch(reList); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java index b2c244750..f50ccfbed 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java @@ -70,7 +70,7 @@ public class ComparisonUtil { Object newVal = field.get(newObj); String newStr = ""; if (ObjectUtils.isNotEmpty(newVal) && !field.getName().equals(tableField.getName())) { - newStr = newVal.toString(); + newStr = parseDictText(ote, field, newObj, sysDictService); content = tableField.get(newObj).toString() + "-" + title + "由'空'改为'" + newStr + "'"; resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content)); } @@ -86,6 +86,7 @@ public class ComparisonUtil { } } for (T oldObj : oldList) { + boolean flag = true; if (ObjectUtils.isNotEmpty(oldObj)) { Field idField = oldObj.getClass().getDeclaredField("id"); idField.setAccessible(true); @@ -94,19 +95,22 @@ public class ComparisonUtil { if (ObjectUtils.isNotEmpty(newObj)) { Object newId = idField.get(newObj); if (ObjectUtils.isNotEmpty(newId) && oldId.equals(newId.toString())) { + flag = false; break; } } } - Field tableTitleField = oldObj.getClass().getDeclaredField(tableTitle); - tableTitleField.setAccessible(true); - Object tableTitleObj = tableTitleField.get(oldObj); - String tableTitleObjStr = "空"; - if (ObjectUtils.isNotEmpty(tableTitleObj)) { - tableTitleObjStr = tableTitleObj.toString(); + if (flag) { + Field tableTitleField = oldObj.getClass().getDeclaredField(tableTitle); + tableTitleField.setAccessible(true); + Object tableTitleObj = tableTitleField.get(oldObj); + String tableTitleObjStr = "空"; + if (ObjectUtils.isNotEmpty(tableTitleObj)) { + tableTitleObjStr = tableTitleObj.toString(); + } + String content = "删除了'" + tableTitleObjStr + "'"; + resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content)); } - String content = "删除了'" + tableTitleObjStr + "'"; - resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content)); } } } catch (IllegalAccessException | NoSuchFieldException e) { @@ -136,7 +140,7 @@ public class ComparisonUtil { Object newVal = field.get(newClazz); String newTitleStr = "空"; if (ObjectUtils.isNotEmpty(newVal)) { - Field tableField = newVal.getClass().getDeclaredField(tableTitle); + Field tableField = newClazz.getClass().getDeclaredField(tableTitle); tableField.setAccessible(true); Object newTitleVal = tableField.get(newVal); if (ObjectUtils.isNotEmpty(newTitleVal)) { From f23fb9e9dbbd1c259d5362c53db495b045f16a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Mon, 27 Mar 2023 23:48:13 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E5=BC=80=E5=8F=91OTA=E5=A4=87=E6=A1=88?= =?UTF-8?q?=E5=B7=A5=E5=85=B7-=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ota/controller/OtaBaCxLsjlController.java | 279 +++++++++--------- .../service/impl/OtaBaCxLsjlServiceImpl.java | 1 + 2 files changed, 141 insertions(+), 139 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxLsjlController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxLsjlController.java index 15c0c3e2a..f68ee5540 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxLsjlController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxLsjlController.java @@ -4,6 +4,7 @@ import java.util.Arrays; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + import com.jero.common.api.vo.Result; import com.jero.common.system.query.QueryGenerator; import com.jero.modules.ota.entity.OtaBaCxLsjl; @@ -22,164 +23,164 @@ import io.swagger.annotations.ApiOperation; import com.jero.common.aspect.annotation.AutoLog; - /** +/** * @Description: 车型备案-历史记录 * @Author: jero-boot - * @Date: 2023-03-17 + * @Date: 2023-03-17 * @Version: V1.0 */ -@Api(tags="车型备案-历史记录") +@Api(tags = "车型备案-历史记录") @RestController @RequestMapping("/ota/otaBaCxLsjl") @Slf4j public class OtaBaCxLsjlController extends JeroController { - @Autowired - private IOtaBaCxLsjlService otaBaCxLsjlService; - - /** - * 分页列表查询 - * - * @param otaBaCxLsjl - * @param pageNo - * @param pageSize - * @param req - * @return - */ - @AutoLog(value = "车型备案-历史记录-分页列表查询") - @ApiOperation(value="车型备案-历史记录-分页列表查询", notes="车型备案-历史记录-分页列表查询") - @GetMapping(value = "/page") - public Result queryPageList(OtaBaCxLsjl otaBaCxLsjl, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxLsjl, req.getParameterMap()); - queryWrapper.orderByDesc("create_time"); - Page page = new Page(pageNo, pageSize); - IPage pageList = otaBaCxLsjlService.page(page, queryWrapper); - return Result.OK(pageList); - } + @Autowired + private IOtaBaCxLsjlService otaBaCxLsjlService; /** - * 列表查询 - * - * @return - */ - @AutoLog(value = "车型备案-历史记录-列表查询") - @ApiOperation(value="车型备案-历史记录-列表查询", notes="车型备案-历史记录-列表查询") - @GetMapping(value = "/list") - public Result> queryList() { - List list = otaBaCxLsjlService.queryList(); + * 分页列表查询 + * + * @param otaBaCxLsjl + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "车型备案-历史记录-分页列表查询") + @ApiOperation(value = "车型备案-历史记录-分页列表查询", notes = "车型备案-历史记录-分页列表查询") + @GetMapping(value = "/page") + public Result queryPageList(OtaBaCxLsjl otaBaCxLsjl, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxLsjl, req.getParameterMap()); + queryWrapper.orderByDesc("create_time"); + Page page = new Page(pageNo, pageSize); + IPage pageList = otaBaCxLsjlService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "车型备案-历史记录-列表查询") + @ApiOperation(value = "车型备案-历史记录-列表查询", notes = "车型备案-历史记录-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { + List list = otaBaCxLsjlService.list(); return Result.OK(list); - } - - /** - * 添加 - * - * @param otaBaCxLsjl - * @return - */ - @AutoLog(value = "车型备案-历史记录-添加") - @ApiOperation(value="车型备案-历史记录-添加", notes="车型备案-历史记录-添加") - @PostMapping(value = "/add") - public Result add(@Validated @RequestBody OtaBaCxLsjl otaBaCxLsjl) { - otaBaCxLsjlService.add(otaBaCxLsjl); - return Result.OK("添加成功!"); - } - - /** - * 编辑 - * - * @param otaBaCxLsjl - * @return - */ - @AutoLog(value = "车型备案-历史记录-编辑") - @ApiOperation(value="车型备案-历史记录-编辑", notes="车型备案-历史记录-编辑") - @PutMapping(value = "/edit") - public Result edit(@Validated @RequestBody OtaBaCxLsjl otaBaCxLsjl) { - otaBaCxLsjlService.editById(otaBaCxLsjl); - return Result.OK("编辑成功!"); - } - - /** - * 通过id删除 - * - * @param id - * @return - */ - @AutoLog(value = "车型备案-历史记录-通过id删除") - @ApiOperation(value="车型备案-历史记录-通过id删除", notes="车型备案-历史记录-通过id删除") - @DeleteMapping(value = "/delete") - public Result delete(@RequestParam(name="id",required=true) String id) { - otaBaCxLsjlService.deleteById(id); - return Result.OK("删除成功!"); - } - - /** - * 批量删除 - * - * @param ids - * @return - */ - @AutoLog(value = "车型备案-历史记录-批量删除") - @ApiOperation(value="车型备案-历史记录-批量删除", notes="车型备案-历史记录-批量删除") - @DeleteMapping(value = "/deleteBatch") - public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { - this.otaBaCxLsjlService.deleteByIds(Arrays.asList(ids.split(","))); - return Result.OK("批量删除成功!"); - } - - /** - * 通过id查询 - * - * @param id - * @return - */ - @AutoLog(value = "车型备案-历史记录-通过id查询") - @ApiOperation(value="车型备案-历史记录-通过id查询", notes="车型备案-历史记录-通过id查询") - @GetMapping(value = "/queryById") - public Result queryById(@RequestParam(name="id",required=true) String id) { - OtaBaCxLsjl otaBaCxLsjl = otaBaCxLsjlService.queryById(id); - if(otaBaCxLsjl==null) { - return Result.error("未找到对应数据"); - } - return Result.OK(otaBaCxLsjl); - } - - /** - * 通过otaId查询 - * - * @param otaId - * @return - */ - @AutoLog(value = "车型备案-历史记录-通过otaId查询") - @ApiOperation(value="车型备案-历史记录-通过otaId查询", notes="车型备案-历史记录-通过otaId查询") - @GetMapping(value = "/queryByOtaId") - public Result queryByOtaId(@RequestParam(name="otaId",required=true) String otaId) { - List otaBaCxLsjlList = otaBaCxLsjlService.queryByOtaId(otaId); - if(otaBaCxLsjlList==null) { - return Result.error("未找到对应数据"); - } - return Result.OK(otaBaCxLsjlList); - } + } /** - * 导出excel - * - * @param request - * @param otaBaCxLsjl - */ + * 添加 + * + * @param otaBaCxLsjl + * @return + */ + @AutoLog(value = "车型备案-历史记录-添加") + @ApiOperation(value = "车型备案-历史记录-添加", notes = "车型备案-历史记录-添加") + @PostMapping(value = "/add") + public Result add(@Validated @RequestBody OtaBaCxLsjl otaBaCxLsjl) { + otaBaCxLsjlService.add(otaBaCxLsjl); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param otaBaCxLsjl + * @return + */ + @AutoLog(value = "车型备案-历史记录-编辑") + @ApiOperation(value = "车型备案-历史记录-编辑", notes = "车型备案-历史记录-编辑") + @PutMapping(value = "/edit") + public Result edit(@Validated @RequestBody OtaBaCxLsjl otaBaCxLsjl) { + otaBaCxLsjlService.editById(otaBaCxLsjl); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "车型备案-历史记录-通过id删除") + @ApiOperation(value = "车型备案-历史记录-通过id删除", notes = "车型备案-历史记录-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name = "id", required = true) String id) { + otaBaCxLsjlService.deleteById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "车型备案-历史记录-批量删除") + @ApiOperation(value = "车型备案-历史记录-批量删除", notes = "车型备案-历史记录-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { + this.otaBaCxLsjlService.deleteByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "车型备案-历史记录-通过id查询") + @ApiOperation(value = "车型备案-历史记录-通过id查询", notes = "车型备案-历史记录-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + OtaBaCxLsjl otaBaCxLsjl = otaBaCxLsjlService.queryById(id); + if (otaBaCxLsjl == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(otaBaCxLsjl); + } + + /** + * 通过otaId查询 + * + * @param otaId + * @return + */ + @AutoLog(value = "车型备案-历史记录-通过otaId查询") + @ApiOperation(value = "车型备案-历史记录-通过otaId查询", notes = "车型备案-历史记录-通过otaId查询") + @GetMapping(value = "/queryByOtaId") + public Result queryByOtaId(@RequestParam(name = "otaId", required = true) String otaId) { + List otaBaCxLsjlList = otaBaCxLsjlService.queryByOtaId(otaId); + if (otaBaCxLsjlList == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(otaBaCxLsjlList); + } + + /** + * 导出excel + * + * @param request + * @param otaBaCxLsjl + */ @RequestMapping(value = "/exportXls") public ModelAndView exportXls(HttpServletRequest request, OtaBaCxLsjl otaBaCxLsjl) { return super.exportXls(request, otaBaCxLsjl, OtaBaCxLsjl.class, "车型备案-历史记录"); } /** - * 通过excel导入数据 - * - * @param request - * @param response - * @return - */ + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ @RequestMapping(value = "/importExcel", method = RequestMethod.POST) public Result importExcel(HttpServletRequest request, HttpServletResponse response) { return super.importExcel(request, response, OtaBaCxLsjl.class); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxLsjlServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxLsjlServiceImpl.java index 66a7184ed..41b20f07e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxLsjlServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxLsjlServiceImpl.java @@ -93,6 +93,7 @@ public class OtaBaCxLsjlServiceImpl extends ServiceImpl queryByOtaId(String otaId) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(OtaBaCxLsjl::getOtaId, otaId); + queryWrapper.orderByDesc(OtaBaCxLsjl::getCreateTime); List res = this.list(queryWrapper); return res; } From 3ec7893edac48c072ebcdcfbfba12bb3abb939cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Tue, 28 Mar 2023 00:13:46 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E5=BC=80=E5=8F=91OTA=E5=A4=87=E6=A1=88?= =?UTF-8?q?=E5=B7=A5=E5=85=B7-=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/OtaBaCxJsfzbacsServiceImpl.java | 38 +++++++-------- .../impl/OtaBaCxKsjxtmccsServiceImpl.java | 2 + .../modules/ota/utils/ImportFileUtil.java | 47 ++++++++++++------- 3 files changed, 51 insertions(+), 36 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJsfzbacsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJsfzbacsServiceImpl.java index fc68cc6da..3ff4f6d07 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJsfzbacsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJsfzbacsServiceImpl.java @@ -326,7 +326,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl uploadFiles1(File attFile, String[] strs, IOSSFileService ossFileService) throws Exception { List res = new ArrayList<>(); for (int i = 0; i < strs.length; i++) { - File file = ImportFileUtil.findFile(attFile, strs[i]); - if (null == file) { - throw new JeroBootException("找不到文件:" + strs[i]); - } - OSSFile ossFile = ossFileService.uploadLocalOfCos(ImportFileUtil.createMfileByFile(file), "", null, null); - if (ObjectUtils.isNotEmpty(ossFile)) { - res.add(ossFile); + if (StringUtils.isNotEmpty(strs[i])) { + File file = ImportFileUtil.findFile(attFile, strs[i]); + if (null == file) { + throw new JeroBootException("找不到文件:" + strs[i]); + } + OSSFile ossFile = ossFileService.uploadLocalOfCos(ImportFileUtil.createMfileByFile(file), "", null, null); + if (ObjectUtils.isNotEmpty(ossFile)) { + res.add(ossFile); + } } } return res; @@ -224,16 +235,18 @@ public class ImportFileUtil { public static String uploadFiles(File attFile, String[] strs, IOSSFileService ossFileService) throws Exception { String res = ""; for (int i = 0; i < strs.length; i++) { - File file = ImportFileUtil.findFile(attFile, strs[i]); - if (null == file) { - throw new JeroBootException("找不到文件:" + strs[i]); - } - OSSFile ossFile = ossFileService.uploadLocalOfCos(ImportFileUtil.createMfileByFile(file), "", null, null); - if (ObjectUtils.isNotEmpty(ossFile)) { - if (i >= strs.length - 1) { - res += ossFile.getId(); - } else { - res += ossFile.getId() + ","; + if (StringUtils.isNotEmpty(strs[i])) { + File file = ImportFileUtil.findFile(attFile, strs[i]); + if (null == file) { + throw new JeroBootException("找不到文件:" + strs[i]); + } + OSSFile ossFile = ossFileService.uploadLocalOfCos(ImportFileUtil.createMfileByFile(file), "", null, null); + if (ObjectUtils.isNotEmpty(ossFile)) { + if (i >= strs.length - 1) { + res += ossFile.getId(); + } else { + res += ossFile.getId() + ","; + } } } } From 899a50fd284fcbd55ef38c98f9118b23d9f977c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Tue, 28 Mar 2023 00:45:56 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E5=BC=80=E5=8F=91OTA=E5=A4=87=E6=A1=88?= =?UTF-8?q?=E5=B7=A5=E5=85=B7-=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/OtaBaCxKsjjsmccsServiceImpl.java | 13 ++++++++++--- .../service/impl/OtaBaCxKsjxtmccsServiceImpl.java | 6 +++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java index bf494f628..68e221205 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.jero.common.exception.JeroBootException; +import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.ota.entity.*; import com.jero.modules.ota.enums.OtaModuleEnum; import com.jero.modules.ota.enums.OtaTitleEnum; @@ -60,6 +61,9 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl oldList = getByOtaId(otaId); - List mccsList = parseFile(upFile, otaId, cut); + List mccsList = parseFile(upFile, attFile, otaId, cut); ComparisonUtil cu = new ComparisonUtil(); List reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KZXSJDJSFZGNMCYCS, OtaTitleEnum.GNMC.getName(), oldList, mccsList, sysDictService); deleteByOtaId(otaId); @@ -238,7 +242,7 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl parseFile(File upFile, String otaId, String cut) throws Exception { + private List parseFile(File upFile, File attFile, String otaId, String cut) throws Exception { Date now = new Date(); List mccsList = new ArrayList<>(); Workbook wb = ImportFileUtil.readExcel(upFile); @@ -253,7 +257,10 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl Date: Tue, 28 Mar 2023 02:46:21 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E5=BC=80=E5=8F=91OTA=E5=A4=87=E6=A1=88?= =?UTF-8?q?=E5=B7=A5=E5=85=B7-=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ota/controller/OtaBaCxListController.java | 6 +- .../ota/service/IOtaBaCxJbxxService.java | 2 + .../ota/service/IOtaBaCxListService.java | 76 ++++---- .../ota/service/IOtaBaCxZxsjyqService.java | 2 + .../service/impl/OtaBaCxJbxxServiceImpl.java | 43 +++++ .../service/impl/OtaBaCxListServiceImpl.java | 45 ++--- .../impl/OtaBaCxZxsjyqServiceImpl.java | 5 + .../modules/ota/utils/ImportFileUtil.java | 165 +++++++++++++++++- 8 files changed, 271 insertions(+), 73 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxListController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxListController.java index 76babb51b..35cba9c8e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxListController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxListController.java @@ -215,7 +215,11 @@ public class OtaBaCxListController extends JeroController { OtaBaCxJbxx importData(MultipartFile file, String otaId, String cut) throws Exception; OtaBaCxJbxx parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + + void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxListService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxListService.java index 1e87985e8..2d6663673 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxListService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxListService.java @@ -11,65 +11,65 @@ import java.util.List; /** * @Description: 车型及功能备案列表 * @Author: jero-boot - * @Date: 2023-03-17 + * @Date: 2023-03-17 * @Version: V1.0 */ public interface IOtaBaCxListService extends IService { - /** - * 保存 - * - * @param otaBaCxList - * @return - */ + /** + * 保存 + * + * @param otaBaCxList + * @return + */ void add(OtaBaCxList otaBaCxList); - /** - * 更新 - * - * @param otaBaCxList - * @return - */ + /** + * 更新 + * + * @param otaBaCxList + * @return + */ void editById(OtaBaCxList otaBaCxList); - /** - * 通过id删除 - * - * @param id - * @return - */ + /** + * 通过id删除 + * + * @param id + * @return + */ void deleteById(String id); - /** - * 批量删除 - * - * @param ids - * @return - */ + /** + * 批量删除 + * + * @param ids + * @return + */ void deleteByIds(List ids); - /** - * 通过id查询 - * - * @param id - * @return - */ + /** + * 通过id查询 + * + * @param id + * @return + */ OtaBaCxList queryById(String id); /** - * 列表查询 - */ + * 列表查询 + */ List queryList(); - /** - * 备案维护 - */ - void batchRecord(String ids, String bazt, String batjsj, String bz, String cut); + /** + * 备案维护 + */ + void batchRecord(String ids, String bazt, String batjsj, String bz, String cut); void exportTemplate(HttpServletResponse response, HttpServletRequest request); void importData(MultipartFile file, String cut) throws Exception; - void exportData(String otaId, HttpServletResponse response, HttpServletRequest request); + void exportData(String otaId, HttpServletResponse response, HttpServletRequest request) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxZxsjyqService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxZxsjyqService.java index e049a150e..1a9db6653 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxZxsjyqService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxZxsjyqService.java @@ -72,4 +72,6 @@ public interface IOtaBaCxZxsjyqService extends IService { OtaBaCxZxsjyq importData(MultipartFile file, String otaId, String cut) throws Exception; OtaBaCxZxsjyq parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + + void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJbxxServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJbxxServiceImpl.java index 28562bfea..282f53525 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJbxxServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJbxxServiceImpl.java @@ -236,5 +236,48 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl importZip(MultipartFile file, String cut, String uploadPath) throws Exception { - List fileList = new ArrayList<>(); + public static File copyZip(MultipartFile file, String cut, String uploadPath) throws Exception { int pos = file.getOriginalFilename().lastIndexOf("."); String str = file.getOriginalFilename().substring(pos + 1).toLowerCase(); String filenameorg = file.getOriginalFilename().substring(0, pos); @@ -77,7 +83,12 @@ public class ImportFileUtil { if (str.equals("zip")) { zipEntryName = FileUnZip.unZipFiles(path + File.separator + file.getOriginalFilename(), path); } - File fileNew = new File(path); + return new File(path); + } + + public static List importZip(MultipartFile file, String cut, String uploadPath) throws Exception { + List fileList = new ArrayList<>(); + File fileNew = ImportFileUtil.copyZip(file, cut, uploadPath); for (File file1 : fileNew.listFiles()) { if (file1.getName().contains(".xls") || file1.getName().contains(".xlsx") || file1.isDirectory() || file1.getName().contains(".docx") || file1.getName().contains(".doc")) { @@ -112,7 +123,6 @@ public class ImportFileUtil { } public static Workbook readExcel(File file) { - Workbook wb = null; if (file == null) { return null; } @@ -121,9 +131,9 @@ public class ImportFileUtil { try { is = new FileInputStream(file); if (".xls".equals(extString)) { - return wb = new HSSFWorkbook(is); + return new HSSFWorkbook(is); } else if (".xlsx".equals(extString)) { - return wb = new XSSFWorkbook(is); + return new XSSFWorkbook(is); } is.close(); } catch (FileNotFoundException e) { @@ -133,7 +143,7 @@ public class ImportFileUtil { } finally { IOUtils.closeQuietly(is); } - return wb; + return null; } public static String getCellValue(Cell cell, Workbook workbook) throws Exception { @@ -202,6 +212,19 @@ public class ImportFileUtil { return null; } + public static File findFile(List file, String fileName) throws Exception { + for (File file1 : file) {// 遍历数组 + // 判断当前的File对象是否为文件夹 + if (!file1.isDirectory()) { + String name = file1.getName(); + if (name.equals(fileName)) { + return file1; + } + } + } + return null; + } + public static MultipartFile createMfileByFile(File file) { MultipartFile mFile = null; try { @@ -253,4 +276,130 @@ public class ImportFileUtil { return res; } + private static final int BUFFER_SIZE = 2 * 1024; + + /** + * 压缩成ZIP 方法1 + * + * @param srcDir 压缩文件夹路径 + * @param out 压缩文件输出流 + * @param KeepDirStructure 是否保留原来的目录结构,true:保留目录结构; + * false:所有文件跑到压缩包根目录下(注意:不保留目录结构可能会出现同名文件,会压缩失败) + * @throws RuntimeException 压缩失败会抛出运行时异常 + */ + public static void toZip(String srcDir, OutputStream out, boolean KeepDirStructure) + throws RuntimeException { + + long start = System.currentTimeMillis(); + ZipOutputStream zos = null; + try { + zos = new ZipOutputStream(out); + File sourceFile = new File(srcDir); + compress(sourceFile, zos, sourceFile.getName(), KeepDirStructure); + long end = System.currentTimeMillis(); + System.out.println("压缩完成,耗时:" + (end - start) + " ms"); + } catch (Exception e) { + throw new RuntimeException("zip error from ZipUtils", e); + } finally { + if (zos != null) { + try { + zos.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + } + + /** + * 压缩成ZIP 方法2 + * + * @param srcFiles 需要压缩的文件列表 + * @param out 压缩文件输出流 + * @throws RuntimeException 压缩失败会抛出运行时异常 + */ + public static void toZip(List srcFiles, OutputStream out) throws RuntimeException { + long start = System.currentTimeMillis(); + ZipOutputStream zos = null; + try { + zos = new ZipOutputStream(out); + for (File srcFile : srcFiles) { + byte[] buf = new byte[BUFFER_SIZE]; + zos.putNextEntry(new ZipEntry(srcFile.getName())); + int len; + FileInputStream in = new FileInputStream(srcFile); + while ((len = in.read(buf)) != -1) { + zos.write(buf, 0, len); + } + zos.closeEntry(); + in.close(); + } + long end = System.currentTimeMillis(); + System.out.println("压缩完成,耗时:" + (end - start) + " ms"); + } catch (Exception e) { + throw new RuntimeException("zip error from ZipUtils", e); + } finally { + if (zos != null) { + try { + zos.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + + /** + * 递归压缩方法 + * + * @param sourceFile 源文件 + * @param zos zip输出流 + * @param name 压缩后的名称 + * @param KeepDirStructure 是否保留原来的目录结构,true:保留目录结构; + * false:所有文件跑到压缩包根目录下(注意:不保留目录结构可能会出现同名文件,会压缩失败) + * @throws Exception + */ + private static void compress(File sourceFile, ZipOutputStream zos, String name, + boolean KeepDirStructure) throws Exception { + byte[] buf = new byte[BUFFER_SIZE]; + if (sourceFile.isFile()) { + // 向zip输出流中添加一个zip实体,构造器中name为zip实体的文件的名字 + zos.putNextEntry(new ZipEntry(name)); + // copy文件到zip输出流中 + int len; + FileInputStream in = new FileInputStream(sourceFile); + while ((len = in.read(buf)) != -1) { + zos.write(buf, 0, len); + } + // Complete the entry + zos.closeEntry(); + in.close(); + } else { + File[] listFiles = sourceFile.listFiles(); + if (listFiles == null || listFiles.length == 0) { + // 需要保留原来的文件结构时,需要对空文件夹进行处理 + if (KeepDirStructure) { + // 空文件夹的处理 + zos.putNextEntry(new ZipEntry(name + "/")); + // 没有文件,不需要文件的copy + zos.closeEntry(); + } + + } else { + for (File file : listFiles) { + // 判断是否需要保留原来的文件结构 + if (KeepDirStructure) { + // 注意:file.getName()前面需要带上父文件夹的名字加一斜杠, + // 不然最后压缩包中就不能保留原来的文件结构,即:所有文件都跑到压缩包根目录下了 + compress(file, zos, name + "/" + file.getName(), KeepDirStructure); + } else { + compress(file, zos, file.getName(), KeepDirStructure); + } + + } + } + } + } } + From c68e1cd6def52ce0ff9342fa374a6e64f8f8ee53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Tue, 28 Mar 2023 04:00:24 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E5=BC=80=E5=8F=91OTA=E5=A4=87=E6=A1=88?= =?UTF-8?q?=E5=B7=A5=E5=85=B7-=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ota/service/IOtaBaCxAqcsService.java | 2 + .../ota/service/IOtaBaCxKsjjsmccsService.java | 2 + .../ota/service/IOtaBaCxKsjxtmccsService.java | 2 + .../ota/service/IOtaBaCxZxsjyqService.java | 2 +- .../service/impl/OtaBaCxAqcsServiceImpl.java | 47 ++++++++++ .../impl/OtaBaCxKsjjsmccsServiceImpl.java | 67 +++++++++++++ .../impl/OtaBaCxKsjxtmccsServiceImpl.java | 93 ++++++++++++++++++- .../service/impl/OtaBaCxListServiceImpl.java | 19 +++- .../impl/OtaBaCxZxsjyqServiceImpl.java | 59 +++++++++++- .../modules/ota/utils/ImportFileUtil.java | 47 ++++++++++ 10 files changed, 333 insertions(+), 7 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxAqcsService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxAqcsService.java index 10614ff9d..30fbd0593 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxAqcsService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxAqcsService.java @@ -71,4 +71,6 @@ public interface IOtaBaCxAqcsService extends IService { OtaBaCxAqcs importData(MultipartFile file, String otaId, String cut) throws Exception; OtaBaCxAqcs parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + + void exportData(File file, File attFile, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjjsmccsService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjjsmccsService.java index 414f5cfad..857e3eb74 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjjsmccsService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjjsmccsService.java @@ -71,4 +71,6 @@ public interface IOtaBaCxKsjjsmccsService extends IService { void importData(MultipartFile file, String otaId, String cut) throws Exception; void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + + void exportData(File file, File attFile, String otaId, String cut) throws Exception } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjxtmccsService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjxtmccsService.java index 8fda6c543..3a5133cd0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjxtmccsService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjxtmccsService.java @@ -71,4 +71,6 @@ public interface IOtaBaCxKsjxtmccsService extends IService { void importData(MultipartFile file, String otaId, String cut) throws Exception; void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + + void exportData(File file, File attFile, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxZxsjyqService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxZxsjyqService.java index 1a9db6653..f8e6cb910 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxZxsjyqService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxZxsjyqService.java @@ -73,5 +73,5 @@ public interface IOtaBaCxZxsjyqService extends IService { OtaBaCxZxsjyq parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; - void exportData(File file, String otaId, String cut) throws Exception; + void exportData(File file, File attFile,String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java index d77a727dd..1cdd57027 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java @@ -3,6 +3,7 @@ package com.jero.modules.ota.service.impl; import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.jero.common.exception.JeroBootException; +import com.jero.common.util.oss.CosBootUtil; import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.ota.entity.*; @@ -24,6 +25,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.io.File; +import java.io.InputStream; import java.util.List; import java.util.Date; @@ -233,4 +235,49 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl attList = JSONArray.parseArray(attStr, AttachmentEO.class); + if (ObjectUtils.isNotEmpty(attList)) { + for (AttachmentEO aeo : attList) { + List ossFileList = ossFileService.getFileInfos(aeo.getId()); + for (OSSFile ossFile : ossFileList) { + String filePath = ossFile.getUrl(); + boolean b = CosBootUtil.doesObjectExist(filePath); + if (b) { + InputStream download = CosBootUtil.download(filePath); + ImportFileUtil.writeToLocal(attFile.getCanonicalPath() + "/" + ossFile.getFileName(), download); + sb.append(ossFile.getFileName()).append(","); + } + } + } + } + cell.setCellValue(sb.toString()); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java index 68e221205..9c3d2722e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java @@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.jero.common.exception.JeroBootException; +import com.jero.common.util.oss.CosBootUtil; +import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.ota.entity.*; import com.jero.modules.ota.enums.OtaModuleEnum; @@ -27,6 +29,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.io.File; +import java.io.InputStream; import java.lang.reflect.Field; import java.util.*; @@ -299,4 +302,68 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl mccsList = this.getByOtaId(otaId); + Workbook wb = ImportFileUtil.readExcel(file); + Sheet s = wb.getSheetAt(0); + int startRow = 3; + for (OtaBaCxKsjjsmccs mccs : mccsList) { + Row row = s.getRow(startRow); + Cell cell = row.createCell(0); + cell.setCellValue(mccs.getGnmc()); + cell = row.createCell(1); + cell.setCellValue(ImportFileUtil.getCellValueYesOrNo(mccs.getPzqk())); + cell = row.createCell(2); + cell.setCellValue(ImportFileUtil.getCellValueYesOrNo(mccs.getSfksj())); + cell = row.createCell(3); + cell.setCellValue(mccs.getJszdhjb()); + cell = row.createCell(4); + cell.setCellValue(mccs.getSjggcs()); + cell = row.createCell(5); + cell.setCellValue(mccs.getGnms()); + cell = row.createCell(6); + cell.setCellValue(mccs.getSytj()); + cell = row.createCell(7); + cell.setCellValue(mccs.getKzqmc()); + cell = row.createCell(8); + cell.setCellValue(mccs.getKzqscqy()); + cell = row.createCell(9); + cell.setCellValue(mccs.getKzqxh()); + cell = row.createCell(10); + cell.setCellValue(mccs.getYjbbxx()); + cell = row.createCell(11); + cell.setCellValue(mccs.getRjkfqy()); + cell = row.createCell(12); + cell.setCellValue(mccs.getCzxtbbh()); + cell = row.createCell(13); + cell.setCellValue(mccs.getCsyzsj()); + } + Row row = s.getRow(startRow); + Cell cell = row.createCell(0); + cell.setCellValue("证明材料"); + cell = row.getCell(1); + OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId); + if (ObjectUtils.isNotEmpty(otaBaCxList)) { + StringBuilder sb = new StringBuilder(); + String fj = otaBaCxList.getZxsjjsfj(); + if (StringUtils.isNotEmpty(fj)) { + String[] strs = fj.split(","); + for (String str : strs) { + List ossFileList = ossFileService.getFileInfos(str); + for (OSSFile ossFile : ossFileList) { + String filePath = ossFile.getUrl(); + boolean b = CosBootUtil.doesObjectExist(filePath); + if (b) { + InputStream download = CosBootUtil.download(filePath); + ImportFileUtil.writeToLocal(attFile.getCanonicalPath() + "/" + ossFile.getFileName(), download); + sb.append(ossFile.getFileName()).append(","); + } + } + } + cell.setCellValue(sb.toString()); + } + } + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java index c66e097fc..f4f3d2c04 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.jero.common.exception.JeroBootException; +import com.jero.common.util.oss.CosBootUtil; import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.ota.entity.*; @@ -28,6 +29,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.io.File; +import java.io.InputStream; import java.lang.reflect.Field; import java.util.*; @@ -300,4 +302,93 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl mccsList = this.getByOtaId(otaId); + Workbook wb = ImportFileUtil.readExcel(file); + Sheet s = wb.getSheetAt(0); + + int startRow = 3; + for (OtaBaCxKsjxtmccs mccs : mccsList) { + Row row = s.getRow(startRow); + Cell cell = row.createCell(0); + cell.setCellValue(mccs.getXtlb()); + + cell = row.createCell(1); + cell.setCellValue(ImportFileUtil.getCellValueYesOrNo(mccs.getSfksj())); + + cell = row.createCell(2); + cell.setCellValue(mccs.getSjbgcs()); + cell = row.createCell(3); + StringBuilder sb = new StringBuilder(); + String tptStr = mccs.getTpt(); + if (StringUtils.isNotEmpty(tptStr)) { + String[] strs = tptStr.split(","); + for (String str : strs) { + List ossFileList = ossFileService.getFileInfos(str); + for (OSSFile ossFile : ossFileList) { + String filePath = ossFile.getUrl(); + boolean b = CosBootUtil.doesObjectExist(filePath); + if (b) { + InputStream download = CosBootUtil.download(filePath); + ImportFileUtil.writeToLocal(attFile.getCanonicalPath() + "/" + ossFile.getFileName(), download); + sb.append(ossFile.getFileName()).append(","); + } + } + } + cell.setCellValue(sb.toString()); + } + cell = row.createCell(4); + cell.setCellValue(mccs.getKzqmc()); + cell = row.createCell(5); + cell.setCellValue(mccs.getAqwzxdj()); + cell = row.createCell(6); + cell.setCellValue(mccs.getKzqscqy()); + cell = row.createCell(7); + cell.setCellValue(mccs.getKzqxh()); + cell = row.createCell(8); + cell.setCellValue(mccs.getYjbbxx()); + cell = row.createCell(9); + cell.setCellValue(mccs.getCsrjbbh()); + cell = row.createCell(10); + cell.setCellValue(mccs.getCsrjbwzsj()); + cell = row.createCell(11); + cell.setCellValue(mccs.getSjsfyx()); + cell = row.createCell(12); + cell.setCellValue(mccs.getCzxtlx()); + cell = row.createCell(13); + cell.setCellValue(mccs.getCzxtscqy()); + cell = row.createCell(14); + cell.setCellValue(mccs.getCzxtbbh()); + startRow++; + } + Row row = s.getRow(startRow); + Cell cell = row.createCell(0); + cell.setCellValue("证明材料"); + cell = row.getCell(1); + OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId); + if (ObjectUtils.isNotEmpty(otaBaCxList)) { + StringBuilder sb = new StringBuilder(); + String fj = otaBaCxList.getZxsjxtfj(); + if (StringUtils.isNotEmpty(fj)) { + String[] strs = fj.split(","); + for (String str : strs) { + List ossFileList = ossFileService.getFileInfos(str); + for (OSSFile ossFile : ossFileList) { + String filePath = ossFile.getUrl(); + boolean b = CosBootUtil.doesObjectExist(filePath); + if (b) { + InputStream download = CosBootUtil.download(filePath); + ImportFileUtil.writeToLocal(attFile.getCanonicalPath() + "/" + ossFile.getFileName(), download); + sb.append(ossFile.getFileName()).append(","); + } + } + } + cell.setCellValue(sb.toString()); + } + } + } + +} \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxListServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxListServiceImpl.java index c7c31763c..5c02abaa9 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxListServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxListServiceImpl.java @@ -187,16 +187,27 @@ public class OtaBaCxListServiceImpl extends ServiceImpl attList = JSONArray.parseArray(attStr, AttachmentEO.class); + if (ObjectUtils.isNotEmpty(attList)) { + for (AttachmentEO aeo : attList) { + List ossFileList = ossFileService.getFileInfos(aeo.getId()); + for (OSSFile ossFile : ossFileList) { + String filePath = ossFile.getUrl(); + boolean b = CosBootUtil.doesObjectExist(filePath); + if (b) { + InputStream download = CosBootUtil.download(filePath); + ImportFileUtil.writeToLocal(attFile.getCanonicalPath() + "/" + ossFile.getFileName(), download); + sb.append(ossFile.getFileName()).append(","); + } + } + } + } + cell.setCellValue(sb.toString()); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ImportFileUtil.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ImportFileUtil.java index d5b017a1e..6855a6cec 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ImportFileUtil.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ImportFileUtil.java @@ -179,6 +179,18 @@ public class ImportFileUtil { return res; } + public static String getCellValueYesOrNo(String str) throws Exception { + String res = ""; + if (StringUtils.isNotEmpty(str)) { + if (str.equals("1")) { + res = "是"; + } else if (str.equals("2")) { + res = "否"; + } + } + return res; + } + public static String getCellValueDict(Cell cell, Workbook wb, String dictType, ISysDictService sysDictService, String cut) throws Exception { String res = ""; String str = ImportFileUtil.getCellValue(cell, wb); @@ -212,6 +224,21 @@ public class ImportFileUtil { return null; } + public static File findFoder(File file, String fileName) throws Exception { + // 获取此地址中的所有文件以及文件夹(File[] list) + File[] listFiles = file.listFiles();// 获取此地址中的所有文件以及文件夹(File[] list) + for (File file1 : listFiles) {// 遍历数组 + // 判断当前的File对象是否为文件夹 + if (file1.isDirectory()) { + String name = file1.getName(); + if (name.equals(fileName)) { + return file1; + } + } + } + return null; + } + public static File findFile(List file, String fileName) throws Exception { for (File file1 : file) {// 遍历数组 // 判断当前的File对象是否为文件夹 @@ -401,5 +428,25 @@ public class ImportFileUtil { } } } + + /** + * 将InputStream写入本地文件 + * + * @param input 输入流 + * @throws IOException IOException + */ + public static void writeToLocal(String path, InputStream input) + throws IOException { + int index; + byte[] bytes = new byte[1024]; + FileOutputStream downloadFile = new FileOutputStream(path); + while ((index = input.read(bytes)) != -1) { + downloadFile.write(bytes, 0, index); + downloadFile.flush(); + } + input.close(); + downloadFile.close(); + + } } From b9389860542a09eba7befe12afe896a83e7b4df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Tue, 28 Mar 2023 04:42:48 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E5=BC=80=E5=8F=91OTA=E5=A4=87=E6=A1=88?= =?UTF-8?q?=E5=B7=A5=E5=85=B7-=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ota/service/IOtaBaCxJsfzbacsService.java | 2 + .../ota/service/IOtaBaCxKsjjsmccsService.java | 2 +- .../impl/OtaBaCxJsfzbacsServiceImpl.java | 284 ++++++++++++++++++ .../service/impl/OtaBaCxListServiceImpl.java | 3 + .../modules/ota/utils/ImportFileUtil.java | 14 +- 5 files changed, 303 insertions(+), 2 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxJsfzbacsService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxJsfzbacsService.java index eae2540f8..96b487e1f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxJsfzbacsService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxJsfzbacsService.java @@ -71,4 +71,6 @@ public interface IOtaBaCxJsfzbacsService extends IService { void importData(MultipartFile file, String otaId, String cut) throws Exception; void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + + void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjjsmccsService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjjsmccsService.java index 857e3eb74..b38a10abb 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjjsmccsService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjjsmccsService.java @@ -72,5 +72,5 @@ public interface IOtaBaCxKsjjsmccsService extends IService { void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; - void exportData(File file, File attFile, String otaId, String cut) throws Exception + void exportData(File file, File attFile, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJsfzbacsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJsfzbacsServiceImpl.java index 3ff4f6d07..f1dbcf952 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJsfzbacsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJsfzbacsServiceImpl.java @@ -248,6 +248,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl upLoadFiles, String otaId, String cut) throws Exception { File upFile = null; @@ -577,4 +578,287 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl sjmkList = OtaBaCxSjmkService.queryByOtaId(otaId); + int startRow = 63; + for (OtaBaCxSjmk sjmk : sjmkList) { + row = s.getRow(startRow); + cell = row.createCell(0); + cell.setCellValue(sjmk.getBjmc()); + cell = row.createCell(1); + cell.setCellValue(ImportFileUtil.getCellValueYesOrNo(sjmk.getPzqk())); + cell = row.createCell(2); + cell.setCellValue(sjmk.getKzqmc()); + cell = row.createCell(3); + cell.setCellValue(sjmk.getYjggxh()); + cell = row.createCell(4); + cell.setCellValue(sjmk.getYjscqy()); + cell = row.createCell(5); + cell.setCellValue(sjmk.getRjbb()); + cell = row.createCell(6); + cell.setCellValue(sjmk.getRjkfqy()); + cell = row.createCell(7); + cell.setCellValue(sjmk.getBzwz()); + startRow++; + } + + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxListServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxListServiceImpl.java index 5c02abaa9..130bdb9b5 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxListServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxListServiceImpl.java @@ -209,6 +209,9 @@ public class OtaBaCxListServiceImpl extends ServiceImpl Date: Tue, 28 Mar 2023 08:59:50 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=B8=85=E5=8D=95-?= =?UTF-8?q?=E6=92=A4=E5=9B=9E=E4=B8=8D=E7=AC=A6=E5=90=88=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=9B=E8=A1=8C=E6=8F=90=E7=A4=BA;=20=E6=B3=95?= =?UTF-8?q?=E8=A7=84=E6=B8=85=E5=8D=95-=E6=B3=95=E8=A7=84=E5=B7=A5?= =?UTF-8?q?=E7=A8=8B=E5=B8=88-=E4=B8=8D=E5=A1=AB=E5=86=99=E7=AC=A6?= =?UTF-8?q?=E5=90=88=E6=80=A7=E6=B5=81=E7=A8=8B=E7=9A=84=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 1 + .../components/listEditModel.vue | 172 +++++++++--------- 3 files changed, 88 insertions(+), 86 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index eddd0a7a9..c838f6ab1 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1721,5 +1721,6 @@ module.exports = { cantTransferToYourself:"Can't transfer to yourself", theDataYouInitiate:'The data you selected does not meet the process initiation criteria. Please recheck and initiate', dataWithProcessReleasedCannotBeReset:'Data with a process status of list to be released cannot be reset', + reasonForReturnOfDesignCompliance:'Reason for return of design compliance', noteone:'Note: CSV format is supported. The value is within 20M and the number is 1 to 10', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 456f5bb73..e7f0d6b48 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1824,4 +1824,5 @@ module.exports = { noteone:'注:支持CSV格式,大小20M以内,数量1-10个', theDataYouInitiate:'您所选的数据,均不符合流程发起条件,请重新检查后发起', dataWithProcessReleasedCannotBeReset:'流程状态为清单待发布的数据不能被重置', + reasonForReturnOfDesignCompliance:'设计符合性退回原因', } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/listEditModel.vue b/jero-web/src/views/projectManagement/components/listEditModel.vue index 888cc6781..3367d51f6 100644 --- a/jero-web/src/views/projectManagement/components/listEditModel.vue +++ b/jero-web/src/views/projectManagement/components/listEditModel.vue @@ -782,95 +782,95 @@ - - - +
+ {{$t('listConfirmationRejectionReason')}} +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + +
+
+ {{$t('rejectedBy')}} +
+
+ {{item.createBy ? item.createBy : '--'}} +
+
+
+ +
+
+ {{$t('rejectionTime')}} +
+
+ {{item.rejectTime ? item.rejectTime : '--'}} +
+
+
+
+ + +
+
+ {{$t('rejectReason')}} +
+
+ {{item.rejectCause ? item.rejectCause : '--'}} +
+
+
+
+
- - - +
+ {{$t('taskConfirmationRejectionReason')}} +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + +
+
+ {{$t('rejectedBy')}} +
+
+ {{item.createBy ? item.createBy : '--'}} +
+
+
+ +
+
+ {{$t('rejectionTime')}} +
+
+ {{item.rejectTime ? item.rejectTime : '--'}} +
+
+
+
+ + +
+
+ {{$t('rejectReason')}} +
+
+ {{item.rejectCause ? item.rejectCause : '--'}} +
+
+
+
+
From 89503ec389d5a48e8ace26fc796935a74b5eedcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Tue, 28 Mar 2023 09:11:55 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E8=B0=83=E5=8F=96-=E5=8B=BE=E9=80=89?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E4=B8=AD=E5=B7=B2=E7=BB=8F=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E7=9A=84=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/transferListvirtal.vue | 481 +++++++++--------- 1 file changed, 248 insertions(+), 233 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/transferListvirtal.vue b/jero-web/src/views/projectManagement/components/certificationList/components/transferListvirtal.vue index a23a71c49..e9c82a9db 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/transferListvirtal.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/transferListvirtal.vue @@ -33,8 +33,8 @@ - - + + {{$t('query')}} {{$t('reset')}} @@ -52,18 +52,18 @@ :loading="loading"> - - - - - - - - - - - - + + + + + + + + + + + +
@@ -74,241 +74,256 @@ \ No newline at end of file