Compare commits
2 Commits
bdac9d0709
...
d083a3123a
| Author | SHA1 | Date | |
|---|---|---|---|
| d083a3123a | |||
| 96c1927f8d |
@@ -98,11 +98,14 @@ public class AdviceUtils {
|
||||
for (AdviceInventoryDto inventoryDto : adviceInventory) {
|
||||
// 匹配条件:adviceDefinitionId, adviceTableName, locationId, lotNumber 同时相等
|
||||
// 如果选择了具体的批次号,校验库存时需要加上批次号的匹配条件
|
||||
// 🔧 Bug #177 修复:添加容错处理,如果 adviceTableName 为空则跳过该项匹配
|
||||
boolean lotNumberMatch = StringUtils.isEmpty(saveDto.getLotNumber())
|
||||
|| saveDto.getLotNumber().equals(inventoryDto.getLotNumber());
|
||||
boolean tableNameMatch = StringUtils.isEmpty(saveDto.getAdviceTableName())
|
||||
|| inventoryDto.getItemTable().equals(saveDto.getAdviceTableName());
|
||||
// if (saveDto.)
|
||||
if (inventoryDto.getItemId().equals(saveDto.getAdviceDefinitionId())
|
||||
&& inventoryDto.getItemTable().equals(saveDto.getAdviceTableName())
|
||||
&& tableNameMatch
|
||||
&& inventoryDto.getLocationId().equals(saveDto.getLocationId()) && lotNumberMatch) {
|
||||
matched = true;
|
||||
// 检查库存是否充足
|
||||
|
||||
@@ -204,8 +204,16 @@
|
||||
T1.yb_no AS yb_no,
|
||||
'' AS product_name,
|
||||
-- 前端"类型"列:显示目录类别(category_code)
|
||||
-- 将category_code转换为整数,用于字典转换(字典转换框架会自动填充activityType_dictText)
|
||||
CAST(T1.category_code AS INTEGER) AS activity_type,
|
||||
-- 🔧 Bug #177 修复:将category_code(中文)转换为对应的整数值,用于字典转换
|
||||
-- 检验->1, 检查->2, 护理->3, 手术->4, 其他->5
|
||||
CASE T1.category_code
|
||||
WHEN '检验' THEN 1
|
||||
WHEN '检查' THEN 2
|
||||
WHEN '护理' THEN 3
|
||||
WHEN '手术' THEN 4
|
||||
WHEN '其他' THEN 5
|
||||
ELSE 0
|
||||
END AS activity_type,
|
||||
NULL AS activity_type_dictText,
|
||||
-- 前端"包装单位"列:显示使用单位(permitted_unit_code)
|
||||
T1.permitted_unit_code AS unit_code,
|
||||
|
||||
@@ -359,6 +359,7 @@ async function getList() {
|
||||
priceList: item.price ? [{ price: item.price }] : (item.retailPrice ? [{ price: item.retailPrice }] : []),
|
||||
inventoryList: [],
|
||||
adviceDefinitionId: item.id,
|
||||
adviceTableName: 'adm_device_definition', // 🔧 Bug #177 修复:添加耗材表名,用于后端库存匹配
|
||||
chargeItemDefinitionId: item.id,
|
||||
positionId: item.locationId,
|
||||
positionName: item.locationId_dictText || '',
|
||||
|
||||
Reference in New Issue
Block a user