From 6a5cc80261552d6f9ba6a59b8067665f4a429ee9 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 19 七月 2023 11:42:52 +0800
Subject: [PATCH] 代码提交

---
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyValueServiceImpl.java |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyValueServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyValueServiceImpl.java
index ddccbd3..b8df9b8 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyValueServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyValueServiceImpl.java
@@ -25,8 +25,10 @@
 import com.vci.ubcs.starter.web.util.VciBaseUtil;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Lazy;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
@@ -65,7 +67,6 @@
 	 */
 	@Override
 	public List<Tree> treeCodeClassifyValue(TreeQueryObject treeQueryObject) throws VciBaseException {
-		// List<CodeClassifyValueDO> doList =selectCodeClassifyValueDOByTree(treeQueryObject);
 		List<CodeClassifyValue> doList = selectCodeClassifyValueDO4Tree(treeQueryObject);
 		List<CodeClassifyValueVO> voList = CodeClassifyValueWrapper.build().listVO(doList);
 		TreeWrapperOptions treeWrapperOptions = new TreeWrapperOptions(PARENT_FIELD_NAME);
@@ -284,7 +285,7 @@
 	 */
 	@Override
 	@Transactional(rollbackFor = Exception.class)
-	public R batchSave4Order(List<CodeClassifyValueDTO> dtoList, String codeclassifysecoid) {
+	public R batchSave4Order(List<CodeClassifyValueDTO> dtoList, String codeclassifysecoid) throws VciBaseException{
 		VciBaseUtil.alertNotNull(codeclassifysecoid,"鍒嗙被鐮佹涓婚敭");
 		List<CodeClassifyValue> valueDOList = codeClassifyValueMapper.selectList(Wrappers.<CodeClassifyValue>query()
 			.lambda().eq(CodeClassifyValue::getCodeClassifySecOid,codeclassifysecoid)
@@ -304,6 +305,9 @@
 				});
 			}
 		});
+		if(updateList.isEmpty()){
+			return R.fail("璇ユ搷浣滄湁璇�愬緟鎿嶄綔闆嗗悎涓虹┖銆戙��");
+		}
 		boolean resBoolean = this.updateBatchById(updateList);
 		return R.status(resBoolean);
 	}
@@ -381,7 +385,7 @@
 		QueryWrapper<CodeClassifyValue> wrapper = new QueryWrapper<>();
 		wrapper.eq("codeClassifySecOid",classifySecOid);
 		if(StringUtils.isNotBlank(parentClassifyValueOid)){
-			wrapper.eq("parentClassifyValueOid",parentClassifyValueOid);
+			wrapper.in("parentClassifyValueOid",VciBaseUtil.str2List(parentClassifyValueOid));
 		}
 		wrapper.orderByAsc("ordernum");
 
@@ -390,6 +394,20 @@
 	}
 
 	/**
+	 * 鏍规嵁涓婚敭鑾峰彇鐮佸�煎瓧绗︿覆
+	 * @param oid
+	 * @return
+	 */
+	@Override
+	public String getClassifyValueStr(String oid){
+		if(Func.isEmpty(oid)){
+			return "";
+		}
+		String classifyValueStr = this.codeClassifyValueMapper.getClassifyValueStr(oid);
+		return Func.isEmpty(classifyValueStr) ? "":classifyValueStr;
+	}
+
+	/**
 	 * 鎵归噺鏁版嵁瀵硅薄杞崲涓烘樉绀哄璞�
 	 * @param codeClassifyValueDOs 鏁版嵁瀵硅薄鍒楄〃
 	 * @return 鏄剧ず瀵硅薄

--
Gitblit v1.9.3