Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
| | |
| | | if (this.disabledProp.includes(formItem.field)) { |
| | | formItem.readOnly = true; |
| | | } |
| | | if(formItem.field=='lcstatus'){ |
| | | formItem.field=formItem.field+'_text'; |
| | | formItem.readOnly=true; |
| | | } |
| | | // 设置表单校验的规则,文本 |
| | | let message = "请选择"; |
| | | let trigger = "change"; |
| | |
| | | }) |
| | | if(this.radio === 0){ |
| | | if(this.selectRow.length<=0){ |
| | | this.$message.warning('请选择要导出的模板') |
| | | this.ids=this.tableData.map(item => item.oid).join(',') |
| | | exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArr,limit:-1}).then(res=>{ |
| | | // console.log('res',res) |
| | | if(res){ |
| | | func.downloadFileByBlob(res); |
| | | this.escHandler() |
| | | } |
| | | }) |
| | | }else { |
| | | //已选择多选 |
| | | const selectList=[] |
| | |
| | | this.codeClassifyOid=firstProperty.oid; |
| | | this.coderuleoid=firstProperty.attributes.coderuleoid; |
| | | this.$emit("coderuleoid", this.coderuleoid ) |
| | | this.$emit('Treedata',this.Treedata) |
| | | }).catch(res=>{ |
| | | this.$message.error(res) |
| | | }) |
| | |
| | | tableHeadBtnData: { |
| | | type: Array, |
| | | }, |
| | | Treedata:{ |
| | | type:Array |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | //发布 |
| | | parameter: { |
| | | ids: [], |
| | | btmtype:'', |
| | | code: "", |
| | | type: '', |
| | | // this.visibleDeactivate ?'ENABLE':this.visibleEnable ? 'DISABLE' :this.visibleRecovery ? 'ROLLBACK' :'PUBLIC' |
| | |
| | | } |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | //状态搜索 |
| | |
| | | }, |
| | | // 发布 |
| | | setHandler() { |
| | | console.log('Treedata',this.Treedata) |
| | | if (this.selectRow.length > 0) { |
| | | let hasEditing = this.selectRow.some(item => item.lcstatus !== 'Editing'); |
| | | let showMessage = true; |
| | |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { |
| | | if (res.data.data.records && res.data.data.records.length != 0) { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + '-申请[' + this.result + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.template = this.userName + '-申请[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.type = 'PUBLIC'; |
| | | this.parameter.code = this.templateOid |
| | | this.parameter.code = this.templateOid; |
| | | this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype; |
| | | this.title = '流程审批' |
| | | this.visibleFlow = true; |
| | | } else { |
| | |
| | | this.$message.warning('您选择的数据全部为【发布状态】才可以发起流程'); |
| | | showMessage = false; |
| | | } else if (this.selectRow.length >= 1 && hasEditing && showMessage) { |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'DISABLE'}).then(res => { |
| | | if (res.data.records != [] && res.data.data.records.length != 0) { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + '-停用[' + this.result + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.template = this.userName + '-停用[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.type = 'DISABLE'; |
| | | this.parameter.code = this.templateOid |
| | | this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype; |
| | | this.title = '停用(冻结)编码数据' |
| | | this.visibleDeactivate = true; |
| | | } else { |
| | |
| | | this.$message.warning('选择的数据中状态无需再执行当前操作'); |
| | | showMessage = false; |
| | | } else if (this.selectRow.length >= 1 && hasEditing && showMessage) { |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'ENABLE'}).then(res => { |
| | | if (res.data.data.records && res.data.data.records.length != 0) { |
| | | this.parameter = res.data.data.records[0] |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + '-启用[' + this.result + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.template = this.userName + '-启用[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.type = 'Released'; |
| | | this.parameter.code = this.templateOid |
| | | this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype; |
| | | this.title = '启用编码数据' |
| | | this.visibleDeactivate = true; |
| | | } else { |
| | |
| | | showMessage = false; |
| | | } else if (this.selectRow.length >= 1 && (disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0) && showMessage) { |
| | | //disabledCount 和 releasedCount 中任意一个等于 this.selectRow 数组的长度则表示全部是同一种状态,返回 true 如果disabledCount 和 releasedCount 都大于0,则表示既有Disabled也有Released返回 true |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'ROLLBACK'}).then(res => { |
| | | if (res.data.records != [] && res.data.data.records.length != 0) { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + '-回收[' + this.result + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.template = this.userName + '-回收[' + this.selectRow[0].btmname + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.type = 'TakeBack'; |
| | | this.parameter.code = this.templateOid |
| | | this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype; |
| | | this.title = '回收编码数据' |
| | | this.visibleDeactivate = true; |
| | | } else { |
| | |
| | | <template> |
| | | <div> |
| | | <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag" class="app"> |
| | | <div style="display: flex;flex-wrap: wrap; display: inline-block" v-if="this.crudArrayFlag" class="app" > |
| | | <el-button-group> |
| | | <!--新增--> |
| | | <el-button v-if="attrEditVisible == false && attrFlagChiledren==false && editOpenFlag && (!checkStatus || crudLCStatus=='Editing' )" size="small" type="primary" icon="el-icon-plus" plain @click="busineHandle">添加 {{ msg }}</el-button> |
| | |
| | | <div> |
| | | <avue-form v-model="loneTreeNewForm" :option="option" v-if="flag == 'renonly'"> |
| | | </avue-form> |
| | | <avue-form v-model="loneTreeNewForm" :option="this.options" @submit="submits" v-else-if="flag == 'edit'"> |
| | | <avue-form v-model="loneTreeNewForm" :option="this.options" @submit="submits" v-else-if="flag == 'edit'"> |
| | | </avue-form> |
| | | <div> |
| | | <!-- 编码规则--> |
| | |
| | | }, |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: '请输入名称', trigger: 'blur' }, |
| | | { required: true, message: '请输入编号', trigger: 'blur' }, |
| | | ], |
| | | name:[ |
| | | { required: true, message: '请输入编号', trigger: 'blur' }, |
| | | { required: true, message: '请输入名称', trigger: 'blur' }, |
| | | ], |
| | | btmTypeName:[ |
| | | { required: true, message: '请选择业务类型', trigger: 'blur' }, |
| | |
| | | message: "添加成功!" |
| | | }); |
| | | done(row) |
| | | this.CrudRend() |
| | | this.TemRefresh(); |
| | | }).catch(res => { |
| | | this.$message({ |
| | | type: 'info', |
| | |
| | | //模板管理修改 |
| | | CrudRowUpdata(row,index,done) { |
| | | editSave(row).then(() => { |
| | | this.CrudRend() |
| | | this.TemRefresh(); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | |
| | | //模板管理删除 |
| | | CrudRowDel(row) { |
| | | deleteData(row).then(()=> { |
| | | this.CrudRend() |
| | | this.TemRefresh(); |
| | | }).catch(res => { |
| | | this.$message({ |
| | | type: 'info', |
| | |
| | | </span> |
| | | <span v-else-if="type.prop==='tab2'"> |
| | | <FlowPath :code="this.crudOid" :checkStatus="checkStatus" :crudLCStatus="crudLCStatus"></FlowPath> |
| | | |
| | | </span> |
| | | <span v-else-if="type.prop==='tab3'"> |
| | | <stage :code="this.crudOid"></stage> |
| | |
| | | startData: [], |
| | | form: {}, |
| | | option: { |
| | | height: "auto", |
| | | height: 340, |
| | | border: true, |
| | | align: 'center', |
| | | menu:!this.checkStatus || this.crudLCStatus == 'Editing', |
| | |
| | | index: true, |
| | | searchMenuSpan: 8, |
| | | searchBtn: false, |
| | | refreshBtn:false, |
| | | emptyBtn: false, |
| | | columnBtn: false, |
| | | editBtn:!this.checkStatus || this.crudLCStatus == 'Editing', |
| | |
| | | ids: 'ids', |
| | | flowTemplate: 'flowTemplate', |
| | | code: 'code', |
| | | type: 'type' |
| | | type: 'type', |
| | | btmtype:'btmtype' |
| | | } |
| | | } |
| | | } |
| | |
| | | processName: this.parameter[this.parameterKeys.flowTemplate], |
| | | topName: this.title, |
| | | ids: this.parameter[this.parameterKeys.ids], |
| | | oids: this.parameter[this.parameterKeys.ids], |
| | | btmtype:this.parameter[this.parameterKeys.btmtype], |
| | | vars:this.parameter['vars'] |
| | | } |
| | | }, |
| | |
| | | async apiSave() { |
| | | try { |
| | | const len = this.collectParam.flowTaskUsers.length |
| | | console.log(this.collectParam.flowTaskUsers) |
| | | console.log(len == 0) |
| | | console.log(len != this.initFrom.length) |
| | | console.log('saveParam',this.saveParam) |
| | | if (len == 0 && len != this.initFrom.length) { |
| | | this.$message({ |
| | | type: "error", |
| | | message: "请选择节点!" |
| | | }); |
| | | } else { |
| | | const {modelKey,modelName,processDesc,processName,templateId,topName,vars,ids} = this.saveParam |
| | | const vals= {modelKey,modelName,processDesc,processName,templateId,topName,ids,...vars} |
| | | console.log('vals',vals); |
| | | const {modelKey,modelName,processDesc,processName,templateId,topName,vars,ids,btmtype} = this.saveParam |
| | | let vals= {modelKey,modelName,processDesc,processName,templateId,topName,ids,btmtype,...vars} |
| | | vals.oids=ids; |
| | | const response = await personnelSave({ variables:vals, flowTaskUsers: this.collectParam.flowTaskUsers, }) |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: response.data.msg |
| | |
| | | } |
| | | |
| | | } catch { |
| | | console.error('接口调用失败') |
| | | this.$message.error('接口调用失败') |
| | | } |
| | | }, |
| | | handleClickTag(event) { |
| | | console.log(event.flowTaskUsers) |
| | | |
| | | console.log(this.collectParam.flowTaskUsers) |
| | | let flowTaskUsers = this.collectParam.flowTaskUsers |
| | | this.collectParam.flowTaskUsers = flowTaskUsers.map((item, index) => { |
| | | for (let i = 0; i < event.flowTaskUsers.length; i++) { |
| | |
| | | // this.collectParam.flowTaskUsers = {...this.collectParam.flowTaskUsers,userId,userName} |
| | | }, |
| | | handleCloseTag(event) { |
| | | console.log(event) |
| | | this.canCollect(event.name) |
| | | }, |
| | | handleSelect(event, index) { |
| | | const res = this.typeName.find(item => item.userId === event) |
| | | const { userName } = res |
| | | console.log(this.users) |
| | | this.$set(this.users, index, { ... this.collectParam.flowTaskUsers[index], userName }) |
| | | // this.users[index] = { ... this.collectParam.flowTaskUsers[index], userName } |
| | | console.log(this.users) |
| | | }, |
| | | done() { |
| | | this.dialogVisible = false |
| | |
| | | ], |
| | | option: { |
| | | ...options, |
| | | height: 383, |
| | | column: [ |
| | | { label: '模板编号', prop: 'modelKey' }, |
| | | { label: '模板名称', prop: 'modelName' }, |
| | |
| | | <master-tree @codeClassifyOid="codeClassifyOidList" @coderuleoid="coderuleoidList" :pageSize="this.pageSize" |
| | | :currentPage="this.currentPage" @tableDataArray="tableDataArrays" @tableHeadDataFateher="tableHeadDatas" |
| | | @tableHeadBttoms="tableHeadBttoms" @total="totals" @nodeClick="nodeClick" |
| | | @tableHeadFindData="tableHeadFindDatas"></master-tree> |
| | | @tableHeadFindData="tableHeadFindDatas" @Treedata="TreedataList"></master-tree> |
| | | </basic-container> |
| | | </el-aside> |
| | | <el-main> |
| | |
| | | <VciMasterCrud :page="this.page" :codeClassifyOid="this.codeClassifyOid" :coderuleoid="this.coderuleoid" |
| | | @pageSize="pageSizes" @currentPage="currentPages" :tableDataArray="tableDataArray" :total="this.total" |
| | | :tableHeadDataFateher="this.tableHeadDataFateher" :isLoading="isLoading" :templateOid="templateOid" |
| | | :tableHeadFindData="tableHeadFindData" :tableHeadBtnData="masterVrBtnList"></VciMasterCrud> |
| | | :tableHeadFindData="tableHeadFindData" :tableHeadBtnData="masterVrBtnList" :Treedata="Treedata"></VciMasterCrud> |
| | | </el-main> |
| | | </el-container> |
| | | </template> |
| | |
| | | currentPage: "1", |
| | | codeClassifyOid: "", |
| | | coderuleoid: "", |
| | | Treedata:[], |
| | | templateOid: "", |
| | | tableDataArray: [], |
| | | masterVrBtnList: [], |
| | |
| | | coderuleoidList(val) { |
| | | this.coderuleoid = val; |
| | | }, |
| | | TreedataList(val){ |
| | | this.Treedata=val |
| | | }, |
| | | pageSizes(val) { |
| | | this.pageSize = val |
| | | }, |
| | |
| | | width: 100, |
| | | value:0, |
| | | disabled:this.BooleanFlag , |
| | | hide:true, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | |
| | | <el-button @click="handleCancel">关闭</el-button> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-card shadow="hover"> |
| | | <el-card v-if="false" shadow="hover"> |
| | | <div slot="header"> |
| | | <span>审批信息</span> |
| | | </div> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-form-item label="描述"> |
| | | <el-input :disabled="true" type="textarea" v-model="form.reason" /> |
| | | <el-input :disabled="true" type="textarea" v-model="form.processDesc" /> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-card shadow="hover"> |
| | |
| | | this.flowList = data.data; |
| | | } |
| | | }) |
| | | leaveDetail(this.businessId,this.processInstanceId).then(res => { |
| | | /*leaveDetail(this.businessId,this.processInstanceId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.form = data.data; |
| | | } |
| | | }) |
| | | })*/ |
| | | }, |
| | | handleCancel() { |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.push({path: `/work/start`}); |
| | | this.$router.go(-1) |
| | | //this.$router.push({path: `/work/start`}); |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | { |
| | | label: '描述', |
| | | prop: 'reason', |
| | | prop: 'processDesc', |
| | | type: 'textarea', |
| | | span: 24, |
| | | rules: [ |
| | |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | 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.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | //将DTO转换为DO |
| | | CodeClassifyTemplateAttr codeClassifyTemplateAttrDO = new CodeClassifyTemplateAttr(); |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codeClassifyTemplateAttrDTO,codeClassifyTemplateAttrDO); |
| | | codeClassifyTemplateAttrDO.setCreateTime(codeClassifyTemplateAttrDO.getCreateTime()!=null?codeClassifyTemplateAttrDO.getCreateTime():new Date()); |
| | | codeClassifyTemplateAttrDO.setCreator(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | codeClassifyTemplateAttrDO.setLastModifyTime(new Date()); |
| | | codeClassifyTemplateAttrDO.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | codeClassifyTemplateAttrDOInsert.add(codeClassifyTemplateAttrDO); |
| | | |
| | | if(StringUtils.isNotBlank(codeClassifyTemplateAttrDO.getPrefixValue())){ |
| | |
| | | if(Func.isNotEmpty(codeReferConfigVO) && codeReferConfigVO.getIsPersistence()=="true"){ |
| | | codeReferConfigService.insert(codeReferConfigVO); |
| | | } |
| | | |
| | | } |
| | | |
| | | //执行数据保存操作 |
| | | // WebUtil.setPersistence(false);//不执行保存 |
| | | |
| | | //先都删了 |
| | | // VciQueryWrapperForDO deleteAttrWrapper = new VciQueryWrapperForDO(CodeClassifyTemplateAttrDO.class); |
| | | // deleteAttrWrapper.addQueryMap("CLASSIFYTEMPLATEOID",CLASSIFYTEMPLATEOID); |
| | | Map<String,Object> condition = new HashMap<>(); |
| | | condition.put("CLASSIFYTEMPLATEOID",CLASSIFYTEMPLATEOID); |
| | | List<CodeClassifyTemplateAttr> codeClassifyTemplateAttrDODelete = baseMapper.selectByMap(condition); |
| | |
| | | for (CodeClassifyTemplateAttr codeClassifyTemplateAttrDO:codeClassifyTemplateAttrDODelete){ |
| | | oids.add(codeClassifyTemplateAttrDO.getOid()); |
| | | } |
| | | // BatchCBO batchCBOTemplateDelete = new BatchCBO(); |
| | | if(!CollectionUtils.isEmpty(oids)){ |
| | | this.removeBatchByIds(oids); |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | // SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo(); |
| | | //处理可输可选的字符 |
| | | if(!CollectionUtils.isEmpty(prefix)){ |
| | | for (String s : prefix) { |
| | |
| | | dictBiz.setDictValue(s); |
| | | iDictBizClient.getCheck(dictBiz) ; |
| | | } |
| | | // .saveBySameNamespaceAndFlag(MdmBtmTypeConstant.CODE_CLASSIFY_TEMPLATE_ATTR,"prefix",prefix,sessionInfo); |
| | | } |
| | | if(!CollectionUtils.isEmpty(suffix)){ |
| | | for (String s : suffix) { |
| | |
| | | dictBiz.setDictValue(s); |
| | | iDictBizClient.getCheck(dictBiz) ; |
| | | } |
| | | // charService.saveBySameNamespaceAndFlag(MdmBtmTypeConstant.CODE_CLASSIFY_TEMPLATE_ATTR,"suffix",suffix,sessionInfo); |
| | | } |
| | | if(!CollectionUtils.isEmpty(dateFormates)){ |
| | | for (String s : dateFormates) { |
| | |
| | | dictBiz.setDictValue(s); |
| | | iDictBizClient.getCheck(dictBiz) ; |
| | | } |
| | | // charService.saveBySameNamespaceAndFlag(MdmBtmTypeConstant.CODE_CLASSIFY_TEMPLATE_ATTR,"dateFormates",dateFormates,sessionInfo); |
| | | } |
| | | |
| | | // WebUtil.setPersistence(true);//执行保存 |
| | | // boService.persistenceBatch(batchCBOTemplateDelete);//一起执行保存 |
| | | return codeClassifyTemplateAttrDO2VOs(codeClassifyTemplateAttrDOInsert); |
| | | } |
| | | |
| | |
| | | codeCls_template_insert.setNameOid(codeCls_template.getNameOid()); |
| | | codeCls_template_insert.setBtmname(codeCls_template.getBtmname()); |
| | | codeCls_template_insert.setLastR(String.valueOf(1)); |
| | | codeCls_template_insert.setFirstR(String.valueOf(1)); |
| | | codeCls_template_insert.setFirstR(String.valueOf(0)); |
| | | codeCls_template_insert.setFirstV(String.valueOf(1)); |
| | | codeCls_template_insert.setLastV(String.valueOf(1)); |
| | | codeCls_template_insert.setCreator(AuthUtil.getUser().getUserName()); |
| | | codeCls_template_insert.setCreator(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | codeCls_template_insert.setCreateTime(new Date()); |
| | | codeCls_template_insert.setTs(new Date()); |
| | | codeCls_template_insert.setLastModifier(AuthUtil.getUser().getUserName()); |
| | | codeCls_template_insert.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | codeCls_template_insert.setLastModifyTime(new Date()); |
| | | codeCls_template_insert.setRevisionRule(codeCls_template.getRevisionRule()); |
| | | codeCls_template_insert.setVersionRule(codeCls_template.getVersionRule()); |
| | |
| | | codeCls_template_insert.setId(codeCls_template.getId()); |
| | | codeCls_template_insert.setName(codeCls_template.getName()); |
| | | codeCls_template_insert.setDescription(codeCls_template.getDescription()); |
| | | codeCls_template_insert.setOwner(AuthUtil.getUser().getUserName()); |
| | | codeCls_template_insert.setOwner(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | codeCls_template_insert.setCopyFromVersion(codeCls_template.getOid()); |
| | | int insertCount = baseMapper.insert(codeCls_template_insert); |
| | | codeCls_template.setLastR("0"); |
| | | codeCls_template.setLastModifyTime(new Date()); |
| | | codeCls_template.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | baseMapper.updateById(codeCls_template); |
| | | //升版过后的模板oid |
| | | String templateNewOid = codeCls_template_insert.getOid(); |
| | | |
| | |
| | | cbo.setNameOid(VciBaseUtil.getPk()); |
| | | cbo.setCreateTime(new Date()); |
| | | cbo.setLastModifyTime(new Date()); |
| | | cbo.setCreator(AuthUtil.getUser().getUserName()); |
| | | cbo.setLastModifier(AuthUtil.getUser().getUserName()); |
| | | cbo.setCreator(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | cbo.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | cbo.setTenantId(AuthUtil.getTenantId()); |
| | | // //TODO:因为默认的属性都不拷贝,目前集团码叫name,并没有从DTO拷贝到cbo里。增加一个单独处理,以后再看要不要调整 |
| | | cbo.setName(orderDTO.getName() == null ? "" : orderDTO.getName()); |
| | |
| | | lineVO.setField(attrVO.getId() + "_line"); |
| | | lineVO.setType("line"); |
| | | lineVO.setText(key); |
| | | //找位置 |
| | | List<CodeClassifyTemplateAttrVO> collect = value.stream().filter(s -> "true".equals(s.getFormDisplayFlag())).collect(Collectors.toList()); |
| | | if(collect.size() == 0){ |
| | | continue; |
| | | } |
| | | //找位置 |
| | | for (int i = 0; i < itemVOS.size(); i++) { |
| | | UIFormItemVO record = itemVOS.get(i); |
| | | if (record.getField().equalsIgnoreCase(attrVO.getId())) { |
| | |
| | | setter.invoke(obj, ((BigDecimal) map.get(property.getName().toUpperCase())).intValue()); |
| | | map.remove(property.getName().toUpperCase()); |
| | | } else if (map.get(property.getName().toUpperCase()) != null) { |
| | | setter.invoke(obj, map.get(property.getName().toUpperCase())); |
| | | if(setter.getParameterTypes()[0].getSimpleName().equals("String")){ |
| | | setter.invoke(obj, map.get(property.getName().toUpperCase()) == null ? null:String.valueOf(map.get(property.getName().toUpperCase()))); |
| | | }else{ |
| | | setter.invoke(obj, map.get(property.getName().toUpperCase())); |
| | | } |
| | | map.remove(property.getName().toUpperCase()); |
| | | } |
| | | } |
| | |
| | | |
| | | public BaseModel reviseBusinessObject(BaseModel fromBo) { |
| | | BaseModel toBo = new BaseModel(); |
| | | // Map<String,String> data = new HashMap<>(); |
| | | // toBo.getData().put(data); |
| | | toBo.setOid(VciBaseUtil.getPk()); |
| | | toBo.setRevisionOid(VciBaseUtil.getPk()); |
| | | toBo.setNameOid(fromBo.getNameOid()); |
| | |
| | | toBo.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | toBo.setLastModifyTime(new Date()); |
| | | toBo.setRevisionRule(fromBo.getRevisionRule()); |
| | | toBo.setVersionRule(fromBo.getVersionRule()); |
| | | // RevisionValueObject rvObj = this.getNextRevision(fromBo.getBtmName(), fromBo.getNameoid(), item.revRuleName, item.revInput, revisionVal); |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(fromBo.getBtmname())); |
| | | toBo.setVersionRule(fromBo.getVersionRule());R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(fromBo.getBtmname())); |
| | | if (!listR.isSuccess() || listR.getData().size() == 0) { |
| | | throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); |
| | | } |
| | | Map<String, Object> nextRevision = commonsMapper.getNextRevision(listR.getData().get(0).getTableName(), fromBo.getNameOid()); |
| | | toBo.setRevisionSeq(Integer.parseInt(nextRevision.get("REVISIONSEQ").toString())); |
| | | toBo.setRevisionValue(nextRevision.get("REVISIONVAL").toString()); |
| | | // VersionValueObject versionObj = this.getVersionValue(item.verRuleName); |
| | | toBo.setVersionSeq(Integer.valueOf(nextRevision.get("VERSIONSEQ").toString())); |
| | | toBo.setVersionValue(nextRevision.get("VERSIONVAL").toString()); |
| | | toBo.setLctid(fromBo.getLctid()); |
| | |
| | | toBo.setName(fromBo.getName()); |
| | | toBo.setDescription(fromBo.getDescription()); |
| | | toBo.setOwner(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | // toBo.setCheckinBy(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | toBo.setCopyFromVersion(fromBo.getOid()); |
| | | toBo.getData().putAll(fromBo.getData()); |
| | | toBo.getData().put("CHECKINBY", String.valueOf(AuthUtil.getUser().getUserId())); |
| | | // this.initRevisionTypeAttributeValue(fromBo, toBo); |
| | | return toBo; |
| | | |
| | | } |
| | |
| | | } |
| | | baseMapper.batchUpdate(btmTypeAttributeDOList); |
| | | return BtmTypeAttributeWrapper.build().listEntityVO(btmTypeAttributeDOList); |
| | | // btmTypeAttributeDOList.stream().forEachOrdered(s -> { |
| | | // btmTypeAttributeDOMapper.insert(s); |
| | | // }); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | // 版本规则字段不能为空 |
| | | // vo.setNullableFlag(false); |
| | | vo.setAttributeLength(150); |
| | | if (Arrays.asList("lastr","firstr","lastv","firstv","revisionseq","versionseq").contains(id)){ |
| | | if (Arrays.asList("revisionseq","versionseq").contains(id)){ |
| | | vo.setAttributeLength(5); |
| | | vo.setAttrDataType(VciFieldTypeEnum.VTInteger.name()); |
| | | } |
| | |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | */ |
| | | public BtmTypeAttribute copyBtmTypeAttributeDTO2Entity(BtmTypeLinkAttributesDTO dto, String btmTypeOid, String creator, Date now){ |
| | | BtmTypeAttribute entity = Objects.requireNonNull(BeanUtil.copy(dto, BtmTypeAttribute.class)); |
| | | entity.setOid(VciBaseUtil.getPk()); |
| | | if (StringUtil.isBlank(entity.getOid())) { |
| | | entity.setOid(VciBaseUtil.getPk()); |
| | | } |
| | | entity.setBtmName(BtmTypeConstant.BTM_TYPE_ATTRIBUTE); |
| | | entity.setOwner(creator); |
| | | entity.setCreator(creator); |
| | |
| | | pl_omd_btm_type |
| | | </sql> |
| | | <update id="batchUpdate" parameterType="java.util.List"> |
| | | BEGIN |
| | | <foreach collection="records" item="item" index="index" separator=";"> |
| | | |
| | | <foreach collection="records" item="item" index="index" separator=";" open="BEGIN" close=";END;"> |
| | | update <include refid="tableName"/> set |
| | | id = #{item.id,jdbcType=VARCHAR}, |
| | | name = #{item.name,jdbcType=VARCHAR}, |
| | |
| | | ts = #{item.ts,jdbcType=TIMESTAMP} |
| | | where oid = #{item.oid,jdbcType=VARCHAR} |
| | | </foreach> |
| | | ;END; |
| | | |
| | | </update> |
| | | <delete id="batchDelete"> |
| | | delete from |