ludc
2023-12-03 25da36be2318c1247592dce7d499d0b985c80fe0
历史数据导入时,赋默认值报空指针异常bug修复
已修改7个文件
76 ■■■■■ 文件已修改
Source/UBCS-WEB/src/views/code/code.vue 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowModelController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeFixedValueController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/code/code.vue
@@ -2779,12 +2779,11 @@
      }
      //console.log(this.form);
      //为form绑定值
      this.changeSectypeFormItems(condition == "add" ? null : row);
      this.changeSectypeFormItems(condition == "add" ? null:row);
      this.addBasicCodeSettingBox = true;
    },
    /** 新增基础码段*/
    async saveOrEditBasicCode() {
      this.isLoadingSecCodeAddBtn = true;
      if (
        this.selectionList[0].oid == null ||
        this.selectionList[0].oid == ""
@@ -2792,26 +2791,28 @@
        this.$message.warning("缺失必要参数,请重新选择编码规则后再试!");
        return;
      }
      if (!this.checkForm()) {
        return;
      }
      this.isLoadingSecCodeAddBtn = true;
      this.form.pkCodeRule = this.selectionList[0].oid;
      if (this.form.oid == "" || this.form.oid == null) {
        if (this.checkForm()) {
          await addSave(this.form).then(
            () => {
              this.$message({
                type: "success",
                message: "操作成功!",
              });
              console.log(this.form)
              // 关闭对话框
              this.addBasicCodeSettingBox = false;
              // 点击新增基础码段,关闭窗口之后触发重新加载
              this.loadBasic(this.selectionList[0]);
            },
            (error) => {
              window.console.log(error);
            }
          );
        }
        await addSave(this.form).then(
          () => {
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            console.log(this.form)
            // 关闭对话框
            this.addBasicCodeSettingBox = false;
            // 点击新增基础码段,关闭窗口之后触发重新加载
            this.loadBasic(this.selectionList[0]);
          },
          (error) => {
            window.console.log(error);
          }
        );
      } else {
        // 可能参照引用的业务类型会发生改变所以这儿直接对referConfig的json进行改变
        if (
@@ -2825,7 +2826,7 @@
          // let referValueInfo = JSON.parse(this.form.referValueInfo);
          // referValueInfo.referType = this.form.referBtmId;
        }
        let oldBasicSec = this.selectionBasicList.at(-1);
        let oldBasicSec = this.selectionBasicList.slice(-1)[0];
        let secType = this.form.secType;
        Vue.set(this.form, 'isClearValue', false);
        if ((oldBasicSec.secType == "codefixedsec" || oldBasicSec.secType === "codeclassifysec") && oldBasicSec.secType != secType) {
@@ -3066,7 +3067,7 @@
      if (!this.tipsMessage(this.selectionBasicList)) {
        return;
      }
      if (this.selectionList.at(-1).lcStatus != "Editing") {
      if (this.selectionList.slice(-1)[0].lcStatus != "Editing") {
        this.$message.warning('编码规则状态不是"编辑中",不允许删除码段!');
        return;
      }
@@ -3212,7 +3213,7 @@
    },
    /** 基础码段刷新时查询*/
    refreshChangeBasicSec() {
      this.loadBasic(this.selectionList.at(-1));
      this.loadBasic(this.selectionList.slice(-1)[0]);
    },
    /** 操作基础码段中搜索清空等按钮的显示/隐藏*/
    hideBasicTable(hideBoolean) {
@@ -3288,7 +3289,7 @@
    },
    /** 码段类型改变时,增加对应的form表单中的属性*/
    changeSectypeFormItems(row) {
      console.log(row)
      //console.log(row)
      if (
        func.isEmpty(this.enumParam.secTypeList) ||
        this.enumParam.secTypeList.length == 0
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowModelController.java
@@ -18,19 +18,15 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.vci.ubcs.flow.core.utils.TaskUtil;
import com.vci.ubcs.flow.engine.entity.FlowModel;
import com.vci.ubcs.flow.engine.service.FlowEngineService;
import com.vci.ubcs.flow.engine.service.FlowTaskUserService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.launch.constant.FlowConstant;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeFixedValueController.java
@@ -132,7 +132,7 @@
            dtoList.add(codeFixedValueDTO);
        }
        String codefixedsecoid = (String) param.get("codeFixedSecOid");
        VciBaseUtil.alertNotNull(dtoList,"码值对象集合",codefixedsecoid,"固定码段的主键");
        VciBaseUtil.alertNotNull(codefixedsecoid,"固定码段的主键");
        if (CollectionUtils.isEmpty(dtoList)){
            return R.status(codeFixedValueService.batchDeleteBySecOid(codefixedsecoid));
        }
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java
@@ -312,7 +312,7 @@
            s = engineService.addSaveCode(orderDTO);
            saveLogUtil.operateLog("编码申请",false,orderDTO.toString());
        }catch (Exception e){
            saveLogUtil.operateLog("编码申请",true,e.getMessage());
            saveLogUtil.operateLog("编码申请",true,e.toString());
            throw e;
        }
        return R.success(s);
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -465,7 +465,7 @@
            );
        }catch (Exception e){
            // 插入更改日志记录
            saveLogUtil.operateLog(CodeDefaultLC.getTextByValue(baseModelDTO.getLcStatus()),true,e.getMessage());
            saveLogUtil.operateLog(CodeDefaultLC.getTextByValue(baseModelDTO.getLcStatus()),true,e.toString());
            throw e;
        }
    }
