Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
15f8d2a7
Commit
15f8d2a7
authored
Oct 19, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_patrol' into develop_tzs_patrol
parents
cac67f04
319d62db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
InputItemController.java
.../amos/patrol/business/controller/InputItemController.java
+2
-4
IInputItemDao.java
...in/amos/patrol/business/dao/repository/IInputItemDao.java
+5
-4
RemoteSecurityService.java
.../com/yeejoin/amos/patrol/feign/RemoteSecurityService.java
+2
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/InputItemController.java
View file @
15f8d2a7
...
...
@@ -695,8 +695,6 @@ public class InputItemController extends AbstractBaseController {
@RequestMapping
(
value
=
"/addItemNew"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
addNewItemNew
(
@ApiParam
(
value
=
"检查项信息"
)
@RequestBody
InputItemParam
param
)
{
if
(
param
.
getId
()>
0
){
}
else
{
if
(
"1"
.
equals
(
param
.
getEquipmentType
())
&&
"1"
.
equals
(
param
.
getCustomType
())
&&
param
.
getFacilitiesType
()
==
null
&&
param
.
getKeyPartsType
()
==
null
){
...
...
@@ -704,11 +702,11 @@ public class InputItemController extends AbstractBaseController {
}
}
if
(
CollectionUtils
.
isNotEmpty
(
inputItemDao
.
findByItemNo
(
param
.
getItemNo
(),
param
.
getId
()
!=
0
?
String
.
valueOf
(
param
.
getId
())
:
null
))
)
{
if
(
inputItemDao
.
findByItemNo
(
param
.
getItemNo
(),
param
.
getId
()
!=
0
?
String
.
valueOf
(
param
.
getId
())
:
null
)
>
0
)
{
throw
new
BadRequest
(
"该编号已存在,请重新输入"
);
}
if
(
CollectionUtils
.
isNotEmpty
(
inputItemDao
.
findByItemName
(
param
.
getName
(),
param
.
getId
()
!=
0
?
String
.
valueOf
(
param
.
getId
())
:
null
))
)
{
if
(
inputItemDao
.
findByItemName
(
param
.
getName
(),
param
.
getId
()
!=
0
?
String
.
valueOf
(
param
.
getId
())
:
null
)
>
0
)
{
throw
new
BadRequest
(
"该名称已存在,请重新输入"
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/repository/IInputItemDao.java
View file @
15f8d2a7
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.patrol.business.dao.repository;
import
com.yeejoin.amos.patrol.dao.entity.InputItem
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
...
...
@@ -34,10 +35,10 @@ public interface IInputItemDao extends BaseDao<InputItem, Long> {
@Query
(
value
=
"delete * from p_input_item where is not null and is_delete =0"
,
nativeQuery
=
true
)
void
deleteAllByEquipmentNameIsNotNull
();
@Query
(
value
=
"select
* from p_input_item where item_no = ?1 and is_delete =0 and if(?2 is null, 1 = 1 , id != ?2)
"
,
nativeQuery
=
true
)
List
<
InputItem
>
findByItemNo
(
String
itemNo
,
String
id
);
@Query
(
value
=
"select
count(1) from p_input_item where item_no = :itemNo and is_delete = 0 and id != :id
"
,
nativeQuery
=
true
)
int
findByItemNo
(
@Param
(
"itemNo"
)
String
itemNo
,
@Param
(
"id"
)
String
id
);
@Query
(
value
=
"select
* from p_input_item where name = ?1 and is_delete =0 and if(?2 is null, 1 = 1 , id != ?2)
"
,
nativeQuery
=
true
)
List
<
InputItem
>
findByItemName
(
String
name
,
String
id
);
@Query
(
value
=
"select
count(1) from p_input_item where name = :name and is_delete = 0 and id != :id
"
,
nativeQuery
=
true
)
int
findByItemName
(
@Param
(
"name"
)
String
name
,
@Param
(
"id"
)
String
id
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/feign/RemoteSecurityService.java
View file @
15f8d2a7
...
...
@@ -100,7 +100,7 @@ public class RemoteSecurityService {
if
(
ObjectUtils
.
isEmpty
(
toke
))
{
toke
=
getLogin
(
dPasswordAuthModel
);
}
else
{
RequestContext
.
setProduct
(
productWeb
);
RequestContext
.
setProduct
(
productWeb
);
if
(!
TokenOperation
.
refresh
(
toke
.
getToke
()))
{
toke
=
getLogin
(
dPasswordAuthModel
);
}
...
...
@@ -239,7 +239,7 @@ public class RemoteSecurityService {
}
public
List
<
AgencyUserModel
>
listUserByUserIds
(
String
userIds
)
{
CommonResponse
commonResponse
=
iAmosSecurityServer
.
listUserByUserIds
(
userIds
,
true
);
CommonResponse
commonResponse
=
iAmosSecurityServer
.
listUserByUserIds
(
userIds
,
true
);
return
handleArray
(
commonResponse
,
AgencyUserModel
.
class
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment