Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
d59d5c53
提交
d59d5c53
authored
5月 24, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(日常检查模块): 新增众多接口
新增众多接口
上级
9151c603
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
347 行增加
和
19 行删除
+347
-19
SelfCheckController.java
.../dev/device/selfcheck/controller/SelfCheckController.java
+0
-0
HistoryDailyDeviceBillDao.java
...evice/selfcheck/repository/HistoryDailyDeviceBillDao.java
+22
-0
HistoryDeviceBillDao.java
...dev/device/selfcheck/repository/HistoryDeviceBillDao.java
+21
-0
HistoryDailyDeviceBillService.java
...vice/selfcheck/service/HistoryDailyDeviceBillService.java
+26
-0
HistoryDeviceBillService.java
...ev/device/selfcheck/service/HistoryDeviceBillService.java
+26
-0
HistoryDailyDeviceBillServiceImpl.java
...check/service/impl/HistoryDailyDeviceBillServiceImpl.java
+24
-0
HistoryDeviceBillServiceImpl.java
.../selfcheck/service/impl/HistoryDeviceBillServiceImpl.java
+30
-0
DailyCheckBill.java
...kj/dev/device/selfcheck/subject/domin/DailyCheckBill.java
+1
-5
HistoryDailyDeviceBill.java
...evice/selfcheck/subject/domin/HistoryDailyDeviceBill.java
+78
-0
HistoryDeviceBill.java
...dev/device/selfcheck/subject/domin/HistoryDeviceBill.java
+79
-0
SelfCheckSaveVo.java
...tykj/dev/device/selfcheck/subject/vo/SelfCheckSaveVo.java
+9
-0
TaskSelectController.java
...ev/device/taskselect/controller/TaskSelectController.java
+31
-14
没有找到文件。
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/SelfCheckController.java
浏览文件 @
d59d5c53
差异被折叠。
点击展开。
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/repository/HistoryDailyDeviceBillDao.java
0 → 100644
浏览文件 @
d59d5c53
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
repository
;
import
com.tykj.dev.device.selfcheck.subject.domin.HistoryDailyDeviceBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.HistoryDeviceBill
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
java.util.List
;
/**
* @author zsp
* @create 2022/5/23 9:22
*/
public
interface
HistoryDailyDeviceBillDao
extends
JpaRepository
<
HistoryDailyDeviceBill
,
Integer
>,
JpaSpecificationExecutor
<
HistoryDailyDeviceBill
>
{
/**
* 根据业务id和业务类型查询
* @param billId 业务id
* @return 实体对象
*/
List
<
HistoryDailyDeviceBill
>
findAllByBillId
(
Integer
billId
);
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/repository/HistoryDeviceBillDao.java
0 → 100644
浏览文件 @
d59d5c53
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
repository
;
import
com.tykj.dev.device.selfcheck.subject.domin.HistoryDeviceBill
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
java.util.List
;
/**
* @author zsp
* @create 2022/5/23 9:22
*/
public
interface
HistoryDeviceBillDao
extends
JpaRepository
<
HistoryDeviceBill
,
Integer
>,
JpaSpecificationExecutor
<
HistoryDeviceBill
>
{
/**
* 根据业务id和业务类型查询
* @param billId 业务id
* @return 实体对象
*/
List
<
HistoryDeviceBill
>
findAllByBillId
(
Integer
billId
);
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/HistoryDailyDeviceBillService.java
0 → 100644
浏览文件 @
d59d5c53
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
service
;
import
com.tykj.dev.device.selfcheck.subject.domin.HistoryDeviceBill
;
import
java.util.List
;
/**
* @author zsp
* @create 2022/5/23 14:57
*/
public
interface
HistoryDailyDeviceBillService
{
/**
* 批量保存
* @param historyDeviceBillList historyDeviceBillList
*/
void
batchSave
(
List
<
HistoryDeviceBill
>
historyDeviceBillList
);
/**
* 根据业务id和业务类型查询
* @param billId 业务id
* @return 实体对象
*/
List
<
HistoryDeviceBill
>
selectByBillId
(
Integer
billId
);
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/HistoryDeviceBillService.java
0 → 100644
浏览文件 @
d59d5c53
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
service
;
import
com.tykj.dev.device.selfcheck.subject.domin.HistoryDeviceBill
;
import
java.util.List
;
/**
* @author zsp
* @create 2022/5/23 14:57
*/
public
interface
HistoryDeviceBillService
{
/**
* 批量保存
* @param historyDeviceBillList historyDeviceBillList
*/
void
batchSave
(
List
<
HistoryDeviceBill
>
historyDeviceBillList
);
/**
* 根据业务id和业务类型查询
* @param billId 业务id
* @return 实体对象
*/
List
<
HistoryDeviceBill
>
selectByBillId
(
Integer
billId
);
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/impl/HistoryDailyDeviceBillServiceImpl.java
0 → 100644
浏览文件 @
d59d5c53
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
service
.
impl
;
import
com.tykj.dev.device.selfcheck.service.HistoryDailyDeviceBillService
;
import
com.tykj.dev.device.selfcheck.subject.domin.HistoryDeviceBill
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @author zsp
* @create 2022/5/23 16:18
*/
@Service
public
class
HistoryDailyDeviceBillServiceImpl
implements
HistoryDailyDeviceBillService
{
@Override
public
void
batchSave
(
List
<
HistoryDeviceBill
>
historyDeviceBillList
)
{
}
@Override
public
List
<
HistoryDeviceBill
>
selectByBillId
(
Integer
billId
)
{
return
null
;
}
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/impl/HistoryDeviceBillServiceImpl.java
0 → 100644
浏览文件 @
d59d5c53
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
service
.
impl
;
import
com.tykj.dev.device.selfcheck.repository.HistoryDeviceBillDao
;
import
com.tykj.dev.device.selfcheck.service.HistoryDeviceBillService
;
import
com.tykj.dev.device.selfcheck.subject.domin.HistoryDeviceBill
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author zsp
* @create 2022/5/23 14:58
*/
@Service
public
class
HistoryDeviceBillServiceImpl
implements
HistoryDeviceBillService
{
@Resource
private
HistoryDeviceBillDao
historyDeviceBillDao
;
@Override
public
void
batchSave
(
List
<
HistoryDeviceBill
>
historyDeviceBillList
)
{
historyDeviceBillDao
.
saveAll
(
historyDeviceBillList
);
}
@Override
public
List
<
HistoryDeviceBill
>
selectByBillId
(
Integer
billId
)
{
return
historyDeviceBillDao
.
findAllByBillId
(
billId
);
}
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/domin/DailyCheckBill.java
浏览文件 @
d59d5c53
...
...
@@ -38,11 +38,7 @@ public class DailyCheckBill {
@ApiModelProperty
(
name
=
"主键id"
)
@Column
(
columnDefinition
=
"integer NOT NULL AUTO_INCREMENT"
)
private
Integer
id
;
/**
* 自查周期(1:月度,2:季度,3:年度,0:未设定周期)
*/
@ApiModelProperty
(
value
=
"自查周期(1:月度,2:季度,3:年度,0:未设定周期)"
)
private
Integer
cycle
;
/**
* 自查标题
*/
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/domin/HistoryDailyDeviceBill.java
0 → 100644
浏览文件 @
d59d5c53
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
subject
.
domin
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
javax.persistence.*
;
/**
* @author zsp
* @create 2022/5/23 14:37
*/
@Data
@Entity
@EntityListeners
(
AuditingEntityListener
.
class
)
@ApiModel
(
"存放日常检查历史设备单据表"
)
public
class
HistoryDailyDeviceBill
{
/**
* 主键id
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
@ApiModelProperty
(
name
=
"主键id"
)
@Column
(
columnDefinition
=
"integer NOT NULL AUTO_INCREMENT"
)
private
Integer
id
;
/**
* 装备id
*/
@ApiModelProperty
(
value
=
"装备id"
)
private
Integer
deviceId
;
/**
* 型号
*/
@ApiModelProperty
(
value
=
"型号"
)
private
String
model
;
/**
* 装备名称
*/
@ApiModelProperty
(
value
=
"装备名称"
)
private
String
name
;
/**
* 装备序列号
*/
@ApiModelProperty
(
value
=
"装备序列号"
)
private
String
seqNumber
;
/**
* rfid卡号
*/
@ApiModelProperty
(
value
=
"rfid卡号"
)
private
String
rfidCardId
;
/**
* 所在单位
*/
@ApiModelProperty
(
value
=
"所在单位"
)
private
String
locationUnit
;
/**
* 所属单位
*/
@ApiModelProperty
(
value
=
"所属单位"
)
private
String
ownUnit
;
/**
* 设备的状态
*/
@ApiModelProperty
(
value
=
"设备的状态"
,
example
=
"0 缺失 1 正常 2 新增"
)
private
Integer
deviceStatus
;
@ApiModelProperty
(
value
=
"业务id"
)
private
Integer
billId
;
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/domin/HistoryDeviceBill.java
0 → 100644
浏览文件 @
d59d5c53
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
subject
.
domin
;
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.jpa.domain.support.AuditingEntityListener
;
import
javax.persistence.*
;
/**
* @author zsp
* @create 2022/5/23 14:37
*/
@Data
@Entity
@EntityListeners
(
AuditingEntityListener
.
class
)
@ApiModel
(
"存放历史设备单据表"
)
public
class
HistoryDeviceBill
{
/**
* 主键id
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
@ApiModelProperty
(
name
=
"主键id"
)
@Column
(
columnDefinition
=
"integer NOT NULL AUTO_INCREMENT"
)
private
Integer
id
;
/**
* 装备id
*/
@ApiModelProperty
(
value
=
"装备id"
)
private
Integer
deviceId
;
/**
* 型号
*/
@ApiModelProperty
(
value
=
"型号"
)
private
String
model
;
/**
* 装备名称
*/
@ApiModelProperty
(
value
=
"装备名称"
)
private
String
name
;
/**
* 装备序列号
*/
@ApiModelProperty
(
value
=
"装备序列号"
)
private
String
seqNumber
;
/**
* rfid卡号
*/
@ApiModelProperty
(
value
=
"rfid卡号"
)
private
String
rfidCardId
;
/**
* 所在单位
*/
@ApiModelProperty
(
value
=
"所在单位"
)
private
String
locationUnit
;
/**
* 所属单位
*/
@ApiModelProperty
(
value
=
"所属单位"
)
private
String
ownUnit
;
/**
* 设备的状态
*/
@ApiModelProperty
(
value
=
"设备的状态"
,
example
=
"0 缺失 1 正常 2 新增"
)
private
Integer
deviceStatus
;
@ApiModelProperty
(
value
=
"业务id"
)
private
Integer
billId
;
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/vo/SelfCheckSaveVo.java
浏览文件 @
d59d5c53
...
...
@@ -56,9 +56,18 @@ public class SelfCheckSaveVo {
@ApiModelProperty
(
name
=
"自查详情"
,
example
=
"10x21x"
,
value
=
"自查详情(装备主键id+核对结果(0缺失1无误2新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增"
)
private
String
checkDetail
;
@ApiModelProperty
(
name
=
"自查详情 1 正常"
)
private
List
<
DeviceLibrary
>
checkDeviceList1
;
@ApiModelProperty
(
name
=
"自查详情 0 缺失"
)
private
List
<
DeviceLibrary
>
checkDeviceList0
;
@ApiModelProperty
(
name
=
"新增未记录装备RFID列表"
)
private
List
<
String
>
newDeviceList
;
@ApiModelProperty
(
name
=
"新增未记录装备RFID列表"
)
private
List
<
DeviceLibrary
>
newDeviceLibraryList
;
@ApiModelProperty
(
value
=
"检查附件名"
)
private
List
<
FileRet
>
checkFiles
;
...
...
dev-taskselect/src/main/java/com/tykj/dev/device/taskselect/controller/TaskSelectController.java
浏览文件 @
d59d5c53
...
...
@@ -26,7 +26,9 @@ import com.tykj.dev.device.repair.service.RepairBackBillService;
import
com.tykj.dev.device.repair.service.RepairBillService
;
import
com.tykj.dev.device.repair.subject.domin.RepairBackBill
;
import
com.tykj.dev.device.repair.subject.domin.RepairBill
;
import
com.tykj.dev.device.selfcheck.service.HistoryDeviceBillService
;
import
com.tykj.dev.device.selfcheck.service.SelfCheckBillService
;
import
com.tykj.dev.device.selfcheck.subject.domin.HistoryDeviceBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill
;
import
com.tykj.dev.device.storage.service.StorageBillService
;
import
com.tykj.dev.device.storage.subject.domin.StorageBill
;
...
...
@@ -37,6 +39,7 @@ import com.tykj.dev.device.task.subject.domin.Task;
import
com.tykj.dev.device.taskselect.vo.SignatureSaveVo
;
import
com.tykj.dev.device.user.cache.UserCache
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
...
...
@@ -117,6 +120,9 @@ public class TaskSelectController {
@Autowired
private
TaskDao
taskDao
;
@Resource
private
HistoryDeviceBillService
historyDeviceBillService
;
// @Autowired
// private ReadMachineBillService readMachineBillService;
//
...
...
@@ -307,7 +313,9 @@ public class TaskSelectController {
}
selfExaminationBillEntity
.
setCheckFileList
(
FilesUtil
.
stringFileToList
(
selfExaminationBillEntity
.
getCheckFiles
()));
list
.
add
(
selfExaminationBillEntity
);
String
str3
=
selfExaminationBillEntity
.
getCheckDetail
();
String
str4
=
selfExaminationBillEntity
.
getNewDeviceDetail
();
String
[]
split
;
if
(
str3
!=
null
)
{
...
...
@@ -332,23 +340,32 @@ public class TaskSelectController {
newDeviceList
.
add
(
d
);
}
}
//添加新增的
list
.
add
(
newDeviceList
);
}
if
(
str4
==
null
)
{
List
<
DeviceLibrary
>
newDeviceList
=
new
ArrayList
<>();
list
.
add
(
newDeviceList
);
}
//
if (str4 == null) {
//
List<DeviceLibrary> newDeviceList = new ArrayList<>();
//
list.add(newDeviceList);
//
}
List
<
DeviceLibrary
>
libraryEntities1
=
new
ArrayList
<>();
for
(
String
s
:
split
)
{
if
(
s
.
length
()
>=
2
)
{
Integer
id
=
Integer
.
parseInt
(
s
.
substring
(
0
,
s
.
length
()
-
1
));
Integer
checkResult
=
Integer
.
parseInt
(
s
.
substring
(
s
.
length
()
-
1
));
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryMap
.
get
(
id
);
deviceLibraryEntity
.
setCheckResult
(
checkResult
);
libraryEntities1
.
add
(
deviceLibraryEntity
);
}
}
list
.
add
(
libraryEntities1
);
// for (String s : split) {
// if (s.length() >= 2) {
// Integer id = Integer.parseInt(s.substring(0, s.length() - 1));
// Integer checkResult = Integer.parseInt(s.substring(s.length() - 1));
// DeviceLibrary deviceLibraryEntity = deviceLibraryMap.get(id);
// deviceLibraryEntity.setCheckResult(checkResult);
// libraryEntities1.add(deviceLibraryEntity);
// }
// }
List
<
HistoryDeviceBill
>
historyDeviceBillList
=
historyDeviceBillService
.
selectByBillId
(
billId
);
//过滤出1的
List
<
HistoryDeviceBill
>
billList1
=
historyDeviceBillList
.
stream
().
filter
(
historyDeviceBill
->
historyDeviceBill
.
getDeviceStatus
()
==
1
)
.
collect
(
Collectors
.
toList
());
// list.add(libraryEntities1);
list
.
add
(
billList1
);
if
(
selfExaminationBillEntity
.
getUnStockDetail
()!=
null
){
list
.
add
(
JacksonUtil
.
readValue
(
selfExaminationBillEntity
.
getUnStockDetail
(),
new
TypeReference
<
List
<
DeviceLibrary
>>()
{
}));
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论