yuxc
2023-08-04 edbd6c81e5ea5bbe70255cc6fc41c4d1438d667f
1、解决数据更改问题。
已修改2个文件
22 ■■■■ 文件已修改
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -876,7 +876,7 @@
    //数据更改回调
    updataSumbit(val){
      this.DataVisible = false;
      val.copyfromversion = this.rowOid;
      val.copyFromVersion = this.rowOid;
      val.oid=''
      console.log(val)
      upSaveCode(val).then(res=>{
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -2606,16 +2606,9 @@
                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);
        //2.先注入,再组合,最后校验
        switchClassifyLevelOnOrder(templateVO, classifyFullInfo, orderDTO);
@@ -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);