From 738b846113ae39fbd0594ff98d968f559e9a8a90 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 24 七月 2023 11:17:23 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java | 48 +++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 41 insertions(+), 7 deletions(-)
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 3580f4e..bd8e46e 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
@@ -3,14 +3,17 @@
import com.alibaba.fastjson.JSONObject;
import com.alibaba.nacos.common.utils.StringUtils;
+import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.vci.ubcs.code.dto.CodeDeleteBatchDTO;
+import com.vci.ubcs.code.dto.CodeExportAttrDTO;
import com.vci.ubcs.code.dto.CodeOrderDTO;
import com.vci.ubcs.code.dto.CodeOrderSecDTO;
import com.vci.ubcs.code.dto.datapush.BaseModelDTO;
import com.vci.ubcs.code.service.MdmEngineService;
import com.vci.ubcs.code.service.MdmIOService;
import com.vci.ubcs.code.vo.pagemodel.*;
+import com.vci.ubcs.flow.core.feign.IMDMIFlowAttrClient;
import com.vci.ubcs.omd.vo.BtmTypeVO;
import com.vci.ubcs.starter.annotation.VciBusinessLog;
import com.vci.ubcs.starter.revision.model.BaseModel;
@@ -55,6 +58,7 @@
@Autowired
private MdmIOService mdmIOService;
+
/**
* 涓嬭浇鎵归噺鐢宠鐨勫鍏ユā鏉�
* @param codeClassifyOid 鍒嗙被鐨勪富閿�
@@ -98,6 +102,25 @@
}
+ }
+
+ /**
+ * 瀵煎嚭涓婚搴撶殑鏁版嵁
+ * @param exportAttrDTO 瀵煎嚭鐨勭浉鍏抽厤缃�
+ */
+ @VciBusinessLog(operateName = "瀵煎嚭涓婚搴撶殑鏁版嵁")
+ @PostMapping("/exportCode")
+ public void exportCode(CodeExportAttrDTO exportAttrDTO, HttpServletResponse response) throws IOException {
+ String excelName = mdmIOService.exportCode(exportAttrDTO);
+ try {
+ ControllerUtil.writeFileToResponse(response,excelName);
+ } catch (Throwable e) {
+ //濡傛灉鍑洪敊,鎶婇敊璇俊鎭啓鍒皌ext
+ String msg = LangBaseUtil.getErrorMsg(e);
+ String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "閿欒.txt";
+ LocalFileUtil.writeContentToFile(msg,errorFile);
+ ControllerUtil.writeFileToResponse(response,errorFile);
+ }
}
/**
@@ -509,12 +532,12 @@
* @return 鍒嗙被鐮佸�肩殑鍐呭
*/
@GetMapping("/listCodeClassifyValueBySecOid")
- public DataGrid<CodeClassifyValueVO> listCodeClassifyValueBySecOid(String classifySecOid, String parentClassifyValueOid){
+ public IPage<CodeClassifyValueVO> listCodeClassifyValueBySecOid(String classifySecOid, String parentClassifyValueOid){
List<CodeClassifyValueVO> valueVOS = engineService.listCodeClassifyValueBySecOid(classifySecOid, parentClassifyValueOid);
- DataGrid<CodeClassifyValueVO> dataGrid = new DataGrid<>();
- dataGrid.setData(valueVOS);
- dataGrid.setTotal(valueVOS==null?0:valueVOS.size());
- return dataGrid;
+ IPage<CodeClassifyValueVO> valueVOIPage = new Page<>();
+ valueVOIPage.setRecords(valueVOS);
+ valueVOIPage.setTotal(valueVOS==null?0:valueVOS.size());
+ return valueVOIPage;
}
/**
@@ -523,7 +546,7 @@
* @return 缂栫爜瑙勫垯鐨勫唴瀹�
*/
@GetMapping("/getCodeRuleByClassifyOid")
-// @VciUnCheckRight
+ // @VciUnCheckRight
public R<CodeRuleVO> getCodeRuleByClassifyOid(String codeClassifyOid){
return R.data(engineService.getCodeRuleByClassifyOid(codeClassifyOid));
}
@@ -626,6 +649,17 @@
return engineService.getUIInfoByClassifyOid(codeClassifyOid,functionId);
}
+ /**
+ * 浣跨敤鍒嗙被鑾峰彇琛ㄦ牸鐨勫畾涔�
+ * @param codeClassifyOid 鍒嗙被涓婚敭
+ * @param functionId 鍔熻兘鐨勭紪鍙�
+ * @return UI鐩稿叧鐨勪俊鎭紙浠呭寘鍚〃鏍硷級
+ */
+ @GetMapping("/getFlowdUIInfoByClassifyOid")
+ public MdmUIInfoVO getUIInfoByClassifyOid(String codeClassifyOid,String functionId,String templateId,String taskId,String modelKey){
+ return engineService.getFlowUIInfoByClassifyOid(codeClassifyOid,functionId,templateId,taskId,modelKey);
+ }
+
@GetMapping("/thisistest")
@ResponseBody
@@ -695,7 +729,7 @@
* @return 鎵ц鐨勭粨鏋�
*/
@GetMapping("/defaultReferDataGrid")
- public Page<BtmTypeVO> defaultReferDataGrid(UIFormReferVO referConfigVO, BaseQueryObject baseQueryObject){
+ public IPage<BaseModel> defaultReferDataGrid(UIFormReferVO referConfigVO, BaseQueryObject baseQueryObject){
return engineService.referDataGrid(referConfigVO,baseQueryObject);
}
--
Gitblit v1.9.3