Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
adf034f2
提交
adf034f2
authored
12月 15, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(列装模块,装备模块,入库模块): 装备库房3D,修改入库接口。修改列装编辑
装备库房3D,修改入库接口。修改列装编辑
上级
7475f0ff
全部展开
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
324 行增加
和
2 行删除
+324
-2
DeviceLibraryPositionController.java
...e/library/controller/DeviceLibraryPositionController.java
+62
-0
DeviceLibraryPositionDao.java
...v/device/library/repository/DeviceLibraryPositionDao.java
+25
-0
DeviceLibraryPositionService.java
.../device/library/service/DeviceLibraryPositionService.java
+20
-0
DeviceLibraryPosition.java
...v/device/library/subject/domin/DeviceLibraryPosition.java
+161
-0
DeviceLibraryPositionMessageVo.java
...ce/library/subject/vo/DeviceLibraryPositionMessageVo.java
+27
-0
RotationVo.java
...va/com/tykj/dev/device/library/subject/vo/RotationVo.java
+27
-0
PackingController.java
...tykj/dev/device/packing/controller/PackingController.java
+2
-2
StorageBillController.java
.../dev/device/storage/controller/StorageBillController.java
+0
-0
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryPositionController.java
0 → 100644
浏览文件 @
adf034f2
package
com
.
tykj
.
dev
.
device
.
library
.
controller
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.library.service.DeviceLibraryCacheService
;
import
com.tykj.dev.device.library.service.DeviceLibraryPositionService
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibraryPosition
;
import
com.tykj.dev.device.library.subject.vo.DeviceLibraryPositionMessageVo
;
import
com.tykj.dev.device.library.subject.vo.RotationVo
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* DATE:2021-8-11
* Author:zsp
*/
@RestController
@RequestMapping
(
value
=
"/deviceLibraryPosition"
)
@AutoDocument
@Api
(
tags
=
"装备3D模块"
,
description
=
"装备3D模块"
)
@Slf4j
public
class
DeviceLibraryPositionController
{
@Resource
private
DeviceLibraryPositionService
deviceLibraryPositionService
;
@GetMapping
(
"/findByStorageLocationId"
)
@ApiOperation
(
value
=
"根据库房位置查询装备"
)
public
ResponseEntity
<
List
<
DeviceLibraryPosition
>>
findByStorageLocationId
(
Integer
StorageLocationId
){
List
<
DeviceLibraryPosition
>
deviceLibraryPositions
=
new
ArrayList
<>();
for
(
DeviceLibraryPosition
deviceLibraryPosition
:
deviceLibraryPositionService
.
findByStorageLocationId
(
StorageLocationId
))
{
deviceLibraryPosition
.
setDeviceLibraryPositionMessageVo
(
JacksonUtil
.
readValue
(
deviceLibraryPosition
.
getDeviceLibraryPositionMessage
(),
new
TypeReference
<
DeviceLibraryPositionMessageVo
>()
{}));
deviceLibraryPosition
.
setRotationVo
(
JacksonUtil
.
readValue
(
deviceLibraryPosition
.
getRotation
(),
new
TypeReference
<
RotationVo
>()
{}));
deviceLibraryPositions
.
add
(
deviceLibraryPosition
);
}
return
ResponseEntity
.
ok
(
deviceLibraryPositions
);
}
@PostMapping
(
"/updateDeviceLibraryPosition"
)
@ApiOperation
(
value
=
"修改3D"
)
public
ResponseEntity
<
String
>
updateDeviceLibraryPosition
(
@RequestBody
DeviceLibraryPosition
deviceLibraryPosition
){
String
messageVo
=
deviceLibraryPosition
.
getDeviceLibraryPositionMessageVo
().
toJson
();
String
rotationVo
=
deviceLibraryPosition
.
getRotationVo
().
toJson
();
deviceLibraryPosition
.
setDeviceLibraryPositionMessage
(
messageVo
);
deviceLibraryPosition
.
setRotation
(
rotationVo
);
deviceLibraryPositionService
.
updateDeviceLibraryPosition
(
deviceLibraryPosition
);
return
ResponseEntity
.
ok
(
"修改成功"
);
}
}
dev-library/src/main/java/com/tykj/dev/device/library/repository/DeviceLibraryPositionDao.java
0 → 100644
浏览文件 @
adf034f2
package
com
.
tykj
.
dev
.
device
.
library
.
repository
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibraryPosition
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.query.Param
;
import
javax.transaction.Transactional
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author zsp
*/
@SuppressWarnings
(
"SqlResolve"
)
public
interface
DeviceLibraryPositionDao
extends
JpaRepository
<
DeviceLibraryPosition
,
Integer
>,
JpaSpecificationExecutor
<
DeviceLibraryPosition
>
{
List
<
DeviceLibraryPosition
>
findAllByStorageLocationId
(
Integer
StorageLocationId
);
}
dev-library/src/main/java/com/tykj/dev/device/library/service/DeviceLibraryPositionService.java
0 → 100644
浏览文件 @
adf034f2
package
com
.
tykj
.
dev
.
device
.
library
.
service
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibraryPosition
;
import
java.util.List
;
/**
* @author zsp
* @create 2021/12/13 16:23
*/
public
interface
DeviceLibraryPositionService
{
void
addDeviceLibraryPosition
(
DeviceLibraryPosition
deviceLibraryPosition
);
void
updateDeviceLibraryPosition
(
DeviceLibraryPosition
deviceLibraryPosition
);
void
batchDeviceLibraryPositions
(
List
<
DeviceLibraryPosition
>
deviceLibraryPositions
);
List
<
DeviceLibraryPosition
>
findByStorageLocationId
(
Integer
StorageLocationId
);
}
dev-library/src/main/java/com/tykj/dev/device/library/subject/domin/DeviceLibraryPosition.java
0 → 100644
浏览文件 @
adf034f2
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
domin
;
import
com.tykj.dev.device.library.subject.vo.*
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
import
org.springframework.data.annotation.CreatedBy
;
import
org.springframework.data.annotation.CreatedDate
;
import
org.springframework.data.annotation.LastModifiedBy
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author zsp
*/
@Data
@Entity
@EntityListeners
(
AuditingEntityListener
.
class
)
@SQLDelete
(
sql
=
"update device_library_position set delete_tag = 1 where id = ?"
)
@Where
(
clause
=
"delete_tag = 0"
)
@ApiModel
(
"装备3D位置存储库"
)
public
class
DeviceLibraryPosition
implements
Serializable
{
/**
* 主键id
*/
@Id
@GeneratedValue
@ApiModelProperty
(
name
=
"主键id"
)
@Column
(
columnDefinition
=
"integer NOT NULL AUTO_INCREMENT"
)
private
Integer
id
;
/**
* 型号
*/
@ApiModelProperty
(
value
=
"型号"
)
private
String
model
;
/**
* 型号
*/
@ApiModelProperty
(
value
=
"装备的id"
)
private
Integer
deviceId
;
/**
* 密级
*/
@ApiModelProperty
(
value
=
"密级"
)
private
Integer
secretLevel
;
/**
* 装备名称
*/
@ApiModelProperty
(
value
=
"装备名称"
)
private
String
name
;
/**
* 装备序列号
*/
@ApiModelProperty
(
value
=
"装备序列号"
)
private
String
seqNumber
;
/**
* 生产序列号
*/
@ApiModelProperty
(
value
=
"生产序列号"
)
private
String
prodNumber
;
/**
* rfid表面号
*/
@ApiModelProperty
(
value
=
"rfid表面号"
)
private
String
rfidSurfaceId
;
/**
* rfid卡号
*/
@ApiModelProperty
(
value
=
"rfid卡号"
)
private
String
rfidCardId
;
/**
* 所在单位
*/
@ApiModelProperty
(
value
=
"所在单位"
)
private
String
locationUnit
;
/**
* 所属单位
*/
@ApiModelProperty
(
value
=
"所属单位"
)
private
String
ownUnit
;
/**
* 创建用户id
*/
@CreatedBy
@ApiModelProperty
(
value
=
"创建用户id"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@CreatedDate
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 更新用户id
*/
@LastModifiedBy
@ApiModelProperty
(
value
=
"更新用户id"
)
private
Integer
updateUserId
;
/**
* 更新时间
*/
@LastModifiedDate
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
/**
* 删除标记(0:未删除,1:已删除)
*/
@ApiModelProperty
(
value
=
"删除标记(0:未删除,1:已删除)"
)
private
Integer
deleteTag
=
0
;
@ApiModelProperty
(
value
=
"库房位置"
,
notes
=
"默认是库房"
)
private
String
storageLocation
;
@ApiModelProperty
(
value
=
"装备存放位置Id"
,
notes
=
"默认是库房"
)
private
Integer
storageLocationId
;
@ApiModelProperty
(
value
=
"DeviceLibraryPosition名称"
,
notes
=
""
)
private
String
deviceLibraryPositionName
;
@ApiModelProperty
(
value
=
"位置信息"
,
notes
=
"{x, y, z}"
)
@Column
(
name
=
"Device_Library_Position_Message"
,
columnDefinition
=
"TEXT"
)
private
String
deviceLibraryPositionMessage
;
@ApiModelProperty
(
value
=
"旋转信息"
,
notes
=
"{x, y, z}"
)
@Column
(
name
=
"Rotation"
,
columnDefinition
=
"TEXT"
)
private
String
rotation
;
@ApiModelProperty
(
value
=
"是否在机柜中 "
,
notes
=
"0 是 1 否"
)
private
Integer
ifCabinet
=
1
;
@ApiModelProperty
(
value
=
"在几号机柜里"
,
notes
=
"1"
)
private
Integer
cabinetPosition
;
@ApiModelProperty
(
value
=
"u位"
,
notes
=
"1"
)
private
Integer
uNum
;
@ApiModelProperty
(
"旋转信息vo"
)
@Transient
private
DeviceLibraryPositionMessageVo
deviceLibraryPositionMessageVo
;
@ApiModelProperty
(
"位置信息vo"
)
@Transient
private
RotationVo
rotationVo
;
}
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceLibraryPositionMessageVo.java
0 → 100644
浏览文件 @
adf034f2
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
vo
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.stereotype.Repository
;
/**
* @author zsp
* @create 2021/12/13 16:46
*/
@Data
@ApiModel
(
"位置信息"
)
@Repository
public
class
DeviceLibraryPositionMessageVo
{
@ApiModelProperty
(
"位置信息"
)
private
String
x
;
private
String
y
;
private
String
z
;
public
String
toJson
(){
return
JacksonUtil
.
toJSon
(
this
);
}
}
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/RotationVo.java
0 → 100644
浏览文件 @
adf034f2
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
vo
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.stereotype.Repository
;
/**
* @author zsp
*/
@Data
@ApiModel
(
"旋转信息"
)
@Repository
public
class
RotationVo
{
@ApiModelProperty
(
"位置信息"
)
private
String
x
;
private
String
y
;
private
String
z
;
public
String
toJson
(){
return
JacksonUtil
.
toJSon
(
this
);
}
}
dev-packing/src/main/java/com/tykj/dev/device/packing/controller/PackingController.java
浏览文件 @
adf034f2
...
...
@@ -1008,7 +1008,7 @@ public class PackingController {
packingLogService
.
add
(
packingLog
);
packingLibrary
.
setFileDb
(
FilesUtil
.
stringFileToList
(
packingLibraryUpdateVo
.
getFileList
()));
}
packingLibraryService
.
update
(
packingLibrary
);
PackingLibrary
library
=
packingLibraryService
.
update
(
packingLibrary
);
//发送阅知信息
List
<
Integer
>
userIds
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
// originalMap.entrySet().forEach(
...
...
@@ -1022,7 +1022,7 @@ public class PackingController {
MessageBto
messageBto
=
new
MessageBto
(
0
,
1
,
"修改"
+
packingLibraryUpdateVo
.
getModel
()
+
"列装信息:原"
+
mapToString
(
originalMap
)
+
"-->现"
+
mapToString
(
nowMap
),
userIds
,
0
);
messageService
.
add
(
messageBto
);
}
return
ResponseEntity
.
ok
(
"编辑成功"
);
return
ResponseEntity
.
ok
(
library
);
}
...
...
dev-storage/src/main/java/com/tykj/dev/device/storage/controller/StorageBillController.java
浏览文件 @
adf034f2
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论