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
19a1f042
Commit
19a1f042
authored
Jul 26, 2023
by
李小惠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改单警柜模块以及人脸、指纹的各个接口
parent
14cd869f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
36 个修改的文件
包含
617 行增加
和
241 行删除
+617
-241
pom.xml
jyzb-api/pom.xml
+4
-0
CabinetDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/CabinetDto.java
+79
-0
CabinetBoxReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/CabinetBoxReq.java
+52
-0
CabinetReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/CabinetReq.java
+8
-7
PolicemanFingerReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/PolicemanFingerReq.java
+3
-5
PolicemanReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/PolicemanReq.java
+58
-0
ProductReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/ProductReq.java
+5
-0
ProductSkuReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/ProductSkuReq.java
+4
-0
pom.xml
jyzb-biz/pom.xml
+8
-0
CabinetController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/CabinetController.java
+66
-5
CabinetController111.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/CabinetController111.java
+0
-65
PoliceController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PoliceController.java
+32
-13
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
+2
-2
Cabinet.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Cabinet.java
+4
-7
CabinetBox.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/CabinetBox.java
+3
-0
Inventory.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Inventory.java
+1
-1
PoliceFinger.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/PoliceFinger.java
+3
-2
Policeman.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Policeman.java
+5
-5
CabinetExceptionEnum.java
jyzb-biz/src/main/java/com/junmp/jyzb/exception/enums/CabinetExceptionEnum.java
+61
-0
PolicemanExceptionEnum.java
jyzb-biz/src/main/java/com/junmp/jyzb/exception/enums/PolicemanExceptionEnum.java
+0
-1
PolicemanFingerExceptionEnum.java
jyzb-biz/src/main/java/com/junmp/jyzb/exception/enums/PolicemanFingerExceptionEnum.java
+5
-0
CabinetBoxMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/CabinetBoxMapper.java
+5
-0
CabinetMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/CabinetMapper.java
+3
-2
CabinetBoxService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/CabinetBoxService.java
+5
-3
CabinetService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/CabinetService.java
+22
-6
PoliceFingerService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/PoliceFingerService.java
+1
-4
PolicemanService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/PolicemanService.java
+9
-5
CabinetBoxServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetBoxServiceImpl.java
+13
-10
CabinetServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetServiceImpl.java
+0
-0
EquipmentSizeServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentSizeServiceImpl.java
+3
-2
PoliceFingerServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PoliceFingerServiceImpl.java
+24
-24
PolicemanServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
+64
-44
PubOrgServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PubOrgServiceImpl.java
+29
-21
CabinetBoxMapper.xml
jyzb-biz/src/main/resources/mapper/CabinetBoxMapper.xml
+7
-3
CabinetMapper.xml
jyzb-biz/src/main/resources/mapper/CabinetMapper.xml
+28
-3
没有找到文件。
jyzb-api/pom.xml
View file @
19a1f042
...
...
@@ -43,6 +43,10 @@
<groupId>
jakarta.validation
</groupId>
<artifactId>
jakarta.validation-api
</artifactId>
</dependency>
<dependency>
<groupId>
com.junmp.jyzb
</groupId>
<artifactId>
jyzb-biz
</artifactId>
</dependency>
</dependencies>
</project>
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/CabinetDto.java
0 → 100644
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
api
.
bean
.
dto
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
public
class
CabinetDto
implements
Serializable
{
/**
* 单警柜ID
*/
@ApiModelProperty
(
value
=
"单警柜ID"
)
private
String
id
;
/**
* 单警柜编号
*/
@ApiModelProperty
(
value
=
"单警柜编号"
)
private
String
cabinetNum
;
/**
* 箱数
*/
@ApiModelProperty
(
value
=
"箱数"
)
private
Integer
num
;
/**
* 单警柜名称
*/
@ApiModelProperty
(
value
=
"单警柜名称"
)
private
String
name
;
/**
* 组织机构号
*/
@ApiModelProperty
(
value
=
"组织机构号"
)
private
String
orgId
;
/**
* 位置信息
*/
@ApiModelProperty
(
value
=
"位置信息"
)
private
String
location
;
/**
* 单警柜当前状态,0正常,1异常
*/
@ApiModelProperty
(
value
=
"单警柜当前状态,0正常,1异常"
)
private
Integer
state
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 更新时间
*/
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
/**
* 更新人员
*/
@ApiModelProperty
(
value
=
"更新人员"
)
private
String
updateUser
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/CabinetBoxReq.java
0 → 100644
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
api
.
bean
.
req
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
CabinetBoxReq
extends
BaseRequest
{
/**
* 主键ID
*/
@ApiModelProperty
(
value
=
"主键ID"
)
private
String
id
;
/**
* 主柜ID
*/
@ApiModelProperty
(
value
=
"主柜ID"
)
private
String
cabinetId
;
/**
* 箱号
*/
@ApiModelProperty
(
value
=
"箱号"
)
private
Integer
num
;
/**
* 异常状态:1正常/0异常
*/
@ApiModelProperty
(
value
=
"异常状态:1正常/0异常"
)
private
Integer
state
;
/**
* 异常原因
*/
@ApiModelProperty
(
value
=
"异常原因"
)
private
String
errorMsg
;
/**
* 使用日志存储位置信息
*/
@ApiModelProperty
(
value
=
"使用日志存储位置信息"
)
private
String
logMap
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
jyzb-
biz/src/main/java/com/junmp/jyzb/beanR
eq/CabinetReq.java
→
jyzb-
api/src/main/java/com/junmp/jyzb/api/bean/r
eq/CabinetReq.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
beanR
eq
;
package
com
.
junmp
.
jyzb
.
api
.
bean
.
r
eq
;
import
com.junmp.jyzb.entity.CabinetBox
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -77,10 +76,11 @@ public class CabinetReq extends BaseRequest {
@ApiModelProperty
(
value
=
"更新人员"
)
private
String
updateUser
;
/**
* 单警柜与箱门一对多关系
*/
private
List
<
CabinetBox
>
list
;
// /**
// * 单警柜与箱门一对多关系
// */
//// private List<CabinetBox> list;
// private List<CabinetBox> a ;
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
jyzb-
biz/src/main/java/com/junmp/jyzb/beanR
eq/PolicemanFingerReq.java
→
jyzb-
api/src/main/java/com/junmp/jyzb/api/bean/r
eq/PolicemanFingerReq.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
beanR
eq
;
package
com
.
junmp
.
jyzb
.
api
.
bean
.
r
eq
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -14,27 +14,25 @@ public class PolicemanFingerReq extends BaseRequest {
/**
* 指纹id
*/
@NotNull
(
message
=
"指纹主键不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
,
detail
.
class
})
@ApiModelProperty
(
value
=
"指纹id"
)
private
Integer
id
;
/**
* 警员id
*/
@NotNull
(
message
=
"警员id不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
,
detail
.
class
})
@ApiModelProperty
(
value
=
"警员id"
)
private
String
policeId
;
/**
* 指纹名称
*/
@ApiModelProperty
(
value
=
"
警员id
"
)
@ApiModelProperty
(
value
=
"
指纹名称
"
)
private
String
name
;
/**
* 指纹信息
*/
@NotNull
(
message
=
"指纹信息不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
,
detail
.
class
})
@ApiModelProperty
(
value
=
"指纹信息"
)
private
String
fingerInfo
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/PolicemanReq.java
0 → 100644
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
api
.
bean
.
req
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
PolicemanReq
extends
BaseRequest
{
@NotNull
(
message
=
"警员主键不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
,
detail
.
class
})
private
String
id
;
@NotNull
(
message
=
"警员名字不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
,
detail
.
class
})
private
String
name
;
private
String
cabinetBoxId
;
@NotNull
(
message
=
"组织机构不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
,
detail
.
class
})
private
String
orgId
;
private
Long
orgIdInt
;
private
Long
departmentId
;
private
String
policeCode
;
private
String
sex
;
private
String
faceInfo
;
private
Boolean
isCreatedAccount
;
private
String
doorCode
;
private
String
password
;
private
String
photo
;
private
String
phone
;
private
Date
createTime
;
private
Date
updateTime
;
private
String
idCard
;
private
String
updateUser
;
private
Integer
state
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/ProductReq.java
View file @
19a1f042
...
...
@@ -2,11 +2,14 @@ package com.junmp.jyzb.api.bean.req;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
com.junmp.v2.validator.api.validators.unique.TableUniqueValue
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
import
java.util.List
;
/**
* <pre>
...
...
@@ -95,4 +98,6 @@ public class ProductReq extends BaseRequest {
* 生产厂家名称
*/
private
String
mfBizName
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/ProductSkuReq.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
api
.
bean
.
req
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
/**
* <pre>
...
...
@@ -63,4 +65,6 @@ public class ProductSkuReq extends BaseRequest {
* 预览属性3
*/
private
String
attr3
;
}
jyzb-biz/pom.xml
View file @
19a1f042
...
...
@@ -66,5 +66,13 @@
<version>
31.1-jre
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.junmp.jyzb
</groupId>
<artifactId>
jyzb-api
</artifactId>
</dependency>
<dependency>
<groupId>
com.junmp.jyzb
</groupId>
<artifactId>
jyzb-api
</artifactId>
</dependency>
</dependencies>
</project>
jyzb-biz/src/main/java/com/junmp/jyzb/controller/CabinetController.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
controller
;
import
com.junmp.jyzb.api.bean.req.CabinetBoxReq
;
import
com.junmp.jyzb.api.bean.req.CabinetReq
;
import
com.junmp.jyzb.entity.Cabinet
;
import
com.junmp.jyzb.entity.CabinetBox
;
import
com.junmp.jyzb.service.CabinetBoxService
;
import
com.junmp.jyzb.service.CabinetService
;
import
com.junmp.jyzb.service.PoliceFingerService
;
...
...
@@ -7,9 +11,12 @@ import com.junmp.jyzb.utils.HttpStatus;
import
com.junmp.jyzb.utils.ResponseResult
;
import
com.junmp.jyzb.utils.ReturnData
;
import
com.junmp.jyzb.utils.ReturnMsg
;
import
com.junmp.v2.common.bean.request.ValidationApi
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -74,11 +81,64 @@ public class CabinetController {
}
@PostMapping
(
"/getCabinetBoxInfo"
)
@ApiOperation
(
"获取箱门列表"
)
public
ResponseResult
getCabinetBoxInfo
(
@RequestBody
Map
<
String
,
Object
>
msg
){
ResponseResult
returnMsg
=
cabinetBoxService
.
getCabinetBoxInfo
(
msg
);
return
returnMsg
;
@PostMapping
(
"/AddCabinetInfo"
)
@ApiOperation
(
"添加单警柜"
)
public
ApiRes
<
Boolean
>
addCabinetInfo
(
@RequestBody
CabinetReq
req
){
boolean
result
=
cabinetService
.
addCabinetInfo
(
req
);
if
(!
result
){
return
ApiRes
.
failure
(
"操作失败"
);
}
return
ApiRes
.
success
(
result
);
}
@PostMapping
(
"/DeleteCabinetInfo"
)
@ApiOperation
(
"删除单警柜信息"
)
public
ApiRes
<
Boolean
>
deleteCabinetInfo
(
@RequestBody
CabinetReq
req
)
{
return
ApiRes
.
success
(
cabinetService
.
deleteCabinetInfo
(
req
));
}
@PostMapping
(
"/ShowCabinetList"
)
@ApiOperation
(
"查询单警柜列表"
)
public
ApiRes
<
List
<
Cabinet
>>
showCabinetList
(
@RequestBody
CabinetReq
req
,
@RequestBody
String
includeLowerLevel
){
List
<
Cabinet
>
allCabinetList
=
cabinetService
.
getAllCabinetList
(
req
,
includeLowerLevel
);
if
(
allCabinetList
.
size
()<=
0
){
return
ApiRes
.
failure
(
"查询失败,列表为null"
);
}
return
ApiRes
.
success
(
cabinetService
.
getAllCabinetList
(
req
,
includeLowerLevel
));
}
//通过单警柜id查询单个箱门及其箱门信息
@PostMapping
(
"/ShowOneCabinet"
)
@ApiOperation
(
"查询单个单警柜及其箱门信息"
)
public
ApiRes
<
Cabinet
>
showOneCabinet
(
@RequestBody
CabinetReq
req
){
return
ApiRes
.
success
(
cabinetService
.
showOneCabinet
(
req
));
}
@PostMapping
(
"/getCabinetBoxList"
)
@ApiOperation
(
"通过单警柜id获取箱门列表"
)
public
ApiRes
<
List
<
CabinetBox
>>
getCabinetBoxList
(
@RequestBody
CabinetReq
req
){
return
ApiRes
.
success
(
cabinetBoxService
.
getCabinetBoxList
(
req
));
}
@PostMapping
(
"/UpdateCabinetInfo"
)
@ApiOperation
(
"修改单警柜信息"
)
public
ApiRes
<
Boolean
>
updateCabinetInfo
(
@RequestBody
CabinetReq
req
)
{
boolean
result
=
cabinetService
.
updateCabinetInfo
(
req
);
if
(!
result
){
return
ApiRes
.
failure
(
"操作失败"
);
}
return
ApiRes
.
success
(
result
);
}
@PostMapping
(
"/boxBindPolice"
)
@ApiOperation
(
"箱门绑定人员"
)
public
ApiRes
<
Boolean
>
boxBindPolice
(
@RequestBody
CabinetBoxReq
req
,
@RequestBody
String
policeId
)
{
boolean
result
=
cabinetService
.
boxBindPolice
(
req
,
policeId
);
if
(!
result
){
return
ApiRes
.
failure
(
"操作失败"
);
}
return
ApiRes
.
success
(
result
);
}
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/controller/CabinetController111.java
deleted
100644 → 0
View file @
14cd869f
//package com.junmp.jyzb.controller;
//
//import com.junmp.jyzb.beanReq.CabinetReq;
//import com.junmp.jyzb.doc.CabinetDoc;
//import com.junmp.jyzb.entity.Cabinet;
//import com.junmp.jyzb.service.CabinetService;
//import com.junmp.v2.common.bean.request.ValidationApi;
//import com.junmp.v2.common.bean.response.ApiRes;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.annotation.Resource;
//import java.util.List;
//
//@RestController
//@Slf4j
//@RequestMapping("/Cabinet")
//@Api(tags = "单警柜基础信息模块")
//public class CabinetController111 implements CabinetDoc {
// @Resource
// public CabinetService cabinetService;
//
// @PostMapping("/AddCabinet")
// @ApiOperation("添加单警柜")
// public ApiRes<Boolean> addCabinet(@RequestBody @Validated(CabinetReq.add.class) CabinetReq req) throws Exception {
// return ApiRes.success(cabinetService.addCabinet(req));
// }
//
//
// @PostMapping("/DeleteCabinet")
// @ApiOperation("删除单警柜信息")
// public ApiRes<Boolean> deleteCabinet(@RequestBody @Validated(ValidationApi.edit.class) CabinetReq req) throws Exception {
// return ApiRes.success(cabinetService.deleteCabinet(req));
// }
//
// @PostMapping("/ShowCabinet")
// @ApiOperation("查询单警柜列表")
// public ApiRes<List<Cabinet>> showCabinet(@RequestBody @Validated(ValidationApi.edit.class) CabinetReq req,String includeLowerLevel){
// return ApiRes.success(cabinetService.getAllCabinet(req,includeLowerLevel));
// }
//
//
// @PostMapping("/UpdateCabinet")
// @ApiOperation("修改单警柜信息")
// public ApiRes<Boolean> updateCabinet(@RequestBody @Validated(ValidationApi.edit.class) CabinetReq req) throws Exception {
// return ApiRes.success(cabinetService.updateCabinet(req));
// }
//
//
//// @PostMapping("/ErrorState")
//// @ApiOperation("单警柜状态变更")
//
//
//// @PostMapping("/GetCabinetDetail")
//// @ApiOperation("查询单警柜及其箱号信息")
//
//// @PostMapping("/getCabinetBoxInfo")
//// @ApiOperation("获取箱门列表")
//}
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PoliceController.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
controller
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.junmp.jyzb.api.bean.req.CabinetReq
;
import
com.junmp.jyzb.api.bean.req.PolicemanReq
;
import
com.junmp.jyzb.entity.Policeman
;
import
com.junmp.jyzb.service.PolicemanService
;
import
com.junmp.jyzb.utils.ResponseResult
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
@RestController
...
...
@@ -29,23 +35,32 @@ public class PoliceController {
@PostMapping
(
"/AddFaceInfo"
)
@ApiOperation
(
"添加警员面部信息"
)
public
ResponseResult
addFaceInfo
(
@RequestBody
Map
<
String
,
Object
>
msg
)
{
ResponseResult
returnMsg
=
policemanService
.
addFaceInfo
(
msg
);
return
returnMsg
;
public
ApiRes
<
Boolean
>
addFaceInfo
(
@RequestBody
PolicemanReq
req
)
{
boolean
b
=
policemanService
.
addFaceInfo
(
req
);
if
(!
b
){
return
ApiRes
.
failure
(
"添加失败"
);
}
return
ApiRes
.
success
(
b
);
}
@PostMapping
(
"/update
f
aceInfo"
)
@PostMapping
(
"/update
F
aceInfo"
)
@ApiOperation
(
"修改、删除人脸信息"
)
public
ResponseResult
updateFaceInfo
(
@RequestBody
Map
<
String
,
Object
>
msg
)
{
ResponseResult
returnMsg
=
policemanService
.
updateFaceInfo
(
msg
);
return
returnMsg
;
public
ApiRes
<
Boolean
>
updateFaceInfo
(
@RequestBody
PolicemanReq
req
)
{
boolean
b
=
policemanService
.
updateFaceInfo
(
req
);
if
(!
b
){
return
ApiRes
.
failure
(
"操作失败"
);
}
return
ApiRes
.
success
(
b
);
}
@PostMapping
(
"/searchFaceInfo"
)
@ApiOperation
(
"查找人脸信息"
)
public
ResponseResult
searchFaceInfo
(
@RequestBody
Map
<
String
,
Object
>
msg
)
{
ResponseResult
returnMsg
=
policemanService
.
searchFaceInfo
(
msg
);
return
returnMsg
;
public
ApiRes
<
Policeman
>
searchFaceInfo
(
@RequestBody
PolicemanReq
req
)
{
Policeman
policeman
=
policemanService
.
searchFaceInfo
(
req
);
if
(
ObjectUtil
.
isEmpty
(
policeman
)){
return
ApiRes
.
failure
(
"未找到警员信息"
);
}
return
ApiRes
.
success
(
policeman
);
}
...
...
@@ -108,8 +123,12 @@ public class PoliceController {
**/
@PostMapping
(
"/policeList"
)
@ApiOperation
(
"人员列表"
)
public
ResponseResult
policeList
(
@RequestBody
Map
<
String
,
Object
>
msg
){
ResponseResult
returnMsg
=
policemanService
.
getOrgPoliceman
(
msg
);
return
returnMsg
;
public
ApiRes
<
List
<
Policeman
>>
policeList
(
@RequestBody
CabinetReq
req
){
List
<
Policeman
>
orgPoliceman
=
policemanService
.
getOrgPoliceman
(
req
);
if
(
orgPoliceman
.
isEmpty
()){
return
ApiRes
.
failure
(
"未查到人员信息"
);
}
return
ApiRes
.
success
(
orgPoliceman
);
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PolicemanFingerController.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
controller
;
import
com.junmp.jyzb.
beanR
eq.PolicemanFingerReq
;
import
com.junmp.jyzb.
api.bean.r
eq.PolicemanFingerReq
;
import
com.junmp.jyzb.doc.PolicemanFingerDoc
;
import
com.junmp.jyzb.entity.PoliceFinger
;
import
com.junmp.jyzb.service.PoliceFingerService
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/doc/PolicemanFingerDoc.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
doc
;
import
com.junmp.jyzb.api.bean.req.ProductReq
;
import
com.junmp.jyzb.
beanR
eq.PolicemanFingerReq
;
import
com.junmp.jyzb.
api.bean.r
eq.PolicemanFingerReq
;
import
com.junmp.jyzb.entity.PoliceFinger
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
com.junmp.v2.db.api.page.PageResult
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Cabinet.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.*
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
...
...
@@ -22,6 +21,7 @@ public class Cabinet implements Serializable {
/**
* 单警柜ID
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_UUID
)
@ApiModelProperty
(
value
=
"单警柜ID"
)
private
String
id
;
...
...
@@ -94,14 +94,14 @@ public class Cabinet implements Serializable {
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@TableField
(
"create_time"
)
@TableField
(
value
=
"create_time"
)
private
Date
createTime
;
/**
* 更新时间
*/
@ApiModelProperty
(
value
=
"更新时间"
)
@TableField
(
"update_time"
)
@TableField
(
value
=
"update_time"
)
private
Date
updateTime
;
/**
...
...
@@ -124,9 +124,6 @@ public class Cabinet implements Serializable {
@ApiModelProperty
(
value
=
"箱数"
)
private
Integer
num
;
/**
* 单警柜与箱门一对多关系
*/
private
List
<
CabinetBox
>
list
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/CabinetBox.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -18,6 +20,7 @@ public class CabinetBox implements Serializable {
/**
* 主键ID
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_UUID
)
@ApiModelProperty
(
value
=
"主键ID"
)
private
String
id
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Inventory.java
View file @
19a1f042
...
...
@@ -19,7 +19,7 @@ import java.util.Date;
@TableName
(
"base_inventory"
)
public
class
Inventory
implements
Serializable
{
@Table
Field
(
"id"
)
@Table
Id
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_UUID
)
private
String
ID
;
/**
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/PoliceFinger.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -18,9 +20,8 @@ import javax.validation.constraints.NotNull;
@TableName
(
"base_police_finger"
)
@AllArgsConstructor
@NoArgsConstructor
@TableName
(
"base_police_finger"
)
public
class
PoliceFinger
implements
Serializable
{
@Table
Field
(
value
=
"id"
)
@Table
Id
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@TableField
(
value
=
"police_id"
)
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Policeman.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
entity
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.junmp.jyzb.entity.Cabinet
;
import
io.swagger.annotations.ApiModel
;
...
...
@@ -20,7 +22,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@TableName
(
"base_policeman"
)
public
class
Policeman
implements
Serializable
{
@Table
Fiel
d
(
value
=
"id"
)
@Table
I
d
(
value
=
"id"
)
private
String
id
;
@TableField
(
value
=
"name"
)
...
...
@@ -30,10 +32,8 @@ public class Policeman implements Serializable {
private
String
cabinetBoxId
;
@TableField
(
value
=
"org_id_int"
)
private
Long
orgId
Int
;
private
Long
orgId
;
@TableField
(
value
=
"org_id"
)
private
String
orgId
;
@TableField
(
value
=
"department_id"
)
private
Long
departmentId
;
...
...
@@ -44,7 +44,7 @@ public class Policeman implements Serializable {
@TableField
(
value
=
"sex"
)
private
String
sex
;
@TableField
(
value
=
"face_info"
)
@TableField
(
value
=
"face_info"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
faceInfo
;
@TableField
(
value
=
"isCreatedAccount"
)
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/exception/enums/CabinetExceptionEnum.java
0 → 100644
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
exception
.
enums
;
import
com.junmp.v2.common.constant.CommonConstant
;
import
com.junmp.v2.common.exception.IExceptionEnum
;
import
lombok.Getter
;
/**
* <pre>
*
* 描述:
* 版本:1.0.0
* 日期:2022/8/1 13:08
* 作者:ningzp@junmp.com.cn
* <br>修改记录
* <br>修改日期 修改人 修改内容
*
* </pre>
*/
@Getter
public
enum
CabinetExceptionEnum
implements
IExceptionEnum
{
/**
* 组织机构不存在
*/
PUBORG_NOT_EXIST
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"组织机构不存在"
),
/**
* 单警柜编号重复
*/
CABINETID_IS_EXISTS
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"单警柜编号重复"
),
/**
* 单警柜不存在
*/
CABINET_ISNOT_EXISTS
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"单警柜不存在"
),
/**
* 传入参数错误
*/
PARAMETER_ERROR
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"传入参数错误"
),
/**
* 箱门id不存在
*/
CABINETBOX_ISNOT_EXISTS
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"箱门id不存在"
),
;
/**
* 错误编码
*/
private
final
Integer
code
;
/**
* 提示用户信息
*/
private
final
String
message
;
CabinetExceptionEnum
(
Integer
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/exception/enums/PolicemanExceptionEnum.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
exception
.
enums
;
import
com.junmp.jyzb.api.constant.JYZBConstant
;
import
com.junmp.v2.common.constant.CommonConstant
;
import
com.junmp.v2.common.exception.IExceptionEnum
;
import
lombok.Getter
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/exception/enums/PolicemanFingerExceptionEnum.java
View file @
19a1f042
...
...
@@ -10,6 +10,11 @@ public enum PolicemanFingerExceptionEnum implements IExceptionEnum {
* 警员指纹已存在
*/
POLICEMAN_FINGER_EXCEPTION_ENUM
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"警员指纹信息已存在"
),
/**
* 警员指纹不存在
*/
POLICEMAN_FINGER_NOTEXISTS
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"警员指纹不存在"
),
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/CabinetBoxMapper.java
View file @
19a1f042
...
...
@@ -15,4 +15,8 @@ public interface CabinetBoxMapper extends BaseMapper<CabinetBox> {
void
changeCabinetState
(
CabinetBox
cabinetBox
);
String
getOneCabinetBox
(
String
cabinetBoxId
);
List
<
CabinetBox
>
selectByIdCabinetBoxes
(
String
id
);
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/CabinetMapper.java
View file @
19a1f042
...
...
@@ -13,7 +13,8 @@ public interface CabinetMapper extends BaseMapper<Cabinet> {
public
int
addCabinet
(
Cabinet
cabinet
);
public
List
<
Map
<
String
,
Object
>>
getAllCabinet
();
public
List
<
Cabinet
>
getAllCabinet
();
public
List
<
Cabinet
>
getAllCabinetList
();
Map
<
String
,
Object
>
getOneCabinet
(
String
id
);
...
...
@@ -33,7 +34,7 @@ public interface CabinetMapper extends BaseMapper<Cabinet> {
String
getCabinetNumById
(
String
id
);
List
<
Map
<
String
,
Object
>
>
getAllCabinetByOrgList
(
List
<
String
>
allOrgId
);
List
<
Cabinet
>
getAllCabinetByOrgList
(
List
<
String
>
allOrgId
);
void
setCabinetSumInventory
(
@Param
(
"updateId"
)
String
id
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/CabinetBoxService.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
service
;
import
com.junmp.jyzb.utils.ResponseResult
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.junmp.jyzb.api.bean.req.CabinetReq
;
import
com.junmp.jyzb.entity.CabinetBox
;
import
java.util.List
;
import
java.util.Map
;
public
interface
CabinetBoxService
{
public
interface
CabinetBoxService
extends
IService
<
CabinetBox
>
{
List
<
Map
<
String
,
Object
>>
getAllBoxMsg
(
String
id
);
ResponseResult
getCabinetBoxInfo
(
Map
<
String
,
Object
>
msg
);
List
<
CabinetBox
>
getCabinetBoxList
(
CabinetReq
req
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/CabinetService.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.junmp.jyzb.beanReq.CabinetReq
;
import
com.junmp.jyzb.api.bean.req.CabinetBoxReq
;
import
com.junmp.jyzb.api.bean.req.CabinetReq
;
import
com.junmp.jyzb.entity.Cabinet
;
import
com.junmp.jyzb.utils.ResponseResult
;
...
...
@@ -35,26 +36,41 @@ public interface CabinetService extends IService<Cabinet> {
* @param req
* @return
*/
boolean
addCabinet
(
CabinetReq
req
)
throws
Exception
;
boolean
addCabinet
Info
(
CabinetReq
req
)
;
/**
* 删除单警柜
* @param req
* @return
*/
boolean
deleteCabinet
(
CabinetReq
req
);
boolean
deleteCabinet
Info
(
CabinetReq
req
);
/**
* 查询单警柜信息
* 查询单警柜信息
,通过组织机构id进行查询
* @param req
* @return
*/
List
<
Cabinet
>
getAllCabinet
(
CabinetReq
req
,
String
includeLowerLevel
);
List
<
Cabinet
>
getAllCabinetList
(
CabinetReq
req
,
String
includeLowerLevel
);
/**
* 通过单警柜id进行查询单个单警柜信息及其箱门信息
* @param req
* @return
*/
Cabinet
showOneCabinet
(
CabinetReq
req
);
/**
* 修改单警柜信息
* @param req
* @return
*/
boolean
updateCabinet
(
CabinetReq
req
)
throws
Exception
;
boolean
updateCabinetInfo
(
CabinetReq
req
);
/**
* 箱门绑定人员
* @param req
* @return
*/
boolean
boxBindPolice
(
CabinetBoxReq
req
,
String
policeId
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/PoliceFingerService.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.junmp.jyzb.api.bean.req.ProductReq
;
import
com.junmp.jyzb.beanReq.PolicemanFingerReq
;
import
com.junmp.jyzb.api.bean.req.PolicemanFingerReq
;
import
com.junmp.jyzb.entity.PoliceFinger
;
import
com.junmp.jyzb.entity.Product
;
import
com.junmp.jyzb.utils.ResponseResult
;
import
com.junmp.v2.db.api.page.PageResult
;
import
java.util.List
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/PolicemanService.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.junmp.jyzb.api.bean.req.CabinetReq
;
import
com.junmp.jyzb.api.bean.req.PolicemanReq
;
import
com.junmp.jyzb.entity.PoliceFinger
;
import
com.junmp.jyzb.entity.Policeman
;
import
com.junmp.jyzb.utils.ResponseResult
;
import
java.util.List
;
import
java.util.Map
;
public
interface
PolicemanService
{
public
interface
PolicemanService
extends
IService
<
Policeman
>
{
ResponseResult
addPoliceman
(
Map
<
String
,
Object
>
msg
);
ResponseResult
getOnePolice
(
Map
<
String
,
Object
>
id
);
...
...
@@ -27,7 +31,7 @@ public interface PolicemanService{
//查询指纹信息
ResponseResult
searchFingerInfo
(
Map
<
String
,
Object
>
msg
);
ResponseResult
addFaceInfo
(
Map
<
String
,
Object
>
msg
);
boolean
addFaceInfo
(
PolicemanReq
req
);
ResponseResult
changePoliceState
(
Map
<
String
,
Object
>
msg
);
...
...
@@ -37,10 +41,10 @@ public interface PolicemanService{
ResponseResult
getPoliceData
(
Map
<
String
,
Object
>
cabinetId
);
ResponseResult
updateFaceInfo
(
Map
<
String
,
Object
>
msg
);
boolean
updateFaceInfo
(
PolicemanReq
req
);
ResponseResult
searchFaceInfo
(
Map
<
String
,
Object
>
msg
);
Policeman
searchFaceInfo
(
PolicemanReq
req
);
//通过单警柜获取组织机构id,再获取组织机构下的所有警员信息
ResponseResult
getOrgPoliceman
(
Map
<
String
,
Object
>
msg
);
List
<
Policeman
>
getOrgPoliceman
(
CabinetReq
req
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetBoxServiceImpl.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.api.bean.req.CabinetReq
;
import
com.junmp.jyzb.entity.Cabinet
;
import
com.junmp.jyzb.entity.CabinetBox
;
import
com.junmp.jyzb.mapper.CabinetBoxMapper
;
import
com.junmp.jyzb.mapper.CabinetMapper
;
import
com.junmp.jyzb.service.CabinetBoxService
;
import
com.junmp.jyzb.utils.HttpStatus
;
import
com.junmp.jyzb.utils.ResponseResult
;
...
...
@@ -16,11 +21,14 @@ import java.util.Map;
import
static
com
.
junmp
.
jyzb
.
utils
.
CheckBlank
.
checkNotBlank
;
@Service
public
class
CabinetBoxServiceImpl
implements
CabinetBoxService
{
public
class
CabinetBoxServiceImpl
extends
ServiceImpl
<
CabinetBoxMapper
,
CabinetBox
>
implements
CabinetBoxService
{
@Resource
private
CabinetBoxMapper
cabinetBoxMapper
;
@Resource
private
CabinetBoxService
cabinetBoxService
;
@Override
public
List
<
Map
<
String
,
Object
>>
getAllBoxMsg
(
String
id
)
{
return
cabinetBoxMapper
.
getBoxMsg
(
id
);
...
...
@@ -34,14 +42,9 @@ public class CabinetBoxServiceImpl implements CabinetBoxService {
* @return
**/
@Override
public
ResponseResult
getCabinetBoxInfo
(
Map
<
String
,
Object
>
msg
)
{
try
{
checkNotBlank
(
msg
.
get
(
"cabinetId"
),
"cabinetId不能为空"
);
}
catch
(
IllegalArgumentException
e
)
{
return
new
ResponseResult
(
HttpStatus
.
ERROR
,
ReturnMsg
.
ERROR
,
e
.
getMessage
());
}
List
<
CabinetBox
>
cabinetBoxList
=
cabinetBoxMapper
.
selectList
(
new
LambdaQueryWrapper
<
CabinetBox
>()
.
eq
(
CabinetBox:
:
getCabinetId
,
msg
.
get
(
"cabinetId"
)));
return
new
ResponseResult
<>(
HttpStatus
.
SUCCESS
,
"操作成功"
,
cabinetBoxList
);
public
List
<
CabinetBox
>
getCabinetBoxList
(
CabinetReq
req
)
{
List
<
CabinetBox
>
cabinetBoxList
=
cabinetBoxService
.
list
(
new
LambdaQueryWrapper
<
CabinetBox
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getId
()),
CabinetBox:
:
getCabinetId
,
req
.
getId
()));
return
cabinetBoxList
;
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetServiceImpl.java
View file @
19a1f042
差异被折叠。
点击展开。
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentSizeServiceImpl.java
View file @
19a1f042
...
...
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
com.junmp.jyzb.mapper.EquipmentSizeMapper
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
static
com
.
junmp
.
jyzb
.
utils
.
CheckBlank
.
checkNotBlank
;
...
...
@@ -65,7 +66,7 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
size
.
setCode
((
String
)
msg
.
get
(
"code"
));
size
.
setName
((
String
)
msg
.
get
(
"name"
));
size
.
setNote
((
String
)
msg
.
get
(
"note"
));
size
.
setPrice
((
Double
)
msg
.
get
(
"price"
));
size
.
setPrice
((
BigDecimal
)
msg
.
get
(
"price"
));
size
.
setEpcType
((
Integer
)
msg
.
get
(
"epcType"
));
equipmentSizeMapper
.
addSize
(
size
);
...
...
@@ -132,7 +133,7 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
size
.
setName
((
String
)
msg
.
get
(
"name"
));
size
.
setNote
((
String
)
msg
.
get
(
"note"
));
size
.
setUpdateTime
(
currentDate
);
size
.
setPrice
((
Double
)
msg
.
get
(
"price"
));
size
.
setPrice
((
BigDecimal
)
msg
.
get
(
"price"
));
//size.setState((Integer) msg.get("state"));
size
.
setEpcType
((
Integer
)
msg
.
get
(
"epcType"
));
equipmentSizeMapper
.
updateSize
(
size
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PoliceFingerServiceImpl.java
View file @
19a1f042
...
...
@@ -4,13 +4,9 @@ import cn.hutool.core.util.ObjectUtil;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.api.bean.req.ProductReq
;
import
com.junmp.jyzb.api.exception.enums.ProductExceptionEnum
;
import
com.junmp.jyzb.beanReq.PolicemanFingerReq
;
import
com.junmp.jyzb.api.bean.req.PolicemanFingerReq
;
import
com.junmp.jyzb.entity.PoliceFinger
;
import
com.junmp.jyzb.entity.Product
;
import
com.junmp.jyzb.exception.enums.PolicemanFingerExceptionEnum
;
import
com.junmp.jyzb.mapper.ProductMapper
;
import
com.junmp.jyzb.service.PoliceFingerService
;
import
com.junmp.jyzb.utils.DateTimeUtil
;
import
com.junmp.v2.common.exception.base.ServiceException
;
...
...
@@ -41,23 +37,36 @@ public class PoliceFingerServiceImpl extends ServiceImpl<PoliceFingerMapper, Pol
//新增指纹信息
@Override
public
boolean
addFingerInfo
(
PolicemanFingerReq
req
)
{
PoliceFinger
policeFinger
=
new
PoliceFinger
();
BeanPlusUtil
.
copyProperties
(
req
,
policeFinger
);
PoliceFinger
policeFinger
=
getOne
(
new
LambdaQueryWrapper
<
PoliceFinger
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getPoliceId
()),
PoliceFinger:
:
getPoliceId
,
req
.
getPoliceId
())
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getFingerInfo
()),
PoliceFinger:
:
getFingerInfo
,
req
.
getFingerInfo
()));
//指纹信息存在抛出异常
if
(
ObjectUtil
.
isNotNull
(
policeFinger
))
{
throw
new
ServiceException
(
PolicemanFingerExceptionEnum
.
POLICEMAN_FINGER_EXCEPTION_ENUM
);
}
PoliceFinger
policeFinger1
=
new
PoliceFinger
();
BeanPlusUtil
.
copyProperties
(
req
,
policeFinger1
);
//创建时间
policeFinger
.
setCreateTime
(
DateTimeUtil
.
getCurrentDateTime
());
policeFinger
1
.
setCreateTime
(
DateTimeUtil
.
getCurrentDateTime
());
//更新时间
policeFinger
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
return
this
.
save
(
policeFinger
);
policeFinger1
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
return
this
.
save
(
policeFinger1
);
}
//修改指纹信息
@Override
public
boolean
updateFingerInfo
(
PolicemanFingerReq
req
)
{
PoliceFinger
policeFinger
=
this
.
queryPolicemanFinger
(
req
);
BeanPlusUtil
.
copyProperties
(
req
,
policeFinger
);
PoliceFinger
one
=
getOne
(
new
LambdaQueryWrapper
<
PoliceFinger
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getId
()),
PoliceFinger:
:
getId
,
req
.
getId
()));
//指纹id错误,指纹信息不存在
if
(
ObjectUtil
.
isNull
(
one
)){
throw
new
ServiceException
(
PolicemanFingerExceptionEnum
.
POLICEMAN_FINGER_NOTEXISTS
);
}
BeanPlusUtil
.
copyProperties
(
req
,
one
);
//更新时间
policeFinger
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
return
this
.
updateById
(
policeFinger
);
one
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
return
this
.
updateById
(
one
);
}
//查询指纹信息
...
...
@@ -87,15 +96,6 @@ public class PoliceFingerServiceImpl extends ServiceImpl<PoliceFingerMapper, Pol
return
PageResultFactory
.
createPageResult
(
page
);
}
//添加指纹时判断指纹是否存在,如果存在则抛出异常
//异常信息为:指纹信息已经存在
private
PoliceFinger
queryPolicemanFinger
(
PolicemanFingerReq
req
)
{
PoliceFinger
policeFinger
=
this
.
getById
(
req
);
if
(
ObjectUtil
.
isNull
(
policeFinger
))
{
throw
new
ServiceException
(
PolicemanFingerExceptionEnum
.
POLICEMAN_FINGER_EXCEPTION_ENUM
);
}
return
policeFinger
;
}
//查询的各种条件信息
private
LambdaQueryWrapper
<
PoliceFinger
>
createWrapper
(
PolicemanFingerReq
req
)
{
...
...
@@ -105,7 +105,7 @@ public class PoliceFingerServiceImpl extends ServiceImpl<PoliceFingerMapper, Pol
}
//根据业务编码查询
//警员id
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getPoliceId
()),
PoliceFinger:
:
getPoliceId
,
req
.
getPoliceId
());
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getPoliceId
()),
PoliceFinger:
:
getPoliceId
,
req
.
getPoliceId
());
//根据企业名称模糊查询
//指纹名称
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getName
()),
PoliceFinger:
:
getName
,
req
.
getName
());
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
View file @
19a1f042
package
com
.
junmp
.
jyzb
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.api.bean.req.CabinetReq
;
import
com.junmp.jyzb.api.bean.req.PolicemanReq
;
import
com.junmp.jyzb.entity.Cabinet
;
import
com.junmp.jyzb.entity.CabinetBox
;
import
com.junmp.jyzb.entity.PoliceFinger
;
import
com.junmp.jyzb.exception.enums.PolicemanExceptionEnum
;
import
com.junmp.jyzb.mapper.*
;
import
com.junmp.jyzb.service.CabinetService
;
import
com.junmp.jyzb.service.PolicemanService
;
import
com.junmp.jyzb.service.PubOrgService
;
import
com.junmp.jyzb.utils.*
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
...
...
@@ -45,6 +53,12 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
@Resource
private
PubOrgService
pubOrgService
;
@Resource
private
CabinetService
cabinetService
;
@Resource
private
PolicemanService
policemanService
;
private
static
final
String
REDIS_POLICE
=
"Policeman_"
;
private
static
final
String
REDIS_ORG
=
"Organization_"
;
...
...
@@ -97,7 +111,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
police
.
setUpdateTime
(
currentDate
);
police
.
setId
(
uuid
);
police
.
setOrgId
((
Stri
ng
)
policeman
.
get
(
"orgId"
));
police
.
setOrgId
((
Lo
ng
)
policeman
.
get
(
"orgId"
));
police
.
setName
((
String
)
policeman
.
get
(
"name"
));
police
.
setPoliceCode
((
String
)
policeman
.
get
(
"policeCode"
));
police
.
setSex
((
String
)
policeman
.
get
(
"sex"
));
...
...
@@ -263,7 +277,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
//police.setId(uuid);
String
id
=
policeman
.
get
(
"id"
).
toString
();
police
.
setId
(
id
);
police
.
setOrgId
((
Stri
ng
)
policeman
.
get
(
"orgId"
));
police
.
setOrgId
((
Lo
ng
)
policeman
.
get
(
"orgId"
));
police
.
setName
((
String
)
policeman
.
get
(
"name"
));
police
.
setPoliceCode
((
String
)
policeman
.
get
(
"policeCode"
));
police
.
setSex
((
String
)
policeman
.
get
(
"sex"
));
...
...
@@ -489,20 +503,19 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
}
@Override
public
ResponseResult
addFaceInfo
(
Map
<
String
,
Object
>
msg
)
{
try
{
checkNotBlank
(
msg
.
get
(
"policeId"
),
"policeId不能为空"
);
checkNotBlank
(
msg
.
get
(
"faceInfo"
),
"faceInfo不能为空"
);
}
catch
(
IllegalArgumentException
e
)
{
return
new
ResponseResult
(
HttpStatus
.
ERROR
,
ReturnMsg
.
ERROR
,
e
.
getMessage
());
public
boolean
addFaceInfo
(
PolicemanReq
req
)
{
//面部信息为null或者为空
if
(
ObjectUtil
.
isNull
(
req
.
getFaceInfo
())
||
ObjectUtil
.
isEmpty
(
req
.
getFaceInfo
())){
return
false
;
}
Date
currentDate
=
DateTimeUtil
.
getCurrentDateTime
();
Policeman
police
=
new
Policeman
();
police
.
setId
(
msg
.
get
(
"policeId"
).
toString
());
police
.
setFaceInfo
(
msg
.
get
(
"faceInfo"
).
toString
());
police
.
setUpdateTime
(
currentDate
);
policemanMapper
.
addFaceInfo
(
police
);
return
new
ResponseResult
(
HttpStatus
.
SUCCESS
,
ReturnMsg
.
PASS
);
Policeman
police
=
getOne
(
new
LambdaQueryWrapper
<
Policeman
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getId
()),
Policeman:
:
getId
,
req
.
getId
()));
if
(
ObjectUtil
.
isNull
(
police
)){
throw
new
ServiceException
(
PolicemanExceptionEnum
.
POLICEMAN_NOT_EXIST
);
}
police
.
setFaceInfo
(
req
.
getFaceInfo
());
police
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
return
policemanService
.
updateById
(
police
);
}
@Override
...
...
@@ -696,23 +709,23 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
/**
* @author lxh
* @description 更新人脸信息\删除人脸信息
* 删除时:传一个null的人脸信息即可
* @since 2023/7/18 15:02
* @param
* @return
**/
@Override
public
ResponseResult
updateFaceInfo
(
Map
<
String
,
Object
>
msg
)
{
try
{
checkNotBlank
(
msg
.
get
(
"policeId"
),
"policeId不能为空"
);
}
catch
(
IllegalArgumentException
e
){
return
new
ResponseResult
(
HttpStatus
.
ERROR
,
ReturnMsg
.
ERROR
,
e
.
getMessage
());
public
boolean
updateFaceInfo
(
PolicemanReq
req
)
{
//警员id不能为空
if
(
ObjectUtil
.
isEmpty
(
req
.
getId
())
||
ObjectUtil
.
isNull
(
req
.
getId
())){
return
false
;
}
Policeman
police
=
new
Policeman
();
police
.
setId
(
msg
.
get
(
"policeId"
).
toString
());
police
.
setFaceInfo
(
msg
.
get
(
"faceInfo"
).
toString
());
LambdaQueryWrapper
<
Policeman
>
eq
=
PolicemanWrapper
(
req
)
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getId
()),
Policeman:
:
getId
,
req
.
getId
());
Policeman
police
=
policemanService
.
getOne
(
eq
);
police
.
setFaceInfo
(
req
.
getFaceInfo
());
police
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
policemanMapper
.
updatePolice
(
police
);
return
new
ResponseResult
(
HttpStatus
.
SUCCESS
,
ReturnMsg
.
PASS
);
return
policemanService
.
updateById
(
police
);
}
...
...
@@ -724,38 +737,45 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
* @return
**/
@Override
public
ResponseResult
searchFaceInfo
(
Map
<
String
,
Object
>
msg
)
{
public
Policeman
searchFaceInfo
(
PolicemanReq
req
)
{
//警员id不能为空
try
{
checkNotBlank
(
msg
.
get
(
"policeId"
),
"policeId不能为空"
);
}
catch
(
IllegalArgumentException
e
)
{
return
new
ResponseResult
(
HttpStatus
.
ERROR
,
ReturnMsg
.
ERROR
,
e
.
getMessage
());
if
(
ObjectUtil
.
isEmpty
(
req
.
getId
())
||
ObjectUtil
.
isNull
(
req
.
getId
())){
return
null
;
}
Policeman
policeman
=
policemanMapper
.
selectOne
(
new
LambdaQueryWrapper
<
Policeman
>()
.
eq
(
Policeman:
:
getId
,
msg
.
get
(
"policeId"
)));
return
new
ResponseResult
(
HttpStatus
.
SUCCESS
,
"操作成功"
,
policeman
);
LambdaQueryWrapper
<
Policeman
>
eq
=
PolicemanWrapper
(
req
)
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getId
()),
Policeman:
:
getId
,
req
.
getId
());
Policeman
policeman
=
policemanService
.
getOne
(
eq
);
if
(
ObjectUtil
.
isNull
(
policeman
)){
throw
new
ServiceException
(
PolicemanExceptionEnum
.
POLICEMAN_NOT_EXIST
);
}
return
policeman
;
}
//通过单警柜获取组织机构id,再获取组织机构下的所有警员信息
@Override
public
ResponseResult
getOrgPoliceman
(
Map
<
String
,
Object
>
msg
)
{
try
{
checkNotBlank
(
msg
.
get
(
"cabinetId"
),
"cabinetId不能为空"
);
}
catch
(
IllegalArgumentException
e
)
{
return
new
ResponseResult
(
HttpStatus
.
ERROR
,
ReturnMsg
.
ERROR
,
e
.
getMessage
());
}
public
List
<
Policeman
>
getOrgPoliceman
(
CabinetReq
req
)
{
//通过警柜id获取组织机构id
Cabinet
cabinet
=
cabinet
Mapper
.
selec
tOne
(
new
LambdaQueryWrapper
<
Cabinet
>()
.
eq
(
Cabinet:
:
getId
,
msg
.
get
(
"cabinetId"
)));
Cabinet
cabinet
=
cabinet
Service
.
ge
tOne
(
new
LambdaQueryWrapper
<
Cabinet
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getId
()),
Cabinet:
:
getId
,
req
.
getId
(
)));
if
(
ObjectUtil
.
isNull
(
cabinet
)){
return
n
ew
ResponseResult
(
HttpStatus
.
ERROR
,
ReturnMsg
.
NO_DATA
,
ReturnData
.
NO_DATA
)
;
return
n
ull
;
}
long
orgId
=
cabinet
.
getOrgId
();
//通过机构id获取机构下所有的警员信息
List
<
Policeman
>
policemenList
=
policeman
Mapper
.
selectL
ist
(
new
LambdaQueryWrapper
<
Policeman
>()
List
<
Policeman
>
policemenList
=
policeman
Service
.
l
ist
(
new
LambdaQueryWrapper
<
Policeman
>()
.
eq
(
Policeman:
:
getOrgId
,
orgId
));
return
new
ResponseResult
<>(
HttpStatus
.
SUCCESS
,
"操作成功"
,
policemenList
);
return
policemenList
;
}
private
LambdaQueryWrapper
<
Policeman
>
PolicemanWrapper
(
PolicemanReq
req
)
{
LambdaQueryWrapper
<
Policeman
>
wrapper
=
new
LambdaQueryWrapper
<>();
//查询全部
if
(
ObjectUtil
.
isEmpty
(
req
))
{
return
wrapper
;
}
return
wrapper
;
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PubOrgServiceImpl.java
View file @
19a1f042
...
...
@@ -253,7 +253,7 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
@Override
public
List
<
String
>
getLowerOrg
(
String
orgId
)
{
//构建 Redis 缓存�
String
redisKey
=
"
showPubOrgList_"
+
orgId
;
String
redisKey
=
"
getLowerOrg"
;
// �Redis 中获取数�
List
<
PubOrg
>
cachedData
=
redisUtils
.
findCachedData
(
redisKey
);
...
...
@@ -265,44 +265,52 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
redisUtils
.
set
(
redisKey
,
menuList
);
}
List
<
String
>
resultList
=
new
ArrayList
<>();
// 存储最终的菜单树结�
Map
<
Long
,
List
<
String
>>
childrenMap
=
new
HashMap
<>();
// 存储每个菜单项的子菜单映�
List
<
String
>
resultList
=
new
ArrayList
<>();
// 存储最终的菜单树结果
Map
<
String
,
List
<
String
>>
childrenMap
=
new
HashMap
<>();
// 存储每个菜单项的子菜单映射
resultList
.
add
(
orgId
);
//将自己加入到返回的List中
// 构建子菜单映射表
for
(
PubOrg
menu
:
menuList
)
{
String
org
=
menu
.
getOrgId
().
toString
();
if
(!
childrenMap
.
containsKey
(
menu
.
getOrgParentId
()))
{
// 如果父菜单还不存在于映射表中
childrenMap
.
put
(
menu
.
getOrgParentId
(),
new
ArrayList
<>());
// 创建一个新的子菜单列表
if
(!
childrenMap
.
containsKey
(
menu
.
getOrgParentId
()
.
toString
()
))
{
// 如果父菜单还不存在于映射表中
childrenMap
.
put
(
menu
.
getOrgParentId
()
.
toString
()
,
new
ArrayList
<>());
// 创建一个新的子菜单列表
}
childrenMap
.
get
(
menu
.
getOrgParentId
()
).
add
(
org
);
// 将当前菜单项放入对应的子菜单列表�
childrenMap
.
get
(
menu
.
getOrgParentId
()
.
toString
()).
add
(
org
);
// 将当前菜单项放入对应的子菜单列表中
}
BigInteger
orgInfo
=
new
BigInteger
(
orgId
);
// 获取顶级菜单的标识符
Long
orgInfo
=
Long
.
valueOf
(
orgId
);
//获取输入的组织机构id信息
//Long orgInfo = new BigInteger(orgId); // 获取顶级菜单的标识符
// 获取顶级菜单
List
<
String
>
topMenus
=
childrenMap
.
get
(
orgI
nfo
);
List
<
String
>
topMenus
=
childrenMap
.
get
(
orgI
d
);
// 迭代构建菜单
�
// 迭代构建菜单
树
if
(
topMenus
!=
null
)
{
Queue
<
String
>
queue
=
new
LinkedList
<>();
// 使用队列结构辅助构建菜单�
queue
.
addAll
(
topMenus
);
// 将当前顶级菜单项放入队列�
while
(!
queue
.
isEmpty
()
)
{
St
ring
currentMenu
=
queue
.
poll
();
// 取出队首的当前菜单项
//Long currentMenuId = currentMenu; // 获取当前菜单项的标识�
for
(
String
topMenu
:
topMenus
)
{
St
ack
<
String
>
stack
=
new
Stack
<>();
// 使用栈结构辅助构建菜单树
stack
.
push
(
topMenu
);
// 将当前顶级菜单项放入栈中
if
(
childrenMap
.
containsKey
(
currentMenu
))
{
// 如果当前菜单项有子菜�
List
<
String
>
children
=
childrenMap
.
get
(
currentMenu
);
// 获取子菜单列�
//currentMenu.put("children", children); // 将子菜单列表放入当前菜单项中�children"字段
queue
.
addAll
(
children
);
// 将子菜单项放入队列中
}
while
(!
stack
.
isEmpty
())
{
String
currentMenu
=
stack
.
pop
();
// 取出队首的当前菜单项
//Long currentMenuId = currentMenu; // 获取当前菜单项的标识符
resultList
.
add
(
currentMenu
);
// 将已经处理完的当前菜单项添加到结果列表中
if
(
childrenMap
.
containsKey
(
currentMenu
))
{
// 如果当前菜单项有子菜单
List
<
String
>
children
=
childrenMap
.
get
(
currentMenu
);
// 获取子菜单列表
for
(
int
i
=
children
.
size
()
-
1
;
i
>=
0
;
i
--)
{
stack
.
push
(
children
.
get
(
i
));
}
}
resultList
.
add
(
currentMenu
);
// 将已经处理完的当前菜单项添加到结果列表中
}
}
}
//redisUtils.set(redisKey, resultList);
return
resultList
;
}
...
...
jyzb-biz/src/main/resources/mapper/CabinetBoxMapper.xml
View file @
19a1f042
...
...
@@ -6,9 +6,8 @@
<!--@Table base_cabinet_box-->
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"cabinet_id"
jdbcType=
"VARCHAR"
property=
"cabinetId"
/>
<result
column=
"police_id"
jdbcType=
"VARCHAR"
property=
"policeId"
/>
<result
column=
"police_name"
jdbcType=
"VARCHAR"
property=
"policeName"
/>
<result
column=
"error_state"
jdbcType=
"INTEGER"
property=
"errorState"
/>
<result
column=
"num"
jdbcType=
"INTEGER"
property=
"num"
/>
<result
column=
"state"
jdbcType=
"INTEGER"
property=
"state"
/>
<result
column=
"error_msg"
jdbcType=
"VARCHAR"
property=
"errorMsg"
/>
<result
column=
"log_map"
jdbcType=
"VARCHAR"
property=
"logMap"
/>
</resultMap>
...
...
@@ -34,4 +33,8 @@
from base_cabinet_box b
where b.id =#{cabinetBoxId}
</select>
<select
id=
"selectByIdCabinetBoxes"
resultType=
"com.junmp.jyzb.entity.CabinetBox"
parameterType=
"java.lang.String"
>
select * from base_cabinet_box b where b.cabinet_id=#{id}
</select>
</mapper>
\ No newline at end of file
jyzb-biz/src/main/resources/mapper/CabinetMapper.xml
View file @
19a1f042
...
...
@@ -18,7 +18,11 @@
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"createUser"
column=
"create_user"
/>
<result
property=
"updateUser"
column=
"update_user"
/>
<result
property=
"num"
column=
"num"
/>
<collection
property=
"list"
ofType=
"com.junmp.jyzb.entity.CabinetBox"
column=
"cabinet_id"
select=
"com.junmp.jyzb.mapper.CabinetBoxMapper.selectById"
>
</collection>
</resultMap>
...
...
@@ -60,7 +64,7 @@
where p.id =#{id}
</update>
<select
id=
"getAllCabinet"
resultType=
"Map"
>
<select
id=
"getAllCabinet"
>
select
c.id,
c.cabinet_num as cabinetNum,
...
...
@@ -75,6 +79,7 @@
c.out_sum as outSum
from base_cabinet c
left join pub_org o on c.org_id_int =o.org_id
</select>
<select
id=
"getAllCabinetId"
resultType=
"String"
>
...
...
@@ -130,8 +135,28 @@
#{item}
</foreach>
</select>
<select
id=
"getAllCabinetList"
resultType=
"com.junmp.jyzb.entity.Cabinet"
>
select
c.id,
c.cabinet_num as cabinetNum,
c.name,
o.org_id as orgId,
o.org_name as orgName,
c.location,
c.state,
c.update_time as updateTime,
c.sum as sum,
c.in_sum as inSum,
c.out_sum as outSum
from base_cabinet c
left join pub_org o on c.org_id_int =o.org_id
where c.org_id_int in
<foreach
item=
"item"
collection=
"list"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
<update
id=
"setCabinetSumInventory"
>
<update
id=
"setCabinetSumInventory"
>
UPDATE base_cabinet AS c
SET sum = (
SELECT count(i.id)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论