Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
97e3b5af
提交
97e3b5af
authored
12月 30, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(装备模块,3D模块): 新增修改存放位置的接口
新增修改存放位置的接口
上级
06d4ee51
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
56 行增加
和
23 行删除
+56
-23
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+21
-2
BackController.java
.../com/tykj/dev/device/allot/controller/BackController.java
+20
-1
DeviceLibraryPositionController.java
...e/library/controller/DeviceLibraryPositionController.java
+4
-0
DeviceLibraryPositionDao.java
...v/device/library/repository/DeviceLibraryPositionDao.java
+1
-1
DeviceLibraryPositionService.java
.../device/library/service/DeviceLibraryPositionService.java
+1
-1
DeviceLibraryPositionServiceImpl.java
...ibrary/service/impl/DeviceLibraryPositionServiceImpl.java
+9
-18
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+0
-0
SelfCheckController.java
.../dev/device/selfcheck/controller/SelfCheckController.java
+0
-0
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
97e3b5af
...
...
@@ -9,6 +9,7 @@ import com.tykj.dev.device.allot.subject.domin.AllotBill;
import
com.tykj.dev.device.allot.subject.vo.*
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.service.DeviceLibraryPositionService
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.service.DeviceLogService
;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
...
...
@@ -51,6 +52,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -115,7 +117,7 @@ public class AllotBillController {
@Autowired
private
UserPublicService
userService
;
@
Autowired
@
Resource
private
ConfigCache
configCache
;
@Autowired
...
...
@@ -130,9 +132,12 @@ public class AllotBillController {
@Autowired
private
PackingController
packingController
;
@
Autowired
@
Resource
private
UnitsCache
unitsCache
;
@Resource
private
DeviceLibraryPositionService
deviceLibraryPositionService
;
@ApiOperation
(
value
=
"导入二维码获取配发装备"
,
notes
=
"可以通过这个接口导入二维码获取配发装备"
)
@PostMapping
(
value
=
"/load"
)
public
ResponseEntity
loadDevice
(
@RequestBody
RfidVo
rfidVo
)
{
...
...
@@ -488,6 +493,7 @@ public class AllotBillController {
//分隔装备id信息
String
deviceIdDetail
=
allotReceiveVo
.
getReceiveCheckDetail
();
String
[]
strings
=
deviceIdDetail
.
split
(
"x"
);
List
<
Integer
>
deviceIds
=
new
ArrayList
<>();
for
(
String
s
:
strings
)
{
if
(
s
.
length
()
>=
2
)
{
//接收无误
...
...
@@ -500,6 +506,9 @@ public class AllotBillController {
deviceLibraryEntity
.
setLifeStatus
(
2
);
deviceLibraryEntity
.
setOwnUnit
(
userUtils
.
getCurrentUserUnitName
());
deviceLibraryEntity
.
setManageStatus
(
1
);
deviceLibraryEntity
.
setStorageLocationId
(
null
);
deviceLibraryEntity
.
setStorageLocation
(
null
);
deviceIds
.
add
(
id
);
//如果接收时填写了生产号
if
(
allotReceiveVo
.
getMap
().
get
(
id
)
!=
null
)
{
deviceLibraryEntity
.
setProdNumber
(
allotReceiveVo
.
getMap
().
get
(
id
));
...
...
@@ -526,9 +535,15 @@ public class AllotBillController {
//存装备日志
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
id
,
"接收入库丢失"
,
fileVoList
,
taskBto
.
getId
(),
taskBto
.
getId
());
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setStorageLocationId
(
null
);
deviceLibraryEntity
.
setStorageLocation
(
null
);
deviceLibraryService
.
update
(
deviceLibraryEntity
);
deviceIds
.
add
(
id
);
}
}
//修改3D的存放位置
deviceLibraryPositionService
.
batchUpdateStorageLocation
(
null
,
null
,
deviceIds
);
}
//发送阅知信息
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userId
);
...
...
@@ -880,8 +895,12 @@ public class AllotBillController {
deviceLibrary
.
setLifeStatus
(
2
);
deviceLibrary
.
setOwnUnit
(
allotBill
.
getReceiveUnit
());
deviceLibrary
.
setManageStatus
(
1
);
deviceLibrary
.
setStorageLocationId
(
null
);
deviceLibrary
.
setStorageLocation
(
null
);
deviceLibraryService
.
update
(
deviceLibrary
);
});
//修改3D的库房
deviceLibraryPositionService
.
batchUpdateStorageLocation
(
null
,
null
,
ids
);
//经办人阅知
// if (idList.size()>0) {
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为经办人", idList, 1);
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/BackController.java
浏览文件 @
97e3b5af
...
...
@@ -10,6 +10,7 @@ import com.tykj.dev.device.allot.subject.vo.AllotBackReceiveVo;
import
com.tykj.dev.device.allot.subject.vo.AllotBillSaveVo
;
import
com.tykj.dev.device.allot.subject.vo.FileUploadVo
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.service.DeviceLibraryPositionService
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.service.DeviceLogService
;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
...
...
@@ -45,6 +46,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -94,9 +96,12 @@ public class BackController {
@Autowired
private
UnitsService
unitsService
;
@
Autowired
@
Resource
private
UnitsCache
unitsCache
;
@Resource
private
DeviceLibraryPositionService
deviceLibraryPositionService
;
@ApiOperation
(
value
=
"发起退回业务"
,
notes
=
"可以通过这个接口发起退回任务"
)
@PostMapping
(
value
=
"/addBackBill"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -308,6 +313,7 @@ public class BackController {
//分隔装备id信息
String
deviceIdDetail
=
allotBackReceiveVo
.
getReceiveCheckDetail
();
String
[]
strings
=
deviceIdDetail
.
split
(
"x"
);
List
<
Integer
>
deviceIds
=
new
ArrayList
<>();
for
(
String
s
:
strings
)
{
if
(
s
.
length
()
>=
2
)
{
//接收无误
...
...
@@ -320,6 +326,8 @@ public class BackController {
deviceLibraryEntity
.
setLifeStatus
(
2
);
deviceLibraryEntity
.
setOwnUnit
(
userUtils
.
getCurrentUserUnitName
());
deviceLibraryEntity
.
setManageStatus
(
1
);
deviceLibraryEntity
.
setStorageLocationId
(
null
);
deviceLibraryEntity
.
setStorageLocation
(
null
);
//判断是签字入库还是签章入库
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
();
if
(
allotBackReceiveVo
.
getRightSignatureId
()!=
null
&&!
""
.
equals
(
allotBackReceiveVo
.
getRightSignatureId
()))
{
...
...
@@ -332,6 +340,7 @@ public class BackController {
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryService
.
update
(
deviceLibraryEntity
);
deviceIds
.
add
(
id
);
}
//接收缺失
if
(
"0"
.
equals
(
s
.
substring
(
s
.
length
()
-
1
)))
{
...
...
@@ -339,14 +348,19 @@ public class BackController {
//改变装备状态
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
id
);
deviceLibraryEntity
.
setLifeStatus
(
11
);
deviceLibraryEntity
.
setStorageLocationId
(
null
);
deviceLibraryEntity
.
setStorageLocation
(
null
);
//存装备日志
// DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收入库丢失", fileVoList,taskBto.getId(),null);
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
id
,
"接收入库丢失"
,
fileVoList
,
taskBto
.
getId
(),
taskBto
.
getId
());
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryService
.
update
(
deviceLibraryEntity
);
deviceIds
.
add
(
id
);
}
}
}
//修改3D
deviceLibraryPositionService
.
batchUpdateStorageLocation
(
null
,
null
,
deviceIds
);
//发送阅知信息
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userId
);
// ids.addAll(userDao.findAllByUnitsId(userPublicService.findUnitIdByName(allotBackBill.getSendUnit())).stream()
...
...
@@ -512,8 +526,13 @@ public class BackController {
deviceLibrary
.
setLifeStatus
(
2
);
deviceLibrary
.
setOwnUnit
(
allotBackBill
.
getReceiveUnit
());
deviceLibrary
.
setManageStatus
(
1
);
deviceLibrary
.
setStorageLocationId
(
null
);
deviceLibrary
.
setStorageLocation
(
null
);
deviceLibraryService
.
update
(
deviceLibrary
);
});
//修改3D
deviceLibraryPositionService
.
batchUpdateStorageLocation
(
null
,
null
,
ids
);
//经办人阅知
// if (idList.size()>0) {
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为经办人", idList, 1);
...
...
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryPositionController.java
浏览文件 @
97e3b5af
...
...
@@ -8,6 +8,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.Map
;
...
...
@@ -26,6 +27,7 @@ public class DeviceLibraryPositionController {
@Resource
private
DeviceLibraryPositionService
deviceLibraryPositionService
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GetMapping
(
"/findByStorageLocationId"
)
@ApiOperation
(
value
=
"根据当前库房位置查询装备"
)
public
ResponseEntity
<
Map
<
String
,
Object
>>
findByStorageLocationId
(
@RequestBody
QueryTheWarehouseVo
queryTheWarehouseVo
){
...
...
@@ -33,6 +35,7 @@ public class DeviceLibraryPositionController {
return
ResponseEntity
.
ok
(
map
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@PostMapping
(
"/updateDeviceLibraryPosition"
)
@ApiOperation
(
value
=
"修改3D"
)
public
ResponseEntity
<
String
>
updateDeviceLibraryPosition
(
@RequestBody
DeviceLibraryPosition
deviceLibraryPosition
){
...
...
@@ -51,6 +54,7 @@ public class DeviceLibraryPositionController {
return
ResponseEntity
.
ok
(
deviceLibraryPosition
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GetMapping
(
"/delete"
)
@ApiOperation
(
value
=
"根据id删除"
)
public
ResponseEntity
<
String
>
deleteByPosition
(
Integer
id
){
...
...
dev-library/src/main/java/com/tykj/dev/device/library/repository/DeviceLibraryPositionDao.java
浏览文件 @
97e3b5af
...
...
@@ -24,7 +24,7 @@ public interface DeviceLibraryPositionDao extends JpaRepository<DeviceLibraryPos
DeviceLibraryPosition
findByDeviceId
(
Integer
deviceId
);
DeviceLibraryPosition
findAllByDeviceIdIn
(
List
<
Integer
>
deviceIds
);
List
<
DeviceLibraryPosition
>
findAllByDeviceIdIn
(
List
<
Integer
>
deviceIds
);
List
<
DeviceLibraryPosition
>
findAllByModel
(
String
model
);
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/DeviceLibraryPositionService.java
浏览文件 @
97e3b5af
...
...
@@ -28,7 +28,7 @@ public interface DeviceLibraryPositionService {
DeviceLibraryPosition
findByDeviceId
(
Integer
deviceId
);
DeviceLibraryPosition
findByDeviceIds
(
List
<
Integer
>
deviceIds
);
List
<
DeviceLibraryPosition
>
findByDeviceIds
(
List
<
Integer
>
deviceIds
);
/**
* 根据装备id修改库房位置
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryPositionServiceImpl.java
浏览文件 @
97e3b5af
...
...
@@ -12,6 +12,7 @@ import com.tykj.dev.device.library.subject.model.vo.QueryTheWarehouseVo;
import
com.tykj.dev.device.library.subject.vo.DeviceLibraryPositionMessageVo
;
import
com.tykj.dev.device.library.subject.vo.RotationVo
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.PageUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -52,7 +53,6 @@ public class DeviceLibraryPositionServiceImpl implements DeviceLibraryPositionSe
@Override
public
List
<
DeviceLibraryPosition
>
findByStorageLocationId
(
Integer
StorageLocationId
)
{
return
deviceLibraryPositionDao
.
findAllByStorageLocationId
(
StorageLocationId
);
}
@Override
...
...
@@ -81,15 +81,13 @@ public class DeviceLibraryPositionServiceImpl implements DeviceLibraryPositionSe
}
@Override
public
DeviceLibraryPosition
findByDeviceIds
(
List
<
Integer
>
deviceIds
)
{
public
List
<
DeviceLibraryPosition
>
findByDeviceIds
(
List
<
Integer
>
deviceIds
)
{
return
deviceLibraryPositionDao
.
findAllByDeviceIdIn
(
deviceIds
);
}
@Override
public
void
onlyUpdateStorageLocation
(
Integer
StorageLocationId
,
String
StorageLocation
,
Integer
deviceId
)
{
if
(
findByDeviceId
(
deviceId
)!=
null
){
deviceLibraryPositionDao
.
onlyUpdateStorageLocation
(
StorageLocationId
,
StorageLocation
,
deviceId
);
}
public
void
onlyUpdateStorageLocation
(
Integer
StorageLocationId
,
String
StorageLocation
,
Integer
deviceId
)
{
deviceLibraryPositionDao
.
onlyUpdateStorageLocation
(
StorageLocationId
,
StorageLocation
,
deviceId
);
}
@Override
...
...
@@ -99,7 +97,7 @@ public class DeviceLibraryPositionServiceImpl implements DeviceLibraryPositionSe
@Override
public
void
batchUpdateStorageLocation
(
Integer
StorageLocationId
,
String
StorageLocation
,
List
<
Integer
>
deviceIds
)
{
deviceLibraryPositionDao
.
batchUpdateStorageLocation
(
StorageLocationId
,
StorageLocation
,
deviceIds
);
deviceLibraryPositionDao
.
batchUpdateStorageLocation
(
StorageLocationId
,
StorageLocation
,
deviceIds
);
}
@Override
...
...
@@ -133,25 +131,18 @@ public class DeviceLibraryPositionServiceImpl implements DeviceLibraryPositionSe
}
@Override
public
void
updateModelByOldModel
(
String
oldModel
,
String
newModel
)
{
List
<
DeviceLibraryPosition
>
libraryPositions
=
findByModel
(
oldModel
);
if
(!
libraryPositions
.
isEmpty
()){
deviceLibraryPositionDao
.
updateModelByOldModel
(
oldModel
,
newModel
);
}
public
void
updateModelByOldModel
(
String
oldModel
,
String
newModel
)
{
deviceLibraryPositionDao
.
updateModelByOldModel
(
oldModel
,
newModel
);
}
@Override
public
void
updateName
(
String
name
,
Integer
deviceId
)
{
if
(
findByDeviceId
(
deviceId
)!=
null
){
deviceLibraryPositionDao
.
updateName
(
name
,
deviceId
);
}
deviceLibraryPositionDao
.
updateName
(
name
,
deviceId
);
}
@Override
public
void
updateSeqNumber
(
String
seqNumber
,
Integer
deviceId
)
{
if
(
findByDeviceId
(
deviceId
)!=
null
){
deviceLibraryPositionDao
.
updateSeqNumber
(
seqNumber
,
deviceId
);
}
deviceLibraryPositionDao
.
updateSeqNumber
(
seqNumber
,
deviceId
);
}
@Override
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
97e3b5af
差异被折叠。
点击展开。
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/SelfCheckController.java
浏览文件 @
97e3b5af
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论