From edbd6c81e5ea5bbe70255cc6fc41c4d1438d667f Mon Sep 17 00:00:00 2001
From: yuxc <653031404@qq.com>
Date: 星期五, 04 八月 2023 18:13:01 +0800
Subject: [PATCH] 1、解决数据更改问题。

---
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java |   22 ++++++----------------
 1 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
index dd05221..823e4d6 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -2606,17 +2606,10 @@
                 orderDTO.getCodeClassifyOid(), "涓婚搴撳垎绫荤殑涓婚敭");
 
         //闇�瑕佸崌鐗�
-//		ClientBusinessObjectOperation cboOperation = new ClientBusinessObjectOperation();
         BaseModel cbo = null;
-//		try {
-//			//cbo = cboOperation.createBusinessObjectVersion(oldCbo,VciBaseUtil.getCurrentUserId());
         cbo = reviseBusinessObject(oldCbo);
-//		} catch (VCIError e) {
-//			throw new VciBaseException("鍒濆鍖栫浉鍏崇殑鍐呭鍑虹幇浜嗛敊璇�", new String[0], e);
-//		}
         //1. 鍒ゆ柇蹇呰緭椤�
-        //CodeClassifyTemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid());
-        checkRequiredAttrOnOrder(templateVO, orderDTO);
+		checkRequiredAttrOnOrder(templateVO, orderDTO);
         //2.鍏堟敞鍏ワ紝鍐嶇粍鍚堬紝鏈�鍚庢牎楠�
         switchClassifyLevelOnOrder(templateVO, classifyFullInfo, orderDTO);
         //3.澶勭悊缁勫悎瑙勫垯銆傜粍鍚堣鍒欎笉鑳戒娇鐢ㄧ紪鐮佺殑灞炴�э紝鍥犱负缂栫爜鐨勭敓鎴愬彲鑳芥槸闇�瑕佸睘鎬х殑
@@ -2634,20 +2627,17 @@
         //浼佷笟鐮佸拰闆嗗洟鐮佺殑涓嶄慨鏀�
         cbo.setDescription(StringUtils.isBlank(orderDTO.getDescription()) ? "" : orderDTO.getDescription());
         cbo.setName(orderDTO.getName());
-//		try {
         cbo.setDescription(StringUtils.isBlank(orderDTO.getDescription()) ? "" : orderDTO.getDescription());
-//		cbo.setAttributeValueWithNoCheck("description", StringUtils.isBlank(orderDTO.getDescription())?"":orderDTO.getDescription());
         cbo.setName(orderDTO.getName());
-//		} catch (VCIError e) {
-//			e.printStackTrace();
-//		}
         //鏁版嵁鐨勬椂鍊欙紝缂栫爜鏄笉鍙樼殑
         cbo.setCreateTime(cbo.getCreateTime());
         cbo.setLastModifyTime(cbo.getLastModifyTime());
-//		List<ClientBusinessObject> cboList = new ArrayList<>();
-//		cboList.add(cbo);
+		cbo.setTenantId(AuthUtil.getTenantId());
+		oldCbo.setLastV("0");
+		oldCbo.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId()));
+		oldCbo.setLastModifyTime(new Date());
         try {
-//			cboOperation.saveRevisionBuinessObject(cbo);
+			updateBatchByBaseModel(oldCbo.getBtmname(), Collections.singletonList(oldCbo));
             insertBatchByType(cbo.getBtmname(), Collections.singletonList(cbo));
         } catch (Exception vciError) {
             throw new VciBaseException("鏁版嵁鏇存敼淇濆瓨鍑洪敊浜�", new String[0], vciError);

--
Gitblit v1.9.3