库房管理软件采购申请流程代码实现解析

300rmb掏了个java+vue2的小系统,学习代码,调整下申请流程。

原有的入库流程是,库管(admin)提出采购申请给采购员(caigou),采购员采购入库时点击入库完成采购入库流程。

想弄清后端代码怎样流转申请?需要一点点找。

从vue的采购申请页面找到请求的后端api地址:

 采购申请页面vue路由是:

/admin/rurchase

对应的组件是:

admin/rurchase/Rurchase

 对应的vue代码地址是:

src\views\admin\rurchase\RurchaseAdd.vue

<template><a-drawertitle="新增采购申请":maskClosable="false"placement="right":closable="false":visible="show":width="1200"@close="onClose"style="height: calc(100% - 55px);overflow: auto;padding-bottom: 53px;"><a-form :form="form" layout="vertical"><a-row :gutter="20"><a-col :span="12"><a-form-item label='申请人' v-bind="formItemLayout"><a-input v-decorator="['applicant',{ rules: [{ required: true, message: '请输入申请人!' }] }]"/></a-form-item></a-col><a-col :span="24"><a-form-item label='备注消息' v-bind="formItemLayout"><a-textarea :rows="4" v-decorator="['content',{ rules: [{ required: true, message: '请输入备注消息!' }] }]"/></a-form-item></a-col><a-col :span="24"><a-table :columns="columns" :data-source="dataList"><template slot="nameShow" slot-scope="text, record"><a-input v-model="record.name"></a-input></template><template slot="typeShow" slot-scope="text, record"><a-input v-model="record.type"></a-input></template><template slot="typeIdShow" slot-scope="text, record"><a-select v-model="record.typeId" style="width: 100%"><a-select-option v-for="(item, index) in consumableType" :value="item.id" :key="index">{{ item.name }}</a-select-option></a-select></template><template slot="unitShow" slot-scope="text, record"><a-input v-model="record.unit"></a-input></template><template slot="amountShow" slot-scope="text, record"><a-input-number v-model="record.amount" :min="1" :step="1"/></template><template slot="priceShow" slot-scope="text, record"><a-input-number v-model="record.price" :min="1"/></template></a-table><a-button @click="dataAdd" type="primary" ghost size="large" style="margin-top: 10px;width: 100%">新增物品</a-button></a-col></a-row></a-form><div class="drawer-bootom-button"><a-popconfirm title="确定放弃编辑?" @confirm="onClose" okText="确定" cancelText="取消"><a-button style="margin-right: .8rem">取消</a-button></a-popconfirm><a-button @click="handleSubmit" type="primary" :loading="loading">提交</a-button></div></a-drawer>
</template><script>
import {mapState} from 'vuex'
const formItemLayout = {labelCol: { span: 24 },wrapperCol: { span: 24 }
}
export default {name: 'RurchaseAdd',props: {rurchaseAddVisiable: {default: false}},computed: {...mapState({currentUser: state => state.account.user}),show: {get: function () {return this.rurchaseAddVisiable},set: function () {}},columns () {return [{title: '物品名称',dataIndex: 'name',scopedSlots: {customRender: 'nameShow'}}, {title: '型号',dataIndex: 'type',scopedSlots: {customRender: 'typeShow'}}, {title: '数量',dataIndex: 'amount',scopedSlots: {customRender: 'amountShow'}}, {title: '所属类型',dataIndex: 'typeId',width: 200,scopedSlots: {customRender: 'typeIdShow'}}, {title: '单位',dataIndex: 'unit',scopedSlots: {customRender: 'unitShow'}}, {title: '单价',dataIndex: 'price',scopedSlots: {customRender: 'priceShow'}}]}},data () {return {formItemLayout,form: this.$form.createForm(this),loading: false,dataList: [],consumableType: []}},mounted () {this.getConsumableType()},methods: {getConsumableType () {this.$get('/cos/consumable-type/list').then((r) => {this.consumableType = r.data.data})},dataAdd () {this.dataList.push({name: '', type: '', typeId: '', unit: '', amount: '', price: ''})},reset () {this.loading = falsethis.form.resetFields()},onClose () {this.reset()this.$emit('close')},handleSubmit () {if (this.dataList.length !== 0) {let price = 0this.dataList.forEach(item => {price += item.price * item.amount})this.form.validateFields((err, values) => {if (!err) {values.price = pricevalues.goods = JSON.stringify(this.dataList)this.loading = truethis.$post('/cos/rurchase-request', {...values}).then((r) => {this.reset()this.$emit('success')}).catch(() => {this.loading = false})}})} else {this.$message.warning('请添加记录!')}}}
}
</script><style scoped></style>

