Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
8534fab8
提交
8534fab8
authored
1月 13, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(装备模块): 修复了bug
修复了bug
上级
3573c833
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
53 行增加
和
8 行删除
+53
-8
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+2
-1
DeviceLibraryDao.java
.../tykj/dev/device/library/repository/DeviceLibraryDao.java
+6
-0
DeviceLibraryPositionDao.java
...v/device/library/repository/DeviceLibraryPositionDao.java
+9
-0
DeviceLibraryPositionService.java
.../device/library/service/DeviceLibraryPositionService.java
+1
-2
DeviceLibraryService.java
...tykj/dev/device/library/service/DeviceLibraryService.java
+1
-0
DeviceLibraryPositionServiceImpl.java
...ibrary/service/impl/DeviceLibraryPositionServiceImpl.java
+9
-0
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+17
-5
UpdatePostionMessageVO.java
...vice/library/subject/model/vo/UpdatePostionMessageVO.java
+7
-0
UpdateStorageLocationVo.java
...ev/device/library/subject/vo/UpdateStorageLocationVo.java
+1
-0
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
8534fab8
...
...
@@ -1220,7 +1220,8 @@ public class DeviceLibraryController {
@ApiOperation
(
value
=
"修改出库和入库(3D)"
,
notes
=
"修改出库和入库"
)
public
ResponseEntity
<
String
>
fnModifyWarehouseLocationsInBatches
(
@RequestBody
UpdateStorageLocationVo
updateStorageLocationVo
){
deviceLibraryService
.
updateStorageLocation
(
updateStorageLocationVo
);
String
s
=
updateStorageLocationVo
.
getStorageLocationId
()
!=
null
?
"入库成功"
:
"出库成功"
;
String
s
=
updateStorageLocationVo
.
getStorageLocationId
()
!=
null
?
"入库成功"
:
"出库成功"
;
return
ResponseEntity
.
ok
(
s
);
}
...
...
dev-library/src/main/java/com/tykj/dev/device/library/repository/DeviceLibraryDao.java
浏览文件 @
8534fab8
...
...
@@ -248,6 +248,12 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
int
updateStorageLocation
(
@Param
(
"storageLocation"
)
String
storageLocation
,
@Param
(
"storageLocationId"
)
Integer
storageLocationId
,
@Param
(
"deviceIds"
)
List
<
Integer
>
deviceIds
);
// @Transactional
// @Modifying
// @Query("update DeviceLibrary o set o.storageLocation = :storageLocation,o.storageLocationId = :storageLocationId where o.id in :deviceIds")
// int updateStorageLocation( @Param("storageLocation") String storageLocation,@Param("storageLocationId") Integer storageLocationId,
// @Param("deviceIds") List<Integer> deviceIds);
@Transactional
@Modifying
...
...
dev-library/src/main/java/com/tykj/dev/device/library/repository/DeviceLibraryPositionDao.java
浏览文件 @
8534fab8
...
...
@@ -30,5 +30,14 @@ public interface DeviceLibraryPositionDao extends JpaRepository<DeviceLibraryPos
@Param
(
"uNum"
)
String
uNum
,
@Param
(
"deviceId"
)
Integer
deviceId
);
@Transactional
@Modifying
@Query
(
"update DeviceLibraryPosition d set d.deviceLibraryPositionMessage = :deviceLibraryPositionMessage, "
+
"d.rotation = :rotation,d.uNum = :uNum ,d.cabinetPosition = null ,d.ifCabinet =0 where d.deviceId in :deviceIds"
)
int
fnUpdatePostionMessageList
(
@Param
(
"deviceLibraryPositionMessage"
)
String
deviceLibraryPositionMessage
,
@Param
(
"rotation"
)
String
rotation
,
@Param
(
"uNum"
)
String
uNum
,
@Param
(
"deviceIds"
)
List
<
Integer
>
deviceIds
);
}
dev-library/src/main/java/com/tykj/dev/device/library/service/DeviceLibraryPositionService.java
浏览文件 @
8534fab8
...
...
@@ -67,7 +67,6 @@ public interface DeviceLibraryPositionService {
*/
void
fnUpdatePostionMessage
(
List
<
UpdatePostionMessageVO
>
updatePostionMessageVO
);
void
fnUpdatePostionMessageList
(
UpdatePostionMessageVO
updatePostionMessageVO
);
}
dev-library/src/main/java/com/tykj/dev/device/library/service/DeviceLibraryService.java
浏览文件 @
8534fab8
...
...
@@ -564,4 +564,5 @@ public interface DeviceLibraryService {
*/
Map
<
String
,
Object
>
fnConditionQuery
(
QueryTheWarehouseVo
queryTheWarehouseVo
);
}
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryPositionServiceImpl.java
浏览文件 @
8534fab8
...
...
@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
/**
* @author zsp
...
...
@@ -76,4 +77,12 @@ public class DeviceLibraryPositionServiceImpl implements DeviceLibraryPositionSe
}
}
@Override
public
void
fnUpdatePostionMessageList
(
UpdatePostionMessageVO
updatePostionMessageVO
)
{
List
<
Integer
>
deviceIds
=
updatePostionMessageVO
.
getDeviceIds
();
String
json
=
updatePostionMessageVO
.
getDeviceLibraryPositionMessageVo
().
toJson
();
String
json1
=
updatePostionMessageVO
.
getRotationVo
().
toJson
();
deviceLibraryPositionDao
.
fnUpdatePostionMessageList
(
json
,
json1
,
updatePostionMessageVO
.
getUNum
(),
deviceIds
);
}
}
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
8534fab8
...
...
@@ -19,6 +19,7 @@ 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.model.vo.AllVO
;
import
com.tykj.dev.device.library.subject.model.vo.QueryTheWarehouseVo
;
import
com.tykj.dev.device.library.subject.model.vo.UpdatePostionMessageVO
;
import
com.tykj.dev.device.library.subject.vo.*
;
import
com.tykj.dev.device.library.utils.DeviceNumberUtils
;
import
com.tykj.dev.device.user.cache.UnitsCache
;
...
...
@@ -1175,12 +1176,13 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
}
@Override
@UpdateCache
public
void
updateStorageLocation
(
UpdateStorageLocationVo
updateStorageLocationVo
)
{
List
<
DeviceLogDto
>
deviceLogDtos
=
new
ArrayList
<>();
List
<
Integer
>
deviceIds
=
updateStorageLocationVo
.
getDeviceIds
();
Integer
userId
=
userUtils
.
getCurrentUserId
();
List
<
DeviceLogDto
>
deviceLogDtos
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
deviceIds
)){
//添加装备日志
deviceIds
.
forEach
(
integer
->
{
...
...
@@ -1196,16 +1198,26 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
updateStorageLocationVo
.
getStorageLocation
(),
null
,
userId
);
deviceLogDtos
.
add
(
deviceLogDto
);
}});
deviceLibraryDao
.
updateStorageLocation
(
updateStorageLocationVo
.
getStorageLocation
(),
updateStorageLocationVo
.
getStorageLocationId
(),
deviceIds
);
}
else
{
throw
new
ApiException
(
"请选择要修改的装备"
);
}
deviceLibraryDao
.
updateStorageLocation
(
updateStorageLocationVo
.
getStorageLocation
(),
updateStorageLocationVo
.
getStorageLocationId
(),
updateStorageLocationVo
.
getDeviceIds
());
//修改3d的部分字段
DeviceLibraryPositionMessageVo
deviceLibraryPositionMessageVo
=
new
DeviceLibraryPositionMessageVo
();
UpdatePostionMessageVO
updatePostionMessageVO
=
new
UpdatePostionMessageVO
();
updatePostionMessageVO
.
setDeviceLibraryPositionMessageVo
(
deviceLibraryPositionMessageVo
);
RotationVo
rotationVo
=
new
RotationVo
();
updatePostionMessageVO
.
setRotationVo
(
rotationVo
);
updatePostionMessageVO
.
setDeviceIds
(
updateStorageLocationVo
.
getDeviceIds
());
updatePostionMessageVO
.
setUNum
(
null
);
deviceLibraryPositionService
.
fnUpdatePostionMessageList
(
updatePostionMessageVO
);
CompletableFuture
.
runAsync
(()->{
deviceLogService
.
addAllLog
(
deviceLogDtos
);
});
// deviceLibraryPositionService.batchUpdateStorageLocation(updateStorageLocationVo.getStorageLocationId(),
// updateStorageLocationVo.getStorageLocation(),deviceIds);
}
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/model/vo/UpdatePostionMessageVO.java
浏览文件 @
8534fab8
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
model
.
vo
;
import
com.tykj.dev.device.library.subject.vo.DeviceLibraryPositionMessageVo
;
import
com.tykj.dev.device.library.subject.vo.RotationVo
;
import
com.tykj.dev.misc.base.CustomPage
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author zsp
* @create 2022/1/8 13:14
...
...
@@ -20,7 +23,11 @@ public class UpdatePostionMessageVO extends CustomPage {
@ApiModelProperty
(
value
=
"位置类vo"
,
example
=
"1"
)
private
DeviceLibraryPositionMessageVo
deviceLibraryPositionMessageVo
;
private
RotationVo
rotationVo
;
@ApiModelProperty
(
value
=
"u位"
,
notes
=
"1-1"
)
private
String
uNum
;
@ApiModelProperty
(
value
=
"装备id的集合"
)
private
List
<
Integer
>
deviceIds
;
}
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/UpdateStorageLocationVo.java
浏览文件 @
8534fab8
...
...
@@ -24,4 +24,5 @@ public class UpdateStorageLocationVo {
@ApiModelProperty
(
value
=
"要修改的库房位置id"
)
private
Integer
storageLocationId
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论