feat: Spring Boot 3.5.14 全量升级 + 组件升级

核心升级:
- Spring Boot 2.7.18 → 3.5.14
- MyBatis Plus 3.5.5 → 3.5.16 (spring-boot3-starter)
- Springdoc 1.8.0 → 2.8.6 (OpenAPI 3)
- Flowable 6.8.0 → 7.1.0
- Druid 1.2.x → 1.2.28 (boot3-starter)
- kotlin-reflect 1.9.10 → 1.9.25

迁移适配:
- javax → jakarta 命名空间 (620+ 文件)
- Swagger 注解迁移到 OpenAPI 3 (@Tag/@Schema/@Operation/@Parameter)
- Spring Security 6.2 适配 (antMatchers→requestMatchers, EnableMethodSecurity)
- Druid 包名迁移 (boot→boot3)
- Redis 配置路径迁移 (spring.redis→spring.data.redis)
- Flyway 适配 (flyway-database-postgresql)
- Flowable 7.x 适配 (MULE_TASK_IMAGE 移除)

修复:
- spring-boot-maven-plugin 2.5.15→3.5.14 (SPI服务发现失效)
- mybatis-plus-boot-starter 3.5.5→3.5.16 (kotlin-reflect+fastjson2冲突)
- Flowable database-schema-update 启用自动建表

验证: 23/23 测试通过, 1374 API端点正常
This commit is contained in:
2026-06-04 22:39:10 +08:00
parent b8d719429d
commit 1d21661a78
781 changed files with 57907 additions and 1301 deletions

View File

