From 1ab4b30415d552c11d9e3945dae617e08b3c8eff Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Sat, 14 Sep 2024 10:37:47 +0800 Subject: [PATCH 1/9] =?UTF-8?q?[fix]=20=E9=94=80=E5=94=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E4=BF=AE=E8=BF=87=E5=AE=A2=E6=88=B7=E6=8A=A5?= =?UTF-8?q?=E4=BB=B7=E5=AF=BC=E5=87=BA=E6=8E=A5=E5=8F=A3=EF=BC=9A=E6=8A=8A?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=90=8D=E5=AD=97=E5=92=8C=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=9A=E7=94=B1=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B71?= =?UTF-8?q?=E3=80=81=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B72=E3=80=81?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B73=E3=80=81=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E6=8A=A5=E4=BB=B74=20=E6=8C=89=E7=85=A7=E4=B8=87?= =?UTF-8?q?=E6=9D=90=E8=A6=81=E6=B1=82=E6=94=B9=E6=88=90=EF=BC=9AVantritek?= =?UTF-8?q?-RMB=E3=80=81Vantritek-=E7=BE=8E=E5=85=83=E3=80=81Infinity-RMB?= =?UTF-8?q?=E3=80=81Infinity-=E7=BE=8E=E5=85=83=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E9=94=80=E5=94=AE=E5=87=BA=E8=B4=A7=E5=8D=95?= =?UTF-8?q?1=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=E3=80=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AF=BC=E5=87=BA=E9=94=80=E5=94=AE=E5=87=BA=E8=B4=A7?= =?UTF-8?q?=E5=8D=952=E5=90=8E=E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6=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E7=9A=84test=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SysCustomerQuoteServiceImpl.java | 29 ++++++++---------- .../{客户报价3.xlsx => Infinity-RMB.xlsx} | Bin ...户报价4.xlsx => Infinity-美元.xlsx} | Bin ...{客户报价1.xlsx => Vantritek-RMB.xlsx} | Bin ...户报价2.xlsx => Vantritek-美元.xlsx} | Bin .../resources/static/attachments/test.docx | 0 6 files changed, 13 insertions(+), 16 deletions(-) rename ruoyi-admin/src/main/resources/static/attachments/{客户报价3.xlsx => Infinity-RMB.xlsx} (100%) rename ruoyi-admin/src/main/resources/static/attachments/{客户报价4.xlsx => Infinity-美元.xlsx} (100%) rename ruoyi-admin/src/main/resources/static/attachments/{客户报价1.xlsx => Vantritek-RMB.xlsx} (100%) rename ruoyi-admin/src/main/resources/static/attachments/{客户报价2.xlsx => Vantritek-美元.xlsx} (100%) delete mode 100644 ruoyi-admin/src/main/resources/static/attachments/test.docx diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java index d5c8d15d..227b27cd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java @@ -449,12 +449,11 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { @Override public void exportCustomerQuoteOne(String supplierCode, HttpServletResponse response) { - String fileName = "客户报价1.xlsx"; + String fileName = "Vantritek-RMB.xlsx"; - FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); try { - String fileRelativePath = fileDownloadUtils.getFileRelativePath(fileName); + String fileAbsolutePath = FileDownloadUtils.getFileAbsolutePath(fileName); String realFileName = supplierCode +"-" + fileName.substring(0, fileName.indexOf(".")) + ".xlsx"; @@ -502,7 +501,7 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { exportCustomerQuoteChildVos.add(exportCustomerQuoteChildVo); } - ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileRelativePath).build(); + ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileAbsolutePath).build(); WriteSheet sheet = EasyExcel.writerSheet().build(); FillConfig fillConfig = FillConfig.builder().forceNewRow(true).build(); workBook.fill(map, sheet); @@ -521,12 +520,11 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { * */ @Override public void exportCustomerQuoteTwo(String supplierCode, HttpServletResponse response) { - String fileName = "客户报价2.xlsx"; + String fileName = "Vantritek-美元.xlsx"; - FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); try { - String fileRelativePath = fileDownloadUtils.getFileRelativePath(fileName); + String fileAbsolutePath = FileDownloadUtils.getFileAbsolutePath(fileName); String realFileName = supplierCode +"-" + fileName.substring(0, fileName.indexOf(".")) + ".xlsx"; @@ -567,7 +565,7 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { exportCustomerQuoteChildVos.add(exportCustomerQuoteChildVo); } - ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileRelativePath).build(); + ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileAbsolutePath).build(); WriteSheet sheet = EasyExcel.writerSheet().build(); FillConfig fillConfig = FillConfig.builder().forceNewRow(true).build(); workBook.fill(map, sheet); @@ -585,12 +583,11 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { * */ @Override public void exportCustomerQuoteThree(String supplierCode, HttpServletResponse response) { - String fileName = "客户报价3.xlsx"; + String fileName = "Infinity-RMB.xlsx"; - FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); try { - String fileRelativePath = fileDownloadUtils.getFileRelativePath(fileName); + String fileAbsolutePath = FileDownloadUtils.getFileAbsolutePath(fileName); String realFileName = supplierCode +"-" + fileName.substring(0, fileName.indexOf(".")) + ".xlsx"; @@ -638,7 +635,7 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { exportCustomerQuoteChildVos.add(exportCustomerQuoteChildVo); } - ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileRelativePath).build(); + ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileAbsolutePath).build(); WriteSheet sheet = EasyExcel.writerSheet().build(); FillConfig fillConfig = FillConfig.builder().forceNewRow(true).build(); workBook.fill(map, sheet); @@ -656,12 +653,12 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { * */ @Override public void exportCustomerQuoteFour(String supplierCode, HttpServletResponse response) { - String fileName = "客户报价4.xlsx"; + String fileName = "Infinity-美元.xlsx"; + - FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); try { - String fileRelativePath = fileDownloadUtils.getFileRelativePath(fileName); + String fileAbsolutePath = FileDownloadUtils.getFileAbsolutePath(fileName); String realFileName = supplierCode +"-" + fileName.substring(0, fileName.indexOf(".")) + ".xlsx"; @@ -702,7 +699,7 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { exportCustomerQuoteChildVos.add(exportCustomerQuoteChildVo); } - ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileRelativePath).build(); + ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileAbsolutePath).build(); WriteSheet sheet = EasyExcel.writerSheet().build(); FillConfig fillConfig = FillConfig.builder().forceNewRow(true).build(); workBook.fill(map, sheet); diff --git a/ruoyi-admin/src/main/resources/static/attachments/客户报价3.xlsx b/ruoyi-admin/src/main/resources/static/attachments/Infinity-RMB.xlsx similarity index 100% rename from ruoyi-admin/src/main/resources/static/attachments/客户报价3.xlsx rename to ruoyi-admin/src/main/resources/static/attachments/Infinity-RMB.xlsx diff --git a/ruoyi-admin/src/main/resources/static/attachments/客户报价4.xlsx b/ruoyi-admin/src/main/resources/static/attachments/Infinity-美元.xlsx similarity index 100% rename from ruoyi-admin/src/main/resources/static/attachments/客户报价4.xlsx rename to ruoyi-admin/src/main/resources/static/attachments/Infinity-美元.xlsx diff --git a/ruoyi-admin/src/main/resources/static/attachments/客户报价1.xlsx b/ruoyi-admin/src/main/resources/static/attachments/Vantritek-RMB.xlsx similarity index 100% rename from ruoyi-admin/src/main/resources/static/attachments/客户报价1.xlsx rename to ruoyi-admin/src/main/resources/static/attachments/Vantritek-RMB.xlsx diff --git a/ruoyi-admin/src/main/resources/static/attachments/客户报价2.xlsx b/ruoyi-admin/src/main/resources/static/attachments/Vantritek-美元.xlsx similarity index 100% rename from ruoyi-admin/src/main/resources/static/attachments/客户报价2.xlsx rename to ruoyi-admin/src/main/resources/static/attachments/Vantritek-美元.xlsx diff --git a/ruoyi-admin/src/main/resources/static/attachments/test.docx b/ruoyi-admin/src/main/resources/static/attachments/test.docx deleted file mode 100644 index e69de29b..00000000 From e1d19b270ead01711a18e74857addc1cd5372cac Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Tue, 17 Sep 2024 08:46:52 +0800 Subject: [PATCH 2/9] =?UTF-8?q?[fix]=20=E9=94=80=E5=94=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E6=8C=89=E7=85=A7=E4=B8=87=E6=9D=90=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=9A=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B7=E7=BC=96?= =?UTF-8?q?=E5=8F=B7=E5=8E=BB=E6=8E=89=E4=BB=8E=E5=89=8D=E7=AB=AF=E7=94=9F?= =?UTF-8?q?=E6=88=90=EF=BC=8C=E8=A7=A3=E5=86=B3=E6=97=A0=E8=AE=BA=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=B7=BB=E5=8A=A0=E9=83=BD=E4=BC=9A=E6=B5=AA=E8=B4=B9?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E7=BC=96=E5=8F=B7=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E6=94=B9=E4=B8=BA=E4=BB=8E=E5=90=8E=E7=AB=AF=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B7=E7=BC=96=E5=8F=B7?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E5=89=8D=E7=AB=AF=E5=A4=87=E6=B3=A8?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=B7=BB=E5=8A=A0=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B7=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=92=8C=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E5=A4=87?= =?UTF-8?q?=E6=B3=A8=E6=B2=A1=E6=9C=89=E5=80=BC=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SysCustomerQuoteServiceImpl.java | 6 ++- .../templates/system/customerQuote/add.html | 50 +++++++++---------- .../system/customerQuote/detail.html | 2 +- .../templates/system/customerQuote/edit.html | 2 +- 4 files changed, 32 insertions(+), 28 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java index 227b27cd..6945d23c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java @@ -190,6 +190,10 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { sysCustomerQuote.setCreateBy(loginName); sysCustomerQuote.setCreateTime(DateUtils.getNowDate()); String commonCurrency = sysCustomerQuote.getCommonCurrency(); + //后台获取客户报价编号 + String quoteCode = redisCache.generateBillNo("KHBJ"); + + sysCustomerQuote.setSupplierCode(quoteCode); if (RMB.equals(commonCurrency)){ sysCustomerQuote.setConfirmTax("1"); }else { @@ -202,7 +206,7 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { return result; } for (SysCustomerQuoteChild sysCustomerQuoteChild : sysCustomerQuoteChildList) { - sysCustomerQuoteChild.setQuoteId(sysCustomerQuote.getSupplierCode()); + sysCustomerQuoteChild.setQuoteId(quoteCode); sysCustomerQuoteChild.setCreateTime(new Date()); sysCustomerQuoteChild.setCreateBy(loginName); sysCustomerQuoteChildMapper.insertSysCustomerQuoteChild(sysCustomerQuoteChild); diff --git a/ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html b/ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html index 4afb7940..62c3e83d 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html @@ -11,12 +11,12 @@