Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jyzb_platformV2
概览
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
赵剑炜
jyzb_platformV2
Commits
6301545b
Commit
6301545b
authored
Mar 08, 2024
by
李小惠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://gitlab.sothing.top/843502640/jyzb_platformV2
into develop-lxh
parents
5b2aea09
c0e7cb29
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
176 行增加
和
58 行删除
+176
-58
EquipmentListDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/EquipmentListDto.java
+13
-1
InvSummaryDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/InvSummaryDto.java
+14
-0
InventoryMapDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/InventoryMapDto.java
+1
-0
BussinessInventoryChildrenDetail.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/BussinessInventoryChildrenDetail.java
+13
-6
InventoryMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/InventoryMapper.java
+3
-1
BussinessInventoryServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/BussinessInventoryServiceImpl.java
+110
-48
InventoryMapper.xml
jyzb-biz/src/main/resources/mapper/InventoryMapper.xml
+22
-2
没有找到文件。
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/EquipmentListDto.java
View file @
6301545b
...
...
@@ -3,6 +3,9 @@ package com.junmp.jyzb.api.bean.dto;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.List
;
@Data
public
class
EquipmentListDto
{
private
String
typeId
;
...
...
@@ -14,6 +17,15 @@ public class EquipmentListDto {
private
String
fixNumber
;
private
String
num
;
private
String
state
;
private
String
price
;
private
String
accountNumber
;
private
List
<
PriceInfo
>
priceInfo
;
@Data
public
static
class
PriceInfo
{
private
BigDecimal
price
;
private
String
num
;
private
Integer
accountNumber
;
private
BigDecimal
stockPrice
;
}
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/InvSummaryDto.java
0 → 100644
View file @
6301545b
package
com
.
junmp
.
jyzb
.
api
.
bean
.
dto
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
InvSummaryDto
{
private
String
typeId
;
private
String
sizeId
;
private
String
locationId
;
private
Integer
count
;
private
BigDecimal
price
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/InventoryMapDto.java
View file @
6301545b
...
...
@@ -11,6 +11,7 @@ public class InventoryMapDto {
private
String
id
;
private
String
warehouseId
;
private
String
warehouseName
;
private
String
childrenId
;
private
Long
orgId
;
private
String
orgName
;
private
String
typeId
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/BussinessInventoryChildrenDetail.java
View file @
6301545b
...
...
@@ -8,9 +8,11 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.apache.poi.hpsf.Decimal
;
import
org.springframework.data.annotation.Id
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -25,7 +27,7 @@ public class BussinessInventoryChildrenDetail implements Serializable {
*/
@TableId
(
value
=
"id"
)
@Id
private
Stri
ng
id
;
private
Lo
ng
id
;
/**
* 工作流id
...
...
@@ -39,6 +41,16 @@ public class BussinessInventoryChildrenDetail implements Serializable {
@TableField
(
value
=
"is_use"
)
private
Integer
isUse
;
/**
* 是否已使用
*/
@TableField
(
value
=
"price"
)
private
BigDecimal
price
;
/**
*
*/
@TableField
(
value
=
"total_price"
)
private
BigDecimal
totalPrice
;
/**
* 工作流id
*/
@TableField
(
value
=
"production_date"
)
...
...
@@ -60,11 +72,6 @@ public class BussinessInventoryChildrenDetail implements Serializable {
@TableField
(
value
=
"num"
)
private
Integer
num
;
/**
* 月
*/
@TableField
(
value
=
"price"
)
private
Integer
price
;
/**
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/InventoryMapper.java
View file @
6301545b
...
...
@@ -24,13 +24,15 @@ public interface InventoryMapper extends BaseMapper<Inventory> {
//根据单警柜统计装备信息
List
<
WarehouseInvDto
>
GetViewWarehouseInv
(
@Param
(
"warehouseId"
)
Long
org
Id
,
@Param
(
"typeIdsList"
)
List
<
String
>
typeIdsList
,
@Param
(
"sizeIds"
)
List
<
String
>
sizeIds
);
List
<
WarehouseInvDto
>
GetViewWarehouseInv
(
@Param
(
"warehouseId"
)
String
warehouse
Id
,
@Param
(
"typeIdsList"
)
List
<
String
>
typeIdsList
,
@Param
(
"sizeIds"
)
List
<
String
>
sizeIds
);
List
<
ViewEquipmentDto
>
GetViewEquipment
(
@Param
(
"epcList"
)
List
<
String
>
epcList
);
List
<
EpcListDto
>
GetViewCountByepcs
(
@Param
(
"epcList"
)
List
<
String
>
epcList
);
List
<
InventoryMapDto
>
GetViewInventoryMap
(
@Param
(
"warehouseId"
)
String
warehouseId
);
Boolean
deleteByEpcs
(
@Param
(
"list"
)
List
<
String
>
epcs
);
List
<
InvSummaryDto
>
selectWarehouseByEpcs
(
@Param
(
"list"
)
List
<
String
>
epcs
,
@Param
(
"orgId"
)
String
orgId
);
//根据单警柜统计装备信息
boolean
SetCabinetInventory
(
@Param
(
"brokenNumberDays"
)
Integer
brokenNumberDays
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/BussinessInventoryServiceImpl.java
View file @
6301545b
...
...
@@ -441,37 +441,38 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
public
Boolean
UploadStock
(
UploadInventoryReq
req
)
{
//更新之前先把库存表的epc备份
BussinessInventory
BI
=
this
.
getById
(
req
.
getOrderId
());
String
type
=
BI
.
getInventoryType
().
toString
();
InventorySumReq
sumreq
=
new
InventorySumReq
();
String
epcList
=
""
;
List
<
WarehouseInventory
>
details
=
new
ArrayList
<>();
if
(
type
.
equals
(
"0"
))
{
details
=
warehouseInventoryService
.
list
(
new
LambdaQueryWrapper
<
WarehouseInventory
>().
eq
(
WarehouseInventory:
:
getLocationId
,
BI
.
getWarehouseId
())
);
}
else
if
(
type
.
equals
(
"1"
))
//按装备类型盘点
{
List
<
String
>
typeIds
=
Arrays
.
asList
(
BI
.
getRules
().
split
(
","
));
details
=
warehouseInventoryService
.
list
(
new
LambdaQueryWrapper
<
WarehouseInventory
>().
eq
(
WarehouseInventory:
:
getLocationId
,
BI
.
getWarehouseId
())
.
and
(
qw
->
typeIds
.
forEach
(
typeId
->
qw
.
or
().
eq
(
WarehouseInventory:
:
getTypeId
,
typeId
)))
);
}
else
if
(
type
.
equals
(
"2"
))
//按号型盘点
if
(
BI
.
getInventoryState
().
equals
(
"close"
))
{
List
<
String
>
sizeIds
=
Arrays
.
asList
(
BI
.
getRules
().
split
(
","
));
details
=
warehouseInventoryService
.
list
(
new
LambdaQueryWrapper
<
WarehouseInventory
>().
eq
(
WarehouseInventory:
:
getLocationId
,
BI
.
getWarehouseId
())
.
and
(
qw
->
sizeIds
.
forEach
(
size
->
qw
.
or
().
eq
(
WarehouseInventory:
:
getSizeId
,
size
)))
);
throw
new
ServiceException
(
InventoryExceptionEnum
.
ORDER_CLOSED
);
}
// String type= BI.getInventoryType().toString();
// InventorySumReq sumreq=new InventorySumReq();
// String epcList="";
// List<WarehouseInventory> details=new ArrayList<>();
// if (type.equals("0"))
// {
//
// details = warehouseInventoryService.list(
// new LambdaQueryWrapper<WarehouseInventory>().eq(WarehouseInventory::getLocationId, BI.getWarehouseId())
// );
//
//
// } else if (type.equals("1"))//按装备类型盘点
// {
// List<String> typeIds = Arrays.asList(BI.getRules().split(","));
// details = warehouseInventoryService.list(
// new LambdaQueryWrapper<WarehouseInventory>().eq(WarehouseInventory::getLocationId, BI.getWarehouseId())
// .and(qw -> typeIds.forEach(typeId -> qw.or().eq(WarehouseInventory::getTypeId, typeId)))
// );
// }
// else if (type.equals("2"))//按号型盘点
// {
// List<String> sizeIds = Arrays.asList(BI.getRules().split(","));
// details = warehouseInventoryService.list(
// new LambdaQueryWrapper<WarehouseInventory>().eq(WarehouseInventory::getLocationId, BI.getWarehouseId())
// .and(qw -> sizeIds.forEach(size -> qw.or().eq(WarehouseInventory::getSizeId, size)))
// );
// }
...
...
@@ -489,35 +490,31 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
bussinessInventoryChildrenDetailService
.
removeBatchByIds
(
ChildrenDetail
);
}
}
List
<
BussinessInventoryChildrenDetail
>
updateInvChilred
=
new
ArrayList
<>();
for
(
BussinessDetail
detail
:
ChildrenList
)
{
//子单据中的数据打上标记,以后不会再使用
List
<
BussinessInventoryChildrenDetail
>
ChildrenDetail
=
bussinessInventoryChildrenDetailService
.
list
(
new
LambdaQueryWrapper
<
BussinessInventoryChildrenDetail
>().
eq
(
BussinessInventoryChildrenDetail:
:
getInvDetailId
,
detail
.
getId
())
);
updateInvChilred
.
addAll
(
ChildrenDetail
);
}
if
(
updateInvChilred
.
size
()>
0
)
{
updateInvChilred
.
forEach
(
p
->
p
.
setIsUse
(
1
));
updateInvChilred
.
forEach
(
p
->
p
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
()));
bussinessInventoryChildrenDetailService
.
updateBatchById
(
updateInvChilred
);
}
if
(
ChildrenList
.
size
()>
0
)
{
bussinessInventoryDetailService
.
removeBatchByIds
(
ChildrenList
);
}
List
<
BussinessInventoryChildrenDetail
>
ChildrenInfo
=
new
ArrayList
<>();
//将上报的数据传入数据库存储
BeanPlusUtil
.
copyProperties
(
req
,
BI
);
List
<
BussinessDetail
>
Bussinessdetails
=
new
ArrayList
<>();
for
(
EquipmentListDto
detail
:
req
.
getEquipmentList
())
{
for
(
EquipmentListDto
.
PriceInfo
priceEq
:
detail
.
getPriceInfo
())
{
BussinessDetail
eqDto
=
new
BussinessDetail
();
BeanPlusUtil
.
copyProperties
(
detail
,
eqDto
);
eqDto
.
setAccountNum
(
detail
.
getAccountNumber
());
eqDto
.
setNum
(
Integer
.
valueOf
(
priceEq
.
getNum
()));
eqDto
.
setPrice
(
priceEq
.
getPrice
());
eqDto
.
setStockPrice
(
priceEq
.
getStockPrice
());
eqDto
.
setAccountNum
(
String
.
valueOf
(
priceEq
.
getAccountNumber
()));
eqDto
.
setInventoryId
(
Long
.
valueOf
(
req
.
getOrderId
()));
eqDto
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
eqDto
.
setCreateTime
(
DateTimeUtil
.
getCurrentDateTime
());
Bussinessdetails
.
add
(
eqDto
);
}
}
BI
.
setEpcUpdate
(
req
.
getEpcList
());
BI
.
setResult
(
req
.
getState
());
...
...
@@ -533,6 +530,7 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
public
Boolean
UpdateDetail
(
UpdateDetailReq
req
)
{
BussinessDetail
bd
=
bussinessInventoryDetailService
.
getById
(
req
.
getDetailId
());
List
<
BussinessInventoryChildrenDetail
>
ChildrenDetail
=
bussinessInventoryChildrenDetailService
.
list
(
new
LambdaQueryWrapper
<
BussinessInventoryChildrenDetail
>().
eq
(
BussinessInventoryChildrenDetail:
:
getInvDetailId
,
req
.
getDetailId
())
);
...
...
@@ -546,6 +544,8 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
BussinessInventoryChildrenDetail
Bcd
=
new
BussinessInventoryChildrenDetail
();
BeanPlusUtil
.
copyProperties
(
eqInfo
,
Bcd
);
Bcd
.
setInvDetailId
(
req
.
getDetailId
());
Bcd
.
setPrice
(
bd
.
getPrice
());
Bcd
.
setTotalPrice
(
bd
.
getStockPrice
());
Bcd
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
Bcd
.
setCreateTime
(
DateTimeUtil
.
getCurrentDateTime
());
AddChildrenDetail
.
add
(
Bcd
);
...
...
@@ -599,7 +599,7 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
for
(
InventorySummary
summary
:
SumResult
)
{
for
(
BussinessDetail
bussiness
:
bussinessDetail
)
{
if
(
summary
.
getTypeId
().
equals
(
bussiness
.
getTypeId
())&&
summary
.
getUnitPrice
().
equals
(
bussiness
.
getPrice
())
&&
summary
.
getSizeId
().
equals
(
bussiness
.
getSizeId
()))
{
&&
summary
.
getLocationId
().
equals
(
BI
.
getWarehouseId
())
&&
summary
.
getSizeId
().
equals
(
bussiness
.
getSizeId
()))
{
summary
.
setStockNumber
(
bussiness
.
getFixNumber
());
summary
.
setOutboundNumber
(
0
);
summary
.
setNumber
(
bussiness
.
getFixNumber
());
...
...
@@ -635,7 +635,6 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
InsertSum
.
setNumber
(
bdList
.
getNum
());
InsertSum
.
setOrgId
(
BI
.
getOrgId
());
InsertSum
.
setOrgName
(
BI
.
getOrgName
());
InsertSum
.
setOrgCode
(
org
.
getOrgCode
());
InsertSum
.
setTypeId
(
bdList
.
getTypeId
());
InsertSum
.
setTypeName
(
bdList
.
getTypeName
());
...
...
@@ -685,11 +684,23 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
}
List
<
WarehouseInvDto
>
DeleteFakeEpc
=
inventoryMapper
.
GetViewWarehouseInv
(
BI
.
get
Org
Id
(),
typeIds
,
sizeIds
);
List
<
WarehouseInvDto
>
DeleteFakeEpc
=
inventoryMapper
.
GetViewWarehouseInv
(
BI
.
get
Warehouse
Id
(),
typeIds
,
sizeIds
);
List
<
Inventory
>
addInvList
=
new
ArrayList
<>();
List
<
WarehouseInventory
>
addWareInvList
=
new
ArrayList
<>();
List
<
InventoryMapDto
>
InvFakeList
=
inventoryMapper
.
GetViewInventoryMap
(
BI
.
getWarehouseId
());
List
<
BussinessInventoryChildrenDetail
>
updateInvChilred
=
new
ArrayList
<>();
for
(
InventoryMapDto
detail
:
InvFakeList
)
{
BussinessInventoryChildrenDetail
ChildrenDetail
=
bussinessInventoryChildrenDetailService
.
getById
(
detail
.
getChildrenId
());
updateInvChilred
.
add
(
ChildrenDetail
);
}
if
(
updateInvChilred
.
size
()>
0
)
{
updateInvChilred
.
forEach
(
p
->
p
.
setIsUse
(
1
));
updateInvChilred
.
forEach
(
p
->
p
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
()));
bussinessInventoryChildrenDetailService
.
updateBatchById
(
updateInvChilred
);
}
for
(
InventoryMapDto
invFake:
InvFakeList
)
{
Random
random
=
new
Random
();
//先插入仓库实体表
...
...
@@ -697,7 +708,8 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
String
epc
=
"000000"
+
DateTimeUtil
.
getCurrentDateTime
().
getTime
()+(
random
.
nextInt
(
999999
-
100000
+
1
)
+
100000
);
Inventory
inventory
=
new
Inventory
();
inventory
.
setEpc
(
epc
);
inventory
.
setEpcType
(
1
);
inventory
.
setPrice
(
invFake
.
getPrice
());
inventory
.
setSizeId
(
invFake
.
getSizeId
());
inventory
.
setTypeId
(
invFake
.
getTypeId
());
inventory
.
setPrice
(
invFake
.
getPrice
());
...
...
@@ -705,6 +717,7 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
inventory
.
setState
(
"normal"
);
inventory
.
setBussinessState
(
"normal"
);
inventory
.
setCreateTime
(
DateTimeUtil
.
getCurrentDateTime
());
inventory
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
inventory
.
setProductionDate
(
invFake
.
getProductionDate
());
inventory
.
setWarrantyPeriod
(
invFake
.
getWarrantyPeriod
());
inventory
.
setMaintenancePeriod
(
invFake
.
getMaintenancePeriod
());
...
...
@@ -720,6 +733,7 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
warehouseInventory
.
setTypeId
(
invFake
.
getTypeId
());
warehouseInventory
.
setSizeId
(
invFake
.
getSizeId
());
warehouseInventory
.
setLocationType
(
"0"
);
warehouseInventory
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
warehouseInventory
.
setLocationState
(
"in"
);
warehouseInventory
.
setCreateTime
(
DateTimeUtil
.
getCurrentDateTime
());
warehouseInventory
.
setOrgName
(
invFake
.
getOrgName
());
...
...
@@ -747,8 +761,47 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
}
else
{
UpdateInventorys
=
new
ArrayList
<>(
Collections
.
singletonList
(
epcUpdate
));
}
//需要对Summary表得数据进行更新
List
<
InvSummaryDto
>
Summary
=
inventoryMapper
.
selectWarehouseByEpcs
(
UpdateInventorys
,
String
.
valueOf
(
BI
.
getOrgId
()));
//删除同组织机构下EPC所在
List
<
InventorySummary
>
UpdateSummary
=
new
ArrayList
<>();
List
<
InventorySummary
>
DeleteSummary
=
new
ArrayList
<>();
for
(
InvSummaryDto
Isum:
Summary
)
{
InventorySumReq
summaryreq
=
new
InventorySumReq
();
summaryreq
.
setLocationId
(
Isum
.
getLocationId
());
summaryreq
.
setUnitPrice
(
String
.
valueOf
(
Isum
.
getPrice
()));
summaryreq
.
setTypeId
(
Isum
.
getTypeId
());
summaryreq
.
setSizeId
(
Isum
.
getSizeId
());
InventorySummary
InvSum
=
inventorySummaryService
.
getOne
(
summaryreq
);
if
(
InvSum
!=
null
)
//同组织原有仓库需要减少数量和价格
{
Integer
currentNumber
=
InvSum
.
getNumber
()-
Isum
.
getCount
();
BigDecimal
count
=
new
BigDecimal
(
Isum
.
getCount
());
BigDecimal
price
=
Isum
.
getPrice
();
BigDecimal
result
=
count
.
multiply
(
price
);
BigDecimal
currentPrice
=
InvSum
.
getPrice
().
subtract
(
result
);
//当前价格
InvSum
.
setPrice
(
currentPrice
);
InvSum
.
setNumber
(
currentNumber
);
InvSum
.
setStockNumber
(
currentNumber
);
InvSum
.
setStockNumberPrice
(
currentPrice
);
InvSum
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
if
(
InvSum
.
getStockNumber
()==
0
&&
InvSum
.
getNumber
()==
0
&&
InvSum
.
getFixNumber
()==
0
&&
InvSum
.
getBrokenNumber
()==
0
&&
InvSum
.
getDestructionNumber
()==
0
&&
InvSum
.
getOutboundNumber
()==
0
)
{
DeleteSummary
.
add
(
InvSum
);
}
else
{
UpdateSummary
.
add
(
InvSum
);
}
}
//同组织机构当前仓库需要增加价格和数量
InventorySumReq
summaryNowReq
=
new
InventorySumReq
();
summaryNowReq
.
setLocationId
(
BI
.
getWarehouseId
());
summaryNowReq
.
setUnitPrice
(
String
.
valueOf
(
Isum
.
getPrice
()));
summaryNowReq
.
setTypeId
(
Isum
.
getTypeId
());
summaryNowReq
.
setSizeId
(
Isum
.
getSizeId
());
}
List
<
ViewEquipmentDto
>
viewEd
=
inventoryMapper
.
GetViewEquipment
(
UpdateInventorys
);
for
(
ViewEquipmentDto
inv:
viewEd
)
{
...
...
@@ -778,6 +831,15 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
{
warehouseInventoryService
.
removeBatchByIds
(
DeleteList
);
}
if
(
DeleteSummary
.
size
()>
0
)
{
inventorySummaryService
.
removeBatchByIds
(
DeleteSummary
);
}
if
(
UpdateSummary
.
size
()>
0
)
{
inventorySummaryService
.
updateBatchById
(
UpdateSummary
);
}
if
(
SaveEpcList
.
size
()>
0
)
{
warehouseInventoryService
.
saveBatch
(
SaveEpcList
);
...
...
jyzb-biz/src/main/resources/mapper/InventoryMapper.xml
View file @
6301545b
...
...
@@ -76,7 +76,7 @@
FROM
view_warehouse_inv
WHERE
orgId = #{org
Id}
locationId = #{warehouse
Id}
<if
test=
"typeIdsList!=null and typeIdsList.size() > 0"
>
AND type_id IN
...
...
@@ -100,7 +100,7 @@
</select>
<delete
id=
"deleteByEpcs"
parameterType=
"java.util.List"
>
DELETE FROM inventory
DELETE FROM
base_
inventory
WHERE epc IN
<foreach
item=
"item"
index=
"index"
collection=
"list"
open=
"("
separator=
","
close=
")"
>
...
...
@@ -108,6 +108,26 @@
</foreach>
</delete>
<select
id=
"selectWarehouseByEpcs"
resultType=
"com.junmp.jyzb.api.bean.dto.InvSummaryDto"
>
SELECT
bi.type_id as typeId,
bi.size_id as sizeId,
COUNT(bi.id) AS count,
bwi.location_id as locationId,
bi.price
FROM
`base_inventory` `bi`
JOIN
`base_warehouse_inventory` `bwi` ON `bi`.`epc` = `bwi`.`epc`
WHERE bi.epc IN
<foreach
item=
"item"
index=
"index"
collection=
"list"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
and bwi.org_id=#{orgId}
GROUP BY
bi.size_id, bi.type_id, bi.price,bwi.location_id
</select>
<insert
id=
"SetCabinetInventory"
>
INSERT INTO base_inventory_summary_type2 (id,org_id_int,org_name, org_code,type_id,type_name,size_id,size_name,location_id,location_name,
number,unit_price,price,stock_number, outbound_number,destruction_number,expire_number,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论