| | |
| | | prop: "field", |
| | | cell: true, |
| | | clearable: false, |
| | | blur: (value) => this.updateAttrBlur(value), |
| | | // blur: (value) => this.updateAttrBlur(value), |
| | | },{ |
| | | label: "列名(*)", |
| | | prop: "title", |
| | | cell: true, |
| | | clearable: false, |
| | | blur: (value) => this.updateAttrBlur(value), |
| | | // blur: (value) => this.updateAttrBlur(value), |
| | | },{ |
| | | label: "字段类型(*)", |
| | | prop: "fieldTypeText", |
| | |
| | | }, { |
| | | value: 'textarea', label: '文本域' |
| | | }], |
| | | blur: (value) => this.updateAttrBlur(value), |
| | | // blur: (value) => this.updateAttrBlur(value), |
| | | },{ |
| | | label: "列表可排序", |
| | | prop: "sort", |
| | |
| | | type:"switch", |
| | | width: '80px', |
| | | value: true, |
| | | blur: (value) => this.updateAttrBlur(value), |
| | | // blur: (value) => this.updateAttrBlur(value), |
| | | },{ |
| | | label: "排序字段", |
| | | prop: "attrSortField", |
| | | cell: true, |
| | | clearable: false, |
| | | blur: (value) => this.updateAttrBlur(value), |
| | | // blur: (value) => this.updateAttrBlur(value), |
| | | },{ |
| | | label: "字段宽度", |
| | | prop: "width", |
| | | cell: true, |
| | | clearable: false, |
| | | blur: (value) => this.updateAttrBlur(value), |
| | | // blur: (value) => this.updateAttrBlur(value), |
| | | },{ |
| | | label: "列固定位置", |
| | | prop: "fixedPosition", |
| | |
| | | clearable: false, |
| | | value: 'noFixed', |
| | | dicData: [{value: 'noFixed', label: '不固定'}, {value: 'left', label: '左边'}, {value: 'right', label: '右边'}], |
| | | blur: (value) => this.updateAttrBlur(value), |
| | | // blur: (value) => this.updateAttrBlur(value), |
| | | },{ |
| | | label: "js显示代码", |
| | | prop: "templet", |
| | | cell: true, |
| | | clearable: false, |
| | | blur: (value) => this.updateAttrBlur(value), |
| | | // blur: (value) => this.updateAttrBlur(value), |
| | | }, |
| | | ] |
| | | }, |
| | |
| | | <el-tag>{{ row.attrDataTypeText }}</el-tag> |
| | | </template> |
| | | <template slot="menu" slot-scope="{row,index}"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="cellEditClick(row)">编辑 |
| | | <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="cellEditClick(row,index)">编辑 |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit" |
| | | @click="removeFormAttrTable(row,index)">移除 |
| | |
| | | if (!this.btmType.attributes) { |
| | | this.btmType.attributes = []; |
| | | } |
| | | console.log(this.attrRef.selectData); |
| | | // console.log(this.attrRef.selectData); |
| | | this.attrRef.selectData.forEach(item => { |
| | | this.btmType.attributes.push({ |
| | | id: item.id, |
| | |
| | | }, |
| | | // 列表编辑 |
| | | cellEditClick(cell) { |
| | | console.log(cell); |
| | | // console.log(cell); |
| | | cell.$cellEdit = true; |
| | | }, |
| | | // 列表编辑保存 |
| | | cellEditSave(row) { |
| | | this.btmType.attributes[row.$index].name = row.name |
| | | this.btmType.attributes[row.$index].defaultValue = row.defaultValue; |
| | | this.btmType.attributes[row.$index].description = row.description; |
| | | cellEditSave(row,index) { |
| | | // console.log("1111111111111111111111") |
| | | this.btmType.attributes[index].name = row.name |
| | | this.btmType.attributes[index].defaultValue = row.defaultValue; |
| | | this.btmType.attributes[index].description = row.description; |
| | | row.$cellEdit = false; |
| | | // console.log(this.btmType.attributes); |
| | | this.$refs.attrTable.refreshTable(); |
| | | }, |
| | | // 打开版本规则参照 |
| | | openRevision() { |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | |
| | | * |
| | | */ |
| | | @ApiModelProperty(value = "") |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | /** |
| | | * 规则名称 |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | |
| | | * |
| | | */ |
| | | @ApiModelProperty(value = "") |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | /** |
| | | * 所属行业名称 |
| | |
| | | package com.vci.ubcs.omd.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | /** |
| | | * 时间戳,用于校验是否最新数据 |
| | | */ |
| | | private Date ts; |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | /** |
| | | * 业务类型所属领域 |
| | |
| | | package com.vci.ubcs.omd.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | private Date ts; |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | /** |
| | | * 类的全路径 |
| | |
| | | package com.vci.ubcs.omd.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | } |
| | |
| | | package com.vci.ubcs.omd.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | /** |
| | | * 时间戳,用于校验是否最新数据 |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | * 时间戳 |
| | | */ |
| | | @ApiModelProperty(value = "时间戳") |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | * |
| | | */ |
| | | @ApiModelProperty(value = "") |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | /** |
| | | * |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | * |
| | | */ |
| | | @ApiModelProperty(value = "") |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | /** |
| | | * |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | |
| | |
| | | import com.alibaba.fastjson.annotation.JSONField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | |
| | | /** |
| | | * 时间戳 |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | } |
| | |
| | | package com.vci.ubcs.omd.vo; |
| | | |
| | | import com.alibaba.fastjson.annotation.JSONField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.vci.ubcs.omd.entity.BtmTypeAttribute; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | } |
| | |
| | | package com.vci.ubcs.omd.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | /** |
| | | * 时间戳,格式是yyyy-MM-dd HH:mm:ss.SSS |
| | | */ |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss.SSS" |
| | | ) |
| | | private Date ts; |
| | | |
| | | /** |
| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springframework.web.server.ServerErrorException; |
| | | |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.lang.reflect.Method; |
| | |
| | | * @param oid 分类的主键 |
| | | * @return 数据集合 |
| | | */ |
| | | List<CodeClassify> selectCodeClassifyVOByTree(@Param("oid") String oid); |
| | | List<CodeClassify> selectCodeClassifyVOByTree(@Param("oid") String oid,@Param("tenantId") String tenantId); |
| | | |
| | | /** |
| | | * 查找树形结构 |
| | | * |
| | | * @return 数据集合 |
| | | */ |
| | | List<CodeClassify> selectCodeClassifyDOByTree(@Param("id") String id,@Param("lcstatus") String lcstatus,@Param("parentcodeclassifyoid") String parentcodeclassifyoid); |
| | | List<CodeClassify> selectCodeClassifyDOByTree(@Param("id") String id,@Param("lcstatus") String lcstatus,@Param("parentcodeclassifyoid") String parentcodeclassifyoid,@Param("tenantId") String tenantId); |
| | | |
| | | /** |
| | | * 查询数据与PL_CODE_KEYATTRREPEAT、PL_CODE_RESEMBLERULE、PL_CODE_RULE联查 |
| | |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private IBtmTypeClient btmTypeClient; |
| | | |
| | | @Value("${user-info.tenant-id}") |
| | | private String tenantId; |
| | | |
| | | /** |
| | | * 日志 |
| | |
| | | } |
| | | if(StringUtils.isNotBlank(id) || StringUtils.isNotBlank(lcStatus) ){ |
| | | doList = codeClassifyMapper |
| | | .selectCodeClassifyDOByTree(treeQueryObject.getConditionMap().get("id"),treeQueryObject.getConditionMap().get("lcStatus"),treeQueryObject.getParentOid()); |
| | | .selectCodeClassifyDOByTree(treeQueryObject.getConditionMap().get("id"),treeQueryObject.getConditionMap().get("lcStatus"),treeQueryObject.getParentOid(), AuthUtil.getTenantId().equals(this.tenantId) ? "":AuthUtil.getTenantId()); |
| | | }else{ |
| | | doList =codeClassifyMapper.selectCodeClassifyVOByTree(treeQueryObject.getParentOid()); |
| | | doList =codeClassifyMapper.selectCodeClassifyVOByTree(treeQueryObject.getParentOid(), AuthUtil.getTenantId().equals(this.tenantId) ? "":AuthUtil.getTenantId()); |
| | | } |
| | | List<CodeClassifyVO> voList = codeClassifyDO2VOs(doList); |
| | | TreeWrapperOptions treeWrapperOptions = new TreeWrapperOptions(PARENT_FIELD_NAME.toLowerCase(Locale.ROOT)); |
| | | TreeWrapperOptions treeWrapperOptions = new TreeWrapperOptions(PARENT_FIELD_NAME); |
| | | treeWrapperOptions.copyFromTreeQuery(treeQueryObject); |
| | | List<Tree> tree= revisionModelUtil.doList2Trees(voList,treeWrapperOptions,(CodeClassifyVO s) ->{ |
| | | //可以在这里处理树节点的显示 |
| | |
| | | */ |
| | | @Override |
| | | public List<CodeClassifyVO> selectCodeClassifyDOByTree(TreeQueryObject treeQueryObject) { |
| | | List<CodeClassify> doList =codeClassifyMapper.selectCodeClassifyVOByTree(treeQueryObject.getParentOid()); |
| | | List<CodeClassify> doList =codeClassifyMapper.selectCodeClassifyVOByTree(treeQueryObject.getParentOid(),AuthUtil.getTenantId()); |
| | | List<CodeClassifyVO> voList = codeClassifyDO2VOs(doList); |
| | | return voList; |
| | | } |
| | |
| | | List<CodeClassifyVO> voList = codeClassifyDO2VOs(doList); |
| | | return voList; |
| | | } |
| | | |
| | | |
| | | // /** |
| | | // * 根据树形查询对象来查询数据对象 |
| | |
| | | Map<String,Object> condition = new HashMap<>(1); |
| | | condition.put("pkbtmtype",topClassifyVO.getBtmTypeId()); |
| | | R<BtmTypeVO> btmTypeDetail = btmTypeClient.getDetail(btmTypeOid); |
| | | if(btmTypeDetail.getCode() != 200){ |
| | | if(!btmTypeDetail.isSuccess()){ |
| | | throw new ServiceException("业务类型feign接口调用出错"); |
| | | } |
| | | List<BtmTypeAttributeVO> unDefaultAttributes = btmTypeDetail.getData().getAttributes(); |
| | |
| | | }); |
| | | } |
| | | R<BtmTypeVO> btmTypeVOR = btmTypeClient.getDefaultAttrByBtmId(topClassifyVO.getBtmTypeId()); |
| | | if(btmTypeVOR.getCode() != 200){ |
| | | if(!btmTypeVOR.isSuccess()){ |
| | | throw new ServiceException("业务类型feign接口调用出错"); |
| | | } |
| | | List<BtmTypeAttributeVO> defaultAttrVOS = btmTypeVOR.getData().getAttributes(); |
| | |
| | | return dataGrid; |
| | | } |
| | | //这个业务类型下的所有属性 |
| | | R<BtmTypeVO> btmTypeVOR = btmTypeClient.getAllAttributeByBtmId(codeClassifyTemplateDO.getBtmTypeId()); |
| | | if(btmTypeVOR.getCode() != 200){ |
| | | R<BtmTypeVO> btmTypeVOR = btmTypeClient.getAllAttributeByBtmOid(codeClassifyTemplateDO.getBtmTypeId()); |
| | | if(!btmTypeVOR.isSuccess()){ |
| | | throw new ServiceException("业务类型feign调用错误!"); |
| | | } |
| | | |
| | |
| | | conditionMap.put("domain", AppConstant.APPLICATION_NAME_CODE); |
| | | baseQueryObject.setConditionMap(conditionMap); |
| | | R<Page<BtmTypeVO>> btmTypeClientRefPage = btmTypeClient.getRefPage(baseQueryObject); |
| | | if(btmTypeClientRefPage.getCode() != 200){ |
| | | if(!btmTypeClientRefPage.isSuccess()){ |
| | | throw new ServiceException("业务类型feign接口调用错误"); |
| | | } |
| | | return btmTypeClientRefPage.getData(); |
| | |
| | | */ |
| | | @Override |
| | | public boolean checkCodeRuleRepeat(CodeRuleDTO codeRuleDTO){ |
| | | List<CodeRule> codeRulesList = this.codeRuleMapper.selectList(Wrappers.<CodeRule>query().lambda().eq(CodeRule::getId, codeRuleDTO.getId())); |
| | | // 根据规则id查询编号 |
| | | List<CodeRule> codeRulesList = this.codeRuleMapper.selectList(Wrappers.<CodeRule>query() |
| | | .lambda().eq(CodeRule::getId, codeRuleDTO.getId()) |
| | | .eq(CodeRule::getTenantId,AuthUtil.getTenantId().equals(this.tenantId) ? "":codeRuleDTO.getTenantId())); |
| | | if(!codeRulesList.isEmpty()){ |
| | | return codeRulesList.parallelStream().anyMatch(codeRule -> { |
| | | if(StringUtils.isNotBlank(codeRuleDTO.getOid())){ |
| | | // 代表是修改 |
| | | // 代表是修改,不是将编号修改相同的编号 |
| | | return !codeRule.getOid().equals(codeRuleDTO.getOid()); |
| | | }else { |
| | | return true; |
| | |
| | | } |
| | | R<BtmTypeVO> r = btmTypeClient.getDefaultAttrByBtmId(btmType); |
| | | List<BtmTypeAttributeVO> attributes = r.getData().getAttributes(); |
| | | if (r.getCode() != 200 || attributes.isEmpty()) { |
| | | if (!r.isSuccess() || attributes.isEmpty()) { |
| | | return false; |
| | | } |
| | | return attributes.stream().anyMatch(item -> item.getId().equals(selectKey)); |
| | |
| | | //checkReferConfig(referConfigVO); |
| | | //使用业务类型查询 |
| | | R<BtmTypeVO> allAttributeByBtmId = btmTypeClient.getAllAttributeByBtmId(referConfigVO.getReferType()); |
| | | if (allAttributeByBtmId.getCode() != 200) { |
| | | if (!allAttributeByBtmId.isSuccess()) { |
| | | throw new ServiceException("业务类型feign接口调用错误!"); |
| | | } |
| | | if (Func.isEmpty(allAttributeByBtmId.getData())) { |
| | |
| | | } |
| | | |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referConfigVO.getReferType())); |
| | | if (listR.getCode() != 200) { |
| | | if (!listR.isSuccess()) { |
| | | throw new ServiceException(Func.isNotBlank(listR.getMsg()) ? listR.getMsg() : "业务类型feign接口调用错误!"); |
| | | } |
| | | if (listR.getData().isEmpty()) { |
| | |
| | | String tableName =""; |
| | | try { |
| | | R<BtmTypeVO> r = btmTypeClient.getAllAttributeByBtmId(templateVO.getBtmTypeId()); |
| | | if(r.getCode()!=200) { |
| | | if(!r.isSuccess()) { |
| | | throw new Throwable(r.getMsg()); |
| | | } |
| | | BtmTypeVO btmTypeVO = r.getData(); |
| | |
| | | String tableName =""; |
| | | try { |
| | | R<BtmTypeVO> r = btmTypeClient.getAllAttributeByBtmId(templateVO.getBtmTypeId()); |
| | | if(r.getCode()!=200) { |
| | | if(!r.isSuccess()) { |
| | | throw new Throwable(r.getMsg()); |
| | | } |
| | | BtmTypeVO btmTypeVO = r.getData(); |
| | |
| | | map-underscore-to-camel-case: false |
| | | call-setters-on-nulls: true |
| | | |
| | | |
| | | #顶层批量申请配置 |
| | | batchadd: |
| | | exportattr: |
| | |
| | | <result column="CODERULEOID" property="codeRuleOid"/> |
| | | <result column="CODEKEYATTRREPEATOID" property="codeKeyAttrRepeatOid"/> |
| | | <result column="CODERESEMBLERULEOID" property="codeResembleRuleOid"/> |
| | | <result column="TENANT_ID" property="tenantId"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectPlCodeClassifyPage" resultMap="plCodeClassifyResultMap"> |
| | | select * from PL_CODE_CLASSIFY where is_deleted = 0 |
| | |
| | | codeclassify0.CODERESEMBLERULEOID as coderesembleruleoid, |
| | | codeclassify0.LCSTATUS as lcstatus, |
| | | codeclassify0.TS as ts, |
| | | codeclassify0.TENANT_ID as tenantId , |
| | | coderuleoid.name as codeRuleOidName, |
| | | codekeyattrrepeatoid.name as codeKeyAttrRepeatOidName, |
| | | coderesembleruleoid.name as codeResembleRuleOidName |
| | |
| | | </if> |
| | | <if test="oid = null"> |
| | | codeclassify0.parentcodeclassifyoid is null |
| | | </if> |
| | | <if test="tenantId != null and tenantId != ''"> |
| | | codeclassify0.tenant_id = #{tenantId} |
| | | </if> |
| | | </where> |
| | | order by id asc |
| | |
| | | select oid, |
| | | level from pl_code_classify start with oid= #{oid} connect by prior PARENTCODECLASSIFYOID = oid |
| | | </select> |
| | | |
| | | |
| | | <select id="getIdPathToNamePathByParentId" resultMap="plCodeClassifyResultMap"> |
| | | select codeclassify0.OWNER as owner, |
| | |
| | | codeclassify0.CODERESEMBLERULEOID as coderesembleruleoid, |
| | | codeclassify0.LCSTATUS as lcstatus, |
| | | codeclassify0.TS as ts, |
| | | codeclassify0.TENANT_ID as tenantId , |
| | | coderuleoid.name as codeRuleOidName, |
| | | codekeyattrrepeatoid.name as codeKeyAttrRepeatOidName, |
| | | coderesembleruleoid.name as codeResembleRuleOidName |
| | |
| | | and codeclassify0.parentcodeclassifyoid is null |
| | | and codeclassify0.id = #{id} |
| | | </if> |
| | | order by id asc |
| | | </select> |
| | | |
| | | <select id="selectCodeClassifyDOByTree" resultMap="plCodeClassifyResultMap"> |
| | | select codeclassify0.OWNER as owner, |
| | | codeclassify0.BTMTYPEID as btmtypeid, |
| | | codeclassify0.CREATOR as creator, |
| | | codeclassify0.CREATETIME as createtime, |
| | | codeclassify0.LASTMODIFIER as lastmodifier, |
| | | codeclassify0.DESCRIPTION as description, |
| | | codeclassify0.ORDERNUM as ordernum, |
| | | codeclassify0.CODERULEOID as coderuleoid, |
| | | codeclassify0.OID as oid, |
| | | codeclassify0.BTMNAME as btmname, |
| | | codeclassify0.BTMTYPENAME as btmtypename, |
| | | codeclassify0.CODEKEYATTRREPEATOID as codekeyattrrepeatoid, |
| | | codeclassify0.PARENTCODECLASSIFYOID as parentcodeclassifyoid, |
| | | codeclassify0.NAME as name, |
| | | codeclassify0.LASTMODIFYTIME as lastmodifytime, |
| | | codeclassify0.ID as id, |
| | | codeclassify0.CODERESEMBLERULEOID as coderesembleruleoid, |
| | | codeclassify0.LCSTATUS as lcstatus, |
| | | codeclassify0.TS as ts, |
| | | coderuleoid.name as codeRuleOidName, |
| | | codekeyattrrepeatoid.name as codeKeyAttrRepeatOidName, |
| | | coderesembleruleoid.name as codeResembleRuleOidName |
| | | from pl_code_classify codeclassify0 |
| | | left join pl_code_rule coderuleoid |
| | | on codeclassify0.codeRuleOid = coderuleoid.oid |
| | | left join pl_code_keyattrrepeat codekeyattrrepeatoid |
| | | on codeclassify0.codeKeyAttrRepeatOid = codekeyattrrepeatoid.oid |
| | | left join pl_code_resemblerule coderesembleruleoid |
| | | on codeclassify0.codeResembleRuleOid = coderesembleruleoid.oid |
| | | where codeclassify0.lcstatus = #{lcstatus} |
| | | <if test="parentcodeclassifyoid != null and parentcodeclassifyoid != ''"> |
| | | and codeclassify0.parentcodeclassifyoid = #{parentcodeclassifyoid} |
| | | </if> |
| | | <if test="parentcodeclassifyoid == null or parentcodeclassifyoid == ''"> |
| | | and codeclassify0.parentcodeclassifyoid is null |
| | | and codeclassify0.id = #{id} |
| | | <if test="tenantId != null and tenantId != ''"> |
| | | and codeclassify0.tenant_id = #{tenantId} |
| | | </if> |
| | | order by id asc |
| | | </select> |
| | |
| | | * @return 执行结果 |
| | | */ |
| | | @Override |
| | | public R submit(BtmTypeDTO btmTypeDTO, boolean autoCreateTable) { |
| | | TransactionStatus transaction = null; |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R submit(BtmTypeDTO btmTypeDTO, boolean autoCreateTable) throws ServiceException { |
| | | /*TransactionStatus transaction = null; |
| | | DefaultTransactionDefinition def = null; |
| | | if (autoCreateTable) { |
| | | def = new DefaultTransactionDefinition(); |
| | |
| | | // 事物隔离级别,开启新事务,这样会比较安全些。 |
| | | transaction = dataSourceTransactionManager.getTransaction(def); |
| | | // 获得事务状态 |
| | | } |
| | | }*/ |
| | | checkBtmTypeBeforeSave(btmTypeDTO); |
| | | BtmType btmTypeDO = Optional.ofNullable(BeanUtil.copy(btmTypeDTO, BtmType.class)).orElseGet(BtmType::new); |
| | | btmTypeDO.setBizDomain(btmTypeDTO.getBizDomain()); |
| | |
| | | btmTypeVO.setAttributes(afterAttributes); |
| | | try { |
| | | if (autoCreateTable) { |
| | | // checkTableSame(btmTypeVO); |
| | | // checkTableSame(btmTypeVO); |
| | | R result = DomainRepeater.submitBtmType(btmTypeDTO.getBizDomain(), btmTypeVO); |
| | | if (result.isSuccess()){ |
| | | List<ModifyAttributeInfo> infoList = new ArrayList<>(); |
| | |
| | | }); |
| | | modifyAttributeService.saveBatch(ModifyAttributeWrapper.build().listEntityBeforeSave(infoList)); |
| | | } |
| | | dataSourceTransactionManager.commit(transaction); |
| | | // dataSourceTransactionManager.commit(transaction); |
| | | }else { |
| | | dataSourceTransactionManager.rollback(transaction); |
| | | return R.fail(result.getMsg()); |
| | | // dataSourceTransactionManager.rollback(transaction); |
| | | // 创建表报错,抛出异常让该方法回滚 |
| | | throw new VciBaseException(result.getMsg()); |
| | | // return R.fail(result.getMsg()); |
| | | } |
| | | } |
| | | } catch (Throwable e) { |
| | | if (autoCreateTable) { |
| | | dataSourceTransactionManager.rollback(transaction); |
| | | // dataSourceTransactionManager.rollback(transaction); |
| | | throw new VciBaseException(e.getMessage()); |
| | | } |
| | | } |
| | |
| | | public List<Map<String,String>> getByRoleUserList(BladeUser user, String roleName) { |
| | | // 考虑到一个用户可以拥有多种角色权限,而用户关联角色权限是用role_id字段用逗号分隔角色id的,直接采用子查询来in查询不能实现,所以先查询角色id |
| | | R<String> roleIds = sysClient.getRoleIds(user.getTenantId(), roleName); |
| | | if(roleIds.getCode() != 200){ |
| | | if(!roleIds.isSuccess()){ |
| | | throw new ServiceException("系统服务feign接口调用错误!"); |
| | | } |
| | | if(Func.isBlank(roleIds.getData())){ |