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
ea713972
Commit
ea713972
authored
Nov 24, 2023
by
赵剑炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改单警柜接口
parent
a238e903
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
23 行增加
和
7 行删除
+23
-7
Cabinet.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Cabinet.java
+1
-0
CabinetBox.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/CabinetBox.java
+1
-1
CabinetMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/CabinetMapper.java
+2
-1
CabinetServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetServiceImpl.java
+14
-2
CabinetMapper.xml
jyzb-biz/src/main/resources/mapper/CabinetMapper.xml
+5
-3
没有找到文件。
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Cabinet.java
View file @
ea713972
...
...
@@ -93,6 +93,7 @@ public class Cabinet implements Serializable {
*/
@ApiModelProperty
(
value
=
"主柜配置信息"
)
private
String
config
;
/**
* 库存总价
*/
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/CabinetBox.java
View file @
ea713972
...
...
@@ -79,7 +79,7 @@ public class CabinetBox implements Serializable {
* 箱门类型:1单警柜,2公共柜
*/
@ApiModelProperty
(
value
=
"箱门类型:1单警柜,2公共柜"
)
@TableField
(
"
box
_type"
)
@TableField
(
"
contain
_type"
)
private
Integer
boxType
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/CabinetMapper.java
View file @
ea713972
...
...
@@ -13,7 +13,7 @@ import java.util.Map;
public
interface
CabinetMapper
extends
BaseMapper
<
Cabinet
>
{
List
<
Cabinet
>
getAllCabinetByOrgList
(
@Param
(
"list"
)
List
<
Long
>
allOrgId
);
List
<
Cabinet
>
getAllCabinetsWithSingleCabinet
(
@Param
(
"orgId"
)
String
id
,
@Param
(
"
boxType"
)
String
box
Type
);
List
<
Cabinet
>
getAllCabinetsWithSingleCabinet
(
@Param
(
"orgId"
)
String
id
,
@Param
(
"
containType"
)
String
contain
Type
);
boolean
SetInventoryInfo
(
String
id
);
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetServiceImpl.java
View file @
ea713972
...
...
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.api.bean.dto.CabinetDto
;
...
...
@@ -193,8 +194,19 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
for
(
Cabinet
cabinet
:
list
)
{
CabinetDto
cabinetDto
=
new
CabinetDto
();
BeanPlusUtil
.
copyProperties
(
cabinet
,
cabinetDto
);
List
<
CabinetBox
>
list1
=
cabinetBoxService
.
list
(
new
LambdaQueryWrapper
<
CabinetBox
>()
.
eq
(
CabinetBox:
:
getCabinetId
,
cabinet
.
getId
()));
List
<
CabinetBox
>
list1
;
if
(
StringUtils
.
isNotBlank
(
req
.
getContainType
()))
{
list1
=
cabinetBoxService
.
list
(
new
LambdaQueryWrapper
<
CabinetBox
>()
.
eq
(
CabinetBox:
:
getCabinetId
,
cabinet
.
getId
())
.
eq
(
CabinetBox:
:
getBoxType
,
req
.
getContainType
())
);
}
else
{
list1
=
cabinetBoxService
.
list
(
new
LambdaQueryWrapper
<
CabinetBox
>()
.
eq
(
CabinetBox:
:
getCabinetId
,
cabinet
.
getId
())
);
}
List
<
CabinetBoxDto
>
cabinetBoxList
=
new
ArrayList
<>();
for
(
CabinetBox
cabinetBox
:
list1
)
{
CabinetBoxDto
cabinetBoxDto
=
new
CabinetBoxDto
();
...
...
jyzb-biz/src/main/resources/mapper/CabinetMapper.xml
View file @
ea713972
...
...
@@ -77,12 +77,14 @@
FROM base_cabinet c
JOIN pub_org o ON c.org_id_int = o.org_id
WHERE c.org_id_int = #{orgId}
AND (#{
boxType} IS NULL OR #{box
Type} = '' OR EXISTS (
AND (#{
containType} IS NULL OR #{contain
Type} = '' OR EXISTS (
SELECT 1
FROM base_cabinet_box cb
WHERE cb.cabinet_id = c.id
AND cb.box_type = #{boxType}
))
AND cb.contain_type = #{containType}
));
</select>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论