Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
9cf70709
提交
9cf70709
authored
9月 15, 2020
作者:
Matrix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改了resultObj
上级
1c28e42a
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
88 行增加
和
37 行删除
+88
-37
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+2
-1
ObjTransUtil.java
.../com/tykj/dev/device/confirmcheck/utils/ObjTransUtil.java
+5
-2
package-info.java
...evice/device-confirmcheck/src/test/java/package-info.java
+0
-0
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+8
-2
TaskBto.java
...in/java/com/tykj/dev/device/task/subject/bto/TaskBto.java
+1
-0
MyUserDetailsServiceImpl.java
...tykj/dev/device/user/config/MyUserDetailsServiceImpl.java
+0
-3
SecurityConfig.java
.../java/com/tykj/dev/device/user/config/SecurityConfig.java
+0
-3
ResultObj.java
dev-misc/src/main/java/com/tykj/dev/misc/base/ResultObj.java
+8
-8
pom.xml
dev-union/pom.xml
+18
-1
UnionApplication.java
...on/src/main/java/com/tykj/dev/union/UnionApplication.java
+1
-4
DeviceCheckControllerTest.java
.../com/tykj/dev/confirmcheck/DeviceCheckControllerTest.java
+29
-0
BaseTest.java
dev-union/src/test/java/com/tykj/dev/union/BaseTest.java
+16
-0
UnionApplicationTests.java
...c/test/java/com/tykj/dev/union/UnionApplicationTests.java
+0
-13
没有找到文件。
dev-device/device-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
9cf70709
...
@@ -132,6 +132,7 @@ public class DeviceCheckController {
...
@@ -132,6 +132,7 @@ public class DeviceCheckController {
.
parse2Bto
();
.
parse2Bto
();
provStatTask
.
getInvolveUserIdList
().
add
(
AuthenticationUtils
.
getAuthentication
().
getCurrentUserInfo
().
getUserId
());
provStatTask
.
getInvolveUserIdList
().
add
(
AuthenticationUtils
.
getAuthentication
().
getCurrentUserInfo
().
getUserId
());
provStatTask
.
getInvolveUserIdList
().
add
(-
1
);
provStatTask
.
getInvolveUserIdList
().
add
(-
1
);
provStatTask
.
setCurrentPoint
(
1
);
provStatTask
=
taskService
.
start
(
provStatTask
).
parse2Bto
();
provStatTask
=
taskService
.
start
(
provStatTask
).
parse2Bto
();
// 3 构建被查单位的 自查账单 与 自查任务
// 3 构建被查单位的 自查账单 与 自查任务
...
@@ -190,7 +191,7 @@ public class DeviceCheckController {
...
@@ -190,7 +191,7 @@ public class DeviceCheckController {
*/
*/
@ApiOperation
(
value
=
"专管员B核查详情单"
)
@ApiOperation
(
value
=
"专管员B核查详情单"
)
@PutMapping
(
"/detail/B/{id}"
)
@PutMapping
(
"/detail/B/{id}"
)
public
ResponseEntity
checkUser
A
(
@PathVariable
Integer
id
,
public
ResponseEntity
checkUser
B
(
@PathVariable
Integer
id
,
@RequestParam
int
checkStatus
,
@RequestParam
int
checkStatus
,
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
int
checkUserAId
,
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
int
checkUserAId
,
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
int
checkUserBId
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
int
checkUserBId
)
{
...
...
dev-device/device-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/utils/ObjTransUtil.java
浏览文件 @
9cf70709
...
@@ -13,8 +13,10 @@ import com.tykj.dev.device.user.subject.dao.AreaDao;
...
@@ -13,8 +13,10 @@ import com.tykj.dev.device.user.subject.dao.AreaDao;
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.dao.UserDao
;
import
com.tykj.dev.device.user.subject.dao.UserDao
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.exception.ApiException
;
import
org.modelmapper.ModelMapper
;
import
org.modelmapper.ModelMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -80,7 +82,7 @@ public class ObjTransUtil {
...
@@ -80,7 +82,7 @@ public class ObjTransUtil {
//不为空则拼接
//不为空则拼接
String
checkDetailString
=
inLibString
;
String
checkDetailString
=
inLibString
;
if
(!
CollectionUtils
.
isEmpty
(
notInLibrary
))
{
if
(!
CollectionUtils
.
isEmpty
(
notInLibrary
))
{
checkDetailString
=
checkDetailString
+
notInLibString
;
checkDetailString
=
checkDetailString
+
","
+
notInLibString
;
}
}
return
checkDetailString
;
return
checkDetailString
;
}
}
...
@@ -114,7 +116,8 @@ public class ObjTransUtil {
...
@@ -114,7 +116,8 @@ public class ObjTransUtil {
String
[]
array
=
detail
.
split
(
"-"
);
String
[]
array
=
detail
.
split
(
"-"
);
Integer
deviceId
=
Integer
.
valueOf
(
array
[
0
]);
Integer
deviceId
=
Integer
.
valueOf
(
array
[
0
]);
int
proofResult
=
Integer
.
parseInt
(
array
[
1
]);
int
proofResult
=
Integer
.
parseInt
(
array
[
1
]);
DeviceLibrary
device
=
deviceRepo
.
findById
(
deviceId
).
orElse
(
null
);
DeviceLibrary
device
=
deviceRepo
.
findById
(
deviceId
).
orElseThrow
(
()
->
new
ApiException
(
ResponseEntity
.
badRequest
().
body
(
String
.
format
(
"检查到装备序号为%d的装备不在库资料中,请先执行入库操作!"
,
deviceId
))));
//依据proofResult 判断是否是在库装备
//依据proofResult 判断是否是在库装备
if
(
proofResult
==
3
)
{
if
(
proofResult
==
3
)
{
// 非在库装备
// 非在库装备
...
...
dev-device/device-confirmcheck/src/test/java/package-info.java
deleted
100644 → 0
浏览文件 @
1c28e42a
dev-device/device-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
9cf70709
...
@@ -6,8 +6,8 @@ import com.tykj.dev.device.task.repository.TaskDao;
...
@@ -6,8 +6,8 @@ import com.tykj.dev.device.task.repository.TaskDao;
import
com.tykj.dev.device.task.repository.TaskLogDao
;
import
com.tykj.dev.device.task.repository.TaskLogDao
;
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.common.StatusEnum
;
import
com.tykj.dev.device.task.subject.common.GlobalMap
;
import
com.tykj.dev.device.task.subject.common.GlobalMap
;
import
com.tykj.dev.device.task.subject.common.StatusEnum
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.task.subject.domin.TaskLog
;
import
com.tykj.dev.device.task.subject.domin.TaskLog
;
import
com.tykj.dev.device.task.subject.vo.TaskSelectVo
;
import
com.tykj.dev.device.task.subject.vo.TaskSelectVo
;
...
@@ -436,7 +436,13 @@ public class TaskServiceImpl implements TaskService {
...
@@ -436,7 +436,13 @@ public class TaskServiceImpl implements TaskService {
if
(
taskSelectVo
.
getSelectNum
()
==
2
)
{
if
(
taskSelectVo
.
getSelectNum
()
==
2
)
{
//当前指针对应userId是当前用户或者为0且所属单位为当前单位
//当前指针对应userId是当前用户或者为0且所属单位为当前单位
List
<
TaskBto
>
taskBtoList
=
taskBtos
.
stream
()
List
<
TaskBto
>
taskBtoList
=
taskBtos
.
stream
()
.
filter
(
taskBto
->
taskBto
.
getInvolveUserIdList
().
size
()>
0
&&(
userId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
()))
||
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())
==
0
&&
taskBto
.
getOwnUnit
().
equals
(
userUtils
.
getCurrentUnitId
()))))
.
filter
(
taskBto
->
{
boolean
involveExists
=
taskBto
.
getInvolveUserIdList
().
size
()
>
0
;
boolean
userConfirm
=
userId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
()));
boolean
noUserHandle
=
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())
==
0
;
boolean
belongUnit
=
taskBto
.
getOwnUnit
().
equals
(
userUtils
.
getCurrentUnitId
());
return
involveExists
&&
(
userConfirm
||
(
noUserHandle
&&
belongUnit
));
})
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
//查询所有的业务
//查询所有的业务
if
(
bussinessType
==
null
)
{
if
(
bussinessType
==
null
)
{
...
...
dev-device/device-task/src/main/java/com/tykj/dev/device/task/subject/bto/TaskBto.java
浏览文件 @
9cf70709
...
@@ -49,6 +49,7 @@ public class TaskBto {
...
@@ -49,6 +49,7 @@ public class TaskBto {
@ApiModelProperty
(
value
=
"所属单位"
)
@ApiModelProperty
(
value
=
"所属单位"
)
private
Integer
ownUnit
;
private
Integer
ownUnit
;
@ApiModelProperty
(
value
=
"数字类型,用于代表指针目前的下标"
)
@ApiModelProperty
(
value
=
"数字类型,用于代表指针目前的下标"
)
private
Integer
currentPoint
;
private
Integer
currentPoint
;
...
...
dev-device/device-user/src/main/java/com/tykj/dev/device/user/config/MyUserDetailsServiceImpl.java
浏览文件 @
9cf70709
...
@@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.security.core.userdetails.UserDetailsService
;
import
org.springframework.security.core.userdetails.UserDetailsService
;
import
org.springframework.security.core.userdetails.UsernameNotFoundException
;
import
org.springframework.security.core.userdetails.UsernameNotFoundException
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -20,8 +19,6 @@ import java.util.List;
...
@@ -20,8 +19,6 @@ import java.util.List;
*/
*/
@Service
@Service
public
class
MyUserDetailsServiceImpl
implements
UserDetailsService
{
public
class
MyUserDetailsServiceImpl
implements
UserDetailsService
{
@Autowired
private
BCryptPasswordEncoder
bCryptPasswordEncoder
;
@Autowired
@Autowired
private
UserService
userService
;
private
UserService
userService
;
@Autowired
@Autowired
...
...
dev-device/device-user/src/main/java/com/tykj/dev/device/user/config/SecurityConfig.java
浏览文件 @
9cf70709
...
@@ -39,9 +39,6 @@ import java.io.PrintWriter;
...
@@ -39,9 +39,6 @@ import java.io.PrintWriter;
@EnableWebSecurity
@EnableWebSecurity
public
class
SecurityConfig
extends
WebSecurityConfigurerAdapter
{
public
class
SecurityConfig
extends
WebSecurityConfigurerAdapter
{
@Autowired
@Autowired
private
MyEntryPoint
myEntryPoint
;
private
MyEntryPoint
myEntryPoint
;
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/ResultObj.java
浏览文件 @
9cf70709
...
@@ -15,16 +15,16 @@ import java.util.HashMap;
...
@@ -15,16 +15,16 @@ import java.util.HashMap;
@NoArgsConstructor
@NoArgsConstructor
public
class
ResultObj
{
public
class
ResultObj
{
private
Object
result
;
private
Object
data
;
private
String
m
sg
;
private
String
m
essage
;
public
ResultObj
(
Object
o
){
public
ResultObj
(
Object
o
)
{
this
.
result
=
o
;
this
.
data
=
o
;
this
.
m
sg
=
"no message"
;
this
.
m
essage
=
"no message"
;
}
}
public
ResultObj
(
String
m
){
public
ResultObj
(
String
m
)
{
this
.
m
sg
=
m
;
this
.
m
essage
=
m
;
this
.
result
=
new
HashMap
<>(
1
);
this
.
data
=
new
HashMap
<>(
1
);
}
}
}
}
dev-union/pom.xml
浏览文件 @
9cf70709
...
@@ -254,7 +254,17 @@
...
@@ -254,7 +254,17 @@
</exclusions>
</exclusions>
</dependency>
</dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
socket
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<exclusions>
<exclusion>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
union
</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--<dependency>-->
<!--<dependency>-->
<!--<groupId>com.tykj</groupId>-->
<!--<groupId>com.tykj</groupId>-->
<!--<artifactId>dev-socket</artifactId>-->
<!--<artifactId>dev-socket</artifactId>-->
...
@@ -303,6 +313,13 @@
...
@@ -303,6 +313,13 @@
</exclusions>
</exclusions>
</dependency>
</dependency>
<!-- Spring Security Test -->
<dependency>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
</dependencies>
...
...
dev-union/src/main/java/com/tykj/dev/union/UnionApplication.java
浏览文件 @
9cf70709
...
@@ -7,10 +7,7 @@ import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
...
@@ -7,10 +7,7 @@ import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
@SpringBootApplication
(
scanBasePackages
={
@SpringBootApplication
(
scanBasePackages
=
"com.tykj.dev.*"
)
"com.tykj.dev.*"
,
}
)
@EnableSwagger2
@EnableSwagger2
@ServletComponentScan
@ServletComponentScan
@EnableJpaAuditing
@EnableJpaAuditing
...
...
dev-union/src/test/java/com/tykj/dev/confirmcheck/DeviceCheckControllerTest.java
0 → 100644
浏览文件 @
9cf70709
package
com
.
tykj
.
dev
.
confirmcheck
;
import
com.tykj.dev.union.BaseTest
;
import
org.junit.jupiter.api.Test
;
/**
* DeviceCheckControllerTest.
*
* @author Matrix <xhyrzldf@gmail.com>
* @since 2020/9/15 at 11:17 上午
*/
class
DeviceCheckControllerTest
extends
BaseTest
{
private
@Test
void
checkUserA
()
{
}
@Test
void
checkUserB
()
{
}
@Test
void
checkUserC
()
{
}
}
\ No newline at end of file
dev-union/src/test/java/com/tykj/dev/union/BaseTest.java
0 → 100644
浏览文件 @
9cf70709
package
com
.
tykj
.
dev
.
union
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
/**
* BaseTest.
*
* @author Matrix <xhyrzldf@gmail.com>
* @since 2020/9/15 at 10:57 上午
*/
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
UnionApplication
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
)
public
class
BaseTest
{
}
dev-union/src/test/java/com/tykj/dev/union/UnionApplicationTests.java
deleted
100644 → 0
浏览文件 @
1c28e42a
package
com
.
tykj
.
dev
.
union
;
import
org.junit.Test
;
import
org.springframework.boot.test.context.SpringBootTest
;
@SpringBootTest
class
UnionApplicationTests
{
@Test
void
contextLoads
()
{
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论