From e499c9db45b7037e81ef1de9dc38a9cf92e76f3f Mon Sep 17 00:00:00 2001 From: anthonywj Date: Fri, 14 Apr 2023 14:16:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E5=8D=95=E6=8D=AE=E6=92=A4=E5=9B=9E=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sync/SpsSyncDownloadController.java | 7 ++- .../api/idc/service/impl/IdcServiceImpl.java | 54 +++++++++---------- .../inout/impl/IoOrderServiceImpl.java | 2 +- 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java index 46e7df52..2ac133ff 100644 --- a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java +++ b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java @@ -244,7 +244,6 @@ public class SpsSyncDownloadController { orderEntity.setId(null); purOrderService.insert(orderEntity); if (CollUtil.isNotEmpty(spsSyncBusOrderResponse.getPurOrderDetailEntities())) { - List purOrderDetailEntities = spsSyncBusOrderResponse.getPurOrderDetailEntities(); for (PurOrderDetailEntity purOrderDetailEntity : purOrderDetailEntities) { PurOrderDetailEntity codeTempEntity = new PurOrderDetailEntity(); @@ -278,5 +277,11 @@ public class SpsSyncDownloadController { } + //接收中继服务、UDI管理系统上传单据类型 + + + //接收中继服务、UDI管理系统上传基础信息 + + } diff --git a/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java b/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java index 64cd7231..81a9e73c 100644 --- a/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java +++ b/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java @@ -203,7 +203,7 @@ public class IdcServiceImpl implements IdcService { } } - + private void fetchFailFile(String host) { Map map = new HashMap(); map.put("sql", "select * from idc_file where createTime whereParams = new HashMap(); whereParams.put("sqlWhere", params.get("sqlWhere")); - + String dataWhere = params.get("dataWhere")!=null ? params.get("dataWhere").toString() : ""; Map map = new HashMap(); String where = DBAUtils.convertWhere(column, whereParams, dataWhere); @@ -811,7 +811,7 @@ public class IdcServiceImpl implements IdcService { private boolean analyToDB(String host, String tableName, String uniqueColumn, String filePathColumn, List> list, boolean isUpload) { - + String tName = DBAUtils.tableRealName(tableName); String sql = "replace " + tName + "("; String del = "delete from " + tName + " where "; @@ -1034,27 +1034,27 @@ public class IdcServiceImpl implements IdcService { int total = 0; if (result!=null&&result.isSuccessful()&&MediaType.parse("application/force-download").equals(result.body().contentType())) { try (InputStream inputStream = result.body().byteStream()) { - - - - FileOutputStream outputStream = new FileOutputStream(filePath + filePathSlash + imagePath+fileName); - - byte b[] = new byte[1024]; - - int len = 0; - while ((len = inputStream.read(b)) != -1) { - total += len; - outputStream.write(b, 0, len); - - } - - outputStream.flush(); - outputStream.close(); - if(!(total>0)) { - new File(filePath + filePathSlash + imagePath+fileName).delete(); - executeSql("delete from idc_file where filePath='"+fileName+"'"); - } - + + + + FileOutputStream outputStream = new FileOutputStream(filePath + filePathSlash + imagePath+fileName); + + byte b[] = new byte[1024]; + + int len = 0; + while ((len = inputStream.read(b)) != -1) { + total += len; + outputStream.write(b, 0, len); + + } + + outputStream.flush(); + outputStream.close(); + if(!(total>0)) { + new File(filePath + filePathSlash + imagePath+fileName).delete(); + executeSql("delete from idc_file where filePath='"+fileName+"'"); + } + } catch (Exception e) { @@ -1252,7 +1252,7 @@ public class IdcServiceImpl implements IdcService { } - + private void executeSql(String sql) { try { jdbcTemplate.execute(sql); @@ -1262,5 +1262,5 @@ public class IdcServiceImpl implements IdcService { } } - -} \ No newline at end of file + +} diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java index 939f764b..b78f8d0c 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java @@ -412,7 +412,7 @@ public class IoOrderServiceImpl implements IoOrderService { orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST); - orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_SUCCESS); + orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_REW); orderEntity.setUpdateTime(new Date()); update(orderEntity); return true;