在前端代码中找到提交申请的后台api接口地址是:

/cos/rurchase-request

根据后台接口地址找到对应的java controller类和方法:

cc.mrbird.febs.cos.controller.RurchaseRequestController#save

这里用到了RESTfultool插件

package cc.mrbird.febs.cos.controller;import cc.mrbird.febs.common.utils.R;
import cc.mrbird.febs.cos.entity.RurchaseRequest;
import cc.mrbird.febs.cos.service.IRurchaseRequestService;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;import java.util.Date;
import java.util.List;/*** @author FanK*/
@RestController
@RequestMapping("/cos/rurchase-request")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class RurchaseRequestController {private final IRurchaseRequestService rurchaseRequestService;/*** 采购申请入库* @param rurchaseRequest* @return*/@PostMapping("/rurchasePut")public R rurchasePut(RurchaseRequest rurchaseRequest) {return R.ok(rurchaseRequestService.rurchasePut(rurchaseRequest));}/*** 分页获取采购申请* @param page* @param rurchaseRequest* @return*/@GetMapping("/page")public R page(Page page, RurchaseRequest rurchaseRequest) {return R.ok(rurchaseRequestService.rurchaseRequestByPage(page, rurchaseRequest));}/*** 添加采购申请* @param rurchaseRequest* @return*/@PostMappingpublic R save(RurchaseRequest rurchaseRequest) {rurchaseRequest.setCreateDate(DateUtil.formatDateTime(new Date()));return R.ok(rurchaseRequestService.rurchaseRequestAdd(rurchaseRequest));}/*** 修改采购申请* @param rurchaseRequest* @return*/@PutMappingpublic R edit(RurchaseRequest rurchaseRequest) {return R.ok(rurchaseRequestService.updateById(rurchaseRequest));}/*** 删除采购申请* @param ids* @return*/@DeleteMapping("/{ids}")public R deleteByIds(@PathVariable("ids") List<Integer> ids) {return R.ok(rurchaseRequestService.removeByIds(ids));}}

通过其调用的函数:

rurchaseRequestService.rurchaseRequestAdd(rurchaseRequest)

mybatis的mapper

cc.mrbird.febs.cos.service.IRurchaseRequestService

package cc.mrbird.febs.cos.service;import cc.mrbird.febs.cos.entity.RurchaseRequest;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;import java.util.LinkedHashMap;/*** @author FanK*/
public interface IRurchaseRequestService extends IService<RurchaseRequest> {// 分页获取采购申请IPage<LinkedHashMap<String, Object>> rurchaseRequestByPage(Page page, RurchaseRequest rurchaseRequest);// 添加采购申请Boolean rurchaseRequestAdd(RurchaseRequest rurchaseRequest);// 采购申请入库Boolean rurchasePut(RurchaseRequest rurchaseRequest);
}

IRurchaseRequestService的实现类:

cc.mrbird.febs.cos.service.impl.RurchaseRequestServiceImpl

