From 42cd45112b043954eb46c7a134257dff5d71a172 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Mon, 5 Jun 2023 11:53:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E4=BF=A1=E6=81=AF=20=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E5=AF=BC=E5=87=BA=E9=97=AE=E9=A2=98=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=20=E7=BC=96=E8=BE=91=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E4=BF=A1=E6=81=AF=E4=BB=93=E5=BA=93=E4=BC=9A?= =?UTF-8?q?=E8=81=94=E5=8A=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/thrsys/ThrDeptController.java | 21 ++++++++++--------- .../ThrProductsExportLogController.java | 6 ++++++ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrDeptController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrDeptController.java index eae1c787f..6ee22923c 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrDeptController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrDeptController.java @@ -100,16 +100,7 @@ public class ThrDeptController { } String id = Long.toString(thrDeptEntity.getId()); ThrDeptEntity thrDeptEntity1 = thrDeptService.selectById(id); - //查询该部门下的仓库 - filterThrSubInvWarehouseRequest.setParentId(thrDeptEntity1.getCode()); - List thrDept = thrInvWarehouseService.filterThrInvWarehouse(filterThrSubInvWarehouseRequest); - - for (ThrInvWarehouseEntity thrInvWarehouseEntity : thrDept) { - thrInvWarehouseEntity.setParentId(thrDeptEntity.getCode()); - thrInvWarehouseEntity.setThirdSysFk(thrDeptEntity.getThirdSysFk()); - //修改仓库 - thrInvWarehouseService.updateThrInvWarehouse(thrInvWarehouseEntity); - } + //判断部门是否存在 filterThrDeptRequest.setCode(thrDeptEntity.getCode()); filterThrDeptRequest.setName(thrDeptEntity.getName()); @@ -122,6 +113,16 @@ public class ThrDeptController { if (!b) { return ResultVOUtils.error(ResultEnum.NOT_NETWORK); } + //查询该部门下的仓库 + filterThrSubInvWarehouseRequest.setParentId(thrDeptEntity1.getCode()); + List thrDept = thrInvWarehouseService.filterThrInvWarehouse(filterThrSubInvWarehouseRequest); + + for (ThrInvWarehouseEntity thrInvWarehouseEntity : thrDept) { + thrInvWarehouseEntity.setParentId(thrDeptEntity.getCode()); + thrInvWarehouseEntity.setThirdSysFk(thrDeptEntity.getThirdSysFk()); + //修改仓库 + thrInvWarehouseService.updateThrInvWarehouse(thrInvWarehouseEntity); + } return ResultVOUtils.success(); } else { return ResultVOUtils.error(ResultEnum.DATA_REPEAT); diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsExportLogController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsExportLogController.java index 0d7187adb..ae2db63d8 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsExportLogController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsExportLogController.java @@ -5,6 +5,7 @@ import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.constant.BasicProcessStatus; +import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.entity.thrsys.ThrProductsExportLogEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; import com.glxp.api.http.ErpBasicClient; @@ -118,6 +119,11 @@ public class ThrProductsExportLogController { @PostMapping("/udiwms/thrProducts/importLog/export") public BaseResponse excelDownload(@RequestBody ThrProductsExportRequest thrProductsExportRequest) { ThrProductsExportLogEntity thrProductsExportLogEntity = new ThrProductsExportLogEntity(); + FilterThrProductsRequest filterThrProductsRequest = new FilterThrProductsRequest(); + filterThrProductsRequest.setThirdSysFk(thrProductsExportRequest.getThirdSys()); + filterThrProductsRequest.setThirdSys(thrProductsExportRequest.getThirdSys()); + List thrProductsEntities = thrProductsService.filterThrProducts1(filterThrProductsRequest); + thrProductsExportRequest.setThrProductsEntities(thrProductsEntities); thrProductsExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_PROCESS); String genKey = CustomUtil.getId(); String fileName = "D:\\udiwms\\exportFile\\" + "第三方产品信息" + genKey + ".UpperIn";