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
f271023c
Commit
f271023c
authored
Sep 06, 2023
by
李小惠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改前端和测试的bug,消息推送
parent
a4766f69
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
65 个修改的文件
包含
1171 行增加
和
246 行删除
+1171
-246
EqsSumDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/EqsSumDto.java
+3
-0
EquipmentTypeDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/EquipmentTypeDto.java
+1
-0
InventoryDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/InventoryDto.java
+3
-0
OrgDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/OrgDto.java
+1
-0
PolicemanDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/PolicemanDto.java
+5
-1
ShelfInsDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/ShelfInsDto.java
+0
-25
ShelfInventoryDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/ShelfInventoryDto.java
+0
-34
InventoryReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/InventoryReq.java
+3
-3
OrderUploadReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/OrderUploadReq.java
+59
-0
PoliceReassignmentReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/PoliceReassignmentReq.java
+24
-0
PolicemanReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/PolicemanReq.java
+1
-1
QueryOrgReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QueryOrgReq.java
+6
-2
QuerySupplierReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QuerySupplierReq.java
+2
-2
FormEqsReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/FormEqsReq.java
+31
-14
UpdateOrgReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateOrgReq.java
+1
-1
PolicemanExceptionEnum.java
jyzb-api/src/main/java/com/junmp/jyzb/api/exception/enums/PolicemanExceptionEnum.java
+5
-0
PubOrgExceptionEnum.java
jyzb-api/src/main/java/com/junmp/jyzb/api/exception/enums/PubOrgExceptionEnum.java
+5
-0
pom.xml
jyzb-biz/pom.xml
+15
-0
CabinetController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/CabinetController.java
+8
-9
EquipmentTypeController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/EquipmentTypeController.java
+14
-0
InventoryController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/InventoryController.java
+11
-0
MessageSendController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/MessageSendController.java
+197
-0
OrderController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/OrderController.java
+13
-0
PoliceController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PoliceController.java
+15
-7
PubOrgController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PubOrgController.java
+1
-1
SupplierController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/SupplierController.java
+8
-0
ToOutController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/ToOutController.java
+3
-2
EquipmentType.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/EquipmentType.java
+7
-0
Inventory.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Inventory.java
+11
-6
InventorySummary.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/InventorySummary.java
+24
-2
PoliceEquipment.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/PoliceEquipment.java
+33
-9
Policeman.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Policeman.java
+3
-2
User.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/User.java
+29
-1
InventorySummaryMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/InventorySummaryMapper.java
+5
-0
PolicemanMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/PolicemanMapper.java
+10
-1
CabinetBoxService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/CabinetBoxService.java
+0
-2
CabinetService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/CabinetService.java
+4
-0
InventoryService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/InventoryService.java
+6
-0
OrderService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/OrderService.java
+9
-3
PoliceEquipmentService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/PoliceEquipmentService.java
+2
-2
PolicemanService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/PolicemanService.java
+9
-4
ShelfService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/ShelfService.java
+0
-2
SupplierService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/SupplierService.java
+3
-0
CabinetBoxServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetBoxServiceImpl.java
+2
-15
CabinetServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetServiceImpl.java
+83
-17
CompanyServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CompanyServiceImpl.java
+1
-1
EquipmentTypeServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentTypeServiceImpl.java
+12
-1
InventoryServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/InventoryServiceImpl.java
+0
-0
InventorySummaryServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/InventorySummaryServiceImpl.java
+25
-17
OrderServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/OrderServiceImpl.java
+80
-14
PoliceEquipmentServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PoliceEquipmentServiceImpl.java
+2
-3
PoliceFingerServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PoliceFingerServiceImpl.java
+1
-1
PolicemanServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
+67
-24
ProductServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/ProductServiceImpl.java
+1
-1
ProductSkuServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/ProductSkuServiceImpl.java
+1
-1
ProductTagServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/ProductTagServiceImpl.java
+1
-1
PubOrgServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PubOrgServiceImpl.java
+8
-3
SupplierServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/SupplierServiceImpl.java
+29
-0
TriggerServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/TriggerServiceImpl.java
+1
-1
InvExpireMsg.java
jyzb-biz/src/main/java/com/junmp/jyzb/task/InvExpireMsg.java
+49
-9
InvOverDueMsg.java
jyzb-biz/src/main/java/com/junmp/jyzb/task/InvOverDueMsg.java
+56
-0
InvThresholdMsg.java
jyzb-biz/src/main/java/com/junmp/jyzb/task/InvThresholdMsg.java
+122
-0
InventorySummaryMapper.xml
jyzb-biz/src/main/resources/mapper/InventorySummaryMapper.xml
+5
-1
PolicemanMapper.xml
jyzb-biz/src/main/resources/mapper/PolicemanMapper.xml
+17
-0
pom.xml
pom.xml
+18
-0
没有找到文件。
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/EqsSumDto.java
View file @
f271023c
...
...
@@ -4,6 +4,9 @@ import lombok.Data;
import
java.io.Serializable
;
/**
* 装备汇总数量输出类
*/
@Data
public
class
EqsSumDto
implements
Serializable
{
//组织机构id
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/EquipmentTypeDto.java
View file @
f271023c
...
...
@@ -15,4 +15,5 @@ public class EquipmentTypeDto {
private
Integer
type
;
private
String
warrantyPeriod
;
private
String
maintenancePeriod
;
private
Boolean
isLeaf
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/InventoryDto.java
View file @
f271023c
...
...
@@ -130,6 +130,9 @@ public class InventoryDto implements Serializable {
*/
private
String
note
;
//是否过期
private
int
TermState
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/OrgDto.java
View file @
f271023c
...
...
@@ -16,6 +16,7 @@ public class OrgDto {
private
String
levelFlag
;
private
String
dName
;
private
Boolean
isLeaf
;
private
Integer
statusFlag
;
private
List
<
OrgDto
>
children
=
new
ArrayList
<>();
public
void
addChild
(
OrgDto
child
)
{
children
.
add
(
child
);
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/PolicemanDto.java
View file @
f271023c
...
...
@@ -33,7 +33,11 @@ public class PolicemanDto {
private
String
orgName
;
//组织机构id
private
Long
orgId
;
private
String
idCard
;
//警员状态
private
Integer
state
;
//是否有对应的账号
private
Boolean
isCreatedAccount
;
//指纹信息列表
private
List
<
PoliceFingerDto
>
fingersList
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/ShelfInsDto.java
deleted
100644 → 0
View file @
a4766f69
package
com
.
junmp
.
jyzb
.
api
.
bean
.
dto
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
ShelfInsDto
{
/**
* 仓库id
*/
private
String
warehouseId
;
/**
* warehouseName
*/
private
String
warehouseName
;
/**
*location 仓库地点
*/
private
String
warehouseLocation
;
/**
*list 装备汇总列表
*/
private
List
<
InventorySumDto
>
list
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/ShelfInventoryDto.java
deleted
100644 → 0
View file @
a4766f69
package
com
.
junmp
.
jyzb
.
api
.
bean
.
dto
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
public
class
ShelfInventoryDto
implements
Serializable
{
/**
* 仓库id
*/
private
String
warehouseId
;
/**
*仓库名称
*/
private
String
warehouseName
;
/**
*区域名称
*/
private
String
shelfAreaName
;
/**
*仓库地点
*/
private
String
warehouseLocation
;
/**
* 装备汇总list
*/
private
List
<
InventorySumDto
>
list
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/InventoryReq.java
View file @
f271023c
...
...
@@ -97,7 +97,7 @@ public class InventoryReq extends BaseRequest {
private
String
bussinessState
;
/**
*
位置
状态
*
在库
状态
*/
private
String
locationState
;
...
...
@@ -123,9 +123,9 @@ public class InventoryReq extends BaseRequest {
*/
private
Integer
fixCount
;
/**
*
维修次数
*
超期状态
*/
private
int
T
ermState
;
private
Integer
t
ermState
;
/**
* 位置类型
*/
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/OrderUploadReq.java
0 → 100644
View file @
f271023c
package
com
.
junmp
.
jyzb
.
api
.
bean
.
query
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.Getter
;
import
javax.validation.constraints.NotBlank
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
*
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
OrderUploadReq
extends
BaseRequest
{
/**
* 主订单id
*/
@NotBlank
(
message
=
"单据主id不能为空"
,
groups
=
{
detail
.
class
})
private
String
id
;
/**
* 单据状态 ready待入/出库,finished已入/出库,working入/出库中
*/
private
String
orderState
;
/**
* 实际数量
*/
private
Integer
actualQuantity
;
/**
* 总价格
*/
private
BigDecimal
price
;
/**
*childrenOrder(集合),子单据
*/
private
List
<
OrderUploadDetailReq
>
childrenOrder
;
@Getter
public
class
OrderUploadDetailReq
{
/**
* 子单据ID
*/
private
Long
detailId
;
/**
* 实际数量
*/
private
Integer
actualNum
;
/**
* 价格
*/
private
BigDecimal
price
;
/**
* 订单状态 ready待入/出库,working入/出库中,finished已完成
*/
private
String
orderType
;
}
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/PoliceReassignmentReq.java
0 → 100644
View file @
f271023c
package
com
.
junmp
.
jyzb
.
api
.
bean
.
query
;
import
com.junmp.jyzb.api.bean.req.FormEqsReq
;
import
com.junmp.v2.common.bean.request.ValidationApi
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
//警员调岗
@Data
public
class
PoliceReassignmentReq
{
//调岗警员id
@NotBlank
(
message
=
"警员id不能为空"
,
groups
=
{
ValidationApi
.
edit
.
class
})
private
String
id
;
//目标组织机构id
@NotNull
(
message
=
"目标组织机构id不能为空"
,
groups
=
{
ValidationApi
.
edit
.
class
})
private
Long
goalOrgId
;
//需要带走的装备信息列表
private
List
<
FormEqsReq
>
eqsReqList
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/PolicemanReq.java
View file @
f271023c
...
...
@@ -21,7 +21,7 @@ public class PolicemanReq extends BaseRequest {
@NotBlank
(
message
=
"箱门id不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
})
private
String
cabinetBoxId
;
@NotNull
(
message
=
"组织机构id不能为空"
,
groups
=
{})
@NotNull
(
message
=
"组织机构id不能为空"
,
groups
=
{
add
.
class
})
private
Long
orgId
;
private
Long
departmentId
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QueryOrgReq.java
View file @
f271023c
package
com
.
junmp
.
jyzb
.
api
.
bean
.
query
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
com.junmp.v2.common.bean.request.ValidationApi
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotNull
;
@Data
//@EqualsAndHashCode(callSuper = false)
public
class
QueryOrgReq
{
private
String
orgCode
;
private
String
orgId
;
private
String
parentId
;
@NotNull
(
message
=
"组织机构不能为空"
,
groups
=
{
ValidationApi
.
detail
.
class
})
private
Long
orgId
;
private
Long
parentId
;
private
Integer
isDepartment
;
private
Integer
level
;
private
Integer
delFlag
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QuerySupplierReq.java
View file @
f271023c
...
...
@@ -9,8 +9,8 @@ import java.util.Date;
import
java.util.List
;
@Data
public
class
QuerySupplierReq
{
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
QuerySupplierReq
extends
BaseRequest
{
private
String
name
;
private
String
id
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/
BorrowForm
Req.java
→
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/
FormEqs
Req.java
View file @
f271023c
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
;
...
...
@@ -8,10 +9,11 @@ import java.util.Date;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
BorrowForm
Req
extends
BaseRequest
{
public
class
FormEqs
Req
extends
BaseRequest
{
/**
*
id
*
主键
*/
@ApiModelProperty
(
value
=
"主键ID"
)
private
String
id
;
/**
...
...
@@ -20,9 +22,34 @@ public class BorrowFormReq extends BaseRequest {
private
String
policeId
;
/**
* 装备
ID
* 装备
号型id
*/
private
String
equipmentId
;
private
String
sizeId
;
/**
*装备号型名称
*/
private
String
sizeName
;
/**
*装备类型id
*/
private
String
typeId
;
/**
*装备类型名称
*/
private
String
typeName
;
/**
*供应商id
*/
private
String
supplierId
;
/**
*供应商名称
*/
private
String
supplierName
;
/**
* 装备数量
...
...
@@ -35,11 +62,6 @@ public class BorrowFormReq extends BaseRequest {
private
Long
orgId
;
/**
* 装备名称
*/
private
String
equipmentName
;
/**
* 更新时间
*/
private
Date
updateTime
;
...
...
@@ -48,9 +70,4 @@ public class BorrowFormReq extends BaseRequest {
* 创建时间
*/
private
Date
createTime
;
/**
* 警员名称
*/
private
String
policeName
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateOrgReq.java
View file @
f271023c
...
...
@@ -14,7 +14,7 @@ public class UpdateOrgReq {
* 状态
*/
@NotNull
(
message
=
"状态不能为空"
,
groups
=
{
ValidationApi
.
updateStatus
.
class
})
private
Integer
del
Flag
;
private
Integer
status
Flag
;
/**
* 组织机构列表
*/
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/exception/enums/PolicemanExceptionEnum.java
View file @
f271023c
...
...
@@ -29,6 +29,11 @@ public enum PolicemanExceptionEnum implements IExceptionEnum {
*/
POLICECODE_IS_EXISTS
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"警员编号已经存在,警员编号重复"
),
/**
* 该警员已经绑定账号
*/
POLICEUSER_IS_EXISTS
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"该警员已经绑定账号"
),
;
/**
* 错误编码
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/exception/enums/PubOrgExceptionEnum.java
View file @
f271023c
...
...
@@ -10,7 +10,12 @@ public enum PubOrgExceptionEnum implements IExceptionEnum {
* 组织机构不存在
*/
PUBORG_NOT_EXIST
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"组织机构不存在"
),
/**
* 组织机构不存在或者被删除
*/
PUBORG_NOTEXIST_OR_DEL
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"组织机构不存在或者已经被删除"
),
;
/**
* 错误编码
*/
...
...
jyzb-biz/pom.xml
View file @
f271023c
...
...
@@ -86,6 +86,7 @@
<artifactId>
spring-amqp
</artifactId>
</dependency>
<!-- 消息通知-->
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
ws-boot-starter
</artifactId>
...
...
@@ -103,5 +104,19 @@
<groupId>
com.fasterxml.jackson.core
</groupId>
<artifactId>
jackson-databind
</artifactId>
</dependency>
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
auth-sdk
</artifactId>
</dependency>
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
system-biz-user
</artifactId>
</dependency>
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
dict-biz
</artifactId>
</dependency>
</dependencies>
</project>
jyzb-biz/src/main/java/com/junmp/jyzb/controller/CabinetController.java
View file @
f271023c
...
...
@@ -10,6 +10,7 @@ import com.junmp.jyzb.service.CabinetService;
import
com.junmp.jyzb.utils.ResponseResult
;
import
com.junmp.v2.common.bean.request.ValidationApi
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
com.junmp.v2.db.api.page.PageResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -78,25 +79,23 @@ public class CabinetController {
}
//根据组织机构id查询出单警柜的详细信息
//根据组织机构id查询出单警柜的详细信息
(list)
@PostMapping
(
"/ShowCabinetList"
)
@ApiOperation
(
"查询单警柜列表"
)
public
ApiRes
<
List
<
CabinetDto
>>
showCabinetList
(
@RequestBody
CabinetReq
req
){
List
<
CabinetDto
>
allCabinetList
=
cabinetService
.
getAllCabinetList
(
req
);
if
(
allCabinetList
.
size
()<=
0
){
return
ApiRes
.
failure
(
"查询失败,列表为null"
);
}
return
ApiRes
.
success
(
allCabinetList
);
}
@PostMapping
(
"/
getCabinetBoxList
"
)
@ApiOperation
(
"
通过单警柜id获取箱门
列表"
)
public
ApiRes
<
List
<
CabinetBox
>>
getCabinetBoxList
(
@RequestBody
CabinetReq
req
){
return
ApiRes
.
success
(
cabinet
BoxService
.
getCabinetBoxList
(
req
));
//根据组织机构id查询出单警柜的详细信息(page)
@PostMapping
(
"/
ShowCabinetPage
"
)
@ApiOperation
(
"
查询单警柜
列表"
)
public
ApiRes
<
PageResult
<
CabinetDto
>>
ShowCabinetPage
(
@RequestBody
CabinetReq
req
){
return
ApiRes
.
success
(
cabinet
Service
.
ShowCabinetPage
(
req
));
}
@PostMapping
(
"/boxBindPolice"
)
@ApiOperation
(
"箱门绑定人员"
)
public
ApiRes
<
Boolean
>
boxBindPolice
(
@RequestBody
CabinetBoxReq
req
)
{
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/controller/EquipmentTypeController.java
View file @
f271023c
...
...
@@ -82,4 +82,18 @@ public class EquipmentTypeController {
return
returnMsg
;
}
//库存阈值的设置
// @PostMapping("/SetThreshold")
// @ApiOperation("库存阈值的设置")
//库存阈值的修改
// @PostMapping("/SetThreshold")
// @ApiOperation("库存阈值的设置")
//库存阈值的查看
// @PostMapping("/SetThreshold")
// @ApiOperation("库存阈值的设置")
//库存阈值的删除
// @PostMapping("/SetThreshold")
// @ApiOperation("库存阈值的设置")
}
jyzb-biz/src/main/java/com/junmp/jyzb/controller/InventoryController.java
View file @
f271023c
...
...
@@ -3,6 +3,7 @@ package com.junmp.jyzb.controller;
import
com.junmp.jyzb.api.bean.dto.*
;
import
com.junmp.jyzb.api.bean.query.*
;
import
com.junmp.jyzb.api.bean.req.EquipmentBindReq
;
import
com.junmp.jyzb.entity.Inventory
;
import
com.junmp.jyzb.entity.InventorySummary
;
import
com.junmp.jyzb.service.*
;
import
com.junmp.v2.common.bean.request.ValidationApi
;
...
...
@@ -50,6 +51,7 @@ public class InventoryController {
}
//装备绑定箱门
@PostMapping
(
"/EquipmentBind"
)
@ApiOperation
(
"装备绑定箱门"
)
...
...
@@ -79,6 +81,7 @@ public class InventoryController {
}
//根据组织机构id/单警柜id/仓库id查询出库存的汇总信息(page)
@PostMapping
(
"/GetEquipmentInfo"
)
@ApiOperation
(
"根据条件查询库存汇总信息"
)
...
...
@@ -86,6 +89,7 @@ public class InventoryController {
return
ApiRes
.
success
(
inventorySummaryService
.
getEquipmentInfo
(
req
));
}
//根据组织机构/单警柜id/仓库id查询每件装备细信的详息(返回结果是List)
@PostMapping
(
"/EqsBySearchType"
)
@ApiOperation
(
"查询库存装备详细信息(list)"
)
...
...
@@ -195,5 +199,12 @@ public class InventoryController {
return
ApiRes
.
success
(
inventoryService
.
GetListEquipment
(
req
));
}
//根据条件查询仓库下的所有装备信息
@PostMapping
(
"/GetDetailByTerms"
)
@ApiOperation
(
"根据条件查询仓库下的所有装备信息"
)
public
ApiRes
<
PageResult
<
InventoryDto
>>
GetDetailByTerms
(
@RequestBody
@Validated
(
ValidationApi
.
export
.
class
)
InventoryReq
req
){
return
ApiRes
.
success
(
inventoryService
.
GetDetailByTerms
(
req
));
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/controller/MessageSendController.java
0 → 100644
View file @
f271023c
package
com
.
junmp
.
jyzb
.
controller
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.junmp.jyzb.entity.Inventory
;
import
com.junmp.jyzb.entity.InventorySummary
;
import
com.junmp.jyzb.service.EquipmentTypeService
;
import
com.junmp.jyzb.service.InventoryService
;
import
com.junmp.jyzb.service.InventorySummaryService
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
com.junmp.v2.db.api.factory.PageFactory
;
import
com.junmp.v2.dict.entity.SysDictItem
;
import
com.junmp.v2.dict.service.SysDictItemService
;
import
com.junmp.v2.message.api.MessageApi
;
import
com.junmp.v2.message.api.bean.req.MessageReq
;
import
com.junmp.v2.message.api.bean.req.MessageSendReq
;
import
io.swagger.annotations.Api
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.time.LocalDate
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@RestController
@Api
(
"消息推送"
)
@RequestMapping
(
"/MessageSend"
)
@Slf4j
public
class
MessageSendController
{
@Resource
private
InventoryService
inventoryService
;
@Resource
private
InventorySummaryService
inventorySummaryService
;
@Resource
private
EquipmentTypeService
equipmentTypeService
;
@Resource
private
MessageApi
messageApi
;
@Resource
private
SysDictItemService
sysDictItemService
;
// MessageSendReq sendReq = new MessageSendReq();
// sendReq.setSendUserId("1000");
// sendReq.setReceiveUserIds(userIds);
// sendReq.setMsgTitle(msgtTitle);
// sendReq.setBizType(bizType);
// sendReq.setMsgContent(msgContent);
// sendReq.setPriority("0");
// sendReq.setSendTime(DateTime.now());
// messageApi.sendMessage(sendReq);
// messageApi.queryCount(new MessageReq());
// /*推送发送未读数量*/
// for(Long userId :userIdList){
// MessageReq req1 = new MessageReq();
// req1.setReadFlag(0);
// req1.setReceiveUserId(userId);
// Integer count1 = messageApi.queryCount(req1);
// messageApi.pushMsgToUser(String.valueOf(userId),count1);
//消息推送场景1:物资低于物资阈值
@PostMapping
(
"/aaa"
)
public
ApiRes
<
Boolean
>
action1
()
{
//获取装备信息汇总,并且判断装备的汇总数量是否低于装备阈值,如果低于装备阈值,则进行消息提醒
//所有待判断的物资
LambdaQueryWrapper
<
InventorySummary
>
wrapper
=
new
LambdaQueryWrapper
<
InventorySummary
>()
.
eq
(
InventorySummary:
:
getLocationType
,
0
);
//分页参数
int
pageSize
=
1000
;
int
currentPage
=
1
;
//获取装备的所有库存数量
long
termCount
=
inventorySummaryService
.
count
(
wrapper
);
List
<
InventorySummary
>
list
=
new
ArrayList
<>();
if
(
termCount
>
0
)
{
// 分页查询
while
((
currentPage
-
1
)
*
pageSize
<
termCount
)
{
List
<
InventorySummary
>
inventorySummaryList
=
processPageData1
(
currentPage
,
pageSize
);
currentPage
++;
list
.
addAll
(
inventorySummaryList
);
}
}
//超期物资查询出来之后,将超期物资进行消息推送提醒
//直接对list进行处理操作推送消息即可
for
(
InventorySummary
inventorySummary:
list
)
{
MessageSendReq
sendReq
=
new
MessageSendReq
();
sendReq
.
setSendUserId
(
"1000"
);
sendReq
.
setReceiveUserIds
(
"1000"
);
sendReq
.
setMsgTitle
(
"物资低于阈值"
);
//设置业务类型
SysDictItem
one
=
sysDictItemService
.
getOne
(
new
LambdaQueryWrapper
<
SysDictItem
>()
.
eq
(
SysDictItem:
:
getDictItemId
,
"1698969902300176385"
));
sendReq
.
setBizType
(
one
.
getItemValue
());
sendReq
.
setMsgContent
(
inventorySummary
.
getLocationName
()+
"仓库下的"
+
inventorySummary
.
getTypeName
()+
",号型为:"
+
inventorySummary
.
getSizeName
()+
"的物资低于阈值"
);
sendReq
.
setPriority
(
"0"
);
sendReq
.
setSendTime
(
DateTime
.
now
());
messageApi
.
sendMessage
(
sendReq
);
}
messageApi
.
queryCount
(
new
MessageReq
());
/*推送发送未读数量*/
List
<
Long
>
userIdList
=
new
ArrayList
<>();
userIdList
.
add
(
1000L
);
for
(
Long
userId
:
userIdList
){
MessageReq
req1
=
new
MessageReq
();
req1
.
setReadFlag
(
0
);
req1
.
setReceiveUserId
(
userId
);
Integer
count1
=
messageApi
.
queryCount
(
req1
);
messageApi
.
pushMsgToUser
(
String
.
valueOf
(
userId
),
count1
);
}
return
ApiRes
.
success
(
true
);
}
// 处理每页数据
private
List
<
InventorySummary
>
processPageData1
(
long
pageSize
,
long
currentPage
)
{
//得到全局默认值(随机处理数据表中的一条数据为默认值)
Integer
threshold
=
equipmentTypeService
.
getById
(
100001
).
getThreshold
();
//查询inventory_summary表中的threshold字段是否存在值,
// 如果存在则用summary表中的字段进行比较物资阈值,如果不存在则默认使用全局物资阈值进行比较
LambdaQueryWrapper
<
InventorySummary
>
wrapper
=
new
LambdaQueryWrapper
<
InventorySummary
>()
.
eq
(
InventorySummary:
:
getLocationType
,
0
);
Page
<
InventorySummary
>
page
=
inventorySummaryService
.
page
(
PageFactory
.
getDefaultPage
(
pageSize
,
currentPage
),
wrapper
);
List
<
InventorySummary
>
records
=
page
.
getRecords
();
//使用自定义物资阈值进行比较
List
<
InventorySummary
>
collect1
=
records
.
stream
()
.
filter
(
data
->
ObjectUtil
.
isNotNull
(
data
.
getThreshold
()))
.
filter
(
data
->
data
.
getNumber
()
<=
data
.
getThreshold
())
.
collect
(
Collectors
.
toList
());
//使用全局物资阈值进行比较
List
<
InventorySummary
>
collect2
=
records
.
stream
()
.
filter
(
data
->
data
.
getNumber
()
<=
threshold
&&
ObjectUtil
.
isNull
(
data
.
getThreshold
()))
.
collect
(
Collectors
.
toList
());
//将数据存储到一个list中
List
<
InventorySummary
>
inventorySummaryList
=
new
ArrayList
<>();
inventorySummaryList
.
addAll
(
collect1
);
inventorySummaryList
.
addAll
(
collect2
);
return
inventorySummaryList
;
}
//消息推送场景2:物资超期
//消息推送场景3:过质保期
@PostMapping
(
"/ccc"
)
public
void
action3
()
{
LambdaQueryWrapper
<
Inventory
>
wrapper
=
new
LambdaQueryWrapper
<>();
// 分页参数
int
pageSize
=
1000
;
// 每页记录数,可以根据需求调整
int
currentPage
=
1
;
// 当前页数
//所有待判断的物资
wrapper
.
eq
(
Inventory:
:
getTermState
,
0
);
//获取未超期的物资数量(并且他的state不是销毁状态)
long
termCount
=
inventoryService
.
count
(
wrapper
);
List
<
Inventory
>
list
=
new
ArrayList
<>();
if
(
termCount
>
0
)
{
// 分页查询
while
((
currentPage
-
1
)
*
pageSize
<
termCount
)
{
List
<
Inventory
>
inventoryList
=
processPageData3
(
currentPage
,
pageSize
);
currentPage
++;
list
.
addAll
(
inventoryList
);
}
}
System
.
out
.
println
(
list
);
//超期物资查询出来之后,将超期物资进行消息推送提醒
//直接对list进行处理操作推送消息即可
}
// 处理每页数据
private
List
<
Inventory
>
processPageData3
(
long
pageSize
,
long
currentPage
)
{
LocalDate
localdate
=
LocalDate
.
now
();
// 使用LambdaQueryWrapper构建查询条件
LambdaQueryWrapper
<
Inventory
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
eq
(
Inventory:
:
getTermState
,
0
);
//如果 生产日期 < 当前日期减去质保数,表示该装备已经超过质保期
wrapper
.
apply
(
"production_date <= DATE_SUB({0}, INTERVAL warranty_period DAY)"
,
"1970-03-01 00:00:00"
);
//获取过质保期的物资信息
List
<
Inventory
>
page
=
inventoryService
.
page
(
PageFactory
.
getDefaultPage
(
pageSize
,
currentPage
),
wrapper
).
getRecords
();
page
.
forEach
(
o
->
o
.
setTermState
(
1
));
inventoryService
.
saveOrUpdateBatch
(
page
);
return
page
;
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/controller/OrderController.java
View file @
f271023c
...
...
@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import
com.junmp.jyzb.api.bean.dto.OrderDto
;
import
com.junmp.jyzb.api.bean.dto.OrderMainDto
;
import
com.junmp.jyzb.api.bean.query.OrderMainReq
;
import
com.junmp.jyzb.api.bean.query.OrderUploadReq
;
import
com.junmp.jyzb.api.bean.req.UpdateOrderReq
;
import
com.junmp.jyzb.service.OrderService
;
import
com.junmp.v2.common.bean.request.ValidationApi
;
...
...
@@ -75,6 +76,18 @@ public class OrderController {
return
ApiRes
.
success
(
orderService
.
GetDetailById
(
req
));
}
@PostMapping
(
"/PushState"
)
@ApiOperation
(
"单据状态上报"
)
public
ApiRes
<
Boolean
>
PushState
(
@RequestBody
@Validated
(
ValidationApi
.
delete
.
class
)
OrderUploadReq
req
){
return
ApiRes
.
success
(
orderService
.
PushState
(
req
));
}
@PostMapping
(
"/Accounting"
)
@ApiOperation
(
"记账"
)
public
ApiRes
<
Boolean
>
Accounting
(
@RequestBody
@Validated
(
ValidationApi
.
delete
.
class
)
OrderUploadReq
req
){
return
ApiRes
.
success
(
orderService
.
Accounting
(
req
));
}
// //将工作单添加到rabbitmq中去
// @PostMapping("/AddOrderRabbitMq")
// @ApiOperation("将工作单添加到rabbitmq消息队列中去")
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PoliceController.java
View file @
f271023c
...
...
@@ -3,6 +3,7 @@ package com.junmp.jyzb.controller;
import
cn.hutool.core.util.ObjectUtil
;
import
com.junmp.jyzb.api.bean.dto.PolicemanDto
;
import
com.junmp.jyzb.api.bean.query.CabinetReq
;
import
com.junmp.jyzb.api.bean.query.PoliceReassignmentReq
;
import
com.junmp.jyzb.api.bean.query.PolicemanReq
;
import
com.junmp.jyzb.api.bean.req.UpdatePolicemanReq
;
import
com.junmp.jyzb.entity.Policeman
;
...
...
@@ -11,6 +12,7 @@ import com.junmp.jyzb.utils.ResponseResult;
import
com.junmp.v2.common.bean.request.ValidationApi
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
com.junmp.v2.db.api.page.PageResult
;
import
com.junmp.v2.sys.api.bean.user.req.UserOrgReq
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -70,17 +72,17 @@ public class PoliceController {
//根据
组织机构id
查询,只查询本级,不包含下级(list)
//根据
条件
查询,只查询本级,不包含下级(list)
@PostMapping
(
"/ShowPoliceList"
)
@ApiOperation
(
"
查询某个组织机构下的
所有警员信息(list)"
)
@ApiOperation
(
"
根据条件查询
所有警员信息(list)"
)
public
ApiRes
<
List
<
PolicemanDto
>>
GetAllPolicemanList
(
@RequestBody
PolicemanReq
req
){
List
<
PolicemanDto
>
policemanDtos
=
policemanService
.
GetAllPolicemanList
(
req
);
return
ApiRes
.
success
(
policemanDtos
);
}
//根据组
织机构id
查询,只查询本级,不包含下级(page)
//根据组
条件
查询,只查询本级,不包含下级(page)
@PostMapping
(
"/ShowPolicePage"
)
@ApiOperation
(
"
查询某个组织机构下的
所有警员信息(page)"
)
@ApiOperation
(
"
根据条件查询
所有警员信息(page)"
)
public
ApiRes
<
PageResult
<
PolicemanDto
>>
GetAllPolicemanPage
(
@RequestBody
PolicemanReq
req
){
PageResult
<
PolicemanDto
>
policemanDtoPageResult
=
policemanService
.
GetAllPolicemanPage
(
req
);
return
ApiRes
.
success
(
policemanDtoPageResult
);
...
...
@@ -123,9 +125,8 @@ public class PoliceController {
@PostMapping
(
"/ChangePoliceOrg"
)
@ApiOperation
(
"警员调岗"
)
public
ResponseResult
changePoliceOrg
(
@RequestBody
Map
<
String
,
Object
>
cabinetId
){
return
null
;
public
ApiRes
<
Boolean
>
changePoliceOrg
(
@RequestBody
@Validated
(
ValidationApi
.
edit
.
class
)
PoliceReassignmentReq
req
){
return
ApiRes
.
success
(
policemanService
.
changePoliceOrg
(
req
));
}
...
...
@@ -183,4 +184,11 @@ public class PoliceController {
return
ApiRes
.
success
(
b
);
}
//删除账号的同时,将警员的信息进行更新
@PostMapping
(
"/UpdatePoliceInfo"
)
@ApiOperation
(
"删除警员账号,修改警员信息"
)
public
ApiRes
<
Boolean
>
UpdatePoliceInfo
(
@RequestBody
UserOrgReq
req
){
return
ApiRes
.
success
(
policemanService
.
UpdatePoliceInfo
(
req
));
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PubOrgController.java
View file @
f271023c
...
...
@@ -50,7 +50,7 @@ public class PubOrgController {
}
@PostMapping
(
"/GetCurrentList"
)
@ApiOperation
(
"根据当前组织机构列表查询"
)
public
ApiRes
<
OrgDto
>
GetCurrentList
(
@RequestBody
QueryOrgReq
req
)
{
public
ApiRes
<
OrgDto
>
GetCurrentList
(
@RequestBody
@Validated
(
ValidationApi
.
detail
.
class
)
QueryOrgReq
req
)
{
return
ApiRes
.
success
(
pubOrgService
.
getOrgHierarchy
(
req
));
}
@PostMapping
(
"/ChangeOrgState"
)
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/controller/SupplierController.java
View file @
f271023c
...
...
@@ -7,6 +7,7 @@ import com.junmp.jyzb.entity.Supplier;
import
com.junmp.jyzb.service.SupplierService
;
import
com.junmp.v2.common.bean.request.ValidationApi
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
com.junmp.v2.db.api.page.PageResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -45,6 +46,13 @@ public class SupplierController {
return
ApiRes
.
success
(
supplierService
.
ShowSupplier
(
req
));
}
//供应商分页
@PostMapping
(
"/ShowSupplierPage"
)
@ApiOperation
(
"查询供应商列表(page)"
)
public
ApiRes
<
PageResult
<
SupplierDto
>>
ShowSupplierPage
(
@RequestBody
QuerySupplierReq
req
){
return
ApiRes
.
success
(
supplierService
.
ShowSupplierPage
(
req
));
}
@PostMapping
(
"/UpdateSupplier"
)
@ApiOperation
(
"修改供应商信息"
)
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/controller/ToOutController.java
View file @
f271023c
package
com
.
junmp
.
jyzb
.
controller
;
import
com.junmp.jyzb.api.bean.req.
BorrowForm
Req
;
import
com.junmp.jyzb.api.bean.req.
FormEqs
Req
;
import
com.junmp.jyzb.service.PoliceEquipmentService
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
io.swagger.annotations.Api
;
...
...
@@ -24,7 +24,8 @@ public class ToOutController {
//警员借用装备后在在数据库中增加相关借用装备数据
@PostMapping
(
"/AddBorrowEqs"
)
@ApiOperation
(
"增加警员借用装备数据信息"
)
public
ApiRes
<
Boolean
>
AddBorrowEqs
(
BorrowForm
Req
req
){
public
ApiRes
<
Boolean
>
AddBorrowEqs
(
FormEqs
Req
req
){
return
ApiRes
.
success
(
policeEquipmentService
.
AddBorrowEqs
(
req
));
}
//警员领用装备后在数据库中增加相关领用装备数据
}
jyzb-biz/src/main/java/com/junmp/jyzb/entity/EquipmentType.java
View file @
f271023c
...
...
@@ -107,5 +107,11 @@ public class EquipmentType implements Serializable {
@ApiModelProperty
(
value
=
"类型,0类别,1装备"
)
private
Integer
type
;
/**
* 物资阈值
*/
@ApiModelProperty
(
value
=
"物资阈值"
)
private
Integer
threshold
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Inventory.java
View file @
f271023c
...
...
@@ -48,7 +48,7 @@ public class Inventory implements Serializable {
* 部门ID
*/
@TableField
(
"department_id"
)
private
l
ong
departmentId
;
private
L
ong
departmentId
;
/**
* 货架位置
...
...
@@ -103,13 +103,13 @@ public class Inventory implements Serializable {
private
Date
productionDate
;
/**
* 质保
�
* 质保
期
*/
@TableField
(
"warranty_period"
)
private
long
warrantyPeriod
;
private
Integer
warrantyPeriod
;
/**
* 维保
�
* 维保
期
*/
@TableField
(
"maintenance_period"
)
private
Integer
maintenancePeriod
;
...
...
@@ -120,10 +120,10 @@ public class Inventory implements Serializable {
@TableField
(
"fix_count"
)
private
Integer
fixCount
;
/**
*
维修次数
*
是否过期
*/
@TableField
(
"term_state"
)
private
int
TermState
;
private
Integer
TermState
;
/**
* 位置类型
*/
...
...
@@ -182,4 +182,8 @@ public class Inventory implements Serializable {
*/
@TableField
(
value
=
"create_user"
,
fill
=
FieldFill
.
UPDATE
)
private
String
createUser
;
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/entity/InventorySummary.java
View file @
f271023c
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
;
...
...
@@ -12,10 +14,10 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
@ApiModel
(
value
=
"com-junmp-jyzb-domain-InventorySummary"
)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName
(
"base_inventory_summary"
)
@TableName
(
"base_inventory_summary_type2"
)
@Data
public
class
InventorySummary
implements
Serializable
{
/**
* 装备汇总id
...
...
@@ -161,6 +163,25 @@ public class InventorySummary implements Serializable {
@TableField
(
"one_id"
)
private
String
oneId
;
/**
* 物资阈值
*/
@ApiModelProperty
(
value
=
"物资阈值"
)
@TableField
(
"threshold"
)
private
Integer
threshold
;
/**
* 质保期
*/
@TableField
(
exist
=
false
)
private
Integer
warrantyPeriod
;
/**
* 维保周期
*/
@TableField
(
exist
=
false
)
private
Integer
maintenancePeriod
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/entity/PoliceEquipment.java
View file @
f271023c
...
...
@@ -32,10 +32,40 @@ public class PoliceEquipment implements Serializable {
private
String
policeId
;
/**
* 装备
ID
* 装备
号型id
*/
@TableField
(
"equipment_id"
)
private
String
equipmentId
;
@TableField
(
"size_id"
)
private
String
sizeId
;
/**
*装备号型名称
*/
@TableField
(
"size_name"
)
private
String
sizeName
;
/**
*装备类型id
*/
@TableField
(
"type_id"
)
private
String
typeId
;
/**
*装备类型名称
*/
@TableField
(
"type_name"
)
private
String
typeName
;
/**
*供应商id
*/
@TableField
(
"supplier_id"
)
private
String
supplierId
;
/**
*供应商名称
*/
@TableField
(
"supplier_name"
)
private
String
supplierName
;
/**
* 装备数量
...
...
@@ -50,12 +80,6 @@ public class PoliceEquipment implements Serializable {
private
Long
orgId
;
/**
* 装备名称
*/
@TableField
(
"equipment_name"
)
private
String
equipmentName
;
/**
* 更新时间
*/
@TableField
(
"update_time"
)
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Policeman.java
View file @
f271023c
...
...
@@ -50,7 +50,8 @@ public class Policeman implements Serializable {
@TableField
(
value
=
"door_code"
)
private
String
doorCode
;
@TableField
(
value
=
"password"
)
@TableField
(
value
=
"password"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
password
;
@TableField
(
value
=
"photo"
)
...
...
@@ -74,7 +75,7 @@ public class Policeman implements Serializable {
@TableField
(
value
=
"state"
)
private
Integer
state
;
@TableField
(
value
=
"user_id"
)
@TableField
(
value
=
"user_id"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Long
UserId
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/User.java
View file @
f271023c
...
...
@@ -2,6 +2,7 @@ package com.junmp.jyzb.entity;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
...
...
@@ -15,37 +16,64 @@ import java.util.Date;
@NoArgsConstructor
@TableName
(
"sys_user"
)
public
class
User
implements
Serializable
{
@TableId
(
value
=
"user_id"
)
private
Long
userId
;
@TableField
(
value
=
"real_name"
)
private
String
realName
;
@TableField
(
value
=
"nick_name"
)
private
String
nickName
;
private
String
account
;
private
String
password
;
//头像,存的为文件的id
private
Long
avatar
;
private
Date
birthday
;
private
String
sex
;
private
String
email
;
private
String
phone
;
private
String
tel
;
//是否是超级管理员:Y-是,N-否
@TableField
(
value
=
"super_admin_flag"
)
private
String
superAdminFlag
;
//状态:1-正常,2-冻结
@TableField
(
value
=
"status_flag"
)
private
String
statusFlag
;
@TableField
(
value
=
"user_type"
)
private
Integer
userType
;
@TableField
(
value
=
"last_login_ip"
)
private
String
lastLoginIp
;
@TableField
(
value
=
"last_login_time"
)
private
Date
lastLoginTime
;
@TableField
(
value
=
"del_flag"
)
private
Integer
delFlag
;
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
private
Date
createTime
;
@TableField
(
value
=
"create_user"
)
private
Long
createUser
;
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
UPDATE
)
private
Date
updateTime
;
@TableField
(
value
=
"update_user"
)
private
Long
updateUser
;
@TableField
(
value
=
"app_flag"
)
private
Integer
appFlag
;
}
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/InventorySummaryMapper.java
View file @
f271023c
...
...
@@ -4,7 +4,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.junmp.jyzb.entity.InventorySummary
;
import
com.junmp.jyzb.entity.ProductBatch
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
@Mapper
public
interface
InventorySummaryMapper
extends
BaseMapper
<
InventorySummary
>
{
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/PolicemanMapper.java
View file @
f271023c
package
com
.
junmp
.
jyzb
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.junmp.jyzb.entity.CabinetBox
;
import
com.junmp.jyzb.entity.InventorySummary
;
import
com.junmp.jyzb.entity.Policeman
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -22,5 +26,9 @@ public interface PolicemanMapper extends BaseMapper<Policeman> {
List
<
Policeman
>
SearchBoxBindPolice
(
List
<
String
>
cabinetBoxes
);
List
<
Policeman
>
SearchPoliceList
(
String
id
);
List
<
Policeman
>
SearchPoliceList
(
String
id
);
IPage
<
Policeman
>
SearchPolicePage
(
Page
<
Policeman
>
page
,
String
id
);
Long
SearchPoliceSize
(
String
id
);
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/service/CabinetBoxService.java
View file @
f271023c
...
...
@@ -11,8 +11,6 @@ import java.util.Map;
public
interface
CabinetBoxService
extends
IService
<
CabinetBox
>
{
List
<
CabinetBox
>
getCabinetBoxList
(
CabinetReq
req
);
//添加箱门信息
String
AddBoxInfo
(
UpdateCabinetBoxReq
req
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/CabinetService.java
View file @
f271023c
...
...
@@ -7,6 +7,7 @@ import com.junmp.jyzb.api.bean.query.CabinetReq;
import
com.junmp.jyzb.api.bean.req.UpdateCabinetReq
;
import
com.junmp.jyzb.entity.Cabinet
;
import
com.junmp.jyzb.utils.ResponseResult
;
import
com.junmp.v2.db.api.page.PageResult
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -73,4 +74,7 @@ public interface CabinetService extends IService<Cabinet> {
Cabinet
CabinetExist
(
String
id
);
boolean
SetInventoryInfo
(
String
id
);
//根据组织机构id查询出单警柜的详细信息(page)
PageResult
<
CabinetDto
>
ShowCabinetPage
(
CabinetReq
req
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/InventoryService.java
View file @
f271023c
...
...
@@ -16,6 +16,7 @@ import java.util.List;
import
java.util.Map
;
public
interface
InventoryService
extends
IService
<
Inventory
>
{
//根据装备id查询出装备的详细信息
InventoryDto
getInventoryDetail
(
InventoryReq
msg
);
...
...
@@ -77,4 +78,9 @@ public interface InventoryService extends IService<Inventory> {
//查询箱门(cabinetBox下)所有装备简要信息列表page(传递cabinetBoxId)
PageResult
<
EqsBriefDto
>
searchEqsByBoxIdPage
(
CabinetBoxReq
req
);
//根据条件查询仓库下的所有装备信息
PageResult
<
InventoryDto
>
GetDetailByTerms
(
InventoryReq
req
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/OrderService.java
View file @
f271023c
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.junmp.jyzb.api.bean.dto.OrderDto
;
import
com.junmp.jyzb.api.bean.dto.OrderMainDto
;
import
com.junmp.jyzb.api.bean.query.OrderMainReq
;
import
com.junmp.jyzb.api.bean.query.OrderUploadReq
;
import
com.junmp.jyzb.api.bean.req.UpdateOrderReq
;
import
com.junmp.jyzb.entity.OrderMain
;
import
com.junmp.v2.db.api.page.PageResult
;
...
...
@@ -13,11 +14,10 @@ public interface OrderService extends IService<OrderMain> {
String
AddOrder
(
UpdateOrderReq
req
);
String
AddFinishOrder
(
UpdateOrderReq
req
);
//更新任务单
Boolean
updateOrder
(
UpdateOrderReq
req
);
//判断任务单是否存在
OrderMain
orderMainExist
(
String
id
);
...
...
@@ -29,5 +29,11 @@ public interface OrderService extends IService<OrderMain> {
OrderDto
GetDetailById
(
OrderMainReq
req
);
//设置page的pageNo和pageSize的通用方法
public
Map
<
String
,
Long
>
getPage
(
Long
no
,
Long
size
);
Map
<
String
,
Long
>
getPage
(
Long
no
,
Long
size
);
//单据状态上报
boolean
PushState
(
OrderUploadReq
req
);
//记账
boolean
Accounting
(
OrderUploadReq
req
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/PoliceEquipmentService.java
View file @
f271023c
package
com
.
junmp
.
jyzb
.
service
;
import
com.junmp.jyzb.api.bean.req.
BorrowForm
Req
;
import
com.junmp.jyzb.api.bean.req.
FormEqs
Req
;
import
com.junmp.jyzb.entity.PoliceEquipment
;
import
com.baomidou.mybatisplus.extension.service.IService
;
...
...
@@ -11,5 +11,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
PoliceEquipmentService
extends
IService
<
PoliceEquipment
>
{
boolean
AddBorrowEqs
(
BorrowForm
Req
req
);
boolean
AddBorrowEqs
(
FormEqs
Req
req
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/PolicemanService.java
View file @
f271023c
...
...
@@ -3,10 +3,12 @@ package com.junmp.jyzb.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.junmp.jyzb.api.bean.dto.PolicemanDto
;
import
com.junmp.jyzb.api.bean.query.CabinetReq
;
import
com.junmp.jyzb.api.bean.query.PoliceReassignmentReq
;
import
com.junmp.jyzb.api.bean.query.PolicemanReq
;
import
com.junmp.jyzb.api.bean.req.UpdatePolicemanReq
;
import
com.junmp.jyzb.entity.Policeman
;
import
com.junmp.v2.db.api.page.PageResult
;
import
com.junmp.v2.sys.api.bean.user.req.UserOrgReq
;
import
java.util.List
;
...
...
@@ -36,10 +38,10 @@ public interface PolicemanService extends IService<Policeman> {
boolean
ChangePoliceState
(
UpdatePolicemanReq
req
);
//通过
组织机构id
查询警员列表(list)
//通过
条件
查询警员列表(list)
List
<
PolicemanDto
>
GetAllPolicemanList
(
PolicemanReq
req
);
//通过
组织机构id
查询警员列表(page)
//通过
条件
查询警员列表(page)
PageResult
<
PolicemanDto
>
GetAllPolicemanPage
(
PolicemanReq
req
);
//根据单警柜id查询警员列表(list)
...
...
@@ -52,7 +54,7 @@ public interface PolicemanService extends IService<Policeman> {
Policeman
SearchFaceInfo
(
PolicemanReq
req
);
//绑定用户
boolean
PoliceBindUser
(
PolicemanReq
req
);
boolean
PoliceBindBox
(
PolicemanReq
req
);
...
...
@@ -61,6 +63,9 @@ public interface PolicemanService extends IService<Policeman> {
//判断警员信息是否存在
Policeman
PoliceExist
(
String
policeId
);
//删除账号时同时对警员的信息进行更改操作
boolean
UpdatePoliceInfo
(
UserOrgReq
req
);
//警员调岗
boolean
changePoliceOrg
(
PoliceReassignmentReq
req
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/ShelfService.java
View file @
f271023c
...
...
@@ -2,8 +2,6 @@ package com.junmp.jyzb.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.junmp.jyzb.api.bean.dto.ShelfDto
;
import
com.junmp.jyzb.api.bean.dto.ShelfInsDto
;
import
com.junmp.jyzb.api.bean.dto.ShelfInventoryDto
;
import
com.junmp.jyzb.api.bean.query.ShelfReq
;
import
com.junmp.jyzb.api.bean.req.UpdateShelfReq
;
import
com.junmp.jyzb.entity.Shelf
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/SupplierService.java
View file @
f271023c
...
...
@@ -5,6 +5,7 @@ import com.junmp.jyzb.api.bean.dto.SupplierDto;
import
com.junmp.jyzb.api.bean.query.QuerySupplierReq
;
import
com.junmp.jyzb.api.bean.req.UpdateSupplierReq
;
import
com.junmp.jyzb.entity.Supplier
;
import
com.junmp.v2.db.api.page.PageResult
;
import
java.util.List
;
...
...
@@ -52,4 +53,6 @@ public interface SupplierService extends IService<Supplier> {
* @param req
*/
Boolean
ChangeSupplierState
(
UpdateSupplierReq
req
);
PageResult
<
SupplierDto
>
ShowSupplierPage
(
QuerySupplierReq
req
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetBoxServiceImpl.java
View file @
f271023c
...
...
@@ -31,19 +31,6 @@ public class CabinetBoxServiceImpl extends ServiceImpl<CabinetBoxMapper, Cabinet
private
CabinetService
cabinetService
;
/**
* @author lxh
* @description 通过cabinetId获取箱门信息列表
* @since 2023/7/18 22:20
* @param
* @return
**/
@Override
public
List
<
CabinetBox
>
getCabinetBoxList
(
CabinetReq
req
)
{
List
<
CabinetBox
>
cabinetBoxList
=
this
.
list
(
new
LambdaQueryWrapper
<
CabinetBox
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getId
()),
CabinetBox:
:
getCabinetId
,
req
.
getId
()));
return
cabinetBoxList
;
}
//添加箱门信息
@Override
...
...
@@ -63,8 +50,8 @@ public class CabinetBoxServiceImpl extends ServiceImpl<CabinetBoxMapper, Cabinet
CabinetBoxExist
(
req
.
getId
());
CabinetBox
cabinetBox
=
new
CabinetBox
();
BeanPlusUtil
.
copyProperties
(
req
,
cabinetBox
);
//添加单警柜箱门信息默认状态为
1
cabinetBox
.
setState
(
1
);
//添加单警柜箱门信息默认状态为
0正常
cabinetBox
.
setState
(
0
);
cabinetBox
.
setCabinetId
(
cabinet
.
getId
());
Integer
num
=
cabinet
.
getNum
();
if
(
num
==
null
){
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetServiceImpl.java
View file @
f271023c
...
...
@@ -2,6 +2,7 @@ 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.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.api.bean.dto.CabinetDto
;
import
com.junmp.jyzb.api.bean.dto.CabinetBoxDto
;
...
...
@@ -9,21 +10,18 @@ import com.junmp.jyzb.api.bean.query.CabinetBoxReq;
import
com.junmp.jyzb.api.bean.query.CabinetReq
;
import
com.junmp.jyzb.api.bean.req.UpdateCabinetBoxReq
;
import
com.junmp.jyzb.api.bean.req.UpdateCabinetReq
;
import
com.junmp.jyzb.entity.Cabinet
;
import
com.junmp.jyzb.entity.CabinetBox
;
import
com.junmp.jyzb.entity.Policeman
;
import
com.junmp.jyzb.entity.PubOrg
;
import
com.junmp.jyzb.entity.*
;
import
com.junmp.jyzb.api.exception.enums.CabinetExceptionEnum
;
import
com.junmp.jyzb.api.exception.enums.PolicemanExceptionEnum
;
import
com.junmp.jyzb.api.exception.enums.PubOrgExceptionEnum
;
import
com.junmp.jyzb.mapper.*
;
import
com.junmp.jyzb.service.CabinetBoxService
;
import
com.junmp.jyzb.service.CabinetService
;
import
com.junmp.jyzb.service.PolicemanService
;
import
com.junmp.jyzb.service.PubOrgService
;
import
com.junmp.jyzb.service.*
;
import
com.junmp.jyzb.utils.*
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
com.junmp.v2.db.api.factory.PageFactory
;
import
com.junmp.v2.db.api.factory.PageResultFactory
;
import
com.junmp.v2.db.api.page.PageResult
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -47,6 +45,9 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
@Resource
private
PolicemanService
policemanService
;
@Resource
private
OrderService
orderService
;
private
List
<
Long
>
getAllOrgId
(
CabinetReq
req
,
String
includeLowerLevel
)
{
List
<
Long
>
allOrg
=
new
ArrayList
<>();
...
...
@@ -96,7 +97,7 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
for
(
int
i
=
1
;
i
<=
req
.
getNum
();
i
++)
{
CabinetBox
cabinetBox
=
new
CabinetBox
();
cabinetBox
.
setCabinetId
(
cabinet
.
getId
());
cabinetBox
.
setState
(
1
);
cabinetBox
.
setState
(
0
);
cabinetBox
.
setNum
(
i
);
//添加到列表进行批量增加
objects
.
add
(
cabinetBox
);
...
...
@@ -179,6 +180,9 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
List
<
CabinetDto
>
cabinetList
=
new
ArrayList
<>();
List
<
Cabinet
>
list
=
list
(
new
LambdaQueryWrapper
<
Cabinet
>()
.
eq
(
Cabinet:
:
getOrgId
,
req
.
getOrgId
()));
if
(
list
.
size
()==
0
){
return
new
ArrayList
<>();
}
for
(
Cabinet
cabinet:
list
)
{
CabinetDto
cabinetDto
=
new
CabinetDto
();
BeanPlusUtil
.
copyProperties
(
cabinet
,
cabinetDto
);
...
...
@@ -206,6 +210,55 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
return
cabinetList
;
}
//根据组织机构id查询出单警柜的详细信息(page)
@Override
public
PageResult
<
CabinetDto
>
ShowCabinetPage
(
CabinetReq
req
)
{
//判断组织机构是否存在
PubOrg
pubOrg
=
pubOrgService
.
PubOrgExist
(
req
.
getOrgId
());
List
<
CabinetDto
>
cabinetList
=
new
ArrayList
<>();
LambdaQueryWrapper
<
Cabinet
>
eq
=
new
LambdaQueryWrapper
<
Cabinet
>()
.
eq
(
Cabinet:
:
getOrgId
,
req
.
getOrgId
())
.
like
(
ObjectUtil
.
isNotNull
(
req
.
getName
()),
Cabinet:
:
getName
,
req
.
getName
())
.
like
(
ObjectUtil
.
isNotNull
(
req
.
getCabinetNum
()),
Cabinet:
:
getCabinetNum
,
req
.
getCabinetNum
());
List
<
Cabinet
>
list
=
list
(
eq
);
long
size
=
list
.
size
();
if
(
list
.
size
()==
0
){
Page
<
CabinetDto
>
page
=
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
());
page
.
setRecords
(
cabinetList
);
page
.
setTotal
(
cabinetList
.
size
());
return
PageResultFactory
.
createPageResult
(
page
);
}
Page
<
Cabinet
>
page
=
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()),
eq
);
List
<
Cabinet
>
records
=
page
.
getRecords
();
for
(
Cabinet
cabinet:
records
)
{
CabinetDto
cabinetDto
=
new
CabinetDto
();
BeanPlusUtil
.
copyProperties
(
cabinet
,
cabinetDto
);
List
<
CabinetBox
>
list1
=
cabinetBoxService
.
list
(
new
LambdaQueryWrapper
<
CabinetBox
>()
.
eq
(
CabinetBox:
:
getCabinetId
,
cabinet
.
getId
()));
List
<
CabinetBoxDto
>
cabinetBoxList
=
new
ArrayList
<>();
for
(
CabinetBox
cabinetBox:
list1
)
{
CabinetBoxDto
cabinetBoxDto
=
new
CabinetBoxDto
();
BeanPlusUtil
.
copyProperties
(
cabinetBox
,
cabinetBoxDto
);
//查询箱门绑定的警员id和姓名
List
<
Policeman
>
policeList
=
policemanService
.
list
(
new
LambdaQueryWrapper
<
Policeman
>()
.
eq
(
Policeman:
:
getCabinetBoxId
,
cabinetBox
.
getId
()));
if
(
policeList
.
size
()!=
0
){
Policeman
policeman
=
policeList
.
get
(
0
);
cabinetBoxDto
.
setPoliceId
(
policeman
.
getId
());
cabinetBoxDto
.
setPoliceName
(
policeman
.
getName
());
}
cabinetBoxDto
.
setBoxNum
(
cabinetBox
.
getNum
());
cabinetBoxList
.
add
(
cabinetBoxDto
);
}
cabinetDto
.
setCabinetBoxList
(
cabinetBoxList
);
cabinetDto
.
setOrgName
(
pubOrg
.
getOrgName
());
cabinetList
.
add
(
cabinetDto
);
}
Page
<
CabinetDto
>
page1
=
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
());
page1
.
setRecords
(
cabinetList
);
page1
.
setTotal
(
size
);
return
PageResultFactory
.
createPageResult
(
page1
);
}
/**
* 通过单警柜id查询单个单警柜及其箱门信息
...
...
@@ -239,24 +292,34 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
* @param req
* @return
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
updateCabinetInfo
(
UpdateCabinetReq
req
)
{
//查询传入的组织机构id是否存在
pubOrgService
.
PubOrgExist
(
req
.
getOrgId
());
Cabinet
one
=
getById
(
req
.
getId
());
//查询是否有重复的单警柜编号
List
<
Cabinet
>
list
=
this
.
list
(
new
LambdaQueryWrapper
<
Cabinet
>()
.
eq
(
Cabinet:
:
getCabinetNum
,
req
.
getCabinetNum
()));
if
(
list
.
size
()>
0
)
{
//判断是否是本身,如果是则不抛出异常(根据单警柜id进行比较)
Cabinet
cabinet
=
list
.
get
(
0
);
if
(!
cabinet
.
getId
().
equals
(
req
.
getId
())){
//抛出单警柜重复异常
throw
new
ServiceException
(
CabinetExceptionEnum
.
CABINETID_IS_EXISTS
);
}
if
(
list
.
size
()>
0
&&
!
list
.
get
(
0
).
getCabinetNum
().
equals
(
one
.
getCabinetNum
()))
{
//抛出单警柜重复异常
throw
new
ServiceException
(
CabinetExceptionEnum
.
CABINETID_IS_EXISTS
);
}
Cabinet
cabinet
=
new
Cabinet
();
BeanPlusUtil
.
copyProperties
(
req
,
cabinet
);
//判断传递的箱数是否相同,如果相同则表示没有新增箱门数量,否则添加箱门信息
List
<
CabinetBox
>
cabinetBoxList
=
new
ArrayList
<>();
if
(
req
.
getNum
()
!=
one
.
getNum
()){
int
startNum
=
(
one
.
getNum
()
!=
null
)
?
one
.
getNum
()
+
1
:
0
;
for
(
int
i
=
startNum
+
1
;
i
<=
req
.
getNum
();
i
++){
CabinetBox
cabinetBox
=
new
CabinetBox
();
cabinetBox
.
setNum
(
i
);
cabinetBox
.
setCabinetId
(
req
.
getId
());
cabinetBox
.
setState
(
0
);
cabinetBoxList
.
add
(
cabinetBox
);
}
}
cabinetBoxService
.
saveBatch
(
cabinetBoxList
);
return
this
.
updateById
(
cabinet
);
}
...
...
@@ -351,4 +414,6 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
return
true
;
}
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CompanyServiceImpl.java
View file @
f271023c
...
...
@@ -79,7 +79,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
@Override
public
PageResult
<
Company
>
findPage
(
CompanyReq
req
)
{
LambdaQueryWrapper
<
Company
>
wrapper
=
createWrapper
(
req
);
Page
<
Company
>
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(),
wrapper
);
Page
<
Company
>
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()
),
wrapper
);
return
PageResultFactory
.
createPageResult
(
page
);
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentTypeServiceImpl.java
View file @
f271023c
...
...
@@ -234,12 +234,23 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
list
.
forEach
(
p
->{
EquipmentTypeDto
org
=
new
EquipmentTypeDto
();
BeanPlusUtil
.
copyProperties
(
p
,
org
);
//判断是否有下级,如果没有设置为true;
// 判断是否有子节点
boolean
hasChildren
=
hasChildren
(
p
.
getId
());
org
.
setIsLeaf
(!
hasChildren
);
orgs
.
add
(
org
);
});
return
orgs
;
}
// 判断是否有子节点的方法
private
boolean
hasChildren
(
String
parentId
)
{
LambdaQueryWrapper
<
EquipmentType
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
EquipmentType:
:
getParentId
,
parentId
);
Long
count
=
this
.
count
(
wrapper
);
return
count
>
0
;
}
@Override
public
ResponseResult
setTypeParentIds
()
{
//清空parent_ids字段
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/InventoryServiceImpl.java
View file @
f271023c
差异被折叠。
点击展开。
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/InventorySummaryServiceImpl.java
View file @
f271023c
...
...
@@ -6,7 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.api.bean.query.InventorySumReq
;
import
com.junmp.jyzb.api.exception.enums.CabinetExceptionEnum
;
import
com.junmp.jyzb.entity.Inventory
;
import
com.junmp.jyzb.entity.InventorySummary
;
import
com.junmp.jyzb.service.InventoryService
;
import
com.junmp.jyzb.service.InventorySummaryService
;
import
com.junmp.jyzb.service.OrderService
;
import
com.junmp.jyzb.service.PubOrgService
;
...
...
@@ -18,8 +20,10 @@ import org.springframework.stereotype.Service;
import
com.junmp.jyzb.mapper.InventorySummaryMapper
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Service
public
class
InventorySummaryServiceImpl
extends
ServiceImpl
<
InventorySummaryMapper
,
InventorySummary
>
implements
InventorySummaryService
{
...
...
@@ -30,6 +34,9 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
@Resource
private
OrderService
orderService
;
@Resource
private
InventoryService
inventoryService
;
//根据条件查询库存汇总信息
@Override
public
PageResult
<
InventorySummary
>
getEquipmentInfo
(
InventorySumReq
req
)
{
...
...
@@ -38,23 +45,23 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
if
(
ObjectUtil
.
isNotNull
(
req
.
getOrgId
())){
pubOrgService
.
PubOrgExist
(
req
.
getOrgId
());
}
//如果传递了参数则判断是否存在,不存在则表示传递的参数一定不正确
if
(
ObjectUtil
.
isNotNull
(
req
.
getLocationId
())){
List
<
InventorySummary
>
list
=
list
(
new
LambdaQueryWrapper
<
InventorySummary
>().
eq
(
InventorySummary:
:
getLocationId
,
req
.
getLocationId
()));
//表示该单警柜或者仓库没有装备,那么直接返回一个空对象,设置一些简单的参数
if
(
list
.
size
()==
0
){
Map
<
String
,
Long
>
map
=
orderService
.
getPage
(
req
.
getPageNo
(),
req
.
getPageSize
());
Page
<
InventorySummary
>
page
=
new
Page
<>(
map
.
get
(
"pageNo"
),
map
.
get
(
"pageSize"
)
);
InventorySummary
inventorySummary
=
new
InventorySummary
();
list
.
add
(
inventorySummary
);
page
.
setRecords
(
list
);
return
PageResultFactory
.
createPageResult
(
page
);
}
}
LambdaQueryWrapper
<
InventorySummary
>
wp
=
createWrapper
(
req
);
//取出仓库中总数并计算
Page
<
InventorySummary
>
sumList
=
this
.
page
(
PageFactory
.
getDefaultPage
(),
wp
);
return
PageResultFactory
.
createPageResult
(
sumList
);
long
size
=
list
(
wp
).
size
();
Page
<
InventorySummary
>
sumList
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()),
wp
);
List
<
InventorySummary
>
records
=
sumList
.
getRecords
();
List
<
InventorySummary
>
collect
=
records
.
stream
().
map
(
data
->
{
Inventory
inventory
=
inventoryService
.
list
(
new
LambdaQueryWrapper
<
Inventory
>()
.
eq
(
Inventory:
:
getOrgId
,
data
.
getOrgId
())
.
eq
(
Inventory:
:
getSizeId
,
data
.
getSizeId
())
.
eq
(
Inventory:
:
getTypeId
,
data
.
getTypeId
())).
get
(
0
);
data
.
setWarrantyPeriod
(
inventory
.
getWarrantyPeriod
());
data
.
setMaintenancePeriod
(
inventory
.
getMaintenancePeriod
());
return
data
;
}).
collect
(
Collectors
.
toList
());
Page
<
InventorySummary
>
page1
=
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
());
page1
.
setRecords
(
collect
);
page1
.
setTotal
(
size
);
return
PageResultFactory
.
createPageResult
(
page1
);
}
private
LambdaQueryWrapper
<
InventorySummary
>
createWrapper
(
InventorySumReq
req
)
{
LambdaQueryWrapper
<
InventorySummary
>
wrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -77,7 +84,8 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getSizeName
()),
InventorySummary:
:
getSizeName
,
req
.
getSizeName
());
//号型
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getSizeId
()),
InventorySummary:
:
getSizeId
,
req
.
getSizeId
());
wrapper
.
orderByDesc
(
InventorySummary:
:
getUpdateTime
);
wrapper
.
orderByDesc
(
InventorySummary:
:
getTypeId
);
wrapper
.
orderByDesc
(
InventorySummary:
:
getSizeId
);
return
wrapper
;
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/OrderServiceImpl.java
View file @
f271023c
...
...
@@ -9,6 +9,7 @@ import com.junmp.jyzb.api.bean.dto.OrderDetailDto;
import
com.junmp.jyzb.api.bean.dto.OrderDto
;
import
com.junmp.jyzb.api.bean.dto.OrderMainDto
;
import
com.junmp.jyzb.api.bean.query.OrderMainReq
;
import
com.junmp.jyzb.api.bean.query.OrderUploadReq
;
import
com.junmp.jyzb.api.bean.query.PolicemanFingerReq
;
import
com.junmp.jyzb.api.bean.req.DetailListReq
;
import
com.junmp.jyzb.api.bean.req.UpdateOrderReq
;
...
...
@@ -57,6 +58,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain> i
//新增任务单
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
String
AddOrder
(
UpdateOrderReq
req
)
{
...
...
@@ -130,6 +132,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain> i
}
//新增默认审核通过的任务单
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
String
AddFinishOrder
(
UpdateOrderReq
req
)
{
...
...
@@ -143,8 +146,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain> i
// rabbitTemplate.convertAndSend("OrderExchange","OrderRouting",new MessageWrapper(req,req.getEndOrgId()));
// }
//方法2:一个交换机,多个队列。动态创建队列
String
exchangeName
=
"
123456
"
;
//需要判断是入库单还是出库单,入库单传
发物单位id,出库单传收
物单位id
String
exchangeName
=
"
orderExchange
"
;
//需要判断是入库单还是出库单,入库单传
收物单位id,出库单传发
物单位id
if
(
req
.
getOrderType
().
equals
(
"in"
)){
Queue
queue
=
new
Queue
(
req
.
getEndOrgId
(),
true
,
false
,
false
);
Exchange
exchange
=
new
DirectExchange
(
exchangeName
,
true
,
false
);
...
...
@@ -154,18 +157,18 @@ public class OrderServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain> i
rabbitTemplate
.
convertAndSend
(
exchangeName
,
req
.
getEndOrgId
(),
req
);
}
else
{
Queue
queue
=
new
Queue
(
req
.
getStartOrgId
(),
true
,
false
,
false
);
Queue
queue
=
new
Queue
(
req
.
getStartOrgId
(),
true
,
false
,
false
);
Exchange
exchange
=
new
DirectExchange
(
exchangeName
,
true
,
false
);
rabbitAdmin
.
declareQueue
(
queue
);
rabbitAdmin
.
declareExchange
(
exchange
);
rabbitAdmin
.
declareBinding
(
BindingBuilder
.
bind
(
queue
).
to
(
exchange
).
with
(
req
.
getStartOrgId
()).
noargs
());
rabbitTemplate
.
convertAndSend
(
exchangeName
,
req
.
getStartOrgId
(),
req
);
}
return
orderId
;
}
//更新任务单(进入工作流中之后不能进行更改)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
Boolean
updateOrder
(
UpdateOrderReq
req
)
{
...
...
@@ -259,17 +262,17 @@ public class OrderServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain> i
if
(
req
.
getOrderType
()
!=
null
&&
req
.
getOrderType
().
equals
(
"in"
)){
//入库单
LambdaQueryWrapper
<
OrderMain
>
eq
=
wrapper
.
eq
(
OrderMain:
:
getOrderType
,
req
.
getOrderType
())
.
eq
(
OrderMain:
:
getEndOrgId
,
req
.
getOrgId
());
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(),
eq
);
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()
),
eq
);
}
else
if
(
req
.
getOrderType
()
!=
null
&&
req
.
getOrderType
().
equals
(
"out"
))
{
//出库单
LambdaQueryWrapper
<
OrderMain
>
eq
=
wrapper
.
eq
(
OrderMain:
:
getOrderType
,
req
.
getOrderType
()).
eq
(
OrderMain:
:
getStartOrgId
,
req
.
getOrgId
());
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(),
eq
);
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()
),
eq
);
}
else
{
//查询全部
Page
<
OrderMain
>
page1
=
new
Page
<>();
Page
<
OrderMain
>
page2
=
new
Page
<>();
LambdaQueryWrapper
<
OrderMain
>
eq1
=
wrapper
.
eq
(
OrderMain:
:
getEndOrgId
,
req
.
getOrgId
());
page1
=
this
.
page
(
PageFactory
.
getDefaultPage
(),
eq1
);
page1
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()
),
eq1
);
LambdaQueryWrapper
<
OrderMain
>
eq2
=
wrapper
.
eq
(
OrderMain:
:
getStartOrgId
,
req
.
getOrgId
());
page2
=
this
.
page
(
PageFactory
.
getDefaultPage
(),
eq2
);
page2
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()
),
eq2
);
List
<
OrderMain
>
list
=
new
ArrayList
<>();
list
.
addAll
(
page1
.
getRecords
());
list
.
addAll
(
page2
.
getRecords
());
...
...
@@ -284,12 +287,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain> i
orderMainDtoList
.
add
(
orderMainDto
);
}
}
//设置pageSize,pageNo,count,list
Map
<
String
,
Long
>
map
=
getPage
(
req
.
getPageNo
(),
req
.
getPageSize
());
Long
pageNo
=
map
.
get
(
"pageNo"
);
Long
pageSize
=
map
.
get
(
"pageSize"
);
long
count
=
orderMainDtoList
.
size
();
return
PageResultFactory
.
createPageResult
(
orderMainDtoList
,
count
,
pageSize
,
pageNo
);
Page
<
OrderMainDto
>
page1
=
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
());
page1
.
setTotal
(
orderMainDtoList
.
size
());
page1
.
setRecords
(
orderMainDtoList
);
return
PageResultFactory
.
createPageResult
(
page1
);
}
//根据任务单id查看业务明细
...
...
@@ -313,6 +314,69 @@ public class OrderServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain> i
return
orderDto
;
}
//单据状态上报
@Override
public
boolean
PushState
(
OrderUploadReq
req
)
{
OrderMain
orderMain
=
orderMainExist
(
req
.
getId
());
//获取单据的出入库,获取发物单位id或者收物单位id
String
orderType
=
orderMain
.
getOrderType
();
String
exchangeName
=
"OrderStateExchange"
;
//推送到rabbitmq中去
if
(
orderType
.
equals
(
"in"
)){
Long
endOrgId
=
orderMain
.
getEndOrgId
();
Queue
queue
=
new
Queue
(
Long
.
toString
(
endOrgId
),
true
,
false
,
false
);
Exchange
exchange
=
new
DirectExchange
(
exchangeName
,
true
,
false
);
rabbitAdmin
.
declareQueue
(
queue
);
rabbitAdmin
.
declareExchange
(
exchange
);
rabbitAdmin
.
declareBinding
(
BindingBuilder
.
bind
(
queue
).
to
(
exchange
).
with
(
Long
.
toString
(
endOrgId
)).
noargs
());
rabbitTemplate
.
convertAndSend
(
exchangeName
,
Long
.
toString
(
endOrgId
),
req
);
}
else
{
Long
startOrgId
=
orderMain
.
getStartOrgId
();
Queue
queue
=
new
Queue
(
Long
.
toString
(
startOrgId
),
true
,
false
,
false
);
Exchange
exchange
=
new
DirectExchange
(
exchangeName
,
true
,
false
);
rabbitAdmin
.
declareQueue
(
queue
);
rabbitAdmin
.
declareExchange
(
exchange
);
rabbitAdmin
.
declareBinding
(
BindingBuilder
.
bind
(
queue
).
to
(
exchange
).
with
(
Long
.
toString
(
startOrgId
)).
noargs
());
rabbitTemplate
.
convertAndSend
(
exchangeName
,
Long
.
toString
(
startOrgId
),
req
);
}
return
true
;
}
//记账
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
Accounting
(
OrderUploadReq
req
)
{
//判断传递的订单主id是否存在
OrderMain
orderMain
=
orderMainExist
(
req
.
getId
());
List
<
OrderUploadReq
.
OrderUploadDetailReq
>
childrenOrder
=
req
.
getChildrenOrder
();
orderMain
.
setPrice
(
req
.
getPrice
());
orderMain
.
setActualQuantity
(
req
.
getActualQuantity
());
//设置子单据的价格和实际数量
List
<
OrderDetail
>
list
=
orderDetailService
.
list
(
new
LambdaQueryWrapper
<
OrderDetail
>()
.
in
(
OrderDetail:
:
getId
,
childrenOrder
));
if
(
list
.
size
()==
0
){
throw
new
ServiceException
(
CabinetExceptionEnum
.
PARAMETER_ERROR
);
}
//通过totalMap存放需要修改的子单据,根据id作为key存放。
Map
<
Long
,
Map
<
String
,
Object
>>
totalMap
=
new
HashMap
<>();
for
(
OrderUploadReq
.
OrderUploadDetailReq
detailReq:
childrenOrder
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"actualNum"
,
detailReq
.
getActualNum
());
map
.
put
(
"price"
,
detailReq
.
getPrice
());
totalMap
.
put
(
detailReq
.
getDetailId
(),
map
);
}
//遍历通过传递的子单据id查询出来的子单据信息并且进行修改
for
(
OrderDetail
orderDetail:
list
)
{
Map
<
String
,
Object
>
map
=
totalMap
.
get
(
orderDetail
.
getId
());
orderDetail
.
setActualNum
((
Integer
)
map
.
get
(
"actualNum"
));
orderDetail
.
setPrice
((
BigDecimal
)
map
.
get
(
"price"
));
}
orderDetailService
.
updateBatchById
(
list
);
updateById
(
orderMain
);
return
true
;
}
//判断任务单是否存在
@Override
...
...
@@ -344,6 +408,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain> i
return
map
;
}
private
LambdaQueryWrapper
<
OrderMain
>
createWrapper
(
OrderMainReq
req
)
{
LambdaQueryWrapper
<
OrderMain
>
wrapper
=
new
LambdaQueryWrapper
<>();
if
(
ObjectUtil
.
isEmpty
(
req
))
{
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PoliceEquipmentServiceImpl.java
View file @
f271023c
package
com
.
junmp
.
jyzb
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.api.bean.req.
BorrowForm
Req
;
import
com.junmp.jyzb.api.bean.req.
FormEqs
Req
;
import
com.junmp.jyzb.entity.PoliceEquipment
;
import
com.junmp.jyzb.entity.Policeman
;
import
com.junmp.jyzb.service.PoliceEquipmentService
;
import
com.junmp.jyzb.mapper.PoliceEquipmentMapper
;
import
com.junmp.jyzb.service.PolicemanService
;
...
...
@@ -29,7 +28,7 @@ public class PoliceEquipmentServiceImpl extends ServiceImpl<PoliceEquipmentMappe
* @return
*/
@Override
public
boolean
AddBorrowEqs
(
BorrowForm
Req
req
)
{
public
boolean
AddBorrowEqs
(
FormEqs
Req
req
)
{
PoliceEquipment
policeEquipment
=
new
PoliceEquipment
();
//判断警员是否存在
policemanService
.
PoliceExist
(
req
.
getPoliceId
());
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PoliceFingerServiceImpl.java
View file @
f271023c
...
...
@@ -85,7 +85,7 @@ public class PoliceFingerServiceImpl extends ServiceImpl<PoliceFingerMapper, Pol
@Override
public
PageResult
<
PoliceFinger
>
findPage
(
PolicemanFingerReq
req
)
{
LambdaQueryWrapper
<
PoliceFinger
>
wrapper
=
createWrapper
(
req
);
Page
<
PoliceFinger
>
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(),
wrapper
);
Page
<
PoliceFinger
>
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()
),
wrapper
);
return
PageResultFactory
.
createPageResult
(
page
);
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
View file @
f271023c
差异被折叠。
点击展开。
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/ProductServiceImpl.java
View file @
f271023c
...
...
@@ -83,7 +83,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
public
PageResult
<
Product
>
findPage
(
ProductReq
req
)
{
LambdaQueryWrapper
<
Product
>
wrapper
=
createWrapper
(
req
);
Page
<
Product
>
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(),
wrapper
);
Page
<
Product
>
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()
),
wrapper
);
return
PageResultFactory
.
createPageResult
(
page
);
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/ProductSkuServiceImpl.java
View file @
f271023c
...
...
@@ -96,7 +96,7 @@ public class ProductSkuServiceImpl extends ServiceImpl<ProductSkuMapper, Product
@Override
public
PageResult
<
ProductSku
>
findPage
(
ProductSkuReq
req
)
{
LambdaQueryWrapper
<
ProductSku
>
wrapper
=
createWrapper
(
req
);
Page
<
ProductSku
>
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(),
wrapper
);
Page
<
ProductSku
>
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()
),
wrapper
);
return
PageResultFactory
.
createPageResult
(
page
);
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/ProductTagServiceImpl.java
View file @
f271023c
...
...
@@ -124,7 +124,7 @@ public class ProductTagServiceImpl extends ServiceImpl<ProductTagMapper, Product
@Override
public
PageResult
<
ProductTag
>
findPage
(
ProductTagReq
req
)
{
LambdaQueryWrapper
<
ProductTag
>
wrapper
=
createWrapper
(
req
);
Page
<
ProductTag
>
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(),
wrapper
);
Page
<
ProductTag
>
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()
),
wrapper
);
return
PageResultFactory
.
createPageResult
(
page
);
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PubOrgServiceImpl.java
View file @
f271023c
...
...
@@ -235,7 +235,7 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
List
<
PubOrg
>
st
=
list
(
wp
);
st
.
forEach
(
p
->
{
p
.
set
DelFlag
(
req
.
getDel
Flag
());
p
.
set
StatusFlag
(
req
.
getStatus
Flag
());
});
return
this
.
updateBatchById
(
st
);
...
...
@@ -278,17 +278,18 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
req
.
setDelFlag
(
1
);
// req.setDelFlag(1);
LambdaQueryWrapper
<
PubOrg
>
wp
=
this
.
createWrapper
(
req
);
LambdaQueryWrapper
<
PubOrg
>
one
=
this
.
createWrapper
(
req
);
//
LambdaQueryWrapper<PubOrg> one = this.createWrapper(req);
List
<
PubOrg
>
list
=
this
.
list
(
wp
);
OrgDto
orgSet
=
new
OrgDto
();
PubOrg
OrgOne
=
this
.
getById
(
req
.
getOrgId
());
BeanPlusUtil
.
copyProperties
(
OrgOne
,
orgSet
);
orgSet
.
setIsLeaf
(
true
);
// Convert PubOrg list to OrgDto list
List
<
OrgDto
>
orgs
=
new
ArrayList
<>();
list
.
forEach
(
p
->
{
OrgDto
org
=
new
OrgDto
();
BeanPlusUtil
.
copyProperties
(
p
,
org
);
org
.
setIsLeaf
(
false
);
orgs
.
add
(
org
);
});
return
getMaximumParent
(
orgs
,
orgSet
);
...
...
@@ -303,6 +304,10 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
dept
=
org
;
}
else
{
List
<
OrgDto
>
parent
=
orgs
.
stream
().
filter
(
item
->
item
.
getOrgId
().
toString
().
equals
(
parentId
)).
collect
(
Collectors
.
toList
());
//如果parent为空的话直接抛出异常(传入的组织机构不存在或者已经被删除)
if
(
parent
.
size
()==
0
){
throw
new
ServiceException
(
PubOrgExceptionEnum
.
PUBORG_NOTEXIST_OR_DEL
);
}
OrgDto
maximumParent
=
getMaximumParent
(
orgs
,
parent
.
get
(
0
));
dept
=
maximumParent
;
parent
.
get
(
0
).
addChild
(
org
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/SupplierServiceImpl.java
View file @
f271023c
...
...
@@ -2,6 +2,7 @@ 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.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.api.bean.dto.SupplierDto
;
import
com.junmp.jyzb.api.bean.query.QuerySupplierReq
;
...
...
@@ -10,9 +11,13 @@ import com.junmp.jyzb.api.exception.JYZBAppException;
import
com.junmp.jyzb.api.exception.enums.EquipmentTypeExceptionEnum
;
import
com.junmp.jyzb.api.exception.enums.SupplierExceptionEnum
;
import
com.junmp.jyzb.entity.Supplier
;
import
com.junmp.jyzb.service.OrderService
;
import
com.junmp.jyzb.service.SupplierService
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
com.junmp.v2.db.api.factory.PageFactory
;
import
com.junmp.v2.db.api.factory.PageResultFactory
;
import
com.junmp.v2.db.api.page.PageResult
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
com.junmp.jyzb.mapper.SupplierMapper
;
...
...
@@ -23,6 +28,8 @@ import java.util.*;
public
class
SupplierServiceImpl
extends
ServiceImpl
<
SupplierMapper
,
Supplier
>
implements
SupplierService
{
@Resource
OrderService
orderService
;
@Override
public
String
AddSupplier
(
UpdateSupplierReq
req
)
{
...
...
@@ -101,6 +108,26 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
return
dto
;
}
//分页
@Override
public
PageResult
<
SupplierDto
>
ShowSupplierPage
(
QuerySupplierReq
req
)
{
LambdaQueryWrapper
<
Supplier
>
wrapper
=
createWrapper
(
req
);
long
size
=
list
(
wrapper
).
size
();
Page
<
Supplier
>
page
=
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()),
wrapper
);
List
<
Supplier
>
records
=
page
.
getRecords
();
List
<
SupplierDto
>
dto
=
new
ArrayList
<>();
records
.
forEach
(
p
->
{
SupplierDto
sd
=
new
SupplierDto
();
BeanPlusUtil
.
copyProperties
(
p
,
sd
);
dto
.
add
(
sd
);
});
Page
<
SupplierDto
>
page1
=
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
());
page1
.
setRecords
(
dto
);
page1
.
setTotal
(
size
);
return
PageResultFactory
.
createPageResult
(
page1
);
}
@Override
public
Boolean
ChangeSupplierState
(
UpdateSupplierReq
req
)
{
Supplier
supplier
=
this
.
QuerySupplier
(
req
);
...
...
@@ -108,6 +135,8 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
return
this
.
updateById
(
supplier
);
}
private
LambdaQueryWrapper
<
Supplier
>
createWrapper
(
QuerySupplierReq
req
)
{
LambdaQueryWrapper
<
Supplier
>
wrapper
=
new
LambdaQueryWrapper
<>();
if
(
ObjectUtil
.
isEmpty
(
req
))
{
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/TriggerServiceImpl.java
View file @
f271023c
...
...
@@ -78,7 +78,7 @@ public class TriggerServiceImpl extends ServiceImpl<TriggerMapper, Trigger> impl
public
PageResult
<
Trigger
>
getTriggerList
(
QueryTriggerReq
req
)
{
LambdaQueryWrapper
<
Trigger
>
wrapper
=
createWrapper
(
req
);
Page
<
Trigger
>
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(),
wrapper
);
Page
<
Trigger
>
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()
),
wrapper
);
return
PageResultFactory
.
createPageResult
(
page
);
}
private
LambdaQueryWrapper
<
Trigger
>
createWrapper
(
QueryTriggerReq
req
)
{
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/task/InvExpireMsg.java
View file @
f271023c
package
com
.
junmp
.
jyzb
.
task
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
...
@@ -7,18 +8,25 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.junmp.jyzb.api.util.GenCodeUtil
;
import
com.junmp.jyzb.entity.Company
;
import
com.junmp.jyzb.entity.Inventory
;
import
com.junmp.jyzb.entity.InventorySummary
;
import
com.junmp.jyzb.entity.ProductSku
;
import
com.junmp.jyzb.mapper.ExpireMapper
;
import
com.junmp.jyzb.mapper.MsgMapper
;
import
com.junmp.jyzb.service.InventoryService
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
com.junmp.v2.db.api.factory.PageFactory
;
import
com.junmp.v2.dict.entity.SysDictItem
;
import
com.junmp.v2.dict.service.SysDictItemService
;
import
com.junmp.v2.job.api.JobAction
;
import
com.junmp.v2.message.api.MessageApi
;
import
com.junmp.v2.message.api.bean.req.MessageReq
;
import
com.junmp.v2.message.api.bean.req.MessageSendReq
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.time.LocalDate
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -40,6 +48,12 @@ public class InvExpireMsg implements JobAction {
@Resource
private
InventoryService
inventoryService
;
@Resource
private
MessageApi
messageApi
;
@Resource
private
SysDictItemService
sysDictItemService
;
@Override
public
void
action
()
{
LambdaQueryWrapper
<
Inventory
>
wrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -49,34 +63,60 @@ public class InvExpireMsg implements JobAction {
//所有待判断的物资
wrapper
.
eq
(
Inventory:
:
getTermState
,
0
);
//获取未超期的物资数量
long
termCount
=
inventoryService
.
count
(
wrapper
);
if
(
termCount
>
0
)
{
List
<
Inventory
>
list
=
new
ArrayList
<>();
if
(
termCount
>
0
)
{
// 分页查询
while
((
currentPage
-
1
)
*
pageSize
<
termCount
)
{
processPageData
(
currentPage
,
pageSize
);
List
<
Inventory
>
inventoryList
=
processPageData
(
currentPage
,
pageSize
);
currentPage
++;
list
.
addAll
(
inventoryList
);
}
}
//超期物资查询出来之后,将超期物资进行消息推送提醒
//直接对list进行处理操作推送消息即可
for
(
Inventory
inventory:
list
)
{
MessageSendReq
sendReq
=
new
MessageSendReq
();
sendReq
.
setSendUserId
(
"1000"
);
sendReq
.
setReceiveUserIds
(
"1000"
);
sendReq
.
setMsgTitle
(
"物资过质保期"
);
//设置业务类型
SysDictItem
one
=
sysDictItemService
.
getOne
(
new
LambdaQueryWrapper
<
SysDictItem
>()
.
eq
(
SysDictItem:
:
getDictItemId
,
"1698969778501099522"
));
sendReq
.
setBizType
(
one
.
getItemValue
());
sendReq
.
setMsgContent
(
"仓库下的装备的物资已经过质保期"
);
sendReq
.
setPriority
(
"0"
);
sendReq
.
setSendTime
(
DateTime
.
now
());
messageApi
.
sendMessage
(
sendReq
);
}
messageApi
.
queryCount
(
new
MessageReq
());
/*推送发送未读数量*/
List
<
Long
>
userIdList
=
new
ArrayList
<>();
userIdList
.
add
(
1000L
);
for
(
Long
userId
:
userIdList
){
MessageReq
req1
=
new
MessageReq
();
req1
.
setReadFlag
(
0
);
req1
.
setReceiveUserId
(
userId
);
Integer
count1
=
messageApi
.
queryCount
(
req1
);
messageApi
.
pushMsgToUser
(
String
.
valueOf
(
userId
),
count1
);
}
}
// 处理每页数据
private
void
processPageData
(
long
pageSize
,
long
currentPage
)
private
List
<
Inventory
>
processPageData
(
long
pageSize
,
long
currentPage
)
{
LocalDate
localdate
=
LocalDate
.
now
();
// 使用LambdaQueryWrapper构建查询条件
LambdaQueryWrapper
<
Inventory
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
eq
(
Inventory:
:
getTermState
,
0
);
//如果 生产日期 < 当前日期减去质保数,表示该装备已经超过质保期
wrapper
.
apply
(
"production_date <= DATE_SUB({0}, INTERVAL warranty_period DAY)"
,
localdate
);
//获取过质保期的物资信息
List
<
Inventory
>
page
=
inventoryService
.
page
(
PageFactory
.
getDefaultPage
(
pageSize
,
currentPage
),
wrapper
).
getRecords
();
page
.
forEach
(
o
->
o
.
setTermState
(
1
));
inventoryService
.
saveOrUpdateBatch
(
page
);
return
page
;
// Page<Inventory> page = inventoryService.page(PageFactory.getDefaultPage(), wrapper)
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/task/InvOverDueMsg.java
0 → 100644
View file @
f271023c
package
com
.
junmp
.
jyzb
.
task
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.junmp.jyzb.entity.InventorySummary
;
import
com.junmp.jyzb.entity.OrderMain
;
import
com.junmp.jyzb.service.InventoryService
;
import
com.junmp.jyzb.service.OrderService
;
import
com.junmp.v2.job.api.JobAction
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author lxh
* @description 超期未归还消息提醒
* @since 2023/9/1 10:50
* @param
* @return
**/
@Slf4j
@Component
public
class
InvOverDueMsg
implements
JobAction
{
@Resource
private
OrderService
orderService
;
@Override
public
void
action
()
{
//获取超期物资
//先查询出 出入库单据为借用单的数据
LambdaQueryWrapper
<
OrderMain
>
wrapper
=
new
LambdaQueryWrapper
<
OrderMain
>()
.
eq
(
OrderMain:
:
getBussinessType
,
"borrow"
);
int
pageSize
=
1000
;
int
currentPage
=
1
;
long
termCount
=
orderService
.
count
(
wrapper
);
List
<
OrderMain
>
list
=
new
ArrayList
<>();
if
(
termCount
>
0
)
{
// 分页查询
while
((
currentPage
-
1
)
*
pageSize
<
termCount
)
{
List
<
OrderMain
>
orderMainList
=
processPageData
(
currentPage
,
pageSize
);
currentPage
++;
list
.
addAll
(
orderMainList
);
}
}
}
// 处理每页数据
private
List
<
OrderMain
>
processPageData
(
long
pageSize
,
long
currentPage
)
{
return
null
;
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/task/InvThresholdMsg.java
0 → 100644
View file @
f271023c
package
com
.
junmp
.
jyzb
.
task
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.junmp.jyzb.entity.EquipmentType
;
import
com.junmp.jyzb.entity.InventorySummary
;
import
com.junmp.jyzb.service.EquipmentTypeService
;
import
com.junmp.jyzb.service.InventorySummaryService
;
import
com.junmp.v2.db.api.factory.PageFactory
;
import
com.junmp.v2.dict.entity.SysDictItem
;
import
com.junmp.v2.dict.service.SysDictItemService
;
import
com.junmp.v2.job.api.JobAction
;
import
com.junmp.v2.message.api.MessageApi
;
import
com.junmp.v2.message.api.bean.req.MessageReq
;
import
com.junmp.v2.message.api.bean.req.MessageSendReq
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author lxh
* @description 物资低于阈值消息提醒
* @since 2023/9/1 11:05
* @param
* @return
**/
@Slf4j
@Component
public
class
InvThresholdMsg
implements
JobAction
{
@Resource
private
InventorySummaryService
inventorySummaryService
;
@Resource
private
EquipmentTypeService
equipmentTypeService
;
@Resource
private
MessageApi
messageApi
;
@Resource
private
SysDictItemService
sysDictItemService
;
@Override
public
void
action
()
{
//获取装备信息汇总,并且判断装备的汇总数量是否低于装备阈值,如果低于装备阈值,则进行消息提醒
//所有待判断的物资
LambdaQueryWrapper
<
InventorySummary
>
wrapper
=
new
LambdaQueryWrapper
<
InventorySummary
>()
.
eq
(
InventorySummary:
:
getLocationType
,
0
)
.
groupBy
(
InventorySummary:
:
getOrgId
);
//分页参数
int
pageSize
=
1000
;
int
currentPage
=
1
;
//获取装备的所有库存数量
long
termCount
=
inventorySummaryService
.
count
(
wrapper
);
List
<
InventorySummary
>
list
=
new
ArrayList
<>();
if
(
termCount
>
0
)
{
// 分页查询
while
((
currentPage
-
1
)
*
pageSize
<
termCount
)
{
List
<
InventorySummary
>
inventorySummaryList
=
processPageData
(
currentPage
,
pageSize
);
currentPage
++;
list
.
addAll
(
inventorySummaryList
);
}
}
//低于阈值的数据查询出来之后,将数据进行消息推送提醒
//直接对list进行处理操作推送消息即可
for
(
InventorySummary
inventorySummary:
list
)
{
MessageSendReq
sendReq
=
new
MessageSendReq
();
sendReq
.
setSendUserId
(
"1000"
);
sendReq
.
setReceiveUserIds
(
"1000"
);
sendReq
.
setMsgTitle
(
"物资低于阈值"
);
//设置业务类型
SysDictItem
one
=
sysDictItemService
.
getOne
(
new
LambdaQueryWrapper
<
SysDictItem
>()
.
eq
(
SysDictItem:
:
getDictItemId
,
"1698969902300176385"
));
sendReq
.
setBizType
(
one
.
getItemValue
());
sendReq
.
setMsgContent
(
inventorySummary
.
getLocationName
()+
"仓库下的"
+
inventorySummary
.
getTypeName
()+
"号型为"
+
inventorySummary
.
getSizeName
()+
"的物资低于阈值"
);
sendReq
.
setPriority
(
"0"
);
sendReq
.
setSendTime
(
DateTime
.
now
());
messageApi
.
sendMessage
(
sendReq
);
}
messageApi
.
queryCount
(
new
MessageReq
());
/*推送发送未读数量*/
List
<
Long
>
userIdList
=
new
ArrayList
<>();
userIdList
.
add
(
1000L
);
for
(
Long
userId
:
userIdList
){
MessageReq
req1
=
new
MessageReq
();
req1
.
setReadFlag
(
0
);
req1
.
setReceiveUserId
(
userId
);
Integer
count1
=
messageApi
.
queryCount
(
req1
);
messageApi
.
pushMsgToUser
(
String
.
valueOf
(
userId
),
count1
);
}
}
// 处理每页数据
private
List
<
InventorySummary
>
processPageData
(
long
pageSize
,
long
currentPage
)
{
//得到全局默认值(随机处理数据表中的一条数据为默认值)
Integer
threshold
=
equipmentTypeService
.
getById
(
100001
).
getThreshold
();
//查询inventory_summary表中的threshold字段是否存在值,
// 如果存在则用summary表中的字段进行比较物资阈值,如果不存在则默认使用全局物资阈值进行比较
Page
<
InventorySummary
>
page
=
inventorySummaryService
.
page
(
PageFactory
.
getDefaultPage
(
pageSize
,
currentPage
));
List
<
InventorySummary
>
records
=
page
.
getRecords
();
//使用自定义物资阈值进行比较
List
<
InventorySummary
>
collect1
=
records
.
stream
()
.
filter
(
data
->
data
.
getNumber
()
<=
data
.
getThreshold
()
&&
ObjectUtil
.
isNotNull
(
data
.
getThreshold
()))
.
collect
(
Collectors
.
toList
());
//使用全局物资阈值进行比较
List
<
InventorySummary
>
collect2
=
records
.
stream
()
.
filter
(
data
->
data
.
getNumber
()
<=
threshold
&&
ObjectUtil
.
isNull
(
data
.
getThreshold
()))
.
collect
(
Collectors
.
toList
());
//将数据存储到一个list中
List
<
InventorySummary
>
inventorySummaryList
=
new
ArrayList
<>();
inventorySummaryList
.
addAll
(
collect1
);
inventorySummaryList
.
addAll
(
collect2
);
return
inventorySummaryList
;
}
}
jyzb-biz/src/main/resources/mapper/InventorySummaryMapper.xml
View file @
f271023c
...
...
@@ -24,11 +24,14 @@
<result
column=
"expire_number"
jdbcType=
"INTEGER"
property=
"expireNumber"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"threshold"
jdbcType=
"INTEGER"
property=
"threshold"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, org_id, org_name, type_id, type_name, size_id, size_name, location_type, location_id,
location_name, location_area_id, location_area, `number`, price, stock_number, outbound_number,
destruction_number, expire_number, create_time, update_time
destruction_number, expire_number, create_time, update_time
,threshold
</sql>
</mapper>
\ No newline at end of file
jyzb-biz/src/main/resources/mapper/PolicemanMapper.xml
View file @
f271023c
...
...
@@ -157,5 +157,21 @@ WHERE o.org_id IN
LEFT JOIN base_cabinet b ON b.id=bc.cabinet_id
WHERE b.id=#{id}) and p.state=1
</select>
<select
id=
"SearchPolicePage"
resultType=
"com.junmp.jyzb.entity.Policeman"
>
select p.id,p.org_id_int,p.`name`,p.sex,p.phone,p.photo,p.police_code,p.cabinet_box_id,p.`password`,p.face_info from base_policeman p
left join base_Cabinet_box bc on p.cabinet_box_id = bc.id
where p.cabinet_box_id in
(SELECT bc.id as boxid FROM base_cabinet_box bc
LEFT JOIN base_cabinet b ON b.id=bc.cabinet_id
WHERE b.id=#{id}) and p.state=1
</select>
<select
id=
"SearchPoliceSize"
resultType=
"java.lang.Long"
>
select count(*) from base_policeman p
left join base_Cabinet_box bc on p.cabinet_box_id = bc.id
where p.cabinet_box_id in
(SELECT bc.id as boxid FROM base_cabinet_box bc
LEFT JOIN base_cabinet b ON b.id=bc.cabinet_id
WHERE b.id=#{id}) and p.state=1
</select>
</mapper>
\ No newline at end of file
pom.xml
View file @
f271023c
...
...
@@ -226,6 +226,18 @@
<artifactId>
auth-sdk
</artifactId>
<version>
${junmp.v2.version}
</version>
</dependency>
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
system-biz-user
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
system-api
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.junmp.jyzb
</groupId>
...
...
@@ -296,12 +308,18 @@
<version>
${junmp.v2.version}
</version>
</dependency>
<!--字典配置-->
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
dict-boot-starter
</artifactId>
<version>
${junmp.v2.version}
</version>
</dependency>
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
dict-biz
</artifactId>
<version>
${junmp.v2.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论