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
ae06e2e0
Commit
ae06e2e0
authored
Dec 05, 2023
by
赵剑炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0d7f8f95
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
20 行增加
和
9 行删除
+20
-9
Cabinet.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Cabinet.java
+10
-0
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
+7
-7
CabinetMapper.xml
jyzb-biz/src/main/resources/mapper/CabinetMapper.xml
+1
-1
没有找到文件。
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Cabinet.java
View file @
ae06e2e0
...
...
@@ -108,6 +108,8 @@ public class Cabinet implements Serializable {
private
Date
updateTime
;
/**
* 新增人员
*/
...
...
@@ -128,6 +130,13 @@ public class Cabinet implements Serializable {
@ApiModelProperty
(
value
=
"箱数"
)
private
Integer
num
;
private
String
policeName
;
private
Long
policeId
;
private
Integer
number
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/CabinetMapper.java
View file @
ae06e2e0
...
...
@@ -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
(
"containType"
)
String
containType
);
List
<
Cabinet
>
getAllCabinetsWithSingleCabinet
(
@Param
(
"orgId"
)
String
id
);
boolean
SetInventoryInfo
(
String
id
);
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetServiceImpl.java
View file @
ae06e2e0
...
...
@@ -179,7 +179,7 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
@Override
public
List
<
CabinetDto
>
getAllCabinetList
(
CabinetReq
req
)
{
List
<
CabinetDto
>
cabinetList
=
new
ArrayList
<>();
List
<
Cabinet
>
list
=
cabinetMapper
.
getAllCabinetsWithSingleCabinet
(
String
.
valueOf
(
req
.
getOrgId
())
,
req
.
getContainType
()
);
List
<
Cabinet
>
list
=
cabinetMapper
.
getAllCabinetsWithSingleCabinet
(
String
.
valueOf
(
req
.
getOrgId
()));
if
(
list
.
size
()
==
0
)
{
return
new
ArrayList
<>();
...
...
@@ -202,12 +202,12 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
CabinetBoxDto
cabinetBoxDto
=
new
CabinetBoxDto
();
BeanPlusUtil
.
copyProperties
(
cabinetBox
,
cabinetBoxDto
);
// 查询箱门绑定的警员id和姓名
List
<
Policeman
>
policeList
=
cabinetBoxPoliceMapper
.
selectByBoxId
(
cabinetBox
.
getId
());
if
(
policeList
.
size
()
!=
0
)
{
Policeman
policeman
=
policeList
.
get
(
0
);
cabinetBoxDto
.
setPoliceId
(
policeman
.
getId
());
cabinetBoxDto
.
setPoliceName
(
policeman
.
getName
());
}
//
List<Policeman> policeList=cabinetBoxPoliceMapper.selectByBoxId(cabinetBox.getId());
//
if (policeList.size() != 0) {
//
Policeman policeman = policeList.get(0);
//
cabinetBoxDto.setPoliceId(policeman.getId());
//
cabinetBoxDto.setPoliceName(policeman.getName());
//
}
cabinetBoxDto
.
setNum
(
cabinetBox
.
getNum
());
cabinetBoxList
.
add
(
cabinetBoxDto
);
}
...
...
jyzb-biz/src/main/resources/mapper/CabinetMapper.xml
View file @
ae06e2e0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.junmp.jyzb.mapper.CabinetMapper"
>
<resultMap
id=
"
BaseC
abinetResultMap"
type=
"com.junmp.jyzb.entity.Cabinet"
>
<resultMap
id=
"
c
abinetResultMap"
type=
"com.junmp.jyzb.entity.Cabinet"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"cabinetNum"
column=
"cabinet_num"
/>
<result
property=
"name"
column=
"name"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论