package cc.mrbird.febs.cos.service.impl;import cc.mrbird.febs.cos.entity.GoodsBelong;
import cc.mrbird.febs.cos.entity.RurchaseRequest;
import cc.mrbird.febs.cos.dao.RurchaseRequestMapper;
import cc.mrbird.febs.cos.entity.StockInfo;
import cc.mrbird.febs.cos.entity.StockPut;
import cc.mrbird.febs.cos.service.IGoodsBelongService;
import cc.mrbird.febs.cos.service.IRurchaseRequestService;
import cc.mrbird.febs.cos.service.IStockInfoService;
import cc.mrbird.febs.cos.service.IStockPutService;
import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;/*** @author FanK*/
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class RurchaseRequestServiceImpl extends ServiceImpl<RurchaseRequestMapper, RurchaseRequest> implements IRurchaseRequestService {private final IGoodsBelongService goodsBelongService;private final IStockPutService stockPutService;private final IStockInfoService stockInfoService;@Overridepublic IPage<LinkedHashMap<String, Object>> rurchaseRequestByPage(Page page, RurchaseRequest rurchaseRequest) {return baseMapper.rurchaseRequestByPage(page, rurchaseRequest);}@Overridepublic Boolean rurchaseRequestAdd(RurchaseRequest rurchaseRequest) {rurchaseRequest.setNum("RUR-"+new Date().getTime());JSONArray array = JSONUtil.parseArray(rurchaseRequest.getGoods());List<GoodsBelong> goodsBelongList = JSONUtil.toList(array, GoodsBelong.class);rurchaseRequest.setStep(0);this.save(rurchaseRequest);goodsBelongList.forEach(item -> {item.setCreateDate(DateUtil.formatDateTime(new Date()));item.setNum(rurchaseRequest.getNum());});return goodsBelongService.saveBatch(goodsBelongList);}@Overridepublic Boolean rurchasePut(RurchaseRequest rurchaseRequest) {JSONArray array = JSONUtil.parseArray(rurchaseRequest.getGoods());List<GoodsBelong> goodsBelongList = JSONUtil.toList(array, GoodsBelong.class);// 添加入库单StockPut stockPut = new StockPut();stockPut.setContent(rurchaseRequest.getRurchaseContent());stockPut.setCreateDate(DateUtil.formatDateTime(new Date()));stockPut.setCustodian(rurchaseRequest.getCustodian());stockPut.setPutUser(rurchaseRequest.getPutUser());stockPut.setPrice(rurchaseRequest.getPrice());stockPut.setNum("PUT-"+new Date().getTime());stockPutService.save(stockPut);goodsBelongList.forEach(item -> {item.setCreateDate(DateUtil.formatDateTime(new Date()));item.setNum(stockPut.getNum());// 判断库房物品是否存在StockInfo stockInfo = stockInfoService.getOne(Wrappers.<StockInfo>lambdaQuery().eq(StockInfo::getName, item.getName()).eq(StockInfo::getTypeId, item.getTypeId()).eq(StockInfo::getIsIn, 0));if (stockInfo != null) {// 更改库房数据stockInfoService.update(Wrappers.<StockInfo>lambdaUpdate().set(StockInfo::getAmount, stockInfo.getAmount()+item.getAmount()).set(StockInfo::getPrice, stockInfo.getPrice()).eq(StockInfo::getName, stockInfo.getName()));} else {// 重新添加库房数据StockInfo stock = new StockInfo();stock.setName(item.getName());stock.setAmount(item.getAmount());stock.setCreateDate(DateUtil.formatDateTime(new Date()));stock.setType(item.getType());stock.setTypeId(item.getTypeId());stock.setUnit(item.getUnit());stock.setPrice(item.getPrice());stock.setIsIn(0);stockInfo = stock;stockInfoService.save(stock);}// 添加入库记录StockInfo stockInfoPut = new StockInfo();stockInfoPut.setParentId(stockInfo.getId());stockInfoPut.setName(item.getName());stockInfoPut.setAmount(item.getAmount());stockInfoPut.setCreateDate(DateUtil.formatDateTime(new Date()));stockInfoPut.setType(item.getType());stockInfoPut.setTypeId(item.getTypeId());stockInfoPut.setUnit(item.getUnit());stockInfoPut.setPrice(item.getPrice());stockInfoPut.setIsIn(1);stockInfoService.save(stockInfoPut);// 添加所属信息GoodsBelong goodsBelong = new GoodsBelong();goodsBelong.setNum(stockPut.getNum());goodsBelong.setCreateDate(DateUtil.formatDateTime(new Date()));goodsBelong.setAmount(item.getAmount());goodsBelong.setName(item.getName());goodsBelong.setPrice(item.getPrice());goodsBelong.setType(item.getType());goodsBelong.setTypeId(item.getTypeId());goodsBelong.setUnit(item.getUnit());goodsBelongService.save(goodsBelong);});// 修改状态this.update(Wrappers.<RurchaseRequest>lambdaUpdate().set(RurchaseRequest::getStep, 1).eq(RurchaseRequest::getId, rurchaseRequest.getId()));return true;}
}

从RurchaseRequestServiceImpl#rurchaseRequestAdd方法中找到两个操作数据库的关键函数:

this.save(rurchaseRequest);
goodsBelongService.saveBatch(goodsBelongList);

这两个方法都是继承自mybatisplus的操作数据库的公共方法,可以在类的定义中找到对应的java实体类:

public class RurchaseRequestServiceImpl extends ServiceImpl<RurchaseRequestMapper, RurchaseRequest> implements IRurchaseRequestService
public interface IGoodsBelongService extends IService<GoodsBelong>

关于mybatisplus的使用方法参考:

Mybatis-plus之IService的使用_iservice mybatisplus-CSDN博客

https://www.cnblogs.com/kaibindirver/p/16086336.html

(不明白为什么extends ServiceImpl<RurchaseRequestMapper, RurchaseRequest>后,还要implements IRurchaseRequestService,需要看源码)

找到java实体类:

cc.mrbird.febs.cos.entity.GoodsBelong

cc.mrbird.febs.cos.entity.RurchaseRequest

package cc.mrbird.febs.cos.entity;import java.io.Serializable;
import java.math.BigDecimal;import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;/*** 物品所属** @author FanK*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class GoodsBelong implements Serializable {private static final long serialVersionUID = 1L;@TableId(value = "ID", type = IdType.AUTO)private Integer id;/*** 物品名称*/private String name;/*** 型号*/private String type;/*** 单位*/private String unit;/*** 数量*/private Integer amount;/*** 耗材类型*/private Integer typeId;/*** 申请/入库单号*/private String num;/*** 单价*/private BigDecimal price;/*** 日期*/private String createDate;}
package cc.mrbird.febs.cos.entity;import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;/*** 采购申请** @author FanK*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class RurchaseRequest implements Serializable {private static final long serialVersionUID = 1L;@TableId(value = "ID", type = IdType.AUTO)private Integer id;/*** 采购申请单号*/private String num;/*** 采购说明*/private String content;/*** 预计金额*/private BigDecimal price;/*** 采购流程 0是正在采购 1是入库完成*/private Integer process;/*** 当前流程*/private Integer step;/*** 申请人*/private String applicant;/*** 创建时间*/private String createDate;@TableField(exist = false)private String goods;@TableField(exist = false)private String custodian;@TableField(exist = false)private String putUser;@TableField(exist = false)private String rurchaseContent;}

