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
8eda3b0e
Commit
8eda3b0e
authored
Nov 24, 2023
by
李小惠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
508f4720
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
40 个修改的文件
包含
281 行增加
和
145 行删除
+281
-145
BusFormDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/BusFormDto.java
+15
-0
CabinetBoxDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/CabinetBoxDto.java
+1
-1
CabinetBoxPoliceDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/CabinetBoxPoliceDto.java
+2
-0
OrderDetailDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/OrderDetailDto.java
+15
-0
PolicemanDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/PolicemanDto.java
+4
-3
BussinessOrderDetialReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/BussinessOrderDetialReq.java
+18
-0
CabinetBoxReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/CabinetBoxReq.java
+1
-1
CabinetReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/CabinetReq.java
+3
-2
OrderDetailReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/OrderDetailReq.java
+15
-0
PolicemanReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/PolicemanReq.java
+2
-3
QueryBusFormReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QueryBusFormReq.java
+3
-0
QuerySupplierReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QuerySupplierReq.java
+3
-0
UpdateCabinetBoxReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateCabinetBoxReq.java
+1
-1
UpdateOrderDetailReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateOrderDetailReq.java
+15
-0
UpdatePolicemanReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdatePolicemanReq.java
+0
-1
CabinetController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/CabinetController.java
+9
-9
CrudController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/ES/CrudController.java
+5
-0
BusForm.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/BusForm.java
+10
-14
CabinetBox.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/CabinetBox.java
+2
-8
CabinetBoxPolice.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/CabinetBoxPolice.java
+6
-0
OrderDetail.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/OrderDetail.java
+16
-0
Policeman.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Policeman.java
+0
-2
GlobalEndListener.java
jyzb-biz/src/main/java/com/junmp/jyzb/listener/GlobalEndListener.java
+13
-7
CabinetMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/CabinetMapper.java
+2
-1
SupplierMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/SupplierMapper.java
+5
-0
CabinetService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/CabinetService.java
+1
-1
BusFormServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/BusFormServiceImpl.java
+7
-14
CabinetBoxServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetBoxServiceImpl.java
+1
-1
CabinetServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetServiceImpl.java
+44
-49
PolicemanServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
+0
-0
SupplierServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/SupplierServiceImpl.java
+17
-6
CreateNullData.java
jyzb-biz/src/main/java/com/junmp/jyzb/utils/CreateNullData.java
+2
-2
CabinetMapper.xml
jyzb-biz/src/main/resources/mapper/CabinetMapper.xml
+2
-2
PolicemanMapper.xml
jyzb-biz/src/main/resources/mapper/PolicemanMapper.xml
+1
-1
SupplierMapper.xml
jyzb-biz/src/main/resources/mapper/SupplierMapper.xml
+6
-0
ApplyDTO.java
jyzb-process/src/main/java/com/junmp/junmpProcess/dto/ApplyDTO.java
+5
-0
StartProcessInstanceDTO.java
jyzb-process/src/main/java/com/junmp/junmpProcess/dto/StartProcessInstanceDTO.java
+3
-0
TaskDTO.java
jyzb-process/src/main/java/com/junmp/junmpProcess/dto/TaskDTO.java
+3
-0
FlowTaskServiceImpl.java
jyzb-process/src/main/java/com/junmp/junmpProcess/service/impl/FlowTaskServiceImpl.java
+22
-15
CreateNullData.java
jyzb-process/src/main/java/com/junmp/junmpProcess/utils/CreateNullData.java
+1
-1
没有找到文件。
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/BusFormDto.java
View file @
8eda3b0e
...
...
@@ -180,4 +180,19 @@ public class BusFormDto {
*/
private
String
currentAssign
;
/**
* 生产日期
*/
private
Date
productionDate
;
/**
* 质保期
*/
private
Integer
warrantyPeriod
;
/**
* 维保期
*/
private
Integer
maintenancePeriod
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/CabinetBoxDto.java
View file @
8eda3b0e
...
...
@@ -46,6 +46,6 @@ public class CabinetBoxDto implements Serializable {
* 箱门类型:1单警柜,2公共柜
*/
@ApiModelProperty
(
value
=
"箱门类型:1单警柜,2公共柜"
)
private
Integer
box
Type
;
private
Integer
contain
Type
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/CabinetBoxPoliceDto.java
View file @
8eda3b0e
...
...
@@ -22,6 +22,8 @@ public class CabinetBoxPoliceDto {
private
Integer
num
;
private
Integer
box_type
;
/**
* 主柜号
*/
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/OrderDetailDto.java
View file @
8eda3b0e
...
...
@@ -46,4 +46,19 @@ public class OrderDetailDto implements Serializable {
* 在库数
*/
private
Integer
stockNumber
;
/**
* 生产日期
*/
private
Date
productionDate
;
/**
* 质保期
*/
private
Integer
warrantyPeriod
;
/**
* 维保期
*/
private
Integer
maintenancePeriod
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/PolicemanDto.java
View file @
8eda3b0e
...
...
@@ -12,9 +12,10 @@ public class PolicemanDto {
private
String
name
;
private
String
cabinetBoxId
;
private
List
<
CabinetBoxPoliceDto
>
cabinetBoxList
;
private
List
<
String
>
soloBoxList
;
private
List
<
String
>
publicBoxList
;
private
String
soloBoxName
;
private
String
publicBoxName
;
private
String
policeCode
;
private
String
sex
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/BussinessOrderDetialReq.java
View file @
8eda3b0e
...
...
@@ -3,6 +3,7 @@ package com.junmp.jyzb.api.bean.query;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
public
class
BussinessOrderDetialReq
{
...
...
@@ -23,4 +24,21 @@ public class BussinessOrderDetialReq {
private
BigDecimal
totalPrice
;
//备注
private
String
remark
;
/**
* 生产日期
*/
private
Date
productionDate
;
/**
* 质保期
*/
private
Integer
warrantyPeriod
;
/**
* 维保期
*/
private
Integer
maintenancePeriod
;
//在库数
private
Integer
stockNumber
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/CabinetBoxReq.java
View file @
8eda3b0e
...
...
@@ -62,7 +62,7 @@ public class CabinetBoxReq extends BaseRequest {
*/
@ApiModelProperty
(
value
=
"箱门类型:1单警柜,2公共柜"
)
private
String
box
Type
;
private
Integer
contain
Type
;
private
String
cabinetName
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/CabinetReq.java
View file @
8eda3b0e
...
...
@@ -5,6 +5,7 @@ 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
;
...
...
@@ -22,9 +23,9 @@ public class CabinetReq extends BaseRequest {
/**
* 单警柜编号
*/
@Not
Null
(
message
=
"单警柜ID主键不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
,
detail
.
class
})
@Not
Blank
(
message
=
"单警柜ID主键不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
,
detail
.
class
})
@ApiModelProperty
(
value
=
"单警柜编号"
)
private
String
ser
ial
Num
;
private
String
ser
ver
Num
;
/**
* 箱数
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/OrderDetailReq.java
View file @
8eda3b0e
...
...
@@ -58,4 +58,19 @@ public class OrderDetailReq extends BaseRequest {
*/
private
Integer
modifyQuantity
;
/**
* 生产日期
*/
private
Date
productionDate
;
/**
* 质保期
*/
private
Integer
warrantyPeriod
;
/**
* 维保期
*/
private
Integer
maintenancePeriod
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/PolicemanReq.java
View file @
8eda3b0e
...
...
@@ -19,9 +19,6 @@ public class PolicemanReq extends BaseRequest {
@NotBlank
(
message
=
"姓名不能为空"
,
groups
=
{
add
.
class
})
private
String
name
;
@NotBlank
(
message
=
"箱门id不能为空"
,
groups
=
{
delete
.
class
})
private
String
cabinetBoxId
;
private
String
cabinetId
;
private
List
<
CabinetBoxReq
>
boxList
;
...
...
@@ -40,6 +37,8 @@ public class PolicemanReq extends BaseRequest {
//判断是否将系统账号和警员账号返回,如果是true,那么直接将警员返回,如果为空或者其他值,那么将系统账号和警员一起返回
private
String
flag
;
//是否创建空数据,true则创建,false则不创建
private
Boolean
isCreateNullDate
;
private
String
doorCode
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QueryBusFormReq.java
View file @
8eda3b0e
...
...
@@ -208,4 +208,7 @@ public class QueryBusFormReq extends BaseRequest {
//当前登录人员
private
String
userId
;
//是否创建空数据,true则创建,false则不创建
private
Boolean
isCreateNullDate
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QuerySupplierReq.java
View file @
8eda3b0e
...
...
@@ -26,4 +26,7 @@ public class QuerySupplierReq extends BaseRequest {
private
Integer
state
;
//联系人
private
String
contacts
;
//判断是否需要全部的厂商商信息还是只需要名字去重的厂商名称,如果是去重的,这里给true
private
Boolean
flag
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateCabinetBoxReq.java
View file @
8eda3b0e
...
...
@@ -21,7 +21,7 @@ public class UpdateCabinetBoxReq extends BaseRequest {
private
String
boxName
;
private
String
equipmentConfig
;
private
String
box
Type
;
private
Integer
contain
Type
;
private
String
power
;
private
List
<
String
>
boxNum
;
private
Integer
num
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateOrderDetailReq.java
View file @
8eda3b0e
...
...
@@ -64,4 +64,19 @@ public class UpdateOrderDetailReq implements Serializable {
private
Integer
modifyQuantity
;
/**
* 生产日期
*/
private
Date
productionDate
;
/**
* 质保期
*/
private
Integer
warrantyPeriod
;
/**
* 维保期
*/
private
Integer
maintenancePeriod
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdatePolicemanReq.java
View file @
8eda3b0e
...
...
@@ -19,7 +19,6 @@ public class UpdatePolicemanReq extends BaseRequest {
@NotBlank
(
message
=
"警员名字不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
})
private
String
name
;
private
String
cabinetBoxId
;
@NotNull
(
message
=
"组织机构id不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
})
private
Long
orgId
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/controller/CabinetController.java
View file @
8eda3b0e
...
...
@@ -104,15 +104,15 @@ public class CabinetController {
@PostMapping
(
"/boxBindPolice"
)
@ApiOperation
(
"箱门绑定人员"
)
public
ApiRes
<
Boolean
>
boxBindPolice
(
@RequestBody
CabinetBoxReq
req
)
{
boolean
result
=
cabinetService
.
boxBindPolice
(
req
);
if
(!
result
){
return
ApiRes
.
failure
(
"操作失败"
);
}
return
ApiRes
.
success
(
result
);
}
//
@PostMapping("/boxBindPolice")
//
@ApiOperation("箱门绑定人员")
//
public ApiRes<Boolean> boxBindPolice(@RequestBody CabinetBoxReq req) {
//
boolean result = cabinetService.boxBindPolice(req);
//
if (!result){
//
return ApiRes.failure("操作失败");
//
}
//
return ApiRes.success(result);
//
}
@PostMapping
(
"/SearchOrgId"
)
@ApiOperation
(
"/根据单警柜id查询组织机构id"
)
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/controller/ES/CrudController.java
View file @
8eda3b0e
...
...
@@ -3,6 +3,7 @@ package com.junmp.jyzb.controller.ES;
import
com.junmp.jyzb.Repository.BlogRepository
;
import
com.junmp.jyzb.entity.ES.Blog
;
import
com.junmp.jyzb.entity.EquipmentSize
;
import
com.junmp.jyzb.service.BusFormService
;
import
com.junmp.jyzb.service.EquipmentSizeService
;
import
com.junmp.jyzb.service.EquipmentTypeService
;
import
com.junmp.jyzb.service.PubOrgService
;
...
...
@@ -38,6 +39,9 @@ public class CrudController {
public
EquipmentSizeService
equipmentSizeService
;
@Resource
public
PubOrgService
pubOrgService
;
@Resource
public
BusFormService
busFormService
;
@ApiOperation
(
"测试"
)
@PostMapping
(
"testDocument"
)
public
Object
testDocument
()
{
...
...
@@ -55,6 +59,7 @@ public class CrudController {
pubOrgService
.
AddToEs
();
equipmentTypeService
.
addEs
();
equipmentSizeService
.
addEs
();
busFormService
.
addEs
();
return
true
;
}
@ApiOperation
(
"添加单个文档"
)
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/BusForm.java
View file @
8eda3b0e
...
...
@@ -5,7 +5,12 @@ import com.baomidou.mybatisplus.annotation.*;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.elasticsearch.annotations.Document
;
/**
...
...
@@ -14,12 +19,16 @@ import org.springframework.data.elasticsearch.annotations.Document;
*/
@TableName
(
value
=
"bussiness_bus_form"
)
@Data
@Document
(
indexName
=
"busform"
,
shards
=
1
,
replicas
=
1
)
@AllArgsConstructor
@NoArgsConstructor
@Document
(
indexName
=
"busform"
)
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
BusForm
implements
Serializable
{
/**
* id
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_UUID
)
@Id
private
String
id
;
/**
...
...
@@ -134,17 +143,6 @@ public class BusForm implements Serializable {
@TableField
(
value
=
"apply_time"
)
private
Date
applyTime
;
/**
* 申请人
*/
@TableField
(
value
=
"apply_user"
)
private
String
applyUser
;
/**
* 申请人id
*/
@TableField
(
value
=
"apply_user_id"
)
private
String
applyUserId
;
/**
* 调拨类型(2支拨,1价拨)
...
...
@@ -232,7 +230,6 @@ public class BusForm implements Serializable {
@TableField
(
value
=
"use_count"
)
private
String
useCount
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/entity/CabinetBox.java
View file @
8eda3b0e
...
...
@@ -71,8 +71,8 @@ public class CabinetBox implements Serializable {
* 箱门类型:1单警柜,2公共柜
*/
@ApiModelProperty
(
value
=
"箱门类型:1单警柜,2公共柜"
)
@TableField
(
"
box
_type"
)
private
String
box
Type
;
@TableField
(
"
contain
_type"
)
private
Integer
contain
Type
;
/**
* 使用日志存储位置信息
*/
...
...
@@ -80,12 +80,6 @@ public class CabinetBox implements Serializable {
@TableField
(
"log_map"
)
private
String
logMap
;
/**
* 箱门类型:1单警柜,2公共柜
*/
@ApiModelProperty
(
value
=
"箱门类型:1单警柜,2公共柜"
)
@TableField
(
"box_type"
)
private
Integer
boxType
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/CabinetBoxPolice.java
View file @
8eda3b0e
...
...
@@ -58,6 +58,12 @@ public class CabinetBoxPolice implements Serializable {
@TableField
(
value
=
"update_time"
)
private
Date
updateTime
;
/**
* 箱门类型(1单警柜,2公共柜)
*/
@TableField
(
value
=
"contain_type"
)
private
Integer
containType
;
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/OrderDetail.java
View file @
8eda3b0e
...
...
@@ -85,5 +85,21 @@ import java.util.Date;
private
String
updateUser
;
/**
* 生产日期
*/
@TableField
(
"production_date"
)
private
Date
productionDate
;
/**
* 质保期
*/
@TableField
(
"warranty_period"
)
private
Integer
warrantyPeriod
;
/**
* 维保期
*/
@TableField
(
"maintenance_period"
)
private
Integer
maintenancePeriod
;
}
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Policeman.java
View file @
8eda3b0e
...
...
@@ -27,8 +27,6 @@ public class Policeman implements Serializable {
@TableField
(
value
=
"name"
)
private
String
name
;
@TableField
(
value
=
"cabinet_box_id"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
cabinetBoxId
;
@TableField
(
value
=
"org_id_int"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Long
orgId
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/listener/GlobalEndListener.java
View file @
8eda3b0e
...
...
@@ -83,6 +83,7 @@ import java.util.stream.Collectors;
for
(
HistoricVariableInstance
a:
bussinessType
)
{
System
.
out
.
println
(
"a = "
+
a
);
}
if
(
orderType
.
size
()>
0
)
{
...
...
@@ -116,13 +117,18 @@ import java.util.stream.Collectors;
BusForm
busForm
=
busFormService
.
getOne
(
new
LambdaQueryWrapper
<
BusForm
>()
.
eq
(
BusForm:
:
getProcessId
,
processInstanceId
));
busForm
.
setExamineState
(
"finished"
);
// if (){
// String detailList = busForm.getDetailList();
// List<BussinessOrderDetialReq> list = JSON.parseArray(detailList, BussinessOrderDetialReq.class);
// for (:) {
//
// }
// }
if
(
busForm
.
getBussinessType
().
equals
(
"remove"
)){
String
detailList
=
busForm
.
getDetailList
();
List
<
BussinessOrderDetialReq
>
list
=
JSON
.
parseArray
(
detailList
,
BussinessOrderDetialReq
.
class
);
for
(
BussinessOrderDetialReq
bussinessOrderDetialReq:
list
)
{
//如果数量相同则直接将全部在库数的装备表中的该仓库的装备状态全部设置为报废,并且修改库存汇总表中的数据
if
(
bussinessOrderDetialReq
.
getPlanNum
()==
bussinessOrderDetialReq
.
getStockNumber
()){
}
else
{
//如果数量不相等,状态不进行修改,只修改库存汇总表中的信息
}
}
}
busFormService
.
updateById
(
busForm
);
}
if
(
Type
.
equals
(
"reassigment"
)){
//调岗申请单
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/CabinetMapper.java
View file @
8eda3b0e
...
...
@@ -13,7 +13,7 @@ import java.util.Map;
public
interface
CabinetMapper
extends
BaseMapper
<
Cabinet
>
{
List
<
Cabinet
>
getAllCabinetByOrgList
(
@Param
(
"list"
)
List
<
Long
>
allOrgId
);
List
<
Cabinet
>
getAllCabinetsWithSingleCabinet
(
@Param
(
"orgId"
)
String
id
,
@Param
(
"
boxType"
)
String
box
Type
);
List
<
Cabinet
>
getAllCabinetsWithSingleCabinet
(
@Param
(
"orgId"
)
String
id
,
@Param
(
"
containType"
)
String
contain
Type
);
boolean
SetInventoryInfo
(
String
id
);
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/SupplierMapper.java
View file @
8eda3b0e
package
com
.
junmp
.
jyzb
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.junmp.jyzb.api.bean.dto.SupplierDto
;
import
com.junmp.jyzb.entity.Supplier
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
@Mapper
public
interface
SupplierMapper
extends
BaseMapper
<
Supplier
>
{
List
<
SupplierDto
>
selectDistinctList
();
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/service/CabinetService.java
View file @
8eda3b0e
...
...
@@ -63,7 +63,7 @@ public interface CabinetService extends IService<Cabinet> {
* @param req
* @return
*/
boolean
boxBindPolice
(
CabinetBoxReq
req
);
//
boolean boxBindPolice(CabinetBoxReq req);
/**
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/BusFormServiceImpl.java
View file @
8eda3b0e
...
...
@@ -24,6 +24,7 @@ import com.junmp.jyzb.service.BusFormService;
import
com.junmp.jyzb.mapper.BusFormMapper
;
import
com.junmp.jyzb.service.InventorySummaryService
;
import
com.junmp.jyzb.service.StocktakeService
;
import
com.junmp.jyzb.utils.CreateNullData
;
import
com.junmp.jyzb.utils.DateTimeUtil
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
...
...
@@ -221,20 +222,12 @@ public class BusFormServiceImpl extends ServiceImpl<BusFormMapper, BusForm> impl
BeanPlusUtil
.
copyProperties
(
busForm
,
busFormDto
);
return
busFormDto
;
}).
collect
(
Collectors
.
toList
());
//余数
long
num
=
size
%
10
;
//整数
long
integer
=
size
/
10
;
List
<
BusFormDto
>
collect1
=
new
ArrayList
<>();
if
(
num
!=
0
){
//判断整数是什么,就在第几页进行补
if
(
req
.
getPageNo
()-
1
==
integer
){
for
(
int
i
=
0
;
i
<
10
-
num
;
i
++)
{
BusFormDto
busFormDto
=
new
BusFormDto
();
collect1
.
add
(
busFormDto
);
}
}
collect
.
addAll
(
collect1
);
//创建空的数据返回前端
if
(
req
.
getIsCreateNullDate
()==
null
||
req
.
getIsCreateNullDate
()){
Class
<
BusFormDto
>
busFormDto
=
BusFormDto
.
class
;
List
<
BusFormDto
>
nullData
=
CreateNullData
.
createNullData
(
size
,
req
.
getPageNo
(),
busFormDto
);
collect
.
addAll
(
nullData
);
}
Page
<
BusFormDto
>
page1
=
new
Page
<>(
req
.
getPageNo
(),
req
.
getPageSize
());
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetBoxServiceImpl.java
View file @
8eda3b0e
...
...
@@ -66,7 +66,7 @@ public class CabinetBoxServiceImpl extends ServiceImpl<CabinetBoxMapper, Cabinet
box
.
setCabinetId
(
cabinet
.
getId
());
box
.
setPower
(
boxReq
.
getPower
());
box
.
setEquipmentConfig
(
boxReq
.
getEquipmentConfig
());
box
.
set
BoxType
(
boxReq
.
getBox
Type
());
box
.
set
ContainType
(
boxReq
.
getContain
Type
());
box
.
setState
(
0
);
box
.
setBoxName
(
boxReq
.
getBoxName
());
box
.
setNum
(
boxReq
.
getNum
());
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/CabinetServiceImpl.java
View file @
8eda3b0e
...
...
@@ -45,6 +45,9 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
private
CabinetBoxService
cabinetBoxService
;
@Resource
private
PolicemanService
policemanService
;
@Resource
private
CabinetBoxPoliceService
cabinetBoxPoliceService
;
@Autowired
private
RabbitMQSendMsg
MQ
;
...
...
@@ -102,7 +105,7 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
box
.
setCabinetId
(
cabinet
.
getId
());
box
.
setPower
(
boxReq
.
getPower
());
box
.
setEquipmentConfig
(
boxReq
.
getEquipmentConfig
());
box
.
set
BoxType
(
boxReq
.
getBox
Type
());
box
.
set
ContainType
(
boxReq
.
getContain
Type
());
box
.
setState
(
0
);
box
.
setNum
(
boxReq
.
getNum
());
return
box
;
...
...
@@ -144,24 +147,16 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
//通过单警柜id循环遍历出并删除所有箱门信息
List
<
CabinetBox
>
list
=
cabinetBoxService
.
list
(
new
LambdaQueryWrapper
<
CabinetBox
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
id
),
CabinetBox:
:
getCabinetId
,
id
));
//创建police列表方便批量删除操作
List
<
Policeman
>
policemanList
=
new
ArrayList
<>();
//创建cabinetBox列表方便批量删除操作
List
<
CabinetBox
>
cabinetBoxList
=
new
ArrayList
<>();
for
(
CabinetBox
cabinetBox:
list
)
{
CabinetBox
cabinetBox1
=
new
CabinetBox
();
BeanPlusUtil
.
copyProperties
(
cabinetBox
,
cabinetBox1
);
cabinetBoxList
.
add
(
cabinetBox1
);
//删除箱门信息的同时需要去判断箱门是否绑定警员,如果有,则解除绑定
Policeman
one
=
policemanService
.
getOne
(
new
LambdaQueryWrapper
<
Policeman
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
cabinetBox
.
getId
()),
Policeman:
:
getCabinetBoxId
,
cabinetBox
.
getId
()));
if
(!
ObjectUtil
.
isNull
(
one
)){
one
.
setCabinetBoxId
(
null
);
policemanList
.
add
(
one
);
}
//
}
//批量修改绑定箱门的警员信息,将其解绑
policemanService
.
updateBatchById
(
policemanList
);
cabinetBoxPoliceService
.
remove
(
new
LambdaQueryWrapper
<
CabinetBoxPolice
>().
eq
(
CabinetBoxPolice:
:
getCabinetId
,
cabinetIdList
)
);
//批量删除箱门数
cabinetBoxService
.
removeBatchByIds
(
cabinetBoxList
);
//批量删除单警柜id
...
...
@@ -210,7 +205,7 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
LambdaQueryWrapper
<
Cabinet
>
eq
=
new
LambdaQueryWrapper
<
Cabinet
>()
.
eq
(
Cabinet:
:
getOrgIdInt
,
req
.
getOrgId
())
.
like
(
ObjectUtil
.
isNotNull
(
req
.
getName
()),
Cabinet:
:
getName
,
req
.
getName
())
.
like
(
ObjectUtil
.
isNotNull
(
req
.
getSer
ialNum
()),
Cabinet:
:
getCabinetNum
,
req
.
getSerial
Num
());
.
like
(
ObjectUtil
.
isNotNull
(
req
.
getSer
verNum
()),
Cabinet:
:
getCabinetNum
,
req
.
getServer
Num
());
// 使用 PageHelper 开始分页
Page
<
Cabinet
>
page
=
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
());
...
...
@@ -250,12 +245,12 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
@Override
public
CabinetDto
showOneCabinet
(
CabinetReq
req
)
{
// 查询单警柜信息
Cabinet
cabinet
=
CabinetExistByNum
(
req
.
getSer
ial
Num
());
Cabinet
cabinet
=
CabinetExistByNum
(
req
.
getSer
ver
Num
());
// 查询单警柜的箱门信息
List
<
CabinetBox
>
list
=
cabinetBoxService
.
list
(
new
LambdaQueryWrapper
<
CabinetBox
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
cabinet
.
getId
()),
CabinetBox:
:
getCabinetId
,
cabinet
.
getId
())
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getContainType
()),
CabinetBox:
:
get
Box
Type
,
req
.
getContainType
()));
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getContainType
()),
CabinetBox:
:
get
Contain
Type
,
req
.
getContainType
()));
List
<
CabinetBoxDto
>
boxList
=
list
.
stream
()
.
map
(
cabinetBox
->
{
...
...
@@ -333,40 +328,40 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
* @param req
* @return
*/
@Override
public
boolean
boxBindPolice
(
CabinetBoxReq
req
)
{
//通过箱门id查询出箱门信息
CabinetBox
one
=
cabinetBoxService
.
getOne
(
new
LambdaQueryWrapper
<
CabinetBox
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getId
()),
CabinetBox:
:
getId
,
req
.
getId
()));
if
(
ObjectUtil
.
isEmpty
(
one
)){
//箱门id不存在
throw
new
ServiceException
(
CabinetExceptionEnum
.
CABINETBOX_ISNOT_EXISTS
);
}
//获取箱门的主柜id
String
cabinetId
=
one
.
getCabinetId
();
//通过主柜id获取机构id
Cabinet
one1
=
getOne
(
new
LambdaQueryWrapper
<
Cabinet
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
cabinetId
),
Cabinet:
:
getId
,
cabinetId
));
if
(
ObjectUtil
.
isEmpty
(
one1
)){
//单警柜不存在异常
throw
new
ServiceException
(
CabinetExceptionEnum
.
CABINET_ISNOT_EXISTS
);
}
long
orgId
=
one1
.
getOrgIdInt
();
//通过警员id获取警员所在的机构id
Policeman
one2
=
policemanService
.
getOne
(
new
LambdaQueryWrapper
<
Policeman
>()
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getPoliceId
()),
Policeman:
:
getId
,
req
.
getPoliceId
()));
if
(
ObjectUtil
.
isEmpty
(
one2
)){
//警员不存在异常
throw
new
ServiceException
(
PolicemanExceptionEnum
.
POLICEMAN_NOT_EXIST
);
}
Long
orgId1
=
one2
.
getOrgId
();
//判断两个机构id是否相同,相同则可以绑定,不相同则绑定失败
if
(!(
orgId1
==
orgId
)){
return
false
;
}
one2
.
setCabinetBoxId
(
one
.
getId
());
return
policemanService
.
updateById
(
one2
);
}
//
@Override
//
public boolean boxBindPolice(CabinetBoxReq req) {
//
//通过箱门id查询出箱门信息
//
CabinetBox one = cabinetBoxService.getOne(new LambdaQueryWrapper<CabinetBox>()
//
.eq(ObjectUtil.isNotEmpty(req.getId()), CabinetBox::getId, req.getId()));
//
if (ObjectUtil.isEmpty(one)){
//
//箱门id不存在
//
throw new ServiceException(CabinetExceptionEnum.CABINETBOX_ISNOT_EXISTS);
//
}
//
//获取箱门的主柜id
//
String cabinetId = one.getCabinetId();
//
//通过主柜id获取机构id
//
Cabinet one1 = getOne(new LambdaQueryWrapper<Cabinet>()
//
.eq(ObjectUtil.isNotEmpty(cabinetId), Cabinet::getId,cabinetId));
//
if (ObjectUtil.isEmpty(one1)){
//
//单警柜不存在异常
//
throw new ServiceException(CabinetExceptionEnum.CABINET_ISNOT_EXISTS);
//
}
//
long orgId = one1.getOrgIdInt();
//
//通过警员id获取警员所在的机构id
//
Policeman one2 = policemanService.getOne(new LambdaQueryWrapper<Policeman>()
//
.eq(ObjectUtil.isNotEmpty(req.getPoliceId()), Policeman::getId, req.getPoliceId()));
//
if (ObjectUtil.isEmpty(one2)){
//
//警员不存在异常
//
throw new ServiceException(PolicemanExceptionEnum.POLICEMAN_NOT_EXIST);
//
}
//
Long orgId1 = one2.getOrgId();
//
//判断两个机构id是否相同,相同则可以绑定,不相同则绑定失败
//
if (!(orgId1==orgId)){
//
return false;
//
}
//
one2.setCabinetBoxId(one.getId());
//
return policemanService.updateById(one2);
//
}
/**
...
...
@@ -394,7 +389,7 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
//根据单警柜id查询出组织机构id
@Override
public
Long
SearchOrgId
(
CabinetReq
req
)
{
Cabinet
cabinet
=
CabinetExistByNum
(
req
.
getSer
ial
Num
());
Cabinet
cabinet
=
CabinetExistByNum
(
req
.
getSer
ver
Num
());
return
cabinet
.
getOrgIdInt
();
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
View file @
8eda3b0e
差异被折叠。
点击展开。
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/SupplierServiceImpl.java
View file @
8eda3b0e
...
...
@@ -29,6 +29,9 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
@Resource
OrderMainService
orderMainService
;
@Resource
private
SupplierMapper
supplierMapper
;
@Override
public
String
AddSupplier
(
UpdateSupplierReq
req
)
{
Supplier
one
=
getOne
(
new
LambdaQueryWrapper
<
Supplier
>().
eq
(
Supplier:
:
getName
,
req
.
getName
()));
...
...
@@ -101,12 +104,20 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
LambdaQueryWrapper
<
Supplier
>
wrapper
=
createWrapper
(
req
);
List
<
SupplierDto
>
dto
=
new
ArrayList
<>();
this
.
list
(
wrapper
).
forEach
(
p
->
{
SupplierDto
sd
=
new
SupplierDto
();
BeanPlusUtil
.
copyProperties
(
p
,
sd
);
dto
.
add
(
sd
);
});
//判断是否需要全部的厂商商信息还是只需要名字去重的厂商名称,如果是去重的,这里给true,但是返回的id默认是第一个名称的id
if
(
ObjectUtil
.
isNotNull
(
req
.
getFlag
())
&&
req
.
getFlag
()){
dto
=
supplierMapper
.
selectDistinctList
();
}
else
{
List
<
Supplier
>
list
=
this
.
list
(
wrapper
);
for
(
Supplier
supplier:
list
)
{
SupplierDto
sd
=
new
SupplierDto
();
BeanPlusUtil
.
copyProperties
(
supplier
,
sd
);
dto
.
add
(
sd
);
}
}
return
dto
;
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/utils/CreateNullData.java
View file @
8eda3b0e
...
...
@@ -5,8 +5,8 @@ import java.util.List;
public
class
CreateNullData
{
public
static
<
T
>
List
<
T
>
createNullData
(
L
ist
<
T
>
info
,
Long
pageNo
,
Class
<
T
>
clazz
)
{
int
size
=
info
.
size
();
public
static
<
T
>
List
<
T
>
createNullData
(
L
ong
size
,
Long
pageNo
,
Class
<
T
>
clazz
)
{
//余数
long
num
=
size
%
10
;
//整数
...
...
jyzb-biz/src/main/resources/mapper/CabinetMapper.xml
View file @
8eda3b0e
...
...
@@ -77,11 +77,11 @@
FROM base_cabinet c
JOIN pub_org o ON c.org_id_int = o.org_id
WHERE c.org_id_int = #{orgId}
AND (#{
boxType} IS NULL OR #{box
Type} = '' OR EXISTS (
AND (#{
containType} IS NULL OR #{contain
Type} = '' OR EXISTS (
SELECT 1
FROM base_cabinet_box cb
WHERE cb.cabinet_id = c.id
AND cb.
box_type = #{box
Type}
AND cb.
contain_type = #{contain
Type}
))
</select>
...
...
jyzb-biz/src/main/resources/mapper/PolicemanMapper.xml
View file @
8eda3b0e
...
...
@@ -252,7 +252,7 @@ WHERE o.org_id IN
select b.* FROM(
select
su.user_id,su.account,su.status_flag as state,suo.org_id,p.id,p.name,p.cabinet_box_id,p.police_code,
p.face_info,p.password,p.photo,p.phone,p.id_card,p.identity,su.create_time
p.face_info,p.password,p.photo,p.phone,p.id_card,p.identity,su.create_time
,p.hk_face_device
FROM sys_user su
join sys_user_org suo on su.user_id=suo.user_id and suo.org_id=#{orgId}
left join base_policeman p on p.user_id=su.user_id
...
...
jyzb-biz/src/main/resources/mapper/SupplierMapper.xml
View file @
8eda3b0e
...
...
@@ -18,6 +18,11 @@
id, equipment_id, `name`, supplier_code, short_name, contacts, create_time, create_user,
update_time, update_user
</sql>
<select
id=
"selectDistinctList"
resultType=
"com.junmp.jyzb.api.bean.dto.SupplierDto"
>
SELECT MIN(id) AS id, name
FROM base_supplier
GROUP BY name
</select>
</mapper>
\ No newline at end of file
jyzb-process/src/main/java/com/junmp/junmpProcess/dto/ApplyDTO.java
View file @
8eda3b0e
...
...
@@ -27,4 +27,9 @@ public class ApplyDTO extends PageDTO {
private
String
typeName
;
//审核状态
private
String
businessStatus
;
//是否创建空数据,true则创建,false则不创建
private
Boolean
isCreateNullDate
;
}
jyzb-process/src/main/java/com/junmp/junmpProcess/dto/StartProcessInstanceDTO.java
View file @
8eda3b0e
...
...
@@ -34,4 +34,7 @@ public class StartProcessInstanceDTO {
//出入库单据状态(出库还是入库)
private
String
outInState
;
//调岗类型,调入还是调出
private
Integer
reassigmentType
;
}
jyzb-process/src/main/java/com/junmp/junmpProcess/dto/TaskDTO.java
View file @
8eda3b0e
...
...
@@ -30,4 +30,7 @@ public class TaskDTO extends PageDTO {
private
String
typeName
;
//审核状态
private
String
businessStatus
;
//是否创建空数据,true则创建,false则不创建
private
Boolean
isCreateNullDate
;
}
jyzb-process/src/main/java/com/junmp/junmpProcess/service/impl/FlowTaskServiceImpl.java
View file @
8eda3b0e
...
...
@@ -22,8 +22,10 @@ import com.junmp.junmpProcess.mapper.OrgUserMapper;
import
com.junmp.junmpProcess.service.IFlowInstanceService
;
import
com.junmp.junmpProcess.service.IFlowTaskService
;
import
com.junmp.junmpProcess.service.Repository.ProcessTemplateService
;
import
com.junmp.junmpProcess.utils.CreateNullData
;
import
com.junmp.junmpProcess.vo.*
;
import
com.junmp.jyzb.api.bean.dto.BusFormDto
;
import
com.junmp.jyzb.api.bean.dto.PolicemanDto
;
import
com.junmp.v2.auth.api.bean.login.LoginUser
;
import
com.junmp.v2.auth.api.context.LoginContext
;
import
com.junmp.v2.common.bean.response.ApiRes
;
...
...
@@ -350,6 +352,13 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
taskVOS
.
addAll
(
taskVOList
);
}
//判断是否需要添加空数据
if
(
taskDTO
.
getIsCreateNullDate
()==
null
||
taskDTO
.
getIsCreateNullDate
()){
Class
<
TaskVO
>
taskVO
=
TaskVO
.
class
;
List
<
TaskVO
>
nullData
=
CreateNullData
.
createNullData
(
count
,
Long
.
valueOf
(
taskDTO
.
getPageNo
()),
taskVO
);
taskVOS
.
addAll
(
nullData
);
}
page
.
setRecords
(
taskVOS
);
page
.
setTotal
(
count
);
page
.
setCurrent
(
taskDTO
.
getPageNo
());
...
...
@@ -475,6 +484,14 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}
taskVOS
.
addAll
(
taskVOList
);
}
//判断是否需要添加空数据
if
(
taskDTO
.
getIsCreateNullDate
()==
null
||
taskDTO
.
getIsCreateNullDate
()){
Class
<
TaskVO
>
taskVO
=
TaskVO
.
class
;
List
<
TaskVO
>
nullData
=
CreateNullData
.
createNullData
(
count
,
Long
.
valueOf
(
taskDTO
.
getPageNo
()),
taskVO
);
taskVOS
.
addAll
(
nullData
);
}
page
.
setRecords
(
taskVOS
);
page
.
setCurrent
(
taskDTO
.
getPageNo
());
page
.
setSize
(
taskDTO
.
getPageSize
());
...
...
@@ -586,22 +603,12 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
historyProcessInstanceVO
.
setDuration
(
spendTimes
);
historyProcessInstanceVOS
.
add
(
historyProcessInstanceVO
);
}
//余数
long
num
=
count
%
10
;
//整数
long
integer
=
count
/
10
;
List
<
HistoryProcessInstanceVO
>
historyProcessInstanceVOList
=
new
ArrayList
<>();
if
(
num
!=
0
){
//判断整数是什么,就在第几页进行补
if
(
applyDTO
.
getPageNo
()-
1
==
integer
){
for
(
int
i
=
0
;
i
<
10
-
num
;
i
++)
{
HistoryProcessInstanceVO
historyProcessInstanceVO
=
new
HistoryProcessInstanceVO
();
historyProcessInstanceVOList
.
add
(
historyProcessInstanceVO
);
}
}
historyProcessInstanceVOS
.
addAll
(
historyProcessInstanceVOList
);
//判断是否需要添加空数据
if
(
applyDTO
.
getIsCreateNullDate
()==
null
||
applyDTO
.
getIsCreateNullDate
()){
Class
<
HistoryProcessInstanceVO
>
historyProcessInstanceVO
=
HistoryProcessInstanceVO
.
class
;
List
<
HistoryProcessInstanceVO
>
nullData
=
CreateNullData
.
createNullData
(
count
,
Long
.
valueOf
(
applyDTO
.
getPageNo
()),
historyProcessInstanceVO
);
historyProcessInstanceVOS
.
addAll
(
nullData
);
}
pageResult
.
setRecords
(
historyProcessInstanceVOS
);
// pageResult.setTotalRows(Long.valueOf(applyDTO.getPageNo()));
pageResult
.
setTotalRows
(
count
);
...
...
jyzb-process/src/main/java/com/junmp/junmpProcess/utils/CreateNullData.java
View file @
8eda3b0e
package
com
.
junmp
.
j
yzb
.
utils
;
package
com
.
junmp
.
j
unmpProcess
.
utils
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论