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
eb086901
Commit
eb086901
authored
Sep 27, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
626a82d0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
207 additions
and
5 deletions
+207
-5
CommonResponseUtil2.java
...n/amos/boot/module/jcs/api/feign/CommonResponseUtil2.java
+52
-0
Constant.java
.../com/yeejoin/amos/boot/module/jcs/api/feign/Constant.java
+125
-0
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+1
-1
FirefightersController.java
...oot/module/jcs/biz/controller/FirefightersController.java
+1
-1
FirestationJacketController.java
...odule/jcs/biz/controller/FirestationJacketController.java
+27
-2
FireTeamServiceImpl.java
...boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
+1
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/feign/CommonResponseUtil2.java
0 → 100644
View file @
eb086901
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
feign
;
import
org.springframework.http.HttpStatus
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
public
class
CommonResponseUtil2
{
public
static
ResponseModel
success
()
{
ResponseModel
res
=
new
ResponseModel
();
res
.
setDevMessage
(
Constant
.
RESULT_SUCCESS
);
res
.
setStatus
(
HttpStatus
.
OK
.
value
());
return
res
;
}
public
static
ResponseModel
success
(
Object
obj
)
{
ResponseModel
res
=
new
ResponseModel
();
res
.
setResult
(
obj
);
res
.
setDevMessage
(
Constant
.
RESULT_SUCCESS
);
res
.
setStatus
(
HttpStatus
.
OK
.
value
());
return
res
;
}
public
static
ResponseModel
success
(
Object
obj
,
String
message
)
{
ResponseModel
res
=
new
ResponseModel
();
res
.
setResult
(
obj
);
res
.
setDevMessage
(
message
);
res
.
setStatus
(
HttpStatus
.
OK
.
value
());
return
res
;
}
public
static
ResponseModel
failure
()
{
ResponseModel
res
=
new
ResponseModel
();
res
.
setDevMessage
(
Constant
.
RESULT_FAILURE
);
res
.
setStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
return
res
;
}
public
static
ResponseModel
failure
(
String
message
)
{
ResponseModel
res
=
new
ResponseModel
();
res
.
setDevMessage
(
Constant
.
RESULT_FAILURE
);
res
.
setMessage
(
message
);
res
.
setStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
return
res
;
}
public
static
ResponseModel
failure
(
Object
obj
,
String
message
)
{
ResponseModel
res
=
new
ResponseModel
();
res
.
setResult
(
obj
);
res
.
setDevMessage
(
Constant
.
RESULT_FAILURE
);
res
.
setStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
return
res
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/feign/Constant.java
0 → 100644
View file @
eb086901
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
feign
;
import
java.nio.charset.Charset
;
import
java.nio.charset.StandardCharsets
;
import
java.time.format.DateTimeFormatter
;
/**
* @Description: 常量类
* @Author: duanwei
* @Date: 2019/7/29
*/
public
interface
Constant
{
String
SMALL_PRO_PRCODE
=
"SMALL_PRO_PRCODE_"
;
String
RESULT_SUCCESS
=
"SUCCESS"
;
String
RESULT_FAILURE
=
"FAILURE"
;
/**
* 任务-作业交底
*/
Integer
JOB_TYPE
=
0
;
/**
* 任务-三交三查
*/
Integer
HAND_QUERY
=
1
;
/**
* 违规管理
*/
Integer
BAD_MANAGEMENT
=
2
;
Charset
DEFAULT_CHARSET
=
StandardCharsets
.
UTF_8
;
String
FILE_SEPARATOR
=
System
.
getProperty
(
"file.separator"
);
DateTimeFormatter
DATE_TIME_FORMATTER
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
String
PAGE_NUM
=
"0"
;
String
SIZE_NUM
=
"20"
;
String
PAGE
=
"page"
;
String
SIZE
=
"size"
;
String
ZERO
=
"0"
;
String
ONE
=
"1"
;
String
TWO
=
"2"
;
String
THREE
=
"3"
;
String
FOUR
=
"4"
;
String
FIVE
=
"5"
;
String
NULL
=
""
;
String
JSON_NULL
=
"[]"
;
/**
* 请求成功
*/
String
SUCCESS
=
"200"
;
/**
* 请求错误
*/
String
ERROR
=
"300"
;
/**
* 无权限
*/
String
PERMISSION
=
"401"
;
/**
* 请求成功,其他错误
*/
String
DATA_NULL
=
"402"
;
/**
* 请求失败
*/
String
FAILED
=
"999"
;
/**
* 最大值
*/
Integer
MAX
=
32767
;
/**
* 数据请求返回码
*/
public
static
final
int
RESCODE_SUCCESS
=
1000
;
//成功
public
static
final
int
RESCODE_SUCCESS_MSG
=
1001
;
//成功(有返回信息)
public
static
final
int
RESCODE_EXCEPTION
=
1002
;
//请求抛出异常
public
static
final
int
RESCODE_NOLOGIN
=
1003
;
//未登陆状态
public
static
final
int
RESCODE_NOEXIST
=
1004
;
//查询结果为空
public
static
final
int
RESCODE_NOAUTH
=
1005
;
//无操作权限
public
static
final
int
RESCODE_LOGINEXPIRE
=
1006
;
//登录过期
/**
* token
*/
public
static
final
int
JWT_ERRCODE_EXPIRE
=
1007
;
//Token过期
public
static
final
int
JWT_ERRCODE_FAIL
=
1008
;
//验证不通过
/**
* jwt
*/
public
static
final
String
JWT_ID
=
"jwt-black"
;
//jwt签发者
public
static
final
String
JWT_SECRET
=
"Isi5Ob9OfvJt+4IHoMJlHkS1ttg="
;
//密匙
public
static
final
int
JWT_TTL
=
60
*
60
*
1000
;
// 60*60*1000; //millisecond
public
static
final
int
JWT_REFRESH_INTERVAL
=
18
*
1000
;
//55*60*1000; //millisecond
public
static
final
int
JWT_REFRESH_TTL
=
60
*
1000
;
// 12*60*60*1000; //millisecond
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
eb086901
...
@@ -436,7 +436,7 @@ public class OrgUsrController extends BaseController {
...
@@ -436,7 +436,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getParentBuilding/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getParentBuilding/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取最上级
建筑信息
"
,
notes
=
"获取最上级建筑信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取最上级
station
"
,
notes
=
"获取最上级建筑信息"
)
public
ResponseModel
<
JSONObject
>
getBuliding
(
@PathVariable
Long
id
)
{
public
ResponseModel
<
JSONObject
>
getBuliding
(
@PathVariable
Long
id
)
{
JSONObject
equipjSONObject
=
this
.
getBulid
(
id
);
JSONObject
equipjSONObject
=
this
.
getBulid
(
id
);
return
ResponseHelper
.
buildResponse
(
equipjSONObject
);
return
ResponseHelper
.
buildResponse
(
equipjSONObject
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersController.java
View file @
eb086901
...
@@ -132,7 +132,7 @@ public class FirefightersController extends BaseController {
...
@@ -132,7 +132,7 @@ public class FirefightersController extends BaseController {
List
<
FirefightersJacket
>
firefightersJacket
=
iFirefightersJacketService
.
list
(
queryWrapper
);
List
<
FirefightersJacket
>
firefightersJacket
=
iFirefightersJacketService
.
list
(
queryWrapper
);
if
(
firefightersJacket
!=
null
&&
firefightersJacket
.
size
()
>
0
)
{
if
(
firefightersJacket
!=
null
&&
firefightersJacket
.
size
()
>
0
)
{
// BUG 2222 by litw start 2021年9月10日
// BUG 2222 by litw start 2021年9月10日
throw
new
BadRequest
(
"该消防还有在装装备!
"
);
return
ResponseHelper
.
buildResponse
(
"-2
"
);
}
}
try
{
try
{
iFirefightersService
.
update
(
new
UpdateWrapper
<
Firefighters
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"is_delete"
,
1
));
iFirefightersService
.
update
(
new
UpdateWrapper
<
Firefighters
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"is_delete"
,
1
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirestationJacketController.java
View file @
eb086901
...
@@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirestationJacket
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirestationJacket
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireStationServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.EquipSpecificDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.EquipSpecificDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.EquipmentOnCarDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.EquipmentOnCarDto
;
import
com.yeejoin.amos.boot.module.jcs.api.feign.CommonResponseUtil2
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FirestationJacketServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FirestationJacketServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -40,7 +42,8 @@ public class FirestationJacketController extends BaseController {
...
@@ -40,7 +42,8 @@ public class FirestationJacketController extends BaseController {
@Autowired
@Autowired
FirestationJacketServiceImpl
iFirestationJacketService
;
FirestationJacketServiceImpl
iFirestationJacketService
;
@Autowired
FireStationServiceImpl
fireStationServiceImpl
;
/**
/**
* 新增消防人员配装记录
* 新增消防人员配装记录
*
*
...
@@ -100,11 +103,33 @@ public class FirestationJacketController extends BaseController {
...
@@ -100,11 +103,33 @@ public class FirestationJacketController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
ResponseModel
<
FirestationJacket
>
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
public
ResponseModel
<
FirestationJacket
>
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
QueryWrapper
<
FirestationJacket
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
FirestationJacket
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"fire
station
_id"
,
id
);
queryWrapper
.
eq
(
"fire
fighters
_id"
,
id
);
FirestationJacket
firestationJacket
=
iFirestationJacketService
.
getOne
(
queryWrapper
);
FirestationJacket
firestationJacket
=
iFirestationJacketService
.
getOne
(
queryWrapper
);
return
ResponseHelper
.
buildResponse
(
firestationJacket
);
return
ResponseHelper
.
buildResponse
(
firestationJacket
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/Firestation/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除微型消防站"
,
notes
=
"根据sequenceNbr删除微型消防站"
)
public
ResponseModel
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
QueryWrapper
<
FirestationJacket
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"firefighters_id"
,
sequenceNbr
);
FirestationJacket
firestationJacket
=
iFirestationJacketService
.
getOne
(
queryWrapper
);
if
(
firestationJacket
!=
null
){
return
CommonResponseUtil2
.
failure
(
"微型消防站有配装装备,不能删除!"
);
}
return
ResponseHelper
.
buildResponse
(
fireStationServiceImpl
.
updateisDelete
(
sequenceNbr
));
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
View file @
eb086901
...
@@ -125,7 +125,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -125,7 +125,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
}
}
t
.
setCarNum
(
carNum
);
t
.
setCarNum
(
carNum
);
t
.
setFighterNum
(
fighterNum
);
t
.
setFighterNum
(
fighterNum
);
/*//递归查找全部战备人数 BUG2217 bykongfm
/*//递归查找全部战备人数 BUG2217 bykongfm
firefighters/1435850387868385282
t.setFighterNum(getFightNumByTeamId(t.getSequenceNbr()));*/
t.setFighterNum(getFightNumByTeamId(t.getSequenceNbr()));*/
});
});
fireTeamListPage
.
setRecords
(
fireTeamList
);
fireTeamListPage
.
setRecords
(
fireTeamList
);
...
...
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