@@ -3113,7 +3113,7 @@
            saveLogUtil.operateLog("数据更改",false, StringUtil.format("{}\n修改为:\n{}",JSON.toJSONString(Collections.singletonList(oldCbo)),JSON.toJSONString(Collections.singletonList(cbo))));
        } catch (Exception vciError) {
            // 记录数据更改报错时的日志
            saveLogUtil.operateLog("数据更改",true,vciError.getMessage());
            saveLogUtil.operateLog("数据更改",true,vciError.toString());
            throw new VciBaseException("数据更改保存出错了", new String[0], vciError);
        }
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
@@ -843,7 +843,7 @@
                }
                // 单次导入数量限制
                if(sheetDataSetList.get(i).getRowData().size() > IMPORT_DATA_LIMIT){
                    throw new ServiceException("为了保证系统的稳定性,请一次不要导入超过"+IMPORT_DATA_LIMIT+"条的数据");
                    throw new ServiceException(StringUtil.format("为了保证系统的稳定性,请一次不要导入超过{}条的数据",IMPORT_DATA_LIMIT));
                }
                //历史导入的时候不处理编码
                //----逻辑内容----
@@ -1132,7 +1132,7 @@
            if(StringUtils.isNotBlank(excelFileName)) {
                codeImProtRusultVO.setFilePath(excelFileName);
                codeImProtRusultVO.setFileOid("");
                saveLogUtil.operateLog("历史数据导入",true, StringUtil.format("错误信息:{}",JSON.toJSONString(shetNameMap)) );
                saveLogUtil.operateLog("历史数据导入",true, StringUtil.format("错误信息:{}",JSON.toJSONString(shetNameMap)));
            }else{
                saveLogUtil.operateLog("历史数据导入",false, StringUtil.format("导入到分类{}中,导入成功总数为:{}", JSON.toJSONString(classifyFullInfo),importCount.get(0)));
            }
@@ -1141,7 +1141,7 @@
            }
            return codeImProtRusultVO;
        }catch (Exception e){
            saveLogUtil.operateLog("历史数据导入",true,e.getMessage());
            saveLogUtil.operateLog("历史数据导入",true,e.toString());
            throw e;
        }
    }
@@ -1456,7 +1456,7 @@
            }
            saveLogUtil.operateLog("批量申请编码",false, StringUtil.format("批量导入申请成功共{}条数据,生成的码值如下【{}】",codeList.size(),codeList));
        }catch (Exception e){
            saveLogUtil.operateLog("批量申请编码",true,e.getMessage());
            saveLogUtil.operateLog("批量申请编码",true,e.toString());
            throw e;
        }
        return uuid;
@@ -3861,6 +3861,7 @@
                        } else {
                            Map<String, String> classifyDataMap = VciBaseUtil.objectToMapString(classifyVO);
                            String value = classifyDataMap.getOrDefault(attrVO.getClassifyInvokeAttr(), "");
                            log.error("================================当前分类注入的value值为:==========================",value);
                            cbo.setAttributeValue(attrId, value);
                        }
                    } catch (Throwable e) {
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
@@ -559,12 +559,6 @@
            connect by prior codeclassify0.PARENTCODECLASSIFYOID = codeclassify0.oid
    </select>
    <select id="selectStartWithCurrentOid" resultMap="plCodeClassifyResultMap">
        select * from <include refid="tableName"/>
                          start with oid = #{oid}
        connect by prior oid = parentcodeclassifyoid;
    </select>
    <update id="batchUpdateLcStatus" parameterType="java.util.List">
        BEGIN
        <foreach collection="records" item="item" index="index" separator=";">