田源
2024-04-15 fb5a9f2aa4dab720ff32ac229ac68f98de532a2a
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -147,6 +147,7 @@
    */
   @Value("${bzApply.seriesFlow:seriesFlow}")
   private String seriesFlow;
   /***
    * 是否变更系列
    */
@@ -316,6 +317,12 @@
   public static final String BTM_NAME = "btm:name";
   /**
    * 配置的用来申请集团码的用户
    */
   @Value("${docking.apply.personUserAccount:28201728}")
   public String applyCodeUserAccount;
   /**
    * 密级的字段
    */
   public static final String SECRET_FILED = "secretgrade";
@@ -451,7 +458,7 @@
            }
            R r = updateBatchByBaseModel(baseModelDTO.getBtmname(), baseModels);
            if (!r.isSuccess()) {
               throw new VciBaseException("更新数据出错,重试!" + r.getMsg());
               throw new VciBaseException("更新数据出错,请重试!" + r.getMsg());
            }
         }
         // 刚好顺序是一致的,所以直接按照codeallcode的顺序来拿业务数据
@@ -3470,7 +3477,7 @@
//      List<ClientBusinessObject> cbos = boService.queryByOnlySql(sqlBO.getSqlUnPage());
      if (CollectionUtils.isEmpty(cbos)) {
         throw new VciBaseException("数据在系统中不存在,是否因为修改过业务类型?");
         return R.fail("数据在系统中不存在,是否因为修改过业务类型?");
      }
//      Map<String, String> data = new HashMap<>();
      Map<String, String> cbo = cbos.get(0);
@@ -3480,7 +3487,7 @@
      wrapperData(dataList, templateVO, sqlBO.getSelectFieldList(), true);
      R<List<Map<String, String>>> result = R.data(Collections.singletonList(cbo));
      if(templateVO.getAttributes().isEmpty()){
         throw new ServiceException(String.format("主键为:{}的模板下,模板属性配置为空!",templateVO.getOid()));
         return R.fail(String.format("主键为:%s的模板下,模板属性配置为空!",templateVO.getOid()));
      }
      //处理返回数据与模板数据配置的字段不一样问题
      templateVO.getAttributes().stream().forEach(e -> {
@@ -4399,8 +4406,8 @@
               if (cboMap.containsKey(oid)) {
                  CodeAllCode codeAllCode = cboMap.get(oid);
                  codeAllCode.setId(baseModel.getId());
                  // codeAllCode.setLastModifier(AuthUtil.getUser().getUserName());
                  codeAllCode.setLastModifier(AuthUtil.getUser().getAccount());
                  // 主数据推送形式,是拿不到用户信息的
                  codeAllCode.setLastModifier(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount());
                  codeAllCode.setLastModifyTime(new Date());
                  codeAllCode.setLcStatus(baseModel.getLcStatus());
                  newCodeAllCodeList.add(codeAllCode);