diff --git a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java index 966986102..41f4d8432 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java @@ -210,7 +210,7 @@ public class BasicOrderPrintController { data.put("data", list); String param = JSON.toJSONString(data); - JasperUtils.jasperReport(request, response, param, systemPDFTemplateEntity.getPath(), "pdf"); + JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/"+systemPDFTemplateEntity.getPath(), "pdf"); } public String getStatusName(Integer type){ diff --git a/src/main/java/com/glxp/api/service/thrsys/impl/ThrDeptServiceImpl.java b/src/main/java/com/glxp/api/service/thrsys/impl/ThrDeptServiceImpl.java index 14ed4b4ec..07d4e8c7f 100644 --- a/src/main/java/com/glxp/api/service/thrsys/impl/ThrDeptServiceImpl.java +++ b/src/main/java/com/glxp/api/service/thrsys/impl/ThrDeptServiceImpl.java @@ -137,6 +137,7 @@ public class ThrDeptServiceImpl extends ServiceImpl i if (baseResponse.getCode() == 20000) { List responseList = baseResponse.getData().getList(); List list = new ArrayList<>(); + List warehouseList = new ArrayList<>(); for (UdiwmsWarehouseDetail response : responseList) { ThrDeptEntity thrDeptEntity = new ThrDeptEntity(); thrDeptEntity.setPid(0); @@ -148,23 +149,21 @@ public class ThrDeptServiceImpl extends ServiceImpl i thrDeptEntity.setUpdateTime(new Date()); list.add(thrDeptEntity); - List subWarehouseList = response.getSubWarehouses(); - if (CollUtil.isNotEmpty(subWarehouseList)) { - for (UdiwmsWarehouseDetail.SubWarehouse subWarehouse : subWarehouseList) { - ThrInvWarehouseEntity thrInvWarehouseEntity = new ThrInvWarehouseEntity(); - thrInvWarehouseEntity.setCode(subWarehouse.getCode()); - thrInvWarehouseEntity.setName(subWarehouse.getName()); - thrInvWarehouseEntity.setRemark(subWarehouse.getRemark()); - thrInvWarehouseEntity.setThirdSysFk(thirdSysFk); - thrInvWarehouseEntity.setParentId(response.getCode()); - thrInvWarehouseEntity.setId(IdUtil.getSnowflake(6, 1).nextId() + ""); - thrInvWarehouseEntity.setUpdateTime(new Date()); - thrInvWarehouseDao.insertThrInvWarehouse(thrInvWarehouseEntity); - } - } + ThrInvWarehouseEntity thrInvWarehouseEntity = new ThrInvWarehouseEntity(); + thrInvWarehouseEntity.setCode(response.getCode()); + thrInvWarehouseEntity.setName(response.getName()); + thrInvWarehouseEntity.setRemark(response.getRemark()); + thrInvWarehouseEntity.setThirdSysFk(thirdSysFk); + thrInvWarehouseEntity.setParentId(response.getCode()); + thrInvWarehouseEntity.setId(IdUtil.getSnowflake(6, 1).nextId() + ""); + thrInvWarehouseEntity.setUpdateTime(new Date()); + warehouseList.add(thrInvWarehouseEntity); + + } //插入数据 thrDeptDao.insertInvWarehouses(list); + thrInvWarehouseDao.insertThrInvWarehouses(warehouseList); if (list.size() >= limit) { page++; } else {