Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mini-wms
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
周海峰
mini-wms
Commits
f3d69c31
Commit
f3d69c31
authored
Dec 15, 2025
by
yubin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修bug
parent
e57792fc
全部展开
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
84 行增加
和
292 行删除
+84
-292
ruoyi-admin-vue/src/views/inventory/items/index.vue
+7
-8
ruoyi-admin-vue/src/views/inventory/orders/OutboundOrderFormWithItems.vue
+43
-54
ruoyi-admin-vue/src/views/inventory/orders/index.vue
+0
-0
ruoyi-admin-vue/src/views/inventory/warehouses/index.vue
+1
-8
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/InventoryTransactions.java
+4
-213
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/OutboundOrderItems.java
+1
-1
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/Owners.java
+1
-1
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/InventoryServiceImpl.java
+5
-6
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/OutboundOrdersServiceImpl.java
+1
-0
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/StorageLocationsServiceImpl.java
+7
-1
ruoyi-inventory/src/main/resources/mapper/inventory/InventoryMapper.xml
+6
-0
ruoyi-inventory/src/main/resources/mapper/inventory/InventoryTransactionsMapper.xml
+2
-0
ruoyi-inventory/src/main/resources/mapper/inventory/OutboundOrdersMapper.xml
+6
-0
没有找到文件。
ruoyi-admin-vue/src/views/inventory/items/index.vue
View file @
f3d69c31
...
...
@@ -16,16 +16,15 @@
<!-- 页面容器 -->
<div
class=
"page-container"
>
<!-- 物料查询表单 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<
el-form-item
label=
"主订单号"
prop=
"mainO
rderId"
>
<
!-- <el-form-item label="主订单号" prop="o
rderId">
<el-input
v-model=
"queryParams.
mainO
rderId"
v-model="queryParams.
o
rderId"
placeholder="请输入主订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item>
-->
<el-form-item
label=
"时间段"
prop=
"dateRange"
>
<el-date-picker
v-model=
"queryParams.dateRange"
...
...
@@ -253,7 +252,7 @@
style=
"width: 100%"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"60"
align=
"center"
/>
<el-table-column
label=
"主订单号"
align=
"center"
prop=
"
mainO
rderId"
width=
"150"
/>
<el-table-column
label=
"主订单号"
align=
"center"
prop=
"
o
rderId"
width=
"150"
/>
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"materialName"
min-width=
"150"
show-overflow-tooltip
/>
<el-table-column
label=
"批次"
align=
"center"
prop=
"batchCode"
width=
"120"
/>
<el-table-column
label=
"仓库"
align=
"center"
prop=
"warehouseName"
width=
"120"
/>
...
...
@@ -314,7 +313,7 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
mainO
rderId
:
null
,
o
rderId
:
null
,
startDate
:
null
,
endDate
:
null
,
ownerId
:
null
,
...
...
@@ -339,7 +338,7 @@ export default {
detailQueryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
mainO
rderId
:
null
,
o
rderId
:
null
,
materialId
:
null
,
warehouseId
:
null
,
warehousesCode
:
null
,
...
...
@@ -466,7 +465,7 @@ export default {
this
.
detailQueryParams
=
{
pageNum
:
1
,
pageSize
:
10
,
mainOrderId
:
row
.
mainO
rderId
,
orderId
:
row
.
o
rderId
,
materialId
:
row
.
materialId
,
warehouseId
:
null
,
warehousesCode
:
null
,
...
...
ruoyi-admin-vue/src/views/inventory/orders/OutboundOrderFormWithItems.vue
View file @
f3d69c31
...
...
@@ -121,6 +121,41 @@
</div>
<el-row
:gutter=
"20"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"计划数量"
prop=
"plannedQuantity"
required
>
<el-input
v-model
.
number=
"currentSelectedRow.plannedQuantity"
type=
"number"
min=
"1"
:max=
"(currentSelectedRow.quantity || 0) - (currentSelectedRow.lockedQuantity || 0)"
@
input=
"handleRowPlannedQtyInput(currentSelectedRow); syncDetails(false)"
placeholder=
"输入计划数量"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"单价"
prop=
"unitPrice"
required
>
<el-input
v-model
.
number=
"currentSelectedRow.unitPrice"
placeholder=
"请输入单价"
type=
"number"
min=
"0"
step=
"0.01"
@
input=
"syncDetails(false)"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"凭证号"
prop=
"voucherNumber"
>
<el-input
v-model=
"currentSelectedRow.voucherNumber"
placeholder=
"请输入凭证号"
@
input=
"syncDetails(false)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
style=
"margin-top: 10px;"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"约数"
prop=
"divisor"
>
<el-input
v-model
.
number=
"currentSelectedRow.divisor"
...
...
@@ -148,32 +183,6 @@
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"计划数量"
prop=
"plannedQuantity"
>
<el-input
v-model
.
number=
"currentSelectedRow.plannedQuantity"
type=
"number"
min=
"1"
:max=
"(currentSelectedRow.quantity || 0) - (currentSelectedRow.lockedQuantity || 0)"
@
input=
"handleRowPlannedQtyInput(currentSelectedRow); syncDetails(false)"
placeholder=
"输入计划数量"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
style=
"margin-top: 10px;"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"单价"
prop=
"unitPrice"
>
<el-input
v-model
.
number=
"currentSelectedRow.unitPrice"
placeholder=
"请输入单价"
type=
"number"
min=
"0"
step=
"0.01"
@
input=
"syncDetails(false)"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"发货方"
prop=
"shippedBy"
>
<el-input
v-model=
"currentSelectedRow.shippedBy"
...
...
@@ -182,16 +191,8 @@
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"凭证号"
prop=
"voucherNumber"
>
<el-input
v-model=
"currentSelectedRow.voucherNumber"
placeholder=
"请输入凭证号"
@
input=
"syncDetails(false)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
style=
"margin-top: 10px;"
>
<el-col
:span=
"16"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
...
...
@@ -226,6 +227,7 @@
<el-table-column
prop=
"batchId"
label=
"批次ID"
width=
"150"
/>
<el-table-column
prop=
"warehousesName"
label=
"仓库名称"
width=
"120"
/>
<el-table-column
prop=
"locationName"
label=
"库位名称"
width=
"120"
/>
<el-table-column
prop=
"plannedQuantity"
label=
"计划数量"
width=
"100"
/>
<el-table-column
prop=
"actualQuantity"
label=
"实际数量"
width=
"100"
fixed=
"right"
/>
<el-table-column
prop=
"unitPrice"
label=
"单价"
width=
"100"
/>
...
...
@@ -637,31 +639,18 @@ syncDetails(strict = true) {
if
(
row
.
plannedQuantity
>
availableQty
)
{
rowErrors
.
push
(
`计划数量不能超过可用库存(
${
availableQty
}
)`
);
}
}
else
{
rowErrors
.
push
(
`请填写计划数量`
);
}
// 3. 除数(有值才校验,无值不提示)
if
(
row
.
divisor
!==
null
&&
row
.
divisor
!==
undefined
)
{
if
(
row
.
unitPrice
!==
null
&&
row
.
unitPrice
!==
undefined
)
{
// 若有值但为0/负数,可补充校验(按需)
if
(
row
.
divisor
<=
0
)
{
rowErrors
.
push
(
'
换算率(除数)必须大于0
'
);
if
(
row
.
unitPrice
<=
0
)
{
rowErrors
.
push
(
'
请填写单价
'
);
}
}
// 4. 标签颜色(有值才校验,空字符串算不合规)
if
(
row
.
labelColor
!==
undefined
&&
row
.
labelColor
===
''
)
{
rowErrors
.
push
(
'请填写标签颜色'
);
}
// 5. 凭证号(有值才校验,空字符串算不合规)
if
(
row
.
voucherNumber
!==
undefined
&&
row
.
voucherNumber
===
''
)
{
rowErrors
.
push
(
'请填写凭证号'
);
}
// 6. 发货人(有值才校验,空字符串算不合规)
if
(
row
.
shippedBy
!==
undefined
&&
row
.
shippedBy
===
''
)
{
rowErrors
.
push
(
'请填写发货人'
);
}
// 收集当前行的错误(仅有值但不合规的字段)
if
(
rowErrors
.
length
>
0
)
{
errorMessages
.
push
(
`
${
rowName
}
:
${
rowErrors
.
join
(
'、'
)}
`
);
...
...
ruoyi-admin-vue/src/views/inventory/orders/index.vue
View file @
f3d69c31
差异被折叠。
点击展开。
ruoyi-admin-vue/src/views/inventory/warehouses/index.vue
View file @
f3d69c31
...
...
@@ -36,14 +36,7 @@
@
click=
"handleExport"
v-hasPermi=
"['inventory:warehouses:export']"
>
导出
</el-button>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"medium"
@
click=
"handleImport"
v-hasPermi=
"['inventory:warehouses:add']"
>
导入
</el-button>
</
template
>
</PageTitle>
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/InventoryTransactions.java
View file @
f3d69c31
...
...
@@ -2,6 +2,7 @@ package com.ruoyi.inventory.domain;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
...
...
@@ -13,6 +14,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ruoyi
* @date 2025-12-02
*/
@Data
public
class
InventoryTransactions
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -91,218 +93,7 @@ public class InventoryTransactions extends BaseEntity
@Excel
(
name
=
"排序号"
)
private
String
updateUserCode
;
public
String
getInventoryId
()
{
return
inventoryId
;
}
@Excel
(
name
=
"单价"
)
private
String
unitPrice
;
public
void
setInventoryId
(
String
inventoryId
)
{
this
.
inventoryId
=
inventoryId
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getId
()
{
return
id
;
}
public
void
setTransactionType
(
Long
transactionType
)
{
this
.
transactionType
=
transactionType
;
}
public
Long
getTransactionType
()
{
return
transactionType
;
}
public
void
setReferenceId
(
String
referenceId
)
{
this
.
referenceId
=
referenceId
;
}
public
String
getReferenceId
()
{
return
referenceId
;
}
public
void
setReferenceItemId
(
String
referenceItemId
)
{
this
.
referenceItemId
=
referenceItemId
;
}
public
String
getReferenceItemId
()
{
return
referenceItemId
;
}
public
void
setMaterialId
(
String
materialId
)
{
this
.
materialId
=
materialId
;
}
public
String
getMaterialId
()
{
return
materialId
;
}
public
void
setBatchCode
(
String
batchCode
)
{
this
.
batchCode
=
batchCode
;
}
public
String
getBatchCode
()
{
return
batchCode
;
}
public
void
setWarehouseId
(
String
warehouseId
)
{
this
.
warehouseId
=
warehouseId
;
}
public
String
getWarehouseId
()
{
return
warehouseId
;
}
public
void
setLocationId
(
String
locationId
)
{
this
.
locationId
=
locationId
;
}
public
String
getLocationId
()
{
return
locationId
;
}
public
void
setOwnerId
(
String
ownerId
)
{
this
.
ownerId
=
ownerId
;
}
public
String
getOwnerId
()
{
return
ownerId
;
}
public
void
setQuantityBefore
(
Long
quantityBefore
)
{
this
.
quantityBefore
=
quantityBefore
;
}
public
Long
getQuantityBefore
()
{
return
quantityBefore
;
}
public
void
setQuantityChange
(
Long
quantityChange
)
{
this
.
quantityChange
=
quantityChange
;
}
public
Long
getQuantityChange
()
{
return
quantityChange
;
}
public
void
setQuantityAfter
(
Long
quantityAfter
)
{
this
.
quantityAfter
=
quantityAfter
;
}
public
Long
getQuantityAfter
()
{
return
quantityAfter
;
}
public
void
setTransactionTime
(
Date
transactionTime
)
{
this
.
transactionTime
=
transactionTime
;
}
public
Date
getTransactionTime
()
{
return
transactionTime
;
}
public
void
setOperatedBy
(
String
operatedBy
)
{
this
.
operatedBy
=
operatedBy
;
}
public
String
getOperatedBy
()
{
return
operatedBy
;
}
public
void
setIsUsed
(
Long
isUsed
)
{
this
.
isUsed
=
isUsed
;
}
public
Long
getIsUsed
()
{
return
isUsed
;
}
public
void
setSortNo
(
Long
sortNo
)
{
this
.
sortNo
=
sortNo
;
}
public
Long
getSortNo
()
{
return
sortNo
;
}
public
void
setCreateUserCode
(
String
createUserCode
)
{
this
.
createUserCode
=
createUserCode
;
}
public
String
getCreateUserCode
()
{
return
createUserCode
;
}
public
void
setUpdateUserCode
(
String
updateUserCode
)
{
this
.
updateUserCode
=
updateUserCode
;
}
public
String
getUpdateUserCode
()
{
return
updateUserCode
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"transactionType"
,
getTransactionType
())
.
append
(
"referenceId"
,
getReferenceId
())
.
append
(
"referenceItemId"
,
getReferenceItemId
())
.
append
(
"materialId"
,
getMaterialId
())
.
append
(
"batchCode"
,
getBatchCode
())
.
append
(
"warehouseId"
,
getWarehouseId
())
.
append
(
"locationId"
,
getLocationId
())
.
append
(
"ownerId"
,
getOwnerId
())
.
append
(
"quantityBefore"
,
getQuantityBefore
())
.
append
(
"quantityChange"
,
getQuantityChange
())
.
append
(
"quantityAfter"
,
getQuantityAfter
())
.
append
(
"transactionTime"
,
getTransactionTime
())
.
append
(
"operatedBy"
,
getOperatedBy
())
.
append
(
"remark"
,
getRemark
())
.
append
(
"isUsed"
,
getIsUsed
())
.
append
(
"sortNo"
,
getSortNo
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"createUserCode"
,
getCreateUserCode
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"updateUserCode"
,
getUpdateUserCode
())
.
toString
();
}
}
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/OutboundOrderItems.java
View file @
f3d69c31
...
...
@@ -66,7 +66,7 @@ public class OutboundOrderItems extends BaseEntity
/** 单价 */
@Excel
(
name
=
"单价"
)
private
Long
unitPrice
;
private
Double
unitPrice
;
/** 计划数量 */
@Excel
(
name
=
"计划数量"
)
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/Owners.java
View file @
f3d69c31
...
...
@@ -28,7 +28,7 @@ public class Owners extends BaseEntity
@Excel
(
name
=
"货主名称"
)
private
String
ownerName
;
@Excel
(
name
=
"
货主
名称"
)
@Excel
(
name
=
"
英文
名称"
)
private
String
englishName
;
/** 货主类型 1-供应商 2-客户 3-内部 检索条件 */
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/InventoryServiceImpl.java
View file @
f3d69c31
...
...
@@ -159,14 +159,16 @@ public class InventoryServiceImpl implements IInventoryService
// 库存操作表插入数据
InventoryTransactions
transactions
=
new
InventoryTransactions
();
transactions
.
setId
(
IdUtils
.
simpleUUID
());
transactions
.
setTransactionType
(
2L
);
// 事务类型-盘点
transactions
.
setTransactionType
(
2L
);
// 事务类型-出库
transactions
.
setBatchCode
(
outboundOrderItem
.
getBatchCode
());
transactions
.
setUnitPrice
(
String
.
valueOf
(
outboundOrderItem
.
getUnitPrice
()));
transactions
.
setInventoryId
(
inventory
.
getId
());
// 库存表Id
transactions
.
setReferenceId
(
outboundOrderItem
.
getOutboundOrderId
());
//关联单号,相当于主记录-盘点主表
transactions
.
setReferenceItemId
(
outboundOrderItem
.
getId
());
// 盘点子表id
transactions
.
setMaterialId
(
outboundOrderItem
.
getMaterialId
());
transactions
.
setWarehouseId
(
outboundOrderItem
.
getWarehouseId
());
transactions
.
setLocationId
(
outboundOrderItem
.
getLocationId
());
OutboundOrders
outboundOrders
=
outboundOrderMapper
.
selectOutboundOrdersById
(
outboundOrderItem
.
get
Warehouse
Id
());
OutboundOrders
outboundOrders
=
outboundOrderMapper
.
selectOutboundOrdersById
(
outboundOrderItem
.
get
OutboundOrder
Id
());
transactions
.
setOwnerId
(
outboundOrders
.
getOwnerId
());
transactions
.
setQuantityBefore
(
Long
.
valueOf
(
quantity
));
// 变更前数量
transactions
.
setQuantityAfter
(
inventory
.
getQuantity
());
// 变更后数量
...
...
@@ -175,10 +177,7 @@ public class InventoryServiceImpl implements IInventoryService
transactions
.
setTransactionTime
(
nowDate
);
transactions
.
setOperatedBy
(
SystemUtils
.
getUserName
());
int
inventoryTransactions
=
insertInventoryTransactions
.
insertInventoryTransactions
(
transactions
);
if
(
inventoryTransactions
<
0
)
{
return
-
1
;
}
insertInventoryTransactions
.
insertInventoryTransactions
(
transactions
);
}
RefreshInventory
(
inventoryIds
);
}
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/OutboundOrdersServiceImpl.java
View file @
f3d69c31
...
...
@@ -413,6 +413,7 @@ public class OutboundOrdersServiceImpl implements IOutboundOrdersService
itemsList
.
setWarehousesId
(
itemDO
.
getWarehouseId
());
itemsList
.
setMaterialId
(
itemDO
.
getMaterialId
());
itemsList
.
setLocationId
(
itemDO
.
getLocationId
());
itemsList
.
setInventoryType
(
Long
.
valueOf
(
orderType
));
List
<
Inventory
>
inventory
=
inventoryService
.
selectInventoryList
(
itemsList
);
if
(
CollectionUtils
.
isEmpty
(
inventory
))
{
throw
new
ServiceException
(
String
.
format
(
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/StorageLocationsServiceImpl.java
View file @
f3d69c31
...
...
@@ -50,8 +50,10 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
public
StorageLocations
selectStorageLocationsById
(
String
id
)
{
StorageLocations
storageLocations
=
storageLocationsMapper
.
selectStorageLocationsById
(
id
);
String
[]
AllowedCategoryIds
=
storageLocations
.
getAllowedCategoryIds
().
split
(
","
);
String
AllowedCategoryName
=
""
;
if
(
storageLocations
.
getAllowedCategoryIds
()
!=
null
)
{
String
[]
AllowedCategoryIds
=
storageLocations
.
getAllowedCategoryIds
().
split
(
","
);
if
(
AllowedCategoryIds
!=
null
&&
AllowedCategoryIds
.
length
>
0
)
{
for
(
String
AllowedCategoryId
:
AllowedCategoryIds
)
{
Materials
materials
=
materialsMapper
.
selectMaterialsById
(
AllowedCategoryId
);
if
(
materials
!=
null
&&
materials
.
getMaterialName
()
!=
null
)
{
...
...
@@ -62,6 +64,8 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
AllowedCategoryName
+=
categoryName
;
}
}
}
}
storageLocations
.
setAllowedCategoryNames
(
AllowedCategoryName
);
return
storageLocations
;
}
...
...
@@ -260,6 +264,7 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
StorageLocations
storageLocations
=
new
StorageLocations
();
// 拷贝基础属性
BeanUtils
.
copyProperties
(
templateVO
,
storageLocations
);
storageLocations
.
setLocationName
(
templateVO
.
getLocationCode
());
// 字段类型转换与赋值
storageLocations
.
setId
(
UUID
.
randomUUID
().
toString
());
...
...
@@ -274,6 +279,7 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
storageLocations
.
setCreateBy
(
operId
);
storageLocations
.
setCreateTime
(
now
);
storageLocations
.
setCreateUserCode
(
operId
);
storageLocations
.
setWarehousesCode
(
"固定仓库"
);
storageLocations
.
setWarehousesId
(
"572ba484-199c-45d9-9735-610928ed5c70"
);
// 设置默认值
...
...
ruoyi-inventory/src/main/resources/mapper/inventory/InventoryMapper.xml
View file @
f3d69c31
...
...
@@ -563,6 +563,9 @@ and inventory_status = '1'
and i.unit_price > 0
and i.last_inbound_time >= DATE_FORMAT(CURDATE(), '%Y-%m-01')
and i.last_inbound_time
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01')
where
m.is_used =1
and m.is_active =1
group by m.id, m.material_name
order by value desc, m.material_name asc
</select>
...
...
@@ -577,6 +580,9 @@ and inventory_status = '1'
and i.is_used = 1
and i.last_inbound_time >= DATE_FORMAT(CURDATE(), '%Y-%m-01')
and i.last_inbound_time
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01')
where
m.is_used =1
and m.is_active =1
group by m.id, m.material_name
order by value desc, m.material_name asc
</select>
...
...
ruoyi-inventory/src/main/resources/mapper/inventory/InventoryTransactionsMapper.xml
View file @
f3d69c31
...
...
@@ -87,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createUserCode != null"
>
create_user_code,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateUserCode != null"
>
update_user_code,
</if>
<if
test=
"unitPrice != null"
>
unit_price,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id},
</if>
...
...
@@ -111,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createUserCode != null"
>
#{createUserCode},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateUserCode != null"
>
#{updateUserCode},
</if>
<if
test=
"unitPrice != null"
>
#{unitPrice},
</if>
</trim>
</insert>
...
...
ruoyi-inventory/src/main/resources/mapper/inventory/OutboundOrdersMapper.xml
View file @
f3d69c31
...
...
@@ -315,6 +315,9 @@
and ooi.is_used = 1
and ooi.shipped_at >= DATE_FORMAT(CURDATE(), '%Y-%m-01 00:00:00')
and ooi.shipped_at
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01 00:00:00')
where
m.is_used =1
and m.is_active =1
group by m.id, m.material_name
order by value desc
limit 10;
...
...
@@ -330,6 +333,9 @@
and ooi.is_used = 1
and ooi.shipped_at >= DATE_FORMAT(CURDATE(), '%Y-%m-01 00:00:00')
and ooi.shipped_at
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01 00:00:00')
where
m.is_used =1
and m.is_active =1
group by m.id, m.material_name
order by value desc
limit 10;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论