Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
eea9b06b
提交
eea9b06b
authored
5月 13, 2021
作者:
Matrix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[核查模块] 重构了统一跳转的接口
上级
a93f8d7d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
190 行增加
和
7 行删除
+190
-7
CheckType.java
...va/com/tykj/dev/device/confirmcheck/common/CheckType.java
+2
-2
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+0
-0
CheckAreaStatVo.java
...kj/dev/device/confirmcheck/entity/vo/CheckAreaStatVo.java
+46
-5
LinkCheckDetail.java
...kj/dev/device/confirmcheck/entity/vo/LinkCheckDetail.java
+25
-0
LinkExamDetail.java
...ykj/dev/device/confirmcheck/entity/vo/LinkExamDetail.java
+35
-0
LinkVo.java
...va/com/tykj/dev/device/confirmcheck/entity/vo/LinkVo.java
+40
-0
RevAreaStat.java
...m/tykj/dev/device/confirmcheck/entity/vo/RevAreaStat.java
+42
-0
没有找到文件。
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/common/CheckType.java
浏览文件 @
eea9b06b
...
...
@@ -16,11 +16,11 @@ public enum CheckType {
/**
* 自动核查
*/
CT_CHECK
(
1
,
"核查"
),
CT_CHECK
(
0
,
"核查"
),
/**
* 手动核查
*/
CT_EXAM
(
2
,
"检查"
);
CT_EXAM
(
1
,
"检查"
);
private
final
Integer
id
;
private
final
String
name
;
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
eea9b06b
差异被折叠。
点击展开。
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/CheckAreaStatVo.java
浏览文件 @
eea9b06b
...
...
@@ -4,6 +4,7 @@ import lombok.AllArgsConstructor;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.Accessors
;
import
org.springframework.objenesis.ObjenesisHelper
;
import
javax.validation.constraints.NotNull
;
...
...
@@ -87,15 +88,26 @@ public class CheckAreaStatVo implements Cloneable {
* @throws IllegalArgumentException 在合并的地区名不同或者统计账单id不同时会抛出(初始账单合并除外,即this.detailId=0)
*/
public
CheckAreaStatVo
reduce
(
@NotNull
CheckAreaStatVo
other
)
{
// 合并的两个对象地区与账单id必须相同
if
(!
this
.
areaName
.
equals
(
other
.
areaName
)
||
this
.
areaStatId
!=
other
.
areaStatId
)
{
if
(!
this
.
areaName
.
equals
(
other
.
areaName
)
||
this
.
areaDetailId
!=
other
.
areaDetailId
)
{
//初始化账单的话则不用抛出异常,将other的detailId赋予即可
if
(
this
.
areaDetailId
==
0
)
{
this
.
areaDetailId
=
other
.
area
Stat
Id
;
this
.
areaDetailId
=
other
.
area
Detail
Id
;
}
else
{
throw
new
IllegalArgumentException
(
String
.
format
(
"要合并的两个地区统计数据的areaName与areaDetailId必须保持一致,"
+
"你提供的分别是areaName = %s 与 %s , areaDetailId = %d 与 %d %n"
,
this
.
areaName
,
other
.
areaName
,
this
.
areaDetailId
,
other
.
areaDetailId
));
}
}
if
(!
this
.
areaName
.
equals
(
other
.
areaName
)
||
this
.
areaStatId
!=
other
.
areaStatId
)
{
//初始化账单的话则不用抛出异常,将other的detailId赋予即可
if
(
this
.
areaStatId
==
0
)
{
this
.
areaStatId
=
other
.
areaStatId
;
}
else
{
throw
new
IllegalArgumentException
(
String
.
format
(
"要合并的两个地区统计数据的areaName与areaStatId必须保持一致,"
+
"你提供的分别是areaName = %s 与 %s , areaStatId = %d 与 %d %n"
,
this
.
areaName
,
other
.
areaName
,
this
.
areaStatId
,
other
.
areaStatId
));
}
}
...
...
@@ -119,11 +131,10 @@ public class CheckAreaStatVo implements Cloneable {
@SuppressWarnings
(
"DuplicatedCode"
)
public
CheckAreaStatVo
cleanReduce
(
@NotNull
CheckAreaStatVo
other
)
{
// 合并的两个对象地区与账单id必须相同
if
(!
this
.
areaName
.
equals
(
other
.
areaName
)
||
this
.
area
StatId
!=
other
.
areaStat
Id
)
{
if
(!
this
.
areaName
.
equals
(
other
.
areaName
)
||
this
.
area
DetailId
!=
other
.
areaDetail
Id
)
{
//初始化账单的话则不用抛出异常,将other的detailId赋予即可
if
(
this
.
areaDetailId
==
0
)
{
this
.
areaDetailId
=
other
.
areaDetailId
;
// this.areaStatId = other.areaStatId;
}
else
{
throw
new
IllegalArgumentException
(
String
.
format
(
"要合并的两个地区统计数据的areaName与areaDetailId必须保持一致,"
+
...
...
@@ -132,6 +143,18 @@ public class CheckAreaStatVo implements Cloneable {
}
}
if
(!
this
.
areaName
.
equals
(
other
.
areaName
)
||
this
.
areaStatId
!=
other
.
areaStatId
)
{
//初始化账单的话则不用抛出异常,将other的detailId赋予即可
if
(
this
.
areaStatId
==
0
)
{
this
.
areaStatId
=
other
.
areaStatId
;
}
else
{
throw
new
IllegalArgumentException
(
String
.
format
(
"要合并的两个地区统计数据的areaName与areaStatId必须保持一致,"
+
"你提供的分别是areaName = %s 与 %s , areaStatId = %d 与 %d %n"
,
this
.
areaName
,
other
.
areaName
,
this
.
areaStatId
,
other
.
areaStatId
));
}
}
CheckAreaStatVo
reducedVo
=
new
CheckAreaStatVo
(
this
);
reducedVo
.
actualCount
+=
other
.
actualCount
;
reducedVo
.
comProgress
=
other
.
comProgress
;
...
...
@@ -149,4 +172,22 @@ public class CheckAreaStatVo implements Cloneable {
this
.
comSituation
=
other
.
getComSituation
();
return
this
;
}
public
CheckAreaStatVo
combine
(
CheckAreaStatVo
other
)
{
this
.
areaName
=
other
.
getAreaName
();
this
.
supposeCount
+=
other
.
getSupposeCount
();
this
.
actualCount
+=
other
.
getActualCount
();
if
(
other
.
comProgress
==
1
){
this
.
comProgress
=
1
;
}
if
(
other
.
comSituation
==
1
){
this
.
comSituation
=
1
;
}
return
this
;
}
public
RevAreaStat
reverse
(){
return
new
RevAreaStat
(
areaName
,
actualCount
,
supposeCount
,
comProgress
,
comSituation
);
}
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/LinkCheckDetail.java
0 → 100644
浏览文件 @
eea9b06b
package
com
.
tykj
.
dev
.
device
.
confirmcheck
.
entity
.
vo
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* LinkCheckDetail.
*
* @author Matrix <xhyrzldf@gmail.com>
* @since 2021/5/13 at 7:50 下午
*/
@NoArgsConstructor
@AllArgsConstructor
@Data
public
class
LinkCheckDetail
{
private
String
checkUnit
;
private
String
checkSituation
;
private
String
checkResult
;
private
int
remark
;
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/LinkExamDetail.java
0 → 100644
浏览文件 @
eea9b06b
package
com
.
tykj
.
dev
.
device
.
confirmcheck
.
entity
.
vo
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* LinkExamDetail.
*
* @author Matrix <xhyrzldf@gmail.com>
* @since 2021/5/13 at 8:54 下午
*/
@NoArgsConstructor
@AllArgsConstructor
@Data
public
class
LinkExamDetail
{
/**
* 检查组名称
*/
private
String
examName
;
/**
* 检查组成员
*/
private
String
examUser
;
private
String
checkUnit
;
private
String
checkSituation
;
private
String
checkResult
;
private
int
remark
;
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/LinkVo.java
0 → 100644
浏览文件 @
eea9b06b
package
com
.
tykj
.
dev
.
device
.
confirmcheck
.
entity
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
* StatLinkVo.
*
* @author Matrix <xhyrzldf@gmail.com>
* @since 2021/5/13 at 7:43 下午
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@ApiModel
(
"统一跳转对象"
)
public
class
LinkVo
{
/**
* 1 省统计 2 市检查 3 详情跳转
*/
private
int
type
;
private
LocalDate
endTime
;
private
List
<
LinkCheckDetail
>
lcDetail
;
private
List
<
LinkExamDetail
>
leDetail
;
private
int
detailId
;
public
LinkVo
(
int
type
,
LocalDate
endTime
)
{
this
.
type
=
type
;
this
.
endTime
=
endTime
;
}
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/RevAreaStat.java
0 → 100644
浏览文件 @
eea9b06b
package
com
.
tykj
.
dev
.
device
.
confirmcheck
.
entity
.
vo
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* RevAreaStat.
*
* @author Matrix <xhyrzldf@gmail.com>
* @since 2021/5/13 at 8:00 下午
*/
@NoArgsConstructor
@AllArgsConstructor
@Data
public
class
RevAreaStat
{
/**
* 地区名称
*/
private
String
areaName
;
/**
* 实查数量
*/
private
int
actualCount
;
/**
* 应查数量
*/
private
int
supposeCount
;
/**
* 完成进度 0-待办 , 1-进行中, 2-已完成
*/
private
int
comProgress
;
/**
* 完成情况 0-无误 1-有异常
*/
private
int
comSituation
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论