Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
07c8eab4
提交
07c8eab4
authored
5月 26, 2021
作者:
Matrix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[核查模块] 修复了Miss Z 点出的很多奇怪的问题以及奇怪的需求
上级
debb315a
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
105 行增加
和
14 行删除
+105
-14
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+0
-0
DeviceCheckDetail.java
.../device/confirmcheck/entity/domain/DeviceCheckDetail.java
+3
-3
CheckAreaStatVo.java
...kj/dev/device/confirmcheck/entity/vo/CheckAreaStatVo.java
+23
-4
CheckTitleAndTimeVo.java
...ev/device/confirmcheck/entity/vo/CheckTitleAndTimeVo.java
+3
-0
DetailVo.java
.../com/tykj/dev/device/confirmcheck/entity/vo/DetailVo.java
+24
-0
DeviceInLibVo.java
...tykj/dev/device/confirmcheck/entity/vo/DeviceInLibVo.java
+2
-1
DeviceCheckDetailDao.java
.../device/confirmcheck/repository/DeviceCheckDetailDao.java
+10
-0
ObjTransUtil.java
.../com/tykj/dev/device/confirmcheck/utils/ObjTransUtil.java
+40
-6
没有找到文件。
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
07c8eab4
差异被折叠。
点击展开。
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/domain/DeviceCheckDetail.java
浏览文件 @
07c8eab4
...
@@ -108,7 +108,7 @@ public class DeviceCheckDetail extends BaseEntity {
...
@@ -108,7 +108,7 @@ public class DeviceCheckDetail extends BaseEntity {
/**
/**
* 核查详情(装备主键id+核对结果(0缺失1无误2新增3不在库9未检查,字符-作为状态分隔符字符,作为分隔符))
* 核查详情(装备主键id+核对结果(0缺失1无误2新增3不在库9未检查,字符-作为状态分隔符字符,作为分隔符))
*/
*/
@Column
(
name
=
"check_detail"
,
columnDefinition
=
"TEXT"
)
@Column
(
name
=
"check_detail"
,
columnDefinition
=
"TEXT"
)
@ApiModelProperty
(
value
=
"核查详情(装备主键id+核对结果(0缺失1无误2新增3不在库9未检查,字符x作为分隔符)),例如1-2,2-2,意为主键id为1的装备缺失,为2的无误,为3的新增"
)
@ApiModelProperty
(
value
=
"核查详情(装备主键id+核对结果(0缺失1无误2新增3不在库9未检查,字符x作为分隔符)),例如1-2,2-2,意为主键id为1的装备缺失,为2的无误,为3的新增"
)
private
String
checkDetail
;
private
String
checkDetail
;
/**
/**
...
@@ -133,7 +133,7 @@ public class DeviceCheckDetail extends BaseEntity {
...
@@ -133,7 +133,7 @@ public class DeviceCheckDetail extends BaseEntity {
@ApiModelProperty
(
value
=
"区块链记录id"
)
@ApiModelProperty
(
value
=
"区块链记录id"
)
private
String
recordId
;
private
String
recordId
;
@Column
(
name
=
"check_files"
,
columnDefinition
=
"TEXT"
)
@Column
(
name
=
"check_files"
,
columnDefinition
=
"TEXT"
)
private
String
checkFiles
;
private
String
checkFiles
;
@Transient
@Transient
...
@@ -222,7 +222,7 @@ public class DeviceCheckDetail extends BaseEntity {
...
@@ -222,7 +222,7 @@ public class DeviceCheckDetail extends BaseEntity {
String
checkDetail
=
StringUtils
.
isEmpty
(
badCheckDetail
)
?
goodCheckDetail
:
goodCheckDetail
+
","
+
badCheckDetail
;
String
checkDetail
=
StringUtils
.
isEmpty
(
badCheckDetail
)
?
goodCheckDetail
:
goodCheckDetail
+
","
+
badCheckDetail
;
return
new
DeviceCheckDetail
(
return
new
DeviceCheckDetail
(
title
+
checkUnit
+
"核查详情单"
,
checkUnit
+
"核查详情单"
+
"%^&"
+
title
,
0
,
0
,
checkUserA
,
checkUserA
,
checkUserB
,
checkUserB
,
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/CheckAreaStatVo.java
浏览文件 @
07c8eab4
...
@@ -61,7 +61,11 @@ public class CheckAreaStatVo implements Cloneable {
...
@@ -61,7 +61,11 @@ public class CheckAreaStatVo implements Cloneable {
this
.
actualCount
=
vo
.
getActualCount
();
this
.
actualCount
=
vo
.
getActualCount
();
this
.
supposeCount
=
vo
.
getSupposeCount
();
this
.
supposeCount
=
vo
.
getSupposeCount
();
this
.
comProgress
=
vo
.
getComProgress
();
this
.
comProgress
=
vo
.
getComProgress
();
this
.
comSituation
=
vo
.
getComSituation
();
if
(
this
.
comSituation
==
1
||
vo
.
getComSituation
()
==
1
)
{
this
.
comSituation
=
1
;
}
else
{
this
.
comSituation
=
0
;
}
this
.
areaStatId
=
vo
.
getAreaStatId
();
this
.
areaStatId
=
vo
.
getAreaStatId
();
this
.
areaDetailId
=
vo
.
getAreaDetailId
();
this
.
areaDetailId
=
vo
.
getAreaDetailId
();
}
}
...
@@ -117,7 +121,12 @@ public class CheckAreaStatVo implements Cloneable {
...
@@ -117,7 +121,12 @@ public class CheckAreaStatVo implements Cloneable {
reducedVo
.
supposeCount
+=
other
.
supposeCount
;
reducedVo
.
supposeCount
+=
other
.
supposeCount
;
reducedVo
.
actualCount
+=
other
.
actualCount
;
reducedVo
.
actualCount
+=
other
.
actualCount
;
reducedVo
.
comProgress
=
other
.
comProgress
;
reducedVo
.
comProgress
=
other
.
comProgress
;
reducedVo
.
comSituation
=
other
.
comSituation
;
//0 无误 1异常
if
(
reducedVo
.
comSituation
==
1
||
other
.
comSituation
==
1
)
{
reducedVo
.
comSituation
=
1
;
}
else
{
reducedVo
.
comSituation
=
0
;
}
return
reducedVo
;
return
reducedVo
;
}
}
...
@@ -159,7 +168,12 @@ public class CheckAreaStatVo implements Cloneable {
...
@@ -159,7 +168,12 @@ public class CheckAreaStatVo implements Cloneable {
CheckAreaStatVo
reducedVo
=
new
CheckAreaStatVo
(
this
);
CheckAreaStatVo
reducedVo
=
new
CheckAreaStatVo
(
this
);
reducedVo
.
actualCount
+=
other
.
actualCount
;
reducedVo
.
actualCount
+=
other
.
actualCount
;
reducedVo
.
comProgress
=
other
.
comProgress
;
reducedVo
.
comProgress
=
other
.
comProgress
;
reducedVo
.
comSituation
=
other
.
comSituation
;
//0 无误 1异常
if
(
reducedVo
.
comSituation
==
1
||
other
.
comSituation
==
1
)
{
reducedVo
.
comSituation
=
1
;
}
else
{
reducedVo
.
comSituation
=
0
;
}
return
reducedVo
;
return
reducedVo
;
}
}
...
@@ -170,7 +184,12 @@ public class CheckAreaStatVo implements Cloneable {
...
@@ -170,7 +184,12 @@ public class CheckAreaStatVo implements Cloneable {
this
.
supposeCount
+=
other
.
getSupposeCount
();
this
.
supposeCount
+=
other
.
getSupposeCount
();
this
.
actualCount
+=
other
.
getActualCount
();
this
.
actualCount
+=
other
.
getActualCount
();
this
.
comProgress
=
other
.
getComProgress
();
this
.
comProgress
=
other
.
getComProgress
();
this
.
comSituation
=
other
.
getComSituation
();
//0 无误 1异常
if
(
this
.
comSituation
==
1
||
other
.
comSituation
==
1
)
{
this
.
comSituation
=
1
;
}
else
{
this
.
comSituation
=
0
;
}
return
this
;
return
this
;
}
}
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/CheckTitleAndTimeVo.java
浏览文件 @
07c8eab4
...
@@ -23,4 +23,7 @@ public class CheckTitleAndTimeVo {
...
@@ -23,4 +23,7 @@ public class CheckTitleAndTimeVo {
@ApiModelProperty
(
"截止时间"
)
@ApiModelProperty
(
"截止时间"
)
private
LocalDateTime
createTime
;
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/DetailVo.java
0 → 100644
浏览文件 @
07c8eab4
package
com
.
tykj
.
dev
.
device
.
confirmcheck
.
entity
.
vo
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.List
;
/**
* DetailVo.
*
* @author Matrix <xhyrzldf@gmail.com>
* @since 2021/5/26 at 7:06 下午
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
DetailVo
{
List
<
FileRet
>
checkFiles
;
DevLibVo
devLibVo
;
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/DeviceInLibVo.java
浏览文件 @
07c8eab4
...
@@ -30,7 +30,8 @@ public class DeviceInLibVo {
...
@@ -30,7 +30,8 @@ public class DeviceInLibVo {
private
String
rfidCardId
;
private
String
rfidCardId
;
/**
/**
* 0缺失1无误2新增3不在库9未检查
* 十位数 1 人工 2 自动
* 个位数 0缺失1无误2新增3不在库9未检查
*/
*/
private
int
proofResult
;
private
int
proofResult
;
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/repository/DeviceCheckDetailDao.java
浏览文件 @
07c8eab4
...
@@ -24,6 +24,16 @@ public interface DeviceCheckDetailDao extends JpaRepository<DeviceCheckDetail, I
...
@@ -24,6 +24,16 @@ public interface DeviceCheckDetailDao extends JpaRepository<DeviceCheckDetail, I
@Query
(
"update DeviceCheckDetail o set o.checkDetail=?2,o.checkResult = ?3,o.userAId =?4,o.userBId=?5,o.checkedCount=?6 where o.id=?1"
)
@Query
(
"update DeviceCheckDetail o set o.checkDetail=?2,o.checkResult = ?3,o.userAId =?4,o.userBId=?5,o.checkedCount=?6 where o.id=?1"
)
void
updateCheckDetail
(
Integer
id
,
String
checkDetail
,
String
checkResult
,
int
userAId
,
int
userBId
,
Integer
checkedCount
);
void
updateCheckDetail
(
Integer
id
,
String
checkDetail
,
String
checkResult
,
int
userAId
,
int
userBId
,
Integer
checkedCount
);
/**
* 根据id更新checkDetail 用于专管员B检查
*
* @param id detail id
* @param checkDetail 要更新的检查结果
*/
@Modifying
@Query
(
"update DeviceCheckDetail o set o.checkDetail=?2,o.checkResult = ?3,o.checkedCount=?4 where o.id=?1"
)
void
updateCheckDetail4Check
(
Integer
id
,
String
checkDetail
,
String
checkResult
,
Integer
checkedCount
);
@Modifying
@Modifying
@Query
(
"update DeviceCheckDetail o set o.checkStatus=?2 where o.id=?1"
)
@Query
(
"update DeviceCheckDetail o set o.checkStatus=?2 where o.id=?1"
)
int
updateCheckStatus
(
int
id
,
int
checkStatus
);
int
updateCheckStatus
(
int
id
,
int
checkStatus
);
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/utils/ObjTransUtil.java
浏览文件 @
07c8eab4
...
@@ -39,6 +39,8 @@ import java.io.IOException;
...
@@ -39,6 +39,8 @@ import java.io.IOException;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
java
.
util
.
stream
.
Collectors
.
toList
;
/**
/**
* ObjTransUtil.
* ObjTransUtil.
*
*
...
@@ -130,10 +132,28 @@ public class ObjTransUtil {
...
@@ -130,10 +132,28 @@ public class ObjTransUtil {
TaskBto
fatherTask
=
taskService
.
get
(
stat
.
getId
(),
BusinessEnum
.
CONFIRM_CHECK_STAT
.
id
);
TaskBto
fatherTask
=
taskService
.
get
(
stat
.
getId
(),
BusinessEnum
.
CONFIRM_CHECK_STAT
.
id
);
Integer
fatherTaskId
=
fatherTask
.
getId
();
Integer
fatherTaskId
=
fatherTask
.
getId
();
List
<
Task
>
childTasks
=
taskDao
.
findAllByParentTaskId
(
fatherTaskId
);
List
<
Task
>
childTask
=
taskDao
.
findAllByParentTaskId
(
fatherTaskId
);
long
total
=
childTasks
.
size
();
boolean
flag
=
false
;
boolean
confirmTaskisDone
=
false
;
for
(
Task
task
:
childTask
)
{
if
(
task
.
getTitle
().
contains
(
"统计确认待办任务"
))
{
if
(
task
.
getBillStatus
()
!=
9999
)
{
flag
=
true
;
}
else
{
confirmTaskisDone
=
true
;
}
}
}
// 3/3 -> 统计待确认 -> 省统计任务待完结
childTask
=
childTask
.
stream
().
filter
(
task
->
!
task
.
getTitle
().
contains
(
"统计确认待办任务"
))
.
collect
(
toList
());
long
total
=
childTask
.
size
();
long
done
=
childTask
s
.
stream
()
long
done
=
childTask
.
stream
()
.
filter
(
task
->
task
.
getBillStatus
().
equals
(
9999
))
.
filter
(
task
->
task
.
getBillStatus
().
equals
(
9999
))
.
count
();
.
count
();
...
@@ -143,7 +163,20 @@ public class ObjTransUtil {
...
@@ -143,7 +163,20 @@ public class ObjTransUtil {
if
(
stat
.
getCheckType
()
==
CheckType
.
CT_EXAM
&&
!
fatherTask
.
getBillStatus
().
equals
(
9999
))
{
if
(
stat
.
getCheckType
()
==
CheckType
.
CT_EXAM
&&
!
fatherTask
.
getBillStatus
().
equals
(
9999
))
{
completion
=
"核查完成待办结"
;
completion
=
"核查完成待办结"
;
}
else
{
}
else
{
completion
=
"核查完成"
;
if
(
flag
)
{
completion
=
"核查完成待确认"
;
}
else
{
// confirmTaskidDone 为true 代表此时等待最后的father任务 为false代表 flag = false 且isDone为false 代表整个节点里没有确认节点直接完结
if
(
confirmTaskisDone
)
{
if
(
fatherTask
.
getBillStatus
()
==
9999
)
{
completion
=
"核查完成"
;
}
else
{
completion
=
"核查完成待办结"
;
}
}
else
{
completion
=
"核查完成"
;
}
}
}
}
}
else
{
}
else
{
completion
=
done
+
"/"
+
total
;
completion
=
done
+
"/"
+
total
;
...
@@ -293,8 +326,9 @@ public class ObjTransUtil {
...
@@ -293,8 +326,9 @@ public class ObjTransUtil {
int
proofResult
=
Integer
.
parseInt
(
array
[
1
]);
int
proofResult
=
Integer
.
parseInt
(
array
[
1
]);
DeviceLibrary
device
=
deviceRepo
.
findById
(
deviceId
).
orElseThrow
(
DeviceLibrary
device
=
deviceRepo
.
findById
(
deviceId
).
orElseThrow
(
()
->
new
ApiException
(
ResponseEntity
.
badRequest
().
body
(
String
.
format
(
"检查到装备序号为%d的装备不在资料库中,请先执行入库操作!"
,
deviceId
)))).
setConfigName
();
()
->
new
ApiException
(
ResponseEntity
.
badRequest
().
body
(
String
.
format
(
"检查到装备序号为%d的装备不在资料库中,请先执行入库操作!"
,
deviceId
)))).
setConfigName
();
//依据proofResult 判断是否是在库装备
//依据proofResult的个位数 判断是否是在库装备
if
(
proofResult
==
3
)
{
int
digit
=
proofResult
%
10
;
if
(
digit
==
3
)
{
// 非在库装备
// 非在库装备
notInLibVoList
.
add
(
toCheckNotInLibVo
(
device
));
notInLibVoList
.
add
(
toCheckNotInLibVo
(
device
));
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论