Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
cca54296
提交
cca54296
authored
5月 25, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(自查模块): 修复了自查的数据
修复了自查的数据
上级
11993463
显示空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
327 行增加
和
47 行删除
+327
-47
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+1
-1
Swagger2Config.java
...main/java/com/tykj/dev/config/swagger/Swagger2Config.java
+1
-1
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+3
-1
RemindCheckTask.java
...a/com/tykj/dev/device/selfcheck/base/RemindCheckTask.java
+50
-0
DailyCheckController.java
...dev/device/selfcheck/controller/DailyCheckController.java
+6
-4
RemindCheckController.java
...ev/device/selfcheck/controller/RemindCheckController.java
+41
-0
SelfCheckController.java
.../dev/device/selfcheck/controller/SelfCheckController.java
+21
-21
RemindCheckDao.java
.../tykj/dev/device/selfcheck/repository/RemindCheckDao.java
+18
-0
RemindCheckService.java
...tykj/dev/device/selfcheck/service/RemindCheckService.java
+19
-0
SelfCheckUnitBillService.java
...ev/device/selfcheck/service/SelfCheckUnitBillService.java
+4
-0
DailyCheckBillServiceImpl.java
...ice/selfcheck/service/impl/DailyCheckBillServiceImpl.java
+6
-15
RemindCheckServiceImpl.java
...device/selfcheck/service/impl/RemindCheckServiceImpl.java
+39
-0
SelfCheckUnitBillServiceImpl.java
.../selfcheck/service/impl/SelfCheckUnitBillServiceImpl.java
+6
-0
DailyCheckBill.java
...kj/dev/device/selfcheck/subject/domin/DailyCheckBill.java
+2
-2
HistoryDeviceBill.java
...dev/device/selfcheck/subject/domin/HistoryDeviceBill.java
+1
-1
RemindCheck.java
.../tykj/dev/device/selfcheck/subject/domin/RemindCheck.java
+49
-0
TaskSelectController.java
...ev/device/taskselect/controller/TaskSelectController.java
+1
-1
DataInit.java
dev-union/src/main/java/com/tykj/dev/union/DataInit.java
+50
-0
RunController.java
...union/src/main/java/com/tykj/dev/union/RunController.java
+9
-0
没有找到文件。
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
cca54296
...
@@ -381,7 +381,7 @@ public enum LogType {
...
@@ -381,7 +381,7 @@ public enum LogType {
DAILY_CHECKED
(
176
,
DAILY_SELF_CHECK
.
id
,
WAIT_CHECK
.
id
,
WAIT_CHECK_RESULT
.
id
,
"等待上传校验结果"
),
DAILY_CHECKED
(
176
,
DAILY_SELF_CHECK
.
id
,
WAIT_CHECK
.
id
,
WAIT_CHECK_RESULT
.
id
,
"等待上传校验结果"
),
DAILY_CHECK_END
(
177
,
DAILY_SELF_CHECK
.
id
,
WAIT_CHECK_FILE
.
id
,
END
.
id
,
"日常检查任务完结"
),
DAILY_CHECK_END
(
177
,
DAILY_SELF_CHECK
.
id
,
WAIT_CHECK_FILE
.
id
,
END
.
id
,
"日常检查任务完结"
),
DAILY_CHECK_RE
(
178
,
DAILY_SELF_CHECK
.
id
,
WAIT_CHECK_RESULT
.
id
,
WAIT_CHECK_FILE
.
id
,
"提交检查结果"
),
DAILY_CHECK_RE
(
178
,
DAILY_SELF_CHECK
.
id
,
WAIT_CHECK_RESULT
.
id
,
WAIT_CHECK_FILE
.
id
,
"提交检查结果"
),
DAILY_CHECK_RE2
(
179
,
DAILY_SELF_CHECK
.
id
,
WAIT_CHECK_
FILE
.
id
,
WAIT_CHECK_FILE
.
id
,
"提交检查结果"
);
DAILY_CHECK_RE2
(
179
,
DAILY_SELF_CHECK
.
id
,
WAIT_CHECK_
RESULT
.
id
,
WAIT_CHECK_RESULT
.
id
,
"提交检查结果"
);
public
Integer
id
;
public
Integer
id
;
...
...
dev-config/src/main/java/com/tykj/dev/config/swagger/Swagger2Config.java
浏览文件 @
cca54296
...
@@ -40,7 +40,7 @@ public class Swagger2Config {
...
@@ -40,7 +40,7 @@ public class Swagger2Config {
// .globalResponseMessage(RequestMethod.GET, getResMsg())
// .globalResponseMessage(RequestMethod.GET, getResMsg())
.
select
()
.
select
()
// 指定controller存放的目录路径
// 指定controller存放的目录路径
.
apis
(
RequestHandlerSelectors
.
withClassAnnotation
(
A
pi
.
class
))
.
apis
(
RequestHandlerSelectors
.
withClassAnnotation
(
A
utoDocument
.
class
))
.
paths
(
PathSelectors
.
any
())
.
paths
(
PathSelectors
.
any
())
.
build
()
.
build
()
.
apiInfo
(
apiInfo
())
.
apiInfo
(
apiInfo
())
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
cca54296
...
@@ -478,8 +478,10 @@ public class RepairController {
...
@@ -478,8 +478,10 @@ public class RepairController {
TaskBto
saveEntity
;
TaskBto
saveEntity
;
//当前单位其他专管员id集合
//当前单位其他专管员id集合
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
Integer
unitId
=
userUtils
.
getCurrentUnitId
();
Units
units1
=
unitsCache
.
findById
(
unitId
);
//省向国家发起的
//省向国家发起的
if
(
level
==
1
)
{
if
(
level
==
1
&&
units1
.
getType
()
==
1
)
{
ownUnit
=
userUtils
.
getCurrentUnitId
();
ownUnit
=
userUtils
.
getCurrentUnitId
();
//直接发起的
//直接发起的
if
(
repairBillSaveVo
.
getTaskId
()
==
null
)
{
if
(
repairBillSaveVo
.
getTaskId
()
==
null
)
{
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/base/RemindCheckTask.java
0 → 100644
浏览文件 @
cca54296
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
base
;
import
com.tykj.dev.device.selfcheck.service.RemindCheckService
;
import
com.tykj.dev.device.selfcheck.subject.domin.RemindCheck
;
import
com.tykj.dev.device.user.cache.UnitsCache
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.misc.utils.DateUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author zsp
* @create 2022/5/25 15:44
*/
@Component
@Slf4j
public
class
RemindCheckTask
{
@Resource
private
RemindCheckService
remindCheckService
;
@Resource
private
UnitsCache
unitsCache
;
@Scheduled
(
cron
=
"0 0 0 * * ? "
)
private
void
signUpDeadline
()
{
log
.
info
(
"定时开始创建提醒任务"
);
List
<
Integer
>
unitId
=
unitsCache
.
findAll
().
stream
().
map
(
Units:
:
getUnitId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
RemindCheck
>
remindCheckList
=
new
ArrayList
<>();
unitId
.
forEach
(
integer
->
{
RemindCheck
remindCheck
=
new
RemindCheck
();
String
name
=
unitsCache
.
findById
(
integer
).
getName
();
remindCheck
.
setTitle
(
name
+
"发起的日常检查任务"
);
remindCheck
.
setUnitId
(
integer
);
remindCheck
.
setCreateTime
(
DateUtil
.
getLocalDate
(
new
Date
()));
remindCheckList
.
add
(
remindCheck
);
});
remindCheckService
.
batchSave
(
remindCheckList
);
log
.
info
(
"定时创建提醒任务成功"
);
}
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/DailyCheckController.java
浏览文件 @
cca54296
...
@@ -6,13 +6,9 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
...
@@ -6,13 +6,9 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import
com.tykj.dev.device.selfcheck.service.DailyCheckBillService
;
import
com.tykj.dev.device.selfcheck.service.DailyCheckBillService
;
import
com.tykj.dev.device.selfcheck.service.SelfCheckUnitBillService
;
import
com.tykj.dev.device.selfcheck.service.SelfCheckUnitBillService
;
import
com.tykj.dev.device.selfcheck.subject.domin.DailyCheckBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.DailyCheckBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckUnitBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckUnitBill
;
import
com.tykj.dev.device.selfcheck.subject.vo.SelfCheckSelectVo
;
import
com.tykj.dev.device.selfcheck.subject.vo.daily.*
;
import
com.tykj.dev.device.selfcheck.subject.vo.daily.*
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.user.cache.StoreCache
;
import
com.tykj.dev.device.user.cache.UnitsCache
;
import
com.tykj.dev.device.user.cache.UnitsCache
;
import
com.tykj.dev.device.user.cache.UserCache
;
import
com.tykj.dev.device.user.cache.UserCache
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
...
@@ -126,7 +122,13 @@ public class DailyCheckController {
...
@@ -126,7 +122,13 @@ public class DailyCheckController {
@PostMapping
(
value
=
"/saveDayDevice"
)
@PostMapping
(
value
=
"/saveDayDevice"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
saveDayDevice
(
@RequestBody
SelfCheckUnitBill
selfCheckUnitBill
)
{
public
ResponseEntity
saveDayDevice
(
@RequestBody
SelfCheckUnitBill
selfCheckUnitBill
)
{
//先根据单位id查询
SelfCheckUnitBill
byUnitId
=
service
.
findByUnitId
(
selfCheckUnitBill
.
getUnitId
());
if
(
byUnitId
!=
null
){
service
.
deleteOne
(
byUnitId
);
}
SelfCheckUnitBill
unitBill
=
service
.
add
(
selfCheckUnitBill
);
SelfCheckUnitBill
unitBill
=
service
.
add
(
selfCheckUnitBill
);
return
ResultUtil
.
success
(
unitBill
);
return
ResultUtil
.
success
(
unitBill
);
}
}
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/RemindCheckController.java
0 → 100644
浏览文件 @
cca54296
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
controller
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.selfcheck.service.RemindCheckService
;
import
com.tykj.dev.device.selfcheck.subject.domin.DailyCheckBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.RemindCheck
;
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.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author zsp
* @create 2022/5/25 15:57
*/
@RestController
@RequestMapping
(
value
=
"/remindCheck"
)
@AutoDocument
@Api
(
tags
=
"日常检查提醒列表模块"
,
description
=
"日常检查提醒列表模块"
)
@Slf4j
public
class
RemindCheckController
{
@Resource
private
RemindCheckService
remindCheckService
;
@ApiOperation
(
value
=
"查询列表"
,
notes
=
"查询列表"
)
@GetMapping
(
value
=
"/selectList"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
createBill
(
Integer
unitId
){
List
<
RemindCheck
>
remindCheckList
=
remindCheckService
.
selectList
(
unitId
);
return
ResponseEntity
.
ok
(
remindCheckList
);
}
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/SelfCheckController.java
浏览文件 @
cca54296
...
@@ -396,7 +396,7 @@ public class SelfCheckController {
...
@@ -396,7 +396,7 @@ public class SelfCheckController {
historyDeviceBill
.
setRfidCardId
(
deviceLibrary
.
getRfidCardId
());
historyDeviceBill
.
setRfidCardId
(
deviceLibrary
.
getRfidCardId
());
historyDeviceBill
.
setLocationUnit
(
deviceLibrary
.
getLocationUnit
());
historyDeviceBill
.
setLocationUnit
(
deviceLibrary
.
getLocationUnit
());
historyDeviceBill
.
setOwnUnit
(
deviceLibrary
.
getOwnUnit
());
historyDeviceBill
.
setOwnUnit
(
deviceLibrary
.
getOwnUnit
());
historyDeviceBill
.
set
DeviceStatus
(
1
);
historyDeviceBill
.
set
CheckResult
(
1
);
historyDeviceBill
.
setSeqNumber
(
deviceLibrary
.
getSeqNumber
());
historyDeviceBill
.
setSeqNumber
(
deviceLibrary
.
getSeqNumber
());
historyDeviceBillList
.
add
(
historyDeviceBill
);
historyDeviceBillList
.
add
(
historyDeviceBill
);
});
});
...
@@ -418,7 +418,7 @@ public class SelfCheckController {
...
@@ -418,7 +418,7 @@ public class SelfCheckController {
historyDeviceBill
.
setRfidCardId
(
deviceLibrary
.
getRfidCardId
());
historyDeviceBill
.
setRfidCardId
(
deviceLibrary
.
getRfidCardId
());
historyDeviceBill
.
setLocationUnit
(
deviceLibrary
.
getLocationUnit
());
historyDeviceBill
.
setLocationUnit
(
deviceLibrary
.
getLocationUnit
());
historyDeviceBill
.
setOwnUnit
(
deviceLibrary
.
getOwnUnit
());
historyDeviceBill
.
setOwnUnit
(
deviceLibrary
.
getOwnUnit
());
historyDeviceBill
.
set
DeviceStatus
(
1
);
historyDeviceBill
.
set
CheckResult
(
1
);
historyDeviceBill
.
setSeqNumber
(
deviceLibrary
.
getSeqNumber
());
historyDeviceBill
.
setSeqNumber
(
deviceLibrary
.
getSeqNumber
());
historyDeviceBillList
.
add
(
historyDeviceBill
);
historyDeviceBillList
.
add
(
historyDeviceBill
);
});
});
...
@@ -438,7 +438,7 @@ public class SelfCheckController {
...
@@ -438,7 +438,7 @@ public class SelfCheckController {
historyDeviceBill
.
setRfidCardId
(
deviceLibrary
.
getRfidCardId
());
historyDeviceBill
.
setRfidCardId
(
deviceLibrary
.
getRfidCardId
());
historyDeviceBill
.
setLocationUnit
(
deviceLibrary
.
getLocationUnit
());
historyDeviceBill
.
setLocationUnit
(
deviceLibrary
.
getLocationUnit
());
historyDeviceBill
.
setOwnUnit
(
deviceLibrary
.
getOwnUnit
());
historyDeviceBill
.
setOwnUnit
(
deviceLibrary
.
getOwnUnit
());
historyDeviceBill
.
set
DeviceStatus
(
0
);
historyDeviceBill
.
set
CheckResult
(
0
);
historyDeviceBill
.
setSeqNumber
(
deviceLibrary
.
getSeqNumber
());
historyDeviceBill
.
setSeqNumber
(
deviceLibrary
.
getSeqNumber
());
historyDeviceBillList
.
add
(
historyDeviceBill
);
historyDeviceBillList
.
add
(
historyDeviceBill
);
});
});
...
@@ -517,24 +517,24 @@ public class SelfCheckController {
...
@@ -517,24 +517,24 @@ public class SelfCheckController {
selfExaminationBillService
.
update
(
selfExaminationBillEntity1
);
selfExaminationBillService
.
update
(
selfExaminationBillEntity1
);
}
}
}
}
if
(
selfCheckSaveVo
.
getNewDeviceList
()
!=
null
)
{
//
if (selfCheckSaveVo.getNewDeviceList() != null) {
//按新增不在系统的装备按rfid卡号拼接保存
//
//按新增不在系统的装备按rfid卡号拼接保存
List
<
HistoryDeviceBill
>
historyDeviceBillList
=
new
ArrayList
<>();
//
List<HistoryDeviceBill> historyDeviceBillList = new ArrayList<>();
for
(
String
s
:
selfCheckSaveVo
.
getNewDeviceList
())
{
//
for (String s : selfCheckSaveVo.getNewDeviceList()) {
HistoryDeviceBill
historyDeviceBill
=
new
HistoryDeviceBill
();
//
HistoryDeviceBill historyDeviceBill = new HistoryDeviceBill();
historyDeviceBill
.
setBillId
(
selfExaminationBillEntity1
.
getId
());
//
historyDeviceBill.setBillId(selfExaminationBillEntity1.getId());
historyDeviceBill
.
setModel
(
""
);
//
historyDeviceBill.setModel("");
historyDeviceBill
.
setName
(
""
);
//
historyDeviceBill.setName("");
historyDeviceBill
.
setDeviceId
(
0
);
//
historyDeviceBill.setDeviceId(0);
historyDeviceBill
.
setRfidCardId
(
s
);
//
historyDeviceBill.setRfidCardId(s);
historyDeviceBill
.
setLocationUnit
(
""
);
//
historyDeviceBill.setLocationUnit("");
historyDeviceBill
.
setOwnUnit
(
""
);
//
historyDeviceBill.setOwnUnit("");
historyDeviceBill
.
setDeviceStatus
(
0
);
// historyDeviceBill.setCheckResult
(0);
historyDeviceBill
.
setSeqNumber
(
""
);
//
historyDeviceBill.setSeqNumber("");
historyDeviceBillList
.
add
(
historyDeviceBill
);
//
historyDeviceBillList.add(historyDeviceBill);
}
//
}
historyDeviceBillService
.
batchSave
(
historyDeviceBillList
);
//
historyDeviceBillService.batchSave(historyDeviceBillList);
}
//
}
//添加装备日志
//添加装备日志
//进行修改日志存储慢的问题
//进行修改日志存储慢的问题
List
<
DeviceLogDto
>
deviceLogDtos
=
new
ArrayList
<>();
List
<
DeviceLogDto
>
deviceLogDtos
=
new
ArrayList
<>();
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/repository/RemindCheckDao.java
0 → 100644
浏览文件 @
cca54296
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
repository
;
import
com.tykj.dev.device.selfcheck.subject.domin.RemindCheck
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
* @author zsp
* @create 2022/5/25 15:38
*/
public
interface
RemindCheckDao
extends
JpaSpecificationExecutor
<
RemindCheck
>,
JpaRepository
<
RemindCheck
,
Integer
>
{
RemindCheck
findByUnitIdAndCreateTime
(
Integer
unitId
,
LocalDate
createTime
);
List
<
RemindCheck
>
findAllByUnitId
(
Integer
unitId
);
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/RemindCheckService.java
0 → 100644
浏览文件 @
cca54296
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
service
;
import
com.tykj.dev.device.selfcheck.subject.domin.RemindCheck
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
* @author zsp
* @create 2022/5/25 15:36
*/
public
interface
RemindCheckService
{
void
batchSave
(
List
<
RemindCheck
>
remindCheckList
);
void
remove
(
Integer
unitId
,
LocalDate
createTime
);
List
<
RemindCheck
>
selectList
(
Integer
unitId
);
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/SelfCheckUnitBillService.java
浏览文件 @
cca54296
...
@@ -2,6 +2,8 @@ package com.tykj.dev.device.selfcheck.service;
...
@@ -2,6 +2,8 @@ package com.tykj.dev.device.selfcheck.service;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckUnitBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckUnitBill
;
import
java.util.List
;
/**
/**
* @author zsp
* @author zsp
*/
*/
...
@@ -11,4 +13,6 @@ public interface SelfCheckUnitBillService {
...
@@ -11,4 +13,6 @@ public interface SelfCheckUnitBillService {
SelfCheckUnitBill
findByUnitId
(
Integer
unitId
);
SelfCheckUnitBill
findByUnitId
(
Integer
unitId
);
void
deleteOne
(
SelfCheckUnitBill
selfCheckUnitBill
);
}
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/impl/DailyCheckBillServiceImpl.java
浏览文件 @
cca54296
...
@@ -10,21 +10,16 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
...
@@ -10,21 +10,16 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import
com.tykj.dev.device.selfcheck.repository.DailyCheckBillDao
;
import
com.tykj.dev.device.selfcheck.repository.DailyCheckBillDao
;
import
com.tykj.dev.device.selfcheck.service.DailyCheckBillService
;
import
com.tykj.dev.device.selfcheck.service.DailyCheckBillService
;
import
com.tykj.dev.device.selfcheck.service.HistoryDailyDeviceBillService
;
import
com.tykj.dev.device.selfcheck.service.HistoryDailyDeviceBillService
;
import
com.tykj.dev.device.selfcheck.service.RemindCheckService
;
import
com.tykj.dev.device.selfcheck.subject.domin.DailyCheckBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.DailyCheckBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.HistoryDailyDeviceBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.HistoryDailyDeviceBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.HistoryDeviceBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill
;
import
com.tykj.dev.device.selfcheck.subject.vo.SelfCheckSaveVo
;
import
com.tykj.dev.device.selfcheck.subject.vo.SelfCheckSelectVo
;
import
com.tykj.dev.device.selfcheck.subject.vo.daily.*
;
import
com.tykj.dev.device.selfcheck.subject.vo.daily.*
;
import
com.tykj.dev.device.task.service.TaskLogService
;
import
com.tykj.dev.device.task.service.TaskLogService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.task.subject.vo.TaskLogUserVo
;
import
com.tykj.dev.device.task.subject.vo.TaskLogUserVo
;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
com.tykj.dev.device.user.cache.StoreCache
;
import
com.tykj.dev.device.user.cache.UserCache
;
import
com.tykj.dev.device.user.cache.UserCache
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
...
@@ -33,24 +28,15 @@ import com.tykj.dev.misc.qrcode.QrCodeBillUtil;
...
@@ -33,24 +28,15 @@ import com.tykj.dev.misc.qrcode.QrCodeBillUtil;
import
com.tykj.dev.misc.qrcode.vo.DeviceCodeVO
;
import
com.tykj.dev.misc.qrcode.vo.DeviceCodeVO
;
import
com.tykj.dev.misc.qrcode.vo.TaskData
;
import
com.tykj.dev.misc.qrcode.vo.TaskData
;
import
com.tykj.dev.misc.utils.DateUtil
;
import
com.tykj.dev.misc.utils.DateUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.persistence.Transient
;
import
java.lang.reflect.Field
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -85,6 +71,9 @@ public class DailyCheckBillServiceImpl implements DailyCheckBillService {
...
@@ -85,6 +71,9 @@ public class DailyCheckBillServiceImpl implements DailyCheckBillService {
@Resource
@Resource
private
UserCache
userCache
;
private
UserCache
userCache
;
@Resource
private
RemindCheckService
remindCheckService
;
@Override
@Override
...
@@ -168,6 +157,7 @@ public class DailyCheckBillServiceImpl implements DailyCheckBillService {
...
@@ -168,6 +157,7 @@ public class DailyCheckBillServiceImpl implements DailyCheckBillService {
@Override
@Override
public
void
endDayBill
(
DailyCheckEndVo
dailyCheckEndVo
)
{
public
void
endDayBill
(
DailyCheckEndVo
dailyCheckEndVo
)
{
Integer
unitId
=
userUtils
.
getCurrentUnitId
();
Integer
taskId
=
dailyCheckEndVo
.
getTaskId
();
Integer
taskId
=
dailyCheckEndVo
.
getTaskId
();
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
//如果是直接提交
//如果是直接提交
...
@@ -205,6 +195,7 @@ public class DailyCheckBillServiceImpl implements DailyCheckBillService {
...
@@ -205,6 +195,7 @@ public class DailyCheckBillServiceImpl implements DailyCheckBillService {
batchSave
(
dailyCheckEndVo
.
getCheckDeviceList0
(),
Integer
.
valueOf
(
"0"
),
historyDeviceBillList0
,
update
.
getId
());
batchSave
(
dailyCheckEndVo
.
getCheckDeviceList0
(),
Integer
.
valueOf
(
"0"
),
historyDeviceBillList0
,
update
.
getId
());
List
<
HistoryDailyDeviceBill
>
historyDeviceBillList1
=
new
ArrayList
<>();
List
<
HistoryDailyDeviceBill
>
historyDeviceBillList1
=
new
ArrayList
<>();
batchSave
(
dailyCheckEndVo
.
getCheckDeviceList1
(),
Integer
.
valueOf
(
"1"
),
historyDeviceBillList1
,
update
.
getId
());
batchSave
(
dailyCheckEndVo
.
getCheckDeviceList1
(),
Integer
.
valueOf
(
"1"
),
historyDeviceBillList1
,
update
.
getId
());
remindCheckService
.
remove
(
unitId
,
startTime
);
}
}
@Override
@Override
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/impl/RemindCheckServiceImpl.java
0 → 100644
浏览文件 @
cca54296
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
service
.
impl
;
import
com.tykj.dev.device.selfcheck.repository.RemindCheckDao
;
import
com.tykj.dev.device.selfcheck.service.RemindCheckService
;
import
com.tykj.dev.device.selfcheck.subject.domin.RemindCheck
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
* @author zsp
* @create 2022/5/25 15:38
*/
@Service
public
class
RemindCheckServiceImpl
implements
RemindCheckService
{
@Resource
private
RemindCheckDao
remindCheckDao
;
@Override
public
void
batchSave
(
List
<
RemindCheck
>
remindCheckList
)
{
remindCheckDao
.
saveAll
(
remindCheckList
);
}
@Override
public
void
remove
(
Integer
unitId
,
LocalDate
createTime
)
{
RemindCheck
check
=
remindCheckDao
.
findByUnitIdAndCreateTime
(
unitId
,
createTime
);
if
(
check
!=
null
){
remindCheckDao
.
delete
(
check
);
}
}
@Override
public
List
<
RemindCheck
>
selectList
(
Integer
unitId
)
{
return
remindCheckDao
.
findAllByUnitId
(
unitId
);
}
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/impl/SelfCheckUnitBillServiceImpl.java
浏览文件 @
cca54296
...
@@ -7,6 +7,7 @@ import com.tykj.dev.misc.utils.JacksonUtil;
...
@@ -7,6 +7,7 @@ import com.tykj.dev.misc.utils.JacksonUtil;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
/**
* @author zsp
* @author zsp
...
@@ -27,4 +28,9 @@ public class SelfCheckUnitBillServiceImpl implements SelfCheckUnitBillService {
...
@@ -27,4 +28,9 @@ public class SelfCheckUnitBillServiceImpl implements SelfCheckUnitBillService {
public
SelfCheckUnitBill
findByUnitId
(
Integer
unitId
)
{
public
SelfCheckUnitBill
findByUnitId
(
Integer
unitId
)
{
return
selfCheckUnitBillDao
.
findByUnitId
(
unitId
);
return
selfCheckUnitBillDao
.
findByUnitId
(
unitId
);
}
}
@Override
public
void
deleteOne
(
SelfCheckUnitBill
selfCheckUnitBill
)
{
selfCheckUnitBillDao
.
delete
(
selfCheckUnitBill
);
}
}
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/domin/DailyCheckBill.java
浏览文件 @
cca54296
...
@@ -60,12 +60,12 @@ public class DailyCheckBill {
...
@@ -60,12 +60,12 @@ public class DailyCheckBill {
* 自查时间
* 自查时间
*/
*/
@ApiModelProperty
(
value
=
"自查时间(创建任务的时间)"
)
@ApiModelProperty
(
value
=
"自查时间(创建任务的时间)"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd hh:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd hh:mm:ss"
,
shape
=
JsonFormat
.
Shape
.
STRING
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd hh:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd hh:mm:ss"
)
private
LocalDateTime
checkStartTime
;
private
LocalDateTime
checkStartTime
;
@ApiModelProperty
(
value
=
"完成的时间(上传单据的时间)"
)
@ApiModelProperty
(
value
=
"完成的时间(上传单据的时间)"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd hh:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd hh:mm:ss"
,
shape
=
JsonFormat
.
Shape
.
STRING
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd hh:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd hh:mm:ss"
)
private
LocalDateTime
checkEndTime
;
private
LocalDateTime
checkEndTime
;
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/domin/HistoryDeviceBill.java
浏览文件 @
cca54296
...
@@ -70,7 +70,7 @@ public class HistoryDeviceBill {
...
@@ -70,7 +70,7 @@ public class HistoryDeviceBill {
* 设备的状态
* 设备的状态
*/
*/
@ApiModelProperty
(
value
=
"设备的状态"
,
example
=
"0 缺失 1 正常 2 新增"
)
@ApiModelProperty
(
value
=
"设备的状态"
,
example
=
"0 缺失 1 正常 2 新增"
)
private
Integer
deviceStatus
;
private
Integer
checkResult
;
@ApiModelProperty
(
value
=
"业务id"
)
@ApiModelProperty
(
value
=
"业务id"
)
private
Integer
billId
;
private
Integer
billId
;
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/domin/RemindCheck.java
0 → 100644
浏览文件 @
cca54296
package
com
.
tykj
.
dev
.
device
.
selfcheck
.
subject
.
domin
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.data.annotation.CreatedDate
;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.persistence.*
;
import
java.time.LocalDate
;
/**
* @author zsp
* @create 2022/5/25 15:23
*/
@Data
@Entity
@EntityListeners
(
AuditingEntityListener
.
class
)
@ApiModel
(
"日常检查列表提醒实体"
)
public
class
RemindCheck
{
/**
* 主键id
*/
@Id
@GeneratedValue
@ApiModelProperty
(
name
=
"主键id"
)
@Column
(
columnDefinition
=
"integer NOT NULL AUTO_INCREMENT"
)
private
Integer
id
;
/**
* 提醒标题
*/
@ApiModelProperty
(
value
=
"提醒标题"
)
private
String
title
;
/**
* 单位(A岗)
*/
@ApiModelProperty
(
value
=
"单位id"
)
private
Integer
unitId
;
/**
* 自查时间
*/
@ApiModelProperty
(
value
=
"自查时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
shape
=
JsonFormat
.
Shape
.
STRING
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
LocalDate
createTime
;
}
dev-taskselect/src/main/java/com/tykj/dev/device/taskselect/controller/TaskSelectController.java
浏览文件 @
cca54296
...
@@ -362,7 +362,7 @@ public class TaskSelectController {
...
@@ -362,7 +362,7 @@ public class TaskSelectController {
//过滤出1的
//过滤出1的
List
<
HistoryDeviceBill
>
billList1
=
List
<
HistoryDeviceBill
>
billList1
=
historyDeviceBillList
.
stream
().
filter
(
historyDeviceBill
->
historyDeviceBill
.
get
DeviceStatus
()
==
1
)
historyDeviceBillList
.
stream
().
filter
(
historyDeviceBill
->
historyDeviceBill
.
get
CheckResult
()
==
1
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
// list.add(libraryEntities1);
// list.add(libraryEntities1);
list
.
add
(
billList1
);
list
.
add
(
billList1
);
...
...
dev-union/src/main/java/com/tykj/dev/union/DataInit.java
浏览文件 @
cca54296
...
@@ -6,6 +6,8 @@ import com.tykj.dev.device.allot.subject.domin.AllotBackBill;
...
@@ -6,6 +6,8 @@ import com.tykj.dev.device.allot.subject.domin.AllotBackBill;
import
com.tykj.dev.device.allot.subject.domin.AllotBill
;
import
com.tykj.dev.device.allot.subject.domin.AllotBill
;
import
com.tykj.dev.device.confirmcheck.entity.domain.DeviceCheckDetail
;
import
com.tykj.dev.device.confirmcheck.entity.domain.DeviceCheckDetail
;
import
com.tykj.dev.device.confirmcheck.repository.DeviceCheckDetailDao
;
import
com.tykj.dev.device.confirmcheck.repository.DeviceCheckDetailDao
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.matching.repository.MatchingDeviceLibraryDao
;
import
com.tykj.dev.device.matching.repository.MatchingDeviceLibraryDao
;
import
com.tykj.dev.device.matching.subject.domin.MatchingDeviceLibrary
;
import
com.tykj.dev.device.matching.subject.domin.MatchingDeviceLibrary
;
import
com.tykj.dev.device.repair.repository.RepairBackBillDao
;
import
com.tykj.dev.device.repair.repository.RepairBackBillDao
;
...
@@ -17,6 +19,8 @@ import com.tykj.dev.device.repair.subject.domin.RepairBill;
...
@@ -17,6 +19,8 @@ import com.tykj.dev.device.repair.subject.domin.RepairBill;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
com.tykj.dev.device.repair.subject.domin.RepairSendBill
;
import
com.tykj.dev.device.repair.subject.domin.RepairSendBill
;
import
com.tykj.dev.device.selfcheck.repository.SelfCheckBillDao
;
import
com.tykj.dev.device.selfcheck.repository.SelfCheckBillDao
;
import
com.tykj.dev.device.selfcheck.service.HistoryDeviceBillService
;
import
com.tykj.dev.device.selfcheck.subject.domin.HistoryDeviceBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill
;
import
com.tykj.dev.device.user.subject.dao.UnitsDao
;
import
com.tykj.dev.device.user.subject.dao.UnitsDao
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.entity.Units
;
...
@@ -36,6 +40,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -36,6 +40,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
...
@@ -75,6 +80,12 @@ public class DataInit {
...
@@ -75,6 +80,12 @@ public class DataInit {
@Autowired
@Autowired
private
com
.
tykj
.
dev
.
device
.
user
.
util
.
AuthenticationUtils
AuthenticationUtils
;
private
com
.
tykj
.
dev
.
device
.
user
.
util
.
AuthenticationUtils
AuthenticationUtils
;
@Resource
private
DeviceLibraryService
deviceLibraryService
;
@Resource
private
HistoryDeviceBillService
historyDeviceBillService
;
private
void
initCheckDetailUnitName
()
{
private
void
initCheckDetailUnitName
()
{
// 对现有的数据补充unitId信息
// 对现有的数据补充unitId信息
allotBillDao
.
findAll
().
forEach
(
this
::
saveModifyDetail1
);
allotBillDao
.
findAll
().
forEach
(
this
::
saveModifyDetail1
);
...
@@ -135,6 +146,39 @@ public class DataInit {
...
@@ -135,6 +146,39 @@ public class DataInit {
}
}
private
void
saveModifyDetail33
(
SelfCheckBill
selfCheckBill
)
{
String
checkDetail
=
selfCheckBill
.
getCheckDetail
();
List
<
HistoryDeviceBill
>
deviceBillList
=
new
ArrayList
<>();
if
(
checkDetail
!=
null
)
{
String
[]
strings
=
checkDetail
.
split
(
"x"
);
for
(
String
s1
:
strings
)
{
if
(
s1
.
length
()
>=
2
)
{
HistoryDeviceBill
historyDeviceBill
=
new
HistoryDeviceBill
();
//缺失
if
(
"0"
.
equals
(
s1
.
substring
(
s1
.
length
()
-
1
)))
{
historyDeviceBill
.
setCheckResult
(
0
);
}
//无误
if
(
"1"
.
equals
(
s1
.
substring
(
s1
.
length
()
-
1
)))
{
historyDeviceBill
.
setCheckResult
(
1
);
}
Integer
deviceId
=
Integer
.
valueOf
(
s1
.
substring
(
0
,
s1
.
length
()
-
1
));
historyDeviceBill
.
setDeviceId
(
deviceId
);
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
deviceId
);
historyDeviceBill
.
setModel
(
deviceLibrary
.
getModel
());
historyDeviceBill
.
setName
(
deviceLibrary
.
getName
());
historyDeviceBill
.
setBillId
(
selfCheckBill
.
getId
());
historyDeviceBill
.
setSeqNumber
(
deviceLibrary
.
getSeqNumber
());
historyDeviceBill
.
setOwnUnit
(
deviceLibrary
.
getOwnUnit
());
historyDeviceBill
.
setLocationUnit
(
deviceLibrary
.
getLocationUnit
());
historyDeviceBill
.
setRfidCardId
(
deviceLibrary
.
getRfidCardId
());
deviceBillList
.
add
(
historyDeviceBill
);
}
}
historyDeviceBillService
.
batchSave
(
deviceBillList
);
}
}
private
void
saveModifyDetail4
(
RepairBill
allotBill
)
{
private
void
saveModifyDetail4
(
RepairBill
allotBill
)
{
String
receiveUnit
=
allotBill
.
getReceiveUnit
();
String
receiveUnit
=
allotBill
.
getReceiveUnit
();
String
sendUnit
=
allotBill
.
getSendUnit
();
String
sendUnit
=
allotBill
.
getSendUnit
();
...
@@ -240,6 +284,12 @@ public class DataInit {
...
@@ -240,6 +284,12 @@ public class DataInit {
initCheckDetailUnitName2
();
initCheckDetailUnitName2
();
}
}
public
void
init3
(){
log
.
info
(
"自查开始补充-----"
);
selfCheckBillDao
.
findAll
().
forEach
(
this
::
saveModifyDetail33
);
log
.
info
(
"自查补充完成-----"
);
}
@Autowired
@Autowired
private
DeviceCheckDetailDao
private
DeviceCheckDetailDao
deviceCheckDetailDao
;
deviceCheckDetailDao
;
...
...
dev-union/src/main/java/com/tykj/dev/union/RunController.java
浏览文件 @
cca54296
...
@@ -43,6 +43,7 @@ import java.util.concurrent.CompletableFuture;
...
@@ -43,6 +43,7 @@ import java.util.concurrent.CompletableFuture;
@RestController
@RestController
@Slf4j
@Slf4j
@Api
(
"数据纠正模块"
)
@Api
(
"数据纠正模块"
)
@AutoDocument
public
class
RunController
{
public
class
RunController
{
@Resource
@Resource
...
@@ -102,5 +103,13 @@ public class RunController {
...
@@ -102,5 +103,13 @@ public class RunController {
return
ResponseEntity
.
ok
(
"修改成功"
);
return
ResponseEntity
.
ok
(
"修改成功"
);
}
}
@ApiOperation
(
value
=
"修改单位名称从而修改配套设备的创建单位"
,
notes
=
"修改单位名称从而修改配套设备的创建单位"
)
@GetMapping
(
"/run/init3"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
<
String
>
init3
()
{
dataInit
.
init3
();
return
ResponseEntity
.
ok
(
"修改成功"
);
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论