Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
462e5f0f
提交
462e5f0f
authored
1月 13, 2021
作者:
Matrix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[核查模块] 增加发起核查功能
上级
518e146d
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
159 行增加
和
9 行删除
+159
-9
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+48
-3
CheckCheckVo.java
.../tykj/dev/device/confirmcheck/entity/vo/CheckCheckVo.java
+37
-0
CheckExamDetailVo.java
.../dev/device/confirmcheck/entity/vo/CheckExamDetailVo.java
+27
-0
CheckExamVo.java
...m/tykj/dev/device/confirmcheck/entity/vo/CheckExamVo.java
+34
-0
ConfirmCheckServiceImpl.java
...ce/confirmcheck/service/impl/ConfirmCheckServiceImpl.java
+1
-4
StatusEnum.java
...misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
+10
-0
RepairControllerTest.java
...c/test/java/com/tykj/dev/repair/RepairControllerTest.java
+2
-2
没有找到文件。
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
462e5f0f
...
@@ -176,16 +176,61 @@ public class DeviceCheckController {
...
@@ -176,16 +176,61 @@ public class DeviceCheckController {
}
}
@ApiOperation
(
value
=
"发起核查"
,
notes
=
"对指定地区发起核查任务"
)
@PostMapping
(
"/startCheck"
)
private
ResponseEntity
<
String
>
startCheckCheck
(
@RequestBody
CheckCheckVo
ccVO
)
{
//构建省的统计账单
Integer
startUnitId
=
ccVO
.
getUnitId
();
Units
startUnit
=
unitsRepo
.
findById
(
startUnitId
).
get
();
List
<
Units
>
checkedUnits
=
unitsRepo
.
findByAreaIdIn
(
ccVO
.
getAreaRange
());
List
<
String
>
checkedUnitNames
=
checkedUnits
.
stream
().
map
(
Units:
:
getName
).
collect
(
toList
());
log
.
info
(
"[核查模块]发起核查,发起单位为{},被查单位为{}"
,
startUnit
.
getName
(),
checkedUnitNames
);
DeviceCheckStat
provinceCheckStat
=
initStatData
(
ccVO
.
getTitle
(),
ccVO
.
getRemark
(),
0
,
0
,
startUnit
.
getName
(),
checkedUnits
);
Integer
statId
=
statRepo
.
save
(
provinceCheckStat
).
getId
();
List
<
CheckDeviceStatVo
>
deviceStatVos
=
Arrays
.
stream
(
Objects
.
requireNonNull
(
JacksonUtil
.
readValue
(
provinceCheckStat
.
getStatInfo
(),
CheckDeviceStatVo
[].
class
)))
.
collect
(
toList
());
// 构建省的统计任务
TaskBto
provStatTask
=
new
Task
(
CHECK_EXAM_STAT_0
.
id
,
CONFIRM_CHECK_STAT
.
name
,
0
,
".0."
,
CONFIRM_CHECK_STAT
.
id
,
statId
,
startUnitId
)
.
parse2Bto
();
provStatTask
.
setCustomInfo
(
"manual"
);
provStatTask
.
getInvolveUserIdList
().
add
(
authenticationUtils
.
getAuthentication
().
getCurrentUserInfo
().
getUserId
());
provStatTask
.
getInvolveUserIdList
().
add
(-
1
);
provStatTask
.
setCurrentPoint
(
1
);
provStatTask
=
taskService
.
start
(
provStatTask
);
//构建市的检查任务
for
(
Units
unit
:
checkedUnits
)
{
//构建市的统计账单
String
cityTitle
=
unit
.
getName
()
+
"检查统计"
;
DeviceCheckStat
cityCheckStat
=
initStatData
(
cityTitle
,
ccVO
.
getRemark
(),
0
,
0
,
unit
.
getName
(),
Collections
.
emptyList
());
Integer
cityStatId
=
statRepo
.
save
(
cityCheckStat
).
getId
();
log
.
info
(
"[核查模块] {} 检查统计账单构建完毕,id 为 {}"
,
unit
.
getName
(),
cityStatId
);
// 构建市的统计任务
TaskBto
cityStatTask
=
new
TaskBto
(
CHECK_EXAM_STAT_0
.
id
,
"检查统计任务"
,
provStatTask
.
getId
(),
addNode
(
provStatTask
.
getNodeIdDetail
(),
provStatTask
.
getId
()),
CONFIRM_CHECK_STAT
.
id
,
cityStatId
,
unit
.
getUnitId
(),
0
);
cityStatTask
.
setCustomInfo
(
"manual"
);
cityStatTask
.
getInvolveUserIdList
().
add
(-
1
);
cityStatTask
.
setCurrentPoint
(
1
);
taskService
.
start
(
cityStatTask
);
}
return
ResponseEntity
.
ok
(
"发起核查成功"
);
}
/**
/**
*
手动发起核
查
*
发起检
查
* <li>1. 添加发起核查bill记录</>
* <li>1. 添加发起核查bill记录</>
* <li>2. 构建发起单位的统计账单与Task</>
* <li>2. 构建发起单位的统计账单与Task</>
* <li>3. 构建被核查单位的详情账单与Task</li>
* <li>3. 构建被核查单位的详情账单与Task</li>
*
*
* @param billVo 核查发起对象
* @param billVo 核查发起对象
*/
*/
@ApiOperation
(
value
=
"发起
手动核
查"
,
notes
=
"手动发起核查,需要指定参数"
)
@ApiOperation
(
value
=
"发起
检
查"
,
notes
=
"手动发起核查,需要指定参数"
)
@PostMapping
(
"/
manual
"
)
@PostMapping
(
"/
startExam
"
)
public
ResponseEntity
<
ResultObj
>
startManualCheck
(
@RequestBody
CheckBillVo
billVo
)
{
public
ResponseEntity
<
ResultObj
>
startManualCheck
(
@RequestBody
CheckBillVo
billVo
)
{
List
<
Integer
>
detailIds
=
new
ArrayList
<>();
List
<
Integer
>
detailIds
=
new
ArrayList
<>();
// 1. 添加发起核查bill记录
// 1. 添加发起核查bill记录
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/CheckCheckVo.java
0 → 100644
浏览文件 @
462e5f0f
package
com
.
tykj
.
dev
.
device
.
confirmcheck
.
entity
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
* CheckCheckVo.
*
* @author Matrix <xhyrzldf@gmail.com>
* @since 2021/1/12 at 4:24 下午
*/
@Data
@ApiModel
(
"核查发起对象"
)
public
class
CheckCheckVo
{
@ApiModelProperty
(
name
=
"核查标题"
,
example
=
"测试核查标题"
)
private
String
title
;
@ApiModelProperty
(
name
=
"核查开始时间"
,
example
=
"2021-01-12"
)
private
LocalDate
startTime
;
@ApiModelProperty
(
name
=
"核查截止时间"
,
example
=
"2021-01-15"
)
private
LocalDate
endTime
;
@ApiModelProperty
(
name
=
"发起单位id"
)
private
Integer
unitId
;
@ApiModelProperty
(
name
=
"被核查的区域id集合"
)
private
List
<
Integer
>
areaRange
;
@ApiModelProperty
(
name
=
"备注"
)
private
String
remark
;
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/CheckExamDetailVo.java
0 → 100644
浏览文件 @
462e5f0f
package
com
.
tykj
.
dev
.
device
.
confirmcheck
.
entity
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* CheckExamDetailVo.
*
* @author Matrix <xhyrzldf@gmail.com>
* @since 2021/1/12 at 4:19 下午
*/
@Data
@ApiModel
(
"核查发起细节"
)
public
class
CheckExamDetailVo
{
@ApiModelProperty
(
name
=
"核查组成员名称"
)
private
List
<
String
>
userNames
;
@ApiModelProperty
(
name
=
"需要被检查的区域id"
)
private
Integer
areaId
;
@ApiModelProperty
(
name
=
"备注"
)
private
String
remark
;
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/CheckExamVo.java
0 → 100644
浏览文件 @
462e5f0f
package
com
.
tykj
.
dev
.
device
.
confirmcheck
.
entity
.
vo
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
* CheckExamVo.
*
* @author Matrix <xhyrzldf@gmail.com>
* @since 2021/1/12 at 3:56 下午
*/
@Data
@ApiModel
(
"检查发起对象"
)
public
class
CheckExamVo
{
@ApiModelProperty
(
name
=
"业务标题"
,
example
=
"浙江省手动核查测试"
)
@JSONField
(
name
=
"title"
)
private
String
checkTitle
;
@ApiModelProperty
(
name
=
"截止时间"
,
example
=
"2021-01-12"
)
private
LocalDate
endTime
;
@ApiModelProperty
(
name
=
"核查组名称"
)
private
String
groupName
;
@ApiModelProperty
(
name
=
"发起检查细节"
)
@JSONField
(
name
=
"detail"
)
private
List
<
CheckExamDetailVo
>
detail
;
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/service/impl/ConfirmCheckServiceImpl.java
浏览文件 @
462e5f0f
...
@@ -40,10 +40,7 @@ import org.springframework.scheduling.support.CronTrigger;
...
@@ -40,10 +40,7 @@ import org.springframework.scheduling.support.CronTrigger;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ScheduledFuture
;
import
java.util.concurrent.ScheduledFuture
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
浏览文件 @
462e5f0f
...
@@ -49,6 +49,16 @@ public enum StatusEnum {
...
@@ -49,6 +49,16 @@ public enum StatusEnum {
CHECK_DETAIL_2
(
122
,
"等待核查员A处理"
),
CHECK_DETAIL_2
(
122
,
"等待核查员A处理"
),
CHECK_DETAIL_3
(
123
,
"等待核查员B处理"
),
CHECK_DETAIL_3
(
123
,
"等待核查员B处理"
),
//以下为检查stat状态
CHECK_EXAM_STAT_0
(
130
,
"检查统计数据收集中"
),
CHECK_EXAM_STAT_1
(
131
,
"检查统计数据等待确认"
),
//以下为检查detail状态
CHECK_EXAM_DETAIL_0
(
140
,
"检查统计数据收集中"
),
CHECK_EXAM_DETAIL_1
(
141
,
"检查统计数据收集中"
),
CHECK_EXAM_DETAIL_2
(
142
,
"检查统计数据收集中"
),
CHECK_EXAM_DETAIL_3
(
143
,
"检查统计数据收集中"
),
/**
/**
* 清退任务
* 清退任务
...
...
dev-union/src/test/java/com/tykj/dev/repair/RepairControllerTest.java
浏览文件 @
462e5f0f
...
@@ -61,8 +61,8 @@ public class RepairControllerTest extends BaseTest {
...
@@ -61,8 +61,8 @@ public class RepairControllerTest extends BaseTest {
repairBillSaveVo
.
setAgent
(
"sadad"
);
repairBillSaveVo
.
setAgent
(
"sadad"
);
repairBillSaveVo
.
setReceiveUnit
(
"省机要局"
);
repairBillSaveVo
.
setReceiveUnit
(
"省机要局"
);
List
<
DeviceDetailVo
>
ids
=
new
ArrayList
<>();
List
<
DeviceDetailVo
>
ids
=
new
ArrayList
<>();
ids
.
add
(
new
DeviceDetailVo
(
21
,
"aaa"
));
//
ids.add(new DeviceDetailVo(21, "aaa"));
ids
.
add
(
new
DeviceDetailVo
(
26
,
"asdasd"
));
//
ids.add(new DeviceDetailVo(26, "asdasd"));
repairBillSaveVo
.
setDeviceList
(
ids
);
repairBillSaveVo
.
setDeviceList
(
ids
);
repairBillSaveVo
.
setFileName
(
"aaaa"
);
repairBillSaveVo
.
setFileName
(
"aaaa"
);
repairBillSaveVo
.
setFileUrl
(
"sdfhks"
);
repairBillSaveVo
.
setFileUrl
(
"sdfhks"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论