@@ -0,0 +1,310 @@
{
"panels": [
{
"index": 0,
"name": 1,
"paperType": "A4",
"height": 297,
"width": 210,
"paperHeader": 73.5,
"paperFooter": 817.5,
"paperNumberContinue": true,
"overPrintOptions": {},
"watermarkOptions": {},
"panelLayoutOptions": {},
"printElements": [
{
"options": {
"left": 249,
"top": 12,
"height": 12,
"width": 70.5,
"title": "调拨单据",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 16.5,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 10.5,
"top": 46.5,
"height": 9.75,
"width": 120,
"title": "单据号",
"field": "busNo",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 141,
"top": 46.5,
"height": 9.75,
"width": 97.5,
"title": "源仓库",
"field": "sourceLocationName",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 249,
"top": 46.5,
"height": 9.75,
"width": 97.5,
"title": "目的仓库",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "purposeLocationName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 360.99609375,
"top": 46.5,
"height": 9.75,
"width": 78,
"title": "项目类型",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "itemType_dictText"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 445.5,
"top": 46.5,
"height": 9.75,
"width": 136.5,
"title": "制单日期",
"field": "occurrenceTime",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 9,
"top": 88.5,
"height": 36,
"width": 573,
"title": "undefined+beforeDragIn",
"field": "detailsList",
"coordinateSync": false,
"widthHeightSync": false,
"columns": [
[
{
"title": "项目名称",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 86.67519359101631,
"field": "name",
"checked": true,
"columnId": "name",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "规格",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 80.21549132169478,
"field": "totalVolume",
"checked": true,
"columnId": "totalVolume",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "厂家",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 75.93737727220328,
"field": "manufacturerText",
"checked": true,
"columnId": "manufacturerText",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "批号",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 67.21760769186436,
"field": "lotNumber",
"checked": true,
"columnId": "lotNumber",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "单价",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 60.17562958542372,
"field": "price",
"checked": true,
"columnId": "price",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "调拨单位",
"titleSync": false,
"align": "center",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 30.9839942645893,
"field": "measurementUnitCode_dictText",
"checked": true,
"columnId": "measurementUnitCode_dictText",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "源库存数",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 55.062860531575446,
"field": "totalSourceQuantity",
"checked": true,
"columnId": "totalSourceQuantity",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "调拨数",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 63.064593526717786,
"field": "itemQuantity",
"checked": true,
"columnId": "itemQuantity",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "合计金额",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 53.66725221491505,
"field": "totalPrice",
"checked": true,
"columnId": "totalPrice",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"width": 85.25,
"checked": false,
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"width": 85.25,
"checked": false,
"fixed": false,
"rowspan": 1,
"colspan": 1
}
]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
}
],
"paperNumberLeft": 565,
"paperNumberTop": 819
}
]
}

View File

@@ -0,0 +1,333 @@
<template>
<div>
<el-dialog
v-model="dialogVisible"
title="批量调拨单明细"
width="90%"
:destroy-on-close="true"
@close="close"
>
<el-row style="margin-bottom: 20px">
<template v-if="props.isApply">
<el-button
plain
type="primary"
icon="Edit"
@click="handelApply"
>
审批通过
</el-button>
<el-button
type="primary"
plain
icon="Edit"
@click="handleReject"
>
驳回
</el-button>
</template>
<el-button
type="primary"
plain
icon="Download"
@click="handleExport"
>
导出
</el-button>
<el-button
type="warning"
plain
icon="Printer"
@click="handlePrint"
>
打印单据
</el-button>
</el-row>
<el-descriptions
:column="5"
style="margin-bottom: 10px"
>
<el-descriptions-item label="单据号:">
{{ detailsList[0]?.busNo || '-' }}
</el-descriptions-item>
<el-descriptions-item label="源仓库:">
{{ detailsList[0]?.sourceLocationName || '-' }}
</el-descriptions-item>
<el-descriptions-item label="目的仓库:">
{{ detailsList[0]?.purposeLocationName || '-' }}
</el-descriptions-item>
<el-descriptions-item label="项目类型:">
{{ detailsList[0]?.itemType_dictText || '-' }}
</el-descriptions-item>
<el-descriptions-item label="制单日期:">
{{ proxy.formatDateStr(detailsList[0]?.occurrenceTime, 'YYYY-MM-DD HH:mm:ss') || '-' }}
</el-descriptions-item>
</el-descriptions>
<el-table
v-loading="loading"
:data="detailsList"
border
max-height="650"
>
<el-table-column
label="序号"
width="60"
type="index"
align="center"
/>
<el-table-column
label="项目名称"
align="center"
prop="name"
/>
<el-table-column
label="规格"
align="center"
prop="totalVolume"
:show-overflow-tooltip="true"
/>
<el-table-column
label="厂家/产地"
align="center"
prop="manufacturerText"
width="180"
:show-overflow-tooltip="true"
/>
<el-table-column
label="产品批号"
align="center"
prop="lotNumber"
/>
<el-table-column
label="单价"
align="right"
header-align="center"
prop="price"
width="120"
>
<template #default="scope">
{{ scope.row.price?.toFixed(2) + ' 元' }}
</template>
</el-table-column>
<el-table-column
label="调拨单位"
align="center"
prop="measurementUnitCode_dictText"
width="80"
/>
<el-table-column
label="源库存数"
align="right"
header-align="center"
prop="itemName"
width="100"
>
<template #default="scope">
{{ formatQuantity(Number(scope.row.totalSourceQuantity), scope.row) }}
</template>
</el-table-column>
<!-- <el-table-column
label="目的库存数"
align="right"
header-align="center"
prop="itemName"
width="100"
>
<template #default="scope">
{{
formatQuantity(
Number(scope.row.itemQuantity) - Number(scope.row.totalSourceQuantity),
scope.row
)
}}
</template>
</el-table-column> -->
<el-table-column
label="调拨数量"
align="right"
header-align="center"
prop="totalQuitemQuantityantity"
width="100"
>
<template #default="scope">
{{ formatQuantity(scope.row.itemQuantity, scope.row) }}
</template>
</el-table-column>
<el-table-column
label="合计金额"
align="right"
header-align="center"
prop="totalPrice"
width="120"
>
<template #default="scope">
{{ scope.row.totalPrice?.toFixed(2) + ' 元' }}
</template>
</el-table-column>
<el-table-column
label="生产日期"
align="center"
prop="startTime"
width="120"
>
<template #default="scope">
{{ proxy.formatDateStr(scope.row.startTime, 'YYYY-MM-DD') }}
</template>
</el-table-column>
<el-table-column
label="有效期至"
align="center"
prop="endTime"
width="120"
>
<template #default="scope">
{{ proxy.formatDateStr(scope.row.endTime, 'YYYY-MM-DD') }}
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">
</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup>
import {getCurrentInstance} from 'vue';
import {getTransferProductDetail, productTransferApproved, reject} from './transferManagement';
import templateJson from './template.json';
import {hiprint} from 'vue-plugin-hiprint';
import useUserStore from '@/store/modules/user';
const detailsList = ref([]);
const dialogVisible = ref(false);
const loading = ref(false);
const supplyBusNo = ref('');
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const props = defineProps({
isApply: {
type: Boolean,
default: false,
},
});
function open(busNo) {
dialogVisible.value = true;
supplyBusNo.value = busNo;
loading.value = true;
getTransferProductDetail({ busNo: busNo, pageSize: 1000, pageNo: 1 }).then((res) => {
detailsList.value = res.data.records;
loading.value = false;
});
}
function formatQuantity(quantity, row) {
if (row.measurementUnitCode == row.unitCode) {
return formatInventory(
quantity,
row.partPercent,
row.unitCode_dictText,
row.minUnitCode_dictText
);
} else {
return quantity + row.minUnitCode_dictText;
}
}
function handelApply() {
loading.value = true;
productTransferApproved(supplyBusNo.value).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess('操作成功');
loading.value = false;
}
});
}
function handleReject() {
reject(supplyBusNo.value).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess('操作成功');
}
});
}
/**
* 格式化库存数量显示(大单位情况)
* @param quantity 小单位库存数量
* @param partPercent 拆零比
* @param unitCode 大单位
* @param minUnitCode 小单位
*/
function formatInventory(quantity, partPercent, unitCode, minUnitCode) {
// 处理负数情况
const isNegative = quantity < 0;
const absQuantity = Math.abs(quantity);
if (absQuantity % partPercent !== 0) {
const integerPart = Math.floor(absQuantity / partPercent);
const decimalPart = absQuantity % partPercent;
let result = integerPart.toString() + ' ' + unitCode;
if (decimalPart > 0) {
result += decimalPart.toString() + ' ' + minUnitCode;
}
return isNegative ? '-' + result : result;
}
// 整除情况
const result = absQuantity / partPercent + ' ' + unitCode;
return isNegative ? '-' + result : result;
}
// 打印盘点单
function handlePrint() {
const result = [];
const printList = detailsList.value.map((item) => {
return {
...item,
volume: item.totalVolume,
price: Number(item.price).toFixed(2) + ' 元',
totalPrice: Number(item.totalPrice).toFixed(2) + ' 元',
totalSourceQuantity: formatQuantity(Number(item.totalSourceQuantity), item),
itemQuantity: formatQuantity(Number(item.itemQuantity), item),
profitAmount: ((item.itemQuantity * item.price) / item.partPercent).toFixed(2),
};
});
result.push({
purposeLocationName: printList[0].purposeLocationName,
sourceLocationName: printList[0].sourceLocationName,
itemType_dictText: printList[0].itemType_dictText,
name: userStore.name,
occurrenceTime: proxy.formatDateStr(printList[0].occurrenceTime, 'YYYY-MM-DD HH:mm:ss'),
busNo: printList[0].busNo,
detailsList: printList,
});
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
title: '打印标题',
}); //开始打印
}
function handleExport() {
proxy.downloadGet(
'/inventory-manage/transfer/excel-out',
{
busNo: supplyBusNo.value,
},
`批量调拨单据明细记录_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
);
}
defineExpose({
open,
});
</script>

View File

@@ -0,0 +1,160 @@
import request from '@/utils/request'
// 查询调拨管理列表
export function getTransferProductList(query) {
return request({
url:'/inventory-manage/transfer/product-transfer-page',
method: 'get',
params: query
})
}
// 调拨详情
export function getTransferProductDetail(busNo) {
return request({
url: '/inventory-manage/transfer/product-transfer-detail',
method: 'get',
params: busNo // 确保参数正确传递
})
}
// 添加/编辑调拨单据
export function addTransferProduct(data) {
return request({
url: '/inventory-manage/transfer/product-transfer',
// product-transfer-edit',
method: 'put',
data: data
})
}
// 添加/编辑批量调拨单据
export function addTransferProductBatch(data) {
return request({
url: '/inventory-manage/transfer/product-transfer-batch',
// product-transfer-edit',
method: 'put',
data: data
})
}
// 批量调拨详情
export function getTransferProductDetails(params) {
return request({
url: '/inventory-manage/transfer/product-transfer-batch',
method: 'get',
params: params // 确保参数正确传递
})
}
// 查询单据初始化数据
export function getInit() {
return request({
url: '/inventory-manage/transfer/init',
method: 'get'
})
}
export function getBusNoInit() { //单据号
return request({
url: '/inventory-manage/transfer/bus-no-init',
method: 'get'
})
}
// 删除单据
export function delTransferProduct(param) {
return request({
url: '/inventory-manage/transfer/product-transfer-del?supplyRequestIds=' + param,
method: 'delete',
})
}
// 提交审批
export function submitApproval(busNo) {
return request({
url: '/inventory-manage/transfer/submit-approval',
// product-transfer-approved
method: 'put',
data: { busNo } // 修复:发送对象而不是字符串
})
}
// 撤回审批
export function withdrawApproval(busNo) {
return request({
url: '/inventory-manage/transfer/withdraw-approval',
method: 'put',
data: { busNo } // 修复:发送对象而不是字符串
})
}
// 获取药品目录
export function getMedicineList(queryParams) {
return request({
url: '/app-common/inventory-item',
method: 'get',
params: queryParams
})
}
// 获取药品目录
export function getCount(queryParams) {
return request({
url: '/app-common/inventory-item-info',
method: 'get',
params: queryParams
})
}
// 获取药房列表
export function getPharmacyList() {
return request({
url: '/app-common/pharmacy-list',
method: 'get',
})
}
// 获取药库列表
export function getDispensaryList() {
return request({
url: '/app-common/cabinet-list',
method: 'get',
})
}
// 获取耗材库列表
export function getWarehouseList() {
return request({
url: '/app-common/warehouse-list',
method: 'get',
})
}
// 获取仓库药房列表
export function getpharmacyCabinetList() {
return request({
url: '/app-common/pharmacy-cabinet-list',
method: 'get',
})
}
/**
* 审批驳回
*/
export function reject(busNo) {
return request({
url: '/inventory-manage/receipt/reject?busNo=' + busNo,
method: 'put',
})
}
/**
* 商品调拨审批通过
*/
export function productTransferApproved(busNo) {
return request({
url: '/inventory-manage/receipt/product-transfer-approved?busNo=' + busNo,
method: 'put',
})
}

View File

@@ -0,0 +1,175 @@
<template>
<div>
<el-table
ref="medicineRef"
height="400"
:data="medicineList"
@cell-click="clickRow"
>
<el-table-column
label="项目名称"
align="center"
prop="name"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
label="项目类型"
align="center"
prop="itemType_enumText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="包装单位"
align="center"
prop="unitCode_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="最小单位"
align="center"
prop="minUnitCode_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格"
align="center"
prop="volume"
:show-overflow-tooltip="true"
/>
<el-table-column
label="产品批号"
align="center"
prop="lotNumber"
/>
<el-table-column
label="包装单位"
align="center"
prop="unitCode_dictText"
:show-overflow-tooltip="true"
/>
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
<el-table-column label="单次剂量" align="center" prop="dose" />
<el-table-column
label="剂量单位"
align="center"
prop="doseUnitCode_dictText"
/> -->
<el-table-column
label="生产厂家"
align="center"
prop="manufacturerText"
/>
<el-table-column
label="编码"
align="center"
prop="ybNo"
/>
</el-table>
</div>
</template>
<script setup>
import {getMedicineList} from "./transferManagement";
import {watch} from "vue";
import {throttle} from "lodash-es";
const router = useRouter();
const route = useRoute();
const props = defineProps({
searchKey: {
type: String,
default: "",
},
itemType: {
type: String,
default: "",
},
sourceLocationId:{
type: String,
default: "",
},
purposeLocationId:{
type: String,
default: "",
},
sourceLocationId1:{
type: String,
default: "",
},
purposeLocationId1:{
type: String,
default: "",
},
});
const emit = defineEmits(["selectRow"]);
const queryParams = ref({
// pageNum: 1,
// pageSize: 50,
itemType: props.itemType,
// itemType1: props.itemType1,
orgLocationId:props.sourceLocationId,
// objLocationId:props.purposeLocationId,
orgLocationId1:props.sourceLocationId1,
objLocationId1:props.purposeLocationId1,
purchaseFlag:0
});
const medicineList = ref([]);
// 节流函数
const throttledGetList = throttle(
() => {
getList();
},
300,
{ leading: true, trailing: true }
);
watch(
() => props,
(newValue) => {
console.log(newValue,"newValue")
queryParams.value.searchKey = newValue.searchKey;
queryParams.value.itemType = newValue.itemType;
// queryParams.value.itemType1 = newValue.itemType1;
queryParams.value.orgLocationId=newValue.sourceLocationId;
// queryParams.value.objLocationId=newValue.purposeLocationId;
queryParams.value.orgLocationId1=newValue.sourceLocationId1;
// queryParams.value.objLocationId1=newValue.purposeLocationId1;
queryParams.value.purchaseFlag = 0
throttledGetList();
},
{ immdiate: true, deep: true }
);
getList();
function getList() {
console.log(queryParams.value,"queryParams.value1")
if(route.query.supplyBusNo){ // 编辑
queryParams.value.itemType = queryParams.value.itemType;
queryParams.value.orgLocationId = queryParams.value.orgLocationId1
// queryParams.value.objLocationId = queryParams.value.objLocationId1
console.log(queryParams.value,"queryParams.value1111111")
}
// delete queryParams.value.itemType
delete queryParams.value.orgLocationId1
delete queryParams.value.objLocationId1
console.log(queryParams.value,"queryParams.value")
getMedicineList(queryParams.value).then((res) => {
medicineList.value = res.data;
console.log(medicineList.value,"medicineList.value ")
});
}
function clickRow(row) {
console.log(row,"row--------------------")
emit("selectRow", row);
}
</script>
<style scoped>
:deep( .hover_row){
width: 100vw!important;
}
</style>