From ab234e8b6a7cc2a52be8dbe04c7b731105f6a030 Mon Sep 17 00:00:00 2001 From: xiejun <xj@2023> Date: 星期五, 01 十二月 2023 10:42:27 +0800 Subject: [PATCH] 字符集修改,删除接口完善 --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java | 41 +++++++++++++++++++++++++++++++++++------ 1 files changed, 35 insertions(+), 6 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 37533a7..a323935 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 @@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.vci.ubcs.code.applyjtcodeservice.vo.BaseModelVO; -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.*; import com.vci.ubcs.code.dto.datapush.BaseModelDTO; import com.vci.ubcs.code.service.MdmEngineService; import com.vci.ubcs.code.service.MdmIOService; @@ -81,6 +78,7 @@ ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); } } + /** * 涓嬭浇鎵归噺鐢宠鐨勫鍏ユā鏉� * @param codeClassifyOid 鍒嗙被鐨勪富閿� @@ -101,8 +99,6 @@ } ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); } - - } /** @@ -747,4 +743,37 @@ public R processChangeStatus(@RequestBody FlowStatusDTO flowDTO){ return engineService.processChangeStatus(flowDTO); } + + /** + * 鏍囧噯鐢宠鍜屼慨璁㈢敤 + * @param codeBZApplyDTO 缂栫爜鐢宠鐩稿叧鐨勪俊鎭紝闇�瑕佹湁灞炴�у拰鐮佹鐩稿叧鐨勪俊鎭� + * @return 鎵ц缁撴灉 + */ + @PostMapping("/addSaveBZ") + @VciBusinessLog(operateName = "鐢宠鍗曚釜缂栫爜") + public R addSaveBZ (@RequestBody CodeBZApplyDTO codeBZApplyDTO) throws Exception { + return R.success(engineService.addSaveBZ(codeBZApplyDTO)); + } + + /** + * 涓嬭浇鎵归噺鐢宠鐨勫鍏ユā鏉� + * @param codeClassifyOid 鍒嗙被鐨勪富閿� + * @param response 鍝嶅簲瀵硅薄 + * @throws IOException 鎶涘嚭寮傚父 + */ + @GetMapping("/exportGroupCodeExcel") + @VciBusinessLog(operateName = "瀵煎嚭闆嗗洟鐮�") + public void exportGroupCodeExcel(String codeClassifyOid, HttpServletResponse response) throws IOException{ + String excelName = mdmIOService.createImportExcel(codeClassifyOid,false); + try { + ControllerUtil.writeFileToResponse(response,excelName); + } catch (Throwable e) { + //濡傛灉鍑洪敊,鎶婇敊璇俊鎭啓鍒皌ext + String msg = LangBaseUtil.getErrorMsg(e); + if(StringUtils.isBlank(msg)){ + msg = "鏈煡閿欒"; + } + ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); + } + } } -- Gitblit v1.9.3