From 448a89b421a80bc01cd232cd2a0ed8b8e658766b Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 06 十二月 2023 17:42:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java | 10 +++++++---
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/resources/application-prod.yml | 4 ++++
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java | 12 ++++++++++--
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/resources/application-prod.yml b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/resources/application-prod.yml
index f05c6ee..97efe84 100644
--- a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/resources/application-prod.yml
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/resources/application-prod.yml
@@ -8,3 +8,7 @@
url: ${ubcs.datasource.mdm.prod.url}
username: ${ubcs.datasource.mdm.prod.username}
password: ${ubcs.datasource.mdm.prod.password}
+#鍏抽棴椹煎嘲鍛藉悕鏄犲皠
+mybatis-plus:
+ configuration :
+ map-underscore-to-camel-case: false
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java
index df1421c..3e681d6 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java
@@ -179,8 +179,8 @@
@VciBusinessLog(operateName = "瀵煎嚭涓婚搴撶殑鏁版嵁")
@PostMapping("/exportCode")
public void exportCode(CodeExportAttrDTO exportAttrDTO, HttpServletResponse response) throws IOException {
- String excelName = mdmIOService.exportCode(exportAttrDTO);
try {
+ String excelName = mdmIOService.exportCode(exportAttrDTO);
ControllerUtil.writeFileToResponse(response,excelName);
} catch (Throwable e) {
//濡傛灉鍑洪敊,鎶婇敊璇俊鎭啓鍒皌ext
@@ -844,7 +844,7 @@
*/
@GetMapping("/exportGroupCodeExcel")
@VciBusinessLog(operateName = "瀵煎嚭闆嗗洟鐮�")
- public R exportGroupCodeExcel(String codeClassifyOid, HttpServletResponse response) throws IOException{
+ public R exportGroupCodeExcel(String codeClassifyOid, HttpServletResponse response){
try {
String excelName = mdmIOService.exportGroupCodeExcel(codeClassifyOid);
ControllerUtil.writeFileToResponse(response,excelName);
@@ -854,6 +854,14 @@
if(StringUtils.isBlank(msg)){
msg = "鏈煡閿欒";
}
+ String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "閿欒.txt";
+ LocalFileUtil.writeContentToFile(LangBaseUtil.getErrorMsg(e),errorFile);
+ try {
+ ControllerUtil.writeFileToResponse(response,errorFile);
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ String uuid=ControllerUtil.putErrorFile(errorFile);
return R.fail(msg);
// ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null);
}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
index 3f5a955..f0f570d 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
@@ -1831,10 +1831,10 @@
tableName = VciBaseUtil.getTableName(btmTypeId);
}
- String countSql = "select count(*) from (select * FROM " + tableName +" where 1=1" +
+ String countSql = "select count(*) from " + tableName +" where 1=1" +
" and lastr = '1'" +
" and lastv='1'" +
- " and codeclsfpath like '%" + exportAttrDTO.getCodeClassifyOid() + "%' {}";
+ " and codeclsfpath like '%" + exportAttrDTO.getCodeClassifyOid() + "%'";
//鍏堟煡璇㈡�绘暟
int total = 0;
@@ -1842,13 +1842,17 @@
&&exportAttrDTO.getPage() !=null && exportAttrDTO.getPage() >0
&&exportAttrDTO.getEndPage()>exportAttrDTO.getPage()){
//浠庡灏戦〉鍒板灏戦〉鐨勬煡璇㈡柟寮忥紝
+ String countPageSql = "select count(*) from (select * FROM " + tableName +" where 1=1" +
+ " and lastr = '1'" +
+ " and lastv='1'" +
+ " and codeclsfpath like '%" + exportAttrDTO.getCodeClassifyOid() + "%' {}";
for(int i = exportAttrDTO.getPage() ;i <= exportAttrDTO.getEndPage();i++){
PageHelper thisPage = new PageHelper(exportAttrDTO.getLimit()==null?-1:exportAttrDTO.getLimit());
thisPage.setPage(exportAttrDTO.getPage()==null?1:exportAttrDTO.getPage());
thisPage.setSort(exportAttrDTO.getSort());
thisPage.setOrder(exportAttrDTO.getOrder());
thisPage.addDefaultDesc("createTime");
- total += commonsMapper.queryCountBySql(StringUtil.format(countSql," limit " + exportAttrDTO.getLimit() +" offset "+ i +")subquery;"));
+ total += commonsMapper.queryCountBySql(StringUtil.format(countPageSql," limit " + exportAttrDTO.getLimit() +" offset "+ i +")subquery;"));
}
}else{
total = commonsMapper.queryCountBySql(countSql);
--
Gitblit v1.9.3