从mybatisplus的表名对应关系,可以找到数据库的两张表:

goods_belong

类型长度小数点注释
idint主键
namevarchar200物品名称
typevarchar200型号
unitvarchar30单位
amountint数量
type_idint耗材类型
numvarchar200申请/入库单号
pricedecimal102单价
create_datedatetime日期 

rurchase_request

类型长度小数点注释
idint主键
numvarchar200采购申请单号
contentvarchar300采购说明
pricedecimal102预计金额
processtinyint采购流程 0是正在采购 1是入库完成
steptinyint当前流程
applicantvarchar200申请人
create_datedatetime创建时间

 库管admin新增一个采购申请,会在rurchase_request增加一条数据对应这个申请,同时会在goods_belong中新增若干条数据,对应申请表中的若干项物资

申请记录:

ps:其中step字段的值表示当前流程,0表示等待采购,1表示入库完成

申请的物品清单:

 在采购员账号caigou中可以办理采购入库:

当入库后,库存就会增加,对应的库存表会变化,涉及到多张表

stock_info

stock_put

goods_belong

rurchase_request

cc.mrbird.febs.cos.service.impl.RurchaseRequestServiceImpl#rurchasePut

    @Overridepublic Boolean rurchasePut(RurchaseRequest rurchaseRequest) {JSONArray array = JSONUtil.parseArray(rurchaseRequest.getGoods());List<GoodsBelong> goodsBelongList = JSONUtil.toList(array, GoodsBelong.class);// 添加入库单StockPut stockPut = new StockPut();stockPut.setContent(rurchaseRequest.getRurchaseContent());stockPut.setCreateDate(DateUtil.formatDateTime(new Date()));stockPut.setCustodian(rurchaseRequest.getCustodian());stockPut.setPutUser(rurchaseRequest.getPutUser());stockPut.setPrice(rurchaseRequest.getPrice());stockPut.setNum("PUT-"+new Date().getTime());stockPutService.save(stockPut);goodsBelongList.forEach(item -> {item.setCreateDate(DateUtil.formatDateTime(new Date()));item.setNum(stockPut.getNum());// 判断库房物品是否存在StockInfo stockInfo = stockInfoService.getOne(Wrappers.<StockInfo>lambdaQuery().eq(StockInfo::getName, item.getName()).eq(StockInfo::getTypeId, item.getTypeId()).eq(StockInfo::getIsIn, 0));if (stockInfo != null) {// 更改库房数据stockInfoService.update(Wrappers.<StockInfo>lambdaUpdate().set(StockInfo::getAmount, stockInfo.getAmount()+item.getAmount()).set(StockInfo::getPrice, stockInfo.getPrice()).eq(StockInfo::getName, stockInfo.getName()));} else {// 重新添加库房数据StockInfo stock = new StockInfo();stock.setName(item.getName());stock.setAmount(item.getAmount());stock.setCreateDate(DateUtil.formatDateTime(new Date()));stock.setType(item.getType());stock.setTypeId(item.getTypeId());stock.setUnit(item.getUnit());stock.setPrice(item.getPrice());stock.setIsIn(0);stockInfo = stock;stockInfoService.save(stock);}// 添加入库记录StockInfo stockInfoPut = new StockInfo();stockInfoPut.setParentId(stockInfo.getId());stockInfoPut.setName(item.getName());stockInfoPut.setAmount(item.getAmount());stockInfoPut.setCreateDate(DateUtil.formatDateTime(new Date()));stockInfoPut.setType(item.getType());stockInfoPut.setTypeId(item.getTypeId());stockInfoPut.setUnit(item.getUnit());stockInfoPut.setPrice(item.getPrice());stockInfoPut.setIsIn(1);stockInfoService.save(stockInfoPut);// 添加所属信息GoodsBelong goodsBelong = new GoodsBelong();goodsBelong.setNum(stockPut.getNum());goodsBelong.setCreateDate(DateUtil.formatDateTime(new Date()));goodsBelong.setAmount(item.getAmount());goodsBelong.setName(item.getName());goodsBelong.setPrice(item.getPrice());goodsBelong.setType(item.getType());goodsBelong.setTypeId(item.getTypeId());goodsBelong.setUnit(item.getUnit());goodsBelongService.save(goodsBelong);});// 修改状态this.update(Wrappers.<RurchaseRequest>lambdaUpdate().set(RurchaseRequest::getStep, 1).eq(RurchaseRequest::getId, rurchaseRequest.getId()));return true;}

入库后goods_belong会增加三条入库操作记录

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/131789.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

非关系型数据库Redis的安装【Linux】及常用命令

前言 Redis&#xff08;Remote Dictionary Server&#xff09;是一种开源的内存数据库管理系统&#xff0c;它以键值存储方式来存储数据&#xff0c;并且支持多种数据结构&#xff0c;如字符串、哈希、列表、集合、有序集合等。Redis最初由Salvatore Sanfilippo开发&#xff0c…

数据分析实战 | 关联规则分析——购物车分析

目录 一、数据及分析对象 二、目的及分析任务 三、方法及工具 四、数据读入 五、数据理解 六、数据预处理 七、生成频繁项集 八、计算关联度 九、可视化 一、数据及分析对象 数据集链接&#xff1a;Online Retail.xlsx 该数据集记录了2010年12月01日至2011年12月09日…

Docker 修改镜像的Digests值

最近工作中遇到个事情&#xff0c;我在本地虚拟机导出的镜像&#xff0c;导入到服务器发现镜像的digests是<none>&#xff0c;网上找了半天发现没有相关的解决方案&#xff0c;服务器上的源码是通过镜像的hash值拉取镜像没有Tag&#xff0c;镜像digests为<none>很痛…

21. 合并两个有序链表

Problem: 21. 合并两个有序链表 文章目录 思路1 递归实现2 迭代实现 Code 思路 方法1 递归实现 方法2 迭代实现 1 递归实现 分析问题 对于本题&#xff0c;合并两个有序链表A和B&#xff0c;mergeTwoLists&#xff08;A,B&#xff09;&#xff0c;递归只需要关注本层我要干什么…

性能优于BERT的FLAIR:一篇文章入门Flair模型

文章目录 What is FLAIR&#xff1f;FLAIR ModelContextual String Embedding for Sequence Labelingexample FLAIR Application AreaSentiment AnalysisNamed Entity RecognitionText Classification FLAIR一、什么是FLAIR&#xff1f;二、FLAIR Library的优势是什么&#xff…

23年面试总结

网易一面 231026 0、介绍下你自己 1、具体负责的工作内容 系统的建设与维护工作。环境搭建与维护、巡检、容量规划、CICD流水线管理、可观测指标建立、监控告警处理&#xff0c;用户的请求事件问题处 2、介绍一下http协议 http协议&#xff08;hyper text transfer protoco…

突破性技术!开源多模态模型—MiniGPT-5

多模态生成一直是OpenAI、微软、百度等科技巨头的重要研究领域&#xff0c;但如何实现连贯的文本和相关图像是一个棘手的难题。 为了突破技术瓶颈&#xff0c;加州大学圣克鲁斯分校研发了MiniGPT-5模型&#xff0c;并提出了全新技术概念“Generative Vokens "&#xff0c…

❤️ React的安装和使用(实战篇)

React的安装和使用 一、React的安装和使用 reactJs警告提示&#xff1a; This version of tar is no longer supported, and will not receive security updates. Please upgrade asap 翻译&#xff1a;tar2.2.2&#xff1a;此版本的tar不再受支持&#xff0c;将不会收到安全…

golang实现极简todolist

ToDoList 最近跟着qimi老师做了一个ToDoList&#xff0c;我做的GitHub地址贴在这里&#xff0c;但由于前端出了点问题&#xff0c;所以都是用postman进行测试 原项目地址 部分功能展示 删除代办 查找代办 下面给出思路 思路 其实这是一个很简单的增删改查的实现&#xff…

linux下使用vscode对C++项目进行编译

项目的目录结构 头文件swap.h 在自定义的头文件中写函数的声明。 // 函数的声明 void swap(int a,int b);swap.cpp 导入函数的声明&#xff0c;写函数的定义 #include "swap.h" // 双引号表示自定义的头文件 #include <iostream> using namespace std;// 函…

QR码应用实战:Spring Boot与ZXing完美结合

&#x1f38f;&#xff1a;你只管努力&#xff0c;剩下的交给时间 &#x1f3e0; &#xff1a;小破站 QR码应用实战&#xff1a;Spring Boot与ZXing完美结合 前言第一&#xff1a; 介绍QR码和ZXing第二&#xff1a;springboot整合zxing添加ZXing依赖生成二维码生成条形码 前言 …

LeetCode.6 N字形变换

一开始想的是真的创建一个数组 去按照题目所给的要求填入数据 最后输出不为空的数组项 但是不仅时间复杂度高 而且错误频繁出现 最终也没有提交成功 查阅题解后发现数组并不重要 假设我们忽略掉数组中的那些空白项 最终输出的结果就是numRows行的字符串的拼接 string conver…

HCIE-kubernetes(k8s)-Authentication身份验证

1、远程登录 1、kubeconfig方式 在master上都是以kubeconfig方式登录的&#xff0c;并不是说有一个文件叫kubeconfig。 默认使用的配置文件是~/.kube/config 这个配置文件&#xff0c;而这个配置文件是通过这个文件/etc/kubernetes/admin.conf 如果在node上执行命令&#xff…

apachesolr中简单使用

core使用 首先点击add core 可以看到报错solrconfig.xml不在new_core目录下&#xff0c;new_core是我们点击后自动创建的 那么我们将D:\solr2\solr-9.3.0\solr-9.3.0\server\solr\configsets下的任何一个目录下的conf拷贝到new_core过去 这里是使用_default下的conf目录拷贝…

【PC电脑windows环境下-[jetson-orin-NX]Linux环境下-下载工具esptool工具使用-相关细节-简单样例-实际操作】

【PC电脑windows环境下-[jetson-orin-NX]Linux环境下-下载工具esptool工具使用-相关细节-简单样例-实际操作】 1、概述2、实验环境3、 物品说明4-2、自我总结5、本次实验说明1、准备样例2、设置芯片3、编译4、下载5、验证 &#xff08;1&#xff09;windows环境下进行烧写1、下…

RabbitMQ 消息应答与发布

目录 一、消息应答 1、自动应答&#xff08;默认&#xff09; 2、手动消息应答的方法 ​编辑 3、消息重新入队 4、手动应答案列与效果演示 二、RabbitMQ持久化 1、队列持久化 2、消息持久化 三、不公平分发&#xff08;能者多劳&#xff0c;弱者少劳&#xff09; 1、…

C#中的GC

在C#&#xff08;C Sharp&#xff09;编程语言中&#xff0c;GC是指垃圾回收&#xff08;Garbage Collection&#xff09;的缩写。 垃圾回收是一种自动内存管理机制&#xff0c;在程序运行时负责自动分配和释放对象所占用的内存空间。它减轻了开发人员手动管理内存的负担&…

算法通过村第十八关-回溯|青铜笔记|什么叫回溯(中篇)

文章目录 前言回溯的核心问题撤销操作解释总结 前言 提示&#xff1a;阳光好的时候&#xff0c;会感觉还可以活很久&#xff0c;甚至可以活出喜悦。 --余秀华 回溯是非常重要的算法思想之一&#xff0c;主要解决一些暴力枚举也搞不定的问题&#xff08;这里埋个坑&#x1f4a3;…

NTFS文件系统解析(三)

1、引言 对于NTFS文件系统而言&#xff0c;无论文件内容本身&#xff0c;抑或真实的文件属性&#xff0c;都被称之为属性。 而正如前文说到的&#xff0c;NTFS预定义了16种属性用于文件系统的管理。 而通常情况下&#xff0c;往往只需要关注其中的某些属性即可。 2、属性头 …

【考研数学】数学“背诵手册”(二)| 线代及概率论部分

文章目录 引言二、线代施密特正交化分块矩阵转置、逆、伴随之间的运算关于秩定义性质 三、概统常见分布的期望及方差 引言 这数一全部内容太多了&#xff0c;放在一篇文章里的话&#xff0c;要编辑就很困难&#xff0c;就把线代和概率放在这篇文章里吧。 二、线代 施密特正交…