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
73ce52ca
Commit
73ce52ca
authored
Aug 04, 2023
by
李小惠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改单警柜,仓库,警员错误信息
parent
af146aa8
全部展开
显示空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
133 行增加
和
151 行删除
+133
-151
CabinetReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/CabinetReq.java
+1
-1
PolicemanReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/PolicemanReq.java
+3
-1
UpdateCabinetReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateCabinetReq.java
+2
-2
UpdatePolicemanReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdatePolicemanReq.java
+6
-6
CabinetController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/CabinetController.java
+12
-10
PoliceController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PoliceController.java
+10
-9
PolicemanFingerController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PolicemanFingerController.java
+1
-1
PolicemanFingerDoc.java
jyzb-biz/src/main/java/com/junmp/jyzb/doc/PolicemanFingerDoc.java
+1
-1
User.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/User.java
+1
-0
CabinetMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/CabinetMapper.java
+1
-1
CabinetService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/CabinetService.java
+6
-1
PoliceFingerService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/PoliceFingerService.java
+1
-1
PolicemanService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/PolicemanService.java
+2
-0
PubOrgService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/PubOrgService.java
+4
-1
WarehouseService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/WarehouseService.java
+3
-0
CabinetBoxServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetBoxServiceImpl.java
+0
-7
CabinetServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetServiceImpl.java
+23
-50
PoliceFingerServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PoliceFingerServiceImpl.java
+6
-14
PolicemanServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
+0
-0
PubOrgServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PubOrgServiceImpl.java
+26
-10
WarehouseServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/WarehouseServiceImpl.java
+24
-35
没有找到文件。
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/CabinetReq.java
View file @
73ce52ca
...
...
@@ -41,7 +41,7 @@ public class CabinetReq extends BaseRequest {
* 组织机构号
*/
@ApiModelProperty
(
value
=
"组织机构号"
)
private
Stri
ng
orgId
;
private
Lo
ng
orgId
;
/**
* 位置信息
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/PolicemanReq.java
View file @
73ce52ca
...
...
@@ -5,6 +5,7 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
@Data
...
...
@@ -16,9 +17,10 @@ public class PolicemanReq extends BaseRequest {
private
String
name
;
@NotBlank
(
message
=
"箱门id不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
,
detail
.
class
})
@NotBlank
(
message
=
"箱门id不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
})
private
String
cabinetBoxId
;
@NotNull
(
message
=
"组织机构id不能为空"
,
groups
=
{})
private
Long
orgId
;
private
Long
departmentId
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateCabinetReq.java
View file @
73ce52ca
...
...
@@ -43,9 +43,9 @@ public class UpdateCabinetReq extends BaseRequest {
/**
* 组织机构号
*/
@Not
Blank
(
message
=
"组织机构号不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
,
detail
.
class
})
@Not
Null
(
message
=
"组织机构号不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
,
detail
.
class
})
@ApiModelProperty
(
value
=
"组织机构号"
)
private
Stri
ng
orgId
;
private
Lo
ng
orgId
;
/**
* 位置信息
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdatePolicemanReq.java
View file @
73ce52ca
...
...
@@ -14,20 +14,20 @@ public class UpdatePolicemanReq extends BaseRequest {
@NotNull
(
message
=
"警员主键不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
,
delete
.
class
,
detail
.
class
})
private
String
id
;
@NotNull
(
message
=
"警员名字不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
,
delete
.
class
,
detail
.
class
})
@NotNull
(
message
=
"警员名字不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
})
private
String
name
;
private
String
cabinetBoxId
;
@NotNull
(
message
=
"组织机构id不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
,
delete
.
class
,
detail
.
class
})
@NotNull
(
message
=
"组织机构id不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
})
private
Long
orgId
;
private
Long
departmentId
;
@NotNull
(
message
=
"警员编号不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
,
delete
.
class
,
detail
.
class
})
@NotNull
(
message
=
"警员编号不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
})
private
String
policeCode
;
@NotNull
(
message
=
"性别不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
,
delete
.
class
,
detail
.
class
})
@NotNull
(
message
=
"性别不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
})
private
String
sex
;
private
String
faceInfo
;
...
...
@@ -38,7 +38,7 @@ public class UpdatePolicemanReq extends BaseRequest {
private
String
password
;
@NotNull
(
message
=
"电话不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
,
delete
.
class
,
detail
.
class
})
@NotNull
(
message
=
"电话不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
})
private
String
photo
;
private
String
phone
;
...
...
@@ -47,7 +47,7 @@ public class UpdatePolicemanReq extends BaseRequest {
private
Date
updateTime
;
@NotNull
(
message
=
"身份证号不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
,
delete
.
class
,
detail
.
class
})
@NotNull
(
message
=
"身份证号不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
})
private
String
idCard
;
private
String
updateUser
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/controller/CabinetController.java
View file @
73ce52ca
...
...
@@ -21,7 +21,6 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@Slf4j
...
...
@@ -35,6 +34,13 @@ public class CabinetController {
private
CabinetBoxService
cabinetBoxService
;
@PostMapping
(
"/AddCabinetInfo"
)
@ApiOperation
(
"添加单警柜信息"
)
public
ApiRes
<
String
>
addCabinetInfo
(
@RequestBody
@Validated
(
ValidationApi
.
add
.
class
)
UpdateCabinetReq
req
){
String
cabinetId
=
cabinetService
.
addCabinetInfo
(
req
);
return
ApiRes
.
success
(
cabinetId
);
}
@PostMapping
(
"/ErrorState"
)
@ApiOperation
(
"单警柜状态变更"
)
public
ApiRes
<
Boolean
>
ChangeCabinetState
(
@RequestBody
UpdateCabinetReq
req
)
{
...
...
@@ -45,12 +51,6 @@ public class CabinetController {
return
ApiRes
.
success
(
result
);
}
@PostMapping
(
"/AddCabinetInfo"
)
@ApiOperation
(
"添加单警柜信息"
)
public
ApiRes
<
String
>
addCabinetInfo
(
@RequestBody
@Validated
(
ValidationApi
.
add
.
class
)
UpdateCabinetReq
req
){
String
cabinetId
=
cabinetService
.
addCabinetInfo
(
req
);
return
ApiRes
.
success
(
cabinetId
);
}
@PostMapping
(
"/DeleteCabinetInfo"
)
@ApiOperation
(
"删除单警柜信息"
)
...
...
@@ -73,11 +73,12 @@ public class CabinetController {
//通过单警柜id查询单个箱门及其箱门信息
@PostMapping
(
"/ShowOneCabinet"
)
@ApiOperation
(
"查询单个单警柜及其箱门信息"
)
public
ApiRes
<
CabinetDto
>
showOneCabinet
(
@RequestBody
CabinetReq
req
){
public
ApiRes
<
CabinetDto
>
showOneCabinet
(
@RequestBody
@Validated
(
ValidationApi
.
detail
.
class
)
CabinetReq
req
){
return
ApiRes
.
success
(
cabinetService
.
showOneCabinet
(
req
));
}
//根据组织机构id查询出单警柜的详细信息
@PostMapping
(
"/ShowCabinetList"
)
@ApiOperation
(
"查询单警柜列表"
)
public
ApiRes
<
List
<
CabinetDto
>>
showCabinetList
(
@RequestBody
CabinetReq
req
){
...
...
@@ -108,8 +109,8 @@ public class CabinetController {
@PostMapping
(
"/SearchOrgId"
)
@ApiOperation
(
"/根据单警柜id查询组织机构id"
)
public
ApiRes
<
Long
>
SearchOrgId
(
String
id
){
return
ApiRes
.
success
(
cabinetService
.
SearchOrgId
(
id
));
public
ApiRes
<
Long
>
SearchOrgId
(
@RequestBody
@Validated
(
ValidationApi
.
detail
.
class
)
CabinetReq
req
){
return
ApiRes
.
success
(
cabinetService
.
SearchOrgId
(
req
));
}
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PoliceController.java
View file @
73ce52ca
...
...
@@ -3,6 +3,7 @@ package com.junmp.jyzb.controller;
import
cn.hutool.core.util.ObjectUtil
;
import
com.junmp.jyzb.api.bean.dto.PoliceDto
;
import
com.junmp.jyzb.api.bean.dto.PolicemanDto
;
import
com.junmp.jyzb.api.bean.query.CabinetReq
;
import
com.junmp.jyzb.api.bean.query.PolicemanReq
;
import
com.junmp.jyzb.api.bean.req.UpdatePolicemanReq
;
import
com.junmp.jyzb.entity.Policeman
;
...
...
@@ -37,7 +38,7 @@ public class PoliceController {
@PostMapping
(
"/DeletePolice"
)
@ApiOperation
(
"删除警员信息"
)
public
ApiRes
<
Boolean
>
DeletePolice
(
@RequestBody
UpdatePolicemanReq
req
)
{
public
ApiRes
<
Boolean
>
DeletePolice
(
@RequestBody
@Validated
(
ValidationApi
.
delete
.
class
)
UpdatePolicemanReq
req
)
{
boolean
b
=
policemanService
.
DeletePolice
(
req
);
if
(!
b
){
return
ApiRes
.
failure
(
"删除失败"
);
...
...
@@ -71,8 +72,8 @@ public class PoliceController {
//根据组织机构id查询,只查询本级,不包含下级
@PostMapping
(
"/ShowPoliceList"
)
@ApiOperation
(
"查询某个组织机构下的所有警员信息"
)
public
ApiRes
<
PoliceDto
>
GetAllPolicemanList
(
Long
orgId
){
PoliceDto
policeDto
=
policemanService
.
GetAllPolicemanList
(
orgId
);
public
ApiRes
<
PoliceDto
>
GetAllPolicemanList
(
PolicemanReq
req
){
PoliceDto
policeDto
=
policemanService
.
GetAllPolicemanList
(
req
.
getOrgId
()
);
return
ApiRes
.
success
(
policeDto
);
}
...
...
@@ -85,7 +86,7 @@ public class PoliceController {
*/
@PostMapping
(
"/GetPoliceDetail"
)
@ApiOperation
(
"查询单个警员信息"
)
public
ApiRes
<
PolicemanDto
>
GetOnePolice
(
@RequestBody
PolicemanReq
req
)
{
public
ApiRes
<
PolicemanDto
>
GetOnePolice
(
@RequestBody
@Validated
(
ValidationApi
.
detail
.
class
)
PolicemanReq
req
)
{
return
ApiRes
.
success
(
policemanService
.
GetOnePolice
(
req
));
}
...
...
@@ -97,9 +98,9 @@ public class PoliceController {
*/
@PostMapping
(
"/GetPoliceData"
)
@ApiOperation
(
"查询与单警柜绑定的警员信息"
)
//根据单警柜id查询
public
ApiRes
<
PoliceDto
>
GetPoliceData
(
String
id
){
public
ApiRes
<
PoliceDto
>
GetPoliceData
(
CabinetReq
req
){
//获取该组织机构下所有警员的id
PoliceDto
policeDto
=
policemanService
.
GetPoliceData
(
id
);
PoliceDto
policeDto
=
policemanService
.
GetPoliceData
(
req
.
getId
()
);
return
ApiRes
.
success
(
policeDto
);
}
...
...
@@ -115,7 +116,7 @@ public class PoliceController {
@PostMapping
(
"/AddFaceInfo"
)
@ApiOperation
(
"添加警员面部信息"
)
public
ApiRes
<
Boolean
>
AddFaceInfo
(
@RequestBody
UpdatePolicemanReq
req
)
{
public
ApiRes
<
Boolean
>
AddFaceInfo
(
@RequestBody
@Validated
(
ValidationApi
.
detail
.
class
)
UpdatePolicemanReq
req
)
{
boolean
b
=
policemanService
.
AddFaceInfo
(
req
);
if
(!
b
){
return
ApiRes
.
failure
(
"添加失败"
);
...
...
@@ -125,7 +126,7 @@ public class PoliceController {
@PostMapping
(
"/UpdateFaceInfo"
)
@ApiOperation
(
"修改、删除人脸信息"
)
public
ApiRes
<
Boolean
>
UpdateFaceInfo
(
@RequestBody
UpdatePolicemanReq
req
)
{
public
ApiRes
<
Boolean
>
UpdateFaceInfo
(
@RequestBody
@Validated
(
ValidationApi
.
detail
.
class
)
UpdatePolicemanReq
req
)
{
boolean
b
=
policemanService
.
UpdateFaceInfo
(
req
);
if
(!
b
){
return
ApiRes
.
failure
(
"操作失败"
);
...
...
@@ -135,7 +136,7 @@ public class PoliceController {
@PostMapping
(
"/SearchFaceInfo"
)
@ApiOperation
(
"查找人脸信息"
)
public
ApiRes
<
Policeman
>
SearchFaceInfo
(
@RequestBody
PolicemanReq
req
)
{
public
ApiRes
<
Policeman
>
SearchFaceInfo
(
@RequestBody
@Validated
(
ValidationApi
.
detail
.
class
)
PolicemanReq
req
)
{
Policeman
policeman
=
policemanService
.
SearchFaceInfo
(
req
);
if
(
ObjectUtil
.
isEmpty
(
policeman
)){
return
ApiRes
.
failure
(
"未找到警员信息"
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PolicemanFingerController.java
View file @
73ce52ca
...
...
@@ -28,7 +28,7 @@ public class PolicemanFingerController implements PolicemanFingerDoc {
@PostMapping
(
"/AddFingerInfo"
)
@ApiOperation
(
"添加指纹信息"
)
public
ApiRes
<
Boolean
>
addFingerInfo
(
@RequestBody
@Validated
(
ValidationApi
.
add
.
class
)
UpdatePoliceFingerReq
req
)
{
public
ApiRes
<
Integer
>
addFingerInfo
(
@RequestBody
@Validated
(
ValidationApi
.
add
.
class
)
UpdatePoliceFingerReq
req
)
{
return
ApiRes
.
success
(
policeFingerService
.
addFingerInfo
(
req
))
;
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/doc/PolicemanFingerDoc.java
View file @
73ce52ca
...
...
@@ -14,7 +14,7 @@ import java.util.List;
@Api
(
value
=
"警员指纹管理"
,
tags
=
"警员指纹管理接口"
)
public
interface
PolicemanFingerDoc
{
@ApiOperation
(
value
=
"添加指纹信息"
,
tags
=
"警员指纹管理接口"
)
ApiRes
<
Boolean
>
addFingerInfo
(
UpdatePoliceFingerReq
req
);
ApiRes
<
Integer
>
addFingerInfo
(
UpdatePoliceFingerReq
req
);
@ApiOperation
(
value
=
"修改指纹信息"
,
tags
=
"警员指纹管理接口"
)
ApiRes
<
Boolean
>
updateFingerInfo
(
UpdatePoliceFingerReq
req
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/User.java
View file @
73ce52ca
...
...
@@ -20,6 +20,7 @@ public class User implements Serializable {
@TableField
(
value
=
"real_name"
)
private
String
realName
;
private
String
nickName
;
private
String
account
;
private
String
password
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/CabinetMapper.java
View file @
73ce52ca
...
...
@@ -12,7 +12,7 @@ import java.util.Map;
@Mapper
public
interface
CabinetMapper
extends
BaseMapper
<
Cabinet
>
{
List
<
Cabinet
>
getAllCabinetByOrgList
(
@Param
(
"allOrgId"
)
List
<
Stri
ng
>
allOrgId
);
List
<
Cabinet
>
getAllCabinetByOrgList
(
@Param
(
"allOrgId"
)
List
<
Lo
ng
>
allOrgId
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/CabinetService.java
View file @
73ce52ca
...
...
@@ -68,5 +68,10 @@ public interface CabinetService extends IService<Cabinet> {
*/
boolean
ChangeCabinetState
(
UpdateCabinetReq
req
);
Long
SearchOrgId
(
String
id
);
//根据单警柜id查询出组织机构id
Long
SearchOrgId
(
CabinetReq
req
);
//判断单警柜是否存在
Cabinet
CabinetExist
(
String
id
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/PoliceFingerService.java
View file @
73ce52ca
...
...
@@ -17,7 +17,7 @@ public interface PoliceFingerService extends IService<PoliceFinger> {
* @param req
* @return
*/
boolean
addFingerInfo
(
UpdatePoliceFingerReq
req
);
Integer
addFingerInfo
(
UpdatePoliceFingerReq
req
);
/**
* 更新指纹信息
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/PolicemanService.java
View file @
73ce52ca
...
...
@@ -50,4 +50,6 @@ public interface PolicemanService extends IService<Policeman> {
boolean
PoliceBindBox
(
PolicemanReq
req
);
//判断警员信息是否存在
Policeman
PoliceExist
(
String
policeId
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/PubOrgService.java
View file @
73ce52ca
...
...
@@ -16,7 +16,7 @@ public interface PubOrgService extends IService<PubOrg> {
ResponseResult
setShortName
(
Map
<
String
,
Object
>
orgId
);
List
<
String
>
getLowerOrg
(
Stri
ng
orgId
);
List
<
Long
>
getLowerOrg
(
Lo
ng
orgId
);
ResponseResult
setOrgParentIds
();
...
...
@@ -25,4 +25,7 @@ public interface PubOrgService extends IService<PubOrg> {
Boolean
ChangeState
(
UpdateOrgReq
req
);
//根据组织机构id查询出组织机构是否存在
PubOrg
PubOrgExist
(
Long
id
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/WarehouseService.java
View file @
73ce52ca
...
...
@@ -44,4 +44,7 @@ public interface WarehouseService extends IService<Warehouse> {
ResponseResult
setWarehouseInventory
(
Map
<
String
,
Object
>
msg
);
//通过仓库id 判断仓库是否存在
Warehouse
WarehoustExist
(
String
id
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetBoxServiceImpl.java
View file @
73ce52ca
...
...
@@ -26,8 +26,6 @@ import java.util.Map;
@Service
public
class
CabinetBoxServiceImpl
extends
ServiceImpl
<
CabinetBoxMapper
,
CabinetBox
>
implements
CabinetBoxService
{
@Resource
private
CabinetBoxMapper
cabinetBoxMapper
;
@Resource
private
CabinetService
cabinetService
;
...
...
@@ -51,11 +49,6 @@ public class CabinetBoxServiceImpl extends ServiceImpl<CabinetBoxMapper, Cabinet
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
AddBoxInfo
(
UpdateCabinetBoxReq
req
)
{
CabinetBox
one
=
this
.
getOne
(
new
LambdaQueryWrapper
<
CabinetBox
>()
.
eq
(
CabinetBox:
:
getId
,
req
.
getId
()));
if
(
ObjectUtil
.
isNotNull
(
one
)){
throw
new
ServiceException
(
CabinetBoxExceptionEnum
.
CABINETBOX_IS_EXISTS
);
}
CabinetBox
cabinetBox
=
new
CabinetBox
();
BeanPlusUtil
.
copyProperties
(
req
,
cabinetBox
);
//添加单警柜箱门信息默认状态为1
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetServiceImpl.java
View file @
73ce52ca
...
...
@@ -31,7 +31,6 @@ import javax.annotation.Resource;
import
java.util.*
;
import
static
com
.
junmp
.
jyzb
.
utils
.
CheckBlank
.
checkNotBlank
;
@Service
public
class
CabinetServiceImpl
extends
ServiceImpl
<
CabinetMapper
,
Cabinet
>
implements
CabinetService
{
...
...
@@ -49,8 +48,8 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
private
PolicemanService
policemanService
;
private
List
<
Stri
ng
>
getAllOrgId
(
CabinetReq
req
,
String
includeLowerLevel
)
{
List
<
Stri
ng
>
allOrg
=
new
ArrayList
<>();
private
List
<
Lo
ng
>
getAllOrgId
(
CabinetReq
req
,
String
includeLowerLevel
)
{
List
<
Lo
ng
>
allOrg
=
new
ArrayList
<>();
if
(
includeLowerLevel
.
equals
(
"false"
))
{
allOrg
.
add
(
req
.
getOrgId
());
}
else
if
(
includeLowerLevel
.
equals
(
"true"
))
{
...
...
@@ -60,7 +59,7 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
return
allOrg
;
}
private
List
<
Cabinet
>
getAllCabinetByOrg
(
List
<
Stri
ng
>
allOrgId
)
{
private
List
<
Cabinet
>
getAllCabinetByOrg
(
List
<
Lo
ng
>
allOrgId
)
{
List
<
Cabinet
>
allCabinet
=
new
ArrayList
<>();
allCabinet
=
cabinetMapper
.
getAllCabinetByOrgList
(
allOrgId
);
return
allCabinet
;
...
...
@@ -97,12 +96,7 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
public
String
addCabinetInfo
(
UpdateCabinetReq
req
)
{
Cabinet
cabinet
=
new
Cabinet
();
//查询传入的组织机构id是否存在
PubOrg
puborg
=
pubOrgService
.
getOne
(
new
LambdaQueryWrapper
<
PubOrg
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getOrgId
()),
PubOrg:
:
getOrgId
,
req
.
getOrgId
()));
if
(
ObjectUtil
.
isEmpty
(
puborg
))
{
//抛出组织机构不存在异常
throw
new
ServiceException
(
PubOrgExceptionEnum
.
PUBORG_NOT_EXIST
);
}
pubOrgService
.
PubOrgExist
(
req
.
getOrgId
());
//查询是否有重复的单警柜编号
List
<
Cabinet
>
list
=
this
.
list
(
new
LambdaQueryWrapper
<
Cabinet
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getCabinetNum
()),
Cabinet:
:
getCabinetNum
,
req
.
getCabinetNum
()));
...
...
@@ -151,12 +145,7 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
//遍历单警柜id列表
for
(
String
id:
cabinetIdList
)
{
//通过单警柜id查询出他的箱门数
Cabinet
cabinet
=
this
.
getOne
(
new
LambdaQueryWrapper
<
Cabinet
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
id
),
Cabinet:
:
getId
,
id
));
//如果查询不到单警柜抛出异常
if
(
ObjectUtil
.
isEmpty
(
cabinet
))
{
throw
new
ServiceException
(
CabinetExceptionEnum
.
CABINET_ISNOT_EXISTS
);
}
Cabinet
cabinet
=
CabinetExist
(
id
);
//查询出单警柜之后添加到列表中
cabinetList
.
add
(
cabinet
);
//通过单警柜id循环遍历出并删除所有箱门信息
...
...
@@ -197,6 +186,8 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
*/
@Override
public
List
<
CabinetDto
>
getAllCabinetList
(
CabinetReq
req
)
{
//判断组织机构是否存在
pubOrgService
.
PubOrgExist
(
req
.
getOrgId
());
List
<
Cabinet
>
cabinets
=
new
ArrayList
<>();
List
<
CabinetDto
>
cabinetList
=
new
ArrayList
<>();
List
<
CabinetBoxDto
>
cabinetBoxList
=
new
ArrayList
<>();
...
...
@@ -222,7 +213,7 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
}
//分两种情况,如果说是本级及下级(全部)所有的单警柜信息,则incluLowerLevel为true,如果是查询本级的单警柜信息则为false
if
(
req
.
getIncludeLowerLevel
().
equals
(
"true"
)
||
req
.
getIncludeLowerLevel
().
equals
(
"false"
))
{
List
<
Stri
ng
>
allOrgId
=
getAllOrgId
(
req
,
req
.
getIncludeLowerLevel
());
List
<
Lo
ng
>
allOrgId
=
getAllOrgId
(
req
,
req
.
getIncludeLowerLevel
());
if
(
allOrgId
.
size
()==
0
)
{
//抛出组织机构不存在异常
throw
new
ServiceException
(
PubOrgExceptionEnum
.
PUBORG_NOT_EXIST
);
...
...
@@ -259,11 +250,7 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
@Override
public
CabinetDto
showOneCabinet
(
CabinetReq
req
)
{
//查询单警柜信息
Cabinet
one
=
getOne
(
new
LambdaQueryWrapper
<
Cabinet
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getId
()),
Cabinet:
:
getId
,
req
.
getId
()));
if
(
ObjectUtil
.
isNull
(
one
)){
throw
new
ServiceException
(
CabinetExceptionEnum
.
CABINET_ISNOT_EXISTS
);
}
Cabinet
cabinet
=
CabinetExist
(
req
.
getId
());
//查询单警柜的箱门信息
List
<
CabinetBox
>
list
=
cabinetBoxService
.
list
(
new
LambdaQueryWrapper
<
CabinetBox
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getId
()),
CabinetBox:
:
getCabinetId
,
req
.
getId
()));
...
...
@@ -275,7 +262,7 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
}
//将单警柜的信息和它的箱门信息返回
CabinetDto
cabinetDto
=
new
CabinetDto
();
BeanPlusUtil
.
copyProperties
(
one
,
cabinetDto
);
BeanPlusUtil
.
copyProperties
(
cabinet
,
cabinetDto
);
cabinetDto
.
setCabinetBoxList
(
boxList
);
return
cabinetDto
;
}
...
...
@@ -289,15 +276,10 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
@Override
public
boolean
updateCabinetInfo
(
UpdateCabinetReq
req
)
{
//查询传入的组织机构id是否存在
PubOrg
puborg
=
pubOrgService
.
getOne
(
new
LambdaQueryWrapper
<
PubOrg
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getOrgId
()),
PubOrg:
:
getOrgId
,
req
.
getOrgId
()));
if
(
ObjectUtil
.
isEmpty
(
puborg
))
{
//抛出组织机构不存在异常
throw
new
ServiceException
(
PubOrgExceptionEnum
.
PUBORG_NOT_EXIST
);
}
pubOrgService
.
PubOrgExist
(
req
.
getOrgId
());
//查询是否有重复的单警柜编号
List
<
Cabinet
>
list
=
this
.
list
(
new
LambdaQueryWrapper
<
Cabinet
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getCabinetNum
()),
Cabinet:
:
getCabinetNum
,
req
.
getCabinetNum
()));
.
eq
(
Cabinet:
:
getCabinetNum
,
req
.
getCabinetNum
()));
if
(
list
.
size
()>
0
)
{
//判断是否是本身,如果是则不抛出异常(根据单警柜id进行比较)
Cabinet
cabinet
=
list
.
get
(
0
);
...
...
@@ -363,11 +345,7 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
ChangeCabinetState
(
UpdateCabinetReq
req
)
{
//查询单警柜是否存在
Cabinet
cabinet
=
getOne
(
new
LambdaQueryWrapper
<
Cabinet
>()
.
eq
(
Cabinet:
:
getId
,
req
.
getId
()));
if
(
ObjectUtil
.
isNull
(
cabinet
)){
throw
new
ServiceException
(
CabinetExceptionEnum
.
CABINET_ISNOT_EXISTS
);
}
CabinetExist
(
req
.
getId
());
List
<
UpdateCabinetBoxReq
>
cabinetBoxList
=
req
.
getCabinetBoxList
();
List
<
CabinetBox
>
list
=
new
ArrayList
<>();
for
(
UpdateCabinetBoxReq
updateCabinet:
cabinetBoxList
)
{
...
...
@@ -378,25 +356,21 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
return
cabinetBoxService
.
updateBatchById
(
list
);
}
//根据单警柜id查询出组织机构id
@Override
public
Long
SearchOrgId
(
String
id
)
{
public
Long
SearchOrgId
(
CabinetReq
req
)
{
Cabinet
cabinet
=
CabinetExist
(
req
.
getId
());
return
cabinet
.
getOrgId
();
}
//根据单警柜id判断单警柜是否存在
@Override
public
Cabinet
CabinetExist
(
String
id
)
{
Cabinet
one
=
getOne
(
new
LambdaQueryWrapper
<
Cabinet
>().
eq
(
Cabinet:
:
getId
,
id
));
if
(
ObjectUtil
.
isNull
(
one
)){
throw
new
ServiceException
(
CabinetExceptionEnum
.
CABINET_ISNOT_EXISTS
);
}
return
one
.
getOrgId
()
;
return
one
;
}
//查询机构id是否存在
private
LambdaQueryWrapper
<
PubOrg
>
PubOrgWrapper
(
long
orgId
)
{
LambdaQueryWrapper
<
PubOrg
>
wrapper
=
new
LambdaQueryWrapper
<>();
//查询全部
if
(
ObjectUtil
.
isEmpty
(
orgId
))
{
return
wrapper
;
}
//查询机构id是否存在
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
orgId
),
PubOrg:
:
getOrgId
,
orgId
);
return
wrapper
;
}
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PoliceFingerServiceImpl.java
View file @
73ce52ca
...
...
@@ -35,10 +35,9 @@ public class PoliceFingerServiceImpl extends ServiceImpl<PoliceFingerMapper, Pol
//新增指纹信息
@Override
public
boolean
addFingerInfo
(
UpdatePoliceFingerReq
req
)
{
public
Integer
addFingerInfo
(
UpdatePoliceFingerReq
req
)
{
//判断警员是否存在
PoliceExist
(
req
.
getPoliceId
());
policemanService
.
PoliceExist
(
req
.
getPoliceId
());
PoliceFinger
policeFinger
=
getOne
(
new
LambdaQueryWrapper
<
PoliceFinger
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getPoliceId
()),
PoliceFinger:
:
getPoliceId
,
req
.
getPoliceId
())
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getFingerInfo
()),
PoliceFinger:
:
getFingerInfo
,
req
.
getFingerInfo
()));
...
...
@@ -48,7 +47,8 @@ public class PoliceFingerServiceImpl extends ServiceImpl<PoliceFingerMapper, Pol
}
PoliceFinger
policeFinger1
=
new
PoliceFinger
();
BeanPlusUtil
.
copyProperties
(
req
,
policeFinger1
);
return
this
.
save
(
policeFinger1
);
save
(
policeFinger1
);
return
policeFinger1
.
getId
();
}
//修改指纹信息
...
...
@@ -62,6 +62,7 @@ public class PoliceFingerServiceImpl extends ServiceImpl<PoliceFingerMapper, Pol
//查询指纹信息
@Override
public
List
<
PoliceFinger
>
searchFingerInfo
(
PolicemanFingerReq
req
)
{
policemanService
.
PoliceExist
(
req
.
getPoliceId
());
LambdaQueryWrapper
<
PoliceFinger
>
wrapper
=
createWrapper
(
req
);
return
this
.
list
(
wrapper
);
}
...
...
@@ -71,7 +72,7 @@ public class PoliceFingerServiceImpl extends ServiceImpl<PoliceFingerMapper, Pol
@Override
public
boolean
deleteFinger
(
UpdatePoliceFingerReq
req
)
{
//判断警员是否存在
PoliceExist
(
req
.
getPoliceId
());
policemanService
.
PoliceExist
(
req
.
getPoliceId
());
PoliceFinger
policeFinger
=
PolicemanFingerExist
(
req
.
getId
(),
req
.
getPoliceId
());
return
removeById
(
policeFinger
);
}
...
...
@@ -107,15 +108,6 @@ public class PoliceFingerServiceImpl extends ServiceImpl<PoliceFingerMapper, Pol
return
wrapper
;
}
//判断警员是否存在
public
boolean
PoliceExist
(
String
id
){
Policeman
one
=
policemanService
.
getOne
(
new
LambdaQueryWrapper
<
Policeman
>()
.
eq
(
Policeman:
:
getId
,
id
));
if
(
ObjectUtil
.
isNull
(
one
)){
throw
new
ServiceException
(
PolicemanExceptionEnum
.
POLICEMAN_NOT_EXIST
);
}
return
true
;
}
//判断指纹信息是否存在
public
PoliceFinger
PolicemanFingerExist
(
Integer
fingerId
,
String
policeId
){
PoliceFinger
one
=
getOne
(
new
LambdaQueryWrapper
<
PoliceFinger
>()
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
View file @
73ce52ca
差异被折叠。
点击展开。
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PubOrgServiceImpl.java
View file @
73ce52ca
...
...
@@ -11,6 +11,7 @@ import com.junmp.jyzb.api.bean.req.UpdateOrgReq;
import
com.junmp.jyzb.api.exception.JYZBAppException
;
import
com.junmp.jyzb.api.exception.enums.EquipmentTypeExceptionEnum
;
import
com.junmp.jyzb.api.exception.enums.OrgExceptionEnum
;
import
com.junmp.jyzb.api.exception.enums.PubOrgExceptionEnum
;
import
com.junmp.jyzb.entity.EquipmentType
;
import
com.junmp.jyzb.entity.PubOrg
;
import
com.junmp.jyzb.entity.Supplier
;
...
...
@@ -18,6 +19,7 @@ import com.junmp.jyzb.utils.HttpStatus;
import
com.junmp.jyzb.utils.RedisUtils
;
import
com.junmp.jyzb.utils.ResponseResult
;
import
com.junmp.jyzb.utils.ReturnMsg
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -52,7 +54,7 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
@Override
public
List
<
String
>
getLowerOrg
(
Stri
ng
orgId
)
{
public
List
<
Long
>
getLowerOrg
(
Lo
ng
orgId
)
{
//构建 Redis 缓存�
String
redisKey
=
"getLowerOrg"
;
...
...
@@ -66,40 +68,40 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
redisUtils
.
set
(
redisKey
,
menuList
);
}
List
<
Stri
ng
>
resultList
=
new
ArrayList
<>();
// 存储最终的菜单树结果
Map
<
String
,
List
<
Stri
ng
>>
childrenMap
=
new
HashMap
<>();
// 存储每个菜单项的子菜单映射
List
<
Lo
ng
>
resultList
=
new
ArrayList
<>();
// 存储最终的菜单树结果
Map
<
String
,
List
<
Lo
ng
>>
childrenMap
=
new
HashMap
<>();
// 存储每个菜单项的子菜单映射
resultList
.
add
(
orgId
);
//将自己加入到返回的List中
// 构建子菜单映射表
for
(
PubOrg
menu
:
menuList
)
{
String
org
=
menu
.
getOrgId
().
toString
();
Long
org
=
menu
.
getOrgId
();
if
(!
childrenMap
.
containsKey
(
menu
.
getOrgParentId
().
toString
()))
{
// 如果父菜单还不存在于映射表中
childrenMap
.
put
(
menu
.
getOrgParentId
().
toString
(),
new
ArrayList
<>());
// 创建一个新的子菜单列表
}
childrenMap
.
get
(
menu
.
getOrgParentId
()
.
toString
()
).
add
(
org
);
// 将当前菜单项放入对应的子菜单列表中
childrenMap
.
get
(
menu
.
getOrgParentId
()).
add
(
org
);
// 将当前菜单项放入对应的子菜单列表中
}
Long
orgInfo
=
Long
.
valueOf
(
orgId
);
//获取输入的组织机构id信息
//Long orgInfo = new BigInteger(orgId); // 获取顶级菜单的标识符
// 获取顶级菜单
List
<
Stri
ng
>
topMenus
=
childrenMap
.
get
(
orgId
);
List
<
Lo
ng
>
topMenus
=
childrenMap
.
get
(
orgId
);
// 迭代构建菜单树
if
(
topMenus
!=
null
)
{
for
(
Stri
ng
topMenu
:
topMenus
)
{
Stack
<
Stri
ng
>
stack
=
new
Stack
<>();
// 使用栈结构辅助构建菜单树
for
(
Lo
ng
topMenu
:
topMenus
)
{
Stack
<
Lo
ng
>
stack
=
new
Stack
<>();
// 使用栈结构辅助构建菜单树
stack
.
push
(
topMenu
);
// 将当前顶级菜单项放入栈中
while
(!
stack
.
isEmpty
())
{
Stri
ng
currentMenu
=
stack
.
pop
();
// 取出队首的当前菜单项
Lo
ng
currentMenu
=
stack
.
pop
();
// 取出队首的当前菜单项
//Long currentMenuId = currentMenu; // 获取当前菜单项的标识符
if
(
childrenMap
.
containsKey
(
currentMenu
))
{
// 如果当前菜单项有子菜单
List
<
Stri
ng
>
children
=
childrenMap
.
get
(
currentMenu
);
// 获取子菜单列表
List
<
Lo
ng
>
children
=
childrenMap
.
get
(
currentMenu
);
// 获取子菜单列表
for
(
int
i
=
children
.
size
()
-
1
;
i
>=
0
;
i
--)
{
stack
.
push
(
children
.
get
(
i
));
...
...
@@ -244,6 +246,8 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
}
}
public
List
<
String
>
CheckOrgList
(
List
<
String
>
req
){
LambdaQueryWrapper
<
PubOrg
>
wp
=
new
LambdaQueryWrapper
<>();
wp
.
in
(
ObjectUtil
.
isNotEmpty
(
req
),
PubOrg:
:
getOrgId
,
req
);
...
...
@@ -359,6 +363,18 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
return
wrapper
;
}
//根据组织机构id查询出组织机构是否存在
@Override
public
PubOrg
PubOrgExist
(
Long
id
)
{
PubOrg
puborg
=
getOne
(
new
LambdaQueryWrapper
<
PubOrg
>()
.
eq
(
PubOrg:
:
getOrgId
,
id
));
if
(
ObjectUtil
.
isEmpty
(
puborg
))
{
//抛出组织机构不存在异常
throw
new
ServiceException
(
PubOrgExceptionEnum
.
PUBORG_NOT_EXIST
);
}
return
puborg
;
}
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/WarehouseServiceImpl.java
View file @
73ce52ca
...
...
@@ -48,16 +48,12 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
@Override
public
WarehouseDto
getOneWarehouse
(
WarehouseReq
req
)
{
Warehouse
warehouseMsg
=
this
.
getById
(
req
.
getId
());
if
(
ObjectUtil
.
isNull
(
warehouseMsg
)){
throw
new
ServiceException
(
WarehouseExceptionEnum
.
WAREHOUSE_NOT_EXIST
);
}
Warehouse
warehouse
=
WarehoustExist
(
req
.
getId
());
WarehouseDto
warehouseDto
=
new
WarehouseDto
();
BeanPlusUtil
.
copyProperties
(
warehouse
Msg
,
warehouseDto
);
BeanPlusUtil
.
copyProperties
(
warehouse
,
warehouseDto
);
//获取组织机构名称
PubOrg
one
=
pubOrgService
.
getOne
(
new
LambdaQueryWrapper
<
PubOrg
>()
.
eq
(
PubOrg:
:
getOrgId
,
warehouseMsg
.
getOrgId
()));
warehouseDto
.
setOrgName
(
one
.
getOrgName
());
PubOrg
pubOrg
=
pubOrgService
.
PubOrgExist
(
req
.
getOrgId
());
warehouseDto
.
setOrgName
(
pubOrg
.
getOrgName
());
return
warehouseDto
;
}
...
...
@@ -88,13 +84,9 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
List
<
Warehouse
>
allWarehouse
=
new
ArrayList
<>();
List
<
WarehouseDto
>
warehouseDtoList
=
new
ArrayList
<>();
//判断组织机构是否存在
PubOrg
one
=
pubOrgService
.
getOne
(
new
LambdaQueryWrapper
<
PubOrg
>()
.
eq
(
PubOrg:
:
getOrgId
,
msg
.
getOrgId
()));
if
(
ObjectUtil
.
isNull
(
one
)){
throw
new
ServiceException
(
PubOrgExceptionEnum
.
PUBORG_NOT_EXIST
);
}
PubOrg
pubOrg
=
pubOrgService
.
PubOrgExist
(
msg
.
getOrgId
());
//根据组织机构id查询组织机构名称
String
orgName
=
one
.
getOrgName
();
String
orgName
=
pubOrg
.
getOrgName
();
//如果组织机构是浙江省公安厅
if
(
msg
.
getOrgId
().
equals
(
1369509498032808905L
)
&&
msg
.
getIncludeLowerLevel
().
equals
(
"true"
)){
allWarehouse
=
this
.
list
();
...
...
@@ -108,7 +100,7 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
}
//获取组织机构Id
List
<
Stri
ng
>
allOrgId
=
getAllOrgId
(
msg
);
List
<
Lo
ng
>
allOrgId
=
getAllOrgId
(
msg
);
allWarehouse
=
getAllWarehouseByOrg
(
allOrgId
);
...
...
@@ -122,18 +114,18 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
}
private
List
<
Stri
ng
>
getAllOrgId
(
WarehouseReq
msg
)
{
List
<
Stri
ng
>
allOrg
=
new
ArrayList
<>();
private
List
<
Lo
ng
>
getAllOrgId
(
WarehouseReq
msg
)
{
List
<
Lo
ng
>
allOrg
=
new
ArrayList
<>();
if
(
msg
.
getIncludeLowerLevel
().
equals
(
"false"
)){
allOrg
.
add
(
msg
.
getOrgId
()
.
toString
()
);
allOrg
.
add
(
msg
.
getOrgId
());
}
else
if
(
msg
.
getIncludeLowerLevel
().
equals
(
"true"
)){
//查询某组织机构的本级及下级
allOrg
=
pubOrgService
.
getLowerOrg
(
msg
.
getOrgId
()
.
toString
()
);
allOrg
=
pubOrgService
.
getLowerOrg
(
msg
.
getOrgId
());
}
return
allOrg
;
}
private
List
<
Warehouse
>
getAllWarehouseByOrg
(
List
<
Stri
ng
>
allOrgId
)
{
private
List
<
Warehouse
>
getAllWarehouseByOrg
(
List
<
Lo
ng
>
allOrgId
)
{
List
<
Warehouse
>
allWarehouse
=
new
ArrayList
<>();
LambdaQueryWrapper
<
Warehouse
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -171,24 +163,21 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
return
new
ResponseResult
(
HttpStatus
.
SUCCESS
,
ReturnMsg
.
PASS
);
}
private
Warehouse
queryWarehouse
(
WarehouseReq
req
)
{
Warehouse
app
=
this
.
getById
(
req
.
getId
());
if
(
ObjectUtil
.
isNull
(
app
))
{
throw
new
ServiceException
(
WarehouseExceptionEnum
.
WAREHOUSE_NOT_EXIST
);
}
return
app
;
Warehouse
warehouse
=
WarehoustExist
(
req
.
getId
());
return
warehouse
;
}
private
LambdaQueryWrapper
<
Product
>
createWrapper
(
ProductReq
req
)
{
LambdaQueryWrapper
<
Product
>
wrapper
=
new
LambdaQueryWrapper
<>();
if
(
ObjectUtil
.
isEmpty
(
req
))
{
return
wrapper
;
//判断仓库是否存在
@Override
public
Warehouse
WarehoustExist
(
String
id
)
{
Warehouse
warehouseMsg
=
this
.
getById
(
id
);
if
(
ObjectUtil
.
isNull
(
warehouseMsg
)){
throw
new
ServiceException
(
WarehouseExceptionEnum
.
WAREHOUSE_NOT_EXIST
);
}
//根据业务编码查询
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getProductCode
()),
Product:
:
getProductCode
,
req
.
getProductCode
());
//根据企业名称模糊查询
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getName
()),
Product:
:
getName
,
req
.
getName
());
wrapper
.
orderByDesc
(
Product:
:
getUpdateTime
);
return
wrapper
;
return
warehouseMsg
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论