Merge remote-tracking branch 'origin/master'
| | |
| | | (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) || |
| | | (this.status === "amend" && formItem.field === "codeStandardEditType" ? "2" : null) || |
| | | //父组件如果是参照数据会将selectRow置空,selectRow不为空就说明不是参照要回填源标准号数据 |
| | | (this.status === "amend" && this.selectRow && (formItem.field === "oldcode" ? this.selectValue : null)), |
| | | (this.status === "amend" ? (this.selectRow && (formItem.field === "oldcode" ? this.selectValue : null)) : null), |
| | | placeholder: formItem.inputTip, |
| | | comboxKey: formItem.comboxKey, |
| | | tip: formItem.tooltips, |
| | |
| | | :selfColumnConfig="selfColumnConfig" |
| | | :selfColumnType="selfColumnType" |
| | | :type="type" |
| | | :status="status" |
| | | :selectRow="selectRow" |
| | | data-key="codeApplyForm" |
| | | secDTOListv-bind="$attrs" |
| | | @attrList="attrListForm" |
| | |
| | | } |
| | | }) |
| | | this.tableHeadFindDatas = newval; |
| | | // console.log('new',newval) |
| | | if (!this.isCodeArrayPushed) { |
| | | if (newval.find(item => item.prop === 'id')) { |
| | | this.CodeArray.push(newval.find(item => item.prop === 'id')); |
| | | } else { |
| | | this.CodeArray.push([]); |
| | | // this.CodeArray.push([]); |
| | | this.CodeArray = []; |
| | | } |
| | | // console.log('CodeArray', this.CodeArray); |
| | | this.isCodeArrayPushed = true; |
| | | } |
| | | if (!this.islcstatusPushed) { |
| | |
| | | }, |
| | | //批量编辑 |
| | | bulkEditHandler(type) { |
| | | // console.log(this.nodeClickList) |
| | | if (this.nodeClickList.children.length >= 1) { |
| | | this.$message.warning('当前选择的分类不是叶子节点,不允许批量编辑!') |
| | | return; |
| | | } |
| | | const Editing = this.selectRow.every(item => item.lcstatus === 'Editing'); |
| | | |
| | | if (Editing) { |
| | | this.batchImportData.visible = true |
| | | this.batchImportData.type = type |
| | | this.batchImportData.codeClassifyOid = this.codeClassifyOid |
| | | } else { |
| | | this.$message.warning('选择的数据中有编码状态不是“编辑中”,不可编辑!'); |
| | | } |
| | | }, |
| | | addSaveHandler() { |
| | | this.$nextTick(() => { |
| | |
| | | if (this.selectRow.length <= 0) { |
| | | this.$message.warning('请选择一条数据模板!') |
| | | } else { |
| | | // const requestData = this.selectRow.forEach(item => { |
| | | // return { oids: item.oid, btmName: item.btmname }; |
| | | // }); |
| | | |
| | | const oids = this.selectRow.map(item => item.oid).join(','); |
| | | applyGroupCode({oids, btmName: this.selectRow[0].btmname}).then(res => { |
| | | if (res.data.code == 200) { |
| | |
| | | if (this.selectRow.length <= 0) { |
| | | this.$message.warning('请选择一条数据模板!') |
| | | } else { |
| | | // const requestData = this.selectRow.forEach(item => { |
| | | // return { oids: item.oid, btmName: item.btmname }; |
| | | // }); |
| | | const oids = this.selectRow.map(item => item.oid).join(','); |
| | | receiveEditApply({oids, btmName: this.selectRow[0].btmname}).then(res => { |
| | | if (res.data.code == 200) { |
| | |
| | | ); |
| | | }); |
| | | |
| | | let colors = ["#91CC75", "#5470C6"]; |
| | | let colors = ['#2eadd6', '#FFA500']; |
| | | |
| | | const seriesData = []; |
| | | for (let i = 0; i < newval.length; i++) { |
| | |
| | | immediate: true, |
| | | handler(newval, oldval) { |
| | | if (newval) { |
| | | const colors = ["#8fef5b", "#db3c3c"]; |
| | | const colors = ["#2eadd6", "#db3c3c"]; |
| | | |
| | | const seriesData = newval.map((data, index) => ({ |
| | | name: index === 0 ? "总量" : "新增", |
| | |
| | | <template> |
| | | <template> |
| | | <el-dialog |
| | | title="业务类型" |
| | | :visible.sync="showSubmitDialog" |
| | |
| | | <el-form ref="form" :model="btmType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm" |
| | | :rules="rules" @resetFields="resetForm" status-icon="true"> |
| | | <el-form-item label="英文名称" label-width="100px" required="true" prop="id"> |
| | | <el-input v-model="btmType.id" :prefix-icon="icons.key"></el-input> |
| | | <el-input v-model="btmType.id" :prefix-icon="icons.key" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="中文名称" label-width="100px"> |
| | | <el-input v-model="btmType.name" :prefix-icon="icons.name"></el-input> |
| | |
| | | { |
| | | label: '英文名称', |
| | | prop: 'id', |
| | | align: 'center' |
| | | align: 'center', |
| | | disabled:true |
| | | }, { |
| | | label: '中文名称', |
| | | prop: 'name', |
| | |
| | | prop: 'id', |
| | | align: 'left', |
| | | search: true, |
| | | disabled:true, |
| | | width: 230 |
| | | }, { |
| | | label: '中文名称', |
| | |
| | | { |
| | | label: '英文名称', |
| | | prop: 'id', |
| | | disabled:true, |
| | | search: true |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: '英文名称', |
| | | prop: 'id', |
| | | disabled:true, |
| | | search: true |
| | | }, |
| | | { |
| | |
| | | const nodes = res.data.data.nodes.map((item) => { |
| | | item.label = item.id; |
| | | item.index = item.indexNum; |
| | | item.x = Number(item.x); |
| | | item.y = Number(item.y); |
| | | return item; |
| | | }); |
| | | const edges = res.data.data.edges.map((item) => { |
| | |
| | | this.dataKeyList = this.selectData.map(obj => obj.code) |
| | | const btmName = this.dataKeyList.join(","); |
| | | if (btmName) { |
| | | this.menuList=[ |
| | | { |
| | | menuData: [ |
| | | [0, 0, 0, 0, 0, 0, 4, 9, 12, 12, 12, 12], |
| | | [0, 0, 0, 0, 0, 0, 4, 5, 3, 0, 0, 0] |
| | | ], |
| | | code:1 |
| | | }, |
| | | { |
| | | menuData: [ |
| | | [0, 0, 0, 1, 1, 1, 1, 1, 1, 29, 5315, 5315], |
| | | [0, 0, 0, 1, 0, 0, 0, 0, 0, 28, 5286, 0] |
| | | ], |
| | | code:2 |
| | | }, |
| | | { |
| | | menuData: [ |
| | | [0, 58, 60, 61, 75, 84, 145, 162, 166, 177, 186, 186], |
| | | [0, 58, 2, 1, 14, 9, 61, 17, 4, 11, 9, 0] |
| | | ], |
| | | code:3 |
| | | } |
| | | ] |
| | | this.nextSave(); |
| | | this.$message.success('保存成功') |
| | | // getStatisticAnalysis({btmNames: btmName}).then(res => { |
| | | // this.menuList = res.data.data; |
| | | // this.nextSave(); |
| | | // this.$message.success('保存成功') |
| | | // }); |
| | | // this.menuList=[ |
| | | // { |
| | | // menuData: [ |
| | | // [0, 0, 0, 0, 0, 0, 4, 9, 12, 12, 12, 12], |
| | | // [0, 0, 0, 0, 0, 0, 4, 5, 3, 0, 0, 0] |
| | | // ], |
| | | // code:1 |
| | | // }, |
| | | // { |
| | | // menuData: [ |
| | | // [0, 0, 0, 1, 1, 1, 1, 1, 1, 29, 5315, 5315], |
| | | // [0, 0, 0, 1, 0, 0, 0, 0, 0, 28, 5286, 0] |
| | | // ], |
| | | // code:2 |
| | | // }, |
| | | // { |
| | | // menuData: [ |
| | | // [0, 58, 60, 61, 75, 84, 145, 162, 166, 177, 186, 186], |
| | | // [0, 58, 2, 1, 14, 9, 61, 17, 4, 11, 9, 0] |
| | | // ], |
| | | // code:3 |
| | | // } |
| | | // ] |
| | | // this.nextSave(); |
| | | // this.$message.success('保存成功') |
| | | getStatisticAnalysis({btmNames: btmName}).then(res => { |
| | | this.menuList = res.data.data; |
| | | this.nextSave(); |
| | | this.$message.success('保存成功') |
| | | }); |
| | | }else { |
| | | this.$message.warning('请选择数据!') |
| | | } |
| | |
| | | updateBatchByBaseModel(oldCbo.getBtmname(), Collections.singletonList(oldCbo)); |
| | | // 插入新的数据 |
| | | insertBatchByType(cbo.getBtmname(), Collections.singletonList(cbo)); |
| | | //处理码值表,对码值表进行处理替换创建数据的oid |
| | | QueryWrapper<CodeAllCode> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("CREATECODEOID",orderDTO.getCopyFromVersion()); |
| | | CodeAllCode codeAllCode = codeAllCodeService.getOne(wrapper); |
| | | codeAllCode.setCreateCodeOid(cbo.getOid()); |
| | | codeAllCode.setLastModifyTime(new Date()); |
| | | codeAllCode.setTs(new Date()); |
| | | codeAllCode.setLastModifier(AuthUtil.getUser().getUserName()); |
| | | codeAllCodeService.updateById(codeAllCode); |
| | | // 记录数据更改日志 |
| | | saveLogUtil.operateLog("数据更改",false, StringUtil.format("{}\n修改为:\n{}",JSON.toJSONString(Collections.singletonList(oldCbo)),JSON.toJSONString(Collections.singletonList(cbo)))); |
| | | } catch (Exception vciError) { |
| | |
| | | * @param file excel文件的信息 |
| | | * @return 有错误信息的excel |
| | | */ |
| | | @Transactional |
| | | @Override |
| | | public CodeImProtRusultVO batchImportEdit(String codeClassifyOid, String classifyAttr,File file) throws Throwable{ |
| | | VciBaseUtil.alertNotNull(codeClassifyOid,"分类的主键"); |
| | |
| | | titleRowData.remove(titleRowData.size()-1); |
| | | templateVO= templateVOList.get(0); |
| | | }catch (Throwable e){ |
| | | throw new VciBaseException(e.getMessage()); |
| | | throw new ServiceException(e.getMessage()); |
| | | } |
| | | |
| | | CodeClassifyTemplateVO finalTemplateVO = templateVO; |
| | |
| | | //我们使用和业务类型的来查询 |
| | | List<Map> cbosB = commonsMapper.selectBySql(sqlBO.getSqlUnPage()); |
| | | if(cbosB.size() == 0){ |
| | | throw new ServiceException("编码:"+ sheetRowData.getData().get(0) + ",未能查询到相关数据。"); |
| | | throw new ServiceException("编码:"+ sheetRowData.getData().get(0) + ",未能查询到相关数据。"); |
| | | } |
| | | excelToCboEdit(fieldIndexMap, sheetRowData, orderDTO, cbosB.get(0)); |
| | | orderDTO.setCopyFromVersion(orderDTO.getOid()); |
| | | orderDTO.setOid(null); |
| | | try { |
| | | mdmEngineService.upSaveCode(orderDTO); |
| | | List<Map> newCbos = commonsMapper.selectBySql(sqlBO.getSqlUnPage()); |
| | | //对码值表进行处理替换创建数据的oid |
| | | QueryWrapper<CodeAllCode> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("CREATECODEOID",orderDTO.getCopyFromVersion()); |
| | | List<CodeAllCode> codeAllCodes = codeAllCodeService.selectByWrapper(wrapper); |
| | | codeAllCodes.get(0).setCreateCodeOid(newCbos.get(0).get("OID").toString()); |
| | | codeAllCodes.get(0).setLastModifyTime(new Date()); |
| | | codeAllCodes.get(0).setTs(new Date()); |
| | | codeAllCodes.get(0).setLastModifier(AuthUtil.getUser().getUserName()); |
| | | codeAllCodeService.updateBatchById(codeAllCodes); |
| | | } catch (Throwable e) { |
| | | log.error("批量产生编码的时候出错了", e); |
| | | errorMap.put(sheetRowData.getRowIndex(), ";系统错误,存储数据的时候出错了:"+e.getMessage()); |
| | |
| | | if (StringUtils.isBlank(field)) { |
| | | throw new VciBaseException("第" + (index + 1) + "列的标题在系统中不存在"); |
| | | } |
| | | map.put(field,value); |
| | | map.put(field.toUpperCase(),value); |
| | | }); |
| | | |
| | | try { |