From b181dbc0898bfb4dd8f34dfd3c3961b4499720f1 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 16 四月 2024 01:17:45 +0800
Subject: [PATCH] 集团属性池映射界面代码完善
---
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/DockingPreAttrMappingServiceImpl.java | 16 +
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/controller/DockingPreApplyCodeController.java | 2
Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/vo/GroupAttrPoolMappingVO.java | 61 ++++++
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IDockingPreAttrMappingService.java | 11 +
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IGroupAttrPoolMappingService.java | 60 ++++++
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreViewWrapper.java | 2
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/GroupAttrPoolMappingWrapper.java | 71 +++++++
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupAttrPoolMappingServiceImpl.java | 168 ++++++++++++++++
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/mapper/GroupAttrPoolMappingMapper.java | 14 +
Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/entity/GroupAttrPoolMapping.java | 46 ++++
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreMetaAttrWrapper.java | 3
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java | 21 +
Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/vo/DockingPreMetaAttrVO.java | 6
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreAttrMappingWrapper.java | 2
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IDockingPreAttrRangeService.java | 2
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/controller/GroupAttrPoolMappingController.java | 82 ++++++++
16 files changed, 552 insertions(+), 15 deletions(-)
diff --git a/Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/entity/GroupAttrPoolMapping.java b/Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/entity/GroupAttrPoolMapping.java
new file mode 100644
index 0000000..a56cdc6
--- /dev/null
+++ b/Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/entity/GroupAttrPoolMapping.java
@@ -0,0 +1,46 @@
+package com.vci.ubcs.code.applyjtcodeservice.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.vci.ubcs.starter.revision.model.BaseModel;
+import io.swagger.annotations.ApiModel;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 闆嗗洟灞炴�ф睜鏄犲皠瀵硅薄
+ * @author ludc
+ * @date 2024/4/15 16:30
+ */
+@Data
+@TableName("PL_CODE_GROUPATTRPOOLMAP")
+@ApiModel(value = "GroupAttrPoolMapping", description = "闆嗗洟灞炴�ф睜鏄犲皠鍏崇郴瀵硅薄")
+@EqualsAndHashCode
+public class GroupAttrPoolMapping extends BaseModel {
+
+ /**
+ * 闆嗗洟灞炴�х紪鍙�
+ */
+ private String groupAttrKey;
+
+ /**
+ * 闆嗗洟灞炴�у悕绉�
+ */
+ private String groupAttrName;
+
+ /**
+ * 缂栫爜绯荤粺鍏冩暟鎹睘鎬т富閿�
+ */
+ private String codeMetaAttrOid;
+
+ /**
+ * 缂栫爜绯荤粺灞炴�ф睜涓殑灞炴�х紪鍙�
+ */
+ private String codeMetaAttrKey;
+
+ /**
+ * 缂栫爜绯荤粺灞炴�ф睜涓殑灞炴�у悕绉�
+ */
+ private String codeMetaAttrName;
+
+}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/vo/DockingPreMetaAttrVO.java b/Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/vo/DockingPreMetaAttrVO.java
index 2fcba9a..7073920 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/vo/DockingPreMetaAttrVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/vo/DockingPreMetaAttrVO.java
@@ -15,10 +15,12 @@
* 涓枃鍚嶇О
*/
private String chineseName;
+
/***
* 鑻辨枃鍚嶇О
*/
private String englishName;
+
/***
* 瀛楁绫诲瀷
*/
@@ -30,6 +32,7 @@
* 鍙栧�艰寖鍥�
*/
private String range;
+
/***
* 鐖跺睘鎬�
*/
@@ -39,10 +42,12 @@
* 闆嗗洟鍒嗙被id
*/
private String sourceClassifyId;
+
/**
* 瑙嗗浘妯″瀷id
*/
private String viewModelId;
+
/***
* 榛樿鍊�
*/
@@ -134,4 +139,5 @@
", defaultValue='" + defaultValue + '\'' +
'}';
}
+
}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/vo/GroupAttrPoolMappingVO.java b/Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/vo/GroupAttrPoolMappingVO.java
new file mode 100644
index 0000000..dda57a7
--- /dev/null
+++ b/Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/vo/GroupAttrPoolMappingVO.java
@@ -0,0 +1,61 @@
+package com.vci.ubcs.code.applyjtcodeservice.vo;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.vci.ubcs.code.applyjtcodeservice.entity.GroupAttrPoolMapping;
+import com.vci.ubcs.starter.revision.model.BaseModel;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+/**
+ * @author ludc
+ * @date 2024/4/15 16:30
+ */
+@Data
+@ApiModel(value = "GroupAttrPoolMapping", description = "闆嗗洟灞炴�ф睜鏄犲皠鍏崇郴瀵硅薄")
+@EqualsAndHashCode
+public class GroupAttrPoolMappingVO extends BaseModelVO {
+
+ /**
+ * 闆嗗洟灞炴�х紪鍙�
+ */
+ private String groupAttrKey;
+
+ /**
+ * 闆嗗洟灞炴�у悕绉�
+ */
+ private String groupAttrName;
+
+ /**
+ * 缂栫爜绯荤粺鍏冩暟鎹睘鎬т富閿�
+ */
+ private String codeMetaAttrOid;
+
+ /**
+ * 缂栫爜绯荤粺灞炴�ф睜涓殑灞炴�х紪鍙�
+ */
+ private String codeMetaAttrKey;
+
+ /**
+ * 缂栫爜绯荤粺灞炴�ф睜涓殑灞炴�у悕绉�
+ */
+ private String codeMetaAttrName;
+
+ /**
+ * 鏌ヨ鏉′欢
+ */
+ private List<String> groupAttrKeyList;
+
+ /**
+ * 鍒嗙被id
+ */
+ private String classifyId;
+
+ /**
+ * 褰撳墠缂栫爜绯荤粺鐨勫睘鎬odeMetaAttrKey鍦ㄦā鏉垮睘鎬ц〃閲岀殑oid
+ */
+ private String targetAttrId;
+
+}
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/controller/DockingPreApplyCodeController.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/controller/DockingPreApplyCodeController.java
index 7650067..6998811 100644
--- a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/controller/DockingPreApplyCodeController.java
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/controller/DockingPreApplyCodeController.java
@@ -116,7 +116,7 @@
@ApiOperation(value = "淇濆瓨灞炴�ф槧灏勯厤缃�", notes = "dockingPreAttrMappingVOList")
public R batchSave(@RequestBody DockingPreAttrMappingVOList dockingPreAttrMappingVOList){
List<DockingPreAttrMappingVO> dockingPreAttrMappingVOs = dockingPreAttrMappingVOList.getDockingPreAttrMappingVOList();
- List<DockingPreAttrMappingVO> dockingPreAttrRangeVOS=new ArrayList<>();
+ List<DockingPreAttrMappingVO> dockingPreAttrRangeVOS = new ArrayList<>();
try {
dockingPreAttrRangeVOS = dockingPreAttrMappingService.batchAddSave(dockingPreAttrMappingVOs);
}catch (Exception e){
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/controller/GroupAttrPoolMappingController.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/controller/GroupAttrPoolMappingController.java
new file mode 100644
index 0000000..6203583
--- /dev/null
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/controller/GroupAttrPoolMappingController.java
@@ -0,0 +1,82 @@
+package com.vci.ubcs.code.applyjtcodeservice.controller;
+
+import com.vci.ubcs.code.applyjtcodeservice.entity.DockingPreMetaAttr;
+import com.vci.ubcs.code.applyjtcodeservice.service.IGroupAttrPoolMappingService;
+import com.vci.ubcs.code.applyjtcodeservice.vo.GroupAttrPoolMappingVO;
+import io.swagger.annotations.Api;
+import lombok.AllArgsConstructor;
+import org.springblade.core.tool.api.R;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.sql.rowset.serial.SerialException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 闆嗗洟灞炴�ф睜鏄犲皠Controller
+ * @author ludc
+ * @date 2024/4/15 16:48
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/groupAttrPoolMapping")
+@Api(value = "闆嗗洟灞炴�ф睜鏄犲皠閰嶇疆", tags = "闆嗗洟灞炴�ф睜鏄犲皠閰嶇疆鎺ュ彛")
+public class GroupAttrPoolMappingController {
+
+ private final IGroupAttrPoolMappingService groupAttrPoolMappingService;
+
+ /**
+ * 鏌ヨ闆嗗洟灞炴�ф睜鏄犲皠鐨勫睘鎬�
+ * @param groupAttrPoolMappingVO
+ * @return
+ */
+ @PostMapping("/getGroupAttrPoolALlList")
+ public R<List<GroupAttrPoolMappingVO>> getGroupAttrPoolALlList(@RequestBody GroupAttrPoolMappingVO groupAttrPoolMappingVO) throws SerialException {
+ return R.data(groupAttrPoolMappingService.getGroupAttrPoolALlList(groupAttrPoolMappingVO));
+ }
+
+ /**
+ * 鏍规嵁闆嗗洟灞炴�х紪鍙锋煡璇㈤泦鍥㈠睘鎬ф睜鏄犲皠
+ * @param groupAttrPoolMappingVO
+ * @return
+ */
+ @PostMapping("/getByGroupAttrKeyList")
+ public R<List<GroupAttrPoolMappingVO>> getByGroupAttrKeyList(@RequestBody GroupAttrPoolMappingVO groupAttrPoolMappingVO) throws SerialException {
+ return R.data(groupAttrPoolMappingService.getByGroupAttrKeyList(groupAttrPoolMappingVO));
+ }
+
+ /**
+ * 鏍规嵁闆嗗洟灞炴�х紪鍙锋煡璇㈤泦鍥㈠睘鎬ф睜鏄犲皠
+ * @param groupAttrPoolMappingVO
+ * @return
+ */
+ @PostMapping("/editGroupAttr")
+ public R editGroupAttr(@RequestBody List<GroupAttrPoolMappingVO>groupAttrPoolMappingVO) throws SerialException {
+ return R.status(groupAttrPoolMappingService.editGroupAttr(groupAttrPoolMappingVO));
+ }
+
+ /**
+ * 鏍规嵁闆嗗洟灞炴�х紪鍙锋煡璇㈤泦鍥㈠睘鎬ф睜鏄犲皠锛屾厧鐢ㄥ洜涓轰細鏇存柊鎵�鏈夌敤鍒拌繖涓泦鍥㈠睘鎬х殑璁板綍
+ * @param groupAttrPoolMappingVOS
+ * @return
+ */
+ @PostMapping("/syncGroupAttrMapping")
+ public R syncGroupAttrMapping(@RequestBody List<GroupAttrPoolMappingVO> groupAttrPoolMappingVOS) throws SerialException {
+ return R.status(groupAttrPoolMappingService.syncGroupAttrMapping(groupAttrPoolMappingVOS));
+ }
+
+ /**
+ * 鍚庢湡瑕佸垹闄わ紝鍓嶆湡娴嬭瘯鐢�
+ * @param dockingPreMetaAttrList
+ * @return
+ * @throws SerialException
+ */
+ @PostMapping("/saveDistinctGroupAttr")
+ public R saveDistinctGroupAttr(@RequestBody List<DockingPreMetaAttr> dockingPreMetaAttrList) throws SerialException {
+ return R.status(groupAttrPoolMappingService.saveDistinctGroupAttr(dockingPreMetaAttrList));
+ }
+
+}
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/mapper/GroupAttrPoolMappingMapper.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/mapper/GroupAttrPoolMappingMapper.java
new file mode 100644
index 0000000..239bb04
--- /dev/null
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/mapper/GroupAttrPoolMappingMapper.java
@@ -0,0 +1,14 @@
+package com.vci.ubcs.code.applyjtcodeservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.vci.ubcs.code.applyjtcodeservice.entity.GroupAttrPoolMapping;
+
+/**
+ * @author ludc
+ * @date 2024/4/15 16:49
+ */
+public interface GroupAttrPoolMappingMapper extends BaseMapper<GroupAttrPoolMapping> {
+
+
+
+}
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IDockingPreAttrMappingService.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IDockingPreAttrMappingService.java
index b28d66d..279c12e 100644
--- a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IDockingPreAttrMappingService.java
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IDockingPreAttrMappingService.java
@@ -5,6 +5,7 @@
import com.vci.ubcs.code.applyjtcodeservice.entity.DockingPreAttrMapping;
import com.vci.ubcs.code.applyjtcodeservice.vo.DockingPreAttrMappingVO;
import com.vci.ubcs.code.applyjtcodeservice.vo.DokingAttributeSerchVO;
+import com.vci.ubcs.code.applyjtcodeservice.vo.GroupAttrPoolMappingVO;
import com.vci.ubcs.starter.exception.VciBaseException;
import org.springblade.core.tool.api.R;
@@ -37,7 +38,7 @@
* @param dockingPreAttrMappingDTOS 灞炴�ф槧灏勯厤缃暟鎹紶杈撳璞�
* @return 鎵ц缁撴灉锛宻uccess涓簍rue琛ㄧず鎴愬姛锛宮sg鏄け璐ョ殑鎻愮ず淇℃伅锛宱bj鏄坊鍔犲畬鎴愬悗鐨勬樉绀哄璞�
*/
- public List<DockingPreAttrMappingVO> batchAddSave(List<DockingPreAttrMappingVO> dockingPreAttrMappingDTOS)throws Exception;
+ public List<DockingPreAttrMappingVO> batchAddSave(List<DockingPreAttrMappingVO> dockingPreAttrMappingDTOS)throws Exception;
/***
*鏍¢獙灞炴�ф槧灏勬槸鍚﹂厤缃繃
@@ -60,4 +61,12 @@
* @return
*/
List<DockingPreAttrMappingVO> dockingPreAttrMappingDO2VOS(Collection<DockingPreAttrMapping> dockingPreAttrMappings, boolean contain);
+
+ /**
+ * 闆嗗洟灞炴�ф睜鏄犲皠鏁版嵁鍚屾瀵奸泦鍥㈠睘鎬ф槧灏勭晫闈�
+ * @param groupAttrPoolMappingVOS
+ * @return
+ */
+ boolean syncGroupAttrMapping(List<GroupAttrPoolMappingVO> groupAttrPoolMappingVOS);
+
}
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IDockingPreAttrRangeService.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IDockingPreAttrRangeService.java
index 52e3caa..c233fee 100644
--- a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IDockingPreAttrRangeService.java
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IDockingPreAttrRangeService.java
@@ -8,6 +8,7 @@
import java.util.List;
public interface IDockingPreAttrRangeService extends IService<DockingPreAttrRange> {
+
/***
* 鏍规嵁闆嗗洟灞炴�d鑾峰彇鍙栧�艰寖鍥�
* @return
@@ -20,4 +21,5 @@
* @return 鏁版嵁瀵硅薄
*/
List<DockingPreAttrRange> selectByWrapper(Wrapper wrapper);
+
}
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IGroupAttrPoolMappingService.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IGroupAttrPoolMappingService.java
new file mode 100644
index 0000000..d0dd9e6
--- /dev/null
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IGroupAttrPoolMappingService.java
@@ -0,0 +1,60 @@
+package com.vci.ubcs.code.applyjtcodeservice.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.vci.ubcs.code.applyjtcodeservice.entity.DockingPreMetaAttr;
+import com.vci.ubcs.code.applyjtcodeservice.entity.GroupAttrPoolMapping;
+import com.vci.ubcs.code.applyjtcodeservice.vo.GroupAttrPoolMappingVO;
+import org.springblade.core.tool.api.R;
+
+import javax.sql.rowset.serial.SerialException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 闆嗗洟灞炴�ф睜鏄犲皠鏈嶅姟灞�
+ * @author ludc
+ * @date 2024/4/15 16:52
+ */
+public interface IGroupAttrPoolMappingService extends IService<GroupAttrPoolMapping> {
+
+ /**
+ * 鏌ヨ鍏ㄩ儴闆嗗洟灞炴�ф睜鏄犲皠鐨勫睘鎬�
+ * @param GroupAttrPoolMappingVO
+ * @return
+ * @throws SerialException
+ */
+ List<GroupAttrPoolMappingVO> getGroupAttrPoolALlList(GroupAttrPoolMappingVO GroupAttrPoolMappingVO) throws SerialException;
+
+ /**
+ * 鏍规嵁闆嗗洟灞炴�х紪鍙锋煡璇㈤泦鍥㈠睘鎬ф睜鏄犲皠
+ * @param groupAttrPoolMappingVO
+ * @return
+ * @throws SerialException
+ */
+ List<GroupAttrPoolMappingVO> getByGroupAttrKeyList(GroupAttrPoolMappingVO groupAttrPoolMappingVO) throws SerialException;
+
+ /**
+ * 鐐瑰嚮鍚屾璇︾粏妯″瀷鏃惰皟鐢ㄨ鏂规硶锛�
+ * 瀹炵幇灏嗛泦鍥㈣幏鍙栫殑灞炴�у幓閲嶆斁鍒伴泦鍥㈠睘鎬ф睜鏄犲皠琛ㄤ腑
+ * @return
+ * @throws SerialException
+ */
+ boolean saveDistinctGroupAttr(List<DockingPreMetaAttr> dockingPreMetaAttrList) throws SerialException;
+
+ /**
+ * 闆嗗洟灞炴�ф槧灏勭晫闈慨鏀圭殑鏄犲皠閰嶇疆淇濆瓨
+ * @param groupAttrPoolMappingVO
+ * @return
+ * @throws SerialException
+ */
+ boolean editGroupAttr(List<GroupAttrPoolMappingVO> groupAttrPoolMappingVO) throws SerialException;
+
+ /**
+ * 鍚屾闆嗗洟灞炴�ф睜涓殑鏄犲皠閰嶇疆鍒帮紝鎵�鏈夊簲鐢ㄤ簡璇ラ泦鍥㈠睘鎬х殑鍏蜂綋鏌愪釜鍒嗙被涓婂幓
+ * @param groupAttrPoolMappingVOS
+ * @return
+ * @throws SerialException
+ */
+ boolean syncGroupAttrMapping(List<GroupAttrPoolMappingVO> groupAttrPoolMappingVOS) throws SerialException;
+
+}
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/DockingPreAttrMappingServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/DockingPreAttrMappingServiceImpl.java
index f864e8f..0e402b6 100644
--- a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/DockingPreAttrMappingServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/DockingPreAttrMappingServiceImpl.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.vci.ubcs.code.applyjtcodeservice.vo.GroupAttrPoolMappingVO;
import com.vci.ubcs.code.entity.CodeClassify;
import com.vci.ubcs.code.feign.ICodeClassifyClient;
import com.vci.ubcs.code.applyjtcodeservice.entity.*;
@@ -18,6 +19,7 @@
import com.vci.ubcs.starter.web.util.VciBaseUtil;
import com.vci.ubcs.code.applyjtcodeservice.vo.DockingPreAttrMappingVO;
import com.vci.ubcs.code.applyjtcodeservice.vo.DockingPreAttrRangeVO;
+import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
@@ -36,6 +38,7 @@
* @date 2023-05-22
*/
@Service
+@Slf4j
public class DockingPreAttrMappingServiceImpl extends ServiceImpl<DockingPreAttrMappingMapper, DockingPreAttrMapping> implements IDockingPreAttrMappingService {
/***
@@ -153,7 +156,7 @@
* 1.浼犻�掕繃鏉ョ殑鏈夊彲鑳戒富鏁版嵁妯℃澘鏂板灞炴�э紝杩欐牱鐨勯渶瑕佹坊鍔狅紝涔熸湁鍙兘鍒犻櫎鐨勫睘鎬э紝杩欐牱鐨勬槧灏勯渶瑕佸垹闄�
* 涔熸湁鏇存柊鐨勮繖鏍峰垯鏇存柊
*/
- List<DockingPreAttrMapping> newDockingPreAttrMapping=new ArrayList<>();
+ List<DockingPreAttrMapping> newDockingPreAttrMapping = new ArrayList<>();
List<String>appingConfigOidList=new ArrayList<>();
List<String>attrIdList=new ArrayList<>();
List<String> attributeOidList=new ArrayList<>();
@@ -256,4 +259,15 @@
return dockingPreAttrMappingVOList;
}
+ @Override
+ public boolean syncGroupAttrMapping(List<GroupAttrPoolMappingVO> groupAttrPoolMappingVOS) {
+ log.info("寮�濮嬮泦鍥㈠睘鎬ф睜鍚屾鍒伴泦鍥㈠睘鎬ф槧灏勯厤缃〃");
+ //groupAttrPoolMappingVOS.stream().map(GroupAttrPoolMapping::getGroupAttrKey);
+ dockingPreAttrMappingMapper.selectList(
+ Wrappers.<DockingPreAttrMapping>query().lambda().in(DockingPreAttrMapping::getSourceClassifyId)
+ );
+ log.info("闆嗗洟灞炴�ф睜鍚屾鍒伴泦鍥㈠睘鎬ф槧灏勯厤缃〃瀹屾垚锛�");
+ return false;
+ }
+
}
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupAttrPoolMappingServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupAttrPoolMappingServiceImpl.java
new file mode 100644
index 0000000..6593e75
--- /dev/null
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupAttrPoolMappingServiceImpl.java
@@ -0,0 +1,168 @@
+package com.vci.ubcs.code.applyjtcodeservice.service.impl;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.vci.ubcs.code.applyjtcodeservice.entity.DockingPreAttrRange;
+import com.vci.ubcs.code.applyjtcodeservice.entity.DockingPreMetaAttr;
+import com.vci.ubcs.code.applyjtcodeservice.entity.GroupAttrPoolMapping;
+import com.vci.ubcs.code.applyjtcodeservice.mapper.GroupAttrPoolMappingMapper;
+import com.vci.ubcs.code.applyjtcodeservice.service.IDockingPreAttrMappingService;
+import com.vci.ubcs.code.applyjtcodeservice.service.IGroupAttrPoolMappingService;
+import com.vci.ubcs.code.applyjtcodeservice.service.IGroupMdmInterService;
+import com.vci.ubcs.code.applyjtcodeservice.vo.GroupAttrPoolMappingVO;
+import com.vci.ubcs.code.applyjtcodeservice.wrapper.GroupAttrPoolMappingWrapper;
+import com.vci.ubcs.code.feign.ICodeClassifyClient;
+import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateAttrVO;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.stereotype.Service;
+
+import javax.sql.rowset.serial.SerialException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 闆嗗洟灞炴�ф睜鏄犲皠鏈嶅姟灞�
+ *
+ * @author ludc
+ * @date 2024/4/15 16:52
+ */
+@Service
+@RequiredArgsConstructor
+@Slf4j
+public class GroupAttrPoolMappingServiceImpl extends ServiceImpl<GroupAttrPoolMappingMapper, GroupAttrPoolMapping> implements IGroupAttrPoolMappingService {
+
+ private final GroupAttrPoolMappingMapper groupAttrPoolMappingMapper;
+
+ private final ICodeClassifyClient codeClassifyClient;
+
+ private final IDockingPreAttrMappingService dockingPreAttrMappingService;
+
+ /**
+ * 鏌ヨ鍏ㄩ儴闆嗗洟灞炴�ф睜鏄犲皠鐨勫睘鎬�
+ *
+ * @param GroupAttrPoolMappingVO
+ * @return
+ */
+ @Override
+ public List<GroupAttrPoolMappingVO> getGroupAttrPoolALlList(GroupAttrPoolMappingVO GroupAttrPoolMappingVO) throws SerialException {
+ List<GroupAttrPoolMapping> groupAttrPoolMappings = groupAttrPoolMappingMapper.selectList(null);
+ return GroupAttrPoolMappingWrapper.build().entityVOs(groupAttrPoolMappings);
+ }
+
+ /**
+ * 鏍规嵁闆嗗洟灞炴�х紪鍙锋煡璇㈤泦鍥㈠睘鎬ф睜鏄犲皠
+ *
+ * @param groupAttrPoolMappingVO
+ * @return
+ */
+ @Override
+ public List<GroupAttrPoolMappingVO> getByGroupAttrKeyList(GroupAttrPoolMappingVO groupAttrPoolMappingVO) {
+ // 鏌ヨ鏉′欢涓虹┖
+ if (Func.isEmpty(groupAttrPoolMappingVO.getGroupAttrKeyList())) {
+ throw new ServiceException("鏌ヨ鏉′欢锛岃鏌ヨ鐨勯泦鍥㈢紪鍙峰垪琛ㄤ笉鑳戒负绌猴紒");
+ }
+ if (Func.isBlank(groupAttrPoolMappingVO.getClassifyId())) {
+ throw new ServiceException("鏌ヨ鏉′欢涓紝鍒嗙被id涓嶈兘涓虹┖锛�");
+ }
+ //闆嗗洟灞炴�ф睜鏁版嵁
+ List<GroupAttrPoolMapping> groupAttrPoolMappings = groupAttrPoolMappingMapper.selectList(
+ Wrappers.<GroupAttrPoolMapping>query()
+ .lambda().in(GroupAttrPoolMapping::getGroupAttrKey, groupAttrPoolMappingVO.getGroupAttrKeyList())
+ );
+ //鏍规嵁鍒嗙被id鏌ヨ鍑猴紝瀵瑰簲鐨勬ā鏉夸笂閰嶇疆鐨勫睘鎬�
+ List<CodeClassifyTemplateAttrVO> attrVOS = codeClassifyClient.listCodeAttributeByClassId(groupAttrPoolMappingVO.getClassifyId());
+ List<GroupAttrPoolMappingVO> groupAttrPoolMappingVOS = GroupAttrPoolMappingWrapper.build().entityVOs(groupAttrPoolMappings);
+
+ List<GroupAttrPoolMappingVO> finalGroupAttrPoolMappingVOS;
+ //鏍规嵁闆嗗洟灞炴�ф睜涓厤缃甶d鍏冩暟鎹睘鎬d鎵惧埌褰撳墠鎵�灞炲垎绫讳笅鐨勬ā鏉垮睘鎬т腑瀵瑰簲灞炴�х殑oid
+ finalGroupAttrPoolMappingVOS = groupAttrPoolMappingVOS.stream().map(item -> {
+ CodeClassifyTemplateAttrVO codeClassifyTemplateAttrVO = attrVOS.stream().filter(attr -> attr.getId().equals(item.getCodeMetaAttrKey())).findFirst().orElse(new CodeClassifyTemplateAttrVO());
+ item.setTargetAttrId(codeClassifyTemplateAttrVO.getOid());
+ return item;
+ }).collect(Collectors.toList());
+
+ return finalGroupAttrPoolMappingVOS;
+ }
+
+ /**
+ * 鐐瑰嚮鍚屾妯″瀷鏃惰皟鐢ㄨ鏂规硶锛�
+ * 瀹炵幇灏嗛泦鍥㈣幏鍙栫殑灞炴�у幓閲嶆斁鍒伴泦鍥㈠睘鎬ф睜鏄犲皠琛ㄤ腑
+ * @param dockingPreMetaAttrList
+ * @return
+ * @throws SerialException
+ */
+ @Override
+ public boolean saveDistinctGroupAttr(List<DockingPreMetaAttr> dockingPreMetaAttrList) throws SerialException {
+ // 涓虹┖鐩存帴杩斿洖
+ if(Func.isEmpty(dockingPreMetaAttrList)){
+ return true;
+ }
+ List<GroupAttrPoolMapping> groupAttrPoolMappings = new ArrayList<>();
+ List<String> distinctListEnglishName = new ArrayList<>();
+ List<String> distinctListChineseName = new ArrayList<>();
+ log.info("寮�濮嬪皢闆嗗洟灞炴�у悓姝ュ埌闆嗗洟灞炴�ф睜涓�");
+ // 灏哾ockingPreMetaAttrList闆嗗悎杞崲涓洪泦鍥㈠睘鎬ф睜灞炴�у璞�
+ dockingPreMetaAttrList.stream().forEach(item->{
+ GroupAttrPoolMapping groupAttrPoolMapping = new GroupAttrPoolMapping();
+ groupAttrPoolMapping.setGroupAttrKey(item.getEnglishName());
+ groupAttrPoolMapping.setGroupAttrName(item.getChineseName());
+ groupAttrPoolMappings.add(groupAttrPoolMapping);
+ // 鍘婚噸鏌ヨ鏉′欢闆嗗洟灞炴�ц嫳鏂囧悕绉�
+ distinctListEnglishName.add(item.getEnglishName());
+ // 鍘婚噸鏌ヨ鏉′欢闆嗗洟灞炴�т腑鏂囧悕绉�
+ distinctListChineseName.add(item.getName());
+ });
+ // 鍘婚噸鏌ヨ缁撴灉
+ List<GroupAttrPoolMapping> dbGroupAttrPoolMappings = groupAttrPoolMappingMapper.selectList(
+ Wrappers.<GroupAttrPoolMapping>query()
+ .lambda().in(GroupAttrPoolMapping::getGroupAttrKey, distinctListEnglishName)
+ .in(GroupAttrPoolMapping::getGroupAttrName, distinctListChineseName)
+ );
+ List<GroupAttrPoolMapping> finalGroupAttrPoolMappings = null;
+ // 灏嗗凡瀛樺湪鐨勯泦鍥㈠睘鎬т粠groupAttrPoolMappings涓Щ闄�
+ if(Func.isNotEmpty(dbGroupAttrPoolMappings)){
+ finalGroupAttrPoolMappings = groupAttrPoolMappings.stream()
+ .filter(mapping -> !dbGroupAttrPoolMappings.stream()
+ .map(GroupAttrPoolMapping::getGroupAttrKey)
+ .collect(Collectors.toList())
+ .contains(mapping.getGroupAttrKey()))
+ .collect(Collectors.toList());
+ }
+ boolean resBoolean = this.saveBatch(finalGroupAttrPoolMappings);
+ log.info("闆嗗洟灞炴�у悓姝ュ埌闆嗗洟灞炴�ф睜,鍚屾瀹屾瘯");
+ return resBoolean;
+ }
+
+ /**
+ * 闆嗗洟灞炴�ф槧灏勭晫闈慨鏀圭殑鏄犲皠閰嶇疆淇濆瓨
+ * @param groupAttrPoolMappingVO
+ * @return
+ * @throws SerialException
+ */
+ @Override
+ public boolean editGroupAttr(List<GroupAttrPoolMappingVO> groupAttrPoolMappingVO) throws SerialException {
+ if(Func.isEmpty(groupAttrPoolMappingVO)){
+ return true;
+ }
+ List<GroupAttrPoolMapping> groupAttrPoolMappings = GroupAttrPoolMappingWrapper.build().VOsEntity(groupAttrPoolMappingVO);
+ return this.updateBatchById(groupAttrPoolMappings);
+ }
+
+ /**
+ * 鍚屾闆嗗洟灞炴�ф睜涓殑鏄犲皠閰嶇疆鍒帮紝鎵�鏈夊簲鐢ㄤ簡璇ラ泦鍥㈠睘鎬х殑鍏蜂綋鏌愪釜鍒嗙被涓婂幓
+ * @param groupAttrPoolMappingVOS
+ * @return
+ * @throws SerialException
+ */
+ @Override
+ public boolean syncGroupAttrMapping(List<GroupAttrPoolMappingVO> groupAttrPoolMappingVOS) throws SerialException {
+ return dockingPreAttrMappingService.syncGroupAttrMapping(groupAttrPoolMappingVOS);
+ }
+
+}
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java
index 11d6c37..1a03985 100644
--- a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java
@@ -100,6 +100,12 @@
@Autowired(required = false)
private IDockingPreMetaAttrService dockingPreMetaAttrService;
+ /**
+ * 闆嗗洟灞炴�ф睜鏄犲皠鏈嶅姟
+ */
+ @Autowired(required = false)
+ private IGroupAttrPoolMappingService groupAttrPoolMappingService;
+
@Autowired(required = false)
private IMdmEngineClient mdmEngineClient;
@@ -673,15 +679,15 @@
return R.fail("鍚屾闆嗗洟妯″瀷淇℃伅寮�鍏冲凡鍏抽棴");
}
VciBaseUtil.alertNotNull(operationType,"闆嗘垚鎿嶄綔绫诲瀷");
- try {
+ try{
if(operationType.equals("all")){
return queryMdmModel();
}else{
VciBaseUtil.alertNotNull(classifyId,"闆嗗洟鍒嗙被涓婚敭");
return queryClassModel(classifyId);
}
- } catch (Throwable e) {
- throw new VciBaseException(e.getMessage());
+ }catch(Throwable e) {
+ throw new VciBaseException(e.getMessage());
}
}
@@ -750,8 +756,7 @@
* @param jclassObject
* @throws Throwable
*/
- private void getVilewMode(DockingClassifyVO jclassObject, List<DockingClassifyViewVO> list)
- throws Throwable {
+ private void getVilewMode(DockingClassifyVO jclassObject, List<DockingClassifyViewVO> list) throws Throwable {
String nodeLinkName = jclassObject.getNodeLinkName();
try {
String jclassId = com.alibaba.cloud.commons.lang.StringUtils.isBlank(jclassObject.getId())?"":jclassObject.getId();
@@ -787,8 +792,10 @@
}
// 鑾峰彇妯″瀷瑙嗗浘涓嬬殑灞炴�ч泦
// String oid = jviewModelObject.getOid();
- List<DockingPreMetaAttr>allDockingPreMetaAttrList=new ArrayList<>();
+ List<DockingPreMetaAttr> allDockingPreMetaAttrList = new ArrayList<>();
getMetaAttrObject(metaList, jclassId, jviewModelObject, "root",allDockingPreMetaAttrList);
+ //淇濆瓨闆嗗洟灞炴�у埌闆嗗洟灞炴�ф睜鏄犲皠琛ㄤ腑
+ groupAttrPoolMappingService.saveDistinctGroupAttr(allDockingPreMetaAttrList);
//淇濆瓨妯″瀷瑙嗗浘灞炴��
dockingPreMetaAttrService.saveOrUpdateBatch(allDockingPreMetaAttrList);
//淇濆瓨妯″瀷瑙嗗浘
@@ -860,9 +867,7 @@
}else{
allDockingPreMetaAttrList.add(dockingPreMetaAttr);
}
-
}
-
} catch (Throwable e) {
e.printStackTrace();
log.error("缁勭粐妯″瀷瑙嗗浘"+ jviewModelObject.getViewName()
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreAttrMappingWrapper.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreAttrMappingWrapper.java
index aa9fa09..ad896b5 100644
--- a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreAttrMappingWrapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreAttrMappingWrapper.java
@@ -60,7 +60,7 @@
return dockingPreAttrMappingList;
}
- public DockingPreAttrMapping voentity( DockingPreAttrMappingVO vo) {
+ public DockingPreAttrMapping voentity(DockingPreAttrMappingVO vo) {
DockingPreAttrMapping dockingPreAttrMapping = Objects.requireNonNull(BeanUtil.copy(vo, DockingPreAttrMapping.class));
return dockingPreAttrMapping;
}
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreMetaAttrWrapper.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreMetaAttrWrapper.java
index 52b3ead..a071cc3 100644
--- a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreMetaAttrWrapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreMetaAttrWrapper.java
@@ -29,8 +29,6 @@
return dockingPreMetaAttrVO;
}
-
-
/***
* 鏁扮粍瀵硅薄杞崲
* @param entitys
@@ -72,4 +70,5 @@
DockingPreMetaAttr entity = Objects.requireNonNull(BeanUtil.copy(vo, DockingPreMetaAttr.class));
return entity;
}
+
}
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreViewWrapper.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreViewWrapper.java
index 9c77865..2a18355 100644
--- a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreViewWrapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/DockingPreViewWrapper.java
@@ -17,7 +17,7 @@
* @author xiejun
* @since 2023-05-23
*/
-public class DockingPreViewWrapper extends BaseEntityWrapper<DockingPreViewModel, DockingPreViewModelVO> {
+public class DockingPreViewWrapper extends BaseEntityWrapper<DockingPreViewModel, DockingPreViewModelVO> {
public static DockingPreViewWrapper build() {
return new DockingPreViewWrapper();
}
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/GroupAttrPoolMappingWrapper.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/GroupAttrPoolMappingWrapper.java
new file mode 100644
index 0000000..16e4a45
--- /dev/null
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/wrapper/GroupAttrPoolMappingWrapper.java
@@ -0,0 +1,71 @@
+package com.vci.ubcs.code.applyjtcodeservice.wrapper;
+
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.vci.ubcs.code.applyjtcodeservice.entity.DockingPreMetaAttr;
+import com.vci.ubcs.code.applyjtcodeservice.entity.DockingPreViewModel;
+import com.vci.ubcs.code.applyjtcodeservice.entity.GroupAttrPoolMapping;
+import com.vci.ubcs.code.applyjtcodeservice.vo.DockingPreMetaAttrVO;
+import com.vci.ubcs.code.applyjtcodeservice.vo.DockingPreViewModelVO;
+import com.vci.ubcs.code.applyjtcodeservice.vo.GroupAttrPoolMappingVO;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * @author ludc
+ * @date 2024/4/15 20:47
+ */
+public class GroupAttrPoolMappingWrapper extends BaseEntityWrapper<GroupAttrPoolMapping, GroupAttrPoolMappingVO> {
+
+ public static GroupAttrPoolMappingWrapper build() {
+ return new GroupAttrPoolMappingWrapper();
+ }
+
+ @Override
+ public GroupAttrPoolMappingVO entityVO(GroupAttrPoolMapping entity) {
+ GroupAttrPoolMappingVO groupAttrPoolMappingVO = Objects.requireNonNull(BeanUtil.copy(entity, GroupAttrPoolMappingVO.class));
+ return groupAttrPoolMappingVO;
+ }
+
+ /***
+ * 鏁扮粍瀵硅薄杞崲
+ * @param entitys
+ * @return
+ */
+ public List<GroupAttrPoolMappingVO> entityVOs(Collection<GroupAttrPoolMapping> entitys) {
+ if(CollectionUtils.isEmpty(entitys)) {return new ArrayList<>();}
+ List<GroupAttrPoolMappingVO> vos=new ArrayList<>();
+ if(!CollectionUtils.isEmpty(entitys)) {
+ entitys.stream().forEach(vo -> {
+ vos.add(entityVO(vo));
+ });
+ }
+ return vos;
+ }
+
+ private GroupAttrPoolMapping VOEntity(GroupAttrPoolMappingVO groupAttrPoolMappingVO){
+ GroupAttrPoolMapping groupAttrPoolMapping = Objects.requireNonNull(BeanUtil.copy(groupAttrPoolMappingVO, GroupAttrPoolMapping.class));
+ return groupAttrPoolMapping;
+ }
+
+ /***
+ * 鏁扮粍瀵硅薄杞崲
+ * @param groupAttrPoolMappingVOS
+ * @return
+ */
+ public List<GroupAttrPoolMapping> VOsEntity(Collection<GroupAttrPoolMappingVO> groupAttrPoolMappingVOS) {
+ if(CollectionUtils.isEmpty(groupAttrPoolMappingVOS)) {return new ArrayList<>();}
+ List<GroupAttrPoolMapping> vos=new ArrayList<>();
+ if(!CollectionUtils.isEmpty(groupAttrPoolMappingVOS)) {
+ groupAttrPoolMappingVOS.stream().forEach(vo -> {
+ vos.add(VOEntity(vo));
+ });
+ }
+ return vos;
+ }
+
+}
--
Gitblit v1.9.3